@ministryofjustice/hmpps-digital-prison-reporting-frontend
Version:
The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.
8 lines (7 loc) • 96.8 kB
JavaScript
var Oo=Object.create;var tr=Object.defineProperty;var Ao=Object.getOwnPropertyDescriptor;var Ro=Object.getOwnPropertyNames;var ko=Object.getPrototypeOf,Mo=Object.prototype.hasOwnProperty;var S=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Lo=(r,e)=>{for(var t in e)tr(r,t,{get:e[t],enumerable:!0})},It=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ro(e))!Mo.call(r,i)&&i!==t&&tr(r,i,{get:()=>e[i],enumerable:!(n=Ao(e,i))||n.enumerable});return r};var xt=(r,e,t)=>(t=r!=null?Oo(ko(r)):{},It(e||!r||!r.__esModule?tr(t,"default",{value:r,enumerable:!0}):t,r)),To=r=>It(tr({},"__esModule",{value:!0}),r);var Ft=S((Ya,Rr)=>{var No=Object.prototype.hasOwnProperty;function Pt(r){return"[Throws: "+(r?r.message:"?")+"]"}function jo(r,e){if(No.call(r,e))try{return r[e]}catch(t){return Pt(t)}return r[e]}function Dt(r){var e=[];function t(n){if(n===null||typeof n!="object")return n;if(e.indexOf(n)!==-1)return"[Circular]";if(e.push(n),typeof n.toJSON=="function")try{var i=t(n.toJSON());return e.pop(),i}catch(a){return Pt(a)}if(Array.isArray(n)){var o=n.map(t);return e.pop(),o}var s=Object.keys(n).reduce(function(a,u){return a[u]=t(jo(n,u)),a},{});return e.pop(),s}return t(r)}Rr.exports=function(r,e,t){return JSON.stringify(Dt(r),e,t)};Rr.exports.ensureProperties=Dt});var Gt=S((Xa,Bt)=>{var q=require("fs"),Fe=require("path");Bt.exports=nr;nr.ncp=nr;function nr(r,e,t,n){var i=n;n||(i=t,t={});var o=process.cwd(),s=Fe.resolve(o,r),a=Fe.resolve(o,e),u=t.filter,l=t.rename,c=t.transform,d=t.clobber!==!1,f=t.modified,h=t.dereference,v=null,m=0,k=0,p=0,_=t.limit||nr.limit||16;_=_<1?1:_>512?512:_,j(s);function j(y){if(m++,u){if(u instanceof RegExp){if(!u.test(y))return V(!0)}else if(typeof u=="function"&&!u(y))return V(!0)}return b(y)}function b(y){var E=h?q.stat:q.lstat;if(p>=_)return setImmediate(function(){b(y)});p++,E(y,function(C,T){var z={};if(C)return $(C);if(z.name=y,z.mode=T.mode,z.mtime=T.mtime,z.atime=T.atime,T.isDirectory())return U(z);if(T.isFile())return O(z);if(T.isSymbolicLink())return w(y)})}function O(y){var E=y.name.replace(s,a);l&&(E=l(E)),ee(E,function(C){if(C)return K(y,E);if(d&&W(E,function(){K(y,E)}),f){var T=h?q.stat:q.lstat;T(E,function(z,De){if(y.mtime.getTime()>De.mtime.getTime())K(y,E);else return V()})}else return V()})}function K(y,E){var C=q.createReadStream(y.name),T=q.createWriteStream(E,{mode:y.mode});C.on("error",$),T.on("error",$),c?c(C,T,y):T.on("open",function(){C.pipe(T)}),T.once("finish",function(){f&&q.utimesSync(E,y.atime,y.mtime),V()})}function W(y,E){q.unlink(y,function(C){return C?$(C):E()})}function U(y){var E=y.name.replace(s,a);ee(E,function(C){if(C)return N(y,E);te(y.name)})}function N(y,E){q.mkdir(E,y.mode,function(C){if(C)return $(C);te(y.name)})}function te(y){q.readdir(y,function(E,C){return E?$(E):(C.forEach(function(T){j(Fe.join(y,T))}),V())})}function w(y){var E=y.replace(s,a);q.readlink(y,function(C,T){if(C)return $(C);X(T,E)})}function X(y,E){h&&(y=Fe.resolve(o,y)),ee(E,function(C){if(C)return H(y,E);q.readlink(E,function(T,z){return T?$(T):(h&&(z=Fe.resolve(o,z)),z===y?V():W(E,function(){H(y,E)}))})})}function H(y,E){q.symlink(y,E,function(C){return C?$(C):V()})}function ee(y,E){q.lstat(y,function(C){return C&&C.code==="ENOENT"?E(!0):E(!1)})}function $(y){return t.stopOnError?i(y):(!v&&t.errs?v=q.createWriteStream(t.errs):v||(v=[]),typeof v.write>"u"?v.push(y):v.write(y.stack+`
`),V())}function V(y){if(y||p--,k++,m===k&&p===0&&i!==void 0)return i(v||null)}}});var Ut=S((Za,qt)=>{qt.exports=function(r,e){for(var t=[],n=0;n<r.length;n++){var i=e(r[n],n);Io(i)?t.push.apply(t,i):t.push(i)}return t};var Io=Array.isArray||function(r){return Object.prototype.toString.call(r)==="[object Array]"}});var Qt=S((Ka,Vt)=>{"use strict";Vt.exports=Wt;function Wt(r,e,t){r instanceof RegExp&&(r=zt(r,t)),e instanceof RegExp&&(e=zt(e,t));var n=$t(r,e,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+r.length,n[1]),post:t.slice(n[1]+e.length)}}function zt(r,e){var t=e.match(r);return t?t[0]:null}Wt.range=$t;function $t(r,e,t){var n,i,o,s,a,u=t.indexOf(r),l=t.indexOf(e,u+1),c=u;if(u>=0&&l>0){if(r===e)return[u,l];for(n=[],o=t.length;c>=0&&!a;)c==u?(n.push(c),u=t.indexOf(r,c+1)):n.length==1?a=[n.pop(),l]:(i=n.pop(),i<o&&(o=i,s=l),l=t.indexOf(e,c+1)),c=u<l&&u>=0?u:l;n.length&&(a=[o,s])}return a}});var rn=S((Ha,en)=>{var xo=Ut(),Jt=Qt();en.exports=Fo;var Yt="\0SLASH"+Math.random()+"\0",Xt="\0OPEN"+Math.random()+"\0",Mr="\0CLOSE"+Math.random()+"\0",Zt="\0COMMA"+Math.random()+"\0",Kt="\0PERIOD"+Math.random()+"\0";function kr(r){return parseInt(r,10)==r?parseInt(r,10):r.charCodeAt(0)}function Po(r){return r.split("\\\\").join(Yt).split("\\{").join(Xt).split("\\}").join(Mr).split("\\,").join(Zt).split("\\.").join(Kt)}function Do(r){return r.split(Yt).join("\\").split(Xt).join("{").split(Mr).join("}").split(Zt).join(",").split(Kt).join(".")}function Ht(r){if(!r)return[""];var e=[],t=Jt("{","}",r);if(!t)return r.split(",");var n=t.pre,i=t.body,o=t.post,s=n.split(",");s[s.length-1]+="{"+i+"}";var a=Ht(o);return o.length&&(s[s.length-1]+=a.shift(),s.push.apply(s,a)),e.push.apply(e,s),e}function Fo(r){return r?(r.substr(0,2)==="{}"&&(r="\\{\\}"+r.substr(2)),be(Po(r),!0).map(Do)):[]}function Bo(r){return"{"+r+"}"}function Go(r){return/^-?0\d/.test(r)}function qo(r,e){return r<=e}function Uo(r,e){return r>=e}function be(r,e){var t=[],n=Jt("{","}",r);if(!n||/\$$/.test(n.pre))return[r];var i=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body),s=i||o,a=n.body.indexOf(",")>=0;if(!s&&!a)return n.post.match(/,.*\}/)?(r=n.pre+"{"+n.body+Mr+n.post,be(r)):[r];var u;if(s)u=n.body.split(/\.\./);else if(u=Ht(n.body),u.length===1&&(u=be(u[0],!1).map(Bo),u.length===1)){var c=n.post.length?be(n.post,!1):[""];return c.map(function(w){return n.pre+u[0]+w})}var l=n.pre,c=n.post.length?be(n.post,!1):[""],d;if(s){var f=kr(u[0]),h=kr(u[1]),v=Math.max(u[0].length,u[1].length),m=u.length==3?Math.abs(kr(u[2])):1,k=qo,p=h<f;p&&(m*=-1,k=Uo);var _=u.some(Go);d=[];for(var j=f;k(j,h);j+=m){var b;if(o)b=String.fromCharCode(j),b==="\\"&&(b="");else if(b=String(j),_){var O=v-b.length;if(O>0){var K=new Array(O+1).join("0");j<0?b="-"+K+b.slice(1):b=K+b}}d.push(b)}}else d=xo(u,function(te){return be(te,!1)});for(var W=0;W<d.length;W++)for(var U=0;U<c.length;U++){var N=l+d[W]+c[U];(!e||s||N)&&t.push(N)}return t}});var sr=S((eu,an)=>{an.exports=Q;Q.Minimatch=P;var Be=function(){try{return require("path")}catch{}}()||{sep:"/"};Q.sep=Be.sep;var Nr=Q.GLOBSTAR=P.GLOBSTAR={},zo=rn(),tn={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Lr="[^/]",Tr=Lr+"*?",Wo="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",$o="(?:(?!(?:\\/|^)\\.).)*?",nn=Vo("().*{}+?[]^$\\!");function Vo(r){return r.split("").reduce(function(e,t){return e[t]=!0,e},{})}var on=/\/+/;Q.filter=Qo;function Qo(r,e){return e=e||{},function(t,n,i){return Q(t,r,e)}}function ce(r,e){e=e||{};var t={};return Object.keys(r).forEach(function(n){t[n]=r[n]}),Object.keys(e).forEach(function(n){t[n]=e[n]}),t}Q.defaults=function(r){if(!r||typeof r!="object"||!Object.keys(r).length)return Q;var e=Q,t=function(i,o,s){return e(i,o,ce(r,s))};return t.Minimatch=function(i,o){return new e.Minimatch(i,ce(r,o))},t.Minimatch.defaults=function(i){return e.defaults(ce(r,i)).Minimatch},t.filter=function(i,o){return e.filter(i,ce(r,o))},t.defaults=function(i){return e.defaults(ce(r,i))},t.makeRe=function(i,o){return e.makeRe(i,ce(r,o))},t.braceExpand=function(i,o){return e.braceExpand(i,ce(r,o))},t.match=function(n,i,o){return e.match(n,i,ce(r,o))},t};P.defaults=function(r){return Q.defaults(r).Minimatch};function Q(r,e,t){return or(e),t||(t={}),!t.nocomment&&e.charAt(0)==="#"?!1:new P(e,t).match(r)}function P(r,e){if(!(this instanceof P))return new P(r,e);or(r),e||(e={}),r=r.trim(),!e.allowWindowsEscape&&Be.sep!=="/"&&(r=r.split(Be.sep).join("/")),this.options=e,this.set=[],this.pattern=r,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.make()}P.prototype.debug=function(){};P.prototype.make=Jo;function Jo(){var r=this.pattern,e=this.options;if(!e.nocomment&&r.charAt(0)==="#"){this.comment=!0;return}if(!r){this.empty=!0;return}this.parseNegate();var t=this.globSet=this.braceExpand();e.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,t),t=this.globParts=t.map(function(n){return n.split(on)}),this.debug(this.pattern,t),t=t.map(function(n,i,o){return n.map(this.parse,this)},this),this.debug(this.pattern,t),t=t.filter(function(n){return n.indexOf(!1)===-1}),this.debug(this.pattern,t),this.set=t}P.prototype.parseNegate=Yo;function Yo(){var r=this.pattern,e=!1,t=this.options,n=0;if(!t.nonegate){for(var i=0,o=r.length;i<o&&r.charAt(i)==="!";i++)e=!e,n++;n&&(this.pattern=r.substr(n)),this.negate=e}}Q.braceExpand=function(r,e){return sn(r,e)};P.prototype.braceExpand=sn;function sn(r,e){return e||(this instanceof P?e=this.options:e={}),r=typeof r>"u"?this.pattern:r,or(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:zo(r)}var Xo=1024*64,or=function(r){if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>Xo)throw new TypeError("pattern is too long")};P.prototype.parse=Zo;var ir={};function Zo(r,e){or(r);var t=this.options;if(r==="**")if(t.noglobstar)r="*";else return Nr;if(r==="")return"";var n="",i=!!t.nocase,o=!1,s=[],a=[],u,l=!1,c=-1,d=-1,f=r.charAt(0)==="."?"":t.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",h=this;function v(){if(u){switch(u){case"*":n+=Tr,i=!0;break;case"?":n+=Lr,i=!0;break;default:n+="\\"+u;break}h.debug("clearStateChar %j %j",u,n),u=!1}}for(var m=0,k=r.length,p;m<k&&(p=r.charAt(m));m++){if(this.debug("%s %s %s %j",r,m,n,p),o&&nn[p]){n+="\\"+p,o=!1;continue}switch(p){case"/":return!1;case"\\":v(),o=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",r,m,n,p),l){this.debug(" in class"),p==="!"&&m===d+1&&(p="^"),n+=p;continue}h.debug("call clearStateChar %j",u),v(),u=p,t.noext&&v();continue;case"(":if(l){n+="(";continue}if(!u){n+="\\(";continue}s.push({type:u,start:m-1,reStart:n.length,open:tn[u].open,close:tn[u].close}),n+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,n),u=!1;continue;case")":if(l||!s.length){n+="\\)";continue}v(),i=!0;var _=s.pop();n+=_.close,_.type==="!"&&a.push(_),_.reEnd=n.length;continue;case"|":if(l||!s.length||o){n+="\\|",o=!1;continue}v(),n+="|";continue;case"[":if(v(),l){n+="\\"+p;continue}l=!0,d=m,c=n.length,n+=p;continue;case"]":if(m===d+1||!l){n+="\\"+p,o=!1;continue}var j=r.substring(d+1,m);try{RegExp("["+j+"]")}catch{var b=this.parse(j,ir);n=n.substr(0,c)+"\\["+b[0]+"\\]",i=i||b[1],l=!1;continue}i=!0,l=!1,n+=p;continue;default:v(),o?o=!1:nn[p]&&!(p==="^"&&l)&&(n+="\\"),n+=p}}for(l&&(j=r.substr(d+1),b=this.parse(j,ir),n=n.substr(0,c)+"\\["+b[0],i=i||b[1]),_=s.pop();_;_=s.pop()){var O=n.slice(_.reStart+_.open.length);this.debug("setting tail",n,_),O=O.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(T,z,De){return De||(De="\\"),z+z+De+"|"}),this.debug(`tail=%j
%s`,O,O,_,n);var K=_.type==="*"?Tr:_.type==="?"?Lr:"\\"+_.type;i=!0,n=n.slice(0,_.reStart)+K+"\\("+O}v(),o&&(n+="\\\\");var W=!1;switch(n.charAt(0)){case"[":case".":case"(":W=!0}for(var U=a.length-1;U>-1;U--){var N=a[U],te=n.slice(0,N.reStart),w=n.slice(N.reStart,N.reEnd-8),X=n.slice(N.reEnd-8,N.reEnd),H=n.slice(N.reEnd);X+=H;var ee=te.split("(").length-1,$=H;for(m=0;m<ee;m++)$=$.replace(/\)[+*?]?/,"");H=$;var V="";H===""&&e!==ir&&(V="$");var y=te+w+H+V+X;n=y}if(n!==""&&i&&(n="(?=.)"+n),W&&(n=f+n),e===ir)return[n,i];if(!i)return Ho(r);var E=t.nocase?"i":"";try{var C=new RegExp("^"+n+"$",E)}catch{return new RegExp("$.")}return C._glob=r,C._src=n,C}Q.makeRe=function(r,e){return new P(r,e||{}).makeRe()};P.prototype.makeRe=Ko;function Ko(){if(this.regexp||this.regexp===!1)return this.regexp;var r=this.set;if(!r.length)return this.regexp=!1,this.regexp;var e=this.options,t=e.noglobstar?Tr:e.dot?Wo:$o,n=e.nocase?"i":"",i=r.map(function(o){return o.map(function(s){return s===Nr?t:typeof s=="string"?es(s):s._src}).join("\\/")}).join("|");i="^(?:"+i+")$",this.negate&&(i="^(?!"+i+").*$");try{this.regexp=new RegExp(i,n)}catch{this.regexp=!1}return this.regexp}Q.match=function(r,e,t){t=t||{};var n=new P(e,t);return r=r.filter(function(i){return n.match(i)}),n.options.nonull&&!r.length&&r.push(e),r};P.prototype.match=function(e,t){if(typeof t>"u"&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;var n=this.options;Be.sep!=="/"&&(e=e.split(Be.sep).join("/")),e=e.split(on),this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var o,s;for(s=e.length-1;s>=0&&(o=e[s],!o);s--);for(s=0;s<i.length;s++){var a=i[s],u=e;n.matchBase&&a.length===1&&(u=[o]);var l=this.matchOne(u,a,t);if(l)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};P.prototype.matchOne=function(r,e,t){var n=this.options;this.debug("matchOne",{this:this,file:r,pattern:e}),this.debug("matchOne",r.length,e.length);for(var i=0,o=0,s=r.length,a=e.length;i<s&&o<a;i++,o++){this.debug("matchOne loop");var u=e[o],l=r[i];if(this.debug(e,u,l),u===!1)return!1;if(u===Nr){this.debug("GLOBSTAR",[e,u,l]);var c=i,d=o+1;if(d===a){for(this.debug("** at the end");i<s;i++)if(r[i]==="."||r[i]===".."||!n.dot&&r[i].charAt(0)===".")return!1;return!0}for(;c<s;){var f=r[c];if(this.debug(`
globstar while`,r,c,e,d,f),this.matchOne(r.slice(c),e.slice(d),t))return this.debug("globstar found match!",c,s,f),!0;if(f==="."||f===".."||!n.dot&&f.charAt(0)==="."){this.debug("dot detected!",r,c,e,d);break}this.debug("globstar swallow a segment, and continue"),c++}return!!(t&&(this.debug(`
>>> no match, partial?`,r,c,e,d),c===s))}var h;if(typeof u=="string"?(h=l===u,this.debug("string match",u,l,h)):(h=l.match(u),this.debug("pattern match",u,l,h)),!h)return!1}if(i===s&&o===a)return!0;if(i===s)return t;if(o===a)return i===s-1&&r[i]==="";throw new Error("wtf?")};function Ho(r){return r.replace(/\\(.)/g,"$1")}function es(r){return r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var un=S((ru,jr)=>{typeof Object.create=="function"?jr.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:jr.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}});var ln=S((tu,xr)=>{try{if(Ir=require("util"),typeof Ir.inherits!="function")throw"";xr.exports=Ir.inherits}catch{xr.exports=un()}var Ir});var ur=S((nu,ar)=>{"use strict";function cn(r){return r.charAt(0)==="/"}function fn(r){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,t=e.exec(r),n=t[1]||"",i=!!(n&&n.charAt(1)!==":");return!!(t[2]||i)}ar.exports=process.platform==="win32"?fn:cn;ar.exports.posix=cn;ar.exports.win32=fn});var Fr=S(ne=>{ne.alphasort=dn;ne.alphasorti=vn;ne.setopts=os;ne.ownProp=hn;ne.makeAbs=Dr;ne.finish=ss;ne.mark=as;ne.isIgnored=gn;ne.childrenIgnored=us;function hn(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var Ee=require("path"),rs=sr(),ts=ur(),Pr=rs.Minimatch;function vn(r,e){return r.toLowerCase().localeCompare(e.toLowerCase())}function dn(r,e){return r.localeCompare(e)}function ns(r,e){r.ignore=e.ignore||[],Array.isArray(r.ignore)||(r.ignore=[r.ignore]),r.ignore.length&&(r.ignore=r.ignore.map(is))}function is(r){var e=null;if(r.slice(-3)==="/**"){var t=r.replace(/(\/\*\*)+$/,"");e=new Pr(t,{dot:!0})}return{matcher:new Pr(r,{dot:!0}),gmatcher:e}}function os(r,e,t){if(t||(t={}),t.matchBase&&e.indexOf("/")===-1){if(t.noglobstar)throw new Error("base matching requires globstar");e="**/"+e}r.silent=!!t.silent,r.pattern=e,r.strict=t.strict!==!1,r.realpath=!!t.realpath,r.realpathCache=t.realpathCache||Object.create(null),r.follow=!!t.follow,r.dot=!!t.dot,r.mark=!!t.mark,r.nodir=!!t.nodir,r.nodir&&(r.mark=!0),r.sync=!!t.sync,r.nounique=!!t.nounique,r.nonull=!!t.nonull,r.nosort=!!t.nosort,r.nocase=!!t.nocase,r.stat=!!t.stat,r.noprocess=!!t.noprocess,r.maxLength=t.maxLength||1/0,r.cache=t.cache||Object.create(null),r.statCache=t.statCache||Object.create(null),r.symlinks=t.symlinks||Object.create(null),ns(r,t),r.changedCwd=!1;var n=process.cwd();hn(t,"cwd")?(r.cwd=t.cwd,r.changedCwd=Ee.resolve(t.cwd)!==n):r.cwd=n,r.root=t.root||Ee.resolve(r.cwd,"/"),r.root=Ee.resolve(r.root),process.platform==="win32"&&(r.root=r.root.replace(/\\/g,"/")),r.nomount=!!t.nomount,t.nonegate=!0,t.nocomment=!0,r.minimatch=new Pr(e,t),r.options=r.minimatch.options}function ss(r){for(var e=r.nounique,t=e?[]:Object.create(null),n=0,i=r.matches.length;n<i;n++){var o=r.matches[n];if(!o||Object.keys(o).length===0){if(r.nonull){var s=r.minimatch.globSet[n];e?t.push(s):t[s]=!0}}else{var a=Object.keys(o);e?t.push.apply(t,a):a.forEach(function(u){t[u]=!0})}}if(e||(t=Object.keys(t)),r.nosort||(t=t.sort(r.nocase?vn:dn)),r.mark){for(var n=0;n<t.length;n++)t[n]=r._mark(t[n]);r.nodir&&(t=t.filter(function(u){return!/\/$/.test(u)}))}r.ignore.length&&(t=t.filter(function(u){return!gn(r,u)})),r.found=t}function as(r,e){var t=Dr(r,e),n=r.cache[t],i=e;if(n){var o=n==="DIR"||Array.isArray(n),s=e.slice(-1)==="/";if(o&&!s?i+="/":!o&&s&&(i=i.slice(0,-1)),i!==e){var a=Dr(r,i);r.statCache[a]=r.statCache[t],r.cache[a]=r.cache[t]}}return i}function Dr(r,e){var t=e;return e.charAt(0)==="/"?t=Ee.join(r.root,e):ts(e)||e===""?t=e:r.changedCwd?t=Ee.resolve(r.cwd,e):t=Ee.resolve(e),t}function gn(r,e){return r.ignore.length?r.ignore.some(function(t){return t.matcher.match(e)||!!(t.gmatcher&&t.gmatcher.match(e))}):!1}function us(r,e){return r.ignore.length?r.ignore.some(function(t){return!!(t.gmatcher&&t.gmatcher.match(e))}):!1}});var Sn=S((cu,_n)=>{_n.exports=yn;yn.GlobSync=x;var Ge=require("fs"),mn=sr(),ou=mn.Minimatch,su=qr().Glob,au=require("util"),Br=require("path"),pn=require("assert"),lr=ur(),fe=Fr(),uu=fe.alphasort,lu=fe.alphasorti,ls=fe.setopts,Gr=fe.ownProp,cs=fe.childrenIgnored;function yn(r,e){if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
See: https://github.com/isaacs/node-glob/issues/167`);return new x(r,e).found}function x(r,e){if(!r)throw new Error("must provide pattern");if(typeof e=="function"||arguments.length===3)throw new TypeError(`callback provided to sync glob
See: https://github.com/isaacs/node-glob/issues/167`);if(!(this instanceof x))return new x(r,e);if(ls(this,r,e),this.noprocess)return this;var t=this.minimatch.set.length;this.matches=new Array(t);for(var n=0;n<t;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}x.prototype._finish=function(){if(pn(this instanceof x),this.realpath){var r=this;this.matches.forEach(function(e,t){var n=r.matches[t]=Object.create(null);for(var i in e)try{i=r._makeAbs(i);var o=Ge.realpathSync(i,r.realpathCache);n[o]=!0}catch(s){if(s.syscall==="stat")n[r._makeAbs(i)]=!0;else throw s}})}fe.finish(this)};x.prototype._process=function(r,e,t){pn(this instanceof x);for(var n=0;typeof r[n]=="string";)n++;var i;switch(n){case r.length:this._processSimple(r.join("/"),e);return;case 0:i=null;break;default:i=r.slice(0,n).join("/");break}var o=r.slice(n),s;i===null?s=".":((lr(i)||lr(r.join("/")))&&(!i||!lr(i))&&(i="/"+i),s=i);var a=this._makeAbs(s);if(!cs(this,s)){var u=o[0]===mn.GLOBSTAR;u?this._processGlobStar(i,s,a,o,e,t):this._processReaddir(i,s,a,o,e,t)}};x.prototype._processReaddir=function(r,e,t,n,i,o){var s=this._readdir(t,o);if(s){for(var a=n[0],u=!!this.minimatch.negate,l=a._glob,c=this.dot||l.charAt(0)===".",d=[],f=0;f<s.length;f++){var h=s[f];if(h.charAt(0)!=="."||c){var v;u&&!r?v=!h.match(a):v=h.match(a),v&&d.push(h)}}var m=d.length;if(m!==0){if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var f=0;f<m;f++){var h=d[f];r&&(r.slice(-1)!=="/"?h=r+"/"+h:h=r+h),h.charAt(0)==="/"&&!this.nomount&&(h=Br.join(this.root,h)),this.matches[i][h]=!0}return}n.shift();for(var f=0;f<m;f++){var h=d[f],k;r?k=[r,h]:k=[h],this._process(k.concat(n),i,o)}}}};x.prototype._emitMatch=function(r,e){var t=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),!this.matches[r][e]){if(this.nodir){var n=this.cache[this._makeAbs(e)];if(n==="DIR"||Array.isArray(n))return}this.matches[r][e]=!0,this.stat&&this._stat(e)}};x.prototype._readdirInGlobStar=function(r){if(this.follow)return this._readdir(r,!1);var e,t,n;try{t=Ge.lstatSync(r)}catch{return null}var i=t.isSymbolicLink();return this.symlinks[r]=i,!i&&!t.isDirectory()?this.cache[r]="FILE":e=this._readdir(r,!1),e};x.prototype._readdir=function(r,e){var t;if(e&&!Gr(this.symlinks,r))return this._readdirInGlobStar(r);if(Gr(this.cache,r)){var n=this.cache[r];if(!n||n==="FILE")return null;if(Array.isArray(n))return n}try{return this._readdirEntries(r,Ge.readdirSync(r))}catch(i){return this._readdirError(r,i),null}};x.prototype._readdirEntries=function(r,e){if(!this.mark&&!this.stat)for(var t=0;t<e.length;t++){var n=e[t];r==="/"?n=r+n:n=r+"/"+n,this.cache[n]=!0}return this.cache[r]=e,e};x.prototype._readdirError=function(r,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":this.cache[this._makeAbs(r)]="FILE";break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(r)]=!1;break;default:if(this.cache[this._makeAbs(r)]=!1,this.strict)throw e;this.silent||console.error("glob error",e);break}};x.prototype._processGlobStar=function(r,e,t,n,i,o){var s=this._readdir(t,o);if(s){var a=n.slice(1),u=r?[r]:[],l=u.concat(a);this._process(l,i,!1);var c=s.length,d=this.symlinks[t];if(!(d&&o))for(var f=0;f<c;f++){var h=s[f];if(!(h.charAt(0)==="."&&!this.dot)){var v=u.concat(s[f],a);this._process(v,i,!0);var m=u.concat(s[f],n);this._process(m,i,!0)}}}};x.prototype._processSimple=function(r,e){var t=this._stat(r);if(this.matches[e]||(this.matches[e]=Object.create(null)),!!t){if(r&&lr(r)&&!this.nomount){var n=/[\/\\]$/.test(r);r.charAt(0)==="/"?r=Br.join(this.root,r):(r=Br.resolve(this.root,r),n&&(r+="/"))}process.platform==="win32"&&(r=r.replace(/\\/g,"/")),this.matches[e][r]=!0}};x.prototype._stat=function(r){var e=this._makeAbs(r),t=r.slice(-1)==="/";if(r.length>this.maxLength)return!1;if(!this.stat&&Gr(this.cache,e)){var s=this.cache[e];if(Array.isArray(s)&&(s="DIR"),!t||s==="DIR")return s;if(t&&s==="FILE")return!1}var n,i=this.statCache[e];if(!i){var o;try{o=Ge.lstatSync(e)}catch{return!1}if(o.isSymbolicLink())try{i=Ge.statSync(e)}catch{i=o}else i=o}this.statCache[e]=i;var s=i.isDirectory()?"DIR":"FILE";return this.cache[e]=this.cache[e]||s,t&&s!=="DIR"?!1:s};x.prototype._mark=function(r){return fe.mark(this,r)};x.prototype._makeAbs=function(r){return fe.makeAbs(this,r)}});var Ur=S((fu,bn)=>{bn.exports=wn;function wn(r,e){if(r&&e)return wn(r)(e);if(typeof r!="function")throw new TypeError("need wrapper function");return Object.keys(r).forEach(function(n){t[n]=r[n]}),t;function t(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var o=r.apply(this,n),s=n[n.length-1];return typeof o=="function"&&o!==s&&Object.keys(s).forEach(function(a){o[a]=s[a]}),o}}});var Wr=S((hu,zr)=>{var En=Ur();zr.exports=En(cr);zr.exports.strict=En(Cn);cr.proto=cr(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return cr(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Cn(this)},configurable:!0})});function cr(r){var e=function(){return e.called?e.value:(e.called=!0,e.value=r.apply(this,arguments))};return e.called=!1,e}function Cn(r){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=r.apply(this,arguments)},t=r.name||"Function wrapped with `once`";return e.onceError=t+" shouldn't be called more than once",e.called=!1,e}});var An=S((vu,On)=>{var fs=Ur(),qe=Object.create(null),hs=Wr();On.exports=fs(vs);function vs(r,e){return qe[r]?(qe[r].push(e),null):(qe[r]=[e],ds(r))}function ds(r){return hs(function e(){var t=qe[r],n=t.length,i=gs(arguments);try{for(var o=0;o<n;o++)t[o].apply(null,i)}finally{t.length>n?(t.splice(0,n),process.nextTick(function(){e.apply(null,i)})):delete qe[r]}})}function gs(r){for(var e=r.length,t=[],n=0;n<e;n++)t[n]=r[n];return t}});var qr=S((yu,kn)=>{kn.exports=ge;var Ue=require("fs"),Rn=sr(),du=Rn.Minimatch,ms=ln(),ps=require("events").EventEmitter,$r=require("path"),Vr=require("assert"),fr=ur(),Jr=Sn(),oe=Fr(),gu=oe.alphasort,mu=oe.alphasorti,ys=oe.setopts,Qr=oe.ownProp,Yr=An(),pu=require("util"),_s=oe.childrenIgnored,Ss=oe.isIgnored,ws=Wr();function ge(r,e,t){if(typeof e=="function"&&(t=e,e={}),e||(e={}),e.sync){if(t)throw new TypeError("callback provided to sync glob");return Jr(r,e)}return new R(r,e,t)}ge.sync=Jr;var bs=ge.GlobSync=Jr.GlobSync;ge.glob=ge;function Es(r,e){if(e===null||typeof e!="object")return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}ge.hasMagic=function(r,e){var t=Es({},e);t.noprocess=!0;var n=new R(r,t),i=n.minimatch.set;if(i.length>1)return!0;for(var o=0;o<i[0].length;o++)if(typeof i[0][o]!="string")return!0;return!1};ge.Glob=R;ms(R,ps);function R(r,e,t){if(typeof e=="function"&&(t=e,e=null),e&&e.sync){if(t)throw new TypeError("callback provided to sync glob");return new bs(r,e)}if(!(this instanceof R))return new R(r,e,t);ys(this,r,e),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof t=="function"&&(t=ws(t),this.on("error",t),this.on("end",function(a){t(null,a)}));var n=this,i=this.minimatch.set.length;if(this._processing=0,this.matches=new Array(i),this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(i===0)return s();for(var o=0;o<i;o++)this._process(this.minimatch.set[o],o,!1,s);function s(){--n._processing,n._processing<=0&&n._finish()}}R.prototype._finish=function(){if(Vr(this instanceof R),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();oe.finish(this),this.emit("end",this.found)}};R.prototype._realpath=function(){if(this._didRealpath)return;this._didRealpath=!0;var r=this.matches.length;if(r===0)return this._finish();for(var e=this,t=0;t<this.matches.length;t++)this._realpathSet(t,n);function n(){--r===0&&e._finish()}};R.prototype._realpathSet=function(r,e){var t=this.matches[r];if(!t)return e();var n=Object.keys(t),i=this,o=n.length;if(o===0)return e();var s=this.matches[r]=Object.create(null);n.forEach(function(a,u){a=i._makeAbs(a),Ue.realpath(a,i.realpathCache,function(l,c){l?l.syscall==="stat"?s[a]=!0:i.emit("error",l):s[c]=!0,--o===0&&(i.matches[r]=s,e())})})};R.prototype._mark=function(r){return oe.mark(this,r)};R.prototype._makeAbs=function(r){return oe.makeAbs(this,r)};R.prototype.abort=function(){this.aborted=!0,this.emit("abort")};R.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};R.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var r=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<r.length;e++){var t=r[e];this._emitMatch(t[0],t[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(var e=0;e<n.length;e++){var i=n[e];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}};R.prototype._process=function(r,e,t,n){if(Vr(this instanceof R),Vr(typeof n=="function"),!this.aborted){if(this._processing++,this.paused){this._processQueue.push([r,e,t,n]);return}for(var i=0;typeof r[i]=="string";)i++;var o;switch(i){case r.length:this._processSimple(r.join("/"),e,n);return;case 0:o=null;break;default:o=r.slice(0,i).join("/");break}var s=r.slice(i),a;o===null?a=".":((fr(o)||fr(r.join("/")))&&(!o||!fr(o))&&(o="/"+o),a=o);var u=this._makeAbs(a);if(_s(this,a))return n();var l=s[0]===Rn.GLOBSTAR;l?this._processGlobStar(o,a,u,s,e,t,n):this._processReaddir(o,a,u,s,e,t,n)}};R.prototype._processReaddir=function(r,e,t,n,i,o,s){var a=this;this._readdir(t,o,function(u,l){return a._processReaddir2(r,e,t,n,i,o,l,s)})};R.prototype._processReaddir2=function(r,e,t,n,i,o,s,a){if(!s)return a();for(var u=n[0],l=!!this.minimatch.negate,c=u._glob,d=this.dot||c.charAt(0)===".",f=[],h=0;h<s.length;h++){var v=s[h];if(v.charAt(0)!=="."||d){var m;l&&!r?m=!v.match(u):m=v.match(u),m&&f.push(v)}}var k=f.length;if(k===0)return a();if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var h=0;h<k;h++){var v=f[h];r&&(r!=="/"?v=r+"/"+v:v=r+v),v.charAt(0)==="/"&&!this.nomount&&(v=$r.join(this.root,v)),this._emitMatch(i,v)}return a()}n.shift();for(var h=0;h<k;h++){var v=f[h],p;r&&(r!=="/"?v=r+"/"+v:v=r+v),this._process([v].concat(n),i,o,a)}a()};R.prototype._emitMatch=function(r,e){if(!this.aborted&&!this.matches[r][e]&&!Ss(this,e)){if(this.paused){this._emitQueue.push([r,e]);return}var t=this._makeAbs(e);if(this.nodir){var n=this.cache[t];if(n==="DIR"||Array.isArray(n))return}this.mark&&(e=this._mark(e)),this.matches[r][e]=!0;var i=this.statCache[t];i&&this.emit("stat",e,i),this.emit("match",e)}};R.prototype._readdirInGlobStar=function(r,e){if(this.aborted)return;if(this.follow)return this._readdir(r,!1,e);var t="lstat\0"+r,n=this,i=Yr(t,o);i&&Ue.lstat(r,i);function o(s,a){if(s)return e();var u=a.isSymbolicLink();n.symlinks[r]=u,!u&&!a.isDirectory()?(n.cache[r]="FILE",e()):n._readdir(r,!1,e)}};R.prototype._readdir=function(r,e,t){if(!this.aborted&&(t=Yr("readdir\0"+r+"\0"+e,t),!!t)){if(e&&!Qr(this.symlinks,r))return this._readdirInGlobStar(r,t);if(Qr(this.cache,r)){var n=this.cache[r];if(!n||n==="FILE")return t();if(Array.isArray(n))return t(null,n)}var i=this;Ue.readdir(r,Cs(this,r,t))}};function Cs(r,e,t){return function(n,i){n?r._readdirError(e,n,t):r._readdirEntries(e,i,t)}}R.prototype._readdirEntries=function(r,e,t){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<e.length;n++){var i=e[n];r==="/"?i=r+i:i=r+"/"+i,this.cache[i]=!0}return this.cache[r]=e,t(null,e)}};R.prototype._readdirError=function(r,e,t){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":this.cache[this._makeAbs(r)]="FILE";break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(r)]=!1;break;default:this.cache[this._makeAbs(r)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e);break}return t()}};R.prototype._processGlobStar=function(r,e,t,n,i,o,s){var a=this;this._readdir(t,o,function(u,l){a._processGlobStar2(r,e,t,n,i,o,l,s)})};R.prototype._processGlobStar2=function(r,e,t,n,i,o,s,a){if(!s)return a();var u=n.slice(1),l=r?[r]:[],c=l.concat(u);this._process(c,i,!1,a);var d=this.symlinks[t],f=s.length;if(d&&o)return a();for(var h=0;h<f;h++){var v=s[h];if(!(v.charAt(0)==="."&&!this.dot)){var m=l.concat(s[h],u);this._process(m,i,!0,a);var k=l.concat(s[h],n);this._process(k,i,!0,a)}}a()};R.prototype._processSimple=function(r,e,t){var n=this;this._stat(r,function(i,o){n._processSimple2(r,e,i,o,t)})};R.prototype._processSimple2=function(r,e,t,n,i){if(this.matches[e]||(this.matches[e]=Object.create(null)),!n)return i();if(r&&fr(r)&&!this.nomount){var o=/[\/\\]$/.test(r);r.charAt(0)==="/"?r=$r.join(this.root,r):(r=$r.resolve(this.root,r),o&&(r+="/"))}process.platform==="win32"&&(r=r.replace(/\\/g,"/")),this._emitMatch(e,r),i()};R.prototype._stat=function(r,e){var t=this._makeAbs(r),n=r.slice(-1)==="/";if(r.length>this.maxLength)return e();if(!this.stat&&Qr(this.cache,t)){var i=this.cache[t];if(Array.isArray(i)&&(i="DIR"),!n||i==="DIR")return e(null,i);if(n&&i==="FILE")return e()}var o,s=this.statCache[t];if(s!==void 0){if(s===!1)return e(null,s);var a=s.isDirectory()?"DIR":"FILE";return n&&a==="FILE"?e():e(null,a,s)}var u=this,l=Yr("stat\0"+t,c);l&&Ue.lstat(t,l);function c(d,f){if(f&&f.isSymbolicLink())return Ue.stat(t,function(h,v){h?u._stat2(r,t,null,f,e):u._stat2(r,t,h,v,e)});u._stat2(r,t,d,f,e)}};R.prototype._stat2=function(r,e,t,n,i){if(t)return this.statCache[e]=!1,i();var o=r.slice(-1)==="/";if(this.statCache[e]=n,e.slice(-1)==="/"&&!n.isDirectory())return i(null,!1,n);var s=n.isDirectory()?"DIR":"FILE";return this.cache[e]=this.cache[e]||s,o&&s!=="DIR"?i():i(null,s,n)}});var In=S((_u,jn)=>{jn.exports=Hr;Hr.sync=Nn;var A=require("assert"),Mn=require("path"),dr=require("fs"),gr=qr(),Ln={nosort:!0,nocomment:!0,nonegate:!0,silent:!0},Xr=0,Kr=process.platform==="win32";function Tn(r){var e=["unlink","chmod","stat","lstat","rmdir","readdir"];e.forEach(function(t){r[t]=r[t]||dr[t],t=t+"Sync",r[t]=r[t]||dr[t]}),r.maxBusyTries=r.maxBusyTries||3,r.emfileWait=r.emfileWait||1e3,r.disableGlob=r.disableGlob||!1}function Hr(r,e,t){typeof e=="function"&&(t=e,e={}),A(r,"rimraf: missing path"),A.equal(typeof r,"string","rimraf: path should be a string"),A(e,"rimraf: missing options"),A.equal(typeof e,"object","rimraf: options should be object"),A.equal(typeof t,"function","rimraf: callback function required"),Tn(e);var n=0,i=null,o=0;if(e.disableGlob||!gr.hasMagic(r))return a(null,[r]);dr.lstat(r,function(u,l){if(!u)return a(null,[r]);gr(r,Ln,a)});function s(u){i=i||u,--o===0&&t(i)}function a(u,l){if(u)return t(u);if(o=l.length,o===0)return t();l.forEach(function(c){Zr(c,e,function d(f){if(f){if(Kr&&(f.code==="EBUSY"||f.code==="ENOTEMPTY"||f.code==="EPERM")&&n<e.maxBusyTries){n++;var h=n*100;return setTimeout(function(){Zr(c,e,d)},h)}if(f.code==="EMFILE"&&Xr<e.emfileWait)return setTimeout(function(){Zr(c,e,d)},Xr++);f.code==="ENOENT"&&(f=null)}Xr=0,s(f)})})}}function Zr(r,e,t){A(r),A(e),A(typeof t=="function"),e.lstat(r,function(n,i){if(n&&n.code==="ENOENT")return t(null);if(i&&i.isDirectory())return hr(r,e,n,t);e.unlink(r,function(o){if(o){if(o.code==="ENOENT")return t(null);if(o.code==="EPERM")return Kr?Os(r,e,o,t):hr(r,e,o,t);if(o.code==="EISDIR")return hr(r,e,o,t)}return t(o)})})}function Os(r,e,t,n){A(r),A(e),A(typeof n=="function"),t&&A(t instanceof Error),e.chmod(r,666,function(i){i?n(i.code==="ENOENT"?null:t):e.stat(r,function(o,s){o?n(o.code==="ENOENT"?null:t):s.isDirectory()?hr(r,e,t,n):e.unlink(r,n)})})}function As(r,e,t){A(r),A(e),t&&A(t instanceof Error);try{e.chmodSync(r,666)}catch(i){if(i.code==="ENOENT")return;throw t}try{var n=e.statSync(r)}catch(i){if(i.code==="ENOENT")return;throw t}n.isDirectory()?vr(r,e,t):e.unlinkSync(r)}function hr(r,e,t,n){A(r),A(e),t&&A(t instanceof Error),A(typeof n=="function"),e.rmdir(r,function(i){i&&(i.code==="ENOTEMPTY"||i.code==="EEXIST"||i.code==="EPERM")?Rs(r,e,n):i&&i.code==="ENOTDIR"?n(t):n(i)})}function Rs(r,e,t){A(r),A(e),A(typeof t=="function"),e.readdir(r,function(n,i){if(n)return t(n);var o=i.length;if(o===0)return e.rmdir(r,t);var s;i.forEach(function(a){Hr(Mn.join(r,a),e,function(u){if(!s){if(u)return t(s=u);--o===0&&e.rmdir(r,t)}})})})}function Nn(r,e){e=e||{},Tn(e),A(r,"rimraf: missing path"),A.equal(typeof r,"string","rimraf: path should be a string"),A(e,"rimraf: missing options"),A.equal(typeof e,"object","rimraf: options should be object");var t;if(e.disableGlob||!gr.hasMagic(r))t=[r];else try{dr.lstatSync(r),t=[r]}catch{t=gr.sync(r,Ln)}if(t.length)for(var n=0;n<t.length;n++){var r=t[n];try{var i=e.lstatSync(r)}catch(s){if(s.code==="ENOENT")return}try{i&&i.isDirectory()?vr(r,e,null):e.unlinkSync(r)}catch(s){if(s.code==="ENOENT")return;if(s.code==="EPERM")return Kr?As(r,e,s):vr(r,e,s);if(s.code!=="EISDIR")throw s;vr(r,e,s)}}}function vr(r,e,t){A(r),A(e),t&&A(t instanceof Error);try{e.rmdirSync(r)}catch(n){if(n.code==="ENOENT")return;if(n.code==="ENOTDIR")throw t;(n.code==="ENOTEMPTY"||n.code==="EEXIST"||n.code==="EPERM")&&ks(r,e)}}function ks(r,e){A(r),A(e),e.readdirSync(r).forEach(function(t){Nn(Mn.join(r,t),e)}),e.rmdirSync(r,e)}});var Fn=S((Su,Dn)=>{var ze=require("path"),xn=require("fs"),Pn=parseInt("0777",8);Dn.exports=Ce.mkdirp=Ce.mkdirP=Ce;function Ce(r,e,t,n){typeof e=="function"?(t=e,e={}):(!e||typeof e!="object")&&(e={mode:e});var i=e.mode,o=e.fs||xn;i===void 0&&(i=Pn),n||(n=null);var s=t||function(){};r=ze.resolve(r),o.mkdir(r,i,function(a){if(!a)return n=n||r,s(null,n);switch(a.code){case"ENOENT":if(ze.dirname(r)===r)return s(a);Ce(ze.dirname(r),e,function(u,l){u?s(u,l):Ce(r,e,s,l)});break;default:o.stat(r,function(u,l){u||!l.isDirectory()?s(a,n):s(null,n)});break}})}Ce.sync=function r(e,t,n){(!t||typeof t!="object")&&(t={mode:t});var i=t.mode,o=t.fs||xn;i===void 0&&(i=Pn),n||(n=null),e=ze.resolve(e);try{o.mkdirSync(e,i),n=n||e}catch(a){switch(a.code){case"ENOENT":n=r(ze.dirname(e),t,n),r(e,t,n);break;default:var s;try{s=o.statSync(e)}catch{throw a}if(!s.isDirectory())throw a;break}}return n}});var zn=S((wu,Un)=>{var Oe=require("fs"),Ms=Gt().ncp,Ls=require("path"),Bn=In(),Ts=Fn();Un.exports=Ns;function Ns(r,e,t,n){typeof t=="function"&&(n=t,t={});var i=!!t.mkdirp,o=t.clobber!==!1,s=t.limit||16;i?a():u();function a(){Ts(Ls.dirname(e),function(l){if(l)return n(l);u()})}function u(){o?Oe.rename(r,e,function(l){if(!l)return n();if(l.code!=="EXDEV")return n(l);Gn(r,e,o,s,n)}):Oe.link(r,e,function(l){if(l){if(l.code==="EXDEV"){Gn(r,e,o,s,n);return}if(l.code==="EISDIR"||l.code==="EPERM"){qn(r,e,o,s,n);return}n(l);return}Oe.unlink(r,n)})}}function Gn(r,e,t,n,i){var o=t?"w":"wx",s=Oe.createReadStream(r),a=Oe.createWriteStream(e,{flags:o});s.on("error",function(l){s.destroy(),a.destroy(),a.removeListener("close",u),l.code==="EISDIR"||l.code==="EPERM"?qn(r,e,t,n,i):i(l)}),a.on("error",function(l){s.destroy(),a.destroy(),a.removeListener("close",u),i(l)}),a.once("close",u),s.pipe(a);function u(){Oe.unlink(r,i)}}function qn(r,e,t,n,i){var o={stopOnErr:!0,clobber:!1,limit:n};t?Bn(e,{disableGlob:!0},function(a){if(a)return i(a);s()}):s();function s(){Ms(r,e,o,function(a){if(a)return i(a[0]);Bn(r,{disableGlob:!0},i)})}}});var $n=S(et=>{var Wn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");et.encode=function(r){if(0<=r&&r<Wn.length)return Wn[r];throw new TypeError("Must be between 0 and 63: "+r)};et.decode=function(r){var e=65,t=90,n=97,i=122,o=48,s=57,a=43,u=47,l=26,c=52;return e<=r&&r<=t?r-e:n<=r&&r<=i?r-n+l:o<=r&&r<=s?r-o+c:r==a?62:r==u?63:-1}});var nt=S(tt=>{var Vn=$n(),rt=5,Qn=1<<rt,Jn=Qn-1,Yn=Qn;function js(r){return r<0?(-r<<1)+1:(r<<1)+0}function Is(r){var e=(r&1)===1,t=r>>1;return e?-t:t}tt.encode=function(e){var t="",n,i=js(e);do n=i&Jn,i>>>=rt,i>0&&(n|=Yn),t+=Vn.encode(n);while(i>0);return t};tt.decode=function(e,t,n){var i=e.length,o=0,s=0,a,u;do{if(t>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(u=Vn.decode(e.charCodeAt(t++)),u===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));a=!!(u&Yn),u&=Jn,o=o+(u<<s),s+=rt}while(a);n.value=Is(o),n.rest=t}});var ke=S(G=>{function xs(r,e,t){if(e in r)return r[e];if(arguments.length===3)return t;throw new Error('"'+e+'" is a required argument.')}G.getArg=xs;var Xn=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,Ps=/^data:.+\,.+$/;function We(r){var e=r.match(Xn);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}G.urlParse=We;function Ae(r){var e="";return r.scheme&&(e+=r.scheme+":"),e+="//",r.auth&&(e+=r.auth+"@"),r.host&&(e+=r.host),r.port&&(e+=":"+r.port),r.path&&(e+=r.path),e}G.urlGenerate=Ae;function it(r){var e=r,t=We(r);if(t){if(!t.path)return r;e=t.path}for(var n=G.isAbsolute(e),i=e.split(/\/+/),o,s=0,a=i.length-1;a>=0;a--)o=i[a],o==="."?i.splice(a,1):o===".."?s++:s>0&&(o===""?(i.splice(a+1,s),s=0):(i.splice(a,2),s--));return e=i.join("/"),e===""&&(e=n?"/":"."),t?(t.path=e,Ae(t)):e}G.normalize=it;function Zn(r,e){r===""&&(r="."),e===""&&(e=".");var t=We(e),n=We(r);if(n&&(r=n.path||"/"),t&&!t.scheme)return n&&(t.scheme=n.scheme),Ae(t);if(t||e.match(Ps))return e;if(n&&!n.host&&!n.path)return n.host=e,Ae(n);var i=e.charAt(0)==="/"?e:it(r.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Ae(n)):i}G.join=Zn;G.isAbsolute=function(r){return r.charAt(0)==="/"||Xn.test(r)};function Ds(r,e){r===""&&(r="."),r=r.replace(/\/$/,"");for(var t=0;e.indexOf(r+"/")!==0;){var n=r.lastIndexOf("/");if(n<0||(r=r.slice(0,n),r.match(/^([^\/]+:\/)?\/*$/)))return e;++t}return Array(t+1).join("../")+e.substr(r.length+1)}G.relative=Ds;var Kn=function(){var r=Object.create(null);return!("__proto__"in r)}();function Hn(r){return r}function Fs(r){return ei(r)?"$"+r:r}G.toSetString=Kn?Hn:Fs;function Bs(r){return ei(r)?r.slice(1):r}G.fromSetString=Kn?Hn:Bs;function ei(r){if(!r)return!1;var e=r.length;if(e<9||r.charCodeAt(e-1)!==95||r.charCodeAt(e-2)!==95||r.charCodeAt(e-3)!==111||r.charCodeAt(e-4)!==116||r.charCodeAt(e-5)!==111||r.charCodeAt(e-6)!==114||r.charCodeAt(e-7)!==112||r.charCodeAt(e-8)!==95||r.charCodeAt(e-9)!==95)return!1;for(var t=e-10;t>=0;t--)if(r.charCodeAt(t)!==36)return!1;return!0}function Gs(r,e,t){var n=Re(r.source,e.source);return n!==0||(n=r.originalLine-e.originalLine,n!==0)||(n=r.originalColumn-e.originalColumn,n!==0||t)||(n=r.generatedColumn-e.generatedColumn,n!==0)||(n=r.generatedLine-e.generatedLine,n!==0)?n:Re(r.name,e.name)}G.compareByOriginalPositions=Gs;function qs(r,e,t){var n=r.generatedLine-e.generatedLine;return n!==0||(n=r.generatedColumn-e.generatedColumn,n!==0||t)||(n=Re(r.source,e.source),n!==0)||(n=r.originalLine-e.originalLine,n!==0)||(n=r.originalColumn-e.originalColumn,n!==0)?n:Re(r.name,e.name)}G.compareByGeneratedPositionsDeflated=qs;function Re(r,e){return r===e?0:r===null?1:e===null?-1:r>e?1:-1}function Us(r,e){var t=r.generatedLine-e.generatedLine;return t!==0||(t=r.generatedColumn-e.generatedColumn,t!==0)||(t=Re(r.source,e.source),t!==0)||(t=r.originalLine-e.originalLine,t!==0)||(t=r.originalColumn-e.originalColumn,t!==0)?t:Re(r.name,e.name)}G.compareByGeneratedPositionsInflated=Us;function zs(r){return JSON.parse(r.replace(/^\)]}'[^\n]*\n/,""))}G.parseSourceMapInput=zs;function Ws(r,e,t){if(e=e||"",r&&(r[r.length-1]!=="/"&&e[0]!=="/"&&(r+="/"),e=r+e),t){var n=We(t);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=Zn(Ae(n),e)}return it(e)}G.computeSourceURL=Ws});var at=S(ri=>{var ot=ke(),st=Object.prototype.hasOwnProperty,me=typeof Map<"u";function se(){this._array=[],this._set=me?new Map:Object.create(null)}se.fromArray=function(e,t){for(var n=new se,i=0,o=e.length;i<o;i++)n.add(e[i],t);return n};se.prototype.size=function(){return me?this._set.size:Object.getOwnPropertyNames(this._set).length};se.prototype.add=function(e,t){var n=me?e:ot.toSetString(e),i=me?this.has(e):st.call(this._set,n),o=this._array.length;(!i||t)&&this._array.push(e),i||(me?this._set.set(e,o):this._set[n]=o)};se.prototype.has=function(e){if(me)return this._set.has(e);var t=ot.toSetString(e);return st.call(this._set,t)};se.prototype.indexOf=function(e){if(me){var t=this._set.get(e);if(t>=0)return t}else{var n=ot.toSetString(e);if(st.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};se.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};se.prototype.toArray=function(){return this._array.slice()};ri.ArraySet=se});var ii=S(ni=>{var ti=ke();function $s(r,e){var t=r.generatedLine,n=e.generatedLine,i=r.generatedColumn,o=e.generatedColumn;return n>t||n==t&&o>=i||ti.compareByGeneratedPositionsInflated(r,e)<=0}function mr(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}mr.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)};mr.prototype.add=function(e){$s(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))};mr.prototype.toArray=function(){return this._sorted||(this._array.sort(ti.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};ni.MappingList=mr});var ut=S(oi=>{var $e=nt(),I=ke(),pr=at().ArraySet,Vs=ii().MappingList;function Z(r){r||(r={}),this._file=I.getArg(r,"file",null),this._sourceRoot=I.getArg(r,"sourceRoot",null),this._skipValidation=I.getArg(r,"skipValidation",!1),this._sources=new pr,this._names=new pr,this._mappings=new Vs,this._sourcesContents=null}Z.prototype._version=3;Z.fromSourceMap=function(e){var t=e.sourceRoot,n=new Z({file:e.file,sourceRoot:t});return e.eachMapping(function(i){var o={generated:{line:i.generatedLine,column:i.generatedColumn}};i.source!=null&&(o.source=i.source,t!=null&&(o.source=I.relative(t,o.source)),o.original={line:i.originalLine,column:i.originalColumn},i.name!=null&&(o.name=i.name)),n.addMapping(o)}),e.sources.forEach(function(i){var o=i;t!==null&&(o=I.relative(t,i)),n._sources.has(o)||n._sources.add(o);var s=e.sourceContentFor(i);s!=null&&n.setSourceContent(i,s)}),n};Z.prototype.addMapping=function(e){var t=I.getArg(e,"generated"),n=I.getArg(e,"original",null),i=I.getArg(e,"source",null),o=I.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,i,o),i!=null&&(i=String(i),this._sources.has(i)||this._sources.add(i)),o!=null&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:i,name:o})};Z.prototype.setSourceContent=function(e,t){var n=e;this._sourceRoot!=null&&(n=I.relative(this._sourceRoot,n)),t!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[I.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[I.toSetString(n)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))};Z.prototype.applySourceMap=function(e,t,n){var i=t;if(t==null){if(e.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);i=e.file}var o=this._sourceRoot;o!=null&&(i=I.relative(o,i));var s=new pr,a=new pr;this._mappings.unsortedForEach(function(u){if(u.source===i&&u.originalLine!=null){var l=e.originalPositionFor({line:u.originalLine,column:u.originalColumn});l.source!=null&&(u.source=l.source,n!=null&&(u.source=I.join(n,u.source)),o!=null&&(u.source=I.relative(o,u.source)),u.originalLine=l.line,u.originalColumn=l.column,l.name!=null&&(u.name=l.name))}var c=u.source;c!=null&&!s.has(c)&&s.add(c);var d=u.name;d!=null&&!a.has(d)&&a.add(d)},this),this._sources=s,this._names=a,e.sources.forEach(function(u){var l=e.sourceContentFor(u);l!=null&&(n!=null&&(u=I.join(n,u)),o!=null&&(u=I.relative(o,u)),this.setSourceContent(u,l))},this)};Z.prototype._validateMapping=function(e,t,n,i){if(t&&typeof t.line!="number"&&typeof t.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!n&&!i)){if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:i}))}};Z.prototype._serializeMappings=function(){for(var e=0,t=1,n=0,i=0,o=0,s=0,a="",u,l,c,d,f=this._mappings.toArray(),h=0,v=f.length;h<v;h++){if(l=f[h],u="",l.generatedLine!==t)for(e=0;l.generatedLine!==t;)u+=";",t++;else if(h>0){if(!I.compareByGeneratedPositionsInflated(l,f[h-1]))continue;u+=","}u+=$e.encode(l.generatedColumn-e),e=l.generatedColumn,l.source!=null&&(d=this._sources.indexOf(l.source),u+=$e.encode(d-s),s=d,u+=$e.encode(l.originalLine-1-i),i=l.originalLine-1,u+=$e.encode(l.originalColumn-n),n=l.originalColumn,l.name!=null&&(c=this._names.indexOf(l.name),u+=$e.encode(c-o),o=c)),a+=u}return a};Z.prototype._generateSourcesContent=function(e,t){return e.map(function(n){if(!this._sourcesContents)return null;t!=null&&(n=I.relative(t,n));var i=I.toSetString(n);return Object.prototype.hasOwnProperty.call(this._sourcesContents,i)?this._sourcesContents[i]:null},this)};Z.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(e.file=this._file),this._sourceRoot!=null&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e};Z.prototype.toString=function(){return JSON.stringify(this.toJSON())};oi.SourceMapGenerator=Z});var si=S(pe=>{pe.GREATEST_LOWER_BOUND=1;pe.LEAST_UPPER_BOUND=2;function lt(r,e,t,n,i,o){var s=Math.floor((e-r)/2)+r,a=i(t,n[s],!0);return a===0?s:a>0?e-s>1?lt(s,e,t,n,i,o):o==pe.LEAST_UPPER_BOUND?e<n.length?e:-1:s:s-r>1?lt(r,s,t,n,i,o):o==pe.LEAST_UPPER_BOUND?s:r<0?-1:r}pe.search=function(e,t,n,i){if(t.length===0)return-1;var o=lt(-1,t.length,e,t,n,i||pe.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&n(t[o],t[o-1],!0)===0;)--o;return o}});var ui=S(ai=>{function ct(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function Qs(r,e){return Math.round(r+Math.random()*(e-r))}function ft(r,e,t,n){if(t<n){var i=Qs(t,n),o=t-1;ct(r,i,n);for(var s=r[n],a=t;a<n;a++)e(r[a],s)<=0&&(o+=1,ct(r,o,a));ct(r,o+1,a);var u=o+1;ft(r,e,t,u-1),ft(r,e,u+1,n)}}ai.quickSort=function(r,e){ft(r,e,0,r.length-1)}});var ci=S(yr=>{var g=ke(),ht=si(),Me=at().ArraySet,Js=nt(),Ve=ui().quickSort;function M(r,e){var t=r;return typeof r=="string"&&(t=g.parseSourceMapInput(r)),t.sections!=null?new re(t,e):new D(t,e)}M.fromSourceMap=function(r,e){return D.fromSourceMap(r,e)};M.prototype._version=3;M.prototype.__generatedMappings=null;Object.defineProperty(M.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});M.prototype.__originalMappings=null;Object.defineProperty(M.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});M.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return n===";"||n===","};M.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement