@nice-move/prettier-plugin-package-json
Version:
A `prettier` plugin to make `package.json` prettier
1 lines • 411 kB
JavaScript
import{createRequire as e}from"node:module";const t=e(import.meta.url);var s={9582(e){e.exports=function(){return/^\s*([^<(]*?)\s*([<(]([^>)]*?)[>)])?\s*([<(]([^>)]*?)[>)])*\s*$/}},4484(e){function t(e,t,r){e instanceof RegExp&&(e=s(e,r)),t instanceof RegExp&&(t=s(t,r));var a=i(e,t,r);return a&&{start:a[0],end:a[1],pre:r.slice(0,a[0]),body:r.slice(a[0]+e.length,a[1]),post:r.slice(a[1]+t.length)}}function s(e,t){var s=t.match(e);return s?s[0]:null}function i(e,t,s){var i,r,a,n,o,h=s.indexOf(e),l=s.indexOf(t,h+1),p=h;if(h>=0&&l>0){if(e===t)return[h,l];for(i=[],a=s.length;p>=0&&!o;)p==h?(i.push(p),h=s.indexOf(e,p+1)):1==i.length?o=[i.pop(),l]:((r=i.pop())<a&&(a=r,n=l),l=s.indexOf(t,p+1)),p=h<l&&h>=0?h:l;i.length&&(o=[a,n])}return o}e.exports=t,t.range=i},2921(e,t,s){var i=s(486),r=s(4484);e.exports=function(e,t){if(!e)return[];var s=null==(t=t||{}).max?1/0:t.max;return"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),x(function(e){return e.split("\\\\").join(a).split("\\{").join(n).split("\\}").join(o).split("\\,").join(h).split("\\.").join(l)}(e),s,!0).map(c)};var a="\0SLASH"+Math.random()+"\0",n="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",h="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function p(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function c(e){return e.split(a).join("\\").split(n).join("{").split(o).join("}").split(h).join(",").split(l).join(".")}function u(e){if(!e)return[""];var t=[],s=r("{","}",e);if(!s)return e.split(",");var i=s.pre,a=s.body,n=s.post,o=i.split(",");o[o.length-1]+="{"+a+"}";var h=u(n);return n.length&&(o[o.length-1]+=h.shift(),o.push.apply(o,h)),t.push.apply(t,o),t}function d(e){return"{"+e+"}"}function m(e){return/^-?0\d/.test(e)}function f(e,t){return e<=t}function y(e,t){return e>=t}function x(e,t,s){var a=[],n=r("{","}",e);if(!n||/\$$/.test(n.pre))return[e];var h,l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),g=l||c,P=n.body.indexOf(",")>=0;if(!g&&!P)return n.post.match(/,(?!,).*\}/)?x(e=n.pre+"{"+n.body+o+n.post,t,!0):[e];if(g)h=n.body.split(/\.\./);else if(1===(h=u(n.body)).length&&1===(h=x(h[0],t,!1).map(d)).length)return(S=n.post.length?x(n.post,t,!1):[""]).map(function(e){return n.pre+h[0]+e});var b,T=n.pre,S=n.post.length?x(n.post,t,!1):[""];if(g){var E=p(h[0]),A=p(h[1]),C=Math.max(h[0].length,h[1].length),w=3==h.length?Math.max(Math.abs(p(h[2])),1):1,I=f;A<E&&(w*=-1,I=y);var N=h.some(m);b=[];for(var v=E;I(v,A)&&b.length<t;v+=w){var L;if(c)"\\"===(L=String.fromCharCode(v))&&(L="");else if(L=String(v),N){var k=C-L.length;if(k>0){var D=new Array(k+1).join("0");L=v<0?"-"+D+L.slice(1):D+L}}b.push(L)}}else b=i(h,function(e){return x(e,t,!1)});for(var O=0;O<b.length;O++)for(var M=0;M<S.length&&a.length<t;M++){var F=T+b[O]+S[M];(!s||g||F)&&a.push(F)}return a}},486(e){e.exports=function(e,s){for(var i=[],r=0;r<e.length;r++){var a=s(e[r],r);t(a)?i.push.apply(i,a):i.push(a)}return i};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},438(e,t,s){const i=s(2895);e.exports=(e,t,{gitHosts:s,protocols:r})=>{if(!e)return;const a=(e=>{const t=e.indexOf("#"),s=e.indexOf("/"),i=e.indexOf("/",s+1),r=e.indexOf(":"),a=/\s/.exec(e),n=e.indexOf("@"),o=!a||t>-1&&a.index>t,h=-1===n||t>-1&&n>t,l=-1===r||t>-1&&r>t,p=-1===i||t>-1&&i>t,c=s>0,u=t>-1?"/"!==e[t-1]:!e.endsWith("/"),d=!e.startsWith(".");return o&&c&&u&&d&&h&&l&&p})(e)?`github:${e}`:e,n=i(a,r);if(!n)return;const o=s.byShortcut[n.protocol],h=s.byDomain[n.hostname.startsWith("www.")?n.hostname.slice(4):n.hostname],l=o||h;if(!l)return;const p=s[o||h];let c=null;r[n.protocol]?.auth&&(n.username||n.password)&&(c=`${n.username}${n.password?":"+n.password:""}`);let u=null,d=null,m=null,f=null;try{if(o){let e=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname;const t=e.indexOf("@");t>-1&&(e=e.slice(t+1));const s=e.lastIndexOf("/");s>-1?(d=decodeURIComponent(e.slice(0,s)),d||(d=null),m=decodeURIComponent(e.slice(s+1))):m=decodeURIComponent(e),m.endsWith(".git")&&(m=m.slice(0,-4)),n.hash&&(u=decodeURIComponent(n.hash.slice(1))),f="shortcut"}else{if(!p.protocols.includes(n.protocol))return;const e=p.extract(n);if(!e)return;d=e.user&&decodeURIComponent(e.user),m=decodeURIComponent(e.project),u=decodeURIComponent(e.committish),f=r[n.protocol]?.name||n.protocol.slice(0,-1)}}catch(e){if(e instanceof URIError)return;throw e}return[l,d,c,m,u,f,t]}},5311(e){const t=(...e)=>e.every(e=>e)?e.join(""):"",s=e=>e?encodeURIComponent(e):"",i=e=>e.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),r={sshtemplate:({domain:e,user:s,project:i,committish:r})=>`git@${e}:${s}/${i}.git${t("#",r)}`,sshurltemplate:({domain:e,user:s,project:i,committish:r})=>`git+ssh://git@${e}/${s}/${i}.git${t("#",r)}`,edittemplate:({domain:e,user:i,project:r,committish:a,editpath:n,path:o})=>`https://${e}/${i}/${r}${t("/",n,"/",s(a||"HEAD"),"/",o)}`,browsetemplate:({domain:e,user:i,project:r,committish:a,treepath:n})=>`https://${e}/${i}/${r}${t("/",n,"/",s(a))}`,browsetreetemplate:({domain:e,user:i,project:r,committish:a,treepath:n,path:o,fragment:h,hashformat:l})=>`https://${e}/${i}/${r}/${n}/${s(a||"HEAD")}/${o}${t("#",l(h||""))}`,browseblobtemplate:({domain:e,user:i,project:r,committish:a,blobpath:n,path:o,fragment:h,hashformat:l})=>`https://${e}/${i}/${r}/${n}/${s(a||"HEAD")}/${o}${t("#",l(h||""))}`,docstemplate:({domain:e,user:i,project:r,treepath:a,committish:n})=>`https://${e}/${i}/${r}${t("/",a,"/",s(n))}#readme`,httpstemplate:({auth:e,domain:s,user:i,project:r,committish:a})=>`git+https://${t(e,"@")}${s}/${i}/${r}.git${t("#",a)}`,filetemplate:({domain:e,user:t,project:i,committish:r,path:a})=>`https://${e}/${t}/${i}/raw/${s(r||"HEAD")}/${a}`,shortcuttemplate:({type:e,user:s,project:i,committish:r})=>`${e}:${s}/${i}${t("#",r)}`,pathtemplate:({user:e,project:s,committish:i})=>`${e}/${s}${t("#",i)}`,bugstemplate:({domain:e,user:t,project:s})=>`https://${e}/${t}/${s}/issues`,hashformat:i},a={};a.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:e,user:i,project:r,committish:a,path:n})=>`https://${t(e,"@")}raw.githubusercontent.com/${i}/${r}/${s(a||"HEAD")}/${n}`,gittemplate:({auth:e,domain:s,user:i,project:r,committish:a})=>`git://${t(e,"@")}${s}/${i}/${r}.git${t("#",a)}`,tarballtemplate:({domain:e,user:t,project:i,committish:r})=>`https://codeload.${e}/${t}/${i}/tar.gz/${s(r||"HEAD")}`,extract:e=>{let[,t,s,i,r]=e.pathname.split("/",5);if((!i||"tree"===i)&&(i||(r=e.hash.slice(1)),s&&s.endsWith(".git")&&(s=s.slice(0,-4)),t&&s))return{user:t,project:s,committish:r}}},a.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:e,user:i,project:r,committish:a,treepath:n,path:o,editpath:h})=>`https://${e}/${i}/${r}${t("/",n,"/",s(a||"HEAD"),"/",o,h)}`,tarballtemplate:({domain:e,user:t,project:i,committish:r})=>`https://${e}/${t}/${i}/get/${s(r||"HEAD")}.tar.gz`,extract:e=>{let[,t,s,i]=e.pathname.split("/",4);if(!["get"].includes(i)&&(s&&s.endsWith(".git")&&(s=s.slice(0,-4)),t&&s))return{user:t,project:s,committish:e.hash.slice(1)}}},a.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:({domain:e,user:t,project:i,committish:r})=>`https://${e}/api/v4/projects/${s(t+"/"+i)}/repository/archive.tar.gz?sha=${s(r||"HEAD")}`,extract:e=>{const t=e.pathname.slice(1);if(t.includes("/-/")||t.includes("/archive.tar.gz"))return;const s=t.split("/");let i=s.pop();i.endsWith(".git")&&(i=i.slice(0,-4));const r=s.join("/");return r&&i?{user:r,project:i,committish:e.hash.slice(1)}:void 0}},a.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:e,project:s,committish:i})=>`git@${e}:${s}.git${t("#",i)}`,sshurltemplate:({domain:e,project:s,committish:i})=>`git+ssh://git@${e}/${s}.git${t("#",i)}`,edittemplate:({domain:e,user:i,project:r,committish:a,editpath:n})=>`https://${e}/${i}/${r}${t("/",s(a))}/${n}`,browsetemplate:({domain:e,project:i,committish:r})=>`https://${e}/${i}${t("/",s(r))}`,browsetreetemplate:({domain:e,project:i,committish:r,path:a,hashformat:n})=>`https://${e}/${i}${t("/",s(r))}${t("#",n(a))}`,browseblobtemplate:({domain:e,project:i,committish:r,path:a,hashformat:n})=>`https://${e}/${i}${t("/",s(r))}${t("#",n(a))}`,docstemplate:({domain:e,project:i,committish:r})=>`https://${e}/${i}${t("/",s(r))}`,httpstemplate:({domain:e,project:s,committish:i})=>`git+https://${e}/${s}.git${t("#",i)}`,filetemplate:({user:e,project:i,committish:r,path:a})=>`https://gist.githubusercontent.com/${e}/${i}/raw${t("/",s(r))}/${a}`,shortcuttemplate:({type:e,project:s,committish:i})=>`${e}:${s}${t("#",i)}`,pathtemplate:({project:e,committish:s})=>`${e}${t("#",s)}`,bugstemplate:({domain:e,project:t})=>`https://${e}/${t}`,gittemplate:({domain:e,project:s,committish:i})=>`git://${e}/${s}.git${t("#",i)}`,tarballtemplate:({project:e,committish:t})=>`https://codeload.github.com/gist/${e}/tar.gz/${s(t||"HEAD")}`,extract:e=>{let[,t,s,i]=e.pathname.split("/",4);if("raw"!==i){if(!s){if(!t)return;s=t,t=null}return s.endsWith(".git")&&(s=s.slice(0,-4)),{user:t,project:s,committish:e.hash.slice(1)}}},hashformat:function(e){return e&&"file-"+i(e)}},a.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:e,user:t,project:i,committish:r,path:a})=>`https://${e}/${t}/${i}/blob/${s(r)||"HEAD"}/${a}`,httpstemplate:({domain:e,user:s,project:i,committish:r})=>`https://${e}/${s}/${i}${t("#",r)}`,tarballtemplate:({domain:e,user:t,project:i,committish:r})=>`https://${e}/${t}/${i}/archive/${s(r)||"HEAD"}.tar.gz`,bugstemplate:()=>null,extract:e=>{let[,t,s,i]=e.pathname.split("/",4);if(!["archive"].includes(i)&&(s&&s.endsWith(".git")&&(s=s.slice(0,-4)),t&&s))return{user:t,project:s,committish:e.hash.slice(1)}}};for(const[e,t]of Object.entries(a))a[e]=Object.assign({},r,t);e.exports=a},6356(e,t,s){const{LRUCache:i}=s(7675),r=s(5311),a=s(438),n=s(2895),o=new i({max:1e3});class h{constructor(e,t,s,i,r,a,n={}){Object.assign(this,h.#e[e],{type:e,user:t,auth:s,project:i,committish:r,default:a,opts:n})}static#e={byShortcut:{},byDomain:{}};static#t={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(e,t){h.#e[e]=t,h.#e.byDomain[t.domain]=e,h.#e.byShortcut[`${e}:`]=e,h.#t[`${e}:`]={name:e}}static fromUrl(e,t){if("string"!=typeof e)return;const s=e+JSON.stringify(t||{});if(!o.has(s)){const i=a(e,t,{gitHosts:h.#e,protocols:h.#t});o.set(s,i?new h(...i):void 0)}return o.get(s)}static fromManifest(e,t={}){if(!e||"object"!=typeof e)return;const s=e.repository,i=s&&("string"==typeof s?s:"object"==typeof s&&"string"==typeof s.url?s.url:null);if(!i)throw new Error("no repository");const r=i&&h.fromUrl(i.replace(/^git\+/,""),t)||null;if(r)return r;const a=function(e){try{const{protocol:t,hostname:s,pathname:i}=new URL(e);return s?`${/(?:git\+)http:$/.test(t)?"http:":"https:"}//${s}${i.replace(/\.git$/,"")}`:null}catch{return null}}(i);return h.fromUrl(a,t)||a}static parseUrl(e){return n(e)}#s(e,t){if("function"!=typeof e)return null;const s={...this,...this.opts,...t};s.path||(s.path=""),s.path.startsWith("/")&&(s.path=s.path.slice(1)),s.noCommittish&&(s.committish=null);const i=e(s);return s.noGitPlus&&i.startsWith("git+")?i.slice(4):i}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#s(this.sshtemplate,e)}sshurl(e){return this.#s(this.sshurltemplate,e)}browse(e,...t){return"string"!=typeof e?this.#s(this.browsetemplate,e):"string"!=typeof t[0]?this.#s(this.browsetreetemplate,{...t[0],path:e}):this.#s(this.browsetreetemplate,{...t[1],fragment:t[0],path:e})}browseFile(e,...t){return"string"!=typeof t[0]?this.#s(this.browseblobtemplate,{...t[0],path:e}):this.#s(this.browseblobtemplate,{...t[1],fragment:t[0],path:e})}docs(e){return this.#s(this.docstemplate,e)}bugs(e){return this.#s(this.bugstemplate,e)}https(e){return this.#s(this.httpstemplate,e)}git(e){return this.#s(this.gittemplate,e)}shortcut(e){return this.#s(this.shortcuttemplate,e)}path(e){return this.#s(this.pathtemplate,e)}tarball(e){return this.#s(this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return this.#s(this.filetemplate,{...t,path:e})}edit(e,t){return this.#s(this.edittemplate,{...t,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&"function"==typeof this[this.default]?this[this.default](e):this.sshurl(e)}}for(const[e,t]of Object.entries(r))h.addHost(e,t);e.exports=h},2895(e){const t=(e,t,s)=>{const i=e.indexOf(s);return e.lastIndexOf(t,i>-1?i:1/0)},s=e=>{try{return new URL(e)}catch{}};e.exports=(e,i)=>{const r=i?((e,t)=>{const s=e.indexOf(":"),i=e.slice(0,s+1);if(Object.prototype.hasOwnProperty.call(t,i))return e;if("://"===e.substr(s,3))return e;const r=e.indexOf("@");return r>-1?r>s?`git+ssh://${e}`:e:`${e.slice(0,s+1)}//${e.slice(s+1)}`})(e,i):e;return s(r)||s((e=>{const s=t(e,"@","#"),i=t(e,":","#");return i>s&&(e=e.slice(0,i)+"/"+e.slice(i+1)),-1===t(e,":","#")&&-1===e.indexOf("//")&&(e=`git+ssh://${e}`),e})(r))}},5706(e,t,s){e.exports=u,u.Minimatch=d;var i=function(){try{return s(6928)}catch(e){}}()||{sep:"/"};u.sep=i.sep;var r=u.GLOBSTAR=d.GLOBSTAR={},a=s(2921),n={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},o="[^/]",h=o+"*?",l="().*{}+?[]^$\\!".split("").reduce(function(e,t){return e[t]=!0,e},{}),p=/\/+/;function c(e,t){t=t||{};var s={};return Object.keys(e).forEach(function(t){s[t]=e[t]}),Object.keys(t).forEach(function(e){s[e]=t[e]}),s}function u(e,t,s){return f(t),s||(s={}),!(!s.nocomment&&"#"===t.charAt(0))&&new d(t,s).match(e)}function d(e,t){if(!(this instanceof d))return new d(e,t);f(e),t||(t={}),e=e.trim(),t.allowWindowsEscape||"/"===i.sep||(e=e.split(i.sep).join("/")),this.options=t,this.maxGlobstarRecursion=void 0!==t.maxGlobstarRecursion?t.maxGlobstarRecursion:200,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}function m(e,t){return t||(t=this instanceof d?this.options:{}),e=void 0===e?this.pattern:e,f(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:a(e)}u.filter=function(e,t){return t=t||{},function(s,i,r){return u(s,e,t)}},u.defaults=function(e){if(!e||"object"!=typeof e||!Object.keys(e).length)return u;var t=u,s=function(s,i,r){return t(s,i,c(e,r))};return(s.Minimatch=function(s,i){return new t.Minimatch(s,c(e,i))}).defaults=function(s){return t.defaults(c(e,s)).Minimatch},s.filter=function(s,i){return t.filter(s,c(e,i))},s.defaults=function(s){return t.defaults(c(e,s))},s.makeRe=function(s,i){return t.makeRe(s,c(e,i))},s.braceExpand=function(s,i){return t.braceExpand(s,c(e,i))},s.match=function(s,i,r){return t.match(s,i,c(e,r))},s},d.defaults=function(e){return u.defaults(e).Minimatch},d.prototype.debug=function(){},d.prototype.make=function(){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var s=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,s),s=this.globParts=s.map(function(e){return e.split(p)}),this.debug(this.pattern,s),s=s.map(function(e,t,s){return e.map(this.parse,this)},this),this.debug(this.pattern,s),s=s.filter(function(e){return-1===e.indexOf(!1)}),this.debug(this.pattern,s),this.set=s}else this.empty=!0;else this.comment=!0},d.prototype.parseNegate=function(){var e=this.pattern,t=!1,s=0;if(!this.options.nonegate){for(var i=0,r=e.length;i<r&&"!"===e.charAt(i);i++)t=!t,s++;s&&(this.pattern=e.substr(s)),this.negate=t}},u.braceExpand=function(e,t){return m(e,t)},d.prototype.braceExpand=m;var f=function(e){if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};d.prototype.parse=function(e,t){f(e);var s=this.options;if("**"===e){if(!s.noglobstar)return r;e="*"}if(""===e)return"";var i,a="",p=!!s.nocase,c=!1,u=[],d=[],m=!1,x=-1,g=-1,P="."===e.charAt(0)?"":s.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",b=this;function T(){if(i){switch(i){case"*":a+=h,p=!0;break;case"?":a+=o,p=!0;break;default:a+="\\"+i}b.debug("clearStateChar %j %j",i,a),i=!1}}for(var S,E=0,A=e.length;E<A&&(S=e.charAt(E));E++)if(this.debug("%s\t%s %s %j",e,E,a,S),c&&l[S])a+="\\"+S,c=!1;else switch(S){case"/":return!1;case"\\":T(),c=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,E,a,S),m){this.debug(" in class"),"!"===S&&E===g+1&&(S="^"),a+=S;continue}if("*"===S&&"*"===i)continue;b.debug("call clearStateChar %j",i),T(),i=S,s.noext&&T();continue;case"(":if(m){a+="(";continue}if(!i){a+="\\(";continue}u.push({type:i,start:E-1,reStart:a.length,open:n[i].open,close:n[i].close}),a+="!"===i?"(?:(?!(?:":"(?:",this.debug("plType %j %j",i,a),i=!1;continue;case")":if(m||!u.length){a+="\\)";continue}T(),p=!0;var C=u.pop();a+=C.close,"!"===C.type&&d.push(C),C.reEnd=a.length;continue;case"|":if(m||!u.length||c){a+="\\|",c=!1;continue}T(),a+="|";continue;case"[":if(T(),m){a+="\\"+S;continue}m=!0,g=E,x=a.length,a+=S;continue;case"]":if(E===g+1||!m){a+="\\"+S,c=!1;continue}var w=e.substring(g+1,E);try{RegExp("["+w+"]")}catch(e){var I=this.parse(w,y);a=a.substr(0,x)+"\\["+I[0]+"\\]",p=p||I[1],m=!1;continue}p=!0,m=!1,a+=S;continue;default:T(),c?c=!1:!l[S]||"^"===S&&m||(a+="\\"),a+=S}for(m&&(w=e.substr(g+1),I=this.parse(w,y),a=a.substr(0,x)+"\\["+I[0],p=p||I[1]),C=u.pop();C;C=u.pop()){var N=a.slice(C.reStart+C.open.length);this.debug("setting tail",a,C),N=N.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(e,t,s){return s||(s="\\"),t+t+s+"|"}),this.debug("tail=%j\n %s",N,N,C,a);var v="*"===C.type?h:"?"===C.type?o:"\\"+C.type;p=!0,a=a.slice(0,C.reStart)+v+"\\("+N}T(),c&&(a+="\\\\");var L=!1;switch(a.charAt(0)){case"[":case".":case"(":L=!0}for(var k=d.length-1;k>-1;k--){var D=d[k],O=a.slice(0,D.reStart),M=a.slice(D.reStart,D.reEnd-8),F=a.slice(D.reEnd-8,D.reEnd),B=a.slice(D.reEnd);F+=B;var R=O.split("(").length-1,U=B;for(E=0;E<R;E++)U=U.replace(/\)[+*?]?/,"");var j="";""===(B=U)&&t!==y&&(j="$"),a=O+M+B+j+F}if(""!==a&&p&&(a="(?=.)"+a),L&&(a=P+a),t===y)return[a,p];if(!p)return e.replace(/\\(.)/g,"$1");var $=s.nocase?"i":"";try{var _=new RegExp("^"+a+"$",$)}catch(e){return new RegExp("$.")}return _._glob=e,_._src=a,_};var y={};u.makeRe=function(e,t){return new d(e,t||{}).makeRe()},d.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,s=t.noglobstar?h:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=t.nocase?"i":"",a=e.map(function(e){return e.map(function(e){return e===r?s:"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e._src}).join("\\/")}).join("|");a="^(?:"+a+")$",this.negate&&(a="^(?!"+a+").*$");try{this.regexp=new RegExp(a,i)}catch(e){this.regexp=!1}return this.regexp},u.match=function(e,t,s){var i=new d(t,s=s||{});return e=e.filter(function(e){return i.match(e)}),i.options.nonull&&!e.length&&e.push(t),e},d.prototype.match=function(e,t){if(void 0===t&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var s=this.options;"/"!==i.sep&&(e=e.split(i.sep).join("/")),e=e.split(p),this.debug(this.pattern,"split",e);var r,a,n=this.set;for(this.debug(this.pattern,"set",n),a=e.length-1;a>=0&&!(r=e[a]);a--);for(a=0;a<n.length;a++){var o=n[a],h=e;if(s.matchBase&&1===o.length&&(h=[r]),this.matchOne(h,o,t))return!!s.flipNegate||!this.negate}return!s.flipNegate&&this.negate},d.prototype.matchOne=function(e,t,s){return-1!==t.indexOf(r)?this._matchGlobstar(e,t,s,0,0):this._matchOne(e,t,s,0,0)},d.prototype._matchGlobstar=function(e,t,s,i,a){var n,o=-1;for(n=a;n<t.length;n++)if(t[n]===r){o=n;break}var h=-1;for(n=t.length-1;n>=0;n--)if(t[n]===r){h=n;break}var l=t.slice(a,o),p=s?t.slice(o+1):t.slice(o+1,h),c=s?[]:t.slice(h+1);if(l.length){var u=e.slice(i,i+l.length);if(!this._matchOne(u,l,s,0,0))return!1;i+=l.length}var d=0;if(c.length){if(c.length+i>e.length)return!1;var m=e.length-c.length;if(this._matchOne(e,c,s,m,0))d=c.length;else{if(""!==e[e.length-1]||i+c.length===e.length)return!1;if(m--,!this._matchOne(e,c,s,m,0))return!1;d=c.length+1}}if(!p.length){var f=!!d;for(n=i;n<e.length-d;n++){var y=String(e[n]);if(f=!0,"."===y||".."===y||!this.options.dot&&"."===y.charAt(0))return!1}return s||f}for(var x=[[[],0]],g=x[0],P=0,b=[0],T=0;T<p.length;T++){var S=p[T];S===r?(b.push(P),g=[[],0],x.push(g)):(g[0].push(S),P++)}for(var E=x.length-1,A=e.length-d,C=0;C<x.length;C++)x[C][1]=A-(b[E--]+x[C][0].length);return!!this._matchGlobStarBodySections(e,x,i,0,s,0,!!d)},d.prototype._matchGlobStarBodySections=function(e,t,s,i,r,a,n){var o=t[i];if(!o){for(var h=s;h<e.length;h++)if(n=!0,"."===(c=e[h])||".."===c||!this.options.dot&&"."===c.charAt(0))return!1;return n}for(var l=o[0],p=o[1];s<=p;){var c;if(this._matchOne(e.slice(0,s+l.length),l,r,s,0)&&a<this.maxGlobstarRecursion){var u=this._matchGlobStarBodySections(e,t,s+l.length,i+1,r,a+1,n);if(!1!==u)return u}if("."===(c=e[s])||".."===c||!this.options.dot&&"."===c.charAt(0))return!1;s++}return r||null},d.prototype._matchOne=function(e,t,s,i,a){var n,o,h,l;for(n=i,o=a,h=e.length,l=t.length;n<h&&o<l;n++,o++){this.debug("matchOne loop");var p,c=t[o],u=e[n];if(this.debug(t,c,u),!1===c||c===r)return!1;if("string"==typeof c?(p=u===c,this.debug("string match",c,u,p)):(p=u.match(c),this.debug("pattern match",c,u,p)),!p)return!1}if(n===h&&o===l)return!0;if(n===h)return s;if(o===l)return n===h-1&&""===e[n];throw new Error("wtf?")}},6686(e){e.exports=function(e){if(!e)return;if("ERROR: No README data found!"===e)return;e=e.trim().split("\n");let t=0;for(;e[t]&&e[t].trim().match(/^(#|$)/);)t++;const s=e.length;let i=t+1;for(;i<s&&e[i].trim();)i++;return e.slice(t,i).join(" ").trim()}},1734(e,t,s){var{URL:i}=s(3136),r=s(179),a=s(6004),n=s(1336),o=s(6356),{isBuiltin:h}=s(8995),l=["dependencies","devDependencies","optionalDependencies"],p=s(6686),c=s(9158),u=e=>e.includes("@")&&e.indexOf("@")<e.lastIndexOf(".");function d(e,t){return e.author&&(e.author=t(e.author)),["maintainers","contributors"].forEach(function(s){Array.isArray(e[s])&&(e[s]=e[s].map(t))}),e}function m(e){if("string"==typeof e)return e;var t=e.name||"",s=e.url||e.web,i=s?" ("+s+")":"",r=e.email||e.mail;return t+(r?" <"+r+">":"")+i}function f(e){if("string"!=typeof e)return e;var t=e.match(/^([^(<]+)/),s=e.match(/\(([^()]+)\)/),i=e.match(/<([^<>]+)>/),r={};return t&&t[0].trim()&&(r.name=t[0].trim()),i&&(r.email=i[1]),s&&(r.url=s[1]),r}e.exports={warn:function(){},fixRepositoryField:function(e){if(e.repositories&&(this.warn("repositories"),e.repository=e.repositories[0]),!e.repository)return this.warn("missingRepository");"string"==typeof e.repository&&(e.repository={type:"git",url:e.repository});var t=e.repository.url||"";if(t){var s=o.fromUrl(t);s&&(t=e.repository.url="shortcut"===s.getDefaultRepresentation()?s.https():s.toString())}t.match(/github.com\/[^/]+\/[^/]+\.git\.git$/)&&this.warn("brokenGitUrl",t)},fixTypos:function(e){Object.keys(c.topLevel).forEach(function(t){Object.prototype.hasOwnProperty.call(e,t)&&this.warn("typo",t,c.topLevel[t])},this)},fixScriptsField:function(e){if(e.scripts)return"object"!=typeof e.scripts?(this.warn("nonObjectScripts"),void delete e.scripts):void Object.keys(e.scripts).forEach(function(t){"string"!=typeof e.scripts[t]?(this.warn("nonStringScript"),delete e.scripts[t]):c.script[t]&&!e.scripts[c.script[t]]&&this.warn("typo",t,c.script[t],"scripts")},this)},fixFilesField:function(e){var t=e.files;t&&!Array.isArray(t)?(this.warn("nonArrayFiles"),delete e.files):e.files&&(e.files=e.files.filter(function(e){return!(!e||"string"!=typeof e)||(this.warn("invalidFilename",e),!1)},this))},fixBinField:function(e){if(e.bin&&"string"==typeof e.bin){var t,s={};(t=e.name.match(/^@[^/]+[/](.*)$/))?s[t[1]]=e.bin:s[e.name]=e.bin,e.bin=s}},fixManField:function(e){e.man&&"string"==typeof e.man&&(e.man=[e.man])},fixBundleDependenciesField:function(e){var t="bundledDependencies",s="bundleDependencies";e[t]&&!e[s]&&(e[s]=e[t],delete e[t]),e[s]&&!Array.isArray(e[s])?(this.warn("nonArrayBundleDependencies"),delete e[s]):e[s]&&(e[s]=e[s].filter(function(t){return t&&"string"==typeof t?(e.dependencies||(e.dependencies={}),Object.prototype.hasOwnProperty.call(e.dependencies,t)||(this.warn("nonDependencyBundleDependency",t),e.dependencies[t]="*"),!0):(this.warn("nonStringBundleDependency",t),!1)},this))},fixDependencies:function(e){!function(e,t){l.forEach(function(s){e[s]&&(e[s]=function(e,t,s){if(!e)return{};if("string"==typeof e&&(e=e.trim().split(/[\n\r\s\t ,]+/)),!Array.isArray(e))return e;s("deprecatedArrayDependencies",t);var i={};return e.filter(function(e){return"string"==typeof e}).forEach(function(e){var t=(e=e.trim().split(/(:?[@\s><=])/)).shift(),s=e.join("");s=(s=s.trim()).replace(/^@/,""),i[t]=s}),i}(e[s],s,t))})}(e,this.warn),function(e){var t=e.optionalDependencies;if(t){var s=e.dependencies||{};Object.keys(t).forEach(function(e){s[e]=t[e]}),e.dependencies=s}}(e,this.warn),this.fixBundleDependenciesField(e),["dependencies","devDependencies"].forEach(function(t){if(t in e)return e[t]&&"object"==typeof e[t]?void Object.keys(e[t]).forEach(function(s){var i=e[t][s];"string"!=typeof i&&(this.warn("nonStringDependency",s,JSON.stringify(i)),delete e[t][s]);var r=o.fromUrl(e[t][s]);r&&(e[t][s]=r.toString())},this):(this.warn("nonObjectDependencies",t),void delete e[t])},this)},fixModulesField:function(e){e.modules&&(this.warn("deprecatedModules"),delete e.modules)},fixKeywordsField:function(e){"string"==typeof e.keywords&&(e.keywords=e.keywords.split(/,\s+/)),e.keywords&&!Array.isArray(e.keywords)?(delete e.keywords,this.warn("nonArrayKeywords")):e.keywords&&(e.keywords=e.keywords.filter(function(e){return!("string"!=typeof e||!e)||(this.warn("nonStringKeyword"),!1)},this))},fixVersionField:function(e,t){var s=!t;if(!e.version)return e.version="",!0;if(!r(e.version,s))throw new Error('Invalid version: "'+e.version+'"');return e.version=a(e.version,s),!0},fixPeople:function(e){d(e,m),d(e,f)},fixNameField:function(e,t){"boolean"==typeof t?t={strict:t}:void 0===t&&(t={});var s=t.strict;if(e.name||s){if("string"!=typeof e.name)throw new Error("name field must be a string.");s||(e.name=e.name.trim()),function(e,t,s){if("."===e.charAt(0)||!function(e){if("@"!==e.charAt(0))return!1;var t=e.slice(1).split("/");return 2===t.length&&(t[0]&&t[1]&&t[0]===encodeURIComponent(t[0])&&t[1]===encodeURIComponent(t[1]))}(e)&&((i=e).match(/[/@\s+%:]/)||i!==encodeURIComponent(i))||t&&!s&&e!==e.toLowerCase()||"node_modules"===e.toLowerCase()||"favicon.ico"===e.toLowerCase())throw new Error("Invalid name: "+JSON.stringify(e));var i}(e.name,s,t.allowLegacyCase),h(e.name)&&this.warn("conflictingName",e.name)}else e.name=""},fixDescriptionField:function(e){e.description&&"string"!=typeof e.description&&(this.warn("nonStringDescription"),delete e.description),e.readme&&!e.description&&(e.description=p(e.readme)),void 0===e.description&&delete e.description,e.description||this.warn("missingDescription")},fixReadmeField:function(e){e.readme||(this.warn("missingReadme"),e.readme="ERROR: No README data found!")},fixBugsField:function(e){if(!e.bugs&&e.repository&&e.repository.url){var t=o.fromUrl(e.repository.url);t&&t.bugs()&&(e.bugs={url:t.bugs()})}else if(e.bugs){if("string"==typeof e.bugs)u(e.bugs)?e.bugs={email:e.bugs}:i.canParse(e.bugs)?e.bugs={url:e.bugs}:this.warn("nonEmailUrlBugsString");else{r=e.bugs,a=this.warn,r&&Object.keys(r).forEach(function(e){c.bugs[e]&&(a("typo",e,c.bugs[e],"bugs"),r[c.bugs[e]]=r[e],delete r[e])});var s=e.bugs;e.bugs={},s.url&&(i.canParse(s.url)?e.bugs.url=s.url:this.warn("nonUrlBugsUrlField")),s.email&&("string"==typeof s.email&&u(s.email)?e.bugs.email=s.email:this.warn("nonEmailBugsEmailField"))}e.bugs.email||e.bugs.url||(delete e.bugs,this.warn("emptyNormalizedBugs"))}var r,a},fixHomepageField:function(e){if(!e.homepage&&e.repository&&e.repository.url){var t=o.fromUrl(e.repository.url);t&&t.docs()&&(e.homepage=t.docs())}if(e.homepage)return"string"!=typeof e.homepage?(this.warn("nonUrlHomepage"),delete e.homepage):void(i.canParse(e.homepage)||(e.homepage="http://"+e.homepage))},fixLicenseField:function(e){const t=e.license||e.licence;return t?"string"!=typeof t||t.length<1||""===t.trim()?this.warn("invalidLicense"):n(t).validForNewPackages?void 0:this.warn("invalidLicense"):this.warn("missingLicense")}}},9701(e,t,s){var i=s(9023),r=s(2618);function a(e,t,s){return s&&(e=s+"['"+e+"']",t=s+"['"+t+"']"),i.format(r.typo,e,t)}e.exports=function(){var e=Array.prototype.slice.call(arguments,0),t=e.shift();if("typo"===t)return a.apply(null,e);var s=r[t]?r[t]:t+": '%s'";return e.unshift(s),i.format.apply(null,e)}},5181(e,t,s){e.exports=n;var i=s(1734);n.fixer=i;var r=s(9701),a=["name","version","description","repository","modules","scripts","files","bin","man","bugs","keywords","readme","homepage","license"].map(function(e){return o(e)+"Field"});function n(e,t,s){!0===t&&(t=null,s=!0),s||(s=!1),t&&!e.private||(t=function(){}),e.scripts&&"node-gyp rebuild"===e.scripts.install&&!e.scripts.preinstall&&(e.gypfile=!0),i.warn=function(){t(r.apply(null,arguments))},a.forEach(function(t){i["fix"+o(t)](e,s)}),e._id=e.name+"@"+e.version}function o(e){return e.charAt(0).toUpperCase()+e.slice(1)}a=a.concat(["dependencies","people","typos"])},951(e,t,s){const{join:i,basename:r}=s(6928),a=e=>(delete e.bin,e),n=e=>{const t=e.bin,s={};let a=!1;return Object.keys(t).forEach(e=>{const n=i("/",r(e.replace(/\\|:/g,"/"))).slice(1);if("string"!=typeof t[e]||!n)return;const o=i("/",t[e].replace(/\\/g,"/")).replace(/\\/g,"/").slice(1);o&&(s[n]=o,a=!0)}),a?e.bin=s:delete e.bin,e};e.exports=e=>e.bin?"string"==typeof e.bin?(e=>e.name?(e.bin={[e.name]:e.bin},n(e)):a(e))(e):Array.isArray(e.bin)?(e=>(e.bin=e.bin.reduce((e,t)=>(e[r(t)]=t,e),{}),n(e)))(e):"object"==typeof e.bin?n(e):a(e):a(e)},8951(e,t,s){var i=s(9582);e.exports=function(e){if("string"!=typeof e)throw new TypeError("expected author to be a string");if(!e||!/\w/.test(e))return{};var t=[].concat.apply([],i().exec(e)),s={};t[1]&&(s.name=t[1]);for(var r=2;r<t.length;r++){var a=t[r];r%2==0&&a&&t[r+1]&&("<"===a.charAt(0)?(s.email=t[r+1],r++):"("===a.charAt(0)&&(s.url=t[r+1],r++))}return s}},6069(e,t){t.__esModule=!0,t.defaultOptions=void 0,t.defaultOptions={useTabs:!1,tabWidth:2,expandUsers:!1,keyOrder:["$schema","private","name","version","description","license","author","maintainers","contributors","homepage","repository","bugs","type","exports","main","module","browser","man","preferGlobal","bin","files","directories","scripts","config","sideEffects","types","typings","workspaces","resolutions","dependencies","bundleDependencies","bundledDependencies","peerDependencies","peerDependenciesMeta","optionalDependencies","devDependencies","keywords","engines","engineStrict","os","cpu","publishConfig"]}},8858(e,t,s){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,s=1,i=arguments.length;s<i;s++)for(var r in t=arguments[s])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0,t.check=t.format=void 0;var a=s(2981),n=r(s(8280)),o=s(6069),h=r(s(5172)),l=r(s(7911)),p=r(s(8414)),c=r(s(1377));function u(e,t){var s=d(t),r=i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i(i({},e),(0,l.default)("author",e,t)),(0,l.default)("maintainers",e,i(i({},t),{enforceMultiple:!0}))),(0,l.default)("contributors",e,i(i({},t),{enforceMultiple:!0}))),f("man",e)),f("bin",e)),(0,p.default)(e)),f("directories",e)),(0,c.default)(e.scripts)),f("config",e)),(0,h.default)("optionalDependencies",e)),(0,h.default)("dependencies",e)),(0,h.default)("bundleDependencies",e)),(0,h.default)("bundledDependencies",e)),(0,h.default)("peerDependencies",e)),(0,h.default)("devDependencies",e)),f("keywords",e)),f("engines",e)),f("os",e)),f("cpu",e)),f("publishConfig",e));return m((0,n.default)(r,s.keyOrder),s)}function d(e){var t=(0,a.cosmiconfigSync)("prettier-package-json").search();return i(i(i({},o.defaultOptions),null==t?void 0:t.config),e)}function m(e,t){var s=t.useTabs?"\t":t.tabWidth;return JSON.stringify(e,null,s)+"\n"}function f(e,t){var s,i,r=t[e];if(Array.isArray(r))return 0===r.length?{}:((s={})[e]=r.sort(),s);if("object"==typeof r){var a=Object.keys(r);return 0===a.length?{}:((i={})[e]=(0,n.default)(r,a.sort()),i)}return{}}t.format=u,t.check=function(e,t){try{var s=d(t),i="string"==typeof e?JSON.parse(e):e,r=u(i,s);return m(i,s)===r}catch(e){return!1}}},7911(e,t,s){var i=this&&this.__spreadArray||function(e,t,s){if(s||2===arguments.length)for(var i,r=0,a=t.length;r<a;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var a=r(s(8951)),n=r(s(8280)),o=r(s(6644)),h=function(e){return function(){for(var t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];var i=t.map(function(t){return t[e]}),r=i[0],a=i[1];return r!==a?r<a?-1:1:0}};function l(e){return e?Array.isArray(e)?e.reduce(function(e,t){return i(i([],e,!0),l(t),!0)},[]):"object"==typeof e?[e]:"string"==typeof e?[(0,a.default)(e)]:[]:[]}function p(e){return[e.name,e.email?"<".concat(e.email,">"):void 0,e.url?"(".concat(e.url,")"):void 0].filter(Boolean).join(" ")}t.default=function(e,t,s){var i,r;void 0===s&&(s={});var a=h("name"),c=h("email"),u=l(t[e]).map(function(e){return(0,n.default)(e,["name","email","url"])}).sort((0,o.default)(a,c));switch(u.length){case 0:return{};case 1:if(!s.enforceMultiple)return(i={})[e]=s.expandUsers?u[0]:p(u[0]),i;default:return(r={})[e]=s.expandUsers?u:u.map(p),r}}},5172(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=i(s(8280));function a(e,t){return e.localeCompare(t,"en")}t.default=function(e,t){var s,i=t[e],n=Object.keys(i||{});return 0===n.length?{}:((s={})[e]=(0,r.default)(i,n.sort(a)),s)}},8414(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=i(s(5706)),a=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some(function(e){return e(t)})}},n=[/^package.json$/,/^README.*/i,/^CHANGE(S|LOG).*/i,/^HISTORY.*/i,/^LICEN(C|S)E.*/i,/^NOTICE.*/i].map(function(e){return function(t){return e.test(t)}}).reduce(function(e,t){return a(e,t)}),o=[".git","CVS",".svn",".hg",".lock-wscript",".wafpickle-N",".*.swp",".DS_Store","._*","npm-debug.log",".npmrc","node_modules","config.gypi","*.orig","package-lock.json"].map(function(e){return r.default.filter(e)}).reduce(function(e,t){return a(e,t)});t.default=function(e){var t,s=e.files,i=void 0===s?[]:s,r=e.main,h=a(n,o,function(e){return e===r}),l=i.filter((t=h,function(e){return!t(e)})).sort().sort(function(e,t){return e.endsWith("/")&&!t.endsWith("/")?-1:!e.endsWith("/")&&t.endsWith("/")?1:0}).sort(function(e,t){return e.startsWith("!")&&!t.startsWith("!")?1:!e.startsWith("!")&&t.startsWith("!")?-1:0});return l.length>0?{files:l}:{}}},1377(e,t,s){var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var r=i(s(8280)),a=i(s(6644)),n=/^(pre|post)/,o=/([:/])/,h=["install","prepare","pack","publish","restart","start","stop","test","version","uninstall"];function l(e,t){if("prepublishOnly"===t)return{prefix:"pre",base:"publish",original:t};var s=n.exec(t),i=s?s[0]:void 0,r=i?t.slice(i.length):t;return(null==e?void 0:e.hasOwnProperty(r))||h.includes(r)?{prefix:i,base:r,original:t}:{prefix:void 0,base:t,original:t}}t.default=function(e){var t=Object.keys(e||{}),s=(0,a.default)(function(e){return function(t,s){for(var i=l(e,t),r=l(e,s),a=i.base.split(o),n=r.base.split(o),h=a.length,p=n.length,c=0;c<Math.min(h,p);c++)if(a[c]!==n[c])return a[c]<n[c]?-1:1;return h!==p?h<p?-1:1:0}}(e),function(e){return function(t,s){var i=l(e,t),r=l(e,s);return"pre"===i.prefix||"post"===r.prefix?-1:"post"===i.prefix||"pre"===r.prefix?1:i.base!==r.base?i.base<r.base?-1:1:0}}(e));return 0===t.length?{}:{scripts:(0,r.default)(e,t.sort(s))}}},5850(e,t,s){const i=s(4790),{MAX_LENGTH:r,MAX_SAFE_INTEGER:a}=s(5168),{safeRe:n,t:o}=s(6076),h=s(9185),{compareIdentifiers:l}=s(7825);class p{constructor(e,t){if(t=h(t),e instanceof p){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>r)throw new TypeError(`version is longer than ${r} characters`);i("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const s=e.trim().match(t.loose?n[o.LOOSE]:n[o.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<a)return t}return e}):this.prerelease=[],this.build=s[5]?s[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(e){if(i("SemVer.compare",this.version,this.options,e),!(e instanceof p)){if("string"==typeof e&&e===this.version)return 0;e=new p(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof p||(e=new p(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(e){if(e instanceof p||(e=new p(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const s=this.prerelease[t],r=e.prerelease[t];if(i("prerelease compare",t,s,r),void 0===s&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===s)return-1;if(s!==r)return l(s,r)}while(++t)}compareBuild(e){e instanceof p||(e=new p(e,this.options));let t=0;do{const s=this.build[t],r=e.build[t];if(i("build compare",t,s,r),void 0===s&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===s)return-1;if(s!==r)return l(s,r)}while(++t)}inc(e,t,s){if(e.startsWith("pre")){if(!t&&!1===s)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?n[o.PRERELEASELOOSE]:n[o.PRERELEASE]);if(!e||e[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,s);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,s);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,s),this.inc("pre",t,s);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,s),this.inc("pre",t,s);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(s)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let i=this.prerelease.length;for(;--i>=0;)"number"==typeof this.prerelease[i]&&(this.prerelease[i]++,i=-2);if(-1===i){if(t===this.prerelease.join(".")&&!1===s)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let i=[t,e];if(!1===s&&(i=[t]),((e,t)=>{const s=t.split(".");if(s.length>e.length)return!1;for(let t=0;t<s.length;t++)if(0!==l(e[t],s[t]))return!1;return!0})(this.prerelease,t)){const e=this.prerelease[t.split(".").length];isNaN(e)&&(this.prerelease=i)}else this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=p},6004(e,t,s){const i=s(670);e.exports=(e,t)=>{const s=i(e.trim().replace(/^[=v]+/,""),t);return s?s.version:null}},670(e,t,s){const i=s(5850);e.exports=(e,t,s=!1)=>{if(e instanceof i)return e;try{return new i(e,t)}catch(e){if(!s)return null;throw e}}},179(e,t,s){const i=s(670);e.exports=(e,t)=>{const s=i(e,t);return s?s.version:null}},5168(e){const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},4790(e){const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},7825(e){const t=/^[0-9]+$/,s=(e,s)=>{if("number"==typeof e&&"number"==typeof s)return e===s?0:e<s?-1:1;const i=t.test(e),r=t.test(s);return i&&r&&(e=+e,s=+s),e===s?0:i&&!r?-1:r&&!i?1:e<s?-1:1};e.exports={compareIdentifiers:s,rcompareIdentifiers:(e,t)=>s(t,e)}},9185(e){const t=Object.freeze({loose:!0}),s=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:s},6076(e,t,s){const{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:a}=s(5168),n=s(4790),o=(t=e.exports={}).re=[],h=t.safeRe=[],l=t.src=[],p=t.safeSrc=[],c=t.t={};let u=0;const d="[a-zA-Z0-9-]",m=[["\\s",1],["\\d",a],[d,r]],f=(e,t,s)=>{const i=(e=>{for(const[t,s]of m)e=e.split(`${t}*`).join(`${t}{0,${s}}`).split(`${t}+`).join(`${t}{1,${s}}`);return e})(t),r=u++;n(e,r,t),c[e]=r,l[r]=t,p[r]=i,o[r]=new RegExp(t,s?"g":void 0),h[r]=new RegExp(i,s?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${d}*`),f("MAINVERSION",`(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})\\.(${l[c.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})\\.(${l[c.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${l[c.NONNUMERICIDENTIFIER]}|${l[c.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASE",`(?:-(${l[c.PRERELEASEIDENTIFIER]}(?:\\.${l[c.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${l[c.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[c.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${d}+`),f("BUILD",`(?:\\+(${l[c.BUILDIDENTIFIER]}(?:\\.${l[c.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${l[c.MAINVERSION]}${l[c.PRERELEASE]}?${l[c.BUILD]}?`),f("FULL",`^${l[c.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${l[c.MAINVERSIONLOOSE]}${l[c.PRERELEASELOOSE]}?${l[c.BUILD]}?`),f("LOOSE",`^${l[c.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${l[c.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${l[c.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:\\.(${l[c.XRANGEIDENTIFIER]})(?:${l[c.PRERELEASE]})?${l[c.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[c.XRANGEIDENTIFIERLOOSE]})(?:${l[c.PRERELEASELOOSE]})?${l[c.BUILD]}?)?)?`),f("XRANGE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${l[c.GTLT]}\\s*${l[c.XRANGEPLAINLOOSE]}$`),f("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),f("COERCE",`${l[c.COERCEPLAIN]}(?:$|[^\\d])`),f("COERCEFULL",l[c.COERCEPLAIN]+`(?:${l[c.PRERELEASE]})?`+`(?:${l[c.BUILD]})?(?:$|[^\\d])`),f("COERCERTL",l[c.COERCE],!0),f("COERCERTLFULL",l[c.COERCEFULL],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${l[c.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${l[c.LONETILDE]}${l[c.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${l[c.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${l[c.LONECARET]}${l[c.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${l[c.LONECARET]}${l[c.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${l[c.GTLT]}\\s*(${l[c.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${l[c.GTLT]}\\s*(${l[c.LOOSEPLAIN]}|${l[c.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${l[c.XRANGEPLAIN]})\\s+-\\s+(${l[c.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${l[c.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[c.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},8280(e){e.exports=function(e,t){var s,i;"function"==typeof t?i=t:s=t;var r=Object.keys(e);return(s||[]).concat(r.sort(i)).reduce(function(t,s){return-1!==r.indexOf(s)&&(t[s]=e[s]),t},Object.create(null))}},6644(e,t){function s(e,t){var i=e[0],r=e.slice(1),a=i&&t(i);return void 0===a&&r.length?s(r,t):a}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t,i){return s(e,function(e,t){return function(s){var i=s(e,t);return 0===i?void 0:i}}(t,i))||0}}},1054(e,t,s){var i=s(7771),r=s(5124);function a(e){try{return i(e),!0}catch(e){return!1}}function n(e,t){var s=t[0].length-e[0].length;return 0!==s?s:e[0].toUpperCase().localeCompare(t[0].toUpperCase())}var o=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(n),h=[function(e){return e.toUpperCase()},function(e){return e.trim()},function(e){return e.replace(/\./g,"")},function(e){return e.replace(/\s+/g,"")},function(e){return e.replace(/\s+/g,"-")},function(e){return e.replace("v","-")},function(e){return e.replace(/,?\s*(\d)/,"-$1")},function(e){return e.replace(/,?\s*(\d)/,"-$1.0")},function(e){return e.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(e){return e.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(e){return e[0].toUpperCase()+e.slice(1)},function(e){return e.replace("/","-")},function(e){return e.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(e){return-1!==e.indexOf("3.0")?e+"-or-later":e+"-only"},function(e){return e+"only"},function(e){return e.replace(/(\d)$/,"-$1.0")},function(e){return e.replace(/(-| )?(\d)$/,"-$2-Clause")},function(e){return e.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(e){return e.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(e){return e.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(e){return e.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(e){return e.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(e){return e.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(e){return"CC-"+e},function(e){return"CC-"+e+"-4.0"},function(e){return e.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(e){return"CC-"+e.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],l=r.map(function(e){var t=/^(.*)-\d+\.\d+$/.exec(e);return t?[t[0],t[1]]:[e,null]}).reduce(function(e,t){var s=t[1];return e[s]=e[s]||[],e[s].push(t[0]),e},{}),p=Object.keys(l).map(function(e){return[e,l[e]]}).filter(function(e){return 1===e[1].length&&null!==e[0]&&"APL"!==e[0]}).map(function(e){return[e[0],e[1][0]]});l=void 0;var c=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRI