appos 0.1.14-0 → 0.1.15-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/exports/bun-sqlite-dialect-DN7EKoIB-U6HWGDKS.js +1 -0
- package/build/exports/chunk-2LU65C2X.js +1 -0
- package/build/exports/chunk-3RRIQKOV.js +2 -0
- package/build/exports/chunk-A2LPCJPF.js +5 -0
- package/build/exports/chunk-CWTDMDIJ.js +2 -0
- package/build/exports/chunk-FBFACBKZ.js +20 -0
- package/build/exports/chunk-FZ26Y4SI.js +1 -0
- package/build/exports/chunk-GQYUAAFT.js +1 -0
- package/build/exports/chunk-HZYRJBRQ.js +1 -0
- package/build/exports/chunk-IAPQO6XO.js +1 -0
- package/build/exports/chunk-JIMTVXLP.js +5 -0
- package/build/exports/chunk-KNTGSRCW.js +20 -0
- package/build/exports/chunk-KRQ2L5OP.js +1 -0
- package/build/exports/chunk-MQK6VFZR.js +1 -0
- package/build/exports/chunk-N756FM5W.js +6 -0
- package/build/exports/chunk-NJ2TZAVN.js +169 -0
- package/build/exports/chunk-NM7CITTT.js +2 -0
- package/build/exports/chunk-PECJ5CRS.js +1 -0
- package/build/exports/chunk-PYGCG54X.js +94 -0
- package/build/exports/chunk-QMFB7WUQ.js +1 -0
- package/build/exports/chunk-QWUKON2B.js +4 -0
- package/build/exports/chunk-S3F2U5VR.js +1 -0
- package/build/exports/chunk-S6CGHQRG.js +2 -0
- package/build/exports/chunk-TLDYRTHH.js +1 -0
- package/build/exports/chunk-TX6WXZHJ.js +1 -0
- package/build/exports/chunk-Y6DVQ7FD.js +1 -0
- package/build/exports/chunk-YBDDYGAW.js +1 -0
- package/build/exports/client.d.ts +2082 -2093
- package/build/exports/client.js +60 -22
- package/build/exports/date.js +1 -1
- package/build/exports/db.js +9 -0
- package/build/exports/dist-es-442MVKMG.js +1 -0
- package/build/exports/dist-es-5NPX4IPA.js +2 -0
- package/build/exports/dist-es-AAGJZOKW.js +1 -0
- package/build/exports/dist-es-BA4XRQMD.js +1 -0
- package/build/exports/dist-es-CEXBPGKD.js +1 -0
- package/build/exports/dist-es-D7P74EQC.js +2 -0
- package/build/exports/dist-es-K23RHFIG.js +2 -0
- package/build/exports/dist-es-K6CZFUD7.js +5 -0
- package/build/exports/dist-es-PV5MXZPQ.js +5 -0
- package/build/exports/dist-es-PV6DSUWC.js +1 -0
- package/build/exports/dist-es-PYWXCUQO.js +2 -0
- package/build/exports/dist-es-QLJ2PEMO.js +1 -0
- package/build/exports/dist-es-TDQNJYF5.js +1 -0
- package/build/exports/dist-es-VXQY2642.js +1 -0
- package/build/exports/event-streams-JL44VPIA.js +1 -0
- package/build/exports/file-preview-dialog-XJMPJ764.js +15 -0
- package/build/exports/kysely-adapter-UB5EKM3L.js +1 -0
- package/build/exports/loadSso-ATQGBCEY.js +1 -0
- package/build/exports/loadSso-ILXKFPPV.js +1 -0
- package/build/exports/magic-string.es-TEACLLHX.js +13 -0
- package/build/exports/memory-adapter-LJJR2XXS.js +1 -0
- package/build/exports/node-ponyfill-6NJTIN4I.js +1 -0
- package/build/exports/node-sqlite-dialect-BqISUSC3-3545EWOZ.js +1 -0
- package/build/exports/plugin-56OEBMME.js +4 -0
- package/build/exports/server.d.ts +71779 -0
- package/build/exports/server.js +435 -0
- package/build/exports/sso-oidc-7POVDJYK.js +1 -0
- package/build/exports/sso-oidc-TUR3VC4Y.js +1 -0
- package/build/exports/sts-35P3OWOX.js +6 -0
- package/build/exports/sts-ZDKVF6HW.js +1 -0
- package/build/exports/test.d.ts +8942 -0
- package/build/exports/test.js +1583 -0
- package/build/exports/ui/index.d.ts +568 -1595
- package/build/exports/ui/index.js +162 -112
- package/build/exports/utils.js +1 -1
- package/build/exports/zod.js +13 -13
- package/package.json +3 -2
- package/build/exports/adapter-factory-CLtf7vT5-DghYA9zq.mjs +0 -88
- package/build/exports/bun-sqlite-dialect-DN7EKoIB-0pWIoG0L.mjs +0 -1
- package/build/exports/chunk-BYI67GdN.mjs +0 -1
- package/build/exports/chunk-DQj_Q5LL.mjs +0 -1
- package/build/exports/client-Cf0k1wnb.mjs +0 -7
- package/build/exports/date.d.ts +0 -1
- package/build/exports/db.d.mts +0 -5196
- package/build/exports/db.mjs +0 -9
- package/build/exports/dialect-BeMwdQoz-D41NdSow.mjs +0 -1
- package/build/exports/dist-cjs-6zIKAlZR.mjs +0 -1
- package/build/exports/dist-cjs-8ShtoC4L.mjs +0 -1
- package/build/exports/dist-cjs-8w9IfsHf.mjs +0 -1
- package/build/exports/dist-cjs-B5EVkyOL.mjs +0 -1
- package/build/exports/dist-cjs-BilOG_GK.mjs +0 -5
- package/build/exports/dist-cjs-C52tT6at.mjs +0 -22
- package/build/exports/dist-cjs-C7mx_mmI.mjs +0 -1
- package/build/exports/dist-cjs-CG4G0SgT.mjs +0 -1
- package/build/exports/dist-cjs-D9iFq61w.mjs +0 -1
- package/build/exports/dist-cjs-DBYzdOBR.mjs +0 -10
- package/build/exports/dist-cjs-DO06FS0-.mjs +0 -1
- package/build/exports/dist-cjs-DpVGmjIF.mjs +0 -1
- package/build/exports/dist-cjs-YEmtR5oW.mjs +0 -1
- package/build/exports/dist-cjs-ZYsjewld.mjs +0 -1
- package/build/exports/dist-cjs-hp3M87Bc.mjs +0 -1
- package/build/exports/esm-DPet4lFW.mjs +0 -3
- package/build/exports/event-streams-BOfsfbfw.mjs +0 -1
- package/build/exports/file-preview-dialog-Cugg8tEc.mjs +0 -59
- package/build/exports/kysely-adapter-CGc8Omn1.mjs +0 -1
- package/build/exports/magic-string.es-jZcifc5m.mjs +0 -14
- package/build/exports/memory-adapter-CVX5yLJe.mjs +0 -1
- package/build/exports/node-ponyfill-PofhX7d2.mjs +0 -1
- package/build/exports/node-sqlite-dialect-BqISUSC3-DYvTLBpY.mjs +0 -1
- package/build/exports/package-DfozRyK6.mjs +0 -1
- package/build/exports/react-dom-CPjM_WCt.mjs +0 -42
- package/build/exports/server.d.mts +0 -71761
- package/build/exports/server.mjs +0 -325
- package/build/exports/sso-oidc-PXZ3-6bu.mjs +0 -1
- package/build/exports/sts-9LPyuVkZ.mjs +0 -1
- package/build/exports/sts-BpR3feII.mjs +0 -1
- package/build/exports/test.d.mts +0 -8922
- package/build/exports/test.mjs +0 -1255
- package/build/exports/utils.d.ts +0 -21
- package/build/exports/zod.d.ts +0 -2
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{a as mt,b as Z,c as ve}from"./chunk-FZ26Y4SI.js";import{a as F,b as A,c as H,d as Et,e as ae,f as St,i as yt,j as T}from"./chunk-JIMTVXLP.js";import{a as ht,b as Pe,c as gt,d as M}from"./chunk-YBDDYGAW.js";import{a as Rt}from"./chunk-2LU65C2X.js";import{a as n}from"./chunk-Y6DVQ7FD.js";var k=n((e,t)=>{let r=[];if(e&&r.push(e),t)for(let o of t)r.push(o);return r},"getAllAliases"),v=n((e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,"getMiddlewareNameWithAliases"),B=n(()=>{let e=[],t=[],r=!1,o=new Set,s=n(l=>l.sort((p,f)=>At[f.step]-At[p.step]||_t[f.priority||"normal"]-_t[p.priority||"normal"]),"sort"),i=n(l=>{let p=!1,f=n(g=>{let S=k(g.name,g.aliases);if(S.includes(l)){p=!0;for(let m of S)o.delete(m);return!1}return!0},"filterCb");return e=e.filter(f),t=t.filter(f),p},"removeByName"),a=n(l=>{let p=!1,f=n(g=>{if(g.middleware===l){p=!0;for(let S of k(g.name,g.aliases))o.delete(S);return!1}return!0},"filterCb");return e=e.filter(f),t=t.filter(f),p},"removeByReference"),c=n(l=>(e.forEach(p=>{l.add(p.middleware,{...p})}),t.forEach(p=>{l.addRelativeTo(p.middleware,{...p})}),l.identifyOnResolve?.(h.identifyOnResolve()),l),"cloneTo"),d=n(l=>{let p=[];return l.before.forEach(f=>{f.before.length===0&&f.after.length===0?p.push(f):p.push(...d(f))}),p.push(l),l.after.reverse().forEach(f=>{f.before.length===0&&f.after.length===0?p.push(f):p.push(...d(f))}),p},"expandRelativeMiddlewareList"),u=n((l=!1)=>{let p=[],f=[],g={};return e.forEach(m=>{let E={...m,before:[],after:[]};for(let R of k(E.name,E.aliases))g[R]=E;p.push(E)}),t.forEach(m=>{let E={...m,before:[],after:[]};for(let R of k(E.name,E.aliases))g[R]=E;f.push(E)}),f.forEach(m=>{if(m.toMiddleware){let E=g[m.toMiddleware];if(E===void 0){if(l)return;throw new Error(`${m.toMiddleware} is not found when adding ${v(m.name,m.aliases)} middleware ${m.relation} ${m.toMiddleware}`)}m.relation==="after"&&E.after.push(m),m.relation==="before"&&E.before.push(m)}}),s(p).map(d).reduce((m,E)=>(m.push(...E),m),[])},"getMiddlewareList"),h={add:n((l,p={})=>{let{name:f,override:g,aliases:S}=p,m={step:"initialize",priority:"normal",middleware:l,...p},E=k(f,S);if(E.length>0){if(E.some(R=>o.has(R))){if(!g)throw new Error(`Duplicate middleware name '${v(f,S)}'`);for(let R of E){let I=e.findIndex(Q=>Q.name===R||Q.aliases?.some(De=>De===R));if(I===-1)continue;let w=e[I];if(w.step!==m.step||m.priority!==w.priority)throw new Error(`"${v(w.name,w.aliases)}" middleware with ${w.priority} priority in ${w.step} step cannot be overridden by "${v(f,S)}" middleware with ${m.priority} priority in ${m.step} step.`);e.splice(I,1)}}for(let R of E)o.add(R)}e.push(m)},"add"),addRelativeTo:n((l,p)=>{let{name:f,override:g,aliases:S}=p,m={middleware:l,...p},E=k(f,S);if(E.length>0){if(E.some(R=>o.has(R))){if(!g)throw new Error(`Duplicate middleware name '${v(f,S)}'`);for(let R of E){let I=t.findIndex(Q=>Q.name===R||Q.aliases?.some(De=>De===R));if(I===-1)continue;let w=t[I];if(w.toMiddleware!==m.toMiddleware||w.relation!==m.relation)throw new Error(`"${v(w.name,w.aliases)}" middleware ${w.relation} "${w.toMiddleware}" middleware cannot be overridden by "${v(f,S)}" middleware ${m.relation} "${m.toMiddleware}" middleware.`);t.splice(I,1)}}for(let R of E)o.add(R)}t.push(m)},"addRelativeTo"),clone:n(()=>c(B()),"clone"),use:n(l=>{l.applyToStack(h)},"use"),remove:n(l=>typeof l=="string"?i(l):a(l),"remove"),removeByTag:n(l=>{let p=!1,f=n(g=>{let{tags:S,name:m,aliases:E}=g;if(S&&S.includes(l)){let R=k(m,E);for(let I of R)o.delete(I);return p=!0,!1}return!0},"filterCb");return e=e.filter(f),t=t.filter(f),p},"removeByTag"),concat:n(l=>{let p=c(B());return p.use(l),p.identifyOnResolve(r||p.identifyOnResolve()||(l.identifyOnResolve?.()??!1)),p},"concat"),applyToStack:c,identify:n(()=>u(!0).map(l=>{let p=l.step??l.relation+" "+l.toMiddleware;return v(l.name,l.aliases)+" - "+p}),"identify"),identifyOnResolve(l){return typeof l=="boolean"&&(r=l),r},resolve:n((l,p)=>{for(let f of u().map(g=>g.middleware).reverse())l=f(l,p);return r&&console.log(h.identify()),l},"resolve")};return h},"constructStack"),At={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},_t={high:3,normal:2,low:1};var wt=class{static{n(this,"Client")}config;middlewareStack=B();initConfig;handlers;constructor(t){this.config=t}send(t,r,o){let s=typeof r!="function"?r:void 0,i=typeof r=="function"?r:o,a=s===void 0&&this.config.cacheMiddleware===!0,c;if(a){this.handlers||(this.handlers=new WeakMap);let d=this.handlers;d.has(t.constructor)?c=d.get(t.constructor):(c=t.resolveMiddleware(this.middlewareStack,this.config,s),d.set(t.constructor,c))}else delete this.handlers,c=t.resolveMiddleware(this.middlewareStack,this.config,s);if(i)c(t).then(d=>i(null,d.output),d=>i(d)).catch(()=>{});else return c(t).then(d=>d.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}};var G;(function(e){e.HTTP="http",e.HTTPS="https"})(G||(G={}));var z;(function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"})(z||(z={}));var J="__smithy_context";var ce=n(e=>typeof e=="function"?e():e,"deref");var _s=n(e=>({setHttpHandler(t){e.httpHandler=t},httpHandler(){return e.httpHandler},updateHttpClientConfig(t,r){e.httpHandler?.updateHttpClientConfig(t,r)},httpHandlerConfigs(){return e.httpHandler.httpHandlerConfigs()}}),"getHttpHandlerExtensionConfiguration"),ws=n(e=>({httpHandler:e.httpHandler()}),"resolveHttpHandlerRuntimeConfig");var V=n(e=>e[J]||(e[J]={}),"getSmithyContext");var O=n(e=>{if(typeof e=="function")return e;let t=Promise.resolve(e);return()=>t},"normalizeProvider");function ee(e){if(typeof e=="object")return e;e=e|0;let t={},r=0;for(let o of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(e>>r++&1)===1&&(t[o]=1);return t}n(ee,"translateTraits");var j=class e{static{n(this,"NormalizedSchema")}ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=e.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(t,r){this.ref=t,this.memberName=r;let o=[],s=t,i=t;for(this._isMemberSchema=!1;Me(s);)o.push(s[1]),s=s[0],i=ce(s),this._isMemberSchema=!0;if(o.length>0){this.memberTraits={};for(let a=o.length-1;a>=0;--a){let c=o[a];Object.assign(this.memberTraits,ee(c))}}else this.memberTraits=0;if(i instanceof e){let a=this.memberTraits;Object.assign(this,i),this.memberTraits=Object.assign({},a,i.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??i.memberName;return}if(this.schema=ce(i),Pn(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(i),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](t){let r=this.prototype.isPrototypeOf(t);return!r&&typeof t=="object"&&t!==null?t.symbol===this.symbol:r}static of(t){let r=ce(t);if(r instanceof e)return r;if(Me(r)){let[o,s]=r;if(o instanceof e)return Object.assign(o.getMergedTraits(),ee(s)),o;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(t,null,2)}.`)}return new e(r)}getSchema(){let t=this.schema;return t[0]===0?t[4]:t}getName(t=!1){let{name:r}=this;return!t&&r&&r.includes("#")?r.split("#")[1]:r||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){let t=this.getSchema();return typeof t=="number"?t>=64&&t<128:t[0]===1}isMapSchema(){let t=this.getSchema();return typeof t=="number"?t>=128&&t<=255:t[0]===2}isStructSchema(){let t=this.getSchema();return t[0]===3||t[0]===-3}isBlobSchema(){let t=this.getSchema();return t===21||t===42}isTimestampSchema(){let t=this.getSchema();return typeof t=="number"&&t>=4&&t<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){let{streaming:t}=this.getMergedTraits();return!!t||this.getSchema()===42}isIdempotencyToken(){let t=n(i=>(i&4)===4||!!i?.idempotencyToken,"match"),{normalizedTraits:r,traits:o,memberTraits:s}=this;return t(r)||t(o)||t(s)}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return ee(this.memberTraits)}getOwnTraits(){return ee(this.traits)}getKeySchema(){let[t,r]=[this.isDocumentSchema(),this.isMapSchema()];if(!t&&!r)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);let o=this.getSchema(),s=t?15:o[4]??0;return te([s,0],"key")}getValueSchema(){let t=this.getSchema(),[r,o,s]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],i=typeof t=="number"?63&t:t&&typeof t=="object"&&(o||s)?t[3+t[0]]:r?15:void 0;if(i!=null)return te([i,0],o?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(t){let r=this.getSchema();if(this.isStructSchema()&&r[4].includes(t)){let o=r[4].indexOf(t),s=r[5][o];return te(Me(s)?s:[s,0],t)}if(this.isDocumentSchema())return te([15,0],t);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no no member=${t}.`)}getMemberSchemas(){let t={};try{for(let[r,o]of this.structIterator())t[r]=o}catch{}return t}getEventStreamMember(){if(this.isStructSchema()){for(let[t,r]of this.structIterator())if(r.isStreaming()&&r.isStructSchema())return t}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");let t=this.getSchema();for(let r=0;r<t[4].length;++r)yield[t[4][r],te([t[5][r],0],t[4][r])]}};function te(e,t){if(e instanceof j)return Object.assign(e,{memberName:t,_isMemberSchema:!0});let r=j;return new r(e,t)}n(te,"member");var Me=n(e=>Array.isArray(e)&&e.length===2,"isMemberSchema"),Pn=n(e=>Array.isArray(e)&&e.length>=5,"isStaticSchema");var ke="***SensitiveInformation***";function ue(e,t){if(t==null)return t;let r=j.of(e);if(r.getMergedTraits().sensitive)return ke;if(r.isListSchema()){if(!!r.getValueSchema().getMergedTraits().sensitive)return ke}else if(r.isMapSchema()){if(!!r.getKeySchema().getMergedTraits().sensitive||!!r.getValueSchema().getMergedTraits().sensitive)return ke}else if(r.isStructSchema()&&typeof t=="object"){let o=t,s={};for(let[i,a]of r.structIterator())o[i]!=null&&(s[i]=ue(a,o[i]));return s}return t}n(ue,"schemaLogFilter");var Ue=class{static{n(this,"Command")}middlewareStack=B();schema;static classBuilder(){return new Mn}resolveMiddlewareWithContext(t,r,o,{middlewareFn:s,clientName:i,commandName:a,inputFilterSensitiveLog:c,outputFilterSensitiveLog:d,smithyContext:u,additionalContext:h,CommandCtor:l}){for(let m of s.bind(this)(l,t,r,o))this.middlewareStack.use(m);let p=t.concat(this.middlewareStack),{logger:f}=r,g={logger:f,clientName:i,commandName:a,inputFilterSensitiveLog:c,outputFilterSensitiveLog:d,[J]:{commandInstance:this,...u},...h},{requestHandler:S}=r;return p.resolve(m=>S.handle(m.request,o||{}),g)}},Mn=class{static{n(this,"ClassBuilder")}_init=n(()=>{},"_init");_ep={};_middlewareFn=n(()=>[],"_middlewareFn");_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(t){this._init=t}ep(t){return this._ep=t,this}m(t){return this._middlewareFn=t,this}s(t,r,o={}){return this._smithyContext={service:t,operation:r,...o},this}c(t={}){return this._additionalContext=t,this}n(t,r){return this._clientName=t,this._commandName=r,this}f(t=o=>o,r=o=>o){return this._inputFilterSensitiveLog=t,this._outputFilterSensitiveLog=r,this}ser(t){return this._serializer=t,this}de(t){return this._deserializer=t,this}sc(t){return this._operationSchema=t,this._smithyContext.operationSchema=t,this}build(){let t=this,r;return r=class extends Ue{static{n(this,"CommandRef")}input;static getEndpointParameterInstructions(){return t._ep}constructor(...[o]){super(),this.input=o??{},t._init(this),this.schema=t._operationSchema}resolveMiddleware(o,s,i){let a=t._operationSchema,c=a?.[4]??a?.input,d=a?.[5]??a?.output;return this.resolveMiddlewareWithContext(o,s,i,{CommandCtor:r,middlewareFn:t._middlewareFn,clientName:t._clientName,commandName:t._commandName,inputFilterSensitiveLog:t._inputFilterSensitiveLog??(a?ue.bind(null,c):u=>u),outputFilterSensitiveLog:t._outputFilterSensitiveLog??(a?ue.bind(null,d):u=>u),smithyContext:t._smithyContext,additionalContext:t._additionalContext})}serialize=t._serializer;deserialize=t._deserializer}}};var Tt=n((e,t)=>{if(!t||t.length===0)return e;let r=[];for(let o of t)for(let s of e)s.schemeId.split("#")[1]===o&&r.push(s);for(let o of e)r.find(({schemeId:s})=>s===o.schemeId)||r.push(o);return r},"resolveAuthOptions");function kn(e){let t=new Map;for(let r of e)t.set(r.schemeId,r);return t}n(kn,"convertHttpAuthSchemesToMap");var xt=n((e,t)=>(r,o)=>async s=>{let i=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,o,s.input)),a=e.authSchemePreference?await e.authSchemePreference():[],c=Tt(i,a),d=kn(e.httpAuthSchemes),u=V(o),h=[];for(let l of c){let p=d.get(l.schemeId);if(!p){h.push(`HttpAuthScheme \`${l.schemeId}\` was not enabled for this service.`);continue}let f=p.identityProvider(await t.identityProviderConfigProvider(e));if(!f){h.push(`HttpAuthScheme \`${l.schemeId}\` did not have an IdentityProvider configured.`);continue}let{identityProperties:g={},signingProperties:S={}}=l.propertiesExtractor?.(e,o)||{};l.identityProperties=Object.assign(l.identityProperties||{},g),l.signingProperties=Object.assign(l.signingProperties||{},S),u.selectedHttpAuthScheme={httpAuthOption:l,identity:await f(l.identityProperties),signer:p.signer};break}if(!u.selectedHttpAuthScheme)throw new Error(h.join(`
|
|
2
|
+
`));return r(s)},"httpAuthSchemeMiddleware");var Un={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},ei=n((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r})=>({applyToStack:n(o=>{o.addRelativeTo(xt(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:r}),Un)},"applyToStack")}),"getHttpAuthSchemeEndpointRuleSetPlugin");var It=n((e,t)=>(r,o)=>async s=>{let{response:i}=await r(s);try{let a=await t(i,e);return{response:i,output:a}}catch(a){if(Object.defineProperty(a,"$response",{value:i}),!("$metadata"in a)){let c="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{a.message+=`
|
|
3
|
+
`+c}catch{!o.logger||o.logger?.constructor?.name==="NoOpLogger"?console.warn(c):o.logger?.warn?.(c)}typeof a.$responseBodyText<"u"&&a.$response&&(a.$response.body=a.$responseBodyText);try{if(H.isInstance(i)){let{headers:d={}}=i,u=Object.entries(d);a.$metadata={httpStatusCode:i.statusCode,requestId:$e(/^x-[\w-]+-request-?id$/,u),extendedRequestId:$e(/^x-[\w-]+-id-2$/,u),cfId:$e(/^x-[\w-]+-cf-id$/,u)}}}catch{}}throw a}},"deserializerMiddleware"),$e=n((e,t)=>(t.find(([r])=>r.match(e))||[void 0,void 0])[1],"findHeader");var Ct=n((e,t)=>(r,o)=>async s=>{let i=e,a=o.endpointV2?.url&&i.urlParser?async()=>i.urlParser(o.endpointV2.url):i.endpoint;if(!a)throw new Error("No valid endpoint provider available.");let c=await t(s.input,{...e,endpoint:a});return r({...s,request:c})},"serializerMiddleware");var $n={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Le={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function di(e,t,r){return{applyToStack:n(o=>{o.add(It(e,r),$n),o.add(Ct(e,t),Le)},"applyToStack")}}n(di,"getSerdePlugin");var Ln=n(e=>t=>{throw t},"defaultErrorHandler"),Fn=n((e,t)=>{},"defaultSuccessHandler"),Nt=n(e=>(t,r)=>async o=>{if(!A.isInstance(o.request))return t(o);let i=V(r).selectedHttpAuthScheme;if(!i)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:a={}},identity:c,signer:d}=i,u=await t({...o,request:await d.sign(o.request,c,a)}).catch((d.errorHandler||Ln)(a));return(d.successHandler||Fn)(u.response,a),u},"httpSigningMiddleware");var Hn={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},Si=n(e=>({applyToStack:n(t=>{t.addRelativeTo(Nt(e),Hn)},"applyToStack")}),"getHttpSigningPlugin");var Ot=class{static{n(this,"DefaultIdentityProviderConfig")}authSchemes=new Map;constructor(t){for(let[r,o]of Object.entries(t))o!==void 0&&this.authSchemes.set(r,o)}getIdentityProvider(t){return this.authSchemes.get(t)}};var U=n(e=>{if(typeof e=="function")return e;let t=Promise.resolve(e);return()=>t},"normalizeProvider");var C=n(e=>typeof e=="string"?M(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),"toUint8Array");var q=class e extends Uint8Array{static{n(this,"Uint8ArrayBlobAdapter")}static fromString(t,r="utf-8"){if(typeof t=="string")return r==="base64"?e.mutate(Et(t)):e.mutate(M(t));throw new Error(`Unsupported conversion from ${typeof t} to Uint8ArrayBlobAdapter.`)}static mutate(t){return Object.setPrototypeOf(t,e.prototype),t}transformToString(t="utf-8"){return t==="base64"?St(this):ae(this)}};var Fe=n(async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return q.mutate(e);if(!e)return q.mutate(new Uint8Array);let r=t.streamCollector(e);return q.mutate(await r)},"collectBody");function ki(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}n(ki,"extendedEncodeURIComponent");import bt from"crypto";var He=bt.randomUUID.bind(bt);var _=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),Dt=n(()=>{if(He)return He();let e=new Uint8Array(16);return crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128,_[e[0]]+_[e[1]]+_[e[2]]+_[e[3]]+"-"+_[e[4]]+_[e[5]]+"-"+_[e[6]]+_[e[7]]+"-"+_[e[8]]+_[e[9]]+"-"+_[e[10]]+_[e[11]]+_[e[12]]+_[e[13]]+_[e[14]]+_[e[15]]},"v4");function vt(e,t,r){e.__smithy_context?e.__smithy_context.features||(e.__smithy_context.features={}):e.__smithy_context={features:{}},e.__smithy_context.features[t]=r}n(vt,"setFeature");var Pt=class{static{n(this,"NoAuthSigner")}async sign(t,r,o){return t}};var Bn=n(e=>n(function(r){return Be(r)&&r.expiration.getTime()-Date.now()<e},"isIdentityExpired"),"createIsIdentityExpiredFunction"),Gn=3e5,Mt=Bn(Gn),Be=n(e=>e.expiration!==void 0,"doesIdentityRequireRefresh"),kt=n((e,t,r)=>{if(e===void 0)return;let o=typeof e!="function"?async()=>Promise.resolve(e):e,s,i,a,c=!1,d=n(async u=>{i||(i=o(u));try{s=await i,a=!0,c=!1}finally{i=void 0}return s},"coalesceProvider");return t===void 0?async u=>((!a||u?.forceRefresh)&&(s=await d(u)),s):async u=>((!a||u?.forceRefresh)&&(s=await d(u)),c?s:r(s)?(t(s)&&await d(u),s):(c=!0,s))},"memoizeIdentityProvider");var Ut=n(async e=>{let t=e?.Bucket||"";if(typeof e.Bucket=="string"&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Wn(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!qn(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e},"resolveParamsForS3"),zn=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Vn=/(\d+\.){3}\d+/,jn=/\.\./;var qn=n(e=>zn.test(e)&&!Vn.test(e)&&!jn.test(e),"isDnsCompatibleBucketName"),Wn=n(e=>{let[t,r,o,,,s]=e.split(":"),i=t==="arn"&&e.split(":").length>=6,a=!!(i&&r&&o&&s);if(i&&!a)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return a},"isArnBucketName");var $t=n((e,t,r)=>{let o=n(async()=>{let s=r[e]??r[t];return typeof s=="function"?s():s},"configProvider");return e==="credentialScope"||t==="CredentialScope"?async()=>{let s=typeof r.credentials=="function"?await r.credentials():r.credentials;return s?.credentialScope??s?.CredentialScope}:e==="accountId"||t==="AccountId"?async()=>{let s=typeof r.credentials=="function"?await r.credentials():r.credentials;return s?.accountId??s?.AccountId}:e==="endpoint"||t==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;let s=await o();if(s&&typeof s=="object"){if("url"in s)return s.url.href;if("hostname"in s){let{protocol:i,hostname:a,port:c,path:d}=s;return`${i}//${a}${c?":"+c:""}${d}`}}return s}:o},"createConfigValueProvider");var Lt="AWS_ENDPOINT_URL",Ft="endpoint_url",Ht=n(e=>({environmentVariableSelector:n(t=>{let r=e.split(" ").map(i=>i.toUpperCase()),o=t[[Lt,...r].join("_")];if(o)return o;let s=t[Lt];if(s)return s},"environmentVariableSelector"),configFileSelector:n((t,r)=>{if(r&&t.services){let s=r[["services",t.services].join(".")];if(s){let i=e.split(" ").map(c=>c.toLowerCase()),a=s[[i.join("_"),Ft].join(".")];if(a)return a}}let o=t[Ft];if(o)return o},"configFileSelector"),default:void 0}),"getEndpointUrlConfig");var de=n(async e=>Z(Ht(e??""))(),"getEndpointFromConfig");var le=n(e=>typeof e=="object"?"url"in e?ve(e.url):e:ve(e),"toEndpointV1");var Bt=n(async(e,t,r,o)=>{if(!r.isCustomEndpoint){let a;r.serviceConfiguredEndpoint?a=await r.serviceConfiguredEndpoint():a=await de(r.serviceId),a&&(r.endpoint=()=>Promise.resolve(le(a)),r.isCustomEndpoint=!0)}let s=await Kn(e,t,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(s,o)},"getEndpointFromInstructions"),Kn=n(async(e,t,r)=>{let o={},s=t?.getEndpointParameterInstructions?.()||{};for(let[i,a]of Object.entries(s))switch(a.type){case"staticContextParams":o[i]=a.value;break;case"contextParams":o[i]=e[a.name];break;case"clientContextParams":case"builtInParams":o[i]=await $t(a.name,i,r)();break;case"operationContextParams":o[i]=a.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(a))}return Object.keys(s).length===0&&Object.assign(o,r),String(r.serviceId).toLowerCase()==="s3"&&await Ut(o),o},"resolveParams");var Gt=n(({config:e,instructions:t})=>(r,o)=>async s=>{e.isCustomEndpoint&&vt(o,"ENDPOINT_OVERRIDE","N");let i=await Bt(s.input,{getEndpointParameterInstructions(){return t}},{...e},o);o.endpointV2=i,o.authSchemes=i.properties?.authSchemes;let a=o.authSchemes?.[0];if(a){o.signing_region=a.signingRegion,o.signing_service=a.signingName;let d=V(o)?.selectedHttpAuthScheme?.httpAuthOption;d&&(d.signingProperties=Object.assign(d.signingProperties||{},{signing_region:a.signingRegion,signingRegion:a.signingRegion,signing_service:a.signingName,signingName:a.signingName,signingRegionSet:a.signingRegionSet},a.properties))}return r({...s})},"endpointMiddleware");var Xn={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Le.name},Aa=n((e,t)=>({applyToStack:n(r=>{r.addRelativeTo(Gt({config:e,instructions:t}),Xn)},"applyToStack")}),"getEndpointPlugin");var Ca=n(e=>{let t=e.tls??!0,{endpoint:r,useDualstackEndpoint:o,useFipsEndpoint:s}=e,i=r!=null?async()=>le(await O(r)()):void 0,c=Object.assign(e,{endpoint:i,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:O(o??!1),useFipsEndpoint:O(s??!1)}),d;return c.serviceConfiguredEndpoint=async()=>(e.serviceId&&!d&&(d=de(e.serviceId)),d),c},"resolveEndpointConfig");var zt=class e extends Error{static{n(this,"ServiceException")}$fault;$response;$retryable;$metadata;constructor(t){super(t.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=t.name,this.$fault=t.$fault,this.$metadata=t.$metadata}static isInstance(t){if(!t)return!1;let r=t;return e.prototype.isPrototypeOf(r)||!!r.$fault&&!!r.$metadata&&(r.$fault==="client"||r.$fault==="server")}static[Symbol.hasInstance](t){if(!t)return!1;let r=t;return this===e?e.isInstance(t):e.isInstance(t)?r.name&&this.name?this.prototype.isPrototypeOf(t)||r.name===this.name:this.prototype.isPrototypeOf(t):!1}},ba=n((e,t={})=>{Object.entries(t).filter(([,o])=>o!==void 0).forEach(([o,s])=>{(e[o]==null||e[o]==="")&&(e[o]=s)});let r=e.message||e.Message||"UnknownError";return e.message=r,delete e.Message,e},"decorateServiceException");var Qn=n(e=>t=>async r=>{if(!A.isInstance(r.request))return t(r);let{request:o}=r,{handlerProtocol:s=""}=e.requestHandler.metadata||{};if(s.indexOf("h2")>=0&&!o.headers[":authority"])delete o.headers.host,o.headers[":authority"]=o.hostname+(o.port?":"+o.port:"");else if(!o.headers.host){let i=o.hostname;o.port!=null&&(i+=`:${o.port}`),o.headers.host=i}return t(r)},"hostHeaderMiddleware"),Zn={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Ma=n(e=>({applyToStack:n(t=>{t.add(Qn(e),Zn)},"applyToStack")}),"getHostHeaderPlugin");var Jn=n(()=>(e,t)=>async r=>{try{let o=await e(r),{clientName:s,commandName:i,logger:a,dynamoDbDocumentClientOptions:c={}}=t,{overrideInputFilterSensitiveLog:d,overrideOutputFilterSensitiveLog:u}=c,h=d??t.inputFilterSensitiveLog,l=u??t.outputFilterSensitiveLog,{$metadata:p,...f}=o.output;return a?.info?.({clientName:s,commandName:i,input:h(r.input),output:l(f),metadata:p}),o}catch(o){let{clientName:s,commandName:i,logger:a,dynamoDbDocumentClientOptions:c={}}=t,{overrideInputFilterSensitiveLog:d}=c,u=d??t.inputFilterSensitiveLog;throw a?.error?.({clientName:s,commandName:i,input:u(r.input),error:o,metadata:o.$metadata}),o}},"loggerMiddleware"),eo={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},$a=n(e=>({applyToStack:n(t=>{t.add(Jn(),eo)},"applyToStack")}),"getLoggerPlugin");var Vt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"};import{AsyncLocalStorage as to}from"async_hooks";var Ge=process.env.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA==="1"||process.env.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA==="true";Ge||(globalThis.awslambda=globalThis.awslambda||{});var ro={REQUEST_ID:Symbol("_AWS_LAMBDA_REQUEST_ID"),X_RAY_TRACE_ID:Symbol("_AWS_LAMBDA_X_RAY_TRACE_ID"),TENANT_ID:Symbol("_AWS_LAMBDA_TENANT_ID")},no=class{static{n(this,"InvokeStoreImpl")}static storage=new to;static PROTECTED_KEYS=ro;static run(t,r){return this.storage.run({...t},r)}static getContext(){return this.storage.getStore()}static get(t){return this.storage.getStore()?.[t]}static set(t,r){if(this.isProtectedKey(t))throw new Error("Cannot modify protected Lambda context field");let o=this.storage.getStore();o&&(o[t]=r)}static getRequestId(){return this.get(this.PROTECTED_KEYS.REQUEST_ID)??"-"}static getXRayTraceId(){return this.get(this.PROTECTED_KEYS.X_RAY_TRACE_ID)}static getTenantId(){return this.get(this.PROTECTED_KEYS.TENANT_ID)}static hasContext(){return this.storage.getStore()!==void 0}static isProtectedKey(t){return t===this.PROTECTED_KEYS.REQUEST_ID||t===this.PROTECTED_KEYS.X_RAY_TRACE_ID}},pe;!Ge&&globalThis.awslambda?.InvokeStore?pe=globalThis.awslambda.InvokeStore:(pe=no,!Ge&&globalThis.awslambda&&(globalThis.awslambda.InvokeStore=pe));var jt=pe;var ze="X-Amzn-Trace-Id",oo="AWS_LAMBDA_FUNCTION_NAME",so="_X_AMZN_TRACE_ID",qt=n(()=>e=>async t=>{let{request:r}=t;if(!A.isInstance(r))return e(t);let o=Object.keys(r.headers??{}).find(u=>u.toLowerCase()===ze.toLowerCase())??ze;if(r.headers.hasOwnProperty(o))return e(t);let s=process.env[oo],i=process.env[so],c=jt.getXRayTraceId()??i,d=n(u=>typeof u=="string"&&u.length>0,"nonEmptyString");return d(s)&&d(c)&&(r.headers[ze]=c),e({...t,request:r})},"recursionDetectionMiddleware");var Qa=n(e=>({applyToStack:n(t=>{t.add(qt(),Vt)},"applyToStack")}),"getRecursionDetectionPlugin");var Ve=void 0;function io(e){return e===void 0?!0:typeof e=="string"&&e.length<=50}n(io,"isValidUserAgentAppId");function tc(e){let t=U(e.userAgentAppId??Ve),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r=="string"?[[r]]:r,userAgentAppId:n(async()=>{let o=await t();if(!io(o)){let s=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;typeof o!="string"?s?.warn("userAgentAppId must be a string or undefined."):o.length>50&&s?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return o},"userAgentAppId")})}n(tc,"resolveUserAgentConfig");var Wt=class{static{n(this,"EndpointCache")}capacity;data=new Map;parameters=[];constructor({size:t,params:r}){this.capacity=t??50,r&&(this.parameters=r)}get(t,r){let o=this.hash(t);if(o===!1)return r();if(!this.data.has(o)){if(this.data.size>this.capacity+10){let s=this.data.keys(),i=0;for(;;){let{value:a,done:c}=s.next();if(this.data.delete(a),c||++i>10)break}}this.data.set(o,r())}return this.data.get(o)}size(){return this.data.size}hash(t){let r="",{parameters:o}=this;if(o.length===0)return!1;for(let s of o){let i=String(t[s]??"");if(i.includes("|;"))return!1;r+=i+"|;"}return r}};var ao=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),re=n(e=>ao.test(e)||e.startsWith("[")&&e.endsWith("]"),"isIpAddress");var co=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),$=n((e,t=!1)=>{if(!t)return co.test(e);let r=e.split(".");for(let o of r)if(!$(o))return!1;return!0},"isValidHostLabel");var ne={};var b="endpoints";function x(e){return typeof e!="object"||e==null?e:"ref"in e?`$${x(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(x).join(", ")})`:JSON.stringify(e,null,2)}n(x,"toDebugString");var y=class extends Error{static{n(this,"EndpointError")}constructor(t){super(t),this.name="EndpointError"}};var Yt=n((e,t)=>e===t,"booleanEquals");var Kt=n(e=>{let t=e.split("."),r=[];for(let o of t){let s=o.indexOf("[");if(s!==-1){if(o.indexOf("]")!==o.length-1)throw new y(`Path: '${e}' does not end with ']'`);let i=o.slice(s+1,-1);if(Number.isNaN(parseInt(i)))throw new y(`Invalid array index: '${i}' in path: '${e}'`);s!==0&&r.push(o.slice(0,s)),r.push(i)}else r.push(o)}return r},"getAttrPathList");var fe=n((e,t)=>Kt(t).reduce((r,o)=>{if(typeof r!="object")throw new y(`Index '${o}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(r)?r[parseInt(o)]:r[o]},e),"getAttr");var Xt=n(e=>e!=null,"isSet");var Qt=n(e=>!e,"not");var je={[G.HTTP]:80,[G.HTTPS]:443},Zt=n(e=>{let t=(()=>{try{if(e instanceof URL)return e;if(typeof e=="object"&&"hostname"in e){let{hostname:p,port:f,protocol:g="",path:S="",query:m={}}=e,E=new URL(`${g}//${p}${f?`:${f}`:""}${S}`);return E.search=Object.entries(m).map(([R,I])=>`${R}=${I}`).join("&"),E}return new URL(e)}catch{return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;let r=t.href,{host:o,hostname:s,pathname:i,protocol:a,search:c}=t;if(c)return null;let d=a.slice(0,-1);if(!Object.values(G).includes(d))return null;let u=re(s),h=r.includes(`${o}:${je[d]}`)||typeof e=="string"&&e.includes(`${o}:${je[d]}`),l=`${o}${h?`:${je[d]}`:""}`;return{scheme:d,authority:l,path:i,normalizedPath:i.endsWith("/")?i:`${i}/`,isIp:u}},"parseURL");var Jt=n((e,t)=>e===t,"stringEquals");var er=n((e,t,r,o)=>t>=r||e.length<r?null:o?e.substring(e.length-r,e.length-t):e.substring(t,r),"substring");var tr=n(e=>encodeURIComponent(e).replace(/[!*'()]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),"uriEncode");var rr={booleanEquals:Yt,getAttr:fe,isSet:Xt,isValidHostLabel:$,not:Qt,parseURL:Zt,stringEquals:Jt,substring:er,uriEncode:tr};var me=n((e,t)=>{let r=[],o={...t.endpointParams,...t.referenceRecord},s=0;for(;s<e.length;){let i=e.indexOf("{",s);if(i===-1){r.push(e.slice(s));break}r.push(e.slice(s,i));let a=e.indexOf("}",i);if(a===-1){r.push(e.slice(i));break}e[i+1]==="{"&&e[a+1]==="}"&&(r.push(e.slice(i+1,a)),s=a+2);let c=e.substring(i+1,a);if(c.includes("#")){let[d,u]=c.split("#");r.push(fe(o[d],u))}else r.push(o[c]);s=a+1}return r.join("")},"evaluateTemplate");var nr=n(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord})[e],"getReferenceValue");var L=n((e,t,r)=>{if(typeof e=="string")return me(e,r);if(e.fn)return or.callFunction(e,r);if(e.ref)return nr(e,r);throw new y(`'${t}': ${String(e)} is not a string, function or reference.`)},"evaluateExpression"),he=n(({fn:e,argv:t},r)=>{let o=t.map(i=>["boolean","number"].includes(typeof i)?i:or.evaluateExpression(i,"arg",r)),s=e.split(".");return s[0]in ne&&s[1]!=null?ne[s[0]][s[1]](...o):rr[e](...o)},"callFunction"),or={evaluateExpression:L,callFunction:he};var sr=n(({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new y(`'${e}' is already defined in Reference Record.`);let o=he(t,r);return r.logger?.debug?.(`${b} evaluateCondition: ${x(t)} = ${x(o)}`),{result:o===""?!0:!!o,...e!=null&&{toAssign:{name:e,value:o}}}},"evaluateCondition");var W=n((e=[],t)=>{let r={};for(let o of e){let{result:s,toAssign:i}=sr(o,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!s)return{result:s};i&&(r[i.name]=i.value,t.logger?.debug?.(`${b} assign: ${i.name} := ${x(i.value)}`))}return{result:!0,referenceRecord:r}},"evaluateConditions");var ir=n((e,t)=>Object.entries(e).reduce((r,[o,s])=>({...r,[o]:s.map(i=>{let a=L(i,"Header value entry",t);if(typeof a!="string")throw new y(`Header '${o}' value '${a}' is not a string`);return a})}),{}),"getEndpointHeaders");var qe=n((e,t)=>Object.entries(e).reduce((r,[o,s])=>({...r,[o]:cr.getEndpointProperty(s,t)}),{}),"getEndpointProperties"),ar=n((e,t)=>{if(Array.isArray(e))return e.map(r=>ar(r,t));switch(typeof e){case"string":return me(e,t);case"object":if(e===null)throw new y(`Unexpected endpoint property: ${e}`);return cr.getEndpointProperties(e,t);case"boolean":return e;default:throw new y(`Unexpected endpoint property type: ${typeof e}`)}},"getEndpointProperty"),cr={getEndpointProperty:ar,getEndpointProperties:qe};var ur=n((e,t)=>{let r=L(e,"Endpoint URL",t);if(typeof r=="string")try{return new URL(r)}catch(o){throw console.error(`Failed to construct URL with ${r}`,o),o}throw new y(`Endpoint URL must be a string, got ${typeof r}`)},"getEndpointUrl");var dr=n((e,t)=>{let{conditions:r,endpoint:o}=e,{result:s,referenceRecord:i}=W(r,t);if(!s)return;let a={...t,referenceRecord:{...t.referenceRecord,...i}},{url:c,properties:d,headers:u}=o;return t.logger?.debug?.(`${b} Resolving endpoint from template: ${x(o)}`),{...u!=null&&{headers:ir(u,a)},...d!=null&&{properties:qe(d,a)},url:ur(c,a)}},"evaluateEndpointRule");var lr=n((e,t)=>{let{conditions:r,error:o}=e,{result:s,referenceRecord:i}=W(r,t);if(s)throw new y(L(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...i}}))},"evaluateErrorRule");var We=n((e,t)=>{for(let r of e)if(r.type==="endpoint"){let o=dr(r,t);if(o)return o}else if(r.type==="error")lr(r,t);else if(r.type==="tree"){let o=pr.evaluateTreeRule(r,t);if(o)return o}else throw new y(`Unknown endpoint rule: ${r}`);throw new y("Rules evaluation failed")},"evaluateRules"),uo=n((e,t)=>{let{conditions:r,rules:o}=e,{result:s,referenceRecord:i}=W(r,t);if(s)return pr.evaluateRules(o,{...t,referenceRecord:{...t.referenceRecord,...i}})},"evaluateTreeRule"),pr={evaluateRules:We,evaluateTreeRule:uo};var zu=n((e,t)=>{let{endpointParams:r,logger:o}=t,{parameters:s,rules:i}=e;t.logger?.debug?.(`${b} Initial EndpointParams: ${x(r)}`);let a=Object.entries(s).filter(([,u])=>u.default!=null).map(([u,h])=>[u,h.default]);if(a.length>0)for(let[u,h]of a)r[u]=r[u]??h;let c=Object.entries(s).filter(([,u])=>u.required).map(([u])=>u);for(let u of c)if(r[u]==null)throw new y(`Missing required parameter: '${u}'`);let d=We(i,{endpointParams:r,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${b} Resolved endpoint: ${x(d)}`),d},"resolveEndpoint");var Ye=n((e,t=!1)=>{if(t){for(let r of e.split("."))if(!Ye(r))return!1;return!0}return!(!$(e)||e.length<3||e.length>63||e!==e.toLowerCase()||re(e))},"isVirtualHostableS3Bucket");var fr=n(e=>{let t=e.split(":");if(t.length<6)return null;let[r,o,s,i,a,...c]=t;if(r!=="arn"||o===""||s===""||c.join(":")==="")return null;let d=c.map(u=>u.split("/")).flat();return{partition:o,service:s,region:i,accountId:a,resourceId:d}},"parseArn");var mr={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"EU (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],version:"1.1"};var po=mr,fo="",hr=n(e=>{let{partitions:t}=po;for(let o of t){let{regions:s,outputs:i}=o;for(let[a,c]of Object.entries(s))if(a===e)return{...i,...c}}for(let o of t){let{regionRegex:s,outputs:i}=o;if(new RegExp(s).test(e))return{...i}}let r=t.find(o=>o.id==="aws");if(!r)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...r.outputs}},"partition");var gr=n(()=>fo,"getUserAgentPrefix");var mo={isVirtualHostableS3Bucket:Ye,parseArn:fr,partition:hr};ne.aws=mo;var Er={warningEmitted:!1},Cd=n(e=>{e&&!Er.warningEmitted&&parseInt(e.substring(1,e.indexOf(".")))<18&&(Er.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
4
|
+
no longer support Node.js 16.x on January 6, 2025.
|
|
5
|
+
|
|
6
|
+
To continue receiving updates to AWS services, bug fixes, and security
|
|
7
|
+
updates please upgrade to a supported Node.js LTS version.
|
|
8
|
+
|
|
9
|
+
More information can be found at: https://a.co/74kJMmI`))},"emitWarningIfUnsupportedVersion");function N(e,t,r){e.__aws_sdk_context?e.__aws_sdk_context.features||(e.__aws_sdk_context.features={}):e.__aws_sdk_context={features:{}},e.__aws_sdk_context.features[t]=r}n(N,"setFeature");var Ke=n(e=>H.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,"getDateHeader");var ge=n(e=>new Date(Date.now()+e),"getSkewCorrectedDate");var Sr=n((e,t)=>Math.abs(ge(t).getTime()-e)>=3e5,"isClockSkewed");var Xe=n((e,t)=>{let r=Date.parse(e);return Sr(r,t)?r-Date.now():t},"getUpdatedSystemClockOffset");var oe=n((e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t},"throwSigningPropertyError"),yr=n(async e=>{let t=oe("context",e.context),r=oe("config",e.config),o=t.endpointV2?.properties?.authSchemes?.[0],i=await oe("signer",r.signer)(o),a=e?.signingRegion,c=e?.signingRegionSet,d=e?.signingName;return{config:r,signer:i,signingRegion:a,signingRegionSet:c,signingName:d}},"validateSigningProperties"),Qe=class{static{n(this,"AwsSdkSigV4Signer")}async sign(t,r,o){if(!A.isInstance(t))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");let s=await yr(o),{config:i,signer:a}=s,{signingRegion:c,signingName:d}=s,u=o.context;if(u?.authSchemes?.length??!1){let[l,p]=u.authSchemes;l?.name==="sigv4a"&&p?.name==="sigv4"&&(c=p?.signingRegion??c,d=p?.signingName??d)}return await a.sign(t,{signingDate:ge(i.systemClockOffset),signingRegion:c,signingService:d})}errorHandler(t){return r=>{let o=r.ServerTime??Ke(r.$response);if(o){let s=oe("config",t.config),i=s.systemClockOffset;s.systemClockOffset=Xe(o,s.systemClockOffset),s.systemClockOffset!==i&&r.$metadata&&(r.$metadata.clockSkewCorrected=!0)}throw r}}successHandler(t,r){let o=Ke(t);if(o){let s=oe("config",r.config);s.systemClockOffset=Xe(o,s.systemClockOffset)}}};var Ze=n(e=>typeof e=="string"&&e.length>0?e.split(",").map(t=>t.trim()):[],"getArrayForCommaSeparatedString");var Rr=n(e=>`AWS_BEARER_TOKEN_${e.replace(/[\s-]/g,"_").toUpperCase()}`,"getBearerTokenEnvKey");var Ar="AWS_AUTH_SCHEME_PREFERENCE",_r="auth_scheme_preference",Jd={environmentVariableSelector:n((e,t)=>{if(t?.signingName&&Rr(t.signingName)in e)return["httpBearerAuth"];if(Ar in e)return Ze(e[Ar])},"environmentVariableSelector"),configFileSelector:n(e=>{if(_r in e)return Ze(e[_r])},"configFileSelector"),default:[]};var wr="X-Amz-Algorithm",Tr="X-Amz-Credential",Je="X-Amz-Date",xr="X-Amz-SignedHeaders",Ir="X-Amz-Expires",et="X-Amz-Signature",tt="X-Amz-Security-Token";var rt="authorization",nt=Je.toLowerCase(),ho="date",Cr=[rt,nt,ho],Nr=et.toLowerCase(),se="x-amz-content-sha256",Or=tt.toLowerCase();var br={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Dr=/^proxy-/,vr=/^sec-/;var Ee="AWS4-HMAC-SHA256";var Pr="AWS4-HMAC-SHA256-PAYLOAD",Mr="UNSIGNED-PAYLOAD",kr=50,ot="aws4_request",Ur=3600*24*7;var Se={},st=[],ye=n((e,t,r)=>`${e}/${t}/${r}/${ot}`,"createScope"),Lr=n(async(e,t,r,o,s)=>{let i=await $r(e,t.secretAccessKey,t.accessKeyId),a=`${r}:${o}:${s}:${T(i)}:${t.sessionToken}`;if(a in Se)return Se[a];for(st.push(a);st.length>kr;)delete Se[st.shift()];let c=`AWS4${t.secretAccessKey}`;for(let d of[r,o,s,ot])c=await $r(e,c,d);return Se[a]=c},"getSigningKey");var $r=n((e,t,r)=>{let o=new e(t);return o.update(C(r)),o.digest()},"hmac");var it=n(({headers:e},t,r)=>{let o={};for(let s of Object.keys(e).sort()){if(e[s]==null)continue;let i=s.toLowerCase();(i in br||t?.has(i)||Dr.test(i)||vr.test(i))&&(!r||r&&!r.has(i))||(o[i]=e[s].trim().replace(/\s+/g," "))}return o},"getCanonicalHeaders");var Re=n(async({headers:e,body:t},r)=>{for(let o of Object.keys(e))if(o.toLowerCase()===se)return e[o];if(t==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof t=="string"||ArrayBuffer.isView(t)||ht(t)){let o=new r;return o.update(C(t)),T(await o.digest())}return Mr},"getPayloadHash");var Ae=class{static{n(this,"HeaderFormatter")}format(t){let r=[];for(let i of Object.keys(t)){let a=M(i);r.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(t[i]))}let o=new Uint8Array(r.reduce((i,a)=>i+a.byteLength,0)),s=0;for(let i of r)o.set(i,s),s+=i.byteLength;return o}formatHeaderValue(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":let r=new DataView(new ArrayBuffer(3));return r.setUint8(0,3),r.setInt16(1,t.value,!1),new Uint8Array(r.buffer);case"integer":let o=new DataView(new ArrayBuffer(5));return o.setUint8(0,4),o.setInt32(1,t.value,!1),new Uint8Array(o.buffer);case"long":let s=new Uint8Array(9);return s[0]=5,s.set(t.value.bytes,1),s;case"binary":let i=new DataView(new ArrayBuffer(3+t.value.byteLength));i.setUint8(0,6),i.setUint16(1,t.value.byteLength,!1);let a=new Uint8Array(i.buffer);return a.set(t.value,3),a;case"string":let c=M(t.value),d=new DataView(new ArrayBuffer(3+c.byteLength));d.setUint8(0,7),d.setUint16(1,c.byteLength,!1);let u=new Uint8Array(d.buffer);return u.set(c,3),u;case"timestamp":let h=new Uint8Array(9);return h[0]=8,h.set(at.fromNumber(t.value.valueOf()).bytes,1),h;case"uuid":if(!go.test(t.value))throw new Error(`Invalid UUID received: ${t.value}`);let l=new Uint8Array(17);return l[0]=9,l.set(yt(t.value.replace(/\-/g,"")),1),l}}},Fr;(function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"})(Fr||(Fr={}));var go=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,at=class e{static{n(this,"Int64")}bytes;constructor(t){if(this.bytes=t,t.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(`${t} is too large (or, if negative, too small) to represent as an Int64`);let r=new Uint8Array(8);for(let o=7,s=Math.abs(Math.round(t));o>-1&&s>0;o--,s/=256)r[o]=s;return t<0&&Hr(r),new e(r)}valueOf(){let t=this.bytes.slice(0),r=t[0]&128;return r&&Hr(t),parseInt(T(t),16)*(r?-1:1)}toString(){return String(this.valueOf())}};function Hr(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,e[t]===0);t--);}n(Hr,"negate");var Br=n((e,t)=>{e=e.toLowerCase();for(let r of Object.keys(t))if(e===r.toLowerCase())return!0;return!1},"hasHeader");var Gr=n((e,t={})=>{let{headers:r,query:o={}}=A.clone(e);for(let s of Object.keys(r)){let i=s.toLowerCase();(i.slice(0,6)==="x-amz-"&&!t.unhoistableHeaders?.has(i)||t.hoistableHeaders?.has(i))&&(o[s]=r[s],delete r[s])}return{...e,headers:r,query:o}},"moveHeadersToQuery");var ct=n(e=>{e=A.clone(e);for(let t of Object.keys(e.headers))Cr.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e},"prepareRequest");var zr=n(({query:e={}})=>{let t=[],r={};for(let o of Object.keys(e)){if(o.toLowerCase()===Nr)continue;let s=F(o);t.push(s);let i=e[o];typeof i=="string"?r[s]=`${s}=${F(i)}`:Array.isArray(i)&&(r[s]=i.slice(0).reduce((a,c)=>a.concat([`${s}=${F(c)}`]),[]).sort().join("&"))}return t.sort().map(o=>r[o]).filter(o=>o).join("&")},"getCanonicalQuery");var Vr=n(e=>Eo(e).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),Eo=n(e=>typeof e=="number"?new Date(e*1e3):typeof e=="string"?Number(e)?new Date(Number(e)*1e3):new Date(e):e,"toDate");var _e=class{static{n(this,"SignatureV4Base")}service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:t,credentials:r,region:o,service:s,sha256:i,uriEscapePath:a=!0}){this.service=s,this.sha256=i,this.uriEscapePath=a,this.applyChecksum=typeof t=="boolean"?t:!0,this.regionProvider=O(o),this.credentialProvider=O(r)}createCanonicalRequest(t,r,o){let s=Object.keys(r).sort();return`${t.method}
|
|
10
|
+
${this.getCanonicalPath(t)}
|
|
11
|
+
${zr(t)}
|
|
12
|
+
${s.map(i=>`${i}:${r[i]}`).join(`
|
|
13
|
+
`)}
|
|
14
|
+
|
|
15
|
+
${s.join(";")}
|
|
16
|
+
${o}`}async createStringToSign(t,r,o,s){let i=new this.sha256;i.update(C(o));let a=await i.digest();return`${s}
|
|
17
|
+
${t}
|
|
18
|
+
${r}
|
|
19
|
+
${T(a)}`}getCanonicalPath({path:t}){if(this.uriEscapePath){let r=[];for(let i of t.split("/"))i?.length!==0&&i!=="."&&(i===".."?r.pop():r.push(i));let o=`${t?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&t?.endsWith("/")?"/":""}`;return F(o).replace(/%2F/g,"/")}return t}validateResolvedCredentials(t){if(typeof t!="object"||typeof t.accessKeyId!="string"||typeof t.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(t){let r=Vr(t).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(t){return Object.keys(t).sort().join(";")}};var ie=class extends _e{static{n(this,"SignatureV4")}headerFormatter=new Ae;constructor({applyChecksum:t,credentials:r,region:o,service:s,sha256:i,uriEscapePath:a=!0}){super({applyChecksum:t,credentials:r,region:o,service:s,sha256:i,uriEscapePath:a})}async presign(t,r={}){let{signingDate:o=new Date,expiresIn:s=3600,unsignableHeaders:i,unhoistableHeaders:a,signableHeaders:c,hoistableHeaders:d,signingRegion:u,signingService:h}=r,l=await this.credentialProvider();this.validateResolvedCredentials(l);let p=u??await this.regionProvider(),{longDate:f,shortDate:g}=this.formatDate(o);if(s>Ur)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let S=ye(g,p,h??this.service),m=Gr(ct(t),{unhoistableHeaders:a,hoistableHeaders:d});l.sessionToken&&(m.query[tt]=l.sessionToken),m.query[wr]=Ee,m.query[Tr]=`${l.accessKeyId}/${S}`,m.query[Je]=f,m.query[Ir]=s.toString(10);let E=it(m,i,c);return m.query[xr]=this.getCanonicalHeaderList(E),m.query[et]=await this.getSignature(f,S,this.getSigningKey(l,p,g,h),this.createCanonicalRequest(m,E,await Re(t,this.sha256))),m}async sign(t,r){return typeof t=="string"?this.signString(t,r):t.headers&&t.payload?this.signEvent(t,r):t.message?this.signMessage(t,r):this.signRequest(t,r)}async signEvent({headers:t,payload:r},{signingDate:o=new Date,priorSignature:s,signingRegion:i,signingService:a}){let c=i??await this.regionProvider(),{shortDate:d,longDate:u}=this.formatDate(o),h=ye(d,c,a??this.service),l=await Re({headers:{},body:r},this.sha256),p=new this.sha256;p.update(t);let f=T(await p.digest()),g=[Pr,u,h,s,f,l].join(`
|
|
20
|
+
`);return this.signString(g,{signingDate:o,signingRegion:c,signingService:a})}async signMessage(t,{signingDate:r=new Date,signingRegion:o,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(t.message.headers),payload:t.message.body},{signingDate:r,signingRegion:o,signingService:s,priorSignature:t.priorSignature}).then(a=>({message:t.message,signature:a}))}async signString(t,{signingDate:r=new Date,signingRegion:o,signingService:s}={}){let i=await this.credentialProvider();this.validateResolvedCredentials(i);let a=o??await this.regionProvider(),{shortDate:c}=this.formatDate(r),d=new this.sha256(await this.getSigningKey(i,a,c,s));return d.update(C(t)),T(await d.digest())}async signRequest(t,{signingDate:r=new Date,signableHeaders:o,unsignableHeaders:s,signingRegion:i,signingService:a}={}){let c=await this.credentialProvider();this.validateResolvedCredentials(c);let d=i??await this.regionProvider(),u=ct(t),{longDate:h,shortDate:l}=this.formatDate(r),p=ye(l,d,a??this.service);u.headers[nt]=h,c.sessionToken&&(u.headers[Or]=c.sessionToken);let f=await Re(u,this.sha256);!Br(se,u.headers)&&this.applyChecksum&&(u.headers[se]=f);let g=it(u,s,o),S=await this.getSignature(h,p,this.getSigningKey(c,d,l,a),this.createCanonicalRequest(u,g,f));return u.headers[rt]=`${Ee} Credential=${c.accessKeyId}/${p}, SignedHeaders=${this.getCanonicalHeaderList(g)}, Signature=${S}`,u}async getSignature(t,r,o,s){let i=await this.createStringToSign(t,r,s,Ee),a=new this.sha256(await o);return a.update(C(i)),T(await a.digest())}getSigningKey(t,r,o,s){return Lr(this.sha256,t,o,r,s||this.service)}};var ip=n(e=>{let t=e.credentials,r=!!e.credentials,o;Object.defineProperty(e,"credentials",{set(u){u&&u!==t&&u!==o&&(r=!0),t=u;let h=So(e,{credentials:t,credentialDefaultProvider:e.credentialDefaultProvider}),l=yo(e,h);r&&!l.attributed?(o=n(async p=>l(p).then(f=>Rt(f,"CREDENTIALS_CODE","e")),"resolvedCredentials"),o.memoized=l.memoized,o.configBound=l.configBound,o.attributed=!0):o=l},get(){return o},enumerable:!0,configurable:!0}),e.credentials=t;let{signingEscapePath:s=!0,systemClockOffset:i=e.systemClockOffset||0,sha256:a}=e,c;return e.signer?c=U(e.signer):e.regionInfoProvider?c=n(()=>U(e.region)().then(async u=>[await e.regionInfoProvider(u,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},u]).then(([u,h])=>{let{signingRegion:l,signingService:p}=u;e.signingRegion=e.signingRegion||l||h,e.signingName=e.signingName||p||e.serviceId;let f={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:s},g=e.signerConstructor||ie;return new g(f)}),"signer"):c=n(async u=>{u=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await U(e.region)(),properties:{}},u);let h=u.signingRegion,l=u.signingName;e.signingRegion=e.signingRegion||h,e.signingName=e.signingName||l||e.serviceId;let p={...e,credentials:e.credentials,region:e.signingRegion,service:e.signingName,sha256:a,uriEscapePath:s},f=e.signerConstructor||ie;return new f(p)},"signer"),Object.assign(e,{systemClockOffset:i,signingEscapePath:s,signer:c})},"resolveAwsSdkSigV4Config");function So(e,{credentials:t,credentialDefaultProvider:r}){let o;return t?t?.memoized?o=t:o=kt(t,Mt,Be):r?o=U(r(Object.assign({},e,{parentClientConfig:e}))):o=n(async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},"credentialsProvider"),o.memoized=!0,o}n(So,"normalizeCredentialProvider");function yo(e,t){if(t.configBound)return t;let r=n(async o=>t({...o,callerClientConfig:e}),"fn");return r.memoized=t.memoized,r.configBound=!0,r}n(yo,"bindCallerConfig");var Ep=n(e=>{switch(e){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},"loadConfigsForDefaultMode");var jr=!1,Rp=n(e=>{e&&!jr&&parseInt(e.substring(1,e.indexOf(".")))<16&&(jr=!0)},"emitWarningIfUnsupportedVersion");var qr=n(e=>{let t=[];for(let r in z){let o=z[r];e[o]!==void 0&&t.push({algorithmId:n(()=>o,"algorithmId"),checksumConstructor:n(()=>e[o],"checksumConstructor")})}return{addChecksumAlgorithm(r){t.push(r)},checksumAlgorithms(){return t}}},"getChecksumConfiguration"),Wr=n(e=>{let t={};return e.checksumAlgorithms().forEach(r=>{t[r.algorithmId()]=r.checksumConstructor()}),t},"resolveChecksumRuntimeConfig");var Yr=n(e=>({setRetryStrategy(t){e.retryStrategy=t},retryStrategy(){return e.retryStrategy}}),"getRetryConfiguration"),Kr=n(e=>{let t={};return t.retryStrategy=e.retryStrategy(),t},"resolveRetryRuntimeConfig");var bp=n(e=>Object.assign(qr(e),Yr(e)),"getDefaultExtensionConfiguration");var Dp=n(e=>Object.assign(Wr(e),Kr(e)),"resolveDefaultRuntimeConfig");var we=class{static{n(this,"NoOpLogger")}trace(){}debug(){}info(){}warn(){}error(){}};var Lp=n((e,t)=>Fe(e,t).then(r=>(t?.utf8Encoder??ae)(r)),"collectBodyString");var Ro=/\d{12}\.ddb/;async function Xr(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&N(e,"PROTOCOL_RPC_V2_CBOR","M"),typeof t.retryStrategy=="function"){let i=await t.retryStrategy();typeof i.acquireInitialRetryToken=="function"?i.constructor?.name?.includes("Adaptive")?N(e,"RETRY_MODE_ADAPTIVE","F"):N(e,"RETRY_MODE_STANDARD","E"):N(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode=="function"){let i=e.endpointV2;switch(String(i?.url?.hostname).match(Ro)&&N(e,"ACCOUNT_ID_ENDPOINT","O"),await t.accountIdEndpointMode?.()){case"disabled":N(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":N(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":N(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let s=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(s?.$source){let i=s;i.accountId&&N(e,"RESOLVED_ACCOUNT_ID","T");for(let[a,c]of Object.entries(i.$source??{}))N(e,a,c)}}n(Xr,"checkFeatures");var ut="user-agent",Te="x-amz-user-agent";var Qr=/[^!$%&'*+\-.^_`|~\w]/g,Zr=/[^!$%&'*+\-.^_`|~\w#]/g;function Jr(e){let t="";for(let r in e){let o=e[r];if(t.length+o.length+1<=1024){t.length?t+=","+o:t+=o;continue}break}return t}n(Jr,"encodeFeatures");var Ao=n(e=>(t,r)=>async o=>{let{request:s}=o;if(!A.isInstance(s))return t(o);let{headers:i}=s,a=r?.userAgent?.map(xe)||[],c=(await e.defaultUserAgentProvider()).map(xe);await Xr(r,e,o);let d=r;c.push(`m/${Jr(Object.assign({},r.__smithy_context?.features,d.__aws_sdk_context?.features))}`);let u=e?.customUserAgent?.map(xe)||[],h=await e.userAgentAppId();h&&c.push(xe(["app",`${h}`]));let l=gr(),p=(l?[l]:[]).concat([...c,...a,...u]).join(" "),f=[...c.filter(g=>g.startsWith("aws-sdk-")),...u].join(" ");return e.runtime!=="browser"?(f&&(i[Te]=i[Te]?`${i[ut]} ${f}`:f),i[ut]=p):i[Te]=p,t({...o,request:s})},"userAgentMiddleware"),xe=n(e=>{let t=e[0].split("/").map(a=>a.replace(Qr,"-")).join("/"),r=e[1]?.replace(Zr,"-"),o=t.indexOf("/"),s=t.substring(0,o),i=t.substring(o+1);return s==="api"&&(i=i.toLowerCase()),[s,i,r].filter(a=>a&&a.length>0).reduce((a,c,d)=>{switch(d){case 0:return c;case 1:return`${a}/${c}`;default:return`${a}#${c}`}},"")},"escapeUserAgent"),_o={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Zp=n(e=>({applyToStack:n(t=>{t.add(Ao(e),_o)},"applyToStack")}),"getUserAgentPlugin");var rn=new Set,nn=n((e,t=$)=>{if(!rn.has(e)&&!t(e))if(e==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${e}" is not a valid hostname component.`);else rn.add(e)},"checkRegion");var Ie=n(e=>typeof e=="string"&&(e.startsWith("fips-")||e.endsWith("-fips")),"isFipsRegion");var on=n(e=>Ie(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,"getRealRegion");var ff=n(e=>{let{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:n(async()=>{let o=typeof t=="function"?await t():t,s=on(o);return nn(s),s},"region"),useFipsEndpoint:n(async()=>{let o=typeof t=="string"?t:await t();return Ie(o)?!0:typeof r!="function"?Promise.resolve(!!r):r()},"useFipsEndpoint")})},"resolveRegionConfig");var sn="content-length";function wo(e){return t=>async r=>{let o=r.request;if(A.isInstance(o)){let{body:s,headers:i}=o;if(s&&Object.keys(i).map(a=>a.toLowerCase()).indexOf(sn)===-1)try{let a=e(s);o.headers={...o.headers,[sn]:String(a)}}catch{}}return t({...r,request:o})}}n(wo,"contentLengthMiddleware");var To={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Ef=n(e=>({applyToStack:n(t=>{t.add(wo(e.bodyLengthChecker),To)},"applyToStack")}),"getContentLengthPlugin");var D;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(D||(D={}));var Y=3,an=D.STANDARD;var cn=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],un=["TimeoutError","RequestTimeout","RequestTimeoutException"],dn=[500,502,503,504],ln=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],pn=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"];var xo=n(e=>e?.$retryable!==void 0,"isRetryableByTrait");var Io=n(e=>e.$metadata?.clockSkewCorrected,"isClockSkewCorrectedError"),Co=n(e=>{let t=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return e&&e instanceof TypeError?t.has(e.message):!1},"isBrowserNetworkError"),Ce=n(e=>e.$metadata?.httpStatusCode===429||cn.includes(e.name)||e.$retryable?.throttling==!0,"isThrottlingError"),Ne=n((e,t=0)=>xo(e)||Io(e)||un.includes(e.name)||ln.includes(e?.code||"")||pn.includes(e?.code||"")||dn.includes(e.$metadata?.httpStatusCode||0)||Co(e)||e.cause!==void 0&&t<=10&&Ne(e.cause,t+1),"isTransientError"),fn=n(e=>{if(e.$metadata?.httpStatusCode!==void 0){let t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!Ne(e)}return!1},"isServerError");var Oe=class e{static{n(this,"DefaultRateLimiter")}static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;currentCapacity=0;enabled=!1;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(t){this.beta=t?.beta??.7,this.minCapacity=t?.minCapacity??1,this.minFillRate=t?.minFillRate??.5,this.scaleConstant=t?.scaleConstant??.4,this.smooth=t?.smooth??.8;let r=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(t){if(this.enabled){if(this.refillTokenBucket(),t>this.currentCapacity){let r=(t-this.currentCapacity)/this.fillRate*1e3;await new Promise(o=>e.setTimeoutFn(o,r))}this.currentCapacity=this.currentCapacity-t}}refillTokenBucket(){let t=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=t;return}let r=(t-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+r),this.lastTimestamp=t}updateClientSendingRate(t){let r;if(this.updateMeasuredRate(),Ce(t)){let s=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());let o=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(o)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(t){return this.getPrecise(t*this.beta)}cubicSuccess(t){return this.getPrecise(this.scaleConstant*Math.pow(t-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(t){this.refillTokenBucket(),this.fillRate=Math.max(t,this.minFillRate),this.maxCapacity=Math.max(t,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let t=this.getCurrentTimeInSeconds(),r=Math.floor(t*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){let o=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(o*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPrecise(t){return parseFloat(t.toFixed(8))}};var mn="amz-sdk-invocation-id",hn="amz-sdk-request";var En=n(()=>{let e=100;return{computeNextBackoffDelay:n(o=>Math.floor(Math.min(2e4,Math.random()*2**o*e)),"computeNextBackoffDelay"),setDelayBase:n(o=>{e=o},"setDelayBase")}},"getDefaultRetryBackoffStrategy");var lt=n(({retryDelay:e,retryCount:t,retryCost:r})=>({getRetryCount:n(()=>t,"getRetryCount"),getRetryDelay:n(()=>Math.min(2e4,e),"getRetryDelay"),getRetryCost:n(()=>r,"getRetryCost")}),"createDefaultRetryToken");var K=class{static{n(this,"StandardRetryStrategy")}maxAttempts;mode=D.STANDARD;capacity=500;retryBackoffStrategy=En();maxAttemptsProvider;constructor(t){this.maxAttempts=t,this.maxAttemptsProvider=typeof t=="function"?t:async()=>t}async acquireInitialRetryToken(t){return lt({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(t,r){let o=await this.getMaxAttempts();if(this.shouldRetry(t,r,o)){let s=r.errorType;this.retryBackoffStrategy.setDelayBase(s==="THROTTLING"?500:100);let i=this.retryBackoffStrategy.computeNextBackoffDelay(t.getRetryCount()),a=r.retryAfterHint?Math.max(r.retryAfterHint.getTime()-Date.now()||0,i):i,c=this.getCapacityCost(s);return this.capacity-=c,lt({retryDelay:a,retryCount:t.getRetryCount()+1,retryCost:c})}throw new Error("No retry token available")}recordSuccess(t){this.capacity=Math.max(500,this.capacity+(t.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${Y}`),Y}}shouldRetry(t,r,o){return t.getRetryCount()+1<o&&this.capacity>=this.getCapacityCost(r.errorType)&&this.isRetryableError(r.errorType)}getCapacityCost(t){return t==="TRANSIENT"?10:5}isRetryableError(t){return t==="THROTTLING"||t==="TRANSIENT"}};var be=class{static{n(this,"AdaptiveRetryStrategy")}maxAttemptsProvider;rateLimiter;standardRetryStrategy;mode=D.ADAPTIVE;constructor(t,r){this.maxAttemptsProvider=t;let{rateLimiter:o}=r??{};this.rateLimiter=o??new Oe,this.standardRetryStrategy=new K(t)}async acquireInitialRetryToken(t){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(t)}async refreshRetryTokenForRetry(t,r){return this.rateLimiter.updateClientSendingRate(r),this.standardRetryStrategy.refreshRetryTokenForRetry(t,r)}recordSuccess(t){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(t)}};var Sn="AWS_MAX_ATTEMPTS",yn="max_attempts",Xf={environmentVariableSelector:n(e=>{let t=e[Sn];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${Sn} mast be a number, got "${t}"`);return r},"environmentVariableSelector"),configFileSelector:n(e=>{let t=e[yn];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${yn} mast be a number, got "${t}"`);return r},"configFileSelector"),default:Y},Qf=n(e=>{let{retryStrategy:t,retryMode:r,maxAttempts:o}=e,s=O(o??Y);return Object.assign(e,{maxAttempts:s,retryStrategy:n(async()=>t||(await O(r)()===D.ADAPTIVE?new be(s):new K(s)),"retryStrategy")})},"resolveRetryConfig"),bo="AWS_RETRY_MODE",Do="retry_mode",Zf={environmentVariableSelector:n(e=>e[bo],"environmentVariableSelector"),configFileSelector:n(e=>e[Do],"configFileSelector"),default:an};import{Readable as vo}from"stream";var Rn=n(e=>e?.body instanceof vo||typeof ReadableStream<"u"&&e?.body instanceof ReadableStream,"isStreamingPayload");var An=n(e=>e instanceof Error?e:e instanceof Object?Object.assign(new Error,e):typeof e=="string"?new Error(e):new Error(`AWS SDK error wrapper for ${e}`),"asSdkError");var Po=n(e=>(t,r)=>async o=>{let s=await e.retryStrategy(),i=await e.maxAttempts();if(Mo(s)){s=s;let a=await s.acquireInitialRetryToken(r.partition_id),c=new Error,d=0,u=0,{request:h}=o,l=A.isInstance(h);for(l&&(h.headers[mn]=Dt());;)try{l&&(h.headers[hn]=`attempt=${d+1}; max=${i}`);let{response:p,output:f}=await t(o);return s.recordSuccess(a),f.$metadata.attempts=d+1,f.$metadata.totalRetryDelay=u,{response:p,output:f}}catch(p){let f=ko(p);if(c=An(p),l&&Rn(h))throw(r.logger instanceof we?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),c;try{a=await s.refreshRetryTokenForRetry(a,f)}catch{throw c.$metadata||(c.$metadata={}),c.$metadata.attempts=d+1,c.$metadata.totalRetryDelay=u,c}d=a.getRetryCount();let g=a.getRetryDelay();u+=g,await new Promise(S=>setTimeout(S,g))}}else return s=s,s?.mode&&(r.userAgent=[...r.userAgent||[],["cfg/retry-mode",s.mode]]),s.retry(t,o)},"retryMiddleware"),Mo=n(e=>typeof e.acquireInitialRetryToken<"u"&&typeof e.refreshRetryTokenForRetry<"u"&&typeof e.recordSuccess<"u","isRetryStrategyV2"),ko=n(e=>{let t={error:e,errorType:Uo(e)},r=Lo(e.$response);return r&&(t.retryAfterHint=r),t},"getRetryErrorInfo"),Uo=n(e=>Ce(e)?"THROTTLING":Ne(e)?"TRANSIENT":fn(e)?"SERVER_ERROR":"CLIENT_ERROR","getRetryErrorType"),$o={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},fm=n(e=>({applyToStack:n(t=>{t.add(Po(e),$o)},"applyToStack")}),"getRetryPlugin"),Lo=n(e=>{if(!H.isInstance(e))return;let t=Object.keys(e.headers).find(i=>i.toLowerCase()==="retry-after");if(!t)return;let r=e.headers[t],o=Number(r);return Number.isNaN(o)?new Date(r):new Date(o*1e3)},"getRetryAfterHint");var X=n((e,t,r)=>{if(t in e){if(e[t]==="true")return!0;if(e[t]==="false")return!1;throw new Error(`Cannot load ${r} "${t}". Expected "true" or "false", got ${e[t]}.`)}},"booleanSelector");var P;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(P||(P={}));var Fo="AWS_USE_DUALSTACK_ENDPOINT",Ho="use_dualstack_endpoint";var Rm={environmentVariableSelector:n(e=>X(e,Fo,P.ENV),"environmentVariableSelector"),configFileSelector:n(e=>X(e,Ho,P.CONFIG),"configFileSelector"),default:!1};var Bo="AWS_USE_FIPS_ENDPOINT",Go="use_fips_endpoint";var Tm={environmentVariableSelector:n(e=>X(e,Bo,P.ENV),"environmentVariableSelector"),configFileSelector:n(e=>X(e,Go,P.CONFIG),"configFileSelector"),default:!1};var zo="AWS_REGION",Vo="region",_n={environmentVariableSelector:n(e=>e[zo],"environmentVariableSelector"),configFileSelector:n(e=>e[Vo],"configFileSelector"),default:n(()=>{throw new Error("Region is missing")},"default")},Cm={preferredFile:"credentials"};import{platform as jo,release as qo}from"os";import{env as xn,versions as Wo}from"process";var wn={isCrtAvailable:!1};var Tn=n(()=>wn.isCrtAvailable?["md/crt-avail"]:null,"isCrtAvailable");var $m=n(({serviceId:e,clientVersion:t})=>async r=>{let o=[["aws-sdk-js",t],["ua","2.1"],[`os/${jo()}`,qo()],["lang/js"],["md/nodejs",`${Wo.node}`]],s=Tn();s&&o.push(s),e&&o.push([`api/${e}`,t]),xn.AWS_EXECUTION_ENV&&o.push([`exec-env/${xn.AWS_EXECUTION_ENV}`]);let i=await r?.userAgentAppId?.();return i?[...o,[`app/${i}`]]:[...o]},"createDefaultUserAgentProvider");var Yo="AWS_SDK_UA_APP_ID",Ko="sdk_ua_app_id",Xo="sdk-ua-app-id",Bm={environmentVariableSelector:n(e=>e[Yo],"environmentVariableSelector"),configFileSelector:n(e=>e[Ko]??e[Xo],"configFileSelector"),default:Ve};import{Buffer as Qo}from"buffer";import{createHash as Zo,createHmac as Jo}from"crypto";var In=class{static{n(this,"Hash")}algorithmIdentifier;secret;hash;constructor(t,r){this.algorithmIdentifier=t,this.secret=r,this.reset()}update(t,r){this.hash.update(C(Cn(t,r)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?Jo(this.algorithmIdentifier,Cn(this.secret)):Zo(this.algorithmIdentifier)}};function Cn(e,t){return Qo.isBuffer(e)?e:typeof e=="string"?gt(e,t):ArrayBuffer.isView(e)?Pe(e.buffer,e.byteOffset,e.byteLength):Pe(e)}n(Cn,"castSourceData");import{fstatSync as es,lstatSync as ts,ReadStream as rs}from"fs";var Qm=n(e=>{if(!e)return 0;if(typeof e=="string")return Buffer.byteLength(e);if(typeof e.byteLength=="number")return e.byteLength;if(typeof e.size=="number")return e.size;if(typeof e.start=="number"&&typeof e.end=="number")return e.end+1-e.start;if(e instanceof rs){if(e.path!=null)return ts(e.path).size;if(typeof e.fd=="number")return es(e.fd).size}throw new Error(`Body Length computation failed for ${e}`)},"calculateBodyLength");var Nn="AWS_EXECUTION_ENV",pt="AWS_REGION",ft="AWS_DEFAULT_REGION",On="AWS_EC2_METADATA_DISABLED",bn=["in-region","cross-region","mobile","standard","legacy"],Dn="/latest/meta-data/placement/region";var ns="AWS_DEFAULTS_MODE",os="defaults_mode",vn={environmentVariableSelector:n(e=>e[ns],"environmentVariableSelector"),configFileSelector:n(e=>e[os],"configFileSelector"),default:"legacy"};var ch=n(({region:e=Z(_n),defaultsMode:t=Z(vn)}={})=>mt(async()=>{let r=typeof t=="function"?await t():t;switch(r?.toLowerCase()){case"auto":return ss(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(r?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${bn.join(", ")}, got ${r}`)}}),"resolveDefaultsModeConfig"),ss=n(async e=>{if(e){let t=typeof e=="function"?await e():e,r=await is();return r?t===r?"in-region":"cross-region":"standard"}return"standard"},"resolveNodeDefaultsModeAuto"),is=n(async()=>{if(process.env[Nn]&&(process.env[pt]||process.env[ft]))return process.env[pt]??process.env[ft];if(!process.env[On])try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await import("./dist-es-K23RHFIG.js"),r=await e();return(await t({...r,path:Dn})).toString()}catch{}},"inferPhysicalRegion");var lh=n(e=>({setRegion(t){e.region=t},region(){return e.region}}),"getAwsRegionExtensionConfiguration"),ph=n(e=>({region:e.region()}),"resolveAwsRegionExtensionConfiguration");export{V as a,O as b,ei as c,_s as d,ws as e,di as f,Si as g,Fe as h,ki as i,ee as j,j as k,Dt as l,Ot as m,Pt as n,Aa as o,Ca as p,wt as q,Ue as r,zt as s,ba as t,Ep as u,Rp as v,bp as w,Dp as x,we as y,Cd as z,Qe as A,Jd as B,ip as C,Lp as D,Ma as E,$a as F,Qa as G,tc as H,Wt as I,ne as J,zu as K,mo as L,Zp as M,Rm as N,Tm as O,_n as P,Cm as Q,ff as R,Ef as S,an as T,Xf as U,Qf as V,Zf as W,fm as X,$m as Y,Bm as Z,In as _,Qm as $,ch as aa,lh as ba,ph as ca};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./chunk-Y6DVQ7FD.js";function U(t){return typeof t>"u"||t===void 0}n(U,"isUndefined");function l(t){return typeof t=="string"}n(l,"isString");function se(t){return typeof t=="number"}n(se,"isNumber");function fe(t){return typeof t=="boolean"}n(fe,"isBoolean");function Oe(t){return t===null}n(Oe,"isNull");function nr(t){return t instanceof Date}n(nr,"isDate");function ge(t){return typeof t=="bigint"}n(ge,"isBigInt");function qi(t){return typeof Buffer<"u"&&Buffer.isBuffer(t)}n(qi,"isBuffer");function v(t){return typeof t=="function"}n(v,"isFunction");function Y(t){return typeof t=="object"&&t!==null}n(Y,"isObject");function i(t){return Object.freeze(t)}n(i,"freeze");function Ie(t){return E(t)?t:[t]}n(Ie,"asArray");function E(t){return Array.isArray(t)}n(E,"isReadonlyArray");function Mi(t){return t}n(Mi,"noop");var u=i({is(t){return t.kind==="IdentifierNode"},create(t){return i({kind:"IdentifierNode",name:t})}});function y(t){return Y(t)&&v(t.toOperationNode)}n(y,"isOperationNodeSource");var f=i({is(t){return t.kind==="RawNode"},create(t,e){return i({kind:"RawNode",sqlFragments:i(t),parameters:i(e)})},createWithSql(t){return f.create([t],[])},createWithChild(t){return f.create(["",""],[t])},createWithChildren(t){return f.create(new Array(t.length+1).fill(""),t)}});var B=i({is(t){return t.kind==="ValueNode"},create(t){return i({kind:"ValueNode",value:t})},createImmediate(t){return i({kind:"ValueNode",value:t,immediate:!0})}});var b=i({is(t){return t.kind==="AliasNode"},create(t,e){return i({kind:"AliasNode",node:t,alias:e})}});var T=i({is(t){return t.kind==="ColumnNode"},create(t){return i({kind:"ColumnNode",column:u.create(t)})}});var Je=i({is(t){return t.kind==="SelectAllNode"},create(){return i({kind:"SelectAllNode"})}});var ve=i({is(t){return t.kind==="ReferenceNode"},create(t,e){return i({kind:"ReferenceNode",table:e,column:t})},createSelectAll(t){return i({kind:"ReferenceNode",table:t,column:Je.create()})}});var le=i({is(t){return t.kind==="SchemableIdentifierNode"},create(t){return i({kind:"SchemableIdentifierNode",identifier:u.create(t)})},createWithSchema(t,e){return i({kind:"SchemableIdentifierNode",schema:u.create(t),identifier:u.create(e)})}});var I=i({is(t){return t.kind==="TableNode"},create(t){return i({kind:"TableNode",table:le.create(t)})},createWithSchema(t,e){return i({kind:"TableNode",table:le.createWithSchema(t,e)})}});function $e(t){return Y(t)&&"expressionType"in t&&y(t)}n($e,"isExpression");function or(t){return Y(t)&&"expression"in t&&l(t.alias)&&y(t)}n(or,"isAliasedExpression");var X=i({is(t){return t.kind==="SelectModifierNode"},create(t,e){return i({kind:"SelectModifierNode",modifier:t,of:e})},createWithExpression(t){return i({kind:"SelectModifierNode",rawModifier:t})}});var L=i({is(t){return t.kind==="AndNode"},create(t,e){return i({kind:"AndNode",left:t,right:e})}});var V=i({is(t){return t.kind==="OrNode"},create(t,e){return i({kind:"OrNode",left:t,right:e})}});var Ge=i({is(t){return t.kind==="OnNode"},create(t){return i({kind:"OnNode",on:t})},cloneWithOperation(t,e,r){return i({...t,on:e==="And"?L.create(t.on,r):V.create(t.on,r)})}});var z=i({is(t){return t.kind==="JoinNode"},create(t,e){return i({kind:"JoinNode",joinType:t,table:e,on:void 0})},createWithOn(t,e,r){return i({kind:"JoinNode",joinType:t,table:e,on:Ge.create(r)})},cloneWithOn(t,e){return i({...t,on:t.on?Ge.cloneWithOperation(t.on,"And",e):Ge.create(e)})}});var ae=i({is(t){return t.kind==="BinaryOperationNode"},create(t,e,r){return i({kind:"BinaryOperationNode",leftOperand:t,operator:e,rightOperand:r})}});var ti=["=","==","!=","<>",">",">=","<","<=","in","not in","is","is not","like","not like","match","ilike","not ilike","@>","<@","^@","&&","?","?&","?|","!<","!>","<=>","!~","~","~*","!~*","@@","@@@","!!","<->","regexp","is distinct from","is not distinct from"],ri=["+","-","*","/","%","^","&","|","#","<<",">>"],sr=["->","->>"],ii=[...ti,...ri,"&&","||"],ni=["exists","not exists"],oi=["not","-",...ni],ar=[...ii,...sr,...oi,"between","between symmetric"],D=i({is(t){return t.kind==="OperatorNode"},create(t){return i({kind:"OperatorNode",operator:t})}});function Ct(t){return l(t)&&sr.includes(t)}n(Ct,"isJSONOperator");var je=i({is(t){return t.kind==="PrimitiveValueListNode"},create(t){return i({kind:"PrimitiveValueListNode",values:i([...t])})}});var Ke=i({is(t){return t.kind==="ValueListNode"},create(t){return i({kind:"ValueListNode",values:i(t)})}});function dr(t){return E(t)?si(t):c(t)}n(dr,"parseValueExpressionOrList");function c(t){return re(t)?Z(t):B.create(t)}n(c,"parseValueExpression");function He(t){return se(t)||fe(t)||Oe(t)}n(He,"isSafeImmediateValue");function De(t){if(!He(t))throw new Error(`unsafe immediate value ${JSON.stringify(t)}`);return B.createImmediate(t)}n(De,"parseSafeImmediateValue");function si(t){return t.some(re)?Ke.create(t.map(e=>c(e))):je.create(t)}n(si,"parseValueExpressionList");var q=i({is(t){return t.kind==="ParensNode"},create(t){return i({kind:"ParensNode",node:t})}});function N(t){if(t.length===3)return Ye(t[0],t[1],t[2]);if(t.length===1)return c(t[0]);throw new Error(`invalid arguments: ${JSON.stringify(t)}`)}n(N,"parseValueBinaryOperationOrExpression");function Ye(t,e,r){return ai(e)&&pr(r)?ae.create(C(t),kt(e),B.createImmediate(r)):ae.create(C(t),kt(e),dr(r))}n(Ye,"parseValueBinaryOperation");function W(t,e,r){return ae.create(C(t),kt(e),C(r))}n(W,"parseReferentialBinaryOperation");function Et(t,e){return be(Object.entries(t).filter(([,r])=>!U(r)).map(([r,o])=>Ye(r,pr(o)?"is":"=",o)),e)}n(Et,"parseFilterObject");function be(t,e,r=!0){let o=e==="and"?L.create:V.create;if(t.length===0)return ae.create(B.createImmediate(1),D.create("="),B.createImmediate(e==="and"?1:0));let s=hr(t[0]);for(let h=1;h<t.length;++h)s=o(s,hr(t[h]));return t.length>1&&r?q.create(s):s}n(be,"parseFilterList");function ai(t){return t==="is"||t==="is not"}n(ai,"isIsOperator");function pr(t){return Oe(t)||fe(t)}n(pr,"needsIsOperator");function kt(t){if(l(t)&&ar.includes(t))return D.create(t);if(y(t))return t.toOperationNode();throw new Error(`invalid operator ${JSON.stringify(t)}`)}n(kt,"parseOperator");function hr(t){return y(t)?t.toOperationNode():t}n(hr,"toOperationNode");var ie=i({is(t){return t.kind==="OrderByNode"},create(t){return i({kind:"OrderByNode",items:i([...t])})},cloneWithItems(t,e){return i({...t,items:i([...t.items,...e])})}});var Tt=i({is(t){return t.kind==="PartitionByNode"},create(t){return i({kind:"PartitionByNode",items:i(t)})},cloneWithItems(t,e){return i({...t,items:i([...t.items,...e])})}});var qe=i({is(t){return t.kind==="OverNode"},create(){return i({kind:"OverNode"})},cloneWithOrderByItems(t,e){return i({...t,orderBy:t.orderBy?ie.cloneWithItems(t.orderBy,e):ie.create(e)})},cloneWithPartitionByItems(t,e){return i({...t,partitionBy:t.partitionBy?Tt.cloneWithItems(t.partitionBy,e):Tt.create(e)})}});var Ne=i({is(t){return t.kind==="FromNode"},create(t){return i({kind:"FromNode",froms:i(t)})},cloneWithFroms(t,e){return i({...t,froms:i([...t.froms,...e])})}});var Rt=i({is(t){return t.kind==="GroupByNode"},create(t){return i({kind:"GroupByNode",items:i(t)})},cloneWithItems(t,e){return i({...t,items:i([...t.items,...e])})}});var At=i({is(t){return t.kind==="HavingNode"},create(t){return i({kind:"HavingNode",having:t})},cloneWithOperation(t,e,r){return i({...t,having:e==="And"?L.create(t.having,r):V.create(t.having,r)})}});var w=i({is(t){return t.kind==="InsertQueryNode"},create(t,e,r){return i({kind:"InsertQueryNode",into:t,...e&&{with:e},replace:r})},createWithoutInto(){return i({kind:"InsertQueryNode"})},cloneWith(t,e){return i({...t,...e})}});var Xe=i({is(t){return t.kind==="ListNode"},create(t){return i({kind:"ListNode",items:i(t)})}});var _=i({is(t){return t.kind==="UpdateQueryNode"},create(t,e){return i({kind:"UpdateQueryNode",table:t.length===1?t[0]:Xe.create(t),...e&&{with:e}})},createWithoutTable(){return i({kind:"UpdateQueryNode"})},cloneWithFromItems(t,e){return i({...t,from:t.from?Ne.cloneWithFroms(t.from,e):Ne.create(e)})},cloneWithUpdates(t,e){return i({...t,updates:t.updates?i([...t.updates,...e]):e})},cloneWithLimit(t,e){return i({...t,limit:e})}});var Lt=i({is(t){return t.kind==="UsingNode"},create(t){return i({kind:"UsingNode",tables:i(t)})},cloneWithTables(t,e){return i({...t,tables:i([...t.tables,...e])})}});var de=i({is(t){return t.kind==="DeleteQueryNode"},create(t,e){return i({kind:"DeleteQueryNode",from:Ne.create(t),...e&&{with:e}})},cloneWithOrderByItems:n((t,e)=>a.cloneWithOrderByItems(t,e),"cloneWithOrderByItems"),cloneWithoutOrderBy:n(t=>a.cloneWithoutOrderBy(t),"cloneWithoutOrderBy"),cloneWithLimit(t,e){return i({...t,limit:e})},cloneWithoutLimit(t){return i({...t,limit:void 0})},cloneWithUsing(t,e){return i({...t,using:t.using!==void 0?Lt.cloneWithTables(t.using,e):Lt.create(e)})}});var k=i({is(t){return t.kind==="WhereNode"},create(t){return i({kind:"WhereNode",where:t})},cloneWithOperation(t,e,r){return i({...t,where:e==="And"?L.create(t.where,r):V.create(t.where,r)})}});var Bt=i({is(t){return t.kind==="ReturningNode"},create(t){return i({kind:"ReturningNode",selections:i(t)})},cloneWithSelections(t,e){return i({...t,selections:t.selections?i([...t.selections,...e]):i(e)})}});var ur=i({is(t){return t.kind==="ExplainNode"},create(t,e){return i({kind:"ExplainNode",format:t,options:e})}});var P=i({is(t){return t.kind==="WhenNode"},create(t){return i({kind:"WhenNode",condition:t})},cloneWithResult(t,e){return i({...t,result:e})}});var M=i({is(t){return t.kind==="MergeQueryNode"},create(t,e){return i({kind:"MergeQueryNode",into:t,...e&&{with:e}})},cloneWithUsing(t,e){return i({...t,using:e})},cloneWithWhen(t,e){return i({...t,whens:t.whens?i([...t.whens,e]):i([e])})},cloneWithThen(t,e){return i({...t,whens:t.whens?i([...t.whens.slice(0,-1),P.cloneWithResult(t.whens[t.whens.length-1],e)]):void 0})}});var It=i({is(t){return t.kind==="OutputNode"},create(t){return i({kind:"OutputNode",selections:i(t)})},cloneWithSelections(t,e){return i({...t,selections:t.selections?i([...t.selections,...e]):i(e)})}});var a=i({is(t){return m.is(t)||w.is(t)||_.is(t)||de.is(t)||M.is(t)},cloneWithEndModifier(t,e){return i({...t,endModifiers:t.endModifiers?i([...t.endModifiers,e]):i([e])})},cloneWithWhere(t,e){return i({...t,where:t.where?k.cloneWithOperation(t.where,"And",e):k.create(e)})},cloneWithJoin(t,e){return i({...t,joins:t.joins?i([...t.joins,e]):i([e])})},cloneWithReturning(t,e){return i({...t,returning:t.returning?Bt.cloneWithSelections(t.returning,e):Bt.create(e)})},cloneWithoutReturning(t){return i({...t,returning:void 0})},cloneWithoutWhere(t){return i({...t,where:void 0})},cloneWithExplain(t,e,r){return i({...t,explain:ur.create(e,r?.toOperationNode())})},cloneWithTop(t,e){return i({...t,top:e})},cloneWithOutput(t,e){return i({...t,output:t.output?It.cloneWithSelections(t.output,e):It.create(e)})},cloneWithOrderByItems(t,e){return i({...t,orderBy:t.orderBy?ie.cloneWithItems(t.orderBy,e):ie.create(e)})},cloneWithoutOrderBy(t){return i({...t,orderBy:void 0})}});var m=i({is(t){return t.kind==="SelectQueryNode"},create(t){return i({kind:"SelectQueryNode",...t&&{with:t}})},createFrom(t,e){return i({kind:"SelectQueryNode",from:Ne.create(t),...e&&{with:e}})},cloneWithSelections(t,e){return i({...t,selections:t.selections?i([...t.selections,...e]):i(e)})},cloneWithDistinctOn(t,e){return i({...t,distinctOn:t.distinctOn?i([...t.distinctOn,...e]):i(e)})},cloneWithFrontModifier(t,e){return i({...t,frontModifiers:t.frontModifiers?i([...t.frontModifiers,e]):i([e])})},cloneWithOrderByItems:n((t,e)=>a.cloneWithOrderByItems(t,e),"cloneWithOrderByItems"),cloneWithGroupByItems(t,e){return i({...t,groupBy:t.groupBy?Rt.cloneWithItems(t.groupBy,e):Rt.create(e)})},cloneWithLimit(t,e){return i({...t,limit:e})},cloneWithOffset(t,e){return i({...t,offset:e})},cloneWithFetch(t,e){return i({...t,fetch:e})},cloneWithHaving(t,e){return i({...t,having:t.having?At.cloneWithOperation(t.having,"And",e):At.create(e)})},cloneWithSetOperations(t,e){return i({...t,setOperations:t.setOperations?i([...t.setOperations,...e]):i([...e])})},cloneWithoutSelections(t){return i({...t,selections:[]})},cloneWithoutLimit(t){return i({...t,limit:void 0})},cloneWithoutOffset(t){return i({...t,offset:void 0})},cloneWithoutOrderBy:n(t=>a.cloneWithoutOrderBy(t),"cloneWithoutOrderBy"),cloneWithoutGroupBy(t){return i({...t,groupBy:void 0})}});var Ze=class t{static{n(this,"JoinBuilder")}#e;constructor(e){this.#e=i(e)}on(...e){return new t({...this.#e,joinNode:z.cloneWithOn(this.#e.joinNode,N(e))})}onRef(e,r,o){return new t({...this.#e,joinNode:z.cloneWithOn(this.#e.joinNode,W(e,r,o))})}onTrue(){return new t({...this.#e,joinNode:z.cloneWithOn(this.#e.joinNode,f.createWithSql("true"))})}$call(e){return e(this)}toOperationNode(){return this.#e.joinNode}};var mr=class{static{n(this,"DynamicReferenceBuilder")}#e;get dynamicReference(){return this.#e}get refType(){}constructor(e){this.#e=e}toOperationNode(){return Dt(this.#e)}};function _e(t){return Y(t)&&y(t)&&l(t.dynamicReference)}n(_e,"isDynamicReferenceBuilder");var J=i({is(t){return t.kind==="OrderByItemNode"},create(t,e){return i({kind:"OrderByItemNode",orderBy:t,direction:e})},cloneWith(t,e){return i({...t,...e})}});var cr={is(t){return t.kind==="CollateNode"},create(t){return i({kind:"CollateNode",collation:u.create(t)})}};var et=class t{static{n(this,"OrderByItemBuilder")}#e;constructor(e){this.#e=i(e)}desc(){return new t({node:J.cloneWith(this.#e.node,{direction:f.createWithSql("desc")})})}asc(){return new t({node:J.cloneWith(this.#e.node,{direction:f.createWithSql("asc")})})}nullsLast(){return new t({node:J.cloneWith(this.#e.node,{nulls:"last"})})}nullsFirst(){return new t({node:J.cloneWith(this.#e.node,{nulls:"first"})})}collate(e){return new t({node:J.cloneWith(this.#e.node,{collation:cr.create(e)})})}toOperationNode(){return this.#e.node}};var fr=new Set;function he(t){fr.has(t)||(fr.add(t),console.log(t))}n(he,"logOnce");function Mt(t){return t==="asc"||t==="desc"}n(Mt,"isOrderByDirection");function F(t){if(t.length===2)return[qt(t[0],t[1])];if(t.length===1){let[e]=t;return Array.isArray(e)?(he("orderBy(array) is deprecated, use multiple orderBy calls instead."),e.map(r=>qt(r))):[qt(e)]}throw new Error(`Invalid number of arguments at order by! expected 1-2, received ${t.length}`)}n(F,"parseOrderBy");function qt(t,e){let r=di(t);if(J.is(r)){if(e)throw new Error("Cannot specify direction twice!");return r}return lr(r,e)}n(qt,"parseOrderByItem");function di(t){if(re(t))return Z(t);if(_e(t))return t.toOperationNode();let[e,r]=t.split(" ");return r?(he("`orderBy('column asc')` is deprecated. Use `orderBy('column', 'asc')` instead."),lr($(e),r)):$(t)}n(di,"parseOrderByExpression");function lr(t,e){if(typeof e=="string"){if(!Mt(e))throw new Error(`Invalid order by direction: ${e}`);return J.create(t,f.createWithSql(e))}if($e(e))return he("`orderBy(..., expr)` is deprecated. Use `orderBy(..., 'asc')` or `orderBy(..., (ob) => ...)` instead."),J.create(t,e.toOperationNode());let r=J.create(t);return e?e(new et({node:r})).toOperationNode():r}n(lr,"parseOrderByWithModifiers");var Nr=i({is(t){return t.kind==="PartitionByItemNode"},create(t){return i({kind:"PartitionByItemNode",partitionBy:t})}});function yr(t){return ne(t).map(Nr.create)}n(yr,"parsePartitionBy");var tt=class t{static{n(this,"OverBuilder")}#e;constructor(e){this.#e=i(e)}orderBy(...e){return new t({overNode:qe.cloneWithOrderByItems(this.#e.overNode,F(e))})}clearOrderBy(){return new t({overNode:a.cloneWithoutOrderBy(this.#e.overNode)})}partitionBy(e){return new t({overNode:qe.cloneWithPartitionByItems(this.#e.overNode,yr(e))})}$call(e){return e(this)}toOperationNode(){return this.#e.overNode}};var We=i({is(t){return t.kind==="SelectionNode"},create(t){return i({kind:"SelectionNode",selection:t})},createSelectAll(){return i({kind:"SelectionNode",selection:Je.create()})},createSelectAllFromTable(t){return i({kind:"SelectionNode",selection:ve.createSelectAll(t)})}});var wr=class{static{n(this,"DynamicTableBuilder")}#e;get table(){return this.#e}constructor(e){this.#e=e}as(e){return new Ft(this.#e,e)}},Ft=class{static{n(this,"AliasedDynamicTableBuilder")}#e;#t;get table(){return this.#e}get alias(){return this.#t}constructor(e,r){this.#e=e,this.#t=r}toOperationNode(){return b.create(x(this.#e),u.create(this.#t))}};function xr(t){return Y(t)&&y(t)&&l(t.table)&&l(t.alias)}n(xr,"isAliasedDynamicTableBuilder");function G(t){return E(t)?t.map(e=>ye(e)):[ye(t)]}n(G,"parseTableExpressionOrList");function ye(t){return l(t)?Pt(t):xr(t)?t.toOperationNode():rt(t)}n(ye,"parseTableExpression");function Pt(t){let e=" as ";if(t.includes(e)){let[r,o]=t.split(e).map(Or);return b.create(x(r),u.create(o))}else return x(t)}n(Pt,"parseAliasedTable");function x(t){if(t.includes(".")){let[r,o]=t.split(".").map(Or);return I.createWithSchema(r,o)}else return I.create(t)}n(x,"parseTable");function Or(t){return t.trim()}n(Or,"trim");function g(t){return v(t)?g(t(j())):E(t)?t.map(e=>gr(e)):[gr(t)]}n(g,"parseSelectArg");function gr(t){return l(t)?We.create(br(t)):_e(t)?We.create(t.toOperationNode()):We.create(rt(t))}n(gr,"parseSelectExpression");function S(t){return t?Array.isArray(t)?t.map(vr):[vr(t)]:[We.createSelectAll()]}n(S,"parseSelectAll");function vr(t){if(l(t))return We.createSelectAllFromTable(x(t));throw new Error(`invalid value selectAll expression: ${JSON.stringify(t)}`)}n(vr,"parseSelectAllArg");var Wr=i({is(t){return t.kind==="ValuesNode"},create(t){return i({kind:"ValuesNode",values:i(t)})}});var Sr=i({is(t){return t.kind==="DefaultInsertValueNode"},create(){return i({kind:"DefaultInsertValueNode"})}});function it(t){let e=v(t)?t(j()):t,r=E(e)?e:i([e]);return hi(r)}n(it,"parseInsertExpression");function hi(t){let e=pi(t);return[i([...e.keys()].map(T.create)),Wr.create(t.map(r=>ui(r,e)))]}n(hi,"parseInsertColumnsAndValues");function pi(t){let e=new Map;for(let r of t){let o=Object.keys(r);for(let s of o)!e.has(s)&&r[s]!==void 0&&e.set(s,e.size)}return e}n(pi,"parseColumnNamesAndIndexes");function ui(t,e){let r=Object.keys(t),o=Array.from({length:e.size}),s=!1,h=r.length;for(let ze of r){let Be=e.get(ze);if(U(Be)){h--;continue}let St=t[ze];(U(St)||re(St))&&(s=!0),o[Be]=St}if(h<e.size||s){let ze=Sr.create();return Ke.create(o.map(Be=>U(Be)?ze:c(Be)))}return je.create(o)}n(ui,"parseRowValues");var Qt=i({is(t){return t.kind==="ColumnUpdateNode"},create(t,e){return i({kind:"ColumnUpdateNode",column:t,value:e})}});function Cr(...t){return t.length===2?[Qt.create(C(t[0]),c(t[1]))]:Me(t[0])}n(Cr,"parseUpdate");function Me(t){let e=v(t)?t(j()):t;return Object.entries(e).filter(([r,o])=>o!==void 0).map(([r,o])=>Qt.create(T.create(r),c(o)))}n(Me,"parseUpdateObjectExpression");var kr=i({is(t){return t.kind==="OnDuplicateKeyNode"},create(t){return i({kind:"OnDuplicateKeyNode",updates:t})}});var nt=class{static{n(this,"InsertResult")}insertId;numInsertedOrUpdatedRows;constructor(e,r){this.insertId=e,this.numInsertedOrUpdatedRows=r}};var Q=class extends Error{static{n(this,"NoResultError")}node;constructor(e){super("no result"),this.node=e}};function ee(t){return Object.prototype.hasOwnProperty.call(t,"prototype")}n(ee,"isNoResultErrorConstructor");var R=i({is(t){return t.kind==="OnConflictNode"},create(){return i({kind:"OnConflictNode"})},cloneWith(t,e){return i({...t,...e})},cloneWithIndexWhere(t,e){return i({...t,indexWhere:t.indexWhere?k.cloneWithOperation(t.indexWhere,"And",e):k.create(e)})},cloneWithIndexOrWhere(t,e){return i({...t,indexWhere:t.indexWhere?k.cloneWithOperation(t.indexWhere,"Or",e):k.create(e)})},cloneWithUpdateWhere(t,e){return i({...t,updateWhere:t.updateWhere?k.cloneWithOperation(t.updateWhere,"And",e):k.create(e)})},cloneWithUpdateOrWhere(t,e){return i({...t,updateWhere:t.updateWhere?k.cloneWithOperation(t.updateWhere,"Or",e):k.create(e)})},cloneWithoutIndexWhere(t){return i({...t,indexWhere:void 0})},cloneWithoutUpdateWhere(t){return i({...t,updateWhere:void 0})}});var ot=class t{static{n(this,"OnConflictBuilder")}#e;constructor(e){this.#e=i(e)}column(e){let r=T.create(e);return new t({...this.#e,onConflictNode:R.cloneWith(this.#e.onConflictNode,{columns:this.#e.onConflictNode.columns?i([...this.#e.onConflictNode.columns,r]):i([r])})})}columns(e){let r=e.map(T.create);return new t({...this.#e,onConflictNode:R.cloneWith(this.#e.onConflictNode,{columns:this.#e.onConflictNode.columns?i([...this.#e.onConflictNode.columns,...r]):i(r)})})}constraint(e){return new t({...this.#e,onConflictNode:R.cloneWith(this.#e.onConflictNode,{constraint:u.create(e)})})}expression(e){return new t({...this.#e,onConflictNode:R.cloneWith(this.#e.onConflictNode,{indexExpression:e.toOperationNode()})})}where(...e){return new t({...this.#e,onConflictNode:R.cloneWithIndexWhere(this.#e.onConflictNode,N(e))})}whereRef(e,r,o){return new t({...this.#e,onConflictNode:R.cloneWithIndexWhere(this.#e.onConflictNode,W(e,r,o))})}clearWhere(){return new t({...this.#e,onConflictNode:R.cloneWithoutIndexWhere(this.#e.onConflictNode)})}doNothing(){return new Ut({...this.#e,onConflictNode:R.cloneWith(this.#e.onConflictNode,{doNothing:!0})})}doUpdateSet(e){return new Vt({...this.#e,onConflictNode:R.cloneWith(this.#e.onConflictNode,{updates:Me(e)})})}$call(e){return e(this)}},Ut=class{static{n(this,"OnConflictDoNothingBuilder")}#e;constructor(e){this.#e=i(e)}toOperationNode(){return this.#e.onConflictNode}},Vt=class t{static{n(this,"OnConflictUpdateBuilder")}#e;constructor(e){this.#e=i(e)}where(...e){return new t({...this.#e,onConflictNode:R.cloneWithUpdateWhere(this.#e.onConflictNode,N(e))})}whereRef(e,r,o){return new t({...this.#e,onConflictNode:R.cloneWithUpdateWhere(this.#e.onConflictNode,W(e,r,o))})}clearWhere(){return new t({...this.#e,onConflictNode:R.cloneWithoutUpdateWhere(this.#e.onConflictNode)})}$call(e){return e(this)}toOperationNode(){return this.#e.onConflictNode}};var Er=i({is(t){return t.kind==="TopNode"},create(t,e){return i({kind:"TopNode",expression:t,modifiers:e})}});function K(t,e){if(!se(t)&&!ge(t))throw new Error(`Invalid top expression: ${t}`);if(!U(e)&&!mi(e))throw new Error(`Invalid top modifiers: ${e}`);return Er.create(t,e)}n(K,"parseTop");function mi(t){return t==="percent"||t==="with ties"||t==="percent with ties"}n(mi,"isTopModifiers");var we=i({is(t){return t.kind==="OrActionNode"},create(t){return i({kind:"OrActionNode",action:t})}});var Fe=class t{static{n(this,"InsertQueryBuilder")}#e;constructor(e){this.#e=i(e)}values(e){let[r,o]=it(e);return new t({...this.#e,queryNode:w.cloneWith(this.#e.queryNode,{columns:r,values:o})})}columns(e){return new t({...this.#e,queryNode:w.cloneWith(this.#e.queryNode,{columns:i(e.map(T.create))})})}expression(e){return new t({...this.#e,queryNode:w.cloneWith(this.#e.queryNode,{values:Z(e)})})}defaultValues(){return new t({...this.#e,queryNode:w.cloneWith(this.#e.queryNode,{defaultValues:!0})})}modifyEnd(e){return new t({...this.#e,queryNode:a.cloneWithEndModifier(this.#e.queryNode,e.toOperationNode())})}ignore(){return new t({...this.#e,queryNode:w.cloneWith(this.#e.queryNode,{orAction:we.create("ignore")})})}orIgnore(){return new t({...this.#e,queryNode:w.cloneWith(this.#e.queryNode,{orAction:we.create("ignore")})})}orAbort(){return new t({...this.#e,queryNode:w.cloneWith(this.#e.queryNode,{orAction:we.create("abort")})})}orFail(){return new t({...this.#e,queryNode:w.cloneWith(this.#e.queryNode,{orAction:we.create("fail")})})}orReplace(){return new t({...this.#e,queryNode:w.cloneWith(this.#e.queryNode,{orAction:we.create("replace")})})}orRollback(){return new t({...this.#e,queryNode:w.cloneWith(this.#e.queryNode,{orAction:we.create("rollback")})})}top(e,r){return new t({...this.#e,queryNode:a.cloneWithTop(this.#e.queryNode,K(e,r))})}onConflict(e){return new t({...this.#e,queryNode:w.cloneWith(this.#e.queryNode,{onConflict:e(new ot({onConflictNode:R.create()})).toOperationNode()})})}onDuplicateKeyUpdate(e){return new t({...this.#e,queryNode:w.cloneWith(this.#e.queryNode,{onDuplicateKey:kr.create(Me(e))})})}returning(e){return new t({...this.#e,queryNode:a.cloneWithReturning(this.#e.queryNode,g(e))})}returningAll(){return new t({...this.#e,queryNode:a.cloneWithReturning(this.#e.queryNode,S())})}output(e){return new t({...this.#e,queryNode:a.cloneWithOutput(this.#e.queryNode,g(e))})}outputAll(e){return new t({...this.#e,queryNode:a.cloneWithOutput(this.#e.queryNode,S(e))})}clearReturning(){return new t({...this.#e,queryNode:a.cloneWithoutReturning(this.#e.queryNode)})}$call(e){return e(this)}$if(e,r){return e?r(this):new t({...this.#e})}$castTo(){return new t(this.#e)}$narrowType(){return new t(this.#e)}$assertType(){return new t(this.#e)}withPlugin(e){return new t({...this.#e,executor:this.#e.executor.withPlugin(e)})}toOperationNode(){return this.#e.executor.transformQuery(this.#e.queryNode,this.#e.queryId)}compile(){return this.#e.executor.compileQuery(this.toOperationNode(),this.#e.queryId)}async execute(){let e=this.compile(),r=await this.#e.executor.executeQuery(e),{adapter:o}=this.#e.executor,s=e.query;return s.returning&&o.supportsReturning||s.output&&o.supportsOutput?r.rows:[new nt(r.insertId,r.numAffectedRows??BigInt(0))]}async executeTakeFirst(){let[e]=await this.execute();return e}async executeTakeFirstOrThrow(e=Q){let r=await this.executeTakeFirst();if(r===void 0)throw ee(e)?new e(this.toOperationNode()):e(this.toOperationNode());return r}async*stream(e=100){let r=this.compile(),o=this.#e.executor.stream(r,e);for await(let s of o)yield*s.rows}async explain(e,r){return await new t({...this.#e,queryNode:a.cloneWithExplain(this.#e.queryNode,e,r)}).execute()}};var st=class{static{n(this,"DeleteResult")}numDeletedRows;constructor(e){this.numDeletedRows=e}};var Se=i({is(t){return t.kind==="LimitNode"},create(t){return i({kind:"LimitNode",limit:t})}});var at=class t{static{n(this,"DeleteQueryBuilder")}#e;constructor(e){this.#e=i(e)}where(...e){return new t({...this.#e,queryNode:a.cloneWithWhere(this.#e.queryNode,N(e))})}whereRef(e,r,o){return new t({...this.#e,queryNode:a.cloneWithWhere(this.#e.queryNode,W(e,r,o))})}clearWhere(){return new t({...this.#e,queryNode:a.cloneWithoutWhere(this.#e.queryNode)})}top(e,r){return new t({...this.#e,queryNode:a.cloneWithTop(this.#e.queryNode,K(e,r))})}using(e){return new t({...this.#e,queryNode:de.cloneWithUsing(this.#e.queryNode,G(e))})}innerJoin(...e){return this.#t("InnerJoin",e)}leftJoin(...e){return this.#t("LeftJoin",e)}rightJoin(...e){return this.#t("RightJoin",e)}fullJoin(...e){return this.#t("FullJoin",e)}#t(e,r){return new t({...this.#e,queryNode:a.cloneWithJoin(this.#e.queryNode,pe(e,r))})}returning(e){return new t({...this.#e,queryNode:a.cloneWithReturning(this.#e.queryNode,g(e))})}returningAll(e){return new t({...this.#e,queryNode:a.cloneWithReturning(this.#e.queryNode,S(e))})}output(e){return new t({...this.#e,queryNode:a.cloneWithOutput(this.#e.queryNode,g(e))})}outputAll(e){return new t({...this.#e,queryNode:a.cloneWithOutput(this.#e.queryNode,S(e))})}clearReturning(){return new t({...this.#e,queryNode:a.cloneWithoutReturning(this.#e.queryNode)})}clearLimit(){return new t({...this.#e,queryNode:de.cloneWithoutLimit(this.#e.queryNode)})}orderBy(...e){return new t({...this.#e,queryNode:a.cloneWithOrderByItems(this.#e.queryNode,F(e))})}clearOrderBy(){return new t({...this.#e,queryNode:a.cloneWithoutOrderBy(this.#e.queryNode)})}limit(e){return new t({...this.#e,queryNode:de.cloneWithLimit(this.#e.queryNode,Se.create(c(e)))})}modifyEnd(e){return new t({...this.#e,queryNode:a.cloneWithEndModifier(this.#e.queryNode,e.toOperationNode())})}$call(e){return e(this)}$if(e,r){return e?r(this):new t({...this.#e})}$castTo(){return new t(this.#e)}$narrowType(){return new t(this.#e)}$assertType(){return new t(this.#e)}withPlugin(e){return new t({...this.#e,executor:this.#e.executor.withPlugin(e)})}toOperationNode(){return this.#e.executor.transformQuery(this.#e.queryNode,this.#e.queryId)}compile(){return this.#e.executor.compileQuery(this.toOperationNode(),this.#e.queryId)}async execute(){let e=this.compile(),r=await this.#e.executor.executeQuery(e),{adapter:o}=this.#e.executor,s=e.query;return s.returning&&o.supportsReturning||s.output&&o.supportsOutput?r.rows:[new st(r.numAffectedRows??BigInt(0))]}async executeTakeFirst(){let[e]=await this.execute();return e}async executeTakeFirstOrThrow(e=Q){let r=await this.executeTakeFirst();if(r===void 0)throw ee(e)?new e(this.toOperationNode()):e(this.toOperationNode());return r}async*stream(e=100){let r=this.compile(),o=this.#e.executor.stream(r,e);for await(let s of o)yield*s.rows}async explain(e,r){return await new t({...this.#e,queryNode:a.cloneWithExplain(this.#e.queryNode,e,r)}).execute()}};var dt=class{static{n(this,"UpdateResult")}numUpdatedRows;numChangedRows;constructor(e,r){this.numUpdatedRows=e,this.numChangedRows=r}};var Ce=class t{static{n(this,"UpdateQueryBuilder")}#e;constructor(e){this.#e=i(e)}where(...e){return new t({...this.#e,queryNode:a.cloneWithWhere(this.#e.queryNode,N(e))})}whereRef(e,r,o){return new t({...this.#e,queryNode:a.cloneWithWhere(this.#e.queryNode,W(e,r,o))})}clearWhere(){return new t({...this.#e,queryNode:a.cloneWithoutWhere(this.#e.queryNode)})}top(e,r){return new t({...this.#e,queryNode:a.cloneWithTop(this.#e.queryNode,K(e,r))})}from(e){return new t({...this.#e,queryNode:_.cloneWithFromItems(this.#e.queryNode,G(e))})}innerJoin(...e){return this.#t("InnerJoin",e)}leftJoin(...e){return this.#t("LeftJoin",e)}rightJoin(...e){return this.#t("RightJoin",e)}fullJoin(...e){return this.#t("FullJoin",e)}#t(e,r){return new t({...this.#e,queryNode:a.cloneWithJoin(this.#e.queryNode,pe(e,r))})}orderBy(...e){return new t({...this.#e,queryNode:a.cloneWithOrderByItems(this.#e.queryNode,F(e))})}clearOrderBy(){return new t({...this.#e,queryNode:a.cloneWithoutOrderBy(this.#e.queryNode)})}limit(e){return new t({...this.#e,queryNode:_.cloneWithLimit(this.#e.queryNode,Se.create(c(e)))})}set(...e){return new t({...this.#e,queryNode:_.cloneWithUpdates(this.#e.queryNode,Cr(...e))})}returning(e){return new t({...this.#e,queryNode:a.cloneWithReturning(this.#e.queryNode,g(e))})}returningAll(e){return new t({...this.#e,queryNode:a.cloneWithReturning(this.#e.queryNode,S(e))})}output(e){return new t({...this.#e,queryNode:a.cloneWithOutput(this.#e.queryNode,g(e))})}outputAll(e){return new t({...this.#e,queryNode:a.cloneWithOutput(this.#e.queryNode,S(e))})}modifyEnd(e){return new t({...this.#e,queryNode:a.cloneWithEndModifier(this.#e.queryNode,e.toOperationNode())})}clearReturning(){return new t({...this.#e,queryNode:a.cloneWithoutReturning(this.#e.queryNode)})}$call(e){return e(this)}$if(e,r){return e?r(this):new t({...this.#e})}$castTo(){return new t(this.#e)}$narrowType(){return new t(this.#e)}$assertType(){return new t(this.#e)}withPlugin(e){return new t({...this.#e,executor:this.#e.executor.withPlugin(e)})}toOperationNode(){return this.#e.executor.transformQuery(this.#e.queryNode,this.#e.queryId)}compile(){return this.#e.executor.compileQuery(this.toOperationNode(),this.#e.queryId)}async execute(){let e=this.compile(),r=await this.#e.executor.executeQuery(e),{adapter:o}=this.#e.executor,s=e.query;return s.returning&&o.supportsReturning||s.output&&o.supportsOutput?r.rows:[new dt(r.numAffectedRows??BigInt(0),r.numChangedRows)]}async executeTakeFirst(){let[e]=await this.execute();return e}async executeTakeFirstOrThrow(e=Q){let r=await this.executeTakeFirst();if(r===void 0)throw ee(e)?new e(this.toOperationNode()):e(this.toOperationNode());return r}async*stream(e=100){let r=this.compile(),o=this.#e.executor.stream(r,e);for await(let s of o)yield*s.rows}async explain(e,r){return await new t({...this.#e,queryNode:a.cloneWithExplain(this.#e.queryNode,e,r)}).execute()}};var zt=i({is(t){return t.kind==="CommonTableExpressionNameNode"},create(t,e){return i({kind:"CommonTableExpressionNameNode",table:I.create(t),columns:e?i(e.map(T.create)):void 0})}});var ke=i({is(t){return t.kind==="CommonTableExpressionNode"},create(t,e){return i({kind:"CommonTableExpressionNode",name:t,expression:e})},cloneWith(t,e){return i({...t,...e})}});var ht=class t{static{n(this,"CTEBuilder")}#e;constructor(e){this.#e=i(e)}materialized(){return new t({...this.#e,node:ke.cloneWith(this.#e.node,{materialized:!0})})}notMaterialized(){return new t({...this.#e,node:ke.cloneWith(this.#e.node,{materialized:!1})})}toOperationNode(){return this.#e.node}};function Jt(t,e){let r=e(Rr()).toOperationNode();return v(t)?t(ci(r)).toOperationNode():ke.create(Tr(t),r)}n(Jt,"parseCommonTableExpression");function ci(t){return e=>new ht({node:ke.create(Tr(e),t)})}n(ci,"cteBuilderFactory");function Tr(t){if(t.includes("(")){let e=t.split(/[\(\)]/),r=e[0],o=e[1].split(",").map(s=>s.trim());return zt.create(r,o)}else return zt.create(t)}n(Tr,"parseCommonTableExpressionName");var Pe=i({is(t){return t.kind==="WithNode"},create(t,e){return i({kind:"WithNode",expressions:i([t]),...e})},cloneWithExpression(t,e){return i({...t,expressions:i([...t.expressions,e])})}});var Ar=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"];function Lr(t){let e="";for(let r=0;r<t;++r)e+=fi();return e}n(Lr,"randomString");function fi(){return Ar[~~(Math.random()*Ar.length)]}n(fi,"randomChar");function O(){return new li}n(O,"createQueryId");var li=class{static{n(this,"LazyQueryId")}#e;get queryId(){return this.#e===void 0&&(this.#e=Lr(8)),this.#e}};var pt=class{static{n(this,"OperationNodeTransformer")}nodeStack=[];#e=i({AliasNode:this.transformAlias.bind(this),ColumnNode:this.transformColumn.bind(this),IdentifierNode:this.transformIdentifier.bind(this),SchemableIdentifierNode:this.transformSchemableIdentifier.bind(this),RawNode:this.transformRaw.bind(this),ReferenceNode:this.transformReference.bind(this),SelectQueryNode:this.transformSelectQuery.bind(this),SelectionNode:this.transformSelection.bind(this),TableNode:this.transformTable.bind(this),FromNode:this.transformFrom.bind(this),SelectAllNode:this.transformSelectAll.bind(this),AndNode:this.transformAnd.bind(this),OrNode:this.transformOr.bind(this),ValueNode:this.transformValue.bind(this),ValueListNode:this.transformValueList.bind(this),PrimitiveValueListNode:this.transformPrimitiveValueList.bind(this),ParensNode:this.transformParens.bind(this),JoinNode:this.transformJoin.bind(this),OperatorNode:this.transformOperator.bind(this),WhereNode:this.transformWhere.bind(this),InsertQueryNode:this.transformInsertQuery.bind(this),DeleteQueryNode:this.transformDeleteQuery.bind(this),ReturningNode:this.transformReturning.bind(this),CreateTableNode:this.transformCreateTable.bind(this),AddColumnNode:this.transformAddColumn.bind(this),ColumnDefinitionNode:this.transformColumnDefinition.bind(this),DropTableNode:this.transformDropTable.bind(this),DataTypeNode:this.transformDataType.bind(this),OrderByNode:this.transformOrderBy.bind(this),OrderByItemNode:this.transformOrderByItem.bind(this),GroupByNode:this.transformGroupBy.bind(this),GroupByItemNode:this.transformGroupByItem.bind(this),UpdateQueryNode:this.transformUpdateQuery.bind(this),ColumnUpdateNode:this.transformColumnUpdate.bind(this),LimitNode:this.transformLimit.bind(this),OffsetNode:this.transformOffset.bind(this),OnConflictNode:this.transformOnConflict.bind(this),OnDuplicateKeyNode:this.transformOnDuplicateKey.bind(this),CreateIndexNode:this.transformCreateIndex.bind(this),DropIndexNode:this.transformDropIndex.bind(this),ListNode:this.transformList.bind(this),PrimaryKeyConstraintNode:this.transformPrimaryKeyConstraint.bind(this),UniqueConstraintNode:this.transformUniqueConstraint.bind(this),ReferencesNode:this.transformReferences.bind(this),CheckConstraintNode:this.transformCheckConstraint.bind(this),WithNode:this.transformWith.bind(this),CommonTableExpressionNode:this.transformCommonTableExpression.bind(this),CommonTableExpressionNameNode:this.transformCommonTableExpressionName.bind(this),HavingNode:this.transformHaving.bind(this),CreateSchemaNode:this.transformCreateSchema.bind(this),DropSchemaNode:this.transformDropSchema.bind(this),AlterTableNode:this.transformAlterTable.bind(this),DropColumnNode:this.transformDropColumn.bind(this),RenameColumnNode:this.transformRenameColumn.bind(this),AlterColumnNode:this.transformAlterColumn.bind(this),ModifyColumnNode:this.transformModifyColumn.bind(this),AddConstraintNode:this.transformAddConstraint.bind(this),DropConstraintNode:this.transformDropConstraint.bind(this),RenameConstraintNode:this.transformRenameConstraint.bind(this),ForeignKeyConstraintNode:this.transformForeignKeyConstraint.bind(this),CreateViewNode:this.transformCreateView.bind(this),RefreshMaterializedViewNode:this.transformRefreshMaterializedView.bind(this),DropViewNode:this.transformDropView.bind(this),GeneratedNode:this.transformGenerated.bind(this),DefaultValueNode:this.transformDefaultValue.bind(this),OnNode:this.transformOn.bind(this),ValuesNode:this.transformValues.bind(this),SelectModifierNode:this.transformSelectModifier.bind(this),CreateTypeNode:this.transformCreateType.bind(this),DropTypeNode:this.transformDropType.bind(this),ExplainNode:this.transformExplain.bind(this),DefaultInsertValueNode:this.transformDefaultInsertValue.bind(this),AggregateFunctionNode:this.transformAggregateFunction.bind(this),OverNode:this.transformOver.bind(this),PartitionByNode:this.transformPartitionBy.bind(this),PartitionByItemNode:this.transformPartitionByItem.bind(this),SetOperationNode:this.transformSetOperation.bind(this),BinaryOperationNode:this.transformBinaryOperation.bind(this),UnaryOperationNode:this.transformUnaryOperation.bind(this),UsingNode:this.transformUsing.bind(this),FunctionNode:this.transformFunction.bind(this),CaseNode:this.transformCase.bind(this),WhenNode:this.transformWhen.bind(this),JSONReferenceNode:this.transformJSONReference.bind(this),JSONPathNode:this.transformJSONPath.bind(this),JSONPathLegNode:this.transformJSONPathLeg.bind(this),JSONOperatorChainNode:this.transformJSONOperatorChain.bind(this),TupleNode:this.transformTuple.bind(this),MergeQueryNode:this.transformMergeQuery.bind(this),MatchedNode:this.transformMatched.bind(this),AddIndexNode:this.transformAddIndex.bind(this),CastNode:this.transformCast.bind(this),FetchNode:this.transformFetch.bind(this),TopNode:this.transformTop.bind(this),OutputNode:this.transformOutput.bind(this),OrActionNode:this.transformOrAction.bind(this),CollateNode:this.transformCollate.bind(this)});transformNode(e,r){if(!e)return e;this.nodeStack.push(e);let o=this.transformNodeImpl(e,r);return this.nodeStack.pop(),i(o)}transformNodeImpl(e,r){return this.#e[e.kind](e,r)}transformNodeList(e,r){return e&&i(e.map(o=>this.transformNode(o,r)))}transformSelectQuery(e,r){return{kind:"SelectQueryNode",from:this.transformNode(e.from,r),selections:this.transformNodeList(e.selections,r),distinctOn:this.transformNodeList(e.distinctOn,r),joins:this.transformNodeList(e.joins,r),groupBy:this.transformNode(e.groupBy,r),orderBy:this.transformNode(e.orderBy,r),where:this.transformNode(e.where,r),frontModifiers:this.transformNodeList(e.frontModifiers,r),endModifiers:this.transformNodeList(e.endModifiers,r),limit:this.transformNode(e.limit,r),offset:this.transformNode(e.offset,r),with:this.transformNode(e.with,r),having:this.transformNode(e.having,r),explain:this.transformNode(e.explain,r),setOperations:this.transformNodeList(e.setOperations,r),fetch:this.transformNode(e.fetch,r),top:this.transformNode(e.top,r)}}transformSelection(e,r){return{kind:"SelectionNode",selection:this.transformNode(e.selection,r)}}transformColumn(e,r){return{kind:"ColumnNode",column:this.transformNode(e.column,r)}}transformAlias(e,r){return{kind:"AliasNode",node:this.transformNode(e.node,r),alias:this.transformNode(e.alias,r)}}transformTable(e,r){return{kind:"TableNode",table:this.transformNode(e.table,r)}}transformFrom(e,r){return{kind:"FromNode",froms:this.transformNodeList(e.froms,r)}}transformReference(e,r){return{kind:"ReferenceNode",column:this.transformNode(e.column,r),table:this.transformNode(e.table,r)}}transformAnd(e,r){return{kind:"AndNode",left:this.transformNode(e.left,r),right:this.transformNode(e.right,r)}}transformOr(e,r){return{kind:"OrNode",left:this.transformNode(e.left,r),right:this.transformNode(e.right,r)}}transformValueList(e,r){return{kind:"ValueListNode",values:this.transformNodeList(e.values,r)}}transformParens(e,r){return{kind:"ParensNode",node:this.transformNode(e.node,r)}}transformJoin(e,r){return{kind:"JoinNode",joinType:e.joinType,table:this.transformNode(e.table,r),on:this.transformNode(e.on,r)}}transformRaw(e,r){return{kind:"RawNode",sqlFragments:i([...e.sqlFragments]),parameters:this.transformNodeList(e.parameters,r)}}transformWhere(e,r){return{kind:"WhereNode",where:this.transformNode(e.where,r)}}transformInsertQuery(e,r){return{kind:"InsertQueryNode",into:this.transformNode(e.into,r),columns:this.transformNodeList(e.columns,r),values:this.transformNode(e.values,r),returning:this.transformNode(e.returning,r),onConflict:this.transformNode(e.onConflict,r),onDuplicateKey:this.transformNode(e.onDuplicateKey,r),endModifiers:this.transformNodeList(e.endModifiers,r),with:this.transformNode(e.with,r),ignore:e.ignore,orAction:this.transformNode(e.orAction,r),replace:e.replace,explain:this.transformNode(e.explain,r),defaultValues:e.defaultValues,top:this.transformNode(e.top,r),output:this.transformNode(e.output,r)}}transformValues(e,r){return{kind:"ValuesNode",values:this.transformNodeList(e.values,r)}}transformDeleteQuery(e,r){return{kind:"DeleteQueryNode",from:this.transformNode(e.from,r),using:this.transformNode(e.using,r),joins:this.transformNodeList(e.joins,r),where:this.transformNode(e.where,r),returning:this.transformNode(e.returning,r),endModifiers:this.transformNodeList(e.endModifiers,r),with:this.transformNode(e.with,r),orderBy:this.transformNode(e.orderBy,r),limit:this.transformNode(e.limit,r),explain:this.transformNode(e.explain,r),top:this.transformNode(e.top,r),output:this.transformNode(e.output,r)}}transformReturning(e,r){return{kind:"ReturningNode",selections:this.transformNodeList(e.selections,r)}}transformCreateTable(e,r){return{kind:"CreateTableNode",table:this.transformNode(e.table,r),columns:this.transformNodeList(e.columns,r),constraints:this.transformNodeList(e.constraints,r),temporary:e.temporary,ifNotExists:e.ifNotExists,onCommit:e.onCommit,frontModifiers:this.transformNodeList(e.frontModifiers,r),endModifiers:this.transformNodeList(e.endModifiers,r),selectQuery:this.transformNode(e.selectQuery,r)}}transformColumnDefinition(e,r){return{kind:"ColumnDefinitionNode",column:this.transformNode(e.column,r),dataType:this.transformNode(e.dataType,r),references:this.transformNode(e.references,r),primaryKey:e.primaryKey,autoIncrement:e.autoIncrement,unique:e.unique,notNull:e.notNull,unsigned:e.unsigned,defaultTo:this.transformNode(e.defaultTo,r),check:this.transformNode(e.check,r),generated:this.transformNode(e.generated,r),frontModifiers:this.transformNodeList(e.frontModifiers,r),endModifiers:this.transformNodeList(e.endModifiers,r),nullsNotDistinct:e.nullsNotDistinct,identity:e.identity,ifNotExists:e.ifNotExists}}transformAddColumn(e,r){return{kind:"AddColumnNode",column:this.transformNode(e.column,r)}}transformDropTable(e,r){return{kind:"DropTableNode",table:this.transformNode(e.table,r),ifExists:e.ifExists,cascade:e.cascade}}transformOrderBy(e,r){return{kind:"OrderByNode",items:this.transformNodeList(e.items,r)}}transformOrderByItem(e,r){return{kind:"OrderByItemNode",orderBy:this.transformNode(e.orderBy,r),direction:this.transformNode(e.direction,r),collation:this.transformNode(e.collation,r),nulls:e.nulls}}transformGroupBy(e,r){return{kind:"GroupByNode",items:this.transformNodeList(e.items,r)}}transformGroupByItem(e,r){return{kind:"GroupByItemNode",groupBy:this.transformNode(e.groupBy,r)}}transformUpdateQuery(e,r){return{kind:"UpdateQueryNode",table:this.transformNode(e.table,r),from:this.transformNode(e.from,r),joins:this.transformNodeList(e.joins,r),where:this.transformNode(e.where,r),updates:this.transformNodeList(e.updates,r),returning:this.transformNode(e.returning,r),endModifiers:this.transformNodeList(e.endModifiers,r),with:this.transformNode(e.with,r),explain:this.transformNode(e.explain,r),limit:this.transformNode(e.limit,r),top:this.transformNode(e.top,r),output:this.transformNode(e.output,r),orderBy:this.transformNode(e.orderBy,r)}}transformColumnUpdate(e,r){return{kind:"ColumnUpdateNode",column:this.transformNode(e.column,r),value:this.transformNode(e.value,r)}}transformLimit(e,r){return{kind:"LimitNode",limit:this.transformNode(e.limit,r)}}transformOffset(e,r){return{kind:"OffsetNode",offset:this.transformNode(e.offset,r)}}transformOnConflict(e,r){return{kind:"OnConflictNode",columns:this.transformNodeList(e.columns,r),constraint:this.transformNode(e.constraint,r),indexExpression:this.transformNode(e.indexExpression,r),indexWhere:this.transformNode(e.indexWhere,r),updates:this.transformNodeList(e.updates,r),updateWhere:this.transformNode(e.updateWhere,r),doNothing:e.doNothing}}transformOnDuplicateKey(e,r){return{kind:"OnDuplicateKeyNode",updates:this.transformNodeList(e.updates,r)}}transformCreateIndex(e,r){return{kind:"CreateIndexNode",name:this.transformNode(e.name,r),table:this.transformNode(e.table,r),columns:this.transformNodeList(e.columns,r),unique:e.unique,using:this.transformNode(e.using,r),ifNotExists:e.ifNotExists,where:this.transformNode(e.where,r),nullsNotDistinct:e.nullsNotDistinct}}transformList(e,r){return{kind:"ListNode",items:this.transformNodeList(e.items,r)}}transformDropIndex(e,r){return{kind:"DropIndexNode",name:this.transformNode(e.name,r),table:this.transformNode(e.table,r),ifExists:e.ifExists,cascade:e.cascade}}transformPrimaryKeyConstraint(e,r){return{kind:"PrimaryKeyConstraintNode",columns:this.transformNodeList(e.columns,r),name:this.transformNode(e.name,r),deferrable:e.deferrable,initiallyDeferred:e.initiallyDeferred}}transformUniqueConstraint(e,r){return{kind:"UniqueConstraintNode",columns:this.transformNodeList(e.columns,r),name:this.transformNode(e.name,r),nullsNotDistinct:e.nullsNotDistinct,deferrable:e.deferrable,initiallyDeferred:e.initiallyDeferred}}transformForeignKeyConstraint(e,r){return{kind:"ForeignKeyConstraintNode",columns:this.transformNodeList(e.columns,r),references:this.transformNode(e.references,r),name:this.transformNode(e.name,r),onDelete:e.onDelete,onUpdate:e.onUpdate,deferrable:e.deferrable,initiallyDeferred:e.initiallyDeferred}}transformSetOperation(e,r){return{kind:"SetOperationNode",operator:e.operator,expression:this.transformNode(e.expression,r),all:e.all}}transformReferences(e,r){return{kind:"ReferencesNode",table:this.transformNode(e.table,r),columns:this.transformNodeList(e.columns,r),onDelete:e.onDelete,onUpdate:e.onUpdate}}transformCheckConstraint(e,r){return{kind:"CheckConstraintNode",expression:this.transformNode(e.expression,r),name:this.transformNode(e.name,r)}}transformWith(e,r){return{kind:"WithNode",expressions:this.transformNodeList(e.expressions,r),recursive:e.recursive}}transformCommonTableExpression(e,r){return{kind:"CommonTableExpressionNode",name:this.transformNode(e.name,r),materialized:e.materialized,expression:this.transformNode(e.expression,r)}}transformCommonTableExpressionName(e,r){return{kind:"CommonTableExpressionNameNode",table:this.transformNode(e.table,r),columns:this.transformNodeList(e.columns,r)}}transformHaving(e,r){return{kind:"HavingNode",having:this.transformNode(e.having,r)}}transformCreateSchema(e,r){return{kind:"CreateSchemaNode",schema:this.transformNode(e.schema,r),ifNotExists:e.ifNotExists}}transformDropSchema(e,r){return{kind:"DropSchemaNode",schema:this.transformNode(e.schema,r),ifExists:e.ifExists,cascade:e.cascade}}transformAlterTable(e,r){return{kind:"AlterTableNode",table:this.transformNode(e.table,r),renameTo:this.transformNode(e.renameTo,r),setSchema:this.transformNode(e.setSchema,r),columnAlterations:this.transformNodeList(e.columnAlterations,r),addConstraint:this.transformNode(e.addConstraint,r),dropConstraint:this.transformNode(e.dropConstraint,r),renameConstraint:this.transformNode(e.renameConstraint,r),addIndex:this.transformNode(e.addIndex,r),dropIndex:this.transformNode(e.dropIndex,r)}}transformDropColumn(e,r){return{kind:"DropColumnNode",column:this.transformNode(e.column,r)}}transformRenameColumn(e,r){return{kind:"RenameColumnNode",column:this.transformNode(e.column,r),renameTo:this.transformNode(e.renameTo,r)}}transformAlterColumn(e,r){return{kind:"AlterColumnNode",column:this.transformNode(e.column,r),dataType:this.transformNode(e.dataType,r),dataTypeExpression:this.transformNode(e.dataTypeExpression,r),setDefault:this.transformNode(e.setDefault,r),dropDefault:e.dropDefault,setNotNull:e.setNotNull,dropNotNull:e.dropNotNull}}transformModifyColumn(e,r){return{kind:"ModifyColumnNode",column:this.transformNode(e.column,r)}}transformAddConstraint(e,r){return{kind:"AddConstraintNode",constraint:this.transformNode(e.constraint,r)}}transformDropConstraint(e,r){return{kind:"DropConstraintNode",constraintName:this.transformNode(e.constraintName,r),ifExists:e.ifExists,modifier:e.modifier}}transformRenameConstraint(e,r){return{kind:"RenameConstraintNode",oldName:this.transformNode(e.oldName,r),newName:this.transformNode(e.newName,r)}}transformCreateView(e,r){return{kind:"CreateViewNode",name:this.transformNode(e.name,r),temporary:e.temporary,orReplace:e.orReplace,ifNotExists:e.ifNotExists,materialized:e.materialized,columns:this.transformNodeList(e.columns,r),as:this.transformNode(e.as,r)}}transformRefreshMaterializedView(e,r){return{kind:"RefreshMaterializedViewNode",name:this.transformNode(e.name,r),concurrently:e.concurrently,withNoData:e.withNoData}}transformDropView(e,r){return{kind:"DropViewNode",name:this.transformNode(e.name,r),ifExists:e.ifExists,materialized:e.materialized,cascade:e.cascade}}transformGenerated(e,r){return{kind:"GeneratedNode",byDefault:e.byDefault,always:e.always,identity:e.identity,stored:e.stored,expression:this.transformNode(e.expression,r)}}transformDefaultValue(e,r){return{kind:"DefaultValueNode",defaultValue:this.transformNode(e.defaultValue,r)}}transformOn(e,r){return{kind:"OnNode",on:this.transformNode(e.on,r)}}transformSelectModifier(e,r){return{kind:"SelectModifierNode",modifier:e.modifier,rawModifier:this.transformNode(e.rawModifier,r),of:this.transformNodeList(e.of,r)}}transformCreateType(e,r){return{kind:"CreateTypeNode",name:this.transformNode(e.name,r),enum:this.transformNode(e.enum,r)}}transformDropType(e,r){return{kind:"DropTypeNode",name:this.transformNode(e.name,r),ifExists:e.ifExists}}transformExplain(e,r){return{kind:"ExplainNode",format:e.format,options:this.transformNode(e.options,r)}}transformSchemableIdentifier(e,r){return{kind:"SchemableIdentifierNode",schema:this.transformNode(e.schema,r),identifier:this.transformNode(e.identifier,r)}}transformAggregateFunction(e,r){return{kind:"AggregateFunctionNode",func:e.func,aggregated:this.transformNodeList(e.aggregated,r),distinct:e.distinct,orderBy:this.transformNode(e.orderBy,r),withinGroup:this.transformNode(e.withinGroup,r),filter:this.transformNode(e.filter,r),over:this.transformNode(e.over,r)}}transformOver(e,r){return{kind:"OverNode",orderBy:this.transformNode(e.orderBy,r),partitionBy:this.transformNode(e.partitionBy,r)}}transformPartitionBy(e,r){return{kind:"PartitionByNode",items:this.transformNodeList(e.items,r)}}transformPartitionByItem(e,r){return{kind:"PartitionByItemNode",partitionBy:this.transformNode(e.partitionBy,r)}}transformBinaryOperation(e,r){return{kind:"BinaryOperationNode",leftOperand:this.transformNode(e.leftOperand,r),operator:this.transformNode(e.operator,r),rightOperand:this.transformNode(e.rightOperand,r)}}transformUnaryOperation(e,r){return{kind:"UnaryOperationNode",operator:this.transformNode(e.operator,r),operand:this.transformNode(e.operand,r)}}transformUsing(e,r){return{kind:"UsingNode",tables:this.transformNodeList(e.tables,r)}}transformFunction(e,r){return{kind:"FunctionNode",func:e.func,arguments:this.transformNodeList(e.arguments,r)}}transformCase(e,r){return{kind:"CaseNode",value:this.transformNode(e.value,r),when:this.transformNodeList(e.when,r),else:this.transformNode(e.else,r),isStatement:e.isStatement}}transformWhen(e,r){return{kind:"WhenNode",condition:this.transformNode(e.condition,r),result:this.transformNode(e.result,r)}}transformJSONReference(e,r){return{kind:"JSONReferenceNode",reference:this.transformNode(e.reference,r),traversal:this.transformNode(e.traversal,r)}}transformJSONPath(e,r){return{kind:"JSONPathNode",inOperator:this.transformNode(e.inOperator,r),pathLegs:this.transformNodeList(e.pathLegs,r)}}transformJSONPathLeg(e,r){return{kind:"JSONPathLegNode",type:e.type,value:e.value}}transformJSONOperatorChain(e,r){return{kind:"JSONOperatorChainNode",operator:this.transformNode(e.operator,r),values:this.transformNodeList(e.values,r)}}transformTuple(e,r){return{kind:"TupleNode",values:this.transformNodeList(e.values,r)}}transformMergeQuery(e,r){return{kind:"MergeQueryNode",into:this.transformNode(e.into,r),using:this.transformNode(e.using,r),whens:this.transformNodeList(e.whens,r),with:this.transformNode(e.with,r),top:this.transformNode(e.top,r),endModifiers:this.transformNodeList(e.endModifiers,r),output:this.transformNode(e.output,r),returning:this.transformNode(e.returning,r)}}transformMatched(e,r){return{kind:"MatchedNode",not:e.not,bySource:e.bySource}}transformAddIndex(e,r){return{kind:"AddIndexNode",name:this.transformNode(e.name,r),columns:this.transformNodeList(e.columns,r),unique:e.unique,using:this.transformNode(e.using,r),ifNotExists:e.ifNotExists}}transformCast(e,r){return{kind:"CastNode",expression:this.transformNode(e.expression,r),dataType:this.transformNode(e.dataType,r)}}transformFetch(e,r){return{kind:"FetchNode",rowCount:this.transformNode(e.rowCount,r),modifier:e.modifier}}transformTop(e,r){return{kind:"TopNode",expression:e.expression,modifiers:e.modifiers}}transformOutput(e,r){return{kind:"OutputNode",selections:this.transformNodeList(e.selections,r)}}transformDataType(e,r){return e}transformSelectAll(e,r){return e}transformIdentifier(e,r){return e}transformValue(e,r){return e}transformPrimitiveValueList(e,r){return e}transformOperator(e,r){return e}transformDefaultInsertValue(e,r){return e}transformOrAction(e,r){return e}transformCollate(e,r){return e}};var Ni=i({AlterTableNode:!0,CreateIndexNode:!0,CreateSchemaNode:!0,CreateTableNode:!0,CreateTypeNode:!0,CreateViewNode:!0,RefreshMaterializedViewNode:!0,DeleteQueryNode:!0,DropIndexNode:!0,DropSchemaNode:!0,DropTableNode:!0,DropTypeNode:!0,DropViewNode:!0,InsertQueryNode:!0,RawNode:!0,SelectQueryNode:!0,UpdateQueryNode:!0,MergeQueryNode:!0}),yi={json_agg:!0,to_json:!0},ut=class extends pt{static{n(this,"WithSchemaTransformer")}#e;#t=new Set;#r=new Set;constructor(e){super(),this.#e=e}transformNodeImpl(e,r){if(!this.#s(e))return super.transformNodeImpl(e,r);let o=this.#d(e);for(let A of o)this.#r.add(A);let s=this.#a(e);for(let A of s)this.#t.add(A);let h=super.transformNodeImpl(e,r);for(let A of s)this.#t.delete(A);for(let A of o)this.#r.delete(A);return h}transformSchemableIdentifier(e,r){let o=super.transformSchemableIdentifier(e,r);return o.schema||!this.#t.has(e.identifier.name)?o:{...o,schema:u.create(this.#e)}}transformReferences(e,r){let o=super.transformReferences(e,r);return o.table.table.schema?o:{...o,table:I.createWithSchema(this.#e,o.table.table.identifier.name)}}transformAggregateFunction(e,r){return{...super.transformAggregateFunction({...e,aggregated:[]},r),aggregated:this.#n(e,r,"aggregated")}}transformFunction(e,r){return{...super.transformFunction({...e,arguments:[]},r),arguments:this.#n(e,r,"arguments")}}#n(e,r,o){return yi[e.func]?e[o].map(s=>!I.is(s)||s.table.schema?this.transformNode(s,r):{...s,table:this.transformIdentifier(s.table.identifier,r)}):this.transformNodeList(e[o],r)}#s(e){return e.kind in Ni}#a(e){let r=new Set;if("name"in e&&e.name&&le.is(e.name)&&this.#o(e.name,r),"from"in e&&e.from)for(let o of e.from.froms)this.#i(o,r);if("into"in e&&e.into&&this.#i(e.into,r),"table"in e&&e.table&&this.#i(e.table,r),"joins"in e&&e.joins)for(let o of e.joins)this.#i(o.table,r);return"using"in e&&e.using&&(z.is(e.using)?this.#i(e.using.table,r):this.#i(e.using,r)),r}#d(e){let r=new Set;return"with"in e&&e.with&&this.#h(e.with,r),r}#i(e,r){if(I.is(e))this.#o(e.table,r);else if(b.is(e)&&I.is(e.node))this.#o(e.node.table,r);else if(Xe.is(e))for(let o of e.items)this.#i(o,r)}#o(e,r){let o=e.identifier.name;!this.#t.has(o)&&!this.#r.has(o)&&r.add(o)}#h(e,r){for(let o of e.expressions){let s=o.name.table.table.identifier.name;this.#r.has(s)||r.add(s)}}};var Ee=class{static{n(this,"WithSchemaPlugin")}#e;constructor(e){this.#e=new ut(e)}transformQuery(e){return this.#e.transformNode(e.node,e.queryId)}async transformResult(e){return e.result}};var Br=i({is(t){return t.kind==="MatchedNode"},create(t,e=!1){return i({kind:"MatchedNode",not:t,bySource:e})}});function $t(t,e,r){return P.create(be([Br.create(!t.isMatched,t.bySource),...e&&e.length>0?[e.length===3&&r?W(e[0],e[1],e[2]):N(e)]:[]],"and",!1))}n($t,"parseMergeWhen");function Te(t){return l(t)?f.create([t],[]):y(t)?t.toOperationNode():t}n(Te,"parseMergeThen");var Qe=class{static{n(this,"Deferred")}#e;#t;#r;constructor(){this.#e=new Promise((e,r)=>{this.#r=r,this.#t=e})}get promise(){return this.#e}resolve=n(e=>{this.#t&&this.#t(e)},"resolve");reject=n(e=>{this.#r&&this.#r(e)},"reject")};async function Ir(t){let e=new Qe,r=new Qe;return t.provideConnection(async o=>(e.resolve(o),await r.promise)).catch(o=>e.reject(o)),i({connection:await e.promise,release:r.resolve})}n(Ir,"provideControlledConnection");var wi=i([]),mt=class{static{n(this,"QueryExecutorBase")}#e;constructor(e=wi){this.#e=e}get plugins(){return this.#e}transformQuery(e,r){for(let o of this.#e){let s=o.transformQuery({node:e,queryId:r});if(s.kind===e.kind)e=s;else throw new Error(["KyselyPlugin.transformQuery must return a node","of the same kind that was given to it.",`The plugin was given a ${e.kind}`,`but it returned a ${s.kind}`].join(" "))}return e}async executeQuery(e){return await this.provideConnection(async r=>{let o=await r.executeQuery(e);return"numUpdatedOrDeletedRows"in o&&he("kysely:warning: outdated driver/plugin detected! `QueryResult.numUpdatedOrDeletedRows` has been replaced with `QueryResult.numAffectedRows`."),await this.#t(o,e.queryId)})}async*stream(e,r){let{connection:o,release:s}=await Ir(this);try{for await(let h of o.streamQuery(e,r))yield await this.#t(h,e.queryId)}finally{s()}}async#t(e,r){for(let o of this.#e)e=await o.transformResult({result:e,queryId:r});return e}};var Gt=class t extends mt{static{n(this,"NoopQueryExecutor")}get adapter(){throw new Error("this query cannot be compiled to SQL")}compileQuery(){throw new Error("this query cannot be compiled to SQL")}provideConnection(){throw new Error("this query cannot be executed")}withConnectionProvider(){throw new Error("this query cannot have a connection provider")}withPlugin(e){return new t([...this.plugins,e])}withPlugins(e){return new t([...this.plugins,...e])}withPluginAtFront(e){return new t([e,...this.plugins])}withoutPlugins(){return new t([])}},ue=new Gt;var ct=class{static{n(this,"MergeResult")}numChangedRows;constructor(e){this.numChangedRows=e}};var ft=class t{static{n(this,"MergeQueryBuilder")}#e;constructor(e){this.#e=i(e)}modifyEnd(e){return new t({...this.#e,queryNode:a.cloneWithEndModifier(this.#e.queryNode,e.toOperationNode())})}top(e,r){return new t({...this.#e,queryNode:a.cloneWithTop(this.#e.queryNode,K(e,r))})}using(...e){return new me({...this.#e,queryNode:M.cloneWithUsing(this.#e.queryNode,pe("Using",e))})}returning(e){return new t({...this.#e,queryNode:a.cloneWithReturning(this.#e.queryNode,g(e))})}returningAll(e){return new t({...this.#e,queryNode:a.cloneWithReturning(this.#e.queryNode,S(e))})}output(e){return new t({...this.#e,queryNode:a.cloneWithOutput(this.#e.queryNode,g(e))})}outputAll(e){return new t({...this.#e,queryNode:a.cloneWithOutput(this.#e.queryNode,S(e))})}},me=class t{static{n(this,"WheneableMergeQueryBuilder")}#e;constructor(e){this.#e=i(e)}modifyEnd(e){return new t({...this.#e,queryNode:a.cloneWithEndModifier(this.#e.queryNode,e.toOperationNode())})}top(e,r){return new t({...this.#e,queryNode:a.cloneWithTop(this.#e.queryNode,K(e,r))})}whenMatched(){return this.#t([])}whenMatchedAnd(...e){return this.#t(e)}whenMatchedAndRef(e,r,o){return this.#t([e,r,o],!0)}#t(e,r){return new lt({...this.#e,queryNode:M.cloneWithWhen(this.#e.queryNode,$t({isMatched:!0},e,r))})}whenNotMatched(){return this.#r([])}whenNotMatchedAnd(...e){return this.#r(e)}whenNotMatchedAndRef(e,r,o){return this.#r([e,r,o],!0)}whenNotMatchedBySource(){return this.#r([],!1,!0)}whenNotMatchedBySourceAnd(...e){return this.#r(e,!1,!0)}whenNotMatchedBySourceAndRef(e,r,o){return this.#r([e,r,o],!0,!0)}returning(e){return new t({...this.#e,queryNode:a.cloneWithReturning(this.#e.queryNode,g(e))})}returningAll(e){return new t({...this.#e,queryNode:a.cloneWithReturning(this.#e.queryNode,S(e))})}output(e){return new t({...this.#e,queryNode:a.cloneWithOutput(this.#e.queryNode,g(e))})}outputAll(e){return new t({...this.#e,queryNode:a.cloneWithOutput(this.#e.queryNode,S(e))})}#r(e,r=!1,o=!1){let s={...this.#e,queryNode:M.cloneWithWhen(this.#e.queryNode,$t({isMatched:!1,bySource:o},e,r))},h=o?lt:jt;return new h(s)}$call(e){return e(this)}$if(e,r){return e?r(this):new t({...this.#e})}toOperationNode(){return this.#e.executor.transformQuery(this.#e.queryNode,this.#e.queryId)}compile(){return this.#e.executor.compileQuery(this.toOperationNode(),this.#e.queryId)}async execute(){let e=this.compile(),r=await this.#e.executor.executeQuery(e),{adapter:o}=this.#e.executor,s=e.query;return s.returning&&o.supportsReturning||s.output&&o.supportsOutput?r.rows:[new ct(r.numAffectedRows)]}async executeTakeFirst(){let[e]=await this.execute();return e}async executeTakeFirstOrThrow(e=Q){let r=await this.executeTakeFirst();if(r===void 0)throw ee(e)?new e(this.toOperationNode()):e(this.toOperationNode());return r}},lt=class{static{n(this,"MatchedThenableMergeQueryBuilder")}#e;constructor(e){this.#e=i(e)}thenDelete(){return new me({...this.#e,queryNode:M.cloneWithThen(this.#e.queryNode,Te("delete"))})}thenDoNothing(){return new me({...this.#e,queryNode:M.cloneWithThen(this.#e.queryNode,Te("do nothing"))})}thenUpdate(e){return new me({...this.#e,queryNode:M.cloneWithThen(this.#e.queryNode,Te(e(new Ce({queryId:this.#e.queryId,executor:ue,queryNode:_.createWithoutTable()}))))})}thenUpdateSet(...e){return this.thenUpdate(r=>r.set(...e))}},jt=class{static{n(this,"NotMatchedThenableMergeQueryBuilder")}#e;constructor(e){this.#e=i(e)}thenDoNothing(){return new me({...this.#e,queryNode:M.cloneWithThen(this.#e.queryNode,Te("do nothing"))})}thenInsertValues(e){let[r,o]=it(e);return new me({...this.#e,queryNode:M.cloneWithThen(this.#e.queryNode,Te(w.cloneWith(w.createWithoutInto(),{columns:r,values:o})))})}};var Nt=class t{static{n(this,"QueryCreator")}#e;constructor(e){this.#e=i(e)}selectFrom(e){return Ue({queryId:O(),executor:this.#e.executor,queryNode:m.createFrom(G(e),this.#e.withNode)})}selectNoFrom(e){return Ue({queryId:O(),executor:this.#e.executor,queryNode:m.cloneWithSelections(m.create(this.#e.withNode),g(e))})}insertInto(e){return new Fe({queryId:O(),executor:this.#e.executor,queryNode:w.create(x(e),this.#e.withNode)})}replaceInto(e){return new Fe({queryId:O(),executor:this.#e.executor,queryNode:w.create(x(e),this.#e.withNode,!0)})}deleteFrom(e){return new at({queryId:O(),executor:this.#e.executor,queryNode:de.create(G(e),this.#e.withNode)})}updateTable(e){return new Ce({queryId:O(),executor:this.#e.executor,queryNode:_.create(G(e),this.#e.withNode)})}mergeInto(e){return new ft({queryId:O(),executor:this.#e.executor,queryNode:M.create(Pt(e),this.#e.withNode)})}with(e,r){let o=Jt(e,r);return new t({...this.#e,withNode:this.#e.withNode?Pe.cloneWithExpression(this.#e.withNode,o):Pe.create(o)})}withRecursive(e,r){let o=Jt(e,r);return new t({...this.#e,withNode:this.#e.withNode?Pe.cloneWithExpression(this.#e.withNode,o):Pe.create(o,{recursive:!0})})}withPlugin(e){return new t({...this.#e,executor:this.#e.executor.withPlugin(e)})}withoutPlugins(){return new t({...this.#e,executor:this.#e.executor.withoutPlugins()})}withSchema(e){return new t({...this.#e,executor:this.#e.executor.withPluginAtFront(new Ee(e))})}};function Rr(){return new Nt({executor:ue})}n(Rr,"createQueryCreator");function Dr(t,e){return new Ze({joinNode:z.create(t,ye(e))})}n(Dr,"createJoinBuilder");function qr(){return new tt({overNode:qe.create()})}n(qr,"createOverBuilder");function pe(t,e){if(e.length===3)return Oi(t,e[0],e[1],e[2]);if(e.length===2)return xi(t,e[0],e[1]);if(e.length===1)return gi(t,e[0]);throw new Error("not implemented")}n(pe,"parseJoin");function xi(t,e,r){return r(Dr(t,e)).toOperationNode()}n(xi,"parseCallbackJoin");function Oi(t,e,r,o){return z.createWithOn(t,ye(e),W(r,"=",o))}n(Oi,"parseSingleOnJoin");function gi(t,e){return z.create(t,ye(e))}n(gi,"parseOnlessJoin");var Mr=i({is(t){return t.kind==="OffsetNode"},create(t){return i({kind:"OffsetNode",offset:t})}});var Fr=i({is(t){return t.kind==="GroupByItemNode"},create(t){return i({kind:"GroupByItemNode",groupBy:t})}});function Pr(t){return t=v(t)?t(j()):t,ne(t).map(Fr.create)}n(Pr,"parseGroupBy");var yt=i({is(t){return t.kind==="SetOperationNode"},create(t,e,r){return i({kind:"SetOperationNode",operator:t,expression:e,all:r})}});function xe(t,e,r){return v(e)&&(e=e(wt())),E(e)||(e=[e]),e.map(o=>yt.create(t,Z(o),r))}n(xe,"parseSetOperations");var p=class t{static{n(this,"ExpressionWrapper")}#e;constructor(e){this.#e=e}get expressionType(){}as(e){return new Ve(this,e)}or(...e){return new Kt(V.create(this.#e,N(e)))}and(...e){return new Ht(L.create(this.#e,N(e)))}$castTo(){return new t(this.#e)}$notNull(){return new t(this.#e)}toOperationNode(){return this.#e}},Ve=class{static{n(this,"AliasedExpressionWrapper")}#e;#t;constructor(e,r){this.#e=e,this.#t=r}get expression(){return this.#e}get alias(){return this.#t}toOperationNode(){return b.create(this.#e.toOperationNode(),y(this.#t)?this.#t.toOperationNode():u.create(this.#t))}},Kt=class t{static{n(this,"OrWrapper")}#e;constructor(e){this.#e=e}get expressionType(){}as(e){return new Ve(this,e)}or(...e){return new t(V.create(this.#e,N(e)))}$castTo(){return new t(this.#e)}toOperationNode(){return q.create(this.#e)}},Ht=class t{static{n(this,"AndWrapper")}#e;constructor(e){this.#e=e}get expressionType(){}as(e){return new Ve(this,e)}and(...e){return new t(L.create(this.#e,N(e)))}$castTo(){return new t(this.#e)}toOperationNode(){return q.create(this.#e)}};var Qr={is(t){return t.kind==="FetchNode"},create(t,e){return{kind:"FetchNode",rowCount:B.create(t),modifier:e}}};function Ur(t,e){if(!se(t)&&!ge(t))throw new Error(`Invalid fetch row count: ${t}`);if(!vi(e))throw new Error(`Invalid fetch modifier: ${e}`);return Qr.create(t,e)}n(Ur,"parseFetch");function vi(t){return t==="only"||t==="with ties"}n(vi,"isFetchModifier");var bi=class d{static{n(this,"SelectQueryBuilderImpl")}#e;constructor(e){this.#e=i(e)}get expressionType(){}get isSelectQueryBuilder(){return!0}where(...e){return new d({...this.#e,queryNode:a.cloneWithWhere(this.#e.queryNode,N(e))})}whereRef(e,r,o){return new d({...this.#e,queryNode:a.cloneWithWhere(this.#e.queryNode,W(e,r,o))})}having(...e){return new d({...this.#e,queryNode:m.cloneWithHaving(this.#e.queryNode,N(e))})}havingRef(e,r,o){return new d({...this.#e,queryNode:m.cloneWithHaving(this.#e.queryNode,W(e,r,o))})}select(e){return new d({...this.#e,queryNode:m.cloneWithSelections(this.#e.queryNode,g(e))})}distinctOn(e){return new d({...this.#e,queryNode:m.cloneWithDistinctOn(this.#e.queryNode,ne(e))})}modifyFront(e){return new d({...this.#e,queryNode:m.cloneWithFrontModifier(this.#e.queryNode,X.createWithExpression(e.toOperationNode()))})}modifyEnd(e){return new d({...this.#e,queryNode:a.cloneWithEndModifier(this.#e.queryNode,X.createWithExpression(e.toOperationNode()))})}distinct(){return new d({...this.#e,queryNode:m.cloneWithFrontModifier(this.#e.queryNode,X.create("Distinct"))})}forUpdate(e){return new d({...this.#e,queryNode:a.cloneWithEndModifier(this.#e.queryNode,X.create("ForUpdate",e?Ie(e).map(x):void 0))})}forShare(e){return new d({...this.#e,queryNode:a.cloneWithEndModifier(this.#e.queryNode,X.create("ForShare",e?Ie(e).map(x):void 0))})}forKeyShare(e){return new d({...this.#e,queryNode:a.cloneWithEndModifier(this.#e.queryNode,X.create("ForKeyShare",e?Ie(e).map(x):void 0))})}forNoKeyUpdate(e){return new d({...this.#e,queryNode:a.cloneWithEndModifier(this.#e.queryNode,X.create("ForNoKeyUpdate",e?Ie(e).map(x):void 0))})}skipLocked(){return new d({...this.#e,queryNode:a.cloneWithEndModifier(this.#e.queryNode,X.create("SkipLocked"))})}noWait(){return new d({...this.#e,queryNode:a.cloneWithEndModifier(this.#e.queryNode,X.create("NoWait"))})}selectAll(e){return new d({...this.#e,queryNode:m.cloneWithSelections(this.#e.queryNode,S(e))})}innerJoin(...e){return this.#t("InnerJoin",e)}leftJoin(...e){return this.#t("LeftJoin",e)}rightJoin(...e){return this.#t("RightJoin",e)}fullJoin(...e){return this.#t("FullJoin",e)}crossJoin(...e){return this.#t("CrossJoin",e)}innerJoinLateral(...e){return this.#t("LateralInnerJoin",e)}leftJoinLateral(...e){return this.#t("LateralLeftJoin",e)}crossJoinLateral(...e){return this.#t("LateralCrossJoin",e)}crossApply(...e){return this.#t("CrossApply",e)}outerApply(...e){return this.#t("OuterApply",e)}#t(e,r){return new d({...this.#e,queryNode:a.cloneWithJoin(this.#e.queryNode,pe(e,r))})}orderBy(...e){return new d({...this.#e,queryNode:a.cloneWithOrderByItems(this.#e.queryNode,F(e))})}groupBy(e){return new d({...this.#e,queryNode:m.cloneWithGroupByItems(this.#e.queryNode,Pr(e))})}limit(e){return new d({...this.#e,queryNode:m.cloneWithLimit(this.#e.queryNode,Se.create(c(e)))})}offset(e){return new d({...this.#e,queryNode:m.cloneWithOffset(this.#e.queryNode,Mr.create(c(e)))})}fetch(e,r="only"){return new d({...this.#e,queryNode:m.cloneWithFetch(this.#e.queryNode,Ur(e,r))})}top(e,r){return new d({...this.#e,queryNode:a.cloneWithTop(this.#e.queryNode,K(e,r))})}union(e){return new d({...this.#e,queryNode:m.cloneWithSetOperations(this.#e.queryNode,xe("union",e,!1))})}unionAll(e){return new d({...this.#e,queryNode:m.cloneWithSetOperations(this.#e.queryNode,xe("union",e,!0))})}intersect(e){return new d({...this.#e,queryNode:m.cloneWithSetOperations(this.#e.queryNode,xe("intersect",e,!1))})}intersectAll(e){return new d({...this.#e,queryNode:m.cloneWithSetOperations(this.#e.queryNode,xe("intersect",e,!0))})}except(e){return new d({...this.#e,queryNode:m.cloneWithSetOperations(this.#e.queryNode,xe("except",e,!1))})}exceptAll(e){return new d({...this.#e,queryNode:m.cloneWithSetOperations(this.#e.queryNode,xe("except",e,!0))})}as(e){return new Wi(this,e)}clearSelect(){return new d({...this.#e,queryNode:m.cloneWithoutSelections(this.#e.queryNode)})}clearWhere(){return new d({...this.#e,queryNode:a.cloneWithoutWhere(this.#e.queryNode)})}clearLimit(){return new d({...this.#e,queryNode:m.cloneWithoutLimit(this.#e.queryNode)})}clearOffset(){return new d({...this.#e,queryNode:m.cloneWithoutOffset(this.#e.queryNode)})}clearOrderBy(){return new d({...this.#e,queryNode:a.cloneWithoutOrderBy(this.#e.queryNode)})}clearGroupBy(){return new d({...this.#e,queryNode:m.cloneWithoutGroupBy(this.#e.queryNode)})}$call(e){return e(this)}$if(e,r){return e?r(this):new d({...this.#e})}$castTo(){return new d(this.#e)}$narrowType(){return new d(this.#e)}$assertType(){return new d(this.#e)}$asTuple(){return new p(this.toOperationNode())}$asScalar(){return new p(this.toOperationNode())}withPlugin(e){return new d({...this.#e,executor:this.#e.executor.withPlugin(e)})}toOperationNode(){return this.#e.executor.transformQuery(this.#e.queryNode,this.#e.queryId)}compile(){return this.#e.executor.compileQuery(this.toOperationNode(),this.#e.queryId)}async execute(){let e=this.compile();return(await this.#e.executor.executeQuery(e)).rows}async executeTakeFirst(){let[e]=await this.execute();return e}async executeTakeFirstOrThrow(e=Q){let r=await this.executeTakeFirst();if(r===void 0)throw ee(e)?new e(this.toOperationNode()):e(this.toOperationNode());return r}async*stream(e=100){let r=this.compile(),o=this.#e.executor.stream(r,e);for await(let s of o)yield*s.rows}async explain(e,r){return await new d({...this.#e,queryNode:a.cloneWithExplain(this.#e.queryNode,e,r)}).execute()}};function Ue(t){return new bi(t)}n(Ue,"createSelectQueryBuilder");var Wi=class{static{n(this,"AliasedSelectQueryBuilderImpl")}#e;#t;constructor(e,r){this.#e=e,this.#t=r}get expression(){return this.#e}get alias(){return this.#t}get isAliasedSelectQueryBuilder(){return!0}toOperationNode(){return b.create(this.#e.toOperationNode(),u.create(this.#t))}};var te=i({is(t){return t.kind==="AggregateFunctionNode"},create(t,e=[]){return i({kind:"AggregateFunctionNode",func:t,aggregated:e})},cloneWithDistinct(t){return i({...t,distinct:!0})},cloneWithOrderBy(t,e,r=!1){let o=r?"withinGroup":"orderBy";return i({...t,[o]:t[o]?ie.cloneWithItems(t[o],e):ie.create(e)})},cloneWithFilter(t,e){return i({...t,filter:t.filter?k.cloneWithOperation(t.filter,"And",e):k.create(e)})},cloneWithOrFilter(t,e){return i({...t,filter:t.filter?k.cloneWithOperation(t.filter,"Or",e):k.create(e)})},cloneWithOver(t,e){return i({...t,over:e})}});var Yt=i({is(t){return t.kind==="FunctionNode"},create(t,e){return i({kind:"FunctionNode",func:t,arguments:e})}});var Re=class t{static{n(this,"AggregateFunctionBuilder")}#e;constructor(e){this.#e=i(e)}get expressionType(){}as(e){return new Xt(this,e)}distinct(){return new t({...this.#e,aggregateFunctionNode:te.cloneWithDistinct(this.#e.aggregateFunctionNode)})}orderBy(...e){return new t({...this.#e,aggregateFunctionNode:a.cloneWithOrderByItems(this.#e.aggregateFunctionNode,F(e))})}clearOrderBy(){return new t({...this.#e,aggregateFunctionNode:a.cloneWithoutOrderBy(this.#e.aggregateFunctionNode)})}withinGroupOrderBy(...e){return new t({...this.#e,aggregateFunctionNode:te.cloneWithOrderBy(this.#e.aggregateFunctionNode,F(e),!0)})}filterWhere(...e){return new t({...this.#e,aggregateFunctionNode:te.cloneWithFilter(this.#e.aggregateFunctionNode,N(e))})}filterWhereRef(e,r,o){return new t({...this.#e,aggregateFunctionNode:te.cloneWithFilter(this.#e.aggregateFunctionNode,W(e,r,o))})}over(e){let r=qr();return new t({...this.#e,aggregateFunctionNode:te.cloneWithOver(this.#e.aggregateFunctionNode,(e?e(r):r).toOperationNode())})}$call(e){return e(this)}$castTo(){return new t(this.#e)}$notNull(){return new t(this.#e)}toOperationNode(){return this.#e.aggregateFunctionNode}},Xt=class{static{n(this,"AliasedAggregateFunctionBuilder")}#e;#t;constructor(e,r){this.#e=e,this.#t=r}get expression(){return this.#e}get alias(){return this.#t}toOperationNode(){return b.create(this.#e.toOperationNode(),u.create(this.#t))}};function Vr(){let t=n((r,o)=>new p(Yt.create(r,ne(o??[]))),"fn"),e=n((r,o)=>new Re({aggregateFunctionNode:te.create(r,o?ne(o):void 0)}),"agg");return Object.assign(t,{agg:e,avg(r){return e("avg",[r])},coalesce(...r){return t("coalesce",r)},count(r){return e("count",[r])},countAll(r){return new Re({aggregateFunctionNode:te.create("count",S(r))})},max(r){return e("max",[r])},min(r){return e("min",[r])},sum(r){return e("sum",[r])},any(r){return t("any",[r])},jsonAgg(r){return new Re({aggregateFunctionNode:te.create("json_agg",[l(r)?x(r):r.toOperationNode()])})},toJson(r){return new p(Yt.create("to_json",[l(r)?x(r):r.toOperationNode()]))}})}n(Vr,"createFunctionModule");var zr=i({is(t){return t.kind==="UnaryOperationNode"},create(t,e){return i({kind:"UnaryOperationNode",operator:t,operand:e})}});function Jr(t,e){return zr.create(D.create(t),C(e))}n(Jr,"parseUnaryOperation");var H=i({is(t){return t.kind==="CaseNode"},create(t){return i({kind:"CaseNode",value:t})},cloneWithWhen(t,e){return i({...t,when:i(t.when?[...t.when,e]:[e])})},cloneWithThen(t,e){return i({...t,when:t.when?i([...t.when.slice(0,-1),P.cloneWithResult(t.when[t.when.length-1],e)]):void 0})},cloneWith(t,e){return i({...t,...e})}});var xt=class{static{n(this,"CaseBuilder")}#e;constructor(e){this.#e=i(e)}when(...e){return new Ot({...this.#e,node:H.cloneWithWhen(this.#e.node,P.create(N(e)))})}},Ot=class{static{n(this,"CaseThenBuilder")}#e;constructor(e){this.#e=i(e)}then(e){return new Zt({...this.#e,node:H.cloneWithThen(this.#e.node,He(e)?De(e):c(e))})}},Zt=class{static{n(this,"CaseWhenBuilder")}#e;constructor(e){this.#e=i(e)}when(...e){return new Ot({...this.#e,node:H.cloneWithWhen(this.#e.node,P.create(N(e)))})}else(e){return new _t({...this.#e,node:H.cloneWith(this.#e.node,{else:He(e)?De(e):c(e)})})}end(){return new p(H.cloneWith(this.#e.node,{isStatement:!1}))}endCase(){return new p(H.cloneWith(this.#e.node,{isStatement:!0}))}},_t=class{static{n(this,"CaseEndBuilder")}#e;constructor(e){this.#e=i(e)}end(){return new p(H.cloneWith(this.#e.node,{isStatement:!1}))}endCase(){return new p(H.cloneWith(this.#e.node,{isStatement:!0}))}};var gt=i({is(t){return t.kind==="JSONOperatorChainNode"},create(t){return i({kind:"JSONOperatorChainNode",operator:t,values:i([])})},cloneWithValue(t,e){return i({...t,values:i([...t.values,e])})}});var er=i({is(t){return t.kind==="JSONPathLegNode"},create(t,e){return i({kind:"JSONPathLegNode",type:t,value:e})}});var ce=i({is(t){return t.kind==="JSONPathNode"},create(t){return i({kind:"JSONPathNode",inOperator:t,pathLegs:i([])})},cloneWithLeg(t,e){return i({...t,pathLegs:i([...t.pathLegs,e])})}});var Ae=i({is(t){return t.kind==="JSONReferenceNode"},create(t,e){return i({kind:"JSONReferenceNode",reference:t,traversal:e})},cloneWithTraversal(t,e){return i({...t,traversal:e})}});var Le=class{static{n(this,"JSONPathBuilder")}#e;constructor(e){this.#e=e}at(e){return this.#t("ArrayLocation",e)}key(e){return this.#t("Member",e)}#t(e,r){return Ae.is(this.#e)?new vt(Ae.cloneWithTraversal(this.#e,ce.is(this.#e.traversal)?ce.cloneWithLeg(this.#e.traversal,er.create(e,r)):gt.cloneWithValue(this.#e.traversal,B.createImmediate(r)))):new vt(ce.cloneWithLeg(this.#e,er.create(e,r)))}},vt=class t extends Le{static{n(this,"TraversedJSONPathBuilder")}#e;constructor(e){super(e),this.#e=e}get expressionType(){}as(e){return new tr(this,e)}$castTo(){return new t(this.#e)}$notNull(){return new t(this.#e)}toOperationNode(){return this.#e}},tr=class{static{n(this,"AliasedJSONPathBuilder")}#e;#t;constructor(e,r){this.#e=e,this.#t=r}get expression(){return this.#e}get alias(){return this.#t}toOperationNode(){return b.create(this.#e.toOperationNode(),y(this.#t)?this.#t.toOperationNode():u.create(this.#t))}};var rr=i({is(t){return t.kind==="TupleNode"},create(t){return i({kind:"TupleNode",values:i(t)})}});var Si=["varchar","char","text","integer","int2","int4","int8","smallint","bigint","boolean","real","double precision","float4","float8","decimal","numeric","binary","bytea","date","datetime","time","timetz","timestamp","timestamptz","serial","bigserial","uuid","json","jsonb","blob","varbinary","int4range","int4multirange","int8range","int8multirange","numrange","nummultirange","tsrange","tsmultirange","tstzrange","tstzmultirange","daterange","datemultirange"],Ci=[/^varchar\(\d+\)$/,/^char\(\d+\)$/,/^decimal\(\d+, \d+\)$/,/^numeric\(\d+, \d+\)$/,/^binary\(\d+\)$/,/^datetime\(\d+\)$/,/^time\(\d+\)$/,/^timetz\(\d+\)$/,/^timestamp\(\d+\)$/,/^timestamptz\(\d+\)$/,/^varbinary\(\d+\)$/],$r=i({is(t){return t.kind==="DataTypeNode"},create(t){return i({kind:"DataTypeNode",dataType:t})}});function Gr(t){return!!(Si.includes(t)||Ci.some(e=>e.test(t)))}n(Gr,"isColumnDataType");function jr(t){if(y(t))return t.toOperationNode();if(Gr(t))return $r.create(t);throw new Error(`invalid column data type ${JSON.stringify(t)}`)}n(jr,"parseDataTypeExpression");var Kr=i({is(t){return t.kind==="CastNode"},create(t,e){return i({kind:"CastNode",expression:t,dataType:e})}});function wt(t=ue){function e(s,h,A){return new p(Ye(s,h,A))}n(e,"binary");function r(s,h){return new p(Jr(s,h))}n(r,"unary");let o=Object.assign(e,{fn:void 0,eb:void 0,selectFrom(s){return Ue({queryId:O(),executor:t,queryNode:m.createFrom(G(s))})},case(s){return new xt({node:H.create(U(s)?void 0:C(s))})},ref(s,h){return U(h)?new p($(s)):new Le(Hr(s,h))},jsonPath(){return new Le(ce.create())},table(s){return new p(x(s))},val(s){return new p(c(s))},refTuple(...s){return new p(rr.create(s.map(C)))},tuple(...s){return new p(rr.create(s.map(c)))},lit(s){return new p(De(s))},unary:r,not(s){return r("not",s)},exists(s){return r("exists",s)},neg(s){return r("-",s)},between(s,h,A){return new p(ae.create(C(s),D.create("between"),L.create(c(h),c(A))))},betweenSymmetric(s,h,A){return new p(ae.create(C(s),D.create("between symmetric"),L.create(c(h),c(A))))},and(s){return E(s)?new p(be(s,"and")):new p(Et(s,"and"))},or(s){return E(s)?new p(be(s,"or")):new p(Et(s,"or"))},parens(...s){let h=N(s);return q.is(h)?new p(h):new p(q.create(h))},cast(s,h){return new p(Kr.create(C(s),jr(h)))},withSchema(s){return wt(t.withPluginAtFront(new Ee(s)))}});return o.fn=Vr(),o.eb=o,o}n(wt,"createExpressionBuilder");function j(t){return wt()}n(j,"expressionBuilder");function Z(t){if(y(t))return t.toOperationNode();if(v(t))return t(j()).toOperationNode();throw new Error(`invalid expression: ${JSON.stringify(t)}`)}n(Z,"parseExpression");function rt(t){if(y(t))return t.toOperationNode();if(v(t))return t(j()).toOperationNode();throw new Error(`invalid aliased expression: ${JSON.stringify(t)}`)}n(rt,"parseAliasedExpression");function re(t){return $e(t)||or(t)||v(t)}n(re,"isExpressionOrFactory");function Dt(t){return l(t)?$(t):t.toOperationNode()}n(Dt,"parseSimpleReferenceExpression");function ne(t){return E(t)?t.map(e=>C(e)):[C(t)]}n(ne,"parseReferenceExpressionOrList");function C(t){return re(t)?Z(t):Dt(t)}n(C,"parseReferenceExpression");function Hr(t,e){let r=$(t);if(Ct(e))return Ae.create(r,gt.create(D.create(e)));let o=e.slice(0,-1);if(Ct(o))return Ae.create(r,ce.create(D.create(o)));throw new Error(`Invalid JSON operator: ${e}`)}n(Hr,"parseJSONReference");function $(t){if(!t.includes("."))return ve.create(T.create(t));let r=t.split(".").map(ir);if(r.length===3)return Ei(r);if(r.length===2)return Ti(r);throw new Error(`invalid column reference ${t}`)}n($,"parseStringReference");function br(t){let e=" as ";if(t.includes(e)){let[r,o]=t.split(e).map(ir);return b.create($(r),u.create(o))}else return $(t)}n(br,"parseAliasedStringReference");function ki(t){return T.create(t)}n(ki,"parseColumnName");function il(t){if(t.includes(" ")){let[r,o]=t.split(" ").map(ir);if(!Mt(o))throw new Error(`invalid order direction "${o}" next to "${r}"`);return F([r,o])[0]}else return ki(t)}n(il,"parseOrderedColumnName");function Ei(t){let[e,r,o]=t;return ve.create(T.create(o),I.createWithSchema(e,r))}n(Ei,"parseStringReferenceWithTableAndSchema");function Ti(t){let[e,r]=t;return ve.create(T.create(r),I.create(e))}n(Ti,"parseStringReferenceWithTable");function ir(t){return t.trim()}n(ir,"trim");var Ri=class bt{static{n(this,"RawBuilderImpl")}#e;constructor(e){this.#e=i(e)}get expressionType(){}get isRawBuilder(){return!0}as(e){return new Ai(this,e)}$castTo(){return new bt({...this.#e})}$notNull(){return new bt(this.#e)}withPlugin(e){return new bt({...this.#e,plugins:this.#e.plugins!==void 0?i([...this.#e.plugins,e]):i([e])})}toOperationNode(){return this.#r(this.#t())}compile(e){return this.#n(this.#t(e))}async execute(e){let r=this.#t(e);return r.executeQuery(this.#n(r))}#t(e){let r=e!==void 0?e.getExecutor():ue;return this.#e.plugins!==void 0?r.withPlugins(this.#e.plugins):r}#r(e){return e.transformQuery(this.#e.rawNode,this.#e.queryId)}#n(e){return e.compileQuery(this.#r(e),this.#e.queryId)}};function oe(t){return new Ri(t)}n(oe,"createRawBuilder");var Ai=class{static{n(this,"AliasedRawBuilderImpl")}#e;#t;constructor(e,r){this.#e=e,this.#t=r}get expression(){return this.#e}get alias(){return this.#t}get rawBuilder(){return this.#e}toOperationNode(){return b.create(this.#e.toOperationNode(),y(this.#t)?this.#t.toOperationNode():u.create(this.#t))}};var Li=Object.assign((t,...e)=>oe({queryId:O(),rawNode:f.create(t,e?.map(Yr)??[])}),{ref(t){return oe({queryId:O(),rawNode:f.createWithChild($(t))})},val(t){return oe({queryId:O(),rawNode:f.createWithChild(c(t))})},value(t){return this.val(t)},table(t){return oe({queryId:O(),rawNode:f.createWithChild(x(t))})},id(...t){let e=new Array(t.length+1).fill(".");return e[0]="",e[e.length-1]="",oe({queryId:O(),rawNode:f.create(e,t.map(u.create))})},lit(t){return oe({queryId:O(),rawNode:f.createWithChild(B.createImmediate(t))})},literal(t){return this.lit(t)},raw(t){return oe({queryId:O(),rawNode:f.createWithSql(t)})},join(t,e=Li`, `){let r=new Array(Math.max(2*t.length-1,0)),o=e.toOperationNode();for(let s=0;s<t.length;++s)r[2*s]=Yr(t[s]),s!==t.length-1&&(r[2*s+1]=o);return oe({queryId:O(),rawNode:f.createWithChildren(r)})}});function Yr(t){return y(t)?t.toOperationNode():c(t)}n(Yr,"parseParameter");var Cl=["preserve rows","delete rows","drop"],Xr=i({is(t){return t.kind==="CreateTableNode"},create(t){return i({kind:"CreateTableNode",table:t,columns:i([])})},cloneWithColumn(t,e){return i({...t,columns:i([...t.columns,e])})},cloneWithConstraint(t,e){return i({...t,constraints:t.constraints?i([...t.constraints,e]):i([e])})},cloneWithFrontModifier(t,e){return i({...t,frontModifiers:t.frontModifiers?i([...t.frontModifiers,e]):i([e])})},cloneWithEndModifier(t,e){return i({...t,endModifiers:t.endModifiers?i([...t.endModifiers,e]):i([e])})},cloneWith(t,e){return i({...t,...e})}});var Wt=class{static{n(this,"OperationNodeVisitor")}nodeStack=[];get parentNode(){return this.nodeStack[this.nodeStack.length-2]}#e=i({AliasNode:this.visitAlias.bind(this),ColumnNode:this.visitColumn.bind(this),IdentifierNode:this.visitIdentifier.bind(this),SchemableIdentifierNode:this.visitSchemableIdentifier.bind(this),RawNode:this.visitRaw.bind(this),ReferenceNode:this.visitReference.bind(this),SelectQueryNode:this.visitSelectQuery.bind(this),SelectionNode:this.visitSelection.bind(this),TableNode:this.visitTable.bind(this),FromNode:this.visitFrom.bind(this),SelectAllNode:this.visitSelectAll.bind(this),AndNode:this.visitAnd.bind(this),OrNode:this.visitOr.bind(this),ValueNode:this.visitValue.bind(this),ValueListNode:this.visitValueList.bind(this),PrimitiveValueListNode:this.visitPrimitiveValueList.bind(this),ParensNode:this.visitParens.bind(this),JoinNode:this.visitJoin.bind(this),OperatorNode:this.visitOperator.bind(this),WhereNode:this.visitWhere.bind(this),InsertQueryNode:this.visitInsertQuery.bind(this),DeleteQueryNode:this.visitDeleteQuery.bind(this),ReturningNode:this.visitReturning.bind(this),CreateTableNode:this.visitCreateTable.bind(this),AddColumnNode:this.visitAddColumn.bind(this),ColumnDefinitionNode:this.visitColumnDefinition.bind(this),DropTableNode:this.visitDropTable.bind(this),DataTypeNode:this.visitDataType.bind(this),OrderByNode:this.visitOrderBy.bind(this),OrderByItemNode:this.visitOrderByItem.bind(this),GroupByNode:this.visitGroupBy.bind(this),GroupByItemNode:this.visitGroupByItem.bind(this),UpdateQueryNode:this.visitUpdateQuery.bind(this),ColumnUpdateNode:this.visitColumnUpdate.bind(this),LimitNode:this.visitLimit.bind(this),OffsetNode:this.visitOffset.bind(this),OnConflictNode:this.visitOnConflict.bind(this),OnDuplicateKeyNode:this.visitOnDuplicateKey.bind(this),CreateIndexNode:this.visitCreateIndex.bind(this),DropIndexNode:this.visitDropIndex.bind(this),ListNode:this.visitList.bind(this),PrimaryKeyConstraintNode:this.visitPrimaryKeyConstraint.bind(this),UniqueConstraintNode:this.visitUniqueConstraint.bind(this),ReferencesNode:this.visitReferences.bind(this),CheckConstraintNode:this.visitCheckConstraint.bind(this),WithNode:this.visitWith.bind(this),CommonTableExpressionNode:this.visitCommonTableExpression.bind(this),CommonTableExpressionNameNode:this.visitCommonTableExpressionName.bind(this),HavingNode:this.visitHaving.bind(this),CreateSchemaNode:this.visitCreateSchema.bind(this),DropSchemaNode:this.visitDropSchema.bind(this),AlterTableNode:this.visitAlterTable.bind(this),DropColumnNode:this.visitDropColumn.bind(this),RenameColumnNode:this.visitRenameColumn.bind(this),AlterColumnNode:this.visitAlterColumn.bind(this),ModifyColumnNode:this.visitModifyColumn.bind(this),AddConstraintNode:this.visitAddConstraint.bind(this),DropConstraintNode:this.visitDropConstraint.bind(this),RenameConstraintNode:this.visitRenameConstraint.bind(this),ForeignKeyConstraintNode:this.visitForeignKeyConstraint.bind(this),CreateViewNode:this.visitCreateView.bind(this),RefreshMaterializedViewNode:this.visitRefreshMaterializedView.bind(this),DropViewNode:this.visitDropView.bind(this),GeneratedNode:this.visitGenerated.bind(this),DefaultValueNode:this.visitDefaultValue.bind(this),OnNode:this.visitOn.bind(this),ValuesNode:this.visitValues.bind(this),SelectModifierNode:this.visitSelectModifier.bind(this),CreateTypeNode:this.visitCreateType.bind(this),DropTypeNode:this.visitDropType.bind(this),ExplainNode:this.visitExplain.bind(this),DefaultInsertValueNode:this.visitDefaultInsertValue.bind(this),AggregateFunctionNode:this.visitAggregateFunction.bind(this),OverNode:this.visitOver.bind(this),PartitionByNode:this.visitPartitionBy.bind(this),PartitionByItemNode:this.visitPartitionByItem.bind(this),SetOperationNode:this.visitSetOperation.bind(this),BinaryOperationNode:this.visitBinaryOperation.bind(this),UnaryOperationNode:this.visitUnaryOperation.bind(this),UsingNode:this.visitUsing.bind(this),FunctionNode:this.visitFunction.bind(this),CaseNode:this.visitCase.bind(this),WhenNode:this.visitWhen.bind(this),JSONReferenceNode:this.visitJSONReference.bind(this),JSONPathNode:this.visitJSONPath.bind(this),JSONPathLegNode:this.visitJSONPathLeg.bind(this),JSONOperatorChainNode:this.visitJSONOperatorChain.bind(this),TupleNode:this.visitTuple.bind(this),MergeQueryNode:this.visitMergeQuery.bind(this),MatchedNode:this.visitMatched.bind(this),AddIndexNode:this.visitAddIndex.bind(this),CastNode:this.visitCast.bind(this),FetchNode:this.visitFetch.bind(this),TopNode:this.visitTop.bind(this),OutputNode:this.visitOutput.bind(this),OrActionNode:this.visitOrAction.bind(this),CollateNode:this.visitCollate.bind(this)});visitNode=n(e=>{this.nodeStack.push(e),this.#e[e.kind](e),this.nodeStack.pop()},"visitNode")};var Zr=i({is(t){return t.kind==="CreateViewNode"},create(t){return i({kind:"CreateViewNode",name:le.create(t)})},cloneWith(t,e){return i({...t,...e})}});var Bi=/'/g,_r=class extends Wt{static{n(this,"DefaultQueryCompiler")}#e="";#t=[];get numParameters(){return this.#t.length}compileQuery(e,r){return this.#e="",this.#t=[],this.nodeStack.splice(0,this.nodeStack.length),this.visitNode(e),i({query:e,queryId:r,sql:this.getSql(),parameters:[...this.#t]})}getSql(){return this.#e}visitSelectQuery(e){let r=this.parentNode!==void 0&&!q.is(this.parentNode)&&!w.is(this.parentNode)&&!Xr.is(this.parentNode)&&!Zr.is(this.parentNode)&&!yt.is(this.parentNode);this.parentNode===void 0&&e.explain&&(this.visitNode(e.explain),this.append(" ")),r&&this.append("("),e.with&&(this.visitNode(e.with),this.append(" ")),this.append("select"),e.distinctOn&&(this.append(" "),this.compileDistinctOn(e.distinctOn)),e.frontModifiers?.length&&(this.append(" "),this.compileList(e.frontModifiers," ")),e.top&&(this.append(" "),this.visitNode(e.top)),e.selections&&(this.append(" "),this.compileList(e.selections)),e.from&&(this.append(" "),this.visitNode(e.from)),e.joins&&(this.append(" "),this.compileList(e.joins," ")),e.where&&(this.append(" "),this.visitNode(e.where)),e.groupBy&&(this.append(" "),this.visitNode(e.groupBy)),e.having&&(this.append(" "),this.visitNode(e.having)),e.setOperations&&(this.append(" "),this.compileList(e.setOperations," ")),e.orderBy&&(this.append(" "),this.visitNode(e.orderBy)),e.limit&&(this.append(" "),this.visitNode(e.limit)),e.offset&&(this.append(" "),this.visitNode(e.offset)),e.fetch&&(this.append(" "),this.visitNode(e.fetch)),e.endModifiers?.length&&(this.append(" "),this.compileList(this.sortSelectModifiers([...e.endModifiers])," ")),r&&this.append(")")}visitFrom(e){this.append("from "),this.compileList(e.froms)}visitSelection(e){this.visitNode(e.selection)}visitColumn(e){this.visitNode(e.column)}compileDistinctOn(e){this.append("distinct on ("),this.compileList(e),this.append(")")}compileList(e,r=", "){let o=e.length-1;for(let s=0;s<=o;s++)this.visitNode(e[s]),s<o&&this.append(r)}visitWhere(e){this.append("where "),this.visitNode(e.where)}visitHaving(e){this.append("having "),this.visitNode(e.having)}visitInsertQuery(e){let r=this.parentNode!==void 0&&!q.is(this.parentNode)&&!f.is(this.parentNode)&&!P.is(this.parentNode);this.parentNode===void 0&&e.explain&&(this.visitNode(e.explain),this.append(" ")),r&&this.append("("),e.with&&(this.visitNode(e.with),this.append(" ")),this.append(e.replace?"replace":"insert"),e.ignore&&(he("`InsertQueryNode.ignore` is deprecated. Use `InsertQueryNode.orAction` instead."),this.append(" ignore")),e.orAction&&(this.append(" "),this.visitNode(e.orAction)),e.top&&(this.append(" "),this.visitNode(e.top)),e.into&&(this.append(" into "),this.visitNode(e.into)),e.columns&&(this.append(" ("),this.compileList(e.columns),this.append(")")),e.output&&(this.append(" "),this.visitNode(e.output)),e.values&&(this.append(" "),this.visitNode(e.values)),e.defaultValues&&(this.append(" "),this.append("default values")),e.onConflict&&(this.append(" "),this.visitNode(e.onConflict)),e.onDuplicateKey&&(this.append(" "),this.visitNode(e.onDuplicateKey)),e.returning&&(this.append(" "),this.visitNode(e.returning)),r&&this.append(")"),e.endModifiers?.length&&(this.append(" "),this.compileList(e.endModifiers," "))}visitValues(e){this.append("values "),this.compileList(e.values)}visitDeleteQuery(e){let r=this.parentNode!==void 0&&!q.is(this.parentNode)&&!f.is(this.parentNode);this.parentNode===void 0&&e.explain&&(this.visitNode(e.explain),this.append(" ")),r&&this.append("("),e.with&&(this.visitNode(e.with),this.append(" ")),this.append("delete "),e.top&&(this.visitNode(e.top),this.append(" ")),this.visitNode(e.from),e.output&&(this.append(" "),this.visitNode(e.output)),e.using&&(this.append(" "),this.visitNode(e.using)),e.joins&&(this.append(" "),this.compileList(e.joins," ")),e.where&&(this.append(" "),this.visitNode(e.where)),e.orderBy&&(this.append(" "),this.visitNode(e.orderBy)),e.limit&&(this.append(" "),this.visitNode(e.limit)),e.returning&&(this.append(" "),this.visitNode(e.returning)),r&&this.append(")"),e.endModifiers?.length&&(this.append(" "),this.compileList(e.endModifiers," "))}visitReturning(e){this.append("returning "),this.compileList(e.selections)}visitAlias(e){this.visitNode(e.node),this.append(" as "),this.visitNode(e.alias)}visitReference(e){e.table&&(this.visitNode(e.table),this.append(".")),this.visitNode(e.column)}visitSelectAll(e){this.append("*")}visitIdentifier(e){this.append(this.getLeftIdentifierWrapper()),this.compileUnwrappedIdentifier(e),this.append(this.getRightIdentifierWrapper())}compileUnwrappedIdentifier(e){if(!l(e.name))throw new Error("a non-string identifier was passed to compileUnwrappedIdentifier.");this.append(this.sanitizeIdentifier(e.name))}visitAnd(e){this.visitNode(e.left),this.append(" and "),this.visitNode(e.right)}visitOr(e){this.visitNode(e.left),this.append(" or "),this.visitNode(e.right)}visitValue(e){e.immediate?this.appendImmediateValue(e.value):this.appendValue(e.value)}visitValueList(e){this.append("("),this.compileList(e.values),this.append(")")}visitTuple(e){this.append("("),this.compileList(e.values),this.append(")")}visitPrimitiveValueList(e){this.append("(");let{values:r}=e;for(let o=0;o<r.length;++o)this.appendValue(r[o]),o!==r.length-1&&this.append(", ");this.append(")")}visitParens(e){this.append("("),this.visitNode(e.node),this.append(")")}visitJoin(e){this.append(Di[e.joinType]),this.append(" "),this.visitNode(e.table),e.on&&(this.append(" "),this.visitNode(e.on))}visitOn(e){this.append("on "),this.visitNode(e.on)}visitRaw(e){let{sqlFragments:r,parameters:o}=e;for(let s=0;s<r.length;++s)this.append(r[s]),o.length>s&&this.visitNode(o[s])}visitOperator(e){this.append(e.operator)}visitTable(e){this.visitNode(e.table)}visitSchemableIdentifier(e){e.schema&&(this.visitNode(e.schema),this.append(".")),this.visitNode(e.identifier)}visitCreateTable(e){this.append("create "),e.frontModifiers&&e.frontModifiers.length>0&&(this.compileList(e.frontModifiers," "),this.append(" ")),e.temporary&&this.append("temporary "),this.append("table "),e.ifNotExists&&this.append("if not exists "),this.visitNode(e.table),e.selectQuery?(this.append(" as "),this.visitNode(e.selectQuery)):(this.append(" ("),this.compileList([...e.columns,...e.constraints??[]]),this.append(")"),e.onCommit&&(this.append(" on commit "),this.append(e.onCommit)),e.endModifiers&&e.endModifiers.length>0&&(this.append(" "),this.compileList(e.endModifiers," ")))}visitColumnDefinition(e){e.ifNotExists&&this.append("if not exists "),this.visitNode(e.column),this.append(" "),this.visitNode(e.dataType),e.unsigned&&this.append(" unsigned"),e.frontModifiers&&e.frontModifiers.length>0&&(this.append(" "),this.compileList(e.frontModifiers," ")),e.generated&&(this.append(" "),this.visitNode(e.generated)),e.identity&&this.append(" identity"),e.defaultTo&&(this.append(" "),this.visitNode(e.defaultTo)),e.notNull&&this.append(" not null"),e.unique&&this.append(" unique"),e.nullsNotDistinct&&this.append(" nulls not distinct"),e.primaryKey&&this.append(" primary key"),e.autoIncrement&&(this.append(" "),this.append(this.getAutoIncrement())),e.references&&(this.append(" "),this.visitNode(e.references)),e.check&&(this.append(" "),this.visitNode(e.check)),e.endModifiers&&e.endModifiers.length>0&&(this.append(" "),this.compileList(e.endModifiers," "))}getAutoIncrement(){return"auto_increment"}visitReferences(e){this.append("references "),this.visitNode(e.table),this.append(" ("),this.compileList(e.columns),this.append(")"),e.onDelete&&(this.append(" on delete "),this.append(e.onDelete)),e.onUpdate&&(this.append(" on update "),this.append(e.onUpdate))}visitDropTable(e){this.append("drop table "),e.ifExists&&this.append("if exists "),this.visitNode(e.table),e.cascade&&this.append(" cascade")}visitDataType(e){this.append(e.dataType)}visitOrderBy(e){this.append("order by "),this.compileList(e.items)}visitOrderByItem(e){this.visitNode(e.orderBy),e.collation&&(this.append(" "),this.visitNode(e.collation)),e.direction&&(this.append(" "),this.visitNode(e.direction)),e.nulls&&(this.append(" nulls "),this.append(e.nulls))}visitGroupBy(e){this.append("group by "),this.compileList(e.items)}visitGroupByItem(e){this.visitNode(e.groupBy)}visitUpdateQuery(e){let r=this.parentNode!==void 0&&!q.is(this.parentNode)&&!f.is(this.parentNode)&&!P.is(this.parentNode);if(this.parentNode===void 0&&e.explain&&(this.visitNode(e.explain),this.append(" ")),r&&this.append("("),e.with&&(this.visitNode(e.with),this.append(" ")),this.append("update "),e.top&&(this.visitNode(e.top),this.append(" ")),e.table&&(this.visitNode(e.table),this.append(" ")),this.append("set "),e.updates&&this.compileList(e.updates),e.output&&(this.append(" "),this.visitNode(e.output)),e.from&&(this.append(" "),this.visitNode(e.from)),e.joins){if(!e.from)throw new Error("Joins in an update query are only supported as a part of a PostgreSQL 'update set from join' query. If you want to create a MySQL 'update join set' query, see https://kysely.dev/docs/examples/update/my-sql-joins");this.append(" "),this.compileList(e.joins," ")}e.where&&(this.append(" "),this.visitNode(e.where)),e.orderBy&&(this.append(" "),this.visitNode(e.orderBy)),e.limit&&(this.append(" "),this.visitNode(e.limit)),e.returning&&(this.append(" "),this.visitNode(e.returning)),r&&this.append(")"),e.endModifiers?.length&&(this.append(" "),this.compileList(e.endModifiers," "))}visitColumnUpdate(e){this.visitNode(e.column),this.append(" = "),this.visitNode(e.value)}visitLimit(e){this.append("limit "),this.visitNode(e.limit)}visitOffset(e){this.append("offset "),this.visitNode(e.offset)}visitOnConflict(e){this.append("on conflict"),e.columns?(this.append(" ("),this.compileList(e.columns),this.append(")")):e.constraint?(this.append(" on constraint "),this.visitNode(e.constraint)):e.indexExpression&&(this.append(" ("),this.visitNode(e.indexExpression),this.append(")")),e.indexWhere&&(this.append(" "),this.visitNode(e.indexWhere)),e.doNothing===!0?this.append(" do nothing"):e.updates&&(this.append(" do update set "),this.compileList(e.updates),e.updateWhere&&(this.append(" "),this.visitNode(e.updateWhere)))}visitOnDuplicateKey(e){this.append("on duplicate key update "),this.compileList(e.updates)}visitCreateIndex(e){this.append("create "),e.unique&&this.append("unique "),this.append("index "),e.ifNotExists&&this.append("if not exists "),this.visitNode(e.name),e.table&&(this.append(" on "),this.visitNode(e.table)),e.using&&(this.append(" using "),this.visitNode(e.using)),e.columns&&(this.append(" ("),this.compileList(e.columns),this.append(")")),e.nullsNotDistinct&&this.append(" nulls not distinct"),e.where&&(this.append(" "),this.visitNode(e.where))}visitDropIndex(e){this.append("drop index "),e.ifExists&&this.append("if exists "),this.visitNode(e.name),e.table&&(this.append(" on "),this.visitNode(e.table)),e.cascade&&this.append(" cascade")}visitCreateSchema(e){this.append("create schema "),e.ifNotExists&&this.append("if not exists "),this.visitNode(e.schema)}visitDropSchema(e){this.append("drop schema "),e.ifExists&&this.append("if exists "),this.visitNode(e.schema),e.cascade&&this.append(" cascade")}visitPrimaryKeyConstraint(e){e.name&&(this.append("constraint "),this.visitNode(e.name),this.append(" ")),this.append("primary key ("),this.compileList(e.columns),this.append(")"),this.buildDeferrable(e)}buildDeferrable(e){e.deferrable!==void 0&&(e.deferrable?this.append(" deferrable"):this.append(" not deferrable")),e.initiallyDeferred!==void 0&&(e.initiallyDeferred?this.append(" initially deferred"):this.append(" initially immediate"))}visitUniqueConstraint(e){e.name&&(this.append("constraint "),this.visitNode(e.name),this.append(" ")),this.append("unique"),e.nullsNotDistinct&&this.append(" nulls not distinct"),this.append(" ("),this.compileList(e.columns),this.append(")"),this.buildDeferrable(e)}visitCheckConstraint(e){e.name&&(this.append("constraint "),this.visitNode(e.name),this.append(" ")),this.append("check ("),this.visitNode(e.expression),this.append(")")}visitForeignKeyConstraint(e){e.name&&(this.append("constraint "),this.visitNode(e.name),this.append(" ")),this.append("foreign key ("),this.compileList(e.columns),this.append(") "),this.visitNode(e.references),e.onDelete&&(this.append(" on delete "),this.append(e.onDelete)),e.onUpdate&&(this.append(" on update "),this.append(e.onUpdate)),this.buildDeferrable(e)}visitList(e){this.compileList(e.items)}visitWith(e){this.append("with "),e.recursive&&this.append("recursive "),this.compileList(e.expressions)}visitCommonTableExpression(e){this.visitNode(e.name),this.append(" as "),fe(e.materialized)&&(e.materialized||this.append("not "),this.append("materialized ")),this.visitNode(e.expression)}visitCommonTableExpressionName(e){this.visitNode(e.table),e.columns&&(this.append("("),this.compileList(e.columns),this.append(")"))}visitAlterTable(e){this.append("alter table "),this.visitNode(e.table),this.append(" "),e.renameTo&&(this.append("rename to "),this.visitNode(e.renameTo)),e.setSchema&&(this.append("set schema "),this.visitNode(e.setSchema)),e.addConstraint&&this.visitNode(e.addConstraint),e.dropConstraint&&this.visitNode(e.dropConstraint),e.renameConstraint&&this.visitNode(e.renameConstraint),e.columnAlterations&&this.compileColumnAlterations(e.columnAlterations),e.addIndex&&this.visitNode(e.addIndex),e.dropIndex&&this.visitNode(e.dropIndex)}visitAddColumn(e){this.append("add column "),this.visitNode(e.column)}visitRenameColumn(e){this.append("rename column "),this.visitNode(e.column),this.append(" to "),this.visitNode(e.renameTo)}visitDropColumn(e){this.append("drop column "),this.visitNode(e.column)}visitAlterColumn(e){this.append("alter column "),this.visitNode(e.column),this.append(" "),e.dataType&&(this.announcesNewColumnDataType()&&this.append("type "),this.visitNode(e.dataType),e.dataTypeExpression&&(this.append("using "),this.visitNode(e.dataTypeExpression))),e.setDefault&&(this.append("set default "),this.visitNode(e.setDefault)),e.dropDefault&&this.append("drop default"),e.setNotNull&&this.append("set not null"),e.dropNotNull&&this.append("drop not null")}visitModifyColumn(e){this.append("modify column "),this.visitNode(e.column)}visitAddConstraint(e){this.append("add "),this.visitNode(e.constraint)}visitDropConstraint(e){this.append("drop constraint "),e.ifExists&&this.append("if exists "),this.visitNode(e.constraintName),e.modifier==="cascade"?this.append(" cascade"):e.modifier==="restrict"&&this.append(" restrict")}visitRenameConstraint(e){this.append("rename constraint "),this.visitNode(e.oldName),this.append(" to "),this.visitNode(e.newName)}visitSetOperation(e){this.append(e.operator),this.append(" "),e.all&&this.append("all "),this.visitNode(e.expression)}visitCreateView(e){this.append("create "),e.orReplace&&this.append("or replace "),e.materialized&&this.append("materialized "),e.temporary&&this.append("temporary "),this.append("view "),e.ifNotExists&&this.append("if not exists "),this.visitNode(e.name),this.append(" "),e.columns&&(this.append("("),this.compileList(e.columns),this.append(") ")),e.as&&(this.append("as "),this.visitNode(e.as))}visitRefreshMaterializedView(e){this.append("refresh materialized view "),e.concurrently&&this.append("concurrently "),this.visitNode(e.name),e.withNoData?this.append(" with no data"):this.append(" with data")}visitDropView(e){this.append("drop "),e.materialized&&this.append("materialized "),this.append("view "),e.ifExists&&this.append("if exists "),this.visitNode(e.name),e.cascade&&this.append(" cascade")}visitGenerated(e){this.append("generated "),e.always&&this.append("always "),e.byDefault&&this.append("by default "),this.append("as "),e.identity&&this.append("identity"),e.expression&&(this.append("("),this.visitNode(e.expression),this.append(")")),e.stored&&this.append(" stored")}visitDefaultValue(e){this.append("default "),this.visitNode(e.defaultValue)}visitSelectModifier(e){e.rawModifier?this.visitNode(e.rawModifier):this.append(Ii[e.modifier]),e.of&&(this.append(" of "),this.compileList(e.of,", "))}visitCreateType(e){this.append("create type "),this.visitNode(e.name),e.enum&&(this.append(" as enum "),this.visitNode(e.enum))}visitDropType(e){this.append("drop type "),e.ifExists&&this.append("if exists "),this.visitNode(e.name)}visitExplain(e){this.append("explain"),(e.options||e.format)&&(this.append(" "),this.append(this.getLeftExplainOptionsWrapper()),e.options&&(this.visitNode(e.options),e.format&&this.append(this.getExplainOptionsDelimiter())),e.format&&(this.append("format"),this.append(this.getExplainOptionAssignment()),this.append(e.format)),this.append(this.getRightExplainOptionsWrapper()))}visitDefaultInsertValue(e){this.append("default")}visitAggregateFunction(e){this.append(e.func),this.append("("),e.distinct&&this.append("distinct "),this.compileList(e.aggregated),e.orderBy&&(this.append(" "),this.visitNode(e.orderBy)),this.append(")"),e.withinGroup&&(this.append(" within group ("),this.visitNode(e.withinGroup),this.append(")")),e.filter&&(this.append(" filter("),this.visitNode(e.filter),this.append(")")),e.over&&(this.append(" "),this.visitNode(e.over))}visitOver(e){this.append("over("),e.partitionBy&&(this.visitNode(e.partitionBy),e.orderBy&&this.append(" ")),e.orderBy&&this.visitNode(e.orderBy),this.append(")")}visitPartitionBy(e){this.append("partition by "),this.compileList(e.items)}visitPartitionByItem(e){this.visitNode(e.partitionBy)}visitBinaryOperation(e){this.visitNode(e.leftOperand),this.append(" "),this.visitNode(e.operator),this.append(" "),this.visitNode(e.rightOperand)}visitUnaryOperation(e){this.visitNode(e.operator),this.isMinusOperator(e.operator)||this.append(" "),this.visitNode(e.operand)}isMinusOperator(e){return D.is(e)&&e.operator==="-"}visitUsing(e){this.append("using "),this.compileList(e.tables)}visitFunction(e){this.append(e.func),this.append("("),this.compileList(e.arguments),this.append(")")}visitCase(e){this.append("case"),e.value&&(this.append(" "),this.visitNode(e.value)),e.when&&(this.append(" "),this.compileList(e.when," ")),e.else&&(this.append(" else "),this.visitNode(e.else)),this.append(" end"),e.isStatement&&this.append(" case")}visitWhen(e){this.append("when "),this.visitNode(e.condition),e.result&&(this.append(" then "),this.visitNode(e.result))}visitJSONReference(e){this.visitNode(e.reference),this.visitNode(e.traversal)}visitJSONPath(e){e.inOperator&&this.visitNode(e.inOperator),this.append("'$");for(let r of e.pathLegs)this.visitNode(r);this.append("'")}visitJSONPathLeg(e){let r=e.type==="ArrayLocation";this.append(r?"[":"."),this.append(String(e.value)),r&&this.append("]")}visitJSONOperatorChain(e){for(let r=0,o=e.values.length;r<o;r++)r===o-1?this.visitNode(e.operator):this.append("->"),this.visitNode(e.values[r])}visitMergeQuery(e){e.with&&(this.visitNode(e.with),this.append(" ")),this.append("merge "),e.top&&(this.visitNode(e.top),this.append(" ")),this.append("into "),this.visitNode(e.into),e.using&&(this.append(" "),this.visitNode(e.using)),e.whens&&(this.append(" "),this.compileList(e.whens," ")),e.returning&&(this.append(" "),this.visitNode(e.returning)),e.output&&(this.append(" "),this.visitNode(e.output)),e.endModifiers?.length&&(this.append(" "),this.compileList(e.endModifiers," "))}visitMatched(e){e.not&&this.append("not "),this.append("matched"),e.bySource&&this.append(" by source")}visitAddIndex(e){this.append("add "),e.unique&&this.append("unique "),this.append("index "),this.visitNode(e.name),e.columns&&(this.append(" ("),this.compileList(e.columns),this.append(")")),e.using&&(this.append(" using "),this.visitNode(e.using))}visitCast(e){this.append("cast("),this.visitNode(e.expression),this.append(" as "),this.visitNode(e.dataType),this.append(")")}visitFetch(e){this.append("fetch next "),this.visitNode(e.rowCount),this.append(` rows ${e.modifier}`)}visitOutput(e){this.append("output "),this.compileList(e.selections)}visitTop(e){this.append(`top(${e.expression})`),e.modifiers&&this.append(` ${e.modifiers}`)}visitOrAction(e){this.append(e.action)}visitCollate(e){this.append("collate "),this.visitNode(e.collation)}append(e){this.#e+=e}appendValue(e){this.addParameter(e),this.append(this.getCurrentParameterPlaceholder())}getLeftIdentifierWrapper(){return'"'}getRightIdentifierWrapper(){return'"'}getCurrentParameterPlaceholder(){return"$"+this.numParameters}getLeftExplainOptionsWrapper(){return"("}getExplainOptionAssignment(){return" "}getExplainOptionsDelimiter(){return", "}getRightExplainOptionsWrapper(){return")"}sanitizeIdentifier(e){let r=this.getLeftIdentifierWrapper(),o=this.getRightIdentifierWrapper(),s="";for(let h of e)s+=h,h===r?s+=r:h===o&&(s+=o);return s}sanitizeStringLiteral(e){return e.replace(Bi,"''")}addParameter(e){this.#t.push(e)}appendImmediateValue(e){if(l(e))this.appendStringLiteral(e);else if(se(e)||fe(e)||ge(e))this.append(e.toString());else if(Oe(e))this.append("null");else if(nr(e))this.appendImmediateValue(e.toISOString());else throw new Error(`invalid immediate value ${e}`)}appendStringLiteral(e){this.append("'"),this.append(this.sanitizeStringLiteral(e)),this.append("'")}sortSelectModifiers(e){return e.sort((r,o)=>r.modifier&&o.modifier?ei[r.modifier]-ei[o.modifier]:1),i(e)}compileColumnAlterations(e){this.compileList(e)}announcesNewColumnDataType(){return!0}},Ii=i({ForKeyShare:"for key share",ForNoKeyUpdate:"for no key update",ForUpdate:"for update",ForShare:"for share",NoWait:"nowait",SkipLocked:"skip locked",Distinct:"distinct"}),ei=i({ForKeyShare:1,ForNoKeyUpdate:1,ForUpdate:1,ForShare:1,NoWait:2,SkipLocked:2,Distinct:0}),Di=i({InnerJoin:"inner join",LeftJoin:"left join",RightJoin:"right join",FullJoin:"full join",CrossJoin:"cross join",LateralInnerJoin:"inner join lateral",LateralLeftJoin:"left join lateral",LateralCrossJoin:"cross join lateral",OuterApply:"outer apply",CrossApply:"cross apply",Using:"using"});var Yl=i({raw(t,e=[]){return i({sql:t,query:f.createWithSql(t),parameters:i(e),queryId:O()})}});var eN="kysely_migration",tN="kysely_migration_lock";var rN=i({__noMigrations__:!0});export{U as a,l as b,se as c,fe as d,Oe as e,nr as f,ge as g,qi as h,v as i,Y as j,i as k,Mi as l,u as m,Cl as n,Xr as o,le as p,y as q,T as r,Je as s,mr as t,f as u,he as v,$ as w,ki as x,il as y,Ke as z,B as A,N as B,a as C,m as D,Lr as E,O as F,pt as G,Ee as H,Qe as I,Ir as J,mt as K,Nt as L,Vr as M,H as N,xt as O,jr as P,Z as Q,wr as R,x as S,Zr as T,Li as U,_r as V,Yl as W,eN as X,tN as Y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i}from"./chunk-Y6DVQ7FD.js";var u=i((d,o)=>{for(let e of Object.keys(d)){let r=d[e],l=i(async function(c,s,n){let t=new r(c);if(typeof s=="function")this.send(t,s);else if(typeof n=="function"){if(typeof s!="object")throw new Error(`Expected http options but got ${typeof s}`);this.send(t,s||{},n)}else return this.send(t,s)},"methodImpl"),a=(e[0].toLowerCase()+e.slice(1)).replace(/Command$/,"");o.prototype[a]=l}},"createAggregatedClient");var w={name:"@aws-sdk/nested-clients",version:"3.929.0",description:"Nested clients for AWS SDK packages.",main:"./dist-cjs/index.js",module:"./dist-es/index.js",types:"./dist-types/index.d.ts",scripts:{build:"yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo",lint:"node ../../scripts/validation/submodules-linter.js --pkg nested-clients",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},engines:{node:">=18.0.0"},sideEffects:!1,author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.928.0","@aws-sdk/middleware-host-header":"3.922.0","@aws-sdk/middleware-logger":"3.922.0","@aws-sdk/middleware-recursion-detection":"3.922.0","@aws-sdk/middleware-user-agent":"3.928.0","@aws-sdk/region-config-resolver":"3.925.0","@aws-sdk/types":"3.922.0","@aws-sdk/util-endpoints":"3.922.0","@aws-sdk/util-user-agent-browser":"3.922.0","@aws-sdk/util-user-agent-node":"3.928.0","@smithy/config-resolver":"^4.4.2","@smithy/core":"^3.17.2","@smithy/fetch-http-handler":"^5.3.5","@smithy/hash-node":"^4.2.4","@smithy/invalid-dependency":"^4.2.4","@smithy/middleware-content-length":"^4.2.4","@smithy/middleware-endpoint":"^4.3.6","@smithy/middleware-retry":"^4.4.6","@smithy/middleware-serde":"^4.2.4","@smithy/middleware-stack":"^4.2.4","@smithy/node-config-provider":"^4.3.4","@smithy/node-http-handler":"^4.4.4","@smithy/protocol-http":"^5.3.4","@smithy/smithy-client":"^4.9.2","@smithy/types":"^4.8.1","@smithy/url-parser":"^4.2.4","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.5","@smithy/util-defaults-mode-node":"^4.2.8","@smithy/util-endpoints":"^3.2.4","@smithy/util-middleware":"^4.2.4","@smithy/util-retry":"^4.2.4","@smithy/util-utf8":"^4.2.0",tslib:"^2.6.2"},devDependencies:{concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.8.3"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],browser:{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"packages/nested-clients"},exports:{"./sso-oidc":{types:"./dist-types/submodules/sso-oidc/index.d.ts",module:"./dist-es/submodules/sso-oidc/index.js",node:"./dist-cjs/submodules/sso-oidc/index.js",import:"./dist-es/submodules/sso-oidc/index.js",require:"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{types:"./dist-types/submodules/sts/index.d.ts",module:"./dist-es/submodules/sts/index.js",node:"./dist-cjs/submodules/sts/index.js",import:"./dist-es/submodules/sts/index.js",require:"./dist-cjs/submodules/sts/index.js"}}};export{u as a,w as b};
|