gemi 0.13.2 → 0.13.3

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.
Files changed (87) hide show
  1. package/dist/app/index.js +2 -272
  2. package/dist/app/index.js.map +4 -6
  3. package/dist/app/prismaExtension.d.ts +1 -5
  4. package/dist/app/prismaExtension.d.ts.map +1 -1
  5. package/dist/broadcasting/index.js +1 -1
  6. package/dist/{chunk-qcr71k85.js → chunk-016fjpm4.js} +2 -2
  7. package/dist/{chunk-qcr71k85.js.map → chunk-016fjpm4.js.map} +1 -1
  8. package/dist/{chunk-6kfbsmxx.js → chunk-1715jezx.js} +2 -2
  9. package/dist/{chunk-6kfbsmxx.js.map → chunk-1715jezx.js.map} +1 -1
  10. package/dist/{chunk-svh4hjg3.js → chunk-1ambdj5q.js} +2 -2
  11. package/dist/{chunk-svh4hjg3.js.map → chunk-1ambdj5q.js.map} +1 -1
  12. package/dist/{chunk-jwebzy40.js → chunk-2jsyd1d9.js} +2 -2
  13. package/dist/{chunk-jwebzy40.js.map → chunk-2jsyd1d9.js.map} +1 -1
  14. package/dist/chunk-3yzmg8gh.js +4 -0
  15. package/dist/{chunk-wewz52mc.js.map → chunk-3yzmg8gh.js.map} +7 -4
  16. package/dist/{chunk-acfdk70y.js → chunk-4yh8p5h0.js} +3 -3
  17. package/dist/{chunk-acfdk70y.js.map → chunk-4yh8p5h0.js.map} +1 -1
  18. package/dist/{chunk-tyv9h73f.js → chunk-5h8f3p6p.js} +3 -3
  19. package/dist/{chunk-tyv9h73f.js.map → chunk-5h8f3p6p.js.map} +1 -1
  20. package/dist/{chunk-0vq2p4bq.js → chunk-8czq49sy.js} +2 -2
  21. package/dist/{chunk-0vq2p4bq.js.map → chunk-8czq49sy.js.map} +5 -5
  22. package/dist/{chunk-5q5qjyxf.js → chunk-946x83cd.js} +2 -2
  23. package/dist/{chunk-5q5qjyxf.js.map → chunk-946x83cd.js.map} +1 -1
  24. package/dist/{chunk-tw3t6x2n.js → chunk-9d8bt9fg.js} +3 -3
  25. package/dist/{chunk-tw3t6x2n.js.map → chunk-9d8bt9fg.js.map} +1 -1
  26. package/dist/{chunk-0mfpz0sr.js → chunk-9khdm7dc.js} +2 -2
  27. package/dist/{chunk-0mfpz0sr.js.map → chunk-9khdm7dc.js.map} +1 -1
  28. package/dist/{chunk-0wa1m3yq.js → chunk-9n24vx5g.js} +3 -3
  29. package/dist/{chunk-0wa1m3yq.js.map → chunk-9n24vx5g.js.map} +1 -1
  30. package/dist/{chunk-wbg45cdc.js → chunk-b1gefp3p.js} +2 -2
  31. package/dist/{chunk-wbg45cdc.js.map → chunk-b1gefp3p.js.map} +1 -1
  32. package/dist/{chunk-0wr6m6f4.js → chunk-b6bvweyq.js} +3 -3
  33. package/dist/{chunk-0wr6m6f4.js.map → chunk-b6bvweyq.js.map} +1 -1
  34. package/dist/{chunk-9aswnsye.js → chunk-cvxxee1w.js} +2 -2
  35. package/dist/{chunk-9aswnsye.js.map → chunk-cvxxee1w.js.map} +1 -1
  36. package/dist/{chunk-jn8jhrkd.js → chunk-f3t8bn6m.js} +2 -2
  37. package/dist/{chunk-jn8jhrkd.js.map → chunk-f3t8bn6m.js.map} +1 -1
  38. package/dist/{chunk-fe1gn043.js → chunk-fgafrjxy.js} +2 -2
  39. package/dist/{chunk-fe1gn043.js.map → chunk-fgafrjxy.js.map} +1 -1
  40. package/dist/{chunk-m2p40y0k.js → chunk-fkmp9894.js} +2 -2
  41. package/dist/{chunk-m2p40y0k.js.map → chunk-fkmp9894.js.map} +1 -1
  42. package/dist/{chunk-jxftkhsd.js → chunk-grzfxg62.js} +2 -2
  43. package/dist/{chunk-jxftkhsd.js.map → chunk-grzfxg62.js.map} +1 -1
  44. package/dist/{chunk-rre72epn.js → chunk-hh9hfct5.js} +3 -3
  45. package/dist/{chunk-rre72epn.js.map → chunk-hh9hfct5.js.map} +1 -1
  46. package/dist/{chunk-67ytmbmn.js → chunk-jme4caj2.js} +3 -3
  47. package/dist/{chunk-67ytmbmn.js.map → chunk-jme4caj2.js.map} +1 -1
  48. package/dist/chunk-ny36ys64.js +4 -0
  49. package/dist/{chunk-3q85w7aa.js.map → chunk-ny36ys64.js.map} +1 -1
  50. package/dist/chunk-p7s41mxq.js +4 -0
  51. package/dist/{chunk-6pwjkfk5.js.map → chunk-p7s41mxq.js.map} +1 -1
  52. package/dist/{chunk-4e18rqet.js → chunk-qrz4g7q0.js} +2 -2
  53. package/dist/{chunk-4e18rqet.js.map → chunk-qrz4g7q0.js.map} +1 -1
  54. package/dist/{chunk-cgh2sw3g.js → chunk-rwkjg2qn.js} +2 -2
  55. package/dist/{chunk-cgh2sw3g.js.map → chunk-rwkjg2qn.js.map} +1 -1
  56. package/dist/{chunk-68kvbrqd.js → chunk-thfv9s7s.js} +2 -2
  57. package/dist/{chunk-68kvbrqd.js.map → chunk-thfv9s7s.js.map} +1 -1
  58. package/dist/{chunk-95b1a8cw.js → chunk-ty7yh4d4.js} +2 -2
  59. package/dist/{chunk-95b1a8cw.js.map → chunk-ty7yh4d4.js.map} +1 -1
  60. package/dist/{chunk-nxrhps23.js → chunk-vjym5jdx.js} +2 -2
  61. package/dist/{chunk-nxrhps23.js.map → chunk-vjym5jdx.js.map} +1 -1
  62. package/dist/{chunk-pvxzx61f.js → chunk-wp91ggkr.js} +3 -3
  63. package/dist/{chunk-pvxzx61f.js.map → chunk-wp91ggkr.js.map} +1 -1
  64. package/dist/{chunk-3nzz6kqw.js → chunk-wxb0n2fp.js} +2 -2
  65. package/dist/{chunk-3nzz6kqw.js.map → chunk-wxb0n2fp.js.map} +1 -1
  66. package/dist/{chunk-6fy0y9na.js → chunk-y8ggk3r3.js} +2 -2
  67. package/dist/{chunk-6fy0y9na.js.map → chunk-y8ggk3r3.js.map} +1 -1
  68. package/dist/{chunk-yvrp97kk.js → chunk-zja5jcxt.js} +3 -3
  69. package/dist/{chunk-yvrp97kk.js.map → chunk-zja5jcxt.js.map} +1 -1
  70. package/dist/{chunk-00q77h4a.js → chunk-zt3j8zag.js} +2 -2
  71. package/dist/{chunk-00q77h4a.js.map → chunk-zt3j8zag.js.map} +1 -1
  72. package/dist/email/index.js +1 -1
  73. package/dist/facades/index.js +2 -2
  74. package/dist/facades/index.js.map +1 -1
  75. package/dist/http/index.js +2 -2
  76. package/dist/http/index.js.map +1 -1
  77. package/dist/i18n/index.js +1 -1
  78. package/dist/kernel/index.js +2 -2
  79. package/dist/kernel/index.js.map +1 -1
  80. package/dist/server/index.js +2 -2
  81. package/dist/server/index.js.map +1 -1
  82. package/dist/services/index.js +62 -73
  83. package/dist/services/index.js.map +5 -17
  84. package/package.json +3 -3
  85. package/dist/chunk-3q85w7aa.js +0 -4
  86. package/dist/chunk-6pwjkfk5.js +0 -4
  87. package/dist/chunk-wewz52mc.js +0 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemi",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "author": "Enes Tufekci <enes@gemijs.dev>",
