chayns-toolkit 2.1.0-12 → 2.1.0-13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +2 -2
- package/package.json +1 -1
package/lib/cli.js
CHANGED
|
@@ -33,7 +33,7 @@ attempted value: ${s}
|
|
|
33
33
|
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var my=p((YL,dy)=>{"use strict";var gF=Ln(),{MAX_LENGTH:fy,CHAR_BACKSLASH:no,CHAR_BACKTICK:_F,CHAR_COMMA:yF,CHAR_DOT:bF,CHAR_LEFT_PARENTHESES:vF,CHAR_RIGHT_PARENTHESES:xF,CHAR_LEFT_CURLY_BRACE:SF,CHAR_RIGHT_CURLY_BRACE:wF,CHAR_LEFT_SQUARE_BRACKET:py,CHAR_RIGHT_SQUARE_BRACKET:hy,CHAR_DOUBLE_QUOTE:EF,CHAR_SINGLE_QUOTE:AF,CHAR_NO_BREAK_SPACE:CF,CHAR_ZERO_WIDTH_NOBREAK_SPACE:OF}=cy(),PF=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},n=typeof r.maxLength=="number"?Math.min(fy,r.maxLength):fy;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);let i={type:"root",input:t,nodes:[]},s=[i],o=i,a=i,u=0,l=t.length,c=0,h=0,f,_={},d=()=>t[c++],m=x=>{if(x.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&x.type==="text"){a.value+=x.value;return}return o.nodes.push(x),x.parent=o,x.prev=a,a=x,x};for(m({type:"bos"});c<l;)if(o=s[s.length-1],f=d(),!(f===OF||f===CF)){if(f===no){m({type:"text",value:(e.keepEscaping?f:"")+d()});continue}if(f===hy){m({type:"text",value:"\\"+f});continue}if(f===py){u++;let x=!0,g;for(;c<l&&(g=d());){if(f+=g,g===py){u++;continue}if(g===no){f+=d();continue}if(g===hy&&(u--,u===0))break}m({type:"text",value:f});continue}if(f===vF){o=m({type:"paren",nodes:[]}),s.push(o),m({type:"text",value:f});continue}if(f===xF){if(o.type!=="paren"){m({type:"text",value:f});continue}o=s.pop(),m({type:"text",value:f}),o=s[s.length-1];continue}if(f===EF||f===AF||f===_F){let x=f,g;for(e.keepQuotes!==!0&&(f="");c<l&&(g=d());){if(g===no){f+=g+d();continue}if(g===x){e.keepQuotes===!0&&(f+=g);break}f+=g}m({type:"text",value:f});continue}if(f===SF){h++;let x=a.value&&a.value.slice(-1)==="$"||o.dollar===!0;o=m({type:"brace",open:!0,close:!1,dollar:x,depth:h,commas:0,ranges:0,nodes:[]}),s.push(o),m({type:"open",value:f});continue}if(f===wF){if(o.type!=="brace"){m({type:"text",value:f});continue}let x="close";o=s.pop(),o.close=!0,m({type:x,value:f}),h--,o=s[s.length-1];continue}if(f===yF&&h>0){if(o.ranges>0){o.ranges=0;let x=o.nodes.shift();o.nodes=[x,{type:"text",value:gF(o)}]}m({type:"comma",value:f}),o.commas++;continue}if(f===bF&&h>0&&o.commas===0){let x=o.nodes;if(h===0||x.length===0){m({type:"text",value:f});continue}if(a.type==="dot"){if(o.range=[],a.value+=f,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){x.pop();let g=x[x.length-1];g.value+=a.value+f,a=g,o.ranges--;continue}m({type:"dot",value:f});continue}m({type:"text",value:f})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(w=>{w.nodes||(w.type==="open"&&(w.isOpen=!0),w.type==="close"&&(w.isClose=!0),w.nodes||(w.type="text"),w.invalid=!0)});let x=s[s.length-1],g=x.nodes.indexOf(o);x.nodes.splice(g,1,...o.nodes)}while(s.length>0);return m({type:"eos"}),i};dy.exports=PF});var yy=p((JL,_y)=>{"use strict";var gy=Ln(),RF=sy(),TF=uy(),FF=my(),ce=(t,e={})=>{let r=[];if(Array.isArray(t))for(let n of t){let i=ce.create(n,e);Array.isArray(i)?r.push(...i):r.push(i)}else r=[].concat(ce.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};ce.parse=(t,e={})=>FF(t,e);ce.stringify=(t,e={})=>gy(typeof t=="string"?ce.parse(t,e):t,e);ce.compile=(t,e={})=>(typeof t=="string"&&(t=ce.parse(t,e)),RF(t,e));ce.expand=(t,e={})=>{typeof t=="string"&&(t=ce.parse(t,e));let r=TF(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};ce.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?ce.compile(t,e):ce.expand(t,e);_y.exports=ce});var Or=p((XL,wy)=>{"use strict";var qF=require("path"),Ee="\\\\/",by=`[^${Ee}]`,ke="\\.",kF="\\+",MF="\\?",Nn="\\/",DF="(?=.)",vy="[^/]",io=`(?:${Nn}|$)`,xy=`(?:^|${Nn})`,so=`${ke}{1,2}${io}`,jF=`(?!${ke})`,$F=`(?!${xy}${so})`,LF=`(?!${ke}{0,1}${io})`,IF=`(?!${so})`,NF=`[^.${Nn}]`,HF=`${vy}*?`,Sy={DOT_LITERAL:ke,PLUS_LITERAL:kF,QMARK_LITERAL:MF,SLASH_LITERAL:Nn,ONE_CHAR:DF,QMARK:vy,END_ANCHOR:io,DOTS_SLASH:so,NO_DOT:jF,NO_DOTS:$F,NO_DOT_SLASH:LF,NO_DOTS_SLASH:IF,QMARK_NO_DOT:NF,STAR:HF,START_ANCHOR:xy},BF=te(B({},Sy),{SLASH_LITERAL:`[${Ee}]`,QMARK:by,STAR:`${by}*?`,DOTS_SLASH:`${ke}{1,2}(?:[${Ee}]|$)`,NO_DOT:`(?!${ke})`,NO_DOTS:`(?!(?:^|[${Ee}])${ke}{1,2}(?:[${Ee}]|$))`,NO_DOT_SLASH:`(?!${ke}{0,1}(?:[${Ee}]|$))`,NO_DOTS_SLASH:`(?!${ke}{1,2}(?:[${Ee}]|$))`,QMARK_NO_DOT:`[^.${Ee}]`,START_ANCHOR:`(?:^|[${Ee}])`,END_ANCHOR:`(?:[${Ee}]|$)`}),VF={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};wy.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:VF,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:qF.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?BF:Sy}}});var Pr=p(ue=>{"use strict";var GF=require("path"),UF=process.platform==="win32",{REGEX_BACKSLASH:WF,REGEX_REMOVE_BACKSLASH:zF,REGEX_SPECIAL_CHARS:KF,REGEX_SPECIAL_CHARS_GLOBAL:YF}=Or();ue.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);ue.hasRegexChars=t=>KF.test(t);ue.isRegexChar=t=>t.length===1&&ue.hasRegexChars(t);ue.escapeRegex=t=>t.replace(YF,"\\$1");ue.toPosixSlashes=t=>t.replace(WF,"/");ue.removeBackslashes=t=>t.replace(zF,e=>e==="\\"?"":e);ue.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};ue.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:UF===!0||GF.sep==="\\";ue.escapeLast=(t,e,r)=>{let n=t.lastIndexOf(e,r);return n===-1?t:t[n-1]==="\\"?ue.escapeLast(t,e,n-1):`${t.slice(0,n)}\\${t.slice(n)}`};ue.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};ue.wrapOutput=(t,e={},r={})=>{let n=r.contains?"":"^",i=r.contains?"":"$",s=`${n}(?:${t})${i}`;return e.negated===!0&&(s=`(?:^(?!${s}).*$)`),s}});var Fy=p((QL,Ty)=>{"use strict";var Ey=Pr(),{CHAR_ASTERISK:oo,CHAR_AT:JF,CHAR_BACKWARD_SLASH:Rr,CHAR_COMMA:XF,CHAR_DOT:ao,CHAR_EXCLAMATION_MARK:uo,CHAR_FORWARD_SLASH:Ay,CHAR_LEFT_CURLY_BRACE:lo,CHAR_LEFT_PARENTHESES:co,CHAR_LEFT_SQUARE_BRACKET:ZF,CHAR_PLUS:QF,CHAR_QUESTION_MARK:Cy,CHAR_RIGHT_CURLY_BRACE:eq,CHAR_RIGHT_PARENTHESES:Oy,CHAR_RIGHT_SQUARE_BRACKET:tq}=Or(),Py=t=>t===Ay||t===Rr,Ry=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},rq=(t,e)=>{let r=e||{},n=t.length-1,i=r.parts===!0||r.scanToEnd===!0,s=[],o=[],a=[],u=t,l=-1,c=0,h=0,f=!1,_=!1,d=!1,m=!1,x=!1,g=!1,w=!1,A=!1,M=!1,C=!1,T=0,F,P,I={value:"",depth:0,isGlob:!1},U=()=>l>=n,v=()=>u.charCodeAt(l+1),N=()=>(F=P,u.charCodeAt(++l));for(;l<n;){P=N();let oe;if(P===Rr){w=I.backslashes=!0,P=N(),P===lo&&(g=!0);continue}if(g===!0||P===lo){for(T++;U()!==!0&&(P=N());){if(P===Rr){w=I.backslashes=!0,N();continue}if(P===lo){T++;continue}if(g!==!0&&P===ao&&(P=N())===ao){if(f=I.isBrace=!0,d=I.isGlob=!0,C=!0,i===!0)continue;break}if(g!==!0&&P===XF){if(f=I.isBrace=!0,d=I.isGlob=!0,C=!0,i===!0)continue;break}if(P===eq&&(T--,T===0)){g=!1,f=I.isBrace=!0,C=!0;break}}if(i===!0)continue;break}if(P===Ay){if(s.push(l),o.push(I),I={value:"",depth:0,isGlob:!1},C===!0)continue;if(F===ao&&l===c+1){c+=2;continue}h=l+1;continue}if(r.noext!==!0&&(P===QF||P===JF||P===oo||P===Cy||P===uo)===!0&&v()===co){if(d=I.isGlob=!0,m=I.isExtglob=!0,C=!0,P===uo&&l===c&&(M=!0),i===!0){for(;U()!==!0&&(P=N());){if(P===Rr){w=I.backslashes=!0,P=N();continue}if(P===Oy){d=I.isGlob=!0,C=!0;break}}continue}break}if(P===oo){if(F===oo&&(x=I.isGlobstar=!0),d=I.isGlob=!0,C=!0,i===!0)continue;break}if(P===Cy){if(d=I.isGlob=!0,C=!0,i===!0)continue;break}if(P===ZF){for(;U()!==!0&&(oe=N());){if(oe===Rr){w=I.backslashes=!0,N();continue}if(oe===tq){_=I.isBracket=!0,d=I.isGlob=!0,C=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&P===uo&&l===c){A=I.negated=!0,c++;continue}if(r.noparen!==!0&&P===co){if(d=I.isGlob=!0,i===!0){for(;U()!==!0&&(P=N());){if(P===co){w=I.backslashes=!0,P=N();continue}if(P===Oy){C=!0;break}}continue}break}if(d===!0){if(C=!0,i===!0)continue;break}}r.noext===!0&&(m=!1,d=!1);let $=u,Q="",y="";c>0&&(Q=u.slice(0,c),u=u.slice(c),h-=c),$&&d===!0&&h>0?($=u.slice(0,h),y=u.slice(h)):d===!0?($="",y=u):$=u,$&&$!==""&&$!=="/"&&$!==u&&Py($.charCodeAt($.length-1))&&($=$.slice(0,-1)),r.unescape===!0&&(y&&(y=Ey.removeBackslashes(y)),$&&w===!0&&($=Ey.removeBackslashes($)));let b={prefix:Q,input:t,start:c,base:$,glob:y,isBrace:f,isBracket:_,isGlob:d,isExtglob:m,isGlobstar:x,negated:A,negatedExtglob:M};if(r.tokens===!0&&(b.maxDepth=0,Py(P)||o.push(I),b.tokens=o),r.parts===!0||r.tokens===!0){let oe;for(let V=0;V<s.length;V++){let _e=oe?oe+1:c,ye=s[V],le=t.slice(_e,ye);r.tokens&&(V===0&&c!==0?(o[V].isPrefix=!0,o[V].value=Q):o[V].value=le,Ry(o[V]),b.maxDepth+=o[V].depth),(V!==0||le!=="")&&a.push(le),oe=ye}if(oe&&oe+1<t.length){let V=t.slice(oe+1);a.push(V),r.tokens&&(o[o.length-1].value=V,Ry(o[o.length-1]),b.maxDepth+=o[o.length-1].depth)}b.slashes=s,b.parts=a}return b};Ty.exports=rq});var Dy=p((eI,My)=>{"use strict";var Hn=Or(),fe=Pr(),{MAX_LENGTH:Bn,POSIX_REGEX_SOURCE:nq,REGEX_NON_SPECIAL_CHARS:iq,REGEX_SPECIAL_CHARS_BACKREF:sq,REPLACEMENTS:qy}=Hn,oq=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>fe.escapeRegex(i)).join("..")}return r},$t=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,ky=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=qy[t]||t;let r=B({},e),n=typeof r.maxLength=="number"?Math.min(Bn,r.maxLength):Bn,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);let s={type:"bos",value:"",output:r.prepend||""},o=[s],a=r.capture?"":"?:",u=fe.isWindows(e),l=Hn.globChars(u),c=Hn.extglobChars(l),{DOT_LITERAL:h,PLUS_LITERAL:f,SLASH_LITERAL:_,ONE_CHAR:d,DOTS_SLASH:m,NO_DOT:x,NO_DOT_SLASH:g,NO_DOTS_SLASH:w,QMARK:A,QMARK_NO_DOT:M,STAR:C,START_ANCHOR:T}=l,F=E=>`(${a}(?:(?!${T}${E.dot?m:h}).)*?)`,P=r.dot?"":x,I=r.dot?A:M,U=r.bash===!0?F(r):C;r.capture&&(U=`(${U})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let v={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=fe.removePrefix(t,v),i=t.length;let N=[],$=[],Q=[],y=s,b,oe=()=>v.index===i-1,V=v.peek=(E=1)=>t[v.index+E],_e=v.advance=()=>t[++v.index]||"",ye=()=>t.slice(v.index+1),le=(E="",z=0)=>{v.consumed+=E,v.index+=z},Fr=E=>{v.output+=E.output!=null?E.output:E.value,le(E.value)},Hb=()=>{let E=1;for(;V()==="!"&&(V(2)!=="("||V(3)==="?");)_e(),v.start++,E++;return E%2==0?!1:(v.negated=!0,v.start++,!0)},qr=E=>{v[E]++,Q.push(E)},We=E=>{v[E]--,Q.pop()},H=E=>{if(y.type==="globstar"){let z=v.braces>0&&(E.type==="comma"||E.type==="brace"),S=E.extglob===!0||N.length&&(E.type==="pipe"||E.type==="paren");E.type!=="slash"&&E.type!=="paren"&&!z&&!S&&(v.output=v.output.slice(0,-y.output.length),y.type="star",y.value="*",y.output=U,v.output+=y.output)}if(N.length&&E.type!=="paren"&&(N[N.length-1].inner+=E.value),(E.value||E.output)&&Fr(E),y&&y.type==="text"&&E.type==="text"){y.value+=E.value,y.output=(y.output||"")+E.value;return}E.prev=y,o.push(E),y=E},kr=(E,z)=>{let S=te(B({},c[z]),{conditions:1,inner:""});S.prev=y,S.parens=v.parens,S.output=v.output;let L=(r.capture?"(":"")+S.open;qr("parens"),H({type:E,value:z,output:v.output?"":d}),H({type:"paren",extglob:!0,value:_e(),output:L}),N.push(S)},Bb=E=>{let z=E.close+(r.capture?")":""),S;if(E.type==="negate"){let L=U;E.inner&&E.inner.length>1&&E.inner.includes("/")&&(L=F(r)),(L!==U||oe()||/^\)+$/.test(ye()))&&(z=E.close=`)$))${L}`),E.inner.includes("*")&&(S=ye())&&/^\.[^\\/.]+$/.test(S)&&(z=E.close=`)${S})${L})`),E.prev.type==="bos"&&(v.negatedExtglob=!0)}H({type:"paren",extglob:!0,value:b,output:z}),We("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let E=!1,z=t.replace(sq,(S,L,X,ae,ee,ui)=>ae==="\\"?(E=!0,S):ae==="?"?L?L+ae+(ee?A.repeat(ee.length):""):ui===0?I+(ee?A.repeat(ee.length):""):A.repeat(X.length):ae==="."?h.repeat(X.length):ae==="*"?L?L+ae+(ee?U:""):U:L?S:`\\${S}`);return E===!0&&(r.unescape===!0?z=z.replace(/\\/g,""):z=z.replace(/\\+/g,S=>S.length%2==0?"\\\\":S?"\\":"")),z===t&&r.contains===!0?(v.output=t,v):(v.output=fe.wrapOutput(z,v,e),v)}for(;!oe();){if(b=_e(),b==="\0")continue;if(b==="\\"){let S=V();if(S==="/"&&r.bash!==!0||S==="."||S===";")continue;if(!S){b+="\\",H({type:"text",value:b});continue}let L=/^\\+/.exec(ye()),X=0;if(L&&L[0].length>2&&(X=L[0].length,v.index+=X,X%2!=0&&(b+="\\")),r.unescape===!0?b=_e():b+=_e(),v.brackets===0){H({type:"text",value:b});continue}}if(v.brackets>0&&(b!=="]"||y.value==="["||y.value==="[^")){if(r.posix!==!1&&b===":"){let S=y.value.slice(1);if(S.includes("[")&&(y.posix=!0,S.includes(":"))){let L=y.value.lastIndexOf("["),X=y.value.slice(0,L),ae=y.value.slice(L+2),ee=nq[ae];if(ee){y.value=X+ee,v.backtrack=!0,_e(),!s.output&&o.indexOf(y)===1&&(s.output=d);continue}}}(b==="["&&V()!==":"||b==="-"&&V()==="]")&&(b=`\\${b}`),b==="]"&&(y.value==="["||y.value==="[^")&&(b=`\\${b}`),r.posix===!0&&b==="!"&&y.value==="["&&(b="^"),y.value+=b,Fr({value:b});continue}if(v.quotes===1&&b!=='"'){b=fe.escapeRegex(b),y.value+=b,Fr({value:b});continue}if(b==='"'){v.quotes=v.quotes===1?0:1,r.keepQuotes===!0&&H({type:"text",value:b});continue}if(b==="("){qr("parens"),H({type:"paren",value:b});continue}if(b===")"){if(v.parens===0&&r.strictBrackets===!0)throw new SyntaxError($t("opening","("));let S=N[N.length-1];if(S&&v.parens===S.parens+1){Bb(N.pop());continue}H({type:"paren",value:b,output:v.parens?")":"\\)"}),We("parens");continue}if(b==="["){if(r.nobracket===!0||!ye().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError($t("closing","]"));b=`\\${b}`}else qr("brackets");H({type:"bracket",value:b});continue}if(b==="]"){if(r.nobracket===!0||y&&y.type==="bracket"&&y.value.length===1){H({type:"text",value:b,output:`\\${b}`});continue}if(v.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError($t("opening","["));H({type:"text",value:b,output:`\\${b}`});continue}We("brackets");let S=y.value.slice(1);if(y.posix!==!0&&S[0]==="^"&&!S.includes("/")&&(b=`/${b}`),y.value+=b,Fr({value:b}),r.literalBrackets===!1||fe.hasRegexChars(S))continue;let L=fe.escapeRegex(y.value);if(v.output=v.output.slice(0,-y.value.length),r.literalBrackets===!0){v.output+=L,y.value=L;continue}y.value=`(${a}${L}|${y.value})`,v.output+=y.value;continue}if(b==="{"&&r.nobrace!==!0){qr("braces");let S={type:"brace",value:b,output:"(",outputIndex:v.output.length,tokensIndex:v.tokens.length};$.push(S),H(S);continue}if(b==="}"){let S=$[$.length-1];if(r.nobrace===!0||!S){H({type:"text",value:b,output:b});continue}let L=")";if(S.dots===!0){let X=o.slice(),ae=[];for(let ee=X.length-1;ee>=0&&(o.pop(),X[ee].type!=="brace");ee--)X[ee].type!=="dots"&&ae.unshift(X[ee].value);L=oq(ae,r),v.backtrack=!0}if(S.comma!==!0&&S.dots!==!0){let X=v.output.slice(0,S.outputIndex),ae=v.tokens.slice(S.tokensIndex);S.value=S.output="\\{",b=L="\\}",v.output=X;for(let ee of ae)v.output+=ee.output||ee.value}H({type:"brace",value:b,output:L}),We("braces"),$.pop();continue}if(b==="|"){N.length>0&&N[N.length-1].conditions++,H({type:"text",value:b});continue}if(b===","){let S=b,L=$[$.length-1];L&&Q[Q.length-1]==="braces"&&(L.comma=!0,S="|"),H({type:"comma",value:b,output:S});continue}if(b==="/"){if(y.type==="dot"&&v.index===v.start+1){v.start=v.index+1,v.consumed="",v.output="",o.pop(),y=s;continue}H({type:"slash",value:b,output:_});continue}if(b==="."){if(v.braces>0&&y.type==="dot"){y.value==="."&&(y.output=h);let S=$[$.length-1];y.type="dots",y.output+=b,y.value+=b,S.dots=!0;continue}if(v.braces+v.parens===0&&y.type!=="bos"&&y.type!=="slash"){H({type:"text",value:b,output:h});continue}H({type:"dot",value:b,output:h});continue}if(b==="?"){if(!(y&&y.value==="(")&&r.noextglob!==!0&&V()==="("&&V(2)!=="?"){kr("qmark",b);continue}if(y&&y.type==="paren"){let L=V(),X=b;if(L==="<"&&!fe.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(y.value==="("&&!/[!=<:]/.test(L)||L==="<"&&!/<([!=]|\w+>)/.test(ye()))&&(X=`\\${b}`),H({type:"text",value:b,output:X});continue}if(r.dot!==!0&&(y.type==="slash"||y.type==="bos")){H({type:"qmark",value:b,output:M});continue}H({type:"qmark",value:b,output:A});continue}if(b==="!"){if(r.noextglob!==!0&&V()==="("&&(V(2)!=="?"||!/[!=<:]/.test(V(3)))){kr("negate",b);continue}if(r.nonegate!==!0&&v.index===0){Hb();continue}}if(b==="+"){if(r.noextglob!==!0&&V()==="("&&V(2)!=="?"){kr("plus",b);continue}if(y&&y.value==="("||r.regex===!1){H({type:"plus",value:b,output:f});continue}if(y&&(y.type==="bracket"||y.type==="paren"||y.type==="brace")||v.parens>0){H({type:"plus",value:b});continue}H({type:"plus",value:f});continue}if(b==="@"){if(r.noextglob!==!0&&V()==="("&&V(2)!=="?"){H({type:"at",extglob:!0,value:b,output:""});continue}H({type:"text",value:b});continue}if(b!=="*"){(b==="$"||b==="^")&&(b=`\\${b}`);let S=iq.exec(ye());S&&(b+=S[0],v.index+=S[0].length),H({type:"text",value:b});continue}if(y&&(y.type==="globstar"||y.star===!0)){y.type="star",y.star=!0,y.value+=b,y.output=U,v.backtrack=!0,v.globstar=!0,le(b);continue}let E=ye();if(r.noextglob!==!0&&/^\([^?]/.test(E)){kr("star",b);continue}if(y.type==="star"){if(r.noglobstar===!0){le(b);continue}let S=y.prev,L=S.prev,X=S.type==="slash"||S.type==="bos",ae=L&&(L.type==="star"||L.type==="globstar");if(r.bash===!0&&(!X||E[0]&&E[0]!=="/")){H({type:"star",value:b,output:""});continue}let ee=v.braces>0&&(S.type==="comma"||S.type==="brace"),ui=N.length&&(S.type==="pipe"||S.type==="paren");if(!X&&S.type!=="paren"&&!ee&&!ui){H({type:"star",value:b,output:""});continue}for(;E.slice(0,3)==="/**";){let Mr=t[v.index+4];if(Mr&&Mr!=="/")break;E=E.slice(3),le("/**",3)}if(S.type==="bos"&&oe()){y.type="globstar",y.value+=b,y.output=F(r),v.output=y.output,v.globstar=!0,le(b);continue}if(S.type==="slash"&&S.prev.type!=="bos"&&!ae&&oe()){v.output=v.output.slice(0,-(S.output+y.output).length),S.output=`(?:${S.output}`,y.type="globstar",y.output=F(r)+(r.strictSlashes?")":"|$)"),y.value+=b,v.globstar=!0,v.output+=S.output+y.output,le(b);continue}if(S.type==="slash"&&S.prev.type!=="bos"&&E[0]==="/"){let Mr=E[1]!==void 0?"|$":"";v.output=v.output.slice(0,-(S.output+y.output).length),S.output=`(?:${S.output}`,y.type="globstar",y.output=`${F(r)}${_}|${_}${Mr})`,y.value+=b,v.output+=S.output+y.output,v.globstar=!0,le(b+_e()),H({type:"slash",value:"/",output:""});continue}if(S.type==="bos"&&E[0]==="/"){y.type="globstar",y.value+=b,y.output=`(?:^|${_}|${F(r)}${_})`,v.output=y.output,v.globstar=!0,le(b+_e()),H({type:"slash",value:"/",output:""});continue}v.output=v.output.slice(0,-y.output.length),y.type="globstar",y.output=F(r),y.value+=b,v.output+=y.output,v.globstar=!0,le(b);continue}let z={type:"star",value:b,output:U};if(r.bash===!0){z.output=".*?",(y.type==="bos"||y.type==="slash")&&(z.output=P+z.output),H(z);continue}if(y&&(y.type==="bracket"||y.type==="paren")&&r.regex===!0){z.output=b,H(z);continue}(v.index===v.start||y.type==="slash"||y.type==="dot")&&(y.type==="dot"?(v.output+=g,y.output+=g):r.dot===!0?(v.output+=w,y.output+=w):(v.output+=P,y.output+=P),V()!=="*"&&(v.output+=d,y.output+=d)),H(z)}for(;v.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError($t("closing","]"));v.output=fe.escapeLast(v.output,"["),We("brackets")}for(;v.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError($t("closing",")"));v.output=fe.escapeLast(v.output,"("),We("parens")}for(;v.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError($t("closing","}"));v.output=fe.escapeLast(v.output,"{"),We("braces")}if(r.strictSlashes!==!0&&(y.type==="star"||y.type==="bracket")&&H({type:"maybe_slash",value:"",output:`${_}?`}),v.backtrack===!0){v.output="";for(let E of v.tokens)v.output+=E.output!=null?E.output:E.value,E.suffix&&(v.output+=E.suffix)}return v};ky.fastpaths=(t,e)=>{let r=B({},e),n=typeof r.maxLength=="number"?Math.min(Bn,r.maxLength):Bn,i=t.length;if(i>n)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${n}`);t=qy[t]||t;let s=fe.isWindows(e),{DOT_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:l,NO_DOT:c,NO_DOTS:h,NO_DOTS_SLASH:f,STAR:_,START_ANCHOR:d}=Hn.globChars(s),m=r.dot?h:c,x=r.dot?f:c,g=r.capture?"":"?:",w={negated:!1,prefix:""},A=r.bash===!0?".*?":_;r.capture&&(A=`(${A})`);let M=P=>P.noglobstar===!0?A:`(${g}(?:(?!${d}${P.dot?l:o}).)*?)`,C=P=>{switch(P){case"*":return`${m}${u}${A}`;case".*":return`${o}${u}${A}`;case"*.*":return`${m}${A}${o}${u}${A}`;case"*/*":return`${m}${A}${a}${u}${x}${A}`;case"**":return m+M(r);case"**/*":return`(?:${m}${M(r)}${a})?${x}${u}${A}`;case"**/*.*":return`(?:${m}${M(r)}${a})?${x}${A}${o}${u}${A}`;case"**/.*":return`(?:${m}${M(r)}${a})?${o}${u}${A}`;default:{let I=/^(.*?)\.(\w+)$/.exec(P);if(!I)return;let U=C(I[1]);return U?U+o+I[2]:void 0}}},T=fe.removePrefix(t,w),F=C(T);return F&&r.strictSlashes!==!0&&(F+=`${a}?`),F};My.exports=ky});var $y=p((tI,jy)=>{"use strict";var aq=require("path"),uq=Fy(),fo=Dy(),po=Pr(),lq=Or(),cq=t=>t&&typeof t=="object"&&!Array.isArray(t),Z=(t,e,r=!1)=>{if(Array.isArray(t)){let c=t.map(f=>Z(f,e,r));return f=>{for(let _ of c){let d=_(f);if(d)return d}return!1}}let n=cq(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},s=po.isWindows(e),o=n?Z.compileRe(t,e):Z.makeRe(t,e,!1,!0),a=o.state;delete o.state;let u=()=>!1;if(i.ignore){let c=te(B({},e),{ignore:null,onMatch:null,onResult:null});u=Z(i.ignore,c,r)}let l=(c,h=!1)=>{let{isMatch:f,match:_,output:d}=Z.test(c,o,e,{glob:t,posix:s}),m={glob:t,state:a,regex:o,posix:s,input:c,output:d,match:_,isMatch:f};return typeof i.onResult=="function"&&i.onResult(m),f===!1?(m.isMatch=!1,h?m:!1):u(c)?(typeof i.onIgnore=="function"&&i.onIgnore(m),m.isMatch=!1,h?m:!1):(typeof i.onMatch=="function"&&i.onMatch(m),h?m:!0)};return r&&(l.state=a),l};Z.test=(t,e,r,{glob:n,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let s=r||{},o=s.format||(i?po.toPosixSlashes:null),a=t===n,u=a&&o?o(t):t;return a===!1&&(u=o?o(t):t,a=u===n),(a===!1||s.capture===!0)&&(s.matchBase===!0||s.basename===!0?a=Z.matchBase(t,e,r,i):a=e.exec(u)),{isMatch:Boolean(a),match:a,output:u}};Z.matchBase=(t,e,r,n=po.isWindows(r))=>(e instanceof RegExp?e:Z.makeRe(e,r)).test(aq.basename(t));Z.isMatch=(t,e,r)=>Z(e,r)(t);Z.parse=(t,e)=>Array.isArray(t)?t.map(r=>Z.parse(r,e)):fo(t,te(B({},e),{fastpaths:!1}));Z.scan=(t,e)=>uq(t,e);Z.compileRe=(t,e,r=!1,n=!1)=>{if(r===!0)return t.output;let i=e||{},s=i.contains?"":"^",o=i.contains?"":"$",a=`${s}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let u=Z.toRegex(a,e);return n===!0&&(u.state=t),u};Z.makeRe=(t,e={},r=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=fo.fastpaths(t,e)),i.output||(i=fo(t,e)),Z.compileRe(i,e,r,n)};Z.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Z.constants=lq;jy.exports=Z});var Iy=p((rI,Ly)=>{"use strict";Ly.exports=$y()});var Gy=p((nI,Vy)=>{"use strict";var Ny=require("util"),Hy=yy(),Ae=Iy(),ho=Pr(),By=t=>t===""||t==="./",J=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let n=new Set,i=new Set,s=new Set,o=0,a=c=>{s.add(c.output),r&&r.onResult&&r.onResult(c)};for(let c=0;c<e.length;c++){let h=Ae(String(e[c]),te(B({},r),{onResult:a}),!0),f=h.state.negated||h.state.negatedExtglob;f&&o++;for(let _ of t){let d=h(_,!0);!(f?!d.isMatch:d.isMatch)||(f?n.add(d.output):(n.delete(d.output),i.add(d.output)))}}let l=(o===e.length?[...s]:[...i]).filter(c=>!n.has(c));if(r&&l.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(c=>c.replace(/\\/g,"")):e}return l};J.match=J;J.matcher=(t,e)=>Ae(t,e);J.isMatch=(t,e,r)=>Ae(e,r)(t);J.any=J.isMatch;J.not=(t,e,r={})=>{e=[].concat(e).map(String);let n=new Set,i=[],s=a=>{r.onResult&&r.onResult(a),i.push(a.output)},o=J(t,e,te(B({},r),{onResult:s}));for(let a of i)o.includes(a)||n.add(a);return[...n]};J.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${Ny.inspect(t)}"`);if(Array.isArray(e))return e.some(n=>J.contains(t,n,r));if(typeof e=="string"){if(By(t)||By(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return J.isMatch(t,e,te(B({},r),{contains:!0}))};J.matchKeys=(t,e,r)=>{if(!ho.isObject(t))throw new TypeError("Expected the first argument to be an object");let n=J(Object.keys(t),e,r),i={};for(let s of n)i[s]=t[s];return i};J.some=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=Ae(String(i),r);if(n.some(o=>s(o)))return!0}return!1};J.every=(t,e,r)=>{let n=[].concat(t);for(let i of[].concat(e)){let s=Ae(String(i),r);if(!n.every(o=>s(o)))return!1}return!0};J.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${Ny.inspect(t)}"`);return[].concat(e).every(n=>Ae(n,r)(t))};J.capture=(t,e,r)=>{let n=ho.isWindows(r),s=Ae.makeRe(String(t),te(B({},r),{capture:!0})).exec(n?ho.toPosixSlashes(e):e);if(s)return s.slice(1).map(o=>o===void 0?"":o)};J.makeRe=(...t)=>Ae.makeRe(...t);J.scan=(...t)=>Ae.scan(...t);J.parse=(t,e)=>{let r=[];for(let n of[].concat(t||[]))for(let i of Hy(String(n),e))r.push(Ae.parse(i,e));return r};J.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:Hy(t,e)};J.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return J.braces(t,te(B({},e),{expand:!0}))};Vy.exports=J});var Zy=p(k=>{"use strict";Object.defineProperty(k,"__esModule",{value:!0});k.matchAny=k.convertPatternsToRe=k.makeRe=k.getPatternParts=k.expandBraceExpansion=k.expandPatternsWithBraceExpansion=k.isAffectDepthOfReadingPattern=k.endsWithSlashGlobStar=k.hasGlobStar=k.getBaseDirectory=k.isPatternRelatedToParentDirectory=k.getPatternsOutsideCurrentDirectory=k.getPatternsInsideCurrentDirectory=k.getPositivePatterns=k.getNegativePatterns=k.isPositivePattern=k.isNegativePattern=k.convertToNegativePattern=k.convertToPositivePattern=k.isDynamicPattern=k.isStaticPattern=void 0;var fq=require("path"),pq=D_(),mo=Gy(),Uy="**",hq="\\",dq=/[*?]|^!/,mq=/\[.*]/,gq=/(?:^|[^!*+?@])\(.*\|.*\)/,_q=/[!*+?@]\(.*\)/,yq=/{.*(?:,|\.\.).*}/;function Wy(t,e={}){return!zy(t,e)}k.isStaticPattern=Wy;function zy(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(hq)||dq.test(t)||mq.test(t)||gq.test(t)||e.extglob!==!1&&_q.test(t)||e.braceExpansion!==!1&&yq.test(t))}k.isDynamicPattern=zy;function bq(t){return Vn(t)?t.slice(1):t}k.convertToPositivePattern=bq;function vq(t){return"!"+t}k.convertToNegativePattern=vq;function Vn(t){return t.startsWith("!")&&t[1]!=="("}k.isNegativePattern=Vn;function Ky(t){return!Vn(t)}k.isPositivePattern=Ky;function xq(t){return t.filter(Vn)}k.getNegativePatterns=xq;function Sq(t){return t.filter(Ky)}k.getPositivePatterns=Sq;function wq(t){return t.filter(e=>!go(e))}k.getPatternsInsideCurrentDirectory=wq;function Eq(t){return t.filter(go)}k.getPatternsOutsideCurrentDirectory=Eq;function go(t){return t.startsWith("..")||t.startsWith("./..")}k.isPatternRelatedToParentDirectory=go;function Aq(t){return pq(t,{flipBackslashes:!1})}k.getBaseDirectory=Aq;function Cq(t){return t.includes(Uy)}k.hasGlobStar=Cq;function Yy(t){return t.endsWith("/"+Uy)}k.endsWithSlashGlobStar=Yy;function Oq(t){let e=fq.basename(t);return Yy(t)||Wy(e)}k.isAffectDepthOfReadingPattern=Oq;function Pq(t){return t.reduce((e,r)=>e.concat(Jy(r)),[])}k.expandPatternsWithBraceExpansion=Pq;function Jy(t){return mo.braces(t,{expand:!0,nodupes:!0})}k.expandBraceExpansion=Jy;function Rq(t,e){let{parts:r}=mo.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}k.getPatternParts=Rq;function Xy(t,e){return mo.makeRe(t,e)}k.makeRe=Xy;function Tq(t,e){return t.map(r=>Xy(r,e))}k.convertPatternsToRe=Tq;function Fq(t,e){return e.some(r=>r.test(t))}k.matchAny=Fq});var r0=p((sI,t0)=>{"use strict";var qq=require("stream"),Qy=qq.PassThrough,kq=Array.prototype.slice;t0.exports=Mq;function Mq(){let t=[],e=kq.call(arguments),r=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};let i=n.end!==!1,s=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let o=Qy(n);function a(){for(let c=0,h=arguments.length;c<h;c++)t.push(e0(arguments[c],n));return u(),this}function u(){if(r)return;r=!0;let c=t.shift();if(!c){process.nextTick(l);return}Array.isArray(c)||(c=[c]);let h=c.length+1;function f(){--h>0||(r=!1,u())}function _(d){function m(){d.removeListener("merge2UnpipeEnd",m),d.removeListener("end",m),s&&d.removeListener("error",x),f()}function x(g){o.emit("error",g)}if(d._readableState.endEmitted)return f();d.on("merge2UnpipeEnd",m),d.on("end",m),s&&d.on("error",x),d.pipe(o,{end:!1}),d.resume()}for(let d=0;d<c.length;d++)_(c[d]);f()}function l(){r=!1,o.emit("queueDrain"),i&&o.end()}return o.setMaxListeners(0),o.add=a,o.on("unpipe",function(c){c.emit("merge2UnpipeEnd")}),e.length&&a.apply(null,e),o}function e0(t,e){if(Array.isArray(t))for(let r=0,n=t.length;r<n;r++)t[r]=e0(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(Qy(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}});var i0=p(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.merge=void 0;var Dq=r0();function jq(t){let e=Dq(t);return t.forEach(r=>{r.once("error",n=>e.emit("error",n))}),e.once("close",()=>n0(t)),e.once("end",()=>n0(t)),e}Gn.merge=jq;function n0(t){t.forEach(e=>e.emit("close"))}});var s0=p(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.isEmpty=Lt.isString=void 0;function $q(t){return typeof t=="string"}Lt.isString=$q;function Lq(t){return t===""}Lt.isEmpty=Lq});var Me=p(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.string=ie.stream=ie.pattern=ie.path=ie.fs=ie.errno=ie.array=void 0;var Iq=E_();ie.array=Iq;var Nq=A_();ie.errno=Nq;var Hq=O_();ie.fs=Hq;var Bq=P_();ie.path=Bq;var Vq=Zy();ie.pattern=Vq;var Gq=i0();ie.stream=Gq;var Uq=s0();ie.string=Uq});var u0=p(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.convertPatternGroupToTask=se.convertPatternGroupsToTasks=se.groupPatternsByBaseDirectory=se.getNegativePatternsAsPositive=se.getPositivePatterns=se.convertPatternsToTasks=se.generate=void 0;var De=Me();function Wq(t,e){let r=o0(t),n=a0(t,e.ignore),i=r.filter(u=>De.pattern.isStaticPattern(u,e)),s=r.filter(u=>De.pattern.isDynamicPattern(u,e)),o=_o(i,n,!1),a=_o(s,n,!0);return o.concat(a)}se.generate=Wq;function _o(t,e,r){let n=[],i=De.pattern.getPatternsOutsideCurrentDirectory(t),s=De.pattern.getPatternsInsideCurrentDirectory(t),o=yo(i),a=yo(s);return n.push(...bo(o,e,r)),"."in a?n.push(vo(".",s,e,r)):n.push(...bo(a,e,r)),n}se.convertPatternsToTasks=_o;function o0(t){return De.pattern.getPositivePatterns(t)}se.getPositivePatterns=o0;function a0(t,e){return De.pattern.getNegativePatterns(t).concat(e).map(De.pattern.convertToPositivePattern)}se.getNegativePatternsAsPositive=a0;function yo(t){let e={};return t.reduce((r,n)=>{let i=De.pattern.getBaseDirectory(n);return i in r?r[i].push(n):r[i]=[n],r},e)}se.groupPatternsByBaseDirectory=yo;function bo(t,e,r){return Object.keys(t).map(n=>vo(n,t[n],e,r))}se.convertPatternGroupsToTasks=bo;function vo(t,e,r,n){return{dynamic:n,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(De.pattern.convertToNegativePattern))}}se.convertPatternGroupToTask=vo});var c0=p(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.read=void 0;function zq(t,e,r){e.fs.lstat(t,(n,i)=>{if(n!==null){l0(r,n);return}if(!i.isSymbolicLink()||!e.followSymbolicLink){xo(r,i);return}e.fs.stat(t,(s,o)=>{if(s!==null){if(e.throwErrorOnBrokenSymbolicLink){l0(r,s);return}xo(r,i);return}e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),xo(r,o)})})}Un.read=zq;function l0(t,e){t(e)}function xo(t,e){t(null,e)}});var f0=p(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.read=void 0;function Kq(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw n}}Wn.read=Kq});var p0=p(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.createFileSystemAdapter=Ne.FILE_SYSTEM_ADAPTER=void 0;var zn=require("fs");Ne.FILE_SYSTEM_ADAPTER={lstat:zn.lstat,stat:zn.stat,lstatSync:zn.lstatSync,statSync:zn.statSync};function Yq(t){return t===void 0?Ne.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Ne.FILE_SYSTEM_ADAPTER),t)}Ne.createFileSystemAdapter=Yq});var d0=p(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});var Jq=p0(),h0=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Jq.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e!=null?e:r}};So.default=h0});var st=p(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.statSync=He.stat=He.Settings=void 0;var m0=c0(),Xq=f0(),wo=d0();He.Settings=wo.default;function Zq(t,e,r){if(typeof e=="function"){m0.read(t,Eo(),e);return}m0.read(t,Eo(e),r)}He.stat=Zq;function Qq(t,e){let r=Eo(e);return Xq.read(t,r)}He.statSync=Qq;function Eo(t={}){return t instanceof wo.default?t:new wo.default(t)}});var y0=p((mI,_0)=>{var g0;_0.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window!="undefined"?window:global):t=>(g0||(g0=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0))});var v0=p((gI,b0)=>{b0.exports=tk;var ek=y0();function tk(t,e){let r,n,i,s=!0;Array.isArray(t)?(r=[],n=t.length):(i=Object.keys(t),r={},n=i.length);function o(u){function l(){e&&e(u,r),e=null}s?ek(l):l()}function a(u,l,c){r[u]=c,(--n==0||l)&&o(l)}n?i?i.forEach(function(u){t[u](function(l,c){a(u,l,c)})}):t.forEach(function(u,l){u(function(c,h){a(l,c,h)})}):o(null),s=!1}});var Ao=p(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var Kn=process.versions.node.split(".");if(Kn[0]===void 0||Kn[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var x0=Number.parseInt(Kn[0],10),rk=Number.parseInt(Kn[1],10),S0=10,nk=10,ik=x0>S0,sk=x0===S0&&rk>=nk;Yn.IS_SUPPORT_READDIR_WITH_FILE_TYPES=ik||sk});var E0=p(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.createDirentFromStats=void 0;var w0=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function ok(t,e){return new w0(t,e)}Jn.createDirentFromStats=ok});var Co=p(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.fs=void 0;var ak=E0();Xn.fs=ak});var Oo=p(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.joinPathSegments=void 0;function uk(t,e,r){return t.endsWith(r)?t+e:t+r+e}Zn.joinPathSegments=uk});var T0=p(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.readdir=Be.readdirWithFileTypes=Be.read=void 0;var lk=st(),A0=v0(),ck=Ao(),C0=Co(),O0=Oo();function fk(t,e,r){if(!e.stats&&ck.IS_SUPPORT_READDIR_WITH_FILE_TYPES){P0(t,e,r);return}R0(t,e,r)}Be.read=fk;function P0(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(n,i)=>{if(n!==null){Qn(r,n);return}let s=i.map(a=>({dirent:a,name:a.name,path:O0.joinPathSegments(t,a.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){Po(r,s);return}let o=s.map(a=>pk(a,e));A0(o,(a,u)=>{if(a!==null){Qn(r,a);return}Po(r,u)})})}Be.readdirWithFileTypes=P0;function pk(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(n,i)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,t);return}t.dirent=C0.fs.createDirentFromStats(t.name,i),r(null,t)})}}function R0(t,e,r){e.fs.readdir(t,(n,i)=>{if(n!==null){Qn(r,n);return}let s=i.map(o=>{let a=O0.joinPathSegments(t,o,e.pathSegmentSeparator);return u=>{lk.stat(a,e.fsStatSettings,(l,c)=>{if(l!==null){u(l);return}let h={name:o,path:a,dirent:C0.fs.createDirentFromStats(o,c)};e.stats&&(h.stats=c),u(null,h)})}});A0(s,(o,a)=>{if(o!==null){Qn(r,o);return}Po(r,a)})})}Be.readdir=R0;function Qn(t,e){t(e)}function Po(t,e){t(null,e)}});var D0=p(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.readdir=Ve.readdirWithFileTypes=Ve.read=void 0;var hk=st(),dk=Ao(),F0=Co(),q0=Oo();function mk(t,e){return!e.stats&&dk.IS_SUPPORT_READDIR_WITH_FILE_TYPES?k0(t,e):M0(t,e)}Ve.read=mk;function k0(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(n=>{let i={dirent:n,name:n.name,path:q0.joinPathSegments(t,n.name,e.pathSegmentSeparator)};if(i.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let s=e.fs.statSync(i.path);i.dirent=F0.fs.createDirentFromStats(i.name,s)}catch(s){if(e.throwErrorOnBrokenSymbolicLink)throw s}return i})}Ve.readdirWithFileTypes=k0;function M0(t,e){return e.fs.readdirSync(t).map(n=>{let i=q0.joinPathSegments(t,n,e.pathSegmentSeparator),s=hk.statSync(i,e.fsStatSettings),o={name:n,path:i,dirent:F0.fs.createDirentFromStats(n,s)};return e.stats&&(o.stats=s),o})}Ve.readdir=M0});var j0=p(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.createFileSystemAdapter=Ge.FILE_SYSTEM_ADAPTER=void 0;var It=require("fs");Ge.FILE_SYSTEM_ADAPTER={lstat:It.lstat,stat:It.stat,lstatSync:It.lstatSync,statSync:It.statSync,readdir:It.readdir,readdirSync:It.readdirSync};function gk(t){return t===void 0?Ge.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Ge.FILE_SYSTEM_ADAPTER),t)}Ge.createFileSystemAdapter=gk});var L0=p(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});var _k=require("path"),yk=st(),bk=j0(),$0=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=bk.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,_k.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new yk.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e!=null?e:r}};Ro.default=$0});var ei=p(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.Settings=Ue.scandirSync=Ue.scandir=void 0;var I0=T0(),vk=D0(),To=L0();Ue.Settings=To.default;function xk(t,e,r){if(typeof e=="function"){I0.read(t,Fo(),e);return}I0.read(t,Fo(e),r)}Ue.scandir=xk;function Sk(t,e){let r=Fo(e);return vk.read(t,r)}Ue.scandirSync=Sk;function Fo(t={}){return t instanceof To.default?t:new To.default(t)}});var H0=p((CI,N0)=>{"use strict";function wk(t){var e=new t,r=e;function n(){var s=e;return s.next?e=s.next:(e=new t,r=e),s.next=null,s}function i(s){r.next=s,r=s}return{get:n,release:i}}N0.exports=wk});var V0=p((OI,qo)=>{"use strict";var Ek=H0();function B0(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var n=Ek(Ak),i=null,s=null,o=0,a=null,u={push:m,drain:me,saturated:me,pause:c,paused:!1,concurrency:r,running:l,resume:_,idle:d,length:h,getQueue:f,unshift:x,empty:me,kill:w,killAndDrain:A,error:M};return u;function l(){return o}function c(){u.paused=!0}function h(){for(var C=i,T=0;C;)C=C.next,T++;return T}function f(){for(var C=i,T=[];C;)T.push(C.value),C=C.next;return T}function _(){if(!!u.paused){u.paused=!1;for(var C=0;C<u.concurrency;C++)o++,g()}}function d(){return o===0&&u.length()===0}function m(C,T){var F=n.get();F.context=t,F.release=g,F.value=C,F.callback=T||me,F.errorHandler=a,o===u.concurrency||u.paused?s?(s.next=F,s=F):(i=F,s=F,u.saturated()):(o++,e.call(t,F.value,F.worked))}function x(C,T){var F=n.get();F.context=t,F.release=g,F.value=C,F.callback=T||me,o===u.concurrency||u.paused?i?(F.next=i,i=F):(i=F,s=F,u.saturated()):(o++,e.call(t,F.value,F.worked))}function g(C){C&&n.release(C);var T=i;T?u.paused?o--:(s===i&&(s=null),i=T.next,T.next=null,e.call(t,T.value,T.worked),s===null&&u.empty()):--o==0&&u.drain()}function w(){i=null,s=null,u.drain=me}function A(){i=null,s=null,u.drain(),u.drain=me}function M(C){a=C}}function me(){}function Ak(){this.value=null,this.callback=me,this.next=null,this.release=me,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,n){var i=t.callback,s=t.errorHandler,o=t.value;t.value=null,t.callback=me,t.errorHandler&&s(r,o),i.call(t.context,r,n),t.release(t)}}function Ck(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function n(c,h){e.call(this,c).then(function(f){h(null,f)},h)}var i=B0(t,n,r),s=i.push,o=i.unshift;return i.push=a,i.unshift=u,i.drained=l,i;function a(c){var h=new Promise(function(f,_){s(c,function(d,m){if(d){_(d);return}f(m)})});return h.catch(me),h}function u(c){var h=new Promise(function(f,_){o(c,function(d,m){if(d){_(d);return}f(m)})});return h.catch(me),h}function l(){var c=i.drain,h=new Promise(function(f){i.drain=function(){c(),f()}});return h}}qo.exports=B0;qo.exports.promise=Ck});var ti=p(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.joinPathSegments=Ce.replacePathSegmentSeparator=Ce.isAppliedFilter=Ce.isFatalError=void 0;function Ok(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}Ce.isFatalError=Ok;function Pk(t,e){return t===null||t(e)}Ce.isAppliedFilter=Pk;function Rk(t,e){return t.split(/[/\\]/).join(e)}Ce.replacePathSegmentSeparator=Rk;function Tk(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}Ce.joinPathSegments=Tk});var Mo=p(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});var Fk=ti(),G0=class{constructor(e,r){this._root=e,this._settings=r,this._root=Fk.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};ko.default=G0});var jo=p(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});var qk=require("events"),kk=ei(),Mk=V0(),ri=ti(),Dk=Mo(),U0=class extends Dk.default{constructor(e,r){super(e,r);this._settings=r,this._scandir=kk.scandir,this._emitter=new qk.EventEmitter,this._queue=Mk(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let n={directory:e,base:r};this._queue.push(n,i=>{i!==null&&this._handleError(i)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(n,i)=>{if(n!==null){r(n,void 0);return}for(let s of i)this._handleEntry(s,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!ri.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let n=e.path;r!==void 0&&(e.path=ri.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),ri.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&ri.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};Do.default=U0});var z0=p($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});var jk=jo(),W0=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new jk.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{$k(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Lk(e,this._storage)}),this._reader.read()}};$o.default=W0;function $k(t,e){t(e)}function Lk(t,e){t(null,e)}});var Y0=p(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});var Ik=require("stream"),Nk=jo(),K0=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Nk.default(this._root,this._settings),this._stream=new Ik.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};Lo.default=K0});var X0=p(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});var Hk=ei(),ni=ti(),Bk=Mo(),J0=class extends Bk.default{constructor(){super(...arguments);this._scandir=Hk.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let n=this._scandir(e,this._settings.fsScandirSettings);for(let i of n)this._handleEntry(i,r)}catch(n){this._handleError(n)}}_handleError(e){if(!!ni.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let n=e.path;r!==void 0&&(e.path=ni.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),ni.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&ni.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};Io.default=J0});var Q0=p(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});var Vk=X0(),Z0=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Vk.default(this._root,this._settings)}read(){return this._reader.read()}};No.default=Z0});var tb=p(Ho=>{"use strict";Object.defineProperty(Ho,"__esModule",{value:!0});var Gk=require("path"),Uk=ei(),eb=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Gk.sep),this.fsScandirSettings=new Uk.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e!=null?e:r}};Ho.default=eb});var Vo=p(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.Settings=Oe.walkStream=Oe.walkSync=Oe.walk=void 0;var rb=z0(),Wk=Y0(),zk=Q0(),Bo=tb();Oe.Settings=Bo.default;function Kk(t,e,r){if(typeof e=="function"){new rb.default(t,ii()).read(e);return}new rb.default(t,ii(e)).read(r)}Oe.walk=Kk;function Yk(t,e){let r=ii(e);return new zk.default(t,r).read()}Oe.walkSync=Yk;function Jk(t,e){let r=ii(e);return new Wk.default(t,r).read()}Oe.walkStream=Jk;function ii(t={}){return t instanceof Bo.default?t:new Bo.default(t)}});var Uo=p(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});var Xk=require("path"),Zk=st(),nb=Me(),ib=class{constructor(e){this._settings=e,this._fsStatSettings=new Zk.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return Xk.resolve(this._settings.cwd,e)}_makeEntry(e,r){let n={name:r,path:r,dirent:nb.fs.createDirentFromStats(r,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!nb.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};Go.default=ib});var zo=p(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});var Qk=require("stream"),eM=st(),tM=Vo(),rM=Uo(),sb=class extends rM.default{constructor(){super(...arguments);this._walkStream=tM.walkStream,this._stat=eM.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let n=e.map(this._getFullEntryPath,this),i=new Qk.PassThrough({objectMode:!0});i._write=(s,o,a)=>this._getEntry(n[s],e[s],r).then(u=>{u!==null&&r.entryFilter(u)&&i.push(u),s===n.length-1&&i.end(),a()}).catch(a);for(let s=0;s<n.length;s++)i.write(s);return i}_getEntry(e,r,n){return this._getStat(e).then(i=>this._makeEntry(i,r)).catch(i=>{if(n.errorFilter(i))return null;throw i})}_getStat(e){return new Promise((r,n)=>{this._stat(e,this._fsStatSettings,(i,s)=>i===null?r(s):n(i))})}};Wo.default=sb});var ab=p(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});var Nt=Me(),ob=class{constructor(e,r,n){this._patterns=e,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){let e=Nt.pattern.expandPatternsWithBraceExpansion(this._patterns);for(let r of e){let n=this._getPatternSegments(r),i=this._splitSegmentsIntoSections(n);this._storage.push({complete:i.length<=1,pattern:r,segments:n,sections:i})}}_getPatternSegments(e){return Nt.pattern.getPatternParts(e,this._micromatchOptions).map(n=>Nt.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:Nt.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return Nt.array.splitWhen(e,r=>r.dynamic&&Nt.pattern.hasGlobStar(r.pattern))}};Ko.default=ob});var lb=p(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var nM=ab(),ub=class extends nM.default{match(e){let r=e.split("/"),n=r.length,i=this._storage.filter(s=>!s.complete||s.segments.length>n);for(let s of i){let o=s.sections[0];if(!s.complete&&n>o.length||r.every((u,l)=>{let c=s.segments[l];return!!(c.dynamic&&c.patternRe.test(u)||!c.dynamic&&c.pattern===u)}))return!0}return!1}};Yo.default=ub});var fb=p(Jo=>{"use strict";Object.defineProperty(Jo,"__esModule",{value:!0});var si=Me(),iM=lb(),cb=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,n){let i=this._getMatcher(r),s=this._getNegativePatternsRe(n);return o=>this._filter(e,o,i,s)}_getMatcher(e){return new iM.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(si.pattern.isAffectDepthOfReadingPattern);return si.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,n,i){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let s=si.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(s,n)?!1:this._isSkippedByNegativePatterns(s,i)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let n=r.split("/").length;if(e==="")return n;let i=e.split("/").length;return n-i}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!si.pattern.matchAny(e,r)}};Jo.default=cb});var hb=p(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});var Ht=Me(),pb=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let n=Ht.pattern.convertPatternsToRe(e,this._micromatchOptions),i=Ht.pattern.convertPatternsToRe(r,this._micromatchOptions);return s=>this._filter(s,n,i)}_filter(e,r,n){if(this._settings.unique&&this._isDuplicateEntry(e)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e.path,n))return!1;let i=this._settings.baseNameMatch?e.name:e.path,s=this._isMatchToPatterns(i,r)&&!this._isMatchToPatterns(e.path,n);return this._settings.unique&&s&&this._createIndexRecord(e),s}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;let n=Ht.path.makeAbsolute(this._settings.cwd,e);return Ht.pattern.matchAny(n,r)}_isMatchToPatterns(e,r){let n=Ht.path.removeLeadingDotSegment(e);return Ht.pattern.matchAny(n,r)}};Xo.default=pb});var mb=p(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});var sM=Me(),db=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return sM.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};Zo.default=db});var yb=p(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});var gb=Me(),_b=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=gb.path.makeAbsolute(this._settings.cwd,r),r=gb.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};Qo.default=_b});var oi=p(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});var oM=require("path"),aM=fb(),uM=hb(),lM=mb(),cM=yb(),bb=class{constructor(e){this._settings=e,this.errorFilter=new lM.default(this._settings),this.entryFilter=new uM.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new aM.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new cM.default(this._settings)}_getRootDirectory(e){return oM.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};ea.default=bb});var xb=p(ta=>{"use strict";Object.defineProperty(ta,"__esModule",{value:!0});var fM=zo(),pM=oi(),vb=class extends pM.default{constructor(){super(...arguments);this._reader=new fM.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=[];return new Promise((s,o)=>{let a=this.api(r,e,n);a.once("error",o),a.on("data",u=>i.push(n.transform(u))),a.once("end",()=>s(i))})}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};ta.default=vb});var wb=p(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});var hM=require("stream"),dM=zo(),mM=oi(),Sb=class extends mM.default{constructor(){super(...arguments);this._reader=new dM.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e),i=this.api(r,e,n),s=new hM.Readable({objectMode:!0,read:()=>{}});return i.once("error",o=>s.emit("error",o)).on("data",o=>s.emit("data",n.transform(o))).once("end",()=>s.emit("end")),s.once("close",()=>i.destroy()),s}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};ra.default=Sb});var Ab=p(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});var gM=st(),_M=Vo(),yM=Uo(),Eb=class extends yM.default{constructor(){super(...arguments);this._walkSync=_M.walkSync,this._statSync=gM.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let n=[];for(let i of e){let s=this._getFullEntryPath(i),o=this._getEntry(s,i,r);o===null||!r.entryFilter(o)||n.push(o)}return n}_getEntry(e,r,n){try{let i=this._getStat(e);return this._makeEntry(i,r)}catch(i){if(n.errorFilter(i))return null;throw i}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};na.default=Eb});var Ob=p(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});var bM=Ab(),vM=oi(),Cb=class extends vM.default{constructor(){super(...arguments);this._reader=new bM.default(this._settings)}read(e){let r=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(r,e,n).map(n.transform)}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}};ia.default=Cb});var Rb=p(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var Bt=require("fs"),xM=require("os"),SM=Math.max(xM.cpus().length,1);Vt.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:Bt.lstat,lstatSync:Bt.lstatSync,stat:Bt.stat,statSync:Bt.statSync,readdir:Bt.readdir,readdirSync:Bt.readdirSync};var Pb=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,SM),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},Vt.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};Vt.default=Pb});var qb=p((XI,Fb)=>{"use strict";var Tb=u0(),wM=xb(),EM=wb(),AM=Ob(),sa=Rb(),ot=Me();async function oa(t,e){Gt(t);let r=aa(t,wM.default,e),n=await Promise.all(r);return ot.array.flatten(n)}(function(t){function e(o,a){Gt(o);let u=aa(o,AM.default,a);return ot.array.flatten(u)}t.sync=e;function r(o,a){Gt(o);let u=aa(o,EM.default,a);return ot.stream.merge(u)}t.stream=r;function n(o,a){Gt(o);let u=[].concat(o),l=new sa.default(a);return Tb.generate(u,l)}t.generateTasks=n;function i(o,a){Gt(o);let u=new sa.default(a);return ot.pattern.isDynamicPattern(o,u)}t.isDynamicPattern=i;function s(o){return Gt(o),ot.path.escape(o)}t.escapePath=s})(oa||(oa={}));function aa(t,e,r){let n=[].concat(t),i=new sa.default(r),s=Tb.generate(n,i),o=new e(i);return s.map(o.read,o)}function Gt(t){if(![].concat(t).every(n=>ot.string.isString(n)&&!ot.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}Fb.exports=oa});var Nb=R(Pa());var Us=R(Kt()),e_=R(Nu()),t_=R(require("webpack"));var Ll=R(require("@babel/core")),Il=R(require("@pmmmwh/react-refresh-webpack-plugin")),Nl=R(require("clean-webpack-plugin")),Hl=R(require("crypto")),Bl=R(require("dotenv-webpack")),Vl=R(require("html-webpack-plugin")),Mi=R(require("mini-css-extract-plugin")),Gl=R(kl()),Di=R(require("tsconfig-paths-webpack-plugin")),Ul=R(require("webpack")),Wl=R(require("webpack-bundle-analyzer")),zl=R(require("@module-federation/enhanced"));var p1=["last 3 chrome version","last 3 firefox version","last 3 safari version"].join(),h1=["cover 90%","not dead","not op_mini all","Firefox ESR","not android < 5"].join();function Ml(t){t==="development"?process.env.BROWSERSLIST=p1:t==="production"&&(process.env.BROWSERSLIST=h1)}var Dl=R(require("util")),{isRegExp:jl}=Dl.types;function Qr(t,e){let r=Object.keys(B(B({},t.dependencies),t.devDependencies));return Array.isArray(e)?r.filter(n=>e.some(i=>jl(i)?i.test(n):i===n)):jl(e)?r.some(n=>e.test(n)):r.includes(e)}var Le=R(require("fs")),$l=R(require("path")),en=R(require("util")),d1=(0,en.promisify)(Le.readFile),m1=(0,en.promisify)(Le.writeFile),g1=(0,en.promisify)(Le.unlink),j={resolvePath(t){return $l.resolve(t)},hasFile(t){return Le.existsSync(this.resolvePath(t))},async readFile(t){let e=this.resolvePath(t);try{return await d1(e,{encoding:"utf-8"})}catch(r){if(r.code==="ENOENT")return null;throw r}},async writeFile(t,e){let r=this.resolvePath(t);await m1(r,e,{encoding:"utf-8"})},async deleteFile(t){let e=this.resolvePath(t);await g1(e)}};function Xt({packageJson:t,transpileModules:e=!1,reactRefreshSupport:r=!0}){return{typescriptSupport:Qr(t,"typescript"),flowSupport:j.hasFile(".flowconfig"),transpileModules:e||!1,reactRefreshSupport:r!==!1}}async function tn({mode:t,analyze:e,outputFilename:r,singleBundle:n,path:i,packageJson:s,injectDevtoolsScript:o=!1,prefixCss:a=!1,injectCssInPage:u=!1,exposeModules:l,injectChaynsCss:c=!0,apiVersion:h=null,target:f=null}){var T,F,P,I,U,v,N;let _=s.name,d=[new Bl.default({path:"./.env.local",systemvars:!0,silent:!0,ignoreStub:f==="server"?!0:void 0}),new Ul.DefinePlugin({__REQUIRED_REACT_VERSION__:JSON.stringify(((T=s.peerDependencies)==null?void 0:T.react)||((F=s==null?void 0:s.dependencies)==null?void 0:F.react)),"process.env.__PACKAGE_NAME__":JSON.stringify((P=s.name)==null?void 0:P.replace(/-/g,"_"))})];h&&d.push(new zl.ModuleFederationPlugin({name:_==null?void 0:_.split("-").join("_"),filename:l?"remoteEntry.js":void 0,exposes:l||void 0,library:f==="server"?{type:"commonjs-module"}:void 0,remoteType:"script",runtimePlugins:f==="server"?[require.resolve("@module-federation/node/runtimePlugin")]:void 0,shared:t!=="development"||f==="server"?{react:{requiredVersion:((I=s.peerDependencies)==null?void 0:I.react)||((U=s==null?void 0:s.dependencies)==null?void 0:U.react),singleton:f==="server"},"react-dom":{requiredVersion:((v=s.peerDependencies)==null?void 0:v["react-dom"])||((N=s==null?void 0:s.dependencies)==null?void 0:N["react-dom"]),singleton:f==="server"}}:void 0}));let m=null;if(t==="development"&&j.hasFile("src/index.dev.html")&&(m=await j.readFile("src/index.dev.html")),!m&&j.hasFile("src/index.html")&&(m=await j.readFile("src/index.html")),o&&m&&t==="development"){let $=m.indexOf("<script");m=`${m.substring(0,$)}
|
|
34
34
|
<!-- The React Devtools connection script -->
|
|
35
35
|
<script src="http://localhost:8097"><\/script>
|
|
36
|
-
${m.substring($)}`}if(m){let $=t==="production"?{removeComments:!0,collapseWhitespace:!0,removeRedundantAttributes:!0,useShortDoctype:!0,removeEmptyAttributes:!0,removeStyleLinkTypeAttributes:!0,keepClosingSlash:!0,minifyJS:!0,minifyCSS:!0,minifyURLs:!0}:void 0;d.push(new Vl.default({templateContent:m,minify:$}))}if(e&&d.push(new Wl.BundleAnalyzerPlugin),t==="production"&&d.push(new Nl.CleanWebpackPlugin),Ml(t),t==="development"&&d.push(new Il.default({overlay:!1})),!_)throw Error("The name field in package.json has to be provided.");!n&&t!=="development"&&d.push(new Mi.default({filename:`static/css/${_}.[contenthash].css`,chunkFilename:`static/css/${_}.[chunkhash].chunk.css`}));let x=t!=="production",g=Xt({packageJson:s}),w=Hl.createHash("md5").update([JSON.stringify(g),process.env.BABEL_ENV,process.env.NODE_ENV,Ll.version].join("--")).digest("hex"),A=[];j.hasFile("jsconfig.json")?A.push(new Di.default({configFile:"jsconfig.json",extensions:[".js",".jsx"]})):j.hasFile("tsconfig.json")&&A.push(new Di.default({extensions:[".js",".jsx",".ts",".tsx"]}));function M($){let Q=this.domAPI.moduleCss||document.querySelector(".module-css:not(.injected)");this.domAPI.moduleCss=Q,Q?(Q.appendChild($),Q.classList.add("injected")):document.head.appendChild($)}let C="";return f==="client"?C="client/":f==="server"&&(C="server/"),{entry:!h||!l||j.hasFile("src/index.js")||j.hasFile("src/index.jsx")||j.hasFile("src/index.ts")||j.hasFile("src/index.tsx")?{index:j.resolvePath("src/index")}:{},mode:t,target:f==="server"?"async-node":t==="development"?"web":"browserslist",devtool:x?"eval-cheap-source-map":!1,context:j.resolvePath("."),output:{path:i!=null?i:j.resolvePath("build/"+C),hashDigestLength:12,publicPath:"auto",filename:f==="server"?"[name]-[contenthash].js":_1({mode:t,filename:r,singleBundle:n,packageName:_}),libraryTarget:f==="server"?"commonjs-module":void 0,assetModuleFilename:"static/media/[hash][ext][query]",chunkLoadingGlobal:l?`webpackChunk${_==null?void 0:_.split("-").join("_")}__${process.env.BUILD_ENV||process.env.NODE_ENV}__${process.env.VERSION}`:void 0},resolve:{extensions:[".js",".jsx",".ts",".tsx"],plugins:A},module:{rules:[{test:/\.(js|jsx)$/,use:require.resolve("source-map-loader"),include:/node_modules\/chayns-components/},{test:/\.(js|jsx|ts|tsx)$/,use:{loader:require.resolve("babel-loader"),options:{presets:[["chayns-toolkit/babel",g]],babelrc:!1,configFile:!1,compact:t==="production",cacheDirectory:!0,cacheIdentifier:w}},exclude:/node_modules/},{test:/\.(css|scss)/,use:[t==="development"||n?{loader:require.resolve("style-loader"),options:u?{insert:M}:void 0}:Mi.default.loader,{loader:require.resolve("css-loader"),options:{modules:{auto:!0,localIdentName:t==="development"?"[path][name]__[local]":"[hash:base64]",exportLocalsConvention:"camelCase"}}},{loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[["postcss-preset-env",{autoprefixer:{flexbox:"no-2009"},stage:2}],"postcss-flexbugs-fixes",t==="production"&&"cssnano",a&&["postcss-prefix-selector",{prefix:`.${_}`}]].filter(Boolean)}}},require.resolve("sass-loader")]},{test:/\.(png|jpe?g|gif|webp)$/i,type:"asset",parser:{dataUrlCondition:{maxSize:10*1024}}},{test:/\.svg$/,use:require.resolve("@svgr/webpack")}]},plugins:d,optimization:{splitChunks:l||n?!1:{chunks:"all"}},performance:!1}}function _1({mode:t,filename:e,singleBundle:r,packageName:n}){let i=r?"":"static/js/",s=e.replace("[package]",(0,Gl.paramCase)(n));return t==="development"?`${i}[name].bundle.js`:i+s}var _t=R(Kt()),D={path(t){return _t.default.hex("#16BDCA")(`\`${rn(t)}\``)},command(t){return _t.default.hex("#AC94FA")(`\`${rn(t)}\``)},code(t){return _t.default.hex("#76A9FA")(`\`${rn(t)}\``)},alt(t){return _t.default.hex("#97A6BA")(rn(t))},number(t){return _t.default.hex("#F17EB8")(t)}};function rn(t){return y1(t)?t[0]:t}function y1(t){return Array.isArray(t)}var Xg=R(require("webpack"));var W=R(zg()),AT=W.object({host:W.string().max(255).default("adaptive").required(),port:W.number().positive().max(65535).default(1234).required(),ports:W.object({client:W.number().positive().max(65535).default(1234).required(),server:W.number().positive().max(65535).default(1234).required()}).notRequired(),cert:W.string().notRequired(),key:W.string().notRequired()}).required().noUnknown(),CT=W.object({singleBundle:W.boolean().default(!1).required(),filename:W.string().default("[package].[contenthash].js").required(),path:W.string().notRequired(),injectCssInPage:W.boolean().notRequired(),prefixCss:W.boolean().notRequired(),exposeModules:W.object().notRequired(),injectChaynsCss:W.boolean().notRequired(),apiVersion:W.number().notRequired(),serverSideRendering:W.boolean().notRequired()}).required().noUnknown(),Kg=W.object({development:AT,output:CT,webpack:W.mixed().notRequired().default(null).test("is-function-or-null","${path} is not a function or null",t=>typeof t=="function"||t===null),jest:W.mixed().notRequired().default(null).test("is-function-or-null","${path} is not a function or null",t=>typeof t=="function"||t===null),webpackDev:W.mixed().notRequired().default(null)}).required().noUnknown();async function Yg(){var e;let t={};if(j.hasFile(wr))t=await Promise.resolve().then(()=>R(require(j.resolvePath(wr))));else if(j.hasFile(Jg)){let r=(e=await j.readFile(Jg))!=null?e:"{}";t=JSON.parse(r)}try{let r=await Kg.validate(t),{host:n,cert:i,key:s}=r.development;if(n==="adaptive"){let o=Boolean(i&&s);r.development.host=o?"0.0.0.0":"localhost"}return r}catch(r){let n=r,i="";throw n.errors.length&&n.errors.forEach(s=>{i+=`- ${s}
|
|
36
|
+
${m.substring($)}`}if(m){let $=t==="production"?{removeComments:!0,collapseWhitespace:!0,removeRedundantAttributes:!0,useShortDoctype:!0,removeEmptyAttributes:!0,removeStyleLinkTypeAttributes:!0,keepClosingSlash:!0,minifyJS:!0,minifyCSS:!0,minifyURLs:!0}:void 0;d.push(new Vl.default({templateContent:m,minify:$}))}if(e&&d.push(new Wl.BundleAnalyzerPlugin),t==="production"&&d.push(new Nl.CleanWebpackPlugin),Ml(t),t==="development"&&d.push(new Il.default({overlay:!1})),!_)throw Error("The name field in package.json has to be provided.");!n&&t!=="development"&&d.push(new Mi.default({filename:`static/css/${_}.[contenthash].css`,chunkFilename:`static/css/${_}.[chunkhash].chunk.css`}));let x=t!=="production",g=Xt({packageJson:s}),w=Hl.createHash("md5").update([JSON.stringify(g),process.env.BABEL_ENV,process.env.NODE_ENV,Ll.version].join("--")).digest("hex"),A=[];j.hasFile("jsconfig.json")?A.push(new Di.default({configFile:"jsconfig.json",extensions:[".js",".jsx"]})):j.hasFile("tsconfig.json")&&A.push(new Di.default({extensions:[".js",".jsx",".ts",".tsx"]}));function M($){let Q=this.domAPI.moduleCss||document.querySelector(".module-css:not(.injected)");this.domAPI.moduleCss=Q,Q?(Q.appendChild($),Q.classList.add("injected")):document.head.appendChild($)}let C="";return f==="client"?C="client/":f==="server"&&(C="server/"),{entry:!h||!l||j.hasFile("src/index.js")||j.hasFile("src/index.jsx")||j.hasFile("src/index.ts")||j.hasFile("src/index.tsx")?{index:j.resolvePath("src/index")}:{},mode:t,target:f==="server"?"async-node":t==="development"?"web":"browserslist",devtool:x?"eval-cheap-source-map":!1,context:j.resolvePath("."),output:{path:i!=null?i:j.resolvePath("build/"+C),hashDigestLength:12,publicPath:f==="server"?void 0:"auto",filename:f==="server"?"[name]-[contenthash].js":_1({mode:t,filename:r,singleBundle:n,packageName:_}),libraryTarget:f==="server"?"commonjs-module":void 0,assetModuleFilename:"static/media/[hash][ext][query]",chunkLoadingGlobal:l?`webpackChunk${_==null?void 0:_.split("-").join("_")}__${process.env.BUILD_ENV||process.env.NODE_ENV}__${process.env.VERSION}`:void 0},resolve:{extensions:[".js",".jsx",".ts",".tsx"],plugins:A},module:{rules:[{test:/\.(js|jsx)$/,use:require.resolve("source-map-loader"),include:/node_modules\/chayns-components/},{test:/\.(js|jsx|ts|tsx)$/,use:{loader:require.resolve("babel-loader"),options:{presets:[["chayns-toolkit/babel",g]],babelrc:!1,configFile:!1,compact:t==="production",cacheDirectory:!0,cacheIdentifier:w}},exclude:/node_modules/},{test:/\.(css|scss)/,use:[t==="development"||n?{loader:require.resolve("style-loader"),options:u?{insert:M}:void 0}:Mi.default.loader,{loader:require.resolve("css-loader"),options:{modules:{auto:!0,localIdentName:t==="development"?"[path][name]__[local]":"[hash:base64]",exportLocalsConvention:"camelCase"}}},{loader:require.resolve("postcss-loader"),options:{postcssOptions:{plugins:[["postcss-preset-env",{autoprefixer:{flexbox:"no-2009"},stage:2}],"postcss-flexbugs-fixes",t==="production"&&"cssnano",a&&["postcss-prefix-selector",{prefix:`.${_}`}]].filter(Boolean)}}},require.resolve("sass-loader")]},{test:/\.(png|jpe?g|gif|webp)$/i,type:"asset",parser:{dataUrlCondition:{maxSize:10*1024}}},{test:/\.svg$/,use:require.resolve("@svgr/webpack")}]},plugins:d,optimization:{splitChunks:l||n?!1:{chunks:"all"}},performance:!1}}function _1({mode:t,filename:e,singleBundle:r,packageName:n}){let i=r?"":"static/js/",s=e.replace("[package]",(0,Gl.paramCase)(n));return t==="development"?`${i}[name].bundle.js`:i+s}var _t=R(Kt()),D={path(t){return _t.default.hex("#16BDCA")(`\`${rn(t)}\``)},command(t){return _t.default.hex("#AC94FA")(`\`${rn(t)}\``)},code(t){return _t.default.hex("#76A9FA")(`\`${rn(t)}\``)},alt(t){return _t.default.hex("#97A6BA")(rn(t))},number(t){return _t.default.hex("#F17EB8")(t)}};function rn(t){return y1(t)?t[0]:t}function y1(t){return Array.isArray(t)}var Xg=R(require("webpack"));var W=R(zg()),AT=W.object({host:W.string().max(255).default("adaptive").required(),port:W.number().positive().max(65535).default(1234).required(),ports:W.object({client:W.number().positive().max(65535).default(1234).required(),server:W.number().positive().max(65535).default(1234).required()}).notRequired(),cert:W.string().notRequired(),key:W.string().notRequired()}).required().noUnknown(),CT=W.object({singleBundle:W.boolean().default(!1).required(),filename:W.string().default("[package].[contenthash].js").required(),path:W.string().notRequired(),injectCssInPage:W.boolean().notRequired(),prefixCss:W.boolean().notRequired(),exposeModules:W.object().notRequired(),injectChaynsCss:W.boolean().notRequired(),apiVersion:W.number().notRequired(),serverSideRendering:W.boolean().notRequired()}).required().noUnknown(),Kg=W.object({development:AT,output:CT,webpack:W.mixed().notRequired().default(null).test("is-function-or-null","${path} is not a function or null",t=>typeof t=="function"||t===null),jest:W.mixed().notRequired().default(null).test("is-function-or-null","${path} is not a function or null",t=>typeof t=="function"||t===null),webpackDev:W.mixed().notRequired().default(null)}).required().noUnknown();async function Yg(){var e;let t={};if(j.hasFile(wr))t=await Promise.resolve().then(()=>R(require(j.resolvePath(wr))));else if(j.hasFile(Jg)){let r=(e=await j.readFile(Jg))!=null?e:"{}";t=JSON.parse(r)}try{let r=await Kg.validate(t),{host:n,cert:i,key:s}=r.development;if(n==="adaptive"){let o=Boolean(i&&s);r.development.host=o?"0.0.0.0":"localhost"}return r}catch(r){let n=r,i="";throw n.errors.length&&n.errors.forEach(s=>{i+=`- ${s}
|
|
37
37
|
`}),Error(i)}}var Jg="chayns-toolkit.json",wr="toolkit.config.js";function Er({config:t,dev:e,target:r,modifier:n}){if(!n)return t;let i=n(t,{webpack:Xg.default,target:r,dev:e});if(i===void 0)throw Error(`The webpack customization function in your ${D.path(wr)} returned nothing.`);if(typeof i!="object")throw Error(`The webpack customization function in your ${D.path(wr)} returned an invalid configuration.`);return i}var Ar=R(Kt()),q={info(t){console.info(`${Ar.default.hex("#76A9FA")("info ")} - ${t}`)},hint(t){console.info(`${Ar.default.hex("#31C48D")("hint ")} - ${t}`)},warn(t){console.info(`${Ar.default.hex("#FACA15")("warn ")} - ${t}`)},error(t){console.info(`${Ar.default.hex("#F98080")("error")} - ${t}`)},blank(t){console.info(` ${t}`)},exit(t){console.info(""),t?process.exit(t):process.exit()}};function Zg(t){return new Promise((e,r)=>{t.run((n,i)=>{n?r(n):i?e(i):r(Error("No stats available."))})})}function Qg(t){return new Promise((e,r)=>{t.close(n=>{n?r(n):e()})})}var Mt=()=>{let t=new URL("https://domain.chayns.net/css/".replace("domain","api")),e=new URLSearchParams(window.location.search.toLowerCase());t.searchParams.set("siteId",e.get("stylesiteid")||e.get("siteid")||""),e.has("colormode")&&t.searchParams.set("colormode",e.get("colormode")||""),e.has("color")&&t.searchParams.set("color",e.get("color")||"");let r="hidden",n=o=>{document.documentElement.style.visibility=o?"":r,document.documentElement.style.overflow=o?"":r};n(!1);let i=document.getElementsByTagName("HEAD")[0],s=document.createElement("link");return s.rel="stylesheet",s.type="text/css",s.href=t.toString(),s.onload=()=>{n(!0)},s.onerror=()=>{n(!0)},i.appendChild(s),""};function r_({analyze:t}){return async({config:e,packageJson:r})=>{var i;process.env.BABEL_ENV="production",process.env.NODE_ENV="production";let n=e.output.serverSideRendering?["server","client"]:[null];for(let s of n){let o=await tn({mode:"production",analyze:t,outputFilename:e.output.filename,singleBundle:e.output.singleBundle,path:e.output.path&&s?`${e.output.path}/${s}`:e.output.path,packageJson:r,prefixCss:e.output.prefixCss,injectCssInPage:e.output.injectCssInPage,injectChaynsCss:e.output.injectChaynsCss,exposeModules:e.output.exposeModules,apiVersion:e.output.apiVersion,target:s});if(typeof e.webpack=="function"){let h=e.webpack;o=Er({config:o,dev:!1,modifier:h,target:s!=null?s:"client"})}o.plugins=(i=o.plugins)==null?void 0:i.map(h=>{var f,_;return typeof h=="object"&&typeof h.userOptions=="object"&&(((f=h.userOptions)==null?void 0:f.template)?(typeof h.userOptions.templateParameters!="object"&&(h.userOptions.templateParameters={}),h.userOptions.templateParameters.CHAYNS_TOOLKIT_CSS_TAG=`<script>(${Mt.toString()})()<\/script>`):((_=h.userOptions)==null?void 0:_.templateContent)&&(h.userOptions.templateContent=h.userOptions.templateContent.replace("<%= CHAYNS_TOOLKIT_CSS_TAG %>",`<script>(${Mt.toString()})()<\/script>`))),h});let a=(0,t_.default)(o),u=Date.now();q.info("Bundling your code...");let l=await Zg(a),c=(Date.now()-u)/1e3;if(await Qg(a),l==null?void 0:l.hasErrors())q.error(`Compilation failed.
|
|
38
38
|
`),l.compilation.errors.forEach(h=>{console.error(h)}),q.exit(1);else{let h=l==null?void 0:l.toJson(),{assets:f}=h;if(q.info(`Finished build in ${D.number(c.toFixed(2))} seconds. These files were emitted:`),console.info(""),f){let _=new e_.default(te(B({},OT),{colAligns:["left","right"]}));f.forEach(d=>{let m="B",x=d.size;d.size>1e6?(m="mB",x=d.size/1e6):d.size>1e3&&(m="kB",x=d.size/1e3);let g=`${x.toLocaleString("en-US",{maximumFractionDigits:2})} ${m}`,w=" ";d.size>5e5&&(w=Us.default.yellow("!")),d.size>1e6&&(w=Us.default.redBright("!")),_.push([d.name,g,w])}),console.info(_.toString())}}}}}var OT={chars:{top:"","top-mid":"","top-left":"","top-right":"",bottom:"","bottom-mid":"","bottom-left":"","bottom-right":"",left:"","left-mid":"",mid:"","mid-mid":"",right:"","right-mid":"",middle:" "},style:{"padding-left":0,"padding-right":0}};var n_=R(require("child_process")),i_=R(require("path")),s_=R(require("webpack")),o_=R(require("webpack-dev-server"));var rt={install(t,e,r=!1){let n="npm i ";return t==="yarn"&&(n="yarn add "),Array.isArray(e)?n+=e.join(" "):n+=e,r&&(n+=" -D"),D.command(n)},remove(t,e){let r=t==="yarn"?"yarn remove ":"npm remove ";return r+=Array.isArray(e)?e.join(" "):e,D.command(r)},move(t,e,r){let n=Array.isArray(e)?e.join(" "):e;return t==="yarn"?D.command(`yarn remove ${n} && yarn add ${n}${r==="dev"?" -D":""}`):D.command(`npm install ${n}${r==="dev"?" -D":""}`)}};function a_({devtools:t}){return async({config:e,packageJson:r,packageManager:n})=>{var c;process.env.BABEL_ENV="development",process.env.NODE_ENV="development";let i=e.output.serverSideRendering?["server","client"]:[null],{port:s,host:o,cert:a,key:u,ports:l}=e.development;for(let h of i){let f=await tn({analyze:!1,mode:"development",outputFilename:e.output.filename,singleBundle:e.output.singleBundle,packageJson:r,injectDevtoolsScript:t,prefixCss:e.output.prefixCss,injectCssInPage:e.output.injectCssInPage,injectChaynsCss:e.output.injectChaynsCss,exposeModules:e.output.exposeModules,apiVersion:e.output.apiVersion,target:h});if(typeof e.webpack=="function"){let g=e.webpack;f=Er({config:f,dev:!0,modifier:g,target:h!=null?h:"client"})}f.plugins=(c=f.plugins)==null?void 0:c.map(g=>{var w,A;return typeof g=="object"&&typeof g.userOptions=="object"&&(((w=g.userOptions)==null?void 0:w.template)?(typeof g.userOptions.templateParameters!="object"&&(g.userOptions.templateParameters={}),g.userOptions.templateParameters.CHAYNS_TOOLKIT_CSS_TAG=`<script>(${Mt.toString()})()<\/script>`):((A=g.userOptions)==null?void 0:A.templateContent)&&(g.userOptions.templateContent=g.userOptions.templateContent.replace("<%= CHAYNS_TOOLKIT_CSS_TAG %>",`<script>(${Mt.toString()})()<\/script>`))),g}),t&&("react-devtools"in(r.dependencies||{})?(q.error(`You added ${D.code`react-devtools`} as a regular dependency.`),q.blank(`Install it under ${D.code`devDependencies`} by running ${rt.move(n,"react-devtools","dev")}.
|
|
39
39
|
`),process.exit(1)):"react-devtools"in(r.devDependencies||{})||(q.error(`You need to install the ${D.code`react-devtools`} package to use the ${D.command`--devtools`} option.`),q.blank(`Run ${rt.move(n,"react-devtools","dev")} to add it as a ${D.code`devDependency`}.
|
|
@@ -49,7 +49,7 @@ ${m.substring($)}`}if(m){let $=t==="production"?{removeComments:!0,collapseWhite
|
|
|
49
49
|
module.exports = `;var Js=R(require("fs"));function __({config:t}){let{cert:e,key:r}=t.development,n=!1;return r&&!e||!r&&e?(q.error(`You have specified the ${D.code(r?"key":"cert")} field in your ${D.path`chayns-toolkit.json`} file, but not ${D.code(r?"cert":"key")}. You need to specify paths in both fields for SSL to work.`),n=!0):(r&&(Js.existsSync(r)||(q.error(`No file exists at the ${D.code`key`} path specified in ${D.path`chayns-toolkit.json`}.`),n=!0)),e&&(Js.existsSync(e)||(q.error(`No file exists at the ${D.code`cert`} path specified in ${D.path`chayns-toolkit.json`}.`),n=!0))),n}var y_=R(require("fs")),b_=R(require("path")),v_=R(require("util")),RT=(0,v_.promisify)(y_.readFile);async function Xs(t){let e=b_.resolve("package.json"),r=await RT(e,{encoding:"utf-8"}),n=JSON.parse(r),i=Object.keys(B(B({},n.dependencies),n.devDependencies));return Array.isArray(t)?i.filter(s=>t.some(o=>x_(o)?o.test(s):o===s)):x_(t)?i.some(s=>t.test(s)):i.includes(t)}function x_(t){return Object.prototype.toString.call(t)==="[object RegExp]"}async function S_(t){let e=await Xs("@types/react"),r=await Xs("@types/react-dom"),n=[!e&&"@types/react",!r&&"@types/react-dom"].filter(Boolean);if(n.length>0){let i=n.map(s=>D.code(s)).join(" and ");q.hint(`You should install the ${i} package${n.length>0?"s":""} to get TypeScript support for React.
|
|
50
50
|
`),t!==void 0&&q.blank(`Install them by running ${rt.install(t,n,!0)}`)}}async function w_(){var n;if(!j.hasFile("tsconfig.json"))return!0;let r=((n=await j.readFile("tsconfig.json"))!=null?n:"").replace(/\s/gi,"");return r===""||r==="{}"}var kb=R(qb());async function Mb(){return j.hasFile("tsconfig.json")?!0:(await(0,kb.default)("src/**/*.{ts,tsx}")).length>0}async function Db({packageJson:t,packageManager:e}){let r=Qr(t,"typescript"),n=await w_();return r?(await S_(e),n&&await jb(),!1):await Mb()?(n&&await jb(),q.error(`To use TypeScript, you have to install the ${D.code`typescript`} package by running ${rt.install(e,"typescript",!0)}.`),!0):!1}async function jb(){await j.writeFile("tsconfig.json",JSON.stringify(CM,void 0,4)),q.info(`Seems like you want to use TypeScript. A ${D.path`tsconfig.json`} file has been set up for you.`)}var CM={compilerOptions:{allowJs:!0,allowSyntheticDefaultImports:!0,checkJs:!1,esModuleInterop:!0,experimentalDecorators:!0,isolatedModules:!0,jsx:"react",lib:["DOM","ESNext"],noEmit:!0,skipLibCheck:!0,strict:!0}};var ai=R(require("tcp-port-used"));async function $b({config:t}){let{port:e,host:r}=t.development;if(await(0,ai.check)(e,r)){q.warn(`The port ${D.number(e)} on host ${D.code(r)} is already in use. Waiting for it to free up...`);try{return await(0,ai.waitUntilFreeOnHost)(e,r,500,6e4),q.info("Is has freed up. Starting the development server..."),!1}catch{return q.error("The port did not free up within 60 seconds."),!0}}return!1}function Lb(){let t=OM.some(r=>j.hasFile(r)),e=PM.some(r=>j.hasFile(r));if(t&&e&&(q.warn(`You have both ${D.path`package-lock.json`} and ${D.path`yarn.lock`} files in your project.
|
|
51
51
|
`),q.blank("Decide on wether you want to use Yarn or NPM and remove one of the lockfiles.")),t)return"npm";if(e)return"yarn"}var OM=["./package-lock.json","../package-lock.json","../../package-lock.json"],PM=["./yarn.lock","../yarn.lock","../../yarn.lock"];async function Ib(){let t=await j.readFile("package.json");if(t===null)throw Error("No package.json file was found.");return JSON.parse(t)}async function Tr(...t){let e;try{e=await Yg()}catch(s){let o=s;q.error(`An error occured while loading the ${D.path`chayns-toolkit.json`} file:
|
|
52
|
-
`),q.blank(o.message);return}let[r,n]=await Promise.all([Ib(),Lb()]),i=!0;for(let s of t)if(i){for(let o of s)await o({config:e,packageJson:r,packageManager:n})&&(i=!1);t.indexOf(s)!==t.length-1&&q.blank("")}}var at=new Nb.Command;at.version("2.1.0-
|
|
52
|
+
`),q.blank(o.message);return}let[r,n]=await Promise.all([Ib(),Lb()]),i=!0;for(let s of t)if(i){for(let o of s)await o({config:e,packageJson:r,packageManager:n})&&(i=!1);t.indexOf(s)!==t.length-1&&q.blank("")}}var at=new Nb.Command;at.version("2.1.0-13","-v, --version","output the version number");at.command("dev").description("start up a development server with hot module replacement").option("-d, --devtools","open react-devtools in a separate window",!1).action(async t=>{await Tr([g_,Db,__,$b],[a_({devtools:t.devtools})])});at.command("build").description("bundles your code for production").option("-a, --analyze","analyze your bundle size",!1).action(async t=>{try{await Tr([r_({analyze:t.analyze})])}catch(e){q.error(e)}console.info("")});at.command("serve").description("serves the files from a local build folder").action(async()=>{try{await Tr([p_()])}catch(t){q.error(t)}});at.command("lint").description("lints your code for possible errors").action(async()=>{await u_(),console.info("")});at.command("test").description("executes all Jest tests for this project").option("-w, --watch","watch for changes to rerun tests",!1).option("--setupFile <path>","file that should be executed before the tests are initialized","").action(async t=>{try{await Tr([m_(t)])}catch(e){q.error(e)}console.info("")});at.parse(process.argv);
|
|
53
53
|
/*!
|
|
54
54
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
55
55
|
*
|