UNPKG

@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 kB
var Eo=Object.create;var tr=Object.defineProperty;var bo=Object.getOwnPropertyDescriptor;var Oo=Object.getOwnPropertyNames;var Co=Object.getPrototypeOf,Ao=Object.prototype.hasOwnProperty;var S=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ko=(r,e)=>{for(var t in e)tr(r,t,{get:e[t],enumerable:!0})},Nt=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oo(e))!Ao.call(r,i)&&i!==t&&tr(r,i,{get:()=>e[i],enumerable:!(n=bo(e,i))||n.enumerable});return r};var jt=(r,e,t)=>(t=r!=null?Eo(Co(r)):{},Nt(e||!r||!r.__esModule?tr(t,"default",{value:r,enumerable:!0}):t,r)),Mo=r=>Nt(tr({},"__esModule",{value:!0}),r);var Dt=S((Qs,Ar)=>{var Ro=Object.prototype.hasOwnProperty;function It(r){return"[Throws: "+(r?r.message:"?")+"]"}function Lo(r,e){if(Ro.call(r,e))try{return r[e]}catch(t){return It(t)}return r[e]}function xt(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(s){return It(s)}if(Array.isArray(n)){var o=n.map(t);return e.pop(),o}var a=Object.keys(n).reduce(function(s,u){return s[u]=t(Lo(n,u)),s},{});return e.pop(),a}return t(r)}Ar.exports=function(r,e,t){return JSON.stringify(xt(r),e,t)};Ar.exports.ensureProperties=xt});var Ft=S((Js,Pt)=>{var q=require("fs"),Fe=require("path");Pt.exports=nr;nr.ncp=nr;function nr(r,e,t,n){var i=n;n||(i=t,t={});var o=process.cwd(),a=Fe.resolve(o,r),s=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,M=0,p=0,_=t.limit||nr.limit||16;_=_<1?1:_>512?512:_,j(a);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 E(y)}function E(y){var b=h?q.stat:q.lstat;if(p>=_)return setImmediate(function(){E(y)});p++,b(y,function(O,T){var z={};if(O)return $(O);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 C(z);if(T.isSymbolicLink())return w(y)})}function C(y){var b=y.name.replace(a,s);l&&(b=l(b)),ee(b,function(O){if(O)return K(y,b);if(d&&W(b,function(){K(y,b)}),f){var T=h?q.stat:q.lstat;T(b,function(z,Pe){if(y.mtime.getTime()>Pe.mtime.getTime())K(y,b);else return V()})}else return V()})}function K(y,b){var O=q.createReadStream(y.name),T=q.createWriteStream(b,{mode:y.mode});O.on("error",$),T.on("error",$),c?c(O,T,y):T.on("open",function(){O.pipe(T)}),T.once("finish",function(){f&&q.utimesSync(b,y.atime,y.mtime),V()})}function W(y,b){q.unlink(y,function(O){return O?$(O):b()})}function U(y){var b=y.name.replace(a,s);ee(b,function(O){if(O)return N(y,b);te(y.name)})}function N(y,b){q.mkdir(b,y.mode,function(O){if(O)return $(O);te(y.name)})}function te(y){q.readdir(y,function(b,O){return b?$(b):(O.forEach(function(T){j(Fe.join(y,T))}),V())})}function w(y){var b=y.replace(a,s);q.readlink(y,function(O,T){if(O)return $(O);X(T,b)})}function X(y,b){h&&(y=Fe.resolve(o,y)),ee(b,function(O){if(O)return H(y,b);q.readlink(b,function(T,z){return T?$(T):(h&&(z=Fe.resolve(o,z)),z===y?V():W(b,function(){H(y,b)}))})})}function H(y,b){q.symlink(y,b,function(O){return O?$(O):V()})}function ee(y,b){q.lstat(y,function(O){return O&&O.code==="ENOENT"?b(!0):b(!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--,M++,m===M&&p===0&&i!==void 0)return i(v||null)}}});var Bt=S((Ys,Gt)=>{Gt.exports=function(r,e){for(var t=[],n=0;n<r.length;n++){var i=e(r[n],n);To(i)?t.push.apply(t,i):t.push(i)}return t};var To=Array.isArray||function(r){return Object.prototype.toString.call(r)==="[object Array]"}});var $t=S((Xs,Wt)=>{"use strict";Wt.exports=Ut;function Ut(r,e,t){r instanceof RegExp&&(r=qt(r,t)),e instanceof RegExp&&(e=qt(e,t));var n=zt(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 qt(r,e){var t=e.match(r);return t?t[0]:null}Ut.range=zt;function zt(r,e,t){var n,i,o,a,s,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&&!s;)c==u?(n.push(c),u=t.indexOf(r,c+1)):n.length==1?s=[n.pop(),l]:(i=n.pop(),i<o&&(o=i,a=l),l=t.indexOf(e,c+1)),c=u<l&&u>=0?u:l;n.length&&(s=[o,a])}return s}});var Ht=S((Zs,Kt)=>{var No=Bt(),Vt=$t();Kt.exports=xo;var Qt="\0SLASH"+Math.random()+"\0",Jt="\0OPEN"+Math.random()+"\0",Mr="\0CLOSE"+Math.random()+"\0",Yt="\0COMMA"+Math.random()+"\0",Xt="\0PERIOD"+Math.random()+"\0";function kr(r){return parseInt(r,10)==r?parseInt(r,10):r.charCodeAt(0)}function jo(r){return r.split("\\\\").join(Qt).split("\\{").join(Jt).split("\\}").join(Mr).split("\\,").join(Yt).split("\\.").join(Xt)}function Io(r){return r.split(Qt).join("\\").split(Jt).join("{").split(Mr).join("}").split(Yt).join(",").split(Xt).join(".")}function Zt(r){if(!r)return[""];var e=[],t=Vt("{","}",r);if(!t)return r.split(",");var n=t.pre,i=t.body,o=t.post,a=n.split(",");a[a.length-1]+="{"+i+"}";var s=Zt(o);return o.length&&(a[a.length-1]+=s.shift(),a.push.apply(a,s)),e.push.apply(e,a),e}function xo(r){return r?(r.substr(0,2)==="{}"&&(r="\\{\\}"+r.substr(2)),Ee(jo(r),!0).map(Io)):[]}function Do(r){return"{"+r+"}"}function Po(r){return/^-?0\d/.test(r)}function Fo(r,e){return r<=e}function Go(r,e){return r>=e}function Ee(r,e){var t=[],n=Vt("{","}",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),a=i||o,s=n.body.indexOf(",")>=0;if(!a&&!s)return n.post.match(/,.*\}/)?(r=n.pre+"{"+n.body+Mr+n.post,Ee(r)):[r];var u;if(a)u=n.body.split(/\.\./);else if(u=Zt(n.body),u.length===1&&(u=Ee(u[0],!1).map(Do),u.length===1)){var c=n.post.length?Ee(n.post,!1):[""];return c.map(function(w){return n.pre+u[0]+w})}var l=n.pre,c=n.post.length?Ee(n.post,!1):[""],d;if(a){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,M=Fo,p=h<f;p&&(m*=-1,M=Go);var _=u.some(Po);d=[];for(var j=f;M(j,h);j+=m){var E;if(o)E=String.fromCharCode(j),E==="\\"&&(E="");else if(E=String(j),_){var C=v-E.length;if(C>0){var K=new Array(C+1).join("0");j<0?E="-"+K+E.slice(1):E=K+E}}d.push(E)}}else d=No(u,function(te){return Ee(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||a||N)&&t.push(N)}return t}});var ar=S((Ks,on)=>{on.exports=Q;Q.Minimatch=D;var Ge=function(){try{return require("path")}catch{}}()||{sep:"/"};Q.sep=Ge.sep;var Tr=Q.GLOBSTAR=D.GLOBSTAR={},Bo=Ht(),en={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},Rr="[^/]",Lr=Rr+"*?",qo="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Uo="(?:(?!(?:\\/|^)\\.).)*?",rn=zo("().*{}+?[]^$\\!");function zo(r){return r.split("").reduce(function(e,t){return e[t]=!0,e},{})}var tn=/\/+/;Q.filter=Wo;function Wo(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,a){return e(i,o,ce(r,a))};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};D.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 D(e,t).match(r)}function D(r,e){if(!(this instanceof D))return new D(r,e);or(r),e||(e={}),r=r.trim(),!e.allowWindowsEscape&&Ge.sep!=="/"&&(r=r.split(Ge.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()}D.prototype.debug=function(){};D.prototype.make=$o;function $o(){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(tn)}),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}D.prototype.parseNegate=Vo;function Vo(){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 nn(r,e)};D.prototype.braceExpand=nn;function nn(r,e){return e||(this instanceof D?e=this.options:e={}),r=typeof r>"u"?this.pattern:r,or(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:Bo(r)}var Qo=1024*64,or=function(r){if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>Qo)throw new TypeError("pattern is too long")};D.prototype.parse=Jo;var ir={};function Jo(r,e){or(r);var t=this.options;if(r==="**")if(t.noglobstar)r="*";else return Tr;if(r==="")return"";var n="",i=!!t.nocase,o=!1,a=[],s=[],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+=Lr,i=!0;break;case"?":n+=Rr,i=!0;break;default:n+="\\"+u;break}h.debug("clearStateChar %j %j",u,n),u=!1}}for(var m=0,M=r.length,p;m<M&&(p=r.charAt(m));m++){if(this.debug("%s %s %s %j",r,m,n,p),o&&rn[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}a.push({type:u,start:m-1,reStart:n.length,open:en[u].open,close:en[u].close}),n+=u==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",u,n),u=!1;continue;case")":if(l||!a.length){n+="\\)";continue}v(),i=!0;var _=a.pop();n+=_.close,_.type==="!"&&s.push(_),_.reEnd=n.length;continue;case"|":if(l||!a.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 E=this.parse(j,ir);n=n.substr(0,c)+"\\["+E[0]+"\\]",i=i||E[1],l=!1;continue}i=!0,l=!1,n+=p;continue;default:v(),o?o=!1:rn[p]&&!(p==="^"&&l)&&(n+="\\"),n+=p}}for(l&&(j=r.substr(d+1),E=this.parse(j,ir),n=n.substr(0,c)+"\\["+E[0],i=i||E[1]),_=a.pop();_;_=a.pop()){var C=n.slice(_.reStart+_.open.length);this.debug("setting tail",n,_),C=C.replace(/((?:\\{2}){0,64})(\\?)\|/g,function(T,z,Pe){return Pe||(Pe="\\"),z+z+Pe+"|"}),this.debug(`tail=%j %s`,C,C,_,n);var K=_.type==="*"?Lr:_.type==="?"?Rr:"\\"+_.type;i=!0,n=n.slice(0,_.reStart)+K+"\\("+C}v(),o&&(n+="\\\\");var W=!1;switch(n.charAt(0)){case"[":case".":case"(":W=!0}for(var U=s.length-1;U>-1;U--){var N=s[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 Xo(r);var b=t.nocase?"i":"";try{var O=new RegExp("^"+n+"$",b)}catch{return new RegExp("$.")}return O._glob=r,O._src=n,O}Q.makeRe=function(r,e){return new D(r,e||{}).makeRe()};D.prototype.makeRe=Yo;function Yo(){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?Lr:e.dot?qo:Uo,n=e.nocase?"i":"",i=r.map(function(o){return o.map(function(a){return a===Tr?t:typeof a=="string"?Zo(a):a._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 D(e,t);return r=r.filter(function(i){return n.match(i)}),n.options.nonull&&!r.length&&r.push(e),r};D.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;Ge.sep!=="/"&&(e=e.split(Ge.sep).join("/")),e=e.split(tn),this.debug(this.pattern,"split",e);var i=this.set;this.debug(this.pattern,"set",i);var o,a;for(a=e.length-1;a>=0&&(o=e[a],!o);a--);for(a=0;a<i.length;a++){var s=i[a],u=e;n.matchBase&&s.length===1&&(u=[o]);var l=this.matchOne(u,s,t);if(l)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};D.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,a=r.length,s=e.length;i<a&&o<s;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===Tr){this.debug("GLOBSTAR",[e,u,l]);var c=i,d=o+1;if(d===s){for(this.debug("** at the end");i<a;i++)if(r[i]==="."||r[i]===".."||!n.dot&&r[i].charAt(0)===".")return!1;return!0}for(;c<a;){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,a,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===a))}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===a&&o===s)return!0;if(i===a)return t;if(o===s)return i===a-1&&r[i]==="";throw new Error("wtf?")};function Xo(r){return r.replace(/\\(.)/g,"$1")}function Zo(r){return r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var an=S((Hs,Nr)=>{typeof Object.create=="function"?Nr.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Nr.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 sn=S((eu,Ir)=>{try{if(jr=require("util"),typeof jr.inherits!="function")throw"";Ir.exports=jr.inherits}catch{Ir.exports=an()}var jr});var ur=S((ru,sr)=>{"use strict";function un(r){return r.charAt(0)==="/"}function ln(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)}sr.exports=process.platform==="win32"?ln:un;sr.exports.posix=un;sr.exports.win32=ln});var Pr=S(ne=>{ne.alphasort=hn;ne.alphasorti=fn;ne.setopts=ta;ne.ownProp=cn;ne.makeAbs=Dr;ne.finish=na;ne.mark=ia;ne.isIgnored=vn;ne.childrenIgnored=oa;function cn(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var be=require("path"),Ko=ar(),Ho=ur(),xr=Ko.Minimatch;function fn(r,e){return r.toLowerCase().localeCompare(e.toLowerCase())}function hn(r,e){return r.localeCompare(e)}function ea(r,e){r.ignore=e.ignore||[],Array.isArray(r.ignore)||(r.ignore=[r.ignore]),r.ignore.length&&(r.ignore=r.ignore.map(ra))}function ra(r){var e=null;if(r.slice(-3)==="/**"){var t=r.replace(/(\/\*\*)+$/,"");e=new xr(t,{dot:!0})}return{matcher:new xr(r,{dot:!0}),gmatcher:e}}function ta(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),ea(r,t),r.changedCwd=!1;var n=process.cwd();cn(t,"cwd")?(r.cwd=t.cwd,r.changedCwd=be.resolve(t.cwd)!==n):r.cwd=n,r.root=t.root||be.resolve(r.cwd,"/"),r.root=be.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 xr(e,t),r.options=r.minimatch.options}function na(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 a=r.minimatch.globSet[n];e?t.push(a):t[a]=!0}}else{var s=Object.keys(o);e?t.push.apply(t,s):s.forEach(function(u){t[u]=!0})}}if(e||(t=Object.keys(t)),r.nosort||(t=t.sort(r.nocase?fn:hn)),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!vn(r,u)})),r.found=t}function ia(r,e){var t=Dr(r,e),n=r.cache[t],i=e;if(n){var o=n==="DIR"||Array.isArray(n),a=e.slice(-1)==="/";if(o&&!a?i+="/":!o&&a&&(i=i.slice(0,-1)),i!==e){var s=Dr(r,i);r.statCache[s]=r.statCache[t],r.cache[s]=r.cache[t]}}return i}function Dr(r,e){var t=e;return e.charAt(0)==="/"?t=be.join(r.root,e):Ho(e)||e===""?t=e:r.changedCwd?t=be.resolve(r.cwd,e):t=be.resolve(e),t}function vn(r,e){return r.ignore.length?r.ignore.some(function(t){return t.matcher.match(e)||!!(t.gmatcher&&t.gmatcher.match(e))}):!1}function oa(r,e){return r.ignore.length?r.ignore.some(function(t){return!!(t.gmatcher&&t.gmatcher.match(e))}):!1}});var yn=S((uu,pn)=>{pn.exports=mn;mn.GlobSync=x;var Be=require("fs"),dn=ar(),nu=dn.Minimatch,iu=Br().Glob,ou=require("util"),Fr=require("path"),gn=require("assert"),lr=ur(),fe=Pr(),au=fe.alphasort,su=fe.alphasorti,aa=fe.setopts,Gr=fe.ownProp,sa=fe.childrenIgnored;function mn(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(aa(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(gn(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=Be.realpathSync(i,r.realpathCache);n[o]=!0}catch(a){if(a.syscall==="stat")n[r._makeAbs(i)]=!0;else throw a}})}fe.finish(this)};x.prototype._process=function(r,e,t){gn(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),a;i===null?a=".":((lr(i)||lr(r.join("/")))&&(!i||!lr(i))&&(i="/"+i),a=i);var s=this._makeAbs(a);if(!sa(this,a)){var u=o[0]===dn.GLOBSTAR;u?this._processGlobStar(i,a,s,o,e,t):this._processReaddir(i,a,s,o,e,t)}};x.prototype._processReaddir=function(r,e,t,n,i,o){var a=this._readdir(t,o);if(a){for(var s=n[0],u=!!this.minimatch.negate,l=s._glob,c=this.dot||l.charAt(0)===".",d=[],f=0;f<a.length;f++){var h=a[f];if(h.charAt(0)!=="."||c){var v;u&&!r?v=!h.match(s):v=h.match(s),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=Fr.join(this.root,h)),this.matches[i][h]=!0}return}n.shift();for(var f=0;f<m;f++){var h=d[f],M;r?M=[r,h]:M=[h],this._process(M.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=Be.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,Be.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 a=this._readdir(t,o);if(a){var s=n.slice(1),u=r?[r]:[],l=u.concat(s);this._process(l,i,!1);var c=a.length,d=this.symlinks[t];if(!(d&&o))for(var f=0;f<c;f++){var h=a[f];if(!(h.charAt(0)==="."&&!this.dot)){var v=u.concat(a[f],s);this._process(v,i,!0);var m=u.concat(a[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=Fr.join(this.root,r):(r=Fr.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 a=this.cache[e];if(Array.isArray(a)&&(a="DIR"),!t||a==="DIR")return a;if(t&&a==="FILE")return!1}var n,i=this.statCache[e];if(!i){var o;try{o=Be.lstatSync(e)}catch{return!1}if(o.isSymbolicLink())try{i=Be.statSync(e)}catch{i=o}else i=o}this.statCache[e]=i;var a=i.isDirectory()?"DIR":"FILE";return this.cache[e]=this.cache[e]||a,t&&a!=="DIR"?!1:a};x.prototype._mark=function(r){return fe.mark(this,r)};x.prototype._makeAbs=function(r){return fe.makeAbs(this,r)}});var qr=S((lu,Sn)=>{Sn.exports=_n;function _n(r,e){if(r&&e)return _n(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),a=n[n.length-1];return typeof o=="function"&&o!==a&&Object.keys(a).forEach(function(s){o[s]=a[s]}),o}}});var zr=S((cu,Ur)=>{var wn=qr();Ur.exports=wn(cr);Ur.exports.strict=wn(En);cr.proto=cr(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return cr(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return En(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 En(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 On=S((fu,bn)=>{var ua=qr(),qe=Object.create(null),la=zr();bn.exports=ua(ca);function ca(r,e){return qe[r]?(qe[r].push(e),null):(qe[r]=[e],fa(r))}function fa(r){return la(function e(){var t=qe[r],n=t.length,i=ha(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 ha(r){for(var e=r.length,t=[],n=0;n<e;n++)t[n]=r[n];return t}});var Br=S((mu,An)=>{An.exports=ge;var Ue=require("fs"),Cn=ar(),hu=Cn.Minimatch,va=sn(),da=require("events").EventEmitter,Wr=require("path"),$r=require("assert"),fr=ur(),Qr=yn(),oe=Pr(),vu=oe.alphasort,du=oe.alphasorti,ga=oe.setopts,Vr=oe.ownProp,Jr=On(),gu=require("util"),ma=oe.childrenIgnored,pa=oe.isIgnored,ya=zr();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 Qr(r,e)}return new k(r,e,t)}ge.sync=Qr;var _a=ge.GlobSync=Qr.GlobSync;ge.glob=ge;function Sa(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=Sa({},e);t.noprocess=!0;var n=new k(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=k;va(k,da);function k(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 _a(r,e)}if(!(this instanceof k))return new k(r,e,t);ga(this,r,e),this._didRealPath=!1;var i=this.minimatch.set.length;this.matches=new Array(i),typeof t=="function"&&(t=ya(t),this.on("error",t),this.on("end",function(s){t(null,s)}));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 a();for(var o=0;o<i;o++)this._process(this.minimatch.set[o],o,!1,a);function a(){--n._processing,n._processing<=0&&n._finish()}}k.prototype._finish=function(){if($r(this instanceof k),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();oe.finish(this),this.emit("end",this.found)}};k.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()}};k.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 a=this.matches[r]=Object.create(null);n.forEach(function(s,u){s=i._makeAbs(s),Ue.realpath(s,i.realpathCache,function(l,c){l?l.syscall==="stat"?a[s]=!0:i.emit("error",l):a[c]=!0,--o===0&&(i.matches[r]=a,e())})})};k.prototype._mark=function(r){return oe.mark(this,r)};k.prototype._makeAbs=function(r){return oe.makeAbs(this,r)};k.prototype.abort=function(){this.aborted=!0,this.emit("abort")};k.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))};k.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])}}}};k.prototype._process=function(r,e,t,n){if($r(this instanceof k),$r(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 a=r.slice(i),s;o===null?s=".":((fr(o)||fr(r.join("/")))&&(!o||!fr(o))&&(o="/"+o),s=o);var u=this._makeAbs(s);if(ma(this,s))return n();var l=a[0]===Cn.GLOBSTAR;l?this._processGlobStar(o,s,u,a,e,t,n):this._processReaddir(o,s,u,a,e,t,n)}};k.prototype._processReaddir=function(r,e,t,n,i,o,a){var s=this;this._readdir(t,o,function(u,l){return s._processReaddir2(r,e,t,n,i,o,l,a)})};k.prototype._processReaddir2=function(r,e,t,n,i,o,a,s){if(!a)return s();for(var u=n[0],l=!!this.minimatch.negate,c=u._glob,d=this.dot||c.charAt(0)===".",f=[],h=0;h<a.length;h++){var v=a[h];if(v.charAt(0)!=="."||d){var m;l&&!r?m=!v.match(u):m=v.match(u),m&&f.push(v)}}var M=f.length;if(M===0)return s();if(n.length===1&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(var h=0;h<M;h++){var v=f[h];r&&(r!=="/"?v=r+"/"+v:v=r+v),v.charAt(0)==="/"&&!this.nomount&&(v=Wr.join(this.root,v)),this._emitMatch(i,v)}return s()}n.shift();for(var h=0;h<M;h++){var v=f[h],p;r&&(r!=="/"?v=r+"/"+v:v=r+v),this._process([v].concat(n),i,o,s)}s()};k.prototype._emitMatch=function(r,e){if(!this.aborted&&!this.matches[r][e]&&!pa(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)}};k.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=Jr(t,o);i&&Ue.lstat(r,i);function o(a,s){if(a)return e();var u=s.isSymbolicLink();n.symlinks[r]=u,!u&&!s.isDirectory()?(n.cache[r]="FILE",e()):n._readdir(r,!1,e)}};k.prototype._readdir=function(r,e,t){if(!this.aborted&&(t=Jr("readdir\0"+r+"\0"+e,t),!!t)){if(e&&!Vr(this.symlinks,r))return this._readdirInGlobStar(r,t);if(Vr(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,wa(this,r,t))}};function wa(r,e,t){return function(n,i){n?r._readdirError(e,n,t):r._readdirEntries(e,i,t)}}k.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)}};k.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()}};k.prototype._processGlobStar=function(r,e,t,n,i,o,a){var s=this;this._readdir(t,o,function(u,l){s._processGlobStar2(r,e,t,n,i,o,l,a)})};k.prototype._processGlobStar2=function(r,e,t,n,i,o,a,s){if(!a)return s();var u=n.slice(1),l=r?[r]:[],c=l.concat(u);this._process(c,i,!1,s);var d=this.symlinks[t],f=a.length;if(d&&o)return s();for(var h=0;h<f;h++){var v=a[h];if(!(v.charAt(0)==="."&&!this.dot)){var m=l.concat(a[h],u);this._process(m,i,!0,s);var M=l.concat(a[h],n);this._process(M,i,!0,s)}}s()};k.prototype._processSimple=function(r,e,t){var n=this;this._stat(r,function(i,o){n._processSimple2(r,e,i,o,t)})};k.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=Wr.join(this.root,r):(r=Wr.resolve(this.root,r),o&&(r+="/"))}process.platform==="win32"&&(r=r.replace(/\\/g,"/")),this._emitMatch(e,r),i()};k.prototype._stat=function(r,e){var t=this._makeAbs(r),n=r.slice(-1)==="/";if(r.length>this.maxLength)return e();if(!this.stat&&Vr(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,a=this.statCache[t];if(a!==void 0){if(a===!1)return e(null,a);var s=a.isDirectory()?"DIR":"FILE";return n&&s==="FILE"?e():e(null,s,a)}var u=this,l=Jr("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)}};k.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 a=n.isDirectory()?"DIR":"FILE";return this.cache[e]=this.cache[e]||a,o&&a!=="DIR"?i():i(null,a,n)}});var Nn=S((pu,Tn)=>{Tn.exports=Kr;Kr.sync=Ln;var A=require("assert"),kn=require("path"),dr=require("fs"),gr=Br(),Mn={nosort:!0,nocomment:!0,nonegate:!0,silent:!0},Yr=0,Zr=process.platform==="win32";function Rn(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 Kr(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"),Rn(e);var n=0,i=null,o=0;if(e.disableGlob||!gr.hasMagic(r))return s(null,[r]);dr.lstat(r,function(u,l){if(!u)return s(null,[r]);gr(r,Mn,s)});function a(u){i=i||u,--o===0&&t(i)}function s(u,l){if(u)return t(u);if(o=l.length,o===0)return t();l.forEach(function(c){Xr(c,e,function d(f){if(f){if(Zr&&(f.code==="EBUSY"||f.code==="ENOTEMPTY"||f.code==="EPERM")&&n<e.maxBusyTries){n++;var h=n*100;return setTimeout(function(){Xr(c,e,d)},h)}if(f.code==="EMFILE"&&Yr<e.emfileWait)return setTimeout(function(){Xr(c,e,d)},Yr++);f.code==="ENOENT"&&(f=null)}Yr=0,a(f)})})}}function Xr(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 Zr?Ea(r,e,o,t):hr(r,e,o,t);if(o.code==="EISDIR")return hr(r,e,o,t)}return t(o)})})}function Ea(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,a){o?n(o.code==="ENOENT"?null:t):a.isDirectory()?hr(r,e,t,n):e.unlink(r,n)})})}function ba(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")?Oa(r,e,n):i&&i.code==="ENOTDIR"?n(t):n(i)})}function Oa(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 a;i.forEach(function(s){Kr(kn.join(r,s),e,function(u){if(!a){if(u)return t(a=u);--o===0&&e.rmdir(r,t)}})})})}function Ln(r,e){e=e||{},Rn(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,Mn)}if(t.length)for(var n=0;n<t.length;n++){var r=t[n];try{var i=e.lstatSync(r)}catch(a){if(a.code==="ENOENT")return}try{i&&i.isDirectory()?vr(r,e,null):e.unlinkSync(r)}catch(a){if(a.code==="ENOENT")return;if(a.code==="EPERM")return Zr?ba(r,e,a):vr(r,e,a);if(a.code!=="EISDIR")throw a;vr(r,e,a)}}}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")&&Ca(r,e)}}function Ca(r,e){A(r),A(e),e.readdirSync(r).forEach(function(t){Ln(kn.join(r,t),e)}),e.rmdirSync(r,e)}});var Dn=S((yu,xn)=>{var ze=require("path"),jn=require("fs"),In=parseInt("0777",8);xn.exports=Oe.mkdirp=Oe.mkdirP=Oe;function Oe(r,e,t,n){typeof e=="function"?(t=e,e={}):(!e||typeof e!="object")&&(e={mode:e});var i=e.mode,o=e.fs||jn;i===void 0&&(i=In),n||(n=null);var a=t||function(){};r=ze.resolve(r),o.mkdir(r,i,function(s){if(!s)return n=n||r,a(null,n);switch(s.code){case"ENOENT":if(ze.dirname(r)===r)return a(s);Oe(ze.dirname(r),e,function(u,l){u?a(u,l):Oe(r,e,a,l)});break;default:o.stat(r,function(u,l){u||!l.isDirectory()?a(s,n):a(null,n)});break}})}Oe.sync=function r(e,t,n){(!t||typeof t!="object")&&(t={mode:t});var i=t.mode,o=t.fs||jn;i===void 0&&(i=In),n||(n=null),e=ze.resolve(e);try{o.mkdirSync(e,i),n=n||e}catch(s){switch(s.code){case"ENOENT":n=r(ze.dirname(e),t,n),r(e,t,n);break;default:var a;try{a=o.statSync(e)}catch{throw s}if(!a.isDirectory())throw s;break}}return n}});var qn=S((_u,Bn)=>{var Ce=require("fs"),Aa=Ft().ncp,ka=require("path"),Pn=Nn(),Ma=Dn();Bn.exports=Ra;function Ra(r,e,t,n){typeof t=="function"&&(n=t,t={});var i=!!t.mkdirp,o=t.clobber!==!1,a=t.limit||16;i?s():u();function s(){Ma(ka.dirname(e),function(l){if(l)return n(l);u()})}function u(){o?Ce.rename(r,e,function(l){if(!l)return n();if(l.code!=="EXDEV")return n(l);Fn(r,e,o,a,n)}):Ce.link(r,e,function(l){if(l){if(l.code==="EXDEV"){Fn(r,e,o,a,n);return}if(l.code==="EISDIR"||l.code==="EPERM"){Gn(r,e,o,a,n);return}n(l);return}Ce.unlink(r,n)})}}function Fn(r,e,t,n,i){var o=t?"w":"wx",a=Ce.createReadStream(r),s=Ce.createWriteStream(e,{flags:o});a.on("error",function(l){a.destroy(),s.destroy(),s.removeListener("close",u),l.code==="EISDIR"||l.code==="EPERM"?Gn(r,e,t,n,i):i(l)}),s.on("error",function(l){a.destroy(),s.destroy(),s.removeListener("close",u),i(l)}),s.once("close",u),a.pipe(s);function u(){Ce.unlink(r,i)}}function Gn(r,e,t,n,i){var o={stopOnErr:!0,clobber:!1,limit:n};t?Pn(e,{disableGlob:!0},function(s){if(s)return i(s);a()}):a();function a(){Aa(r,e,o,function(s){if(s)return i(s[0]);Pn(r,{disableGlob:!0},i)})}}});var zn=S(Hr=>{var Un="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");Hr.encode=function(r){if(0<=r&&r<Un.length)return Un[r];throw new TypeError("Must be between 0 and 63: "+r)};Hr.decode=function(r){var e=65,t=90,n=97,i=122,o=48,a=57,s=43,u=47,l=26,c=52;return e<=r&&r<=t?r-e:n<=r&&r<=i?r-n+l:o<=r&&r<=a?r-o+c:r==s?62:r==u?63:-1}});var tt=S(rt=>{var Wn=zn(),et=5,$n=1<<et,Vn=$n-1,Qn=$n;function La(r){return r<0?(-r<<1)+1:(r<<1)+0}function Ta(r){var e=(r&1)===1,t=r>>1;return e?-t:t}rt.encode=function(e){var t="",n,i=La(e);do n=i&Vn,i>>>=et,i>0&&(n|=Qn),t+=Wn.encode(n);while(i>0);return t};rt.decode=function(e,t,n){var i=e.length,o=0,a=0,s,u;do{if(t>=i)throw new Error("Expected more digits in base 64 VLQ value.");if(u=Wn.decode(e.charCodeAt(t++)),u===-1)throw new Error("Invalid base64 digit: "+e.charAt(t-1));s=!!(u&Qn),u&=Vn,o=o+(u<<a),a+=et}while(s);n.value=Ta(o),n.rest=t}});var Me=S(B=>{function Na(r,e,t){if(e in r)return r[e];if(arguments.length===3)return t;throw new Error('"'+e+'" is a required argument.')}B.getArg=Na;var Jn=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,ja=/^data:.+\,.+$/;function We(r){var e=r.match(Jn);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}B.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}B.urlGenerate=Ae;function nt(r){var e=r,t=We(r);if(t){if(!t.path)return r;e=t.path}for(var n=B.isAbsolute(e),i=e.split(/\/+/),o,a=0,s=i.length-1;s>=0;s--)o=i[s],o==="."?i.splice(s,1):o===".."?a++:a>0&&(o===""?(i.splice(s+1,a),a=0):(i.splice(s,2),a--));return e=i.join("/"),e===""&&(e=n?"/":"."),t?(t.path=e,Ae(t)):e}B.normalize=nt;function Yn(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(ja))return e;if(n&&!n.host&&!n.path)return n.host=e,Ae(n);var i=e.charAt(0)==="/"?e:nt(r.replace(/\/+$/,"")+"/"+e);return n?(n.path=i,Ae(n)):i}B.join=Yn;B.isAbsolute=function(r){return r.charAt(0)==="/"||Jn.test(r)};function Ia(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)}B.relative=Ia;var Xn=function(){var r=Object.create(null);return!("__proto__"in r)}();function Zn(r){return r}function xa(r){return Kn(r)?"$"+r:r}B.toSetString=Xn?Zn:xa;function Da(r){return Kn(r)?r.slice(1):r}B.fromSetString=Xn?Zn:Da;function Kn(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 Pa(r,e,t){var n=ke(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:ke(r.name,e.name)}B.compareByOriginalPositions=Pa;function Fa(r,e,t){var n=r.generatedLine-e.generatedLine;return n!==0||(n=r.generatedColumn-e.generatedColumn,n!==0||t)||(n=ke(r.source,e.source),n!==0)||(n=r.originalLine-e.originalLine,n!==0)||(n=r.originalColumn-e.originalColumn,n!==0)?n:ke(r.name,e.name)}B.compareByGeneratedPositionsDeflated=Fa;function ke(r,e){return r===e?0:r===null?1:e===null?-1:r>e?1:-1}function Ga(r,e){var t=r.generatedLine-e.generatedLine;return t!==0||(t=r.generatedColumn-e.generatedColumn,t!==0)||(t=ke(r.source,e.source),t!==0)||(t=r.originalLine-e.originalLine,t!==0)||(t=r.originalColumn-e.originalColumn,t!==0)?t:ke(r.name,e.name)}B.compareByGeneratedPositionsInflated=Ga;function Ba(r){return JSON.parse(r.replace(/^\)]}'[^\n]*\n/,""))}B.parseSourceMapInput=Ba;function qa(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=Yn(Ae(n),e)}return nt(e)}B.computeSourceURL=qa});var at=S(Hn=>{var it=Me(),ot=Object.prototype.hasOwnProperty,me=typeof Map<"u";function ae(){this._array=[],this._set=me?new Map:Object.create(null)}ae.fromArray=function(e,t){for(var n=new ae,i=0,o=e.length;i<o;i++)n.add(e[i],t);return n};ae.prototype.size=function(){return me?this._set.size:Object.getOwnPropertyNames(this._set).length};ae.prototype.add=function(e,t){var n=me?e:it.toSetString(e),i=me?this.has(e):ot.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)};ae.prototype.has=function(e){if(me)return this._set.has(e);var t=it.toSetString(e);return ot.call(this._set,t)};ae.prototype.indexOf=function(e){if(me){var t=this._set.get(e);if(t>=0)return t}else{var n=it.toSetString(e);if(ot.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')};ae.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)};ae.prototype.toArray=function(){return this._array.slice()};Hn.ArraySet=ae});var ti=S(ri=>{var ei=Me();function Ua(r,e){var t=r.generatedLine,n=e.generatedLine,i=r.generatedColumn,o=e.generatedColumn;return n>t||n==t&&o>=i||ei.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){Ua(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(ei.compareByGeneratedPositionsInflated),this._sorted=!0),this._array};ri.MappingList=mr});var st=S(ni=>{var $e=tt(),I=Me(),pr=at().ArraySet,za=ti().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 za,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 a=e.sourceContentFor(i);a!=null&&n.setSourceContent(i,a)}),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 a=new pr,s=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&&!a.has(c)&&a.add(c);var d=u.name;d!=null&&!s.has(d)&&s.add(d)},this),this._sources=a,this._names=s,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,a=0,s="",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-a),a=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)),s+=u}return s};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())};ni.SourceMapGenerator=Z});var ii=S(pe=>{pe.GREATEST_LOWER_BOUND=1;pe.LEAST_UPPER_BOUND=2;function ut(r,e,t,n,i,o){var a=Math.floor((e-r)/2)+r,s=i(t,n[a],!0);return s===0?a:s>0?e-a>1?ut(a,e,t,n,i,o):o==pe.LEAST_UPPER_BOUND?e<n.length?e:-1:a:a-r>1?ut(r,a,t,n,i,o):o==pe.LEAST_UPPER_BOUND?a:r<0?-1:r}pe.search=function(e,t,n,i){if(t.length===0)return-1;var o=ut(-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 ai=S(oi=>{function lt(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function Wa(r,e){return Math.round(r+Math.random()*(e-r))}function ct(r,e,t,n){if(t<n){var i=Wa(t,n),o=t-1;lt(r,i,n);for(var a=r[n],s=t;s<n;s++)e(r[s],a)<=0&&(o+=1,lt(r,o,s));lt(r,o+1,s);var u=o+1;ct(r,e,t,u-1),ct(r,e,u+1,n)}}oi.quickSort=function(r,e){ct(r,e,0,r.length-1)}});var ui=S(yr=>{var g=Me(),ft=ii(),Re=at().ArraySet,$a=tt(),Ve=ai().quickSort;function R(r,e){var t=r;return typeof r=="string"&&(t=g.parseSourceMapInput(r)),t.sections!=null?new re(t,e):new P(t,e)}R.fromSourceMap=function(r,e){return P.fromSourceMap(r,e)};R.prototype._version=3;R.prototype.__generatedMappings=null;Object.defineProperty(R.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}});R.prototype.__originalMappings=null;Object.defineProperty(R.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}});R.prototype._charIsMappingSeparator=function(e,t){var n=e.charAt(t);return n===";"||n===","};R.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement