UNPKG

@puya/pdcsc

Version:

pdcsc is a cli tool for managing .sql database repositories. It creates/updates changesets based on changes detected in feature branches, can be integrated in cicd pipelines and is able to apply changeset(s) on custom databases in cicd pipelines or even m

2 lines 1.49 MB
#!/usr/bin/env node "use strict";var e=require("os"),t=require("tty"),n=require("fs"),r=require("path"),i=require("util"),o=require("child_process"),s=require("node:events"),a=require("readline"),c=require("stream"),u=require("buffer"),l=require("string_decoder"),h=require("events"),d=require("timers"),f=require("node:stream"),p=require("crypto"),m=require("tls"),g=require("net"),y=require("dns"),_=require("constants"),w=require("node:os"),b=require("node:util"),v=require("node:process"),E=require("assert"),T=require("http"),S=require("https"),O=require("url"),A=require("node:http"),C=require("node:https"),I=require("node:zlib"),N=require("fs/promises"),R=require("node:crypto"),k=require("node:fs/promises"),D=require("dgram"),M=require("node:url");function P(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var L=P(o),x=P(w),U=P(v),F=P(A),j=P(C),B=P(I),Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var H,V,W,z,G,K,Z,Q,J,X,ee,te,ne,re,ie,oe,se,ae,ce,ue={exports:{}};function le(){if(z)return W;z=1;const e=V?H:(V=1,H={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};W=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=o-i;let a,c;o===i?a=0:t===o?a=(n-r)/s:n===o?a=2+(r-t)/s:r===o&&(a=4+(t-n)/s),a=Math.min(60*a,360),a<0&&(a+=360);const u=(i+o)/2;return c=o===i?0:u<=.5?s/(o+i):s/(2-o-i),[a,100*c,100*u]},n.rgb.hsv=function(e){let t,n,r,i,o;const s=e[0]/255,a=e[1]/255,c=e[2]/255,u=Math.max(s,a,c),l=u-Math.min(s,a,c),h=function(e){return(u-e)/6/l+.5};return 0===l?(i=0,o=0):(o=l/u,t=h(s),n=h(a),r=h(c),s===u?i=r-n:a===u?i=1/3+t-r:c===u&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*o,100*u]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let i=e[2];const o=n.rgb.hsl(e)[0],s=1/255*Math.min(t,Math.min(r,i));return i=1-1/255*Math.max(t,Math.max(r,i)),[o,100*s,100*i]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r);return[100*((1-t-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},n.rgb.keyword=function(n){const r=t[n];if(r)return r;let i,o=1/0;for(const t of Object.keys(e)){const r=e[t],c=(a=r,((s=n)[0]-a[0])**2+(s[1]-a[1])**2+(s[2]-a[2])**2);c<o&&(o=c,i=t)}var s,a;return i},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],i=t[1],o=t[2];r/=95.047,i/=100,o/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;return[116*i-16,500*(r-i),200*(i-o)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,o,s;if(0===n)return s=255*r,[s,s,s];i=r<.5?r*(1+n):r+n-r*n;const a=2*r-i,c=[0,0,0];for(let e=0;e<3;e++)o=t+1/3*-(e-1),o<0&&o++,o>1&&o--,s=6*o<1?a+6*(i-a)*o:2*o<1?i:3*o<2?a+(i-a)*(2/3-o)*6:a,c[e]=255*s;return c},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;return[t,100*(0===r?2*i/(o+i):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),s=255*r*(1-n),a=255*r*(1-n*o),c=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,c,s];case 1:return[a,r,s];case 2:return[s,r,c];case 3:return[s,a,r];case 4:return[c,s,r];case 5:return[r,s,a]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let o,s;s=(2-n)*r;const a=(2-n)*i;return o=n*i,o/=a<=1?a:2-a,o=o||0,s/=2,[t,100*o,100*s]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const s=Math.floor(6*t),a=1-r;o=6*t-s,1&s&&(o=1-o);const c=n+o*(a-n);let u,l,h;switch(s){default:case 6:case 0:u=a,l=c,h=n;break;case 1:u=c,l=a,h=n;break;case 2:u=n,l=a,h=c;break;case 3:u=n,l=c,h=a;break;case 4:u=c,l=n,h=a;break;case 5:u=a,l=n,h=c}return[255*u,255*l,255*h]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,o,s;return i=3.2406*t+-1.5372*n+-.4986*r,o=-.9689*t+1.8758*n+.0415*r,s=.0557*t+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[255*i,255*o,255*s]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const i=n**3,o=t**3,s=r**3;return n=i>.008856?i:(n-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360);return[t,Math.sqrt(n*n+r*r),i]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,i,o]=e;let s=null===t?n.rgb.hsv(e)[2]:t;if(s=Math.round(s/50),0===s)return 30;let a=30+(Math.round(o/255)<<2|Math.round(i/255)<<1|Math.round(r/255));return 2===s&&(a+=60),a},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),s=i-o;let a,c;return a=s<1?o/(1-s):0,c=s<=0?0:i===t?(n-r)/s%6:i===n?2+(r-t)/s:4+(t-n)/s,c/=6,c%=1,[360*c,100*s,100*a]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const i=[0,0,0],o=t%1*6,s=o%1,a=1-s;let c=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=a,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=a,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=a}return c=(1-n)*r,[255*(n*i[0]+c),255*(n*i[1]+c),255*(n*i[2]+c)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},W}function he(){if(K)return G;K=1;const e=le();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),i=Object.keys(e[t]);for(let e=i.length,o=0;o<e;o++){const e=i[o],s=n[e];-1===s.distance&&(s.distance=n[t].distance+1,s.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const i=[r[t].parent,t];let o=e[r[t].parent][t],s=r[t].parent;for(;r[s].parent;)i.unshift(r[s].parent),o=n(e[r[s].parent][s],o),s=r[s].parent;return o.conversion=i,o}return G=function(e){const n=t(e),i={},o=Object.keys(n);for(let e=o.length,t=0;t<e;t++){const e=o[t];null!==n[e].parent&&(i[e]=r(e,n))}return i},G}function de(){if(Q)return Z;Q=1;const e=le(),t=he(),n={};return Object.keys(e).forEach((r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const i=t(r);Object.keys(i).forEach((e=>{const t=i[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)}))})),Z=n}function fe(){return J||(J=1,function(e){const t=(e,t)=>(...n)=>`[${e(...n)+t}m`,n=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};5;${r}m`},r=(e,t)=>(...n)=>{const r=e(...n);return`[${38+t};2;${r[0]};${r[1]};${r[2]}m`},i=e=>e,o=(e,t,n)=>[e,t,n],s=(e,t,n)=>{Object.defineProperty(e,t,{get:()=>{const r=n();return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0}),r},enumerable:!0,configurable:!0})};let a;const c=(e,t,n,r)=>{void 0===a&&(a=de());const i=r?10:0,o={};for(const[r,s]of Object.entries(a)){const a="ansi16"===r?"ansi":r;r===t?o[a]=e(n,i):"object"==typeof s&&(o[a]=e(s[t],i))}return o};Object.defineProperty(e,"exports",{enumerable:!0,get:function(){const e=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[t,n]of Object.entries(a)){for(const[t,r]of Object.entries(n))a[t]={open:`[${r[0]}m`,close:`[${r[1]}m`},n[t]=a[t],e.set(r[0],r[1]);Object.defineProperty(a,t,{value:n,enumerable:!1})}return Object.defineProperty(a,"codes",{value:e,enumerable:!1}),a.color.close="",a.bgColor.close="",s(a.color,"ansi",(()=>c(t,"ansi16",i,!1))),s(a.color,"ansi256",(()=>c(n,"ansi256",i,!1))),s(a.color,"ansi16m",(()=>c(r,"rgb",o,!1))),s(a.bgColor,"ansi",(()=>c(t,"ansi16",i,!0))),s(a.bgColor,"ansi256",(()=>c(n,"ansi256",i,!0))),s(a.bgColor,"ansi16m",(()=>c(r,"rgb",o,!0))),a}})}(ue)),ue.exports}function pe(){return ee?X:(ee=1,X=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)})}function me(){if(ne)return te;ne=1;const n=e,r=t,i=pe(),{env:o}=process;let s;function a(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function c(e,t){if(0===s)return 0;if(i("color=16m")||i("color=full")||i("color=truecolor"))return 3;if(i("color=256"))return 2;if(e&&!t&&void 0===s)return 0;const r=s||0;if("dumb"===o.TERM)return r;if("win32"===process.platform){const e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in o)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in o))||"codeship"===o.CI_NAME?1:r;if("TEAMCITY_VERSION"in o)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION)?1:0;if("truecolor"===o.COLORTERM)return 3;if("TERM_PROGRAM"in o){const e=parseInt((o.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(o.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(o.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)||"COLORTERM"in o?1:r}return i("no-color")||i("no-colors")||i("color=false")||i("color=never")?s=0:(i("color")||i("colors")||i("color=true")||i("color=always"))&&(s=1),"FORCE_COLOR"in o&&(s="true"===o.FORCE_COLOR?1:"false"===o.FORCE_COLOR?0:0===o.FORCE_COLOR.length?1:Math.min(parseInt(o.FORCE_COLOR,10),3)),te={supportsColor:function(e){return a(c(e,e&&e.isTTY))},stdout:a(c(!0,r.isatty(1))),stderr:a(c(!0,r.isatty(2)))},te}var ge=function(){if(ce)return ae;ce=1;const e=fe(),{stdout:t,stderr:n}=me(),{stringReplaceAll:r,stringEncaseCRLFWithFirstIndex:i}=ie?re:(ie=1,re={stringReplaceAll:(e,t,n)=>{let r=e.indexOf(t);if(-1===r)return e;const i=t.length;let o=0,s="";do{s+=e.substr(o,r-o)+t+n,o=r+i,r=e.indexOf(t,o)}while(-1!==r);return s+=e.substr(o),s},stringEncaseCRLFWithFirstIndex:(e,t,n,r)=>{let i=0,o="";do{const s="\r"===e[r-1];o+=e.substr(i,(s?r-1:r)-i)+t+(s?"\r\n":"\n")+n,i=r+1,r=e.indexOf("\n",i)}while(-1!==r);return o+=e.substr(i),o}}),{isArray:o}=Array,s=["ansi","ansi","ansi256","ansi16m"],a=Object.create(null);class c{constructor(e){return u(e)}}const u=e=>{const n={};return((e,n={})=>{if(n.level&&!(Number.isInteger(n.level)&&n.level>=0&&n.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const r=t?t.level:0;e.level=void 0===n.level?r:n.level})(n,e),n.template=(...e)=>y(n.template,...e),Object.setPrototypeOf(n,l.prototype),Object.setPrototypeOf(n.template,n),n.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},n.template.Instance=c,n.template};function l(e){return u(e)}for(const[t,n]of Object.entries(e))a[t]={get(){const e=p(this,f(n.open,n.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:e}),e}};a.visible={get(){const e=p(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:e}),e}};const h=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const t of h)a[t]={get(){const{level:n}=this;return function(...r){const i=f(e.color[s[n]][t](...r),e.color.close,this._styler);return p(this,i,this._isEmpty)}}};for(const t of h){a["bg"+t[0].toUpperCase()+t.slice(1)]={get(){const{level:n}=this;return function(...r){const i=f(e.bgColor[s[n]][t](...r),e.bgColor.close,this._styler);return p(this,i,this._isEmpty)}}}}const d=Object.defineProperties((()=>{}),{...a,level:{enumerable:!0,get(){return this._generator.level},set(e){this._generator.level=e}}}),f=(e,t,n)=>{let r,i;return void 0===n?(r=e,i=t):(r=n.openAll+e,i=t+n.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:n}},p=(e,t,n)=>{const r=(...e)=>o(e[0])&&o(e[0].raw)?m(r,y(r,...e)):m(r,1===e.length?""+e[0]:e.join(" "));return Object.setPrototypeOf(r,d),r._generator=e,r._styler=t,r._isEmpty=n,r},m=(e,t)=>{if(e.level<=0||!t)return e._isEmpty?"":t;let n=e._styler;if(void 0===n)return t;const{openAll:o,closeAll:s}=n;if(-1!==t.indexOf(""))for(;void 0!==n;)t=r(t,n.close,n.open),n=n.parent;const a=t.indexOf("\n");return-1!==a&&(t=i(t,s,o,a)),o+t+s};let g;const y=(e,...t)=>{const[n]=t;if(!o(n)||!o(n.raw))return t.join(" ");const r=t.slice(1),i=[n.raw[0]];for(let e=1;e<n.length;e++)i.push(String(r[e-1]).replace(/[{}\\]/g,"\\$&"),String(n.raw[e]));return void 0===g&&(g=function(){if(se)return oe;se=1;const e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,t=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,n=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,r=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,i=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function o(e){const t="u"===e[0],n="{"===e[1];return t&&!n&&5===e.length||"x"===e[0]&&3===e.length?String.fromCharCode(parseInt(e.slice(1),16)):t&&n?String.fromCodePoint(parseInt(e.slice(2,-1),16)):i.get(e)||e}function s(e,t){const i=[],s=t.trim().split(/\s*,\s*/g);let a;for(const t of s){const s=Number(t);if(Number.isNaN(s)){if(!(a=t.match(n)))throw new Error(`Invalid Chalk template style argument: ${t} (in style '${e}')`);i.push(a[2].replace(r,((e,t,n)=>t?o(t):n)))}else i.push(s)}return i}function a(e){t.lastIndex=0;const n=[];let r;for(;null!==(r=t.exec(e));){const e=r[1];if(r[2]){const t=s(e,r[2]);n.push([e].concat(t))}else n.push([e])}return n}function c(e,t){const n={};for(const e of t)for(const t of e.styles)n[t[0]]=e.inverse?null:t.slice(1);let r=e;for(const[e,t]of Object.entries(n))if(Array.isArray(t)){if(!(e in r))throw new Error(`Unknown Chalk style: ${e}`);r=t.length>0?r[e](...t):r[e]}return r}return oe=(t,n)=>{const r=[],i=[];let s=[];if(n.replace(e,((e,n,u,l,h,d)=>{if(n)s.push(o(n));else if(l){const e=s.join("");s=[],i.push(0===r.length?e:c(t,r)(e)),r.push({inverse:u,styles:a(l)})}else if(h){if(0===r.length)throw new Error("Found extraneous } in Chalk template literal");i.push(c(t,r)(s.join(""))),s=[],r.pop()}else s.push(d)})),i.push(s.join("")),r.length>0){const e=`Chalk template literal is missing ${r.length} closing bracket${1===r.length?"":"s"} (\`}\`)`;throw new Error(e)}return i.join("")},oe}()),g(e,i.join(""))};Object.defineProperties(l.prototype,a);const _=l();return _.supportsColor=t,_.stderr=l({level:n?n.level:0}),_.stderr.supportsColor=n,ae=_}(),ye=q(ge);const _e=(e,t)=>("string"==typeof e||e instanceof String)&&null==t,we=e=>("number"==typeof e||e instanceof Number)&&!isNaN(e),be=e=>e instanceof Date&&!isNaN(e.valueOf()),ve=e=>"boolean"==typeof e||e instanceof Boolean,Ee=e=>_e(e)||we(e)||be(e)||ve(e),Te=e=>null===e,Se=e=>void 0===e,Oe=e=>Te(e)||Se(e),Ae=(e,t=!0)=>Te(e)||Se(e)||"number"==typeof e&&isNaN(e)||_e(e)&&(0==e.length||""==e.trim()&&t),Ce=(e,t=!0)=>_e(e)&&(!t||""!=e.trim()),Ie=e=>Ae(e,!1),Ne=e=>(e=>"object"==typeof e&&!Te(e))(e)&&!Ee(e)&&!De(e),Re=e=>"function"==typeof e&&"number"!=typeof e.nodeType,ke=e=>(Ce(e)||we(e))&&!isNaN(e-parseFloat(e)),De=Array.isArray,Me=e=>De(e)&&e.length>0,Pe=(e,t)=>{let n=[];if(Se(t)&&(t=()=>{}),!Re(t))throw"@locustjs/base: forEach: expected function for callback.";if(!Ae(e))if(De(e))for(let r=0;r<e.length;r++){const i={source:e,index:r,key:r,value:e[r],count:e.length},o=t(i);if(i.break)break;i.skip||n.push(o||i.result||{index:r,key:r,value:e[r]})}else if(Ne(e)){const r=Object.keys(e);for(let i=0;i<r.length;i++){const o={source:e,index:i,key:r[i],value:e[r[i]],count:r.length},s=t(o);if(o.break)break;o.skip||n.push(s||o.result||{index:i,key:r[i],value:e[i]})}}else if(function(e){if(!e)return!1;if("function"==typeof e[Symbol.iterator])return!0;let t=Object.getPrototypeOf(e);return!(!t||"function"!=typeof t[Symbol.iterator])}(e)){let r=0;for(let i of e){const o={source:e,index:r,key:r,value:i,count:void 0},s=t(o);if(o.break)break;o.skip||n.push(s||o.result||{index:r,key:r,value:i}),r++}}return n},Le=Pe;function xe(e,...t){let n=!1;if(Ce(e))if(t.length){n=!0;const r=e.toLowerCase();for(let e of t){const t=Oe(e)?"":e.toString().toLowerCase();if(!r.includes(t)){n=!1;break}}}else n=!0;return n}function Ue(e,t,n=!0){let r=!1;return r=_e(e)&&_e(t)?n?e.toLowerCase()==t.toLowerCase():e==t:Ie(e)&&Ie(t),r}void 0===String.prototype.contains&&(String.prototype.contains=function(...e){return xe(this,...e)}),void 0===String.prototype.containsAll&&(String.prototype.containsAll=function(...e){return xe(this,...e)}),void 0===String.prototype.containsAny&&(String.prototype.containsAny=function(...e){return function(e,...t){let n=!0;if(Ce(e)&&t.length){n=!1;const r=e.toLowerCase();for(let e of t){const t=Oe(e)?"":e.toString().toLowerCase();if(r.includes(t)){n=!0;break}}}return n}(this,...e)}),void 0===Array.prototype.contains&&(Array.prototype.contains=function(e){let t=!1;for(let n of this)if((n||"").toString().equals(e)){t=!0;break}return t}),void 0===String.prototype.equals&&(String.prototype.equals=function(...e){return Ue(this,...e)});var Fe,je,Be,Ye,qe,$e,He,Ve,We,ze,Ge,Ke,Ze,Qe,Je,Xe,et,tt,nt,rt,it,ot,st,at,ct,ut,lt,ht,dt,ft,pt,mt,gt,yt,_t,wt,bt,vt,Et,Tt,St,Ot,At,Ct,It,Nt,Rt,kt,Dt,Mt,Pt,Lt,xt,Ut,Ft,jt,Bt,Yt,qt,$t,Ht,Vt,Wt,zt,Gt,Kt,Zt,Qt,Jt,Xt,en,tn,nn,rn,on,sn,an,cn,un,ln,hn,dn,fn,pn,mn,gn,yn,_n,wn,bn="@puya/pdcsc",vn="3.0.2",En={exports:{}};function Tn(){if(je)return Fe;je=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return Fe={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function Sn(){if(Ye)return Be;Ye=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return Be=e}function On(){return qe||(qe=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=Tn(),o=Sn(),s=(t=e.exports={}).re=[],a=t.safeRe=[],c=t.src=[],u=t.safeSrc=[],l=t.t={};let h=0;const d="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",i],[d,r]],p=(e,t,n)=>{const r=(e=>{for(const[t,n]of f)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=h++;o(e,i,t),l[e]=i,c[i]=t,u[i]=r,s[i]=new RegExp(t,n?"g":void 0),a[i]=new RegExp(r,n?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),p("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${d}+`),p("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),p("FULL",`^${c[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),p("LOOSE",`^${c[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),p("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),p("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?`+`(?:${c[l.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",c[l.COERCE],!0),p("COERCERTLFULL",c[l.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",p("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",p("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(En,En.exports)),En.exports}function An(){if(He)return $e;He=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return $e=n=>n?"object"!=typeof n?e:n:t}function Cn(){if(We)return Ve;We=1;const e=/^[0-9]+$/,t=(t,n)=>{const r=e.test(t),i=e.test(n);return r&&i&&(t=+t,n=+n),t===n?0:r&&!i?-1:i&&!r?1:t<n?-1:1};return Ve={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)}}function In(){if(Ge)return ze;Ge=1;const e=Sn(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Tn(),{safeRe:r,safeSrc:i,t:o}=On(),s=An(),{compareIdentifiers:a}=Cn();class c{constructor(i,a){if(a=s(a),i instanceof c){if(i.loose===!!a.loose&&i.includePrerelease===!!a.includePrerelease)return i;i=i.version}else if("string"!=typeof i)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof i}".`);if(i.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",i,a),this.options=a,this.loose=!!a.loose,this.includePrerelease=!!a.includePrerelease;const u=i.trim().match(a.loose?r[o.LOOSE]:r[o.FULL]);if(!u)throw new TypeError(`Invalid Version: ${i}`);if(this.raw=i,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e})):this.prerelease=[],this.build=u[5]?u[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof c)){if("string"==typeof t&&t===this.version)return 0;t=new c(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof c||(e=new c(e,this.options)),a(this.major,e.major)||a(this.minor,e.minor)||a(this.patch,e.patch)}comparePre(t){if(t instanceof c||(t=new c(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],i=t.prerelease[n];if(e("prerelease compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return a(r,i)}while(++n)}compareBuild(t){t instanceof c||(t=new c(t,this.options));let n=0;do{const r=this.build[n],i=t.build[n];if(e("build compare",n,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return a(r,i)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=new RegExp(`^${this.options.loose?i[o.PRERELEASELOOSE]:i[o.PRERELEASE]}$`),n=`-${t}`.match(e);if(!n||n[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===a(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return ze=c}function Nn(){if(Ze)return Ke;Ze=1;const e=In();return Ke=(t,n,r=!1)=>{if(t instanceof e)return t;try{return new e(t,n)}catch(e){if(!r)return null;throw e}},Ke}function Rn(){if(pt)return ft;pt=1;const e=In();return ft=(t,n,r)=>new e(t,r).compare(new e(n,r))}function kn(){if(bt)return wt;bt=1;const e=In();return wt=(t,n,r)=>{const i=new e(t,r),o=new e(n,r);return i.compare(o)||i.compareBuild(o)}}function Dn(){if(At)return Ot;At=1;const e=Rn();return Ot=(t,n,r)=>e(t,n,r)>0}function Mn(){if(It)return Ct;It=1;const e=Rn();return Ct=(t,n,r)=>e(t,n,r)<0}function Pn(){if(Rt)return Nt;Rt=1;const e=Rn();return Nt=(t,n,r)=>0===e(t,n,r)}function Ln(){if(Dt)return kt;Dt=1;const e=Rn();return kt=(t,n,r)=>0!==e(t,n,r)}function xn(){if(Pt)return Mt;Pt=1;const e=Rn();return Mt=(t,n,r)=>e(t,n,r)>=0}function Un(){if(xt)return Lt;xt=1;const e=Rn();return Lt=(t,n,r)=>e(t,n,r)<=0}function Fn(){if(Ft)return Ut;Ft=1;const e=Pn(),t=Ln(),n=Dn(),r=xn(),i=Mn(),o=Un();return Ut=(s,a,c,u)=>{switch(a){case"===":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s===c;case"!==":return"object"==typeof s&&(s=s.version),"object"==typeof c&&(c=c.version),s!==c;case"":case"=":case"==":return e(s,c,u);case"!=":return t(s,c,u);case">":return n(s,c,u);case">=":return r(s,c,u);case"<":return i(s,c,u);case"<=":return o(s,c,u);default:throw new TypeError(`Invalid operator: ${a}`)}}}function jn(){if(Ht)return $t;Ht=1;const e=/\s+/g;class t{constructor(n,o){if(o=r(o),n instanceof t)return n.loose===!!o.loose&&n.includePrerelease===!!o.includePrerelease?n:new t(n.raw,o);if(n instanceof i)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!p(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&d)|(this.options.loose&&f))+":"+e,r=n.get(t);if(r)return r;const s=this.options.loose,m=s?a[c.HYPHENRANGELOOSE]:a[c.HYPHENRANGE];e=e.replace(m,C(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(a[c.COMPARATORTRIM],u),o("comparator trim",e),e=e.replace(a[c.TILDETRIM],l),o("tilde trim",e),e=e.replace(a[c.CARETTRIM],h),o("caret trim",e);let g=e.split(" ").map((e=>y(e,this.options))).join(" ").split(/\s+/).map((e=>A(e,this.options)));s&&(g=g.filter((e=>(o("loose invalid filter",e,this.options),!!e.match(a[c.COMPARATORLOOSE]))))),o("range list",g);const _=new Map,w=g.map((e=>new i(e,this.options)));for(const e of w){if(p(e))return[e];_.set(e.value,e)}_.size>1&&_.has("")&&_.delete("");const b=[..._.values()];return n.set(t,b),b}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some((t=>g(t,n)&&e.set.some((e=>g(e,n)&&t.every((t=>e.every((e=>t.intersects(e,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new s(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(I(this.set[t],e,this.options))return!0;return!1}}$t=t;const n=new(qt?Yt:(qt=1,Yt=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}})),r=An(),i=Bn(),o=Sn(),s=In(),{safeRe:a,t:c,comparatorTrimReplace:u,tildeTrimReplace:l,caretTrimReplace:h}=On(),{FLAG_INCLUDE_PRERELEASE:d,FLAG_LOOSE:f}=Tn(),p=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,g=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},y=(e,t)=>(o("comp",e,t),e=v(e,t),o("caret",e),e=w(e,t),o("tildes",e),e=T(e,t),o("xrange",e),e=O(e,t),o("stars",e),e),_=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{const n=t.loose?a[c.TILDELOOSE]:a[c.TILDE];return e.replace(n,((t,n,r,i,s)=>{let a;return o("tilde",e,t,n,r,i,s),_(n)?a="":_(r)?a=`>=${n}.0.0 <${+n+1}.0.0-0`:_(i)?a=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:s?(o("replaceTilde pr",s),a=`>=${n}.${r}.${i}-${s} <${n}.${+r+1}.0-0`):a=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o("tilde return",a),a}))},v=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{o("caret",e,t);const n=t.loose?a[c.CARETLOOSE]:a[c.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,s,a)=>{let c;return o("caret",e,t,n,i,s,a),_(n)?c="":_(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:_(s)?c="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:a?(o("replaceCaret pr",a),c="0"===n?"0"===i?`>=${n}.${i}.${s}-${a} <${n}.${i}.${+s+1}-0`:`>=${n}.${i}.${s}-${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${s}-${a} <${+n+1}.0.0-0`):(o("no pr"),c="0"===n?"0"===i?`>=${n}.${i}.${s}${r} <${n}.${i}.${+s+1}-0`:`>=${n}.${i}.${s}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${s} <${+n+1}.0.0-0`),o("caret return",c),c}))},T=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>S(e,t))).join(" ")),S=(e,t)=>{e=e.trim();const n=t.loose?a[c.XRANGELOOSE]:a[c.XRANGE];return e.replace(n,((n,r,i,s,a,c)=>{o("xRange",e,n,r,i,s,a,c);const u=_(i),l=u||_(s),h=l||_(a),d=h;return"="===r&&d&&(r=""),c=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&d?(l&&(s=0),a=0,">"===r?(r=">=",l?(i=+i+1,s=0,a=0):(s=+s+1,a=0)):"<="===r&&(r="<",l?i=+i+1:s=+s+1),"<"===r&&(c="-0"),n=`${r+i}.${s}.${a}${c}`):l?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:h&&(n=`>=${i}.${s}.0${c} <${i}.${+s+1}.0-0`),o("xRange return",n),n}))},O=(e,t)=>(o("replaceStars",e,t),e.trim().replace(a[c.STAR],"")),A=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),C=e=>(t,n,r,i,o,s,a,c,u,l,h,d)=>`${n=_(r)?"":_(i)?`>=${r}.0.0${e?"-0":""}`:_(o)?`>=${r}.${i}.0${e?"-0":""}`:s?`>=${n}`:`>=${n}${e?"-0":""}`} ${c=_(u)?"":_(l)?`<${+u+1}.0.0-0`:_(h)?`<${u}.${+l+1}.0-0`:d?`<=${u}.${l}.${h}-${d}`:e?`<${u}.${l}.${+h+1}-0`:`<=${c}`}`.trim(),I=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return $t}function Bn(){if(Wt)return Vt;Wt=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),s("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],o=t.match(n);if(!o)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==o[1]?o[1]:"","="===this.operator&&(this.operator=""),o[2]?this.semver=new a(o[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(s("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new a(t,this.options)}catch(e){return!1}return o(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new c(e.value,r).test(this.value):""===e.operator?""===e.value||new c(this.value,r).test(e.semver):(!(r=n(r)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(o(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(o(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}Vt=t;const n=An(),{safeRe:r,t:i}=On(),o=Fn(),s=Sn(),a=In(),c=jn();return Vt}function Yn(){if(Gt)return zt;Gt=1;const e=jn();return zt=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},zt}function qn(){if(on)return rn;on=1;const e=jn();return rn=(t,n)=>{try{return new e(t,n).range||"*"}catch(e){return null}},rn}function $n(){if(an)return sn;an=1;const e=In(),t=Bn(),{ANY:n}=t,r=jn(),i=Yn(),o=Dn(),s=Mn(),a=Un(),c=xn();return sn=(u,l,h,d)=>{let f,p,m,g,y;switch(u=new e(u,d),l=new r(l,d),h){case">":f=o,p=a,m=s,g=">",y=">=";break;case"<":f=s,p=c,m=o,g="<",y="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(i(u,l,d))return!1;for(let e=0;e<l.set.length;++e){const r=l.set[e];let i=null,o=null;if(r.forEach((e=>{e.semver===n&&(e=new t(">=0.0.0")),i=i||e,o=o||e,f(e.semver,i.semver,d)?i=e:m(e.semver,o.semver,d)&&(o=e)})),i.operator===g||i.operator===y)return!1;if((!o.operator||o.operator===g)&&p(u,o.semver))return!1;if(o.operator===y&&m(u,o.semver))return!1}return!0},sn}function Hn(){if(wn)return _n;wn=1;const e=On(),t=Tn(),n=In(),r=Cn(),i=Nn(),o=function(){if(Je)return Qe;Je=1;const e=Nn();return Qe=(t,n)=>{const r=e(t,n);return r?r.version:null},Qe}(),s=function(){if(et)return Xe;et=1;const e=Nn();return Xe=(t,n)=>{const r=e(t.trim().replace(/^[=v]+/,""),n);return r?r.version:null},Xe}(),a=function(){if(nt)return tt;nt=1;const e=In();return tt=(t,n,r,i,o)=>{"string"==typeof r&&(o=i,i=r,r=void 0);try{return new e(t instanceof e?t.version:t,r).inc(n,i,o).version}catch(e){return null}},tt}(),c=function(){if(it)return rt;it=1;const e=Nn();return rt=(t,n)=>{const r=e(t,null,!0),i=e(n,null,!0),o=r.compare(i);if(0===o)return null;const s=o>0,a=s?r:i,c=s?i:r,u=!!a.prerelease.length;if(c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(0===c.compareMain(a))return c.minor&&!c.patch?"minor":"patch"}const l=u?"pre":"";return r.major!==i.major?l+"major":r.minor!==i.minor?l+"minor":r.patch!==i.patch?l+"patch":"prerelease"}}(),u=function(){if(st)return ot;st=1;const e=In();return ot=(t,n)=>new e(t,n).major}(),l=function(){if(ct)return at;ct=1;const e=In();return at=(t,n)=>new e(t,n).minor}(),h=function(){if(lt)return ut;lt=1;const e=In();return ut=(t,n)=>new e(t,n).patch}(),d=function(){if(dt)return ht;dt=1;const e=Nn();return ht=(t,n)=>{const r=e(t,n);return r&&r.prerelease.length?r.prerelease:null},ht}(),f=Rn(),p=function(){if(gt)return mt;gt=1;const e=Rn();return mt=(t,n,r)=>e(n,t,r)}(),m=function(){if(_t)return yt;_t=1;const e=Rn();return yt=(t,n)=>e(t,n,!0)}(),g=kn(),y=function(){if(Et)return vt;Et=1;const e=kn();return vt=(t,n)=>t.sort(((t,r)=>e(t,r,n)))}(),_=function(){if(St)return Tt;St=1;const e=kn();return Tt=(t,n)=>t.sort(((t,r)=>e(r,t,n)))}(),w=Dn(),b=Mn(),v=Pn(),E=Ln(),T=xn(),S=Un(),O=Fn(),A=function(){if(Bt)return jt;Bt=1;const e=In(),t=Nn(),{safeRe:n,t:r}=On();return jt=(i,o)=>{if(i instanceof e)return i;if("number"==typeof i&&(i=String(i)),"string"!=typeof i)return null;let s=null;if((o=o||{}).rtl){const e=o.includePrerelease?n[r.COERCERTLFULL]:n[r.COERCERTL];let t;for(;(t=e.exec(i))&&(!s||s.index+s[0].length!==i.length);)s&&t.index+t[0].length===s.index+s[0].length||(s=t),e.lastIndex=t.index+t[1].length+t[2].length;e.lastIndex=-1}else s=i.match(o.includePrerelease?n[r.COERCEFULL]:n[r.COERCE]);if(null===s)return null;const a=s[2],c=s[3]||"0",u=s[4]||"0",l=o.includePrerelease&&s[5]?`-${s[5]}`:"",h=o.includePrerelease&&s[6]?`+${s[6]}`:"";return t(`${a}.${c}.${u}${l}${h}`,o)},jt}(),C=Bn(),I=jn(),N=Yn(),R=function(){if(Zt)return Kt;Zt=1;const e=jn();return Kt=(t,n)=>new e(t,n).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" "))),Kt}(),k=function(){if(Jt)return Qt;Jt=1;const e=In(),t=jn();return Qt=(n,r,i)=>{let o=null,s=null,a=null;try{a=new t(r,i)}catch(e){return null}return n.forEach((t=>{a.test(t)&&(o&&-1!==s.compare(t)||(o=t,s=new e(o,i)))})),o},Qt}(),D=function(){if(en)return Xt;en=1;const e=In(),t=jn();return Xt=(n,r,i)=>{let o=null,s=null,a=null;try{a=new t(r,i)}catch(e){return null}return n.forEach((t=>{a.test(t)&&(o&&1!==s.compare(t)||(o=t,s=new e(o,i)))})),o},Xt}(),M=function(){if(nn)return tn;nn=1;const e=In(),t=jn(),n=Dn();return tn=(r,i)=>{r=new t(r,i);let o=new e("0.0.0");if(r.test(o))return o;if(o=new e("0.0.0-0"),r.test(o))return o;o=null;for(let t=0;t<r.set.length;++t){const i=r.set[t];let s=null;i.forEach((t=>{const r=new e(t.semver.version);switch(t.operator){case">":0===r.prerelease.length?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":s&&!n(r,s)||(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}})),!s||o&&!n(o,s)||(o=s)}return o&&r.test(o)?o:null},tn}(),P=qn(),L=$n(),x=function(){if(un)return cn;un=1;const e=$n();return cn=(t,n,r)=>e(t,n,">",r),cn}(),U=function(){if(hn)return ln;hn=1;const e=$n();return ln=(t,n,r)=>e(t,n,"<",r),ln}(),F=function(){if(fn)return dn;fn=1;const e=jn();return dn=(t,n,r)=>(t=new e(t,r),n=new e(n,r),t.intersects(n,r))}(),j=function(){if(mn)return pn;mn=1;const e=Yn(),t=Rn();return pn=(n,r,i)=>{const o=[];let s=null,a=null;const c=n.sort(((e,n)=>t(e,n,i)));for(const t of c)e(t,r,i)?(a=t,s||(s=t)):(a&&o.push([s,a]),a=null,s=null);s&&o.push([s,null]);const u=[];for(const[e,t]of o)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),h="string"==typeof r.raw?r.raw:String(r);return l.length<h.length?l:r},pn}(),B=function(){if(yn)return gn;yn=1;const e=jn(),t=Bn(),{ANY:n}=t,r=Yn(),i=Rn(),o=[new t(">=0.0.0-0")],s=[new t(">=0.0.0")],a=(e,t,a)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===n){if(1===t.length&&t[0].semver===n)return!0;e=a.includePrerelease?o:s}if(1===t.length&&t[0].semver===n){if(a.includePrerelease)return!0;t=s}const l=new Set;let h,d,f,p,m,g,y;for(const t of e)">"===t.operator||">="===t.operator?h=c(h,t,a):"<"===t.operator||"<="===t.operator?d=u(d,t,a):l.add(t.semver);if(l.size>1)return null;if(h&&d){if(f=i(h.semver,d.semver,a),f>0)return null;if(0===f&&(">="!==h.operator||"<="!==d.operator))return null}for(const e of l){if(h&&!r(e,String(h),a))return null;if(d&&!r(e,String(d),a))re