cdk-insights 0.14.2 → 0.15.1

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/dist/index.js CHANGED
@@ -131,7 +131,7 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht
131
131
  `)!=-1,s=this._styles,n=s.length;n--;){var o=gi[s[n]];t=o.open+t.replace(o.closeRe,o.open)+o.close,r&&(t=t.replace(NCe,function(i){return o.close+i+o.open}))}return t}_e.setTheme=function(e){if(typeof e=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var t in e)(function(r){_e[r]=function(s){if(typeof e[r]=="object"){var n=s;for(var o in e[r])n=_e[e[r][o]](n);return n}return _e[e[r]](s)}})(t)};function $Ce(){var e={};return Object.keys(EH).forEach(function(t){e[t]={get:function(){return DH([t])}}}),e}var WCe=function(t,r){var s=r.split("");return s=s.map(t),s.join("")};_e.trap=uH();_e.zalgo=dH();_e.maps={};_e.maps.america=mH()(_e);_e.maps.zebra=gH()(_e);_e.maps.rainbow=yH()(_e);_e.maps.random=bH()(_e);for(SH in _e.maps)(function(e){_e[e]=function(t){return WCe(_e.maps[e],t)}})(SH);var SH;CH(_e,$Ce())});var AH=C((y4e,wH)=>{var HCe=_H();wH.exports=HCe});var IH=C((v4e,Cg)=>{var{info:zCe,debug:FH}=bg(),hr=m0(),h0=class e{constructor(t){this.setOptions(t),this.x=null,this.y=null}setOptions(t){["boolean","number","bigint","string"].indexOf(typeof t)!==-1&&(t={content:""+t}),t=t||{},this.options=t;let r=t.content;if(["boolean","number","bigint","string"].indexOf(typeof r)!==-1)this.content=String(r);else if(!r)this.content=this.options.href||"";else throw new Error("Content needs to be a primitive, got: "+typeof r);this.colSpan=t.colSpan||1,this.rowSpan=t.rowSpan||1,this.options.href&&Object.defineProperty(this,"href",{get(){return this.options.href}})}mergeTableOptions(t,r){this.cells=r;let s=this.options.chars||{},n=t.chars,o=this.chars={};qCe.forEach(function(c){g0(s,n,c,o)}),this.truncate=this.options.truncate||t.truncate;let i=this.options.style=this.options.style||{},a=t.style;g0(i,a,"padding-left",this),g0(i,a,"padding-right",this),this.head=i.head||a.head,this.border=i.border||a.border,this.fixedWidth=t.colWidths[this.x],this.lines=this.computeLines(t),this.desiredWidth=hr.strlen(this.content)+this.paddingLeft+this.paddingRight,this.desiredHeight=this.lines.length}computeLines(t){let r=t.wordWrap||t.textWrap,{wordWrap:s=r}=this.options;if(this.fixedWidth&&s){if(this.fixedWidth-=this.paddingLeft+this.paddingRight,this.colSpan){let i=1;for(;i<this.colSpan;)this.fixedWidth+=t.colWidths[this.x+i],i++}let{wrapOnWordBoundary:n=!0}=t,{wrapOnWordBoundary:o=n}=this.options;return this.wrapLines(hr.wordWrap(this.fixedWidth,this.content,o))}return this.wrapLines(this.content.split(`