5
5
  "license": "MIT",
6
6
  "devDependencies": {
@@ -59,8 +59,8 @@
59
59
  "history": "^5.3.0",
60
60
  "jsx-email": "2.0.0-rc2.1",
61
61
  "open": "^10.1.0",
62
- "react": "^19.0.0",
63
- "react-dom": "19.0.0",
62
+ "react": "19.1.0",
63
+ "react-dom": "19.1.0",
64
64
  "recast": "^0.23.9",
65
65
  "resend": "^3.4.0",
66
66
  "temporal-polyfill": "^0.2.5",
@@ -1,4 +0,0 @@
1
- class a{}
2
- export{a as vc};
3
-
4
- //# debugId=F1EDC798CFFDD65C64756E2164756E21
@@ -1,4 +0,0 @@
1
- import{xc as e}from"./chunk-nxrhps23.js";class r extends e{service;static _name="EmailServiceContainer";constructor(i){super();this.service=i}}
2
- export{r as T};
3
-
4
- //# debugId=A8B1A6039ED3DC5664756E2164756E21
@@ -1,3 +0,0 @@
1
- import{Ta as $,Ua as de}from"./chunk-0wr6m6f4.js";import{$a as Nt,Fb as At,Xa as m,Ya as he,_a as Te,cb as wt}from"./chunk-0wa1m3yq.js";import{Lb as M,Mb as _r,Nb as we,Qb as tr,Rb as Or}from"./chunk-acfdk70y.js";import{dc as ue}from"./chunk-cgh2sw3g.js";import{mc as Ut}from"./chunk-00q77h4a.js";import{oc as qt}from"./chunk-tyv9h73f.js";import{Bc as Yr,zc as E}from"./chunk-6fy0y9na.js";function qr(e){return e}var Lt=(e)=>(t)=>async(r)=>{if(!m.isInstance(r.request))return t(r);let{request:o}=r,{handlerProtocol:n=""}=e.requestHandler.metadata||{};if(n.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 s=o.hostname;if(o.port!=null)s+=`:${o.port}`;o.headers.host=s}return t(r)},Ft={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},Jr=(e)=>({applyToStack:(t)=>{t.add(Lt(e),Ft)}});var kt=()=>(e,t)=>async(r)=>{try{let o=await e(r),{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:p}=a,u=c??t.inputFilterSensitiveLog,_=p??t.outputFilterSensitiveLog,{$metadata:l,...d}=o.output;return i?.info?.({clientName:n,commandName:s,input:u(r.input),output:_(d),metadata:l}),o}catch(o){let{clientName:n,commandName:s,logger:i,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c}=a,p=c??t.inputFilterSensitiveLog;throw i?.error?.({clientName:n,commandName:s,input:p(r.input),error:o,metadata:o.$metadata}),o}},Gt={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},Kr=(e)=>({applyToStack:(t)=>{t.add(kt(),Gt)}});var re="X-Amzn-Trace-Id",Vt="AWS_LAMBDA_FUNCTION_NAME",Wt="_X_AMZN_TRACE_ID",Bt=(e)=>(t)=>async(r)=>{let{request:o}=r;if(!m.isInstance(o)||e.runtime!=="node")return t(r);let n=Object.keys(o.headers??{}).find((c)=>c.toLowerCase()===re.toLowerCase())??re;if(o.headers.hasOwnProperty(n))return t(r);let s=process.env[Vt],i=process.env[Wt],a=(c)=>typeof c==="string"&&c.length>0;if(a(s)&&a(i))o.headers[re]=i;return t({...r,request:o})},Yt={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},oo=(e)=>({applyToStack:(t)=>{t.add(Bt(e),Yt)}});var De=E(we(),1),oe=void 0;function jt(e){if(e===void 0)return!0;return typeof e==="string"&&e.length<=50}function so(e){let t=De.normalizeProvider(e.userAgentAppId??oe),{customUserAgent:r}=e;return Object.assign(e,{customUserAgent:typeof r==="string"?[[r]]:r,userAgentAppId:async()=>{let o=await t();if(!jt(o)){let n=e.logger?.constructor?.name==="NoOpLogger"||!e.logger?console:e.logger;if(typeof o!=="string")n?.warn("userAgentAppId must be a string or undefined.");else if(o.length>50)n?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return o}})}class zt{constructor({size:e,params:t}){if(this.data=new Map,this.parameters=[],this.capacity=e??50,t)this.parameters=t}get(e,t){let r=this.hash(e);if(r===!1)return t();if(!this.data.has(r)){if(this.data.size>this.capacity+10){let o=this.data.keys(),n=0;while(!0){let{value:s,done:i}=o.next();if(this.data.delete(s),i||++n>10)break}}this.data.set(r,t())}return this.data.get(r)}size(){return this.data.size}hash(e){let t="",{parameters:r}=this;if(r.length===0)return!1;for(let o of r){let n=String(e[o]??"");if(n.includes("|;"))return!1;t+=n+"|;"}return t}}var Xt=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}$"),b=(e)=>Xt.test(e)||e.startsWith("[")&&e.endsWith("]");var Ht=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),U=(e,t=!1)=>{if(!t)return Ht.test(e);let r=e.split(".");for(let o of r)if(!U(o))return!1;return!0};var v={};var h="endpoints";function g(e){if(typeof e!=="object"||e==null)return e;if("ref"in e)return`$${g(e.ref)}`;if("fn"in e)return`${e.fn}(${(e.argv||[]).map(g).join(", ")})`;return JSON.stringify(e,null,2)}class f extends Error{constructor(e){super(e);this.name="EndpointError"}}var Ce=(e,t)=>e===t;var ye=(e)=>{let t=e.split("."),r=[];for(let o of t){let n=o.indexOf("[");if(n!==-1){if(o.indexOf("]")!==o.length-1)throw new f(`Path: '${e}' does not end with ']'`);let s=o.slice(n+1,-1);if(Number.isNaN(parseInt(s)))throw new f(`Invalid array index: '${s}' in path: '${e}'`);if(n!==0)r.push(o.slice(0,n));r.push(s)}else r.push(o)}return r};var G=(e,t)=>ye(t).reduce((r,o)=>{if(typeof r!=="object")throw new f(`Index '${o}' in '${t}' not found in '${JSON.stringify(e)}'`);else if(Array.isArray(r))return r[parseInt(o)];return r[o]},e);var Pe=(e)=>e!=null;var be=(e)=>!e;var V=E(qt(),1);var ne={[V.EndpointURLScheme.HTTP]:80,[V.EndpointURLScheme.HTTPS]:443},Ue=(e)=>{let t=(()=>{try{if(e instanceof URL)return e;if(typeof e==="object"&&"hostname"in e){let{hostname:l,port:d,protocol:N="",path:k="",query:vt={}}=e,Ne=new URL(`${N}//${l}${d?`:${d}`:""}${k}`);return Ne.search=Object.entries(vt).map(([Mt,$t])=>`${Mt}=${$t}`).join("&"),Ne}return new URL(e)}catch(l){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:n,pathname:s,protocol:i,search:a}=t;if(a)return null;let c=i.slice(0,-1);if(!Object.values(V.EndpointURLScheme).includes(c))return null;let p=b(n),u=r.includes(`${o}:${ne[c]}`)||typeof e==="string"&&e.includes(`${o}:${ne[c]}`),_=`${o}${u?`:${ne[c]}`:""}`;return{scheme:c,authority:_,path:s,normalizedPath:s.endsWith("/")?s:`${s}/`,isIp:p}};var ve=(e,t)=>e===t;var Me=(e,t,r,o)=>{if(t>=r||e.length<r)return null;if(!o)return e.substring(t,r);return e.substring(e.length-r,e.length-t)};var $e=(e)=>encodeURIComponent(e).replace(/[!*'()]/g,(t)=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`);var Le={booleanEquals:Ce,getAttr:G,isSet:Pe,isValidHostLabel:U,not:be,parseURL:Ue,stringEquals:ve,substring:Me,uriEncode:$e};var W=(e,t)=>{let r=[],o={...t.endpointParams,...t.referenceRecord},n=0;while(n<e.length){let s=e.indexOf("{",n);if(s===-1){r.push(e.slice(n));break}r.push(e.slice(n,s));let i=e.indexOf("}",s);if(i===-1){r.push(e.slice(s));break}if(e[s+1]==="{"&&e[i+1]==="}")r.push(e.slice(s+1,i)),n=i+2;let a=e.substring(s+1,i);if(a.includes("#")){let[c,p]=a.split("#");r.push(G(o[c],p))}else r.push(o[a]);n=i+1}return r.join("")};var Fe=({ref:e},t)=>{return{...t.endpointParams,...t.referenceRecord}[e]};var A=(e,t,r)=>{if(typeof e==="string")return W(e,r);else if(e.fn)return B(e,r);else if(e.ref)return Fe(e,r);throw new f(`'${t}': ${String(e)} is not a string, function or reference.`)};var B=({fn:e,argv:t},r)=>{let o=t.map((s)=>["boolean","number"].includes(typeof s)?s:A(s,"arg",r)),n=e.split(".");if(n[0]in v&&n[1]!=null)return v[n[0]][n[1]](...o);return Le[e](...o)};var ke=({assign:e,...t},r)=>{if(e&&e in r.referenceRecord)throw new f(`'${e}' is already defined in Reference Record.`);let o=B(t,r);return r.logger?.debug?.(`${h} evaluateCondition: ${g(t)} = ${g(o)}`),{result:o===""?!0:!!o,...e!=null&&{toAssign:{name:e,value:o}}}};var w=(e=[],t)=>{let r={};for(let o of e){let{result:n,toAssign:s}=ke(o,{...t,referenceRecord:{...t.referenceRecord,...r}});if(!n)return{result:n};if(s)r[s.name]=s.value,t.logger?.debug?.(`${h} assign: ${s.name} := ${g(s.value)}`)}return{result:!0,referenceRecord:r}};var Ge=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:n.map((s)=>{let i=A(s,"Header value entry",t);if(typeof i!=="string")throw new f(`Header '${o}' value '${i}' is not a string`);return i})}),{});var se=(e,t)=>{if(Array.isArray(e))return e.map((r)=>se(r,t));switch(typeof e){case"string":return W(e,t);case"object":if(e===null)throw new f(`Unexpected endpoint property: ${e}`);return Y(e,t);case"boolean":return e;default:throw new f(`Unexpected endpoint property type: ${typeof e}`)}};var Y=(e,t)=>Object.entries(e).reduce((r,[o,n])=>({...r,[o]:se(n,t)}),{});var Ve=(e,t)=>{let r=A(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 f(`Endpoint URL must be a string, got ${typeof r}`)};var We=(e,t)=>{let{conditions:r,endpoint:o}=e,{result:n,referenceRecord:s}=w(r,t);if(!n)return;let i={...t,referenceRecord:{...t.referenceRecord,...s}},{url:a,properties:c,headers:p}=o;return t.logger?.debug?.(`${h} Resolving endpoint from template: ${g(o)}`),{...p!=null&&{headers:Ge(p,i)},...c!=null&&{properties:Y(c,i)},url:Ve(a,i)}};var Be=(e,t)=>{let{conditions:r,error:o}=e,{result:n,referenceRecord:s}=w(r,t);if(!n)return;throw new f(A(o,"Error",{...t,referenceRecord:{...t.referenceRecord,...s}}))};var Ye=(e,t)=>{let{conditions:r,rules:o}=e,{result:n,referenceRecord:s}=w(r,t);if(!n)return;return j(o,{...t,referenceRecord:{...t.referenceRecord,...s}})};var j=(e,t)=>{for(let r of e)if(r.type==="endpoint"){let o=We(r,t);if(o)return o}else if(r.type==="error")Be(r,t);else if(r.type==="tree"){let o=Ye(r,t);if(o)return o}else throw new f(`Unknown endpoint rule: ${r}`);throw new f("Rules evaluation failed")};var Jt=(e,t)=>{let{endpointParams:r,logger:o}=t,{parameters:n,rules:s}=e;t.logger?.debug?.(`${h} Initial EndpointParams: ${g(r)}`);let i=Object.entries(n).filter(([,p])=>p.default!=null).map(([p,u])=>[p,u.default]);if(i.length>0)for(let[p,u]of i)r[p]=r[p]??u;let a=Object.entries(n).filter(([,p])=>p.required).map(([p])=>p);for(let p of a)if(r[p]==null)throw new f(`Missing required parameter: '${p}'`);let c=j(s,{endpointParams:r,logger:o,referenceRecord:{}});return t.logger?.debug?.(`${h} Resolved endpoint: ${g(c)}`),c};var ie=(e,t=!1)=>{if(t){for(let r of e.split("."))if(!ie(r))return!1;return!0}if(!U(e))return!1;if(e.length<3||e.length>63)return!1;if(e!==e.toLowerCase())return!1;if(b(e))return!1;return!0};var je=(e)=>{let t=e.split(":");if(t.length<6)return null;let[r,o,n,s,i,...a]=t;if(r!=="arn"||o===""||n===""||a.join(":")==="")return null;let c=a.map((p)=>p.split("/")).flat();return{partition:o,service:n,region:s,accountId:i,resourceId:c}};var ze={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-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"AWS ISOE (Europe) global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"amazonaws.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"EU (Germany)"}}}],version:"1.1"};var Kt=ze,Qt="",Xe=(e)=>{let{partitions:t}=Kt;for(let o of t){let{regions:n,outputs:s}=o;for(let[i,a]of Object.entries(n))if(i===e)return{...s,...a}}for(let o of t){let{regionRegex:n,outputs:s}=o;if(new RegExp(n).test(e))return{...s}}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}};var He=()=>Qt;var er={isVirtualHostableS3Bucket:ie,parseArn:je,partition:Xe};v.aws=er;var x=E(tr(),1),rr=/\d{12}\.ddb/;async function qe(e,t,r){if(r.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor")x.setFeature(e,"PROTOCOL_RPC_V2_CBOR","M");if(typeof t.retryStrategy==="function"){let s=await t.retryStrategy();if(typeof s.acquireInitialRetryToken==="function")if(s.constructor?.name?.includes("Adaptive"))x.setFeature(e,"RETRY_MODE_ADAPTIVE","F");else x.setFeature(e,"RETRY_MODE_STANDARD","E");else x.setFeature(e,"RETRY_MODE_LEGACY","D")}if(typeof t.accountIdEndpointMode==="function"){let s=e.endpointV2;if(String(s?.url?.hostname).match(rr))x.setFeature(e,"ACCOUNT_ID_ENDPOINT","O");switch(await t.accountIdEndpointMode?.()){case"disabled":x.setFeature(e,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":x.setFeature(e,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":x.setFeature(e,"ACCOUNT_ID_MODE_REQUIRED","R");break}}let n=e.__smithy_context?.selectedHttpAuthScheme?.identity;if(n?.$source){let s=n;if(s.accountId)x.setFeature(e,"RESOLVED_ACCOUNT_ID","T");for(let[i,a]of Object.entries(s.$source??{}))x.setFeature(e,i,a)}}var ae="user-agent",z="x-amz-user-agent",ce=" ",X="/",Je=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,Ze=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,pe="-";function Ke(e){let t="";for(let r in e){let o=e[r];if(t.length+o.length+1<=1024){if(t.length)t+=","+o;else t+=o;continue}break}return t}var or=(e)=>(t,r)=>async(o)=>{let{request:n}=o;if(!m.isInstance(n))return t(o);let{headers:s}=n,i=r?.userAgent?.map(H)||[],a=(await e.defaultUserAgentProvider()).map(H);await qe(r,e,o);let c=r;a.push(`m/${Ke(Object.assign({},r.__smithy_context?.features,c.__aws_sdk_context?.features))}`);let p=e?.customUserAgent?.map(H)||[],u=await e.userAgentAppId();if(u)a.push(H([`app/${u}`]));let _=He(),l=(_?[_]:[]).concat([...a,...i,...p]).join(ce),d=[...a.filter((N)=>N.startsWith("aws-sdk-")),...p].join(ce);if(e.runtime!=="browser"){if(d)s[z]=s[z]?`${s[ae]} ${d}`:d;s[ae]=l}else s[z]=l;return t({...o,request:n})},H=(e)=>{let t=e[0].split(X).map((i)=>i.replace(Je,pe)).join(X),r=e[1]?.replace(Ze,pe),o=t.indexOf(X),n=t.substring(0,o),s=t.substring(o+1);if(n==="api")s=s.toLowerCase();return[n,s,r].filter((i)=>i&&i.length>0).reduce((i,a,c)=>{switch(c){case 0:return a;case 1:return`${i}/${a}`;default:return`${i}#${a}`}},"")},nr={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},zs=(e)=>({applyToStack:(t)=>{t.add(or(e),nr)}});var q=(e)=>typeof e==="string"&&(e.startsWith("fips-")||e.endsWith("-fips"));var fe=(e)=>q(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e;var ri=(e)=>{let{region:t,useFipsEndpoint:r}=e;if(!t)throw new Error("Region is missing");return Object.assign(e,{region:async()=>{if(typeof t==="string")return fe(t);let o=await t();return fe(o)},useFipsEndpoint:async()=>{let o=typeof t==="string"?t:await t();if(q(o))return!0;return typeof r!=="function"?Promise.resolve(!!r):r()}})};var D=(e,t,r)=>{if(!(t in e))return;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]}.`)};var T;(function(e){e.ENV="env",e.CONFIG="shared config entry"})(T||(T={}));var sr="AWS_USE_DUALSTACK_ENDPOINT",ir="use_dualstack_endpoint";var di={environmentVariableSelector:(e)=>D(e,sr,T.ENV),configFileSelector:(e)=>D(e,ir,T.CONFIG),default:!1};var ar="AWS_USE_FIPS_ENDPOINT",cr="use_fips_endpoint";var Ei={environmentVariableSelector:(e)=>D(e,ar,T.ENV),configFileSelector:(e)=>D(e,cr,T.CONFIG),default:!1};var pr=E(M(),1);var fr=E(M(),1);var Qe={environmentVariableSelector:(e)=>e.AWS_REGION,configFileSelector:(e)=>e.region,default:()=>{throw new Error("Region is missing")}},wi={preferredFile:"credentials"};var et="content-length";function ur(e){return(t)=>async(r)=>{let o=r.request;if(m.isInstance(o)){let{body:n,headers:s}=o;if(n&&Object.keys(s).map((i)=>i.toLowerCase()).indexOf(et)===-1)try{let i=e(n);o.headers={...o.headers,[et]:String(i)}}catch(i){}}return t({...r,request:o})}}var dr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},ea=(e)=>({applyToStack:(t)=>{t.add(ur(e.bodyLengthChecker),dr)}});var ft=E(_r(),1);var at=E(we(),1),ct=E(M(),1);var tt=async(e)=>{let t=e?.Bucket||"";if(typeof e.Bucket==="string")e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(Rr(t)){if(e.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!gr(t)||t.indexOf(".")!==-1&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)e.ForcePathStyle=!0;if(e.DisableMultiRegionAccessPoints)e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0;return e},lr=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,mr=/(\d+\.){3}\d+/,Er=/\.\./;var gr=(e)=>lr.test(e)&&!mr.test(e)&&!Er.test(e),Rr=(e)=>{let[t,r,o,,,n]=e.split(":"),s=t==="arn"&&e.split(":").length>=6,i=Boolean(s&&r&&o&&n);if(s&&!i)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return i};var rt=(e,t,r)=>{let o=async()=>{let n=r[e]??r[t];if(typeof n==="function")return n();return n};if(e==="credentialScope"||t==="CredentialScope")return async()=>{let n=typeof r.credentials==="function"?await r.credentials():r.credentials;return n?.credentialScope??n?.CredentialScope};if(e==="accountId"||t==="AccountId")return async()=>{let n=typeof r.credentials==="function"?await r.credentials():r.credentials;return n?.accountId??n?.AccountId};if(e==="endpoint"||t==="endpoint")return async()=>{let n=await o();if(n&&typeof n==="object"){if("url"in n)return n.url.href;if("hostname"in n){let{protocol:s,hostname:i,port:a,path:c}=n;return`${s}//${i}${a?":"+a:""}${c}`}}return n};return o};var ot="AWS_ENDPOINT_URL",nt="endpoint_url",st=(e)=>({environmentVariableSelector:(t)=>{let r=e.split(" ").map((s)=>s.toUpperCase()),o=t[[ot,...r].join("_")];if(o)return o;let n=t[ot];if(n)return n;return},configFileSelector:(t,r)=>{if(r&&t.services){let n=r[["services",t.services].join(ue)];if(n){let s=e.split(" ").map((a)=>a.toLowerCase()),i=n[[s.join("_"),nt].join(ue)];if(i)return i}}let o=t[nt];if(o)return o;return},default:void 0});var J=async(e)=>$(st(e??""))();var Z=(e)=>{if(typeof e==="object"){if("url"in e)return de(e.url);return e}return de(e)};var it=async(e,t,r,o)=>{if(!r.endpoint){let i;if(r.serviceConfiguredEndpoint)i=await r.serviceConfiguredEndpoint();else i=await J(r.serviceId);if(i)r.endpoint=()=>Promise.resolve(Z(i))}let n=await xr(e,t,r);if(typeof r.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return r.endpointProvider(n,o)},xr=async(e,t,r)=>{let o={},n=t?.getEndpointParameterInstructions?.()||{};for(let[s,i]of Object.entries(n))switch(i.type){case"staticContextParams":o[s]=i.value;break;case"contextParams":o[s]=e[i.name];break;case"clientContextParams":case"builtInParams":o[s]=await rt(i.name,s,r)();break;case"operationContextParams":o[s]=i.get(e);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(i))}if(Object.keys(n).length===0)Object.assign(o,r);if(String(r.serviceId).toLowerCase()==="s3")await tt(o);return o};var pt=({config:e,instructions:t})=>{return(r,o)=>async(n)=>{if(e.endpoint)at.setFeature(o,"ENDPOINT_OVERRIDE","N");let s=await it(n.input,{getEndpointParameterInstructions(){return t}},{...e},o);o.endpointV2=s,o.authSchemes=s.properties?.authSchemes;let i=o.authSchemes?.[0];if(i){o.signing_region=i.signingRegion,o.signing_service=i.signingName;let c=ct.getSmithyContext(o)?.selectedHttpAuthScheme?.httpAuthOption;if(c)c.signingProperties=Object.assign(c.signingProperties||{},{signing_region:i.signingRegion,signingRegion:i.signingRegion,signing_service:i.signingName,signingName:i.signingName,signingRegionSet:i.signingRegionSet},i.properties)}return r({...n})}};var Sr={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:ft.serializerMiddlewareOption.name},ha=(e,t)=>({applyToStack:(r)=>{r.addRelativeTo(pt({config:e,instructions:t}),Sr)}});var K=E(M(),1);var Ia=(e)=>{let t=e.tls??!0,{endpoint:r,useDualstackEndpoint:o,useFipsEndpoint:n}=e,s=r!=null?async()=>Z(await K.normalizeProvider(r)()):void 0,a=Object.assign(e,{endpoint:s,tls:t,isCustomEndpoint:!!r,useDualstackEndpoint:K.normalizeProvider(o??!1),useFipsEndpoint:K.normalizeProvider(n??!1)}),c=void 0;return a.serviceConfiguredEndpoint=async()=>{if(e.serviceId&&!c)c=J(e.serviceId);return c},a};var _e=E(M(),1);var R;(function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"})(R||(R={}));var O=3,ut=R.STANDARD;var dt=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],lt=["TimeoutError","RequestTimeout","RequestTimeoutException"],mt=[500,502,503,504],Et=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"];var hr=(e)=>e.$metadata?.clockSkewCorrected,C=(e)=>e.$metadata?.httpStatusCode===429||dt.includes(e.name)||e.$retryable?.throttling==!0,L=(e,t=0)=>hr(e)||lt.includes(e.name)||Et.includes(e?.code||"")||mt.includes(e.$metadata?.httpStatusCode||0)||e.cause!==void 0&&t<=10&&L(e.cause,t+1),gt=(e)=>{if(e.$metadata?.httpStatusCode!==void 0){let t=e.$metadata.httpStatusCode;if(500<=t&&t<=599&&!L(e))return!0;return!1}return!1};class y{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??0.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??0.5,this.scaleConstant=e?.scaleConstant??0.4,this.smooth=e?.smooth??0.8;let t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(!this.enabled)return;if(this.refillTokenBucket(),e>this.currentCapacity){let t=(e-this.currentCapacity)/this.fillRate*1000;await new Promise((r)=>y.setTimeoutFn(r,t))}this.currentCapacity=this.currentCapacity-e}refillTokenBucket(){let e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}let t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),C(e)){let o=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=o,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(o),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());let r=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(r)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){let e=this.getCurrentTimeInSeconds(),t=Math.floor(e*2)/2;if(this.requestCount++,t>this.lastTxRateBucket){let r=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(r*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}y.setTimeoutFn=setTimeout;var I=100,F=20000,le=500,Q=500,me=5,Ee=10,ge=1,ee="amz-sdk-invocation-id",te="amz-sdk-request";var Rt=()=>{let e=I;return{computeNextBackoffDelay:(o)=>{return Math.floor(Math.min(F,Math.random()*2**o*e))},setDelayBase:(o)=>{e=o}}};var Re=({retryDelay:e,retryCount:t,retryCost:r})=>{return{getRetryCount:()=>t,getRetryDelay:()=>Math.min(F,e),getRetryCost:()=>r}};class P{constructor(e){this.maxAttempts=e,this.mode=R.STANDARD,this.capacity=Q,this.retryBackoffStrategy=Rt(),this.maxAttemptsProvider=typeof e==="function"?e:async()=>e}async acquireInitialRetryToken(e){return Re({retryDelay:I,retryCount:0})}async refreshRetryTokenForRetry(e,t){let r=await this.getMaxAttempts();if(this.shouldRetry(e,t,r)){let o=t.errorType;this.retryBackoffStrategy.setDelayBase(o==="THROTTLING"?le:I);let n=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),s=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,n):n,i=this.getCapacityCost(o);return this.capacity-=i,Re({retryDelay:s,retryCount:e.getRetryCount()+1,retryCost:i})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(Q,this.capacity+(e.getRetryCost()??ge))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn(`Max attempts provider could not resolve. Using default of ${O}`),O}}shouldRetry(e,t,r){return e.getRetryCount()+1<r&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e==="TRANSIENT"?Ee:me}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class xe{constructor(e,t){this.maxAttemptsProvider=e,this.mode=R.ADAPTIVE;let{rateLimiter:r}=t??{};this.rateLimiter=r??new y,this.standardRetryStrategy=new P(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}var xt="AWS_MAX_ATTEMPTS",_t="max_attempts",Ec={environmentVariableSelector:(e)=>{let t=e[xt];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Environment variable ${xt} mast be a number, got "${t}"`);return r},configFileSelector:(e)=>{let t=e[_t];if(!t)return;let r=parseInt(t);if(Number.isNaN(r))throw new Error(`Shared config file entry ${_t} mast be a number, got "${t}"`);return r},default:O},gc=(e)=>{let{retryStrategy:t,retryMode:r,maxAttempts:o}=e,n=_e.normalizeProvider(o??O);return Object.assign(e,{maxAttempts:n,retryStrategy:async()=>{if(t)return t;if(await _e.normalizeProvider(r)()===R.ADAPTIVE)return new xe(n);return new P(n)}})},Ar="AWS_RETRY_MODE",Tr="retry_mode",Rc={environmentVariableSelector:(e)=>e[Ar],configFileSelector:(e)=>e[Tr],default:ut};var S=E(Or(),1),_c=S.default.v1,Sc=S.default.v3,St=S.default.v4,hc=S.default.v5,Ac=S.default.NIL,Tc=S.default.version,Oc=S.default.validate,Ic=S.default.stringify,Nc=S.default.parse;import{Readable as Ir}from"stream";var ht=(e)=>e?.body instanceof Ir||typeof ReadableStream!=="undefined"&&e?.body instanceof ReadableStream;var Se=(e)=>{if(e instanceof Error)return e;if(e instanceof Object)return Object.assign(new Error,e);if(typeof e==="string")return new Error(e);return new Error(`AWS SDK error wrapper for ${e}`)};var Nr=(e)=>(t,r)=>async(o)=>{let n=await e.retryStrategy(),s=await e.maxAttempts();if(wr(n)){n=n;let i=await n.acquireInitialRetryToken(r.partition_id),a=new Error,c=0,p=0,{request:u}=o,_=m.isInstance(u);if(_)u.headers[ee]=St();while(!0)try{if(_)u.headers[te]=`attempt=${c+1}; max=${s}`;let{response:l,output:d}=await t(o);return n.recordSuccess(i),d.$metadata.attempts=c+1,d.$metadata.totalRetryDelay=p,{response:l,output:d}}catch(l){let d=Dr(l);if(a=Se(l),_&&ht(u))throw(r.logger instanceof At?console:r.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{i=await n.refreshRetryTokenForRetry(i,d)}catch(k){if(!a.$metadata)a.$metadata={};throw a.$metadata.attempts=c+1,a.$metadata.totalRetryDelay=p,a}c=i.getRetryCount();let N=i.getRetryDelay();p+=N,await new Promise((k)=>setTimeout(k,N))}}else{if(n=n,n?.mode)r.userAgent=[...r.userAgent||[],["cfg/retry-mode",n.mode]];return n.retry(t,o)}},wr=(e)=>typeof e.acquireInitialRetryToken!=="undefined"&&typeof e.refreshRetryTokenForRetry!=="undefined"&&typeof e.recordSuccess!=="undefined",Dr=(e)=>{let t={error:e,errorType:Cr(e)},r=Pr(e.$response);if(r)t.retryAfterHint=r;return t},Cr=(e)=>{if(C(e))return"THROTTLING";if(L(e))return"TRANSIENT";if(gt(e))return"SERVER_ERROR";return"CLIENT_ERROR"},yr={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Fc=(e)=>({applyToStack:(t)=>{t.add(Nr(e),yr)}}),Pr=(e)=>{if(!he.isInstance(e))return;let t=Object.keys(e.headers).find((s)=>s.toLowerCase()==="retry-after");if(!t)return;let r=e.headers[t],o=Number(r);if(!Number.isNaN(o))return new Date(o*1000);return new Date(r)};import{platform as br,release as Ur}from"os";import{env as Ot,versions as vr}from"process";var Ae={isCrtAvailable:!1};var Tt=()=>{if(Ae.isCrtAvailable)return["md/crt-avail"];return null};var Np=({serviceId:e,clientVersion:t})=>{return async(r)=>{let o=[["aws-sdk-js",t],["ua","2.1"],[`os/${br()}`,Ur()],["lang/js"],["md/nodejs",`${vr.node}`]],n=Tt();if(n)o.push(n);if(e)o.push([`api/${e}`,t]);if(Ot.AWS_EXECUTION_ENV)o.push([`exec-env/${Ot.AWS_EXECUTION_ENV}`]);let s=await r?.userAgentAppId?.();return s?[...o,[`app/${s}`]]:[...o]}};var Mr="AWS_SDK_UA_APP_ID",$r="sdk_ua_app_id",Lr="sdk-ua-app-id",yp={environmentVariableSelector:(e)=>e[Mr],configFileSelector:(e)=>e[$r]??e[Lr],default:oe};import{Buffer as Fr}from"buffer";import{createHash as kr,createHmac as Gr}from"crypto";class Vr{constructor(e,t){this.algorithmIdentifier=e,this.secret=t,this.reset()}update(e,t){this.hash.update(wt(It(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?Gr(this.algorithmIdentifier,It(this.secret)):kr(this.algorithmIdentifier)}}function It(e,t){if(Fr.isBuffer(e))return e;if(typeof e==="string")return Nt(e,t);if(ArrayBuffer.isView(e))return Te(e.buffer,e.byteOffset,e.byteLength);return Te(e)}import{fstatSync as Wr,lstatSync as Br}from"fs";var Vp=(e)=>{if(!e)return 0;if(typeof e==="string")return Buffer.byteLength(e);else if(typeof e.byteLength==="number")return e.byteLength;else if(typeof e.size==="number")return e.size;else if(typeof e.start==="number"&&typeof e.end==="number")return e.end+1-e.start;else if(typeof e.path==="string"||Buffer.isBuffer(e.path))return Br(e.path).size;else if(typeof e.fd==="number")return Wr(e.fd).size;throw new Error(`Body Length computation failed for ${e}`)};var Dt="AWS_EXECUTION_ENV",Oe="AWS_REGION",Ie="AWS_DEFAULT_REGION",Ct="AWS_EC2_METADATA_DISABLED",yt=["in-region","cross-region","mobile","standard","legacy"],Pt="/latest/meta-data/placement/region";var bt={environmentVariableSelector:(e)=>{return e.AWS_DEFAULTS_MODE},configFileSelector:(e)=>{return e.defaults_mode},default:"legacy"};var Kp=({region:e=$(Qe),defaultsMode:t=$(bt)}={})=>Ut(async()=>{let r=typeof t==="function"?await t():t;switch(r?.toLowerCase()){case"auto":return jr(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 ${yt.join(", ")}, got ${r}`)}}),jr=async(e)=>{if(e){let t=typeof e==="function"?await e():e,r=await zr();if(!r)return"standard";if(t===r)return"in-region";else return"cross-region"}return"standard"},zr=async()=>{if(process.env[Dt]&&(process.env[Oe]||process.env[Ie]))return process.env[Oe]??process.env[Ie];if(!process.env[Ct])try{let{getInstanceMetadataEndpoint:e,httpRequest:t}=await import("./chunk-4e18rqet.js"),r=await e();return(await t({...r,path:Pt})).toString()}catch(e){}};var rf=(e)=>{return{setRegion(t){e.region=t},region(){return e.region}}},of=(e)=>{return{region:e.region()}};export{qr as ma,Jr as na,Kr as oa,oo as pa,D as qa,T as ra,so as sa,zt as ta,v as ua,Jt as va,er as wa,zs as xa,di as ya,Ei as za,Qe as Aa,wi as Ba,ri as Ca,ea as Da,xr as Ea,ha as Fa,Ia as Ga,ut as Ha,Ec as Ia,gc as Ja,Rc as Ka,Fc as La,Np as Ma,yp as Na,Vr as Oa,Vp as Pa,Kp as Qa,rf as Ra,of as Sa};
2
-
3
- //# debugId=8B4073E0B56DB09C64756E2164756E21