clean-pkg-json
Version:
Clean package.json before publish by removing unnecessary properties
23 lines (22 loc) • 38.4 kB
JavaScript
;var aD=Object.defineProperty;var o=(D,u)=>aD(D,"name",{value:u,configurable:!0});var j=require("fs"),sD=require("tty");const lD="known-flag",ED="unknown-flag",pD="argument",{stringify:m}=JSON,BD=/\B([A-Z])/g,cD=o(D=>D.replace(BD,"-$1").toLowerCase(),"v$1"),{hasOwnProperty:dD}=Object.prototype,b=o((D,u)=>dD.call(D,u),"w$2"),fD=o(D=>Array.isArray(D),"L$2"),q=o(D=>typeof D=="function"?[D,!1]:fD(D)?[D[0],!0]:q(D.type),"b$2"),gD=o((D,u)=>D===Boolean?u!=="false":u,"d$2"),hD=o((D,u)=>typeof u=="boolean"?u:D===Number&&u===""?Number.NaN:D(u),"m$1"),AD=/[\s.:=]/,mD=o(D=>{const u=`Flag name ${m(D)}`;if(D.length===0)throw new Error(`${u} cannot be empty`);if(D.length===1)throw new Error(`${u} must be longer than a character`);const e=D.match(AD);if(e)throw new Error(`${u} cannot contain ${m(e==null?void 0:e[0])}`)},"B"),bD=o(D=>{const u={},e=o((t,F)=>{if(b(u,t))throw new Error(`Duplicate flags named ${m(t)}`);u[t]=F},"r");for(const t in D){if(!b(D,t))continue;mD(t);const F=D[t],n=[[],...q(F),F];e(t,n);const r=cD(t);if(t!==r&&e(r,n),"alias"in F&&typeof F.alias=="string"){const{alias:C}=F,i=`Flag alias ${m(C)} for flag ${m(t)}`;if(C.length===0)throw new Error(`${i} cannot be empty`);if(C.length>1)throw new Error(`${i} must be a single character`);e(C,n)}}return u},"K$1"),yD=o((D,u)=>{const e={};for(const t in D){if(!b(D,t))continue;const[F,,n,r]=u[t];if(F.length===0&&"default"in r){let{default:C}=r;typeof C=="function"&&(C=C()),e[t]=C}else e[t]=n?F:F.pop()}return e},"_$2"),w="--",vD=/[.:=]/,wD=/^-{1,2}\w/,$D=o(D=>{if(!wD.test(D))return;const u=!D.startsWith(w);let e=D.slice(u?1:2),t;const F=e.match(vD);if(F){const{index:n}=F;t=e.slice(n+1),e=e.slice(0,n)}return[e,t,u]},"N"),xD=o((D,{onFlag:u,onArgument:e})=>{let t;const F=o((n,r)=>{if(typeof t!="function")return!0;t(n,r),t=void 0},"o");for(let n=0;n<D.length;n+=1){const r=D[n];if(r===w){F();const i=D.slice(n+1);e==null||e(i,[n],!0);break}const C=$D(r);if(C){if(F(),!u)continue;const[i,a,l]=C;if(l)for(let E=0;E<i.length;E+=1){F();const s=E===i.length-1;t=u(i[E],s?a:void 0,[n,E+1,s])}else t=u(i,a,[n])}else F(r,[n])&&(e==null||e([r],[n]))}F()},"$$1"),OD=o((D,u)=>{for(const[e,t,F]of u.reverse()){if(t){const n=D[e];let r=n.slice(0,t);if(F||(r+=n.slice(t+1)),r!=="-"){D[e]=r;continue}}D.splice(e,1)}},"E"),jD=o((D,u=process.argv.slice(2),{ignore:e}={})=>{const t=[],F=bD(D),n={},r=[];return r[w]=[],xD(u,{onFlag(C,i,a){const l=b(F,C);if(!(e!=null&&e(l?lD:ED,C,i))){if(l){const[E,s]=F[C],p=gD(s,i),B=o((f,h)=>{t.push(a),h&&t.push(h),E.push(hD(s,f||""))},"p");return p===void 0?B:B(p)}b(n,C)||(n[C]=[]),n[C].push(i===void 0?!0:i),t.push(a)}},onArgument(C,i,a){e!=null&&e(pD,u[i[0]])||(r.push(...C),a?(r[w]=C,u.splice(i[0])):t.push(i))}}),OD(u,t),{flags:yD(D,F),unknownFlags:n,_:r}},"U$2");var kD=Object.create,$=Object.defineProperty,MD=Object.defineProperties,PD=Object.getOwnPropertyDescriptor,SD=Object.getOwnPropertyDescriptors,ND=Object.getOwnPropertyNames,J=Object.getOwnPropertySymbols,RD=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty,TD=Object.prototype.propertyIsEnumerable,Z=o((D,u,e)=>u in D?$(D,u,{enumerable:!0,configurable:!0,writable:!0,value:e}):D[u]=e,"W$1"),x=o((D,u)=>{for(var e in u||(u={}))U.call(u,e)&&Z(D,e,u[e]);if(J)for(var e of J(u))TD.call(u,e)&&Z(D,e,u[e]);return D},"p"),k=o((D,u)=>MD(D,SD(u)),"c"),LD=o(D=>$(D,"__esModule",{value:!0}),"nD"),ID=o((D,u)=>()=>(D&&(u=D(D=0)),u),"rD"),WD=o((D,u)=>()=>(u||D((u={exports:{}}).exports,u),u.exports),"iD"),_D=o((D,u,e,t)=>{if(u&&typeof u=="object"||typeof u=="function")for(let F of ND(u))!U.call(D,F)&&F!=="default"&&$(D,F,{get:o(()=>u[F],"get"),enumerable:!(t=PD(u,F))||t.enumerable});return D},"oD"),zD=o((D,u)=>_D(LD($(D!=null?kD(RD(D)):{},"default",{value:D,enumerable:!0})),D),"BD"),c=ID(()=>{}),qD=WD((D,u)=>{c(),u.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uD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D27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\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\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});c(),c(),c();var JD=o(D=>{var u,e,t;let F=(u=process.stdout.columns)!=null?u:Number.POSITIVE_INFINITY;return typeof D=="function"&&(D=D(F)),D||(D={}),Array.isArray(D)?{columns:D,stdoutColumns:F}:{columns:(e=D.columns)!=null?e:[],stdoutColumns:(t=D.stdoutColumns)!=null?t:F}},"v");c(),c(),c(),c(),c();function UD({onlyFirst:D=!1}={}){let u=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(u,D?void 0:"g")}o(UD,"w$1");function G(D){if(typeof D!="string")throw new TypeError(`Expected a \`string\`, got \`${typeof D}\``);return D.replace(UD(),"")}o(G,"d$1"),c();function ZD(D){return Number.isInteger(D)?D>=4352&&(D<=4447||D===9001||D===9002||11904<=D&&D<=12871&&D!==12351||12880<=D&&D<=19903||19968<=D&&D<=42182||43360<=D&&D<=43388||44032<=D&&D<=55203||63744<=D&&D<=64255||65040<=D&&D<=65049||65072<=D&&D<=65131||65281<=D&&D<=65376||65504<=D&&D<=65510||110592<=D&&D<=110593||127488<=D&&D<=127569||131072<=D&&D<=262141):!1}o(ZD,"y$1");var GD=zD(qD());function g(D){if(typeof D!="string"||D.length===0||(D=G(D),D.length===0))return 0;D=D.replace((0,GD.default)()," ");let u=0;for(let e=0;e<D.length;e++){let t=D.codePointAt(e);t<=31||t>=127&&t<=159||t>=768&&t<=879||(t>65535&&e++,u+=ZD(t)?2:1)}return u}o(g,"g");var V=o(D=>Math.max(...D.split(`
`).map(g)),"b$1"),VD=o(D=>{let u=[];for(let e of D){let{length:t}=e,F=t-u.length;for(let n=0;n<F;n+=1)u.push(0);for(let n=0;n<t;n+=1){let r=V(e[n]);r>u[n]&&(u[n]=r)}}return u},"k$1");c();var K=/^\d+%$/,Y={width:"auto",align:"left",contentWidth:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,horizontalPadding:0,paddingLeftString:"",paddingRightString:""},KD=o((D,u)=>{var e;let t=[];for(let F=0;F<D.length;F+=1){let n=(e=u[F])!=null?e:"auto";if(typeof n=="number"||n==="auto"||n==="content-width"||typeof n=="string"&&K.test(n)){t.push(k(x({},Y),{width:n,contentWidth:D[F]}));continue}if(n&&typeof n=="object"){let r=k(x(x({},Y),n),{contentWidth:D[F]});r.horizontalPadding=r.paddingLeft+r.paddingRight,t.push(r);continue}throw new Error(`Invalid column width: ${JSON.stringify(n)}`)}return t},"sD");function YD(D,u){for(let e of D){let{width:t}=e;if(t==="content-width"&&(e.width=e.contentWidth),t==="auto"){let i=Math.min(20,e.contentWidth);e.width=i,e.autoOverflow=e.contentWidth-i}if(typeof t=="string"&&K.test(t)){let i=Number.parseFloat(t.slice(0,-1))/100;e.width=Math.floor(u*i)-(e.paddingLeft+e.paddingRight)}let{horizontalPadding:F}=e,n=1,r=n+F;if(r>=u){let i=r-u,a=Math.ceil(e.paddingLeft/F*i),l=i-a;e.paddingLeft-=a,e.paddingRight-=l,e.horizontalPadding=e.paddingLeft+e.paddingRight}e.paddingLeftString=e.paddingLeft?" ".repeat(e.paddingLeft):"",e.paddingRightString=e.paddingRight?" ".repeat(e.paddingRight):"";let C=u-e.horizontalPadding;e.width=Math.max(Math.min(e.width,C),n)}}o(YD,"aD");var H=o(()=>Object.assign([],{columns:0}),"G");function HD(D,u){let e=[H()],[t]=e;for(let F of D){let n=F.width+F.horizontalPadding;t.columns+n>u&&(t=H(),e.push(t)),t.push(F),t.columns+=n}for(let F of e){let n=F.reduce((s,p)=>s+p.width+p.horizontalPadding,0),r=u-n;if(r===0)continue;let C=F.filter(s=>"autoOverflow"in s),i=C.filter(s=>s.autoOverflow>0),a=i.reduce((s,p)=>s+p.autoOverflow,0),l=Math.min(a,r);for(let s of i){let p=Math.floor(s.autoOverflow/a*l);s.width+=p,r-=p}let E=Math.floor(r/C.length);for(let s=0;s<C.length;s+=1){let p=C[s];s===C.length-1?p.width+=r:p.width+=E,r-=E}}return e}o(HD,"lD");function QD(D,u,e){let t=KD(e,u);return YD(t,D),HD(t,D)}o(QD,"Z$1"),c(),c(),c();var M=10,Q=o((D=0)=>u=>`\x1B[${u+D}m`,"U$1"),X=o((D=0)=>u=>`\x1B[${38+D};5;${u}m`,"V$1"),DD=o((D=0)=>(u,e,t)=>`\x1B[${38+D};2;${u};${e};${t}m`,"Y");function XD(){let D=new Map,u={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],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]}};u.color.gray=u.color.blackBright,u.bgColor.bgGray=u.bgColor.bgBlackBright,u.color.grey=u.color.blackBright,u.bgColor.bgGrey=u.bgColor.bgBlackBright;for(let[e,t]of Object.entries(u)){for(let[F,n]of Object.entries(t))u[F]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},t[F]=u[F],D.set(n[0],n[1]);Object.defineProperty(u,e,{value:t,enumerable:!1})}return Object.defineProperty(u,"codes",{value:D,enumerable:!1}),u.color.close="\x1B[39m",u.bgColor.close="\x1B[49m",u.color.ansi=Q(),u.color.ansi256=X(),u.color.ansi16m=DD(),u.bgColor.ansi=Q(M),u.bgColor.ansi256=X(M),u.bgColor.ansi16m=DD(M),Object.defineProperties(u,{rgbToAnsi256:{value:o((e,t,F)=>e===t&&t===F?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(F/255*5),"value"),enumerable:!1},hexToRgb:{value:o(e=>{let t=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(e.toString(16));if(!t)return[0,0,0];let{colorString:F}=t.groups;F.length===3&&(F=F.split("").map(r=>r+r).join(""));let n=Number.parseInt(F,16);return[n>>16&255,n>>8&255,n&255]},"value"),enumerable:!1},hexToAnsi256:{value:o(e=>u.rgbToAnsi256(...u.hexToRgb(e)),"value"),enumerable:!1},ansi256ToAnsi:{value:o(e=>{if(e<8)return 30+e;if(e<16)return 90+(e-8);let t,F,n;if(e>=232)t=((e-232)*10+8)/255,F=t,n=t;else{e-=16;let i=e%36;t=Math.floor(e/36)/5,F=Math.floor(i/6)/5,n=i%6/5}let r=Math.max(t,F,n)*2;if(r===0)return 30;let C=30+(Math.round(n)<<2|Math.round(F)<<1|Math.round(t));return r===2&&(C+=60),C},"value"),enumerable:!1},rgbToAnsi:{value:o((e,t,F)=>u.ansi256ToAnsi(u.rgbToAnsi256(e,t,F)),"value"),enumerable:!1},hexToAnsi:{value:o(e=>u.ansi256ToAnsi(u.hexToAnsi256(e)),"value"),enumerable:!1}}),u}o(XD,"AD");var Du=XD(),uu=Du,O=new Set(["\x1B","\x9B"]),eu=39,P="\x07",uD="[",tu="]",eD="m",S=`${tu}8;;`,tD=o(D=>`${O.values().next().value}${uD}${D}${eD}`,"J$1"),FD=o(D=>`${O.values().next().value}${S}${D}${P}`,"Q"),Fu=o(D=>D.split(" ").map(u=>g(u)),"hD"),N=o((D,u,e)=>{let t=[...u],F=!1,n=!1,r=g(G(D[D.length-1]));for(let[C,i]of t.entries()){let a=g(i);if(r+a<=e?D[D.length-1]+=i:(D.push(i),r=0),O.has(i)&&(F=!0,n=t.slice(C+1).join("").startsWith(S)),F){n?i===P&&(F=!1,n=!1):i===eD&&(F=!1);continue}r+=a,r===e&&C<t.length-1&&(D.push(""),r=0)}!r&&D[D.length-1].length>0&&D.length>1&&(D[D.length-2]+=D.pop())},"S"),nu=o(D=>{let u=D.split(" "),e=u.length;for(;e>0&&!(g(u[e-1])>0);)e--;return e===u.length?D:u.slice(0,e).join(" ")+u.slice(e).join("")},"cD"),ru=o((D,u,e={})=>{if(e.trim!==!1&&D.trim()==="")return"";let t="",F,n,r=Fu(D),C=[""];for(let[a,l]of D.split(" ").entries()){e.trim!==!1&&(C[C.length-1]=C[C.length-1].trimStart());let E=g(C[C.length-1]);if(a!==0&&(E>=u&&(e.wordWrap===!1||e.trim===!1)&&(C.push(""),E=0),(E>0||e.trim===!1)&&(C[C.length-1]+=" ",E++)),e.hard&&r[a]>u){let s=u-E,p=1+Math.floor((r[a]-s-1)/u);Math.floor((r[a]-1)/u)<p&&C.push(""),N(C,l,u);continue}if(E+r[a]>u&&E>0&&r[a]>0){if(e.wordWrap===!1&&E<u){N(C,l,u);continue}C.push("")}if(E+r[a]>u&&e.wordWrap===!1){N(C,l,u);continue}C[C.length-1]+=l}e.trim!==!1&&(C=C.map(a=>nu(a)));let i=[...C.join(`
`)];for(let[a,l]of i.entries()){if(t+=l,O.has(l)){let{groups:s}=new RegExp(`(?:\\${uD}(?<code>\\d+)m|\\${S}(?<uri>.*)${P})`).exec(i.slice(a).join(""))||{groups:{}};if(s.code!==void 0){let p=Number.parseFloat(s.code);F=p===eu?void 0:p}else s.uri!==void 0&&(n=s.uri.length===0?void 0:s.uri)}let E=uu.codes.get(Number(F));i[a+1]===`
`?(n&&(t+=FD("")),F&&E&&(t+=tD(E))):l===`
`&&(F&&E&&(t+=tD(F)),n&&(t+=FD(n)))}return t},"dD");function ou(D,u,e){return String(D).normalize().replace(/\r\n/g,`
`).split(`
`).map(t=>ru(t,u,e)).join(`
`)}o(ou,"T$1");var nD=o(D=>Array.from({length:D}).fill(""),"X");function iu(D,u){let e=[],t=0;for(let F of D){let n=0,r=F.map(i=>{var a;let l=(a=u[t])!=null?a:"";t+=1,i.preprocess&&(l=i.preprocess(l)),V(l)>i.width&&(l=ou(l,i.width,{hard:!0}));let E=l.split(`
`);if(i.postprocess){let{postprocess:s}=i;E=E.map((p,B)=>s.call(i,p,B))}return i.paddingTop&&E.unshift(...nD(i.paddingTop)),i.paddingBottom&&E.push(...nD(i.paddingBottom)),E.length>n&&(n=E.length),k(x({},i),{lines:E})}),C=[];for(let i=0;i<n;i+=1){let a=r.map(l=>{var E;let s=(E=l.lines[i])!=null?E:"",p=Number.isFinite(l.width)?" ".repeat(l.width-g(s)):"",B=l.paddingLeftString;return l.align==="right"&&(B+=p),B+=s,l.align==="left"&&(B+=p),B+l.paddingRightString}).join("");C.push(a)}e.push(C.join(`
`))}return e.join(`
`)}o(iu,"P$1");function Cu(D,u){if(!D||D.length===0)return"";let e=VD(D),t=e.length;if(t===0)return"";let{stdoutColumns:F,columns:n}=JD(u);if(n.length>t)throw new Error(`${n.length} columns defined, but only ${t} columns found`);let r=QD(F,n,e);return D.map(C=>iu(r,C)).join(`
`)}o(Cu,"mD"),c();var au=["<",">","=",">=","<="];function su(D){if(!au.includes(D))throw new TypeError(`Invalid breakpoint operator: ${D}`)}o(su,"xD");function lu(D){let u=Object.keys(D).map(e=>{let[t,F]=e.split(" ");su(t);let n=Number.parseInt(F,10);if(Number.isNaN(n))throw new TypeError(`Invalid breakpoint value: ${F}`);let r=D[e];return{operator:t,breakpoint:n,value:r}}).sort((e,t)=>t.breakpoint-e.breakpoint);return e=>{var t;return(t=u.find(({operator:F,breakpoint:n})=>F==="="&&e===n||F===">"&&e>n||F==="<"&&e<n||F===">="&&e>=n||F==="<="&&e<=n))==null?void 0:t.value}}o(lu,"wD");const Eu=o(D=>D.replace(/[\W_]([a-z\d])?/gi,(u,e)=>e?e.toUpperCase():""),"P"),pu=o(D=>D.replace(/\B([A-Z])/g,"-$1").toLowerCase(),"q"),Bu={"> 80":[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"auto"}],"> 40":[{width:"auto",paddingLeft:2,paddingRight:8,preprocess:o(D=>D.trim(),"preprocess")},{width:"100%",paddingLeft:2,paddingBottom:1}],"> 0":{stdoutColumns:1e3,columns:[{width:"content-width",paddingLeft:2,paddingRight:8},{width:"content-width"}]}};function cu(D){let u=!1;return{type:"table",data:{tableData:Object.keys(D).sort((e,t)=>e.localeCompare(t)).map(e=>{const t=D[e],F="alias"in t;return F&&(u=!0),{name:e,flag:t,flagFormatted:`--${pu(e)}`,aliasesEnabled:u,aliasFormatted:F?`-${t.alias}`:void 0}}).map(e=>(e.aliasesEnabled=u,[{type:"flagName",data:e},{type:"flagDescription",data:e}])),tableBreakpoints:Bu}}}o(cu,"D");const rD=o(D=>{var u;return!D||((u=D.version)!=null?u:D.help?D.help.version:void 0)},"A"),oD=o(D=>{var u;const e="parent"in D&&((u=D.parent)==null?void 0:u.name);return(e?`${e} `:"")+D.name},"C");function du(D){var u;const e=[];D.name&&e.push(oD(D));const t=(u=rD(D))!=null?u:"parent"in D&&rD(D.parent);if(t&&e.push(`v${t}`),e.length!==0)return{id:"name",type:"text",data:`${e.join(" ")}
`}}o(du,"R");function fu(D){const{help:u}=D;if(!(!u||!u.description))return{id:"description",type:"text",data:`${u.description}
`}}o(fu,"L");function gu(D){var u;const e=D.help||{};if("usage"in e)return e.usage?{id:"usage",type:"section",data:{title:"Usage:",body:Array.isArray(e.usage)?e.usage.join(`
`):e.usage}}:void 0;if(D.name){const t=[],F=[oD(D)];if(D.flags&&Object.keys(D.flags).length>0&&F.push("[flags...]"),D.parameters&&D.parameters.length>0){const{parameters:n}=D,r=n.indexOf("--"),C=r>-1&&n.slice(r+1).some(i=>i.startsWith("<"));F.push(n.map(i=>i!=="--"?i:C?"--":"[--]").join(" "))}if(F.length>1&&t.push(F.join(" ")),"commands"in D&&((u=D.commands)!=null&&u.length)&&t.push(`${D.name} <command>`),t.length>0)return{id:"usage",type:"section",data:{title:"Usage:",body:t.join(`
`)}}}}o(gu,"T");function hu(D){var u;return!("commands"in D)||!((u=D.commands)!=null&&u.length)?void 0:{id:"commands",type:"section",data:{title:"Commands:",body:{type:"table",data:{tableData:D.commands.map(e=>[e.options.name,e.options.help?e.options.help.description:""]),tableOptions:[{width:"content-width",paddingLeft:2,paddingRight:8}]}},indentBody:0}}}o(hu,"_");function Au(D){if(!(!D.flags||Object.keys(D.flags).length===0))return{id:"flags",type:"section",data:{title:"Flags:",body:cu(D.flags),indentBody:0}}}o(Au,"k");function mu(D){const{help:u}=D;if(!u||!u.examples||u.examples.length===0)return;let{examples:e}=u;if(Array.isArray(e)&&(e=e.join(`
`)),e)return{id:"examples",type:"section",data:{title:"Examples:",body:e}}}o(mu,"F");function bu(D){if(!("alias"in D)||!D.alias)return;const{alias:u}=D;return{id:"aliases",type:"section",data:{title:"Aliases:",body:Array.isArray(u)?u.join(", "):u}}}o(bu,"H");const yu=o(D=>[du,fu,gu,hu,Au,mu,bu].map(u=>u(D)).filter(Boolean),"U"),vu=sD.WriteStream.prototype.hasColors(),W=class W{text(u){return u}bold(u){return vu?`\x1B[1m${u}\x1B[22m`:u.toLocaleUpperCase()}indentText({text:u,spaces:e}){return u.replace(/^/gm," ".repeat(e))}heading(u){return this.bold(u)}section({title:u,body:e,indentBody:t=2}){return`${(u?`${this.heading(u)}
`:"")+(e?this.indentText({text:this.render(e),spaces:t}):"")}
`}table({tableData:u,tableOptions:e,tableBreakpoints:t}){return Cu(u.map(F=>F.map(n=>this.render(n))),t?lu(t):e)}flagParameter(u){return u===Boolean?"":u===String?"<string>":u===Number?"<number>":Array.isArray(u)?this.flagParameter(u[0]):"<value>"}flagOperator(u){return" "}flagName(u){const{flag:e,flagFormatted:t,aliasesEnabled:F,aliasFormatted:n}=u;let r="";if(n?r+=`${n}, `:F&&(r+=" "),r+=t,"placeholder"in e&&typeof e.placeholder=="string")r+=`${this.flagOperator(u)}${e.placeholder}`;else{const C=this.flagParameter("type"in e?e.type:e);C&&(r+=`${this.flagOperator(u)}${C}`)}return r}flagDefault(u){return JSON.stringify(u)}flagDescription({flag:u}){var e;let t="description"in u&&(e=u.description)!=null?e:"";if("default"in u){let{default:F}=u;typeof F=="function"&&(F=F()),F&&(t+=` (default: ${this.flagDefault(F)})`)}return t}render(u){if(typeof u=="string")return u;if(Array.isArray(u))return u.map(e=>this.render(e)).join(`
`);if("type"in u&&this[u.type]){const e=this[u.type];if(typeof e=="function")return e.call(this,u.data)}throw new Error(`Invalid node type: ${JSON.stringify(u)}`)}};o(W,"J");let R=W;const iD=o(D=>D.length>0&&!D.includes(" "),"y"),{stringify:d}=JSON,wu=/[|\\{}()[\]^$+*?.]/;function T(D){const u=[];let e,t;for(const F of D){if(t)throw new Error(`Invalid parameter: Spread parameter ${d(t)} must be last`);const n=F[0],r=F[F.length-1];let C;if(n==="<"&&r===">"&&(C=!0,e))throw new Error(`Invalid parameter: Required parameter ${d(F)} cannot come after optional parameter ${d(e)}`);if(n==="["&&r==="]"&&(C=!1,e=F),C===void 0)throw new Error(`Invalid parameter: ${d(F)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let i=F.slice(1,-1);const a=i.slice(-3)==="...";a&&(t=F,i=i.slice(0,-3));const l=i.match(wu);if(l)throw new Error(`Invalid parameter: ${d(F)}. Invalid character found ${d(l[0])}`);u.push({name:i,required:C,spread:a})}return u}o(T,"w");function L(D,u,e,t){for(let F=0;F<u.length;F+=1){const{name:n,required:r,spread:C}=u[F],i=Eu(n);if(i in D)throw new Error(`Invalid parameter: ${d(n)} is used more than once.`);const a=C?e.slice(F):e[F];if(C&&(F=u.length),r&&(!a||C&&a.length===0))return console.error(`Error: Missing required parameter ${d(n)}
`),t(),process.exit(1);D[i]=a}}o(L,"b");function $u(D){return D===void 0||D!==!1}o($u,"W");function CD(D,u,e,t){const F={...u.flags},n=u.version;n&&(F.version={type:Boolean,description:"Show version"});const{help:r}=u,C=$u(r);C&&!("help"in F)&&(F.help={type:Boolean,alias:"h",description:"Show help"});const i=jD(F,t,{ignore:u.ignoreArgv}),a=o(()=>{console.log(u.version)},"f");if(n&&i.flags.version===!0)return a(),process.exit(0);const l=new R,E=C&&(r!=null&&r.render)?r.render:B=>l.render(B),s=o(B=>{const f=yu({...u,...B?{help:B}:{},flags:F});console.log(E(f,l))},"u");if(C&&i.flags.help===!0)return s(),process.exit(0);if(u.parameters){let{parameters:B}=u,f=i._;const h=B.indexOf("--"),_=B.slice(h+1),v=Object.create(null);if(h>-1&&_.length>0){B=B.slice(0,h);const z=i._["--"];f=f.slice(0,-z.length||void 0),L(v,T(B),f,s),L(v,T(_),z,s)}else L(v,T(B),f,s);Object.assign(i._,v)}const p={...i,showVersion:a,showHelp:s};return typeof e=="function"&&e(p),{command:D,...p}}o(CD,"x");function xu(D,u){const e=new Map;for(const t of u){const F=[t.options.name],{alias:n}=t.options;n&&(Array.isArray(n)?F.push(...n):F.push(n));for(const r of F){if(e.has(r))throw new Error(`Duplicate command name found: ${d(r)}`);e.set(r,t)}}return e.get(D)}o(xu,"z");function Ou(D,u,e=process.argv.slice(2)){if(!D)throw new Error("Options is required");if("name"in D&&(!D.name||!iD(D.name)))throw new Error(`Invalid script name: ${d(D.name)}`);const t=e[0];if(D.commands&&t&&iD(t)){const F=xu(t,D.commands);if(F)return CD(F.options.name,{...F.options,parent:D},F.callback,e.slice(1))}return CD(void 0,D,u,e)}o(Ou,"Z");var ju="clean-pkg-json",ku="1.3.0",Mu="Clean package.json before publish by removing unnecessary properties";const Pu=["name","version","private","publishConfig","scripts.preinstall","scripts.install","scripts.postinstall","scripts.dependencies","files","bin","browser","main","man","jsdelivr","unpkg","dependencies","peerDependencies","peerDependenciesMeta","bundledDependencies","optionalDependencies","engines","os","cpu","description","keywords","author","maintainers","contributors","license","homepage","repository","bugs","funding","type","exports","imports","sponsor","publisher","displayName","categories","galleryBanner","preview","contributes","activationEvents","badges","markdown","qna","sponsor","extensionPack","extensionDependencies","extensionKind","icon","fesm2022","fesm2020","fesm2015","esm2020","es2020","types","typings","typesVersions","module","sideEffects"],y="./package.json",A=Ou({name:ju,version:ku,flags:{verbose:{type:Boolean,alias:"v",description:"Log changes"},keep:{type:[String],alias:"k",description:"package.json properties to keep"},remove:{type:[String],alias:"r",description:"package.json properties to remove"},dry:{type:Boolean,alias:"d",description:"Dry run"}},help:{description:Mu}}),I=o((...D)=>{A.flags.verbose&&console.log(...D)},"log");(async()=>{if(!await j.promises.access(y).then(()=>!0,()=>!1))throw new Error(`${y} does not exist`);const u=await j.promises.readFile(y,"utf8"),e=JSON.parse(u),t=new Set([...Pu,...A.flags.keep.flatMap(n=>n.split(","))]);for(const n of A.flags.remove)t.delete(n);I("Keeing properties",Array.from(t));for(const n in e)if(!t.has(n)){if(n==="scripts"){for(const r in e.scripts)t.has(`${n}.${r}`)||delete e.scripts[r];if(Object.keys(e.scripts).length>0)continue}I(`Removing property "${n}"`),delete e[n]}const F=JSON.stringify(e,null,2);(A.flags.dry||A.flags.verbose)&&console.log(F),A.flags.dry||(await j.promises.writeFile(y,F),I(`Updated ${y}`))})();