132
132
  `))}wrapLines(t){let r=hr.colorizeLines(t);return this.href?r.map(s=>hr.hyperlink(this.href,s)):r}init(t){let r=this.x,s=this.y;this.widths=t.colWidths.slice(r,r+this.colSpan),this.heights=t.rowHeights.slice(s,s+this.rowSpan),this.width=this.widths.reduce(RH,-1),this.height=this.heights.reduce(RH,-1),this.hAlign=this.options.hAlign||t.colAligns[r],this.vAlign=this.options.vAlign||t.rowAligns[s],this.drawRight=r+this.colSpan==t.colWidths.length}draw(t,r){if(t=="top")return this.drawTop(this.drawRight);if(t=="bottom")return this.drawBottom(this.drawRight);let s=hr.truncate(this.content,10,this.truncate);t||zCe(`${this.y}-${this.x}: ${this.rowSpan-t}x${this.colSpan} Cell ${s}`);let n=Math.max(this.height-this.lines.length,0),o;switch(this.vAlign){case"center":o=Math.ceil(n/2);break;case"bottom":o=n;break;default:o=0}if(t<o||t>=o+this.lines.length)return this.drawEmpty(this.drawRight,r);let i=this.lines.length>this.height&&t+1>=this.height;return this.drawLine(t-o,this.drawRight,i,r)}drawTop(t){let r=[];return this.cells?this.widths.forEach(function(s,n){r.push(this._topLeftChar(n)),r.push(hr.repeat(this.chars[this.y==0?"top":"mid"],s))},this):(r.push(this._topLeftChar(0)),r.push(hr.repeat(this.chars[this.y==0?"top":"mid"],this.width))),t&&r.push(this.chars[this.y==0?"topRight":"rightMid"]),this.wrapWithStyleColors("border",r.join(""))}_topLeftChar(t){let r=this.x+t,s;if(this.y==0)s=r==0?"topLeft":t==0?"topMid":"top";else if(r==0)s="leftMid";else if(s=t==0?"midMid":"bottomMid",this.cells&&(this.cells[this.y-1][r]instanceof e.ColSpanCell&&(s=t==0?"topMid":"mid"),t==0)){let o=1;for(;this.cells[this.y][r-o]instanceof e.ColSpanCell;)o++;this.cells[this.y][r-o]instanceof e.RowSpanCell&&(s="leftMid")}return this.chars[s]}wrapWithStyleColors(t,r){if(this[t]&&this[t].length)try{let s=AH();for(let n=this[t].length-1;n>=0;n--)s=s[this[t][n]];return s(r)}catch{return r}else return r}drawLine(t,r,s,n){let o=this.chars[this.x==0?"left":"middle"];if(this.x&&n&&this.cells){let p=this.cells[this.y+n][this.x-1];for(;p instanceof Cl;)p=this.cells[p.y][p.x-1];p instanceof Dl||(o=this.chars.rightMid)}let i=hr.repeat(" ",this.paddingLeft),a=r?this.chars.right:"",c=hr.repeat(" ",this.paddingRight),u=this.lines[t],l=this.width-(this.paddingLeft+this.paddingRight);s&&(u+=this.truncate||"\u2026");let d=hr.truncate(u,l,this.truncate);return d=hr.pad(d,l," ",this.hAlign),d=i+d+c,this.stylizeLine(o,d,a)}stylizeLine(t,r,s){return t=this.wrapWithStyleColors("border",t),s=this.wrapWithStyleColors("border",s),this.y===0&&(r=this.wrapWithStyleColors("head",r)),t+r+s}drawBottom(t){let r=this.chars[this.x==0?"bottomLeft":"bottomMid"],s=hr.repeat(this.chars.bottom,this.width),n=t?this.chars.bottomRight:"";return this.wrapWithStyleColors("border",r+s+n)}drawEmpty(t,r){let s=this.chars[this.x==0?"left":"middle"];if(this.x&&r&&this.cells){let i=this.cells[this.y+r][this.x-1];for(;i instanceof Cl;)i=this.cells[i.y][i.x-1];i instanceof Dl||(s=this.chars.rightMid)}let n=t?this.chars.right:"",o=hr.repeat(" ",this.width);return this.stylizeLine(s,o,n)}},Cl=class{constructor(){}draw(t){return typeof t=="number"&&FH(`${this.y}-${this.x}: 1x1 ColSpanCell`),""}init(){}mergeTableOptions(){}},Dl=class{constructor(t){this.originalCell=t}init(t){let r=this.y,s=this.originalCell.y;this.cellOffset=r-s,this.offset=GCe(t.rowHeights,s,this.cellOffset)}draw(t){return t=="top"?this.originalCell.draw(this.offset,this.cellOffset):t=="bottom"?this.originalCell.draw("bottom"):(FH(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`),this.originalCell.draw(this.offset+1+t))}mergeTableOptions(){}};function TH(...e){return e.filter(t=>t!=null).shift()}function g0(e,t,r,s){let n=r.split("-");n.length>1?(n[1]=n[1].charAt(0).toUpperCase()+n[1].substr(1),n=n.join(""),s[n]=TH(e[n],e[r],t[n],t[r])):s[r]=TH(e[r],t[r])}function GCe(e,t,r){let s=e[t];for(let n=1;n<r;n++)s+=1+e[t+n];return s}function RH(e,t){return e+t+1}var qCe=["top","top-mid","top-left","top-right","bottom","bottom-mid","bottom-left","bottom-right","left","left-mid","mid","mid-mid","right","right-mid","middle"];Cg.exports=h0;Cg.exports.ColSpanCell=Cl;Cg.exports.RowSpanCell=Dl});var OH=C((b4e,kH)=>{var{warn:VCe,debug:KCe}=bg(),y0=IH(),{ColSpanCell:JCe,RowSpanCell:ZCe}=y0;(function(){function e(m,f){return m[f]>0?e(m,f+1):f}function t(m){let f={};m.forEach(function(g,h){let S=0;g.forEach(function(b){b.y=h,b.x=h?e(f,S):S;let w=b.rowSpan||1,D=b.colSpan||1;if(w>1)for(let E=0;E<D;E++)f[b.x+E]=w;S=b.x+D}),Object.keys(f).forEach(b=>{f[b]--,f[b]<1&&delete f[b]})})}function r(m){let f=0;return m.forEach(function(g){g.forEach(function(h){f=Math.max(f,h.x+(h.colSpan||1))})}),f}function s(m){return m.length}function n(m,f){let g=m.y,h=m.y-1+(m.rowSpan||1),S=f.y,b=f.y-1+(f.rowSpan||1),w=!(g>b||S>h),D=m.x,E=m.x-1+(m.colSpan||1),k=f.x,M=f.x-1+(f.colSpan||1),I=!(D>M||k>E);return w&&I}function o(m,f,g){let h=Math.min(m.length-1,g),S={x:f,y:g};for(let b=0;b<=h;b++){let w=m[b];for(let D=0;D<w.length;D++)if(n(S,w[D]))return!0}return!1}function i(m,f,g,h){for(let S=g;S<h;S++)if(o(m,S,f))return!1;return!0}function a(m){m.forEach(function(f,g){f.forEach(function(h){for(let S=1;S<h.rowSpan;S++){let b=new ZCe(h);b.x=h.x,b.y=h.y+S,b.colSpan=h.colSpan,u(b,m[g+S])}})})}function c(m){for(let f=m.length-1;f>=0;f--){let g=m[f];for(let h=0;h<g.length;h++){let S=g[h];for(let b=1;b<S.colSpan;b++){let w=new JCe;w.x=S.x+b,w.y=S.y,g.splice(h+1,0,w)}}}}function u(m,f){let g=0;for(;g<f.length&&f[g].x<m.x;)g++;f.splice(g,0,m)}function l(m){let f=s(m),g=r(m);KCe(`Max rows: ${f}; Max cols: ${g}`);for(let h=0;h<f;h++)for(let S=0;S<g;S++)if(!o(m,S,h)){let b={x:S,y:h,colSpan:1,rowSpan:1};for(S++;S<g&&!o(m,S,h);)b.colSpan++,S++;let w=h+1;for(;w<f&&i(m,w,b.x,b.x+b.colSpan);)b.rowSpan++,w++;let D=new y0(b);D.x=b.x,D.y=b.y,VCe(`Missing cell at ${D.y}-${D.x}.`),u(D,m[h])}}function d(m){return m.map(function(f){if(!Array.isArray(f)){let g=Object.keys(f)[0];f=f[g],Array.isArray(f)?(f=f.slice(),f.unshift(g)):f=[g,f]}return f.map(function(g){return new y0(g)})})}function p(m){let f=d(m);return t(f),l(f),a(f),c(f),f}kH.exports={makeTableLayout:p,layoutTable:t,addRowSpanCells:a,maxWidth:r,fillInTable:l,computeWidths:PH("colSpan","desiredWidth","x",1),computeHeights:PH("rowSpan","desiredHeight","y",1)}})();function PH(e,t,r,s){return function(n,o){let i=[],a=[],c={};o.forEach(function(u){u.forEach(function(l){(l[e]||1)>1?a.push(l):i[l[r]]=Math.max(i[l[r]]||0,l[t]||0,s)})}),n.forEach(function(u,l){typeof u=="number"&&(i[l]=u)});for(let u=a.length-1;u>=0;u--){let l=a[u],d=l[e],p=l[r],m=i[p],f=typeof n[p]=="number"?0:1;if(typeof m=="number")for(let g=1;g<d;g++)m+=1+i[p+g],typeof n[p+g]!="number"&&f++;else m=t==="desiredWidth"?l.desiredWidth-1:1,(!c[p]||c[p]<m)&&(c[p]=m);if(l[t]>m){let g=0;for(;f>0&&l[t]>m;){if(typeof n[p+g]!="number"){let h=Math.round((l[t]-m)/f);m+=h,i[p+g]+=h,f--}g++}}}Object.assign(n,i,c);for(let u=0;u<n.length;u++)n[u]=Math.max(s,n[u]||0)}}});var NH=C((S4e,LH)=>{var Qs=bg(),YCe=m0(),v0=OH(),Dg=class extends Array{constructor(t){super();let r=YCe.mergeOptions(t);if(Object.defineProperty(this,"options",{value:r,enumerable:r.debug}),r.debug){switch(typeof r.debug){case"boolean":Qs.setDebugLevel(Qs.WARN);break;case"number":Qs.setDebugLevel(r.debug);break;case"string":Qs.setDebugLevel(parseInt(r.debug,10));break;default:Qs.setDebugLevel(Qs.WARN),Qs.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof r.debug}`)}Object.defineProperty(this,"messages",{get(){return Qs.debugMessages()}})}}toString(){let t=this,r=this.options.head&&this.options.head.length;r?(t=[this.options.head],this.length&&t.push.apply(t,this)):this.options.style.head=[];let s=v0.makeTableLayout(t);s.forEach(function(o){o.forEach(function(i){i.mergeTableOptions(this.options,s)},this)},this),v0.computeWidths(this.options.colWidths,s),v0.computeHeights(this.options.rowHeights,s),s.forEach(function(o){o.forEach(function(i){i.init(this.options)},this)},this);let n=[];for(let o=0;o<s.length;o++){let i=s[o],a=this.options.rowHeights[o];(o===0||!this.options.style.compact||o==1&&r)&&b0(i,"top",n);for(let c=0;c<a;c++)b0(i,c,n);o+1==s.length&&b0(i,"bottom",n)}return n.join(`
133
133
  `)}get width(){return this.toString().split(`
134
- `)[0].length}};Dg.reset=()=>Qs.reset();function b0(e,t,r){let s=[];e.forEach(function(o){s.push(o.draw(t))});let n=s.join("");n.length&&r.push(n)}LH.exports=Dg});var BH=C((C4e,MH)=>{MH.exports=NH()});var S0=C((E4e,tDe)=>{tDe.exports={name:"cdk-insights",version:"0.14.2",description:"AWS CDK security and cost analysis tool with AI-powered insights",main:"dist/index.js",types:"dist/index.d.ts",bin:{"cdk-insights":"dist/entry.js"},exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.js"}},files:["dist/**/*","README.md","LICENSE"],scripts:{test:"vitest --run",lint:"biome lint src/",format:"biome format --write src/",check:"biome check src/",build:"ts-node scripts/build.ts",start:"node dist/index.js",dev:"ts-node src/index.ts",prepare:"husky install && npm run build","start:dev":"CDK_ENV=local ts-node src/index.ts","ai-run":"ts-node src/index.ts",unlink:"npm unlink -g cdk-insights",link:"npm link","prepare:test":"npm run unlink && npm run build && npm run link","deploy:dev":"STAGE=dev cdk deploy","destroy:dev":"STAGE=dev cdk destroy","release:patch":"bumper release patch","release:minor":"bumper release minor","release:major":"bumper release major","release:dry-run":"bumper release patch --dry-run","changelog:preview":"bumper preview","changelog:generate":"bumper generate","validate:commits":"bumper validate","release:check":"npm run validate:commits && npm run test && npm run build","release:full":"npm run release:check && npm run changelog:generate","setup:bumper":"bumper setup","publish:beta":"npm run build && npm publish --tag beta && npm dist-tag add cdk-insights@$npm_package_version latest","publish:alpha":"npm run build && npm publish --tag alpha","publish:canary":"npm run build && npm publish --tag canary","publish:latest":"npm run build && npm publish --tag latest","version:beta":"npm version prerelease --preid=beta","version:alpha":"npm version prerelease --preid=alpha","version:rc":"npm version prerelease --preid=rc","cdk-insights":"node scripts/cdk-insights-wrapper.js",scan:"node scripts/cdk-insights-wrapper.js scan","scan:all":"node scripts/cdk-insights-wrapper.js scan --all","scan:json":"node scripts/cdk-insights-wrapper.js scan --format json","scan:markdown":"node scripts/cdk-insights-wrapper.js scan --format markdown","scan:summary":"node scripts/cdk-insights-wrapper.js scan --format summary","scan:with-issues":"node scripts/cdk-insights-wrapper.js scan --withIssue","cache:clear":"node scripts/cdk-insights-wrapper.js cache clear","cache:status":"node scripts/cdk-insights-wrapper.js cache status","demo:progress":"ts-node src/examples/progress-demo.ts","demo:single-line":"ts-node src/examples/single-line-progress-demo.ts","test:line-clearing":"ts-node src/examples/line-clearing-test.ts"},publishConfig:{access:"public"},keywords:["aws","cdk","cloudformation","analysis","security","cost-optimization","static-analysis","devops","infrastructure","aws-cdk","cloud-security","compliance"],author:"Lee Priest <lee@cdkinsights.dev>",license:"MIT",homepage:"https://github.com/TheLeePriest/cdk-insights",bugs:"https://github.com/TheLeePriest/cdk-insights/issues",repository:{type:"git",url:"git+https://github.com/TheLeePriest/cdk-insights.git"},dependencies:{"@aws-sdk/client-cloudwatch-logs":"^3.840.0","@aws-sdk/client-dynamodb":"^3.788.0","@aws-sdk/client-eventbridge":"^3.790.0","@aws-sdk/client-ssm":"^3.840.0","@inquirer/prompts":"^7.4.1","@middy/core":"^6.1.6","@types/glob":"^8.1.0",axios:"^1.8.4",chalk:"^5.4.1","cli-progress":"^3.12.0","cli-table3":"^0.6.5",dotenv:"^16.5.0",envolution:"^1.4.1",glob:"^11.0.3",inquirer:"^12.5.2",ora:"^8.2.0",strogger:"^2.0.3",yargs:"^17.7.2",zod:"^3.23.8"},devDependencies:{"@biomejs/biome":"^2.0.6","@commitlint/cli":"^19.8.1","@commitlint/config-conventional":"^19.8.1","@types/cli-progress":"^3.11.6","@types/jsonwebtoken":"^9.0.9","@types/node":"^22.14.1","@types/yargs":"^17.0.33","aws-cdk":"^2.1010.0","bumper-cli":"^1.6.0",esbuild:"^0.25.2",husky:"^8.0.3","ts-node":"^10.9.2",typescript:"^5.8.3",vitest:"^3.1.1"},peerDependencies:{"aws-cdk-lib":"^2.190.0","cdk-nag":"^2.35.73",constructs:"^10.4.2"},optionalDependencies:{"@aws-solutions-constructs/aws-apigateway-lambda":"^2.0.0","@aws-solutions-constructs/aws-lambda-stepfunctions":"^2.0.0","@aws-solutions-constructs/aws-s3-lambda":"^2.0.0"}}});var s0e={};Vt(s0e,{CDK_INSIGHTS_ANNOTATION_PREFIX:()=>O0,CDK_INSIGHTS_METADATA_VERSION:()=>k0,CdkInsightsAspect:()=>Ig,ExtremelyHelpfulConsoleLogger:()=>wl,clearCaches:()=>lz,createCdkInsightsAspect:()=>uz,createCdkInsightsLogger:()=>az,createExtremelyHelpfulConsoleLogger:()=>cz,getCacheStats:()=>dz,isCdkDebugEnabled:()=>L0,runAnalysis:()=>r0e});module.exports=Ee(s0e);var fz=_(require("node:fs"));function ec(e,t){return function(){return e.apply(t,arguments)}}var{toString:Dz}=Object.prototype,{getPrototypeOf:Lg}=Object,{iterator:Fl,toStringTag:z0}=Symbol,Il=(e=>t=>{let r=Dz.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Wr=e=>(e=e.toLowerCase(),t=>Il(t)===e),Pl=e=>t=>typeof t===e,{isArray:bi}=Array,vi=Pl("undefined");function tc(e){return e!==null&&!vi(e)&&e.constructor!==null&&!vi(e.constructor)&&Kt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var G0=Wr("ArrayBuffer");function Ez(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&G0(e.buffer),t}var xz=Pl("string"),Kt=Pl("function"),q0=Pl("number"),rc=e=>e!==null&&typeof e=="object",_z=e=>e===!0||e===!1,Rl=e=>{if(Il(e)!=="object")return!1;let t=Lg(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(z0 in e)&&!(Fl in e)},wz=e=>{if(!rc(e)||tc(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Az=Wr("Date"),Tz=Wr("File"),Rz=Wr("Blob"),Fz=Wr("FileList"),Iz=e=>rc(e)&&Kt(e.pipe),Pz=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Kt(e.append)&&((t=Il(e))==="formdata"||t==="object"&&Kt(e.toString)&&e.toString()==="[object FormData]"))},kz=Wr("URLSearchParams"),[Oz,Lz,Nz,Mz]=["ReadableStream","Request","Response","Headers"].map(Wr),Bz=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let s,n;if(typeof e!="object"&&(e=[e]),bi(e))for(s=0,n=e.length;s<n;s++)t.call(null,e[s],s,e);else{if(tc(e))return;let o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length,a;for(s=0;s<i;s++)a=o[s],t.call(null,e[a],a,e)}}function V0(e,t){if(tc(e))return null;t=t.toLowerCase();let r=Object.keys(e),s=r.length,n;for(;s-- >0;)if(n=r[s],t===n.toLowerCase())return n;return null}var Jn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,K0=e=>!vi(e)&&e!==Jn;function Og(){let{caseless:e,skipUndefined:t}=K0(this)&&this||{},r={},s=(n,o)=>{let i=e&&V0(r,o)||o;Rl(r[i])&&Rl(n)?r[i]=Og(r[i],n):Rl(n)?r[i]=Og({},n):bi(n)?r[i]=n.slice():(!t||!vi(n))&&(r[i]=n)};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&sc(arguments[n],s);return r}var jz=(e,t,r,{allOwnKeys:s}={})=>(sc(t,(n,o)=>{r&&Kt(n)?e[o]=ec(n,r):e[o]=n},{allOwnKeys:s}),e),Uz=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$z=(e,t,r,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Wz=(e,t,r,s)=>{let n,o,i,a={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),o=n.length;o-- >0;)i=n[o],(!s||s(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=r!==!1&&Lg(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Hz=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let s=e.indexOf(t,r);return s!==-1&&s===r},zz=e=>{if(!e)return null;if(bi(e))return e;let t=e.length;if(!q0(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Gz=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Lg(Uint8Array)),qz=(e,t)=>{let s=(e&&e[Fl]).call(e),n;for(;(n=s.next())&&!n.done;){let o=n.value;t.call(e,o[0],o[1])}},Vz=(e,t)=>{let r,s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},Kz=Wr("HTMLFormElement"),Jz=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,n){return s.toUpperCase()+n}),H0=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Zz=Wr("RegExp"),J0=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),s={};sc(r,(n,o)=>{let i;(i=t(n,o,e))!==!1&&(s[o]=i||n)}),Object.defineProperties(e,s)},Yz=e=>{J0(e,(t,r)=>{if(Kt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let s=e[r];if(Kt(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Qz=(e,t)=>{let r={},s=n=>{n.forEach(o=>{r[o]=!0})};return bi(e)?s(e):s(String(e).split(t)),r},Xz=()=>{},eG=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function tG(e){return!!(e&&Kt(e.append)&&e[z0]==="FormData"&&e[Fl])}var rG=e=>{let t=new Array(10),r=(s,n)=>{if(rc(s)){if(t.indexOf(s)>=0)return;if(tc(s))return s;if(!("toJSON"in s)){t[n]=s;let o=bi(s)?[]:{};return sc(s,(i,a)=>{let c=r(i,n+1);!vi(c)&&(o[a]=c)}),t[n]=void 0,o}}return s};return r(e,0)},sG=Wr("AsyncFunction"),nG=e=>e&&(rc(e)||Kt(e))&&Kt(e.then)&&Kt(e.catch),Z0=((e,t)=>e?setImmediate:t?((r,s)=>(Jn.addEventListener("message",({source:n,data:o})=>{n===Jn&&o===r&&s.length&&s.shift()()},!1),n=>{s.push(n),Jn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Kt(Jn.postMessage)),oG=typeof queueMicrotask<"u"?queueMicrotask.bind(Jn):typeof process<"u"&&process.nextTick||Z0,iG=e=>e!=null&&Kt(e[Fl]),x={isArray:bi,isArrayBuffer:G0,isBuffer:tc,isFormData:Pz,isArrayBufferView:Ez,isString:xz,isNumber:q0,isBoolean:_z,isObject:rc,isPlainObject:Rl,isEmptyObject:wz,isReadableStream:Oz,isRequest:Lz,isResponse:Nz,isHeaders:Mz,isUndefined:vi,isDate:Az,isFile:Tz,isBlob:Rz,isRegExp:Zz,isFunction:Kt,isStream:Iz,isURLSearchParams:kz,isTypedArray:Gz,isFileList:Fz,forEach:sc,merge:Og,extend:jz,trim:Bz,stripBOM:Uz,inherits:$z,toFlatObject:Wz,kindOf:Il,kindOfTest:Wr,endsWith:Hz,toArray:zz,forEachEntry:qz,matchAll:Vz,isHTMLForm:Kz,hasOwnProperty:H0,hasOwnProp:H0,reduceDescriptors:J0,freezeMethods:Yz,toObjectSet:Qz,toCamelCase:Jz,noop:Xz,toFiniteNumber:eG,findKey:V0,global:Jn,isContextDefined:K0,isSpecCompliantForm:tG,toJSONObject:rG,isAsyncFn:sG,isThenable:nG,setImmediate:Z0,asap:oG,isIterable:iG};function Si(e,t,r,s,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),s&&(this.request=s),n&&(this.response=n,this.status=n.status?n.status:null)}x.inherits(Si,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:x.toJSONObject(this.config),code:this.code,status:this.status}}});var Y0=Si.prototype,Q0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Q0[e]={value:e}});Object.defineProperties(Si,Q0);Object.defineProperty(Y0,"isAxiosError",{value:!0});Si.from=(e,t,r,s,n,o)=>{let i=Object.create(Y0);x.toFlatObject(e,i,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");let a=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return Si.call(i,a,c,r,s,n),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};var J=Si;var r_=_(t_(),1),Hl=r_.default;function th(e){return x.isPlainObject(e)||x.isArray(e)}function n_(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function s_(e,t,r){return e?e.concat(t).map(function(n,o){return n=n_(n),!r&&o?"["+n+"]":n}).join(r?".":""):t}function Gq(e){return x.isArray(e)&&!e.some(th)}var qq=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function Vq(e,t,r){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new(Hl||FormData),r=x.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,h){return!x.isUndefined(h[g])});let s=r.metaTokens,n=r.visitor||l,o=r.dots,i=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(n))throw new TypeError("visitor must be a function");function u(f){if(f===null)return"";if(x.isDate(f))return f.toISOString();if(x.isBoolean(f))return f.toString();if(!c&&x.isBlob(f))throw new J("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(f)||x.isTypedArray(f)?c&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function l(f,g,h){let S=f;if(f&&!h&&typeof f=="object"){if(x.endsWith(g,"{}"))g=s?g:g.slice(0,-2),f=JSON.stringify(f);else if(x.isArray(f)&&Gq(f)||(x.isFileList(f)||x.endsWith(g,"[]"))&&(S=x.toArray(f)))return g=n_(g),S.forEach(function(w,D){!(x.isUndefined(w)||w===null)&&t.append(i===!0?s_([g],D,o):i===null?g:g+"[]",u(w))}),!1}return th(f)?!0:(t.append(s_(h,g,o),u(f)),!1)}let d=[],p=Object.assign(qq,{defaultVisitor:l,convertValue:u,isVisitable:th});function m(f,g){if(!x.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(f),x.forEach(f,function(S,b){(!(x.isUndefined(S)||S===null)&&n.call(t,S,x.isString(b)?b.trim():b,g,p))===!0&&m(S,g?g.concat(b):[b])}),d.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return m(e),t}var tn=Vq;function o_(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function i_(e,t){this._pairs=[],e&&tn(e,this,t)}var a_=i_.prototype;a_.append=function(t,r){this._pairs.push([t,r])};a_.toString=function(t){let r=t?function(s){return t.call(this,s,o_)}:o_;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var c_=i_;function Kq(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Yn(e,t,r){if(!t)return e;let s=r&&r.encode||Kq;x.isFunction(r)&&(r={serialize:r});let n=r&&r.serialize,o;if(n?o=n(t,r):o=x.isURLSearchParams(t)?t.toString():new c_(t,r).toString(s),o){let i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var rh=class{constructor(){this.handlers=[]}use(t,r,s){return this.handlers.push({fulfilled:t,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){x.forEach(this.handlers,function(s){s!==null&&t(s)})}},sh=rh;var _i={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var p_=_(require("crypto"),1);var u_=_(require("url"),1),l_=u_.default.URLSearchParams;var nh="abcdefghijklmnopqrstuvwxyz",d_="0123456789",m_={DIGIT:d_,ALPHA:nh,ALPHA_DIGIT:nh+nh.toUpperCase()+d_},Jq=(e=16,t=m_.ALPHA_DIGIT)=>{let r="",{length:s}=t,n=new Uint32Array(e);p_.default.randomFillSync(n);for(let o=0;o<e;o++)r+=t[n[o]%s];return r},f_={isNode:!0,classes:{URLSearchParams:l_,FormData:Hl,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:m_,generateString:Jq,protocols:["http","https","file","data"]};var ah={};Vt(ah,{hasBrowserEnv:()=>ih,hasStandardBrowserEnv:()=>Zq,hasStandardBrowserWebWorkerEnv:()=>Yq,navigator:()=>oh,origin:()=>Qq});var ih=typeof window<"u"&&typeof document<"u",oh=typeof navigator=="object"&&navigator||void 0,Zq=ih&&(!oh||["ReactNative","NativeScript","NS"].indexOf(oh.product)<0),Yq=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Qq=ih&&window.location.href||"http://localhost";var Ie={...ah,...f_};function ch(e,t){return tn(e,new Ie.classes.URLSearchParams,{visitor:function(r,s,n,o){return Ie.isNode&&x.isBuffer(r)?(this.append(s,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Xq(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function eV(e){let t={},r=Object.keys(e),s,n=r.length,o;for(s=0;s<n;s++)o=r[s],t[o]=e[o];return t}function tV(e){function t(r,s,n,o){let i=r[o++];if(i==="__proto__")return!0;let a=Number.isFinite(+i),c=o>=r.length;return i=!i&&x.isArray(n)?n.length:i,c?(x.hasOwnProp(n,i)?n[i]=[n[i],s]:n[i]=s,!a):((!n[i]||!x.isObject(n[i]))&&(n[i]=[]),t(r,s,n[i],o)&&x.isArray(n[i])&&(n[i]=eV(n[i])),!a)}if(x.isFormData(e)&&x.isFunction(e.entries)){let r={};return x.forEachEntry(e,(s,n)=>{t(Xq(s),n,r,0)}),r}return null}var zl=tV;function rV(e,t,r){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(e)}var uh={transitional:_i,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let s=r.getContentType()||"",n=s.indexOf("application/json")>-1,o=x.isObject(t);if(o&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return n?JSON.stringify(zl(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(s.indexOf("application/x-www-form-urlencoded")>-1)return ch(t,this.formSerializer).toString();if((a=x.isFileList(t))||s.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return tn(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||n?(r.setContentType("application/json",!1),rV(t)):t}],transformResponse:[function(t){let r=this.transitional||uh.transitional,s=r&&r.forcedJSONParsing,n=this.responseType==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.isString(t)&&(s&&!this.responseType||n)){let i=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?J.from(a,J.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ie.classes.FormData,Blob:Ie.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch"],e=>{uh.headers[e]={}});var wi=uh;var sV=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),g_=e=>{let t={},r,s,n;return e&&e.split(`
134
+ `)[0].length}};Dg.reset=()=>Qs.reset();function b0(e,t,r){let s=[];e.forEach(function(o){s.push(o.draw(t))});let n=s.join("");n.length&&r.push(n)}LH.exports=Dg});var BH=C((C4e,MH)=>{MH.exports=NH()});var S0=C((E4e,tDe)=>{tDe.exports={name:"cdk-insights",version:"0.15.1",description:"AWS CDK security and cost analysis tool with AI-powered insights",main:"dist/index.js",types:"dist/index.d.ts",bin:{"cdk-insights":"dist/entry.js"},exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.js"}},files:["dist/**/*","README.md","LICENSE"],scripts:{test:"vitest --run",lint:"biome lint src/",format:"biome format --write src/",check:"biome check src/",build:"ts-node scripts/build.ts",start:"node dist/index.js",dev:"ts-node src/index.ts",prepare:"husky install && npm run build","start:dev":"CDK_ENV=local ts-node src/index.ts","ai-run":"ts-node src/index.ts",unlink:"npm unlink -g cdk-insights",link:"npm link","prepare:test":"npm run unlink && npm run build && npm run link","deploy:dev":"STAGE=dev cdk deploy","destroy:dev":"STAGE=dev cdk destroy","release:patch":"bumper release patch","release:minor":"bumper release minor","release:major":"bumper release major","release:dry-run":"bumper release patch --dry-run","changelog:preview":"bumper preview","changelog:generate":"bumper generate","validate:commits":"bumper validate","release:check":"npm run validate:commits && npm run test && npm run build","release:full":"npm run release:check && npm run changelog:generate","setup:bumper":"bumper setup","publish:beta":"npm run build && npm publish --tag beta && npm dist-tag add cdk-insights@$npm_package_version latest","publish:alpha":"npm run build && npm publish --tag alpha","publish:canary":"npm run build && npm publish --tag canary","publish:latest":"npm run build && npm publish --tag latest","version:beta":"npm version prerelease --preid=beta","version:alpha":"npm version prerelease --preid=alpha","version:rc":"npm version prerelease --preid=rc","cdk-insights":"node scripts/cdk-insights-wrapper.js",scan:"node scripts/cdk-insights-wrapper.js scan","scan:all":"node scripts/cdk-insights-wrapper.js scan --all","scan:json":"node scripts/cdk-insights-wrapper.js scan --format json","scan:markdown":"node scripts/cdk-insights-wrapper.js scan --format markdown","scan:summary":"node scripts/cdk-insights-wrapper.js scan --format summary","scan:with-issues":"node scripts/cdk-insights-wrapper.js scan --withIssue","cache:clear":"node scripts/cdk-insights-wrapper.js cache clear","cache:status":"node scripts/cdk-insights-wrapper.js cache status","demo:progress":"ts-node src/examples/progress-demo.ts","demo:single-line":"ts-node src/examples/single-line-progress-demo.ts","test:line-clearing":"ts-node src/examples/line-clearing-test.ts"},publishConfig:{access:"public"},keywords:["aws","cdk","cloudformation","analysis","security","cost-optimization","static-analysis","devops","infrastructure","aws-cdk","cloud-security","compliance"],author:"Lee Priest <lee@cdkinsights.dev>",license:"MIT",homepage:"https://github.com/TheLeePriest/cdk-insights",bugs:"https://github.com/TheLeePriest/cdk-insights/issues",repository:{type:"git",url:"git+https://github.com/TheLeePriest/cdk-insights.git"},dependencies:{"@aws-sdk/client-cloudwatch-logs":"^3.840.0","@aws-sdk/client-dynamodb":"^3.788.0","@aws-sdk/client-eventbridge":"^3.790.0","@aws-sdk/client-ssm":"^3.840.0","@inquirer/prompts":"^7.4.1","@middy/core":"^6.1.6","@types/glob":"^8.1.0",axios:"^1.8.4",chalk:"^5.4.1","cli-progress":"^3.12.0","cli-table3":"^0.6.5",dotenv:"^16.5.0",envolution:"^1.4.1",glob:"^11.0.3",inquirer:"^12.5.2",ora:"^8.2.0",strogger:"^2.0.3",yargs:"^17.7.2",zod:"^3.23.8"},devDependencies:{"@biomejs/biome":"^2.0.6","@commitlint/cli":"^19.8.1","@commitlint/config-conventional":"^19.8.1","@types/cli-progress":"^3.11.6","@types/jsonwebtoken":"^9.0.9","@types/node":"^22.14.1","@types/yargs":"^17.0.33","aws-cdk":"^2.1010.0","bumper-cli":"^1.6.0",esbuild:"^0.25.2",husky:"^8.0.3","ts-node":"^10.9.2",typescript:"^5.8.3",vitest:"^3.1.1"},peerDependencies:{"aws-cdk-lib":"^2.190.0","cdk-nag":"^2.35.73",constructs:"^10.4.2"},optionalDependencies:{"@aws-solutions-constructs/aws-apigateway-lambda":"^2.0.0","@aws-solutions-constructs/aws-lambda-stepfunctions":"^2.0.0","@aws-solutions-constructs/aws-s3-lambda":"^2.0.0"}}});var s0e={};Vt(s0e,{CDK_INSIGHTS_ANNOTATION_PREFIX:()=>O0,CDK_INSIGHTS_METADATA_VERSION:()=>k0,CdkInsightsAspect:()=>Ig,ExtremelyHelpfulConsoleLogger:()=>wl,clearCaches:()=>lz,createCdkInsightsAspect:()=>uz,createCdkInsightsLogger:()=>az,createExtremelyHelpfulConsoleLogger:()=>cz,getCacheStats:()=>dz,isCdkDebugEnabled:()=>L0,runAnalysis:()=>r0e});module.exports=Ee(s0e);var fz=_(require("node:fs"));function ec(e,t){return function(){return e.apply(t,arguments)}}var{toString:Dz}=Object.prototype,{getPrototypeOf:Lg}=Object,{iterator:Fl,toStringTag:z0}=Symbol,Il=(e=>t=>{let r=Dz.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Wr=e=>(e=e.toLowerCase(),t=>Il(t)===e),Pl=e=>t=>typeof t===e,{isArray:bi}=Array,vi=Pl("undefined");function tc(e){return e!==null&&!vi(e)&&e.constructor!==null&&!vi(e.constructor)&&Kt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var G0=Wr("ArrayBuffer");function Ez(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&G0(e.buffer),t}var xz=Pl("string"),Kt=Pl("function"),q0=Pl("number"),rc=e=>e!==null&&typeof e=="object",_z=e=>e===!0||e===!1,Rl=e=>{if(Il(e)!=="object")return!1;let t=Lg(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(z0 in e)&&!(Fl in e)},wz=e=>{if(!rc(e)||tc(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Az=Wr("Date"),Tz=Wr("File"),Rz=Wr("Blob"),Fz=Wr("FileList"),Iz=e=>rc(e)&&Kt(e.pipe),Pz=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Kt(e.append)&&((t=Il(e))==="formdata"||t==="object"&&Kt(e.toString)&&e.toString()==="[object FormData]"))},kz=Wr("URLSearchParams"),[Oz,Lz,Nz,Mz]=["ReadableStream","Request","Response","Headers"].map(Wr),Bz=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let s,n;if(typeof e!="object"&&(e=[e]),bi(e))for(s=0,n=e.length;s<n;s++)t.call(null,e[s],s,e);else{if(tc(e))return;let o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length,a;for(s=0;s<i;s++)a=o[s],t.call(null,e[a],a,e)}}function V0(e,t){if(tc(e))return null;t=t.toLowerCase();let r=Object.keys(e),s=r.length,n;for(;s-- >0;)if(n=r[s],t===n.toLowerCase())return n;return null}var Jn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,K0=e=>!vi(e)&&e!==Jn;function Og(){let{caseless:e,skipUndefined:t}=K0(this)&&this||{},r={},s=(n,o)=>{let i=e&&V0(r,o)||o;Rl(r[i])&&Rl(n)?r[i]=Og(r[i],n):Rl(n)?r[i]=Og({},n):bi(n)?r[i]=n.slice():(!t||!vi(n))&&(r[i]=n)};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&sc(arguments[n],s);return r}var jz=(e,t,r,{allOwnKeys:s}={})=>(sc(t,(n,o)=>{r&&Kt(n)?e[o]=ec(n,r):e[o]=n},{allOwnKeys:s}),e),Uz=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$z=(e,t,r,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Wz=(e,t,r,s)=>{let n,o,i,a={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),o=n.length;o-- >0;)i=n[o],(!s||s(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=r!==!1&&Lg(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Hz=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let s=e.indexOf(t,r);return s!==-1&&s===r},zz=e=>{if(!e)return null;if(bi(e))return e;let t=e.length;if(!q0(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Gz=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Lg(Uint8Array)),qz=(e,t)=>{let s=(e&&e[Fl]).call(e),n;for(;(n=s.next())&&!n.done;){let o=n.value;t.call(e,o[0],o[1])}},Vz=(e,t)=>{let r,s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},Kz=Wr("HTMLFormElement"),Jz=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,n){return s.toUpperCase()+n}),H0=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Zz=Wr("RegExp"),J0=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),s={};sc(r,(n,o)=>{let i;(i=t(n,o,e))!==!1&&(s[o]=i||n)}),Object.defineProperties(e,s)},Yz=e=>{J0(e,(t,r)=>{if(Kt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let s=e[r];if(Kt(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Qz=(e,t)=>{let r={},s=n=>{n.forEach(o=>{r[o]=!0})};return bi(e)?s(e):s(String(e).split(t)),r},Xz=()=>{},eG=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function tG(e){return!!(e&&Kt(e.append)&&e[z0]==="FormData"&&e[Fl])}var rG=e=>{let t=new Array(10),r=(s,n)=>{if(rc(s)){if(t.indexOf(s)>=0)return;if(tc(s))return s;if(!("toJSON"in s)){t[n]=s;let o=bi(s)?[]:{};return sc(s,(i,a)=>{let c=r(i,n+1);!vi(c)&&(o[a]=c)}),t[n]=void 0,o}}return s};return r(e,0)},sG=Wr("AsyncFunction"),nG=e=>e&&(rc(e)||Kt(e))&&Kt(e.then)&&Kt(e.catch),Z0=((e,t)=>e?setImmediate:t?((r,s)=>(Jn.addEventListener("message",({source:n,data:o})=>{n===Jn&&o===r&&s.length&&s.shift()()},!1),n=>{s.push(n),Jn.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Kt(Jn.postMessage)),oG=typeof queueMicrotask<"u"?queueMicrotask.bind(Jn):typeof process<"u"&&process.nextTick||Z0,iG=e=>e!=null&&Kt(e[Fl]),x={isArray:bi,isArrayBuffer:G0,isBuffer:tc,isFormData:Pz,isArrayBufferView:Ez,isString:xz,isNumber:q0,isBoolean:_z,isObject:rc,isPlainObject:Rl,isEmptyObject:wz,isReadableStream:Oz,isRequest:Lz,isResponse:Nz,isHeaders:Mz,isUndefined:vi,isDate:Az,isFile:Tz,isBlob:Rz,isRegExp:Zz,isFunction:Kt,isStream:Iz,isURLSearchParams:kz,isTypedArray:Gz,isFileList:Fz,forEach:sc,merge:Og,extend:jz,trim:Bz,stripBOM:Uz,inherits:$z,toFlatObject:Wz,kindOf:Il,kindOfTest:Wr,endsWith:Hz,toArray:zz,forEachEntry:qz,matchAll:Vz,isHTMLForm:Kz,hasOwnProperty:H0,hasOwnProp:H0,reduceDescriptors:J0,freezeMethods:Yz,toObjectSet:Qz,toCamelCase:Jz,noop:Xz,toFiniteNumber:eG,findKey:V0,global:Jn,isContextDefined:K0,isSpecCompliantForm:tG,toJSONObject:rG,isAsyncFn:sG,isThenable:nG,setImmediate:Z0,asap:oG,isIterable:iG};function Si(e,t,r,s,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),s&&(this.request=s),n&&(this.response=n,this.status=n.status?n.status:null)}x.inherits(Si,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:x.toJSONObject(this.config),code:this.code,status:this.status}}});var Y0=Si.prototype,Q0={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Q0[e]={value:e}});Object.defineProperties(Si,Q0);Object.defineProperty(Y0,"isAxiosError",{value:!0});Si.from=(e,t,r,s,n,o)=>{let i=Object.create(Y0);x.toFlatObject(e,i,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");let a=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return Si.call(i,a,c,r,s,n),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};var J=Si;var r_=_(t_(),1),Hl=r_.default;function th(e){return x.isPlainObject(e)||x.isArray(e)}function n_(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function s_(e,t,r){return e?e.concat(t).map(function(n,o){return n=n_(n),!r&&o?"["+n+"]":n}).join(r?".":""):t}function Gq(e){return x.isArray(e)&&!e.some(th)}var qq=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function Vq(e,t,r){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new(Hl||FormData),r=x.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,h){return!x.isUndefined(h[g])});let s=r.metaTokens,n=r.visitor||l,o=r.dots,i=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(n))throw new TypeError("visitor must be a function");function u(f){if(f===null)return"";if(x.isDate(f))return f.toISOString();if(x.isBoolean(f))return f.toString();if(!c&&x.isBlob(f))throw new J("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(f)||x.isTypedArray(f)?c&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function l(f,g,h){let S=f;if(f&&!h&&typeof f=="object"){if(x.endsWith(g,"{}"))g=s?g:g.slice(0,-2),f=JSON.stringify(f);else if(x.isArray(f)&&Gq(f)||(x.isFileList(f)||x.endsWith(g,"[]"))&&(S=x.toArray(f)))return g=n_(g),S.forEach(function(w,D){!(x.isUndefined(w)||w===null)&&t.append(i===!0?s_([g],D,o):i===null?g:g+"[]",u(w))}),!1}return th(f)?!0:(t.append(s_(h,g,o),u(f)),!1)}let d=[],p=Object.assign(qq,{defaultVisitor:l,convertValue:u,isVisitable:th});function m(f,g){if(!x.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(f),x.forEach(f,function(S,b){(!(x.isUndefined(S)||S===null)&&n.call(t,S,x.isString(b)?b.trim():b,g,p))===!0&&m(S,g?g.concat(b):[b])}),d.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return m(e),t}var tn=Vq;function o_(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function i_(e,t){this._pairs=[],e&&tn(e,this,t)}var a_=i_.prototype;a_.append=function(t,r){this._pairs.push([t,r])};a_.toString=function(t){let r=t?function(s){return t.call(this,s,o_)}:o_;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var c_=i_;function Kq(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Yn(e,t,r){if(!t)return e;let s=r&&r.encode||Kq;x.isFunction(r)&&(r={serialize:r});let n=r&&r.serialize,o;if(n?o=n(t,r):o=x.isURLSearchParams(t)?t.toString():new c_(t,r).toString(s),o){let i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var rh=class{constructor(){this.handlers=[]}use(t,r,s){return this.handlers.push({fulfilled:t,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){x.forEach(this.handlers,function(s){s!==null&&t(s)})}},sh=rh;var _i={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var p_=_(require("crypto"),1);var u_=_(require("url"),1),l_=u_.default.URLSearchParams;var nh="abcdefghijklmnopqrstuvwxyz",d_="0123456789",m_={DIGIT:d_,ALPHA:nh,ALPHA_DIGIT:nh+nh.toUpperCase()+d_},Jq=(e=16,t=m_.ALPHA_DIGIT)=>{let r="",{length:s}=t,n=new Uint32Array(e);p_.default.randomFillSync(n);for(let o=0;o<e;o++)r+=t[n[o]%s];return r},f_={isNode:!0,classes:{URLSearchParams:l_,FormData:Hl,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:m_,generateString:Jq,protocols:["http","https","file","data"]};var ah={};Vt(ah,{hasBrowserEnv:()=>ih,hasStandardBrowserEnv:()=>Zq,hasStandardBrowserWebWorkerEnv:()=>Yq,navigator:()=>oh,origin:()=>Qq});var ih=typeof window<"u"&&typeof document<"u",oh=typeof navigator=="object"&&navigator||void 0,Zq=ih&&(!oh||["ReactNative","NativeScript","NS"].indexOf(oh.product)<0),Yq=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Qq=ih&&window.location.href||"http://localhost";var Ie={...ah,...f_};function ch(e,t){return tn(e,new Ie.classes.URLSearchParams,{visitor:function(r,s,n,o){return Ie.isNode&&x.isBuffer(r)?(this.append(s,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Xq(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function eV(e){let t={},r=Object.keys(e),s,n=r.length,o;for(s=0;s<n;s++)o=r[s],t[o]=e[o];return t}function tV(e){function t(r,s,n,o){let i=r[o++];if(i==="__proto__")return!0;let a=Number.isFinite(+i),c=o>=r.length;return i=!i&&x.isArray(n)?n.length:i,c?(x.hasOwnProp(n,i)?n[i]=[n[i],s]:n[i]=s,!a):((!n[i]||!x.isObject(n[i]))&&(n[i]=[]),t(r,s,n[i],o)&&x.isArray(n[i])&&(n[i]=eV(n[i])),!a)}if(x.isFormData(e)&&x.isFunction(e.entries)){let r={};return x.forEachEntry(e,(s,n)=>{t(Xq(s),n,r,0)}),r}return null}var zl=tV;function rV(e,t,r){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(e)}var uh={transitional:_i,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let s=r.getContentType()||"",n=s.indexOf("application/json")>-1,o=x.isObject(t);if(o&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return n?JSON.stringify(zl(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(s.indexOf("application/x-www-form-urlencoded")>-1)return ch(t,this.formSerializer).toString();if((a=x.isFileList(t))||s.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return tn(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||n?(r.setContentType("application/json",!1),rV(t)):t}],transformResponse:[function(t){let r=this.transitional||uh.transitional,s=r&&r.forcedJSONParsing,n=this.responseType==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.isString(t)&&(s&&!this.responseType||n)){let i=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?J.from(a,J.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ie.classes.FormData,Blob:Ie.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch"],e=>{uh.headers[e]={}});var wi=uh;var sV=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),g_=e=>{let t={},r,s,n;return e&&e.split(`
135
135
  `).forEach(function(i){n=i.indexOf(":"),r=i.substring(0,n).trim().toLowerCase(),s=i.substring(n+1).trim(),!(!r||t[r]&&sV[r])&&(r==="set-cookie"?t[r]?t[r].push(s):t[r]=[s]:t[r]=t[r]?t[r]+", "+s:s)}),t};var h_=Symbol("internals");function cc(e){return e&&String(e).trim().toLowerCase()}function Gl(e){return e===!1||e==null?e:x.isArray(e)?e.map(Gl):String(e)}function nV(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,s;for(;s=r.exec(e);)t[s[1]]=s[2];return t}var oV=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function lh(e,t,r,s,n){if(x.isFunction(s))return s.call(this,t,r);if(n&&(t=r),!!x.isString(t)){if(x.isString(s))return t.indexOf(s)!==-1;if(x.isRegExp(s))return s.test(t)}}function iV(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,s)=>r.toUpperCase()+s)}function aV(e,t){let r=x.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+r,{value:function(n,o,i){return this[s].call(this,t,n,o,i)},configurable:!0})})}var Ai=class{constructor(t){t&&this.set(t)}set(t,r,s){let n=this;function o(a,c,u){let l=cc(c);if(!l)throw new Error("header name must be a non-empty string");let d=x.findKey(n,l);(!d||n[d]===void 0||u===!0||u===void 0&&n[d]!==!1)&&(n[d||c]=Gl(a))}let i=(a,c)=>x.forEach(a,(u,l)=>o(u,l,c));if(x.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(x.isString(t)&&(t=t.trim())&&!oV(t))i(g_(t),r);else if(x.isObject(t)&&x.isIterable(t)){let a={},c,u;for(let l of t){if(!x.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[u=l[0]]=(c=a[u])?x.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}i(a,r)}else t!=null&&o(r,t,s);return this}get(t,r){if(t=cc(t),t){let s=x.findKey(this,t);if(s){let n=this[s];if(!r)return n;if(r===!0)return nV(n);if(x.isFunction(r))return r.call(this,n,s);if(x.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=cc(t),t){let s=x.findKey(this,t);return!!(s&&this[s]!==void 0&&(!r||lh(this,this[s],s,r)))}return!1}delete(t,r){let s=this,n=!1;function o(i){if(i=cc(i),i){let a=x.findKey(s,i);a&&(!r||lh(s,s[a],a,r))&&(delete s[a],n=!0)}}return x.isArray(t)?t.forEach(o):o(t),n}clear(t){let r=Object.keys(this),s=r.length,n=!1;for(;s--;){let o=r[s];(!t||lh(this,this[o],o,t,!0))&&(delete this[o],n=!0)}return n}normalize(t){let r=this,s={};return x.forEach(this,(n,o)=>{let i=x.findKey(s,o);if(i){r[i]=Gl(n),delete r[o];return}let a=t?iV(o):String(o).trim();a!==o&&delete r[o],r[a]=Gl(n),s[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return x.forEach(this,(s,n)=>{s!=null&&s!==!1&&(r[n]=t&&x.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
136
136
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let s=new this(t);return r.forEach(n=>s.set(n)),s}static accessor(t){let s=(this[h_]=this[h_]={accessors:{}}).accessors,n=this.prototype;function o(i){let a=cc(i);s[a]||(aV(n,i),s[a]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}};Ai.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(Ai.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}});x.freezeMethods(Ai);var Ke=Ai;function uc(e,t){let r=this||wi,s=t||r,n=Ke.from(s.headers),o=s.data;return x.forEach(e,function(a){o=a.call(r,o,n.normalize(),t?t.status:void 0)}),n.normalize(),o}function lc(e){return!!(e&&e.__CANCEL__)}function y_(e,t,r){J.call(this,e??"canceled",J.ERR_CANCELED,t,r),this.name="CanceledError"}x.inherits(y_,J,{__CANCEL__:!0});var or=y_;function ss(e,t,r){let s=r.config.validateStatus;!r.status||!s||s(r.status)?e(r):t(new J("Request failed with status code "+r.status,[J.ERR_BAD_REQUEST,J.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function dh(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ph(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Qn(e,t,r){let s=!dh(t);return e&&(s||r==!1)?ph(e,t):t}var ew=_(b_(),1),tw=_(require("http"),1),rw=_(require("https"),1),Mh=_(require("http2"),1),Bh=_(require("util"),1),sw=_(B_(),1),As=_(require("zlib"),1);var ro="1.13.2";function gc(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var qV=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Rh(e,t,r){let s=r&&r.Blob||Ie.classes.Blob,n=gc(e);if(t===void 0&&s&&(t=!0),n==="data"){e=n.length?e.slice(n.length+1):e;let o=qV.exec(e);if(!o)throw new J("Invalid URL",J.ERR_INVALID_URL);let i=o[1],a=o[2],c=o[3],u=Buffer.from(decodeURIComponent(c),a?"base64":"utf8");if(t){if(!s)throw new J("Blob is not supported",J.ERR_NOT_SUPPORT);return new s([u],{type:i})}return u}throw new J("Unsupported protocol "+n,J.ERR_NOT_SUPPORT)}var ws=_(require("stream"),1);var j_=_(require("stream"),1);var Fh=Symbol("internals"),Ih=class extends j_.default.Transform{constructor(t){t=x.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(s,n)=>!x.isUndefined(n[s])),super({readableHighWaterMark:t.chunkSize});let r=this[Fh]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",s=>{s==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(t){let r=this[Fh];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,s){let n=this[Fh],o=n.maxRate,i=this.readableHighWaterMark,a=n.timeWindow,c=1e3/a,u=o/c,l=n.minChunkSize!==!1?Math.max(n.minChunkSize,u*.01):0,d=(m,f)=>{let g=Buffer.byteLength(m);n.bytesSeen+=g,n.bytes+=g,n.isCaptured&&this.emit("progress",n.bytesSeen),this.push(m)?process.nextTick(f):n.onReadCallback=()=>{n.onReadCallback=null,process.nextTick(f)}},p=(m,f)=>{let g=Buffer.byteLength(m),h=null,S=i,b,w=0;if(o){let D=Date.now();(!n.ts||(w=D-n.ts)>=a)&&(n.ts=D,b=u-n.bytes,n.bytes=b<0?-b:0,w=0),b=u-n.bytes}if(o){if(b<=0)return setTimeout(()=>{f(null,m)},a-w);b<S&&(S=b)}S&&g>S&&g-S>l&&(h=m.subarray(S),m=m.subarray(0,S)),d(m,h?()=>{process.nextTick(f,null,h)}:f)};p(t,function m(f,g){if(f)return s(f);g?p(g,m):s(null)})}},Ph=Ih;var nw=require("events");var $_=_(require("util"),1),W_=require("stream");var{asyncIterator:U_}=Symbol,VV=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[U_]?yield*e[U_]():yield e},Zl=VV;var KV=Ie.ALPHABET.ALPHA_DIGIT+"-_",hc=typeof TextEncoder=="function"?new TextEncoder:new $_.default.TextEncoder,so=`\r
137
137
  `,JV=hc.encode(so),ZV=2,kh=class{constructor(t,r){let{escapeName:s}=this.constructor,n=x.isString(r),o=`Content-Disposition: form-data; name="${s(t)}"${!n&&r.name?`; filename="${s(r.name)}"`:""}${so}`;n?r=hc.encode(String(r).replace(/\r?\n|\r\n?/g,so)):o+=`Content-Type: ${r.type||"application/octet-stream"}${so}`,this.headers=hc.encode(o+so),this.contentLength=n?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+ZV,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;x.isTypedArray(t)?yield t:yield*Zl(t),yield JV}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},YV=(e,t,r)=>{let{tag:s="form-data-boundary",size:n=25,boundary:o=s+"-"+Ie.generateString(n,KV)}=r||{};if(!x.isFormData(e))throw TypeError("FormData instance required");if(o.length<1||o.length>70)throw Error("boundary must be 10-70 characters long");let i=hc.encode("--"+o+so),a=hc.encode("--"+o+"--"+so),c=a.byteLength,u=Array.from(e.entries()).map(([d,p])=>{let m=new kh(d,p);return c+=m.size,m});c+=i.byteLength*u.length,c=x.toFiniteNumber(c);let l={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(c)&&(l["Content-Length"]=c),t&&t(l),W_.Readable.from(async function*(){for(let d of u)yield i,yield*d.encode();yield a}())},H_=YV;var z_=_(require("stream"),1),Oh=class extends z_.default.Transform{__transform(t,r,s){this.push(t),s()}_transform(t,r,s){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let n=Buffer.alloc(2);n[0]=120,n[1]=156,this.push(n,r)}this.__transform(t,r,s)}},G_=Oh;var QV=(e,t)=>x.isAsyncFn(e)?function(...r){let s=r.pop();e.apply(this,r).then(n=>{try{t?s(null,...t(n)):s(null,n)}catch(o){s(o)}},s)}:e,q_=QV;function XV(e,t){e=e||10;let r=new Array(e),s=new Array(e),n=0,o=0,i;return t=t!==void 0?t:1e3,function(c){let u=Date.now(),l=s[o];i||(i=u),r[n]=c,s[n]=u;let d=o,p=0;for(;d!==n;)p+=r[d++],d=d%e;if(n=(n+1)%e,n===o&&(o=(o+1)%e),u-i<t)return;let m=l&&u-l;return m?Math.round(p*1e3/m):void 0}}var V_=XV;function e9(e,t){let r=0,s=1e3/t,n,o,i=(u,l=Date.now())=>{r=l,n=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{let l=Date.now(),d=l-r;d>=s?i(u,l):(n=u,o||(o=setTimeout(()=>{o=null,i(n)},s-d)))},()=>n&&i(n)]}var K_=e9;var _s=(e,t,r=3)=>{let s=0,n=V_(50,250);return K_(o=>{let i=o.loaded,a=o.lengthComputable?o.total:void 0,c=i-s,u=n(c),l=i<=a;s=i;let d={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&l?(a-i)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},r)},Pi=(e,t)=>{let r=e!=null;return[s=>t[0]({lengthComputable:r,total:e,loaded:s}),t[1]]},ki=e=>(...t)=>x.asap(()=>e(...t));function Lh(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;let t=e.indexOf(",");if(t<0)return 0;let r=e.slice(5,t),s=e.slice(t+1);if(/;base64/i.test(r)){let o=s.length,i=s.length;for(let p=0;p<i;p++)if(s.charCodeAt(p)===37&&p+2<i){let m=s.charCodeAt(p+1),f=s.charCodeAt(p+2);(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102)&&(f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102)&&(o-=2,p+=2)}let a=0,c=i-1,u=p=>p>=2&&s.charCodeAt(p-2)===37&&s.charCodeAt(p-1)===51&&(s.charCodeAt(p)===68||s.charCodeAt(p)===100);c>=0&&(s.charCodeAt(c)===61?(a++,c--):u(c)&&(a++,c-=3)),a===1&&c>=0&&(s.charCodeAt(c)===61||u(c))&&a++;let d=Math.floor(o/4)*3-(a||0);return d>0?d:0}return Buffer.byteLength(s,"utf8")}var J_={flush:As.default.constants.Z_SYNC_FLUSH,finishFlush:As.default.constants.Z_SYNC_FLUSH},t9={flush:As.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:As.default.constants.BROTLI_OPERATION_FLUSH},Z_=x.isFunction(As.default.createBrotliDecompress),{http:r9,https:s9}=sw.default,n9=/https:?/,Y_=Ie.protocols.map(e=>e+":"),Q_=(e,[t,r])=>(e.on("end",r).on("error",r),t),Nh=class{constructor(){this.sessions=Object.create(null)}getSession(t,r){r=Object.assign({sessionTimeout:1e3},r);let s=this.sessions[t];if(s){let l=s.length;for(let d=0;d<l;d++){let[p,m]=s[d];if(!p.destroyed&&!p.closed&&Bh.default.isDeepStrictEqual(m,r))return p}}let n=Mh.default.connect(t,r),o,i=()=>{if(o)return;o=!0;let l=s,d=l.length,p=d;for(;p--;)if(l[p][0]===n){d===1?delete this.sessions[t]:l.splice(p,1);return}},a=n.request,{sessionTimeout:c}=r;if(c!=null){let l,d=0;n.request=function(){let p=a.apply(this,arguments);return d++,l&&(clearTimeout(l),l=null),p.once("close",()=>{--d||(l=setTimeout(()=>{l=null,i()},c))}),p}}n.once("close",i);let u=[n,r];return s?s.push(u):s=this.sessions[t]=[u],n}},o9=new Nh;function i9(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function ow(e,t,r){let s=t;if(!s&&s!==!1){let n=ew.default.getProxyForUrl(r);n&&(s=new URL(n))}if(s){if(s.username&&(s.auth=(s.username||"")+":"+(s.password||"")),s.auth){(s.auth.username||s.auth.password)&&(s.auth=(s.auth.username||"")+":"+(s.auth.password||""));let o=Buffer.from(s.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+o}e.headers.host=e.hostname+(e.port?":"+e.port:"");let n=s.hostname||s.host;e.hostname=n,e.host=n,e.port=s.port,e.path=r,s.protocol&&(e.protocol=s.protocol.includes(":")?s.protocol:`${s.protocol}:`)}e.beforeRedirects.proxy=function(o){ow(o,t,o.href)}}var a9=typeof process<"u"&&x.kindOf(process)==="process",c9=e=>new Promise((t,r)=>{let s,n,o=(c,u)=>{n||(n=!0,s&&s(c,u))},i=c=>{o(c),t(c)},a=c=>{o(c,!0),r(c)};e(i,a,c=>s=c).catch(a)}),u9=({address:e,family:t})=>{if(!x.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},X_=(e,t)=>u9(x.isObject(e)?e:{address:e,family:t}),l9={request(e,t){let r=e.protocol+"//"+e.hostname+":"+(e.port||80),{http2Options:s,headers:n}=e,o=o9.getSession(r,s),{HTTP2_HEADER_SCHEME:i,HTTP2_HEADER_METHOD:a,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:u}=Mh.default.constants,l={[i]:e.protocol.replace(":",""),[a]:e.method,[c]:e.path};x.forEach(n,(p,m)=>{m.charAt(0)!==":"&&(l[m]=p)});let d=o.request(l);return d.once("response",p=>{let m=d;p=Object.assign({},p);let f=p[u];delete p[u],m.headers=p,m.statusCode=+f,t(m)}),d}},iw=a9&&function(t){return c9(async function(s,n,o){let{data:i,lookup:a,family:c,httpVersion:u=1,http2Options:l}=t,{responseType:d,responseEncoding:p}=t,m=t.method.toUpperCase(),f,g=!1,h;if(u=+u,Number.isNaN(u))throw TypeError(`Invalid protocol version: '${t.httpVersion}' is not a number`);if(u!==1&&u!==2)throw TypeError(`Unsupported protocol version '${u}'`);let S=u===2;if(a){let te=q_(a,Y=>x.isArray(Y)?Y:[Y]);a=(Y,ce,we)=>{te(Y,ce,(De,Qe,qt)=>{if(De)return we(De);let lt=x.isArray(Qe)?Qe.map(hi=>X_(hi)):[X_(Qe,qt)];ce.all?we(De,lt):we(De,lt[0].address,lt[0].family)})}}let b=new nw.EventEmitter;function w(te){try{b.emit("abort",!te||te.type?new or(null,t,h):te)}catch(Y){console.warn("emit error",Y)}}b.once("abort",n);let D=()=>{t.cancelToken&&t.cancelToken.unsubscribe(w),t.signal&&t.signal.removeEventListener("abort",w),b.removeAllListeners()};(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(w),t.signal&&(t.signal.aborted?w():t.signal.addEventListener("abort",w))),o((te,Y)=>{if(f=!0,Y){g=!0,D();return}let{data:ce}=te;if(ce instanceof ws.default.Readable||ce instanceof ws.default.Duplex){let we=ws.default.finished(ce,()=>{we(),D()})}else D()});let E=Qn(t.baseURL,t.url,t.allowAbsoluteUrls),k=new URL(E,Ie.hasBrowserEnv?Ie.origin:void 0),M=k.protocol||Y_[0];if(M==="data:"){if(t.maxContentLength>-1){let Y=String(t.url||E||"");if(Lh(Y)>t.maxContentLength)return n(new J("maxContentLength size of "+t.maxContentLength+" exceeded",J.ERR_BAD_RESPONSE,t))}let te;if(m!=="GET")return ss(s,n,{status:405,statusText:"method not allowed",headers:{},config:t});try{te=Rh(t.url,d==="blob",{Blob:t.env&&t.env.Blob})}catch(Y){throw J.from(Y,J.ERR_BAD_REQUEST,t)}return d==="text"?(te=te.toString(p),(!p||p==="utf8")&&(te=x.stripBOM(te))):d==="stream"&&(te=ws.default.Readable.from(te)),ss(s,n,{data:te,status:200,statusText:"OK",headers:new Ke,config:t})}if(Y_.indexOf(M)===-1)return n(new J("Unsupported protocol "+M,J.ERR_BAD_REQUEST,t));let I=Ke.from(t.headers).normalize();I.set("User-Agent","axios/"+ro,!1);let{onUploadProgress:q,onDownloadProgress:V}=t,se=t.maxRate,de,ue;if(x.isSpecCompliantForm(i)){let te=I.getContentType(/boundary=([-_\w\d]{10,70})/i);i=H_(i,Y=>{I.set(Y)},{tag:`axios-${ro}-boundary`,boundary:te&&te[1]||void 0})}else if(x.isFormData(i)&&x.isFunction(i.getHeaders)){if(I.set(i.getHeaders()),!I.hasContentLength())try{let te=await Bh.default.promisify(i.getLength).call(i);Number.isFinite(te)&&te>=0&&I.setContentLength(te)}catch{}}else if(x.isBlob(i)||x.isFile(i))i.size&&I.setContentType(i.type||"application/octet-stream"),I.setContentLength(i.size||0),i=ws.default.Readable.from(Zl(i));else if(i&&!x.isStream(i)){if(!Buffer.isBuffer(i))if(x.isArrayBuffer(i))i=Buffer.from(new Uint8Array(i));else if(x.isString(i))i=Buffer.from(i,"utf-8");else return n(new J("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",J.ERR_BAD_REQUEST,t));if(I.setContentLength(i.length,!1),t.maxBodyLength>-1&&i.length>t.maxBodyLength)return n(new J("Request body larger than maxBodyLength limit",J.ERR_BAD_REQUEST,t))}let me=x.toFiniteNumber(I.getContentLength());x.isArray(se)?(de=se[0],ue=se[1]):de=ue=se,i&&(q||de)&&(x.isStream(i)||(i=ws.default.Readable.from(i,{objectMode:!1})),i=ws.default.pipeline([i,new Ph({maxRate:x.toFiniteNumber(de)})],x.noop),q&&i.on("progress",Q_(i,Pi(me,_s(ki(q),!1,3)))));let P;if(t.auth){let te=t.auth.username||"",Y=t.auth.password||"";P=te+":"+Y}if(!P&&k.username){let te=k.username,Y=k.password;P=te+":"+Y}P&&I.delete("authorization");let L;try{L=Yn(k.pathname+k.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(te){let Y=new Error(te.message);return Y.config=t,Y.url=t.url,Y.exists=!0,n(Y)}I.set("Accept-Encoding","gzip, compress, deflate"+(Z_?", br":""),!1);let B={path:L,method:m,headers:I.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:P,protocol:M,family:c,beforeRedirect:i9,beforeRedirects:{},http2Options:l};!x.isUndefined(a)&&(B.lookup=a),t.socketPath?B.socketPath=t.socketPath:(B.hostname=k.hostname.startsWith("[")?k.hostname.slice(1,-1):k.hostname,B.port=k.port,ow(B,t.proxy,M+"//"+k.hostname+(k.port?":"+k.port:"")+B.path));let ne,fe=n9.test(B.protocol);if(B.agent=fe?t.httpsAgent:t.httpAgent,S?ne=l9:t.transport?ne=t.transport:t.maxRedirects===0?ne=fe?rw.default:tw.default:(t.maxRedirects&&(B.maxRedirects=t.maxRedirects),t.beforeRedirect&&(B.beforeRedirects.config=t.beforeRedirect),ne=fe?s9:r9),t.maxBodyLength>-1?B.maxBodyLength=t.maxBodyLength:B.maxBodyLength=1/0,t.insecureHTTPParser&&(B.insecureHTTPParser=t.insecureHTTPParser),h=ne.request(B,function(Y){if(h.destroyed)return;let ce=[Y],we=x.toFiniteNumber(Y.headers["content-length"]);if(V||ue){let lt=new Ph({maxRate:x.toFiniteNumber(ue)});V&&lt.on("progress",Q_(lt,Pi(we,_s(ki(V),!0,3)))),ce.push(lt)}let De=Y,Qe=Y.req||h;if(t.decompress!==!1&&Y.headers["content-encoding"])switch((m==="HEAD"||Y.statusCode===204)&&delete Y.headers["content-encoding"],(Y.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":ce.push(As.default.createUnzip(J_)),delete Y.headers["content-encoding"];break;case"deflate":ce.push(new G_),ce.push(As.default.createUnzip(J_)),delete Y.headers["content-encoding"];break;case"br":Z_&&(ce.push(As.default.createBrotliDecompress(t9)),delete Y.headers["content-encoding"])}De=ce.length>1?ws.default.pipeline(ce,x.noop):ce[0];let qt={status:Y.statusCode,statusText:Y.statusMessage,headers:new Ke(Y.headers),config:t,request:Qe};if(d==="stream")qt.data=De,ss(s,n,qt);else{let lt=[],hi=0;De.on("data",function(Ct){lt.push(Ct),hi+=Ct.length,t.maxContentLength>-1&&hi>t.maxContentLength&&(g=!0,De.destroy(),w(new J("maxContentLength size of "+t.maxContentLength+" exceeded",J.ERR_BAD_RESPONSE,t,Qe)))}),De.on("aborted",function(){if(g)return;let Ct=new J("stream has been aborted",J.ERR_BAD_RESPONSE,t,Qe);De.destroy(Ct),n(Ct)}),De.on("error",function(Ct){h.destroyed||n(J.from(Ct,null,t,Qe))}),De.on("end",function(){try{let Ct=lt.length===1?lt[0]:Buffer.concat(lt);d!=="arraybuffer"&&(Ct=Ct.toString(p),(!p||p==="utf8")&&(Ct=x.stripBOM(Ct))),qt.data=Ct}catch(Ct){return n(J.from(Ct,null,t,qt.request,qt))}ss(s,n,qt)})}b.once("abort",lt=>{De.destroyed||(De.emit("error",lt),De.destroy())})}),b.once("abort",te=>{h.close?h.close():h.destroy(te)}),h.on("error",function(Y){n(J.from(Y,null,t,h))}),h.on("socket",function(Y){Y.setKeepAlive(!0,1e3*60)}),t.timeout){let te=parseInt(t.timeout,10);if(Number.isNaN(te)){w(new J("error trying to parse `config.timeout` to int",J.ERR_BAD_OPTION_VALUE,t,h));return}h.setTimeout(te,function(){if(f)return;let ce=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",we=t.transitional||_i;t.timeoutErrorMessage&&(ce=t.timeoutErrorMessage),w(new J(ce,we.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,t,h))})}else h.setTimeout(0);if(x.isStream(i)){let te=!1,Y=!1;i.on("end",()=>{te=!0}),i.once("error",ce=>{Y=!0,h.destroy(ce)}),i.on("close",()=>{!te&&!Y&&w(new or("Request stream has been aborted",t,h))}),i.pipe(h)}else i&&h.write(i),h.end()})};var aw=Ie.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Ie.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Ie.origin),Ie.navigator&&/(msie|trident)/i.test(Ie.navigator.userAgent)):()=>!0;var cw=Ie.hasStandardBrowserEnv?{write(e,t,r,s,n,o,i){if(typeof document>"u")return;let a=[`${e}=${encodeURIComponent(t)}`];x.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),x.isString(s)&&a.push(`path=${s}`),x.isString(n)&&a.push(`domain=${n}`),o===!0&&a.push("secure"),x.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;let t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};var uw=e=>e instanceof Ke?{...e}:e;function zr(e,t){t=t||{};let r={};function s(u,l,d,p){return x.isPlainObject(u)&&x.isPlainObject(l)?x.merge.call({caseless:p},u,l):x.isPlainObject(l)?x.merge({},l):x.isArray(l)?l.slice():l}function n(u,l,d,p){if(x.isUndefined(l)){if(!x.isUndefined(u))return s(void 0,u,d,p)}else return s(u,l,d,p)}function o(u,l){if(!x.isUndefined(l))return s(void 0,l)}function i(u,l){if(x.isUndefined(l)){if(!x.isUndefined(u))return s(void 0,u)}else return s(void 0,l)}function a(u,l,d){if(d in t)return s(u,l);if(d in e)return s(void 0,u)}let c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,l,d)=>n(uw(u),uw(l),d,!0)};return x.forEach(Object.keys({...e,...t}),function(l){let d=c[l]||n,p=d(e[l],t[l],l);x.isUndefined(p)&&d!==a||(r[l]=p)}),r}var Yl=e=>{let t=zr({},e),{data:r,withXSRFToken:s,xsrfHeaderName:n,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=Ke.from(i),t.url=Yn(Qn(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),x.isFormData(r)){if(Ie.hasStandardBrowserEnv||Ie.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(x.isFunction(r.getHeaders)){let c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,d])=>{u.includes(l.toLowerCase())&&i.set(l,d)})}}if(Ie.hasStandardBrowserEnv&&(s&&x.isFunction(s)&&(s=s(t)),s||s!==!1&&aw(t.url))){let c=n&&o&&cw.read(o);c&&i.set(n,c)}return t};var d9=typeof XMLHttpRequest<"u",lw=d9&&function(e){return new Promise(function(r,s){let n=Yl(e),o=n.data,i=Ke.from(n.headers).normalize(),{responseType:a,onUploadProgress:c,onDownloadProgress:u}=n,l,d,p,m,f;function g(){m&&m(),f&&f(),n.cancelToken&&n.cancelToken.unsubscribe(l),n.signal&&n.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(n.method.toUpperCase(),n.url,!0),h.timeout=n.timeout;function S(){if(!h)return;let w=Ke.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:w,config:e,request:h};ss(function(M){r(M),g()},function(M){s(M),g()},E),h=null}"onloadend"in h?h.onloadend=S:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(S)},h.onabort=function(){h&&(s(new J("Request aborted",J.ECONNABORTED,e,h)),h=null)},h.onerror=function(D){let E=D&&D.message?D.message:"Network Error",k=new J(E,J.ERR_NETWORK,e,h);k.event=D||null,s(k),h=null},h.ontimeout=function(){let D=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",E=n.transitional||_i;n.timeoutErrorMessage&&(D=n.timeoutErrorMessage),s(new J(D,E.clarifyTimeoutError?J.ETIMEDOUT:J.ECONNABORTED,e,h)),h=null},o===void 0&&i.setContentType(null),"setRequestHeader"in h&&x.forEach(i.toJSON(),function(D,E){h.setRequestHeader(E,D)}),x.isUndefined(n.withCredentials)||(h.withCredentials=!!n.withCredentials),a&&a!=="json"&&(h.responseType=n.responseType),u&&([p,f]=_s(u,!0),h.addEventListener("progress",p)),c&&h.upload&&([d,m]=_s(c),h.upload.addEventListener("progress",d),h.upload.addEventListener("loadend",m)),(n.cancelToken||n.signal)&&(l=w=>{h&&(s(!w||w.type?new or(null,e,h):w),h.abort(),h=null)},n.cancelToken&&n.cancelToken.subscribe(l),n.signal&&(n.signal.aborted?l():n.signal.addEventListener("abort",l)));let b=gc(n.url);if(b&&Ie.protocols.indexOf(b)===-1){s(new J("Unsupported protocol "+b+":",J.ERR_BAD_REQUEST,e));return}h.send(o||null)})};var p9=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let s=new AbortController,n,o=function(u){if(!n){n=!0,a();let l=u instanceof Error?u:this.reason;s.abort(l instanceof J?l:new or(l instanceof Error?l.message:l))}},i=t&&setTimeout(()=>{i=null,o(new J(`timeout ${t} of ms exceeded`,J.ETIMEDOUT))},t),a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));let{signal:c}=s;return c.unsubscribe=()=>x.asap(a),c}},dw=p9;var m9=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let s=0,n;for(;s<r;)n=s+t,yield e.slice(s,n),s=n},f9=async function*(e,t){for await(let r of g9(e))yield*m9(r,t)},g9=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:r,value:s}=await t.read();if(r)break;yield s}}finally{await t.cancel()}},jh=(e,t,r,s)=>{let n=f9(e,t),o=0,i,a=c=>{i||(i=!0,s&&s(c))};return new ReadableStream({async pull(c){try{let{done:u,value:l}=await n.next();if(u){a(),c.close();return}let d=l.byteLength;if(r){let p=o+=d;r(p)}c.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(c){return a(c),n.return()}},{highWaterMark:2})};var pw=64*1024,{isFunction:Ql}=x,h9=(({Request:e,Response:t})=>({Request:e,Response:t}))(x.global),{ReadableStream:mw,TextEncoder:fw}=x.global,gw=(e,...t)=>{try{return!!e(...t)}catch{return!1}},y9=e=>{e=x.merge.call({skipUndefined:!0},h9,e);let{fetch:t,Request:r,Response:s}=e,n=t?Ql(t):typeof fetch=="function",o=Ql(r),i=Ql(s);if(!n)return!1;let a=n&&Ql(mw),c=n&&(typeof fw=="function"?(f=>g=>f.encode(g))(new fw):async f=>new Uint8Array(await new r(f).arrayBuffer())),u=o&&a&&gw(()=>{let f=!1,g=new r(Ie.origin,{body:new mw,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!g}),l=i&&a&&gw(()=>x.isReadableStream(new s("").body)),d={stream:l&&(f=>f.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!d[f]&&(d[f]=(g,h)=>{let S=g&&g[f];if(S)return S.call(g);throw new J(`Response type '${f}' is not supported`,J.ERR_NOT_SUPPORT,h)})});let p=async f=>{if(f==null)return 0;if(x.isBlob(f))return f.size;if(x.isSpecCompliantForm(f))return(await new r(Ie.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(x.isArrayBufferView(f)||x.isArrayBuffer(f))return f.byteLength;if(x.isURLSearchParams(f)&&(f=f+""),x.isString(f))return(await c(f)).byteLength},m=async(f,g)=>{let h=x.toFiniteNumber(f.getContentLength());return h??p(g)};return async f=>{let{url:g,method:h,data:S,signal:b,cancelToken:w,timeout:D,onDownloadProgress:E,onUploadProgress:k,responseType:M,headers:I,withCredentials:q="same-origin",fetchOptions:V}=Yl(f),se=t||fetch;M=M?(M+"").toLowerCase():"text";let de=dw([b,w&&w.toAbortSignal()],D),ue=null,me=de&&de.unsubscribe&&(()=>{de.unsubscribe()}),P;try{if(k&&u&&h!=="get"&&h!=="head"&&(P=await m(I,S))!==0){let Y=new r(g,{method:"POST",body:S,duplex:"half"}),ce;if(x.isFormData(S)&&(ce=Y.headers.get("content-type"))&&I.setContentType(ce),Y.body){let[we,De]=Pi(P,_s(ki(k)));S=jh(Y.body,pw,we,De)}}x.isString(q)||(q=q?"include":"omit");let L=o&&"credentials"in r.prototype,B={...V,signal:de,method:h.toUpperCase(),headers:I.normalize().toJSON(),body:S,duplex:"half",credentials:L?q:void 0};ue=o&&new r(g,B);let ne=await(o?se(ue,V):se(g,B)),fe=l&&(M==="stream"||M==="response");if(l&&(E||fe&&me)){let Y={};["status","statusText","headers"].forEach(Qe=>{Y[Qe]=ne[Qe]});let ce=x.toFiniteNumber(ne.headers.get("content-length")),[we,De]=E&&Pi(ce,_s(ki(E),!0))||[];ne=new s(jh(ne.body,pw,we,()=>{De&&De(),me&&me()}),Y)}M=M||"text";let te=await d[x.findKey(d,M)||"text"](ne,f);return!fe&&me&&me(),await new Promise((Y,ce)=>{ss(Y,ce,{data:te,headers:Ke.from(ne.headers),status:ne.status,statusText:ne.statusText,config:f,request:ue})})}catch(L){throw me&&me(),L&&L.name==="TypeError"&&/Load failed|fetch/i.test(L.message)?Object.assign(new J("Network Error",J.ERR_NETWORK,f,ue),{cause:L.cause||L}):J.from(L,L&&L.code,f,ue)}}},v9=new Map,Uh=e=>{let t=e&&e.env||{},{fetch:r,Request:s,Response:n}=t,o=[s,n,r],i=o.length,a=i,c,u,l=v9;for(;a--;)c=o[a],u=l.get(c),u===void 0&&l.set(c,u=a?new Map:y9(t)),l=u;return u},q_e=Uh();var $h={http:iw,xhr:lw,fetch:{get:Uh}};x.forEach($h,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var hw=e=>`- ${e}`,S9=e=>x.isFunction(e)||e===null||e===!1;function C9(e,t){e=x.isArray(e)?e:[e];let{length:r}=e,s,n,o={};for(let i=0;i<r;i++){s=e[i];let a;if(n=s,!S9(s)&&(n=$h[(a=String(s)).toLowerCase()],n===void 0))throw new J(`Unknown adapter '${a}'`);if(n&&(x.isFunction(n)||(n=n.get(t))))break;o[a||"#"+i]=n}if(!n){let i=Object.entries(o).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build")),a=r?i.length>1?`since :
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cdk-insights",
3
- "version": "0.14.2",
3
+ "version": "0.15.1",
4
4
  "description": "AWS CDK security and cost analysis tool with AI-powered insights",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",