xmcp 0.4.0 → 0.4.1-alpha.1
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/dist/cli.js +36677 -3
- package/dist/cli.js.map +1 -0
- package/dist/detached-flush.js +2 -0
- package/package.json +9 -2
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;ACVa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,+BAA+B,GAAG,2BAA2B;AAC7D,WAAW,mBAAO,CAAC,cAAI;AACvB,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA,+BAA+B;;;;;;;;;;;;AClBlB;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0CAA0C;AAC1C;AACA;AACA,oGAAoG,sBAAsB;AAC1H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;;;;;;;;;;;;AChB7B;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,GAAG,mBAAmB,GAAG,eAAe;AACxD,cAAc,mBAAO,CAAC,qIAAmB;AACzC,aAAa,mBAAO,CAAC,mIAAkB;AACvC,mBAAmB,mBAAO,CAAC,uHAAY;AACvC,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA,mBAAmB;AACnB,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,GAAG,4BAA4B,GAAG,YAAY;AAC7D,eAAe,mBAAO,CAAC,oHAAkB;AACzC,YAAY,mBAAO,CAAC,oGAAc;AAClC,oBAAoB,mBAAO,CAAC,0HAAc;AAC1C,cAAc,mBAAO,CAAC,wHAAU;AAChC,eAAe,mBAAO,CAAC,6HAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,qCAAqC,qBAAqB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;;;;;;;;;;;ACZX;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,GAAG,4BAA4B,GAAG,YAAY;AAC7D,eAAe,mBAAO,CAAC,oHAAkB;AACzC,oBAAoB,mBAAO,CAAC,0HAAc;AAC1C,cAAc,mBAAO,CAAC,wHAAU;AAChC,eAAe,mBAAO,CAAC,6HAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA,yDAAyD,qBAAqB;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;;;;;;;;;;;;ACtBC;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,WAAW,mBAAO,CAAC,uHAAe;AAClC;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACfF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,YAAY;AACvE,gBAAgB,mBAAO,CAAC,+HAAmB;AAC3C,iBAAiB,mBAAO,CAAC,iIAAoB;AAC7C,eAAe,mBAAO,CAAC,6HAAkB;AACzC,mBAAmB,mBAAO,CAAC,iHAAY;AACvC,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,mBAAO,CAAC,4HAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7Ba;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,mBAAO,CAAC,sBAAQ;AACjC,gBAAgB,mBAAO,CAAC,4HAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACjCF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,0HAAiB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACbF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,mBAAO,CAAC,sBAAQ;AACjC,kBAAkB,mBAAO,CAAC,6HAAqB;AAC/C,cAAc,mBAAO,CAAC,gFAAO;AAC7B,eAAe,mBAAO,CAAC,qHAAU;AACjC,iBAAiB,mBAAO,CAAC,qHAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;AChGF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB,GAAG,mCAAmC,GAAG,uBAAuB,GAAG,oBAAoB;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;;;;;;;;;;;AC9BX;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,qHAAU;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACVF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,6HAAqB;AAC/C,eAAe,mBAAO,CAAC,qHAAU;AACjC,iBAAiB,mBAAO,CAAC,qHAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B,iBAAiB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;AC1DF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa,mBAAO,CAAC,kBAAM;AAC3B,kBAAkB,mBAAO,CAAC,6HAAqB;AAC/C;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;;;;;;;ACzB0B;AACJ;;AAErC;;AAEe;AACf;;AAEA;;AAEA;AACA;AACA,6DAA6D,cAAc;AAC3E;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA,0FAA0F,uDAAU;AACpG,IAAI;AACJ;AACA,mBAAmB,yDAAY;AAC/B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;AC3Ca;;AAEb,8CAA6C,EAAE,aAAa,EAAC;;AAE7D,kBAAkB,mBAAO,CAAC,2FAAW;AACrC,sBAAsB,mBAAO,CAAC,0GAAgB;;AAE9C;AACA,aAAa,iCAAiC;AAC9C,aAAa,0BAA0B;AACvC,aAAa,mCAAmC;AAChD;AACA;AACA,yBAAyB;AACzB;;AAEA;AACA,WAAW,iBAAiB;AAC5B,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,iBAAiB;AAC5B,WAAW,iBAAiB;AAC5B,WAAW,cAAc;AACzB,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,4BAA4B;AAClD;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB,yBAAyB;AAC/C;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,WAAW,iBAAiB;AAC5B,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,+CAA+C,sBAAsB;AACrE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;ACvGa;AACb,gBAAgB,mBAAO,CAAC,8FAAY;;AAEpC;AACA;AACA;;;;;;;;;;;;ACLa;;AAEb;;AAEA;AACA;AACA;;AAEA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,EAAE;AACF;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,EAAE;AACF;AACA;;;;;;;;;;;AC7DA;AACA,cAAc,mBAAO,CAAC,gFAAO;;AAE7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC5Da;AACb;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;AC7DA,8KAAoD;;;;;;;;;;;ACApD,gBAAgB,mBAAO,CAAC,8FAAY;AACpC,eAAe,mBAAO,CAAC,0GAAgB;;AAEvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;AACvB,uBAAuB;AACvB;AACA;AACA;;AAEA;AACA;AACA,mCAAmC;AACnC,oCAAoC;AACpC;AACA;AACA;;;AAGA;AACA;AACA,wCAAwC,GAAG,IAAI;AAC/C;AACA;AACA;;AAEA;AACA,qBAAqB,KAAK;;AAE1B;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qBAAqB,aAAa;AAClC;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,+BAA+B;AAC/B,uCAAuC,GAAG;AAC1C,YAAY,GAAG,yBAAyB;AACxC;AACA;AACA,8BAA8B;AAC9B,cAAc,GAAG;AACjB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,WAAW,YAAY;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,qBAAqB,KAAK;AAC1B;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ,EAAE;AACV,gCAAgC;AAChC,sBAAsB;AACtB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,YAAY,KAAK,QAAQ,EAAE,IAAI,EAAE;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,oCAAoC,0BAA0B;AAC9D;;AAEA,kBAAkB,cAAc;AAChC,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACvMa;;AAEb,kBAAkB,mBAAO,CAAC,mGAAiB;AAC3C,gBAAgB,mBAAO,CAAC,+FAAe;AACvC,eAAe,mBAAO,CAAC,6FAAc;AACrC,cAAc,mBAAO,CAAC,2FAAa;;AAEnC;AACA;AACA;AACA;AACA;AACA,wBAAwB,MAAM,KAAK,eAAe,IAAI;AACtD,wBAAwB,MAAM,KAAK;AACnC;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;;AAEA,mCAAmC;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gCAAgC,I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/D;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC3Da;;AAEb;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,QAAQ;AACpC;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxDa;;AAEb,aAAa,mBAAO,CAAC,8FAAY;AACjC,kBAAkB,mBAAO,CAAC,+FAAa;AACvC,cAAc,mBAAO,CAAC,uFAAS;;AAE/B;AACA;;AAEA;AACA;;AAEA;AACA;AACA,uDAAuD,EAAE,KAAK;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,iEAAiE,EAAE,KAAK;AACxE;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAiC;AACjC;;AAEA,iCAAiC;AACjC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iCAAiC;AACjC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oBAAoB,uBAAuB;AAC3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AChHa;;AAEb,kBAAkB,mBAAO,CAAC,+FAAa;;AAEvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,+FAAa;;AAEzB;AACA;AACA;;AAEA,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,aAAa,6BAA6B,IAAI;AACzF;;AAEA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,aAAa;;AAEtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,sEAAsE;AACnF;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,mCAAmC;AAChD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,aAAa,qBAAqB;AAClC;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qBAAqB,0BAA0B;AAC/C;AACA,aAAa,qBAAqB;AAClC;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,aAAa,qBAAqB;AAClC;AACA;;AAEA;AACA,2BAA2B;AAC3B;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;;AAEA;AACA,4BAA4B;AAC5B;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;;AAEA;AACA;AACA;;AAEA,aAAa,aAAa;AAC1B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+BAA+B,uCAAuC;AACtE;;AAEA,aAAa,sBAAsB;AACnC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe,qBAAqB;AACpC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,oBAAoB;AACjC;AACA;;AAEA;AACA;AACA;;AAEA,WAAW,qBAAqB;AAChC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ,SAAS,aAAa;AACtB;AACA;;AAEA;;;;;;;;;;;;AC1Ua;;AAEb,cAAc,mBAAO,CAAC,uFAAS;;AAE/B,mCAAmC;AACnC,sCAAsC;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;AC9Ba;;AAEb,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,YAAY;;AAEZ;AACA;AACA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,cAAc;AACd;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA,oBAAoB,gBAAgB;AACpC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACzHsC;AACM;AAIpB;;AAExB,OAAO,0CAA0C,EAAE,uDAAa;;AAEhE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,0CAA0C;AAC1C;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,gDAAgD,oDAAU;AAC1D;AACA;AACA;AACA,2CAA2C,eAAe;AAC1D;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,0CAA0C,eAAe;AACzD;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA,UAAU,oDAAU;AACpB;;AAEA;AACA,UAAU,oDAAU,eAAe,oDAAU;AAC7C;;AAEA,SAAS,oDAAU,YAAY,oDAAU;AACzC;;AAEA;AACA,6CAA6C,oDAAU;AACvD;;AAEA,QAAQ,oDAAU;AAClB;;AAEA;;AAEA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA,kGAAkG,oDAAU;AAC5G;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,UAAU,OAAO;AACjB;AACA,oGAAoG,oDAAU;AAC9G;AACA;AACA,GAAG;AACH;AACA;;AAEA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH,EAAE;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,QAAQ,mBAAmB;AAC3B;AACA;AACA;AACA;AACA;AACA,YAAY,+DAAgB;;AAE5B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,6EAA8B;AACzC;;AAEA;AACA;;AAEA;;AAEA;AACO,iCAAiC,2CAA2C;;AAa5C;;AAKrC;;AAEF,iEAAe,KAAK,EAAC;;;;;;;;;;;;;;;;;AChOrB;AACO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;;;;;;;;;;;;;;;;;;;AChCA;;AAEA,qDAAqD,cAAc;;AAEnE,sDAAsD,aAAa,EAAE,EAAE,KAAK;;AAE5E,oEAAoE,aAAa,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK;;AAE1G;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;;AAEO;AACA;AACA;AACA;;AAEP;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B,qBAAqB,SAAS;AAC9B;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,EAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA;AACA,6BAA6B,EAAE,SAAS,EAAE;AAC1C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAI;AACJ;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH,EAAE;;AAEF;AACA;;AAEA;;AAEA,iEAAe,UAAU,EAAC;;;;;;;;;;;;;;;;;;;;AC9NS;AACV;AACE;;AAE3B;AACA;AACA,uEAAuE,8CAAY;AACnF;AACA;AACA;AACA;AACA;;AAEA,OAAO,KAAK,EAAE,yCAAO;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qCAAqC,gCAAgC,IAAI;AACzE;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,KAAK,kDAAgB;AACrB;AACA;AACA,oBAAoB,4CAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,iCAAiC,GAAG;AACpC;;AAEA;AACA;AACA;;AAE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Ac,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA,8DAA8D,MAAM;AACpE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc,MAAM;AACpB,cAAc,WAAW;AACzB;AACA;AACA;AACA,aAAa,MAAM;AACnB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;;AAEA;AACA,WAAW,OAAO;AAClB;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB;AACA;AACA;;AAEA;AACA,eAAe;AACf;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;;AAEA;AACA,yCAAyC;;AAEzC,aAAa,uBAAuB;AACpC;AACA,aAAa,oBAAoB;AACjC;AACA,aAAa,aAAa;AAC1B;;AAEA,aAAa,wBAAwB;AACrC;;AAEA,aAAa,2BAA2B;AACxC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,WAAW,kBAAkB;AAC7B,WAAW,SAAS,kBAAkB;AACtC,WAAW,UAAU,mBAAmB;AACxC,aAAa,WAAW;AACxB;AACA;AACA,SAAS,sBAAsB;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,kBAAkB;AAC7B,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA,SAAS,KAAK;;AAEd;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA,aAAa,cAAc;AAC3B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,IAAI;AACjB,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,WAAW;AACtB,WAAW,MAAM;AACjB,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,OAAO;AAClB,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA;;AAEA,aAAa,mBAAmB;AAChC;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,WAAW;AACtB,WAAW,UAAU;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,WAAW;AACtB,aAAa;AACb;AACA;AACA;AACA;AACA,WAAW,KAAK;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,SAAS;AACpB,aAAa,aAAa;AAC1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB;AACA;AACA;AACA;AACA;AACA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AEb,WAAW,mBAAO,CAAC,cAAI;AACvB,gBAAgB,mBAAO,CAAC,kBAAM;AAC9B,QAAQ,YAAY,EAAE,mBAAO,CAAC,kBAAM;;AAEpC;AACA;AACA,aAAa,mBAAO,CAAC,uIAAU;AAC/B,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,mGAAa;;AAEzB,2CAA2C,GAAG;;AAE9C;AACA;AACA;;AAEA,sBAAsB;;AAEtB;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,eAAe,iBAAiB;AAChC;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,cAAc,iBAAiB;AAC/B;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,mBAAmB;AAC9B,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,UAAU;;AAEzB;AACA;AACA;AACA;AACA;;AAEA;AACA,UAAU;AACV;AACA;AACA,OAAO;AACP;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;;AAEA;AACA,qBAAqB;;;;;;;;;;;;AC7gBR;;AAEb,WAAW,mBAAO,CAAC,cAAI;AACvB,gBAAgB,mBAAO,CAAC,kBAAM;AAC9B,QAAQ,YAAY,EAAE,mBAAO,CAAC,kBAAM;AACpC,qBAAqB,mBAAO,CAAC,0GAAgB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,mGAAa;;AAEzB;;AAEA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB;;AAEtB;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA,aAAa,QAAQ;AACrB;;AAEA;;AAEA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,KAAK;AACnB,cAAc,KAAK;AACnB,cAAc,KAAK;AACnB,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB;;AAEA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,WAAW,UAAU;AACrB,aAAa,cAAc;AAC3B;AACA;AACA;AACA;AACA,+BAA+B,kBAAkB;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,QAAQ;AACnB,WAAW,IAAI;AACf,WAAW,IAAI;AACf,WAAW,IAAI;AACf;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA,SAAS,kCAAkC;AAC3C;;AAEA,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,UAAU;AACvB;AACA;AACA,SAAS,sBAAsB;AAC/B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,WAAW;AACtD,SAAS;AACT;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,WAAW,8BAA8B;AACzC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,kBAAkB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,OAAO;AACP;AACA,OAAO;;AAEP;;AAEA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,aAAa,mBAAmB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;;;;;AC7oBY;;AAEZ,gBAAgB,mBAAO,CAAC,gGAAgB;;AAExC;;AAEA;AACA,4CAA2C;AAC3C;AACA;AACA,GAAG;AACH,CAAC,EAAC;;AAEF,YAAY;AACZ,YAAY;AACZ,UAAU;;AAEV;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;;AAEA,IAAI,YAAY;AAChB,IAAI,YAAY;AAChB,IAAI,UAAU;AACd,GAAG;AACH;;AAEA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,WAAW;AACX,UAAU;AACV,qBAAqB;AACrB;AACA;AACA,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA,SAAS;AACT,QAAQ;AACR,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvGoB;AACkC;;AAEtD;AACA;AACA,uBAAuB,uCAAU,wBAAwB,uCAAU;;AAEpD,4BAA4B,0BAA0B,IAAI;AACzE,2DAA2D,gEAAkB,+BAA+B;;AAE5G;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;;;;;;;;;;;;ACjDa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,0BAA0B;;AAE1B,WAAW,mBAAO,CAAC,yEAAK;;AAExB,mCAAmC,mBAAO,CAAC,kBAAM;;AAEjD,uCAAuC,uCAAuC;;AAE9E;AACA;AACA;AACA;AACA;;AAEA;AACA,qEAAqE;AACrE;;AAEA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,gDAAgD,SAAS,EAAE,SAAS;AACpE,SAAS;AACT;AACA,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA,0BAA0B;AAC1B,gD;;;;;;;;;;;;;;;;;;;;;;;;;;AC9NmC;;AAEnC;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,EAAE,sCAAS;;;;;;;;;;;ACfb,QAAQ,WAAW,EAAE,mBAAO,CAAC,2GAAmB;AAChD,QAAQ,UAAU,EAAE,mBAAO,CAAC,yGAAkB;AAC9C,QAAQ,uCAAuC,EAAE,mBAAO,CAAC,qGAAgB;AACzE,QAAQ,OAAO,EAAE,mBAAO,CAAC,mGAAe;AACxC,QAAQ,SAAS,EAAE,mBAAO,CAAC,uGAAiB;;AAE5C;AACA;AACA;;AAEA;AACA,eAAe,YAAY;AAC3B;;AAEA;AACA;AACA;;AAEA,eAAe;AACf,cAAc;AACd,gBAAgB;AAChB,YAAY;;AAEZ,sBAAsB;AACtB,4BAA4B;AAC5B,kCAAkC,yBAAyB;;;;;;;;;;;ACzB3D,QAAQ,uBAAuB,EAAE,mBAAO,CAAC,iGAAY;;AAErD;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,QAAQ;AACrB,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc;AACd;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA,8DAA8D,2BAA2B;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY;AACZ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB;AAChB,4BAA4B;;;;;;;;;;;AChJ5B,qBAAqB,0DAA8B;AACnD,qBAAqB,mBAAO,CAAC,oCAAe;AAC5C,aAAa,mBAAO,CAAC,kBAAM;AAC3B,WAAW,mBAAO,CAAC,cAAI;AACvB,gBAAgB,mBAAO,CAAC,wBAAS;;AAEjC,QAAQ,iCAAiC,EAAE,mBAAO,CAAC,uGAAe;AAClE,QAAQ,iBAAiB,EAAE,mBAAO,CAAC,iGAAY;AAC/C,QAAQ,OAAO,EAAE,mBAAO,CAAC,+FAAW;AACpC,QAAQ,wCAAwC,EAAE,mBAAO,CAAC,mGAAa;AACvE,QAAQ,iBAAiB,EAAE,mBAAO,CAAC,gHAAkB;;AAErD;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA,eAAe,WAAW;AAC1B;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA,eAAe,YAAY;AAC3B;AACA,2CAA2C;AAC3C,eAAe,UAAU;AACzB,oBAAoB;AACpB;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA,iCAAiC;AACjC,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA,+BAA+B;AAC/B,eAAe,kBAAkB;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA,6BAA6B,SAAS;AACtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,eAAe;AAC5B,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD,uDAAuD;AACvD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,gBAAgB;AAC9B;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,gBAAgB;AAC9B;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,gBAAgB;AAC7B,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wDAAwD;;AAExD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,UAAU;AACxB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,YAAY;AACzB,aAAa,GAAG;AAChB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA,iEAAiE,wBAAwB;AACzF;AACA;AACA,iFAAiF,gBAAgB;AACjG;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,gEAAgE;AAChE;AACA,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,UAAU;AACvB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA,sEAAsE,MAAM;AAC5E,oBAAoB,2BAA2B;AAC/C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,aAAa,UAAU;AACvB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C;AAC9C,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC,aAAa,QAAQ;AACrB,aAAa,GAAG;AAChB,aAAa,QAAQ;AACrB;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,2BAA2B,wBAAwB,EAAE,YAAY;AACjE,8BAA8B,wCAAwC;AACtE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV,oBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA,oDAAoD,aAAa,cAAc,IAAI;AACnF;AACA,KAAK;;AAEL;AACA;AACA,sDAAsD,aAAa,WAAW,IAAI,cAAc,cAAc;AAC9G;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,YAAY;AACzB,aAAa,GAAG;AAChB,cAAc,SAAS;AACvB;;AAEA;AACA,4BAA4B;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB,YAAY,QAAQ;AACpB,YAAY,YAAY;AACxB,YAAY,GAAG;AACf,aAAa,SAAS;AACtB;;AAEA;AACA,4BAA4B,iBAAiB;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA,iDAAiD;AACjD;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,SAAS;AACvB,eAAe,SAAS;AACxB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,eAAe,SAAS;AACxB;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,eAAe;AACf;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,QAAQ;AACtB,eAAe;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD,SAAS,kBAAkB,GAAG;AACjF;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,8BAA8B,cAAc,GAAG;AAC/C;AACA,aAAa,UAAU;AACvB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC,yCAAyC,cAAc,GAAG;AAC1D;AACA,aAAa,UAAU;AACvB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAAgC;AAChC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,8DAA8D,SAAS,EAAE,IAAI;AAC7E,8BAA8B,SAAS,EAAE,SAAS;;AAElD;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0DAA0D,WAAW,GAAG,iBAAiB;AACzF;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iDAAiD,WAAW,GAAG,iBAAiB;AAChF;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,2DAA2D,kBAAkB;AAC7E,QAAQ;AACR,0DAA0D,kBAAkB;AAC5E;AACA,MAAM;AACN;AACA;AACA;AACA,0DAA0D,kBAAkB;AAC5E;;AAEA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA,oEAAoE,cAAc;AAClF;AACA,sCAAsC,eAAe;AACrD,SAAS,iBAAiB;AAC1B;AACA,KAAK,qBAAqB;AAC1B;AACA;AACA,QAAQ;AACR,4BAA4B,eAAe;AAC3C;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iCAAiC,aAAa;;AAE9C;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,sEAAsE,MAAM,6BAA6B,gBAAgB;AACzH;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,UAAU;AACV;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC,aAAa,UAAU;AACvB,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,mBAAmB;AAChC,aAAa,QAAQ;AACrB,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,yBAAyB;AAChD,SAAS;AACT,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;;AAEA;AACA;AACA,aAAa,mBAAmB;AAChC,aAAa,SAAS;AACtB,aAAa,QAAQ;AACrB,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA,kBAAkB,aAAa;AAC/B;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,oCAAoC,YAAY;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD,MAAM;AACN,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,kBAAkB,aAAa;AAC/B,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,eAAe;AACf;;AAEA;AACA,yBAAyB;AACzB,wBAAwB;AACxB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,4BAA4B;AACxD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,cAAc;AAC9C,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,gCAAgC,cAAc;AAC9C,YAAY,OAAO;AACnB,gCAAgC,cAAc;AAC9C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA,gCAAgC,cAAc;AAC9C,YAAY;AACZ;AACA,gCAAgC,cAAc;AAC9C,6BAA6B,aAAa;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,8BAA8B,cAAc;AAC5C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,aAAa;AACb;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA,4CAA4C,yBAAyB;AACrE,MAAM;AACN;AACA,wBAAwB,aAAa;AACrC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA,mCAAmC,cAAc;AACjD,YAAY,OAAO;AACnB;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,OAAO;AACP;;AAEA;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Ac,2BAA2B;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA;AACA,4CAA4C,IAAI;AAChD;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;;AAEA;AACA,sDAAsD;;AAEtD,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,kBAAkB,yBAAyB,YAAY;AACtE,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,sBAAsB;AACtB;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,iBAAiB,YAAY,yBAAyB,YAAY;AACjF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B,aAAa,QAAQ;AACrB,cAAc,SAAS;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAe,kBAAkB,yBAAyB,YAAY;AACtE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,mBAAmB;AAChC,cAAc,SAAS;AACvB;AACA;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;AAC/C;AACA,yBAAyB,SAAS;AAClC;AACA;AACA;AACA,yBAAyB,gDAAgD;AACzE,QAAQ;AACR;AACA;AACA;AACA;AACA,yBAAyB,QAAQ;AACjC;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,OAAO;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,UAAU;AACrB,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA,gBAAgB,YAAY,GAAG,UAAU,GAAG,wBAAwB;AACpE;AACA;AACA,GAAG;AACH;;AAEA,eAAe;;;;;;;;;;;ACloEf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sBAAsB;AACtB,4BAA4B;;;;;;;;;;;AC1C5B,QAAQ,uBAAuB,EAAE,mBAAO,CAAC,uGAAe;;AAExD;AACA;AACA;AACA,cAAc,mCAAmC;AACjD,cAAc,iCAAiC;AAC/C,cAAc,+BAA+B;AAC7C;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;;AAEA;AACA;;AAEA;AACA,uCAAuC,aAAa;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,eAAe;AACf;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,eAAe;AACf;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,MAAM;AACnB,eAAe;AACf;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,MAAM;AACnB,eAAe;AACf;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,MAAM;AACnB,eAAe;AACf;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,MAAM;AACnB,eAAe;AACf;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,aAAa;AACpD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;;AAEA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB,qEAAqE;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,sEAAsE;AACzG;AACA;AACA;AACA;AACA,gCAAgC,iCAAiC;AACjE;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;AACA,gBAAgB,oBAAoB,GAAG,qBAAqB;AAC5D;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,uEAAuE;AAC3F;AACA;AACA,iCAAiC,0EAA0E;AAC3G;AACA;AACA,kCAAkC,qBAAqB;AACvD;AACA,kBAAkB,sBAAsB,EAAE,gBAAgB;AAC1D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,MAAM;AACnB,eAAe;AACf;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA,4BAA4B,4CAA4C,EAAE,YAAY;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,yBAAyB;;AAErD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,aAAa,MAAM;AACnB,eAAe;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,yBAAyB,eAAe;AACxC;AACA;AACA,mCAAmC,IAAI,iBAAiB,IAAI,OAAO,SAAS,OAAO,OAAO,OAAO;AACjG;AACA;AACA,oCAAoC;AACpC;AACA,KAAK;AACL;AACA;;AAEA,YAAY;;;;;;;;;;;AC7cZ,QAAQ,uBAAuB,EAAE,mBAAO,CAAC,iGAAY;;AAErD;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,QAAQ;AACrB;;AAEA;AACA;AACA;;AAEA,yCAAyC;AACzC,yCAAyC;AACzC;AACA,kDAAkD;AAClD,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,QAAQ;AACrB,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,GAAG;AAChB,cAAc;AACd;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,mBAAmB;AAChC,cAAc;AACd;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,kBAAkB;AACzF;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,mDAAmD;AACnD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc;AACd;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,cAAc;AACd;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,SAAS;AACtB,cAAc;AACd;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,aAAa,UAAU;AACvB,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA,8DAA8D,2BAA2B;AACzF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,aAAa,GAAG;AAChB,aAAa,QAAQ;AACrB,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;;AAEA,cAAc;AACd,wBAAwB;AACxB,mBAAmB;;;;;;;;;;;ACxUnB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,eAAe;AACjC;AACA;AACA;AACA,kBAAkB,eAAe;AACjC;AACA;;AAEA;AACA,kBAAkB,eAAe;AACjC,oBAAoB,eAAe;AACnC;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,aAAa;AACb;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uCAAuC;;AAEvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,4CAA4C,UAAU;AACtD;;AAEA;AACA,qCAAqC,mBAAmB;AACxD;AACA;AACA,8BAA8B,WAAW;AACzC;AACA;AACA;;AAEA,sBAAsB;;;;;;;;;;;ACnGtB;AACA;AACA,oBAAoB,eAAe;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;ACZa;AACb,a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CAAC,sBAAQ;AAC/B,oBAAoB,mBAAO,CAAC,gGAAiB;;AAE7C;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,YAAY;AAC9B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yBAAyB,QAAQ,UAAU,QAAQ;AACnD;;AAEA;AACA,yBAAyB,QAAQ,WAAW,QAAQ;AACpD;;AAEA;AACA,yBAAyB,QAAQ,IAAI,QAAQ;AAC7C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yCAAyC,0BAA0B;AACnE;AACA;AACA,qFAAqF,gBAAgB;AACrG;AACA;AACA;;AAEA,WAAW;AACX;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,0EAA0E,SAAS;AACnF;AACA;AACA,MAAM;AACN,8EAA8E,aAAa;AAC3F;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,UAAU;;AAE1E;AACA,MAAM;AACN;AACA,iCAAiC,MAAM,EAAE,UAAU;AACnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,mCAAmC,UAAU,EAAE,UAAU;AACzD;AACA;AACA;AACA;;AAEA,2BAA2B,UAAU,SAAS,qBAAqB;AACnE;;AAEA;AACA,aAAa;AACb,IAAI;AACJ,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,yEAAyE,UAAU;;AAEnF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAc,0BAA0B,EAAE,eAAe;AACzD,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA,mDAAmD;AACnD;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,IAAI;AACzB,UAAU;AACV,qBAAqB,IAAI;AACzB;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B;AAC3B,2BAA2B;AAC3B,0BAA0B;AAC1B,qBAAqB;AACrB,sBAAsB;AACtB,oBAAoB;AACpB,uBAAuB;;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjYe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;;;;;;;;;;;ACVa;AACb,oBAAoB,mBAAO,CAAC,+GAAkB;AAC9C,gBAAgB,mBAAO,CAAC,iHAAmB;AAC3C,iBAAiB,mBAAO,CAAC,mHAAoB;AAC7C,eAAe,mBAAO,CAAC,+GAAkB;AACzC,mBAAmB,mBAAO,CAAC,mGAAY;AACvC,cAAc,mBAAO,CAAC,mGAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,gDAAgD;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,gDAAgD;AACrD,CAAC,4BAA4B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iCAAiC,GAAG,mCAAmC,GAAG,oCAAoC,GAAG,qCAAqC,GAAG,2BAA2B,GAAG,8BAA8B,GAAG,gBAAgB;AACxO,cAAc,mBAAO,CAAC,oGAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,mCAAmC,UAAU;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qFAAqF,QAAQ;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,oCAAoC;AACpC;AACA;AACA;AACA,KAAK;AACL;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;;;;;;;;;;;;AC7GpB;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB,mBAAO,CAAC,8GAAkB;AAC1C,mBAAmB,mBAAO,CAAC,6GAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACtBF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,uGAAa;AACnC,kBAAkB,mBAAO,CAAC,8HAAqB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;AC7DF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,uGAAa;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,4GAA4G,8BAA8B,WAAW;AACrJ,4GAA4G,8BAA8B,WAAW;AACrJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACpFF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,uGAAa;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACdF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,uGAAa;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;AC5CF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,mBAAO,CAAC,oHAAW;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,IAAI;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACrCF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa,mBAAO,CAAC,kBAAM;AAC3B,eAAe,mBAAO,CAAC,qHAAgB;AACvC,gBAAgB,mBAAO,CAAC,uHAAiB;AACzC,gBAAgB,mBAAO,CAAC,uHAAiB;AACzC,gBAAgB,mBAAO,CAAC,iIAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;AC/CF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,mBAAO,CAAC,sBAAQ;AACjC,iBAAiB,mBAAO,CAAC,gHAAmB;AAC5C,mBAAmB,mBAAO,CAAC,6GAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,mCAAmC;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;AC9BF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,4GAAiB;AACxC,mBAAmB,mBAAO,CAAC,6GAAY;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;ACtBF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc,mBAAO,CAAC,uGAAa;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,YAAY,gBAAgB;AACzE;AACA;AACA,kBAAe;;;;;;;;;;;;ACzBF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,oHAAkB;AACzC,iBAAiB,mBAAO,CAAC,uGAAU;AACnC,iBAAiB,mBAAO,CAAC,uGAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,kBAAe;;;;;;;;;;;;AClCF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa,mBAAO,CAAC,kBAAM;AAC3B,eAAe,mBAAO,CAAC,oHAAkB;AACzC,cAAc,mBAAO,CAAC,oGAAU;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;AChCF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,mBAAO,CAAC,sBAAQ;AACjC,eAAe,mBAAO,CAAC,oHAAkB;AACzC,eAAe,mBAAO,CAAC,oHAAkB;AACzC,iBAAiB,mBAAO,CAAC,uGAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,kBAAkB;AACpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA,kBAAe;;;;;;;;;;;;ACtDF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,mBAAO,CAAC,oHAAkB;AACzC,eAAe,mBAAO,CAAC,oHAAkB;AACzC,iBAAiB,mBAAO,CAAC,uGAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;;;;;;;;;;;;AC1CF;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mCAAmC;AACnC,WAAW,mBAAO,CAAC,cAAI;A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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,GAAG;AACpC,8CAA8C;AAC9C;AACA;AACA,uBAAuB;AACvB,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA,gDAAgD;AAChD;AACA;AACA;AACA,gDAAgD;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA,yCAAyC;AACzC;AACA,iCAAiC,wBAAwB;AACzD;AACA,wBAAwB;AACxB;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA,KAAK;AACL;AACA,wCAAwC;AACxC;AACA,kDAAkD,iDAAiD;AACnG;AACA;AACA,WAAW,GAAG,EAAE,GAAG;AACnB;AACA;AACA;AACA,4EAA4E,GAAG;AAC/E;AACA;AACA;AACA,4BAA4B;AAC5B;AACA,UAAU,QAAQ,yDAAyD,cAAc,aAAa;AACtG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA,kBAAkB;;;;;;;;;;;;AC7ML;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa;AACb,eAAe,mBAAO,CAAC,kFAAQ;AAC/B;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;;;;;;;;;;;AChBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,eAAe,GAAG,gBAAgB;AAClC;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA,eAAe;;;;;;;;;;;;ACVH;;AAEZ;;AAEA,cAAc,mBAAO,CAAC,uFAAS;;AAE/B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa,qCAAqC;AAClD;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,qCAAqC;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;;AAEL;AACA;AACA;;AAEA;AACA,sBAAsB;;;;;;;;;;;;ACtTtB;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,aAAa,mBAAO,CAAC,kBAAM;AAC3B,qBAAqB,mBAAO,CAAC,0GAAgB;;AAE7C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,iBAAiB,MAAM;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qBAAqB,OAAO,EAAE,gEAAgE;AAC9F;;AAE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ACA;AACA;AACA,6EAA6E;AAC7E;AACA;AACA;AACA;;AAEA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6EAA6E,IAAI;AACjF,yEAAyE,IAAI;AAC7E,mCAAmC,IAAI;AACvC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ,wBAAwB,KAAK;AAC7B;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAU,WAAW;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,YAAY,kCAAkC,aAAa;AACjG;;AAEA;AACA;AACA;AACA;AACA,2CAA2C,aAAa,UAAU,YAAY;AAC9E;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;AC1KY;;AAEZ,WAAW,mBAAO,CAAC,6FAAO;AAC1B,aAAa,mBAAO,CAAC,kBAAM;AAC3B,QAAQ,SAAS,EAAE,mBAAO,CAAC,qGAAW;AACtC,QAAQ,aAAa,EAAE,mBAAO,CAAC,+GAAgB;AAC/C,QAAQ,eAAe,EAAE,mBAAO,CAAC,yGAAgB;AACjD,aAAa,mBAAO,CAAC,qGAAc;AACnC,QAAQ,iCAAiC,EAAE,mBAAO,CAAC,uGAAe;;AAElE,yCAAyC;AACzC;AACA,aAAa;AACb;;AAEA;A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E/C,QAAQ,eAAe,EAAE,mBAAO,CAAC,qGAAc;;AAE/C;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;AClEY;AACZ;AACA;AACA,UAAU,wIAAoC;AAC9C,WAAW,mBAAO,CAAC,wGAAa;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,mBAAmB;AACnC,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,uBAAuB;AACvC,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA,EAAE,uBAAuB;AACzB,EAAE;AACF;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjJ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WAAW;AACX;;AAEA;AACA,UAAU,oBAAoB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,yDAAyD,KAAK,oBAAoB,IAAI;AACtF;AACA;AACA,qDAAqD,KAAK,wBAAwB,IAAI;AACtF;AACA;;AAEA;AACA;AACA;;AAEA,WAAW;AACX;;AAEA;AACA,UAAU,oBAAoB;;AAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA,yDAAyD,KAAK,oBAAoB,IAAI;AACtF;AACA;AACA,qDAAqD,KAAK,wBAAwB,IAAI;AACtF;AACA;;AAEA;AACA;AACA;AACA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2CAA2C,cAAc;AACzD,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,cAAc;AACvD,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,UAAU,GAAG,IAAI,kCAAkC,KAAK;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9JY;;AAEZ,WAAW,mBAAO,CAAC,6FAAO;AAC1B,UAAU,uIAAmC;;AAE7C;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,mBAAO,CAAC,cAAI;AACrB;AACA;;AAEA;AACA;AACA,UAAU,mBAAO,CAAC,4FAAU;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,mBAAO,CAAC,kBAAM;AAC/B;AACA,SAAS,mBAAO,CAAC,cAAI;;AAErB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA;AACA,0CAA0C,EAAE;AAC5C,EAAE;AACF;AACA;;AAEA,oBAAoB;AACpB;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;;AAGA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9Sa;;AAEb,aAAa,mBAAO,CAAC,qFAAS;AAC9B,uBAAuB,+CAAqB;AAC5C,cAAc,8CAAsB;;AAEpC;AACA;AACA,oBAAoB,QAAQ;AAC5B,2BAA2B;AAC3B,qCAAqC,EAAE;;AAEvC;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,aAAa;AACb;AACA;AACA,gCAAgC,uBAAuB;;AAEvD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;;;;;;;;;;;;ACzCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,GAAG,eAAe;AACnC,kCAAkC,wBAAwB,GAAG;AAC7D;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,oBAAoB,YAAY;AAChC;AACA;AACA;AACA,0BAA0B,aAAa;AACvC;AACA,0BAA0B,aAAa;AACvC;AACA,0BAA0B,aAAa;AACvC;AACA,0BAA0B,aAAa;AACvC;AACA;AACA;AACA,0BAA0B,aAAa;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,8BAA8B,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,MAAM;AACjD;AACA,oCAAoC;AACpC,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,qBAAqB,aAAa;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC,uBAAuB;AACvB;AACA;AACA;AACA,qBAAqB,IAAI;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,KAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,wBAAwB,OAAO,aAAa,IAAI;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;;;;;;;;;;ACpPjB,eAAe;AACf,eAAe;AACf,eAAe;AACf,cAAc;AACd,YAAY;AACZ,iBAAiB;AACjB,uBAAuB;;AAEvB;AACA;AACA;;AAEA,SAAS,mBAAO,CAAC,cAAI;AACrB,WAAW,mBAAO,CAAC,kBAAM;AACzB,gBAAgB,mBAAO,CAAC,+FAAW;AACnC,iBAAiB,mBAAO,CAAC,gHAAkB;AAC3C;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yCAAyC,WAAW;AACpD;;AAEA;AACA,sCAAsC,WAAW;AACjD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,YAAY,gCAAgC;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,oBAAoB,gBAAgB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;;;;;;;;;;AC7OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,SAAS,mBAAO,CAAC,iGAAa;AAC9B,gBAAgB,mBAAO,CAAC,+FAAW;AACnC;AACA,eAAe,mBAAO,CAAC,2FAAU;AACjC,SAAS,0DAA8B;AACvC,WAAW,mBAAO,CAAC,kBAAM;AACzB,aAAa,mBAAO,CAAC,sBAAQ;AAC7B,iBAAiB,mBAAO,CAAC,gHAAkB;AAC3C,eAAe,mBAAO,CAAC,gFAAW;AAClC,aAAa,mBAAO,CAAC,oFAAa;AAClC;AACA;AACA,eAAe,mBAAO,CAAC,2FAAU;AACjC,WAAW,mBAAO,CAAC,kBAAM;AACzB;AACA;;AAEA,WAAW,mBAAO,CAAC,2EAAM;;AAEzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,kBAAkB,mBAAmB;AACrC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,gCAAgC,sBAAsB;AACtD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,yBAAyB;AAC3C;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,eAAe;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,IAAI;AACJ;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;ACrxBA;AACA;;AAEA,SAAS,mBAAO,CAAC,iGAAa;AAC9B,gBAAgB,mBAAO,CAAC,+FAAW;AACnC;AACA,WAAW,4GAAyB;AACpC,WAAW,mBAAO,CAAC,kBAAM;AACzB,WAAW,mBAAO,CAAC,kBAAM;AACzB,aAAa,mBAAO,CAAC,sBAAQ;AAC7B,iBAAiB,mBAAO,CAAC,gHAAkB;AAC3C,aAAa,mBAAO,CAAC,oFAAa;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,kBAAkB,OAAO;AACzB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,IAAI;AACJ;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,kBAAkB,SAAS;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,SAAS;AAC3B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACremC;AACV;AACI;AACI;AACF;AACL;AAC+B;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;;AAEP,8CAA8C,gEAAiB;AAC/D,SAAS,4CAAU;AACnB,GAAG,4CAAU;;AAEb;AACA,cAAc,iDAAK,CAAC,+CAAa,MAAM,8CAAY;;AAEnD;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,iDAAK;AACZ,KAAK,iDAAe;AACpB,MAAM,iDAAK;AACX,UAAU,+CAAa;AACvB;;AAEA,0BAA0B,iBAAiB,gBAAgB,IAAI;AAC/D;;AAEA;AACA;;AAEA;AACA;AACA,iBAAiB,mCAAS;;AAE1B;AACA,oBAAoB,qDAAM;AAC1B;AACA,2CAA2C,iDAAK;AAChD;AACA;;AAEA,sCAAsC;AACtC,MAAM,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G;AACH;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;;AAEA,mBAAmB;AACnB;;AAEA;AACA;AACA,EAAE;AACF;;AAEA,gCAAgC;;AAEhC,uBAAuB;AACvB;AACA;AACA,EAAE;AACF;;;;;;;;;;;;ACvFY;;AAEZ;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,iBAAiB;AACjB;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;;;;;;;;;;ACtBA,SAAS,mBAAO,CAAC,cAAI;AACrB,gBAAgB,mBAAO,CAAC,yGAAgB;AACxC,aAAa,mBAAO,CAAC,mHAAqB;AAC1C,YAAY,mBAAO,CAAC,iGAAY;;AAEhC,WAAW,mBAAO,CAAC,kBAAM;;AAEzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;AACA,MAAM,iDAAuB;AAC7B,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,kBAAkB,8BAA8B;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC/bA,aAAa,oDAAwB;;AAErC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA,8CAA8C,gBAAgB;AAC9D;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA,8CAA8C,gBAAgB;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrHA,gBAAgB,mBAAO,CAAC,4BAAW;;AAEnC;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,SAAS;AACT,OAAO;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,YAAY;AACZ,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,cAAc;AACd,YAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA,MAAM;AACN,+CAA+C;AAC/C;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;AClWA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sCAAsC,MAAM;;AAE5C;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,QAAQ;AACjB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA,gBAAgB;AAChB,kBAAkB,MAAM;AACxB;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc,MAAM,EAAE,+BAA+B,EAAE,MAAM;AAC7D;AACA;AACA;AACA;AACA;AACA,gBAAgB,qBAAqB,EAAE,UAAU;AACjD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB;AACA,WAAW,MAAM;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,GAAG;;AAEhB;AACA;AACA;;AAEA,gBAAgB,OAAO;AACvB;AACA;AACA;;AAEA;AACA;;AAEA,WAAW;AACX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C,aAAa;AACvD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,GAAG,mBAAmB,aAAa;AAC7D;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI,IAAI;AACR;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,aAAa,iCAAiC;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa,SAAS;AACtB;AACA;;AAEA,eAAe,YAAY;AAC3B;AACA;AACA;;AAEA;AACA,aAAa,UAAU;AACvB;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe;AACf;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC3nBe,qDAAqD;AACpE;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,mDAAmD,cAAc;AACjE;AACA;;AAEA;AACA;AACA,mDAAmD,aAAa;AAChE;AACA;;AAEA;AACA;AACA,iDAAiD,MAAM;AACvD;AACA;;AAEA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;;;;;ACrCA,aAAa,mBAAO,CAAC,mFAAQ;AAC7B;AACA,WAAW,mBAAO,CAAC,2EAAM;;AAEzB;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,QAAQ;AACR;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;AACA;;;;;;;;;;;ACrDA;AACA,aAAa,mBAAO,CAAC,kBAAM;AAC3B;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE,sJAAiD;AACnD;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1Ba;AACb,aAAa,mBAAO,CAAC,kBAAM;AAC3B,yBAAyB,mBAAO,CAAC,mHAAmB;;AAEpD;;AAEA;;;;;;;;;;;;;;;;;ACNyB;;AAEzB;;AAEA;AACA;AACA,EAAE,6CAAW;AACb;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,SAAS,iDAAe;AACxB,GAAG;AACH;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;AC5ByB;;AAEzB;;AAEA;AACA;AACA,EAAE,6CAAW;AACb;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,SAAS,iDAAe;AACxB,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,SAAS,iDAAe;AACxB,GAAG;AACH;AACA;AACA;;AAEe;AACf;AACA;AACA;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAgB,mBAAO,CAAC,8FAAY;AACpC,cAAc,EAAE,KAAK;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,mDAAmD,0BAA0B;AAC7E,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACrJyB;AACQ;;AAEjC;;AAEA;AACA;AACA;AACA,EAAE,6CAAW;AACb;AACA,GAAG;AACH;AACA;AACA;;AAEe;AACf;AACA;AACA,sCAAsC,qDAAQ;AAC9C;;AAEA;AACA;;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjBa;AACb,aAAa,mBAAO,CAAC,kBAAM;;AAE3B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;ACdmC;AACN;;AAEd;AACf,WAAW,6CAAW;;AAEtB,SAAS,8CAAY;;AAErB,KAAK,kDAAgB;AACrB;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACda;AACb,qBAAqB,mBAAO,CAAC,0GAAgB;;AAE7C;;;;;;;;;;;;ACHa;AACb,aAAa,mBAAO,CAAC,kBAAM;AAC3B,qBAAqB,mBAAO,CAAC,uHAAgB;;AAE7C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;ACb6B;;AAEd;AACf,kBAAkB,+CAAa;;AAE/B;AACA;AACA;AACA,4BAA4B,0CAAQ,CAAC;AACrC,eAAe,8CAAY;AAC3B;AACA;;;;;;;;;;;;;;;;;;;;ACXmC;AACV;AACA;AAC2B;;AAEpD;AACA,KAAK,kDAAgB;AACrB;AACA;;AAEA,KAAK,4CAAU;AACf,MAAM,+DAAiB;AACvB;AACA;;AAEA;AACA;;AAEA;AACA,SAAS,iDAAe;AACxB,MAAM,+DAAiB;AACvB,GAAG;AACH;AACA;AACA;;AAEA,iEAAe,6CAAW,kCAAkC,EAAC;;;;;;;;;;;;;;;;AC1B7D;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,MAAM;;AAEN;AACA,4BAA4B,SAAS;AACrC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,WAAW;AACX;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,eAAe;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,qCAAqC;AACrC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,eAAe;AACf;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,uDAAuD,WAAW;AAClE;;AAEA;AACA;AACA,qDAAqD,MAAM;AAC3D;;AAEA;AACA;AACA,6DAA6D,KAAK,GAAG,OAAO;AAC5E;;AAEA,oDAAoD,cAAc,OAAO,KAAK,GAAG,OAAO;AACxF;;AAEA;AACA,yDAAyD,KAAK,GAAG,OAAO;AACxE;;AAEA;AACA;AACA;AACA,gEAAgE,KAAK,GAAG,OAAO;AAC/E;;AAEA;AACA,uDAAuD,cAAc,OAAO,KAAK,GAAG,OAAO;AAC3F;;AAEA;AACA;AACA,iEAAiE,KAAK,GAAG,OAAO;AAChF;;AAEA;AACA,4BAA4B,cAAc,sCAAsC;AAChF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA,kCAAkC,UAAU;;AAE5C;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,wBAAwB,kBAAkB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uBAAuB;AACvB,UAAU;AACV;AACA;AACA;AACA,0B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;;;;;;;;;;;;ACbN;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,GAAG,WAAW;AAC/B,WAAW;AACX,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qC;;;;;;;;;;;ACrDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ,oBAAoB,mBAAO,CAAC,+FAAc;AAC1C,QAAQ,WAAW;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,gC;;;;;;;;;;;ACvEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ,oBAAoB,mBAAO,CAAC,+FAAc;AAC1C,iBAAiB,mBAAO,CAAC,oHAAqB;AAC9C,QAAQ,UAAU;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,gC;;;;;;;;;;;ACvGa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,YAAY;AACZ,iBAAiB,mBAAO,CAAC,oHAAqB;AAC9C,kBAAkB,mBAAO,CAAC,2FAAY;AACtC,iBAAiB,mBAAO,CAAC,mIAAgC;AACzD,oBAAoB,mBAAO,CAAC,+FAAc;AAC1C,QAAQ,6CAA6C;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD;AACA;AACA,kDAAkD;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ,gC;;;;;;;;;;;ACtPa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB;AAClB,eAAe,mBAAO,CAAC,6GAAqB;AAC5C,eAAe,mBAAO,CAAC,yFAAQ;AAC/B,eAAe,mBAAO,CAAC,yFAAQ;AAC/B,eAAe,mBAAO,CAAC,yFAAQ;AAC/B,iBAAiB,mBAAO,CAAC,mIAAgC;AACzD,kBAAkB,mBAAO,CAAC,2FAAY;AACtC,oBAAoB,mBAAO,CAAC,+FAAc;AAC1C,oBAAoB,mBAAO,CAAC,yGAAmB;AAC/C,eAAe,mBAAO,CAAC,+FAAc;AACrC,eAAe,mBAAO,CAAC,yFAAQ;AAC/B,eAAe,mBAAO,CAAC,yFAAQ;AAC/B;AACA;AACA;AACA,QAAQ,8EAA8E;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,QAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wJAAwJ;AACxJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,sC;;;;;;;;;;;ACrpBa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY;AAC/D,gBAAgB,mBAAO,CAAC,oFAAO;AAC/B,qBAAqB,mBAAO,CAAC,2FAAS;AACtC,qBAAqB,mBAAO,CAAC,yFAAQ;AACrC,aAAa,mBAAO,CAAC,yFAAQ;AAC7B,wCAAuC,EAAE,qCAAqC,uBAAuB,EAAC;AACtG,aAAa,mBAAO,CAAC,yFAAQ;AAC7B,wCAAuC,EAAE,qCAAqC,uBAAuB,EAAC;AACtG,aAAa,mBAAO,CAAC,yFAAQ;AAC7B,wCAAuC,EAAE,qCAAqC,uBAAuB,EAAC;AACtG,mBAAmB,mBAAO,CAAC,qGAAc;AACzC,8CAA6C,EAAE,qCAAqC,mCAAmC,EAAC;AACxH,iC;;;;;;;;;;;ACda;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,mBAAmB;AACnB,iBAAiB,mBAAO,CAAC,mIAAgC;AACzD,eAAe,mBAAO,CAAC,6GAAqB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB,gC;;;;;;;;;;;AClCa;AACb,8C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,EAAC;AAC5G,oBAAoB,mBAAO,CAAC,8FAAa;AACzC,+BAA+B,mBAAO,CAAC,0IAAmC;AAC1E,4BAA4B,mBAAO,CAAC,oIAAgC;AACpE,QAAQ,yBAAyB;AACjC;AACA,WAAW;AACX;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb,mBAAmB;AACnB,uBAAuB;AACvB,iC;;;;;;;;;;;AChEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,0BAA0B,GAAG,4BAA4B,GAAG,wBAAwB,GAAG,sBAAsB,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,WAAW;AACnK;AACA,kBAAkB,qBAAqB;AACvC;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB,wBAAwB,IAAI;AAC5B;AACA;AACA;AACA,kDAAkD,OAAO,QAAQ,MAAM;AACvE;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA,wBAAwB;AACxB;AACA,4BAA4B;AAC5B;AACA,0BAA0B;AAC1B,gC;;;;;;;;;;;ACxCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,WAAW;AACX,eAAe,mBAAO,CAAC,yFAAQ;AAC/B,iBAAiB,mBAAO,CAAC,6FAAU;AACnC,eAAe,mBAAO,CAAC,mIAAgC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,cAAc;AACjC;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,WAAW;AACX,+B;;;;;;;;;;;ACnLa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc;AACd,oBAAoB,mBAAO,CAAC,+FAAc;AAC1C,mBAAmB,mBAAO,CAAC,6FAAa;AACxC,QAAQ,yEAAyE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,OAAO;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,kBAAe;AACf,kC;;;;;;;;;;;ACpDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB;AAClB,eAAe,mBAAO,CAAC,yFAAQ;AAC/B,iBAAiB,mBAAO,CAAC,iHAAuB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,sBAAsB;AACpE;AACA;AACA,+CAA+C,sBAAsB;AACrE;AACA,kCAAkC;AAClC,gBAAgB,oCAAoC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA,oFAAoF,mBAAmB;AACvG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,oBAAoB;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,sBAAsB;AAC9G;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,uBAAuB;AAClG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB,sC;;;;;;;;;;;AC5La;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB;AAClB,eAAe,mBAAO,CAAC,yFAAQ;AAC/B,oBAAoB,mBAAO,CAAC,+FAAc;AAC1C;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA,oCAAoC,qBAAqB;AACzD,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,eAAe;AAC1F;AACA;AACA;AACA;AACA;AACA;AACA,kGAAkG,cAAc;AAChH;AACA;AACA;AACA;AACA;AACA,oBAAoB,UAAU;AAC9B;AACA,sBAAsB,+BAA+B;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,kBAAkB;AACtC;AACA;AACA;AACA;AACA,0BAA0B,8BAA8B;AACxD;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA,qCAAqC,iBAAiB;AACtD,SAAS;AACT;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,oBAAoB;AACrF;AACA;AACA;AACA;AACA,kBAAkB;AAClB,sC;;;;;;;;;;;AChKa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE;AACnE;AACA,oDAAoD;AACpD,kDAAkD;AAClD,mDAAmD;AACnD;AACA,kCAAkC;AAClC,gDAAgD;AAChD,8DAA8D;AAC9D;AACA;AACA;AACA,cAAc;AACd,kBAAe;AACf,kC;;;;;;;;;;;ACjCa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa;AACb,oBAAoB,mBAAO,CAAC,+FAAc;AAC1C,QAAQ,yEAAyE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,gCAAgC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,kBAAe;AACf,iC;;;;;;;;;;;ACvEa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,aAAa,GAAG,cAAc;AAC9B,oBAAoB,mBAAO,CAAC,+FAAc;AAC1C,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,yEAAyE;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,YAAY,aAAa,aAAa;AACvC,qC;;;;;;;;;;;ACxDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,gBAAgB;AAChB,eAAe,mBAAO,CAAC,6GAAqB;AAC5C,2BAA2B,mBAAO,CAAC,gIAAkB;AACrD,eAAe,mBAAO,CAAC,yFAAQ;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8CAA8C,qBAAqB;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uEAAuE,0BAA0B;AACjG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gC;;;;;;;;;;;AC7Fa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,yBAAyB;AACzB,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6C;;;;;;;;;;;ACrDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,4BAA4B;AAC5B,4BAA4B;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gD;;;;;;;;;;;AC/Ca;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,2BAA2B,GAAG,yBAAyB,GAAG,4BAA4B,GAAG,0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BAA2B;AAC3B,mC;;;;;;;;;;;AC/Ga;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,wBAAwB,GAAG,oBAAoB,GAAG,kBAAkB;AACpE,iBAAiB;AACjB,wBAAwB;AACxB,oBAAoB;AACpB,iBAAiB;AACjB,sBAAsB;AACtB,mBAAmB;AACnB,kBAAkB;AAClB,qBAAqB;AACrB,sBAAsB;AACtB,wBAAwB;AACxB,wBAAwB;AACxB,oBAAoB,mBAAO,CAAC,mGAAa;AACzC,eAAe,mBAAO,CAAC,mIAAgC;AACvD,iBAAiB,mBAAO,CAAC,mIAAgC;AACzD,yBAAyB,mBAAO,CAAC,yGAAmB;AACpD,eAAe,mBAAO,CAAC,+FAAc;AACrC;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,2CAAkB;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,KAAK;AAClC;AACA,iCAAiC,MAAM;AACvC;AACA;AACA,yDAAyD,KAAK,EAAE,cAAc;AAC9E;AACA,kDAAkD,KAAK,EAAE,cAAc;AACvE;AACA,gDAAgD,KAAK,EAAE,cAAc;AACrE;AACA,sDAAsD,KAAK,EAAE,cAAc;AAC3E;AACA,8CAA8C,KAAK,EAAE,cAAc;AACnE;AACA,mDAAmD,KAAK,EAAE,cAAc;AACxE;AACA,gDAAgD,KAAK,EAAE,cAAc;AACrE;AACA,gEAAgE,KAAK,EAAE,cAAc;AACrF;AACA,iDAAiD,KAAK,EAAE,cAAc;AACtE;AACA,sDAAsD,KAAK,EAAE,cAAc;AAC3E;AACA,mDAAmD,KAAK,EAAE,cAAc;AACxE;AACA,wDAAwD,KAAK,EAAE,cAAc;AAC7E;AACA,4DAA4D,MAAM,mCAAmC,KAAK;AAC1G;AACA,8DAA8D,KAAK,EAAE,cAAc;AACnF;AACA,sBAAsB,UAAU,oBAAoB,KAAK,EAAE,cAAc;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gC;;;;;;;;;;;ACxRa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,GAAG,mBAAmB,GAAG,cAAc;AACxD,mBAAmB;AACnB,iBAAiB;AACjB,uBAAuB;AACvB,eAAe,mBAAO,CAAC,6GAAqB;AAC5C,eAAe,mBAAO,CAAC,2FAAS;AAChC,gBAAgB,mBAAO,CAAC,2FAAS;AACjC,iBAAiB,mBAAO,CAAC,6FAAU;AACnC,iBAAiB,mBAAO,CAAC,6FAAU;AACnC,iBAAiB,mBAAO,CAAC,mIAAgC;AACzD,yBAAyB,mBAAO,CAAC,yGAAmB;AACpD,0BAA0B,mBAAO,CAAC,2GAAoB;AACtD,iBAAiB,mBAAO,CAAC,iHAAuB;AAChD,oBAAoB,mBAAO,CAAC,+FAAc;AAC1C,iBAAiB,mBAAO,CAAC,iHAAuB;AAChD,mBAAmB,mBAAO,CAAC,6FAAa;AACxC,qBAAqB,mBAAO,CAAC,qGAAc;AAC3C,eAAe,mBAAO,CAAC,6GAAqB;AAC5C,qBAAqB,mBAAO,CAAC,qGAAc;AAC3C,gBAAgB,mBAAO,CAAC,6FAAU;AAClC,oBAAoB,mBAAO,CAAC,mGAAa;AACzC,eAAe,mBAAO,CAAC,mIAAgC;AACvD,kBAAkB,mBAAO,CAAC,+FAAW;AACrC,eAAe,mBAAO,CAAC,yFAAQ;AAC/B,cAAc,mBAAO,CAAC,uFAAO;AAC7B,eAAe,mBAAO,CAAC,+FAAc;AACrC;AACA,QAAQ,2EAA2E;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,UAAU;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,iBAAiB;AAC9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,wCAAwC;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,UAAU;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC;AACzC;AACA,8CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC,MAAM;AAC9C;AACA;AACA,+DAA+D;AAC/D,kEAAkE;AAClE;AACA,8CAA8C;AAC9C;AACA;AACA,+CAA+C;AAC/C,oBAAoB,WAAW,EAAE,mBAAO,CAAC,yFAAQ;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,oBAAoB,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,uCAAuC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,uCAAuC;AACvD;AACA;AACA;AACA,iBAAiB,uCAAuC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,kCAAkC;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,8BAA8B,uCAAuC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA,8BAA8B,uCAAuC;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,uBAAuB;AACvB;AACA;AACA;AACA,oBAAoB,SAAS;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,UAAU;AAC/E;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,gBAAgB,EAAE,SAAS;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,iBAAiB;AACjB,kC;;;;;;;;;;;ACxlDa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,kBAAkB;AAClB,oBAAoB,mBAAO,CAAC,2GAAW;AACvC,eAAe,mBAAO,CAAC,6GAAqB;AAC5C,iCAAiC;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,qBAAqB;AAChE;AACA;AACA,qDAAqD,8CAA8C;AACnG;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA,kBAAkB;AAClB,iC;;;;;;;;;;;AC/Ba;AACb;AACA,8CAA6C,EAAE,aAAa,EAAC;AAC7D,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAO,CAAC,wBAAS;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,KAAK,EAAE,iBAAiB,EAAE,QAAQ;AAC9D;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf,mC;;;;;;;;;;;ACvCa;AACb,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,MAAM;AACzB;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA,oCAAoC,IAAI,IAAI,aAAa;AACzD;AACA,kBAAkB,EAAE,UAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,gC;;;;;;;;;;;AC/GY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,mBAAO,CAAC,sBAAQ;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4CAA4C,SAAS;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAkC,YAAY;AAC9C;AACA;AACA;;AAEA,oBAAoB,oBAAoB;AACxC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AAC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ACA;;AAEA,qDAAqD,sBAAsB;;AAE3E;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA,+CAA+C,kBAAkB;AACjE;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,4CAA4C,4BAA4B;AACxE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,UAAU;AACV;AACA,WAAW,QAAQ;AACnB,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;AACA;AACA,+CAA+C,kBAAkB;AACjE;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;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,cAAc;AACd;AACA;AACA;AACA;AACA,GAAG,IAAI;AACP;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,qDAAqD;;AAErD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,MAAM;AACN,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK,IAAI;AACT,KAAK,GAAG;AACR,KAAK,KAAK;AACV,KAAK,IAAI,IAAI,EAAE;AACf,KAAK,IAAI,EAAE,IAAI;AACf;AACA;AACA,KAAK,IAAI,OAAO,IAAI;AACpB,KAAK,EAAE,OAAO,EAAE;AAChB;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,6BAA6B,QAAQ,MAAM;AAC3C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,IAAI;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN,MAAM;AACN;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;;AAEA;;AAEA,MAAM;AACN,IAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,IAAI;AACxC;AACA;AACA;AACA,gCAAgC,EAAE,EAAE,KAAK;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yCAAyC,QAAQ;AACjD;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,6CAA6C;AAC7C;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,yBAAyB,QAAQ;AACjC;AACA;AACA;;AAEA,cAAc,gBAAgB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,4CAA4C;;AAElD;;AAEA;AACA;AACA;AACA;AACA,QAAQ;AACR,QAAQ;AACR;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B;AAC3B;;;;;;;;;;;ACl7BA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClCA;AACA;AACA;AACA;AACA;;AAEa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,QAAQ;AAC1B;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,oBAAoB;AACvC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;ACzFA,aAAa,mBAAO,CAAC,mFAAQ;AAC7B;AACA,qBAAqB;;AAErB;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;;AAEH;AACA;AACA;AACA,KAAK;AACL;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzCa;;AAEb;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA,QAAQ,aAAa;;AAErB;AACA,sFAAsF,YAAY,MAAM,mBAAmB;AAC3H;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,iBAAiB;AAClC;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,yBAAsB;;;;;;;;;;;;;;;;;;;ACvEuB;;AAE7C;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,IAAI;AACP;AACA;AACA;AACA,qGAAqG,gBAAgB;AACrH;;AAEA;AACA;AACA;;AAEA;AACA,yGAAyG,YAAY,MAAM,mBAAmB;AAC9I;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,uDAAc;AAC/B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,EAAE;AACF;;AAEO;;;;;;;;;;;;ACpMM;;AAEb;AACA;AACA;;AAEA;AACA;AACA,yCAAyC,EAAE;AAC3C;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oBAAoB;AACpB,oBAAoB;;;;;;;;;;;;ACnBP;;AAEb,WAAW,mBAAO,CAAC,kBAAM;;AAEzB;AACA;AACA;AACA;;AAEA,wEAAwE;AACxE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3Ba;AACb,OAAO,WAAW,EAAE,mBAAO,CAAC,kBAAM;AAClC,WAAW,mBAAO,CAAC,cAAI;;AAEvB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,iCAAiC;AACjC,6CAA6C;AAC7C,kCAAkC;AAClC;AACA,0CAA0C;AAC1C;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,+CAA+C,WAAW,IAAI;AAC3E,aAAa,yCAAyC;AACtD,aAAa,wCAAwC;AACrD,aAAa,wCAAwC;AACrD,aAAa;AACb;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;AClLa;;AAEb,kBAAkB,mBAAO,CAAC,qGAAa;AACvC,cAAc,mBAAO,CAAC,6FAAS;;AAE/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB,eAAe;;AAEnC;AACA;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,oBAAoB,KAAK,KAAK,KAAK,eAAe,KAAK;AACvD;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,iBAAiB;AACjB;;AAEA;AACA;AACA,2CAA2C,IAAI,oCAAoC,IAAI;AACvF;;AAEA,gBAAgB;AAChB;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;;AAEJ;AACA,eAAe,QAAQ,QAAQ,aAAa,EAAE,oCAAoC;AAClF;;AAEA;AACA;AACA;;AAEA;AACA,eAAe,KAAK;AACpB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,oBAAoB;;AAEpB;AACA;AACA;AACA;;AAEA;AACA,WAAW,mDAAmD;AAC9D,WAAW,wDAAwD;AACnE;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,sCAAsC,YAAY;AAClD;;AAEA;AACA,wEAAwE,OAAO;AAC/E;AACA,sDAAsD,OAAO;AAC7D;AACA;AACA,yCAAyC,8BAA8B;;AAEvE,mCAAmC,WAAW,GAAG,YAAY;AAC7D;;AAEA;AACA;AACA;AACA;;AAEA,WAAW,6CAA6C;AACxD;AACA;;AAEA;AACA;AACA;;AAEA,oDAAoD;AACpD;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,EAAE;AAC9B,KAAK;;AAEL;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,qCAAqC;AACrC;AACA;;AAEA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;;AAEA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,MAAM;AAC3B;;AAEA;AACA,qBAAqB,MAAM;AAC3B;;AAEA;AACA;AACA;;AAEA;AACA,eAAe,OAAO;AACtB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,qBAAqB;AACpC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa,sBAAsB;AACnC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,aAAa,0DAA0D;AACvE;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,qBAAqB,MAAM;AAC3B,QAAQ;AACR;AACA;;AAEA,aAAa,wBAAwB;AACrC;AACA;;AAEA;AACA;AACA,eAAe,kCAAkC,MAAM,GAAG;AAC1D;AACA;;AAEA;AACA;AACA;AACA;;AAEA,eAAe,kCAAkC,MAAM,GAAG;AAC1D;AACA;;AAEA;;AAEA;AACA;AACA,oBAAoB,MAAM;AAC1B;;AAEA;AACA,eAAe,OAAO;;AAEtB;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAuB,QAAQ,EAAE,QAAQ,GAAG,WAAW;AACvD;AACA;AACA;;AAEA;AACA;AACA;;AAEA,oBAAoB;AACpB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,oBAAoB;AACpB;;AAEA;AACA,eAAe,oCAAoC;AACnD;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA,qCAAqC,QAAQ;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,yCAAyC;AACzC,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;;AAEA,aAAa,8BAA8B;AAC3C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,aAAa,qBAAqB;AAClC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,aAAa,8BAA8B;AAC3C;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;;AAEA,aAAa,6CAA6C;AAC1D;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,0CAA0C;AACzD;AACA;;AAEA,aAAa,yCAAyC;AACtD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,wBAAwB,MAAM;AAC9B;;AAEA,eAAe,6BAA6B;AAC5C;AACA;;AAEA;AACA,eAAe,4CAA4C;AAC3D;AACA;;AAEA,aAAa,qCAAqC;AAClD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,2CAA2C;AAC1D;AACA;;AAEA;AACA,eAAe,qBAAqB;AACpC;AACA;;AAEA,aAAa,mCAAmC;AAChD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,eAAe,8CAA8C;AAC7D;AACA;;AAEA,aAAa,qBAAqB;AAClC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,qBAAqB,MAAM;AAC3B;;AAEA;AACA;AACA;AACA;AACA;;AAEA,aAAa,qBAAqB;AAClC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,eAAe,iCAAiC;AAChD;AACA;;AAEA;AACA;AACA;AACA,eAAe,iCAAiC;AAChD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B,aAAa;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,6BAA6B,aAAa;;AAE1C;AACA,yBAAyB,eAAe,EAAE,cAAc,GAAG,cAAc,EAAE,IAAI;AAC/E;;AAEA;AACA;;AAEA;;AAEA,eAAe,uCAAuC;AACtD;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,cAAc,GAAG,eAAe,EAAE,cAAc;AAC9E;AACA;AACA;AACA,eAAe,uCAAuC;AACtD;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,QAAQ;AACR;AACA;;AAEA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA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AC3B,aAAa,mBAAO,CAAC,2FAAQ;AAC7B,cAAc,mBAAO,CAAC,6FAAS;AAC/B,cAAc,mBAAO,CAAC,6FAAS;AAC/B,kBAAkB,mBAAO,CAAC,qGAAa;AACvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC,gCAAgC;AAChC;AACA;AACA,WAAW,cAAc;AACzB,WAAW,SAAS;AACpB,YAAY,WAAW;AACvB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,yBAAyB;AACzB;AACA;;AAEA;AACA,YAAY,yBAAyB,0CAA0C,aAAa;AAC5F,qBAAqB;;AAErB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;;AAEA,2CAA2C,cAAc,IAAI;AAC7D;AACA;AACA;;AAEA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA,WAAW;AACX;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D;AACA,WAAW,QAAQ;AACnB,WAAW,eAAe;AAC1B,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D;AAC1D,iDAAiD;AACjD;AACA,WAAW,cAAc;AACzB,WAAW,cAAc;AACzB,WAAW,QAAQ;AACnB,YAAY,SAAS;AACrB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;;AAEA;AACA;AACA,0BAA0B,8BAA8B;AACxD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,QAAQ,KAAK,aAAa,GAAG,OAAO;AACtD;AACA,oBAAoB,OAAO;AAC3B;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,YAAY,QAAQ;AACpB;AACA;;AAEA,uCAAuC;AACvC;AACA;AACA;;AAEA,iBAAiB;;AAEjB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ;;AAEA;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;;ACrVa;;AAEb,cAAc,mBAAO,CAAC,6FAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,qGAAa;;AAEzB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY,QAAQ;AACpB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,sBAAsB,sBAAsB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;ACtYa;;AAEb,aAAa,mBAAO,CAAC,kBAAM;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,EAAE,mBAAO,CAAC,qGAAa;;AAEzB,gBAAgB;AAChB,qBAAqB;AACrB,mBAAmB;AACnB,mBAAmB;AACnB,sBAAsB;;AAEtB,yBAAyB;AACzB;AACA;AACA,GAAG;AACH;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA,kBAAkB;AAClB;AACA;AACA;AACA,YAAY,oBAAoB,IAAI,iBAAiB;AACrD;;AAEA,oBAAoB,qBAAqB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,qBAAqB,cAAc;AACrD;AACA;;AAEA,kBAAkB,QAAQ,KAAK,MAAM,GAAG,OAAO;AAC/C;AACA,uBAAuB,OAAO;AAC9B;AACA;AACA;;;;;;;;;;;;AC/Da;;AAEb;AACA;AACA;AACA;;AAEA,kBAAkB,sBAAsB;AACxC;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;;AAEA,qBAAqB,sBAAsB;AAC3C;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA,IAAI;;AAEJ;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;;AAEA;;AAEA;AACA,EAAE;AACF;;AAEA;;;;;;;;;;;;ACnEa;;AAEb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ,IAAI;AACJ;AACA;;AAEA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA,sFAAsF,kCAAkC;AACxH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA,4BAA4B;AAC5B;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACnEa;;AAEb,2DAA2D,mBAAO,CAAC,kFAAQ;;;;;;;;;;;;ACF9D;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,uBAAuB;AACxC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,2BAA2B,qBAAqB;AAChD;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,qBAAqB;AAChD;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA,EAAE;AACF;;AAEA;;;;;;;;;;;ACnSA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,qCAAqC,WAAW;;;;;;;;;;;;ACRnC;;AAEb,WAAW,mBAAO,CAAC,cAAI;AACvB,QAAQ,WAAW,EAAE,mBAAO,CAAC,sBAAQ;AACrC,gBAAgB,mBAAO,CAAC,kBAAM;AAC9B,QAAQ,YAAY,EAAE,mBAAO,CAAC,kBAAM;AACpC,kBAAkB,mBAAO,CAAC,2FAAW;;AAErC;AACA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0BAA0B;AAC1B;AACA;AACA;AACA;AACA,KAAK;AACL,mBAAmB;AACnB,YAAY,aAAa;;AAEzB;AACA;;AAEA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB;;AAExB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB,0BAA0B;;AAE1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA,MAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,KAAK,eAAe,cAAc;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,aAAa,QAAQ;AACrB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,oBAAoB;AAC/B;AACA,oCAAoC;AACpC;AACA,6CAA6C;AAC7C;AACA;AACA;AACA,IAAI;AACJ;AACA,IAAI;AACJ,iEAAiE,qBAAqB;AACtF;;AAEA;AACA;AACA;;AAEA,2CAA2C;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;;;;;;;;;;;AC9RA,gIAAuC,C;;;;;;;;;;ACAvC,qBAAqB,mBAAO,CAAC,0GAAmB;;AAEhD,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA,gBAAgB;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,kBAAkB,kBAAkB;AACpC;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA,qBAAqB;AACrB;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,YAAY;AACZ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,oBAAoB;AACtC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;;;;;;;;;;;ACnGA;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACjKY;;AAEZ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;AChCA;AACA;;AAEA,aAAa,mBAAO,CAAC,sBAAQ;AAC7B,WAAW,mBAAO,CAAC,kBAAM;AACzB,SAAS,mBAAO,CAAC,cAAI;AACrB;AACA;AACA,SAAS,mBAAO,CAAC,2EAAM;AACvB,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,oBAAoB;AACtC;;AAEA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;;;;;;;;;;;ACnXA,eAAe,mBAAO,CAAC,sBAAQ;AAC/B,aAAa,mBAAO,CAAC,kBAAM;AAC3B,WAAW,mBAAO,CAAC,cAAI;AACvB;AACA;AACA,SAAS,mBAAO,CAAC,2EAAM;AACvB,EAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,GAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;AACA;;AAEA,kBAAkB,oBAAoB;AACtC;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,IAAI;AACJ;;AAEA;AACA;;;;;;;;;;;ACvWA;AACA;;AAEA,uBAAuB,mBAAO,CAAC,6GAAiB;;AAEhD;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,0CAA0C,wBAAwB;AAClE,KAAK;AACL,IAAI;AACJ;AACA;AACA,oCAAoC,sBAAsB;AAC1D,KAAK;AACL;;AAEA;AACA;;;;;;;;;;;;;;;;AClDe;AACf;AACA,qDAAqD;;AAErD;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;ACTa;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;;;;;;;;;;;;AChBd;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,iBAAiB,mBAAO,CAAC,2FAAW;;AAEpC;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,eAAe;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;;AAEA;AACA,gBAAgB;AAChB;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uBAAuB,aAAa;AACpC,IAAI;AACJ,yBAAyB,aAAa;AACtC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB,YAAY;AACZ;;AAEA;AACA;AACA,aAAa;AACb;;AAEA;AACA;AACA;AACA;;AAEA,kBAAkB,YAAY;AAC9B;;AAEA;AACA;;AAEA,MAAM;AACN;;AAEA,MAAM;AACN;AACA;AACA;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C7D,iBAAiB;AACjB;AACA;AACA;AACA,WAAW,WAAW;AACtB;AACA;AACA,oBAAoB,WAAW;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpBjB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS,gBAAgB,sCAAsC,kBAAkB;AACjF,wBAAwB;AACxB;AACA;;AAEO;AACP;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEO;AACP;AACA,+CAA+C,OAAO;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA,2DAA2D,cAAc;AACzE;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;;AAEO;AACP,kCAAkC;AAClC;;AAEO;AACP,uBAAuB,uFAAuF;AAC9G;AACA;AACA,yGAAyG;AACzG;AACA,sCAAsC,QAAQ;AAC9C;AACA,gEAAgE;AAChE;AACA,8CAA8C,yFAAyF;AACvI,8DAA8D,2CAA2C;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA,4CAA4C,yEAAyE;AACrH;;AAEO;AACP;AACA;;AAEO;AACP,0BAA0B,+DAA+D,iBAAiB;AAC1G;AACA,kCAAkC,MAAM,+BAA+B,YAAY;AACnF,iCAAiC,MAAM,mCAAmC,YAAY;AACtF,8BAA8B;AAC9B;AACA,GAAG;AACH;;AAEO;AACP,YAAY,6BAA6B,0BAA0B,cAAc,qBAAqB;AACtG,2IAA2I,cAAc;AACzJ,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA,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AClH;;AAEO;AACP,+BAA+B,uCAAuC,YAAY,KAAK,OAAO;AAC9F;AACA;;AAEA;AACA,wCAAwC,4BAA4B;AACpE,CAAC;AACD;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA,qDAAqD,cAAc;AACnE;AACA;AACA;;AAEO;AACP,2CAA2C;AAC3C;;AAEO;AACP;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,MAAM,oBAAoB,YAAY;AAC5E,qBAAqB,8CAA8C;AACnE;AACA;AACA,qBAAqB,aAAa;AAClC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uFAAuF,SAAS,gBAAgB;AAChH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA,iEAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;AChZU;;AAEZ,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,GAAG,YAAY,gBAAgB;AAC/B;;AAEA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG,YAAY,gBAAgB;AAC/B;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AAC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ources":["webpack://xmcp/webpack/universalModuleDefinition","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/index.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/async.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/common.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/providers/sync.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/fs.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/index.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/index.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/async.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/stream.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/providers/sync.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/async.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/common.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/reader.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/readers/sync.js","webpack://xmcp/../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js","webpack://xmcp/../../node_modules/.pnpm/aggregate-error@4.0.1/node_modules/aggregate-error/index.js","webpack://xmcp/../../node_modules/.pnpm/anymatch@3.1.3/node_modules/anymatch/index.js","webpack://xmcp/../../node_modules/.pnpm/array-union@1.0.2/node_modules/array-union/index.js","webpack://xmcp/../../node_modules/.pnpm/array-uniq@1.0.3/node_modules/array-uniq/index.js","webpack://xmcp/../../node_modules/.pnpm/async-retry@1.3.3/node_modules/async-retry/lib/index.js","webpack://xmcp/../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js","webpack://xmcp/../../node_modules/.pnpm/binary-extensions@2.3.0/node_modules/binary-extensions/index.js","webpack://xmcp/../../node_modules/.pnpm/brace-expansion@1.1.12/node_modules/brace-expansion/index.js","webpack://xmcp/../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/index.js","webpack://xmcp/../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/compile.js","webpack://xmcp/../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js","webpack://xmcp/../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/expand.js","webpack://xmcp/../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/parse.js","webpack://xmcp/../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/stringify.js","webpack://xmcp/../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/utils.js","webpack://xmcp/../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js","webpack://xmcp/../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js","webpack://xmcp/../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js","webpack://xmcp/../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js","webpack://xmcp/../../node_modules/.pnpm/chokidar@3.6.0/node_modules/chokidar/index.js","webpack://xmcp/../../node_modules/.pnpm/chokidar@3.6.0/node_modules/chokidar/lib/constants.js","webpack://xmcp/../../node_modules/.pnpm/chokidar@3.6.0/node_modules/chokidar/lib/fsevents-handler.js","webpack://xmcp/../../node_modules/.pnpm/chokidar@3.6.0/node_modules/chokidar/lib/nodefs-handler.js","webpack://xmcp/../../node_modules/.pnpm/ci-info@4.3.1/node_modules/ci-info/index.js","webpack://xmcp/../../node_modules/.pnpm/clean-stack@4.2.0/node_modules/clean-stack/index.js","webpack://xmcp/../../node_modules/.pnpm/clean-webpack-plugin@4.0.0_webpack@5.102.1_@swc+core@1.11.24_/node_modules/clean-webpack-plugin/dist/clean-webpack-plugin.js","webpack://xmcp/../../node_modules/.pnpm/commander@11.1.0/node_modules/commander/esm.mjs","webpack://xmcp/../../node_modules/.pnpm/commander@11.1.0/node_modules/commander/index.js","webpack://xmcp/../../node_modules/.pnpm/commander@11.1.0/node_modules/commander/lib/argument.js","webpack://xmcp/../../node_modules/.pnpm/commander@11.1.0/node_modules/commander/lib/command.js","webpack://xmcp/../../node_modules/.pnpm/commander@11.1.0/node_modules/commander/lib/error.js","webpack://xmcp/../../node_modules/.pnpm/commander@11.1.0/node_modules/commander/lib/help.js","webpack://xmcp/../../node_modules/.pnpm/commander@11.1.0/node_modules/commander/lib/option.js","webpack://xmcp/../../node_modules/.pnpm/commander@11.1.0/node_modules/commander/lib/suggestSimilar.js","webpack://xmcp/../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js","webpack://xmcp/../../node_modules/.pnpm/del@4.1.1/node_modules/del/index.js","webpack://xmcp/../../node_modules/.pnpm/del@7.1.0/node_modules/del/index.js","webpack://xmcp/../../node_modules/.pnpm/dir-glob@3.0.1/node_modules/dir-glob/index.js","webpack://xmcp/../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js","webpack://xmcp/../../node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/index.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/managers/tasks.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/async.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/deep.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/entry.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/filters/error.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/matcher.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/matchers/partial.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/stream.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/sync.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/transformers/entry.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/async.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/stream.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/sync.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/settings.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/errno.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/fs.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/index.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/stream.js","webpack://xmcp/../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/string.js","webpack://xmcp/../../node_modules/.pnpm/fastq@1.19.1/node_modules/fastq/queue.js","webpack://xmcp/../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/copy/copy-sync.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/copy/copy.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/copy/index.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/empty/index.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/ensure/file.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/ensure/index.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/ensure/link.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/ensure/symlink-paths.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/ensure/symlink-type.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/ensure/symlink.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/fs/index.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/index.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/json/index.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/json/jsonfile.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/json/output-json-sync.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/json/output-json.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/mkdirs/index.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/mkdirs/make-dir.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/mkdirs/utils.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/move/index.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/move/move-sync.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/move/move.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/output-file/index.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/path-exists/index.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/remove/index.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/util/async.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/util/stat.js","webpack://xmcp/../../node_modules/.pnpm/fs-extra@11.3.2/node_modules/fs-extra/lib/util/utimes.js","webpack://xmcp/../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js","webpack://xmcp/../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js","webpack://xmcp/../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js","webpack://xmcp/../../node_modules/.pnpm/glob-to-regex.js@1.2.0_tslib@2.8.1/node_modules/glob-to-regex.js/lib/index.js","webpack://xmcp/../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js","webpack://xmcp/../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js","webpack://xmcp/../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js","webpack://xmcp/../../node_modules/.pnpm/globby@13.2.2/node_modules/globby/ignore.js","webpack://xmcp/../../node_modules/.pnpm/globby@13.2.2/node_modules/globby/index.js","webpack://xmcp/../../node_modules/.pnpm/globby@13.2.2/node_modules/globby/utilities.js","webpack://xmcp/../../node_modules/.pnpm/globby@6.1.0/node_modules/globby/index.js","webpack://xmcp/../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js","webpack://xmcp/../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js","webpack://xmcp/../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js","webpack://xmcp/../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js","webpack://xmcp/../../node_modules/.pnpm/ignore@5.3.2/node_modules/ignore/index.js","webpack://xmcp/../../node_modules/.pnpm/indent-string@5.0.0/node_modules/indent-string/index.js","webpack://xmcp/../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js","webpack://xmcp/../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js","webpack://xmcp/../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js","webpack://xmcp/../../node_modules/.pnpm/is-binary-path@2.1.0/node_modules/is-binary-path/index.js","webpack://xmcp/../../node_modules/.pnpm/is-docker@3.0.0/node_modules/is-docker/index.js","webpack://xmcp/../../node_modules/.pnpm/is-docker@4.0.0/node_modules/is-docker/index.js","webpack://xmcp/../../node_modules/.pnpm/is-extglob@2.1.1/node_modules/is-extglob/index.js","webpack://xmcp/../../node_modules/.pnpm/is-glob@4.0.3/node_modules/is-glob/index.js","webpack://xmcp/../../node_modules/.pnpm/is-inside-container@1.0.0/node_modules/is-inside-container/index.js","webpack://xmcp/../../node_modules/.pnpm/is-number@7.0.0/node_modules/is-number/index.js","webpack://xmcp/../../node_modules/.pnpm/is-path-cwd@2.2.0/node_modules/is-path-cwd/index.js","webpack://xmcp/../../node_modules/.pnpm/is-path-cwd@3.0.0/node_modules/is-path-cwd/index.js","webpack://xmcp/../../node_modules/.pnpm/is-path-in-cwd@2.1.0/node_modules/is-path-in-cwd/index.js","webpack://xmcp/../../node_modules/.pnpm/is-path-inside@2.1.0/node_modules/is-path-inside/index.js","webpack://xmcp/../../node_modules/.pnpm/is-path-inside@4.0.0/node_modules/is-path-inside/index.js","webpack://xmcp/../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js","webpack://xmcp/../../node_modules/.pnpm/json5@2.2.3/node_modules/json5/dist/index.mjs","webpack://xmcp/../../node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/index.js","webpack://xmcp/../../node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/utils.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/constants.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/core/File.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/core/Link.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/core/Node.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/core/Superblock.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/core/index.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/core/json.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/core/types.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/core/util.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/encoding.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/index.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node-to-fsa/util.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node/Dir.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node/Dirent.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node/FileHandle.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node/FsPromises.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node/StatFs.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node/Stats.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node/constants.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node/glob.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node/lists/fsCallbackApiList.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node/lists/fsSynchronousApiList.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node/options.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node/util.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/node/volume.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/print/index.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/process.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/queueMicrotask.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/setTimeoutUnref.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/vendor/node/buffer.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/vendor/node/events.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/vendor/node/internal/buffer.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/vendor/node/internal/errors.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/vendor/node/path.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/vendor/node/stream.js","webpack://xmcp/../../node_modules/.pnpm/memfs@4.49.0/node_modules/memfs/lib/vendor/node/util.js","webpack://xmcp/../../node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.js","webpack://xmcp/../../node_modules/.pnpm/micromatch@4.0.8/node_modules/micromatch/index.js","webpack://xmcp/../../node_modules/.pnpm/minimatch@3.1.2/node_modules/minimatch/minimatch.js","webpack://xmcp/../../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js","webpack://xmcp/../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js","webpack://xmcp/../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js","webpack://xmcp/../../node_modules/.pnpm/p-map@2.1.0/node_modules/p-map/index.js","webpack://xmcp/../../node_modules/.pnpm/p-map@5.5.0/node_modules/p-map/index.js","webpack://xmcp/../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js","webpack://xmcp/../../node_modules/.pnpm/path-is-inside@1.0.2/node_modules/path-is-inside/lib/path-is-inside.js","webpack://xmcp/../../node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.js","webpack://xmcp/../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/index.js","webpack://xmcp/../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js","webpack://xmcp/../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js","webpack://xmcp/../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js","webpack://xmcp/../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/scan.js","webpack://xmcp/../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js","webpack://xmcp/../../node_modules/.pnpm/pify@2.3.0/node_modules/pify/index.js","webpack://xmcp/../../node_modules/.pnpm/pify@4.0.1/node_modules/pify/index.js","webpack://xmcp/../../node_modules/.pnpm/pinkie-promise@2.0.1/node_modules/pinkie-promise/index.js","webpack://xmcp/../../node_modules/.pnpm/pinkie@2.0.4/node_modules/pinkie/index.js","webpack://xmcp/../../node_modules/.pnpm/queue-microtask@1.2.3/node_modules/queue-microtask/index.js","webpack://xmcp/../../node_modules/.pnpm/readdirp@3.6.0/node_modules/readdirp/index.js","webpack://xmcp/../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/index.js","webpack://xmcp/../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry.js","webpack://xmcp/../../node_modules/.pnpm/retry@0.13.1/node_modules/retry/lib/retry_operation.js","webpack://xmcp/../../node_modules/.pnpm/reusify@1.1.0/node_modules/reusify/reusify.js","webpack://xmcp/../../node_modules/.pnpm/rimraf@2.7.1/node_modules/rimraf/rimraf.js","webpack://xmcp/../../node_modules/.pnpm/rimraf@3.0.2/node_modules/rimraf/rimraf.js","webpack://xmcp/../../node_modules/.pnpm/run-parallel@1.2.0/node_modules/run-parallel/index.js","webpack://xmcp/../../node_modules/.pnpm/slash@4.0.0/node_modules/slash/index.js","webpack://xmcp/../../node_modules/.pnpm/thingies@2.5.0_tslib@2.8.1/node_modules/thingies/lib/fanout.js","webpack://xmcp/../../node_modules/.pnpm/to-regex-range@5.0.1/node_modules/to-regex-range/index.js","webpack://xmcp/../../node_modules/.pnpm/tree-dump@1.1.0_tslib@2.8.1/node_modules/tree-dump/lib/index.js","webpack://xmcp/../../node_modules/.pnpm/tree-dump@1.1.0_tslib@2.8.1/node_modules/tree-dump/lib/printBinary.js","webpack://xmcp/../../node_modules/.pnpm/tree-dump@1.1.0_tslib@2.8.1/node_modules/tree-dump/lib/printJson.js","webpack://xmcp/../../node_modules/.pnpm/tree-dump@1.1.0_tslib@2.8.1/node_modules/tree-dump/lib/printTree.js","webpack://xmcp/../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs","webpack://xmcp/../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js","webpack://xmcp/../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js","webpack://xmcp/./src/compiler/compiler-context.ts","webpack://xmcp/./src/compiler/config/constants.ts","webpack://xmcp/./src/compiler/config/index.ts","webpack://xmcp/./src/compiler/config/injection.ts","webpack://xmcp/./src/compiler/config/schemas/experimental/index.ts","webpack://xmcp/./src/compiler/config/schemas/experimental/oauth.ts","webpack://xmcp/./src/compiler/config/schemas/index.ts","webpack://xmcp/./src/compiler/config/schemas/paths.ts","webpack://xmcp/./src/compiler/config/schemas/template.ts","webpack://xmcp/./src/compiler/config/schemas/transport/http.ts","webpack://xmcp/./src/compiler/config/schemas/transport/stdio.ts","webpack://xmcp/./src/compiler/config/schemas/webpack.ts","webpack://xmcp/./src/compiler/config/utils.ts","webpack://xmcp/./src/compiler/generate-env-code.ts","webpack://xmcp/./src/compiler/generate-import-code.ts","webpack://xmcp/./src/compiler/generate-tools-code.ts","webpack://xmcp/./src/compiler/get-webpack-config/get-entries.ts","webpack://xmcp/./src/compiler/get-webpack-config/get-externals.ts","webpack://xmcp/./src/compiler/get-webpack-config/get-injected-variables.ts","webpack://xmcp/./src/compiler/get-webpack-config/index.ts","webpack://xmcp/./src/compiler/get-webpack-config/plugins.ts","webpack://xmcp/./src/compiler/get-webpack-config/resolve-tsconfig-paths.ts","webpack://xmcp/./src/compiler/index.ts","webpack://xmcp/./src/compiler/on-first-build.ts","webpack://xmcp/./src/compiler/parse-xmcp-config.ts","webpack://xmcp/./src/compiler/start-http-server.ts","webpack://xmcp/./src/compiler/transpile-client-components.ts","webpack://xmcp/./src/compiler/utils/path-utils.ts","webpack://xmcp/./src/platforms/build-vercel-output.ts","webpack://xmcp/./src/runtime/utils/react/index.ts","webpack://xmcp/./src/telemetry/ci-info.ts","webpack://xmcp/./src/telemetry/events/definitions.ts","webpack://xmcp/./src/telemetry/events/post-payload.ts","webpack://xmcp/./src/telemetry/events/tracker.ts","webpack://xmcp/./src/telemetry/index.ts","webpack://xmcp/./src/telemetry/metadata.ts","webpack://xmcp/./src/telemetry/project-id.ts","webpack://xmcp/./src/telemetry/storage.ts","webpack://xmcp/./src/utils/cli-icons.ts","webpack://xmcp/./src/utils/constants.ts","webpack://xmcp/./src/utils/context.ts","webpack://xmcp/./src/utils/file-watcher.ts","webpack://xmcp/./src/utils/fs-utils.ts","webpack://xmcp/./src/utils/path-validation.ts","webpack://xmcp/./src/utils/spawn-process.ts","webpack://xmcp/./src/utils/subscribable.ts","webpack://xmcp/external node-commonjs \"assert\"","webpack://xmcp/external node-commonjs \"async_hooks\"","webpack://xmcp/external node-commonjs \"child_process\"","webpack://xmcp/external node-commonjs \"constants\"","webpack://xmcp/external node-commonjs \"crypto\"","webpack://xmcp/external node-commonjs \"events\"","webpack://xmcp/external node-commonjs \"fs\"","webpack://xmcp/external node-commonjs \"module\"","webpack://xmcp/external node-commonjs \"node:buffer\"","webpack://xmcp/external node-commonjs \"node:events\"","webpack://xmcp/external node-commonjs \"node:fs\"","webpack://xmcp/external node-commonjs \"node:os\"","webpack://xmcp/external node-commonjs \"node:path\"","webpack://xmcp/external node-commonjs \"node:process\"","webpack://xmcp/external node-commonjs \"node:stream\"","webpack://xmcp/external node-commonjs \"node:tty\"","webpack://xmcp/external node-commonjs \"node:url\"","webpack://xmcp/external node-commonjs \"node:util\"","webpack://xmcp/external node-commonjs \"os\"","webpack://xmcp/external node-commonjs \"path\"","webpack://xmcp/external node-commonjs \"process\"","webpack://xmcp/external node-commonjs \"stream\"","webpack://xmcp/external node-commonjs \"url\"","webpack://xmcp/external node-commonjs \"util\"","webpack://xmcp/external commonjs \"webpack\"","webpack://xmcp/external commonjs \"zod\"","webpack://xmcp/webpack/bootstrap","webpack://xmcp/webpack/runtime/compat get default export","webpack://xmcp/webpack/runtime/define property getters","webpack://xmcp/webpack/runtime/hasOwnProperty shorthand","webpack://xmcp/webpack/runtime/make namespace object","webpack://xmcp/./src/cli.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(this, () => {\nreturn ","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;\nconst fs = require(\"fs\");\nexports.FILE_SYSTEM_ADAPTER = {\n lstat: fs.lstat,\n stat: fs.stat,\n lstatSync: fs.lstatSync,\n statSync: fs.statSync,\n readdir: fs.readdir,\n readdirSync: fs.readdirSync\n};\nfunction createFileSystemAdapter(fsMethods) {\n if (fsMethods === undefined) {\n return exports.FILE_SYSTEM_ADAPTER;\n }\n return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);\n}\nexports.createFileSystemAdapter = createFileSystemAdapter;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;\nconst NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');\nif (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) {\n throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);\n}\nconst MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10);\nconst MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10);\nconst SUPPORTED_MAJOR_VERSION = 10;\nconst SUPPORTED_MINOR_VERSION = 10;\nconst IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION;\nconst IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION;\n/**\n * IS `true` for Node.js 10.10 and greater.\n */\nexports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Settings = exports.scandirSync = exports.scandir = void 0;\nconst async = require(\"./providers/async\");\nconst sync = require(\"./providers/sync\");\nconst settings_1 = require(\"./settings\");\nexports.Settings = settings_1.default;\nfunction scandir(path, optionsOrSettingsOrCallback, callback) {\n if (typeof optionsOrSettingsOrCallback === 'function') {\n async.read(path, getSettings(), optionsOrSettingsOrCallback);\n return;\n }\n async.read(path, getSettings(optionsOrSettingsOrCallback), callback);\n}\nexports.scandir = scandir;\nfunction scandirSync(path, optionsOrSettings) {\n const settings = getSettings(optionsOrSettings);\n return sync.read(path, settings);\n}\nexports.scandirSync = scandirSync;\nfunction getSettings(settingsOrOptions = {}) {\n if (settingsOrOptions instanceof settings_1.default) {\n return settingsOrOptions;\n }\n return new settings_1.default(settingsOrOptions);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.readdir = exports.readdirWithFileTypes = exports.read = void 0;\nconst fsStat = require(\"@nodelib/fs.stat\");\nconst rpl = require(\"run-parallel\");\nconst constants_1 = require(\"../constants\");\nconst utils = require(\"../utils\");\nconst common = require(\"./common\");\nfunction read(directory, settings, callback) {\n if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {\n readdirWithFileTypes(directory, settings, callback);\n return;\n }\n readdir(directory, settings, callback);\n}\nexports.read = read;\nfunction readdirWithFileTypes(directory, settings, callback) {\n settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => {\n if (readdirError !== null) {\n callFailureCallback(callback, readdirError);\n return;\n }\n const entries = dirents.map((dirent) => ({\n dirent,\n name: dirent.name,\n path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)\n }));\n if (!settings.followSymbolicLinks) {\n callSuccessCallback(callback, entries);\n return;\n }\n const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings));\n rpl(tasks, (rplError, rplEntries) => {\n if (rplError !== null) {\n callFailureCallback(callback, rplError);\n return;\n }\n callSuccessCallback(callback, rplEntries);\n });\n });\n}\nexports.readdirWithFileTypes = readdirWithFileTypes;\nfunction makeRplTaskEntry(entry, settings) {\n return (done) => {\n if (!entry.dirent.isSymbolicLink()) {\n done(null, entry);\n return;\n }\n settings.fs.stat(entry.path, (statError, stats) => {\n if (statError !== null) {\n if (settings.throwErrorOnBrokenSymbolicLink) {\n done(statError);\n return;\n }\n done(null, entry);\n return;\n }\n entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);\n done(null, entry);\n });\n };\n}\nfunction readdir(directory, settings, callback) {\n settings.fs.readdir(directory, (readdirError, names) => {\n if (readdirError !== null) {\n callFailureCallback(callback, readdirError);\n return;\n }\n const tasks = names.map((name) => {\n const path = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);\n return (done) => {\n fsStat.stat(path, settings.fsStatSettings, (error, stats) => {\n if (error !== null) {\n done(error);\n return;\n }\n const entry = {\n name,\n path,\n dirent: utils.fs.createDirentFromStats(name, stats)\n };\n if (settings.stats) {\n entry.stats = stats;\n }\n done(null, entry);\n });\n };\n });\n rpl(tasks, (rplError, entries) => {\n if (rplError !== null) {\n callFailureCallback(callback, rplError);\n return;\n }\n callSuccessCallback(callback, entries);\n });\n });\n}\nexports.readdir = readdir;\nfunction callFailureCallback(callback, error) {\n callback(error);\n}\nfunction callSuccessCallback(callback, result) {\n callback(null, result);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.joinPathSegments = void 0;\nfunction joinPathSegments(a, b, separator) {\n /**\n * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).\n */\n if (a.endsWith(separator)) {\n return a + b;\n }\n return a + separator + b;\n}\nexports.joinPathSegments = joinPathSegments;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.readdir = exports.readdirWithFileTypes = exports.read = void 0;\nconst fsStat = require(\"@nodelib/fs.stat\");\nconst constants_1 = require(\"../constants\");\nconst utils = require(\"../utils\");\nconst common = require(\"./common\");\nfunction read(directory, settings) {\n if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {\n return readdirWithFileTypes(directory, settings);\n }\n return readdir(directory, settings);\n}\nexports.read = read;\nfunction readdirWithFileTypes(directory, settings) {\n const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });\n return dirents.map((dirent) => {\n const entry = {\n dirent,\n name: dirent.name,\n path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)\n };\n if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {\n try {\n const stats = settings.fs.statSync(entry.path);\n entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);\n }\n catch (error) {\n if (settings.throwErrorOnBrokenSymbolicLink) {\n throw error;\n }\n }\n }\n return entry;\n });\n}\nexports.readdirWithFileTypes = readdirWithFileTypes;\nfunction readdir(directory, settings) {\n const names = settings.fs.readdirSync(directory);\n return names.map((name) => {\n const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);\n const stats = fsStat.statSync(entryPath, settings.fsStatSettings);\n const entry = {\n name,\n path: entryPath,\n dirent: utils.fs.createDirentFromStats(name, stats)\n };\n if (settings.stats) {\n entry.stats = stats;\n }\n return entry;\n });\n}\nexports.readdir = readdir;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = require(\"path\");\nconst fsStat = require(\"@nodelib/fs.stat\");\nconst fs = require(\"./adapters/fs\");\nclass Settings {\n constructor(_options = {}) {\n this._options = _options;\n this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);\n this.fs = fs.createFileSystemAdapter(this._options.fs);\n this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);\n this.stats = this._getValue(this._options.stats, false);\n this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);\n this.fsStatSettings = new fsStat.Settings({\n followSymbolicLink: this.followSymbolicLinks,\n fs: this.fs,\n throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink\n });\n }\n _getValue(option, value) {\n return option !== null && option !== void 0 ? option : value;\n }\n}\nexports.default = Settings;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createDirentFromStats = void 0;\nclass DirentFromStats {\n constructor(name, stats) {\n this.name = name;\n this.isBlockDevice = stats.isBlockDevice.bind(stats);\n this.isCharacterDevice = stats.isCharacterDevice.bind(stats);\n this.isDirectory = stats.isDirectory.bind(stats);\n this.isFIFO = stats.isFIFO.bind(stats);\n this.isFile = stats.isFile.bind(stats);\n this.isSocket = stats.isSocket.bind(stats);\n this.isSymbolicLink = stats.isSymbolicLink.bind(stats);\n }\n}\nfunction createDirentFromStats(name, stats) {\n return new DirentFromStats(name, stats);\n}\nexports.createDirentFromStats = createDirentFromStats;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fs = void 0;\nconst fs = require(\"./fs\");\nexports.fs = fs;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;\nconst fs = require(\"fs\");\nexports.FILE_SYSTEM_ADAPTER = {\n lstat: fs.lstat,\n stat: fs.stat,\n lstatSync: fs.lstatSync,\n statSync: fs.statSync\n};\nfunction createFileSystemAdapter(fsMethods) {\n if (fsMethods === undefined) {\n return exports.FILE_SYSTEM_ADAPTER;\n }\n return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);\n}\nexports.createFileSystemAdapter = createFileSystemAdapter;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.statSync = exports.stat = exports.Settings = void 0;\nconst async = require(\"./providers/async\");\nconst sync = require(\"./providers/sync\");\nconst settings_1 = require(\"./settings\");\nexports.Settings = settings_1.default;\nfunction stat(path, optionsOrSettingsOrCallback, callback) {\n if (typeof optionsOrSettingsOrCallback === 'function') {\n async.read(path, getSettings(), optionsOrSettingsOrCallback);\n return;\n }\n async.read(path, getSettings(optionsOrSettingsOrCallback), callback);\n}\nexports.stat = stat;\nfunction statSync(path, optionsOrSettings) {\n const settings = getSettings(optionsOrSettings);\n return sync.read(path, settings);\n}\nexports.statSync = statSync;\nfunction getSettings(settingsOrOptions = {}) {\n if (settingsOrOptions instanceof settings_1.default) {\n return settingsOrOptions;\n }\n return new settings_1.default(settingsOrOptions);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.read = void 0;\nfunction read(path, settings, callback) {\n settings.fs.lstat(path, (lstatError, lstat) => {\n if (lstatError !== null) {\n callFailureCallback(callback, lstatError);\n return;\n }\n if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {\n callSuccessCallback(callback, lstat);\n return;\n }\n settings.fs.stat(path, (statError, stat) => {\n if (statError !== null) {\n if (settings.throwErrorOnBrokenSymbolicLink) {\n callFailureCallback(callback, statError);\n return;\n }\n callSuccessCallback(callback, lstat);\n return;\n }\n if (settings.markSymbolicLink) {\n stat.isSymbolicLink = () => true;\n }\n callSuccessCallback(callback, stat);\n });\n });\n}\nexports.read = read;\nfunction callFailureCallback(callback, error) {\n callback(error);\n}\nfunction callSuccessCallback(callback, result) {\n callback(null, result);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.read = void 0;\nfunction read(path, settings) {\n const lstat = settings.fs.lstatSync(path);\n if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {\n return lstat;\n }\n try {\n const stat = settings.fs.statSync(path);\n if (settings.markSymbolicLink) {\n stat.isSymbolicLink = () => true;\n }\n return stat;\n }\n catch (error) {\n if (!settings.throwErrorOnBrokenSymbolicLink) {\n return lstat;\n }\n throw error;\n }\n}\nexports.read = read;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fs = require(\"./adapters/fs\");\nclass Settings {\n constructor(_options = {}) {\n this._options = _options;\n this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);\n this.fs = fs.createFileSystemAdapter(this._options.fs);\n this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);\n this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);\n }\n _getValue(option, value) {\n return option !== null && option !== void 0 ? option : value;\n }\n}\nexports.default = Settings;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Settings = exports.walkStream = exports.walkSync = exports.walk = void 0;\nconst async_1 = require(\"./providers/async\");\nconst stream_1 = require(\"./providers/stream\");\nconst sync_1 = require(\"./providers/sync\");\nconst settings_1 = require(\"./settings\");\nexports.Settings = settings_1.default;\nfunction walk(directory, optionsOrSettingsOrCallback, callback) {\n if (typeof optionsOrSettingsOrCallback === 'function') {\n new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback);\n return;\n }\n new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);\n}\nexports.walk = walk;\nfunction walkSync(directory, optionsOrSettings) {\n const settings = getSettings(optionsOrSettings);\n const provider = new sync_1.default(directory, settings);\n return provider.read();\n}\nexports.walkSync = walkSync;\nfunction walkStream(directory, optionsOrSettings) {\n const settings = getSettings(optionsOrSettings);\n const provider = new stream_1.default(directory, settings);\n return provider.read();\n}\nexports.walkStream = walkStream;\nfunction getSettings(settingsOrOptions = {}) {\n if (settingsOrOptions instanceof settings_1.default) {\n return settingsOrOptions;\n }\n return new settings_1.default(settingsOrOptions);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst async_1 = require(\"../readers/async\");\nclass AsyncProvider {\n constructor(_root, _settings) {\n this._root = _root;\n this._settings = _settings;\n this._reader = new async_1.default(this._root, this._settings);\n this._storage = [];\n }\n read(callback) {\n this._reader.onError((error) => {\n callFailureCallback(callback, error);\n });\n this._reader.onEntry((entry) => {\n this._storage.push(entry);\n });\n this._reader.onEnd(() => {\n callSuccessCallback(callback, this._storage);\n });\n this._reader.read();\n }\n}\nexports.default = AsyncProvider;\nfunction callFailureCallback(callback, error) {\n callback(error);\n}\nfunction callSuccessCallback(callback, entries) {\n callback(null, entries);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst stream_1 = require(\"stream\");\nconst async_1 = require(\"../readers/async\");\nclass StreamProvider {\n constructor(_root, _settings) {\n this._root = _root;\n this._settings = _settings;\n this._reader = new async_1.default(this._root, this._settings);\n this._stream = new stream_1.Readable({\n objectMode: true,\n read: () => { },\n destroy: () => {\n if (!this._reader.isDestroyed) {\n this._reader.destroy();\n }\n }\n });\n }\n read() {\n this._reader.onError((error) => {\n this._stream.emit('error', error);\n });\n this._reader.onEntry((entry) => {\n this._stream.push(entry);\n });\n this._reader.onEnd(() => {\n this._stream.push(null);\n });\n this._reader.read();\n return this._stream;\n }\n}\nexports.default = StreamProvider;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst sync_1 = require(\"../readers/sync\");\nclass SyncProvider {\n constructor(_root, _settings) {\n this._root = _root;\n this._settings = _settings;\n this._reader = new sync_1.default(this._root, this._settings);\n }\n read() {\n return this._reader.read();\n }\n}\nexports.default = SyncProvider;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"events\");\nconst fsScandir = require(\"@nodelib/fs.scandir\");\nconst fastq = require(\"fastq\");\nconst common = require(\"./common\");\nconst reader_1 = require(\"./reader\");\nclass AsyncReader extends reader_1.default {\n constructor(_root, _settings) {\n super(_root, _settings);\n this._settings = _settings;\n this._scandir = fsScandir.scandir;\n this._emitter = new events_1.EventEmitter();\n this._queue = fastq(this._worker.bind(this), this._settings.concurrency);\n this._isFatalError = false;\n this._isDestroyed = false;\n this._queue.drain = () => {\n if (!this._isFatalError) {\n this._emitter.emit('end');\n }\n };\n }\n read() {\n this._isFatalError = false;\n this._isDestroyed = false;\n setImmediate(() => {\n this._pushToQueue(this._root, this._settings.basePath);\n });\n return this._emitter;\n }\n get isDestroyed() {\n return this._isDestroyed;\n }\n destroy() {\n if (this._isDestroyed) {\n throw new Error('The reader is already destroyed');\n }\n this._isDestroyed = true;\n this._queue.killAndDrain();\n }\n onEntry(callback) {\n this._emitter.on('entry', callback);\n }\n onError(callback) {\n this._emitter.once('error', callback);\n }\n onEnd(callback) {\n this._emitter.once('end', callback);\n }\n _pushToQueue(directory, base) {\n const queueItem = { directory, base };\n this._queue.push(queueItem, (error) => {\n if (error !== null) {\n this._handleError(error);\n }\n });\n }\n _worker(item, done) {\n this._scandir(item.directory, this._settings.fsScandirSettings, (error, entries) => {\n if (error !== null) {\n done(error, undefined);\n return;\n }\n for (const entry of entries) {\n this._handleEntry(entry, item.base);\n }\n done(null, undefined);\n });\n }\n _handleError(error) {\n if (this._isDestroyed || !common.isFatalError(this._settings, error)) {\n return;\n }\n this._isFatalError = true;\n this._isDestroyed = true;\n this._emitter.emit('error', error);\n }\n _handleEntry(entry, base) {\n if (this._isDestroyed || this._isFatalError) {\n return;\n }\n const fullpath = entry.path;\n if (base !== undefined) {\n entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);\n }\n if (common.isAppliedFilter(this._settings.entryFilter, entry)) {\n this._emitEntry(entry);\n }\n if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {\n this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);\n }\n }\n _emitEntry(entry) {\n this._emitter.emit('entry', entry);\n }\n}\nexports.default = AsyncReader;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.joinPathSegments = exports.replacePathSegmentSeparator = exports.isAppliedFilter = exports.isFatalError = void 0;\nfunction isFatalError(settings, error) {\n if (settings.errorFilter === null) {\n return true;\n }\n return !settings.errorFilter(error);\n}\nexports.isFatalError = isFatalError;\nfunction isAppliedFilter(filter, value) {\n return filter === null || filter(value);\n}\nexports.isAppliedFilter = isAppliedFilter;\nfunction replacePathSegmentSeparator(filepath, separator) {\n return filepath.split(/[/\\\\]/).join(separator);\n}\nexports.replacePathSegmentSeparator = replacePathSegmentSeparator;\nfunction joinPathSegments(a, b, separator) {\n if (a === '') {\n return b;\n }\n /**\n * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).\n */\n if (a.endsWith(separator)) {\n return a + b;\n }\n return a + separator + b;\n}\nexports.joinPathSegments = joinPathSegments;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst common = require(\"./common\");\nclass Reader {\n constructor(_root, _settings) {\n this._root = _root;\n this._settings = _settings;\n this._root = common.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator);\n }\n}\nexports.default = Reader;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fsScandir = require(\"@nodelib/fs.scandir\");\nconst common = require(\"./common\");\nconst reader_1 = require(\"./reader\");\nclass SyncReader extends reader_1.default {\n constructor() {\n super(...arguments);\n this._scandir = fsScandir.scandirSync;\n this._storage = [];\n this._queue = new Set();\n }\n read() {\n this._pushToQueue(this._root, this._settings.basePath);\n this._handleQueue();\n return this._storage;\n }\n _pushToQueue(directory, base) {\n this._queue.add({ directory, base });\n }\n _handleQueue() {\n for (const item of this._queue.values()) {\n this._handleDirectory(item.directory, item.base);\n }\n }\n _handleDirectory(directory, base) {\n try {\n const entries = this._scandir(directory, this._settings.fsScandirSettings);\n for (const entry of entries) {\n this._handleEntry(entry, base);\n }\n }\n catch (error) {\n this._handleError(error);\n }\n }\n _handleError(error) {\n if (!common.isFatalError(this._settings, error)) {\n return;\n }\n throw error;\n }\n _handleEntry(entry, base) {\n const fullpath = entry.path;\n if (base !== undefined) {\n entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);\n }\n if (common.isAppliedFilter(this._settings.entryFilter, entry)) {\n this._pushToStorage(entry);\n }\n if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {\n this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);\n }\n }\n _pushToStorage(entry) {\n this._storage.push(entry);\n }\n}\nexports.default = SyncReader;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = require(\"path\");\nconst fsScandir = require(\"@nodelib/fs.scandir\");\nclass Settings {\n constructor(_options = {}) {\n this._options = _options;\n this.basePath = this._getValue(this._options.basePath, undefined);\n this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY);\n this.deepFilter = this._getValue(this._options.deepFilter, null);\n this.entryFilter = this._getValue(this._options.entryFilter, null);\n this.errorFilter = this._getValue(this._options.errorFilter, null);\n this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path.sep);\n this.fsScandirSettings = new fsScandir.Settings({\n followSymbolicLinks: this._options.followSymbolicLinks,\n fs: this._options.fs,\n pathSegmentSeparator: this._options.pathSegmentSeparator,\n stats: this._options.stats,\n throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink\n });\n }\n _getValue(option, value) {\n return option !== null && option !== void 0 ? option : value;\n }\n}\nexports.default = Settings;\n","import indentString from 'indent-string';\nimport cleanStack from 'clean-stack';\n\nconst cleanInternalStack = stack => stack.replace(/\\s+at .*aggregate-error\\/index.js:\\d+:\\d+\\)?/g, '');\n\nexport default class AggregateError extends Error {\n\t#errors;\n\n\tname = 'AggregateError';\n\n\tconstructor(errors) {\n\t\tif (!Array.isArray(errors)) {\n\t\t\tthrow new TypeError(`Expected input to be an Array, got ${typeof errors}`);\n\t\t}\n\n\t\terrors = errors.map(error => {\n\t\t\tif (error instanceof Error) {\n\t\t\t\treturn error;\n\t\t\t}\n\n\t\t\tif (error !== null && typeof error === 'object') {\n\t\t\t\t// Handle plain error objects with message property and/or possibly other metadata\n\t\t\t\treturn Object.assign(new Error(error.message), error);\n\t\t\t}\n\n\t\t\treturn new Error(error);\n\t\t});\n\n\t\tlet message = errors\n\t\t\t.map(error => {\n\t\t\t\t// The `stack` property is not standardized, so we can't assume it exists\n\t\t\t\treturn typeof error.stack === 'string' && error.stack.length > 0 ? cleanInternalStack(cleanStack(error.stack)) : String(error);\n\t\t\t})\n\t\t\t.join('\\n');\n\t\tmessage = '\\n' + indentString(message, 4);\n\t\tsuper(message);\n\n\t\tthis.#errors = errors;\n\t}\n\n\tget errors() {\n\t\treturn this.#errors.slice();\n\t}\n}\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n\nconst picomatch = require('picomatch');\nconst normalizePath = require('normalize-path');\n\n/**\n * @typedef {(testString: string) => boolean} AnymatchFn\n * @typedef {string|RegExp|AnymatchFn} AnymatchPattern\n * @typedef {AnymatchPattern|AnymatchPattern[]} AnymatchMatcher\n */\nconst BANG = '!';\nconst DEFAULT_OPTIONS = {returnIndex: false};\nconst arrify = (item) => Array.isArray(item) ? item : [item];\n\n/**\n * @param {AnymatchPattern} matcher\n * @param {object} options\n * @returns {AnymatchFn}\n */\nconst createPattern = (matcher, options) => {\n if (typeof matcher === 'function') {\n return matcher;\n }\n if (typeof matcher === 'string') {\n const glob = picomatch(matcher, options);\n return (string) => matcher === string || glob(string);\n }\n if (matcher instanceof RegExp) {\n return (string) => matcher.test(string);\n }\n return (string) => false;\n};\n\n/**\n * @param {Array<Function>} patterns\n * @param {Array<Function>} negPatterns\n * @param {String|Array} args\n * @param {Boolean} returnIndex\n * @returns {boolean|number}\n */\nconst matchPatterns = (patterns, negPatterns, args, returnIndex) => {\n const isList = Array.isArray(args);\n const _path = isList ? args[0] : args;\n if (!isList && typeof _path !== 'string') {\n throw new TypeError('anymatch: second argument must be a string: got ' +\n Object.prototype.toString.call(_path))\n }\n const path = normalizePath(_path, false);\n\n for (let index = 0; index < negPatterns.length; index++) {\n const nglob = negPatterns[index];\n if (nglob(path)) {\n return returnIndex ? -1 : false;\n }\n }\n\n const applied = isList && [path].concat(args.slice(1));\n for (let index = 0; index < patterns.length; index++) {\n const pattern = patterns[index];\n if (isList ? pattern(...applied) : pattern(path)) {\n return returnIndex ? index : true;\n }\n }\n\n return returnIndex ? -1 : false;\n};\n\n/**\n * @param {AnymatchMatcher} matchers\n * @param {Array|string} testString\n * @param {object} options\n * @returns {boolean|number|Function}\n */\nconst anymatch = (matchers, testString, options = DEFAULT_OPTIONS) => {\n if (matchers == null) {\n throw new TypeError('anymatch: specify first argument');\n }\n const opts = typeof options === 'boolean' ? {returnIndex: options} : options;\n const returnIndex = opts.returnIndex || false;\n\n // Early cache for matchers.\n const mtchers = arrify(matchers);\n const negatedGlobs = mtchers\n .filter(item => typeof item === 'string' && item.charAt(0) === BANG)\n .map(item => item.slice(1))\n .map(item => picomatch(item, opts));\n const patterns = mtchers\n .filter(item => typeof item !== 'string' || (typeof item === 'string' && item.charAt(0) !== BANG))\n .map(matcher => createPattern(matcher, opts));\n\n if (testString == null) {\n return (testString, ri = false) => {\n const returnIndex = typeof ri === 'boolean' ? ri : false;\n return matchPatterns(patterns, negatedGlobs, testString, returnIndex);\n }\n }\n\n return matchPatterns(patterns, negatedGlobs, testString, returnIndex);\n};\n\nanymatch.default = anymatch;\nmodule.exports = anymatch;\n","'use strict';\nvar arrayUniq = require('array-uniq');\n\nmodule.exports = function () {\n\treturn arrayUniq([].concat.apply([], arguments));\n};\n","'use strict';\n\n// there's 3 implementations written in increasing order of efficiency\n\n// 1 - no Set type is defined\nfunction uniqNoSet(arr) {\n\tvar ret = [];\n\n\tfor (var i = 0; i < arr.length; i++) {\n\t\tif (ret.indexOf(arr[i]) === -1) {\n\t\t\tret.push(arr[i]);\n\t\t}\n\t}\n\n\treturn ret;\n}\n\n// 2 - a simple Set type is defined\nfunction uniqSet(arr) {\n\tvar seen = new Set();\n\treturn arr.filter(function (el) {\n\t\tif (!seen.has(el)) {\n\t\t\tseen.add(el);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t});\n}\n\n// 3 - a standard Set type is defined and it has a forEach method\nfunction uniqSetWithForEach(arr) {\n\tvar ret = [];\n\n\t(new Set(arr)).forEach(function (el) {\n\t\tret.push(el);\n\t});\n\n\treturn ret;\n}\n\n// V8 currently has a broken implementation\n// https://github.com/joyent/node/issues/8449\nfunction doesForEachActuallyWork() {\n\tvar ret = false;\n\n\t(new Set([true])).forEach(function (el) {\n\t\tret = el;\n\t});\n\n\treturn ret === true;\n}\n\nif ('Set' in global) {\n\tif (typeof Set.prototype.forEach === 'function' && doesForEachActuallyWork()) {\n\t\tmodule.exports = uniqSetWithForEach;\n\t} else {\n\t\tmodule.exports = uniqSet;\n\t}\n} else {\n\tmodule.exports = uniqNoSet;\n}\n","// Packages\nvar retrier = require('retry');\n\nfunction retry(fn, opts) {\n function run(resolve, reject) {\n var options = opts || {};\n var op;\n\n // Default `randomize` to true\n if (!('randomize' in options)) {\n options.randomize = true;\n }\n\n op = retrier.operation(options);\n\n // We allow the user to abort retrying\n // this makes sense in the cases where\n // knowledge is obtained that retrying\n // would be futile (e.g.: auth errors)\n\n function bail(err) {\n reject(err || new Error('Aborted'));\n }\n\n function onError(err, num) {\n if (err.bail) {\n bail(err);\n return;\n }\n\n if (!op.retry(err)) {\n reject(op.mainError());\n } else if (options.onRetry) {\n options.onRetry(err, num);\n }\n }\n\n function runAttempt(num) {\n var val;\n\n try {\n val = fn(bail, num);\n } catch (err) {\n onError(err, num);\n return;\n }\n\n Promise.resolve(val)\n .then(resolve)\n .catch(function catchIt(err) {\n onError(err, num);\n });\n }\n\n op.attempt(runAttempt);\n }\n\n return new Promise(run);\n}\n\nmodule.exports = retry;\n","'use strict';\nmodule.exports = balanced;\nfunction balanced(a, b, str) {\n if (a instanceof RegExp) a = maybeMatch(a, str);\n if (b instanceof RegExp) b = maybeMatch(b, str);\n\n var r = range(a, b, str);\n\n return r && {\n start: r[0],\n end: r[1],\n pre: str.slice(0, r[0]),\n body: str.slice(r[0] + a.length, r[1]),\n post: str.slice(r[1] + b.length)\n };\n}\n\nfunction maybeMatch(reg, str) {\n var m = str.match(reg);\n return m ? m[0] : null;\n}\n\nbalanced.range = range;\nfunction range(a, b, str) {\n var begs, beg, left, right, result;\n var ai = str.indexOf(a);\n var bi = str.indexOf(b, ai + 1);\n var i = ai;\n\n if (ai >= 0 && bi > 0) {\n if(a===b) {\n return [ai, bi];\n }\n begs = [];\n left = str.length;\n\n while (i >= 0 && !result) {\n if (i == ai) {\n begs.push(i);\n ai = str.indexOf(a, i + 1);\n } else if (begs.length == 1) {\n result = [ begs.pop(), bi ];\n } else {\n beg = begs.pop();\n if (beg < left) {\n left = beg;\n right = bi;\n }\n\n bi = str.indexOf(b, i + 1);\n }\n\n i = ai < bi && ai >= 0 ? ai : bi;\n }\n\n if (begs.length) {\n result = [ left, right ];\n }\n }\n\n return result;\n}\n","module.exports = require('./binary-extensions.json');\n","var concatMap = require('concat-map');\nvar balanced = require('balanced-match');\n\nmodule.exports = expandTop;\n\nvar escSlash = '\\0SLASH'+Math.random()+'\\0';\nvar escOpen = '\\0OPEN'+Math.random()+'\\0';\nvar escClose = '\\0CLOSE'+Math.random()+'\\0';\nvar escComma = '\\0COMMA'+Math.random()+'\\0';\nvar escPeriod = '\\0PERIOD'+Math.random()+'\\0';\n\nfunction numeric(str) {\n return parseInt(str, 10) == str\n ? parseInt(str, 10)\n : str.charCodeAt(0);\n}\n\nfunction escapeBraces(str) {\n return str.split('\\\\\\\\').join(escSlash)\n .split('\\\\{').join(escOpen)\n .split('\\\\}').join(escClose)\n .split('\\\\,').join(escComma)\n .split('\\\\.').join(escPeriod);\n}\n\nfunction unescapeBraces(str) {\n return str.split(escSlash).join('\\\\')\n .split(escOpen).join('{')\n .split(escClose).join('}')\n .split(escComma).join(',')\n .split(escPeriod).join('.');\n}\n\n\n// Basically just str.split(\",\"), but handling cases\n// where we have nested braced sections, which should be\n// treated as individual members, like {a,{b,c},d}\nfunction parseCommaParts(str) {\n if (!str)\n return [''];\n\n var parts = [];\n var m = balanced('{', '}', str);\n\n if (!m)\n return str.split(',');\n\n var pre = m.pre;\n var body = m.body;\n var post = m.post;\n var p = pre.split(',');\n\n p[p.length-1] += '{' + body + '}';\n var postParts = parseCommaParts(post);\n if (post.length) {\n p[p.length-1] += postParts.shift();\n p.push.apply(p, postParts);\n }\n\n parts.push.apply(parts, p);\n\n return parts;\n}\n\nfunction expandTop(str) {\n if (!str)\n return [];\n\n // I don't know why Bash 4.3 does this, but it does.\n // Anything starting with {} will have the first two bytes preserved\n // but *only* at the top level, so {},a}b will not expand to anything,\n // but a{},b}c will be expanded to [a}c,abc].\n // One could argue that this is a bug in Bash, but since the goal of\n // this module is to match Bash's rules, we escape a leading {}\n if (str.substr(0, 2) === '{}') {\n str = '\\\\{\\\\}' + str.substr(2);\n }\n\n return expand(escapeBraces(str), true).map(unescapeBraces);\n}\n\nfunction identity(e) {\n return e;\n}\n\nfunction embrace(str) {\n return '{' + str + '}';\n}\nfunction isPadded(el) {\n return /^-?0\\d/.test(el);\n}\n\nfunction lte(i, y) {\n return i <= y;\n}\nfunction gte(i, y) {\n return i >= y;\n}\n\nfunction expand(str, isTop) {\n var expansions = [];\n\n var m = balanced('{', '}', str);\n if (!m || /\\$$/.test(m.pre)) return [str];\n\n var isNumericSequence = /^-?\\d+\\.\\.-?\\d+(?:\\.\\.-?\\d+)?$/.test(m.body);\n var isAlphaSequence = /^[a-zA-Z]\\.\\.[a-zA-Z](?:\\.\\.-?\\d+)?$/.test(m.body);\n var isSequence = isNumericSequence || isAlphaSequence;\n var isOptions = m.body.indexOf(',') >= 0;\n if (!isSequence && !isOptions) {\n // {a},b}\n if (m.post.match(/,(?!,).*\\}/)) {\n str = m.pre + '{' + m.body + escClose + m.post;\n return expand(str);\n }\n return [str];\n }\n\n var n;\n if (isSequence) {\n n = m.body.split(/\\.\\./);\n } else {\n n = parseCommaParts(m.body);\n if (n.length === 1) {\n // x{{a,b}}y ==> x{a}y x{b}y\n n = expand(n[0], false).map(embrace);\n if (n.length === 1) {\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n return post.map(function(p) {\n return m.pre + n[0] + p;\n });\n }\n }\n }\n\n // at this point, n is the parts, and we know it's not a comma set\n // with a single entry.\n\n // no need to expand pre, since it is guaranteed to be free of brace-sets\n var pre = m.pre;\n var post = m.post.length\n ? expand(m.post, false)\n : [''];\n\n var N;\n\n if (isSequence) {\n var x = numeric(n[0]);\n var y = numeric(n[1]);\n var width = Math.max(n[0].length, n[1].length)\n var incr = n.length == 3\n ? Math.abs(numeric(n[2]))\n : 1;\n var test = lte;\n var reverse = y < x;\n if (reverse) {\n incr *= -1;\n test = gte;\n }\n var pad = n.some(isPadded);\n\n N = [];\n\n for (var i = x; test(i, y); i += incr) {\n var c;\n if (isAlphaSequence) {\n c = String.fromCharCode(i);\n if (c === '\\\\')\n c = '';\n } else {\n c = String(i);\n if (pad) {\n var need = width - c.length;\n if (need > 0) {\n var z = new Array(need + 1).join('0');\n if (i < 0)\n c = '-' + z + c.slice(1);\n else\n c = z + c;\n }\n }\n }\n N.push(c);\n }\n } else {\n N = concatMap(n, function(el) { return expand(el, false) });\n }\n\n for (var j = 0; j < N.length; j++) {\n for (var k = 0; k < post.length; k++) {\n var expansion = pre + N[j] + post[k];\n if (!isTop || isSequence || expansion)\n expansions.push(expansion);\n }\n }\n\n return expansions;\n}\n\n","'use strict';\n\nconst stringify = require('./lib/stringify');\nconst compile = require('./lib/compile');\nconst expand = require('./lib/expand');\nconst parse = require('./lib/parse');\n\n/**\n * Expand the given pattern or create a regex-compatible string.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces('{a,b,c}', { compile: true })); //=> ['(a|b|c)']\n * console.log(braces('{a,b,c}')); //=> ['a', 'b', 'c']\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {String}\n * @api public\n */\n\nconst braces = (input, options = {}) => {\n let output = [];\n\n if (Array.isArray(input)) {\n for (const pattern of input) {\n const result = braces.create(pattern, options);\n if (Array.isArray(result)) {\n output.push(...result);\n } else {\n output.push(result);\n }\n }\n } else {\n output = [].concat(braces.create(input, options));\n }\n\n if (options && options.expand === true && options.nodupes === true) {\n output = [...new Set(output)];\n }\n return output;\n};\n\n/**\n * Parse the given `str` with the given `options`.\n *\n * ```js\n * // braces.parse(pattern, [, options]);\n * const ast = braces.parse('a/{b,c}/d');\n * console.log(ast);\n * ```\n * @param {String} pattern Brace pattern to parse\n * @param {Object} options\n * @return {Object} Returns an AST\n * @api public\n */\n\nbraces.parse = (input, options = {}) => parse(input, options);\n\n/**\n * Creates a braces string from an AST, or an AST node.\n *\n * ```js\n * const braces = require('braces');\n * let ast = braces.parse('foo/{a,b}/bar');\n * console.log(stringify(ast.nodes[2])); //=> '{a,b}'\n * ```\n * @param {String} `input` Brace pattern or AST.\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.stringify = (input, options = {}) => {\n if (typeof input === 'string') {\n return stringify(braces.parse(input, options), options);\n }\n return stringify(input, options);\n};\n\n/**\n * Compiles a brace pattern into a regex-compatible, optimized string.\n * This method is called by the main [braces](#braces) function by default.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.compile('a/{b,c}/d'));\n * //=> ['a/(b|c)/d']\n * ```\n * @param {String} `input` Brace pattern or AST.\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.compile = (input, options = {}) => {\n if (typeof input === 'string') {\n input = braces.parse(input, options);\n }\n return compile(input, options);\n};\n\n/**\n * Expands a brace pattern into an array. This method is called by the\n * main [braces](#braces) function when `options.expand` is true. Before\n * using this method it's recommended that you read the [performance notes](#performance))\n * and advantages of using [.compile](#compile) instead.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.expand('a/{b,c}/d'));\n * //=> ['a/b/d', 'a/c/d'];\n * ```\n * @param {String} `pattern` Brace pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.expand = (input, options = {}) => {\n if (typeof input === 'string') {\n input = braces.parse(input, options);\n }\n\n let result = expand(input, options);\n\n // filter out empty strings if specified\n if (options.noempty === true) {\n result = result.filter(Boolean);\n }\n\n // filter out duplicates if specified\n if (options.nodupes === true) {\n result = [...new Set(result)];\n }\n\n return result;\n};\n\n/**\n * Processes a brace pattern and returns either an expanded array\n * (if `options.expand` is true), a highly optimized regex-compatible string.\n * This method is called by the main [braces](#braces) function.\n *\n * ```js\n * const braces = require('braces');\n * console.log(braces.create('user-{200..300}/project-{a,b,c}-{1..10}'))\n * //=> 'user-(20[0-9]|2[1-9][0-9]|300)/project-(a|b|c)-([1-9]|10)'\n * ```\n * @param {String} `pattern` Brace pattern\n * @param {Object} `options`\n * @return {Array} Returns an array of expanded values.\n * @api public\n */\n\nbraces.create = (input, options = {}) => {\n if (input === '' || input.length < 3) {\n return [input];\n }\n\n return options.expand !== true\n ? braces.compile(input, options)\n : braces.expand(input, options);\n};\n\n/**\n * Expose \"braces\"\n */\n\nmodule.exports = braces;\n","'use strict';\n\nconst fill = require('fill-range');\nconst utils = require('./utils');\n\nconst compile = (ast, options = {}) => {\n const walk = (node, parent = {}) => {\n const invalidBlock = utils.isInvalidBrace(parent);\n const invalidNode = node.invalid === true && options.escapeInvalid === true;\n const invalid = invalidBlock === true || invalidNode === true;\n const prefix = options.escapeInvalid === true ? '\\\\' : '';\n let output = '';\n\n if (node.isOpen === true) {\n return prefix + node.value;\n }\n\n if (node.isClose === true) {\n console.log('node.isClose', prefix, node.value);\n return prefix + node.value;\n }\n\n if (node.type === 'open') {\n return invalid ? prefix + node.value : '(';\n }\n\n if (node.type === 'close') {\n return invalid ? prefix + node.value : ')';\n }\n\n if (node.type === 'comma') {\n return node.prev.type === 'comma' ? '' : invalid ? node.value : '|';\n }\n\n if (node.value) {\n return node.value;\n }\n\n if (node.nodes && node.ranges > 0) {\n const args = utils.reduce(node.nodes);\n const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });\n\n if (range.length !== 0) {\n return args.length > 1 && range.length > 1 ? `(${range})` : range;\n }\n }\n\n if (node.nodes) {\n for (const child of node.nodes) {\n output += walk(child, node);\n }\n }\n\n return output;\n };\n\n return walk(ast);\n};\n\nmodule.exports = compile;\n","'use strict';\n\nmodule.exports = {\n MAX_LENGTH: 10000,\n\n // Digits\n CHAR_0: '0', /* 0 */\n CHAR_9: '9', /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 'A', /* A */\n CHAR_LOWERCASE_A: 'a', /* a */\n CHAR_UPPERCASE_Z: 'Z', /* Z */\n CHAR_LOWERCASE_Z: 'z', /* z */\n\n CHAR_LEFT_PARENTHESES: '(', /* ( */\n CHAR_RIGHT_PARENTHESES: ')', /* ) */\n\n CHAR_ASTERISK: '*', /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: '&', /* & */\n CHAR_AT: '@', /* @ */\n CHAR_BACKSLASH: '\\\\', /* \\ */\n CHAR_BACKTICK: '`', /* ` */\n CHAR_CARRIAGE_RETURN: '\\r', /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */\n CHAR_COLON: ':', /* : */\n CHAR_COMMA: ',', /* , */\n CHAR_DOLLAR: '$', /* . */\n CHAR_DOT: '.', /* . */\n CHAR_DOUBLE_QUOTE: '\"', /* \" */\n CHAR_EQUAL: '=', /* = */\n CHAR_EXCLAMATION_MARK: '!', /* ! */\n CHAR_FORM_FEED: '\\f', /* \\f */\n CHAR_FORWARD_SLASH: '/', /* / */\n CHAR_HASH: '#', /* # */\n CHAR_HYPHEN_MINUS: '-', /* - */\n CHAR_LEFT_ANGLE_BRACKET: '<', /* < */\n CHAR_LEFT_CURLY_BRACE: '{', /* { */\n CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */\n CHAR_LINE_FEED: '\\n', /* \\n */\n CHAR_NO_BREAK_SPACE: '\\u00A0', /* \\u00A0 */\n CHAR_PERCENT: '%', /* % */\n CHAR_PLUS: '+', /* + */\n CHAR_QUESTION_MARK: '?', /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */\n CHAR_RIGHT_CURLY_BRACE: '}', /* } */\n CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */\n CHAR_SEMICOLON: ';', /* ; */\n CHAR_SINGLE_QUOTE: '\\'', /* ' */\n CHAR_SPACE: ' ', /* */\n CHAR_TAB: '\\t', /* \\t */\n CHAR_UNDERSCORE: '_', /* _ */\n CHAR_VERTICAL_LINE: '|', /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\\uFEFF' /* \\uFEFF */\n};\n","'use strict';\n\nconst fill = require('fill-range');\nconst stringify = require('./stringify');\nconst utils = require('./utils');\n\nconst append = (queue = '', stash = '', enclose = false) => {\n const result = [];\n\n queue = [].concat(queue);\n stash = [].concat(stash);\n\n if (!stash.length) return queue;\n if (!queue.length) {\n return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;\n }\n\n for (const item of queue) {\n if (Array.isArray(item)) {\n for (const value of item) {\n result.push(append(value, stash, enclose));\n }\n } else {\n for (let ele of stash) {\n if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;\n result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);\n }\n }\n }\n return utils.flatten(result);\n};\n\nconst expand = (ast, options = {}) => {\n const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit;\n\n const walk = (node, parent = {}) => {\n node.queue = [];\n\n let p = parent;\n let q = parent.queue;\n\n while (p.type !== 'brace' && p.type !== 'root' && p.parent) {\n p = p.parent;\n q = p.queue;\n }\n\n if (node.invalid || node.dollar) {\n q.push(append(q.pop(), stringify(node, options)));\n return;\n }\n\n if (node.type === 'brace' && node.invalid !== true && node.nodes.length === 2) {\n q.push(append(q.pop(), ['{}']));\n return;\n }\n\n if (node.nodes && node.ranges > 0) {\n const args = utils.reduce(node.nodes);\n\n if (utils.exceedsLimit(...args, options.step, rangeLimit)) {\n throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');\n }\n\n let range = fill(...args, options);\n if (range.length === 0) {\n range = stringify(node, options);\n }\n\n q.push(append(q.pop(), range));\n node.nodes = [];\n return;\n }\n\n const enclose = utils.encloseBrace(node);\n let queue = node.queue;\n let block = node;\n\n while (block.type !== 'brace' && block.type !== 'root' && block.parent) {\n block = block.parent;\n queue = block.queue;\n }\n\n for (let i = 0; i < node.nodes.length; i++) {\n const child = node.nodes[i];\n\n if (child.type === 'comma' && node.type === 'brace') {\n if (i === 1) queue.push('');\n queue.push('');\n continue;\n }\n\n if (child.type === 'close') {\n q.push(append(q.pop(), queue, enclose));\n continue;\n }\n\n if (child.value && child.type !== 'open') {\n queue.push(append(queue.pop(), child.value));\n continue;\n }\n\n if (child.nodes) {\n walk(child, node);\n }\n }\n\n return queue;\n };\n\n return utils.flatten(walk(ast));\n};\n\nmodule.exports = expand;\n","'use strict';\n\nconst stringify = require('./stringify');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n CHAR_BACKSLASH, /* \\ */\n CHAR_BACKTICK, /* ` */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_RIGHT_SQUARE_BRACKET, /* ] */\n CHAR_DOUBLE_QUOTE, /* \" */\n CHAR_SINGLE_QUOTE, /* ' */\n CHAR_NO_BREAK_SPACE,\n CHAR_ZERO_WIDTH_NOBREAK_SPACE\n} = require('./constants');\n\n/**\n * parse\n */\n\nconst parse = (input, options = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n const opts = options || {};\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n if (input.length > max) {\n throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);\n }\n\n const ast = { type: 'root', input, nodes: [] };\n const stack = [ast];\n let block = ast;\n let prev = ast;\n let brackets = 0;\n const length = input.length;\n let index = 0;\n let depth = 0;\n let value;\n\n /**\n * Helpers\n */\n\n const advance = () => input[index++];\n const push = node => {\n if (node.type === 'text' && prev.type === 'dot') {\n prev.type = 'text';\n }\n\n if (prev && prev.type === 'text' && node.type === 'text') {\n prev.value += node.value;\n return;\n }\n\n block.nodes.push(node);\n node.parent = block;\n node.prev = prev;\n prev = node;\n return node;\n };\n\n push({ type: 'bos' });\n\n while (index < length) {\n block = stack[stack.length - 1];\n value = advance();\n\n /**\n * Invalid chars\n */\n\n if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) {\n continue;\n }\n\n /**\n * Escaped chars\n */\n\n if (value === CHAR_BACKSLASH) {\n push({ type: 'text', value: (options.keepEscaping ? value : '') + advance() });\n continue;\n }\n\n /**\n * Right square bracket (literal): ']'\n */\n\n if (value === CHAR_RIGHT_SQUARE_BRACKET) {\n push({ type: 'text', value: '\\\\' + value });\n continue;\n }\n\n /**\n * Left square bracket: '['\n */\n\n if (value === CHAR_LEFT_SQUARE_BRACKET) {\n brackets++;\n\n let next;\n\n while (index < length && (next = advance())) {\n value += next;\n\n if (next === CHAR_LEFT_SQUARE_BRACKET) {\n brackets++;\n continue;\n }\n\n if (next === CHAR_BACKSLASH) {\n value += advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n brackets--;\n\n if (brackets === 0) {\n break;\n }\n }\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === CHAR_LEFT_PARENTHESES) {\n block = push({ type: 'paren', nodes: [] });\n stack.push(block);\n push({ type: 'text', value });\n continue;\n }\n\n if (value === CHAR_RIGHT_PARENTHESES) {\n if (block.type !== 'paren') {\n push({ type: 'text', value });\n continue;\n }\n block = stack.pop();\n push({ type: 'text', value });\n block = stack[stack.length - 1];\n continue;\n }\n\n /**\n * Quotes: '|\"|`\n */\n\n if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {\n const open = value;\n let next;\n\n if (options.keepQuotes !== true) {\n value = '';\n }\n\n while (index < length && (next = advance())) {\n if (next === CHAR_BACKSLASH) {\n value += next + advance();\n continue;\n }\n\n if (next === open) {\n if (options.keepQuotes === true) value += next;\n break;\n }\n\n value += next;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Left curly brace: '{'\n */\n\n if (value === CHAR_LEFT_CURLY_BRACE) {\n depth++;\n\n const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;\n const brace = {\n type: 'brace',\n open: true,\n close: false,\n dollar,\n depth,\n commas: 0,\n ranges: 0,\n nodes: []\n };\n\n block = push(brace);\n stack.push(block);\n push({ type: 'open', value });\n continue;\n }\n\n /**\n * Right curly brace: '}'\n */\n\n if (value === CHAR_RIGHT_CURLY_BRACE) {\n if (block.type !== 'brace') {\n push({ type: 'text', value });\n continue;\n }\n\n const type = 'close';\n block = stack.pop();\n block.close = true;\n\n push({ type, value });\n depth--;\n\n block = stack[stack.length - 1];\n continue;\n }\n\n /**\n * Comma: ','\n */\n\n if (value === CHAR_COMMA && depth > 0) {\n if (block.ranges > 0) {\n block.ranges = 0;\n const open = block.nodes.shift();\n block.nodes = [open, { type: 'text', value: stringify(block) }];\n }\n\n push({ type: 'comma', value });\n block.commas++;\n continue;\n }\n\n /**\n * Dot: '.'\n */\n\n if (value === CHAR_DOT && depth > 0 && block.commas === 0) {\n const siblings = block.nodes;\n\n if (depth === 0 || siblings.length === 0) {\n push({ type: 'text', value });\n continue;\n }\n\n if (prev.type === 'dot') {\n block.range = [];\n prev.value += value;\n prev.type = 'range';\n\n if (block.nodes.length !== 3 && block.nodes.length !== 5) {\n block.invalid = true;\n block.ranges = 0;\n prev.type = 'text';\n continue;\n }\n\n block.ranges++;\n block.args = [];\n continue;\n }\n\n if (prev.type === 'range') {\n siblings.pop();\n\n const before = siblings[siblings.length - 1];\n before.value += prev.value + value;\n prev = before;\n block.ranges--;\n continue;\n }\n\n push({ type: 'dot', value });\n continue;\n }\n\n /**\n * Text\n */\n\n push({ type: 'text', value });\n }\n\n // Mark imbalanced braces and brackets as invalid\n do {\n block = stack.pop();\n\n if (block.type !== 'root') {\n block.nodes.forEach(node => {\n if (!node.nodes) {\n if (node.type === 'open') node.isOpen = true;\n if (node.type === 'close') node.isClose = true;\n if (!node.nodes) node.type = 'text';\n node.invalid = true;\n }\n });\n\n // get the location of the block on parent.nodes (block's siblings)\n const parent = stack[stack.length - 1];\n const index = parent.nodes.indexOf(block);\n // replace the (invalid) block with it's nodes\n parent.nodes.splice(index, 1, ...block.nodes);\n }\n } while (stack.length > 0);\n\n push({ type: 'eos' });\n return ast;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst utils = require('./utils');\n\nmodule.exports = (ast, options = {}) => {\n const stringify = (node, parent = {}) => {\n const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);\n const invalidNode = node.invalid === true && options.escapeInvalid === true;\n let output = '';\n\n if (node.value) {\n if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {\n return '\\\\' + node.value;\n }\n return node.value;\n }\n\n if (node.value) {\n return node.value;\n }\n\n if (node.nodes) {\n for (const child of node.nodes) {\n output += stringify(child);\n }\n }\n return output;\n };\n\n return stringify(ast);\n};\n\n","'use strict';\n\nexports.isInteger = num => {\n if (typeof num === 'number') {\n return Number.isInteger(num);\n }\n if (typeof num === 'string' && num.trim() !== '') {\n return Number.isInteger(Number(num));\n }\n return false;\n};\n\n/**\n * Find a node of the given type\n */\n\nexports.find = (node, type) => node.nodes.find(node => node.type === type);\n\n/**\n * Find a node of the given type\n */\n\nexports.exceedsLimit = (min, max, step = 1, limit) => {\n if (limit === false) return false;\n if (!exports.isInteger(min) || !exports.isInteger(max)) return false;\n return ((Number(max) - Number(min)) / Number(step)) >= limit;\n};\n\n/**\n * Escape the given node with '\\\\' before node.value\n */\n\nexports.escapeNode = (block, n = 0, type) => {\n const node = block.nodes[n];\n if (!node) return;\n\n if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {\n if (node.escaped !== true) {\n node.value = '\\\\' + node.value;\n node.escaped = true;\n }\n }\n};\n\n/**\n * Returns true if the given brace node should be enclosed in literal braces\n */\n\nexports.encloseBrace = node => {\n if (node.type !== 'brace') return false;\n if ((node.commas >> 0 + node.ranges >> 0) === 0) {\n node.invalid = true;\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if a brace node is invalid.\n */\n\nexports.isInvalidBrace = block => {\n if (block.type !== 'brace') return false;\n if (block.invalid === true || block.dollar) return true;\n if ((block.commas >> 0 + block.ranges >> 0) === 0) {\n block.invalid = true;\n return true;\n }\n if (block.open !== true || block.close !== true) {\n block.invalid = true;\n return true;\n }\n return false;\n};\n\n/**\n * Returns true if a node is an open or close node\n */\n\nexports.isOpenOrClose = node => {\n if (node.type === 'open' || node.type === 'close') {\n return true;\n }\n return node.open === true || node.close === true;\n};\n\n/**\n * Reduce an array of text nodes.\n */\n\nexports.reduce = nodes => nodes.reduce((acc, node) => {\n if (node.type === 'text') acc.push(node.value);\n if (node.type === 'range') node.type = 'text';\n return acc;\n}, []);\n\n/**\n * Flatten an array\n */\n\nexports.flatten = (...args) => {\n const result = [];\n\n const flat = arr => {\n for (let i = 0; i < arr.length; i++) {\n const ele = arr[i];\n\n if (Array.isArray(ele)) {\n flat(ele);\n continue;\n }\n\n if (ele !== undefined) {\n result.push(ele);\n }\n }\n return result;\n };\n\n flat(args);\n return result;\n};\n","import ansiStyles from '#ansi-styles';\nimport supportsColor from '#supports-color';\nimport { // eslint-disable-line import/order\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex,\n} from './utilities.js';\n\nconst {stdout: stdoutColor, stderr: stderrColor} = supportsColor;\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nexport class Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn ansiStyles[type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn ansiStyles[type].ansi256(ansiStyles.rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn ansiStyles[type].ansi(ansiStyles.rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ...ansiStyles.hexToRgb(...arguments_));\n\t}\n\n\treturn ansiStyles[type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), ansiStyles.color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), ansiStyles.bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nexport const chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\nexport {\n\tmodifierNames,\n\tforegroundColorNames,\n\tbackgroundColorNames,\n\tcolorNames,\n\n\t// TODO: Remove these aliases in the next major version\n\tmodifierNames as modifiers,\n\tforegroundColorNames as foregroundColors,\n\tbackgroundColorNames as backgroundColors,\n\tcolorNames as colors,\n} from './vendor/ansi-styles/index.js';\n\nexport {\n\tstdoutColor as supportsColor,\n\tstderrColor as supportsColorStderr,\n};\n\nexport default chalk;\n","// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nexport function stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.slice(endIndex, index) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nexport function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.slice(endIndex, (gotCR ? index - 1 : index)) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n","const ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nconst styles = {\n\tmodifier: {\n\t\treset: [0, 0],\n\t\t// 21 isn't widely supported and 22 does the same thing\n\t\tbold: [1, 22],\n\t\tdim: [2, 22],\n\t\titalic: [3, 23],\n\t\tunderline: [4, 24],\n\t\toverline: [53, 55],\n\t\tinverse: [7, 27],\n\t\thidden: [8, 28],\n\t\tstrikethrough: [9, 29],\n\t},\n\tcolor: {\n\t\tblack: [30, 39],\n\t\tred: [31, 39],\n\t\tgreen: [32, 39],\n\t\tyellow: [33, 39],\n\t\tblue: [34, 39],\n\t\tmagenta: [35, 39],\n\t\tcyan: [36, 39],\n\t\twhite: [37, 39],\n\n\t\t// Bright color\n\t\tblackBright: [90, 39],\n\t\tgray: [90, 39], // Alias of `blackBright`\n\t\tgrey: [90, 39], // Alias of `blackBright`\n\t\tredBright: [91, 39],\n\t\tgreenBright: [92, 39],\n\t\tyellowBright: [93, 39],\n\t\tblueBright: [94, 39],\n\t\tmagentaBright: [95, 39],\n\t\tcyanBright: [96, 39],\n\t\twhiteBright: [97, 39],\n\t},\n\tbgColor: {\n\t\tbgBlack: [40, 49],\n\t\tbgRed: [41, 49],\n\t\tbgGreen: [42, 49],\n\t\tbgYellow: [43, 49],\n\t\tbgBlue: [44, 49],\n\t\tbgMagenta: [45, 49],\n\t\tbgCyan: [46, 49],\n\t\tbgWhite: [47, 49],\n\n\t\t// Bright color\n\t\tbgBlackBright: [100, 49],\n\t\tbgGray: [100, 49], // Alias of `bgBlackBright`\n\t\tbgGrey: [100, 49], // Alias of `bgBlackBright`\n\t\tbgRedBright: [101, 49],\n\t\tbgGreenBright: [102, 49],\n\t\tbgYellowBright: [103, 49],\n\t\tbgBlueBright: [104, 49],\n\t\tbgMagentaBright: [105, 49],\n\t\tbgCyanBright: [106, 49],\n\t\tbgWhiteBright: [107, 49],\n\t},\n};\n\nexport const modifierNames = Object.keys(styles.modifier);\nexport const foregroundColorNames = Object.keys(styles.color);\nexport const backgroundColorNames = Object.keys(styles.bgColor);\nexport const colorNames = [...foregroundColorNames, ...backgroundColorNames];\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue(red, green, blue) {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue(hex) {\n\t\t\t\tconst matches = /[a-f\\d]{6}|[a-f\\d]{3}/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet [colorString] = matches;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue(code) {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\nexport default ansiStyles;\n","import process from 'node:process';\nimport os from 'node:os';\nimport tty from 'node:tty';\n\n// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\n/// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {\nfunction hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process.argv) {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n}\n\nconst {env} = process;\n\nlet flagForceColor;\nif (\n\thasFlag('no-color')\n\t|| hasFlag('no-colors')\n\t|| hasFlag('color=false')\n\t|| hasFlag('color=never')\n) {\n\tflagForceColor = 0;\n} else if (\n\thasFlag('color')\n\t|| hasFlag('colors')\n\t|| hasFlag('color=true')\n\t|| hasFlag('color=always')\n) {\n\tflagForceColor = 1;\n}\n\nfunction envForceColor() {\n\tif ('FORCE_COLOR' in env) {\n\t\tif (env.FORCE_COLOR === 'true') {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (env.FORCE_COLOR === 'false') {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3,\n\t};\n}\n\nfunction _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m')\n\t\t\t|| hasFlag('color=full')\n\t\t\t|| hasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\t// Check for Azure DevOps pipelines.\n\t// Has to be above the `!streamIsTTY` check.\n\tif ('TF_BUILD' in env && 'AGENT_NAME' in env) {\n\t\treturn 1;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10\n\t\t\t&& Number(osRelease[2]) >= 10_586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14_931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['GITHUB_ACTIONS', 'GITEA_ACTIONS', 'CIRCLECI'].some(key => key in env)) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (['TRAVIS', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-kitty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'xterm-ghostty') {\n\t\treturn 3;\n\t}\n\n\tif (env.TERM === 'wezterm') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app': {\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\t}\n\n\t\t\tcase 'Apple_Terminal': {\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nexport function createSupportsColor(stream, options = {}) {\n\tconst level = _supportsColor(stream, {\n\t\tstreamIsTTY: stream && stream.isTTY,\n\t\t...options,\n\t});\n\n\treturn translateLevel(level);\n}\n\nconst supportsColor = {\n\tstdout: createSupportsColor({isTTY: tty.isatty(1)}),\n\tstderr: createSupportsColor({isTTY: tty.isatty(2)}),\n};\n\nexport default supportsColor;\n","'use strict';\n\nconst { EventEmitter } = require('events');\nconst fs = require('fs');\nconst sysPath = require('path');\nconst { promisify } = require('util');\nconst readdirp = require('readdirp');\nconst anymatch = require('anymatch').default;\nconst globParent = require('glob-parent');\nconst isGlob = require('is-glob');\nconst braces = require('braces');\nconst normalizePath = require('normalize-path');\n\nconst NodeFsHandler = require('./lib/nodefs-handler');\nconst FsEventsHandler = require('./lib/fsevents-handler');\nconst {\n EV_ALL,\n EV_READY,\n EV_ADD,\n EV_CHANGE,\n EV_UNLINK,\n EV_ADD_DIR,\n EV_UNLINK_DIR,\n EV_RAW,\n EV_ERROR,\n\n STR_CLOSE,\n STR_END,\n\n BACK_SLASH_RE,\n DOUBLE_SLASH_RE,\n SLASH_OR_BACK_SLASH_RE,\n DOT_RE,\n REPLACER_RE,\n\n SLASH,\n SLASH_SLASH,\n BRACE_START,\n BANG,\n ONE_DOT,\n TWO_DOTS,\n GLOBSTAR,\n SLASH_GLOBSTAR,\n ANYMATCH_OPTS,\n STRING_TYPE,\n FUNCTION_TYPE,\n EMPTY_STR,\n EMPTY_FN,\n\n isWindows,\n isMacos,\n isIBMi\n} = require('./lib/constants');\n\nconst stat = promisify(fs.stat);\nconst readdir = promisify(fs.readdir);\n\n/**\n * @typedef {String} Path\n * @typedef {'all'|'add'|'addDir'|'change'|'unlink'|'unlinkDir'|'raw'|'error'|'ready'} EventName\n * @typedef {'readdir'|'watch'|'add'|'remove'|'change'} ThrottleType\n */\n\n/**\n *\n * @typedef {Object} WatchHelpers\n * @property {Boolean} followSymlinks\n * @property {'stat'|'lstat'} statMethod\n * @property {Path} path\n * @property {Path} watchPath\n * @property {Function} entryPath\n * @property {Boolean} hasGlob\n * @property {Object} globFilter\n * @property {Function} filterPath\n * @property {Function} filterDir\n */\n\nconst arrify = (value = []) => Array.isArray(value) ? value : [value];\nconst flatten = (list, result = []) => {\n list.forEach(item => {\n if (Array.isArray(item)) {\n flatten(item, result);\n } else {\n result.push(item);\n }\n });\n return result;\n};\n\nconst unifyPaths = (paths_) => {\n /**\n * @type {Array<String>}\n */\n const paths = flatten(arrify(paths_));\n if (!paths.every(p => typeof p === STRING_TYPE)) {\n throw new TypeError(`Non-string provided as watch path: ${paths}`);\n }\n return paths.map(normalizePathToUnix);\n};\n\n// If SLASH_SLASH occurs at the beginning of path, it is not replaced\n// because \"//StoragePC/DrivePool/Movies\" is a valid network path\nconst toUnix = (string) => {\n let str = string.replace(BACK_SLASH_RE, SLASH);\n let prepend = false;\n if (str.startsWith(SLASH_SLASH)) {\n prepend = true;\n }\n while (str.match(DOUBLE_SLASH_RE)) {\n str = str.replace(DOUBLE_SLASH_RE, SLASH);\n }\n if (prepend) {\n str = SLASH + str;\n }\n return str;\n};\n\n// Our version of upath.normalize\n// TODO: this is not equal to path-normalize module - investigate why\nconst normalizePathToUnix = (path) => toUnix(sysPath.normalize(toUnix(path)));\n\nconst normalizeIgnored = (cwd = EMPTY_STR) => (path) => {\n if (typeof path !== STRING_TYPE) return path;\n return normalizePathToUnix(sysPath.isAbsolute(path) ? path : sysPath.join(cwd, path));\n};\n\nconst getAbsolutePath = (path, cwd) => {\n if (sysPath.isAbsolute(path)) {\n return path;\n }\n if (path.startsWith(BANG)) {\n return BANG + sysPath.join(cwd, path.slice(1));\n }\n return sysPath.join(cwd, path);\n};\n\nconst undef = (opts, key) => opts[key] === undefined;\n\n/**\n * Directory entry.\n * @property {Path} path\n * @property {Set<Path>} items\n */\nclass DirEntry {\n /**\n * @param {Path} dir\n * @param {Function} removeWatcher\n */\n constructor(dir, removeWatcher) {\n this.path = dir;\n this._removeWatcher = removeWatcher;\n /** @type {Set<Path>} */\n this.items = new Set();\n }\n\n add(item) {\n const {items} = this;\n if (!items) return;\n if (item !== ONE_DOT && item !== TWO_DOTS) items.add(item);\n }\n\n async remove(item) {\n const {items} = this;\n if (!items) return;\n items.delete(item);\n if (items.size > 0) return;\n\n const dir = this.path;\n try {\n await readdir(dir);\n } catch (err) {\n if (this._removeWatcher) {\n this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir));\n }\n }\n }\n\n has(item) {\n const {items} = this;\n if (!items) return;\n return items.has(item);\n }\n\n /**\n * @returns {Array<String>}\n */\n getChildren() {\n const {items} = this;\n if (!items) return;\n return [...items.values()];\n }\n\n dispose() {\n this.items.clear();\n delete this.path;\n delete this._removeWatcher;\n delete this.items;\n Object.freeze(this);\n }\n}\n\nconst STAT_METHOD_F = 'stat';\nconst STAT_METHOD_L = 'lstat';\nclass WatchHelper {\n constructor(path, watchPath, follow, fsw) {\n this.fsw = fsw;\n this.path = path = path.replace(REPLACER_RE, EMPTY_STR);\n this.watchPath = watchPath;\n this.fullWatchPath = sysPath.resolve(watchPath);\n this.hasGlob = watchPath !== path;\n /** @type {object|boolean} */\n if (path === EMPTY_STR) this.hasGlob = false;\n this.globSymlink = this.hasGlob && follow ? undefined : false;\n this.globFilter = this.hasGlob ? anymatch(path, undefined, ANYMATCH_OPTS) : false;\n this.dirParts = this.getDirParts(path);\n this.dirParts.forEach((parts) => {\n if (parts.length > 1) parts.pop();\n });\n this.followSymlinks = follow;\n this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;\n }\n\n checkGlobSymlink(entry) {\n // only need to resolve once\n // first entry should always have entry.parentDir === EMPTY_STR\n if (this.globSymlink === undefined) {\n this.globSymlink = entry.fullParentDir === this.fullWatchPath ?\n false : {realPath: entry.fullParentDir, linkPath: this.fullWatchPath};\n }\n\n if (this.globSymlink) {\n return entry.fullPath.replace(this.globSymlink.realPath, this.globSymlink.linkPath);\n }\n\n return entry.fullPath;\n }\n\n entryPath(entry) {\n return sysPath.join(this.watchPath,\n sysPath.relative(this.watchPath, this.checkGlobSymlink(entry))\n );\n }\n\n filterPath(entry) {\n const {stats} = entry;\n if (stats && stats.isSymbolicLink()) return this.filterDir(entry);\n const resolvedPath = this.entryPath(entry);\n const matchesGlob = this.hasGlob && typeof this.globFilter === FUNCTION_TYPE ?\n this.globFilter(resolvedPath) : true;\n return matchesGlob &&\n this.fsw._isntIgnored(resolvedPath, stats) &&\n this.fsw._hasReadPermissions(stats);\n }\n\n getDirParts(path) {\n if (!this.hasGlob) return [];\n const parts = [];\n const expandedPath = path.includes(BRACE_START) ? braces.expand(path) : [path];\n expandedPath.forEach((path) => {\n parts.push(sysPath.relative(this.watchPath, path).split(SLASH_OR_BACK_SLASH_RE));\n });\n return parts;\n }\n\n filterDir(entry) {\n if (this.hasGlob) {\n const entryParts = this.getDirParts(this.checkGlobSymlink(entry));\n let globstar = false;\n this.unmatchedGlob = !this.dirParts.some((parts) => {\n return parts.every((part, i) => {\n if (part === GLOBSTAR) globstar = true;\n return globstar || !entryParts[0][i] || anymatch(part, entryParts[0][i], ANYMATCH_OPTS);\n });\n });\n }\n return !this.unmatchedGlob && this.fsw._isntIgnored(this.entryPath(entry), entry.stats);\n }\n}\n\n/**\n * Watches files & directories for changes. Emitted events:\n * `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `all`, `error`\n *\n * new FSWatcher()\n * .add(directories)\n * .on('add', path => log('File', path, 'was added'))\n */\nclass FSWatcher extends EventEmitter {\n// Not indenting methods for history sake; for now.\nconstructor(_opts) {\n super();\n\n const opts = {};\n if (_opts) Object.assign(opts, _opts); // for frozen objects\n\n /** @type {Map<String, DirEntry>} */\n this._watched = new Map();\n /** @type {Map<String, Array>} */\n this._closers = new Map();\n /** @type {Set<String>} */\n this._ignoredPaths = new Set();\n\n /** @type {Map<ThrottleType, Map>} */\n this._throttled = new Map();\n\n /** @type {Map<Path, String|Boolean>} */\n this._symlinkPaths = new Map();\n\n this._streams = new Set();\n this.closed = false;\n\n // Set up default options.\n if (undef(opts, 'persistent')) opts.persistent = true;\n if (undef(opts, 'ignoreInitial')) opts.ignoreInitial = false;\n if (undef(opts, 'ignorePermissionErrors')) opts.ignorePermissionErrors = false;\n if (undef(opts, 'interval')) opts.interval = 100;\n if (undef(opts, 'binaryInterval')) opts.binaryInterval = 300;\n if (undef(opts, 'disableGlobbing')) opts.disableGlobbing = false;\n opts.enableBinaryInterval = opts.binaryInterval !== opts.interval;\n\n // Enable fsevents on OS X when polling isn't explicitly enabled.\n if (undef(opts, 'useFsEvents')) opts.useFsEvents = !opts.usePolling;\n\n // If we can't use fsevents, ensure the options reflect it's disabled.\n const canUseFsEvents = FsEventsHandler.canUse();\n if (!canUseFsEvents) opts.useFsEvents = false;\n\n // Use polling on Mac if not using fsevents.\n // Other platforms use non-polling fs_watch.\n if (undef(opts, 'usePolling') && !opts.useFsEvents) {\n opts.usePolling = isMacos;\n }\n\n // Always default to polling on IBM i because fs.watch() is not available on IBM i.\n if(isIBMi) {\n opts.usePolling = true;\n }\n\n // Global override (useful for end-developers that need to force polling for all\n // instances of chokidar, regardless of usage/dependency depth)\n const envPoll = process.env.CHOKIDAR_USEPOLLING;\n if (envPoll !== undefined) {\n const envLower = envPoll.toLowerCase();\n\n if (envLower === 'false' || envLower === '0') {\n opts.usePolling = false;\n } else if (envLower === 'true' || envLower === '1') {\n opts.usePolling = true;\n } else {\n opts.usePolling = !!envLower;\n }\n }\n const envInterval = process.env.CHOKIDAR_INTERVAL;\n if (envInterval) {\n opts.interval = Number.parseInt(envInterval, 10);\n }\n\n // Editor atomic write normalization enabled by default with fs.watch\n if (undef(opts, 'atomic')) opts.atomic = !opts.usePolling && !opts.useFsEvents;\n if (opts.atomic) this._pendingUnlinks = new Map();\n\n if (undef(opts, 'followSymlinks')) opts.followSymlinks = true;\n\n if (undef(opts, 'awaitWriteFinish')) opts.awaitWriteFinish = false;\n if (opts.awaitWriteFinish === true) opts.awaitWriteFinish = {};\n const awf = opts.awaitWriteFinish;\n if (awf) {\n if (!awf.stabilityThreshold) awf.stabilityThreshold = 2000;\n if (!awf.pollInterval) awf.pollInterval = 100;\n this._pendingWrites = new Map();\n }\n if (opts.ignored) opts.ignored = arrify(opts.ignored);\n\n let readyCalls = 0;\n this._emitReady = () => {\n readyCalls++;\n if (readyCalls >= this._readyCount) {\n this._emitReady = EMPTY_FN;\n this._readyEmitted = true;\n // use process.nextTick to allow time for listener to be bound\n process.nextTick(() => this.emit(EV_READY));\n }\n };\n this._emitRaw = (...args) => this.emit(EV_RAW, ...args);\n this._readyEmitted = false;\n this.options = opts;\n\n // Initialize with proper watcher.\n if (opts.useFsEvents) {\n this._fsEventsHandler = new FsEventsHandler(this);\n } else {\n this._nodeFsHandler = new NodeFsHandler(this);\n }\n\n // You’re frozen when your heart’s not open.\n Object.freeze(opts);\n}\n\n// Public methods\n\n/**\n * Adds paths to be watched on an existing FSWatcher instance\n * @param {Path|Array<Path>} paths_\n * @param {String=} _origAdd private; for handling non-existent paths to be watched\n * @param {Boolean=} _internal private; indicates a non-user add\n * @returns {FSWatcher} for chaining\n */\nadd(paths_, _origAdd, _internal) {\n const {cwd, disableGlobbing} = this.options;\n this.closed = false;\n let paths = unifyPaths(paths_);\n if (cwd) {\n paths = paths.map((path) => {\n const absPath = getAbsolutePath(path, cwd);\n\n // Check `path` instead of `absPath` because the cwd portion can't be a glob\n if (disableGlobbing || !isGlob(path)) {\n return absPath;\n }\n return normalizePath(absPath);\n });\n }\n\n // set aside negated glob strings\n paths = paths.filter((path) => {\n if (path.startsWith(BANG)) {\n this._ignoredPaths.add(path.slice(1));\n return false;\n }\n\n // if a path is being added that was previously ignored, stop ignoring it\n this._ignoredPaths.delete(path);\n this._ignoredPaths.delete(path + SLASH_GLOBSTAR);\n\n // reset the cached userIgnored anymatch fn\n // to make ignoredPaths changes effective\n this._userIgnored = undefined;\n\n return true;\n });\n\n if (this.options.useFsEvents && this._fsEventsHandler) {\n if (!this._readyCount) this._readyCount = paths.length;\n if (this.options.persistent) this._readyCount += paths.length;\n paths.forEach((path) => this._fsEventsHandler._addToFsEvents(path));\n } else {\n if (!this._readyCount) this._readyCount = 0;\n this._readyCount += paths.length;\n Promise.all(\n paths.map(async path => {\n const res = await this._nodeFsHandler._addToNodeFs(path, !_internal, 0, 0, _origAdd);\n if (res) this._emitReady();\n return res;\n })\n ).then(results => {\n if (this.closed) return;\n results.filter(item => item).forEach(item => {\n this.add(sysPath.dirname(item), sysPath.basename(_origAdd || item));\n });\n });\n }\n\n return this;\n}\n\n/**\n * Close watchers or start ignoring events from specified paths.\n * @param {Path|Array<Path>} paths_ - string or array of strings, file/directory paths and/or globs\n * @returns {FSWatcher} for chaining\n*/\nunwatch(paths_) {\n if (this.closed) return this;\n const paths = unifyPaths(paths_);\n const {cwd} = this.options;\n\n paths.forEach((path) => {\n // convert to absolute path unless relative path already matches\n if (!sysPath.isAbsolute(path) && !this._closers.has(path)) {\n if (cwd) path = sysPath.join(cwd, path);\n path = sysPath.resolve(path);\n }\n\n this._closePath(path);\n\n this._ignoredPaths.add(path);\n if (this._watched.has(path)) {\n this._ignoredPaths.add(path + SLASH_GLOBSTAR);\n }\n\n // reset the cached userIgnored anymatch fn\n // to make ignoredPaths changes effective\n this._userIgnored = undefined;\n });\n\n return this;\n}\n\n/**\n * Close watchers and remove all listeners from watched paths.\n * @returns {Promise<void>}.\n*/\nclose() {\n if (this.closed) return this._closePromise;\n this.closed = true;\n\n // Memory management.\n this.removeAllListeners();\n const closers = [];\n this._closers.forEach(closerList => closerList.forEach(closer => {\n const promise = closer();\n if (promise instanceof Promise) closers.push(promise);\n }));\n this._streams.forEach(stream => stream.destroy());\n this._userIgnored = undefined;\n this._readyCount = 0;\n this._readyEmitted = false;\n this._watched.forEach(dirent => dirent.dispose());\n ['closers', 'watched', 'streams', 'symlinkPaths', 'throttled'].forEach(key => {\n this[`_${key}`].clear();\n });\n\n this._closePromise = closers.length ? Promise.all(closers).then(() => undefined) : Promise.resolve();\n return this._closePromise;\n}\n\n/**\n * Expose list of watched paths\n * @returns {Object} for chaining\n*/\ngetWatched() {\n const watchList = {};\n this._watched.forEach((entry, dir) => {\n const key = this.options.cwd ? sysPath.relative(this.options.cwd, dir) : dir;\n watchList[key || ONE_DOT] = entry.getChildren().sort();\n });\n return watchList;\n}\n\nemitWithAll(event, args) {\n this.emit(...args);\n if (event !== EV_ERROR) this.emit(EV_ALL, ...args);\n}\n\n// Common helpers\n// --------------\n\n/**\n * Normalize and emit events.\n * Calling _emit DOES NOT MEAN emit() would be called!\n * @param {EventName} event Type of event\n * @param {Path} path File or directory path\n * @param {*=} val1 arguments to be passed with event\n * @param {*=} val2\n * @param {*=} val3\n * @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag\n */\nasync _emit(event, path, val1, val2, val3) {\n if (this.closed) return;\n\n const opts = this.options;\n if (isWindows) path = sysPath.normalize(path);\n if (opts.cwd) path = sysPath.relative(opts.cwd, path);\n /** @type Array<any> */\n const args = [event, path];\n if (val3 !== undefined) args.push(val1, val2, val3);\n else if (val2 !== undefined) args.push(val1, val2);\n else if (val1 !== undefined) args.push(val1);\n\n const awf = opts.awaitWriteFinish;\n let pw;\n if (awf && (pw = this._pendingWrites.get(path))) {\n pw.lastChange = new Date();\n return this;\n }\n\n if (opts.atomic) {\n if (event === EV_UNLINK) {\n this._pendingUnlinks.set(path, args);\n setTimeout(() => {\n this._pendingUnlinks.forEach((entry, path) => {\n this.emit(...entry);\n this.emit(EV_ALL, ...entry);\n this._pendingUnlinks.delete(path);\n });\n }, typeof opts.atomic === 'number' ? opts.atomic : 100);\n return this;\n }\n if (event === EV_ADD && this._pendingUnlinks.has(path)) {\n event = args[0] = EV_CHANGE;\n this._pendingUnlinks.delete(path);\n }\n }\n\n if (awf && (event === EV_ADD || event === EV_CHANGE) && this._readyEmitted) {\n const awfEmit = (err, stats) => {\n if (err) {\n event = args[0] = EV_ERROR;\n args[1] = err;\n this.emitWithAll(event, args);\n } else if (stats) {\n // if stats doesn't exist the file must have been deleted\n if (args.length > 2) {\n args[2] = stats;\n } else {\n args.push(stats);\n }\n this.emitWithAll(event, args);\n }\n };\n\n this._awaitWriteFinish(path, awf.stabilityThreshold, event, awfEmit);\n return this;\n }\n\n if (event === EV_CHANGE) {\n const isThrottled = !this._throttle(EV_CHANGE, path, 50);\n if (isThrottled) return this;\n }\n\n if (opts.alwaysStat && val1 === undefined &&\n (event === EV_ADD || event === EV_ADD_DIR || event === EV_CHANGE)\n ) {\n const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path;\n let stats;\n try {\n stats = await stat(fullPath);\n } catch (err) {}\n // Suppress event when fs_stat fails, to avoid sending undefined 'stat'\n if (!stats || this.closed) return;\n args.push(stats);\n }\n this.emitWithAll(event, args);\n\n return this;\n}\n\n/**\n * Common handler for errors\n * @param {Error} error\n * @returns {Error|Boolean} The error if defined, otherwise the value of the FSWatcher instance's `closed` flag\n */\n_handleError(error) {\n const code = error && error.code;\n if (error && code !== 'ENOENT' && code !== 'ENOTDIR' &&\n (!this.options.ignorePermissionErrors || (code !== 'EPERM' && code !== 'EACCES'))\n ) {\n this.emit(EV_ERROR, error);\n }\n return error || this.closed;\n}\n\n/**\n * Helper utility for throttling\n * @param {ThrottleType} actionType type being throttled\n * @param {Path} path being acted upon\n * @param {Number} timeout duration of time to suppress duplicate actions\n * @returns {Object|false} tracking object or false if action should be suppressed\n */\n_throttle(actionType, path, timeout) {\n if (!this._throttled.has(actionType)) {\n this._throttled.set(actionType, new Map());\n }\n\n /** @type {Map<Path, Object>} */\n const action = this._throttled.get(actionType);\n /** @type {Object} */\n const actionPath = action.get(path);\n\n if (actionPath) {\n actionPath.count++;\n return false;\n }\n\n let timeoutObject;\n const clear = () => {\n const item = action.get(path);\n const count = item ? item.count : 0;\n action.delete(path);\n clearTimeout(timeoutObject);\n if (item) clearTimeout(item.timeoutObject);\n return count;\n };\n timeoutObject = setTimeout(clear, timeout);\n const thr = {timeoutObject, clear, count: 0};\n action.set(path, thr);\n return thr;\n}\n\n_incrReadyCount() {\n return this._readyCount++;\n}\n\n/**\n * Awaits write operation to finish.\n * Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback.\n * @param {Path} path being acted upon\n * @param {Number} threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished\n * @param {EventName} event\n * @param {Function} awfEmit Callback to be called when ready for event to be emitted.\n */\n_awaitWriteFinish(path, threshold, event, awfEmit) {\n let timeoutHandler;\n\n let fullPath = path;\n if (this.options.cwd && !sysPath.isAbsolute(path)) {\n fullPath = sysPath.join(this.options.cwd, path);\n }\n\n const now = new Date();\n\n const awaitWriteFinish = (prevStat) => {\n fs.stat(fullPath, (err, curStat) => {\n if (err || !this._pendingWrites.has(path)) {\n if (err && err.code !== 'ENOENT') awfEmit(err);\n return;\n }\n\n const now = Number(new Date());\n\n if (prevStat && curStat.size !== prevStat.size) {\n this._pendingWrites.get(path).lastChange = now;\n }\n const pw = this._pendingWrites.get(path);\n const df = now - pw.lastChange;\n\n if (df >= threshold) {\n this._pendingWrites.delete(path);\n awfEmit(undefined, curStat);\n } else {\n timeoutHandler = setTimeout(\n awaitWriteFinish,\n this.options.awaitWriteFinish.pollInterval,\n curStat\n );\n }\n });\n };\n\n if (!this._pendingWrites.has(path)) {\n this._pendingWrites.set(path, {\n lastChange: now,\n cancelWait: () => {\n this._pendingWrites.delete(path);\n clearTimeout(timeoutHandler);\n return event;\n }\n });\n timeoutHandler = setTimeout(\n awaitWriteFinish,\n this.options.awaitWriteFinish.pollInterval\n );\n }\n}\n\n_getGlobIgnored() {\n return [...this._ignoredPaths.values()];\n}\n\n/**\n * Determines whether user has asked to ignore this path.\n * @param {Path} path filepath or dir\n * @param {fs.Stats=} stats result of fs.stat\n * @returns {Boolean}\n */\n_isIgnored(path, stats) {\n if (this.options.atomic && DOT_RE.test(path)) return true;\n if (!this._userIgnored) {\n const {cwd} = this.options;\n const ign = this.options.ignored;\n\n const ignored = ign && ign.map(normalizeIgnored(cwd));\n const paths = arrify(ignored)\n .filter((path) => typeof path === STRING_TYPE && !isGlob(path))\n .map((path) => path + SLASH_GLOBSTAR);\n const list = this._getGlobIgnored().map(normalizeIgnored(cwd)).concat(ignored, paths);\n this._userIgnored = anymatch(list, undefined, ANYMATCH_OPTS);\n }\n\n return this._userIgnored([path, stats]);\n}\n\n_isntIgnored(path, stat) {\n return !this._isIgnored(path, stat);\n}\n\n/**\n * Provides a set of common helpers and properties relating to symlink and glob handling.\n * @param {Path} path file, directory, or glob pattern being watched\n * @param {Number=} depth at any depth > 0, this isn't a glob\n * @returns {WatchHelper} object containing helpers for this path\n */\n_getWatchHelpers(path, depth) {\n const watchPath = depth || this.options.disableGlobbing || !isGlob(path) ? path : globParent(path);\n const follow = this.options.followSymlinks;\n\n return new WatchHelper(path, watchPath, follow, this);\n}\n\n// Directory helpers\n// -----------------\n\n/**\n * Provides directory tracking objects\n * @param {String} directory path of the directory\n * @returns {DirEntry} the directory's tracking object\n */\n_getWatchedDir(directory) {\n if (!this._boundRemove) this._boundRemove = this._remove.bind(this);\n const dir = sysPath.resolve(directory);\n if (!this._watched.has(dir)) this._watched.set(dir, new DirEntry(dir, this._boundRemove));\n return this._watched.get(dir);\n}\n\n// File helpers\n// ------------\n\n/**\n * Check for read permissions.\n * Based on this answer on SO: https://stackoverflow.com/a/11781404/1358405\n * @param {fs.Stats} stats - object, result of fs_stat\n * @returns {Boolean} indicates whether the file can be read\n*/\n_hasReadPermissions(stats) {\n if (this.options.ignorePermissionErrors) return true;\n\n // stats.mode may be bigint\n const md = stats && Number.parseInt(stats.mode, 10);\n const st = md & 0o777;\n const it = Number.parseInt(st.toString(8)[0], 10);\n return Boolean(4 & it);\n}\n\n/**\n * Handles emitting unlink events for\n * files and directories, and via recursion, for\n * files and directories within directories that are unlinked\n * @param {String} directory within which the following item is located\n * @param {String} item base path of item/directory\n * @returns {void}\n*/\n_remove(directory, item, isDirectory) {\n // if what is being deleted is a directory, get that directory's paths\n // for recursive deleting and cleaning of watched object\n // if it is not a directory, nestedDirectoryChildren will be empty array\n const path = sysPath.join(directory, item);\n const fullPath = sysPath.resolve(path);\n isDirectory = isDirectory != null\n ? isDirectory\n : this._watched.has(path) || this._watched.has(fullPath);\n\n // prevent duplicate handling in case of arriving here nearly simultaneously\n // via multiple paths (such as _handleFile and _handleDir)\n if (!this._throttle('remove', path, 100)) return;\n\n // if the only watched file is removed, watch for its return\n if (!isDirectory && !this.options.useFsEvents && this._watched.size === 1) {\n this.add(directory, item, true);\n }\n\n // This will create a new entry in the watched object in either case\n // so we got to do the directory check beforehand\n const wp = this._getWatchedDir(path);\n const nestedDirectoryChildren = wp.getChildren();\n\n // Recursively remove children directories / files.\n nestedDirectoryChildren.forEach(nested => this._remove(path, nested));\n\n // Check if item was on the watched list and remove it\n const parent = this._getWatchedDir(directory);\n const wasTracked = parent.has(item);\n parent.remove(item);\n\n // Fixes issue #1042 -> Relative paths were detected and added as symlinks\n // (https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L612),\n // but never removed from the map in case the path was deleted.\n // This leads to an incorrect state if the path was recreated:\n // https://github.com/paulmillr/chokidar/blob/e1753ddbc9571bdc33b4a4af172d52cb6e611c10/lib/nodefs-handler.js#L553\n if (this._symlinkPaths.has(fullPath)) {\n this._symlinkPaths.delete(fullPath);\n }\n\n // If we wait for this file to be fully written, cancel the wait.\n let relPath = path;\n if (this.options.cwd) relPath = sysPath.relative(this.options.cwd, path);\n if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {\n const event = this._pendingWrites.get(relPath).cancelWait();\n if (event === EV_ADD) return;\n }\n\n // The Entry will either be a directory that just got removed\n // or a bogus entry to a file, in either case we have to remove it\n this._watched.delete(path);\n this._watched.delete(fullPath);\n const eventName = isDirectory ? EV_UNLINK_DIR : EV_UNLINK;\n if (wasTracked && !this._isIgnored(path)) this._emit(eventName, path);\n\n // Avoid conflicts if we later create another file with the same name\n if (!this.options.useFsEvents) {\n this._closePath(path);\n }\n}\n\n/**\n * Closes all watchers for a path\n * @param {Path} path\n */\n_closePath(path) {\n this._closeFile(path)\n const dir = sysPath.dirname(path);\n this._getWatchedDir(dir).remove(sysPath.basename(path));\n}\n\n/**\n * Closes only file-specific watchers\n * @param {Path} path\n */\n_closeFile(path) {\n const closers = this._closers.get(path);\n if (!closers) return;\n closers.forEach(closer => closer());\n this._closers.delete(path);\n}\n\n/**\n *\n * @param {Path} path\n * @param {Function} closer\n */\n_addPathCloser(path, closer) {\n if (!closer) return;\n let list = this._closers.get(path);\n if (!list) {\n list = [];\n this._closers.set(path, list);\n }\n list.push(closer);\n}\n\n_readdirp(root, opts) {\n if (this.closed) return;\n const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts};\n let stream = readdirp(root, options);\n this._streams.add(stream);\n stream.once(STR_CLOSE, () => {\n stream = undefined;\n });\n stream.once(STR_END, () => {\n if (stream) {\n this._streams.delete(stream);\n stream = undefined;\n }\n });\n return stream;\n}\n\n}\n\n// Export FSWatcher class\nexports.FSWatcher = FSWatcher;\n\n/**\n * Instantiates watcher with paths to be tracked.\n * @param {String|Array<String>} paths file/directory paths and/or globs\n * @param {Object=} options chokidar opts\n * @returns an instance of FSWatcher for chaining.\n */\nconst watch = (paths, options) => {\n const watcher = new FSWatcher(options);\n watcher.add(paths);\n return watcher;\n};\n\nexports.watch = watch;\n","'use strict';\n\nconst {sep} = require('path');\nconst {platform} = process;\nconst os = require('os');\n\nexports.EV_ALL = 'all';\nexports.EV_READY = 'ready';\nexports.EV_ADD = 'add';\nexports.EV_CHANGE = 'change';\nexports.EV_ADD_DIR = 'addDir';\nexports.EV_UNLINK = 'unlink';\nexports.EV_UNLINK_DIR = 'unlinkDir';\nexports.EV_RAW = 'raw';\nexports.EV_ERROR = 'error';\n\nexports.STR_DATA = 'data';\nexports.STR_END = 'end';\nexports.STR_CLOSE = 'close';\n\nexports.FSEVENT_CREATED = 'created';\nexports.FSEVENT_MODIFIED = 'modified';\nexports.FSEVENT_DELETED = 'deleted';\nexports.FSEVENT_MOVED = 'moved';\nexports.FSEVENT_CLONED = 'cloned';\nexports.FSEVENT_UNKNOWN = 'unknown';\nexports.FSEVENT_FLAG_MUST_SCAN_SUBDIRS = 1;\nexports.FSEVENT_TYPE_FILE = 'file';\nexports.FSEVENT_TYPE_DIRECTORY = 'directory';\nexports.FSEVENT_TYPE_SYMLINK = 'symlink';\n\nexports.KEY_LISTENERS = 'listeners';\nexports.KEY_ERR = 'errHandlers';\nexports.KEY_RAW = 'rawEmitters';\nexports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW];\n\nexports.DOT_SLASH = `.${sep}`;\n\nexports.BACK_SLASH_RE = /\\\\/g;\nexports.DOUBLE_SLASH_RE = /\\/\\//;\nexports.SLASH_OR_BACK_SLASH_RE = /[/\\\\]/;\nexports.DOT_RE = /\\..*\\.(sw[px])$|~$|\\.subl.*\\.tmp/;\nexports.REPLACER_RE = /^\\.[/\\\\]/;\n\nexports.SLASH = '/';\nexports.SLASH_SLASH = '//';\nexports.BRACE_START = '{';\nexports.BANG = '!';\nexports.ONE_DOT = '.';\nexports.TWO_DOTS = '..';\nexports.STAR = '*';\nexports.GLOBSTAR = '**';\nexports.ROOT_GLOBSTAR = '/**/*';\nexports.SLASH_GLOBSTAR = '/**';\nexports.DIR_SUFFIX = 'Dir';\nexports.ANYMATCH_OPTS = {dot: true};\nexports.STRING_TYPE = 'string';\nexports.FUNCTION_TYPE = 'function';\nexports.EMPTY_STR = '';\nexports.EMPTY_FN = () => {};\nexports.IDENTITY_FN = val => val;\n\nexports.isWindows = platform === 'win32';\nexports.isMacos = platform === 'darwin';\nexports.isLinux = platform === 'linux';\nexports.isIBMi = os.type() === 'OS400';\n","'use strict';\n\nconst fs = require('fs');\nconst sysPath = require('path');\nconst { promisify } = require('util');\n\nlet fsevents;\ntry {\n fsevents = require('fsevents');\n} catch (error) {\n if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error);\n}\n\nif (fsevents) {\n // TODO: real check\n const mtch = process.version.match(/v(\\d+)\\.(\\d+)/);\n if (mtch && mtch[1] && mtch[2]) {\n const maj = Number.parseInt(mtch[1], 10);\n const min = Number.parseInt(mtch[2], 10);\n if (maj === 8 && min < 16) {\n fsevents = undefined;\n }\n }\n}\n\nconst {\n EV_ADD,\n EV_CHANGE,\n EV_ADD_DIR,\n EV_UNLINK,\n EV_ERROR,\n STR_DATA,\n STR_END,\n FSEVENT_CREATED,\n FSEVENT_MODIFIED,\n FSEVENT_DELETED,\n FSEVENT_MOVED,\n // FSEVENT_CLONED,\n FSEVENT_UNKNOWN,\n FSEVENT_FLAG_MUST_SCAN_SUBDIRS,\n FSEVENT_TYPE_FILE,\n FSEVENT_TYPE_DIRECTORY,\n FSEVENT_TYPE_SYMLINK,\n\n ROOT_GLOBSTAR,\n DIR_SUFFIX,\n DOT_SLASH,\n FUNCTION_TYPE,\n EMPTY_FN,\n IDENTITY_FN\n} = require('./constants');\n\nconst Depth = (value) => isNaN(value) ? {} : {depth: value};\n\nconst stat = promisify(fs.stat);\nconst lstat = promisify(fs.lstat);\nconst realpath = promisify(fs.realpath);\n\nconst statMethods = { stat, lstat };\n\n/**\n * @typedef {String} Path\n */\n\n/**\n * @typedef {Object} FsEventsWatchContainer\n * @property {Set<Function>} listeners\n * @property {Function} rawEmitter\n * @property {{stop: Function}} watcher\n */\n\n// fsevents instance helper functions\n/**\n * Object to hold per-process fsevents instances (may be shared across chokidar FSWatcher instances)\n * @type {Map<Path,FsEventsWatchContainer>}\n */\nconst FSEventsWatchers = new Map();\n\n// Threshold of duplicate path prefixes at which to start\n// consolidating going forward\nconst consolidateThreshhold = 10;\n\nconst wrongEventFlags = new Set([\n 69888, 70400, 71424, 72704, 73472, 131328, 131840, 262912\n]);\n\n/**\n * Instantiates the fsevents interface\n * @param {Path} path path to be watched\n * @param {Function} callback called when fsevents is bound and ready\n * @returns {{stop: Function}} new fsevents instance\n */\nconst createFSEventsInstance = (path, callback) => {\n const stop = fsevents.watch(path, callback);\n return {stop};\n};\n\n/**\n * Instantiates the fsevents interface or binds listeners to an existing one covering\n * the same file tree.\n * @param {Path} path - to be watched\n * @param {Path} realPath - real path for symlinks\n * @param {Function} listener - called when fsevents emits events\n * @param {Function} rawEmitter - passes data to listeners of the 'raw' event\n * @returns {Function} closer\n */\nfunction setFSEventsListener(path, realPath, listener, rawEmitter) {\n let watchPath = sysPath.extname(realPath) ? sysPath.dirname(realPath) : realPath;\n\n const parentPath = sysPath.dirname(watchPath);\n let cont = FSEventsWatchers.get(watchPath);\n\n // If we've accumulated a substantial number of paths that\n // could have been consolidated by watching one directory\n // above the current one, create a watcher on the parent\n // path instead, so that we do consolidate going forward.\n if (couldConsolidate(parentPath)) {\n watchPath = parentPath;\n }\n\n const resolvedPath = sysPath.resolve(path);\n const hasSymlink = resolvedPath !== realPath;\n\n const filteredListener = (fullPath, flags, info) => {\n if (hasSymlink) fullPath = fullPath.replace(realPath, resolvedPath);\n if (\n fullPath === resolvedPath ||\n !fullPath.indexOf(resolvedPath + sysPath.sep)\n ) listener(fullPath, flags, info);\n };\n\n // check if there is already a watcher on a parent path\n // modifies `watchPath` to the parent path when it finds a match\n let watchedParent = false;\n for (const watchedPath of FSEventsWatchers.keys()) {\n if (realPath.indexOf(sysPath.resolve(watchedPath) + sysPath.sep) === 0) {\n watchPath = watchedPath;\n cont = FSEventsWatchers.get(watchPath);\n watchedParent = true;\n break;\n }\n }\n\n if (cont || watchedParent) {\n cont.listeners.add(filteredListener);\n } else {\n cont = {\n listeners: new Set([filteredListener]),\n rawEmitter,\n watcher: createFSEventsInstance(watchPath, (fullPath, flags) => {\n if (!cont.listeners.size) return;\n if (flags & FSEVENT_FLAG_MUST_SCAN_SUBDIRS) return;\n const info = fsevents.getInfo(fullPath, flags);\n cont.listeners.forEach(list => {\n list(fullPath, flags, info);\n });\n\n cont.rawEmitter(info.event, fullPath, info);\n })\n };\n FSEventsWatchers.set(watchPath, cont);\n }\n\n // removes this instance's listeners and closes the underlying fsevents\n // instance if there are no more listeners left\n return () => {\n const lst = cont.listeners;\n\n lst.delete(filteredListener);\n if (!lst.size) {\n FSEventsWatchers.delete(watchPath);\n if (cont.watcher) return cont.watcher.stop().then(() => {\n cont.rawEmitter = cont.watcher = undefined;\n Object.freeze(cont);\n });\n }\n };\n}\n\n// Decide whether or not we should start a new higher-level\n// parent watcher\nconst couldConsolidate = (path) => {\n let count = 0;\n for (const watchPath of FSEventsWatchers.keys()) {\n if (watchPath.indexOf(path) === 0) {\n count++;\n if (count >= consolidateThreshhold) {\n return true;\n }\n }\n }\n\n return false;\n};\n\n// returns boolean indicating whether fsevents can be used\nconst canUse = () => fsevents && FSEventsWatchers.size < 128;\n\n// determines subdirectory traversal levels from root to path\nconst calcDepth = (path, root) => {\n let i = 0;\n while (!path.indexOf(root) && (path = sysPath.dirname(path)) !== root) i++;\n return i;\n};\n\n// returns boolean indicating whether the fsevents' event info has the same type\n// as the one returned by fs.stat\nconst sameTypes = (info, stats) => (\n info.type === FSEVENT_TYPE_DIRECTORY && stats.isDirectory() ||\n info.type === FSEVENT_TYPE_SYMLINK && stats.isSymbolicLink() ||\n info.type === FSEVENT_TYPE_FILE && stats.isFile()\n)\n\n/**\n * @mixin\n */\nclass FsEventsHandler {\n\n/**\n * @param {import('../index').FSWatcher} fsw\n */\nconstructor(fsw) {\n this.fsw = fsw;\n}\ncheckIgnored(path, stats) {\n const ipaths = this.fsw._ignoredPaths;\n if (this.fsw._isIgnored(path, stats)) {\n ipaths.add(path);\n if (stats && stats.isDirectory()) {\n ipaths.add(path + ROOT_GLOBSTAR);\n }\n return true;\n }\n\n ipaths.delete(path);\n ipaths.delete(path + ROOT_GLOBSTAR);\n}\n\naddOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts) {\n const event = watchedDir.has(item) ? EV_CHANGE : EV_ADD;\n this.handleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts);\n}\n\nasync checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts) {\n try {\n const stats = await stat(path)\n if (this.fsw.closed) return;\n if (sameTypes(info, stats)) {\n this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);\n } else {\n this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);\n }\n } catch (error) {\n if (error.code === 'EACCES') {\n this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);\n } else {\n this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);\n }\n }\n}\n\nhandleEvent(event, path, fullPath, realPath, parent, watchedDir, item, info, opts) {\n if (this.fsw.closed || this.checkIgnored(path)) return;\n\n if (event === EV_UNLINK) {\n const isDirectory = info.type === FSEVENT_TYPE_DIRECTORY\n // suppress unlink events on never before seen files\n if (isDirectory || watchedDir.has(item)) {\n this.fsw._remove(parent, item, isDirectory);\n }\n } else {\n if (event === EV_ADD) {\n // track new directories\n if (info.type === FSEVENT_TYPE_DIRECTORY) this.fsw._getWatchedDir(path);\n\n if (info.type === FSEVENT_TYPE_SYMLINK && opts.followSymlinks) {\n // push symlinks back to the top of the stack to get handled\n const curDepth = opts.depth === undefined ?\n undefined : calcDepth(fullPath, realPath) + 1;\n return this._addToFsEvents(path, false, true, curDepth);\n }\n\n // track new paths\n // (other than symlinks being followed, which will be tracked soon)\n this.fsw._getWatchedDir(parent).add(item);\n }\n /**\n * @type {'add'|'addDir'|'unlink'|'unlinkDir'}\n */\n const eventName = info.type === FSEVENT_TYPE_DIRECTORY ? event + DIR_SUFFIX : event;\n this.fsw._emit(eventName, path);\n if (eventName === EV_ADD_DIR) this._addToFsEvents(path, false, true);\n }\n}\n\n/**\n * Handle symlinks encountered during directory scan\n * @param {String} watchPath - file/dir path to be watched with fsevents\n * @param {String} realPath - real path (in case of symlinks)\n * @param {Function} transform - path transformer\n * @param {Function} globFilter - path filter in case a glob pattern was provided\n * @returns {Function} closer for the watcher instance\n*/\n_watchWithFsEvents(watchPath, realPath, transform, globFilter) {\n if (this.fsw.closed || this.fsw._isIgnored(watchPath)) return;\n const opts = this.fsw.options;\n const watchCallback = async (fullPath, flags, info) => {\n if (this.fsw.closed) return;\n if (\n opts.depth !== undefined &&\n calcDepth(fullPath, realPath) > opts.depth\n ) return;\n const path = transform(sysPath.join(\n watchPath, sysPath.relative(watchPath, fullPath)\n ));\n if (globFilter && !globFilter(path)) return;\n // ensure directories are tracked\n const parent = sysPath.dirname(path);\n const item = sysPath.basename(path);\n const watchedDir = this.fsw._getWatchedDir(\n info.type === FSEVENT_TYPE_DIRECTORY ? path : parent\n );\n\n // correct for wrong events emitted\n if (wrongEventFlags.has(flags) || info.event === FSEVENT_UNKNOWN) {\n if (typeof opts.ignored === FUNCTION_TYPE) {\n let stats;\n try {\n stats = await stat(path);\n } catch (error) {}\n if (this.fsw.closed) return;\n if (this.checkIgnored(path, stats)) return;\n if (sameTypes(info, stats)) {\n this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);\n } else {\n this.handleEvent(EV_UNLINK, path, fullPath, realPath, parent, watchedDir, item, info, opts);\n }\n } else {\n this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);\n }\n } else {\n switch (info.event) {\n case FSEVENT_CREATED:\n case FSEVENT_MODIFIED:\n return this.addOrChange(path, fullPath, realPath, parent, watchedDir, item, info, opts);\n case FSEVENT_DELETED:\n case FSEVENT_MOVED:\n return this.checkExists(path, fullPath, realPath, parent, watchedDir, item, info, opts);\n }\n }\n };\n\n const closer = setFSEventsListener(\n watchPath,\n realPath,\n watchCallback,\n this.fsw._emitRaw\n );\n\n this.fsw._emitReady();\n return closer;\n}\n\n/**\n * Handle symlinks encountered during directory scan\n * @param {String} linkPath path to symlink\n * @param {String} fullPath absolute path to the symlink\n * @param {Function} transform pre-existing path transformer\n * @param {Number} curDepth level of subdirectories traversed to where symlink is\n * @returns {Promise<void>}\n */\nasync _handleFsEventsSymlink(linkPath, fullPath, transform, curDepth) {\n // don't follow the same symlink more than once\n if (this.fsw.closed || this.fsw._symlinkPaths.has(fullPath)) return;\n\n this.fsw._symlinkPaths.set(fullPath, true);\n this.fsw._incrReadyCount();\n\n try {\n const linkTarget = await realpath(linkPath);\n if (this.fsw.closed) return;\n if (this.fsw._isIgnored(linkTarget)) {\n return this.fsw._emitReady();\n }\n\n this.fsw._incrReadyCount();\n\n // add the linkTarget for watching with a wrapper for transform\n // that causes emitted paths to incorporate the link's path\n this._addToFsEvents(linkTarget || linkPath, (path) => {\n let aliasedPath = linkPath;\n if (linkTarget && linkTarget !== DOT_SLASH) {\n aliasedPath = path.replace(linkTarget, linkPath);\n } else if (path !== DOT_SLASH) {\n aliasedPath = sysPath.join(linkPath, path);\n }\n return transform(aliasedPath);\n }, false, curDepth);\n } catch(error) {\n if (this.fsw._handleError(error)) {\n return this.fsw._emitReady();\n }\n }\n}\n\n/**\n *\n * @param {Path} newPath\n * @param {fs.Stats} stats\n */\nemitAdd(newPath, stats, processPath, opts, forceAdd) {\n const pp = processPath(newPath);\n const isDir = stats.isDirectory();\n const dirObj = this.fsw._getWatchedDir(sysPath.dirname(pp));\n const base = sysPath.basename(pp);\n\n // ensure empty dirs get tracked\n if (isDir) this.fsw._getWatchedDir(pp);\n if (dirObj.has(base)) return;\n dirObj.add(base);\n\n if (!opts.ignoreInitial || forceAdd === true) {\n this.fsw._emit(isDir ? EV_ADD_DIR : EV_ADD, pp, stats);\n }\n}\n\ninitWatch(realPath, path, wh, processPath) {\n if (this.fsw.closed) return;\n const closer = this._watchWithFsEvents(\n wh.watchPath,\n sysPath.resolve(realPath || wh.watchPath),\n processPath,\n wh.globFilter\n );\n this.fsw._addPathCloser(path, closer);\n}\n\n/**\n * Handle added path with fsevents\n * @param {String} path file/dir path or glob pattern\n * @param {Function|Boolean=} transform converts working path to what the user expects\n * @param {Boolean=} forceAdd ensure add is emitted\n * @param {Number=} priorDepth Level of subdirectories already traversed.\n * @returns {Promise<void>}\n */\nasync _addToFsEvents(path, transform, forceAdd, priorDepth) {\n if (this.fsw.closed) {\n return;\n }\n const opts = this.fsw.options;\n const processPath = typeof transform === FUNCTION_TYPE ? transform : IDENTITY_FN;\n\n const wh = this.fsw._getWatchHelpers(path);\n\n // evaluate what is at the path we're being asked to watch\n try {\n const stats = await statMethods[wh.statMethod](wh.watchPath);\n if (this.fsw.closed) return;\n if (this.fsw._isIgnored(wh.watchPath, stats)) {\n throw null;\n }\n if (stats.isDirectory()) {\n // emit addDir unless this is a glob parent\n if (!wh.globFilter) this.emitAdd(processPath(path), stats, processPath, opts, forceAdd);\n\n // don't recurse further if it would exceed depth setting\n if (priorDepth && priorDepth > opts.depth) return;\n\n // scan the contents of the dir\n this.fsw._readdirp(wh.watchPath, {\n fileFilter: entry => wh.filterPath(entry),\n directoryFilter: entry => wh.filterDir(entry),\n ...Depth(opts.depth - (priorDepth || 0))\n }).on(STR_DATA, (entry) => {\n // need to check filterPath on dirs b/c filterDir is less restrictive\n if (this.fsw.closed) {\n return;\n }\n if (entry.stats.isDirectory() && !wh.filterPath(entry)) return;\n\n const joinedPath = sysPath.join(wh.watchPath, entry.path);\n const {fullPath} = entry;\n\n if (wh.followSymlinks && entry.stats.isSymbolicLink()) {\n // preserve the current depth here since it can't be derived from\n // real paths past the symlink\n const curDepth = opts.depth === undefined ?\n undefined : calcDepth(joinedPath, sysPath.resolve(wh.watchPath)) + 1;\n\n this._handleFsEventsSymlink(joinedPath, fullPath, processPath, curDepth);\n } else {\n this.emitAdd(joinedPath, entry.stats, processPath, opts, forceAdd);\n }\n }).on(EV_ERROR, EMPTY_FN).on(STR_END, () => {\n this.fsw._emitReady();\n });\n } else {\n this.emitAdd(wh.watchPath, stats, processPath, opts, forceAdd);\n this.fsw._emitReady();\n }\n } catch (error) {\n if (!error || this.fsw._handleError(error)) {\n // TODO: Strange thing: \"should not choke on an ignored watch path\" will be failed without 2 ready calls -__-\n this.fsw._emitReady();\n this.fsw._emitReady();\n }\n }\n\n if (opts.persistent && forceAdd !== true) {\n if (typeof transform === FUNCTION_TYPE) {\n // realpath has already been resolved\n this.initWatch(undefined, path, wh, processPath);\n } else {\n let realPath;\n try {\n realPath = await realpath(wh.watchPath);\n } catch (e) {}\n this.initWatch(realPath, path, wh, processPath);\n }\n }\n}\n\n}\n\nmodule.exports = FsEventsHandler;\nmodule.exports.canUse = canUse;\n","'use strict';\n\nconst fs = require('fs');\nconst sysPath = require('path');\nconst { promisify } = require('util');\nconst isBinaryPath = require('is-binary-path');\nconst {\n isWindows,\n isLinux,\n EMPTY_FN,\n EMPTY_STR,\n KEY_LISTENERS,\n KEY_ERR,\n KEY_RAW,\n HANDLER_KEYS,\n EV_CHANGE,\n EV_ADD,\n EV_ADD_DIR,\n EV_ERROR,\n STR_DATA,\n STR_END,\n BRACE_START,\n STAR\n} = require('./constants');\n\nconst THROTTLE_MODE_WATCH = 'watch';\n\nconst open = promisify(fs.open);\nconst stat = promisify(fs.stat);\nconst lstat = promisify(fs.lstat);\nconst close = promisify(fs.close);\nconst fsrealpath = promisify(fs.realpath);\n\nconst statMethods = { lstat, stat };\n\n// TODO: emit errors properly. Example: EMFILE on Macos.\nconst foreach = (val, fn) => {\n if (val instanceof Set) {\n val.forEach(fn);\n } else {\n fn(val);\n }\n};\n\nconst addAndConvert = (main, prop, item) => {\n let container = main[prop];\n if (!(container instanceof Set)) {\n main[prop] = container = new Set([container]);\n }\n container.add(item);\n};\n\nconst clearItem = cont => key => {\n const set = cont[key];\n if (set instanceof Set) {\n set.clear();\n } else {\n delete cont[key];\n }\n};\n\nconst delFromSet = (main, prop, item) => {\n const container = main[prop];\n if (container instanceof Set) {\n container.delete(item);\n } else if (container === item) {\n delete main[prop];\n }\n};\n\nconst isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;\n\n/**\n * @typedef {String} Path\n */\n\n// fs_watch helpers\n\n// object to hold per-process fs_watch instances\n// (may be shared across chokidar FSWatcher instances)\n\n/**\n * @typedef {Object} FsWatchContainer\n * @property {Set} listeners\n * @property {Set} errHandlers\n * @property {Set} rawEmitters\n * @property {fs.FSWatcher=} watcher\n * @property {Boolean=} watcherUnusable\n */\n\n/**\n * @type {Map<String,FsWatchContainer>}\n */\nconst FsWatchInstances = new Map();\n\n/**\n * Instantiates the fs_watch interface\n * @param {String} path to be watched\n * @param {Object} options to be passed to fs_watch\n * @param {Function} listener main event handler\n * @param {Function} errHandler emits info about errors\n * @param {Function} emitRaw emits raw event data\n * @returns {fs.FSWatcher} new fsevents instance\n */\nfunction createFsWatchInstance(path, options, listener, errHandler, emitRaw) {\n const handleEvent = (rawEvent, evPath) => {\n listener(path);\n emitRaw(rawEvent, evPath, {watchedPath: path});\n\n // emit based on events occurring for files from a directory's watcher in\n // case the file's watcher misses it (and rely on throttling to de-dupe)\n if (evPath && path !== evPath) {\n fsWatchBroadcast(\n sysPath.resolve(path, evPath), KEY_LISTENERS, sysPath.join(path, evPath)\n );\n }\n };\n try {\n return fs.watch(path, options, handleEvent);\n } catch (error) {\n errHandler(error);\n }\n}\n\n/**\n * Helper for passing fs_watch event data to a collection of listeners\n * @param {Path} fullPath absolute path bound to fs_watch instance\n * @param {String} type listener type\n * @param {*=} val1 arguments to be passed to listeners\n * @param {*=} val2\n * @param {*=} val3\n */\nconst fsWatchBroadcast = (fullPath, type, val1, val2, val3) => {\n const cont = FsWatchInstances.get(fullPath);\n if (!cont) return;\n foreach(cont[type], (listener) => {\n listener(val1, val2, val3);\n });\n};\n\n/**\n * Instantiates the fs_watch interface or binds listeners\n * to an existing one covering the same file system entry\n * @param {String} path\n * @param {String} fullPath absolute path\n * @param {Object} options to be passed to fs_watch\n * @param {Object} handlers container for event listener functions\n */\nconst setFsWatchListener = (path, fullPath, options, handlers) => {\n const {listener, errHandler, rawEmitter} = handlers;\n let cont = FsWatchInstances.get(fullPath);\n\n /** @type {fs.FSWatcher=} */\n let watcher;\n if (!options.persistent) {\n watcher = createFsWatchInstance(\n path, options, listener, errHandler, rawEmitter\n );\n return watcher.close.bind(watcher);\n }\n if (cont) {\n addAndConvert(cont, KEY_LISTENERS, listener);\n addAndConvert(cont, KEY_ERR, errHandler);\n addAndConvert(cont, KEY_RAW, rawEmitter);\n } else {\n watcher = createFsWatchInstance(\n path,\n options,\n fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),\n errHandler, // no need to use broadcast here\n fsWatchBroadcast.bind(null, fullPath, KEY_RAW)\n );\n if (!watcher) return;\n watcher.on(EV_ERROR, async (error) => {\n const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);\n cont.watcherUnusable = true; // documented since Node 10.4.1\n // Workaround for https://github.com/joyent/node/issues/4337\n if (isWindows && error.code === 'EPERM') {\n try {\n const fd = await open(path, 'r');\n await close(fd);\n broadcastErr(error);\n } catch (err) {}\n } else {\n broadcastErr(error);\n }\n });\n cont = {\n listeners: listener,\n errHandlers: errHandler,\n rawEmitters: rawEmitter,\n watcher\n };\n FsWatchInstances.set(fullPath, cont);\n }\n // const index = cont.listeners.indexOf(listener);\n\n // removes this instance's listeners and closes the underlying fs_watch\n // instance if there are no more listeners left\n return () => {\n delFromSet(cont, KEY_LISTENERS, listener);\n delFromSet(cont, KEY_ERR, errHandler);\n delFromSet(cont, KEY_RAW, rawEmitter);\n if (isEmptySet(cont.listeners)) {\n // Check to protect against issue gh-730.\n // if (cont.watcherUnusable) {\n cont.watcher.close();\n // }\n FsWatchInstances.delete(fullPath);\n HANDLER_KEYS.forEach(clearItem(cont));\n cont.watcher = undefined;\n Object.freeze(cont);\n }\n };\n};\n\n// fs_watchFile helpers\n\n// object to hold per-process fs_watchFile instances\n// (may be shared across chokidar FSWatcher instances)\nconst FsWatchFileInstances = new Map();\n\n/**\n * Instantiates the fs_watchFile interface or binds listeners\n * to an existing one covering the same file system entry\n * @param {String} path to be watched\n * @param {String} fullPath absolute path\n * @param {Object} options options to be passed to fs_watchFile\n * @param {Object} handlers container for event listener functions\n * @returns {Function} closer\n */\nconst setFsWatchFileListener = (path, fullPath, options, handlers) => {\n const {listener, rawEmitter} = handlers;\n let cont = FsWatchFileInstances.get(fullPath);\n\n /* eslint-disable no-unused-vars, prefer-destructuring */\n let listeners = new Set();\n let rawEmitters = new Set();\n\n const copts = cont && cont.options;\n if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {\n // \"Upgrade\" the watcher to persistence or a quicker interval.\n // This creates some unlikely edge case issues if the user mixes\n // settings in a very weird way, but solving for those cases\n // doesn't seem worthwhile for the added complexity.\n listeners = cont.listeners;\n rawEmitters = cont.rawEmitters;\n fs.unwatchFile(fullPath);\n cont = undefined;\n }\n\n /* eslint-enable no-unused-vars, prefer-destructuring */\n\n if (cont) {\n addAndConvert(cont, KEY_LISTENERS, listener);\n addAndConvert(cont, KEY_RAW, rawEmitter);\n } else {\n // TODO\n // listeners.add(listener);\n // rawEmitters.add(rawEmitter);\n cont = {\n listeners: listener,\n rawEmitters: rawEmitter,\n options,\n watcher: fs.watchFile(fullPath, options, (curr, prev) => {\n foreach(cont.rawEmitters, (rawEmitter) => {\n rawEmitter(EV_CHANGE, fullPath, {curr, prev});\n });\n const currmtime = curr.mtimeMs;\n if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {\n foreach(cont.listeners, (listener) => listener(path, curr));\n }\n })\n };\n FsWatchFileInstances.set(fullPath, cont);\n }\n // const index = cont.listeners.indexOf(listener);\n\n // Removes this instance's listeners and closes the underlying fs_watchFile\n // instance if there are no more listeners left.\n return () => {\n delFromSet(cont, KEY_LISTENERS, listener);\n delFromSet(cont, KEY_RAW, rawEmitter);\n if (isEmptySet(cont.listeners)) {\n FsWatchFileInstances.delete(fullPath);\n fs.unwatchFile(fullPath);\n cont.options = cont.watcher = undefined;\n Object.freeze(cont);\n }\n };\n};\n\n/**\n * @mixin\n */\nclass NodeFsHandler {\n\n/**\n * @param {import(\"../index\").FSWatcher} fsW\n */\nconstructor(fsW) {\n this.fsw = fsW;\n this._boundHandleError = (error) => fsW._handleError(error);\n}\n\n/**\n * Watch file for changes with fs_watchFile or fs_watch.\n * @param {String} path to file or dir\n * @param {Function} listener on fs change\n * @returns {Function} closer for the watcher instance\n */\n_watchWithNodeFs(path, listener) {\n const opts = this.fsw.options;\n const directory = sysPath.dirname(path);\n const basename = sysPath.basename(path);\n const parent = this.fsw._getWatchedDir(directory);\n parent.add(basename);\n const absolutePath = sysPath.resolve(path);\n const options = {persistent: opts.persistent};\n if (!listener) listener = EMPTY_FN;\n\n let closer;\n if (opts.usePolling) {\n options.interval = opts.enableBinaryInterval && isBinaryPath(basename) ?\n opts.binaryInterval : opts.interval;\n closer = setFsWatchFileListener(path, absolutePath, options, {\n listener,\n rawEmitter: this.fsw._emitRaw\n });\n } else {\n closer = setFsWatchListener(path, absolutePath, options, {\n listener,\n errHandler: this._boundHandleError,\n rawEmitter: this.fsw._emitRaw\n });\n }\n return closer;\n}\n\n/**\n * Watch a file and emit add event if warranted.\n * @param {Path} file Path\n * @param {fs.Stats} stats result of fs_stat\n * @param {Boolean} initialAdd was the file added at watch instantiation?\n * @returns {Function} closer for the watcher instance\n */\n_handleFile(file, stats, initialAdd) {\n if (this.fsw.closed) {\n return;\n }\n const dirname = sysPath.dirname(file);\n const basename = sysPath.basename(file);\n const parent = this.fsw._getWatchedDir(dirname);\n // stats is always present\n let prevStats = stats;\n\n // if the file is already being watched, do nothing\n if (parent.has(basename)) return;\n\n const listener = async (path, newStats) => {\n if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;\n if (!newStats || newStats.mtimeMs === 0) {\n try {\n const newStats = await stat(file);\n if (this.fsw.closed) return;\n // Check that change event was not fired because of changed only accessTime.\n const at = newStats.atimeMs;\n const mt = newStats.mtimeMs;\n if (!at || at <= mt || mt !== prevStats.mtimeMs) {\n this.fsw._emit(EV_CHANGE, file, newStats);\n }\n if (isLinux && prevStats.ino !== newStats.ino) {\n this.fsw._closeFile(path)\n prevStats = newStats;\n this.fsw._addPathCloser(path, this._watchWithNodeFs(file, listener));\n } else {\n prevStats = newStats;\n }\n } catch (error) {\n // Fix issues where mtime is null but file is still present\n this.fsw._remove(dirname, basename);\n }\n // add is about to be emitted if file not already tracked in parent\n } else if (parent.has(basename)) {\n // Check that change event was not fired because of changed only accessTime.\n const at = newStats.atimeMs;\n const mt = newStats.mtimeMs;\n if (!at || at <= mt || mt !== prevStats.mtimeMs) {\n this.fsw._emit(EV_CHANGE, file, newStats);\n }\n prevStats = newStats;\n }\n }\n // kick off the watcher\n const closer = this._watchWithNodeFs(file, listener);\n\n // emit an add event if we're supposed to\n if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {\n if (!this.fsw._throttle(EV_ADD, file, 0)) return;\n this.fsw._emit(EV_ADD, file, stats);\n }\n\n return closer;\n}\n\n/**\n * Handle symlinks encountered while reading a dir.\n * @param {Object} entry returned by readdirp\n * @param {String} directory path of dir being read\n * @param {String} path of this item\n * @param {String} item basename of this item\n * @returns {Promise<Boolean>} true if no more processing is needed for this entry.\n */\nasync _handleSymlink(entry, directory, path, item) {\n if (this.fsw.closed) {\n return;\n }\n const full = entry.fullPath;\n const dir = this.fsw._getWatchedDir(directory);\n\n if (!this.fsw.options.followSymlinks) {\n // watch symlink directly (don't follow) and detect changes\n this.fsw._incrReadyCount();\n\n let linkPath;\n try {\n linkPath = await fsrealpath(path);\n } catch (e) {\n this.fsw._emitReady();\n return true;\n }\n\n if (this.fsw.closed) return;\n if (dir.has(item)) {\n if (this.fsw._symlinkPaths.get(full) !== linkPath) {\n this.fsw._symlinkPaths.set(full, linkPath);\n this.fsw._emit(EV_CHANGE, path, entry.stats);\n }\n } else {\n dir.add(item);\n this.fsw._symlinkPaths.set(full, linkPath);\n this.fsw._emit(EV_ADD, path, entry.stats);\n }\n this.fsw._emitReady();\n return true;\n }\n\n // don't follow the same symlink more than once\n if (this.fsw._symlinkPaths.has(full)) {\n return true;\n }\n\n this.fsw._symlinkPaths.set(full, true);\n}\n\n_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {\n // Normalize the directory name on Windows\n directory = sysPath.join(directory, EMPTY_STR);\n\n if (!wh.hasGlob) {\n throttler = this.fsw._throttle('readdir', directory, 1000);\n if (!throttler) return;\n }\n\n const previous = this.fsw._getWatchedDir(wh.path);\n const current = new Set();\n\n let stream = this.fsw._readdirp(directory, {\n fileFilter: entry => wh.filterPath(entry),\n directoryFilter: entry => wh.filterDir(entry),\n depth: 0\n }).on(STR_DATA, async (entry) => {\n if (this.fsw.closed) {\n stream = undefined;\n return;\n }\n const item = entry.path;\n let path = sysPath.join(directory, item);\n current.add(item);\n\n if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path, item)) {\n return;\n }\n\n if (this.fsw.closed) {\n stream = undefined;\n return;\n }\n // Files that present in current directory snapshot\n // but absent in previous are added to watch list and\n // emit `add` event.\n if (item === target || !target && !previous.has(item)) {\n this.fsw._incrReadyCount();\n\n // ensure relativeness of path is preserved in case of watcher reuse\n path = sysPath.join(dir, sysPath.relative(dir, path));\n\n this._addToNodeFs(path, initialAdd, wh, depth + 1);\n }\n }).on(EV_ERROR, this._boundHandleError);\n\n return new Promise(resolve =>\n stream.once(STR_END, () => {\n if (this.fsw.closed) {\n stream = undefined;\n return;\n }\n const wasThrottled = throttler ? throttler.clear() : false;\n\n resolve();\n\n // Files that absent in current directory snapshot\n // but present in previous emit `remove` event\n // and are removed from @watched[directory].\n previous.getChildren().filter((item) => {\n return item !== directory &&\n !current.has(item) &&\n // in case of intersecting globs;\n // a path may have been filtered out of this readdir, but\n // shouldn't be removed because it matches a different glob\n (!wh.hasGlob || wh.filterPath({\n fullPath: sysPath.resolve(directory, item)\n }));\n }).forEach((item) => {\n this.fsw._remove(directory, item);\n });\n\n stream = undefined;\n\n // one more time for any missed in case changes came in extremely quickly\n if (wasThrottled) this._handleRead(directory, false, wh, target, dir, depth, throttler);\n })\n );\n}\n\n/**\n * Read directory to add / remove files from `@watched` list and re-read it on change.\n * @param {String} dir fs path\n * @param {fs.Stats} stats\n * @param {Boolean} initialAdd\n * @param {Number} depth relative to user-supplied path\n * @param {String} target child path targeted for watch\n * @param {Object} wh Common watch helpers for this path\n * @param {String} realpath\n * @returns {Promise<Function>} closer for the watcher instance.\n */\nasync _handleDir(dir, stats, initialAdd, depth, target, wh, realpath) {\n const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));\n const tracked = parentDir.has(sysPath.basename(dir));\n if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {\n if (!wh.hasGlob || wh.globFilter(dir)) this.fsw._emit(EV_ADD_DIR, dir, stats);\n }\n\n // ensure dir is tracked (harmless if redundant)\n parentDir.add(sysPath.basename(dir));\n this.fsw._getWatchedDir(dir);\n let throttler;\n let closer;\n\n const oDepth = this.fsw.options.depth;\n if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath)) {\n if (!target) {\n await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler);\n if (this.fsw.closed) return;\n }\n\n closer = this._watchWithNodeFs(dir, (dirPath, stats) => {\n // if current directory is removed, do nothing\n if (stats && stats.mtimeMs === 0) return;\n\n this._handleRead(dirPath, false, wh, target, dir, depth, throttler);\n });\n }\n return closer;\n}\n\n/**\n * Handle added file, directory, or glob pattern.\n * Delegates call to _handleFile / _handleDir after checks.\n * @param {String} path to file or ir\n * @param {Boolean} initialAdd was the file added at watch instantiation?\n * @param {Object} priorWh depth relative to user-supplied path\n * @param {Number} depth Child path actually targeted for watch\n * @param {String=} target Child path actually targeted for watch\n * @returns {Promise}\n */\nasync _addToNodeFs(path, initialAdd, priorWh, depth, target) {\n const ready = this.fsw._emitReady;\n if (this.fsw._isIgnored(path) || this.fsw.closed) {\n ready();\n return false;\n }\n\n const wh = this.fsw._getWatchHelpers(path, depth);\n if (!wh.hasGlob && priorWh) {\n wh.hasGlob = priorWh.hasGlob;\n wh.globFilter = priorWh.globFilter;\n wh.filterPath = entry => priorWh.filterPath(entry);\n wh.filterDir = entry => priorWh.filterDir(entry);\n }\n\n // evaluate what is at the path we're being asked to watch\n try {\n const stats = await statMethods[wh.statMethod](wh.watchPath);\n if (this.fsw.closed) return;\n if (this.fsw._isIgnored(wh.watchPath, stats)) {\n ready();\n return false;\n }\n\n const follow = this.fsw.options.followSymlinks && !path.includes(STAR) && !path.includes(BRACE_START);\n let closer;\n if (stats.isDirectory()) {\n const absPath = sysPath.resolve(path);\n const targetPath = follow ? await fsrealpath(path) : path;\n if (this.fsw.closed) return;\n closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);\n if (this.fsw.closed) return;\n // preserve this symlink's target path\n if (absPath !== targetPath && targetPath !== undefined) {\n this.fsw._symlinkPaths.set(absPath, targetPath);\n }\n } else if (stats.isSymbolicLink()) {\n const targetPath = follow ? await fsrealpath(path) : path;\n if (this.fsw.closed) return;\n const parent = sysPath.dirname(wh.watchPath);\n this.fsw._getWatchedDir(parent).add(wh.watchPath);\n this.fsw._emit(EV_ADD, wh.watchPath, stats);\n closer = await this._handleDir(parent, stats, initialAdd, depth, path, wh, targetPath);\n if (this.fsw.closed) return;\n\n // preserve this symlink's target path\n if (targetPath !== undefined) {\n this.fsw._symlinkPaths.set(sysPath.resolve(path), targetPath);\n }\n } else {\n closer = this._handleFile(wh.watchPath, stats, initialAdd);\n }\n ready();\n\n this.fsw._addPathCloser(path, closer);\n return false;\n\n } catch (error) {\n if (this.fsw._handleError(error)) {\n ready();\n return path;\n }\n }\n}\n\n}\n\nmodule.exports = NodeFsHandler;\n","'use strict'\n\nconst vendors = require('./vendors.json')\n\nconst env = process.env\n\n// Used for testing only\nObject.defineProperty(exports, '_vendors', {\n value: vendors.map(function (v) {\n return v.constant\n })\n})\n\nexports.name = null\nexports.isPR = null\nexports.id = null\n\nif (env.CI !== 'false') {\n vendors.forEach(function (vendor) {\n const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]\n const isCI = envs.every(function (obj) {\n return checkEnv(obj)\n })\n\n exports[vendor.constant] = isCI\n\n if (!isCI) {\n return\n }\n\n exports.name = vendor.name\n exports.isPR = checkPR(vendor)\n exports.id = vendor.constant\n })\n}\n\nexports.isCI = !!(\n env.CI !== 'false' && // Bypass all checks if CI env is explicitly set to 'false'\n (env.BUILD_ID || // Jenkins, Cloudbees\n env.BUILD_NUMBER || // Jenkins, TeamCity\n env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari, Cloudflare Pages/Workers\n env.CI_APP_ID || // Appflow\n env.CI_BUILD_ID || // Appflow\n env.CI_BUILD_NUMBER || // Appflow\n env.CI_NAME || // Codeship and others\n env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI\n env.RUN_ID || // TaskCluster, dsari\n exports.name ||\n false)\n)\n\nfunction checkEnv (obj) {\n // \"env\": \"CIRRUS\"\n if (typeof obj === 'string') return !!env[obj]\n\n // \"env\": { \"env\": \"NODE\", \"includes\": \"/app/.heroku/node/bin/node\" }\n if ('env' in obj) {\n // Currently there are no other types, uncomment when there are\n // if ('includes' in obj) {\n return env[obj.env] && env[obj.env].includes(obj.includes)\n // }\n }\n\n if ('any' in obj) {\n return obj.any.some(function (k) {\n return !!env[k]\n })\n }\n\n return Object.keys(obj).every(function (k) {\n return env[k] === obj[k]\n })\n}\n\nfunction checkPR (vendor) {\n switch (typeof vendor.pr) {\n case 'string':\n // \"pr\": \"CIRRUS_PR\"\n return !!env[vendor.pr]\n case 'object':\n if ('env' in vendor.pr) {\n if ('any' in vendor.pr) {\n // \"pr\": { \"env\": \"CODEBUILD_WEBHOOK_EVENT\", \"any\": [\"PULL_REQUEST_CREATED\", \"PULL_REQUEST_UPDATED\"] }\n return vendor.pr.any.some(function (key) {\n return env[vendor.pr.env] === key\n })\n } else {\n // \"pr\": { \"env\": \"BUILDKITE_PULL_REQUEST\", \"ne\": \"false\" }\n return vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne\n }\n } else if ('any' in vendor.pr) {\n // \"pr\": { \"any\": [\"ghprbPullId\", \"CHANGE_ID\"] }\n return vendor.pr.any.some(function (key) {\n return !!env[key]\n })\n } else {\n // \"pr\": { \"DRONE_BUILD_EVENT\": \"pull_request\" }\n return checkEnv(vendor.pr)\n }\n default:\n // PR detection not supported for this vendor\n return null\n }\n}\n","import os from 'os';\nimport escapeStringRegexp from 'escape-string-regexp';\n\nconst extractPathRegex = /\\s+at.*[(\\s](.*)\\)?/;\nconst pathRegex = /^(?:(?:(?:node|node:[\\w/]+|(?:(?:node:)?internal\\/[\\w/]*|.*node_modules\\/(?:babel-polyfill|pirates)\\/.*)?\\w+)(?:\\.js)?:\\d+:\\d+)|native)/;\nconst homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir().replace(/\\\\/g, '/');\n\nexport default function cleanStack(stack, {pretty = false, basePath} = {}) {\n\tconst basePathRegex = basePath && new RegExp(`(at | \\\\()${escapeStringRegexp(basePath.replace(/\\\\/g, '/'))}`, 'g');\n\n\tif (typeof stack !== 'string') {\n\t\treturn undefined;\n\t}\n\n\treturn stack.replace(/\\\\/g, '/')\n\t\t.split('\\n')\n\t\t.filter(line => {\n\t\t\tconst pathMatches = line.match(extractPathRegex);\n\t\t\tif (pathMatches === null || !pathMatches[1]) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst match = pathMatches[1];\n\n\t\t\t// Electron\n\t\t\tif (\n\t\t\t\tmatch.includes('.app/Contents/Resources/electron.asar') ||\n\t\t\t\tmatch.includes('.app/Contents/Resources/default_app.asar') ||\n\t\t\t\tmatch.includes('node_modules/electron/dist/resources/electron.asar') ||\n\t\t\t\tmatch.includes('node_modules/electron/dist/resources/default_app.asar')\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn !pathRegex.test(match);\n\t\t})\n\t\t.filter(line => line.trim() !== '')\n\t\t.map(line => {\n\t\t\tif (basePathRegex) {\n\t\t\t\tline = line.replace(basePathRegex, '$1');\n\t\t\t}\n\n\t\t\tif (pretty) {\n\t\t\t\tline = line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~')));\n\t\t\t}\n\n\t\t\treturn line;\n\t\t})\n\t\t.join('\\n');\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.CleanWebpackPlugin = void 0;\n\nvar _del = require(\"del\");\n\nvar _path = _interopRequireDefault(require(\"path\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Copied from https://github.com/sindresorhus/is-plain-obj/blob/97480673cf12145b32ec2ee924980d66572e8a86/index.js\nfunction isPlainObject(value) {\n if (Object.prototype.toString.call(value) !== '[object Object]') {\n return false;\n }\n\n const prototype = Object.getPrototypeOf(value);\n return prototype === null || prototype === Object.getPrototypeOf({});\n}\n\nclass CleanWebpackPlugin {\n constructor(options = {}) {\n if (isPlainObject(options) === false) {\n throw new Error(`clean-webpack-plugin only accepts an options object. See:\n https://github.com/johnagan/clean-webpack-plugin#options-and-defaults-optional`);\n } // @ts-ignore\n\n\n if (options.allowExternal) {\n throw new Error('clean-webpack-plugin: `allowExternal` option no longer supported. Use `dangerouslyAllowCleanPatternsOutsideProject`');\n }\n\n if (options.dangerouslyAllowCleanPatternsOutsideProject === true && options.dry !== true && options.dry !== false) {\n // eslint-disable-next-line no-console\n console.warn('clean-webpack-plugin: dangerouslyAllowCleanPatternsOutsideProject requires dry: false to be explicitly set. Enabling dry mode');\n }\n\n this.dangerouslyAllowCleanPatternsOutsideProject = options.dangerouslyAllowCleanPatternsOutsideProject === true || false;\n this.dry = options.dry === true || options.dry === false ? options.dry : this.dangerouslyAllowCleanPatternsOutsideProject === true || false;\n this.verbose = this.dry === true || options.verbose === true || false;\n this.cleanStaleWebpackAssets = options.cleanStaleWebpackAssets === true || options.cleanStaleWebpackAssets === false ? options.cleanStaleWebpackAssets : true;\n this.protectWebpackAssets = options.protectWebpackAssets === true || options.protectWebpackAssets === false ? options.protectWebpackAssets : true;\n this.cleanAfterEveryBuildPatterns = Array.isArray(options.cleanAfterEveryBuildPatterns) ? options.cleanAfterEveryBuildPatterns : [];\n this.cleanOnceBeforeBuildPatterns = Array.isArray(options.cleanOnceBeforeBuildPatterns) ? options.cleanOnceBeforeBuildPatterns : ['**/*'];\n /**\n * Store webpack build assets\n */\n\n this.currentAssets = [];\n /**\n * Only used with cleanOnceBeforeBuildPatterns\n */\n\n this.initialClean = false;\n this.outputPath = '';\n this.apply = this.apply.bind(this);\n this.handleInitial = this.handleInitial.bind(this);\n this.handleDone = this.handleDone.bind(this);\n this.removeFiles = this.removeFiles.bind(this);\n }\n\n apply(compiler) {\n if (!compiler.options.output || !compiler.options.output.path) {\n // eslint-disable-next-line no-console\n console.warn('clean-webpack-plugin: options.output.path not defined. Plugin disabled...');\n return;\n }\n\n this.outputPath = compiler.options.output.path;\n /**\n * webpack 4+ comes with a new plugin system.\n *\n * Check for hooks in-order to support old plugin system\n * webpack 5+ removed the old system, the check now breaks\n */\n\n const hooks = compiler.hooks;\n\n if (this.cleanOnceBeforeBuildPatterns.length !== 0) {\n hooks.emit.tap('clean-webpack-plugin', compilation => {\n this.handleInitial(compilation);\n });\n }\n\n hooks.done.tap('clean-webpack-plugin', stats => {\n this.handleDone(stats);\n });\n }\n /**\n * Initially remove files from output directory prior to build.\n *\n * Only happens once.\n *\n * Warning: It is recommended to initially clean your build directory outside of webpack to minimize unexpected behavior.\n */\n\n\n handleInitial(compilation) {\n if (this.initialClean) {\n return;\n }\n /**\n * Do not remove files if there are compilation errors\n *\n * Handle logging inside this.handleDone\n */\n\n\n const stats = compilation.getStats();\n\n if (stats.hasErrors()) {\n return;\n }\n\n this.initialClean = true;\n this.removeFiles(this.cleanOnceBeforeBuildPatterns);\n }\n\n handleDone(stats) {\n /**\n * Do nothing if there is a webpack error\n */\n if (stats.hasErrors()) {\n if (this.verbose) {\n // eslint-disable-next-line no-console\n console.warn('clean-webpack-plugin: pausing due to webpack errors');\n }\n\n return;\n }\n /**\n * Fetch Webpack's output asset files\n */\n\n\n const assetList = Object.keys(stats.compilation.assets);\n /**\n * Get all files that were in the previous build but not the current\n *\n * (relies on del's cwd: outputPath option)\n */\n\n const staleFiles = this.currentAssets.filter(previousAsset => {\n const assetCurrent = assetList.includes(previousAsset) === false;\n return assetCurrent;\n });\n /**\n * Save assets for next compilation\n */\n\n this.currentAssets = assetList.sort();\n const removePatterns = [];\n /**\n * Remove unused webpack assets\n */\n\n if (this.cleanStaleWebpackAssets === true && staleFiles.length !== 0) {\n removePatterns.push(...staleFiles);\n }\n /**\n * Remove cleanAfterEveryBuildPatterns\n */\n\n\n if (this.cleanAfterEveryBuildPatterns.length !== 0) {\n removePatterns.push(...this.cleanAfterEveryBuildPatterns);\n }\n\n if (removePatterns.length !== 0) {\n this.removeFiles(removePatterns);\n }\n }\n\n removeFiles(patterns) {\n try {\n const deleted = (0, _del.sync)(patterns, {\n force: this.dangerouslyAllowCleanPatternsOutsideProject,\n // Change context to build directory\n cwd: this.outputPath,\n dryRun: this.dry,\n dot: true,\n ignore: this.protectWebpackAssets ? this.currentAssets : []\n });\n /**\n * Log if verbose is enabled\n */\n\n if (this.verbose) {\n deleted.forEach(file => {\n const filename = _path.default.relative(process.cwd(), file);\n\n const message = this.dry ? 'dry' : 'removed';\n /**\n * Use console.warn over .log\n * https://github.com/webpack/webpack/issues/1904\n * https://github.com/johnagan/clean-webpack-plugin/issues/11\n */\n // eslint-disable-next-line no-console\n\n console.warn(`clean-webpack-plugin: ${message} ${filename}`);\n });\n }\n } catch (error) {\n const needsForce = /Cannot delete files\\/folders outside the current working directory\\./.test(error.message);\n\n if (needsForce) {\n const message = 'clean-webpack-plugin: Cannot delete files/folders outside the current working directory. Can be overridden with the `dangerouslyAllowCleanPatternsOutsideProject` option.';\n throw new Error(message);\n }\n /* istanbul ignore next */\n\n\n throw error;\n }\n }\n\n}\n\nexports.CleanWebpackPlugin = CleanWebpackPlugin;\n//# sourceMappingURL=clean-webpack-plugin.js.map","import commander from './index.js';\n\n// wrapper to provide named exports for ESM.\nexport const {\n program,\n createCommand,\n createArgument,\n createOption,\n CommanderError,\n InvalidArgumentError,\n InvalidOptionArgumentError, // deprecated old name\n Command,\n Argument,\n Option,\n Help\n} = commander;\n","const { Argument } = require('./lib/argument.js');\nconst { Command } = require('./lib/command.js');\nconst { CommanderError, InvalidArgumentError } = require('./lib/error.js');\nconst { Help } = require('./lib/help.js');\nconst { Option } = require('./lib/option.js');\n\n/**\n * Expose the root command.\n */\n\nexports = module.exports = new Command();\nexports.program = exports; // More explicit access to global command.\n// createArgument, createCommand, and createOption are implicitly available as they are methods on program.\n\n/**\n * Expose classes\n */\n\nexports.Command = Command;\nexports.Option = Option;\nexports.Argument = Argument;\nexports.Help = Help;\n\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\nexports.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated\n","const { InvalidArgumentError } = require('./error.js');\n\nclass Argument {\n /**\n * Initialize a new command argument with the given name and description.\n * The default is that the argument is required, and you can explicitly\n * indicate this with <> around the name. Put [] around the name for an optional argument.\n *\n * @param {string} name\n * @param {string} [description]\n */\n\n constructor(name, description) {\n this.description = description || '';\n this.variadic = false;\n this.parseArg = undefined;\n this.defaultValue = undefined;\n this.defaultValueDescription = undefined;\n this.argChoices = undefined;\n\n switch (name[0]) {\n case '<': // e.g. <required>\n this.required = true;\n this._name = name.slice(1, -1);\n break;\n case '[': // e.g. [optional]\n this.required = false;\n this._name = name.slice(1, -1);\n break;\n default:\n this.required = true;\n this._name = name;\n break;\n }\n\n if (this._name.length > 3 && this._name.slice(-3) === '...') {\n this.variadic = true;\n this._name = this._name.slice(0, -3);\n }\n }\n\n /**\n * Return argument name.\n *\n * @return {string}\n */\n\n name() {\n return this._name;\n }\n\n /**\n * @api private\n */\n\n _concatValue(value, previous) {\n if (previous === this.defaultValue || !Array.isArray(previous)) {\n return [value];\n }\n\n return previous.concat(value);\n }\n\n /**\n * Set the default value, and optionally supply the description to be displayed in the help.\n *\n * @param {*} value\n * @param {string} [description]\n * @return {Argument}\n */\n\n default(value, description) {\n this.defaultValue = value;\n this.defaultValueDescription = description;\n return this;\n }\n\n /**\n * Set the custom handler for processing CLI command arguments into argument values.\n *\n * @param {Function} [fn]\n * @return {Argument}\n */\n\n argParser(fn) {\n this.parseArg = fn;\n return this;\n }\n\n /**\n * Only allow argument value to be one of choices.\n *\n * @param {string[]} values\n * @return {Argument}\n */\n\n choices(values) {\n this.argChoices = values.slice();\n this.parseArg = (arg, previous) => {\n if (!this.argChoices.includes(arg)) {\n throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(', ')}.`);\n }\n if (this.variadic) {\n return this._concatValue(arg, previous);\n }\n return arg;\n };\n return this;\n }\n\n /**\n * Make argument required.\n */\n argRequired() {\n this.required = true;\n return this;\n }\n\n /**\n * Make argument optional.\n */\n argOptional() {\n this.required = false;\n return this;\n }\n}\n\n/**\n * Takes an argument and returns its human readable equivalent for help usage.\n *\n * @param {Argument} arg\n * @return {string}\n * @api private\n */\n\nfunction humanReadableArgName(arg) {\n const nameOutput = arg.name() + (arg.variadic === true ? '...' : '');\n\n return arg.required\n ? '<' + nameOutput + '>'\n : '[' + nameOutput + ']';\n}\n\nexports.Argument = Argument;\nexports.humanReadableArgName = humanReadableArgName;\n","const EventEmitter = require('events').EventEmitter;\nconst childProcess = require('child_process');\nconst path = require('path');\nconst fs = require('fs');\nconst process = require('process');\n\nconst { Argument, humanReadableArgName } = require('./argument.js');\nconst { CommanderError } = require('./error.js');\nconst { Help } = require('./help.js');\nconst { Option, splitOptionFlags, DualOptions } = require('./option.js');\nconst { suggestSimilar } = require('./suggestSimilar');\n\nclass Command extends EventEmitter {\n /**\n * Initialize a new `Command`.\n *\n * @param {string} [name]\n */\n\n constructor(name) {\n super();\n /** @type {Command[]} */\n this.commands = [];\n /** @type {Option[]} */\n this.options = [];\n this.parent = null;\n this._allowUnknownOption = false;\n this._allowExcessArguments = true;\n /** @type {Argument[]} */\n this.registeredArguments = [];\n this._args = this.registeredArguments; // deprecated old name\n /** @type {string[]} */\n this.args = []; // cli args with options removed\n this.rawArgs = [];\n this.processedArgs = []; // like .args but after custom processing and collecting variadic\n this._scriptPath = null;\n this._name = name || '';\n this._optionValues = {};\n this._optionValueSources = {}; // default, env, cli etc\n this._storeOptionsAsProperties = false;\n this._actionHandler = null;\n this._executableHandler = false;\n this._executableFile = null; // custom name for executable\n this._executableDir = null; // custom search directory for subcommands\n this._defaultCommandName = null;\n this._exitCallback = null;\n this._aliases = [];\n this._combineFlagAndOptionalValue = true;\n this._description = '';\n this._summary = '';\n this._argsDescription = undefined; // legacy\n this._enablePositionalOptions = false;\n this._passThroughOptions = false;\n this._lifeCycleHooks = {}; // a hash of arrays\n /** @type {boolean | string} */\n this._showHelpAfterError = false;\n this._showSuggestionAfterError = true;\n\n // see .configureOutput() for docs\n this._outputConfiguration = {\n writeOut: (str) => process.stdout.write(str),\n writeErr: (str) => process.stderr.write(str),\n getOutHelpWidth: () => process.stdout.isTTY ? process.stdout.columns : undefined,\n getErrHelpWidth: () => process.stderr.isTTY ? process.stderr.columns : undefined,\n outputError: (str, write) => write(str)\n };\n\n this._hidden = false;\n this._hasHelpOption = true;\n this._helpFlags = '-h, --help';\n this._helpDescription = 'display help for command';\n this._helpShortFlag = '-h';\n this._helpLongFlag = '--help';\n this._addImplicitHelpCommand = undefined; // Deliberately undefined, not decided whether true or false\n this._helpCommandName = 'help';\n this._helpCommandnameAndArgs = 'help [command]';\n this._helpCommandDescription = 'display help for command';\n this._helpConfiguration = {};\n }\n\n /**\n * Copy settings that are useful to have in common across root command and subcommands.\n *\n * (Used internally when adding a command using `.command()` so subcommands inherit parent settings.)\n *\n * @param {Command} sourceCommand\n * @return {Command} `this` command for chaining\n */\n copyInheritedSettings(sourceCommand) {\n this._outputConfiguration = sourceCommand._outputConfiguration;\n this._hasHelpOption = sourceCommand._hasHelpOption;\n this._helpFlags = sourceCommand._helpFlags;\n this._helpDescription = sourceCommand._helpDescription;\n this._helpShortFlag = sourceCommand._helpShortFlag;\n this._helpLongFlag = sourceCommand._helpLongFlag;\n this._helpCommandName = sourceCommand._helpCommandName;\n this._helpCommandnameAndArgs = sourceCommand._helpCommandnameAndArgs;\n this._helpCommandDescription = sourceCommand._helpCommandDescription;\n this._helpConfiguration = sourceCommand._helpConfiguration;\n this._exitCallback = sourceCommand._exitCallback;\n this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties;\n this._combineFlagAndOptionalValue = sourceCommand._combineFlagAndOptionalValue;\n this._allowExcessArguments = sourceCommand._allowExcessArguments;\n this._enablePositionalOptions = sourceCommand._enablePositionalOptions;\n this._showHelpAfterError = sourceCommand._showHelpAfterError;\n this._showSuggestionAfterError = sourceCommand._showSuggestionAfterError;\n\n return this;\n }\n\n /**\n * @returns {Command[]}\n * @api private\n */\n\n _getCommandAndAncestors() {\n const result = [];\n for (let command = this; command; command = command.parent) {\n result.push(command);\n }\n return result;\n }\n\n /**\n * Define a command.\n *\n * There are two styles of command: pay attention to where to put the description.\n *\n * @example\n * // Command implemented using action handler (description is supplied separately to `.command`)\n * program\n * .command('clone <source> [destination]')\n * .description('clone a repository into a newly created directory')\n * .action((source, destination) => {\n * console.log('clone command called');\n * });\n *\n * // Command implemented using separate executable file (description is second parameter to `.command`)\n * program\n * .command('start <service>', 'start named service')\n * .command('stop [service]', 'stop named service, or all if no name supplied');\n *\n * @param {string} nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`\n * @param {Object|string} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable)\n * @param {Object} [execOpts] - configuration options (for executable)\n * @return {Command} returns new command for action handler, or `this` for executable command\n */\n\n command(nameAndArgs, actionOptsOrExecDesc, execOpts) {\n let desc = actionOptsOrExecDesc;\n let opts = execOpts;\n if (typeof desc === 'object' && desc !== null) {\n opts = desc;\n desc = null;\n }\n opts = opts || {};\n const [, name, args] = nameAndArgs.match(/([^ ]+) *(.*)/);\n\n const cmd = this.createCommand(name);\n if (desc) {\n cmd.description(desc);\n cmd._executableHandler = true;\n }\n if (opts.isDefault) this._defaultCommandName = cmd._name;\n cmd._hidden = !!(opts.noHelp || opts.hidden); // noHelp is deprecated old name for hidden\n cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor\n if (args) cmd.arguments(args);\n this.commands.push(cmd);\n cmd.parent = this;\n cmd.copyInheritedSettings(this);\n\n if (desc) return this;\n return cmd;\n }\n\n /**\n * Factory routine to create a new unattached command.\n *\n * See .command() for creating an attached subcommand, which uses this routine to\n * create the command. You can override createCommand to customise subcommands.\n *\n * @param {string} [name]\n * @return {Command} new command\n */\n\n createCommand(name) {\n return new Command(name);\n }\n\n /**\n * You can customise the help with a subclass of Help by overriding createHelp,\n * or by overriding Help properties using configureHelp().\n *\n * @return {Help}\n */\n\n createHelp() {\n return Object.assign(new Help(), this.configureHelp());\n }\n\n /**\n * You can customise the help by overriding Help properties using configureHelp(),\n * or with a subclass of Help by overriding createHelp().\n *\n * @param {Object} [configuration] - configuration options\n * @return {Command|Object} `this` command for chaining, or stored configuration\n */\n\n configureHelp(configuration) {\n if (configuration === undefined) return this._helpConfiguration;\n\n this._helpConfiguration = configuration;\n return this;\n }\n\n /**\n * The default output goes to stdout and stderr. You can customise this for special\n * applications. You can also customise the display of errors by overriding outputError.\n *\n * The configuration properties are all functions:\n *\n * // functions to change where being written, stdout and stderr\n * writeOut(str)\n * writeErr(str)\n * // matching functions to specify width for wrapping help\n * getOutHelpWidth()\n * getErrHelpWidth()\n * // functions based on what is being written out\n * outputError(str, write) // used for displaying errors, and not used for displaying help\n *\n * @param {Object} [configuration] - configuration options\n * @return {Command|Object} `this` command for chaining, or stored configuration\n */\n\n configureOutput(configuration) {\n if (configuration === undefined) return this._outputConfiguration;\n\n Object.assign(this._outputConfiguration, configuration);\n return this;\n }\n\n /**\n * Display the help or a custom message after an error occurs.\n *\n * @param {boolean|string} [displayHelp]\n * @return {Command} `this` command for chaining\n */\n showHelpAfterError(displayHelp = true) {\n if (typeof displayHelp !== 'string') displayHelp = !!displayHelp;\n this._showHelpAfterError = displayHelp;\n return this;\n }\n\n /**\n * Display suggestion of similar commands for unknown commands, or options for unknown options.\n *\n * @param {boolean} [displaySuggestion]\n * @return {Command} `this` command for chaining\n */\n showSuggestionAfterError(displaySuggestion = true) {\n this._showSuggestionAfterError = !!displaySuggestion;\n return this;\n }\n\n /**\n * Add a prepared subcommand.\n *\n * See .command() for creating an attached subcommand which inherits settings from its parent.\n *\n * @param {Command} cmd - new subcommand\n * @param {Object} [opts] - configuration options\n * @return {Command} `this` command for chaining\n */\n\n addCommand(cmd, opts) {\n if (!cmd._name) {\n throw new Error(`Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()`);\n }\n\n opts = opts || {};\n if (opts.isDefault) this._defaultCommandName = cmd._name;\n if (opts.noHelp || opts.hidden) cmd._hidden = true; // modifying passed command due to existing implementation\n\n this.commands.push(cmd);\n cmd.parent = this;\n return this;\n }\n\n /**\n * Factory routine to create a new unattached argument.\n *\n * See .argument() for creating an attached argument, which uses this routine to\n * create the argument. You can override createArgument to return a custom argument.\n *\n * @param {string} name\n * @param {string} [description]\n * @return {Argument} new argument\n */\n\n createArgument(name, description) {\n return new Argument(name, description);\n }\n\n /**\n * Define argument syntax for command.\n *\n * The default is that the argument is required, and you can explicitly\n * indicate this with <> around the name. Put [] around the name for an optional argument.\n *\n * @example\n * program.argument('<input-file>');\n * program.argument('[output-file]');\n *\n * @param {string} name\n * @param {string} [description]\n * @param {Function|*} [fn] - custom argument processing function\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n argument(name, description, fn, defaultValue) {\n const argument = this.createArgument(name, description);\n if (typeof fn === 'function') {\n argument.default(defaultValue).argParser(fn);\n } else {\n argument.default(fn);\n }\n this.addArgument(argument);\n return this;\n }\n\n /**\n * Define argument syntax for command, adding multiple at once (without descriptions).\n *\n * See also .argument().\n *\n * @example\n * program.arguments('<cmd> [env]');\n *\n * @param {string} names\n * @return {Command} `this` command for chaining\n */\n\n arguments(names) {\n names.trim().split(/ +/).forEach((detail) => {\n this.argument(detail);\n });\n return this;\n }\n\n /**\n * Define argument syntax for command, adding a prepared argument.\n *\n * @param {Argument} argument\n * @return {Command} `this` command for chaining\n */\n addArgument(argument) {\n const previousArgument = this.registeredArguments.slice(-1)[0];\n if (previousArgument && previousArgument.variadic) {\n throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);\n }\n if (argument.required && argument.defaultValue !== undefined && argument.parseArg === undefined) {\n throw new Error(`a default value for a required argument is never used: '${argument.name()}'`);\n }\n this.registeredArguments.push(argument);\n return this;\n }\n\n /**\n * Override default decision whether to add implicit help command.\n *\n * addHelpCommand() // force on\n * addHelpCommand(false); // force off\n * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details\n *\n * @return {Command} `this` command for chaining\n */\n\n addHelpCommand(enableOrNameAndArgs, description) {\n if (enableOrNameAndArgs === false) {\n this._addImplicitHelpCommand = false;\n } else {\n this._addImplicitHelpCommand = true;\n if (typeof enableOrNameAndArgs === 'string') {\n this._helpCommandName = enableOrNameAndArgs.split(' ')[0];\n this._helpCommandnameAndArgs = enableOrNameAndArgs;\n }\n this._helpCommandDescription = description || this._helpCommandDescription;\n }\n return this;\n }\n\n /**\n * @return {boolean}\n * @api private\n */\n\n _hasImplicitHelpCommand() {\n if (this._addImplicitHelpCommand === undefined) {\n return this.commands.length && !this._actionHandler && !this._findCommand('help');\n }\n return this._addImplicitHelpCommand;\n }\n\n /**\n * Add hook for life cycle event.\n *\n * @param {string} event\n * @param {Function} listener\n * @return {Command} `this` command for chaining\n */\n\n hook(event, listener) {\n const allowedValues = ['preSubcommand', 'preAction', 'postAction'];\n if (!allowedValues.includes(event)) {\n throw new Error(`Unexpected value for event passed to hook : '${event}'.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n }\n if (this._lifeCycleHooks[event]) {\n this._lifeCycleHooks[event].push(listener);\n } else {\n this._lifeCycleHooks[event] = [listener];\n }\n return this;\n }\n\n /**\n * Register callback to use as replacement for calling process.exit.\n *\n * @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing\n * @return {Command} `this` command for chaining\n */\n\n exitOverride(fn) {\n if (fn) {\n this._exitCallback = fn;\n } else {\n this._exitCallback = (err) => {\n if (err.code !== 'commander.executeSubCommandAsync') {\n throw err;\n } else {\n // Async callback from spawn events, not useful to throw.\n }\n };\n }\n return this;\n }\n\n /**\n * Call process.exit, and _exitCallback if defined.\n *\n * @param {number} exitCode exit code for using with process.exit\n * @param {string} code an id string representing the error\n * @param {string} message human-readable description of the error\n * @return never\n * @api private\n */\n\n _exit(exitCode, code, message) {\n if (this._exitCallback) {\n this._exitCallback(new CommanderError(exitCode, code, message));\n // Expecting this line is not reached.\n }\n process.exit(exitCode);\n }\n\n /**\n * Register callback `fn` for the command.\n *\n * @example\n * program\n * .command('serve')\n * .description('start service')\n * .action(function() {\n * // do work here\n * });\n *\n * @param {Function} fn\n * @return {Command} `this` command for chaining\n */\n\n action(fn) {\n const listener = (args) => {\n // The .action callback takes an extra parameter which is the command or options.\n const expectedArgsCount = this.registeredArguments.length;\n const actionArgs = args.slice(0, expectedArgsCount);\n if (this._storeOptionsAsProperties) {\n actionArgs[expectedArgsCount] = this; // backwards compatible \"options\"\n } else {\n actionArgs[expectedArgsCount] = this.opts();\n }\n actionArgs.push(this);\n\n return fn.apply(this, actionArgs);\n };\n this._actionHandler = listener;\n return this;\n }\n\n /**\n * Factory routine to create a new unattached option.\n *\n * See .option() for creating an attached option, which uses this routine to\n * create the option. You can override createOption to return a custom option.\n *\n * @param {string} flags\n * @param {string} [description]\n * @return {Option} new option\n */\n\n createOption(flags, description) {\n return new Option(flags, description);\n }\n\n /**\n * Wrap parseArgs to catch 'commander.invalidArgument'.\n *\n * @param {Option | Argument} target\n * @param {string} value\n * @param {*} previous\n * @param {string} invalidArgumentMessage\n * @api private\n */\n\n _callParseArg(target, value, previous, invalidArgumentMessage) {\n try {\n return target.parseArg(value, previous);\n } catch (err) {\n if (err.code === 'commander.invalidArgument') {\n const message = `${invalidArgumentMessage} ${err.message}`;\n this.error(message, { exitCode: err.exitCode, code: err.code });\n }\n throw err;\n }\n }\n\n /**\n * Add an option.\n *\n * @param {Option} option\n * @return {Command} `this` command for chaining\n */\n addOption(option) {\n const oname = option.name();\n const name = option.attributeName();\n\n // store default value\n if (option.negate) {\n // --no-foo is special and defaults foo to true, unless a --foo option is already defined\n const positiveLongFlag = option.long.replace(/^--no-/, '--');\n if (!this._findOption(positiveLongFlag)) {\n this.setOptionValueWithSource(name, option.defaultValue === undefined ? true : option.defaultValue, 'default');\n }\n } else if (option.defaultValue !== undefined) {\n this.setOptionValueWithSource(name, option.defaultValue, 'default');\n }\n\n // register the option\n this.options.push(option);\n\n // handler for cli and env supplied values\n const handleOptionValue = (val, invalidValueMessage, valueSource) => {\n // val is null for optional option used without an optional-argument.\n // val is undefined for boolean and negated option.\n if (val == null && option.presetArg !== undefined) {\n val = option.presetArg;\n }\n\n // custom processing\n const oldValue = this.getOptionValue(name);\n if (val !== null && option.parseArg) {\n val = this._callParseArg(option, val, oldValue, invalidValueMessage);\n } else if (val !== null && option.variadic) {\n val = option._concatValue(val, oldValue);\n }\n\n // Fill-in appropriate missing values. Long winded but easy to follow.\n if (val == null) {\n if (option.negate) {\n val = false;\n } else if (option.isBoolean() || option.optional) {\n val = true;\n } else {\n val = ''; // not normal, parseArg might have failed or be a mock function for testing\n }\n }\n this.setOptionValueWithSource(name, val, valueSource);\n };\n\n this.on('option:' + oname, (val) => {\n const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`;\n handleOptionValue(val, invalidValueMessage, 'cli');\n });\n\n if (option.envVar) {\n this.on('optionEnv:' + oname, (val) => {\n const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`;\n handleOptionValue(val, invalidValueMessage, 'env');\n });\n }\n\n return this;\n }\n\n /**\n * Internal implementation shared by .option() and .requiredOption()\n *\n * @api private\n */\n _optionEx(config, flags, description, fn, defaultValue) {\n if (typeof flags === 'object' && flags instanceof Option) {\n throw new Error('To add an Option object use addOption() instead of option() or requiredOption()');\n }\n const option = this.createOption(flags, description);\n option.makeOptionMandatory(!!config.mandatory);\n if (typeof fn === 'function') {\n option.default(defaultValue).argParser(fn);\n } else if (fn instanceof RegExp) {\n // deprecated\n const regex = fn;\n fn = (val, def) => {\n const m = regex.exec(val);\n return m ? m[0] : def;\n };\n option.default(defaultValue).argParser(fn);\n } else {\n option.default(fn);\n }\n\n return this.addOption(option);\n }\n\n /**\n * Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both.\n *\n * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required\n * option-argument is indicated by `<>` and an optional option-argument by `[]`.\n *\n * See the README for more details, and see also addOption() and requiredOption().\n *\n * @example\n * program\n * .option('-p, --pepper', 'add pepper')\n * .option('-p, --pizza-type <TYPE>', 'type of pizza') // required option-argument\n * .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default\n * .option('-t, --tip <VALUE>', 'add tip to purchase cost', parseFloat) // custom parse function\n *\n * @param {string} flags\n * @param {string} [description]\n * @param {Function|*} [parseArg] - custom option processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n\n option(flags, description, parseArg, defaultValue) {\n return this._optionEx({}, flags, description, parseArg, defaultValue);\n }\n\n /**\n * Add a required option which must have a value after parsing. This usually means\n * the option must be specified on the command line. (Otherwise the same as .option().)\n *\n * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.\n *\n * @param {string} flags\n * @param {string} [description]\n * @param {Function|*} [parseArg] - custom option processing function or default value\n * @param {*} [defaultValue]\n * @return {Command} `this` command for chaining\n */\n\n requiredOption(flags, description, parseArg, defaultValue) {\n return this._optionEx({ mandatory: true }, flags, description, parseArg, defaultValue);\n }\n\n /**\n * Alter parsing of short flags with optional values.\n *\n * @example\n * // for `.option('-f,--flag [value]'):\n * program.combineFlagAndOptionalValue(true); // `-f80` is treated like `--flag=80`, this is the default behaviour\n * program.combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`\n *\n * @param {Boolean} [combine=true] - if `true` or omitted, an optional value can be specified directly after the flag.\n */\n combineFlagAndOptionalValue(combine = true) {\n this._combineFlagAndOptionalValue = !!combine;\n return this;\n }\n\n /**\n * Allow unknown options on the command line.\n *\n * @param {Boolean} [allowUnknown=true] - if `true` or omitted, no error will be thrown\n * for unknown options.\n */\n allowUnknownOption(allowUnknown = true) {\n this._allowUnknownOption = !!allowUnknown;\n return this;\n }\n\n /**\n * Allow excess command-arguments on the command line. Pass false to make excess arguments an error.\n *\n * @param {Boolean} [allowExcess=true] - if `true` or omitted, no error will be thrown\n * for excess arguments.\n */\n allowExcessArguments(allowExcess = true) {\n this._allowExcessArguments = !!allowExcess;\n return this;\n }\n\n /**\n * Enable positional options. Positional means global options are specified before subcommands which lets\n * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.\n * The default behaviour is non-positional and global options may appear anywhere on the command line.\n *\n * @param {Boolean} [positional=true]\n */\n enablePositionalOptions(positional = true) {\n this._enablePositionalOptions = !!positional;\n return this;\n }\n\n /**\n * Pass through options that come after command-arguments rather than treat them as command-options,\n * so actual command-options come before command-arguments. Turning this on for a subcommand requires\n * positional options to have been enabled on the program (parent commands).\n * The default behaviour is non-positional and options may appear before or after command-arguments.\n *\n * @param {Boolean} [passThrough=true]\n * for unknown options.\n */\n passThroughOptions(passThrough = true) {\n this._passThroughOptions = !!passThrough;\n if (!!this.parent && passThrough && !this.parent._enablePositionalOptions) {\n throw new Error('passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)');\n }\n return this;\n }\n\n /**\n * Whether to store option values as properties on command object,\n * or store separately (specify false). In both cases the option values can be accessed using .opts().\n *\n * @param {boolean} [storeAsProperties=true]\n * @return {Command} `this` command for chaining\n */\n\n storeOptionsAsProperties(storeAsProperties = true) {\n if (this.options.length) {\n throw new Error('call .storeOptionsAsProperties() before adding options');\n }\n // if (Object.keys(this._optionValues).length) {\n // throw new Error('call .storeOptionsAsProperties() before setting option values');\n // }\n this._storeOptionsAsProperties = !!storeAsProperties;\n return this;\n }\n\n /**\n * Retrieve option value.\n *\n * @param {string} key\n * @return {Object} value\n */\n\n getOptionValue(key) {\n if (this._storeOptionsAsProperties) {\n return this[key];\n }\n return this._optionValues[key];\n }\n\n /**\n * Store option value.\n *\n * @param {string} key\n * @param {Object} value\n * @return {Command} `this` command for chaining\n */\n\n setOptionValue(key, value) {\n return this.setOptionValueWithSource(key, value, undefined);\n }\n\n /**\n * Store option value and where the value came from.\n *\n * @param {string} key\n * @param {Object} value\n * @param {string} source - expected values are default/config/env/cli/implied\n * @return {Command} `this` command for chaining\n */\n\n setOptionValueWithSource(key, value, source) {\n if (this._storeOptionsAsProperties) {\n this[key] = value;\n } else {\n this._optionValues[key] = value;\n }\n this._optionValueSources[key] = source;\n return this;\n }\n\n /**\n * Get source of option value.\n * Expected values are default | config | env | cli | implied\n *\n * @param {string} key\n * @return {string}\n */\n\n getOptionValueSource(key) {\n return this._optionValueSources[key];\n }\n\n /**\n * Get source of option value. See also .optsWithGlobals().\n * Expected values are default | config | env | cli | implied\n *\n * @param {string} key\n * @return {string}\n */\n\n getOptionValueSourceWithGlobals(key) {\n // global overwrites local, like optsWithGlobals\n let source;\n this._getCommandAndAncestors().forEach((cmd) => {\n if (cmd.getOptionValueSource(key) !== undefined) {\n source = cmd.getOptionValueSource(key);\n }\n });\n return source;\n }\n\n /**\n * Get user arguments from implied or explicit arguments.\n * Side-effects: set _scriptPath if args included script. Used for default program name, and subcommand searches.\n *\n * @api private\n */\n\n _prepareUserArgs(argv, parseOptions) {\n if (argv !== undefined && !Array.isArray(argv)) {\n throw new Error('first parameter to parse must be array or undefined');\n }\n parseOptions = parseOptions || {};\n\n // Default to using process.argv\n if (argv === undefined) {\n argv = process.argv;\n // @ts-ignore: unknown property\n if (process.versions && process.versions.electron) {\n parseOptions.from = 'electron';\n }\n }\n this.rawArgs = argv.slice();\n\n // make it a little easier for callers by supporting various argv conventions\n let userArgs;\n switch (parseOptions.from) {\n case undefined:\n case 'node':\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n break;\n case 'electron':\n // @ts-ignore: unknown property\n if (process.defaultApp) {\n this._scriptPath = argv[1];\n userArgs = argv.slice(2);\n } else {\n userArgs = argv.slice(1);\n }\n break;\n case 'user':\n userArgs = argv.slice(0);\n break;\n default:\n throw new Error(`unexpected parse option { from: '${parseOptions.from}' }`);\n }\n\n // Find default name for program from arguments.\n if (!this._name && this._scriptPath) this.nameFromFilename(this._scriptPath);\n this._name = this._name || 'program';\n\n return userArgs;\n }\n\n /**\n * Parse `argv`, setting options and invoking commands when defined.\n *\n * The default expectation is that the arguments are from node and have the application as argv[0]\n * and the script being run in argv[1], with user parameters after that.\n *\n * @example\n * program.parse(process.argv);\n * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions\n * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n *\n * @param {string[]} [argv] - optional, defaults to process.argv\n * @param {Object} [parseOptions] - optionally specify style of options with from: node/user/electron\n * @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron'\n * @return {Command} `this` command for chaining\n */\n\n parse(argv, parseOptions) {\n const userArgs = this._prepareUserArgs(argv, parseOptions);\n this._parseCommand([], userArgs);\n\n return this;\n }\n\n /**\n * Parse `argv`, setting options and invoking commands when defined.\n *\n * Use parseAsync instead of parse if any of your action handlers are async. Returns a Promise.\n *\n * The default expectation is that the arguments are from node and have the application as argv[0]\n * and the script being run in argv[1], with user parameters after that.\n *\n * @example\n * await program.parseAsync(process.argv);\n * await program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions\n * await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]\n *\n * @param {string[]} [argv]\n * @param {Object} [parseOptions]\n * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron'\n * @return {Promise}\n */\n\n async parseAsync(argv, parseOptions) {\n const userArgs = this._prepareUserArgs(argv, parseOptions);\n await this._parseCommand([], userArgs);\n\n return this;\n }\n\n /**\n * Execute a sub-command executable.\n *\n * @api private\n */\n\n _executeSubCommand(subcommand, args) {\n args = args.slice();\n let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.\n const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs'];\n\n function findFile(baseDir, baseName) {\n // Look for specified file\n const localBin = path.resolve(baseDir, baseName);\n if (fs.existsSync(localBin)) return localBin;\n\n // Stop looking if candidate already has an expected extension.\n if (sourceExt.includes(path.extname(baseName))) return undefined;\n\n // Try all the extensions.\n const foundExt = sourceExt.find(ext => fs.existsSync(`${localBin}${ext}`));\n if (foundExt) return `${localBin}${foundExt}`;\n\n return undefined;\n }\n\n // Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.\n this._checkForMissingMandatoryOptions();\n this._checkForConflictingOptions();\n\n // executableFile and executableDir might be full path, or just a name\n let executableFile = subcommand._executableFile || `${this._name}-${subcommand._name}`;\n let executableDir = this._executableDir || '';\n if (this._scriptPath) {\n let resolvedScriptPath; // resolve possible symlink for installed npm binary\n try {\n resolvedScriptPath = fs.realpathSync(this._scriptPath);\n } catch (err) {\n resolvedScriptPath = this._scriptPath;\n }\n executableDir = path.resolve(path.dirname(resolvedScriptPath), executableDir);\n }\n\n // Look for a local file in preference to a command in PATH.\n if (executableDir) {\n let localFile = findFile(executableDir, executableFile);\n\n // Legacy search using prefix of script name instead of command name\n if (!localFile && !subcommand._executableFile && this._scriptPath) {\n const legacyName = path.basename(this._scriptPath, path.extname(this._scriptPath));\n if (legacyName !== this._name) {\n localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);\n }\n }\n executableFile = localFile || executableFile;\n }\n\n launchWithNode = sourceExt.includes(path.extname(executableFile));\n\n let proc;\n if (process.platform !== 'win32') {\n if (launchWithNode) {\n args.unshift(executableFile);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n\n proc = childProcess.spawn(process.argv[0], args, { stdio: 'inherit' });\n } else {\n proc = childProcess.spawn(executableFile, args, { stdio: 'inherit' });\n }\n } else {\n args.unshift(executableFile);\n // add executable arguments to spawn\n args = incrementNodeInspectorPort(process.execArgv).concat(args);\n proc = childProcess.spawn(process.execPath, args, { stdio: 'inherit' });\n }\n\n if (!proc.killed) { // testing mainly to avoid leak warnings during unit tests with mocked spawn\n const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP'];\n signals.forEach((signal) => {\n // @ts-ignore\n process.on(signal, () => {\n if (proc.killed === false && proc.exitCode === null) {\n proc.kill(signal);\n }\n });\n });\n }\n\n // By default terminate process when spawned process terminates.\n // Suppressing the exit if exitCallback defined is a bit messy and of limited use, but does allow process to stay running!\n const exitCallback = this._exitCallback;\n if (!exitCallback) {\n proc.on('close', process.exit.bind(process));\n } else {\n proc.on('close', () => {\n exitCallback(new CommanderError(process.exitCode || 0, 'commander.executeSubCommandAsync', '(close)'));\n });\n }\n proc.on('error', (err) => {\n // @ts-ignore\n if (err.code === 'ENOENT') {\n const executableDirMessage = executableDir\n ? `searched for local subcommand relative to directory '${executableDir}'`\n : 'no directory for search for local subcommand, use .executableDir() to supply a custom directory';\n const executableMissing = `'${executableFile}' does not exist\n - if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${executableDirMessage}`;\n throw new Error(executableMissing);\n // @ts-ignore\n } else if (err.code === 'EACCES') {\n throw new Error(`'${executableFile}' not executable`);\n }\n if (!exitCallback) {\n process.exit(1);\n } else {\n const wrappedError = new CommanderError(1, 'commander.executeSubCommandAsync', '(error)');\n wrappedError.nestedError = err;\n exitCallback(wrappedError);\n }\n });\n\n // Store the reference to the child process\n this.runningCommand = proc;\n }\n\n /**\n * @api private\n */\n\n _dispatchSubcommand(commandName, operands, unknown) {\n const subCommand = this._findCommand(commandName);\n if (!subCommand) this.help({ error: true });\n\n let promiseChain;\n promiseChain = this._chainOrCallSubCommandHook(promiseChain, subCommand, 'preSubcommand');\n promiseChain = this._chainOrCall(promiseChain, () => {\n if (subCommand._executableHandler) {\n this._executeSubCommand(subCommand, operands.concat(unknown));\n } else {\n return subCommand._parseCommand(operands, unknown);\n }\n });\n return promiseChain;\n }\n\n /**\n * Invoke help directly if possible, or dispatch if necessary.\n * e.g. help foo\n *\n * @api private\n */\n\n _dispatchHelpCommand(subcommandName) {\n if (!subcommandName) {\n this.help();\n }\n const subCommand = this._findCommand(subcommandName);\n if (subCommand && !subCommand._executableHandler) {\n subCommand.help();\n }\n\n // Fallback to parsing the help flag to invoke the help.\n return this._dispatchSubcommand(subcommandName, [], [\n this._helpLongFlag || this._helpShortFlag\n ]);\n }\n\n /**\n * Check this.args against expected this.registeredArguments.\n *\n * @api private\n */\n\n _checkNumberOfArguments() {\n // too few\n this.registeredArguments.forEach((arg, i) => {\n if (arg.required && this.args[i] == null) {\n this.missingArgument(arg.name());\n }\n });\n // too many\n if (this.registeredArguments.length > 0 && this.registeredArguments[this.registeredArguments.length - 1].variadic) {\n return;\n }\n if (this.args.length > this.registeredArguments.length) {\n this._excessArguments(this.args);\n }\n }\n\n /**\n * Process this.args using this.registeredArguments and save as this.processedArgs!\n *\n * @api private\n */\n\n _processArguments() {\n const myParseArg = (argument, value, previous) => {\n // Extra processing for nice error message on parsing failure.\n let parsedValue = value;\n if (value !== null && argument.parseArg) {\n const invalidValueMessage = `error: command-argument value '${value}' is invalid for argument '${argument.name()}'.`;\n parsedValue = this._callParseArg(argument, value, previous, invalidValueMessage);\n }\n return parsedValue;\n };\n\n this._checkNumberOfArguments();\n\n const processedArgs = [];\n this.registeredArguments.forEach((declaredArg, index) => {\n let value = declaredArg.defaultValue;\n if (declaredArg.variadic) {\n // Collect together remaining arguments for passing together as an array.\n if (index < this.args.length) {\n value = this.args.slice(index);\n if (declaredArg.parseArg) {\n value = value.reduce((processed, v) => {\n return myParseArg(declaredArg, v, processed);\n }, declaredArg.defaultValue);\n }\n } else if (value === undefined) {\n value = [];\n }\n } else if (index < this.args.length) {\n value = this.args[index];\n if (declaredArg.parseArg) {\n value = myParseArg(declaredArg, value, declaredArg.defaultValue);\n }\n }\n processedArgs[index] = value;\n });\n this.processedArgs = processedArgs;\n }\n\n /**\n * Once we have a promise we chain, but call synchronously until then.\n *\n * @param {Promise|undefined} promise\n * @param {Function} fn\n * @return {Promise|undefined}\n * @api private\n */\n\n _chainOrCall(promise, fn) {\n // thenable\n if (promise && promise.then && typeof promise.then === 'function') {\n // already have a promise, chain callback\n return promise.then(() => fn());\n }\n // callback might return a promise\n return fn();\n }\n\n /**\n *\n * @param {Promise|undefined} promise\n * @param {string} event\n * @return {Promise|undefined}\n * @api private\n */\n\n _chainOrCallHooks(promise, event) {\n let result = promise;\n const hooks = [];\n this._getCommandAndAncestors()\n .reverse()\n .filter(cmd => cmd._lifeCycleHooks[event] !== undefined)\n .forEach(hookedCommand => {\n hookedCommand._lifeCycleHooks[event].forEach((callback) => {\n hooks.push({ hookedCommand, callback });\n });\n });\n if (event === 'postAction') {\n hooks.reverse();\n }\n\n hooks.forEach((hookDetail) => {\n result = this._chainOrCall(result, () => {\n return hookDetail.callback(hookDetail.hookedCommand, this);\n });\n });\n return result;\n }\n\n /**\n *\n * @param {Promise|undefined} promise\n * @param {Command} subCommand\n * @param {string} event\n * @return {Promise|undefined}\n * @api private\n */\n\n _chainOrCallSubCommandHook(promise, subCommand, event) {\n let result = promise;\n if (this._lifeCycleHooks[event] !== undefined) {\n this._lifeCycleHooks[event].forEach((hook) => {\n result = this._chainOrCall(result, () => {\n return hook(this, subCommand);\n });\n });\n }\n return result;\n }\n\n /**\n * Process arguments in context of this command.\n * Returns action result, in case it is a promise.\n *\n * @api private\n */\n\n _parseCommand(operands, unknown) {\n const parsed = this.parseOptions(unknown);\n this._parseOptionsEnv(); // after cli, so parseArg not called on both cli and env\n this._parseOptionsImplied();\n operands = operands.concat(parsed.operands);\n unknown = parsed.unknown;\n this.args = operands.concat(unknown);\n\n if (operands && this._findCommand(operands[0])) {\n return this._dispatchSubcommand(operands[0], operands.slice(1), unknown);\n }\n if (this._hasImplicitHelpCommand() && operands[0] === this._helpCommandName) {\n return this._dispatchHelpCommand(operands[1]);\n }\n if (this._defaultCommandName) {\n outputHelpIfRequested(this, unknown); // Run the help for default command from parent rather than passing to default command\n return this._dispatchSubcommand(this._defaultCommandName, operands, unknown);\n }\n if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) {\n // probably missing subcommand and no handler, user needs help (and exit)\n this.help({ error: true });\n }\n\n outputHelpIfRequested(this, parsed.unknown);\n this._checkForMissingMandatoryOptions();\n this._checkForConflictingOptions();\n\n // We do not always call this check to avoid masking a \"better\" error, like unknown command.\n const checkForUnknownOptions = () => {\n if (parsed.unknown.length > 0) {\n this.unknownOption(parsed.unknown[0]);\n }\n };\n\n const commandEvent = `command:${this.name()}`;\n if (this._actionHandler) {\n checkForUnknownOptions();\n this._processArguments();\n\n let promiseChain;\n promiseChain = this._chainOrCallHooks(promiseChain, 'preAction');\n promiseChain = this._chainOrCall(promiseChain, () => this._actionHandler(this.processedArgs));\n if (this.parent) {\n promiseChain = this._chainOrCall(promiseChain, () => {\n this.parent.emit(commandEvent, operands, unknown); // legacy\n });\n }\n promiseChain = this._chainOrCallHooks(promiseChain, 'postAction');\n return promiseChain;\n }\n if (this.parent && this.parent.listenerCount(commandEvent)) {\n checkForUnknownOptions();\n this._processArguments();\n this.parent.emit(commandEvent, operands, unknown); // legacy\n } else if (operands.length) {\n if (this._findCommand('*')) { // legacy default command\n return this._dispatchSubcommand('*', operands, unknown);\n }\n if (this.listenerCount('command:*')) {\n // skip option check, emit event for possible misspelling suggestion\n this.emit('command:*', operands, unknown);\n } else if (this.commands.length) {\n this.unknownCommand();\n } else {\n checkForUnknownOptions();\n this._processArguments();\n }\n } else if (this.commands.length) {\n checkForUnknownOptions();\n // This command has subcommands and nothing hooked up at this level, so display help (and exit).\n this.help({ error: true });\n } else {\n checkForUnknownOptions();\n this._processArguments();\n // fall through for caller to handle after calling .parse()\n }\n }\n\n /**\n * Find matching command.\n *\n * @api private\n */\n _findCommand(name) {\n if (!name) return undefined;\n return this.commands.find(cmd => cmd._name === name || cmd._aliases.includes(name));\n }\n\n /**\n * Return an option matching `arg` if any.\n *\n * @param {string} arg\n * @return {Option}\n * @api private\n */\n\n _findOption(arg) {\n return this.options.find(option => option.is(arg));\n }\n\n /**\n * Display an error message if a mandatory option does not have a value.\n * Called after checking for help flags in leaf subcommand.\n *\n * @api private\n */\n\n _checkForMissingMandatoryOptions() {\n // Walk up hierarchy so can call in subcommand after checking for displaying help.\n this._getCommandAndAncestors().forEach((cmd) => {\n cmd.options.forEach((anOption) => {\n if (anOption.mandatory && (cmd.getOptionValue(anOption.attributeName()) === undefined)) {\n cmd.missingMandatoryOptionValue(anOption);\n }\n });\n });\n }\n\n /**\n * Display an error message if conflicting options are used together in this.\n *\n * @api private\n */\n _checkForConflictingLocalOptions() {\n const definedNonDefaultOptions = this.options.filter(\n (option) => {\n const optionKey = option.attributeName();\n if (this.getOptionValue(optionKey) === undefined) {\n return false;\n }\n return this.getOptionValueSource(optionKey) !== 'default';\n }\n );\n\n const optionsWithConflicting = definedNonDefaultOptions.filter(\n (option) => option.conflictsWith.length > 0\n );\n\n optionsWithConflicting.forEach((option) => {\n const conflictingAndDefined = definedNonDefaultOptions.find((defined) =>\n option.conflictsWith.includes(defined.attributeName())\n );\n if (conflictingAndDefined) {\n this._conflictingOption(option, conflictingAndDefined);\n }\n });\n }\n\n /**\n * Display an error message if conflicting options are used together.\n * Called after checking for help flags in leaf subcommand.\n *\n * @api private\n */\n _checkForConflictingOptions() {\n // Walk up hierarchy so can call in subcommand after checking for displaying help.\n this._getCommandAndAncestors().forEach((cmd) => {\n cmd._checkForConflictingLocalOptions();\n });\n }\n\n /**\n * Parse options from `argv` removing known options,\n * and return argv split into operands and unknown arguments.\n *\n * Examples:\n *\n * argv => operands, unknown\n * --known kkk op => [op], []\n * op --known kkk => [op], []\n * sub --unknown uuu op => [sub], [--unknown uuu op]\n * sub -- --unknown uuu op => [sub --unknown uuu op], []\n *\n * @param {String[]} argv\n * @return {{operands: String[], unknown: String[]}}\n */\n\n parseOptions(argv) {\n const operands = []; // operands, not options or values\n const unknown = []; // first unknown option and remaining unknown args\n let dest = operands;\n const args = argv.slice();\n\n function maybeOption(arg) {\n return arg.length > 1 && arg[0] === '-';\n }\n\n // parse options\n let activeVariadicOption = null;\n while (args.length) {\n const arg = args.shift();\n\n // literal\n if (arg === '--') {\n if (dest === unknown) dest.push(arg);\n dest.push(...args);\n break;\n }\n\n if (activeVariadicOption && !maybeOption(arg)) {\n this.emit(`option:${activeVariadicOption.name()}`, arg);\n continue;\n }\n activeVariadicOption = null;\n\n if (maybeOption(arg)) {\n const option = this._findOption(arg);\n // recognised option, call listener to assign value with possible custom processing\n if (option) {\n if (option.required) {\n const value = args.shift();\n if (value === undefined) this.optionMissingArgument(option);\n this.emit(`option:${option.name()}`, value);\n } else if (option.optional) {\n let value = null;\n // historical behaviour is optional value is following arg unless an option\n if (args.length > 0 && !maybeOption(args[0])) {\n value = args.shift();\n }\n this.emit(`option:${option.name()}`, value);\n } else { // boolean flag\n this.emit(`option:${option.name()}`);\n }\n activeVariadicOption = option.variadic ? option : null;\n continue;\n }\n }\n\n // Look for combo options following single dash, eat first one if known.\n if (arg.length > 2 && arg[0] === '-' && arg[1] !== '-') {\n const option = this._findOption(`-${arg[1]}`);\n if (option) {\n if (option.required || (option.optional && this._combineFlagAndOptionalValue)) {\n // option with value following in same argument\n this.emit(`option:${option.name()}`, arg.slice(2));\n } else {\n // boolean option, emit and put back remainder of arg for further processing\n this.emit(`option:${option.name()}`);\n args.unshift(`-${arg.slice(2)}`);\n }\n continue;\n }\n }\n\n // Look for known long flag with value, like --foo=bar\n if (/^--[^=]+=/.test(arg)) {\n const index = arg.indexOf('=');\n const option = this._findOption(arg.slice(0, index));\n if (option && (option.required || option.optional)) {\n this.emit(`option:${option.name()}`, arg.slice(index + 1));\n continue;\n }\n }\n\n // Not a recognised option by this command.\n // Might be a command-argument, or subcommand option, or unknown option, or help command or option.\n\n // An unknown option means further arguments also classified as unknown so can be reprocessed by subcommands.\n if (maybeOption(arg)) {\n dest = unknown;\n }\n\n // If using positionalOptions, stop processing our options at subcommand.\n if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown.length === 0) {\n if (this._findCommand(arg)) {\n operands.push(arg);\n if (args.length > 0) unknown.push(...args);\n break;\n } else if (arg === this._helpCommandName && this._hasImplicitHelpCommand()) {\n operands.push(arg);\n if (args.length > 0) operands.push(...args);\n break;\n } else if (this._defaultCommandName) {\n unknown.push(arg);\n if (args.length > 0) unknown.push(...args);\n break;\n }\n }\n\n // If using passThroughOptions, stop processing options at first command-argument.\n if (this._passThroughOptions) {\n dest.push(arg);\n if (args.length > 0) dest.push(...args);\n break;\n }\n\n // add arg\n dest.push(arg);\n }\n\n return { operands, unknown };\n }\n\n /**\n * Return an object containing local option values as key-value pairs.\n *\n * @return {Object}\n */\n opts() {\n if (this._storeOptionsAsProperties) {\n // Preserve original behaviour so backwards compatible when still using properties\n const result = {};\n const len = this.options.length;\n\n for (let i = 0; i < len; i++) {\n const key = this.options[i].attributeName();\n result[key] = key === this._versionOptionName ? this._version : this[key];\n }\n return result;\n }\n\n return this._optionValues;\n }\n\n /**\n * Return an object containing merged local and global option values as key-value pairs.\n *\n * @return {Object}\n */\n optsWithGlobals() {\n // globals overwrite locals\n return this._getCommandAndAncestors().reduce(\n (combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()),\n {}\n );\n }\n\n /**\n * Display error message and exit (or call exitOverride).\n *\n * @param {string} message\n * @param {Object} [errorOptions]\n * @param {string} [errorOptions.code] - an id string representing the error\n * @param {number} [errorOptions.exitCode] - used with process.exit\n */\n error(message, errorOptions) {\n // output handling\n this._outputConfiguration.outputError(`${message}\\n`, this._outputConfiguration.writeErr);\n if (typeof this._showHelpAfterError === 'string') {\n this._outputConfiguration.writeErr(`${this._showHelpAfterError}\\n`);\n } else if (this._showHelpAfterError) {\n this._outputConfiguration.writeErr('\\n');\n this.outputHelp({ error: true });\n }\n\n // exit handling\n const config = errorOptions || {};\n const exitCode = config.exitCode || 1;\n const code = config.code || 'commander.error';\n this._exit(exitCode, code, message);\n }\n\n /**\n * Apply any option related environment variables, if option does\n * not have a value from cli or client code.\n *\n * @api private\n */\n _parseOptionsEnv() {\n this.options.forEach((option) => {\n if (option.envVar && option.envVar in process.env) {\n const optionKey = option.attributeName();\n // Priority check. Do not overwrite cli or options from unknown source (client-code).\n if (this.getOptionValue(optionKey) === undefined || ['default', 'config', 'env'].includes(this.getOptionValueSource(optionKey))) {\n if (option.required || option.optional) { // option can take a value\n // keep very simple, optional always takes value\n this.emit(`optionEnv:${option.name()}`, process.env[option.envVar]);\n } else { // boolean\n // keep very simple, only care that envVar defined and not the value\n this.emit(`optionEnv:${option.name()}`);\n }\n }\n }\n });\n }\n\n /**\n * Apply any implied option values, if option is undefined or default value.\n *\n * @api private\n */\n _parseOptionsImplied() {\n const dualHelper = new DualOptions(this.options);\n const hasCustomOptionValue = (optionKey) => {\n return this.getOptionValue(optionKey) !== undefined && !['default', 'implied'].includes(this.getOptionValueSource(optionKey));\n };\n this.options\n .filter(option => (option.implied !== undefined) &&\n hasCustomOptionValue(option.attributeName()) &&\n dualHelper.valueFromOption(this.getOptionValue(option.attributeName()), option))\n .forEach((option) => {\n Object.keys(option.implied)\n .filter(impliedKey => !hasCustomOptionValue(impliedKey))\n .forEach(impliedKey => {\n this.setOptionValueWithSource(impliedKey, option.implied[impliedKey], 'implied');\n });\n });\n }\n\n /**\n * Argument `name` is missing.\n *\n * @param {string} name\n * @api private\n */\n\n missingArgument(name) {\n const message = `error: missing required argument '${name}'`;\n this.error(message, { code: 'commander.missingArgument' });\n }\n\n /**\n * `Option` is missing an argument.\n *\n * @param {Option} option\n * @api private\n */\n\n optionMissingArgument(option) {\n const message = `error: option '${option.flags}' argument missing`;\n this.error(message, { code: 'commander.optionMissingArgument' });\n }\n\n /**\n * `Option` does not have a value, and is a mandatory option.\n *\n * @param {Option} option\n * @api private\n */\n\n missingMandatoryOptionValue(option) {\n const message = `error: required option '${option.flags}' not specified`;\n this.error(message, { code: 'commander.missingMandatoryOptionValue' });\n }\n\n /**\n * `Option` conflicts with another option.\n *\n * @param {Option} option\n * @param {Option} conflictingOption\n * @api private\n */\n _conflictingOption(option, conflictingOption) {\n // The calling code does not know whether a negated option is the source of the\n // value, so do some work to take an educated guess.\n const findBestOptionFromValue = (option) => {\n const optionKey = option.attributeName();\n const optionValue = this.getOptionValue(optionKey);\n const negativeOption = this.options.find(target => target.negate && optionKey === target.attributeName());\n const positiveOption = this.options.find(target => !target.negate && optionKey === target.attributeName());\n if (negativeOption && (\n (negativeOption.presetArg === undefined && optionValue === false) ||\n (negativeOption.presetArg !== undefined && optionValue === negativeOption.presetArg)\n )) {\n return negativeOption;\n }\n return positiveOption || option;\n };\n\n const getErrorMessage = (option) => {\n const bestOption = findBestOptionFromValue(option);\n const optionKey = bestOption.attributeName();\n const source = this.getOptionValueSource(optionKey);\n if (source === 'env') {\n return `environment variable '${bestOption.envVar}'`;\n }\n return `option '${bestOption.flags}'`;\n };\n\n const message = `error: ${getErrorMessage(option)} cannot be used with ${getErrorMessage(conflictingOption)}`;\n this.error(message, { code: 'commander.conflictingOption' });\n }\n\n /**\n * Unknown option `flag`.\n *\n * @param {string} flag\n * @api private\n */\n\n unknownOption(flag) {\n if (this._allowUnknownOption) return;\n let suggestion = '';\n\n if (flag.startsWith('--') && this._showSuggestionAfterError) {\n // Looping to pick up the global options too\n let candidateFlags = [];\n let command = this;\n do {\n const moreFlags = command.createHelp().visibleOptions(command)\n .filter(option => option.long)\n .map(option => option.long);\n candidateFlags = candidateFlags.concat(moreFlags);\n command = command.parent;\n } while (command && !command._enablePositionalOptions);\n suggestion = suggestSimilar(flag, candidateFlags);\n }\n\n const message = `error: unknown option '${flag}'${suggestion}`;\n this.error(message, { code: 'commander.unknownOption' });\n }\n\n /**\n * Excess arguments, more than expected.\n *\n * @param {string[]} receivedArgs\n * @api private\n */\n\n _excessArguments(receivedArgs) {\n if (this._allowExcessArguments) return;\n\n const expected = this.registeredArguments.length;\n const s = (expected === 1) ? '' : 's';\n const forSubcommand = this.parent ? ` for '${this.name()}'` : '';\n const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`;\n this.error(message, { code: 'commander.excessArguments' });\n }\n\n /**\n * Unknown command.\n *\n * @api private\n */\n\n unknownCommand() {\n const unknownName = this.args[0];\n let suggestion = '';\n\n if (this._showSuggestionAfterError) {\n const candidateNames = [];\n this.createHelp().visibleCommands(this).forEach((command) => {\n candidateNames.push(command.name());\n // just visible alias\n if (command.alias()) candidateNames.push(command.alias());\n });\n suggestion = suggestSimilar(unknownName, candidateNames);\n }\n\n const message = `error: unknown command '${unknownName}'${suggestion}`;\n this.error(message, { code: 'commander.unknownCommand' });\n }\n\n /**\n * Get or set the program version.\n *\n * This method auto-registers the \"-V, --version\" option which will print the version number.\n *\n * You can optionally supply the flags and description to override the defaults.\n *\n * @param {string} [str]\n * @param {string} [flags]\n * @param {string} [description]\n * @return {this | string | undefined} `this` command for chaining, or version string if no arguments\n */\n\n version(str, flags, description) {\n if (str === undefined) return this._version;\n this._version = str;\n flags = flags || '-V, --version';\n description = description || 'output the version number';\n const versionOption = this.createOption(flags, description);\n this._versionOptionName = versionOption.attributeName(); // [sic] not defined in constructor, partly legacy, partly only needed at root\n this.options.push(versionOption);\n this.on('option:' + versionOption.name(), () => {\n this._outputConfiguration.writeOut(`${str}\\n`);\n this._exit(0, 'commander.version', str);\n });\n return this;\n }\n\n /**\n * Set the description.\n *\n * @param {string} [str]\n * @param {Object} [argsDescription]\n * @return {string|Command}\n */\n description(str, argsDescription) {\n if (str === undefined && argsDescription === undefined) return this._description;\n this._description = str;\n if (argsDescription) {\n this._argsDescription = argsDescription;\n }\n return this;\n }\n\n /**\n * Set the summary. Used when listed as subcommand of parent.\n *\n * @param {string} [str]\n * @return {string|Command}\n */\n summary(str) {\n if (str === undefined) return this._summary;\n this._summary = str;\n return this;\n }\n\n /**\n * Set an alias for the command.\n *\n * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.\n *\n * @param {string} [alias]\n * @return {string|Command}\n */\n\n alias(alias) {\n if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility\n\n /** @type {Command} */\n let command = this;\n if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) {\n // assume adding alias for last added executable subcommand, rather than this\n command = this.commands[this.commands.length - 1];\n }\n\n if (alias === command._name) throw new Error('Command alias can\\'t be the same as its name');\n\n command._aliases.push(alias);\n return this;\n }\n\n /**\n * Set aliases for the command.\n *\n * Only the first alias is shown in the auto-generated help.\n *\n * @param {string[]} [aliases]\n * @return {string[]|Command}\n */\n\n aliases(aliases) {\n // Getter for the array of aliases is the main reason for having aliases() in addition to alias().\n if (aliases === undefined) return this._aliases;\n\n aliases.forEach((alias) => this.alias(alias));\n return this;\n }\n\n /**\n * Set / get the command usage `str`.\n *\n * @param {string} [str]\n * @return {String|Command}\n */\n\n usage(str) {\n if (str === undefined) {\n if (this._usage) return this._usage;\n\n const args = this.registeredArguments.map((arg) => {\n return humanReadableArgName(arg);\n });\n return [].concat(\n (this.options.length || this._hasHelpOption ? '[options]' : []),\n (this.commands.length ? '[command]' : []),\n (this.registeredArguments.length ? args : [])\n ).join(' ');\n }\n\n this._usage = str;\n return this;\n }\n\n /**\n * Get or set the name of the command.\n *\n * @param {string} [str]\n * @return {string|Command}\n */\n\n name(str) {\n if (str === undefined) return this._name;\n this._name = str;\n return this;\n }\n\n /**\n * Set the name of the command from script filename, such as process.argv[1],\n * or require.main.filename, or __filename.\n *\n * (Used internally and public although not documented in README.)\n *\n * @example\n * program.nameFromFilename(require.main.filename);\n *\n * @param {string} filename\n * @return {Command}\n */\n\n nameFromFilename(filename) {\n this._name = path.basename(filename, path.extname(filename));\n\n return this;\n }\n\n /**\n * Get or set the directory for searching for executable subcommands of this command.\n *\n * @example\n * program.executableDir(__dirname);\n * // or\n * program.executableDir('subcommands');\n *\n * @param {string} [path]\n * @return {string|null|Command}\n */\n\n executableDir(path) {\n if (path === undefined) return this._executableDir;\n this._executableDir = path;\n return this;\n }\n\n /**\n * Return program help documentation.\n *\n * @param {{ error: boolean }} [contextOptions] - pass {error:true} to wrap for stderr instead of stdout\n * @return {string}\n */\n\n helpInformation(contextOptions) {\n const helper = this.createHelp();\n if (helper.helpWidth === undefined) {\n helper.helpWidth = (contextOptions && contextOptions.error) ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth();\n }\n return helper.formatHelp(this, helper);\n }\n\n /**\n * @api private\n */\n\n _getHelpContext(contextOptions) {\n contextOptions = contextOptions || {};\n const context = { error: !!contextOptions.error };\n let write;\n if (context.error) {\n write = (arg) => this._outputConfiguration.writeErr(arg);\n } else {\n write = (arg) => this._outputConfiguration.writeOut(arg);\n }\n context.write = contextOptions.write || write;\n context.command = this;\n return context;\n }\n\n /**\n * Output help information for this command.\n *\n * Outputs built-in help, and custom text added using `.addHelpText()`.\n *\n * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n */\n\n outputHelp(contextOptions) {\n let deprecatedCallback;\n if (typeof contextOptions === 'function') {\n deprecatedCallback = contextOptions;\n contextOptions = undefined;\n }\n const context = this._getHelpContext(contextOptions);\n\n this._getCommandAndAncestors().reverse().forEach(command => command.emit('beforeAllHelp', context));\n this.emit('beforeHelp', context);\n\n let helpInformation = this.helpInformation(context);\n if (deprecatedCallback) {\n helpInformation = deprecatedCallback(helpInformation);\n if (typeof helpInformation !== 'string' && !Buffer.isBuffer(helpInformation)) {\n throw new Error('outputHelp callback must return a string or a Buffer');\n }\n }\n context.write(helpInformation);\n\n if (this._helpLongFlag) {\n this.emit(this._helpLongFlag); // deprecated\n }\n this.emit('afterHelp', context);\n this._getCommandAndAncestors().forEach(command => command.emit('afterAllHelp', context));\n }\n\n /**\n * You can pass in flags and a description to override the help\n * flags and help description for your command. Pass in false to\n * disable the built-in help option.\n *\n * @param {string | boolean} [flags]\n * @param {string} [description]\n * @return {Command} `this` command for chaining\n */\n\n helpOption(flags, description) {\n if (typeof flags === 'boolean') {\n this._hasHelpOption = flags;\n return this;\n }\n this._helpFlags = flags || this._helpFlags;\n this._helpDescription = description || this._helpDescription;\n\n const helpFlags = splitOptionFlags(this._helpFlags);\n this._helpShortFlag = helpFlags.shortFlag;\n this._helpLongFlag = helpFlags.longFlag;\n\n return this;\n }\n\n /**\n * Output help information and exit.\n *\n * Outputs built-in help, and custom text added using `.addHelpText()`.\n *\n * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout\n */\n\n help(contextOptions) {\n this.outputHelp(contextOptions);\n let exitCode = process.exitCode || 0;\n if (exitCode === 0 && contextOptions && typeof contextOptions !== 'function' && contextOptions.error) {\n exitCode = 1;\n }\n // message: do not have all displayed text available so only passing placeholder.\n this._exit(exitCode, 'commander.help', '(outputHelp)');\n }\n\n /**\n * Add additional text to be displayed with the built-in help.\n *\n * Position is 'before' or 'after' to affect just this command,\n * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.\n *\n * @param {string} position - before or after built-in help\n * @param {string | Function} text - string to add, or a function returning a string\n * @return {Command} `this` command for chaining\n */\n addHelpText(position, text) {\n const allowedValues = ['beforeAll', 'before', 'after', 'afterAll'];\n if (!allowedValues.includes(position)) {\n throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${allowedValues.join(\"', '\")}'`);\n }\n const helpEvent = `${position}Help`;\n this.on(helpEvent, (context) => {\n let helpStr;\n if (typeof text === 'function') {\n helpStr = text({ error: context.error, command: context.command });\n } else {\n helpStr = text;\n }\n // Ignore falsy value when nothing to output.\n if (helpStr) {\n context.write(`${helpStr}\\n`);\n }\n });\n return this;\n }\n}\n\n/**\n * Output help information if help flags specified\n *\n * @param {Command} cmd - command to output help for\n * @param {Array} args - array of options to search for help flags\n * @api private\n */\n\nfunction outputHelpIfRequested(cmd, args) {\n const helpOption = cmd._hasHelpOption && args.find(arg => arg === cmd._helpLongFlag || arg === cmd._helpShortFlag);\n if (helpOption) {\n cmd.outputHelp();\n // (Do not have all displayed text available so only passing placeholder.)\n cmd._exit(0, 'commander.helpDisplayed', '(outputHelp)');\n }\n}\n\n/**\n * Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command).\n *\n * @param {string[]} args - array of arguments from node.execArgv\n * @returns {string[]}\n * @api private\n */\n\nfunction incrementNodeInspectorPort(args) {\n // Testing for these options:\n // --inspect[=[host:]port]\n // --inspect-brk[=[host:]port]\n // --inspect-port=[host:]port\n return args.map((arg) => {\n if (!arg.startsWith('--inspect')) {\n return arg;\n }\n let debugOption;\n let debugHost = '127.0.0.1';\n let debugPort = '9229';\n let match;\n if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {\n // e.g. --inspect\n debugOption = match[1];\n } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {\n debugOption = match[1];\n if (/^\\d+$/.test(match[3])) {\n // e.g. --inspect=1234\n debugPort = match[3];\n } else {\n // e.g. --inspect=localhost\n debugHost = match[3];\n }\n } else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\\d+)$/)) !== null) {\n // e.g. --inspect=localhost:1234\n debugOption = match[1];\n debugHost = match[3];\n debugPort = match[4];\n }\n\n if (debugOption && debugPort !== '0') {\n return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;\n }\n return arg;\n });\n}\n\nexports.Command = Command;\n","/**\n * CommanderError class\n * @class\n */\nclass CommanderError extends Error {\n /**\n * Constructs the CommanderError class\n * @param {number} exitCode suggested exit code which could be used with process.exit\n * @param {string} code an id string representing the error\n * @param {string} message human-readable description of the error\n * @constructor\n */\n constructor(exitCode, code, message) {\n super(message);\n // properly capture stack trace in Node.js\n Error.captureStackTrace(this, this.constructor);\n this.name = this.constructor.name;\n this.code = code;\n this.exitCode = exitCode;\n this.nestedError = undefined;\n }\n}\n\n/**\n * InvalidArgumentError class\n * @class\n */\nclass InvalidArgumentError extends CommanderError {\n /**\n * Constructs the InvalidArgumentError class\n * @param {string} [message] explanation of why argument is invalid\n * @constructor\n */\n constructor(message) {\n super(1, 'commander.invalidArgument', message);\n // properly capture stack trace in Node.js\n Error.captureStackTrace(this, this.constructor);\n this.name = this.constructor.name;\n }\n}\n\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\n","const { humanReadableArgName } = require('./argument.js');\n\n/**\n * TypeScript import types for JSDoc, used by Visual Studio Code IntelliSense and `npm run typescript-checkJS`\n * https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#import-types\n * @typedef { import(\"./argument.js\").Argument } Argument\n * @typedef { import(\"./command.js\").Command } Command\n * @typedef { import(\"./option.js\").Option } Option\n */\n\n// Although this is a class, methods are static in style to allow override using subclass or just functions.\nclass Help {\n constructor() {\n this.helpWidth = undefined;\n this.sortSubcommands = false;\n this.sortOptions = false;\n this.showGlobalOptions = false;\n }\n\n /**\n * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.\n *\n * @param {Command} cmd\n * @returns {Command[]}\n */\n\n visibleCommands(cmd) {\n const visibleCommands = cmd.commands.filter(cmd => !cmd._hidden);\n if (cmd._hasImplicitHelpCommand()) {\n // Create a command matching the implicit help command.\n const [, helpName, helpArgs] = cmd._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/);\n const helpCommand = cmd.createCommand(helpName)\n .helpOption(false);\n helpCommand.description(cmd._helpCommandDescription);\n if (helpArgs) helpCommand.arguments(helpArgs);\n visibleCommands.push(helpCommand);\n }\n if (this.sortSubcommands) {\n visibleCommands.sort((a, b) => {\n // @ts-ignore: overloaded return type\n return a.name().localeCompare(b.name());\n });\n }\n return visibleCommands;\n }\n\n /**\n * Compare options for sort.\n *\n * @param {Option} a\n * @param {Option} b\n * @returns number\n */\n compareOptions(a, b) {\n const getSortKey = (option) => {\n // WYSIWYG for order displayed in help. Short used for comparison if present. No special handling for negated.\n return option.short ? option.short.replace(/^-/, '') : option.long.replace(/^--/, '');\n };\n return getSortKey(a).localeCompare(getSortKey(b));\n }\n\n /**\n * Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one.\n *\n * @param {Command} cmd\n * @returns {Option[]}\n */\n\n visibleOptions(cmd) {\n const visibleOptions = cmd.options.filter((option) => !option.hidden);\n // Implicit help\n const showShortHelpFlag = cmd._hasHelpOption && cmd._helpShortFlag && !cmd._findOption(cmd._helpShortFlag);\n const showLongHelpFlag = cmd._hasHelpOption && !cmd._findOption(cmd._helpLongFlag);\n if (showShortHelpFlag || showLongHelpFlag) {\n let helpOption;\n if (!showShortHelpFlag) {\n helpOption = cmd.createOption(cmd._helpLongFlag, cmd._helpDescription);\n } else if (!showLongHelpFlag) {\n helpOption = cmd.createOption(cmd._helpShortFlag, cmd._helpDescription);\n } else {\n helpOption = cmd.createOption(cmd._helpFlags, cmd._helpDescription);\n }\n visibleOptions.push(helpOption);\n }\n if (this.sortOptions) {\n visibleOptions.sort(this.compareOptions);\n }\n return visibleOptions;\n }\n\n /**\n * Get an array of the visible global options. (Not including help.)\n *\n * @param {Command} cmd\n * @returns {Option[]}\n */\n\n visibleGlobalOptions(cmd) {\n if (!this.showGlobalOptions) return [];\n\n const globalOptions = [];\n for (let ancestorCmd = cmd.parent; ancestorCmd; ancestorCmd = ancestorCmd.parent) {\n const visibleOptions = ancestorCmd.options.filter((option) => !option.hidden);\n globalOptions.push(...visibleOptions);\n }\n if (this.sortOptions) {\n globalOptions.sort(this.compareOptions);\n }\n return globalOptions;\n }\n\n /**\n * Get an array of the arguments if any have a description.\n *\n * @param {Command} cmd\n * @returns {Argument[]}\n */\n\n visibleArguments(cmd) {\n // Side effect! Apply the legacy descriptions before the arguments are displayed.\n if (cmd._argsDescription) {\n cmd.registeredArguments.forEach(argument => {\n argument.description = argument.description || cmd._argsDescription[argument.name()] || '';\n });\n }\n\n // If there are any arguments with a description then return all the arguments.\n if (cmd.registeredArguments.find(argument => argument.description)) {\n return cmd.registeredArguments;\n }\n return [];\n }\n\n /**\n * Get the command term to show in the list of subcommands.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n subcommandTerm(cmd) {\n // Legacy. Ignores custom usage string, and nested commands.\n const args = cmd.registeredArguments.map(arg => humanReadableArgName(arg)).join(' ');\n return cmd._name +\n (cmd._aliases[0] ? '|' + cmd._aliases[0] : '') +\n (cmd.options.length ? ' [options]' : '') + // simplistic check for non-help option\n (args ? ' ' + args : '');\n }\n\n /**\n * Get the option term to show in the list of options.\n *\n * @param {Option} option\n * @returns {string}\n */\n\n optionTerm(option) {\n return option.flags;\n }\n\n /**\n * Get the argument term to show in the list of arguments.\n *\n * @param {Argument} argument\n * @returns {string}\n */\n\n argumentTerm(argument) {\n return argument.name();\n }\n\n /**\n * Get the longest command term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestSubcommandTermLength(cmd, helper) {\n return helper.visibleCommands(cmd).reduce((max, command) => {\n return Math.max(max, helper.subcommandTerm(command).length);\n }, 0);\n }\n\n /**\n * Get the longest option term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestOptionTermLength(cmd, helper) {\n return helper.visibleOptions(cmd).reduce((max, option) => {\n return Math.max(max, helper.optionTerm(option).length);\n }, 0);\n }\n\n /**\n * Get the longest global option term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestGlobalOptionTermLength(cmd, helper) {\n return helper.visibleGlobalOptions(cmd).reduce((max, option) => {\n return Math.max(max, helper.optionTerm(option).length);\n }, 0);\n }\n\n /**\n * Get the longest argument term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestArgumentTermLength(cmd, helper) {\n return helper.visibleArguments(cmd).reduce((max, argument) => {\n return Math.max(max, helper.argumentTerm(argument).length);\n }, 0);\n }\n\n /**\n * Get the command usage to be displayed at the top of the built-in help.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n commandUsage(cmd) {\n // Usage\n let cmdName = cmd._name;\n if (cmd._aliases[0]) {\n cmdName = cmdName + '|' + cmd._aliases[0];\n }\n let ancestorCmdNames = '';\n for (let ancestorCmd = cmd.parent; ancestorCmd; ancestorCmd = ancestorCmd.parent) {\n ancestorCmdNames = ancestorCmd.name() + ' ' + ancestorCmdNames;\n }\n return ancestorCmdNames + cmdName + ' ' + cmd.usage();\n }\n\n /**\n * Get the description for the command.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n commandDescription(cmd) {\n // @ts-ignore: overloaded return type\n return cmd.description();\n }\n\n /**\n * Get the subcommand summary to show in the list of subcommands.\n * (Fallback to description for backwards compatibility.)\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n subcommandDescription(cmd) {\n // @ts-ignore: overloaded return type\n return cmd.summary() || cmd.description();\n }\n\n /**\n * Get the option description to show in the list of options.\n *\n * @param {Option} option\n * @return {string}\n */\n\n optionDescription(option) {\n const extraInfo = [];\n\n if (option.argChoices) {\n extraInfo.push(\n // use stringify to match the display of the default value\n `choices: ${option.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`);\n }\n if (option.defaultValue !== undefined) {\n // default for boolean and negated more for programmer than end user,\n // but show true/false for boolean option as may be for hand-rolled env or config processing.\n const showDefault = option.required || option.optional ||\n (option.isBoolean() && typeof option.defaultValue === 'boolean');\n if (showDefault) {\n extraInfo.push(`default: ${option.defaultValueDescription || JSON.stringify(option.defaultValue)}`);\n }\n }\n // preset for boolean and negated are more for programmer than end user\n if (option.presetArg !== undefined && option.optional) {\n extraInfo.push(`preset: ${JSON.stringify(option.presetArg)}`);\n }\n if (option.envVar !== undefined) {\n extraInfo.push(`env: ${option.envVar}`);\n }\n if (extraInfo.length > 0) {\n return `${option.description} (${extraInfo.join(', ')})`;\n }\n\n return option.description;\n }\n\n /**\n * Get the argument description to show in the list of arguments.\n *\n * @param {Argument} argument\n * @return {string}\n */\n\n argumentDescription(argument) {\n const extraInfo = [];\n if (argument.argChoices) {\n extraInfo.push(\n // use stringify to match the display of the default value\n `choices: ${argument.argChoices.map((choice) => JSON.stringify(choice)).join(', ')}`);\n }\n if (argument.defaultValue !== undefined) {\n extraInfo.push(`default: ${argument.defaultValueDescription || JSON.stringify(argument.defaultValue)}`);\n }\n if (extraInfo.length > 0) {\n const extraDescripton = `(${extraInfo.join(', ')})`;\n if (argument.description) {\n return `${argument.description} ${extraDescripton}`;\n }\n return extraDescripton;\n }\n return argument.description;\n }\n\n /**\n * Generate the built-in help text.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {string}\n */\n\n formatHelp(cmd, helper) {\n const termWidth = helper.padWidth(cmd, helper);\n const helpWidth = helper.helpWidth || 80;\n const itemIndentWidth = 2;\n const itemSeparatorWidth = 2; // between term and description\n function formatItem(term, description) {\n if (description) {\n const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`;\n return helper.wrap(fullText, helpWidth - itemIndentWidth, termWidth + itemSeparatorWidth);\n }\n return term;\n }\n function formatList(textArray) {\n return textArray.join('\\n').replace(/^/gm, ' '.repeat(itemIndentWidth));\n }\n\n // Usage\n let output = [`Usage: ${helper.commandUsage(cmd)}`, ''];\n\n // Description\n const commandDescription = helper.commandDescription(cmd);\n if (commandDescription.length > 0) {\n output = output.concat([helper.wrap(commandDescription, helpWidth, 0), '']);\n }\n\n // Arguments\n const argumentList = helper.visibleArguments(cmd).map((argument) => {\n return formatItem(helper.argumentTerm(argument), helper.argumentDescription(argument));\n });\n if (argumentList.length > 0) {\n output = output.concat(['Arguments:', formatList(argumentList), '']);\n }\n\n // Options\n const optionList = helper.visibleOptions(cmd).map((option) => {\n return formatItem(helper.optionTerm(option), helper.optionDescription(option));\n });\n if (optionList.length > 0) {\n output = output.concat(['Options:', formatList(optionList), '']);\n }\n\n if (this.showGlobalOptions) {\n const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {\n return formatItem(helper.optionTerm(option), helper.optionDescription(option));\n });\n if (globalOptionList.length > 0) {\n output = output.concat(['Global Options:', formatList(globalOptionList), '']);\n }\n }\n\n // Commands\n const commandList = helper.visibleCommands(cmd).map((cmd) => {\n return formatItem(helper.subcommandTerm(cmd), helper.subcommandDescription(cmd));\n });\n if (commandList.length > 0) {\n output = output.concat(['Commands:', formatList(commandList), '']);\n }\n\n return output.join('\\n');\n }\n\n /**\n * Calculate the pad width from the maximum term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n padWidth(cmd, helper) {\n return Math.max(\n helper.longestOptionTermLength(cmd, helper),\n helper.longestGlobalOptionTermLength(cmd, helper),\n helper.longestSubcommandTermLength(cmd, helper),\n helper.longestArgumentTermLength(cmd, helper)\n );\n }\n\n /**\n * Wrap the given string to width characters per line, with lines after the first indented.\n * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted.\n *\n * @param {string} str\n * @param {number} width\n * @param {number} indent\n * @param {number} [minColumnWidth=40]\n * @return {string}\n *\n */\n\n wrap(str, width, indent, minColumnWidth = 40) {\n // Full \\s characters, minus the linefeeds.\n const indents = ' \\\\f\\\\t\\\\v\\u00a0\\u1680\\u2000-\\u200a\\u202f\\u205f\\u3000\\ufeff';\n // Detect manually wrapped and indented strings by searching for line break followed by spaces.\n const manualIndent = new RegExp(`[\\\\n][${indents}]+`);\n if (str.match(manualIndent)) return str;\n // Do not wrap if not enough room for a wrapped column of text (as could end up with a word per line).\n const columnWidth = width - indent;\n if (columnWidth < minColumnWidth) return str;\n\n const leadingStr = str.slice(0, indent);\n const columnText = str.slice(indent).replace('\\r\\n', '\\n');\n const indentString = ' '.repeat(indent);\n const zeroWidthSpace = '\\u200B';\n const breaks = `\\\\s${zeroWidthSpace}`;\n // Match line end (so empty lines don't collapse),\n // or as much text as will fit in column, or excess text up to first break.\n const regex = new RegExp(`\\n|.{1,${columnWidth - 1}}([${breaks}]|$)|[^${breaks}]+?([${breaks}]|$)`, 'g');\n const lines = columnText.match(regex) || [];\n return leadingStr + lines.map((line, i) => {\n if (line === '\\n') return ''; // preserve empty lines\n return ((i > 0) ? indentString : '') + line.trimEnd();\n }).join('\\n');\n }\n}\n\nexports.Help = Help;\n","const { InvalidArgumentError } = require('./error.js');\n\nclass Option {\n /**\n * Initialize a new `Option` with the given `flags` and `description`.\n *\n * @param {string} flags\n * @param {string} [description]\n */\n\n constructor(flags, description) {\n this.flags = flags;\n this.description = description || '';\n\n this.required = flags.includes('<'); // A value must be supplied when the option is specified.\n this.optional = flags.includes('['); // A value is optional when the option is specified.\n // variadic test ignores <value,...> et al which might be used to describe custom splitting of single argument\n this.variadic = /\\w\\.\\.\\.[>\\]]$/.test(flags); // The option can take multiple values.\n this.mandatory = false; // The option must have a value after parsing, which usually means it must be specified on command line.\n const optionFlags = splitOptionFlags(flags);\n this.short = optionFlags.shortFlag;\n this.long = optionFlags.longFlag;\n this.negate = false;\n if (this.long) {\n this.negate = this.long.startsWith('--no-');\n }\n this.defaultValue = undefined;\n this.defaultValueDescription = undefined;\n this.presetArg = undefined;\n this.envVar = undefined;\n this.parseArg = undefined;\n this.hidden = false;\n this.argChoices = undefined;\n this.conflictsWith = [];\n this.implied = undefined;\n }\n\n /**\n * Set the default value, and optionally supply the description to be displayed in the help.\n *\n * @param {*} value\n * @param {string} [description]\n * @return {Option}\n */\n\n default(value, description) {\n this.defaultValue = value;\n this.defaultValueDescription = description;\n return this;\n }\n\n /**\n * Preset to use when option used without option-argument, especially optional but also boolean and negated.\n * The custom processing (parseArg) is called.\n *\n * @example\n * new Option('--color').default('GREYSCALE').preset('RGB');\n * new Option('--donate [amount]').preset('20').argParser(parseFloat);\n *\n * @param {*} arg\n * @return {Option}\n */\n\n preset(arg) {\n this.presetArg = arg;\n return this;\n }\n\n /**\n * Add option name(s) that conflict with this option.\n * An error will be displayed if conflicting options are found during parsing.\n *\n * @example\n * new Option('--rgb').conflicts('cmyk');\n * new Option('--js').conflicts(['ts', 'jsx']);\n *\n * @param {string | string[]} names\n * @return {Option}\n */\n\n conflicts(names) {\n this.conflictsWith = this.conflictsWith.concat(names);\n return this;\n }\n\n /**\n * Specify implied option values for when this option is set and the implied options are not.\n *\n * The custom processing (parseArg) is not called on the implied values.\n *\n * @example\n * program\n * .addOption(new Option('--log', 'write logging information to file'))\n * .addOption(new Option('--trace', 'log extra details').implies({ log: 'trace.txt' }));\n *\n * @param {Object} impliedOptionValues\n * @return {Option}\n */\n implies(impliedOptionValues) {\n let newImplied = impliedOptionValues;\n if (typeof impliedOptionValues === 'string') {\n // string is not documented, but easy mistake and we can do what user probably intended.\n newImplied = { [impliedOptionValues]: true };\n }\n this.implied = Object.assign(this.implied || {}, newImplied);\n return this;\n }\n\n /**\n * Set environment variable to check for option value.\n *\n * An environment variable is only used if when processed the current option value is\n * undefined, or the source of the current value is 'default' or 'config' or 'env'.\n *\n * @param {string} name\n * @return {Option}\n */\n\n env(name) {\n this.envVar = name;\n return this;\n }\n\n /**\n * Set the custom handler for processing CLI option arguments into option values.\n *\n * @param {Function} [fn]\n * @return {Option}\n */\n\n argParser(fn) {\n this.parseArg = fn;\n return this;\n }\n\n /**\n * Whether the option is mandatory and must have a value after parsing.\n *\n * @param {boolean} [mandatory=true]\n * @return {Option}\n */\n\n makeOptionMandatory(mandatory = true) {\n this.mandatory = !!mandatory;\n return this;\n }\n\n /**\n * Hide option in help.\n *\n * @param {boolean} [hide=true]\n * @return {Option}\n */\n\n hideHelp(hide = true) {\n this.hidden = !!hide;\n return this;\n }\n\n /**\n * @api private\n */\n\n _concatValue(value, previous) {\n if (previous === this.defaultValue || !Array.isArray(previous)) {\n return [value];\n }\n\n return previous.concat(value);\n }\n\n /**\n * Only allow option value to be one of choices.\n *\n * @param {string[]} values\n * @return {Option}\n */\n\n choices(values) {\n this.argChoices = values.slice();\n this.parseArg = (arg, previous) => {\n if (!this.argChoices.includes(arg)) {\n throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(', ')}.`);\n }\n if (this.variadic) {\n return this._concatValue(arg, previous);\n }\n return arg;\n };\n return this;\n }\n\n /**\n * Return option name.\n *\n * @return {string}\n */\n\n name() {\n if (this.long) {\n return this.long.replace(/^--/, '');\n }\n return this.short.replace(/^-/, '');\n }\n\n /**\n * Return option name, in a camelcase format that can be used\n * as a object attribute key.\n *\n * @return {string}\n * @api private\n */\n\n attributeName() {\n return camelcase(this.name().replace(/^no-/, ''));\n }\n\n /**\n * Check if `arg` matches the short or long flag.\n *\n * @param {string} arg\n * @return {boolean}\n * @api private\n */\n\n is(arg) {\n return this.short === arg || this.long === arg;\n }\n\n /**\n * Return whether a boolean option.\n *\n * Options are one of boolean, negated, required argument, or optional argument.\n *\n * @return {boolean}\n * @api private\n */\n\n isBoolean() {\n return !this.required && !this.optional && !this.negate;\n }\n}\n\n/**\n * This class is to make it easier to work with dual options, without changing the existing\n * implementation. We support separate dual options for separate positive and negative options,\n * like `--build` and `--no-build`, which share a single option value. This works nicely for some\n * use cases, but is tricky for others where we want separate behaviours despite\n * the single shared option value.\n */\nclass DualOptions {\n /**\n * @param {Option[]} options\n */\n constructor(options) {\n this.positiveOptions = new Map();\n this.negativeOptions = new Map();\n this.dualOptions = new Set();\n options.forEach(option => {\n if (option.negate) {\n this.negativeOptions.set(option.attributeName(), option);\n } else {\n this.positiveOptions.set(option.attributeName(), option);\n }\n });\n this.negativeOptions.forEach((value, key) => {\n if (this.positiveOptions.has(key)) {\n this.dualOptions.add(key);\n }\n });\n }\n\n /**\n * Did the value come from the option, and not from possible matching dual option?\n *\n * @param {*} value\n * @param {Option} option\n * @returns {boolean}\n */\n valueFromOption(value, option) {\n const optionKey = option.attributeName();\n if (!this.dualOptions.has(optionKey)) return true;\n\n // Use the value to deduce if (probably) came from the option.\n const preset = this.negativeOptions.get(optionKey).presetArg;\n const negativeValue = (preset !== undefined) ? preset : false;\n return option.negate === (negativeValue === value);\n }\n}\n\n/**\n * Convert string from kebab-case to camelCase.\n *\n * @param {string} str\n * @return {string}\n * @api private\n */\n\nfunction camelcase(str) {\n return str.split('-').reduce((str, word) => {\n return str + word[0].toUpperCase() + word.slice(1);\n });\n}\n\n/**\n * Split the short and long flag out of something like '-m,--mixed <value>'\n *\n * @api private\n */\n\nfunction splitOptionFlags(flags) {\n let shortFlag;\n let longFlag;\n // Use original very loose parsing to maintain backwards compatibility for now,\n // which allowed for example unintended `-sw, --short-word` [sic].\n const flagParts = flags.split(/[ |,]+/);\n if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1])) shortFlag = flagParts.shift();\n longFlag = flagParts.shift();\n // Add support for lone short flag without significantly changing parsing!\n if (!shortFlag && /^-[^-]$/.test(longFlag)) {\n shortFlag = longFlag;\n longFlag = undefined;\n }\n return { shortFlag, longFlag };\n}\n\nexports.Option = Option;\nexports.splitOptionFlags = splitOptionFlags;\nexports.DualOptions = DualOptions;\n","const maxDistance = 3;\n\nfunction editDistance(a, b) {\n // https://en.wikipedia.org/wiki/Damerau–Levenshtein_distance\n // Calculating optimal string alignment distance, no substring is edited more than once.\n // (Simple implementation.)\n\n // Quick early exit, return worst case.\n if (Math.abs(a.length - b.length) > maxDistance) return Math.max(a.length, b.length);\n\n // distance between prefix substrings of a and b\n const d = [];\n\n // pure deletions turn a into empty string\n for (let i = 0; i <= a.length; i++) {\n d[i] = [i];\n }\n // pure insertions turn empty string into b\n for (let j = 0; j <= b.length; j++) {\n d[0][j] = j;\n }\n\n // fill matrix\n for (let j = 1; j <= b.length; j++) {\n for (let i = 1; i <= a.length; i++) {\n let cost = 1;\n if (a[i - 1] === b[j - 1]) {\n cost = 0;\n } else {\n cost = 1;\n }\n d[i][j] = Math.min(\n d[i - 1][j] + 1, // deletion\n d[i][j - 1] + 1, // insertion\n d[i - 1][j - 1] + cost // substitution\n );\n // transposition\n if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {\n d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + 1);\n }\n }\n }\n\n return d[a.length][b.length];\n}\n\n/**\n * Find close matches, restricted to same number of edits.\n *\n * @param {string} word\n * @param {string[]} candidates\n * @returns {string}\n */\n\nfunction suggestSimilar(word, candidates) {\n if (!candidates || candidates.length === 0) return '';\n // remove possible duplicates\n candidates = Array.from(new Set(candidates));\n\n const searchingOptions = word.startsWith('--');\n if (searchingOptions) {\n word = word.slice(2);\n candidates = candidates.map(candidate => candidate.slice(2));\n }\n\n let similar = [];\n let bestDistance = maxDistance;\n const minSimilarity = 0.4;\n candidates.forEach((candidate) => {\n if (candidate.length <= 1) return; // no one character guesses\n\n const distance = editDistance(word, candidate);\n const length = Math.max(word.length, candidate.length);\n const similarity = (length - distance) / length;\n if (similarity > minSimilarity) {\n if (distance < bestDistance) {\n // better edit distance, throw away previous worse matches\n bestDistance = distance;\n similar = [candidate];\n } else if (distance === bestDistance) {\n similar.push(candidate);\n }\n }\n });\n\n similar.sort((a, b) => a.localeCompare(b));\n if (searchingOptions) {\n similar = similar.map(candidate => `--${candidate}`);\n }\n\n if (similar.length > 1) {\n return `\\n(Did you mean one of ${similar.join(', ')}?)`;\n }\n if (similar.length === 1) {\n return `\\n(Did you mean ${similar[0]}?)`;\n }\n return '';\n}\n\nexports.suggestSimilar = suggestSimilar;\n","module.exports = function (xs, fn) {\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n var x = fn(xs[i], i);\n if (isArray(x)) res.push.apply(res, x);\n else res.push(x);\n }\n return res;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","'use strict';\nconst path = require('path');\nconst globby = require('globby');\nconst isPathCwd = require('is-path-cwd');\nconst isPathInCwd = require('is-path-in-cwd');\nconst pify = require('pify');\nconst rimraf = require('rimraf');\nconst pMap = require('p-map');\n\nconst rimrafP = pify(rimraf);\n\nfunction safeCheck(file) {\n\tif (isPathCwd(file)) {\n\t\tthrow new Error('Cannot delete the current working directory. Can be overridden with the `force` option.');\n\t}\n\n\tif (!isPathInCwd(file)) {\n\t\tthrow new Error('Cannot delete files/folders outside the current working directory. Can be overridden with the `force` option.');\n\t}\n}\n\nconst del = (patterns, options) => {\n\toptions = Object.assign({}, options);\n\n\tconst {force, dryRun} = options;\n\tdelete options.force;\n\tdelete options.dryRun;\n\n\tconst mapper = file => {\n\t\tif (!force) {\n\t\t\tsafeCheck(file);\n\t\t}\n\n\t\tfile = path.resolve(options.cwd || '', file);\n\n\t\tif (dryRun) {\n\t\t\treturn file;\n\t\t}\n\n\t\treturn rimrafP(file, {glob: false}).then(() => file);\n\t};\n\n\treturn globby(patterns, options).then(files => pMap(files, mapper, options));\n};\n\nmodule.exports = del;\n// TODO: Remove this for the next major release\nmodule.exports.default = del;\n\nmodule.exports.sync = (patterns, options) => {\n\toptions = Object.assign({}, options);\n\n\tconst {force, dryRun} = options;\n\tdelete options.force;\n\tdelete options.dryRun;\n\n\treturn globby.sync(patterns, options).map(file => {\n\t\tif (!force) {\n\t\t\tsafeCheck(file);\n\t\t}\n\n\t\tfile = path.resolve(options.cwd || '', file);\n\n\t\tif (!dryRun) {\n\t\t\trimraf.sync(file, {glob: false});\n\t\t}\n\n\t\treturn file;\n\t});\n};\n","import {promisify} from 'node:util';\nimport path from 'node:path';\nimport process from 'node:process';\nimport {globby, globbySync} from 'globby';\nimport isGlob from 'is-glob';\nimport slash from 'slash';\nimport gracefulFs from 'graceful-fs';\nimport isPathCwd from 'is-path-cwd';\nimport isPathInside from 'is-path-inside';\nimport rimraf from 'rimraf';\nimport pMap from 'p-map';\n\nconst rimrafP = promisify(rimraf);\n\nconst rimrafOptions = {\n\tglob: false,\n\tunlink: gracefulFs.unlink,\n\tunlinkSync: gracefulFs.unlinkSync,\n\tchmod: gracefulFs.chmod,\n\tchmodSync: gracefulFs.chmodSync,\n\tstat: gracefulFs.stat,\n\tstatSync: gracefulFs.statSync,\n\tlstat: gracefulFs.lstat,\n\tlstatSync: gracefulFs.lstatSync,\n\trmdir: gracefulFs.rmdir,\n\trmdirSync: gracefulFs.rmdirSync,\n\treaddir: gracefulFs.readdir,\n\treaddirSync: gracefulFs.readdirSync,\n};\n\nfunction safeCheck(file, cwd) {\n\tif (isPathCwd(file)) {\n\t\tthrow new Error('Cannot delete the current working directory. Can be overridden with the `force` option.');\n\t}\n\n\tif (!isPathInside(file, cwd)) {\n\t\tthrow new Error('Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option.');\n\t}\n}\n\nfunction normalizePatterns(patterns) {\n\tpatterns = Array.isArray(patterns) ? patterns : [patterns];\n\n\tpatterns = patterns.map(pattern => {\n\t\tif (process.platform === 'win32' && isGlob(pattern) === false) {\n\t\t\treturn slash(pattern);\n\t\t}\n\n\t\treturn pattern;\n\t});\n\n\treturn patterns;\n}\n\nexport async function deleteAsync(patterns, {force, dryRun, cwd = process.cwd(), onProgress = () => {}, ...options} = {}) {\n\toptions = {\n\t\texpandDirectories: false,\n\t\tonlyFiles: false,\n\t\tfollowSymbolicLinks: false,\n\t\tcwd,\n\t\t...options,\n\t};\n\n\tpatterns = normalizePatterns(patterns);\n\n\tconst paths = await globby(patterns, options);\n\tconst files = paths.sort((a, b) => b.localeCompare(a));\n\n\tif (files.length === 0) {\n\t\tonProgress({\n\t\t\ttotalCount: 0,\n\t\t\tdeletedCount: 0,\n\t\t\tpercent: 1,\n\t\t});\n\t}\n\n\tlet deletedCount = 0;\n\n\tconst mapper = async file => {\n\t\tfile = path.resolve(cwd, file);\n\n\t\tif (!force) {\n\t\t\tsafeCheck(file, cwd);\n\t\t}\n\n\t\tif (!dryRun) {\n\t\t\tawait rimrafP(file, rimrafOptions);\n\t\t}\n\n\t\tdeletedCount += 1;\n\n\t\tonProgress({\n\t\t\ttotalCount: files.length,\n\t\t\tdeletedCount,\n\t\t\tpercent: deletedCount / files.length,\n\t\t\tpath: file,\n\t\t});\n\n\t\treturn file;\n\t};\n\n\tconst removedFiles = await pMap(files, mapper, options);\n\n\tremovedFiles.sort((a, b) => a.localeCompare(b));\n\n\treturn removedFiles;\n}\n\nexport function deleteSync(patterns, {force, dryRun, cwd = process.cwd(), ...options} = {}) {\n\toptions = {\n\t\texpandDirectories: false,\n\t\tonlyFiles: false,\n\t\tfollowSymbolicLinks: false,\n\t\tcwd,\n\t\t...options,\n\t};\n\n\tpatterns = normalizePatterns(patterns);\n\n\tconst files = globbySync(patterns, options)\n\t\t.sort((a, b) => b.localeCompare(a));\n\n\tconst removedFiles = files.map(file => {\n\t\tfile = path.resolve(cwd, file);\n\n\t\tif (!force) {\n\t\t\tsafeCheck(file, cwd);\n\t\t}\n\n\t\tif (!dryRun) {\n\t\t\trimraf.sync(file, rimrafOptions);\n\t\t}\n\n\t\treturn file;\n\t});\n\n\tremovedFiles.sort((a, b) => a.localeCompare(b));\n\n\treturn removedFiles;\n}\n","'use strict';\nconst path = require('path');\nconst pathType = require('path-type');\n\nconst getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(',')}}` : extensions[0];\n\nconst getPath = (filepath, cwd) => {\n\tconst pth = filepath[0] === '!' ? filepath.slice(1) : filepath;\n\treturn path.isAbsolute(pth) ? pth : path.join(cwd, pth);\n};\n\nconst addExtensions = (file, extensions) => {\n\tif (path.extname(file)) {\n\t\treturn `**/${file}`;\n\t}\n\n\treturn `**/${file}.${getExtensions(extensions)}`;\n};\n\nconst getGlob = (directory, options) => {\n\tif (options.files && !Array.isArray(options.files)) {\n\t\tthrow new TypeError(`Expected \\`files\\` to be of type \\`Array\\` but received type \\`${typeof options.files}\\``);\n\t}\n\n\tif (options.extensions && !Array.isArray(options.extensions)) {\n\t\tthrow new TypeError(`Expected \\`extensions\\` to be of type \\`Array\\` but received type \\`${typeof options.extensions}\\``);\n\t}\n\n\tif (options.files && options.extensions) {\n\t\treturn options.files.map(x => path.posix.join(directory, addExtensions(x, options.extensions)));\n\t}\n\n\tif (options.files) {\n\t\treturn options.files.map(x => path.posix.join(directory, `**/${x}`));\n\t}\n\n\tif (options.extensions) {\n\t\treturn [path.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)];\n\t}\n\n\treturn [path.posix.join(directory, '**')];\n};\n\nmodule.exports = async (input, options) => {\n\toptions = {\n\t\tcwd: process.cwd(),\n\t\t...options\n\t};\n\n\tif (typeof options.cwd !== 'string') {\n\t\tthrow new TypeError(`Expected \\`cwd\\` to be of type \\`string\\` but received type \\`${typeof options.cwd}\\``);\n\t}\n\n\tconst globs = await Promise.all([].concat(input).map(async x => {\n\t\tconst isDirectory = await pathType.isDirectory(getPath(x, options.cwd));\n\t\treturn isDirectory ? getGlob(x, options) : x;\n\t}));\n\n\treturn [].concat.apply([], globs); // eslint-disable-line prefer-spread\n};\n\nmodule.exports.sync = (input, options) => {\n\toptions = {\n\t\tcwd: process.cwd(),\n\t\t...options\n\t};\n\n\tif (typeof options.cwd !== 'string') {\n\t\tthrow new TypeError(`Expected \\`cwd\\` to be of type \\`string\\` but received type \\`${typeof options.cwd}\\``);\n\t}\n\n\tconst globs = [].concat(input).map(x => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x);\n\n\treturn [].concat.apply([], globs); // eslint-disable-line prefer-spread\n};\n","const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\nconst packageJson = require('../package.json')\n\nconst version = packageJson.version\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n const obj = {}\n\n // Convert buffer to string\n let lines = src.toString()\n\n // Convert line breaks to same format\n lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n let match\n while ((match = LINE.exec(lines)) != null) {\n const key = match[1]\n\n // Default undefined or null to empty string\n let value = (match[2] || '')\n\n // Remove whitespace\n value = value.trim()\n\n // Check if double quoted\n const maybeQuote = value[0]\n\n // Remove surrounding quotes\n value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n // Expand newlines if double quoted\n if (maybeQuote === '\"') {\n value = value.replace(/\\\\n/g, '\\n')\n value = value.replace(/\\\\r/g, '\\r')\n }\n\n // Add to object\n obj[key] = value\n }\n\n return obj\n}\n\nfunction _parseVault (options) {\n options = options || {}\n\n const vaultPath = _vaultPath(options)\n options.path = vaultPath // parse .env.vault\n const result = DotenvModule.configDotenv(options)\n if (!result.parsed) {\n const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n err.code = 'MISSING_DATA'\n throw err\n }\n\n // handle scenario for comma separated keys - for use with key rotation\n // example: DOTENV_KEY=\"dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod\"\n const keys = _dotenvKey(options).split(',')\n const length = keys.length\n\n let decrypted\n for (let i = 0; i < length; i++) {\n try {\n // Get full key\n const key = keys[i].trim()\n\n // Get instructions for decrypt\n const attrs = _instructions(result, key)\n\n // Decrypt\n decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n break\n } catch (error) {\n // last key\n if (i + 1 >= length) {\n throw error\n }\n // try next key\n }\n }\n\n // Parse decrypted .env string\n return DotenvModule.parse(decrypted)\n}\n\nfunction _warn (message) {\n console.log(`[dotenv@${version}][WARN] ${message}`)\n}\n\nfunction _debug (message) {\n console.log(`[dotenv@${version}][DEBUG] ${message}`)\n}\n\nfunction _log (message) {\n console.log(`[dotenv@${version}] ${message}`)\n}\n\nfunction _dotenvKey (options) {\n // prioritize developer directly setting options.DOTENV_KEY\n if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n return options.DOTENV_KEY\n }\n\n // secondary infra already contains a DOTENV_KEY environment variable\n if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n return process.env.DOTENV_KEY\n }\n\n // fallback to empty string\n return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n // Parse DOTENV_KEY. Format is a URI\n let uri\n try {\n uri = new URL(dotenvKey)\n } catch (error) {\n if (error.code === 'ERR_INVALID_URL') {\n const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n throw error\n }\n\n // Get decrypt key\n const key = uri.password\n if (!key) {\n const err = new Error('INVALID_DOTENV_KEY: Missing key part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get environment\n const environment = uri.searchParams.get('environment')\n if (!environment) {\n const err = new Error('INVALID_DOTENV_KEY: Missing environment part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get ciphertext payload\n const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n if (!ciphertext) {\n const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'\n throw err\n }\n\n return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n let possibleVaultPath = null\n\n if (options && options.path && options.path.length > 0) {\n if (Array.isArray(options.path)) {\n for (const filepath of options.path) {\n if (fs.existsSync(filepath)) {\n possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`\n }\n }\n } else {\n possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`\n }\n } else {\n possibleVaultPath = path.resolve(process.cwd(), '.env.vault')\n }\n\n if (fs.existsSync(possibleVaultPath)) {\n return possibleVaultPath\n }\n\n return null\n}\n\nfunction _resolveHome (envPath) {\n return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n const debug = Boolean(options && options.debug)\n const quiet = options && 'quiet' in options ? options.quiet : true\n\n if (debug || !quiet) {\n _log('Loading env from encrypted .env.vault')\n }\n\n const parsed = DotenvModule._parseVault(options)\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n}\n\nfunction configDotenv (options) {\n const dotenvPath = path.resolve(process.cwd(), '.env')\n let encoding = 'utf8'\n const debug = Boolean(options && options.debug)\n const quiet = options && 'quiet' in options ? options.quiet : true\n\n if (options && options.encoding) {\n encoding = options.encoding\n } else {\n if (debug) {\n _debug('No encoding is specified. UTF-8 is used by default')\n }\n }\n\n let optionPaths = [dotenvPath] // default, look for .env\n if (options && options.path) {\n if (!Array.isArray(options.path)) {\n optionPaths = [_resolveHome(options.path)]\n } else {\n optionPaths = [] // reset default\n for (const filepath of options.path) {\n optionPaths.push(_resolveHome(filepath))\n }\n }\n }\n\n // Build the parsed data in a temporary object (because we need to return it). Once we have the final\n // parsed data, we will combine it with process.env (or options.processEnv if provided).\n let lastError\n const parsedAll = {}\n for (const path of optionPaths) {\n try {\n // Specifying an encoding returns a string instead of a buffer\n const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))\n\n DotenvModule.populate(parsedAll, parsed, options)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${path} ${e.message}`)\n }\n lastError = e\n }\n }\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsedAll, options)\n\n if (debug || !quiet) {\n const keysCount = Object.keys(parsedAll).length\n const shortPaths = []\n for (const filePath of optionPaths) {\n try {\n const relative = path.relative(process.cwd(), filePath)\n shortPaths.push(relative)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${filePath} ${e.message}`)\n }\n lastError = e\n }\n }\n\n _log(`injecting env (${keysCount}) from ${shortPaths.join(',')}`)\n }\n\n if (lastError) {\n return { parsed: parsedAll, error: lastError }\n } else {\n return { parsed: parsedAll }\n }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n // fallback to original dotenv if DOTENV_KEY is not set\n if (_dotenvKey(options).length === 0) {\n return DotenvModule.configDotenv(options)\n }\n\n const vaultPath = _vaultPath(options)\n\n // dotenvKey exists but .env.vault file does not exist\n if (!vaultPath) {\n _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)\n\n return DotenvModule.configDotenv(options)\n }\n\n return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n const key = Buffer.from(keyStr.slice(-64), 'hex')\n let ciphertext = Buffer.from(encrypted, 'base64')\n\n const nonce = ciphertext.subarray(0, 12)\n const authTag = ciphertext.subarray(-16)\n ciphertext = ciphertext.subarray(12, -16)\n\n try {\n const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n aesgcm.setAuthTag(authTag)\n return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n } catch (error) {\n const isRange = error instanceof RangeError\n const invalidKeyLength = error.message === 'Invalid key length'\n const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n if (isRange || invalidKeyLength) {\n const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n } else if (decryptionFailed) {\n const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')\n err.code = 'DECRYPTION_FAILED'\n throw err\n } else {\n throw error\n }\n }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n const debug = Boolean(options && options.debug)\n const override = Boolean(options && options.override)\n\n if (typeof parsed !== 'object') {\n const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n err.code = 'OBJECT_REQUIRED'\n throw err\n }\n\n // Set process.env\n for (const key of Object.keys(parsed)) {\n if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n if (override === true) {\n processEnv[key] = parsed[key]\n }\n\n if (debug) {\n if (override === true) {\n _debug(`\"${key}\" is already defined and WAS overwritten`)\n } else {\n _debug(`\"${key}\" is already defined and was NOT overwritten`)\n }\n }\n } else {\n processEnv[key] = parsed[key]\n }\n }\n}\n\nconst DotenvModule = {\n configDotenv,\n _configVault,\n _parseVault,\n config,\n decrypt,\n parse,\n populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n","export default function escapeStringRegexp(string) {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\t// Escape characters with special meaning either inside or outside character sets.\n\t// Use a simple backslash escape when it’s always valid, and a `\\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar.\n\treturn string\n\t\t.replace(/[|\\\\{}()[\\]^$+*?.]/g, '\\\\$&')\n\t\t.replace(/-/g, '\\\\x2d');\n}\n","\"use strict\";\nconst taskManager = require(\"./managers/tasks\");\nconst async_1 = require(\"./providers/async\");\nconst stream_1 = require(\"./providers/stream\");\nconst sync_1 = require(\"./providers/sync\");\nconst settings_1 = require(\"./settings\");\nconst utils = require(\"./utils\");\nasync function FastGlob(source, options) {\n assertPatternsInput(source);\n const works = getWorks(source, async_1.default, options);\n const result = await Promise.all(works);\n return utils.array.flatten(result);\n}\n// https://github.com/typescript-eslint/typescript-eslint/issues/60\n// eslint-disable-next-line no-redeclare\n(function (FastGlob) {\n FastGlob.glob = FastGlob;\n FastGlob.globSync = sync;\n FastGlob.globStream = stream;\n FastGlob.async = FastGlob;\n function sync(source, options) {\n assertPatternsInput(source);\n const works = getWorks(source, sync_1.default, options);\n return utils.array.flatten(works);\n }\n FastGlob.sync = sync;\n function stream(source, options) {\n assertPatternsInput(source);\n const works = getWorks(source, stream_1.default, options);\n /**\n * The stream returned by the provider cannot work with an asynchronous iterator.\n * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.\n * This affects performance (+25%). I don't see best solution right now.\n */\n return utils.stream.merge(works);\n }\n FastGlob.stream = stream;\n function generateTasks(source, options) {\n assertPatternsInput(source);\n const patterns = [].concat(source);\n const settings = new settings_1.default(options);\n return taskManager.generate(patterns, settings);\n }\n FastGlob.generateTasks = generateTasks;\n function isDynamicPattern(source, options) {\n assertPatternsInput(source);\n const settings = new settings_1.default(options);\n return utils.pattern.isDynamicPattern(source, settings);\n }\n FastGlob.isDynamicPattern = isDynamicPattern;\n function escapePath(source) {\n assertPatternsInput(source);\n return utils.path.escape(source);\n }\n FastGlob.escapePath = escapePath;\n function convertPathToPattern(source) {\n assertPatternsInput(source);\n return utils.path.convertPathToPattern(source);\n }\n FastGlob.convertPathToPattern = convertPathToPattern;\n let posix;\n (function (posix) {\n function escapePath(source) {\n assertPatternsInput(source);\n return utils.path.escapePosixPath(source);\n }\n posix.escapePath = escapePath;\n function convertPathToPattern(source) {\n assertPatternsInput(source);\n return utils.path.convertPosixPathToPattern(source);\n }\n posix.convertPathToPattern = convertPathToPattern;\n })(posix = FastGlob.posix || (FastGlob.posix = {}));\n let win32;\n (function (win32) {\n function escapePath(source) {\n assertPatternsInput(source);\n return utils.path.escapeWindowsPath(source);\n }\n win32.escapePath = escapePath;\n function convertPathToPattern(source) {\n assertPatternsInput(source);\n return utils.path.convertWindowsPathToPattern(source);\n }\n win32.convertPathToPattern = convertPathToPattern;\n })(win32 = FastGlob.win32 || (FastGlob.win32 = {}));\n})(FastGlob || (FastGlob = {}));\nfunction getWorks(source, _Provider, options) {\n const patterns = [].concat(source);\n const settings = new settings_1.default(options);\n const tasks = taskManager.generate(patterns, settings);\n const provider = new _Provider(settings);\n return tasks.map(provider.read, provider);\n}\nfunction assertPatternsInput(input) {\n const source = [].concat(input);\n const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item));\n if (!isValidSource) {\n throw new TypeError('Patterns must be a string (non empty) or an array of strings');\n }\n}\nmodule.exports = FastGlob;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;\nconst utils = require(\"../utils\");\nfunction generate(input, settings) {\n const patterns = processPatterns(input, settings);\n const ignore = processPatterns(settings.ignore, settings);\n const positivePatterns = getPositivePatterns(patterns);\n const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);\n const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));\n const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));\n const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);\n const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);\n return staticTasks.concat(dynamicTasks);\n}\nexports.generate = generate;\nfunction processPatterns(input, settings) {\n let patterns = input;\n /**\n * The original pattern like `{,*,**,a/*}` can lead to problems checking the depth when matching entry\n * and some problems with the micromatch package (see fast-glob issues: #365, #394).\n *\n * To solve this problem, we expand all patterns containing brace expansion. This can lead to a slight slowdown\n * in matching in the case of a large set of patterns after expansion.\n */\n if (settings.braceExpansion) {\n patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);\n }\n /**\n * If the `baseNameMatch` option is enabled, we must add globstar to patterns, so that they can be used\n * at any nesting level.\n *\n * We do this here, because otherwise we have to complicate the filtering logic. For example, we need to change\n * the pattern in the filter before creating a regular expression. There is no need to change the patterns\n * in the application. Only on the input.\n */\n if (settings.baseNameMatch) {\n patterns = patterns.map((pattern) => pattern.includes('/') ? pattern : `**/${pattern}`);\n }\n /**\n * This method also removes duplicate slashes that may have been in the pattern or formed as a result of expansion.\n */\n return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));\n}\n/**\n * Returns tasks grouped by basic pattern directories.\n *\n * Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately.\n * This is necessary because directory traversal starts at the base directory and goes deeper.\n */\nfunction convertPatternsToTasks(positive, negative, dynamic) {\n const tasks = [];\n const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);\n const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive);\n const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);\n const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);\n tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));\n /*\n * For the sake of reducing future accesses to the file system, we merge all tasks within the current directory\n * into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest.\n */\n if ('.' in insideCurrentDirectoryGroup) {\n tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic));\n }\n else {\n tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));\n }\n return tasks;\n}\nexports.convertPatternsToTasks = convertPatternsToTasks;\nfunction getPositivePatterns(patterns) {\n return utils.pattern.getPositivePatterns(patterns);\n}\nexports.getPositivePatterns = getPositivePatterns;\nfunction getNegativePatternsAsPositive(patterns, ignore) {\n const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);\n const positive = negative.map(utils.pattern.convertToPositivePattern);\n return positive;\n}\nexports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;\nfunction groupPatternsByBaseDirectory(patterns) {\n const group = {};\n return patterns.reduce((collection, pattern) => {\n const base = utils.pattern.getBaseDirectory(pattern);\n if (base in collection) {\n collection[base].push(pattern);\n }\n else {\n collection[base] = [pattern];\n }\n return collection;\n }, group);\n}\nexports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;\nfunction convertPatternGroupsToTasks(positive, negative, dynamic) {\n return Object.keys(positive).map((base) => {\n return convertPatternGroupToTask(base, positive[base], negative, dynamic);\n });\n}\nexports.convertPatternGroupsToTasks = convertPatternGroupsToTasks;\nfunction convertPatternGroupToTask(base, positive, negative, dynamic) {\n return {\n dynamic,\n positive,\n negative,\n base,\n patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))\n };\n}\nexports.convertPatternGroupToTask = convertPatternGroupToTask;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst async_1 = require(\"../readers/async\");\nconst provider_1 = require(\"./provider\");\nclass ProviderAsync extends provider_1.default {\n constructor() {\n super(...arguments);\n this._reader = new async_1.default(this._settings);\n }\n async read(task) {\n const root = this._getRootDirectory(task);\n const options = this._getReaderOptions(task);\n const entries = await this.api(root, task, options);\n return entries.map((entry) => options.transform(entry));\n }\n api(root, task, options) {\n if (task.dynamic) {\n return this._reader.dynamic(root, options);\n }\n return this._reader.static(task.patterns, options);\n }\n}\nexports.default = ProviderAsync;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils = require(\"../../utils\");\nconst partial_1 = require(\"../matchers/partial\");\nclass DeepFilter {\n constructor(_settings, _micromatchOptions) {\n this._settings = _settings;\n this._micromatchOptions = _micromatchOptions;\n }\n getFilter(basePath, positive, negative) {\n const matcher = this._getMatcher(positive);\n const negativeRe = this._getNegativePatternsRe(negative);\n return (entry) => this._filter(basePath, entry, matcher, negativeRe);\n }\n _getMatcher(patterns) {\n return new partial_1.default(patterns, this._settings, this._micromatchOptions);\n }\n _getNegativePatternsRe(patterns) {\n const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern);\n return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions);\n }\n _filter(basePath, entry, matcher, negativeRe) {\n if (this._isSkippedByDeep(basePath, entry.path)) {\n return false;\n }\n if (this._isSkippedSymbolicLink(entry)) {\n return false;\n }\n const filepath = utils.path.removeLeadingDotSegment(entry.path);\n if (this._isSkippedByPositivePatterns(filepath, matcher)) {\n return false;\n }\n return this._isSkippedByNegativePatterns(filepath, negativeRe);\n }\n _isSkippedByDeep(basePath, entryPath) {\n /**\n * Avoid unnecessary depth calculations when it doesn't matter.\n */\n if (this._settings.deep === Infinity) {\n return false;\n }\n return this._getEntryLevel(basePath, entryPath) >= this._settings.deep;\n }\n _getEntryLevel(basePath, entryPath) {\n const entryPathDepth = entryPath.split('/').length;\n if (basePath === '') {\n return entryPathDepth;\n }\n const basePathDepth = basePath.split('/').length;\n return entryPathDepth - basePathDepth;\n }\n _isSkippedSymbolicLink(entry) {\n return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink();\n }\n _isSkippedByPositivePatterns(entryPath, matcher) {\n return !this._settings.baseNameMatch && !matcher.match(entryPath);\n }\n _isSkippedByNegativePatterns(entryPath, patternsRe) {\n return !utils.pattern.matchAny(entryPath, patternsRe);\n }\n}\nexports.default = DeepFilter;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils = require(\"../../utils\");\nclass EntryFilter {\n constructor(_settings, _micromatchOptions) {\n this._settings = _settings;\n this._micromatchOptions = _micromatchOptions;\n this.index = new Map();\n }\n getFilter(positive, negative) {\n const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative);\n const patterns = {\n positive: {\n all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)\n },\n negative: {\n absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })),\n relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }))\n }\n };\n return (entry) => this._filter(entry, patterns);\n }\n _filter(entry, patterns) {\n const filepath = utils.path.removeLeadingDotSegment(entry.path);\n if (this._settings.unique && this._isDuplicateEntry(filepath)) {\n return false;\n }\n if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {\n return false;\n }\n const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory());\n if (this._settings.unique && isMatched) {\n this._createIndexRecord(filepath);\n }\n return isMatched;\n }\n _isDuplicateEntry(filepath) {\n return this.index.has(filepath);\n }\n _createIndexRecord(filepath) {\n this.index.set(filepath, undefined);\n }\n _onlyFileFilter(entry) {\n return this._settings.onlyFiles && !entry.dirent.isFile();\n }\n _onlyDirectoryFilter(entry) {\n return this._settings.onlyDirectories && !entry.dirent.isDirectory();\n }\n _isMatchToPatternsSet(filepath, patterns, isDirectory) {\n const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory);\n if (!isMatched) {\n return false;\n }\n const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory);\n if (isMatchedByRelativeNegative) {\n return false;\n }\n const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory);\n if (isMatchedByAbsoluteNegative) {\n return false;\n }\n return true;\n }\n _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) {\n if (patternsRe.length === 0) {\n return false;\n }\n const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath);\n return this._isMatchToPatterns(fullpath, patternsRe, isDirectory);\n }\n _isMatchToPatterns(filepath, patternsRe, isDirectory) {\n if (patternsRe.length === 0) {\n return false;\n }\n // Trying to match files and directories by patterns.\n const isMatched = utils.pattern.matchAny(filepath, patternsRe);\n // A pattern with a trailling slash can be used for directory matching.\n // To apply such pattern, we need to add a tralling slash to the path.\n if (!isMatched && isDirectory) {\n return utils.pattern.matchAny(filepath + '/', patternsRe);\n }\n return isMatched;\n }\n}\nexports.default = EntryFilter;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils = require(\"../../utils\");\nclass ErrorFilter {\n constructor(_settings) {\n this._settings = _settings;\n }\n getFilter() {\n return (error) => this._isNonFatalError(error);\n }\n _isNonFatalError(error) {\n return utils.errno.isEnoentCodeError(error) || this._settings.suppressErrors;\n }\n}\nexports.default = ErrorFilter;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils = require(\"../../utils\");\nclass Matcher {\n constructor(_patterns, _settings, _micromatchOptions) {\n this._patterns = _patterns;\n this._settings = _settings;\n this._micromatchOptions = _micromatchOptions;\n this._storage = [];\n this._fillStorage();\n }\n _fillStorage() {\n for (const pattern of this._patterns) {\n const segments = this._getPatternSegments(pattern);\n const sections = this._splitSegmentsIntoSections(segments);\n this._storage.push({\n complete: sections.length <= 1,\n pattern,\n segments,\n sections\n });\n }\n }\n _getPatternSegments(pattern) {\n const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions);\n return parts.map((part) => {\n const dynamic = utils.pattern.isDynamicPattern(part, this._settings);\n if (!dynamic) {\n return {\n dynamic: false,\n pattern: part\n };\n }\n return {\n dynamic: true,\n pattern: part,\n patternRe: utils.pattern.makeRe(part, this._micromatchOptions)\n };\n });\n }\n _splitSegmentsIntoSections(segments) {\n return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern));\n }\n}\nexports.default = Matcher;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst matcher_1 = require(\"./matcher\");\nclass PartialMatcher extends matcher_1.default {\n match(filepath) {\n const parts = filepath.split('/');\n const levels = parts.length;\n const patterns = this._storage.filter((info) => !info.complete || info.segments.length > levels);\n for (const pattern of patterns) {\n const section = pattern.sections[0];\n /**\n * In this case, the pattern has a globstar and we must read all directories unconditionally,\n * but only if the level has reached the end of the first group.\n *\n * fixtures/{a,b}/**\n * ^ true/false ^ always true\n */\n if (!pattern.complete && levels > section.length) {\n return true;\n }\n const match = parts.every((part, index) => {\n const segment = pattern.segments[index];\n if (segment.dynamic && segment.patternRe.test(part)) {\n return true;\n }\n if (!segment.dynamic && segment.pattern === part) {\n return true;\n }\n return false;\n });\n if (match) {\n return true;\n }\n }\n return false;\n }\n}\nexports.default = PartialMatcher;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = require(\"path\");\nconst deep_1 = require(\"./filters/deep\");\nconst entry_1 = require(\"./filters/entry\");\nconst error_1 = require(\"./filters/error\");\nconst entry_2 = require(\"./transformers/entry\");\nclass Provider {\n constructor(_settings) {\n this._settings = _settings;\n this.errorFilter = new error_1.default(this._settings);\n this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions());\n this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions());\n this.entryTransformer = new entry_2.default(this._settings);\n }\n _getRootDirectory(task) {\n return path.resolve(this._settings.cwd, task.base);\n }\n _getReaderOptions(task) {\n const basePath = task.base === '.' ? '' : task.base;\n return {\n basePath,\n pathSegmentSeparator: '/',\n concurrency: this._settings.concurrency,\n deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative),\n entryFilter: this.entryFilter.getFilter(task.positive, task.negative),\n errorFilter: this.errorFilter.getFilter(),\n followSymbolicLinks: this._settings.followSymbolicLinks,\n fs: this._settings.fs,\n stats: this._settings.stats,\n throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,\n transform: this.entryTransformer.getTransformer()\n };\n }\n _getMicromatchOptions() {\n return {\n dot: this._settings.dot,\n matchBase: this._settings.baseNameMatch,\n nobrace: !this._settings.braceExpansion,\n nocase: !this._settings.caseSensitiveMatch,\n noext: !this._settings.extglob,\n noglobstar: !this._settings.globstar,\n posix: true,\n strictSlashes: false\n };\n }\n}\nexports.default = Provider;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst stream_1 = require(\"stream\");\nconst stream_2 = require(\"../readers/stream\");\nconst provider_1 = require(\"./provider\");\nclass ProviderStream extends provider_1.default {\n constructor() {\n super(...arguments);\n this._reader = new stream_2.default(this._settings);\n }\n read(task) {\n const root = this._getRootDirectory(task);\n const options = this._getReaderOptions(task);\n const source = this.api(root, task, options);\n const destination = new stream_1.Readable({ objectMode: true, read: () => { } });\n source\n .once('error', (error) => destination.emit('error', error))\n .on('data', (entry) => destination.emit('data', options.transform(entry)))\n .once('end', () => destination.emit('end'));\n destination\n .once('close', () => source.destroy());\n return destination;\n }\n api(root, task, options) {\n if (task.dynamic) {\n return this._reader.dynamic(root, options);\n }\n return this._reader.static(task.patterns, options);\n }\n}\nexports.default = ProviderStream;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst sync_1 = require(\"../readers/sync\");\nconst provider_1 = require(\"./provider\");\nclass ProviderSync extends provider_1.default {\n constructor() {\n super(...arguments);\n this._reader = new sync_1.default(this._settings);\n }\n read(task) {\n const root = this._getRootDirectory(task);\n const options = this._getReaderOptions(task);\n const entries = this.api(root, task, options);\n return entries.map(options.transform);\n }\n api(root, task, options) {\n if (task.dynamic) {\n return this._reader.dynamic(root, options);\n }\n return this._reader.static(task.patterns, options);\n }\n}\nexports.default = ProviderSync;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst utils = require(\"../../utils\");\nclass EntryTransformer {\n constructor(_settings) {\n this._settings = _settings;\n }\n getTransformer() {\n return (entry) => this._transform(entry);\n }\n _transform(entry) {\n let filepath = entry.path;\n if (this._settings.absolute) {\n filepath = utils.path.makeAbsolute(this._settings.cwd, filepath);\n filepath = utils.path.unixify(filepath);\n }\n if (this._settings.markDirectories && entry.dirent.isDirectory()) {\n filepath += '/';\n }\n if (!this._settings.objectMode) {\n return filepath;\n }\n return Object.assign(Object.assign({}, entry), { path: filepath });\n }\n}\nexports.default = EntryTransformer;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fsWalk = require(\"@nodelib/fs.walk\");\nconst reader_1 = require(\"./reader\");\nconst stream_1 = require(\"./stream\");\nclass ReaderAsync extends reader_1.default {\n constructor() {\n super(...arguments);\n this._walkAsync = fsWalk.walk;\n this._readerStream = new stream_1.default(this._settings);\n }\n dynamic(root, options) {\n return new Promise((resolve, reject) => {\n this._walkAsync(root, options, (error, entries) => {\n if (error === null) {\n resolve(entries);\n }\n else {\n reject(error);\n }\n });\n });\n }\n async static(patterns, options) {\n const entries = [];\n const stream = this._readerStream.static(patterns, options);\n // After #235, replace it with an asynchronous iterator.\n return new Promise((resolve, reject) => {\n stream.once('error', reject);\n stream.on('data', (entry) => entries.push(entry));\n stream.once('end', () => resolve(entries));\n });\n }\n}\nexports.default = ReaderAsync;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = require(\"path\");\nconst fsStat = require(\"@nodelib/fs.stat\");\nconst utils = require(\"../utils\");\nclass Reader {\n constructor(_settings) {\n this._settings = _settings;\n this._fsStatSettings = new fsStat.Settings({\n followSymbolicLink: this._settings.followSymbolicLinks,\n fs: this._settings.fs,\n throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks\n });\n }\n _getFullEntryPath(filepath) {\n return path.resolve(this._settings.cwd, filepath);\n }\n _makeEntry(stats, pattern) {\n const entry = {\n name: pattern,\n path: pattern,\n dirent: utils.fs.createDirentFromStats(pattern, stats)\n };\n if (this._settings.stats) {\n entry.stats = stats;\n }\n return entry;\n }\n _isFatalError(error) {\n return !utils.errno.isEnoentCodeError(error) && !this._settings.suppressErrors;\n }\n}\nexports.default = Reader;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst stream_1 = require(\"stream\");\nconst fsStat = require(\"@nodelib/fs.stat\");\nconst fsWalk = require(\"@nodelib/fs.walk\");\nconst reader_1 = require(\"./reader\");\nclass ReaderStream extends reader_1.default {\n constructor() {\n super(...arguments);\n this._walkStream = fsWalk.walkStream;\n this._stat = fsStat.stat;\n }\n dynamic(root, options) {\n return this._walkStream(root, options);\n }\n static(patterns, options) {\n const filepaths = patterns.map(this._getFullEntryPath, this);\n const stream = new stream_1.PassThrough({ objectMode: true });\n stream._write = (index, _enc, done) => {\n return this._getEntry(filepaths[index], patterns[index], options)\n .then((entry) => {\n if (entry !== null && options.entryFilter(entry)) {\n stream.push(entry);\n }\n if (index === filepaths.length - 1) {\n stream.end();\n }\n done();\n })\n .catch(done);\n };\n for (let i = 0; i < filepaths.length; i++) {\n stream.write(i);\n }\n return stream;\n }\n _getEntry(filepath, pattern, options) {\n return this._getStat(filepath)\n .then((stats) => this._makeEntry(stats, pattern))\n .catch((error) => {\n if (options.errorFilter(error)) {\n return null;\n }\n throw error;\n });\n }\n _getStat(filepath) {\n return new Promise((resolve, reject) => {\n this._stat(filepath, this._fsStatSettings, (error, stats) => {\n return error === null ? resolve(stats) : reject(error);\n });\n });\n }\n}\nexports.default = ReaderStream;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fsStat = require(\"@nodelib/fs.stat\");\nconst fsWalk = require(\"@nodelib/fs.walk\");\nconst reader_1 = require(\"./reader\");\nclass ReaderSync extends reader_1.default {\n constructor() {\n super(...arguments);\n this._walkSync = fsWalk.walkSync;\n this._statSync = fsStat.statSync;\n }\n dynamic(root, options) {\n return this._walkSync(root, options);\n }\n static(patterns, options) {\n const entries = [];\n for (const pattern of patterns) {\n const filepath = this._getFullEntryPath(pattern);\n const entry = this._getEntry(filepath, pattern, options);\n if (entry === null || !options.entryFilter(entry)) {\n continue;\n }\n entries.push(entry);\n }\n return entries;\n }\n _getEntry(filepath, pattern, options) {\n try {\n const stats = this._getStat(filepath);\n return this._makeEntry(stats, pattern);\n }\n catch (error) {\n if (options.errorFilter(error)) {\n return null;\n }\n throw error;\n }\n }\n _getStat(filepath) {\n return this._statSync(filepath, this._fsStatSettings);\n }\n}\nexports.default = ReaderSync;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;\nconst fs = require(\"fs\");\nconst os = require(\"os\");\n/**\n * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.\n * https://github.com/nodejs/node/blob/7faeddf23a98c53896f8b574a6e66589e8fb1eb8/lib/os.js#L106-L107\n */\nconst CPU_COUNT = Math.max(os.cpus().length, 1);\nexports.DEFAULT_FILE_SYSTEM_ADAPTER = {\n lstat: fs.lstat,\n lstatSync: fs.lstatSync,\n stat: fs.stat,\n statSync: fs.statSync,\n readdir: fs.readdir,\n readdirSync: fs.readdirSync\n};\nclass Settings {\n constructor(_options = {}) {\n this._options = _options;\n this.absolute = this._getValue(this._options.absolute, false);\n this.baseNameMatch = this._getValue(this._options.baseNameMatch, false);\n this.braceExpansion = this._getValue(this._options.braceExpansion, true);\n this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true);\n this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT);\n this.cwd = this._getValue(this._options.cwd, process.cwd());\n this.deep = this._getValue(this._options.deep, Infinity);\n this.dot = this._getValue(this._options.dot, false);\n this.extglob = this._getValue(this._options.extglob, true);\n this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true);\n this.fs = this._getFileSystemMethods(this._options.fs);\n this.globstar = this._getValue(this._options.globstar, true);\n this.ignore = this._getValue(this._options.ignore, []);\n this.markDirectories = this._getValue(this._options.markDirectories, false);\n this.objectMode = this._getValue(this._options.objectMode, false);\n this.onlyDirectories = this._getValue(this._options.onlyDirectories, false);\n this.onlyFiles = this._getValue(this._options.onlyFiles, true);\n this.stats = this._getValue(this._options.stats, false);\n this.suppressErrors = this._getValue(this._options.suppressErrors, false);\n this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false);\n this.unique = this._getValue(this._options.unique, true);\n if (this.onlyDirectories) {\n this.onlyFiles = false;\n }\n if (this.stats) {\n this.objectMode = true;\n }\n // Remove the cast to the array in the next major (#404).\n this.ignore = [].concat(this.ignore);\n }\n _getValue(option, value) {\n return option === undefined ? value : option;\n }\n _getFileSystemMethods(methods = {}) {\n return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);\n }\n}\nexports.default = Settings;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitWhen = exports.flatten = void 0;\nfunction flatten(items) {\n return items.reduce((collection, item) => [].concat(collection, item), []);\n}\nexports.flatten = flatten;\nfunction splitWhen(items, predicate) {\n const result = [[]];\n let groupIndex = 0;\n for (const item of items) {\n if (predicate(item)) {\n groupIndex++;\n result[groupIndex] = [];\n }\n else {\n result[groupIndex].push(item);\n }\n }\n return result;\n}\nexports.splitWhen = splitWhen;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isEnoentCodeError = void 0;\nfunction isEnoentCodeError(error) {\n return error.code === 'ENOENT';\n}\nexports.isEnoentCodeError = isEnoentCodeError;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createDirentFromStats = void 0;\nclass DirentFromStats {\n constructor(name, stats) {\n this.name = name;\n this.isBlockDevice = stats.isBlockDevice.bind(stats);\n this.isCharacterDevice = stats.isCharacterDevice.bind(stats);\n this.isDirectory = stats.isDirectory.bind(stats);\n this.isFIFO = stats.isFIFO.bind(stats);\n this.isFile = stats.isFile.bind(stats);\n this.isSocket = stats.isSocket.bind(stats);\n this.isSymbolicLink = stats.isSymbolicLink.bind(stats);\n }\n}\nfunction createDirentFromStats(name, stats) {\n return new DirentFromStats(name, stats);\n}\nexports.createDirentFromStats = createDirentFromStats;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.string = exports.stream = exports.pattern = exports.path = exports.fs = exports.errno = exports.array = void 0;\nconst array = require(\"./array\");\nexports.array = array;\nconst errno = require(\"./errno\");\nexports.errno = errno;\nconst fs = require(\"./fs\");\nexports.fs = fs;\nconst path = require(\"./path\");\nexports.path = path;\nconst pattern = require(\"./pattern\");\nexports.pattern = pattern;\nconst stream = require(\"./stream\");\nexports.stream = stream;\nconst string = require(\"./string\");\nexports.string = string;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;\nconst os = require(\"os\");\nconst path = require(\"path\");\nconst IS_WINDOWS_PLATFORM = os.platform() === 'win32';\nconst LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\\\\n/**\n * All non-escaped special characters.\n * Posix: ()*?[]{|}, !+@ before (, ! at the beginning, \\\\ before non-special characters.\n * Windows: (){}[], !+@ before (, ! at the beginning.\n */\nconst POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\\\?)([()*?[\\]{|}]|^!|[!+@](?=\\()|\\\\(?![!()*+?@[\\]{|}]))/g;\nconst WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\\\?)([()[\\]{}]|^!|[!+@](?=\\())/g;\n/**\n * The device path (\\\\.\\ or \\\\?\\).\n * https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#dos-device-paths\n */\nconst DOS_DEVICE_PATH_RE = /^\\\\\\\\([.?])/;\n/**\n * All backslashes except those escaping special characters.\n * Windows: !()+@{}\n * https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions\n */\nconst WINDOWS_BACKSLASHES_RE = /\\\\(?![!()+@[\\]{}])/g;\n/**\n * Designed to work only with simple paths: `dir\\\\file`.\n */\nfunction unixify(filepath) {\n return filepath.replace(/\\\\/g, '/');\n}\nexports.unixify = unixify;\nfunction makeAbsolute(cwd, filepath) {\n return path.resolve(cwd, filepath);\n}\nexports.makeAbsolute = makeAbsolute;\nfunction removeLeadingDotSegment(entry) {\n // We do not use `startsWith` because this is 10x slower than current implementation for some cases.\n // eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with\n if (entry.charAt(0) === '.') {\n const secondCharactery = entry.charAt(1);\n if (secondCharactery === '/' || secondCharactery === '\\\\') {\n return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);\n }\n }\n return entry;\n}\nexports.removeLeadingDotSegment = removeLeadingDotSegment;\nexports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;\nfunction escapeWindowsPath(pattern) {\n return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, '\\\\$2');\n}\nexports.escapeWindowsPath = escapeWindowsPath;\nfunction escapePosixPath(pattern) {\n return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, '\\\\$2');\n}\nexports.escapePosixPath = escapePosixPath;\nexports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;\nfunction convertWindowsPathToPattern(filepath) {\n return escapeWindowsPath(filepath)\n .replace(DOS_DEVICE_PATH_RE, '//$1')\n .replace(WINDOWS_BACKSLASHES_RE, '/');\n}\nexports.convertWindowsPathToPattern = convertWindowsPathToPattern;\nfunction convertPosixPathToPattern(filepath) {\n return escapePosixPath(filepath);\n}\nexports.convertPosixPathToPattern = convertPosixPathToPattern;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;\nconst path = require(\"path\");\nconst globParent = require(\"glob-parent\");\nconst micromatch = require(\"micromatch\");\nconst GLOBSTAR = '**';\nconst ESCAPE_SYMBOL = '\\\\';\nconst COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/;\nconst REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\\[[^[]*]/;\nconst REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\\([^(]*\\|[^|]*\\)/;\nconst GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\\([^(]*\\)/;\nconst BRACE_EXPANSION_SEPARATORS_RE = /,|\\.\\./;\n/**\n * Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string.\n * The latter is due to the presence of the device path at the beginning of the UNC path.\n */\nconst DOUBLE_SLASH_RE = /(?!^)\\/{2,}/g;\nfunction isStaticPattern(pattern, options = {}) {\n return !isDynamicPattern(pattern, options);\n}\nexports.isStaticPattern = isStaticPattern;\nfunction isDynamicPattern(pattern, options = {}) {\n /**\n * A special case with an empty string is necessary for matching patterns that start with a forward slash.\n * An empty string cannot be a dynamic pattern.\n * For example, the pattern `/lib/*` will be spread into parts: '', 'lib', '*'.\n */\n if (pattern === '') {\n return false;\n }\n /**\n * When the `caseSensitiveMatch` option is disabled, all patterns must be marked as dynamic, because we cannot check\n * filepath directly (without read directory).\n */\n if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) {\n return true;\n }\n if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) {\n return true;\n }\n if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) {\n return true;\n }\n if (options.braceExpansion !== false && hasBraceExpansion(pattern)) {\n return true;\n }\n return false;\n}\nexports.isDynamicPattern = isDynamicPattern;\nfunction hasBraceExpansion(pattern) {\n const openingBraceIndex = pattern.indexOf('{');\n if (openingBraceIndex === -1) {\n return false;\n }\n const closingBraceIndex = pattern.indexOf('}', openingBraceIndex + 1);\n if (closingBraceIndex === -1) {\n return false;\n }\n const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex);\n return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent);\n}\nfunction convertToPositivePattern(pattern) {\n return isNegativePattern(pattern) ? pattern.slice(1) : pattern;\n}\nexports.convertToPositivePattern = convertToPositivePattern;\nfunction convertToNegativePattern(pattern) {\n return '!' + pattern;\n}\nexports.convertToNegativePattern = convertToNegativePattern;\nfunction isNegativePattern(pattern) {\n return pattern.startsWith('!') && pattern[1] !== '(';\n}\nexports.isNegativePattern = isNegativePattern;\nfunction isPositivePattern(pattern) {\n return !isNegativePattern(pattern);\n}\nexports.isPositivePattern = isPositivePattern;\nfunction getNegativePatterns(patterns) {\n return patterns.filter(isNegativePattern);\n}\nexports.getNegativePatterns = getNegativePatterns;\nfunction getPositivePatterns(patterns) {\n return patterns.filter(isPositivePattern);\n}\nexports.getPositivePatterns = getPositivePatterns;\n/**\n * Returns patterns that can be applied inside the current directory.\n *\n * @example\n * // ['./*', '*', 'a/*']\n * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])\n */\nfunction getPatternsInsideCurrentDirectory(patterns) {\n return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern));\n}\nexports.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory;\n/**\n * Returns patterns to be expanded relative to (outside) the current directory.\n *\n * @example\n * // ['../*', './../*']\n * getPatternsInsideCurrentDirectory(['./*', '*', 'a/*', '../*', './../*'])\n */\nfunction getPatternsOutsideCurrentDirectory(patterns) {\n return patterns.filter(isPatternRelatedToParentDirectory);\n}\nexports.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory;\nfunction isPatternRelatedToParentDirectory(pattern) {\n return pattern.startsWith('..') || pattern.startsWith('./..');\n}\nexports.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory;\nfunction getBaseDirectory(pattern) {\n return globParent(pattern, { flipBackslashes: false });\n}\nexports.getBaseDirectory = getBaseDirectory;\nfunction hasGlobStar(pattern) {\n return pattern.includes(GLOBSTAR);\n}\nexports.hasGlobStar = hasGlobStar;\nfunction endsWithSlashGlobStar(pattern) {\n return pattern.endsWith('/' + GLOBSTAR);\n}\nexports.endsWithSlashGlobStar = endsWithSlashGlobStar;\nfunction isAffectDepthOfReadingPattern(pattern) {\n const basename = path.basename(pattern);\n return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);\n}\nexports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;\nfunction expandPatternsWithBraceExpansion(patterns) {\n return patterns.reduce((collection, pattern) => {\n return collection.concat(expandBraceExpansion(pattern));\n }, []);\n}\nexports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;\nfunction expandBraceExpansion(pattern) {\n const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });\n /**\n * Sort the patterns by length so that the same depth patterns are processed side by side.\n * `a/{b,}/{c,}/*` – `['a///*', 'a/b//*', 'a//c/*', 'a/b/c/*']`\n */\n patterns.sort((a, b) => a.length - b.length);\n /**\n * Micromatch can return an empty string in the case of patterns like `{a,}`.\n */\n return patterns.filter((pattern) => pattern !== '');\n}\nexports.expandBraceExpansion = expandBraceExpansion;\nfunction getPatternParts(pattern, options) {\n let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true }));\n /**\n * The scan method returns an empty array in some cases.\n * See micromatch/picomatch#58 for more details.\n */\n if (parts.length === 0) {\n parts = [pattern];\n }\n /**\n * The scan method does not return an empty part for the pattern with a forward slash.\n * This is another part of micromatch/picomatch#58.\n */\n if (parts[0].startsWith('/')) {\n parts[0] = parts[0].slice(1);\n parts.unshift('');\n }\n return parts;\n}\nexports.getPatternParts = getPatternParts;\nfunction makeRe(pattern, options) {\n return micromatch.makeRe(pattern, options);\n}\nexports.makeRe = makeRe;\nfunction convertPatternsToRe(patterns, options) {\n return patterns.map((pattern) => makeRe(pattern, options));\n}\nexports.convertPatternsToRe = convertPatternsToRe;\nfunction matchAny(entry, patternsRe) {\n return patternsRe.some((patternRe) => patternRe.test(entry));\n}\nexports.matchAny = matchAny;\n/**\n * This package only works with forward slashes as a path separator.\n * Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes.\n */\nfunction removeDuplicateSlashes(pattern) {\n return pattern.replace(DOUBLE_SLASH_RE, '/');\n}\nexports.removeDuplicateSlashes = removeDuplicateSlashes;\nfunction partitionAbsoluteAndRelative(patterns) {\n const absolute = [];\n const relative = [];\n for (const pattern of patterns) {\n if (isAbsolute(pattern)) {\n absolute.push(pattern);\n }\n else {\n relative.push(pattern);\n }\n }\n return [absolute, relative];\n}\nexports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;\nfunction isAbsolute(pattern) {\n return path.isAbsolute(pattern);\n}\nexports.isAbsolute = isAbsolute;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.merge = void 0;\nconst merge2 = require(\"merge2\");\nfunction merge(streams) {\n const mergedStream = merge2(streams);\n streams.forEach((stream) => {\n stream.once('error', (error) => mergedStream.emit('error', error));\n });\n mergedStream.once('close', () => propagateCloseEventToSources(streams));\n mergedStream.once('end', () => propagateCloseEventToSources(streams));\n return mergedStream;\n}\nexports.merge = merge;\nfunction propagateCloseEventToSources(streams) {\n streams.forEach((stream) => stream.emit('close'));\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isEmpty = exports.isString = void 0;\nfunction isString(input) {\n return typeof input === 'string';\n}\nexports.isString = isString;\nfunction isEmpty(input) {\n return input === '';\n}\nexports.isEmpty = isEmpty;\n","'use strict'\n\n/* eslint-disable no-var */\n\nvar reusify = require('reusify')\n\nfunction fastqueue (context, worker, _concurrency) {\n if (typeof context === 'function') {\n _concurrency = worker\n worker = context\n context = null\n }\n\n if (!(_concurrency >= 1)) {\n throw new Error('fastqueue concurrency must be equal to or greater than 1')\n }\n\n var cache = reusify(Task)\n var queueHead = null\n var queueTail = null\n var _running = 0\n var errorHandler = null\n\n var self = {\n push: push,\n drain: noop,\n saturated: noop,\n pause: pause,\n paused: false,\n\n get concurrency () {\n return _concurrency\n },\n set concurrency (value) {\n if (!(value >= 1)) {\n throw new Error('fastqueue concurrency must be equal to or greater than 1')\n }\n _concurrency = value\n\n if (self.paused) return\n for (; queueHead && _running < _concurrency;) {\n _running++\n release()\n }\n },\n\n running: running,\n resume: resume,\n idle: idle,\n length: length,\n getQueue: getQueue,\n unshift: unshift,\n empty: noop,\n kill: kill,\n killAndDrain: killAndDrain,\n error: error\n }\n\n return self\n\n function running () {\n return _running\n }\n\n function pause () {\n self.paused = true\n }\n\n function length () {\n var current = queueHead\n var counter = 0\n\n while (current) {\n current = current.next\n counter++\n }\n\n return counter\n }\n\n function getQueue () {\n var current = queueHead\n var tasks = []\n\n while (current) {\n tasks.push(current.value)\n current = current.next\n }\n\n return tasks\n }\n\n function resume () {\n if (!self.paused) return\n self.paused = false\n if (queueHead === null) {\n _running++\n release()\n return\n }\n for (; queueHead && _running < _concurrency;) {\n _running++\n release()\n }\n }\n\n function idle () {\n return _running === 0 && self.length() === 0\n }\n\n function push (value, done) {\n var current = cache.get()\n\n current.context = context\n current.release = release\n current.value = value\n current.callback = done || noop\n current.errorHandler = errorHandler\n\n if (_running >= _concurrency || self.paused) {\n if (queueTail) {\n queueTail.next = current\n queueTail = current\n } else {\n queueHead = current\n queueTail = current\n self.saturated()\n }\n } else {\n _running++\n worker.call(context, current.value, current.worked)\n }\n }\n\n function unshift (value, done) {\n var current = cache.get()\n\n current.context = context\n current.release = release\n current.value = value\n current.callback = done || noop\n current.errorHandler = errorHandler\n\n if (_running >= _concurrency || self.paused) {\n if (queueHead) {\n current.next = queueHead\n queueHead = current\n } else {\n queueHead = current\n queueTail = current\n self.saturated()\n }\n } else {\n _running++\n worker.call(context, current.value, current.worked)\n }\n }\n\n function release (holder) {\n if (holder) {\n cache.release(holder)\n }\n var next = queueHead\n if (next && _running <= _concurrency) {\n if (!self.paused) {\n if (queueTail === queueHead) {\n queueTail = null\n }\n queueHead = next.next\n next.next = null\n worker.call(context, next.value, next.worked)\n if (queueTail === null) {\n self.empty()\n }\n } else {\n _running--\n }\n } else if (--_running === 0) {\n self.drain()\n }\n }\n\n function kill () {\n queueHead = null\n queueTail = null\n self.drain = noop\n }\n\n function killAndDrain () {\n queueHead = null\n queueTail = null\n self.drain()\n self.drain = noop\n }\n\n function error (handler) {\n errorHandler = handler\n }\n}\n\nfunction noop () {}\n\nfunction Task () {\n this.value = null\n this.callback = noop\n this.next = null\n this.release = noop\n this.context = null\n this.errorHandler = null\n\n var self = this\n\n this.worked = function worked (err, result) {\n var callback = self.callback\n var errorHandler = self.errorHandler\n var val = self.value\n self.value = null\n self.callback = noop\n if (self.errorHandler) {\n errorHandler(err, val)\n }\n callback.call(self.context, err, result)\n self.release(self)\n }\n}\n\nfunction queueAsPromised (context, worker, _concurrency) {\n if (typeof context === 'function') {\n _concurrency = worker\n worker = context\n context = null\n }\n\n function asyncWrapper (arg, cb) {\n worker.call(this, arg)\n .then(function (res) {\n cb(null, res)\n }, cb)\n }\n\n var queue = fastqueue(context, asyncWrapper, _concurrency)\n\n var pushCb = queue.push\n var unshiftCb = queue.unshift\n\n queue.push = push\n queue.unshift = unshift\n queue.drained = drained\n\n return queue\n\n function push (value) {\n var p = new Promise(function (resolve, reject) {\n pushCb(value, function (err, result) {\n if (err) {\n reject(err)\n return\n }\n resolve(result)\n })\n })\n\n // Let's fork the promise chain to\n // make the error bubble up to the user but\n // not lead to a unhandledRejection\n p.catch(noop)\n\n return p\n }\n\n function unshift (value) {\n var p = new Promise(function (resolve, reject) {\n unshiftCb(value, function (err, result) {\n if (err) {\n reject(err)\n return\n }\n resolve(result)\n })\n })\n\n // Let's fork the promise chain to\n // make the error bubble up to the user but\n // not lead to a unhandledRejection\n p.catch(noop)\n\n return p\n }\n\n function drained () {\n var p = new Promise(function (resolve) {\n process.nextTick(function () {\n if (queue.idle()) {\n resolve()\n } else {\n var previousDrain = queue.drain\n queue.drain = function () {\n if (typeof previousDrain === 'function') previousDrain()\n resolve()\n queue.drain = previousDrain\n }\n }\n })\n })\n\n return p\n }\n}\n\nmodule.exports = fastqueue\nmodule.exports.promise = queueAsPromised\n","/*!\n * fill-range <https://github.com/jonschlinkert/fill-range>\n *\n * Copyright (c) 2014-present, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\nconst util = require('util');\nconst toRegexRange = require('to-regex-range');\n\nconst isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\n\nconst transform = toNumber => {\n return value => toNumber === true ? Number(value) : String(value);\n};\n\nconst isValidValue = value => {\n return typeof value === 'number' || (typeof value === 'string' && value !== '');\n};\n\nconst isNumber = num => Number.isInteger(+num);\n\nconst zeros = input => {\n let value = `${input}`;\n let index = -1;\n if (value[0] === '-') value = value.slice(1);\n if (value === '0') return false;\n while (value[++index] === '0');\n return index > 0;\n};\n\nconst stringify = (start, end, options) => {\n if (typeof start === 'string' || typeof end === 'string') {\n return true;\n }\n return options.stringify === true;\n};\n\nconst pad = (input, maxLength, toNumber) => {\n if (maxLength > 0) {\n let dash = input[0] === '-' ? '-' : '';\n if (dash) input = input.slice(1);\n input = (dash + input.padStart(dash ? maxLength - 1 : maxLength, '0'));\n }\n if (toNumber === false) {\n return String(input);\n }\n return input;\n};\n\nconst toMaxLen = (input, maxLength) => {\n let negative = input[0] === '-' ? '-' : '';\n if (negative) {\n input = input.slice(1);\n maxLength--;\n }\n while (input.length < maxLength) input = '0' + input;\n return negative ? ('-' + input) : input;\n};\n\nconst toSequence = (parts, options, maxLen) => {\n parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);\n parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);\n\n let prefix = options.capture ? '' : '?:';\n let positives = '';\n let negatives = '';\n let result;\n\n if (parts.positives.length) {\n positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|');\n }\n\n if (parts.negatives.length) {\n negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`;\n }\n\n if (positives && negatives) {\n result = `${positives}|${negatives}`;\n } else {\n result = positives || negatives;\n }\n\n if (options.wrap) {\n return `(${prefix}${result})`;\n }\n\n return result;\n};\n\nconst toRange = (a, b, isNumbers, options) => {\n if (isNumbers) {\n return toRegexRange(a, b, { wrap: false, ...options });\n }\n\n let start = String.fromCharCode(a);\n if (a === b) return start;\n\n let stop = String.fromCharCode(b);\n return `[${start}-${stop}]`;\n};\n\nconst toRegex = (start, end, options) => {\n if (Array.isArray(start)) {\n let wrap = options.wrap === true;\n let prefix = options.capture ? '' : '?:';\n return wrap ? `(${prefix}${start.join('|')})` : start.join('|');\n }\n return toRegexRange(start, end, options);\n};\n\nconst rangeError = (...args) => {\n return new RangeError('Invalid range arguments: ' + util.inspect(...args));\n};\n\nconst invalidRange = (start, end, options) => {\n if (options.strictRanges === true) throw rangeError([start, end]);\n return [];\n};\n\nconst invalidStep = (step, options) => {\n if (options.strictRanges === true) {\n throw new TypeError(`Expected step \"${step}\" to be a number`);\n }\n return [];\n};\n\nconst fillNumbers = (start, end, step = 1, options = {}) => {\n let a = Number(start);\n let b = Number(end);\n\n if (!Number.isInteger(a) || !Number.isInteger(b)) {\n if (options.strictRanges === true) throw rangeError([start, end]);\n return [];\n }\n\n // fix negative zero\n if (a === 0) a = 0;\n if (b === 0) b = 0;\n\n let descending = a > b;\n let startString = String(start);\n let endString = String(end);\n let stepString = String(step);\n step = Math.max(Math.abs(step), 1);\n\n let padded = zeros(startString) || zeros(endString) || zeros(stepString);\n let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;\n let toNumber = padded === false && stringify(start, end, options) === false;\n let format = options.transform || transform(toNumber);\n\n if (options.toRegex && step === 1) {\n return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);\n }\n\n let parts = { negatives: [], positives: [] };\n let push = num => parts[num < 0 ? 'negatives' : 'positives'].push(Math.abs(num));\n let range = [];\n let index = 0;\n\n while (descending ? a >= b : a <= b) {\n if (options.toRegex === true && step > 1) {\n push(a);\n } else {\n range.push(pad(format(a, index), maxLen, toNumber));\n }\n a = descending ? a - step : a + step;\n index++;\n }\n\n if (options.toRegex === true) {\n return step > 1\n ? toSequence(parts, options, maxLen)\n : toRegex(range, null, { wrap: false, ...options });\n }\n\n return range;\n};\n\nconst fillLetters = (start, end, step = 1, options = {}) => {\n if ((!isNumber(start) && start.length > 1) || (!isNumber(end) && end.length > 1)) {\n return invalidRange(start, end, options);\n }\n\n let format = options.transform || (val => String.fromCharCode(val));\n let a = `${start}`.charCodeAt(0);\n let b = `${end}`.charCodeAt(0);\n\n let descending = a > b;\n let min = Math.min(a, b);\n let max = Math.max(a, b);\n\n if (options.toRegex && step === 1) {\n return toRange(min, max, false, options);\n }\n\n let range = [];\n let index = 0;\n\n while (descending ? a >= b : a <= b) {\n range.push(format(a, index));\n a = descending ? a - step : a + step;\n index++;\n }\n\n if (options.toRegex === true) {\n return toRegex(range, null, { wrap: false, options });\n }\n\n return range;\n};\n\nconst fill = (start, end, step, options = {}) => {\n if (end == null && isValidValue(start)) {\n return [start];\n }\n\n if (!isValidValue(start) || !isValidValue(end)) {\n return invalidRange(start, end, options);\n }\n\n if (typeof step === 'function') {\n return fill(start, end, 1, { transform: step });\n }\n\n if (isObject(step)) {\n return fill(start, end, 0, step);\n }\n\n let opts = { ...options };\n if (opts.capture === true) opts.wrap = true;\n step = step || opts.step || 1;\n\n if (!isNumber(step)) {\n if (step != null && !isObject(step)) return invalidStep(step, opts);\n return fill(start, end, 1, step);\n }\n\n if (isNumber(start) && isNumber(end)) {\n return fillNumbers(start, end, step, opts);\n }\n\n return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);\n};\n\nmodule.exports = fill;\n","'use strict'\n\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst mkdirsSync = require('../mkdirs').mkdirsSync\nconst utimesMillisSync = require('../util/utimes').utimesMillisSync\nconst stat = require('../util/stat')\n\nfunction copySync (src, dest, opts) {\n if (typeof opts === 'function') {\n opts = { filter: opts }\n }\n\n opts = opts || {}\n opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now\n opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber\n\n // Warn about using preserveTimestamps on 32-bit node\n if (opts.preserveTimestamps && process.arch === 'ia32') {\n process.emitWarning(\n 'Using the preserveTimestamps option in 32-bit node is not recommended;\\n\\n' +\n '\\tsee https://github.com/jprichardson/node-fs-extra/issues/269',\n 'Warning', 'fs-extra-WARN0002'\n )\n }\n\n const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts)\n stat.checkParentPathsSync(src, srcStat, dest, 'copy')\n if (opts.filter && !opts.filter(src, dest)) return\n const destParent = path.dirname(dest)\n if (!fs.existsSync(destParent)) mkdirsSync(destParent)\n return getStats(destStat, src, dest, opts)\n}\n\nfunction getStats (destStat, src, dest, opts) {\n const statSync = opts.dereference ? fs.statSync : fs.lstatSync\n const srcStat = statSync(src)\n\n if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)\n else if (srcStat.isFile() ||\n srcStat.isCharacterDevice() ||\n srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)\n else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)\n else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)\n else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)\n throw new Error(`Unknown file: ${src}`)\n}\n\nfunction onFile (srcStat, destStat, src, dest, opts) {\n if (!destStat) return copyFile(srcStat, src, dest, opts)\n return mayCopyFile(srcStat, src, dest, opts)\n}\n\nfunction mayCopyFile (srcStat, src, dest, opts) {\n if (opts.overwrite) {\n fs.unlinkSync(dest)\n return copyFile(srcStat, src, dest, opts)\n } else if (opts.errorOnExist) {\n throw new Error(`'${dest}' already exists`)\n }\n}\n\nfunction copyFile (srcStat, src, dest, opts) {\n fs.copyFileSync(src, dest)\n if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest)\n return setDestMode(dest, srcStat.mode)\n}\n\nfunction handleTimestamps (srcMode, src, dest) {\n // Make sure the file is writable before setting the timestamp\n // otherwise open fails with EPERM when invoked with 'r+'\n // (through utimes call)\n if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode)\n return setDestTimestamps(src, dest)\n}\n\nfunction fileIsNotWritable (srcMode) {\n return (srcMode & 0o200) === 0\n}\n\nfunction makeFileWritable (dest, srcMode) {\n return setDestMode(dest, srcMode | 0o200)\n}\n\nfunction setDestMode (dest, srcMode) {\n return fs.chmodSync(dest, srcMode)\n}\n\nfunction setDestTimestamps (src, dest) {\n // The initial srcStat.atime cannot be trusted\n // because it is modified by the read(2) system call\n // (See https://nodejs.org/api/fs.html#fs_stat_time_values)\n const updatedSrcStat = fs.statSync(src)\n return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime)\n}\n\nfunction onDir (srcStat, destStat, src, dest, opts) {\n if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)\n return copyDir(src, dest, opts)\n}\n\nfunction mkDirAndCopy (srcMode, src, dest, opts) {\n fs.mkdirSync(dest)\n copyDir(src, dest, opts)\n return setDestMode(dest, srcMode)\n}\n\nfunction copyDir (src, dest, opts) {\n const dir = fs.opendirSync(src)\n\n try {\n let dirent\n\n while ((dirent = dir.readSync()) !== null) {\n copyDirItem(dirent.name, src, dest, opts)\n }\n } finally {\n dir.closeSync()\n }\n}\n\nfunction copyDirItem (item, src, dest, opts) {\n const srcItem = path.join(src, item)\n const destItem = path.join(dest, item)\n if (opts.filter && !opts.filter(srcItem, destItem)) return\n const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts)\n return getStats(destStat, srcItem, destItem, opts)\n}\n\nfunction onLink (destStat, src, dest, opts) {\n let resolvedSrc = fs.readlinkSync(src)\n if (opts.dereference) {\n resolvedSrc = path.resolve(process.cwd(), resolvedSrc)\n }\n\n if (!destStat) {\n return fs.symlinkSync(resolvedSrc, dest)\n } else {\n let resolvedDest\n try {\n resolvedDest = fs.readlinkSync(dest)\n } catch (err) {\n // dest exists and is a regular file or directory,\n // Windows may throw UNKNOWN error. If dest already exists,\n // fs throws error anyway, so no need to guard against it here.\n if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)\n throw err\n }\n if (opts.dereference) {\n resolvedDest = path.resolve(process.cwd(), resolvedDest)\n }\n if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {\n throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)\n }\n\n // prevent copy if src is a subdir of dest since unlinking\n // dest in this case would result in removing src contents\n // and therefore a broken symlink would be created.\n if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {\n throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)\n }\n return copyLink(resolvedSrc, dest)\n }\n}\n\nfunction copyLink (resolvedSrc, dest) {\n fs.unlinkSync(dest)\n return fs.symlinkSync(resolvedSrc, dest)\n}\n\nmodule.exports = copySync\n","'use strict'\n\nconst fs = require('../fs')\nconst path = require('path')\nconst { mkdirs } = require('../mkdirs')\nconst { pathExists } = require('../path-exists')\nconst { utimesMillis } = require('../util/utimes')\nconst stat = require('../util/stat')\nconst { asyncIteratorConcurrentProcess } = require('../util/async')\n\nasync function copy (src, dest, opts = {}) {\n if (typeof opts === 'function') {\n opts = { filter: opts }\n }\n\n opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now\n opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber\n\n // Warn about using preserveTimestamps on 32-bit node\n if (opts.preserveTimestamps && process.arch === 'ia32') {\n process.emitWarning(\n 'Using the preserveTimestamps option in 32-bit node is not recommended;\\n\\n' +\n '\\tsee https://github.com/jprichardson/node-fs-extra/issues/269',\n 'Warning', 'fs-extra-WARN0001'\n )\n }\n\n const { srcStat, destStat } = await stat.checkPaths(src, dest, 'copy', opts)\n\n await stat.checkParentPaths(src, srcStat, dest, 'copy')\n\n const include = await runFilter(src, dest, opts)\n\n if (!include) return\n\n // check if the parent of dest exists, and create it if it doesn't exist\n const destParent = path.dirname(dest)\n const dirExists = await pathExists(destParent)\n if (!dirExists) {\n await mkdirs(destParent)\n }\n\n await getStatsAndPerformCopy(destStat, src, dest, opts)\n}\n\nasync function runFilter (src, dest, opts) {\n if (!opts.filter) return true\n return opts.filter(src, dest)\n}\n\nasync function getStatsAndPerformCopy (destStat, src, dest, opts) {\n const statFn = opts.dereference ? fs.stat : fs.lstat\n const srcStat = await statFn(src)\n\n if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)\n\n if (\n srcStat.isFile() ||\n srcStat.isCharacterDevice() ||\n srcStat.isBlockDevice()\n ) return onFile(srcStat, destStat, src, dest, opts)\n\n if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)\n if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)\n if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)\n throw new Error(`Unknown file: ${src}`)\n}\n\nasync function onFile (srcStat, destStat, src, dest, opts) {\n if (!destStat) return copyFile(srcStat, src, dest, opts)\n\n if (opts.overwrite) {\n await fs.unlink(dest)\n return copyFile(srcStat, src, dest, opts)\n }\n if (opts.errorOnExist) {\n throw new Error(`'${dest}' already exists`)\n }\n}\n\nasync function copyFile (srcStat, src, dest, opts) {\n await fs.copyFile(src, dest)\n if (opts.preserveTimestamps) {\n // Make sure the file is writable before setting the timestamp\n // otherwise open fails with EPERM when invoked with 'r+'\n // (through utimes call)\n if (fileIsNotWritable(srcStat.mode)) {\n await makeFileWritable(dest, srcStat.mode)\n }\n\n // Set timestamps and mode correspondingly\n\n // Note that The initial srcStat.atime cannot be trusted\n // because it is modified by the read(2) system call\n // (See https://nodejs.org/api/fs.html#fs_stat_time_values)\n const updatedSrcStat = await fs.stat(src)\n await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime)\n }\n\n return fs.chmod(dest, srcStat.mode)\n}\n\nfunction fileIsNotWritable (srcMode) {\n return (srcMode & 0o200) === 0\n}\n\nfunction makeFileWritable (dest, srcMode) {\n return fs.chmod(dest, srcMode | 0o200)\n}\n\nasync function onDir (srcStat, destStat, src, dest, opts) {\n // the dest directory might not exist, create it\n if (!destStat) {\n await fs.mkdir(dest)\n }\n\n // iterate through the files in the current directory to copy everything\n await asyncIteratorConcurrentProcess(await fs.opendir(src), async (item) => {\n const srcItem = path.join(src, item.name)\n const destItem = path.join(dest, item.name)\n\n const include = await runFilter(srcItem, destItem, opts)\n // only copy the item if it matches the filter function\n if (include) {\n const { destStat } = await stat.checkPaths(srcItem, destItem, 'copy', opts)\n // If the item is a copyable file, `getStatsAndPerformCopy` will copy it\n // If the item is a directory, `getStatsAndPerformCopy` will call `onDir` recursively\n await getStatsAndPerformCopy(destStat, srcItem, destItem, opts)\n }\n })\n\n if (!destStat) {\n await fs.chmod(dest, srcStat.mode)\n }\n}\n\nasync function onLink (destStat, src, dest, opts) {\n let resolvedSrc = await fs.readlink(src)\n if (opts.dereference) {\n resolvedSrc = path.resolve(process.cwd(), resolvedSrc)\n }\n if (!destStat) {\n return fs.symlink(resolvedSrc, dest)\n }\n\n let resolvedDest = null\n try {\n resolvedDest = await fs.readlink(dest)\n } catch (e) {\n // dest exists and is a regular file or directory,\n // Windows may throw UNKNOWN error. If dest already exists,\n // fs throws error anyway, so no need to guard against it here.\n if (e.code === 'EINVAL' || e.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest)\n throw e\n }\n if (opts.dereference) {\n resolvedDest = path.resolve(process.cwd(), resolvedDest)\n }\n if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {\n throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)\n }\n\n // do not copy if src is a subdir of dest since unlinking\n // dest in this case would result in removing src contents\n // and therefore a broken symlink would be created.\n if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {\n throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)\n }\n\n // copy the link\n await fs.unlink(dest)\n return fs.symlink(resolvedSrc, dest)\n}\n\nmodule.exports = copy\n","'use strict'\n\nconst u = require('universalify').fromPromise\nmodule.exports = {\n copy: u(require('./copy')),\n copySync: require('./copy-sync')\n}\n","'use strict'\n\nconst u = require('universalify').fromPromise\nconst fs = require('../fs')\nconst path = require('path')\nconst mkdir = require('../mkdirs')\nconst remove = require('../remove')\n\nconst emptyDir = u(async function emptyDir (dir) {\n let items\n try {\n items = await fs.readdir(dir)\n } catch {\n return mkdir.mkdirs(dir)\n }\n\n return Promise.all(items.map(item => remove.remove(path.join(dir, item))))\n})\n\nfunction emptyDirSync (dir) {\n let items\n try {\n items = fs.readdirSync(dir)\n } catch {\n return mkdir.mkdirsSync(dir)\n }\n\n items.forEach(item => {\n item = path.join(dir, item)\n remove.removeSync(item)\n })\n}\n\nmodule.exports = {\n emptyDirSync,\n emptydirSync: emptyDirSync,\n emptyDir,\n emptydir: emptyDir\n}\n","'use strict'\n\nconst u = require('universalify').fromPromise\nconst path = require('path')\nconst fs = require('../fs')\nconst mkdir = require('../mkdirs')\n\nasync function createFile (file) {\n let stats\n try {\n stats = await fs.stat(file)\n } catch { }\n if (stats && stats.isFile()) return\n\n const dir = path.dirname(file)\n\n let dirStats = null\n try {\n dirStats = await fs.stat(dir)\n } catch (err) {\n // if the directory doesn't exist, make it\n if (err.code === 'ENOENT') {\n await mkdir.mkdirs(dir)\n await fs.writeFile(file, '')\n return\n } else {\n throw err\n }\n }\n\n if (dirStats.isDirectory()) {\n await fs.writeFile(file, '')\n } else {\n // parent is not a directory\n // This is just to cause an internal ENOTDIR error to be thrown\n await fs.readdir(dir)\n }\n}\n\nfunction createFileSync (file) {\n let stats\n try {\n stats = fs.statSync(file)\n } catch { }\n if (stats && stats.isFile()) return\n\n const dir = path.dirname(file)\n try {\n if (!fs.statSync(dir).isDirectory()) {\n // parent is not a directory\n // This is just to cause an internal ENOTDIR error to be thrown\n fs.readdirSync(dir)\n }\n } catch (err) {\n // If the stat call above failed because the directory doesn't exist, create it\n if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)\n else throw err\n }\n\n fs.writeFileSync(file, '')\n}\n\nmodule.exports = {\n createFile: u(createFile),\n createFileSync\n}\n","'use strict'\n\nconst { createFile, createFileSync } = require('./file')\nconst { createLink, createLinkSync } = require('./link')\nconst { createSymlink, createSymlinkSync } = require('./symlink')\n\nmodule.exports = {\n // file\n createFile,\n createFileSync,\n ensureFile: createFile,\n ensureFileSync: createFileSync,\n // link\n createLink,\n createLinkSync,\n ensureLink: createLink,\n ensureLinkSync: createLinkSync,\n // symlink\n createSymlink,\n createSymlinkSync,\n ensureSymlink: createSymlink,\n ensureSymlinkSync: createSymlinkSync\n}\n","'use strict'\n\nconst u = require('universalify').fromPromise\nconst path = require('path')\nconst fs = require('../fs')\nconst mkdir = require('../mkdirs')\nconst { pathExists } = require('../path-exists')\nconst { areIdentical } = require('../util/stat')\n\nasync function createLink (srcpath, dstpath) {\n let dstStat\n try {\n dstStat = await fs.lstat(dstpath)\n } catch {\n // ignore error\n }\n\n let srcStat\n try {\n srcStat = await fs.lstat(srcpath)\n } catch (err) {\n err.message = err.message.replace('lstat', 'ensureLink')\n throw err\n }\n\n if (dstStat && areIdentical(srcStat, dstStat)) return\n\n const dir = path.dirname(dstpath)\n\n const dirExists = await pathExists(dir)\n\n if (!dirExists) {\n await mkdir.mkdirs(dir)\n }\n\n await fs.link(srcpath, dstpath)\n}\n\nfunction createLinkSync (srcpath, dstpath) {\n let dstStat\n try {\n dstStat = fs.lstatSync(dstpath)\n } catch {}\n\n try {\n const srcStat = fs.lstatSync(srcpath)\n if (dstStat && areIdentical(srcStat, dstStat)) return\n } catch (err) {\n err.message = err.message.replace('lstat', 'ensureLink')\n throw err\n }\n\n const dir = path.dirname(dstpath)\n const dirExists = fs.existsSync(dir)\n if (dirExists) return fs.linkSync(srcpath, dstpath)\n mkdir.mkdirsSync(dir)\n\n return fs.linkSync(srcpath, dstpath)\n}\n\nmodule.exports = {\n createLink: u(createLink),\n createLinkSync\n}\n","'use strict'\n\nconst path = require('path')\nconst fs = require('../fs')\nconst { pathExists } = require('../path-exists')\n\nconst u = require('universalify').fromPromise\n\n/**\n * Function that returns two types of paths, one relative to symlink, and one\n * relative to the current working directory. Checks if path is absolute or\n * relative. If the path is relative, this function checks if the path is\n * relative to symlink or relative to current working directory. This is an\n * initiative to find a smarter `srcpath` to supply when building symlinks.\n * This allows you to determine which path to use out of one of three possible\n * types of source paths. The first is an absolute path. This is detected by\n * `path.isAbsolute()`. When an absolute path is provided, it is checked to\n * see if it exists. If it does it's used, if not an error is returned\n * (callback)/ thrown (sync). The other two options for `srcpath` are a\n * relative url. By default Node's `fs.symlink` works by creating a symlink\n * using `dstpath` and expects the `srcpath` to be relative to the newly\n * created symlink. If you provide a `srcpath` that does not exist on the file\n * system it results in a broken symlink. To minimize this, the function\n * checks to see if the 'relative to symlink' source file exists, and if it\n * does it will use it. If it does not, it checks if there's a file that\n * exists that is relative to the current working directory, if does its used.\n * This preserves the expectations of the original fs.symlink spec and adds\n * the ability to pass in `relative to current working direcotry` paths.\n */\n\nasync function symlinkPaths (srcpath, dstpath) {\n if (path.isAbsolute(srcpath)) {\n try {\n await fs.lstat(srcpath)\n } catch (err) {\n err.message = err.message.replace('lstat', 'ensureSymlink')\n throw err\n }\n\n return {\n toCwd: srcpath,\n toDst: srcpath\n }\n }\n\n const dstdir = path.dirname(dstpath)\n const relativeToDst = path.join(dstdir, srcpath)\n\n const exists = await pathExists(relativeToDst)\n if (exists) {\n return {\n toCwd: relativeToDst,\n toDst: srcpath\n }\n }\n\n try {\n await fs.lstat(srcpath)\n } catch (err) {\n err.message = err.message.replace('lstat', 'ensureSymlink')\n throw err\n }\n\n return {\n toCwd: srcpath,\n toDst: path.relative(dstdir, srcpath)\n }\n}\n\nfunction symlinkPathsSync (srcpath, dstpath) {\n if (path.isAbsolute(srcpath)) {\n const exists = fs.existsSync(srcpath)\n if (!exists) throw new Error('absolute srcpath does not exist')\n return {\n toCwd: srcpath,\n toDst: srcpath\n }\n }\n\n const dstdir = path.dirname(dstpath)\n const relativeToDst = path.join(dstdir, srcpath)\n const exists = fs.existsSync(relativeToDst)\n if (exists) {\n return {\n toCwd: relativeToDst,\n toDst: srcpath\n }\n }\n\n const srcExists = fs.existsSync(srcpath)\n if (!srcExists) throw new Error('relative srcpath does not exist')\n return {\n toCwd: srcpath,\n toDst: path.relative(dstdir, srcpath)\n }\n}\n\nmodule.exports = {\n symlinkPaths: u(symlinkPaths),\n symlinkPathsSync\n}\n","'use strict'\n\nconst fs = require('../fs')\nconst u = require('universalify').fromPromise\n\nasync function symlinkType (srcpath, type) {\n if (type) return type\n\n let stats\n try {\n stats = await fs.lstat(srcpath)\n } catch {\n return 'file'\n }\n\n return (stats && stats.isDirectory()) ? 'dir' : 'file'\n}\n\nfunction symlinkTypeSync (srcpath, type) {\n if (type) return type\n\n let stats\n try {\n stats = fs.lstatSync(srcpath)\n } catch {\n return 'file'\n }\n return (stats && stats.isDirectory()) ? 'dir' : 'file'\n}\n\nmodule.exports = {\n symlinkType: u(symlinkType),\n symlinkTypeSync\n}\n","'use strict'\n\nconst u = require('universalify').fromPromise\nconst path = require('path')\nconst fs = require('../fs')\n\nconst { mkdirs, mkdirsSync } = require('../mkdirs')\n\nconst { symlinkPaths, symlinkPathsSync } = require('./symlink-paths')\nconst { symlinkType, symlinkTypeSync } = require('./symlink-type')\n\nconst { pathExists } = require('../path-exists')\n\nconst { areIdentical } = require('../util/stat')\n\nasync function createSymlink (srcpath, dstpath, type) {\n let stats\n try {\n stats = await fs.lstat(dstpath)\n } catch { }\n\n if (stats && stats.isSymbolicLink()) {\n const [srcStat, dstStat] = await Promise.all([\n fs.stat(srcpath),\n fs.stat(dstpath)\n ])\n\n if (areIdentical(srcStat, dstStat)) return\n }\n\n const relative = await symlinkPaths(srcpath, dstpath)\n srcpath = relative.toDst\n const toType = await symlinkType(relative.toCwd, type)\n const dir = path.dirname(dstpath)\n\n if (!(await pathExists(dir))) {\n await mkdirs(dir)\n }\n\n return fs.symlink(srcpath, dstpath, toType)\n}\n\nfunction createSymlinkSync (srcpath, dstpath, type) {\n let stats\n try {\n stats = fs.lstatSync(dstpath)\n } catch { }\n if (stats && stats.isSymbolicLink()) {\n const srcStat = fs.statSync(srcpath)\n const dstStat = fs.statSync(dstpath)\n if (areIdentical(srcStat, dstStat)) return\n }\n\n const relative = symlinkPathsSync(srcpath, dstpath)\n srcpath = relative.toDst\n type = symlinkTypeSync(relative.toCwd, type)\n const dir = path.dirname(dstpath)\n const exists = fs.existsSync(dir)\n if (exists) return fs.symlinkSync(srcpath, dstpath, type)\n mkdirsSync(dir)\n return fs.symlinkSync(srcpath, dstpath, type)\n}\n\nmodule.exports = {\n createSymlink: u(createSymlink),\n createSymlinkSync\n}\n","'use strict'\n// This is adapted from https://github.com/normalize/mz\n// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors\nconst u = require('universalify').fromCallback\nconst fs = require('graceful-fs')\n\nconst api = [\n 'access',\n 'appendFile',\n 'chmod',\n 'chown',\n 'close',\n 'copyFile',\n 'cp',\n 'fchmod',\n 'fchown',\n 'fdatasync',\n 'fstat',\n 'fsync',\n 'ftruncate',\n 'futimes',\n 'glob',\n 'lchmod',\n 'lchown',\n 'lutimes',\n 'link',\n 'lstat',\n 'mkdir',\n 'mkdtemp',\n 'open',\n 'opendir',\n 'readdir',\n 'readFile',\n 'readlink',\n 'realpath',\n 'rename',\n 'rm',\n 'rmdir',\n 'stat',\n 'statfs',\n 'symlink',\n 'truncate',\n 'unlink',\n 'utimes',\n 'writeFile'\n].filter(key => {\n // Some commands are not available on some systems. Ex:\n // fs.cp was added in Node.js v16.7.0\n // fs.statfs was added in Node v19.6.0, v18.15.0\n // fs.glob was added in Node.js v22.0.0\n // fs.lchown is not available on at least some Linux\n return typeof fs[key] === 'function'\n})\n\n// Export cloned fs:\nObject.assign(exports, fs)\n\n// Universalify async methods:\napi.forEach(method => {\n exports[method] = u(fs[method])\n})\n\n// We differ from mz/fs in that we still ship the old, broken, fs.exists()\n// since we are a drop-in replacement for the native module\nexports.exists = function (filename, callback) {\n if (typeof callback === 'function') {\n return fs.exists(filename, callback)\n }\n return new Promise(resolve => {\n return fs.exists(filename, resolve)\n })\n}\n\n// fs.read(), fs.write(), fs.readv(), & fs.writev() need special treatment due to multiple callback args\n\nexports.read = function (fd, buffer, offset, length, position, callback) {\n if (typeof callback === 'function') {\n return fs.read(fd, buffer, offset, length, position, callback)\n }\n return new Promise((resolve, reject) => {\n fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {\n if (err) return reject(err)\n resolve({ bytesRead, buffer })\n })\n })\n}\n\n// Function signature can be\n// fs.write(fd, buffer[, offset[, length[, position]]], callback)\n// OR\n// fs.write(fd, string[, position[, encoding]], callback)\n// We need to handle both cases, so we use ...args\nexports.write = function (fd, buffer, ...args) {\n if (typeof args[args.length - 1] === 'function') {\n return fs.write(fd, buffer, ...args)\n }\n\n return new Promise((resolve, reject) => {\n fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {\n if (err) return reject(err)\n resolve({ bytesWritten, buffer })\n })\n })\n}\n\n// Function signature is\n// s.readv(fd, buffers[, position], callback)\n// We need to handle the optional arg, so we use ...args\nexports.readv = function (fd, buffers, ...args) {\n if (typeof args[args.length - 1] === 'function') {\n return fs.readv(fd, buffers, ...args)\n }\n\n return new Promise((resolve, reject) => {\n fs.readv(fd, buffers, ...args, (err, bytesRead, buffers) => {\n if (err) return reject(err)\n resolve({ bytesRead, buffers })\n })\n })\n}\n\n// Function signature is\n// s.writev(fd, buffers[, position], callback)\n// We need to handle the optional arg, so we use ...args\nexports.writev = function (fd, buffers, ...args) {\n if (typeof args[args.length - 1] === 'function') {\n return fs.writev(fd, buffers, ...args)\n }\n\n return new Promise((resolve, reject) => {\n fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {\n if (err) return reject(err)\n resolve({ bytesWritten, buffers })\n })\n })\n}\n\n// fs.realpath.native sometimes not available if fs is monkey-patched\nif (typeof fs.realpath.native === 'function') {\n exports.realpath.native = u(fs.realpath.native)\n} else {\n process.emitWarning(\n 'fs.realpath.native is not a function. Is fs being monkey-patched?',\n 'Warning', 'fs-extra-WARN0003'\n )\n}\n","'use strict'\n\nmodule.exports = {\n // Export promiseified graceful-fs:\n ...require('./fs'),\n // Export extra methods:\n ...require('./copy'),\n ...require('./empty'),\n ...require('./ensure'),\n ...require('./json'),\n ...require('./mkdirs'),\n ...require('./move'),\n ...require('./output-file'),\n ...require('./path-exists'),\n ...require('./remove')\n}\n","'use strict'\n\nconst u = require('universalify').fromPromise\nconst jsonFile = require('./jsonfile')\n\njsonFile.outputJson = u(require('./output-json'))\njsonFile.outputJsonSync = require('./output-json-sync')\n// aliases\njsonFile.outputJSON = jsonFile.outputJson\njsonFile.outputJSONSync = jsonFile.outputJsonSync\njsonFile.writeJSON = jsonFile.writeJson\njsonFile.writeJSONSync = jsonFile.writeJsonSync\njsonFile.readJSON = jsonFile.readJson\njsonFile.readJSONSync = jsonFile.readJsonSync\n\nmodule.exports = jsonFile\n","'use strict'\n\nconst jsonFile = require('jsonfile')\n\nmodule.exports = {\n // jsonfile exports\n readJson: jsonFile.readFile,\n readJsonSync: jsonFile.readFileSync,\n writeJson: jsonFile.writeFile,\n writeJsonSync: jsonFile.writeFileSync\n}\n","'use strict'\n\nconst { stringify } = require('jsonfile/utils')\nconst { outputFileSync } = require('../output-file')\n\nfunction outputJsonSync (file, data, options) {\n const str = stringify(data, options)\n\n outputFileSync(file, str, options)\n}\n\nmodule.exports = outputJsonSync\n","'use strict'\n\nconst { stringify } = require('jsonfile/utils')\nconst { outputFile } = require('../output-file')\n\nasync function outputJson (file, data, options = {}) {\n const str = stringify(data, options)\n\n await outputFile(file, str, options)\n}\n\nmodule.exports = outputJson\n","'use strict'\nconst u = require('universalify').fromPromise\nconst { makeDir: _makeDir, makeDirSync } = require('./make-dir')\nconst makeDir = u(_makeDir)\n\nmodule.exports = {\n mkdirs: makeDir,\n mkdirsSync: makeDirSync,\n // alias\n mkdirp: makeDir,\n mkdirpSync: makeDirSync,\n ensureDir: makeDir,\n ensureDirSync: makeDirSync\n}\n","'use strict'\nconst fs = require('../fs')\nconst { checkPath } = require('./utils')\n\nconst getMode = options => {\n const defaults = { mode: 0o777 }\n if (typeof options === 'number') return options\n return ({ ...defaults, ...options }).mode\n}\n\nmodule.exports.makeDir = async (dir, options) => {\n checkPath(dir)\n\n return fs.mkdir(dir, {\n mode: getMode(options),\n recursive: true\n })\n}\n\nmodule.exports.makeDirSync = (dir, options) => {\n checkPath(dir)\n\n return fs.mkdirSync(dir, {\n mode: getMode(options),\n recursive: true\n })\n}\n","// Adapted from https://github.com/sindresorhus/make-dir\n// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)\n// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict'\nconst path = require('path')\n\n// https://github.com/nodejs/node/issues/8987\n// https://github.com/libuv/libuv/pull/1088\nmodule.exports.checkPath = function checkPath (pth) {\n if (process.platform === 'win32') {\n const pathHasInvalidWinCharacters = /[<>:\"|?*]/.test(pth.replace(path.parse(pth).root, ''))\n\n if (pathHasInvalidWinCharacters) {\n const error = new Error(`Path contains invalid characters: ${pth}`)\n error.code = 'EINVAL'\n throw error\n }\n }\n}\n","'use strict'\n\nconst u = require('universalify').fromPromise\nmodule.exports = {\n move: u(require('./move')),\n moveSync: require('./move-sync')\n}\n","'use strict'\n\nconst fs = require('graceful-fs')\nconst path = require('path')\nconst copySync = require('../copy').copySync\nconst removeSync = require('../remove').removeSync\nconst mkdirpSync = require('../mkdirs').mkdirpSync\nconst stat = require('../util/stat')\n\nfunction moveSync (src, dest, opts) {\n opts = opts || {}\n const overwrite = opts.overwrite || opts.clobber || false\n\n const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, 'move', opts)\n stat.checkParentPathsSync(src, srcStat, dest, 'move')\n if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest))\n return doRename(src, dest, overwrite, isChangingCase)\n}\n\nfunction isParentRoot (dest) {\n const parent = path.dirname(dest)\n const parsedPath = path.parse(parent)\n return parsedPath.root === parent\n}\n\nfunction doRename (src, dest, overwrite, isChangingCase) {\n if (isChangingCase) return rename(src, dest, overwrite)\n if (overwrite) {\n removeSync(dest)\n return rename(src, dest, overwrite)\n }\n if (fs.existsSync(dest)) throw new Error('dest already exists.')\n return rename(src, dest, overwrite)\n}\n\nfunction rename (src, dest, overwrite) {\n try {\n fs.renameSync(src, dest)\n } catch (err) {\n if (err.code !== 'EXDEV') throw err\n return moveAcrossDevice(src, dest, overwrite)\n }\n}\n\nfunction moveAcrossDevice (src, dest, overwrite) {\n const opts = {\n overwrite,\n errorOnExist: true,\n preserveTimestamps: true\n }\n copySync(src, dest, opts)\n return removeSync(src)\n}\n\nmodule.exports = moveSync\n","'use strict'\n\nconst fs = require('../fs')\nconst path = require('path')\nconst { copy } = require('../copy')\nconst { remove } = require('../remove')\nconst { mkdirp } = require('../mkdirs')\nconst { pathExists } = require('../path-exists')\nconst stat = require('../util/stat')\n\nasync function move (src, dest, opts = {}) {\n const overwrite = opts.overwrite || opts.clobber || false\n\n const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, 'move', opts)\n\n await stat.checkParentPaths(src, srcStat, dest, 'move')\n\n // If the parent of dest is not root, make sure it exists before proceeding\n const destParent = path.dirname(dest)\n const parsedParentPath = path.parse(destParent)\n if (parsedParentPath.root !== destParent) {\n await mkdirp(destParent)\n }\n\n return doRename(src, dest, overwrite, isChangingCase)\n}\n\nasync function doRename (src, dest, overwrite, isChangingCase) {\n if (!isChangingCase) {\n if (overwrite) {\n await remove(dest)\n } else if (await pathExists(dest)) {\n throw new Error('dest already exists.')\n }\n }\n\n try {\n // Try w/ rename first, and try copy + remove if EXDEV\n await fs.rename(src, dest)\n } catch (err) {\n if (err.code !== 'EXDEV') {\n throw err\n }\n await moveAcrossDevice(src, dest, overwrite)\n }\n}\n\nasync function moveAcrossDevice (src, dest, overwrite) {\n const opts = {\n overwrite,\n errorOnExist: true,\n preserveTimestamps: true\n }\n\n await copy(src, dest, opts)\n return remove(src)\n}\n\nmodule.exports = move\n","'use strict'\n\nconst u = require('universalify').fromPromise\nconst fs = require('../fs')\nconst path = require('path')\nconst mkdir = require('../mkdirs')\nconst pathExists = require('../path-exists').pathExists\n\nasync function outputFile (file, data, encoding = 'utf-8') {\n const dir = path.dirname(file)\n\n if (!(await pathExists(dir))) {\n await mkdir.mkdirs(dir)\n }\n\n return fs.writeFile(file, data, encoding)\n}\n\nfunction outputFileSync (file, ...args) {\n const dir = path.dirname(file)\n if (!fs.existsSync(dir)) {\n mkdir.mkdirsSync(dir)\n }\n\n fs.writeFileSync(file, ...args)\n}\n\nmodule.exports = {\n outputFile: u(outputFile),\n outputFileSync\n}\n","'use strict'\nconst u = require('universalify').fromPromise\nconst fs = require('../fs')\n\nfunction pathExists (path) {\n return fs.access(path).then(() => true).catch(() => false)\n}\n\nmodule.exports = {\n pathExists: u(pathExists),\n pathExistsSync: fs.existsSync\n}\n","'use strict'\n\nconst fs = require('graceful-fs')\nconst u = require('universalify').fromCallback\n\nfunction remove (path, callback) {\n fs.rm(path, { recursive: true, force: true }, callback)\n}\n\nfunction removeSync (path) {\n fs.rmSync(path, { recursive: true, force: true })\n}\n\nmodule.exports = {\n remove: u(remove),\n removeSync\n}\n","'use strict'\n\n// https://github.com/jprichardson/node-fs-extra/issues/1056\n// Performing parallel operations on each item of an async iterator is\n// surprisingly hard; you need to have handlers in place to avoid getting an\n// UnhandledPromiseRejectionWarning.\n// NOTE: This function does not presently handle return values, only errors\nasync function asyncIteratorConcurrentProcess (iterator, fn) {\n const promises = []\n for await (const item of iterator) {\n promises.push(\n fn(item).then(\n () => null,\n (err) => err ?? new Error('unknown error')\n )\n )\n }\n await Promise.all(\n promises.map((promise) =>\n promise.then((possibleErr) => {\n if (possibleErr !== null) throw possibleErr\n })\n )\n )\n}\n\nmodule.exports = {\n asyncIteratorConcurrentProcess\n}\n","'use strict'\n\nconst fs = require('../fs')\nconst path = require('path')\nconst u = require('universalify').fromPromise\n\nfunction getStats (src, dest, opts) {\n const statFunc = opts.dereference\n ? (file) => fs.stat(file, { bigint: true })\n : (file) => fs.lstat(file, { bigint: true })\n return Promise.all([\n statFunc(src),\n statFunc(dest).catch(err => {\n if (err.code === 'ENOENT') return null\n throw err\n })\n ]).then(([srcStat, destStat]) => ({ srcStat, destStat }))\n}\n\nfunction getStatsSync (src, dest, opts) {\n let destStat\n const statFunc = opts.dereference\n ? (file) => fs.statSync(file, { bigint: true })\n : (file) => fs.lstatSync(file, { bigint: true })\n const srcStat = statFunc(src)\n try {\n destStat = statFunc(dest)\n } catch (err) {\n if (err.code === 'ENOENT') return { srcStat, destStat: null }\n throw err\n }\n return { srcStat, destStat }\n}\n\nasync function checkPaths (src, dest, funcName, opts) {\n const { srcStat, destStat } = await getStats(src, dest, opts)\n if (destStat) {\n if (areIdentical(srcStat, destStat)) {\n const srcBaseName = path.basename(src)\n const destBaseName = path.basename(dest)\n if (funcName === 'move' &&\n srcBaseName !== destBaseName &&\n srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {\n return { srcStat, destStat, isChangingCase: true }\n }\n throw new Error('Source and destination must not be the same.')\n }\n if (srcStat.isDirectory() && !destStat.isDirectory()) {\n throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)\n }\n if (!srcStat.isDirectory() && destStat.isDirectory()) {\n throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)\n }\n }\n\n if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {\n throw new Error(errMsg(src, dest, funcName))\n }\n\n return { srcStat, destStat }\n}\n\nfunction checkPathsSync (src, dest, funcName, opts) {\n const { srcStat, destStat } = getStatsSync(src, dest, opts)\n\n if (destStat) {\n if (areIdentical(srcStat, destStat)) {\n const srcBaseName = path.basename(src)\n const destBaseName = path.basename(dest)\n if (funcName === 'move' &&\n srcBaseName !== destBaseName &&\n srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {\n return { srcStat, destStat, isChangingCase: true }\n }\n throw new Error('Source and destination must not be the same.')\n }\n if (srcStat.isDirectory() && !destStat.isDirectory()) {\n throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)\n }\n if (!srcStat.isDirectory() && destStat.isDirectory()) {\n throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)\n }\n }\n\n if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {\n throw new Error(errMsg(src, dest, funcName))\n }\n return { srcStat, destStat }\n}\n\n// recursively check if dest parent is a subdirectory of src.\n// It works for all file types including symlinks since it\n// checks the src and dest inodes. It starts from the deepest\n// parent and stops once it reaches the src parent or the root path.\nasync function checkParentPaths (src, srcStat, dest, funcName) {\n const srcParent = path.resolve(path.dirname(src))\n const destParent = path.resolve(path.dirname(dest))\n if (destParent === srcParent || destParent === path.parse(destParent).root) return\n\n let destStat\n try {\n destStat = await fs.stat(destParent, { bigint: true })\n } catch (err) {\n if (err.code === 'ENOENT') return\n throw err\n }\n\n if (areIdentical(srcStat, destStat)) {\n throw new Error(errMsg(src, dest, funcName))\n }\n\n return checkParentPaths(src, srcStat, destParent, funcName)\n}\n\nfunction checkParentPathsSync (src, srcStat, dest, funcName) {\n const srcParent = path.resolve(path.dirname(src))\n const destParent = path.resolve(path.dirname(dest))\n if (destParent === srcParent || destParent === path.parse(destParent).root) return\n let destStat\n try {\n destStat = fs.statSync(destParent, { bigint: true })\n } catch (err) {\n if (err.code === 'ENOENT') return\n throw err\n }\n if (areIdentical(srcStat, destStat)) {\n throw new Error(errMsg(src, dest, funcName))\n }\n return checkParentPathsSync(src, srcStat, destParent, funcName)\n}\n\nfunction areIdentical (srcStat, destStat) {\n // stat.dev can be 0n on windows when node version >= 22.x.x\n return destStat.ino !== undefined && destStat.dev !== undefined && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev\n}\n\n// return true if dest is a subdir of src, otherwise false.\n// It only checks the path strings.\nfunction isSrcSubdir (src, dest) {\n const srcArr = path.resolve(src).split(path.sep).filter(i => i)\n const destArr = path.resolve(dest).split(path.sep).filter(i => i)\n return srcArr.every((cur, i) => destArr[i] === cur)\n}\n\nfunction errMsg (src, dest, funcName) {\n return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`\n}\n\nmodule.exports = {\n // checkPaths\n checkPaths: u(checkPaths),\n checkPathsSync,\n // checkParent\n checkParentPaths: u(checkParentPaths),\n checkParentPathsSync,\n // Misc\n isSrcSubdir,\n areIdentical\n}\n","'use strict'\n\nconst fs = require('../fs')\nconst u = require('universalify').fromPromise\n\nasync function utimesMillis (path, atime, mtime) {\n // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)\n const fd = await fs.open(path, 'r+')\n\n let closeErr = null\n\n try {\n await fs.futimes(fd, atime, mtime)\n } finally {\n try {\n await fs.close(fd)\n } catch (e) {\n closeErr = e\n }\n }\n\n if (closeErr) {\n throw closeErr\n }\n}\n\nfunction utimesMillisSync (path, atime, mtime) {\n const fd = fs.openSync(path, 'r+')\n fs.futimesSync(fd, atime, mtime)\n return fs.closeSync(fd)\n}\n\nmodule.exports = {\n utimesMillis: u(utimesMillis),\n utimesMillisSync\n}\n","module.exports = realpath\nrealpath.realpath = realpath\nrealpath.sync = realpathSync\nrealpath.realpathSync = realpathSync\nrealpath.monkeypatch = monkeypatch\nrealpath.unmonkeypatch = unmonkeypatch\n\nvar fs = require('fs')\nvar origRealpath = fs.realpath\nvar origRealpathSync = fs.realpathSync\n\nvar version = process.version\nvar ok = /^v[0-5]\\./.test(version)\nvar old = require('./old.js')\n\nfunction newError (er) {\n return er && er.syscall === 'realpath' && (\n er.code === 'ELOOP' ||\n er.code === 'ENOMEM' ||\n er.code === 'ENAMETOOLONG'\n )\n}\n\nfunction realpath (p, cache, cb) {\n if (ok) {\n return origRealpath(p, cache, cb)\n }\n\n if (typeof cache === 'function') {\n cb = cache\n cache = null\n }\n origRealpath(p, cache, function (er, result) {\n if (newError(er)) {\n old.realpath(p, cache, cb)\n } else {\n cb(er, result)\n }\n })\n}\n\nfunction realpathSync (p, cache) {\n if (ok) {\n return origRealpathSync(p, cache)\n }\n\n try {\n return origRealpathSync(p, cache)\n } catch (er) {\n if (newError(er)) {\n return old.realpathSync(p, cache)\n } else {\n throw er\n }\n }\n}\n\nfunction monkeypatch () {\n fs.realpath = realpath\n fs.realpathSync = realpathSync\n}\n\nfunction unmonkeypatch () {\n fs.realpath = origRealpath\n fs.realpathSync = origRealpathSync\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar pathModule = require('path');\nvar isWindows = process.platform === 'win32';\nvar fs = require('fs');\n\n// JavaScript implementation of realpath, ported from node pre-v6\n\nvar DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);\n\nfunction rethrow() {\n // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and\n // is fairly slow to generate.\n var callback;\n if (DEBUG) {\n var backtrace = new Error;\n callback = debugCallback;\n } else\n callback = missingCallback;\n\n return callback;\n\n function debugCallback(err) {\n if (err) {\n backtrace.message = err.message;\n err = backtrace;\n missingCallback(err);\n }\n }\n\n function missingCallback(err) {\n if (err) {\n if (process.throwDeprecation)\n throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs\n else if (!process.noDeprecation) {\n var msg = 'fs: missing callback ' + (err.stack || err.message);\n if (process.traceDeprecation)\n console.trace(msg);\n else\n console.error(msg);\n }\n }\n }\n}\n\nfunction maybeCallback(cb) {\n return typeof cb === 'function' ? cb : rethrow();\n}\n\nvar normalize = pathModule.normalize;\n\n// Regexp that finds the next partion of a (partial) path\n// result is [base_with_slash, base], e.g. ['somedir/', 'somedir']\nif (isWindows) {\n var nextPartRe = /(.*?)(?:[\\/\\\\]+|$)/g;\n} else {\n var nextPartRe = /(.*?)(?:[\\/]+|$)/g;\n}\n\n// Regex to find the device root, including trailing slash. E.g. 'c:\\\\'.\nif (isWindows) {\n var splitRootRe = /^(?:[a-zA-Z]:|[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/][^\\\\\\/]+)?[\\\\\\/]*/;\n} else {\n var splitRootRe = /^[\\/]*/;\n}\n\nexports.realpathSync = function realpathSync(p, cache) {\n // make p is absolute\n p = pathModule.resolve(p);\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {\n return cache[p];\n }\n\n var original = p,\n seenLinks = {},\n knownHard = {};\n\n // current character position in p\n var pos;\n // the partial path so far, including a trailing slash if any\n var current;\n // the partial path without a trailing slash (except when pointing at a root)\n var base;\n // the partial path scanned in the previous round, with slash\n var previous;\n\n start();\n\n function start() {\n // Skip over roots\n var m = splitRootRe.exec(p);\n pos = m[0].length;\n current = m[0];\n base = m[0];\n previous = '';\n\n // On windows, check that the root exists. On unix there is no need.\n if (isWindows && !knownHard[base]) {\n fs.lstatSync(base);\n knownHard[base] = true;\n }\n }\n\n // walk down the path, swapping out linked pathparts for their real\n // values\n // NB: p.length changes.\n while (pos < p.length) {\n // find the next part\n nextPartRe.lastIndex = pos;\n var result = nextPartRe.exec(p);\n previous = current;\n current += result[0];\n base = previous + result[1];\n pos = nextPartRe.lastIndex;\n\n // continue if not a symlink\n if (knownHard[base] || (cache && cache[base] === base)) {\n continue;\n }\n\n var resolvedLink;\n if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {\n // some known symbolic link. no need to stat again.\n resolvedLink = cache[base];\n } else {\n var stat = fs.lstatSync(base);\n if (!stat.isSymbolicLink()) {\n knownHard[base] = true;\n if (cache) cache[base] = base;\n continue;\n }\n\n // read the link if it wasn't read before\n // dev/ino always return 0 on windows, so skip the check.\n var linkTarget = null;\n if (!isWindows) {\n var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);\n if (seenLinks.hasOwnProperty(id)) {\n linkTarget = seenLinks[id];\n }\n }\n if (linkTarget === null) {\n fs.statSync(base);\n linkTarget = fs.readlinkSync(base);\n }\n resolvedLink = pathModule.resolve(previous, linkTarget);\n // track this, if given a cache.\n if (cache) cache[base] = resolvedLink;\n if (!isWindows) seenLinks[id] = linkTarget;\n }\n\n // resolve the link, then start over\n p = pathModule.resolve(resolvedLink, p.slice(pos));\n start();\n }\n\n if (cache) cache[original] = p;\n\n return p;\n};\n\n\nexports.realpath = function realpath(p, cache, cb) {\n if (typeof cb !== 'function') {\n cb = maybeCallback(cache);\n cache = null;\n }\n\n // make p is absolute\n p = pathModule.resolve(p);\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, p)) {\n return process.nextTick(cb.bind(null, null, cache[p]));\n }\n\n var original = p,\n seenLinks = {},\n knownHard = {};\n\n // current character position in p\n var pos;\n // the partial path so far, including a trailing slash if any\n var current;\n // the partial path without a trailing slash (except when pointing at a root)\n var base;\n // the partial path scanned in the previous round, with slash\n var previous;\n\n start();\n\n function start() {\n // Skip over roots\n var m = splitRootRe.exec(p);\n pos = m[0].length;\n current = m[0];\n base = m[0];\n previous = '';\n\n // On windows, check that the root exists. On unix there is no need.\n if (isWindows && !knownHard[base]) {\n fs.lstat(base, function(err) {\n if (err) return cb(err);\n knownHard[base] = true;\n LOOP();\n });\n } else {\n process.nextTick(LOOP);\n }\n }\n\n // walk down the path, swapping out linked pathparts for their real\n // values\n function LOOP() {\n // stop if scanned past end of path\n if (pos >= p.length) {\n if (cache) cache[original] = p;\n return cb(null, p);\n }\n\n // find the next part\n nextPartRe.lastIndex = pos;\n var result = nextPartRe.exec(p);\n previous = current;\n current += result[0];\n base = previous + result[1];\n pos = nextPartRe.lastIndex;\n\n // continue if not a symlink\n if (knownHard[base] || (cache && cache[base] === base)) {\n return process.nextTick(LOOP);\n }\n\n if (cache && Object.prototype.hasOwnProperty.call(cache, base)) {\n // known symbolic link. no need to stat again.\n return gotResolvedLink(cache[base]);\n }\n\n return fs.lstat(base, gotStat);\n }\n\n function gotStat(err, stat) {\n if (err) return cb(err);\n\n // if not a symlink, skip to the next path part\n if (!stat.isSymbolicLink()) {\n knownHard[base] = true;\n if (cache) cache[base] = base;\n return process.nextTick(LOOP);\n }\n\n // stat & read the link if not read before\n // call gotTarget as soon as the link target is known\n // dev/ino always return 0 on windows, so skip the check.\n if (!isWindows) {\n var id = stat.dev.toString(32) + ':' + stat.ino.toString(32);\n if (seenLinks.hasOwnProperty(id)) {\n return gotTarget(null, seenLinks[id], base);\n }\n }\n fs.stat(base, function(err) {\n if (err) return cb(err);\n\n fs.readlink(base, function(err, target) {\n if (!isWindows) seenLinks[id] = target;\n gotTarget(err, target);\n });\n });\n }\n\n function gotTarget(err, target, base) {\n if (err) return cb(err);\n\n var resolvedLink = pathModule.resolve(previous, target);\n if (cache) cache[base] = resolvedLink;\n gotResolvedLink(resolvedLink);\n }\n\n function gotResolvedLink(resolvedLink) {\n // resolve the link, then start over\n p = pathModule.resolve(resolvedLink, p.slice(pos));\n start();\n }\n};\n","'use strict';\n\nvar isGlob = require('is-glob');\nvar pathPosixDirname = require('path').posix.dirname;\nvar isWin32 = require('os').platform() === 'win32';\n\nvar slash = '/';\nvar backslash = /\\\\/g;\nvar enclosure = /[\\{\\[].*[\\}\\]]$/;\nvar globby = /(^|[^\\\\])([\\{\\[]|\\([^\\)]+$)/;\nvar escaped = /\\\\([\\!\\*\\?\\|\\[\\]\\(\\)\\{\\}])/g;\n\n/**\n * @param {string} str\n * @param {Object} opts\n * @param {boolean} [opts.flipBackslashes=true]\n * @returns {string}\n */\nmodule.exports = function globParent(str, opts) {\n var options = Object.assign({ flipBackslashes: true }, opts);\n\n // flip windows path separators\n if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {\n str = str.replace(backslash, slash);\n }\n\n // special case for strings ending in enclosure containing path separator\n if (enclosure.test(str)) {\n str += slash;\n }\n\n // preserves full path in case of trailing path separator\n str += 'a';\n\n // remove path parts that are globby\n do {\n str = pathPosixDirname(str);\n } while (isGlob(str) || globby.test(str));\n\n // remove escape chars and return result\n return str.replace(escaped, '$1');\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toMatcher = exports.toRegex = void 0;\nconst escapeRe = (ch) => (/[.^$+{}()|\\\\]/.test(ch) ? `\\\\${ch}` : ch);\n/**\n * Parse an extended glob pattern like ?(a|b|c)\n * Returns the regex string equivalent and the new index position\n */\nconst parseExtGlob = (pattern, startIdx, prefix, options) => {\n let i = startIdx; // startIdx should be pointing at the character after '('\n const parts = [];\n let cur = '';\n let depth = 1; // Track parenthesis depth for nested patterns\n while (i < pattern.length && depth > 0) {\n const ch = pattern[i];\n if (ch === '(') {\n depth++;\n cur += ch;\n i++;\n }\n else if (ch === ')') {\n depth--;\n if (depth === 0) {\n // Found the closing parenthesis\n parts.push(cur);\n i++; // consume ')'\n break;\n }\n else {\n cur += ch;\n i++;\n }\n }\n else if (ch === '|' && depth === 1) {\n // Pipe separator at top level of this extglob\n parts.push(cur);\n cur = '';\n i++;\n }\n else {\n cur += ch;\n i++;\n }\n }\n if (depth !== 0)\n return; // Unclosed parenthesis\n let alternatives = '';\n const length = parts.length;\n for (let j = 0; j < length; j++)\n alternatives += (alternatives ? '|' : '') + (0, exports.toRegex)(parts[j], options).source.replace(/^\\^/, '').replace(/\\$$/, '');\n switch (prefix) {\n case '?': // zero or one\n return [`(?:${alternatives})?`, i];\n case '*': // zero or more\n return [`(?:${alternatives})*`, i];\n case '+': // one or more\n return [`(?:${alternatives})+`, i];\n case '@': // exactly one\n return [`(?:${alternatives})`, i];\n case '!': // none of (negative match)\n // For negation, we need to match anything that doesn't match the pattern\n // Use negative lookahead without consuming characters after\n return [`(?!${alternatives})[^/]*`, i];\n }\n return;\n};\n/**\n * Convert a glob pattern to a regular expression\n *\n * Supports:\n * - `/` to separate path segments\n * - `*` to match zero or more characters in a path segment\n * - `?` to match one character in a path segment\n * - `**` to match any number of path segments, including none\n * - `{}` to group conditions (e.g. `{html,txt}`)\n * - `[abc]`, `[a-z]`, `[!a-z]`, `[!abc]` character classes\n * - Extended globbing (when `extglob: true` option is set):\n * - `?(pattern-list)` zero or one occurrence\n * - `*(pattern-list)` zero or more occurrences\n * - `+(pattern-list)` one or more occurrences\n * - `@(pattern-list)` exactly one of the patterns\n * - `!(pattern-list)` anything except the patterns\n */\nconst toRegex = (pattern, options) => {\n let regexStr = '';\n let i = 0;\n // Helper to parse a brace group like {a,b,c}. No nesting support.\n const parseBraceGroup = () => {\n // Assume current char is '{'\n i++; // skip '{'\n const parts = [];\n let cur = '';\n let closed = false;\n while (i < pattern.length) {\n const ch = pattern[i];\n if (ch === '}') {\n parts.push(cur);\n i++; // consume '}'\n closed = true;\n break;\n }\n if (ch === ',') {\n parts.push(cur);\n cur = '';\n i++;\n continue;\n }\n cur += ch;\n i++;\n }\n if (!closed) {\n // treat as literal '{...'\n return '\\\\{' + escapeRe(cur);\n }\n // Convert each part recursively to support globs inside braces\n const alt = parts.map((p) => (0, exports.toRegex)(p, options).source.replace(/^\\^/, '').replace(/\\$$/, '')).join('|');\n return `(?:${alt})`;\n };\n const extglob = !!options?.extglob;\n while (i < pattern.length) {\n const char = pattern[i];\n // Check for extended glob patterns when extglob is enabled\n if (extglob && pattern[i + 1] === '(') {\n if (char === '?' || char === '*' || char === '+' || char === '@' || char === '!') {\n const result = parseExtGlob(pattern, i + 2, char, options);\n if (result) {\n regexStr += result[0];\n i = result[1];\n continue;\n }\n // If parse failed, fall through to normal handling\n }\n }\n switch (char) {\n case '*': {\n // Check for double star **\n if (pattern[i + 1] === '*') {\n // Collapse consecutive * beyond two (e.g., *** -> **)\n let j = i + 2;\n while (pattern[j] === '*')\n j++;\n // If followed by a slash, make it optional to allow zero segments\n if (pattern[j] === '/') {\n regexStr += '(?:.*/)?';\n i = j + 1; // consume **/\n }\n else {\n regexStr += '.*';\n i = j; // consume **\n }\n }\n else {\n regexStr += '[^/]*';\n i++;\n }\n break;\n }\n case '?':\n regexStr += '[^/]';\n i++;\n break;\n case '[': {\n // Copy character class as-is with support for leading '!'\n let cls = '[';\n i++;\n if (i < pattern.length && pattern[i] === '!') {\n cls += '^';\n i++;\n }\n // if first after [ or [^ is ']' include it literally\n if (i < pattern.length && pattern[i] === ']') {\n cls += ']';\n i++;\n }\n while (i < pattern.length && pattern[i] !== ']') {\n const ch = pattern[i];\n // Escape backslash inside class\n cls += ch === '\\\\' ? '\\\\\\\\' : ch;\n i++;\n }\n if (i < pattern.length && pattern[i] === ']') {\n cls += ']';\n i++;\n }\n else {\n // Unclosed class -> treat '[' literally\n regexStr += '\\\\[';\n continue;\n }\n regexStr += cls;\n break;\n }\n case '{': {\n regexStr += parseBraceGroup();\n break;\n }\n case '/':\n regexStr += '/';\n i++;\n break;\n case '.':\n case '^':\n case '$':\n case '+':\n case '(':\n case ')':\n case '|':\n case '\\\\':\n regexStr += `\\\\${char}`;\n i++;\n break;\n default:\n regexStr += char;\n i++;\n break;\n }\n }\n const flags = options?.nocase ? 'i' : '';\n return new RegExp('^' + regexStr + '$', flags);\n};\nexports.toRegex = toRegex;\nconst isRegExp = /^\\/(.{1,4096})\\/([gimsuy]{0,6})$/;\nconst toMatcher = (pattern, options) => {\n const regexes = [];\n const patterns = Array.isArray(pattern) ? pattern : [pattern];\n for (const pat of patterns) {\n if (typeof pat === 'string') {\n const match = isRegExp.exec(pat);\n if (match) {\n const [, expr, flags] = match;\n regexes.push(new RegExp(expr, flags));\n }\n else {\n regexes.push((0, exports.toRegex)(pat, options));\n }\n }\n else {\n regexes.push(pat);\n }\n }\n return regexes.length\n ? new Function('p', 'return ' + regexes.map((r) => r + '.test(p)').join('||'))\n : () => false;\n};\nexports.toMatcher = toMatcher;\n","exports.setopts = setopts\nexports.ownProp = ownProp\nexports.makeAbs = makeAbs\nexports.finish = finish\nexports.mark = mark\nexports.isIgnored = isIgnored\nexports.childrenIgnored = childrenIgnored\n\nfunction ownProp (obj, field) {\n return Object.prototype.hasOwnProperty.call(obj, field)\n}\n\nvar fs = require(\"fs\")\nvar path = require(\"path\")\nvar minimatch = require(\"minimatch\")\nvar isAbsolute = require(\"path-is-absolute\")\nvar Minimatch = minimatch.Minimatch\n\nfunction alphasort (a, b) {\n return a.localeCompare(b, 'en')\n}\n\nfunction setupIgnores (self, options) {\n self.ignore = options.ignore || []\n\n if (!Array.isArray(self.ignore))\n self.ignore = [self.ignore]\n\n if (self.ignore.length) {\n self.ignore = self.ignore.map(ignoreMap)\n }\n}\n\n// ignore patterns are always in dot:true mode.\nfunction ignoreMap (pattern) {\n var gmatcher = null\n if (pattern.slice(-3) === '/**') {\n var gpattern = pattern.replace(/(\\/\\*\\*)+$/, '')\n gmatcher = new Minimatch(gpattern, { dot: true })\n }\n\n return {\n matcher: new Minimatch(pattern, { dot: true }),\n gmatcher: gmatcher\n }\n}\n\nfunction setopts (self, pattern, options) {\n if (!options)\n options = {}\n\n // base-matching: just use globstar for that.\n if (options.matchBase && -1 === pattern.indexOf(\"/\")) {\n if (options.noglobstar) {\n throw new Error(\"base matching requires globstar\")\n }\n pattern = \"**/\" + pattern\n }\n\n self.silent = !!options.silent\n self.pattern = pattern\n self.strict = options.strict !== false\n self.realpath = !!options.realpath\n self.realpathCache = options.realpathCache || Object.create(null)\n self.follow = !!options.follow\n self.dot = !!options.dot\n self.mark = !!options.mark\n self.nodir = !!options.nodir\n if (self.nodir)\n self.mark = true\n self.sync = !!options.sync\n self.nounique = !!options.nounique\n self.nonull = !!options.nonull\n self.nosort = !!options.nosort\n self.nocase = !!options.nocase\n self.stat = !!options.stat\n self.noprocess = !!options.noprocess\n self.absolute = !!options.absolute\n self.fs = options.fs || fs\n\n self.maxLength = options.maxLength || Infinity\n self.cache = options.cache || Object.create(null)\n self.statCache = options.statCache || Object.create(null)\n self.symlinks = options.symlinks || Object.create(null)\n\n setupIgnores(self, options)\n\n self.changedCwd = false\n var cwd = process.cwd()\n if (!ownProp(options, \"cwd\"))\n self.cwd = cwd\n else {\n self.cwd = path.resolve(options.cwd)\n self.changedCwd = self.cwd !== cwd\n }\n\n self.root = options.root || path.resolve(self.cwd, \"/\")\n self.root = path.resolve(self.root)\n if (process.platform === \"win32\")\n self.root = self.root.replace(/\\\\/g, \"/\")\n\n // TODO: is an absolute `cwd` supposed to be resolved against `root`?\n // e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')\n self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)\n if (process.platform === \"win32\")\n self.cwdAbs = self.cwdAbs.replace(/\\\\/g, \"/\")\n self.nomount = !!options.nomount\n\n // disable comments and negation in Minimatch.\n // Note that they are not supported in Glob itself anyway.\n options.nonegate = true\n options.nocomment = true\n // always treat \\ in patterns as escapes, not path separators\n options.allowWindowsEscape = false\n\n self.minimatch = new Minimatch(pattern, options)\n self.options = self.minimatch.options\n}\n\nfunction finish (self) {\n var nou = self.nounique\n var all = nou ? [] : Object.create(null)\n\n for (var i = 0, l = self.matches.length; i < l; i ++) {\n var matches = self.matches[i]\n if (!matches || Object.keys(matches).length === 0) {\n if (self.nonull) {\n // do like the shell, and spit out the literal glob\n var literal = self.minimatch.globSet[i]\n if (nou)\n all.push(literal)\n else\n all[literal] = true\n }\n } else {\n // had matches\n var m = Object.keys(matches)\n if (nou)\n all.push.apply(all, m)\n else\n m.forEach(function (m) {\n all[m] = true\n })\n }\n }\n\n if (!nou)\n all = Object.keys(all)\n\n if (!self.nosort)\n all = all.sort(alphasort)\n\n // at *some* point we statted all of these\n if (self.mark) {\n for (var i = 0; i < all.length; i++) {\n all[i] = self._mark(all[i])\n }\n if (self.nodir) {\n all = all.filter(function (e) {\n var notDir = !(/\\/$/.test(e))\n var c = self.cache[e] || self.cache[makeAbs(self, e)]\n if (notDir && c)\n notDir = c !== 'DIR' && !Array.isArray(c)\n return notDir\n })\n }\n }\n\n if (self.ignore.length)\n all = all.filter(function(m) {\n return !isIgnored(self, m)\n })\n\n self.found = all\n}\n\nfunction mark (self, p) {\n var abs = makeAbs(self, p)\n var c = self.cache[abs]\n var m = p\n if (c) {\n var isDir = c === 'DIR' || Array.isArray(c)\n var slash = p.slice(-1) === '/'\n\n if (isDir && !slash)\n m += '/'\n else if (!isDir && slash)\n m = m.slice(0, -1)\n\n if (m !== p) {\n var mabs = makeAbs(self, m)\n self.statCache[mabs] = self.statCache[abs]\n self.cache[mabs] = self.cache[abs]\n }\n }\n\n return m\n}\n\n// lotta situps...\nfunction makeAbs (self, f) {\n var abs = f\n if (f.charAt(0) === '/') {\n abs = path.join(self.root, f)\n } else if (isAbsolute(f) || f === '') {\n abs = f\n } else if (self.changedCwd) {\n abs = path.resolve(self.cwd, f)\n } else {\n abs = path.resolve(f)\n }\n\n if (process.platform === 'win32')\n abs = abs.replace(/\\\\/g, '/')\n\n return abs\n}\n\n\n// Return true, if pattern ends with globstar '**', for the accompanying parent directory.\n// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents\nfunction isIgnored (self, path) {\n if (!self.ignore.length)\n return false\n\n return self.ignore.some(function(item) {\n return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path))\n })\n}\n\nfunction childrenIgnored (self, path) {\n if (!self.ignore.length)\n return false\n\n return self.ignore.some(function(item) {\n return !!(item.gmatcher && item.gmatcher.match(path))\n })\n}\n","// Approach:\n//\n// 1. Get the minimatch set\n// 2. For each pattern in the set, PROCESS(pattern, false)\n// 3. Store matches per-set, then uniq them\n//\n// PROCESS(pattern, inGlobStar)\n// Get the first [n] items from pattern that are all strings\n// Join these together. This is PREFIX.\n// If there is no more remaining, then stat(PREFIX) and\n// add to matches if it succeeds. END.\n//\n// If inGlobStar and PREFIX is symlink and points to dir\n// set ENTRIES = []\n// else readdir(PREFIX) as ENTRIES\n// If fail, END\n//\n// with ENTRIES\n// If pattern[n] is GLOBSTAR\n// // handle the case where the globstar match is empty\n// // by pruning it out, and testing the resulting pattern\n// PROCESS(pattern[0..n] + pattern[n+1 .. $], false)\n// // handle other cases.\n// for ENTRY in ENTRIES (not dotfiles)\n// // attach globstar + tail onto the entry\n// // Mark that this entry is a globstar match\n// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true)\n//\n// else // not globstar\n// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot)\n// Test ENTRY against pattern[n]\n// If fails, continue\n// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $])\n//\n// Caveat:\n// Cache all stats and readdirs results to minimize syscall. Since all\n// we ever care about is existence and directory-ness, we can just keep\n// `true` for files, and [children,...] for directories, or `false` for\n// things that don't exist.\n\nmodule.exports = glob\n\nvar rp = require('fs.realpath')\nvar minimatch = require('minimatch')\nvar Minimatch = minimatch.Minimatch\nvar inherits = require('inherits')\nvar EE = require('events').EventEmitter\nvar path = require('path')\nvar assert = require('assert')\nvar isAbsolute = require('path-is-absolute')\nvar globSync = require('./sync.js')\nvar common = require('./common.js')\nvar setopts = common.setopts\nvar ownProp = common.ownProp\nvar inflight = require('inflight')\nvar util = require('util')\nvar childrenIgnored = common.childrenIgnored\nvar isIgnored = common.isIgnored\n\nvar once = require('once')\n\nfunction glob (pattern, options, cb) {\n if (typeof options === 'function') cb = options, options = {}\n if (!options) options = {}\n\n if (options.sync) {\n if (cb)\n throw new TypeError('callback provided to sync glob')\n return globSync(pattern, options)\n }\n\n return new Glob(pattern, options, cb)\n}\n\nglob.sync = globSync\nvar GlobSync = glob.GlobSync = globSync.GlobSync\n\n// old api surface\nglob.glob = glob\n\nfunction extend (origin, add) {\n if (add === null || typeof add !== 'object') {\n return origin\n }\n\n var keys = Object.keys(add)\n var i = keys.length\n while (i--) {\n origin[keys[i]] = add[keys[i]]\n }\n return origin\n}\n\nglob.hasMagic = function (pattern, options_) {\n var options = extend({}, options_)\n options.noprocess = true\n\n var g = new Glob(pattern, options)\n var set = g.minimatch.set\n\n if (!pattern)\n return false\n\n if (set.length > 1)\n return true\n\n for (var j = 0; j < set[0].length; j++) {\n if (typeof set[0][j] !== 'string')\n return true\n }\n\n return false\n}\n\nglob.Glob = Glob\ninherits(Glob, EE)\nfunction Glob (pattern, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = null\n }\n\n if (options && options.sync) {\n if (cb)\n throw new TypeError('callback provided to sync glob')\n return new GlobSync(pattern, options)\n }\n\n if (!(this instanceof Glob))\n return new Glob(pattern, options, cb)\n\n setopts(this, pattern, options)\n this._didRealPath = false\n\n // process each pattern in the minimatch set\n var n = this.minimatch.set.length\n\n // The matches are stored as {<filename>: true,...} so that\n // duplicates are automagically pruned.\n // Later, we do an Object.keys() on these.\n // Keep them as a list so we can fill in when nonull is set.\n this.matches = new Array(n)\n\n if (typeof cb === 'function') {\n cb = once(cb)\n this.on('error', cb)\n this.on('end', function (matches) {\n cb(null, matches)\n })\n }\n\n var self = this\n this._processing = 0\n\n this._emitQueue = []\n this._processQueue = []\n this.paused = false\n\n if (this.noprocess)\n return this\n\n if (n === 0)\n return done()\n\n var sync = true\n for (var i = 0; i < n; i ++) {\n this._process(this.minimatch.set[i], i, false, done)\n }\n sync = false\n\n function done () {\n --self._processing\n if (self._processing <= 0) {\n if (sync) {\n process.nextTick(function () {\n self._finish()\n })\n } else {\n self._finish()\n }\n }\n }\n}\n\nGlob.prototype._finish = function () {\n assert(this instanceof Glob)\n if (this.aborted)\n return\n\n if (this.realpath && !this._didRealpath)\n return this._realpath()\n\n common.finish(this)\n this.emit('end', this.found)\n}\n\nGlob.prototype._realpath = function () {\n if (this._didRealpath)\n return\n\n this._didRealpath = true\n\n var n = this.matches.length\n if (n === 0)\n return this._finish()\n\n var self = this\n for (var i = 0; i < this.matches.length; i++)\n this._realpathSet(i, next)\n\n function next () {\n if (--n === 0)\n self._finish()\n }\n}\n\nGlob.prototype._realpathSet = function (index, cb) {\n var matchset = this.matches[index]\n if (!matchset)\n return cb()\n\n var found = Object.keys(matchset)\n var self = this\n var n = found.length\n\n if (n === 0)\n return cb()\n\n var set = this.matches[index] = Object.create(null)\n found.forEach(function (p, i) {\n // If there's a problem with the stat, then it means that\n // one or more of the links in the realpath couldn't be\n // resolved. just return the abs value in that case.\n p = self._makeAbs(p)\n rp.realpath(p, self.realpathCache, function (er, real) {\n if (!er)\n set[real] = true\n else if (er.syscall === 'stat')\n set[p] = true\n else\n self.emit('error', er) // srsly wtf right here\n\n if (--n === 0) {\n self.matches[index] = set\n cb()\n }\n })\n })\n}\n\nGlob.prototype._mark = function (p) {\n return common.mark(this, p)\n}\n\nGlob.prototype._makeAbs = function (f) {\n return common.makeAbs(this, f)\n}\n\nGlob.prototype.abort = function () {\n this.aborted = true\n this.emit('abort')\n}\n\nGlob.prototype.pause = function () {\n if (!this.paused) {\n this.paused = true\n this.emit('pause')\n }\n}\n\nGlob.prototype.resume = function () {\n if (this.paused) {\n this.emit('resume')\n this.paused = false\n if (this._emitQueue.length) {\n var eq = this._emitQueue.slice(0)\n this._emitQueue.length = 0\n for (var i = 0; i < eq.length; i ++) {\n var e = eq[i]\n this._emitMatch(e[0], e[1])\n }\n }\n if (this._processQueue.length) {\n var pq = this._processQueue.slice(0)\n this._processQueue.length = 0\n for (var i = 0; i < pq.length; i ++) {\n var p = pq[i]\n this._processing--\n this._process(p[0], p[1], p[2], p[3])\n }\n }\n }\n}\n\nGlob.prototype._process = function (pattern, index, inGlobStar, cb) {\n assert(this instanceof Glob)\n assert(typeof cb === 'function')\n\n if (this.aborted)\n return\n\n this._processing++\n if (this.paused) {\n this._processQueue.push([pattern, index, inGlobStar, cb])\n return\n }\n\n //console.error('PROCESS %d', this._processing, pattern)\n\n // Get the first [n] parts of pattern that are all strings.\n var n = 0\n while (typeof pattern[n] === 'string') {\n n ++\n }\n // now n is the index of the first one that is *not* a string.\n\n // see if there's anything else\n var prefix\n switch (n) {\n // if not, then this is rather simple\n case pattern.length:\n this._processSimple(pattern.join('/'), index, cb)\n return\n\n case 0:\n // pattern *starts* with some non-trivial item.\n // going to readdir(cwd), but not include the prefix in matches.\n prefix = null\n break\n\n default:\n // pattern has some string bits in the front.\n // whatever it starts with, whether that's 'absolute' like /foo/bar,\n // or 'relative' like '../baz'\n prefix = pattern.slice(0, n).join('/')\n break\n }\n\n var remain = pattern.slice(n)\n\n // get the list of entries.\n var read\n if (prefix === null)\n read = '.'\n else if (isAbsolute(prefix) ||\n isAbsolute(pattern.map(function (p) {\n return typeof p === 'string' ? p : '[*]'\n }).join('/'))) {\n if (!prefix || !isAbsolute(prefix))\n prefix = '/' + prefix\n read = prefix\n } else\n read = prefix\n\n var abs = this._makeAbs(read)\n\n //if ignored, skip _processing\n if (childrenIgnored(this, read))\n return cb()\n\n var isGlobStar = remain[0] === minimatch.GLOBSTAR\n if (isGlobStar)\n this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb)\n else\n this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb)\n}\n\nGlob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) {\n var self = this\n this._readdir(abs, inGlobStar, function (er, entries) {\n return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb)\n })\n}\n\nGlob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {\n\n // if the abs isn't a dir, then nothing can match!\n if (!entries)\n return cb()\n\n // It will only match dot entries if it starts with a dot, or if\n // dot is set. Stuff like @(.foo|.bar) isn't allowed.\n var pn = remain[0]\n var negate = !!this.minimatch.negate\n var rawGlob = pn._glob\n var dotOk = this.dot || rawGlob.charAt(0) === '.'\n\n var matchedEntries = []\n for (var i = 0; i < entries.length; i++) {\n var e = entries[i]\n if (e.charAt(0) !== '.' || dotOk) {\n var m\n if (negate && !prefix) {\n m = !e.match(pn)\n } else {\n m = e.match(pn)\n }\n if (m)\n matchedEntries.push(e)\n }\n }\n\n //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries)\n\n var len = matchedEntries.length\n // If there are no matched entries, then nothing matches.\n if (len === 0)\n return cb()\n\n // if this is the last remaining pattern bit, then no need for\n // an additional stat *unless* the user has specified mark or\n // stat explicitly. We know they exist, since readdir returned\n // them.\n\n if (remain.length === 1 && !this.mark && !this.stat) {\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n if (prefix) {\n if (prefix !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n\n if (e.charAt(0) === '/' && !this.nomount) {\n e = path.join(this.root, e)\n }\n this._emitMatch(index, e)\n }\n // This was the last one, and no stats were needed\n return cb()\n }\n\n // now test all matched entries as stand-ins for that part\n // of the pattern.\n remain.shift()\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n var newPattern\n if (prefix) {\n if (prefix !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n this._process([e].concat(remain), index, inGlobStar, cb)\n }\n cb()\n}\n\nGlob.prototype._emitMatch = function (index, e) {\n if (this.aborted)\n return\n\n if (isIgnored(this, e))\n return\n\n if (this.paused) {\n this._emitQueue.push([index, e])\n return\n }\n\n var abs = isAbsolute(e) ? e : this._makeAbs(e)\n\n if (this.mark)\n e = this._mark(e)\n\n if (this.absolute)\n e = abs\n\n if (this.matches[index][e])\n return\n\n if (this.nodir) {\n var c = this.cache[abs]\n if (c === 'DIR' || Array.isArray(c))\n return\n }\n\n this.matches[index][e] = true\n\n var st = this.statCache[abs]\n if (st)\n this.emit('stat', e, st)\n\n this.emit('match', e)\n}\n\nGlob.prototype._readdirInGlobStar = function (abs, cb) {\n if (this.aborted)\n return\n\n // follow all symlinked directories forever\n // just proceed as if this is a non-globstar situation\n if (this.follow)\n return this._readdir(abs, false, cb)\n\n var lstatkey = 'lstat\\0' + abs\n var self = this\n var lstatcb = inflight(lstatkey, lstatcb_)\n\n if (lstatcb)\n self.fs.lstat(abs, lstatcb)\n\n function lstatcb_ (er, lstat) {\n if (er && er.code === 'ENOENT')\n return cb()\n\n var isSym = lstat && lstat.isSymbolicLink()\n self.symlinks[abs] = isSym\n\n // If it's not a symlink or a dir, then it's definitely a regular file.\n // don't bother doing a readdir in that case.\n if (!isSym && lstat && !lstat.isDirectory()) {\n self.cache[abs] = 'FILE'\n cb()\n } else\n self._readdir(abs, false, cb)\n }\n}\n\nGlob.prototype._readdir = function (abs, inGlobStar, cb) {\n if (this.aborted)\n return\n\n cb = inflight('readdir\\0'+abs+'\\0'+inGlobStar, cb)\n if (!cb)\n return\n\n //console.error('RD %j %j', +inGlobStar, abs)\n if (inGlobStar && !ownProp(this.symlinks, abs))\n return this._readdirInGlobStar(abs, cb)\n\n if (ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n if (!c || c === 'FILE')\n return cb()\n\n if (Array.isArray(c))\n return cb(null, c)\n }\n\n var self = this\n self.fs.readdir(abs, readdirCb(this, abs, cb))\n}\n\nfunction readdirCb (self, abs, cb) {\n return function (er, entries) {\n if (er)\n self._readdirError(abs, er, cb)\n else\n self._readdirEntries(abs, entries, cb)\n }\n}\n\nGlob.prototype._readdirEntries = function (abs, entries, cb) {\n if (this.aborted)\n return\n\n // if we haven't asked to stat everything, then just\n // assume that everything in there exists, so we can avoid\n // having to stat it a second time.\n if (!this.mark && !this.stat) {\n for (var i = 0; i < entries.length; i ++) {\n var e = entries[i]\n if (abs === '/')\n e = abs + e\n else\n e = abs + '/' + e\n this.cache[e] = true\n }\n }\n\n this.cache[abs] = entries\n return cb(null, entries)\n}\n\nGlob.prototype._readdirError = function (f, er, cb) {\n if (this.aborted)\n return\n\n // handle errors, and cache the information\n switch (er.code) {\n case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205\n case 'ENOTDIR': // totally normal. means it *does* exist.\n var abs = this._makeAbs(f)\n this.cache[abs] = 'FILE'\n if (abs === this.cwdAbs) {\n var error = new Error(er.code + ' invalid cwd ' + this.cwd)\n error.path = this.cwd\n error.code = er.code\n this.emit('error', error)\n this.abort()\n }\n break\n\n case 'ENOENT': // not terribly unusual\n case 'ELOOP':\n case 'ENAMETOOLONG':\n case 'UNKNOWN':\n this.cache[this._makeAbs(f)] = false\n break\n\n default: // some unusual error. Treat as failure.\n this.cache[this._makeAbs(f)] = false\n if (this.strict) {\n this.emit('error', er)\n // If the error is handled, then we abort\n // if not, we threw out of here\n this.abort()\n }\n if (!this.silent)\n console.error('glob error', er)\n break\n }\n\n return cb()\n}\n\nGlob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) {\n var self = this\n this._readdir(abs, inGlobStar, function (er, entries) {\n self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb)\n })\n}\n\n\nGlob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) {\n //console.error('pgs2', prefix, remain[0], entries)\n\n // no entries means not a dir, so it can never have matches\n // foo.txt/** doesn't match foo.txt\n if (!entries)\n return cb()\n\n // test without the globstar, and with every child both below\n // and replacing the globstar.\n var remainWithoutGlobStar = remain.slice(1)\n var gspref = prefix ? [ prefix ] : []\n var noGlobStar = gspref.concat(remainWithoutGlobStar)\n\n // the noGlobStar pattern exits the inGlobStar state\n this._process(noGlobStar, index, false, cb)\n\n var isSym = this.symlinks[abs]\n var len = entries.length\n\n // If it's a symlink, and we're in a globstar, then stop\n if (isSym && inGlobStar)\n return cb()\n\n for (var i = 0; i < len; i++) {\n var e = entries[i]\n if (e.charAt(0) === '.' && !this.dot)\n continue\n\n // these two cases enter the inGlobStar state\n var instead = gspref.concat(entries[i], remainWithoutGlobStar)\n this._process(instead, index, true, cb)\n\n var below = gspref.concat(entries[i], remain)\n this._process(below, index, true, cb)\n }\n\n cb()\n}\n\nGlob.prototype._processSimple = function (prefix, index, cb) {\n // XXX review this. Shouldn't it be doing the mounting etc\n // before doing stat? kinda weird?\n var self = this\n this._stat(prefix, function (er, exists) {\n self._processSimple2(prefix, index, er, exists, cb)\n })\n}\nGlob.prototype._processSimple2 = function (prefix, index, er, exists, cb) {\n\n //console.error('ps2', prefix, exists)\n\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n // If it doesn't exist, then just mark the lack of results\n if (!exists)\n return cb()\n\n if (prefix && isAbsolute(prefix) && !this.nomount) {\n var trail = /[\\/\\\\]$/.test(prefix)\n if (prefix.charAt(0) === '/') {\n prefix = path.join(this.root, prefix)\n } else {\n prefix = path.resolve(this.root, prefix)\n if (trail)\n prefix += '/'\n }\n }\n\n if (process.platform === 'win32')\n prefix = prefix.replace(/\\\\/g, '/')\n\n // Mark this as a match\n this._emitMatch(index, prefix)\n cb()\n}\n\n// Returns either 'DIR', 'FILE', or false\nGlob.prototype._stat = function (f, cb) {\n var abs = this._makeAbs(f)\n var needDir = f.slice(-1) === '/'\n\n if (f.length > this.maxLength)\n return cb()\n\n if (!this.stat && ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n\n if (Array.isArray(c))\n c = 'DIR'\n\n // It exists, but maybe not how we need it\n if (!needDir || c === 'DIR')\n return cb(null, c)\n\n if (needDir && c === 'FILE')\n return cb()\n\n // otherwise we have to stat, because maybe c=true\n // if we know it exists, but not what it is.\n }\n\n var exists\n var stat = this.statCache[abs]\n if (stat !== undefined) {\n if (stat === false)\n return cb(null, stat)\n else {\n var type = stat.isDirectory() ? 'DIR' : 'FILE'\n if (needDir && type === 'FILE')\n return cb()\n else\n return cb(null, type, stat)\n }\n }\n\n var self = this\n var statcb = inflight('stat\\0' + abs, lstatcb_)\n if (statcb)\n self.fs.lstat(abs, statcb)\n\n function lstatcb_ (er, lstat) {\n if (lstat && lstat.isSymbolicLink()) {\n // If it's a symlink, then treat it as the target, unless\n // the target does not exist, then treat it as a file.\n return self.fs.stat(abs, function (er, stat) {\n if (er)\n self._stat2(f, abs, null, lstat, cb)\n else\n self._stat2(f, abs, er, stat, cb)\n })\n } else {\n self._stat2(f, abs, er, lstat, cb)\n }\n }\n}\n\nGlob.prototype._stat2 = function (f, abs, er, stat, cb) {\n if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {\n this.statCache[abs] = false\n return cb()\n }\n\n var needDir = f.slice(-1) === '/'\n this.statCache[abs] = stat\n\n if (abs.slice(-1) === '/' && stat && !stat.isDirectory())\n return cb(null, false, stat)\n\n var c = true\n if (stat)\n c = stat.isDirectory() ? 'DIR' : 'FILE'\n this.cache[abs] = this.cache[abs] || c\n\n if (needDir && c === 'FILE')\n return cb()\n\n return cb(null, c, stat)\n}\n","module.exports = globSync\nglobSync.GlobSync = GlobSync\n\nvar rp = require('fs.realpath')\nvar minimatch = require('minimatch')\nvar Minimatch = minimatch.Minimatch\nvar Glob = require('./glob.js').Glob\nvar util = require('util')\nvar path = require('path')\nvar assert = require('assert')\nvar isAbsolute = require('path-is-absolute')\nvar common = require('./common.js')\nvar setopts = common.setopts\nvar ownProp = common.ownProp\nvar childrenIgnored = common.childrenIgnored\nvar isIgnored = common.isIgnored\n\nfunction globSync (pattern, options) {\n if (typeof options === 'function' || arguments.length === 3)\n throw new TypeError('callback provided to sync glob\\n'+\n 'See: https://github.com/isaacs/node-glob/issues/167')\n\n return new GlobSync(pattern, options).found\n}\n\nfunction GlobSync (pattern, options) {\n if (!pattern)\n throw new Error('must provide pattern')\n\n if (typeof options === 'function' || arguments.length === 3)\n throw new TypeError('callback provided to sync glob\\n'+\n 'See: https://github.com/isaacs/node-glob/issues/167')\n\n if (!(this instanceof GlobSync))\n return new GlobSync(pattern, options)\n\n setopts(this, pattern, options)\n\n if (this.noprocess)\n return this\n\n var n = this.minimatch.set.length\n this.matches = new Array(n)\n for (var i = 0; i < n; i ++) {\n this._process(this.minimatch.set[i], i, false)\n }\n this._finish()\n}\n\nGlobSync.prototype._finish = function () {\n assert.ok(this instanceof GlobSync)\n if (this.realpath) {\n var self = this\n this.matches.forEach(function (matchset, index) {\n var set = self.matches[index] = Object.create(null)\n for (var p in matchset) {\n try {\n p = self._makeAbs(p)\n var real = rp.realpathSync(p, self.realpathCache)\n set[real] = true\n } catch (er) {\n if (er.syscall === 'stat')\n set[self._makeAbs(p)] = true\n else\n throw er\n }\n }\n })\n }\n common.finish(this)\n}\n\n\nGlobSync.prototype._process = function (pattern, index, inGlobStar) {\n assert.ok(this instanceof GlobSync)\n\n // Get the first [n] parts of pattern that are all strings.\n var n = 0\n while (typeof pattern[n] === 'string') {\n n ++\n }\n // now n is the index of the first one that is *not* a string.\n\n // See if there's anything else\n var prefix\n switch (n) {\n // if not, then this is rather simple\n case pattern.length:\n this._processSimple(pattern.join('/'), index)\n return\n\n case 0:\n // pattern *starts* with some non-trivial item.\n // going to readdir(cwd), but not include the prefix in matches.\n prefix = null\n break\n\n default:\n // pattern has some string bits in the front.\n // whatever it starts with, whether that's 'absolute' like /foo/bar,\n // or 'relative' like '../baz'\n prefix = pattern.slice(0, n).join('/')\n break\n }\n\n var remain = pattern.slice(n)\n\n // get the list of entries.\n var read\n if (prefix === null)\n read = '.'\n else if (isAbsolute(prefix) ||\n isAbsolute(pattern.map(function (p) {\n return typeof p === 'string' ? p : '[*]'\n }).join('/'))) {\n if (!prefix || !isAbsolute(prefix))\n prefix = '/' + prefix\n read = prefix\n } else\n read = prefix\n\n var abs = this._makeAbs(read)\n\n //if ignored, skip processing\n if (childrenIgnored(this, read))\n return\n\n var isGlobStar = remain[0] === minimatch.GLOBSTAR\n if (isGlobStar)\n this._processGlobStar(prefix, read, abs, remain, index, inGlobStar)\n else\n this._processReaddir(prefix, read, abs, remain, index, inGlobStar)\n}\n\n\nGlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) {\n var entries = this._readdir(abs, inGlobStar)\n\n // if the abs isn't a dir, then nothing can match!\n if (!entries)\n return\n\n // It will only match dot entries if it starts with a dot, or if\n // dot is set. Stuff like @(.foo|.bar) isn't allowed.\n var pn = remain[0]\n var negate = !!this.minimatch.negate\n var rawGlob = pn._glob\n var dotOk = this.dot || rawGlob.charAt(0) === '.'\n\n var matchedEntries = []\n for (var i = 0; i < entries.length; i++) {\n var e = entries[i]\n if (e.charAt(0) !== '.' || dotOk) {\n var m\n if (negate && !prefix) {\n m = !e.match(pn)\n } else {\n m = e.match(pn)\n }\n if (m)\n matchedEntries.push(e)\n }\n }\n\n var len = matchedEntries.length\n // If there are no matched entries, then nothing matches.\n if (len === 0)\n return\n\n // if this is the last remaining pattern bit, then no need for\n // an additional stat *unless* the user has specified mark or\n // stat explicitly. We know they exist, since readdir returned\n // them.\n\n if (remain.length === 1 && !this.mark && !this.stat) {\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n if (prefix) {\n if (prefix.slice(-1) !== '/')\n e = prefix + '/' + e\n else\n e = prefix + e\n }\n\n if (e.charAt(0) === '/' && !this.nomount) {\n e = path.join(this.root, e)\n }\n this._emitMatch(index, e)\n }\n // This was the last one, and no stats were needed\n return\n }\n\n // now test all matched entries as stand-ins for that part\n // of the pattern.\n remain.shift()\n for (var i = 0; i < len; i ++) {\n var e = matchedEntries[i]\n var newPattern\n if (prefix)\n newPattern = [prefix, e]\n else\n newPattern = [e]\n this._process(newPattern.concat(remain), index, inGlobStar)\n }\n}\n\n\nGlobSync.prototype._emitMatch = function (index, e) {\n if (isIgnored(this, e))\n return\n\n var abs = this._makeAbs(e)\n\n if (this.mark)\n e = this._mark(e)\n\n if (this.absolute) {\n e = abs\n }\n\n if (this.matches[index][e])\n return\n\n if (this.nodir) {\n var c = this.cache[abs]\n if (c === 'DIR' || Array.isArray(c))\n return\n }\n\n this.matches[index][e] = true\n\n if (this.stat)\n this._stat(e)\n}\n\n\nGlobSync.prototype._readdirInGlobStar = function (abs) {\n // follow all symlinked directories forever\n // just proceed as if this is a non-globstar situation\n if (this.follow)\n return this._readdir(abs, false)\n\n var entries\n var lstat\n var stat\n try {\n lstat = this.fs.lstatSync(abs)\n } catch (er) {\n if (er.code === 'ENOENT') {\n // lstat failed, doesn't exist\n return null\n }\n }\n\n var isSym = lstat && lstat.isSymbolicLink()\n this.symlinks[abs] = isSym\n\n // If it's not a symlink or a dir, then it's definitely a regular file.\n // don't bother doing a readdir in that case.\n if (!isSym && lstat && !lstat.isDirectory())\n this.cache[abs] = 'FILE'\n else\n entries = this._readdir(abs, false)\n\n return entries\n}\n\nGlobSync.prototype._readdir = function (abs, inGlobStar) {\n var entries\n\n if (inGlobStar && !ownProp(this.symlinks, abs))\n return this._readdirInGlobStar(abs)\n\n if (ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n if (!c || c === 'FILE')\n return null\n\n if (Array.isArray(c))\n return c\n }\n\n try {\n return this._readdirEntries(abs, this.fs.readdirSync(abs))\n } catch (er) {\n this._readdirError(abs, er)\n return null\n }\n}\n\nGlobSync.prototype._readdirEntries = function (abs, entries) {\n // if we haven't asked to stat everything, then just\n // assume that everything in there exists, so we can avoid\n // having to stat it a second time.\n if (!this.mark && !this.stat) {\n for (var i = 0; i < entries.length; i ++) {\n var e = entries[i]\n if (abs === '/')\n e = abs + e\n else\n e = abs + '/' + e\n this.cache[e] = true\n }\n }\n\n this.cache[abs] = entries\n\n // mark and cache dir-ness\n return entries\n}\n\nGlobSync.prototype._readdirError = function (f, er) {\n // handle errors, and cache the information\n switch (er.code) {\n case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205\n case 'ENOTDIR': // totally normal. means it *does* exist.\n var abs = this._makeAbs(f)\n this.cache[abs] = 'FILE'\n if (abs === this.cwdAbs) {\n var error = new Error(er.code + ' invalid cwd ' + this.cwd)\n error.path = this.cwd\n error.code = er.code\n throw error\n }\n break\n\n case 'ENOENT': // not terribly unusual\n case 'ELOOP':\n case 'ENAMETOOLONG':\n case 'UNKNOWN':\n this.cache[this._makeAbs(f)] = false\n break\n\n default: // some unusual error. Treat as failure.\n this.cache[this._makeAbs(f)] = false\n if (this.strict)\n throw er\n if (!this.silent)\n console.error('glob error', er)\n break\n }\n}\n\nGlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) {\n\n var entries = this._readdir(abs, inGlobStar)\n\n // no entries means not a dir, so it can never have matches\n // foo.txt/** doesn't match foo.txt\n if (!entries)\n return\n\n // test without the globstar, and with every child both below\n // and replacing the globstar.\n var remainWithoutGlobStar = remain.slice(1)\n var gspref = prefix ? [ prefix ] : []\n var noGlobStar = gspref.concat(remainWithoutGlobStar)\n\n // the noGlobStar pattern exits the inGlobStar state\n this._process(noGlobStar, index, false)\n\n var len = entries.length\n var isSym = this.symlinks[abs]\n\n // If it's a symlink, and we're in a globstar, then stop\n if (isSym && inGlobStar)\n return\n\n for (var i = 0; i < len; i++) {\n var e = entries[i]\n if (e.charAt(0) === '.' && !this.dot)\n continue\n\n // these two cases enter the inGlobStar state\n var instead = gspref.concat(entries[i], remainWithoutGlobStar)\n this._process(instead, index, true)\n\n var below = gspref.concat(entries[i], remain)\n this._process(below, index, true)\n }\n}\n\nGlobSync.prototype._processSimple = function (prefix, index) {\n // XXX review this. Shouldn't it be doing the mounting etc\n // before doing stat? kinda weird?\n var exists = this._stat(prefix)\n\n if (!this.matches[index])\n this.matches[index] = Object.create(null)\n\n // If it doesn't exist, then just mark the lack of results\n if (!exists)\n return\n\n if (prefix && isAbsolute(prefix) && !this.nomount) {\n var trail = /[\\/\\\\]$/.test(prefix)\n if (prefix.charAt(0) === '/') {\n prefix = path.join(this.root, prefix)\n } else {\n prefix = path.resolve(this.root, prefix)\n if (trail)\n prefix += '/'\n }\n }\n\n if (process.platform === 'win32')\n prefix = prefix.replace(/\\\\/g, '/')\n\n // Mark this as a match\n this._emitMatch(index, prefix)\n}\n\n// Returns either 'DIR', 'FILE', or false\nGlobSync.prototype._stat = function (f) {\n var abs = this._makeAbs(f)\n var needDir = f.slice(-1) === '/'\n\n if (f.length > this.maxLength)\n return false\n\n if (!this.stat && ownProp(this.cache, abs)) {\n var c = this.cache[abs]\n\n if (Array.isArray(c))\n c = 'DIR'\n\n // It exists, but maybe not how we need it\n if (!needDir || c === 'DIR')\n return c\n\n if (needDir && c === 'FILE')\n return false\n\n // otherwise we have to stat, because maybe c=true\n // if we know it exists, but not what it is.\n }\n\n var exists\n var stat = this.statCache[abs]\n if (!stat) {\n var lstat\n try {\n lstat = this.fs.lstatSync(abs)\n } catch (er) {\n if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {\n this.statCache[abs] = false\n return false\n }\n }\n\n if (lstat && lstat.isSymbolicLink()) {\n try {\n stat = this.fs.statSync(abs)\n } catch (er) {\n stat = lstat\n }\n } else {\n stat = lstat\n }\n }\n\n this.statCache[abs] = stat\n\n var c = true\n if (stat)\n c = stat.isDirectory() ? 'DIR' : 'FILE'\n\n this.cache[abs] = this.cache[abs] || c\n\n if (needDir && c === 'FILE')\n return false\n\n return c\n}\n\nGlobSync.prototype._mark = function (p) {\n return common.mark(this, p)\n}\n\nGlobSync.prototype._makeAbs = function (f) {\n return common.makeAbs(this, f)\n}\n","import process from 'node:process';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport fastGlob from 'fast-glob';\nimport gitIgnore from 'ignore';\nimport slash from 'slash';\nimport {toPath, isNegativePattern} from './utilities.js';\n\nconst ignoreFilesGlobOptions = {\n\tignore: [\n\t\t'**/node_modules',\n\t\t'**/flow-typed',\n\t\t'**/coverage',\n\t\t'**/.git',\n\t],\n\tabsolute: true,\n\tdot: true,\n};\n\nexport const GITIGNORE_FILES_PATTERN = '**/.gitignore';\n\nconst applyBaseToPattern = (pattern, base) => isNegativePattern(pattern)\n\t? '!' + path.posix.join(base, pattern.slice(1))\n\t: path.posix.join(base, pattern);\n\nconst parseIgnoreFile = (file, cwd) => {\n\tconst base = slash(path.relative(cwd, path.dirname(file.filePath)));\n\n\treturn file.content\n\t\t.split(/\\r?\\n/)\n\t\t.filter(line => line && !line.startsWith('#'))\n\t\t.map(pattern => applyBaseToPattern(pattern, base));\n};\n\nconst toRelativePath = (fileOrDirectory, cwd) => {\n\tcwd = slash(cwd);\n\tif (path.isAbsolute(fileOrDirectory)) {\n\t\tif (slash(fileOrDirectory).startsWith(cwd)) {\n\t\t\treturn path.relative(cwd, fileOrDirectory);\n\t\t}\n\n\t\tthrow new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);\n\t}\n\n\treturn fileOrDirectory;\n};\n\nconst getIsIgnoredPredicate = (files, cwd) => {\n\tconst patterns = files.flatMap(file => parseIgnoreFile(file, cwd));\n\tconst ignores = gitIgnore().add(patterns);\n\n\treturn fileOrDirectory => {\n\t\tfileOrDirectory = toPath(fileOrDirectory);\n\t\tfileOrDirectory = toRelativePath(fileOrDirectory, cwd);\n\t\treturn fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : false;\n\t};\n};\n\nconst normalizeOptions = (options = {}) => ({\n\tcwd: toPath(options.cwd) || process.cwd(),\n\tsuppressErrors: Boolean(options.suppressErrors),\n\tdeep: typeof options.deep === 'number' ? options.deep : Number.POSITIVE_INFINITY,\n});\n\nexport const isIgnoredByIgnoreFiles = async (patterns, options) => {\n\tconst {cwd, suppressErrors, deep} = normalizeOptions(options);\n\n\tconst paths = await fastGlob(patterns, {cwd, suppressErrors, deep, ...ignoreFilesGlobOptions});\n\n\tconst files = await Promise.all(\n\t\tpaths.map(async filePath => ({\n\t\t\tfilePath,\n\t\t\tcontent: await fs.promises.readFile(filePath, 'utf8'),\n\t\t})),\n\t);\n\n\treturn getIsIgnoredPredicate(files, cwd);\n};\n\nexport const isIgnoredByIgnoreFilesSync = (patterns, options) => {\n\tconst {cwd, suppressErrors, deep} = normalizeOptions(options);\n\n\tconst paths = fastGlob.sync(patterns, {cwd, suppressErrors, deep, ...ignoreFilesGlobOptions});\n\n\tconst files = paths.map(filePath => ({\n\t\tfilePath,\n\t\tcontent: fs.readFileSync(filePath, 'utf8'),\n\t}));\n\n\treturn getIsIgnoredPredicate(files, cwd);\n};\n\nexport const isGitIgnored = options => isIgnoredByIgnoreFiles(GITIGNORE_FILES_PATTERN, options);\nexport const isGitIgnoredSync = options => isIgnoredByIgnoreFilesSync(GITIGNORE_FILES_PATTERN, options);\n","import fs from 'node:fs';\nimport nodePath from 'node:path';\nimport merge2 from 'merge2';\nimport fastGlob from 'fast-glob';\nimport dirGlob from 'dir-glob';\nimport {\n\tGITIGNORE_FILES_PATTERN,\n\tisIgnoredByIgnoreFiles,\n\tisIgnoredByIgnoreFilesSync,\n} from './ignore.js';\nimport {FilterStream, toPath, isNegativePattern} from './utilities.js';\n\nconst assertPatternsInput = patterns => {\n\tif (patterns.some(pattern => typeof pattern !== 'string')) {\n\t\tthrow new TypeError('Patterns must be a string or an array of strings');\n\t}\n};\n\nconst toPatternsArray = patterns => {\n\tpatterns = [...new Set([patterns].flat())];\n\tassertPatternsInput(patterns);\n\treturn patterns;\n};\n\nconst checkCwdOption = options => {\n\tif (!options.cwd) {\n\t\treturn;\n\t}\n\n\tlet stat;\n\ttry {\n\t\tstat = fs.statSync(options.cwd);\n\t} catch {\n\t\treturn;\n\t}\n\n\tif (!stat.isDirectory()) {\n\t\tthrow new Error('The `cwd` option must be a path to a directory');\n\t}\n};\n\nconst normalizeOptions = (options = {}) => {\n\toptions = {\n\t\t...options,\n\t\tignore: options.ignore || [],\n\t\texpandDirectories: options.expandDirectories === undefined\n\t\t\t? true\n\t\t\t: options.expandDirectories,\n\t\tcwd: toPath(options.cwd),\n\t};\n\n\tcheckCwdOption(options);\n\n\treturn options;\n};\n\nconst normalizeArguments = fn => async (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));\nconst normalizeArgumentsSync = fn => (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));\n\nconst getIgnoreFilesPatterns = options => {\n\tconst {ignoreFiles, gitignore} = options;\n\n\tconst patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : [];\n\tif (gitignore) {\n\t\tpatterns.push(GITIGNORE_FILES_PATTERN);\n\t}\n\n\treturn patterns;\n};\n\nconst getFilter = async options => {\n\tconst ignoreFilesPatterns = getIgnoreFilesPatterns(options);\n\treturn createFilterFunction(\n\t\tignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options),\n\t);\n};\n\nconst getFilterSync = options => {\n\tconst ignoreFilesPatterns = getIgnoreFilesPatterns(options);\n\treturn createFilterFunction(\n\t\tignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options),\n\t);\n};\n\nconst createFilterFunction = isIgnored => {\n\tconst seen = new Set();\n\n\treturn fastGlobResult => {\n\t\tconst path = fastGlobResult.path || fastGlobResult;\n\t\tconst pathKey = nodePath.normalize(path);\n\t\tconst seenOrIgnored = seen.has(pathKey) || (isIgnored && isIgnored(path));\n\t\tseen.add(pathKey);\n\t\treturn !seenOrIgnored;\n\t};\n};\n\nconst unionFastGlobResults = (results, filter) => results.flat().filter(fastGlobResult => filter(fastGlobResult));\nconst unionFastGlobStreams = (streams, filter) => merge2(streams).pipe(new FilterStream(fastGlobResult => filter(fastGlobResult)));\n\nconst convertNegativePatterns = (patterns, options) => {\n\tconst tasks = [];\n\n\twhile (patterns.length > 0) {\n\t\tconst index = patterns.findIndex(pattern => isNegativePattern(pattern));\n\n\t\tif (index === -1) {\n\t\t\ttasks.push({patterns, options});\n\t\t\tbreak;\n\t\t}\n\n\t\tconst ignorePattern = patterns[index].slice(1);\n\n\t\tfor (const task of tasks) {\n\t\t\ttask.options.ignore.push(ignorePattern);\n\t\t}\n\n\t\tif (index !== 0) {\n\t\t\ttasks.push({\n\t\t\t\tpatterns: patterns.slice(0, index),\n\t\t\t\toptions: {\n\t\t\t\t\t...options,\n\t\t\t\t\tignore: [\n\t\t\t\t\t\t...options.ignore,\n\t\t\t\t\t\tignorePattern,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tpatterns = patterns.slice(index + 1);\n\t}\n\n\treturn tasks;\n};\n\nconst getDirGlobOptions = (options, cwd) => ({\n\t...(cwd ? {cwd} : {}),\n\t...(Array.isArray(options) ? {files: options} : options),\n});\n\nconst generateTasks = async (patterns, options) => {\n\tconst globTasks = convertNegativePatterns(patterns, options);\n\n\tconst {cwd, expandDirectories} = options;\n\n\tif (!expandDirectories) {\n\t\treturn globTasks;\n\t}\n\n\tconst patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);\n\tconst ignoreExpandOptions = cwd ? {cwd} : undefined;\n\n\treturn Promise.all(\n\t\tglobTasks.map(async task => {\n\t\t\tlet {patterns, options} = task;\n\n\t\t\t[\n\t\t\t\tpatterns,\n\t\t\t\toptions.ignore,\n\t\t\t] = await Promise.all([\n\t\t\t\tdirGlob(patterns, patternExpandOptions),\n\t\t\t\tdirGlob(options.ignore, ignoreExpandOptions),\n\t\t\t]);\n\n\t\t\treturn {patterns, options};\n\t\t}),\n\t);\n};\n\nconst generateTasksSync = (patterns, options) => {\n\tconst globTasks = convertNegativePatterns(patterns, options);\n\n\tconst {cwd, expandDirectories} = options;\n\n\tif (!expandDirectories) {\n\t\treturn globTasks;\n\t}\n\n\tconst patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);\n\tconst ignoreExpandOptions = cwd ? {cwd} : undefined;\n\n\treturn globTasks.map(task => {\n\t\tlet {patterns, options} = task;\n\t\tpatterns = dirGlob.sync(patterns, patternExpandOptions);\n\t\toptions.ignore = dirGlob.sync(options.ignore, ignoreExpandOptions);\n\t\treturn {patterns, options};\n\t});\n};\n\nexport const globby = normalizeArguments(async (patterns, options) => {\n\tconst [\n\t\ttasks,\n\t\tfilter,\n\t] = await Promise.all([\n\t\tgenerateTasks(patterns, options),\n\t\tgetFilter(options),\n\t]);\n\tconst results = await Promise.all(tasks.map(task => fastGlob(task.patterns, task.options)));\n\n\treturn unionFastGlobResults(results, filter);\n});\n\nexport const globbySync = normalizeArgumentsSync((patterns, options) => {\n\tconst tasks = generateTasksSync(patterns, options);\n\tconst filter = getFilterSync(options);\n\tconst results = tasks.map(task => fastGlob.sync(task.patterns, task.options));\n\n\treturn unionFastGlobResults(results, filter);\n});\n\nexport const globbyStream = normalizeArgumentsSync((patterns, options) => {\n\tconst tasks = generateTasksSync(patterns, options);\n\tconst filter = getFilterSync(options);\n\tconst streams = tasks.map(task => fastGlob.stream(task.patterns, task.options));\n\n\treturn unionFastGlobStreams(streams, filter);\n});\n\nexport const isDynamicPattern = normalizeArgumentsSync(\n\t(patterns, options) => patterns.some(pattern => fastGlob.isDynamicPattern(pattern, options)),\n);\n\nexport const generateGlobTasks = normalizeArguments(generateTasks);\nexport const generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);\n\nexport {\n\tisGitIgnored,\n\tisGitIgnoredSync,\n} from './ignore.js';\n","import {fileURLToPath} from 'node:url';\nimport {Transform} from 'node:stream';\n\nexport const toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport class FilterStream extends Transform {\n\tconstructor(filter) {\n\t\tsuper({\n\t\t\tobjectMode: true,\n\t\t\ttransform(data, encoding, callback) {\n\t\t\t\tcallback(undefined, filter(data) ? data : undefined);\n\t\t\t},\n\t\t});\n\t}\n}\n\nexport const isNegativePattern = pattern => pattern[0] === '!';\n","'use strict';\nvar Promise = require('pinkie-promise');\nvar arrayUnion = require('array-union');\nvar objectAssign = require('object-assign');\nvar glob = require('glob');\nvar pify = require('pify');\n\nvar globP = pify(glob, Promise).bind(glob);\n\nfunction isNegative(pattern) {\n\treturn pattern[0] === '!';\n}\n\nfunction isString(value) {\n\treturn typeof value === 'string';\n}\n\nfunction assertPatternsInput(patterns) {\n\tif (!patterns.every(isString)) {\n\t\tthrow new TypeError('patterns must be a string or an array of strings');\n\t}\n}\n\nfunction generateGlobTasks(patterns, opts) {\n\tpatterns = [].concat(patterns);\n\tassertPatternsInput(patterns);\n\n\tvar globTasks = [];\n\n\topts = objectAssign({\n\t\tcache: Object.create(null),\n\t\tstatCache: Object.create(null),\n\t\trealpathCache: Object.create(null),\n\t\tsymlinks: Object.create(null),\n\t\tignore: []\n\t}, opts);\n\n\tpatterns.forEach(function (pattern, i) {\n\t\tif (isNegative(pattern)) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar ignore = patterns.slice(i).filter(isNegative).map(function (pattern) {\n\t\t\treturn pattern.slice(1);\n\t\t});\n\n\t\tglobTasks.push({\n\t\t\tpattern: pattern,\n\t\t\topts: objectAssign({}, opts, {\n\t\t\t\tignore: opts.ignore.concat(ignore)\n\t\t\t})\n\t\t});\n\t});\n\n\treturn globTasks;\n}\n\nmodule.exports = function (patterns, opts) {\n\tvar globTasks;\n\n\ttry {\n\t\tglobTasks = generateGlobTasks(patterns, opts);\n\t} catch (err) {\n\t\treturn Promise.reject(err);\n\t}\n\n\treturn Promise.all(globTasks.map(function (task) {\n\t\treturn globP(task.pattern, task.opts);\n\t})).then(function (paths) {\n\t\treturn arrayUnion.apply(null, paths);\n\t});\n};\n\nmodule.exports.sync = function (patterns, opts) {\n\tvar globTasks = generateGlobTasks(patterns, opts);\n\n\treturn globTasks.reduce(function (matches, task) {\n\t\treturn arrayUnion(matches, glob.sync(task.pattern, task.opts));\n\t}, []);\n};\n\nmodule.exports.generateGlobTasks = generateGlobTasks;\n\nmodule.exports.hasMagic = function (patterns, opts) {\n\treturn [].concat(patterns).some(function (pattern) {\n\t\treturn glob.hasMagic(pattern, opts);\n\t});\n};\n","'use strict'\n\nmodule.exports = clone\n\nvar getPrototypeOf = Object.getPrototypeOf || function (obj) {\n return obj.__proto__\n}\n\nfunction clone (obj) {\n if (obj === null || typeof obj !== 'object')\n return obj\n\n if (obj instanceof Object)\n var copy = { __proto__: getPrototypeOf(obj) }\n else\n var copy = Object.create(null)\n\n Object.getOwnPropertyNames(obj).forEach(function (key) {\n Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key))\n })\n\n return copy\n}\n","var fs = require('fs')\nvar polyfills = require('./polyfills.js')\nvar legacy = require('./legacy-streams.js')\nvar clone = require('./clone.js')\n\nvar util = require('util')\n\n/* istanbul ignore next - node 0.x polyfill */\nvar gracefulQueue\nvar previousSymbol\n\n/* istanbul ignore else - node 0.x polyfill */\nif (typeof Symbol === 'function' && typeof Symbol.for === 'function') {\n gracefulQueue = Symbol.for('graceful-fs.queue')\n // This is used in testing by future versions\n previousSymbol = Symbol.for('graceful-fs.previous')\n} else {\n gracefulQueue = '___graceful-fs.queue'\n previousSymbol = '___graceful-fs.previous'\n}\n\nfunction noop () {}\n\nfunction publishQueue(context, queue) {\n Object.defineProperty(context, gracefulQueue, {\n get: function() {\n return queue\n }\n })\n}\n\nvar debug = noop\nif (util.debuglog)\n debug = util.debuglog('gfs4')\nelse if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || ''))\n debug = function() {\n var m = util.format.apply(util, arguments)\n m = 'GFS4: ' + m.split(/\\n/).join('\\nGFS4: ')\n console.error(m)\n }\n\n// Once time initialization\nif (!fs[gracefulQueue]) {\n // This queue can be shared by multiple loaded instances\n var queue = global[gracefulQueue] || []\n publishQueue(fs, queue)\n\n // Patch fs.close/closeSync to shared queue version, because we need\n // to retry() whenever a close happens *anywhere* in the program.\n // This is essential when multiple graceful-fs instances are\n // in play at the same time.\n fs.close = (function (fs$close) {\n function close (fd, cb) {\n return fs$close.call(fs, fd, function (err) {\n // This function uses the graceful-fs shared queue\n if (!err) {\n resetQueue()\n }\n\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n })\n }\n\n Object.defineProperty(close, previousSymbol, {\n value: fs$close\n })\n return close\n })(fs.close)\n\n fs.closeSync = (function (fs$closeSync) {\n function closeSync (fd) {\n // This function uses the graceful-fs shared queue\n fs$closeSync.apply(fs, arguments)\n resetQueue()\n }\n\n Object.defineProperty(closeSync, previousSymbol, {\n value: fs$closeSync\n })\n return closeSync\n })(fs.closeSync)\n\n if (/\\bgfs4\\b/i.test(process.env.NODE_DEBUG || '')) {\n process.on('exit', function() {\n debug(fs[gracefulQueue])\n require('assert').equal(fs[gracefulQueue].length, 0)\n })\n }\n}\n\nif (!global[gracefulQueue]) {\n publishQueue(global, fs[gracefulQueue]);\n}\n\nmodule.exports = patch(clone(fs))\nif (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {\n module.exports = patch(fs)\n fs.__patched = true;\n}\n\nfunction patch (fs) {\n // Everything that references the open() function needs to be in here\n polyfills(fs)\n fs.gracefulify = patch\n\n fs.createReadStream = createReadStream\n fs.createWriteStream = createWriteStream\n var fs$readFile = fs.readFile\n fs.readFile = readFile\n function readFile (path, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$readFile(path, options, cb)\n\n function go$readFile (path, options, cb, startTime) {\n return fs$readFile(path, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$writeFile = fs.writeFile\n fs.writeFile = writeFile\n function writeFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$writeFile(path, data, options, cb)\n\n function go$writeFile (path, data, options, cb, startTime) {\n return fs$writeFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$appendFile = fs.appendFile\n if (fs$appendFile)\n fs.appendFile = appendFile\n function appendFile (path, data, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n return go$appendFile(path, data, options, cb)\n\n function go$appendFile (path, data, options, cb, startTime) {\n return fs$appendFile(path, data, options, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$copyFile = fs.copyFile\n if (fs$copyFile)\n fs.copyFile = copyFile\n function copyFile (src, dest, flags, cb) {\n if (typeof flags === 'function') {\n cb = flags\n flags = 0\n }\n return go$copyFile(src, dest, flags, cb)\n\n function go$copyFile (src, dest, flags, cb, startTime) {\n return fs$copyFile(src, dest, flags, function (err) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n var fs$readdir = fs.readdir\n fs.readdir = readdir\n var noReaddirOptionVersions = /^v[0-5]\\./\n function readdir (path, options, cb) {\n if (typeof options === 'function')\n cb = options, options = null\n\n var go$readdir = noReaddirOptionVersions.test(process.version)\n ? function go$readdir (path, options, cb, startTime) {\n return fs$readdir(path, fs$readdirCallback(\n path, options, cb, startTime\n ))\n }\n : function go$readdir (path, options, cb, startTime) {\n return fs$readdir(path, options, fs$readdirCallback(\n path, options, cb, startTime\n ))\n }\n\n return go$readdir(path, options, cb)\n\n function fs$readdirCallback (path, options, cb, startTime) {\n return function (err, files) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([\n go$readdir,\n [path, options, cb],\n err,\n startTime || Date.now(),\n Date.now()\n ])\n else {\n if (files && files.sort)\n files.sort()\n\n if (typeof cb === 'function')\n cb.call(this, err, files)\n }\n }\n }\n }\n\n if (process.version.substr(0, 4) === 'v0.8') {\n var legStreams = legacy(fs)\n ReadStream = legStreams.ReadStream\n WriteStream = legStreams.WriteStream\n }\n\n var fs$ReadStream = fs.ReadStream\n if (fs$ReadStream) {\n ReadStream.prototype = Object.create(fs$ReadStream.prototype)\n ReadStream.prototype.open = ReadStream$open\n }\n\n var fs$WriteStream = fs.WriteStream\n if (fs$WriteStream) {\n WriteStream.prototype = Object.create(fs$WriteStream.prototype)\n WriteStream.prototype.open = WriteStream$open\n }\n\n Object.defineProperty(fs, 'ReadStream', {\n get: function () {\n return ReadStream\n },\n set: function (val) {\n ReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n Object.defineProperty(fs, 'WriteStream', {\n get: function () {\n return WriteStream\n },\n set: function (val) {\n WriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n // legacy names\n var FileReadStream = ReadStream\n Object.defineProperty(fs, 'FileReadStream', {\n get: function () {\n return FileReadStream\n },\n set: function (val) {\n FileReadStream = val\n },\n enumerable: true,\n configurable: true\n })\n var FileWriteStream = WriteStream\n Object.defineProperty(fs, 'FileWriteStream', {\n get: function () {\n return FileWriteStream\n },\n set: function (val) {\n FileWriteStream = val\n },\n enumerable: true,\n configurable: true\n })\n\n function ReadStream (path, options) {\n if (this instanceof ReadStream)\n return fs$ReadStream.apply(this, arguments), this\n else\n return ReadStream.apply(Object.create(ReadStream.prototype), arguments)\n }\n\n function ReadStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n if (that.autoClose)\n that.destroy()\n\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n that.read()\n }\n })\n }\n\n function WriteStream (path, options) {\n if (this instanceof WriteStream)\n return fs$WriteStream.apply(this, arguments), this\n else\n return WriteStream.apply(Object.create(WriteStream.prototype), arguments)\n }\n\n function WriteStream$open () {\n var that = this\n open(that.path, that.flags, that.mode, function (err, fd) {\n if (err) {\n that.destroy()\n that.emit('error', err)\n } else {\n that.fd = fd\n that.emit('open', fd)\n }\n })\n }\n\n function createReadStream (path, options) {\n return new fs.ReadStream(path, options)\n }\n\n function createWriteStream (path, options) {\n return new fs.WriteStream(path, options)\n }\n\n var fs$open = fs.open\n fs.open = open\n function open (path, flags, mode, cb) {\n if (typeof mode === 'function')\n cb = mode, mode = null\n\n return go$open(path, flags, mode, cb)\n\n function go$open (path, flags, mode, cb, startTime) {\n return fs$open(path, flags, mode, function (err, fd) {\n if (err && (err.code === 'EMFILE' || err.code === 'ENFILE'))\n enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()])\n else {\n if (typeof cb === 'function')\n cb.apply(this, arguments)\n }\n })\n }\n }\n\n return fs\n}\n\nfunction enqueue (elem) {\n debug('ENQUEUE', elem[0].name, elem[1])\n fs[gracefulQueue].push(elem)\n retry()\n}\n\n// keep track of the timeout between retry() calls\nvar retryTimer\n\n// reset the startTime and lastTime to now\n// this resets the start of the 60 second overall timeout as well as the\n// delay between attempts so that we'll retry these jobs sooner\nfunction resetQueue () {\n var now = Date.now()\n for (var i = 0; i < fs[gracefulQueue].length; ++i) {\n // entries that are only a length of 2 are from an older version, don't\n // bother modifying those since they'll be retried anyway.\n if (fs[gracefulQueue][i].length > 2) {\n fs[gracefulQueue][i][3] = now // startTime\n fs[gracefulQueue][i][4] = now // lastTime\n }\n }\n // call retry to make sure we're actively processing the queue\n retry()\n}\n\nfunction retry () {\n // clear the timer and remove it to help prevent unintended concurrency\n clearTimeout(retryTimer)\n retryTimer = undefined\n\n if (fs[gracefulQueue].length === 0)\n return\n\n var elem = fs[gracefulQueue].shift()\n var fn = elem[0]\n var args = elem[1]\n // these items may be unset if they were added by an older graceful-fs\n var err = elem[2]\n var startTime = elem[3]\n var lastTime = elem[4]\n\n // if we don't have a startTime we have no way of knowing if we've waited\n // long enough, so go ahead and retry this item now\n if (startTime === undefined) {\n debug('RETRY', fn.name, args)\n fn.apply(null, args)\n } else if (Date.now() - startTime >= 60000) {\n // it's been more than 60 seconds total, bail now\n debug('TIMEOUT', fn.name, args)\n var cb = args.pop()\n if (typeof cb === 'function')\n cb.call(null, err)\n } else {\n // the amount of time between the last attempt and right now\n var sinceAttempt = Date.now() - lastTime\n // the amount of time between when we first tried, and when we last tried\n // rounded up to at least 1\n var sinceStart = Math.max(lastTime - startTime, 1)\n // backoff. wait longer than the total time we've been retrying, but only\n // up to a maximum of 100ms\n var desiredDelay = Math.min(sinceStart * 1.2, 100)\n // it's been long enough since the last retry, do it again\n if (sinceAttempt >= desiredDelay) {\n debug('RETRY', fn.name, args)\n fn.apply(null, args.concat([startTime]))\n } else {\n // if we can't do this job yet, push it to the end of the queue\n // and let the next iteration check again\n fs[gracefulQueue].push(elem)\n }\n }\n\n // schedule our next run if one isn't already scheduled\n if (retryTimer === undefined) {\n retryTimer = setTimeout(retry, 0)\n }\n}\n","var Stream = require('stream').Stream\n\nmodule.exports = legacy\n\nfunction legacy (fs) {\n return {\n ReadStream: ReadStream,\n WriteStream: WriteStream\n }\n\n function ReadStream (path, options) {\n if (!(this instanceof ReadStream)) return new ReadStream(path, options);\n\n Stream.call(this);\n\n var self = this;\n\n this.path = path;\n this.fd = null;\n this.readable = true;\n this.paused = false;\n\n this.flags = 'r';\n this.mode = 438; /*=0666*/\n this.bufferSize = 64 * 1024;\n\n options = options || {};\n\n // Mixin options into this\n var keys = Object.keys(options);\n for (var index = 0, length = keys.length; index < length; index++) {\n var key = keys[index];\n this[key] = options[key];\n }\n\n if (this.encoding) this.setEncoding(this.encoding);\n\n if (this.start !== undefined) {\n if ('number' !== typeof this.start) {\n throw TypeError('start must be a Number');\n }\n if (this.end === undefined) {\n this.end = Infinity;\n } else if ('number' !== typeof this.end) {\n throw TypeError('end must be a Number');\n }\n\n if (this.start > this.end) {\n throw new Error('start must be <= end');\n }\n\n this.pos = this.start;\n }\n\n if (this.fd !== null) {\n process.nextTick(function() {\n self._read();\n });\n return;\n }\n\n fs.open(this.path, this.flags, this.mode, function (err, fd) {\n if (err) {\n self.emit('error', err);\n self.readable = false;\n return;\n }\n\n self.fd = fd;\n self.emit('open', fd);\n self._read();\n })\n }\n\n function WriteStream (path, options) {\n if (!(this instanceof WriteStream)) return new WriteStream(path, options);\n\n Stream.call(this);\n\n this.path = path;\n this.fd = null;\n this.writable = true;\n\n this.flags = 'w';\n this.encoding = 'binary';\n this.mode = 438; /*=0666*/\n this.bytesWritten = 0;\n\n options = options || {};\n\n // Mixin options into this\n var keys = Object.keys(options);\n for (var index = 0, length = keys.length; index < length; index++) {\n var key = keys[index];\n this[key] = options[key];\n }\n\n if (this.start !== undefined) {\n if ('number' !== typeof this.start) {\n throw TypeError('start must be a Number');\n }\n if (this.start < 0) {\n throw new Error('start must be >= zero');\n }\n\n this.pos = this.start;\n }\n\n this.busy = false;\n this._queue = [];\n\n if (this.fd === null) {\n this._open = fs.open;\n this._queue.push([this._open, this.path, this.flags, this.mode, undefined]);\n this.flush();\n }\n }\n}\n","var constants = require('constants')\n\nvar origCwd = process.cwd\nvar cwd = null\n\nvar platform = process.env.GRACEFUL_FS_PLATFORM || process.platform\n\nprocess.cwd = function() {\n if (!cwd)\n cwd = origCwd.call(process)\n return cwd\n}\ntry {\n process.cwd()\n} catch (er) {}\n\n// This check is needed until node.js 12 is required\nif (typeof process.chdir === 'function') {\n var chdir = process.chdir\n process.chdir = function (d) {\n cwd = null\n chdir.call(process, d)\n }\n if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir)\n}\n\nmodule.exports = patch\n\nfunction patch (fs) {\n // (re-)implement some things that are known busted or missing.\n\n // lchmod, broken prior to 0.6.2\n // back-port the fix here.\n if (constants.hasOwnProperty('O_SYMLINK') &&\n process.version.match(/^v0\\.6\\.[0-2]|^v0\\.5\\./)) {\n patchLchmod(fs)\n }\n\n // lutimes implementation, or no-op\n if (!fs.lutimes) {\n patchLutimes(fs)\n }\n\n // https://github.com/isaacs/node-graceful-fs/issues/4\n // Chown should not fail on einval or eperm if non-root.\n // It should not fail on enosys ever, as this just indicates\n // that a fs doesn't support the intended operation.\n\n fs.chown = chownFix(fs.chown)\n fs.fchown = chownFix(fs.fchown)\n fs.lchown = chownFix(fs.lchown)\n\n fs.chmod = chmodFix(fs.chmod)\n fs.fchmod = chmodFix(fs.fchmod)\n fs.lchmod = chmodFix(fs.lchmod)\n\n fs.chownSync = chownFixSync(fs.chownSync)\n fs.fchownSync = chownFixSync(fs.fchownSync)\n fs.lchownSync = chownFixSync(fs.lchownSync)\n\n fs.chmodSync = chmodFixSync(fs.chmodSync)\n fs.fchmodSync = chmodFixSync(fs.fchmodSync)\n fs.lchmodSync = chmodFixSync(fs.lchmodSync)\n\n fs.stat = statFix(fs.stat)\n fs.fstat = statFix(fs.fstat)\n fs.lstat = statFix(fs.lstat)\n\n fs.statSync = statFixSync(fs.statSync)\n fs.fstatSync = statFixSync(fs.fstatSync)\n fs.lstatSync = statFixSync(fs.lstatSync)\n\n // if lchmod/lchown do not exist, then make them no-ops\n if (fs.chmod && !fs.lchmod) {\n fs.lchmod = function (path, mode, cb) {\n if (cb) process.nextTick(cb)\n }\n fs.lchmodSync = function () {}\n }\n if (fs.chown && !fs.lchown) {\n fs.lchown = function (path, uid, gid, cb) {\n if (cb) process.nextTick(cb)\n }\n fs.lchownSync = function () {}\n }\n\n // on Windows, A/V software can lock the directory, causing this\n // to fail with an EACCES or EPERM if the directory contains newly\n // created files. Try again on failure, for up to 60 seconds.\n\n // Set the timeout this long because some Windows Anti-Virus, such as Parity\n // bit9, may lock files for up to a minute, causing npm package install\n // failures. Also, take care to yield the scheduler. Windows scheduling gives\n // CPU to a busy looping process, which can cause the program causing the lock\n // contention to be starved of CPU by node, so the contention doesn't resolve.\n if (platform === \"win32\") {\n fs.rename = typeof fs.rename !== 'function' ? fs.rename\n : (function (fs$rename) {\n function rename (from, to, cb) {\n var start = Date.now()\n var backoff = 0;\n fs$rename(from, to, function CB (er) {\n if (er\n && (er.code === \"EACCES\" || er.code === \"EPERM\" || er.code === \"EBUSY\")\n && Date.now() - start < 60000) {\n setTimeout(function() {\n fs.stat(to, function (stater, st) {\n if (stater && stater.code === \"ENOENT\")\n fs$rename(from, to, CB);\n else\n cb(er)\n })\n }, backoff)\n if (backoff < 100)\n backoff += 10;\n return;\n }\n if (cb) cb(er)\n })\n }\n if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename)\n return rename\n })(fs.rename)\n }\n\n // if read() returns EAGAIN, then just try it again.\n fs.read = typeof fs.read !== 'function' ? fs.read\n : (function (fs$read) {\n function read (fd, buffer, offset, length, position, callback_) {\n var callback\n if (callback_ && typeof callback_ === 'function') {\n var eagCounter = 0\n callback = function (er, _, __) {\n if (er && er.code === 'EAGAIN' && eagCounter < 10) {\n eagCounter ++\n return fs$read.call(fs, fd, buffer, offset, length, position, callback)\n }\n callback_.apply(this, arguments)\n }\n }\n return fs$read.call(fs, fd, buffer, offset, length, position, callback)\n }\n\n // This ensures `util.promisify` works as it does for native `fs.read`.\n if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read)\n return read\n })(fs.read)\n\n fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync\n : (function (fs$readSync) { return function (fd, buffer, offset, length, position) {\n var eagCounter = 0\n while (true) {\n try {\n return fs$readSync.call(fs, fd, buffer, offset, length, position)\n } catch (er) {\n if (er.code === 'EAGAIN' && eagCounter < 10) {\n eagCounter ++\n continue\n }\n throw er\n }\n }\n }})(fs.readSync)\n\n function patchLchmod (fs) {\n fs.lchmod = function (path, mode, callback) {\n fs.open( path\n , constants.O_WRONLY | constants.O_SYMLINK\n , mode\n , function (err, fd) {\n if (err) {\n if (callback) callback(err)\n return\n }\n // prefer to return the chmod error, if one occurs,\n // but still try to close, and report closing errors if they occur.\n fs.fchmod(fd, mode, function (err) {\n fs.close(fd, function(err2) {\n if (callback) callback(err || err2)\n })\n })\n })\n }\n\n fs.lchmodSync = function (path, mode) {\n var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)\n\n // prefer to return the chmod error, if one occurs,\n // but still try to close, and report closing errors if they occur.\n var threw = true\n var ret\n try {\n ret = fs.fchmodSync(fd, mode)\n threw = false\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd)\n } catch (er) {}\n } else {\n fs.closeSync(fd)\n }\n }\n return ret\n }\n }\n\n function patchLutimes (fs) {\n if (constants.hasOwnProperty(\"O_SYMLINK\") && fs.futimes) {\n fs.lutimes = function (path, at, mt, cb) {\n fs.open(path, constants.O_SYMLINK, function (er, fd) {\n if (er) {\n if (cb) cb(er)\n return\n }\n fs.futimes(fd, at, mt, function (er) {\n fs.close(fd, function (er2) {\n if (cb) cb(er || er2)\n })\n })\n })\n }\n\n fs.lutimesSync = function (path, at, mt) {\n var fd = fs.openSync(path, constants.O_SYMLINK)\n var ret\n var threw = true\n try {\n ret = fs.futimesSync(fd, at, mt)\n threw = false\n } finally {\n if (threw) {\n try {\n fs.closeSync(fd)\n } catch (er) {}\n } else {\n fs.closeSync(fd)\n }\n }\n return ret\n }\n\n } else if (fs.futimes) {\n fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) }\n fs.lutimesSync = function () {}\n }\n }\n\n function chmodFix (orig) {\n if (!orig) return orig\n return function (target, mode, cb) {\n return orig.call(fs, target, mode, function (er) {\n if (chownErOk(er)) er = null\n if (cb) cb.apply(this, arguments)\n })\n }\n }\n\n function chmodFixSync (orig) {\n if (!orig) return orig\n return function (target, mode) {\n try {\n return orig.call(fs, target, mode)\n } catch (er) {\n if (!chownErOk(er)) throw er\n }\n }\n }\n\n\n function chownFix (orig) {\n if (!orig) return orig\n return function (target, uid, gid, cb) {\n return orig.call(fs, target, uid, gid, function (er) {\n if (chownErOk(er)) er = null\n if (cb) cb.apply(this, arguments)\n })\n }\n }\n\n function chownFixSync (orig) {\n if (!orig) return orig\n return function (target, uid, gid) {\n try {\n return orig.call(fs, target, uid, gid)\n } catch (er) {\n if (!chownErOk(er)) throw er\n }\n }\n }\n\n function statFix (orig) {\n if (!orig) return orig\n // Older versions of Node erroneously returned signed integers for\n // uid + gid.\n return function (target, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = null\n }\n function callback (er, stats) {\n if (stats) {\n if (stats.uid < 0) stats.uid += 0x100000000\n if (stats.gid < 0) stats.gid += 0x100000000\n }\n if (cb) cb.apply(this, arguments)\n }\n return options ? orig.call(fs, target, options, callback)\n : orig.call(fs, target, callback)\n }\n }\n\n function statFixSync (orig) {\n if (!orig) return orig\n // Older versions of Node erroneously returned signed integers for\n // uid + gid.\n return function (target, options) {\n var stats = options ? orig.call(fs, target, options)\n : orig.call(fs, target)\n if (stats) {\n if (stats.uid < 0) stats.uid += 0x100000000\n if (stats.gid < 0) stats.gid += 0x100000000\n }\n return stats;\n }\n }\n\n // ENOSYS means that the fs doesn't support the op. Just ignore\n // that, because it doesn't matter.\n //\n // if there's no getuid, or if getuid() is something other\n // than 0, and the error is EINVAL or EPERM, then just ignore\n // it.\n //\n // This specific case is a silent failure in cp, install, tar,\n // and most other unix tools that manage permissions.\n //\n // When running as root, or if other types of errors are\n // encountered, then it's strict.\n function chownErOk (er) {\n if (!er)\n return true\n\n if (er.code === \"ENOSYS\")\n return true\n\n var nonroot = !process.getuid || process.getuid() !== 0\n if (nonroot) {\n if (er.code === \"EINVAL\" || er.code === \"EPERM\")\n return true\n }\n\n return false\n }\n}\n","// A simple implementation of make-array\nfunction makeArray (subject) {\n return Array.isArray(subject)\n ? subject\n : [subject]\n}\n\nconst EMPTY = ''\nconst SPACE = ' '\nconst ESCAPE = '\\\\'\nconst REGEX_TEST_BLANK_LINE = /^\\s+$/\nconst REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\\\]|^)\\\\$/\nconst REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\\\!/\nconst REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\\\#/\nconst REGEX_SPLITALL_CRLF = /\\r?\\n/g\n// /foo,\n// ./foo,\n// ../foo,\n// .\n// ..\nconst REGEX_TEST_INVALID_PATH = /^\\.*\\/|^\\.+$/\n\nconst SLASH = '/'\n\n// Do not use ternary expression here, since \"istanbul ignore next\" is buggy\nlet TMP_KEY_IGNORE = 'node-ignore'\n/* istanbul ignore else */\nif (typeof Symbol !== 'undefined') {\n TMP_KEY_IGNORE = Symbol.for('node-ignore')\n}\nconst KEY_IGNORE = TMP_KEY_IGNORE\n\nconst define = (object, key, value) =>\n Object.defineProperty(object, key, {value})\n\nconst REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g\n\nconst RETURN_FALSE = () => false\n\n// Sanitize the range of a regular expression\n// The cases are complicated, see test cases for details\nconst sanitizeRange = range => range.replace(\n REGEX_REGEXP_RANGE,\n (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0)\n ? match\n // Invalid range (out of order) which is ok for gitignore rules but\n // fatal for JavaScript regular expression, so eliminate it.\n : EMPTY\n)\n\n// See fixtures #59\nconst cleanRangeBackSlash = slashes => {\n const {length} = slashes\n return slashes.slice(0, length - length % 2)\n}\n\n// > If the pattern ends with a slash,\n// > it is removed for the purpose of the following description,\n// > but it would only find a match with a directory.\n// > In other words, foo/ will match a directory foo and paths underneath it,\n// > but will not match a regular file or a symbolic link foo\n// > (this is consistent with the way how pathspec works in general in Git).\n// '`foo/`' will not match regular file '`foo`' or symbolic link '`foo`'\n// -> ignore-rules will not deal with it, because it costs extra `fs.stat` call\n// you could use option `mark: true` with `glob`\n\n// '`foo/`' should not continue with the '`..`'\nconst REPLACERS = [\n\n [\n // remove BOM\n // TODO:\n // Other similar zero-width characters?\n /^\\uFEFF/,\n () => EMPTY\n ],\n\n // > Trailing spaces are ignored unless they are quoted with backslash (\"\\\")\n [\n // (a\\ ) -> (a )\n // (a ) -> (a)\n // (a ) -> (a)\n // (a \\ ) -> (a )\n /((?:\\\\\\\\)*?)(\\\\?\\s+)$/,\n (_, m1, m2) => m1 + (\n m2.indexOf('\\\\') === 0\n ? SPACE\n : EMPTY\n )\n ],\n\n // replace (\\ ) with ' '\n // (\\ ) -> ' '\n // (\\\\ ) -> '\\\\ '\n // (\\\\\\ ) -> '\\\\ '\n [\n /(\\\\+?)\\s/g,\n (_, m1) => {\n const {length} = m1\n return m1.slice(0, length - length % 2) + SPACE\n }\n ],\n\n // Escape metacharacters\n // which is written down by users but means special for regular expressions.\n\n // > There are 12 characters with special meanings:\n // > - the backslash \\,\n // > - the caret ^,\n // > - the dollar sign $,\n // > - the period or dot .,\n // > - the vertical bar or pipe symbol |,\n // > - the question mark ?,\n // > - the asterisk or star *,\n // > - the plus sign +,\n // > - the opening parenthesis (,\n // > - the closing parenthesis ),\n // > - and the opening square bracket [,\n // > - the opening curly brace {,\n // > These special characters are often called \"metacharacters\".\n [\n /[\\\\$.|*+(){^]/g,\n match => `\\\\${match}`\n ],\n\n [\n // > a question mark (?) matches a single character\n /(?!\\\\)\\?/g,\n () => '[^/]'\n ],\n\n // leading slash\n [\n\n // > A leading slash matches the beginning of the pathname.\n // > For example, \"/*.c\" matches \"cat-file.c\" but not \"mozilla-sha1/sha1.c\".\n // A leading slash matches the beginning of the pathname\n /^\\//,\n () => '^'\n ],\n\n // replace special metacharacter slash after the leading slash\n [\n /\\//g,\n () => '\\\\/'\n ],\n\n [\n // > A leading \"**\" followed by a slash means match in all directories.\n // > For example, \"**/foo\" matches file or directory \"foo\" anywhere,\n // > the same as pattern \"foo\".\n // > \"**/foo/bar\" matches file or directory \"bar\" anywhere that is directly\n // > under directory \"foo\".\n // Notice that the '*'s have been replaced as '\\\\*'\n /^\\^*\\\\\\*\\\\\\*\\\\\\//,\n\n // '**/foo' <-> 'foo'\n () => '^(?:.*\\\\/)?'\n ],\n\n // starting\n [\n // there will be no leading '/'\n // (which has been replaced by section \"leading slash\")\n // If starts with '**', adding a '^' to the regular expression also works\n /^(?=[^^])/,\n function startingReplacer () {\n // If has a slash `/` at the beginning or middle\n return !/\\/(?!$)/.test(this)\n // > Prior to 2.22.1\n // > If the pattern does not contain a slash /,\n // > Git treats it as a shell glob pattern\n // Actually, if there is only a trailing slash,\n // git also treats it as a shell glob pattern\n\n // After 2.22.1 (compatible but clearer)\n // > If there is a separator at the beginning or middle (or both)\n // > of the pattern, then the pattern is relative to the directory\n // > level of the particular .gitignore file itself.\n // > Otherwise the pattern may also match at any level below\n // > the .gitignore level.\n ? '(?:^|\\\\/)'\n\n // > Otherwise, Git treats the pattern as a shell glob suitable for\n // > consumption by fnmatch(3)\n : '^'\n }\n ],\n\n // two globstars\n [\n // Use lookahead assertions so that we could match more than one `'/**'`\n /\\\\\\/\\\\\\*\\\\\\*(?=\\\\\\/|$)/g,\n\n // Zero, one or several directories\n // should not use '*', or it will be replaced by the next replacer\n\n // Check if it is not the last `'/**'`\n (_, index, str) => index + 6 < str.length\n\n // case: /**/\n // > A slash followed by two consecutive asterisks then a slash matches\n // > zero or more directories.\n // > For example, \"a/**/b\" matches \"a/b\", \"a/x/b\", \"a/x/y/b\" and so on.\n // '/**/'\n ? '(?:\\\\/[^\\\\/]+)*'\n\n // case: /**\n // > A trailing `\"/**\"` matches everything inside.\n\n // #21: everything inside but it should not include the current folder\n : '\\\\/.+'\n ],\n\n // normal intermediate wildcards\n [\n // Never replace escaped '*'\n // ignore rule '\\*' will match the path '*'\n\n // 'abc.*/' -> go\n // 'abc.*' -> skip this rule,\n // coz trailing single wildcard will be handed by [trailing wildcard]\n /(^|[^\\\\]+)(\\\\\\*)+(?=.+)/g,\n\n // '*.js' matches '.js'\n // '*.js' doesn't match 'abc'\n (_, p1, p2) => {\n // 1.\n // > An asterisk \"*\" matches anything except a slash.\n // 2.\n // > Other consecutive asterisks are considered regular asterisks\n // > and will match according to the previous rules.\n const unescaped = p2.replace(/\\\\\\*/g, '[^\\\\/]*')\n return p1 + unescaped\n }\n ],\n\n [\n // unescape, revert step 3 except for back slash\n // For example, if a user escape a '\\\\*',\n // after step 3, the result will be '\\\\\\\\\\\\*'\n /\\\\\\\\\\\\(?=[$.|*+(){^])/g,\n () => ESCAPE\n ],\n\n [\n // '\\\\\\\\' -> '\\\\'\n /\\\\\\\\/g,\n () => ESCAPE\n ],\n\n [\n // > The range notation, e.g. [a-zA-Z],\n // > can be used to match one of the characters in a range.\n\n // `\\` is escaped by step 3\n /(\\\\)?\\[([^\\]/]*?)(\\\\*)($|\\])/g,\n (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE\n // '\\\\[bar]' -> '\\\\\\\\[bar\\\\]'\n ? `\\\\[${range}${cleanRangeBackSlash(endEscape)}${close}`\n : close === ']'\n ? endEscape.length % 2 === 0\n // A normal case, and it is a range notation\n // '[bar]'\n // '[bar\\\\\\\\]'\n ? `[${sanitizeRange(range)}${endEscape}]`\n // Invalid range notaton\n // '[bar\\\\]' -> '[bar\\\\\\\\]'\n : '[]'\n : '[]'\n ],\n\n // ending\n [\n // 'js' will not match 'js.'\n // 'ab' will not match 'abc'\n /(?:[^*])$/,\n\n // WTF!\n // https://git-scm.com/docs/gitignore\n // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)\n // which re-fixes #24, #38\n\n // > If there is a separator at the end of the pattern then the pattern\n // > will only match directories, otherwise the pattern can match both\n // > files and directories.\n\n // 'js*' will not match 'a.js'\n // 'js/' will not match 'a.js'\n // 'js' will match 'a.js' and 'a.js/'\n match => /\\/$/.test(match)\n // foo/ will not match 'foo'\n ? `${match}$`\n // foo matches 'foo' and 'foo/'\n : `${match}(?=$|\\\\/$)`\n ],\n\n // trailing wildcard\n [\n /(\\^|\\\\\\/)?\\\\\\*$/,\n (_, p1) => {\n const prefix = p1\n // '\\^':\n // '/*' does not match EMPTY\n // '/*' does not match everything\n\n // '\\\\\\/':\n // 'abc/*' does not match 'abc/'\n ? `${p1}[^/]+`\n\n // 'a*' matches 'a'\n // 'a*' matches 'aa'\n : '[^/]*'\n\n return `${prefix}(?=$|\\\\/$)`\n }\n ],\n]\n\n// A simple cache, because an ignore rule only has only one certain meaning\nconst regexCache = Object.create(null)\n\n// @param {pattern}\nconst makeRegex = (pattern, ignoreCase) => {\n let source = regexCache[pattern]\n\n if (!source) {\n source = REPLACERS.reduce(\n (prev, [matcher, replacer]) =>\n prev.replace(matcher, replacer.bind(pattern)),\n pattern\n )\n regexCache[pattern] = source\n }\n\n return ignoreCase\n ? new RegExp(source, 'i')\n : new RegExp(source)\n}\n\nconst isString = subject => typeof subject === 'string'\n\n// > A blank line matches no files, so it can serve as a separator for readability.\nconst checkPattern = pattern => pattern\n && isString(pattern)\n && !REGEX_TEST_BLANK_LINE.test(pattern)\n && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern)\n\n // > A line starting with # serves as a comment.\n && pattern.indexOf('#') !== 0\n\nconst splitPattern = pattern => pattern.split(REGEX_SPLITALL_CRLF)\n\nclass IgnoreRule {\n constructor (\n origin,\n pattern,\n negative,\n regex\n ) {\n this.origin = origin\n this.pattern = pattern\n this.negative = negative\n this.regex = regex\n }\n}\n\nconst createRule = (pattern, ignoreCase) => {\n const origin = pattern\n let negative = false\n\n // > An optional prefix \"!\" which negates the pattern;\n if (pattern.indexOf('!') === 0) {\n negative = true\n pattern = pattern.substr(1)\n }\n\n pattern = pattern\n // > Put a backslash (\"\\\") in front of the first \"!\" for patterns that\n // > begin with a literal \"!\", for example, `\"\\!important!.txt\"`.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, '!')\n // > Put a backslash (\"\\\") in front of the first hash for patterns that\n // > begin with a hash.\n .replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, '#')\n\n const regex = makeRegex(pattern, ignoreCase)\n\n return new IgnoreRule(\n origin,\n pattern,\n negative,\n regex\n )\n}\n\nconst throwError = (message, Ctor) => {\n throw new Ctor(message)\n}\n\nconst checkPath = (path, originalPath, doThrow) => {\n if (!isString(path)) {\n return doThrow(\n `path must be a string, but got \\`${originalPath}\\``,\n TypeError\n )\n }\n\n // We don't know if we should ignore EMPTY, so throw\n if (!path) {\n return doThrow(`path must not be empty`, TypeError)\n }\n\n // Check if it is a relative path\n if (checkPath.isNotRelative(path)) {\n const r = '`path.relative()`d'\n return doThrow(\n `path should be a ${r} string, but got \"${originalPath}\"`,\n RangeError\n )\n }\n\n return true\n}\n\nconst isNotRelative = path => REGEX_TEST_INVALID_PATH.test(path)\n\ncheckPath.isNotRelative = isNotRelative\ncheckPath.convert = p => p\n\nclass Ignore {\n constructor ({\n ignorecase = true,\n ignoreCase = ignorecase,\n allowRelativePaths = false\n } = {}) {\n define(this, KEY_IGNORE, true)\n\n this._rules = []\n this._ignoreCase = ignoreCase\n this._allowRelativePaths = allowRelativePaths\n this._initCache()\n }\n\n _initCache () {\n this._ignoreCache = Object.create(null)\n this._testCache = Object.create(null)\n }\n\n _addPattern (pattern) {\n // #32\n if (pattern && pattern[KEY_IGNORE]) {\n this._rules = this._rules.concat(pattern._rules)\n this._added = true\n return\n }\n\n if (checkPattern(pattern)) {\n const rule = createRule(pattern, this._ignoreCase)\n this._added = true\n this._rules.push(rule)\n }\n }\n\n // @param {Array<string> | string | Ignore} pattern\n add (pattern) {\n this._added = false\n\n makeArray(\n isString(pattern)\n ? splitPattern(pattern)\n : pattern\n ).forEach(this._addPattern, this)\n\n // Some rules have just added to the ignore,\n // making the behavior changed.\n if (this._added) {\n this._initCache()\n }\n\n return this\n }\n\n // legacy\n addPattern (pattern) {\n return this.add(pattern)\n }\n\n // | ignored : unignored\n // negative | 0:0 | 0:1 | 1:0 | 1:1\n // -------- | ------- | ------- | ------- | --------\n // 0 | TEST | TEST | SKIP | X\n // 1 | TESTIF | SKIP | TEST | X\n\n // - SKIP: always skip\n // - TEST: always test\n // - TESTIF: only test if checkUnignored\n // - X: that never happen\n\n // @param {boolean} whether should check if the path is unignored,\n // setting `checkUnignored` to `false` could reduce additional\n // path matching.\n\n // @returns {TestResult} true if a file is ignored\n _testOne (path, checkUnignored) {\n let ignored = false\n let unignored = false\n\n this._rules.forEach(rule => {\n const {negative} = rule\n if (\n unignored === negative && ignored !== unignored\n || negative && !ignored && !unignored && !checkUnignored\n ) {\n return\n }\n\n const matched = rule.regex.test(path)\n\n if (matched) {\n ignored = !negative\n unignored = negative\n }\n })\n\n return {\n ignored,\n unignored\n }\n }\n\n // @returns {TestResult}\n _test (originalPath, cache, checkUnignored, slices) {\n const path = originalPath\n // Supports nullable path\n && checkPath.convert(originalPath)\n\n checkPath(\n path,\n originalPath,\n this._allowRelativePaths\n ? RETURN_FALSE\n : throwError\n )\n\n return this._t(path, cache, checkUnignored, slices)\n }\n\n _t (path, cache, checkUnignored, slices) {\n if (path in cache) {\n return cache[path]\n }\n\n if (!slices) {\n // path/to/a.js\n // ['path', 'to', 'a.js']\n slices = path.split(SLASH)\n }\n\n slices.pop()\n\n // If the path has no parent directory, just test it\n if (!slices.length) {\n return cache[path] = this._testOne(path, checkUnignored)\n }\n\n const parent = this._t(\n slices.join(SLASH) + SLASH,\n cache,\n checkUnignored,\n slices\n )\n\n // If the path contains a parent directory, check the parent first\n return cache[path] = parent.ignored\n // > It is not possible to re-include a file if a parent directory of\n // > that file is excluded.\n ? parent\n : this._testOne(path, checkUnignored)\n }\n\n ignores (path) {\n return this._test(path, this._ignoreCache, false).ignored\n }\n\n createFilter () {\n return path => !this.ignores(path)\n }\n\n filter (paths) {\n return makeArray(paths).filter(this.createFilter())\n }\n\n // @returns {TestResult}\n test (path) {\n return this._test(path, this._testCache, true)\n }\n}\n\nconst factory = options => new Ignore(options)\n\nconst isPathValid = path =>\n checkPath(path && checkPath.convert(path), path, RETURN_FALSE)\n\nfactory.isPathValid = isPathValid\n\n// Fixes typescript\nfactory.default = factory\n\nmodule.exports = factory\n\n// Windows\n// --------------------------------------------------------------\n/* istanbul ignore if */\nif (\n // Detect `process` so that it can run in browsers.\n typeof process !== 'undefined'\n && (\n process.env && process.env.IGNORE_TEST_WIN32\n || process.platform === 'win32'\n )\n) {\n /* eslint no-control-regex: \"off\" */\n const makePosix = str => /^\\\\\\\\\\?\\\\/.test(str)\n || /[\"<>|\\u0000-\\u001F]+/u.test(str)\n ? str\n : str.replace(/\\\\/g, '/')\n\n checkPath.convert = makePosix\n\n // 'C:\\\\foo' <- 'C:\\\\foo' has been converted to 'C:/'\n // 'd:\\\\foo'\n const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\\//i\n checkPath.isNotRelative = path =>\n REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path)\n || isNotRelative(path)\n}\n","export default function indentString(string, count = 1, options = {}) {\n\tconst {\n\t\tindent = ' ',\n\t\tincludeEmptyLines = false\n\t} = options;\n\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`input\\` to be a \\`string\\`, got \\`${typeof string}\\``\n\t\t);\n\t}\n\n\tif (typeof count !== 'number') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`count\\` to be a \\`number\\`, got \\`${typeof count}\\``\n\t\t);\n\t}\n\n\tif (count < 0) {\n\t\tthrow new RangeError(\n\t\t\t`Expected \\`count\\` to be at least 0, got \\`${count}\\``\n\t\t);\n\t}\n\n\tif (typeof indent !== 'string') {\n\t\tthrow new TypeError(\n\t\t\t`Expected \\`options.indent\\` to be a \\`string\\`, got \\`${typeof indent}\\``\n\t\t);\n\t}\n\n\tif (count === 0) {\n\t\treturn string;\n\t}\n\n\tconst regex = includeEmptyLines ? /^/gm : /^(?!\\s*$)/gm;\n\n\treturn string.replace(regex, indent.repeat(count));\n}\n","var wrappy = require('wrappy')\nvar reqs = Object.create(null)\nvar once = require('once')\n\nmodule.exports = wrappy(inflight)\n\nfunction inflight (key, cb) {\n if (reqs[key]) {\n reqs[key].push(cb)\n return null\n } else {\n reqs[key] = [cb]\n return makeres(key)\n }\n}\n\nfunction makeres (key) {\n return once(function RES () {\n var cbs = reqs[key]\n var len = cbs.length\n var args = slice(arguments)\n\n // XXX It's somewhat ambiguous whether a new callback added in this\n // pass should be queued for later execution if something in the\n // list of callbacks throws, or if it should just be discarded.\n // However, it's such an edge case that it hardly matters, and either\n // choice is likely as surprising as the other.\n // As it happens, we do go ahead and schedule it for later execution.\n try {\n for (var i = 0; i < len; i++) {\n cbs[i].apply(null, args)\n }\n } finally {\n if (cbs.length > len) {\n // added more in the interim.\n // de-zalgo, just in case, but don't call again.\n cbs.splice(0, len)\n process.nextTick(function () {\n RES.apply(null, args)\n })\n } else {\n delete reqs[key]\n }\n }\n })\n}\n\nfunction slice (args) {\n var length = args.length\n var array = []\n\n for (var i = 0; i < length; i++) array[i] = args[i]\n return array\n}\n","try {\n var util = require('util');\n /* istanbul ignore next */\n if (typeof util.inherits !== 'function') throw '';\n module.exports = util.inherits;\n} catch (e) {\n /* istanbul ignore next */\n module.exports = require('./inherits_browser.js');\n}\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\nconst path = require('path');\nconst binaryExtensions = require('binary-extensions');\n\nconst extensions = new Set(binaryExtensions);\n\nmodule.exports = filePath => extensions.has(path.extname(filePath).slice(1).toLowerCase());\n","import fs from 'node:fs';\n\nlet isDockerCached;\n\nfunction hasDockerEnv() {\n\ttry {\n\t\tfs.statSync('/.dockerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction hasDockerCGroup() {\n\ttry {\n\t\treturn fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport default function isDocker() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (isDockerCached === undefined) {\n\t\tisDockerCached = hasDockerEnv() || hasDockerCGroup();\n\t}\n\n\treturn isDockerCached;\n}\n","import fs from 'node:fs';\n\nlet isDockerCached;\n\nfunction hasDockerEnv() {\n\ttry {\n\t\tfs.statSync('/.dockerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction hasDockerCGroup() {\n\ttry {\n\t\treturn fs.readFileSync('/proc/self/cgroup', 'utf8').includes('docker');\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction hasDockerMountInfo() {\n\ttry {\n\t\treturn fs.readFileSync('/proc/self/mountinfo', 'utf8').includes('/docker/containers/');\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport default function isDocker() {\n\tisDockerCached ??= hasDockerEnv() || hasDockerCGroup() || hasDockerMountInfo();\n\treturn isDockerCached;\n}\n","/*!\n * is-extglob <https://github.com/jonschlinkert/is-extglob>\n *\n * Copyright (c) 2014-2016, Jon Schlinkert.\n * Licensed under the MIT License.\n */\n\nmodule.exports = function isExtglob(str) {\n if (typeof str !== 'string' || str === '') {\n return false;\n }\n\n var match;\n while ((match = /(\\\\).|([@?!+*]\\(.*\\))/g.exec(str))) {\n if (match[2]) return true;\n str = str.slice(match.index + match[0].length);\n }\n\n return false;\n};\n","/*!\n * is-glob <https://github.com/jonschlinkert/is-glob>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nvar isExtglob = require('is-extglob');\nvar chars = { '{': '}', '(': ')', '[': ']'};\nvar strictCheck = function(str) {\n if (str[0] === '!') {\n return true;\n }\n var index = 0;\n var pipeIndex = -2;\n var closeSquareIndex = -2;\n var closeCurlyIndex = -2;\n var closeParenIndex = -2;\n var backSlashIndex = -2;\n while (index < str.length) {\n if (str[index] === '*') {\n return true;\n }\n\n if (str[index + 1] === '?' && /[\\].+)]/.test(str[index])) {\n return true;\n }\n\n if (closeSquareIndex !== -1 && str[index] === '[' && str[index + 1] !== ']') {\n if (closeSquareIndex < index) {\n closeSquareIndex = str.indexOf(']', index);\n }\n if (closeSquareIndex > index) {\n if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {\n return true;\n }\n backSlashIndex = str.indexOf('\\\\', index);\n if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) {\n return true;\n }\n }\n }\n\n if (closeCurlyIndex !== -1 && str[index] === '{' && str[index + 1] !== '}') {\n closeCurlyIndex = str.indexOf('}', index);\n if (closeCurlyIndex > index) {\n backSlashIndex = str.indexOf('\\\\', index);\n if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) {\n return true;\n }\n }\n }\n\n if (closeParenIndex !== -1 && str[index] === '(' && str[index + 1] === '?' && /[:!=]/.test(str[index + 2]) && str[index + 3] !== ')') {\n closeParenIndex = str.indexOf(')', index);\n if (closeParenIndex > index) {\n backSlashIndex = str.indexOf('\\\\', index);\n if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {\n return true;\n }\n }\n }\n\n if (pipeIndex !== -1 && str[index] === '(' && str[index + 1] !== '|') {\n if (pipeIndex < index) {\n pipeIndex = str.indexOf('|', index);\n }\n if (pipeIndex !== -1 && str[pipeIndex + 1] !== ')') {\n closeParenIndex = str.indexOf(')', pipeIndex);\n if (closeParenIndex > pipeIndex) {\n backSlashIndex = str.indexOf('\\\\', pipeIndex);\n if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) {\n return true;\n }\n }\n }\n }\n\n if (str[index] === '\\\\') {\n var open = str[index + 1];\n index += 2;\n var close = chars[open];\n\n if (close) {\n var n = str.indexOf(close, index);\n if (n !== -1) {\n index = n + 1;\n }\n }\n\n if (str[index] === '!') {\n return true;\n }\n } else {\n index++;\n }\n }\n return false;\n};\n\nvar relaxedCheck = function(str) {\n if (str[0] === '!') {\n return true;\n }\n var index = 0;\n while (index < str.length) {\n if (/[*?{}()[\\]]/.test(str[index])) {\n return true;\n }\n\n if (str[index] === '\\\\') {\n var open = str[index + 1];\n index += 2;\n var close = chars[open];\n\n if (close) {\n var n = str.indexOf(close, index);\n if (n !== -1) {\n index = n + 1;\n }\n }\n\n if (str[index] === '!') {\n return true;\n }\n } else {\n index++;\n }\n }\n return false;\n};\n\nmodule.exports = function isGlob(str, options) {\n if (typeof str !== 'string' || str === '') {\n return false;\n }\n\n if (isExtglob(str)) {\n return true;\n }\n\n var check = strictCheck;\n\n // optionally relax check\n if (options && options.strict === false) {\n check = relaxedCheck;\n }\n\n return check(str);\n};\n","import fs from 'node:fs';\nimport isDocker from 'is-docker';\n\nlet cachedResult;\n\n// Podman detection\nconst hasContainerEnv = () => {\n\ttry {\n\t\tfs.statSync('/run/.containerenv');\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport default function isInsideContainer() {\n\t// TODO: Use `??=` when targeting Node.js 16.\n\tif (cachedResult === undefined) {\n\t\tcachedResult = hasContainerEnv() || isDocker();\n\t}\n\n\treturn cachedResult;\n}\n","/*!\n * is-number <https://github.com/jonschlinkert/is-number>\n *\n * Copyright (c) 2014-present, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nmodule.exports = function(num) {\n if (typeof num === 'number') {\n return num - num === 0;\n }\n if (typeof num === 'string' && num.trim() !== '') {\n return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);\n }\n return false;\n};\n","'use strict';\nconst path = require('path');\n\nmodule.exports = path_ => {\n\tlet cwd = process.cwd();\n\n\tpath_ = path.resolve(path_);\n\n\tif (process.platform === 'win32') {\n\t\tcwd = cwd.toLowerCase();\n\t\tpath_ = path_.toLowerCase();\n\t}\n\n\treturn path_ === cwd;\n};\n","import process from 'node:process';\nimport path from 'node:path';\n\nexport default function isPathCwd(path_) {\n\tlet cwd = process.cwd();\n\n\tpath_ = path.resolve(path_);\n\n\tif (process.platform === 'win32') {\n\t\tcwd = cwd.toLowerCase();\n\t\tpath_ = path_.toLowerCase();\n\t}\n\n\treturn path_ === cwd;\n}\n","'use strict';\nconst isPathInside = require('is-path-inside');\n\nmodule.exports = path => isPathInside(path, process.cwd());\n","'use strict';\nconst path = require('path');\nconst pathIsInside = require('path-is-inside');\n\nmodule.exports = (childPath, parentPath) => {\n\tchildPath = path.resolve(childPath);\n\tparentPath = path.resolve(parentPath);\n\n\tif (childPath === parentPath) {\n\t\treturn false;\n\t}\n\n\treturn pathIsInside(childPath, parentPath);\n};\n","import path from 'node:path';\n\nexport default function isPathInside(childPath, parentPath) {\n\tconst relation = path.relative(parentPath, childPath);\n\n\treturn Boolean(\n\t\trelation &&\n\t\trelation !== '..' &&\n\t\t!relation.startsWith(`..${path.sep}`) &&\n\t\trelation !== path.resolve(childPath)\n\t);\n}\n","import process from 'node:process';\nimport os from 'node:os';\nimport fs from 'node:fs';\nimport isInsideContainer from 'is-inside-container';\n\nconst isWsl = () => {\n\tif (process.platform !== 'linux') {\n\t\treturn false;\n\t}\n\n\tif (os.release().toLowerCase().includes('microsoft')) {\n\t\tif (isInsideContainer()) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}\n\n\ttry {\n\t\treturn fs.readFileSync('/proc/version', 'utf8').toLowerCase().includes('microsoft')\n\t\t\t? !isInsideContainer() : false;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\nexport default process.env.__IS_WSL_TEST__ ? isWsl : isWsl();\n","// This is a generated file. Do not edit.\nvar Space_Separator = /[\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/;\nvar ID_Start = /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\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0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\u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\\uDE21\\uDE22\\uDE24\\uDE27\\uDE29-\\uDE32\\uDE34-\\uDE37\\uDE39\\uDE3B\\uDE42\\uDE47\\uDE49\\uDE4B\\uDE4D-\\uDE4F\\uDE51\\uDE52\\uDE54\\uDE57\\uDE59\\uDE5B\\uDE5D\\uDE5F\\uDE61\\uDE62\\uDE64\\uDE67-\\uDE6A\\uDE6C-\\uDE72\\uDE74-\\uDE77\\uDE79-\\uDE7C\\uDE7E\\uDE80-\\uDE89\\uDE8B-\\uDE9B\\uDEA1-\\uDEA3\\uDEA5-\\uDEA9\\uDEAB-\\uDEBB]|\\uD869[\\uDC00-\\uDED6\\uDF00-\\uDFFF]|\\uD86D[\\uDC00-\\uDF34\\uDF40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]/;\nvar ID_Continue = /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u0860-\\u086A\\u08A0-\\u08B4\\u08B6-\\u08BD\\u08D4-\\u08E1\\u08E3-\\u0963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-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1C80-\\u1C88\\u1CD0-\\u1CD2\\u1CD4-\\u1CF9\\u1D00-\\u1DF9\\u1DFB-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312E\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FEA\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA8FD\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\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-\\uDE59\\uDE80-\\uDEB7\\uDEC0-\\uDEC9\\uDF00-\\uDF19\\uDF1D-\\uDF2B\\uDF30-\\uDF39]|\\uD806[\\uDCA0-\\uDCE9\\uDCFF\\uDE00-\\uDE3E\\uDE47\\uDE50-\\uDE83\\uDE86-\\uDE99\\uDEC0-\\uDEF8]|\\uD807[\\uDC00-\\uDC08\\uDC0A-\\uDC36\\uDC38-\\uDC40\\uDC50-\\uDC59\\uDC72-\\uDC8F\\uDC92-\\uDCA7\\uDCA9-\\uDCB6\\uDD00-\\uDD06\\uDD08\\uDD09\\uDD0B-\\uDD36\\uDD3A\\uDD3C\\uDD3D\\uDD3F-\\uDD47\\uDD50-\\uDD59]|\\uD808[\\uDC00-\\uDF99]|\\uD809[\\uDC00-\\uDC6E\\uDC80-\\uDD43]|[\\uD80C\\uD81C-\\uD820\\uD840-\\uD868\\uD86A-\\uD86C\\uD86F-\\uD872\\uD874-\\uD879][\\uDC00-\\uDFFF]|\\uD80D[\\uDC00-\\uDC2E]|\\uD811[\\uDC00-\\uDE46]|\\uD81A[\\uDC00-\\uDE38\\uDE40-\\uDE5E\\uDE60-\\uDE69\\uDED0-\\uDEED\\uDEF0-\\uDEF4\\uDF00-\\uDF36\\uDF40-\\uDF43\\uDF50-\\uDF59\\uDF63-\\uDF77\\uDF7D-\\uDF8F]|\\uD81B[\\uDF00-\\uDF44\\uDF50-\\uDF7E\\uDF8F-\\uDF9F\\uDFE0\\uDFE1]|\\uD821[\\uDC00-\\uDFEC]|\\uD822[\\uDC00-\\uDEF2]|\\uD82C[\\uDC00-\\uDD1E\\uDD70-\\uDEFB]|\\uD82F[\\uDC00-\\uDC6A\\uDC70-\\uDC7C\\uDC80-\\uDC88\\uDC90-\\uDC99\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD835[\\uDC00-\\uDC54\\u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F40-\\uDFFF]|\\uD86E[\\uDC00-\\uDC1D\\uDC20-\\uDFFF]|\\uD873[\\uDC00-\\uDEA1\\uDEB0-\\uDFFF]|\\uD87A[\\uDC00-\\uDFE0]|\\uD87E[\\uDC00-\\uDE1D]|\\uDB40[\\uDD00-\\uDDEF]/;\n\nvar unicode = {\n\tSpace_Separator: Space_Separator,\n\tID_Start: ID_Start,\n\tID_Continue: ID_Continue\n};\n\nvar util = {\n isSpaceSeparator (c) {\n return typeof c === 'string' && unicode.Space_Separator.test(c)\n },\n\n isIdStartChar (c) {\n return typeof c === 'string' && (\n (c >= 'a' && c <= 'z') ||\n (c >= 'A' && c <= 'Z') ||\n (c === '$') || (c === '_') ||\n unicode.ID_Start.test(c)\n )\n },\n\n isIdContinueChar (c) {\n return typeof c === 'string' && (\n (c >= 'a' && c <= 'z') ||\n (c >= 'A' && c <= 'Z') ||\n (c >= '0' && c <= '9') ||\n (c === '$') || (c === '_') ||\n (c === '\\u200C') || (c === '\\u200D') ||\n unicode.ID_Continue.test(c)\n )\n },\n\n isDigit (c) {\n return typeof c === 'string' && /[0-9]/.test(c)\n },\n\n isHexDigit (c) {\n return typeof c === 'string' && /[0-9A-Fa-f]/.test(c)\n },\n};\n\nlet source;\nlet parseState;\nlet stack;\nlet pos;\nlet line;\nlet column;\nlet token;\nlet key;\nlet root;\n\nvar parse = function parse (text, reviver) {\n source = String(text);\n parseState = 'start';\n stack = [];\n pos = 0;\n line = 1;\n column = 0;\n token = undefined;\n key = undefined;\n root = undefined;\n\n do {\n token = lex();\n\n // This code is unreachable.\n // if (!parseStates[parseState]) {\n // throw invalidParseState()\n // }\n\n parseStates[parseState]();\n } while (token.type !== 'eof')\n\n if (typeof reviver === 'function') {\n return internalize({'': root}, '', reviver)\n }\n\n return root\n};\n\nfunction internalize (holder, name, reviver) {\n const value = holder[name];\n if (value != null && typeof value === 'object') {\n if (Array.isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const key = String(i);\n const replacement = internalize(value, key, reviver);\n if (replacement === undefined) {\n delete value[key];\n } else {\n Object.defineProperty(value, key, {\n value: replacement,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n }\n } else {\n for (const key in value) {\n const replacement = internalize(value, key, reviver);\n if (replacement === undefined) {\n delete value[key];\n } else {\n Object.defineProperty(value, key, {\n value: replacement,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n }\n }\n }\n\n return reviver.call(holder, name, value)\n}\n\nlet lexState;\nlet buffer;\nlet doubleQuote;\nlet sign;\nlet c;\n\nfunction lex () {\n lexState = 'default';\n buffer = '';\n doubleQuote = false;\n sign = 1;\n\n for (;;) {\n c = peek();\n\n // This code is unreachable.\n // if (!lexStates[lexState]) {\n // throw invalidLexState(lexState)\n // }\n\n const token = lexStates[lexState]();\n if (token) {\n return token\n }\n }\n}\n\nfunction peek () {\n if (source[pos]) {\n return String.fromCodePoint(source.codePointAt(pos))\n }\n}\n\nfunction read () {\n const c = peek();\n\n if (c === '\\n') {\n line++;\n column = 0;\n } else if (c) {\n column += c.length;\n } else {\n column++;\n }\n\n if (c) {\n pos += c.length;\n }\n\n return c\n}\n\nconst lexStates = {\n default () {\n switch (c) {\n case '\\t':\n case '\\v':\n case '\\f':\n case ' ':\n case '\\u00A0':\n case '\\uFEFF':\n case '\\n':\n case '\\r':\n case '\\u2028':\n case '\\u2029':\n read();\n return\n\n case '/':\n read();\n lexState = 'comment';\n return\n\n case undefined:\n read();\n return newToken('eof')\n }\n\n if (util.isSpaceSeparator(c)) {\n read();\n return\n }\n\n // This code is unreachable.\n // if (!lexStates[parseState]) {\n // throw invalidLexState(parseState)\n // }\n\n return lexStates[parseState]()\n },\n\n comment () {\n switch (c) {\n case '*':\n read();\n lexState = 'multiLineComment';\n return\n\n case '/':\n read();\n lexState = 'singleLineComment';\n return\n }\n\n throw invalidChar(read())\n },\n\n multiLineComment () {\n switch (c) {\n case '*':\n read();\n lexState = 'multiLineCommentAsterisk';\n return\n\n case undefined:\n throw invalidChar(read())\n }\n\n read();\n },\n\n multiLineCommentAsterisk () {\n switch (c) {\n case '*':\n read();\n return\n\n case '/':\n read();\n lexState = 'default';\n return\n\n case undefined:\n throw invalidChar(read())\n }\n\n read();\n lexState = 'multiLineComment';\n },\n\n singleLineComment () {\n switch (c) {\n case '\\n':\n case '\\r':\n case '\\u2028':\n case '\\u2029':\n read();\n lexState = 'default';\n return\n\n case undefined:\n read();\n return newToken('eof')\n }\n\n read();\n },\n\n value () {\n switch (c) {\n case '{':\n case '[':\n return newToken('punctuator', read())\n\n case 'n':\n read();\n literal('ull');\n return newToken('null', null)\n\n case 't':\n read();\n literal('rue');\n return newToken('boolean', true)\n\n case 'f':\n read();\n literal('alse');\n return newToken('boolean', false)\n\n case '-':\n case '+':\n if (read() === '-') {\n sign = -1;\n }\n\n lexState = 'sign';\n return\n\n case '.':\n buffer = read();\n lexState = 'decimalPointLeading';\n return\n\n case '0':\n buffer = read();\n lexState = 'zero';\n return\n\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n buffer = read();\n lexState = 'decimalInteger';\n return\n\n case 'I':\n read();\n literal('nfinity');\n return newToken('numeric', Infinity)\n\n case 'N':\n read();\n literal('aN');\n return newToken('numeric', NaN)\n\n case '\"':\n case \"'\":\n doubleQuote = (read() === '\"');\n buffer = '';\n lexState = 'string';\n return\n }\n\n throw invalidChar(read())\n },\n\n identifierNameStartEscape () {\n if (c !== 'u') {\n throw invalidChar(read())\n }\n\n read();\n const u = unicodeEscape();\n switch (u) {\n case '$':\n case '_':\n break\n\n default:\n if (!util.isIdStartChar(u)) {\n throw invalidIdentifier()\n }\n\n break\n }\n\n buffer += u;\n lexState = 'identifierName';\n },\n\n identifierName () {\n switch (c) {\n case '$':\n case '_':\n case '\\u200C':\n case '\\u200D':\n buffer += read();\n return\n\n case '\\\\':\n read();\n lexState = 'identifierNameEscape';\n return\n }\n\n if (util.isIdContinueChar(c)) {\n buffer += read();\n return\n }\n\n return newToken('identifier', buffer)\n },\n\n identifierNameEscape () {\n if (c !== 'u') {\n throw invalidChar(read())\n }\n\n read();\n const u = unicodeEscape();\n switch (u) {\n case '$':\n case '_':\n case '\\u200C':\n case '\\u200D':\n break\n\n default:\n if (!util.isIdContinueChar(u)) {\n throw invalidIdentifier()\n }\n\n break\n }\n\n buffer += u;\n lexState = 'identifierName';\n },\n\n sign () {\n switch (c) {\n case '.':\n buffer = read();\n lexState = 'decimalPointLeading';\n return\n\n case '0':\n buffer = read();\n lexState = 'zero';\n return\n\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n buffer = read();\n lexState = 'decimalInteger';\n return\n\n case 'I':\n read();\n literal('nfinity');\n return newToken('numeric', sign * Infinity)\n\n case 'N':\n read();\n literal('aN');\n return newToken('numeric', NaN)\n }\n\n throw invalidChar(read())\n },\n\n zero () {\n switch (c) {\n case '.':\n buffer += read();\n lexState = 'decimalPoint';\n return\n\n case 'e':\n case 'E':\n buffer += read();\n lexState = 'decimalExponent';\n return\n\n case 'x':\n case 'X':\n buffer += read();\n lexState = 'hexadecimal';\n return\n }\n\n return newToken('numeric', sign * 0)\n },\n\n decimalInteger () {\n switch (c) {\n case '.':\n buffer += read();\n lexState = 'decimalPoint';\n return\n\n case 'e':\n case 'E':\n buffer += read();\n lexState = 'decimalExponent';\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read();\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n decimalPointLeading () {\n if (util.isDigit(c)) {\n buffer += read();\n lexState = 'decimalFraction';\n return\n }\n\n throw invalidChar(read())\n },\n\n decimalPoint () {\n switch (c) {\n case 'e':\n case 'E':\n buffer += read();\n lexState = 'decimalExponent';\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read();\n lexState = 'decimalFraction';\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n decimalFraction () {\n switch (c) {\n case 'e':\n case 'E':\n buffer += read();\n lexState = 'decimalExponent';\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read();\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n decimalExponent () {\n switch (c) {\n case '+':\n case '-':\n buffer += read();\n lexState = 'decimalExponentSign';\n return\n }\n\n if (util.isDigit(c)) {\n buffer += read();\n lexState = 'decimalExponentInteger';\n return\n }\n\n throw invalidChar(read())\n },\n\n decimalExponentSign () {\n if (util.isDigit(c)) {\n buffer += read();\n lexState = 'decimalExponentInteger';\n return\n }\n\n throw invalidChar(read())\n },\n\n decimalExponentInteger () {\n if (util.isDigit(c)) {\n buffer += read();\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n hexadecimal () {\n if (util.isHexDigit(c)) {\n buffer += read();\n lexState = 'hexadecimalInteger';\n return\n }\n\n throw invalidChar(read())\n },\n\n hexadecimalInteger () {\n if (util.isHexDigit(c)) {\n buffer += read();\n return\n }\n\n return newToken('numeric', sign * Number(buffer))\n },\n\n string () {\n switch (c) {\n case '\\\\':\n read();\n buffer += escape();\n return\n\n case '\"':\n if (doubleQuote) {\n read();\n return newToken('string', buffer)\n }\n\n buffer += read();\n return\n\n case \"'\":\n if (!doubleQuote) {\n read();\n return newToken('string', buffer)\n }\n\n buffer += read();\n return\n\n case '\\n':\n case '\\r':\n throw invalidChar(read())\n\n case '\\u2028':\n case '\\u2029':\n separatorChar(c);\n break\n\n case undefined:\n throw invalidChar(read())\n }\n\n buffer += read();\n },\n\n start () {\n switch (c) {\n case '{':\n case '[':\n return newToken('punctuator', read())\n\n // This code is unreachable since the default lexState handles eof.\n // case undefined:\n // return newToken('eof')\n }\n\n lexState = 'value';\n },\n\n beforePropertyName () {\n switch (c) {\n case '$':\n case '_':\n buffer = read();\n lexState = 'identifierName';\n return\n\n case '\\\\':\n read();\n lexState = 'identifierNameStartEscape';\n return\n\n case '}':\n return newToken('punctuator', read())\n\n case '\"':\n case \"'\":\n doubleQuote = (read() === '\"');\n lexState = 'string';\n return\n }\n\n if (util.isIdStartChar(c)) {\n buffer += read();\n lexState = 'identifierName';\n return\n }\n\n throw invalidChar(read())\n },\n\n afterPropertyName () {\n if (c === ':') {\n return newToken('punctuator', read())\n }\n\n throw invalidChar(read())\n },\n\n beforePropertyValue () {\n lexState = 'value';\n },\n\n afterPropertyValue () {\n switch (c) {\n case ',':\n case '}':\n return newToken('punctuator', read())\n }\n\n throw invalidChar(read())\n },\n\n beforeArrayValue () {\n if (c === ']') {\n return newToken('punctuator', read())\n }\n\n lexState = 'value';\n },\n\n afterArrayValue () {\n switch (c) {\n case ',':\n case ']':\n return newToken('punctuator', read())\n }\n\n throw invalidChar(read())\n },\n\n end () {\n // This code is unreachable since it's handled by the default lexState.\n // if (c === undefined) {\n // read()\n // return newToken('eof')\n // }\n\n throw invalidChar(read())\n },\n};\n\nfunction newToken (type, value) {\n return {\n type,\n value,\n line,\n column,\n }\n}\n\nfunction literal (s) {\n for (const c of s) {\n const p = peek();\n\n if (p !== c) {\n throw invalidChar(read())\n }\n\n read();\n }\n}\n\nfunction escape () {\n const c = peek();\n switch (c) {\n case 'b':\n read();\n return '\\b'\n\n case 'f':\n read();\n return '\\f'\n\n case 'n':\n read();\n return '\\n'\n\n case 'r':\n read();\n return '\\r'\n\n case 't':\n read();\n return '\\t'\n\n case 'v':\n read();\n return '\\v'\n\n case '0':\n read();\n if (util.isDigit(peek())) {\n throw invalidChar(read())\n }\n\n return '\\0'\n\n case 'x':\n read();\n return hexEscape()\n\n case 'u':\n read();\n return unicodeEscape()\n\n case '\\n':\n case '\\u2028':\n case '\\u2029':\n read();\n return ''\n\n case '\\r':\n read();\n if (peek() === '\\n') {\n read();\n }\n\n return ''\n\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n throw invalidChar(read())\n\n case undefined:\n throw invalidChar(read())\n }\n\n return read()\n}\n\nfunction hexEscape () {\n let buffer = '';\n let c = peek();\n\n if (!util.isHexDigit(c)) {\n throw invalidChar(read())\n }\n\n buffer += read();\n\n c = peek();\n if (!util.isHexDigit(c)) {\n throw invalidChar(read())\n }\n\n buffer += read();\n\n return String.fromCodePoint(parseInt(buffer, 16))\n}\n\nfunction unicodeEscape () {\n let buffer = '';\n let count = 4;\n\n while (count-- > 0) {\n const c = peek();\n if (!util.isHexDigit(c)) {\n throw invalidChar(read())\n }\n\n buffer += read();\n }\n\n return String.fromCodePoint(parseInt(buffer, 16))\n}\n\nconst parseStates = {\n start () {\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n push();\n },\n\n beforePropertyName () {\n switch (token.type) {\n case 'identifier':\n case 'string':\n key = token.value;\n parseState = 'afterPropertyName';\n return\n\n case 'punctuator':\n // This code is unreachable since it's handled by the lexState.\n // if (token.value !== '}') {\n // throw invalidToken()\n // }\n\n pop();\n return\n\n case 'eof':\n throw invalidEOF()\n }\n\n // This code is unreachable since it's handled by the lexState.\n // throw invalidToken()\n },\n\n afterPropertyName () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'punctuator' || token.value !== ':') {\n // throw invalidToken()\n // }\n\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n parseState = 'beforePropertyValue';\n },\n\n beforePropertyValue () {\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n push();\n },\n\n beforeArrayValue () {\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n if (token.type === 'punctuator' && token.value === ']') {\n pop();\n return\n }\n\n push();\n },\n\n afterPropertyValue () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'punctuator') {\n // throw invalidToken()\n // }\n\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n switch (token.value) {\n case ',':\n parseState = 'beforePropertyName';\n return\n\n case '}':\n pop();\n }\n\n // This code is unreachable since it's handled by the lexState.\n // throw invalidToken()\n },\n\n afterArrayValue () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'punctuator') {\n // throw invalidToken()\n // }\n\n if (token.type === 'eof') {\n throw invalidEOF()\n }\n\n switch (token.value) {\n case ',':\n parseState = 'beforeArrayValue';\n return\n\n case ']':\n pop();\n }\n\n // This code is unreachable since it's handled by the lexState.\n // throw invalidToken()\n },\n\n end () {\n // This code is unreachable since it's handled by the lexState.\n // if (token.type !== 'eof') {\n // throw invalidToken()\n // }\n },\n};\n\nfunction push () {\n let value;\n\n switch (token.type) {\n case 'punctuator':\n switch (token.value) {\n case '{':\n value = {};\n break\n\n case '[':\n value = [];\n break\n }\n\n break\n\n case 'null':\n case 'boolean':\n case 'numeric':\n case 'string':\n value = token.value;\n break\n\n // This code is unreachable.\n // default:\n // throw invalidToken()\n }\n\n if (root === undefined) {\n root = value;\n } else {\n const parent = stack[stack.length - 1];\n if (Array.isArray(parent)) {\n parent.push(value);\n } else {\n Object.defineProperty(parent, key, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n }\n\n if (value !== null && typeof value === 'object') {\n stack.push(value);\n\n if (Array.isArray(value)) {\n parseState = 'beforeArrayValue';\n } else {\n parseState = 'beforePropertyName';\n }\n } else {\n const current = stack[stack.length - 1];\n if (current == null) {\n parseState = 'end';\n } else if (Array.isArray(current)) {\n parseState = 'afterArrayValue';\n } else {\n parseState = 'afterPropertyValue';\n }\n }\n}\n\nfunction pop () {\n stack.pop();\n\n const current = stack[stack.length - 1];\n if (current == null) {\n parseState = 'end';\n } else if (Array.isArray(current)) {\n parseState = 'afterArrayValue';\n } else {\n parseState = 'afterPropertyValue';\n }\n}\n\n// This code is unreachable.\n// function invalidParseState () {\n// return new Error(`JSON5: invalid parse state '${parseState}'`)\n// }\n\n// This code is unreachable.\n// function invalidLexState (state) {\n// return new Error(`JSON5: invalid lex state '${state}'`)\n// }\n\nfunction invalidChar (c) {\n if (c === undefined) {\n return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)\n }\n\n return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)\n}\n\nfunction invalidEOF () {\n return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)\n}\n\n// This code is unreachable.\n// function invalidToken () {\n// if (token.type === 'eof') {\n// return syntaxError(`JSON5: invalid end of input at ${line}:${column}`)\n// }\n\n// const c = String.fromCodePoint(token.value.codePointAt(0))\n// return syntaxError(`JSON5: invalid character '${formatChar(c)}' at ${line}:${column}`)\n// }\n\nfunction invalidIdentifier () {\n column -= 5;\n return syntaxError(`JSON5: invalid identifier character at ${line}:${column}`)\n}\n\nfunction separatorChar (c) {\n console.warn(`JSON5: '${formatChar(c)}' in strings is not valid ECMAScript; consider escaping`);\n}\n\nfunction formatChar (c) {\n const replacements = {\n \"'\": \"\\\\'\",\n '\"': '\\\\\"',\n '\\\\': '\\\\\\\\',\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t',\n '\\v': '\\\\v',\n '\\0': '\\\\0',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n };\n\n if (replacements[c]) {\n return replacements[c]\n }\n\n if (c < ' ') {\n const hexString = c.charCodeAt(0).toString(16);\n return '\\\\x' + ('00' + hexString).substring(hexString.length)\n }\n\n return c\n}\n\nfunction syntaxError (message) {\n const err = new SyntaxError(message);\n err.lineNumber = line;\n err.columnNumber = column;\n return err\n}\n\nvar stringify = function stringify (value, replacer, space) {\n const stack = [];\n let indent = '';\n let propertyList;\n let replacerFunc;\n let gap = '';\n let quote;\n\n if (\n replacer != null &&\n typeof replacer === 'object' &&\n !Array.isArray(replacer)\n ) {\n space = replacer.space;\n quote = replacer.quote;\n replacer = replacer.replacer;\n }\n\n if (typeof replacer === 'function') {\n replacerFunc = replacer;\n } else if (Array.isArray(replacer)) {\n propertyList = [];\n for (const v of replacer) {\n let item;\n\n if (typeof v === 'string') {\n item = v;\n } else if (\n typeof v === 'number' ||\n v instanceof String ||\n v instanceof Number\n ) {\n item = String(v);\n }\n\n if (item !== undefined && propertyList.indexOf(item) < 0) {\n propertyList.push(item);\n }\n }\n }\n\n if (space instanceof Number) {\n space = Number(space);\n } else if (space instanceof String) {\n space = String(space);\n }\n\n if (typeof space === 'number') {\n if (space > 0) {\n space = Math.min(10, Math.floor(space));\n gap = ' '.substr(0, space);\n }\n } else if (typeof space === 'string') {\n gap = space.substr(0, 10);\n }\n\n return serializeProperty('', {'': value})\n\n function serializeProperty (key, holder) {\n let value = holder[key];\n if (value != null) {\n if (typeof value.toJSON5 === 'function') {\n value = value.toJSON5(key);\n } else if (typeof value.toJSON === 'function') {\n value = value.toJSON(key);\n }\n }\n\n if (replacerFunc) {\n value = replacerFunc.call(holder, key, value);\n }\n\n if (value instanceof Number) {\n value = Number(value);\n } else if (value instanceof String) {\n value = String(value);\n } else if (value instanceof Boolean) {\n value = value.valueOf();\n }\n\n switch (value) {\n case null: return 'null'\n case true: return 'true'\n case false: return 'false'\n }\n\n if (typeof value === 'string') {\n return quoteString(value, false)\n }\n\n if (typeof value === 'number') {\n return String(value)\n }\n\n if (typeof value === 'object') {\n return Array.isArray(value) ? serializeArray(value) : serializeObject(value)\n }\n\n return undefined\n }\n\n function quoteString (value) {\n const quotes = {\n \"'\": 0.1,\n '\"': 0.2,\n };\n\n const replacements = {\n \"'\": \"\\\\'\",\n '\"': '\\\\\"',\n '\\\\': '\\\\\\\\',\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t',\n '\\v': '\\\\v',\n '\\0': '\\\\0',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n };\n\n let product = '';\n\n for (let i = 0; i < value.length; i++) {\n const c = value[i];\n switch (c) {\n case \"'\":\n case '\"':\n quotes[c]++;\n product += c;\n continue\n\n case '\\0':\n if (util.isDigit(value[i + 1])) {\n product += '\\\\x00';\n continue\n }\n }\n\n if (replacements[c]) {\n product += replacements[c];\n continue\n }\n\n if (c < ' ') {\n let hexString = c.charCodeAt(0).toString(16);\n product += '\\\\x' + ('00' + hexString).substring(hexString.length);\n continue\n }\n\n product += c;\n }\n\n const quoteChar = quote || Object.keys(quotes).reduce((a, b) => (quotes[a] < quotes[b]) ? a : b);\n\n product = product.replace(new RegExp(quoteChar, 'g'), replacements[quoteChar]);\n\n return quoteChar + product + quoteChar\n }\n\n function serializeObject (value) {\n if (stack.indexOf(value) >= 0) {\n throw TypeError('Converting circular structure to JSON5')\n }\n\n stack.push(value);\n\n let stepback = indent;\n indent = indent + gap;\n\n let keys = propertyList || Object.keys(value);\n let partial = [];\n for (const key of keys) {\n const propertyString = serializeProperty(key, value);\n if (propertyString !== undefined) {\n let member = serializeKey(key) + ':';\n if (gap !== '') {\n member += ' ';\n }\n member += propertyString;\n partial.push(member);\n }\n }\n\n let final;\n if (partial.length === 0) {\n final = '{}';\n } else {\n let properties;\n if (gap === '') {\n properties = partial.join(',');\n final = '{' + properties + '}';\n } else {\n let separator = ',\\n' + indent;\n properties = partial.join(separator);\n final = '{\\n' + indent + properties + ',\\n' + stepback + '}';\n }\n }\n\n stack.pop();\n indent = stepback;\n return final\n }\n\n function serializeKey (key) {\n if (key.length === 0) {\n return quoteString(key, true)\n }\n\n const firstChar = String.fromCodePoint(key.codePointAt(0));\n if (!util.isIdStartChar(firstChar)) {\n return quoteString(key, true)\n }\n\n for (let i = firstChar.length; i < key.length; i++) {\n if (!util.isIdContinueChar(String.fromCodePoint(key.codePointAt(i)))) {\n return quoteString(key, true)\n }\n }\n\n return key\n }\n\n function serializeArray (value) {\n if (stack.indexOf(value) >= 0) {\n throw TypeError('Converting circular structure to JSON5')\n }\n\n stack.push(value);\n\n let stepback = indent;\n indent = indent + gap;\n\n let partial = [];\n for (let i = 0; i < value.length; i++) {\n const propertyString = serializeProperty(String(i), value);\n partial.push((propertyString !== undefined) ? propertyString : 'null');\n }\n\n let final;\n if (partial.length === 0) {\n final = '[]';\n } else {\n if (gap === '') {\n let properties = partial.join(',');\n final = '[' + properties + ']';\n } else {\n let separator = ',\\n' + indent;\n let properties = partial.join(separator);\n final = '[\\n' + indent + properties + ',\\n' + stepback + ']';\n }\n }\n\n stack.pop();\n indent = stepback;\n return final\n }\n};\n\nconst JSON5 = {\n parse,\n stringify,\n};\n\nvar lib = JSON5;\n\nexport default lib;\n","let _fs\ntry {\n _fs = require('graceful-fs')\n} catch (_) {\n _fs = require('fs')\n}\nconst universalify = require('universalify')\nconst { stringify, stripBom } = require('./utils')\n\nasync function _readFile (file, options = {}) {\n if (typeof options === 'string') {\n options = { encoding: options }\n }\n\n const fs = options.fs || _fs\n\n const shouldThrow = 'throws' in options ? options.throws : true\n\n let data = await universalify.fromCallback(fs.readFile)(file, options)\n\n data = stripBom(data)\n\n let obj\n try {\n obj = JSON.parse(data, options ? options.reviver : null)\n } catch (err) {\n if (shouldThrow) {\n err.message = `${file}: ${err.message}`\n throw err\n } else {\n return null\n }\n }\n\n return obj\n}\n\nconst readFile = universalify.fromPromise(_readFile)\n\nfunction readFileSync (file, options = {}) {\n if (typeof options === 'string') {\n options = { encoding: options }\n }\n\n const fs = options.fs || _fs\n\n const shouldThrow = 'throws' in options ? options.throws : true\n\n try {\n let content = fs.readFileSync(file, options)\n content = stripBom(content)\n return JSON.parse(content, options.reviver)\n } catch (err) {\n if (shouldThrow) {\n err.message = `${file}: ${err.message}`\n throw err\n } else {\n return null\n }\n }\n}\n\nasync function _writeFile (file, obj, options = {}) {\n const fs = options.fs || _fs\n\n const str = stringify(obj, options)\n\n await universalify.fromCallback(fs.writeFile)(file, str, options)\n}\n\nconst writeFile = universalify.fromPromise(_writeFile)\n\nfunction writeFileSync (file, obj, options = {}) {\n const fs = options.fs || _fs\n\n const str = stringify(obj, options)\n // not sure if fs.writeFileSync returns anything, but just in case\n return fs.writeFileSync(file, str, options)\n}\n\n// NOTE: do not change this export format; required for ESM compat\n// see https://github.com/jprichardson/node-jsonfile/pull/162 for details\nmodule.exports = {\n readFile,\n readFileSync,\n writeFile,\n writeFileSync\n}\n","function stringify (obj, { EOL = '\\n', finalEOL = true, replacer = null, spaces } = {}) {\n const EOF = finalEOL ? EOL : ''\n const str = JSON.stringify(obj, replacer, spaces)\n\n return str.replace(/\\n/g, EOL) + EOF\n}\n\nfunction stripBom (content) {\n // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified\n if (Buffer.isBuffer(content)) content = content.toString('utf8')\n return content.replace(/^\\uFEFF/, '')\n}\n\nmodule.exports = { stringify, stripBom }\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.constants = exports.SEP = void 0;\nexports.SEP = '/';\nexports.constants = {\n O_RDONLY: 0,\n O_WRONLY: 1,\n O_RDWR: 2,\n S_IFMT: 61440,\n S_IFREG: 32768,\n S_IFDIR: 16384,\n S_IFCHR: 8192,\n S_IFBLK: 24576,\n S_IFIFO: 4096,\n S_IFLNK: 40960,\n S_IFSOCK: 49152,\n O_CREAT: 64,\n O_EXCL: 128,\n O_NOCTTY: 256,\n O_TRUNC: 512,\n O_APPEND: 1024,\n O_DIRECTORY: 65536,\n O_NOATIME: 262144,\n O_NOFOLLOW: 131072,\n O_SYNC: 1052672,\n O_SYMLINK: 2097152,\n O_DIRECT: 16384,\n O_NONBLOCK: 2048,\n S_IRWXU: 448,\n S_IRUSR: 256,\n S_IWUSR: 128,\n S_IXUSR: 64,\n S_IRWXG: 56,\n S_IRGRP: 32,\n S_IWGRP: 16,\n S_IXGRP: 8,\n S_IRWXO: 7,\n S_IROTH: 4,\n S_IWOTH: 2,\n S_IXOTH: 1,\n F_OK: 0,\n R_OK: 4,\n W_OK: 2,\n X_OK: 1,\n UV_FS_SYMLINK_DIR: 1,\n UV_FS_SYMLINK_JUNCTION: 2,\n UV_FS_COPYFILE_EXCL: 1,\n UV_FS_COPYFILE_FICLONE: 2,\n UV_FS_COPYFILE_FICLONE_FORCE: 4,\n COPYFILE_EXCL: 1,\n COPYFILE_FICLONE: 2,\n COPYFILE_FICLONE_FORCE: 4,\n};\n//# sourceMappingURL=constants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.File = void 0;\nconst constants_1 = require(\"../constants\");\nconst { O_APPEND } = constants_1.constants;\n/**\n * Represents an open file (file descriptor) that points to a `Link` (Hard-link) and a `Node`.\n *\n * @todo Rename to `OpenFile`.\n */\nclass File {\n /**\n * Open a Link-Node pair. `node` is provided separately as that might be a different node\n * rather the one `link` points to, because it might be a symlink.\n * @param link\n * @param node\n * @param flags\n * @param fd\n */\n constructor(link, node, flags, fd) {\n this.link = link;\n this.node = node;\n this.flags = flags;\n this.fd = fd;\n this.position = 0;\n if (this.flags & O_APPEND)\n this.position = this.getSize();\n }\n getString(encoding = 'utf8') {\n return this.node.getString();\n }\n setString(str) {\n this.node.setString(str);\n }\n getBuffer() {\n return this.node.getBuffer();\n }\n setBuffer(buf) {\n this.node.setBuffer(buf);\n }\n getSize() {\n return this.node.getSize();\n }\n truncate(len) {\n this.node.truncate(len);\n }\n seekTo(position) {\n this.position = position;\n }\n write(buf, offset = 0, length = buf.length, position) {\n if (typeof position !== 'number')\n position = this.position;\n const bytes = this.node.write(buf, offset, length, position);\n this.position = position + bytes;\n return bytes;\n }\n read(buf, offset = 0, length = buf.byteLength, position) {\n if (typeof position !== 'number')\n position = this.position;\n const bytes = this.node.read(buf, offset, length, position);\n this.position = position + bytes;\n return bytes;\n }\n chmod(perm) {\n this.node.chmod(perm);\n }\n chown(uid, gid) {\n this.node.chown(uid, gid);\n }\n}\nexports.File = File;\n//# sourceMappingURL=File.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Link = void 0;\nconst constants_1 = require(\"../constants\");\nconst fanout_1 = require(\"thingies/lib/fanout\");\nconst { S_IFREG } = constants_1.constants;\n/**\n * Represents a hard link that points to an i-node `node`.\n */\nclass Link {\n get steps() {\n return this._steps;\n }\n // Recursively sync children steps, e.g. in case of dir rename\n set steps(val) {\n this._steps = val;\n for (const [child, link] of this.children.entries()) {\n if (child === '.' || child === '..') {\n continue;\n }\n link?.syncSteps();\n }\n }\n constructor(vol, parent, name) {\n this.changes = new fanout_1.FanOut();\n this.children = new Map();\n // Path to this node as Array: ['usr', 'bin', 'node'].\n this._steps = [];\n // \"i-node\" number of the node.\n this.ino = 0;\n // Number of children.\n this.length = 0;\n this.vol = vol;\n this.parent = parent;\n this.name = name;\n this.syncSteps();\n }\n setNode(node) {\n this.node = node;\n this.ino = node.ino;\n }\n getNode() {\n return this.node;\n }\n createChild(name, node = this.vol.createNode(S_IFREG | 0o666)) {\n const link = new Link(this.vol, this, name);\n link.setNode(node);\n if (node.isDirectory()) {\n link.children.set('.', link);\n link.getNode().nlink++;\n }\n this.setChild(name, link);\n return link;\n }\n setChild(name, link = new Link(this.vol, this, name)) {\n this.children.set(name, link);\n link.parent = this;\n this.length++;\n const node = link.getNode();\n if (node.isDirectory()) {\n link.children.set('..', this);\n this.getNode().nlink++;\n }\n this.getNode().mtime = new Date();\n this.changes.emit(['child:add', link, this]);\n return link;\n }\n deleteChild(link) {\n const node = link.getNode();\n if (node.isDirectory()) {\n link.children.delete('..');\n this.getNode().nlink--;\n }\n this.children.delete(link.getName());\n this.length--;\n this.getNode().mtime = new Date();\n this.changes.emit(['child:del', link, this]);\n }\n getChild(name) {\n this.getNode().atime = new Date();\n return this.children.get(name);\n }\n getPath() {\n return this.steps.join(\"/\" /* PATH.SEP */);\n }\n getParentPath() {\n return this.steps.slice(0, -1).join(\"/\" /* PATH.SEP */);\n }\n getName() {\n return this.steps[this.steps.length - 1];\n }\n toJSON() {\n return {\n steps: this.steps,\n ino: this.ino,\n children: Array.from(this.children.keys()),\n };\n }\n syncSteps() {\n this.steps = this.parent ? this.parent.steps.concat([this.name]) : [this.name];\n }\n}\nexports.Link = Link;\n//# sourceMappingURL=Link.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Node = void 0;\nconst fanout_1 = require(\"thingies/lib/fanout\");\nconst process_1 = require(\"../process\");\nconst buffer_1 = require(\"../vendor/node/internal/buffer\");\nconst constants_1 = require(\"../constants\");\nconst { S_IFMT, S_IFDIR, S_IFREG, S_IFLNK, S_IFCHR } = constants_1.constants;\nconst getuid = () => process_1.default.getuid?.() ?? 0;\nconst getgid = () => process_1.default.getgid?.() ?? 0;\n/**\n * Node in a file system (like i-node, v-node).\n */\nclass Node {\n constructor(ino, mode = 0o666) {\n this.changes = new fanout_1.FanOut();\n // User ID and group ID.\n this._uid = getuid();\n this._gid = getgid();\n this._atime = new Date();\n this._mtime = new Date();\n this._ctime = new Date();\n this.rdev = 0;\n // Number of hard links pointing at this Node.\n this._nlink = 1;\n this.mode = mode;\n this.ino = ino;\n }\n set ctime(ctime) {\n this._ctime = ctime;\n }\n get ctime() {\n return this._ctime;\n }\n set uid(uid) {\n this._uid = uid;\n this.ctime = new Date();\n }\n get uid() {\n return this._uid;\n }\n set gid(gid) {\n this._gid = gid;\n this.ctime = new Date();\n }\n get gid() {\n return this._gid;\n }\n set atime(atime) {\n this._atime = atime;\n }\n get atime() {\n return this._atime;\n }\n set mtime(mtime) {\n this._mtime = mtime;\n this.ctime = new Date();\n }\n get mtime() {\n return this._mtime;\n }\n get perm() {\n return this.mode & ~S_IFMT;\n }\n set perm(perm) {\n this.mode = (this.mode & S_IFMT) | (perm & ~S_IFMT);\n this.ctime = new Date();\n }\n set nlink(nlink) {\n this._nlink = nlink;\n this.ctime = new Date();\n }\n get nlink() {\n return this._nlink;\n }\n getString(encoding = 'utf8') {\n this.atime = new Date();\n return this.getBuffer().toString(encoding);\n }\n setString(str) {\n // this.setBuffer(bufferFrom(str, 'utf8'));\n this.buf = (0, buffer_1.bufferFrom)(str, 'utf8');\n this.touch();\n }\n getBuffer() {\n this.atime = new Date();\n if (!this.buf)\n this.buf = (0, buffer_1.bufferAllocUnsafe)(0);\n return (0, buffer_1.bufferFrom)(this.buf); // Return a copy.\n }\n setBuffer(buf) {\n this.buf = (0, buffer_1.bufferFrom)(buf); // Creates a copy of data.\n this.touch();\n }\n getSize() {\n return this.buf ? this.buf.length : 0;\n }\n setModeProperty(property) {\n this.mode = property;\n }\n isFile() {\n return (this.mode & S_IFMT) === S_IFREG;\n }\n isDirectory() {\n return (this.mode & S_IFMT) === S_IFDIR;\n }\n isSymlink() {\n // return !!this.symlink;\n return (this.mode & S_IFMT) === S_IFLNK;\n }\n isCharacterDevice() {\n return (this.mode & S_IFMT) === S_IFCHR;\n }\n makeSymlink(symlink) {\n this.mode = S_IFLNK | 0o666;\n this.symlink = symlink;\n }\n write(buf, off = 0, len = buf.length, pos = 0) {\n if (!this.buf)\n this.buf = (0, buffer_1.bufferAllocUnsafe)(0);\n if (pos + len > this.buf.length) {\n const newBuf = (0, buffer_1.bufferAllocUnsafe)(pos + len);\n this.buf.copy(newBuf, 0, 0, this.buf.length);\n this.buf = newBuf;\n }\n buf.copy(this.buf, pos, off, off + len);\n this.touch();\n return len;\n }\n // Returns the number of bytes read.\n read(buf, off = 0, len = buf.byteLength, pos = 0) {\n this.atime = new Date();\n if (!this.buf)\n this.buf = (0, buffer_1.bufferAllocUnsafe)(0);\n if (pos >= this.buf.length)\n return 0;\n let actualLen = len;\n if (actualLen > buf.byteLength) {\n actualLen = buf.byteLength;\n }\n if (actualLen + pos > this.buf.length) {\n actualLen = this.buf.length - pos;\n }\n const buf2 = buf instanceof buffer_1.Buffer ? buf : buffer_1.Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n this.buf.copy(buf2, off, pos, pos + actualLen);\n return actualLen;\n }\n truncate(len = 0) {\n if (!len)\n this.buf = (0, buffer_1.bufferAllocUnsafe)(0);\n else {\n if (!this.buf)\n this.buf = (0, buffer_1.bufferAllocUnsafe)(0);\n if (len <= this.buf.length) {\n this.buf = this.buf.slice(0, len);\n }\n else {\n const buf = (0, buffer_1.bufferAllocUnsafe)(len);\n this.buf.copy(buf);\n buf.fill(0, this.buf.length);\n this.buf = buf;\n }\n }\n this.touch();\n }\n chmod(perm) {\n this.mode = (this.mode & S_IFMT) | (perm & ~S_IFMT);\n this.touch();\n }\n chown(uid, gid) {\n this.uid = uid;\n this.gid = gid;\n this.touch();\n }\n touch() {\n this.mtime = new Date();\n this.changes.emit(['modify']);\n }\n canRead(uid = getuid(), gid = getgid()) {\n if (this.perm & 4 /* S.IROTH */) {\n return true;\n }\n if (gid === this.gid) {\n if (this.perm & 32 /* S.IRGRP */) {\n return true;\n }\n }\n if (uid === this.uid) {\n if (this.perm & 256 /* S.IRUSR */) {\n return true;\n }\n }\n return false;\n }\n canWrite(uid = getuid(), gid = getgid()) {\n if (this.perm & 2 /* S.IWOTH */) {\n return true;\n }\n if (gid === this.gid) {\n if (this.perm & 16 /* S.IWGRP */) {\n return true;\n }\n }\n if (uid === this.uid) {\n if (this.perm & 128 /* S.IWUSR */) {\n return true;\n }\n }\n return false;\n }\n canExecute(uid = getuid(), gid = getgid()) {\n if (this.perm & 1 /* S.IXOTH */) {\n return true;\n }\n if (gid === this.gid) {\n if (this.perm & 8 /* S.IXGRP */) {\n return true;\n }\n }\n if (uid === this.uid) {\n if (this.perm & 64 /* S.IXUSR */) {\n return true;\n }\n }\n return false;\n }\n del() {\n this.changes.emit(['delete']);\n }\n toJSON() {\n return {\n ino: this.ino,\n uid: this.uid,\n gid: this.gid,\n atime: this.atime.getTime(),\n mtime: this.mtime.getTime(),\n ctime: this.ctime.getTime(),\n perm: this.perm,\n mode: this.mode,\n nlink: this.nlink,\n symlink: this.symlink,\n data: this.getString(),\n };\n }\n}\nexports.Node = Node;\n//# sourceMappingURL=Node.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Superblock = void 0;\nconst path_1 = require(\"../vendor/node/path\");\nconst Node_1 = require(\"./Node\");\nconst Link_1 = require(\"./Link\");\nconst File_1 = require(\"./File\");\nconst buffer_1 = require(\"../vendor/node/internal/buffer\");\nconst process_1 = require(\"../process\");\nconst constants_1 = require(\"../constants\");\nconst constants_2 = require(\"../node/constants\");\nconst util_1 = require(\"../node/util\");\nconst util_2 = require(\"./util\");\nconst json_1 = require(\"./json\");\nconst pathSep = path_1.posix ? path_1.posix.sep : path_1.sep;\nconst pathRelative = path_1.posix ? path_1.posix.relative : path_1.relative;\nconst pathJoin = path_1.posix ? path_1.posix.join : path_1.join;\nconst { O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL, O_TRUNC, O_APPEND, O_DIRECTORY } = constants_1.constants;\n/**\n * Represents a filesystem superblock, which is the root of a virtual\n * filesystem in Linux.\n * @see https://lxr.linux.no/linux+v3.11.2/include/linux/fs.h#L1242\n */\nclass Superblock {\n static fromJSON(json, cwd) {\n const vol = new Superblock();\n vol.fromJSON(json, cwd);\n return vol;\n }\n static fromNestedJSON(json, cwd) {\n const vol = new Superblock();\n vol.fromNestedJSON(json, cwd);\n return vol;\n }\n constructor(props = {}) {\n // I-node number counter.\n this.ino = 0;\n // A mapping for i-node numbers to i-nodes (`Node`);\n this.inodes = {};\n // List of released i-node numbers, for reuse.\n this.releasedInos = [];\n // A mapping for file descriptors to `File`s.\n this.fds = {};\n // A list of reusable (opened and closed) file descriptors, that should be\n // used first before creating a new file descriptor.\n this.releasedFds = [];\n // Max number of open files.\n this.maxFiles = 10000;\n // Current number of open files.\n this.openFiles = 0;\n this.open = (filename, flagsNum, modeNum, resolveSymlinks = true) => {\n const file = this.openFile(filename, flagsNum, modeNum, resolveSymlinks);\n if (!file)\n throw (0, util_1.createError)(\"ENOENT\" /* ERROR_CODE.ENOENT */, 'open', filename);\n return file.fd;\n };\n this.writeFile = (id, buf, flagsNum, modeNum) => {\n const isUserFd = typeof id === 'number';\n let fd;\n if (isUserFd)\n fd = id;\n else\n fd = this.open((0, util_1.pathToFilename)(id), flagsNum, modeNum);\n let offset = 0;\n let length = buf.length;\n let position = flagsNum & O_APPEND ? undefined : 0;\n try {\n while (length > 0) {\n const written = this.write(fd, buf, offset, length, position);\n offset += written;\n length -= written;\n if (position !== undefined)\n position += written;\n }\n }\n finally {\n if (!isUserFd)\n this.close(fd);\n }\n };\n this.read = (fd, buffer, offset, length, position) => {\n if (buffer.byteLength < length) {\n throw (0, util_1.createError)(\"ERR_OUT_OF_RANGE\" /* ERROR_CODE.ERR_OUT_OF_RANGE */, 'read', undefined, undefined, RangeError);\n }\n const file = this.getFileByFdOrThrow(fd);\n if (file.node.isSymlink()) {\n throw (0, util_1.createError)(\"EPERM\" /* ERROR_CODE.EPERM */, 'read', file.link.getPath());\n }\n return file.read(buffer, Number(offset), Number(length), position === -1 || typeof position !== 'number' ? undefined : position);\n };\n this.readv = (fd, buffers, position) => {\n const file = this.getFileByFdOrThrow(fd);\n let p = position ?? undefined;\n if (p === -1)\n p = undefined;\n let bytesRead = 0;\n for (const buffer of buffers) {\n const bytes = file.read(buffer, 0, buffer.byteLength, p);\n p = undefined;\n bytesRead += bytes;\n if (bytes < buffer.byteLength)\n break;\n }\n return bytesRead;\n };\n this.link = (filename1, filename2) => {\n let link1;\n try {\n link1 = this.getLinkOrThrow(filename1, 'link');\n }\n catch (err) {\n if (err.code)\n err = (0, util_1.createError)(err.code, 'link', filename1, filename2);\n throw err;\n }\n const dirname2 = (0, path_1.dirname)(filename2);\n let dir2;\n try {\n dir2 = this.getLinkOrThrow(dirname2, 'link');\n }\n catch (err) {\n // Augment error with filename1\n if (err.code)\n err = (0, util_1.createError)(err.code, 'link', filename1, filename2);\n throw err;\n }\n const name = (0, path_1.basename)(filename2);\n if (dir2.getChild(name))\n throw (0, util_1.createError)(\"EEXIST\" /* ERROR_CODE.EEXIST */, 'link', filename1, filename2);\n const node = link1.getNode();\n node.nlink++;\n dir2.createChild(name, node);\n };\n this.unlink = (filename) => {\n const link = this.getLinkOrThrow(filename, 'unlink');\n // TODO: Check if it is file, dir, other...\n if (link.length)\n throw Error('Dir not empty...');\n this.deleteLink(link);\n const node = link.getNode();\n node.nlink--;\n // When all hard links to i-node are deleted, remove the i-node, too.\n if (node.nlink <= 0) {\n this.deleteNode(node);\n }\n };\n this.symlink = (targetFilename, pathFilename) => {\n const pathSteps = (0, util_2.filenameToSteps)(pathFilename);\n // Check if directory exists, where we about to create a symlink.\n let dirLink;\n try {\n dirLink = this.getLinkParentAsDirOrThrow(pathSteps);\n }\n catch (err) {\n // Catch error to populate with the correct fields - getLinkParentAsDirOrThrow won't be aware of the second path\n if (err.code)\n err = (0, util_1.createError)(err.code, 'symlink', targetFilename, pathFilename);\n throw err;\n }\n const name = pathSteps[pathSteps.length - 1];\n // Check if new file already exists.\n if (dirLink.getChild(name))\n throw (0, util_1.createError)(\"EEXIST\" /* ERROR_CODE.EEXIST */, 'symlink', targetFilename, pathFilename);\n // Check permissions on the path where we are creating the symlink.\n // Note we're not checking permissions on the target path: It is not an error to create a symlink to a\n // non-existent or inaccessible target\n const node = dirLink.getNode();\n if (!node.canExecute() || !node.canWrite())\n throw (0, util_1.createError)(\"EACCES\" /* ERROR_CODE.EACCES */, 'symlink', targetFilename, pathFilename);\n // Create symlink.\n const symlink = dirLink.createChild(name);\n symlink.getNode().makeSymlink(targetFilename);\n return symlink;\n };\n this.rename = (oldPathFilename, newPathFilename) => {\n let link;\n try {\n link = this.getResolvedLinkOrThrow(oldPathFilename);\n }\n catch (err) {\n // Augment err with newPathFilename\n if (err.code)\n err = (0, util_1.createError)(err.code, 'rename', oldPathFilename, newPathFilename);\n throw err;\n }\n // TODO: Check if it is directory, if non-empty, we cannot move it, right?\n // Check directory exists for the new location.\n let newPathDirLink;\n try {\n newPathDirLink = this.getLinkParentAsDirOrThrow(newPathFilename);\n }\n catch (err) {\n // Augment error with oldPathFilename\n if (err.code)\n err = (0, util_1.createError)(err.code, 'rename', oldPathFilename, newPathFilename);\n throw err;\n }\n // TODO: Also treat cases with directories and symbolic links.\n // TODO: See: http://man7.org/linux/man-pages/man2/rename.2.html\n // Remove hard link from old folder.\n const oldLinkParent = link.parent;\n if (!oldLinkParent)\n throw (0, util_1.createError)(\"EINVAL\" /* ERROR_CODE.EINVAL */, 'rename', oldPathFilename, newPathFilename);\n // Check we have access and write permissions in both places\n const oldParentNode = oldLinkParent.getNode();\n const newPathDirNode = newPathDirLink.getNode();\n if (!oldParentNode.canExecute() ||\n !oldParentNode.canWrite() ||\n !newPathDirNode.canExecute() ||\n !newPathDirNode.canWrite()) {\n throw (0, util_1.createError)(\"EACCES\" /* ERROR_CODE.EACCES */, 'rename', oldPathFilename, newPathFilename);\n }\n oldLinkParent.deleteChild(link);\n // Rename should overwrite the new path, if that exists.\n const name = (0, path_1.basename)(newPathFilename);\n link.name = name;\n link.steps = [...newPathDirLink.steps, name];\n newPathDirLink.setChild(link.getName(), link);\n };\n this.mkdir = (filename, modeNum) => {\n const steps = (0, util_2.filenameToSteps)(filename);\n // This will throw if user tries to create root dir `fs.mkdirSync('/')`.\n if (!steps.length)\n throw (0, util_1.createError)(\"EEXIST\" /* ERROR_CODE.EEXIST */, 'mkdir', filename);\n const dir = this.getLinkParentAsDirOrThrow(filename, 'mkdir');\n // Check path already exists.\n const name = steps[steps.length - 1];\n if (dir.getChild(name))\n throw (0, util_1.createError)(\"EEXIST\" /* ERROR_CODE.EEXIST */, 'mkdir', filename);\n const node = dir.getNode();\n if (!node.canWrite() || !node.canExecute())\n throw (0, util_1.createError)(\"EACCES\" /* ERROR_CODE.EACCES */, 'mkdir', filename);\n dir.createChild(name, this.createNode(constants_1.constants.S_IFDIR | modeNum));\n };\n /**\n * Creates directory tree recursively.\n */\n this.mkdirp = (filename, modeNum) => {\n let created = false;\n const steps = (0, util_2.filenameToSteps)(filename);\n let curr = null;\n let i = steps.length;\n // Find the longest subpath of filename that still exists:\n for (i = steps.length; i >= 0; i--) {\n curr = this.getResolvedLink(steps.slice(0, i));\n if (curr)\n break;\n }\n if (!curr) {\n curr = this.root;\n i = 0;\n }\n // curr is now the last directory that still exists.\n // (If none of them existed, curr is the root.)\n // Check access the lazy way:\n curr = this.getResolvedLinkOrThrow(path_1.sep + steps.slice(0, i).join(path_1.sep), 'mkdir');\n // Start creating directories:\n for (i; i < steps.length; i++) {\n const node = curr.getNode();\n if (node.isDirectory()) {\n // Check we have permissions\n if (!node.canExecute() || !node.canWrite())\n throw (0, util_1.createError)(\"EACCES\" /* ERROR_CODE.EACCES */, 'mkdir', filename);\n }\n else {\n throw (0, util_1.createError)(\"ENOTDIR\" /* ERROR_CODE.ENOTDIR */, 'mkdir', filename);\n }\n created = true;\n curr = curr.createChild(steps[i], this.createNode(constants_1.constants.S_IFDIR | modeNum));\n }\n return created ? filename : undefined;\n };\n this.rmdir = (filename, recursive = false) => {\n const link = this.getLinkAsDirOrThrow(filename, 'rmdir');\n if (link.length && !recursive)\n throw (0, util_1.createError)(\"ENOTEMPTY\" /* ERROR_CODE.ENOTEMPTY */, 'rmdir', filename);\n this.deleteLink(link);\n };\n this.rm = (filename, force = false, recursive = false) => {\n // \"stat\" is used to match Node's native error message.\n let link;\n try {\n link = this.getResolvedLinkOrThrow(filename, 'stat');\n }\n catch (err) {\n // Silently ignore missing paths if force option is true\n if (err.code === \"ENOENT\" /* ERROR_CODE.ENOENT */ && force)\n return;\n else\n throw err;\n }\n if (link.getNode().isDirectory() && !recursive)\n throw (0, util_1.createError)(\"ERR_FS_EISDIR\" /* ERROR_CODE.ERR_FS_EISDIR */, 'rm', filename);\n if (!link.parent?.getNode().canWrite())\n throw (0, util_1.createError)(\"EACCES\" /* ERROR_CODE.EACCES */, 'rm', filename);\n this.deleteLink(link);\n };\n this.close = (fd) => {\n (0, util_2.validateFd)(fd);\n const file = this.getFileByFdOrThrow(fd, 'close');\n this.closeFile(file);\n };\n const root = this.createLink();\n root.setNode(this.createNode(constants_1.constants.S_IFDIR | 0o777));\n root.setChild('.', root);\n root.getNode().nlink++;\n root.setChild('..', root);\n root.getNode().nlink++;\n this.root = root;\n }\n createLink(parent, name, isDirectory = false, mode) {\n if (!parent) {\n return new Link_1.Link(this, void 0, '');\n }\n if (!name) {\n throw new Error('createLink: name cannot be empty');\n }\n // If no explicit permission is provided, use defaults based on type\n const finalPerm = mode ?? (isDirectory ? 0o777 : 0o666);\n // To prevent making a breaking change, `mode` can also just be a permission number\n // and the file type is set based on `isDirectory`\n const hasFileType = mode && mode & constants_1.constants.S_IFMT;\n const modeType = hasFileType ? mode & constants_1.constants.S_IFMT : isDirectory ? constants_1.constants.S_IFDIR : constants_1.constants.S_IFREG;\n const finalMode = (finalPerm & ~constants_1.constants.S_IFMT) | modeType;\n return parent.createChild(name, this.createNode(finalMode));\n }\n deleteLink(link) {\n const parent = link.parent;\n if (parent) {\n parent.deleteChild(link);\n return true;\n }\n return false;\n }\n newInoNumber() {\n const releasedFd = this.releasedInos.pop();\n if (releasedFd)\n return releasedFd;\n else {\n this.ino = (this.ino + 1) % 0xffffffff;\n return this.ino;\n }\n }\n newFdNumber() {\n const releasedFd = this.releasedFds.pop();\n return typeof releasedFd === 'number' ? releasedFd : Superblock.fd--;\n }\n createNode(mode) {\n const node = new Node_1.Node(this.newInoNumber(), mode);\n this.inodes[node.ino] = node;\n return node;\n }\n deleteNode(node) {\n node.del();\n delete this.inodes[node.ino];\n this.releasedInos.push(node.ino);\n }\n walk(stepsOrFilenameOrLink, resolveSymlinks = false, checkExistence = false, checkAccess = false, funcName) {\n let steps;\n let filename;\n if (stepsOrFilenameOrLink instanceof Link_1.Link) {\n steps = stepsOrFilenameOrLink.steps;\n filename = pathSep + steps.join(pathSep);\n }\n else if (typeof stepsOrFilenameOrLink === 'string') {\n steps = (0, util_2.filenameToSteps)(stepsOrFilenameOrLink);\n filename = stepsOrFilenameOrLink;\n }\n else {\n steps = stepsOrFilenameOrLink;\n filename = pathSep + steps.join(pathSep);\n }\n let curr = this.root;\n let i = 0;\n while (i < steps.length) {\n let node = curr.getNode();\n // Check access permissions if current link is a directory\n if (node.isDirectory()) {\n if (checkAccess && !node.canExecute()) {\n throw (0, util_1.createError)(\"EACCES\" /* ERROR_CODE.EACCES */, funcName, filename);\n }\n }\n else {\n if (i < steps.length - 1)\n throw (0, util_1.createError)(\"ENOTDIR\" /* ERROR_CODE.ENOTDIR */, funcName, filename);\n }\n curr = curr.getChild(steps[i]) ?? null;\n // Check existence of current link\n if (!curr)\n if (checkExistence)\n throw (0, util_1.createError)(\"ENOENT\" /* ERROR_CODE.ENOENT */, funcName, filename);\n else\n return null;\n node = curr?.getNode();\n // Resolve symlink if we're resolving all symlinks OR if this is an intermediate path component\n // This allows lstat to traverse through symlinks in intermediate directories while not resolving the final component\n if (node.isSymlink() && (resolveSymlinks || i < steps.length - 1)) {\n const resolvedPath = (0, path_1.isAbsolute)(node.symlink) ? node.symlink : pathJoin((0, path_1.dirname)(curr.getPath()), node.symlink); // Relative to symlink's parent\n steps = (0, util_2.filenameToSteps)(resolvedPath).concat(steps.slice(i + 1));\n curr = this.root;\n i = 0;\n continue;\n }\n // After resolving symlinks, check if it's not a directory and we still have more steps\n // This handles the case where we try to traverse through a file\n // Only do this check when we're doing filesystem operations (checkExistence = true)\n if (checkExistence && !node.isDirectory() && i < steps.length - 1) {\n // On Windows, use ENOENT for consistency with Node.js behavior\n // On other platforms, use ENOTDIR which is more semantically correct\n const errorCode = process_1.default.platform === 'win32' ? \"ENOENT\" /* ERROR_CODE.ENOENT */ : \"ENOTDIR\" /* ERROR_CODE.ENOTDIR */;\n throw (0, util_1.createError)(errorCode, funcName, filename);\n }\n i++;\n }\n return curr;\n }\n // Returns a `Link` (hard link) referenced by path \"split\" into steps.\n getLink(steps) {\n return this.walk(steps, false, false, false);\n }\n // Just link `getLink`, but throws a correct user error, if link to found.\n getLinkOrThrow(filename, funcName) {\n return this.walk(filename, false, true, true, funcName);\n }\n // Just like `getLink`, but also dereference/resolves symbolic links.\n getResolvedLink(filenameOrSteps) {\n return this.walk(filenameOrSteps, true, false, false);\n }\n /**\n * Just like `getLinkOrThrow`, but also dereference/resolves symbolic links.\n */\n getResolvedLinkOrThrow(filename, funcName) {\n return this.walk(filename, true, true, true, funcName);\n }\n resolveSymlinks(link) {\n return this.getResolvedLink(link.steps.slice(1));\n }\n /**\n * Just like `getLinkOrThrow`, but also verifies that the link is a directory.\n */\n getLinkAsDirOrThrow(filename, funcName) {\n const link = this.getLinkOrThrow(filename, funcName);\n if (!link.getNode().isDirectory())\n throw (0, util_1.createError)(\"ENOTDIR\" /* ERROR_CODE.ENOTDIR */, funcName, filename);\n return link;\n }\n // Get the immediate parent directory of the link.\n getLinkParent(steps) {\n return this.getLink(steps.slice(0, -1));\n }\n getLinkParentAsDirOrThrow(filenameOrSteps, funcName) {\n const steps = (filenameOrSteps instanceof Array ? filenameOrSteps : (0, util_2.filenameToSteps)(filenameOrSteps)).slice(0, -1);\n const filename = pathSep + steps.join(pathSep);\n const link = this.getLinkOrThrow(filename, funcName);\n if (!link.getNode().isDirectory())\n throw (0, util_1.createError)(\"ENOTDIR\" /* ERROR_CODE.ENOTDIR */, funcName, filename);\n return link;\n }\n getFileByFd(fd) {\n return this.fds[String(fd)];\n }\n getFileByFdOrThrow(fd, funcName) {\n if (!(0, util_2.isFd)(fd))\n throw TypeError(constants_2.ERRSTR.FD);\n const file = this.getFileByFd(fd);\n if (!file)\n throw (0, util_1.createError)(\"EBADF\" /* ERROR_CODE.EBADF */, funcName);\n return file;\n }\n _toJSON(link = this.root, json = {}, path, asBuffer) {\n let isEmpty = true;\n let children = link.children;\n if (link.getNode().isFile()) {\n children = new Map([[link.getName(), link.parent.getChild(link.getName())]]);\n link = link.parent;\n }\n for (const name of children.keys()) {\n if (name === '.' || name === '..') {\n continue;\n }\n isEmpty = false;\n const child = link.getChild(name);\n if (!child) {\n throw new Error('_toJSON: unexpected undefined');\n }\n const node = child.getNode();\n if (node.isFile()) {\n let filename = child.getPath();\n if (path)\n filename = pathRelative(path, filename);\n json[filename] = asBuffer ? node.getBuffer() : node.getString();\n }\n else if (node.isDirectory()) {\n this._toJSON(child, json, path, asBuffer);\n }\n }\n let dirPath = link.getPath();\n if (path)\n dirPath = pathRelative(path, dirPath);\n if (dirPath && isEmpty) {\n json[dirPath] = null;\n }\n return json;\n }\n toJSON(paths, json = {}, isRelative = false, asBuffer = false) {\n const links = [];\n if (paths) {\n if (!Array.isArray(paths))\n paths = [paths];\n for (const path of paths) {\n const filename = (0, util_1.pathToFilename)(path);\n const link = this.getResolvedLink(filename);\n if (!link)\n continue;\n links.push(link);\n }\n }\n else {\n links.push(this.root);\n }\n if (!links.length)\n return json;\n for (const link of links)\n this._toJSON(link, json, isRelative ? link.getPath() : '', asBuffer);\n return json;\n }\n // TODO: `cwd` should probably not invoke `process.cwd()`.\n fromJSON(json, cwd = process_1.default.cwd()) {\n for (let filename in json) {\n const data = json[filename];\n filename = (0, util_2.resolve)(filename, cwd);\n if (typeof data === 'string' || data instanceof buffer_1.Buffer) {\n const dir = (0, path_1.dirname)(filename);\n this.mkdirp(dir, 511 /* MODE.DIR */);\n const buffer = (0, util_2.dataToBuffer)(data);\n this.writeFile(filename, buffer, constants_2.FLAGS.w, 438 /* MODE.DEFAULT */);\n }\n else {\n this.mkdirp(filename, 511 /* MODE.DIR */);\n }\n }\n }\n fromNestedJSON(json, cwd) {\n this.fromJSON((0, json_1.flattenJSON)(json), cwd);\n }\n reset() {\n this.ino = 0;\n this.inodes = {};\n this.releasedInos = [];\n this.fds = {};\n this.releasedFds = [];\n this.openFiles = 0;\n this.root = this.createLink();\n this.root.setNode(this.createNode(constants_1.constants.S_IFDIR | 0o777));\n }\n // Legacy interface\n mountSync(mountpoint, json) {\n this.fromJSON(json, mountpoint);\n }\n openLink(link, flagsNum, resolveSymlinks = true) {\n if (this.openFiles >= this.maxFiles) {\n // Too many open files.\n throw (0, util_1.createError)(\"EMFILE\" /* ERROR_CODE.EMFILE */, 'open', link.getPath());\n }\n // Resolve symlinks.\n //\n // @TODO: This should be superfluous. This method is only ever called by openFile(), which does its own symlink resolution\n // prior to calling.\n let realLink = link;\n if (resolveSymlinks)\n realLink = this.getResolvedLinkOrThrow(link.getPath(), 'open');\n const node = realLink.getNode();\n // Check whether node is a directory\n if (node.isDirectory()) {\n if ((flagsNum & (O_RDONLY | O_RDWR | O_WRONLY)) !== O_RDONLY)\n throw (0, util_1.createError)(\"EISDIR\" /* ERROR_CODE.EISDIR */, 'open', link.getPath());\n }\n else {\n if (flagsNum & O_DIRECTORY)\n throw (0, util_1.createError)(\"ENOTDIR\" /* ERROR_CODE.ENOTDIR */, 'open', link.getPath());\n }\n // Check node permissions\n // For read access: check if flags are O_RDONLY or O_RDWR (i.e., not only O_WRONLY)\n if ((flagsNum & (O_RDONLY | O_RDWR | O_WRONLY)) !== O_WRONLY) {\n if (!node.canRead()) {\n throw (0, util_1.createError)(\"EACCES\" /* ERROR_CODE.EACCES */, 'open', link.getPath());\n }\n }\n // For write access: check if flags are O_WRONLY or O_RDWR\n if (flagsNum & (O_WRONLY | O_RDWR)) {\n if (!node.canWrite()) {\n throw (0, util_1.createError)(\"EACCES\" /* ERROR_CODE.EACCES */, 'open', link.getPath());\n }\n }\n const file = new File_1.File(link, node, flagsNum, this.newFdNumber());\n this.fds[file.fd] = file;\n this.openFiles++;\n if (flagsNum & O_TRUNC)\n file.truncate();\n return file;\n }\n openFile(filename, flagsNum, modeNum, resolveSymlinks = true) {\n const steps = (0, util_2.filenameToSteps)(filename);\n let link;\n try {\n link = resolveSymlinks ? this.getResolvedLinkOrThrow(filename, 'open') : this.getLinkOrThrow(filename, 'open');\n // Check if file already existed when trying to create it exclusively (O_CREAT and O_EXCL flags are set).\n // This is an error, see https://pubs.opengroup.org/onlinepubs/009695399/functions/open.html:\n // \"If O_CREAT and O_EXCL are set, open() shall fail if the file exists.\"\n if (link && flagsNum & O_CREAT && flagsNum & O_EXCL)\n throw (0, util_1.createError)(\"EEXIST\" /* ERROR_CODE.EEXIST */, 'open', filename);\n }\n catch (err) {\n // Try creating a new file, if it does not exist and O_CREAT flag is set.\n // Note that this will still throw if the ENOENT came from one of the\n // intermediate directories instead of the file itself.\n if (err.code === \"ENOENT\" /* ERROR_CODE.ENOENT */ && flagsNum & O_CREAT) {\n const dirName = (0, path_1.dirname)(filename);\n const dirLink = this.getResolvedLinkOrThrow(dirName);\n const dirNode = dirLink.getNode();\n // Check that the place we create the new file is actually a directory and that we are allowed to do so:\n if (!dirNode.isDirectory())\n throw (0, util_1.createError)(\"ENOTDIR\" /* ERROR_CODE.ENOTDIR */, 'open', filename);\n if (!dirNode.canExecute() || !dirNode.canWrite())\n throw (0, util_1.createError)(\"EACCES\" /* ERROR_CODE.EACCES */, 'open', filename);\n // This is a difference to the original implementation, which would simply not create a file unless modeNum was specified.\n // However, current Node versions will default to 0o666.\n modeNum ?? (modeNum = 0o666);\n link = this.createLink(dirLink, steps[steps.length - 1], false, modeNum);\n }\n else\n throw err;\n }\n if (link)\n return this.openLink(link, flagsNum, resolveSymlinks);\n throw (0, util_1.createError)(\"ENOENT\" /* ERROR_CODE.ENOENT */, 'open', filename);\n }\n closeFile(file) {\n if (!this.fds[file.fd])\n return;\n this.openFiles--;\n delete this.fds[file.fd];\n this.releasedFds.push(file.fd);\n }\n write(fd, buf, offset, length, position) {\n const file = this.getFileByFdOrThrow(fd, 'write');\n if (file.node.isSymlink()) {\n throw (0, util_1.createError)(\"EBADF\" /* ERROR_CODE.EBADF */, 'write', file.link.getPath());\n }\n return file.write(buf, offset, length, position === -1 || typeof position !== 'number' ? undefined : position);\n }\n}\nexports.Superblock = Superblock;\n/**\n * Global file descriptor counter. UNIX file descriptors start from 0 and go sequentially\n * up, so here, in order not to conflict with them, we choose some big number and descrease\n * the file descriptor of every new opened file.\n * @type {number}\n * @todo This should not be static, right?\n */\nSuperblock.fd = 0x7fffffff;\n//# sourceMappingURL=Superblock.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Superblock = exports.File = exports.Link = exports.Node = void 0;\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./types\"), exports);\ntslib_1.__exportStar(require(\"./json\"), exports);\nvar Node_1 = require(\"./Node\");\nObject.defineProperty(exports, \"Node\", { enumerable: true, get: function () { return Node_1.Node; } });\nvar Link_1 = require(\"./Link\");\nObject.defineProperty(exports, \"Link\", { enumerable: true, get: function () { return Link_1.Link; } });\nvar File_1 = require(\"./File\");\nObject.defineProperty(exports, \"File\", { enumerable: true, get: function () { return File_1.File; } });\nvar Superblock_1 = require(\"./Superblock\");\nObject.defineProperty(exports, \"Superblock\", { enumerable: true, get: function () { return Superblock_1.Superblock; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.flattenJSON = void 0;\nconst buffer_1 = require(\"../vendor/node/internal/buffer\");\nconst path_1 = require(\"../vendor/node/path\");\nconst pathJoin = path_1.posix ? path_1.posix.join : path_1.join;\nconst flattenJSON = (nestedJSON) => {\n const flatJSON = {};\n function flatten(pathPrefix, node) {\n for (const path in node) {\n const contentOrNode = node[path];\n // TODO: Can we avoid using `join` here? Just concatenate?\n const joinedPath = pathJoin(pathPrefix, path);\n if (typeof contentOrNode === 'string' || contentOrNode instanceof buffer_1.Buffer) {\n flatJSON[joinedPath] = contentOrNode;\n }\n else if (typeof contentOrNode === 'object' &&\n contentOrNode !== null &&\n !(contentOrNode instanceof buffer_1.Buffer) &&\n Object.keys(contentOrNode).length > 0) {\n // empty directories need an explicit entry and therefore get handled in `else`, non-empty ones are implicitly considered\n flatten(joinedPath, contentOrNode);\n }\n else {\n // without this branch null, empty-object or non-object entries would not be handled in the same way\n // by both fromJSON() and fromNestedJSON()\n flatJSON[joinedPath] = null;\n }\n }\n }\n flatten('', nestedJSON);\n return flatJSON;\n};\nexports.flattenJSON = flattenJSON;\n//# sourceMappingURL=json.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.filenameToSteps = exports.resolve = exports.unixify = exports.isWin = void 0;\nexports.isFd = isFd;\nexports.validateFd = validateFd;\nexports.dataToBuffer = dataToBuffer;\nconst path_1 = require(\"../vendor/node/path\");\nconst buffer_1 = require(\"../vendor/node/internal/buffer\");\nconst process_1 = require(\"../process\");\nconst encoding_1 = require(\"../encoding\");\nconst constants_1 = require(\"../node/constants\");\nexports.isWin = process_1.default.platform === 'win32';\nconst resolveCrossPlatform = path_1.resolve;\nconst pathSep = path_1.posix ? path_1.posix.sep : path_1.sep;\nconst isSeparator = (str, i) => {\n let char = str[i];\n return i > 0 && (char === '/' || (exports.isWin && char === '\\\\'));\n};\nconst removeTrailingSeparator = (str) => {\n let i = str.length - 1;\n if (i < 2)\n return str;\n while (isSeparator(str, i))\n i--;\n return str.substr(0, i + 1);\n};\nconst normalizePath = (str, stripTrailing) => {\n if (typeof str !== 'string')\n throw new TypeError('expected a string');\n str = str.replace(/[\\\\\\/]+/g, '/');\n if (stripTrailing !== false)\n str = removeTrailingSeparator(str);\n return str;\n};\nconst unixify = (filepath, stripTrailing = true) => {\n if (exports.isWin) {\n filepath = normalizePath(filepath, stripTrailing);\n return filepath.replace(/^([a-zA-Z]+:|\\.\\/)/, '');\n }\n return filepath;\n};\nexports.unixify = unixify;\nlet resolve = (filename, base = process_1.default.cwd()) => resolveCrossPlatform(base, filename);\nexports.resolve = resolve;\nif (exports.isWin) {\n const _resolve = resolve;\n exports.resolve = resolve = (filename, base) => (0, exports.unixify)(_resolve(filename, base));\n}\nconst filenameToSteps = (filename, base) => {\n const fullPath = resolve(filename, base);\n const fullPathSansSlash = fullPath.substring(1);\n if (!fullPathSansSlash)\n return [];\n return fullPathSansSlash.split(pathSep);\n};\nexports.filenameToSteps = filenameToSteps;\nfunction isFd(path) {\n return path >>> 0 === path;\n}\nfunction validateFd(fd) {\n if (!isFd(fd))\n throw TypeError(constants_1.ERRSTR.FD);\n}\nfunction dataToBuffer(data, encoding = encoding_1.ENCODING_UTF8) {\n if (buffer_1.Buffer.isBuffer(data))\n return data;\n else if (data instanceof Uint8Array)\n return (0, buffer_1.bufferFrom)(data);\n else if (encoding === 'buffer')\n return (0, buffer_1.bufferFrom)(String(data), 'utf8');\n else\n return (0, buffer_1.bufferFrom)(String(data), encoding);\n}\n//# sourceMappingURL=util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ENCODING_UTF8 = void 0;\nexports.assertEncoding = assertEncoding;\nexports.strToEncoding = strToEncoding;\nconst buffer_1 = require(\"./vendor/node/internal/buffer\");\nconst errors = require(\"./vendor/node/internal/errors\");\nexports.ENCODING_UTF8 = 'utf8';\nfunction assertEncoding(encoding) {\n if (encoding && !buffer_1.Buffer.isEncoding(encoding))\n throw new errors.TypeError('ERR_INVALID_OPT_VALUE_ENCODING', encoding);\n}\nfunction strToEncoding(str, encoding) {\n if (!encoding || encoding === exports.ENCODING_UTF8)\n return str; // UTF-8\n if (encoding === 'buffer')\n return new buffer_1.Buffer(str); // `buffer` encoding\n return new buffer_1.Buffer(str).toString(encoding); // Custom encoding\n}\n//# sourceMappingURL=encoding.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.memfs = exports.fs = exports.vol = exports.Volume = void 0;\nexports.createFsFromVolume = createFsFromVolume;\nconst Stats_1 = require(\"./node/Stats\");\nconst Dirent_1 = require(\"./node/Dirent\");\nconst volume_1 = require(\"./node/volume\");\nObject.defineProperty(exports, \"Volume\", { enumerable: true, get: function () { return volume_1.Volume; } });\nconst constants_1 = require(\"./constants\");\nconst fsSynchronousApiList_1 = require(\"./node/lists/fsSynchronousApiList\");\nconst fsCallbackApiList_1 = require(\"./node/lists/fsCallbackApiList\");\nconst { F_OK, R_OK, W_OK, X_OK } = constants_1.constants;\n// Default volume.\nexports.vol = new volume_1.Volume();\nfunction createFsFromVolume(vol) {\n const fs = { F_OK, R_OK, W_OK, X_OK, constants: constants_1.constants, Stats: Stats_1.default, Dirent: Dirent_1.default };\n // Bind FS methods.\n for (const method of fsSynchronousApiList_1.fsSynchronousApiList)\n if (typeof vol[method] === 'function')\n fs[method] = vol[method].bind(vol);\n for (const method of fsCallbackApiList_1.fsCallbackApiList)\n if (typeof vol[method] === 'function')\n fs[method] = vol[method].bind(vol);\n fs.StatWatcher = vol.StatWatcher;\n fs.FSWatcher = vol.FSWatcher;\n fs.WriteStream = vol.WriteStream;\n fs.ReadStream = vol.ReadStream;\n fs.promises = vol.promises;\n // Handle realpath and realpathSync with their .native properties\n if (typeof vol.realpath === 'function') {\n fs.realpath = vol.realpath.bind(vol);\n if (typeof vol.realpath.native === 'function') {\n fs.realpath.native = vol.realpath.native.bind(vol);\n }\n }\n if (typeof vol.realpathSync === 'function') {\n fs.realpathSync = vol.realpathSync.bind(vol);\n if (typeof vol.realpathSync.native === 'function') {\n fs.realpathSync.native = vol.realpathSync.native.bind(vol);\n }\n }\n fs._toUnixTimestamp = volume_1.toUnixTimestamp;\n fs.__vol = vol;\n return fs;\n}\nexports.fs = createFsFromVolume(exports.vol);\n/**\n * Creates a new file system instance.\n *\n * @param json File system structure expressed as a JSON object.\n * Use `null` for empty directories and empty string for empty files.\n * @param cwd Current working directory. The JSON structure will be created\n * relative to this path.\n * @returns A `memfs` file system instance, which is a drop-in replacement for\n * the `fs` module.\n */\nconst memfs = (json = {}, cwd = '/') => {\n const vol = volume_1.Volume.fromNestedJSON(json, cwd);\n const fs = createFsFromVolume(vol);\n return { fs, vol };\n};\nexports.memfs = memfs;\nmodule.exports = { ...module.exports, ...exports.fs };\nmodule.exports.semantic = true;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.newNotAllowedError = exports.newTypeMismatchError = exports.newNotFoundError = exports.assertCanWrite = exports.assertName = exports.basename = exports.ctx = void 0;\n/**\n * Creates a new {@link NodeFsaContext}.\n */\nconst ctx = (partial = {}) => {\n return {\n separator: '/',\n syncHandleAllowed: false,\n mode: 'read',\n ...partial,\n };\n};\nexports.ctx = ctx;\nconst basename = (path, separator) => {\n if (path[path.length - 1] === separator)\n path = path.slice(0, -1);\n const lastSlashIndex = path.lastIndexOf(separator);\n return lastSlashIndex === -1 ? path : path.slice(lastSlashIndex + 1);\n};\nexports.basename = basename;\nconst nameRegex = /^(\\.{1,2})$|^(.*([\\/\\\\]).*)$/;\nconst assertName = (name, method, klass) => {\n const isInvalid = !name || nameRegex.test(name);\n if (isInvalid)\n throw new TypeError(`Failed to execute '${method}' on '${klass}': Name is not allowed.`);\n};\nexports.assertName = assertName;\nconst assertCanWrite = (mode) => {\n if (mode !== 'readwrite')\n throw new DOMException('The request is not allowed by the user agent or the platform in the current context.', 'NotAllowedError');\n};\nexports.assertCanWrite = assertCanWrite;\nconst newNotFoundError = () => new DOMException('A requested file or directory could not be found at the time an operation was processed.', 'NotFoundError');\nexports.newNotFoundError = newNotFoundError;\nconst newTypeMismatchError = () => new DOMException('The path supplied exists, but was not an entry of requested type.', 'TypeMismatchError');\nexports.newTypeMismatchError = newTypeMismatchError;\nconst newNotAllowedError = () => new DOMException('Permission not granted.', 'NotAllowedError');\nexports.newNotAllowedError = newNotAllowedError;\n//# sourceMappingURL=util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Dir = void 0;\nconst util_1 = require(\"./util\");\nconst Dirent_1 = require(\"./Dirent\");\nconst errors = require(\"../vendor/node/internal/errors\");\n/**\n * A directory stream, like `fs.Dir`.\n */\nclass Dir {\n constructor(link, options) {\n this.link = link;\n this.options = options;\n this.iteratorInfo = [];\n this.closed = false;\n this.operationQueue = null;\n this.path = link.getPath();\n this.iteratorInfo.push(link.children[Symbol.iterator]());\n }\n closeBase() {\n // In a real filesystem implementation, this would close file descriptors\n // For memfs, we just need to mark as closed\n }\n readBase(iteratorInfo) {\n let done;\n let value;\n let name;\n let link;\n do {\n do {\n ({ done, value } = iteratorInfo[iteratorInfo.length - 1].next());\n if (!done) {\n [name, link] = value;\n }\n else {\n break;\n }\n } while (name === '.' || name === '..');\n if (done) {\n iteratorInfo.pop();\n if (iteratorInfo.length === 0) {\n break;\n }\n else {\n done = false;\n }\n }\n else {\n if (this.options.recursive && link.children.size) {\n iteratorInfo.push(link.children[Symbol.iterator]());\n }\n return Dirent_1.default.build(link, this.options.encoding);\n }\n } while (!done);\n return null;\n }\n close(callback) {\n // Promise-based close\n if (callback === undefined) {\n if (this.closed) {\n return Promise.reject(new errors.Error('ERR_DIR_CLOSED'));\n }\n return new Promise((resolve, reject) => {\n this.close(err => {\n if (err)\n reject(err);\n else\n resolve();\n });\n });\n }\n // Callback-based close\n (0, util_1.validateCallback)(callback);\n if (this.closed) {\n process.nextTick(callback, new errors.Error('ERR_DIR_CLOSED'));\n return;\n }\n if (this.operationQueue !== null) {\n this.operationQueue.push(() => {\n this.close(callback);\n });\n return;\n }\n this.closed = true;\n try {\n this.closeBase();\n process.nextTick(callback);\n }\n catch (err) {\n process.nextTick(callback, err);\n }\n }\n closeSync() {\n if (this.closed) {\n throw new errors.Error('ERR_DIR_CLOSED');\n }\n if (this.operationQueue !== null) {\n throw new errors.Error('ERR_DIR_CONCURRENT_OPERATION');\n }\n this.closed = true;\n this.closeBase();\n }\n read(callback) {\n // Promise-based read\n if (callback === undefined) {\n return new Promise((resolve, reject) => {\n this.read((err, result) => {\n if (err)\n reject(err);\n else\n resolve(result ?? null);\n });\n });\n }\n // Callback-based read\n (0, util_1.validateCallback)(callback);\n if (this.closed) {\n process.nextTick(callback, new errors.Error('ERR_DIR_CLOSED'));\n return;\n }\n if (this.operationQueue !== null) {\n this.operationQueue.push(() => {\n this.read(callback);\n });\n return;\n }\n this.operationQueue = [];\n try {\n const result = this.readBase(this.iteratorInfo);\n process.nextTick(() => {\n const queue = this.operationQueue;\n this.operationQueue = null;\n for (const op of queue)\n op();\n callback(null, result);\n });\n }\n catch (err) {\n process.nextTick(() => {\n const queue = this.operationQueue;\n this.operationQueue = null;\n for (const op of queue)\n op();\n callback(err);\n });\n }\n }\n readSync() {\n if (this.closed) {\n throw new errors.Error('ERR_DIR_CLOSED');\n }\n if (this.operationQueue !== null) {\n throw new errors.Error('ERR_DIR_CONCURRENT_OPERATION');\n }\n return this.readBase(this.iteratorInfo);\n }\n [Symbol.asyncIterator]() {\n return {\n next: async () => {\n try {\n const dirEnt = await this.read();\n if (dirEnt !== null) {\n return { done: false, value: dirEnt };\n }\n else {\n return { done: true, value: undefined };\n }\n }\n catch (err) {\n throw err;\n }\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n };\n }\n}\nexports.Dir = Dir;\n//# sourceMappingURL=Dir.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Dirent = void 0;\nconst constants_1 = require(\"../constants\");\nconst encoding_1 = require(\"../encoding\");\nconst { S_IFMT, S_IFDIR, S_IFREG, S_IFBLK, S_IFCHR, S_IFLNK, S_IFIFO, S_IFSOCK } = constants_1.constants;\n/**\n * A directory entry, like `fs.Dirent`.\n */\nclass Dirent {\n constructor() {\n this.name = '';\n this.path = '';\n this.parentPath = '';\n this.mode = 0;\n }\n static build(link, encoding) {\n const dirent = new Dirent();\n const { mode } = link.getNode();\n dirent.name = (0, encoding_1.strToEncoding)(link.getName(), encoding);\n dirent.mode = mode;\n dirent.path = link.getParentPath();\n dirent.parentPath = dirent.path;\n return dirent;\n }\n _checkModeProperty(property) {\n return (this.mode & S_IFMT) === property;\n }\n isDirectory() {\n return this._checkModeProperty(S_IFDIR);\n }\n isFile() {\n return this._checkModeProperty(S_IFREG);\n }\n isBlockDevice() {\n return this._checkModeProperty(S_IFBLK);\n }\n isCharacterDevice() {\n return this._checkModeProperty(S_IFCHR);\n }\n isSymbolicLink() {\n return this._checkModeProperty(S_IFLNK);\n }\n isFIFO() {\n return this._checkModeProperty(S_IFIFO);\n }\n isSocket() {\n return this._checkModeProperty(S_IFSOCK);\n }\n}\nexports.Dirent = Dirent;\nexports.default = Dirent;\n//# sourceMappingURL=Dirent.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FileHandle = void 0;\nconst util_1 = require(\"./util\");\nconst events_1 = require(\"../vendor/node/events\");\nclass FileHandle extends events_1.EventEmitter {\n constructor(fs, fd) {\n super();\n this.refs = 1;\n this.closePromise = null;\n this.position = 0;\n this.readableWebStreamLocked = false;\n this.fs = fs;\n this.fd = fd;\n }\n getAsyncId() {\n // Return a unique async ID for this file handle\n // In a real implementation, this would be provided by the underlying system\n return this.fd;\n }\n appendFile(data, options) {\n return (0, util_1.promisify)(this.fs, 'appendFile')(this.fd, data, options);\n }\n chmod(mode) {\n return (0, util_1.promisify)(this.fs, 'fchmod')(this.fd, mode);\n }\n chown(uid, gid) {\n return (0, util_1.promisify)(this.fs, 'fchown')(this.fd, uid, gid);\n }\n close() {\n if (this.fd === -1) {\n return Promise.resolve();\n }\n if (this.closePromise) {\n return this.closePromise;\n }\n this.refs--;\n if (this.refs === 0) {\n const currentFd = this.fd;\n this.fd = -1;\n this.closePromise = (0, util_1.promisify)(this.fs, 'close')(currentFd).finally(() => {\n this.closePromise = null;\n });\n }\n else {\n this.closePromise = new Promise((resolve, reject) => {\n this.closeResolve = resolve;\n this.closeReject = reject;\n }).finally(() => {\n this.closePromise = null;\n this.closeReject = undefined;\n this.closeResolve = undefined;\n });\n }\n this.emit('close');\n return this.closePromise;\n }\n datasync() {\n return (0, util_1.promisify)(this.fs, 'fdatasync')(this.fd);\n }\n createReadStream(options) {\n return this.fs.createReadStream('', { ...options, fd: this });\n }\n createWriteStream(options) {\n return this.fs.createWriteStream('', { ...options, fd: this });\n }\n readableWebStream(options = {}) {\n const { type = 'bytes', autoClose = false } = options;\n let position = 0;\n if (this.fd === -1) {\n throw new Error('The FileHandle is closed');\n }\n if (this.closePromise) {\n throw new Error('The FileHandle is closing');\n }\n if (this.readableWebStreamLocked) {\n throw new Error('An error will be thrown if this method is called more than once or is called after the FileHandle is closed or closing.');\n }\n this.readableWebStreamLocked = true;\n this.ref();\n const unlockAndCleanup = () => {\n this.readableWebStreamLocked = false;\n this.unref();\n if (autoClose) {\n this.close().catch(() => {\n // Ignore close errors in cleanup\n });\n }\n };\n return new ReadableStream({\n type: type === 'bytes' ? 'bytes' : undefined,\n autoAllocateChunkSize: 16384,\n pull: async (controller) => {\n try {\n const view = controller.byobRequest?.view;\n if (!view) {\n // Fallback for when BYOB is not available\n const buffer = new Uint8Array(16384);\n const result = await this.read(buffer, 0, buffer.length, position);\n if (result.bytesRead === 0) {\n controller.close();\n unlockAndCleanup();\n return;\n }\n position += result.bytesRead;\n controller.enqueue(buffer.slice(0, result.bytesRead));\n return;\n }\n const result = await this.read(view, view.byteOffset, view.byteLength, position);\n if (result.bytesRead === 0) {\n controller.close();\n unlockAndCleanup();\n return;\n }\n position += result.bytesRead;\n controller.byobRequest.respond(result.bytesRead);\n }\n catch (error) {\n controller.error(error);\n unlockAndCleanup();\n }\n },\n cancel: async () => {\n unlockAndCleanup();\n },\n });\n }\n async read(buffer, offset, length, position) {\n const readPosition = position !== null && position !== undefined ? position : this.position;\n const result = await (0, util_1.promisify)(this.fs, 'read', bytesRead => ({ bytesRead, buffer }))(this.fd, buffer, offset, length, readPosition);\n // Update internal position only if position was null/undefined\n if (position === null || position === undefined) {\n this.position += result.bytesRead;\n }\n return result;\n }\n readv(buffers, position) {\n return (0, util_1.promisify)(this.fs, 'readv', bytesRead => ({ bytesRead, buffers }))(this.fd, buffers, position);\n }\n readFile(options) {\n return (0, util_1.promisify)(this.fs, 'readFile')(this.fd, options);\n }\n stat(options) {\n return (0, util_1.promisify)(this.fs, 'fstat')(this.fd, options);\n }\n sync() {\n return (0, util_1.promisify)(this.fs, 'fsync')(this.fd);\n }\n truncate(len) {\n return (0, util_1.promisify)(this.fs, 'ftruncate')(this.fd, len);\n }\n utimes(atime, mtime) {\n return (0, util_1.promisify)(this.fs, 'futimes')(this.fd, atime, mtime);\n }\n async write(buffer, offset, length, position) {\n const useInternalPosition = typeof position !== 'number';\n const writePosition = useInternalPosition ? this.position : position;\n const result = await (0, util_1.promisify)(this.fs, 'write', bytesWritten => ({ bytesWritten, buffer }))(this.fd, buffer, offset, length, writePosition);\n // Update internal position only if position was null/undefined\n if (useInternalPosition) {\n this.position += result.bytesWritten;\n }\n return result;\n }\n writev(buffers, position) {\n return (0, util_1.promisify)(this.fs, 'writev', bytesWritten => ({ bytesWritten, buffers }))(this.fd, buffers, position);\n }\n writeFile(data, options) {\n return (0, util_1.promisify)(this.fs, 'writeFile')(this.fd, data, options);\n }\n // Implement Symbol.asyncDispose if available (ES2023+)\n async [Symbol.asyncDispose]() {\n await this.close();\n }\n ref() {\n this.refs++;\n }\n unref() {\n this.refs--;\n if (this.refs === 0) {\n this.fd = -1;\n if (this.closeResolve) {\n (0, util_1.promisify)(this.fs, 'close')(this.fd).then(this.closeResolve, this.closeReject);\n }\n }\n }\n}\nexports.FileHandle = FileHandle;\n//# sourceMappingURL=FileHandle.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FsPromises = void 0;\nconst util_1 = require(\"./util\");\nconst constants_1 = require(\"../constants\");\n// AsyncIterator implementation for promises.watch\nclass FSWatchAsyncIterator {\n constructor(fs, path, options = {}) {\n this.fs = fs;\n this.path = path;\n this.options = options;\n this.eventQueue = [];\n this.resolveQueue = [];\n this.finished = false;\n this.maxQueue = options.maxQueue || 2048;\n this.overflow = options.overflow || 'ignore';\n this.startWatching();\n // Handle AbortSignal\n if (options.signal) {\n if (options.signal.aborted) {\n this.finish();\n return;\n }\n options.signal.addEventListener('abort', () => {\n this.finish();\n });\n }\n }\n startWatching() {\n try {\n this.watcher = this.fs.watch(this.path, this.options, (eventType, filename) => {\n this.enqueueEvent({ eventType, filename });\n });\n }\n catch (error) {\n // If we can't start watching, finish immediately\n this.finish();\n throw error;\n }\n }\n enqueueEvent(event) {\n if (this.finished)\n return;\n // Handle queue overflow\n if (this.eventQueue.length >= this.maxQueue) {\n if (this.overflow === 'throw') {\n const error = new Error(`Watch queue overflow: more than ${this.maxQueue} events queued`);\n this.finish(error);\n return;\n }\n else {\n // 'ignore' - drop the oldest event\n this.eventQueue.shift();\n console.warn(`Watch queue overflow: dropping event due to exceeding maxQueue of ${this.maxQueue}`);\n }\n }\n this.eventQueue.push(event);\n // If there's a waiting promise, resolve it\n if (this.resolveQueue.length > 0) {\n const { resolve } = this.resolveQueue.shift();\n const nextEvent = this.eventQueue.shift();\n resolve({ value: nextEvent, done: false });\n }\n }\n finish(error) {\n if (this.finished)\n return;\n this.finished = true;\n if (this.watcher) {\n this.watcher.close();\n this.watcher = null;\n }\n // Resolve or reject all pending promises\n while (this.resolveQueue.length > 0) {\n const { resolve, reject } = this.resolveQueue.shift();\n if (error) {\n reject(error);\n }\n else {\n resolve({ value: undefined, done: true });\n }\n }\n }\n async next() {\n if (this.finished) {\n return { value: undefined, done: true };\n }\n // If we have queued events, return one\n if (this.eventQueue.length > 0) {\n const event = this.eventQueue.shift();\n return { value: event, done: false };\n }\n // Otherwise, wait for the next event\n return new Promise((resolve, reject) => {\n this.resolveQueue.push({ resolve, reject });\n });\n }\n async return() {\n this.finish();\n return { value: undefined, done: true };\n }\n async throw(error) {\n this.finish(error);\n throw error;\n }\n [Symbol.asyncIterator]() {\n return this;\n }\n}\nclass FsPromises {\n constructor(fs, FileHandle) {\n this.fs = fs;\n this.FileHandle = FileHandle;\n this.constants = constants_1.constants;\n this.cp = (0, util_1.promisify)(this.fs, 'cp');\n this.opendir = (0, util_1.promisify)(this.fs, 'opendir');\n this.statfs = (0, util_1.promisify)(this.fs, 'statfs');\n this.lutimes = (0, util_1.promisify)(this.fs, 'lutimes');\n this.glob = (0, util_1.promisify)(this.fs, 'glob');\n this.access = (0, util_1.promisify)(this.fs, 'access');\n this.chmod = (0, util_1.promisify)(this.fs, 'chmod');\n this.chown = (0, util_1.promisify)(this.fs, 'chown');\n this.copyFile = (0, util_1.promisify)(this.fs, 'copyFile');\n this.lchmod = (0, util_1.promisify)(this.fs, 'lchmod');\n this.lchown = (0, util_1.promisify)(this.fs, 'lchown');\n this.link = (0, util_1.promisify)(this.fs, 'link');\n this.lstat = (0, util_1.promisify)(this.fs, 'lstat');\n this.mkdir = (0, util_1.promisify)(this.fs, 'mkdir');\n this.mkdtemp = (0, util_1.promisify)(this.fs, 'mkdtemp');\n this.readdir = (0, util_1.promisify)(this.fs, 'readdir');\n this.readlink = (0, util_1.promisify)(this.fs, 'readlink');\n this.realpath = (0, util_1.promisify)(this.fs, 'realpath');\n this.rename = (0, util_1.promisify)(this.fs, 'rename');\n this.rmdir = (0, util_1.promisify)(this.fs, 'rmdir');\n this.rm = (0, util_1.promisify)(this.fs, 'rm');\n this.stat = (0, util_1.promisify)(this.fs, 'stat');\n this.symlink = (0, util_1.promisify)(this.fs, 'symlink');\n this.truncate = (0, util_1.promisify)(this.fs, 'truncate');\n this.unlink = (0, util_1.promisify)(this.fs, 'unlink');\n this.utimes = (0, util_1.promisify)(this.fs, 'utimes');\n this.readFile = (id, options) => {\n return (0, util_1.promisify)(this.fs, 'readFile')(id instanceof this.FileHandle ? id.fd : id, options);\n };\n this.appendFile = (path, data, options) => {\n return (0, util_1.promisify)(this.fs, 'appendFile')(path instanceof this.FileHandle ? path.fd : path, data, options);\n };\n this.open = (path, flags = 'r', mode) => {\n return (0, util_1.promisify)(this.fs, 'open', fd => new this.FileHandle(this.fs, fd))(path, flags, mode);\n };\n this.writeFile = (id, data, options) => {\n const dataPromise = (0, util_1.isReadableStream)(data) ? (0, util_1.streamToBuffer)(data) : Promise.resolve(data);\n return dataPromise.then(data => (0, util_1.promisify)(this.fs, 'writeFile')(id instanceof this.FileHandle ? id.fd : id, data, options));\n };\n this.watch = (filename, options) => {\n const watchOptions = typeof options === 'string' ? { encoding: options } : options || {};\n return new FSWatchAsyncIterator(this.fs, filename, watchOptions);\n };\n }\n}\nexports.FsPromises = FsPromises;\n//# sourceMappingURL=FsPromises.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StatFs = void 0;\n/**\n * Statistics about a file system, like `fs.StatFs`.\n */\nclass StatFs {\n static build(superblock, bigint = false) {\n const statfs = new StatFs();\n const getStatNumber = !bigint ? number => number : number => BigInt(number);\n // For in-memory filesystem, provide mock but reasonable values\n // Magic number for in-memory filesystem type (similar to ramfs)\n statfs.type = getStatNumber(0x858458f6);\n // Optimal transfer block size - commonly 4096 bytes\n statfs.bsize = getStatNumber(4096);\n // Calculate filesystem stats based on current state\n const totalInodes = Object.keys(superblock.inodes).length;\n // Mock large filesystem capacity (appears as a large filesystem to applications)\n const totalBlocks = 1000000;\n const usedBlocks = Math.min(totalInodes * 2, totalBlocks); // Rough estimation\n const freeBlocks = totalBlocks - usedBlocks;\n statfs.blocks = getStatNumber(totalBlocks); // Total data blocks\n statfs.bfree = getStatNumber(freeBlocks); // Free blocks in file system\n statfs.bavail = getStatNumber(freeBlocks); // Free blocks available to unprivileged users\n // File node statistics\n const maxFiles = 1000000; // Mock large number of available inodes\n statfs.files = getStatNumber(maxFiles); // Total file nodes in file system\n statfs.ffree = getStatNumber(maxFiles - totalInodes); // Free file nodes\n return statfs;\n }\n}\nexports.StatFs = StatFs;\nexports.default = StatFs;\n//# sourceMappingURL=StatFs.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Stats = void 0;\nconst constants_1 = require(\"../constants\");\nconst { S_IFMT, S_IFDIR, S_IFREG, S_IFBLK, S_IFCHR, S_IFLNK, S_IFIFO, S_IFSOCK } = constants_1.constants;\n/**\n * Statistics about a file/directory, like `fs.Stats`.\n */\nclass Stats {\n static build(node, bigint = false) {\n const stats = new Stats();\n const { uid, gid, atime, mtime, ctime } = node;\n const getStatNumber = !bigint ? number => number : number => BigInt(number);\n // Copy all values on Stats from Node, so that if Node values\n // change, values on Stats would still be the old ones,\n // just like in Node fs.\n stats.uid = getStatNumber(uid);\n stats.gid = getStatNumber(gid);\n stats.rdev = getStatNumber(node.rdev);\n stats.blksize = getStatNumber(4096);\n stats.ino = getStatNumber(node.ino);\n stats.size = getStatNumber(node.getSize());\n stats.blocks = getStatNumber(1);\n stats.atime = atime;\n stats.mtime = mtime;\n stats.ctime = ctime;\n stats.birthtime = ctime;\n stats.atimeMs = getStatNumber(atime.getTime());\n stats.mtimeMs = getStatNumber(mtime.getTime());\n const ctimeMs = getStatNumber(ctime.getTime());\n stats.ctimeMs = ctimeMs;\n stats.birthtimeMs = ctimeMs;\n if (bigint) {\n stats.atimeNs = BigInt(atime.getTime()) * BigInt(1000000);\n stats.mtimeNs = BigInt(mtime.getTime()) * BigInt(1000000);\n const ctimeNs = BigInt(ctime.getTime()) * BigInt(1000000);\n stats.ctimeNs = ctimeNs;\n stats.birthtimeNs = ctimeNs;\n }\n stats.dev = getStatNumber(0);\n stats.mode = getStatNumber(node.mode);\n stats.nlink = getStatNumber(node.nlink);\n return stats;\n }\n _checkModeProperty(property) {\n return (Number(this.mode) & S_IFMT) === property;\n }\n isDirectory() {\n return this._checkModeProperty(S_IFDIR);\n }\n isFile() {\n return this._checkModeProperty(S_IFREG);\n }\n isBlockDevice() {\n return this._checkModeProperty(S_IFBLK);\n }\n isCharacterDevice() {\n return this._checkModeProperty(S_IFCHR);\n }\n isSymbolicLink() {\n return this._checkModeProperty(S_IFLNK);\n }\n isFIFO() {\n return this._checkModeProperty(S_IFIFO);\n }\n isSocket() {\n return this._checkModeProperty(S_IFSOCK);\n }\n}\nexports.Stats = Stats;\nexports.default = Stats;\n//# sourceMappingURL=Stats.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FLAGS = exports.ERRSTR = void 0;\nconst constants_1 = require(\"../constants\");\nexports.ERRSTR = {\n PATH_STR: 'path must be a string, Buffer, or Uint8Array',\n // FD: 'file descriptor must be a unsigned 32-bit integer',\n FD: 'fd must be a file descriptor',\n MODE_INT: 'mode must be an int',\n CB: 'callback must be a function',\n UID: 'uid must be an unsigned int',\n GID: 'gid must be an unsigned int',\n LEN: 'len must be an integer',\n ATIME: 'atime must be an integer',\n MTIME: 'mtime must be an integer',\n PREFIX: 'filename prefix is required',\n BUFFER: 'buffer must be an instance of Buffer or StaticBuffer',\n OFFSET: 'offset must be an integer',\n LENGTH: 'length must be an integer',\n POSITION: 'position must be an integer',\n};\nconst { O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_EXCL, O_TRUNC, O_APPEND, O_SYNC } = constants_1.constants;\n// List of file `flags` as defined by Node.\nvar FLAGS;\n(function (FLAGS) {\n // Open file for reading. An exception occurs if the file does not exist.\n FLAGS[FLAGS[\"r\"] = O_RDONLY] = \"r\";\n // Open file for reading and writing. An exception occurs if the file does not exist.\n FLAGS[FLAGS[\"r+\"] = O_RDWR] = \"r+\";\n // Open file for reading in synchronous mode. Instructs the operating system to bypass the local file system cache.\n FLAGS[FLAGS[\"rs\"] = O_RDONLY | O_SYNC] = \"rs\";\n FLAGS[FLAGS[\"sr\"] = FLAGS.rs] = \"sr\";\n // Open file for reading and writing, telling the OS to open it synchronously. See notes for 'rs' about using this with caution.\n FLAGS[FLAGS[\"rs+\"] = O_RDWR | O_SYNC] = \"rs+\";\n FLAGS[FLAGS[\"sr+\"] = FLAGS['rs+']] = \"sr+\";\n // Open file for writing. The file is created (if it does not exist) or truncated (if it exists).\n FLAGS[FLAGS[\"w\"] = O_WRONLY | O_CREAT | O_TRUNC] = \"w\";\n // Like 'w' but fails if path exists.\n FLAGS[FLAGS[\"wx\"] = O_WRONLY | O_CREAT | O_TRUNC | O_EXCL] = \"wx\";\n FLAGS[FLAGS[\"xw\"] = FLAGS.wx] = \"xw\";\n // Open file for reading and writing. The file is created (if it does not exist) or truncated (if it exists).\n FLAGS[FLAGS[\"w+\"] = O_RDWR | O_CREAT | O_TRUNC] = \"w+\";\n // Like 'w+' but fails if path exists.\n FLAGS[FLAGS[\"wx+\"] = O_RDWR | O_CREAT | O_TRUNC | O_EXCL] = \"wx+\";\n FLAGS[FLAGS[\"xw+\"] = FLAGS['wx+']] = \"xw+\";\n // Open file for appending. The file is created if it does not exist.\n FLAGS[FLAGS[\"a\"] = O_WRONLY | O_APPEND | O_CREAT] = \"a\";\n // Like 'a' but fails if path exists.\n FLAGS[FLAGS[\"ax\"] = O_WRONLY | O_APPEND | O_CREAT | O_EXCL] = \"ax\";\n FLAGS[FLAGS[\"xa\"] = FLAGS.ax] = \"xa\";\n // Open file for reading and appending. The file is created if it does not exist.\n FLAGS[FLAGS[\"a+\"] = O_RDWR | O_APPEND | O_CREAT] = \"a+\";\n // Like 'a+' but fails if path exists.\n FLAGS[FLAGS[\"ax+\"] = O_RDWR | O_APPEND | O_CREAT | O_EXCL] = \"ax+\";\n FLAGS[FLAGS[\"xa+\"] = FLAGS['ax+']] = \"xa+\";\n})(FLAGS || (exports.FLAGS = FLAGS = {}));\n//# sourceMappingURL=constants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.globSync = globSync;\nconst path_1 = require(\"../vendor/node/path\");\nconst glob_to_regex_js_1 = require(\"glob-to-regex.js\");\nconst util_1 = require(\"./util\");\nconst pathJoin = path_1.posix.join;\nconst pathRelative = path_1.posix.relative;\nconst pathResolve = path_1.posix.resolve;\n/**\n * Check if a path matches a glob pattern\n */\nfunction matchesPattern(path, pattern) {\n const regex = (0, glob_to_regex_js_1.toRegex)(pattern);\n return regex.test(path);\n}\n/**\n * Check if a path should be excluded based on exclude patterns\n */\nfunction isExcluded(path, exclude) {\n if (!exclude)\n return false;\n if (typeof exclude === 'function') {\n return exclude(path);\n }\n const patterns = Array.isArray(exclude) ? exclude : [exclude];\n return patterns.some(pattern => matchesPattern(path, pattern));\n}\n/**\n * Walk directory tree and collect matching paths\n */\nfunction walkDirectory(fs, dir, patterns, options, currentDepth = 0) {\n const results = [];\n const maxDepth = options.maxdepth ?? Infinity;\n const baseCwd = options.cwd ? (0, util_1.pathToFilename)(options.cwd) : process.cwd();\n if (currentDepth > maxDepth) {\n return results;\n }\n try {\n const entries = fs.readdirSync(dir, { withFileTypes: true });\n for (const entry of entries) {\n const fullPath = pathJoin(dir, entry.name.toString());\n const relativePath = pathRelative(baseCwd, fullPath);\n // Skip if excluded\n if (isExcluded(relativePath, options.exclude)) {\n continue;\n }\n // Check if this path matches any pattern\n const matches = patterns.some(pattern => matchesPattern(relativePath, pattern));\n if (matches) {\n results.push(relativePath);\n }\n // Recurse into directories\n if (entry.isDirectory() && currentDepth < maxDepth) {\n const subResults = walkDirectory(fs, fullPath, patterns, options, currentDepth + 1);\n results.push(...subResults);\n }\n }\n }\n catch (err) {\n // Skip directories we can't read\n }\n return results;\n}\n/**\n * Main glob implementation\n */\nfunction globSync(fs, pattern, options = {}) {\n const cwd = options.cwd ? (0, util_1.pathToFilename)(options.cwd) : process.cwd();\n const resolvedCwd = pathResolve(cwd);\n const globOptions = {\n cwd: resolvedCwd,\n exclude: options.exclude,\n maxdepth: options.maxdepth,\n withFileTypes: options.withFileTypes || false,\n };\n let results = [];\n // Handle absolute patterns\n if (path_1.posix.isAbsolute(pattern)) {\n const dir = path_1.posix.dirname(pattern);\n const patternBasename = path_1.posix.basename(pattern);\n const dirResults = walkDirectory(fs, dir, [patternBasename], { ...globOptions, cwd: dir });\n results.push(...dirResults.map(r => path_1.posix.resolve(dir, r)));\n }\n else {\n // Handle relative patterns\n const dirResults = walkDirectory(fs, resolvedCwd, [pattern], globOptions);\n results.push(...dirResults);\n }\n // Remove duplicates and sort\n results = [...new Set(results)].sort();\n return results;\n}\n//# sourceMappingURL=glob.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fsCallbackApiList = void 0;\nexports.fsCallbackApiList = [\n 'access',\n 'appendFile',\n 'chmod',\n 'chown',\n 'close',\n 'copyFile',\n 'cp',\n 'createReadStream',\n 'createWriteStream',\n 'exists',\n 'fchmod',\n 'fchown',\n 'fdatasync',\n 'fstat',\n 'fsync',\n 'ftruncate',\n 'futimes',\n 'lchmod',\n 'lchown',\n 'link',\n 'lstat',\n 'mkdir',\n 'mkdtemp',\n 'open',\n 'openAsBlob',\n 'opendir',\n 'read',\n 'readv',\n 'readdir',\n 'readFile',\n 'readlink',\n 'realpath',\n 'rename',\n 'rm',\n 'rmdir',\n 'stat',\n 'statfs',\n 'symlink',\n 'truncate',\n 'unlink',\n 'unwatchFile',\n 'utimes',\n 'lutimes',\n 'watch',\n 'watchFile',\n 'write',\n 'writev',\n 'writeFile',\n];\n//# sourceMappingURL=fsCallbackApiList.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fsSynchronousApiList = void 0;\nexports.fsSynchronousApiList = [\n 'accessSync',\n 'appendFileSync',\n 'chmodSync',\n 'chownSync',\n 'closeSync',\n 'copyFileSync',\n 'existsSync',\n 'fchmodSync',\n 'fchownSync',\n 'fdatasyncSync',\n 'fstatSync',\n 'fsyncSync',\n 'ftruncateSync',\n 'futimesSync',\n 'lchmodSync',\n 'lchownSync',\n 'linkSync',\n 'lstatSync',\n 'mkdirSync',\n 'mkdtempSync',\n 'openSync',\n 'opendirSync',\n 'readdirSync',\n 'readFileSync',\n 'readlinkSync',\n 'readSync',\n 'readvSync',\n 'realpathSync',\n 'renameSync',\n 'rmdirSync',\n 'rmSync',\n 'statSync',\n 'symlinkSync',\n 'truncateSync',\n 'unlinkSync',\n 'utimesSync',\n 'lutimesSync',\n 'writeFileSync',\n 'writeSync',\n 'writevSync',\n // 'cpSync',\n // 'statfsSync',\n];\n//# sourceMappingURL=fsSynchronousApiList.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getWriteFileOptions = exports.writeFileDefaults = exports.getRealpathOptsAndCb = exports.getRealpathOptions = exports.getStatfsOptsAndCb = exports.getStatfsOptions = exports.getStatOptsAndCb = exports.getStatOptions = exports.getAppendFileOptsAndCb = exports.getAppendFileOpts = exports.getOpendirOptsAndCb = exports.getOpendirOptions = exports.getReaddirOptsAndCb = exports.getReaddirOptions = exports.getReadFileOptions = exports.getRmOptsAndCb = exports.getRmdirOptions = exports.getDefaultOptsAndCb = exports.getDefaultOpts = exports.optsDefaults = exports.getMkdirOptions = void 0;\nexports.getOptions = getOptions;\nexports.optsGenerator = optsGenerator;\nexports.optsAndCbGenerator = optsAndCbGenerator;\nconst constants_1 = require(\"./constants\");\nconst encoding_1 = require(\"../encoding\");\nconst util_1 = require(\"./util\");\nconst mkdirDefaults = {\n mode: 511 /* MODE.DIR */,\n recursive: false,\n};\nconst getMkdirOptions = (options) => {\n if (typeof options === 'number')\n return Object.assign({}, mkdirDefaults, { mode: options });\n return Object.assign({}, mkdirDefaults, options);\n};\nexports.getMkdirOptions = getMkdirOptions;\nconst ERRSTR_OPTS = tipeof => `Expected options to be either an object or a string, but got ${tipeof} instead`;\nfunction getOptions(defaults, options) {\n let opts;\n if (!options)\n return defaults;\n else {\n const tipeof = typeof options;\n switch (tipeof) {\n case 'string':\n opts = Object.assign({}, defaults, { encoding: options });\n break;\n case 'object':\n opts = Object.assign({}, defaults, options);\n break;\n default:\n throw TypeError(ERRSTR_OPTS(tipeof));\n }\n }\n if (opts.encoding !== 'buffer')\n (0, encoding_1.assertEncoding)(opts.encoding);\n return opts;\n}\nfunction optsGenerator(defaults) {\n return options => getOptions(defaults, options);\n}\nfunction optsAndCbGenerator(getOpts) {\n return (options, callback) => typeof options === 'function' ? [getOpts(), options] : [getOpts(options), (0, util_1.validateCallback)(callback)];\n}\nexports.optsDefaults = {\n encoding: 'utf8',\n};\nexports.getDefaultOpts = optsGenerator(exports.optsDefaults);\nexports.getDefaultOptsAndCb = optsAndCbGenerator(exports.getDefaultOpts);\nconst rmdirDefaults = {\n recursive: false,\n};\nconst getRmdirOptions = (options) => {\n return Object.assign({}, rmdirDefaults, options);\n};\nexports.getRmdirOptions = getRmdirOptions;\nconst getRmOpts = optsGenerator(exports.optsDefaults);\nexports.getRmOptsAndCb = optsAndCbGenerator(getRmOpts);\nconst readFileOptsDefaults = {\n flag: 'r',\n};\nexports.getReadFileOptions = optsGenerator(readFileOptsDefaults);\nconst readdirDefaults = {\n encoding: 'utf8',\n recursive: false,\n withFileTypes: false,\n};\nexports.getReaddirOptions = optsGenerator(readdirDefaults);\nexports.getReaddirOptsAndCb = optsAndCbGenerator(exports.getReaddirOptions);\nconst opendirDefaults = {\n encoding: 'utf8',\n bufferSize: 32,\n recursive: false,\n};\nexports.getOpendirOptions = optsGenerator(opendirDefaults);\nexports.getOpendirOptsAndCb = optsAndCbGenerator(exports.getOpendirOptions);\nconst appendFileDefaults = {\n encoding: 'utf8',\n mode: 438 /* MODE.DEFAULT */,\n flag: constants_1.FLAGS[constants_1.FLAGS.a],\n};\nexports.getAppendFileOpts = optsGenerator(appendFileDefaults);\nexports.getAppendFileOptsAndCb = optsAndCbGenerator(exports.getAppendFileOpts);\nconst statDefaults = {\n bigint: false,\n};\nconst getStatOptions = (options = {}) => Object.assign({}, statDefaults, options);\nexports.getStatOptions = getStatOptions;\nconst getStatOptsAndCb = (options, callback) => typeof options === 'function' ? [(0, exports.getStatOptions)(), options] : [(0, exports.getStatOptions)(options), (0, util_1.validateCallback)(callback)];\nexports.getStatOptsAndCb = getStatOptsAndCb;\nconst statfsDefaults = {\n bigint: false,\n};\nconst getStatfsOptions = (options = {}) => Object.assign({}, statfsDefaults, options);\nexports.getStatfsOptions = getStatfsOptions;\nconst getStatfsOptsAndCb = (options, callback) => typeof options === 'function'\n ? [(0, exports.getStatfsOptions)(), options]\n : [(0, exports.getStatfsOptions)(options), (0, util_1.validateCallback)(callback)];\nexports.getStatfsOptsAndCb = getStatfsOptsAndCb;\nconst realpathDefaults = exports.optsDefaults;\nexports.getRealpathOptions = optsGenerator(realpathDefaults);\nexports.getRealpathOptsAndCb = optsAndCbGenerator(exports.getRealpathOptions);\nexports.writeFileDefaults = {\n encoding: 'utf8',\n mode: 438 /* MODE.DEFAULT */,\n flag: constants_1.FLAGS[constants_1.FLAGS.w],\n};\nexports.getWriteFileOptions = optsGenerator(exports.writeFileDefaults);\n//# sourceMappingURL=options.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getWriteSyncArgs = exports.getWriteArgs = exports.bufToUint8 = void 0;\nexports.promisify = promisify;\nexports.validateCallback = validateCallback;\nexports.modeToNumber = modeToNumber;\nexports.nullCheck = nullCheck;\nexports.pathToFilename = pathToFilename;\nexports.createError = createError;\nexports.genRndStr6 = genRndStr6;\nexports.flagsToNumber = flagsToNumber;\nexports.streamToBuffer = streamToBuffer;\nexports.bufferToEncoding = bufferToEncoding;\nexports.isReadableStream = isReadableStream;\nconst constants_1 = require(\"./constants\");\nconst errors = require(\"../vendor/node/internal/errors\");\nconst buffer_1 = require(\"../vendor/node/internal/buffer\");\nconst queueMicrotask_1 = require(\"../queueMicrotask\");\nconst util_1 = require(\"../core/util\");\nfunction promisify(fs, fn, getResult = input => input) {\n return (...args) => new Promise((resolve, reject) => {\n fs[fn].bind(fs)(...args, (error, result) => {\n if (error)\n return reject(error);\n return resolve(getResult(result));\n });\n });\n}\nfunction validateCallback(callback) {\n if (typeof callback !== 'function')\n throw TypeError(constants_1.ERRSTR.CB);\n return callback;\n}\nfunction _modeToNumber(mode, def) {\n if (typeof mode === 'number')\n return mode;\n if (typeof mode === 'string')\n return parseInt(mode, 8);\n if (def)\n return modeToNumber(def);\n return undefined;\n}\nfunction modeToNumber(mode, def) {\n const result = _modeToNumber(mode, def);\n if (typeof result !== 'number' || isNaN(result))\n throw new TypeError(constants_1.ERRSTR.MODE_INT);\n return result;\n}\nfunction nullCheck(path, callback) {\n if (('' + path).indexOf('\\u0000') !== -1) {\n const er = new Error('Path must be a string without null bytes');\n er.code = 'ENOENT';\n if (typeof callback !== 'function')\n throw er;\n (0, queueMicrotask_1.default)(() => {\n callback(er);\n });\n return false;\n }\n return true;\n}\nfunction getPathFromURLPosix(url) {\n if (url.hostname !== '') {\n throw new errors.TypeError('ERR_INVALID_FILE_URL_HOST', process.platform);\n }\n const pathname = url.pathname;\n for (let n = 0; n < pathname.length; n++) {\n if (pathname[n] === '%') {\n const third = pathname.codePointAt(n + 2) | 0x20;\n if (pathname[n + 1] === '2' && third === 102) {\n throw new errors.TypeError('ERR_INVALID_FILE_URL_PATH', 'must not include encoded / characters');\n }\n }\n }\n return decodeURIComponent(pathname);\n}\nfunction pathToFilename(path) {\n if (path instanceof Uint8Array) {\n path = (0, buffer_1.bufferFrom)(path);\n }\n if (typeof path !== 'string' && !buffer_1.Buffer.isBuffer(path)) {\n try {\n if (!(path instanceof require('url').URL))\n throw new TypeError(constants_1.ERRSTR.PATH_STR);\n }\n catch (err) {\n throw new TypeError(constants_1.ERRSTR.PATH_STR);\n }\n path = getPathFromURLPosix(path);\n }\n const pathString = String(path);\n nullCheck(pathString);\n // return slash(pathString);\n return pathString;\n}\nconst ENOENT = 'ENOENT';\nconst EBADF = 'EBADF';\nconst EINVAL = 'EINVAL';\nconst EPERM = 'EPERM';\nconst EPROTO = 'EPROTO';\nconst EEXIST = 'EEXIST';\nconst ENOTDIR = 'ENOTDIR';\nconst EMFILE = 'EMFILE';\nconst EACCES = 'EACCES';\nconst EISDIR = 'EISDIR';\nconst ENOTEMPTY = 'ENOTEMPTY';\nconst ENOSYS = 'ENOSYS';\nconst ERR_FS_EISDIR = 'ERR_FS_EISDIR';\nconst ERR_OUT_OF_RANGE = 'ERR_OUT_OF_RANGE';\nfunction formatError(errorCode, func = '', path = '', path2 = '') {\n let pathFormatted = '';\n if (path)\n pathFormatted = ` '${path}'`;\n if (path2)\n pathFormatted += ` -> '${path2}'`;\n switch (errorCode) {\n case ENOENT:\n return `ENOENT: no such file or directory, ${func}${pathFormatted}`;\n case EBADF:\n return `EBADF: bad file descriptor, ${func}${pathFormatted}`;\n case EINVAL:\n return `EINVAL: invalid argument, ${func}${pathFormatted}`;\n case EPERM:\n return `EPERM: operation not permitted, ${func}${pathFormatted}`;\n case EPROTO:\n return `EPROTO: protocol error, ${func}${pathFormatted}`;\n case EEXIST:\n return `EEXIST: file already exists, ${func}${pathFormatted}`;\n case ENOTDIR:\n return `ENOTDIR: not a directory, ${func}${pathFormatted}`;\n case EISDIR:\n return `EISDIR: illegal operation on a directory, ${func}${pathFormatted}`;\n case EACCES:\n return `EACCES: permission denied, ${func}${pathFormatted}`;\n case ENOTEMPTY:\n return `ENOTEMPTY: directory not empty, ${func}${pathFormatted}`;\n case EMFILE:\n return `EMFILE: too many open files, ${func}${pathFormatted}`;\n case ENOSYS:\n return `ENOSYS: function not implemented, ${func}${pathFormatted}`;\n case ERR_FS_EISDIR:\n return `[ERR_FS_EISDIR]: Path is a directory: ${func} returned EISDIR (is a directory) ${path}`;\n case ERR_OUT_OF_RANGE:\n return `[ERR_OUT_OF_RANGE]: value out of range, ${func}${pathFormatted}`;\n default:\n return `${errorCode}: error occurred, ${func}${pathFormatted}`;\n }\n}\nfunction createError(errorCode, func = '', path = '', path2 = '', Constructor = Error) {\n const error = new Constructor(formatError(errorCode, func, path, path2));\n error.code = errorCode;\n if (path) {\n error.path = path;\n }\n return error;\n}\nfunction genRndStr6() {\n return Math.random().toString(36).slice(2, 8).padEnd(6, '0');\n}\nfunction flagsToNumber(flags) {\n if (typeof flags === 'number')\n return flags;\n if (typeof flags === 'string') {\n const flagsNum = constants_1.FLAGS[flags];\n if (typeof flagsNum !== 'undefined')\n return flagsNum;\n }\n // throw new TypeError(formatError(ERRSTR_FLAG(flags)));\n throw new errors.TypeError('ERR_INVALID_OPT_VALUE', 'flags', flags);\n}\nfunction streamToBuffer(stream) {\n const chunks = [];\n return new Promise((resolve, reject) => {\n stream.on('data', chunk => chunks.push(chunk));\n stream.on('end', () => resolve(buffer_1.Buffer.concat(chunks)));\n stream.on('error', reject);\n });\n}\nconst bufToUint8 = (buf) => new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\nexports.bufToUint8 = bufToUint8;\nconst getWriteArgs = (fd, a, b, c, d, e) => {\n (0, util_1.validateFd)(fd);\n let offset = 0;\n let length;\n let position = null;\n let encoding;\n let callback;\n const tipa = typeof a;\n const tipb = typeof b;\n const tipc = typeof c;\n const tipd = typeof d;\n if (tipa !== 'string') {\n if (tipb === 'function') {\n callback = b;\n }\n else if (tipc === 'function') {\n offset = b | 0;\n callback = c;\n }\n else if (tipd === 'function') {\n offset = b | 0;\n length = c;\n callback = d;\n }\n else {\n offset = b | 0;\n length = c;\n position = d;\n callback = e;\n }\n }\n else {\n if (tipb === 'function') {\n callback = b;\n }\n else if (tipc === 'function') {\n position = b;\n callback = c;\n }\n else if (tipd === 'function') {\n position = b;\n encoding = c;\n callback = d;\n }\n }\n const buf = (0, util_1.dataToBuffer)(a, encoding);\n if (tipa !== 'string') {\n if (typeof length === 'undefined')\n length = buf.length;\n }\n else {\n offset = 0;\n length = buf.length;\n }\n const cb = validateCallback(callback);\n return [fd, tipa === 'string', buf, offset, length, position, cb];\n};\nexports.getWriteArgs = getWriteArgs;\nconst getWriteSyncArgs = (fd, a, b, c, d) => {\n (0, util_1.validateFd)(fd);\n let encoding;\n let offset;\n let length;\n let position;\n const isBuffer = typeof a !== 'string';\n if (isBuffer) {\n offset = (b || 0) | 0;\n length = c;\n position = d;\n }\n else {\n position = b;\n encoding = c;\n }\n const buf = (0, util_1.dataToBuffer)(a, encoding);\n if (isBuffer) {\n if (typeof length === 'undefined') {\n length = buf.length;\n }\n }\n else {\n offset = 0;\n length = buf.length;\n }\n return [fd, buf, offset || 0, length, position];\n};\nexports.getWriteSyncArgs = getWriteSyncArgs;\nfunction bufferToEncoding(buffer, encoding) {\n if (!encoding || encoding === 'buffer')\n return buffer;\n else\n return buffer.toString(encoding);\n}\nfunction isReadableStream(stream) {\n return (stream !== null &&\n typeof stream === 'object' &&\n typeof stream.pipe === 'function' &&\n typeof stream.on === 'function' &&\n stream.readable === true);\n}\n//# sourceMappingURL=util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FSWatcher = exports.StatWatcher = exports.Volume = void 0;\nexports.pathToSteps = pathToSteps;\nexports.dataToStr = dataToStr;\nexports.toUnixTimestamp = toUnixTimestamp;\nconst path_1 = require(\"../vendor/node/path\");\nconst core_1 = require(\"../core\");\nconst Stats_1 = require(\"./Stats\");\nconst Dirent_1 = require(\"./Dirent\");\nconst StatFs_1 = require(\"./StatFs\");\nconst buffer_1 = require(\"../vendor/node/internal/buffer\");\nconst queueMicrotask_1 = require(\"../queueMicrotask\");\nconst setTimeoutUnref_1 = require(\"../setTimeoutUnref\");\nconst stream_1 = require(\"../vendor/node/stream\");\nconst constants_1 = require(\"../constants\");\nconst events_1 = require(\"../vendor/node/events\");\nconst encoding_1 = require(\"../encoding\");\nconst FileHandle_1 = require(\"./FileHandle\");\nconst util_1 = require(\"../vendor/node/util\");\nconst FsPromises_1 = require(\"./FsPromises\");\nconst print_1 = require(\"../print\");\nconst constants_2 = require(\"./constants\");\nconst errors = require(\"../vendor/node/internal/errors\");\nconst options_1 = require(\"./options\");\nconst util_2 = require(\"./util\");\nconst Dir_1 = require(\"./Dir\");\nconst util_3 = require(\"../core/util\");\nconst resolveCrossPlatform = path_1.resolve;\nconst { O_SYMLINK, F_OK, R_OK, W_OK, X_OK, COPYFILE_EXCL, COPYFILE_FICLONE_FORCE } = constants_1.constants;\nconst pathSep = path_1.posix ? path_1.posix.sep : path_1.sep;\nconst pathRelative = path_1.posix ? path_1.posix.relative : path_1.relative;\nconst pathJoin = path_1.posix ? path_1.posix.join : path_1.join;\nconst pathDirname = path_1.posix ? path_1.posix.dirname : path_1.dirname;\nconst pathNormalize = path_1.posix ? path_1.posix.normalize : path_1.normalize;\n// ---------------------------------------- Constants\nconst kMinPoolSpace = 128;\n// ---------------------------------------- Utility functions\nfunction pathToSteps(path) {\n return (0, util_3.filenameToSteps)((0, util_2.pathToFilename)(path));\n}\nfunction dataToStr(data, encoding = encoding_1.ENCODING_UTF8) {\n if (buffer_1.Buffer.isBuffer(data))\n return data.toString(encoding);\n else if (data instanceof Uint8Array)\n return (0, buffer_1.bufferFrom)(data).toString(encoding);\n else\n return String(data);\n}\n// converts Date or number to a fractional UNIX timestamp\nfunction toUnixTimestamp(time) {\n // tslint:disable-next-line triple-equals\n if (typeof time === 'string' && +time == time) {\n return +time;\n }\n if (time instanceof Date) {\n return time.getTime() / 1000;\n }\n if (isFinite(time)) {\n if (time < 0) {\n return Date.now() / 1000;\n }\n return time;\n }\n throw new Error('Cannot parse time: ' + time);\n}\nfunction validateUid(uid) {\n if (typeof uid !== 'number')\n throw TypeError(constants_2.ERRSTR.UID);\n}\nfunction validateGid(gid) {\n if (typeof gid !== 'number')\n throw TypeError(constants_2.ERRSTR.GID);\n}\n/**\n * `Volume` represents a file system.\n */\nclass Volume {\n get promises() {\n if (this.promisesApi === null)\n throw new Error('Promise is not supported in this environment.');\n return this.promisesApi;\n }\n constructor(_core = new core_1.Superblock()) {\n this._core = _core;\n this.promisesApi = new FsPromises_1.FsPromises(this, FileHandle_1.FileHandle);\n this.openSync = (path, flags, mode = 438 /* MODE.DEFAULT */) => {\n // Validate (1) mode; (2) path; (3) flags - in that order.\n const modeNum = (0, util_2.modeToNumber)(mode);\n const fileName = (0, util_2.pathToFilename)(path);\n const flagsNum = (0, util_2.flagsToNumber)(flags);\n return this._core.open(fileName, flagsNum, modeNum, !(flagsNum & O_SYMLINK));\n };\n this.open = (path, flags, a, b) => {\n let mode = a;\n let callback = b;\n if (typeof a === 'function') {\n mode = 438 /* MODE.DEFAULT */;\n callback = a;\n }\n mode = mode || 438 /* MODE.DEFAULT */;\n const modeNum = (0, util_2.modeToNumber)(mode);\n const fileName = (0, util_2.pathToFilename)(path);\n const flagsNum = (0, util_2.flagsToNumber)(flags);\n this.wrapAsync(this._core.open, [fileName, flagsNum, modeNum, !(flagsNum & O_SYMLINK)], callback);\n };\n this.closeSync = (fd) => {\n this._core.close(fd);\n };\n this.close = (fd, callback) => {\n (0, util_3.validateFd)(fd);\n const file = this._core.getFileByFdOrThrow(fd, 'close');\n this.wrapAsync(this._core.close, [file.fd], callback);\n };\n this.readSync = (fd, buffer, offset, length, position) => {\n (0, util_3.validateFd)(fd);\n return this._core.read(fd, buffer, offset, length, position);\n };\n this.read = (fd, buffer, offset, length, position, callback) => {\n (0, util_2.validateCallback)(callback);\n if (length === 0) {\n // This `if` branch is from Node.js\n return (0, queueMicrotask_1.default)(() => {\n if (callback)\n callback(null, 0, buffer);\n });\n }\n Promise.resolve().then(() => {\n try {\n const bytes = this._core.read(fd, buffer, offset, length, position);\n callback(null, bytes, buffer);\n }\n catch (err) {\n callback(err);\n }\n });\n };\n this.readv = (fd, buffers, a, b) => {\n let position = a;\n let callback = b;\n if (typeof a === 'function')\n [position, callback] = [null, a];\n (0, util_2.validateCallback)(callback);\n Promise.resolve().then(() => {\n try {\n const bytes = this._core.readv(fd, buffers, position);\n callback(null, bytes, buffers);\n }\n catch (err) {\n callback(err);\n }\n });\n };\n this.readvSync = (fd, buffers, position) => {\n (0, util_3.validateFd)(fd);\n return this._core.readv(fd, buffers, position ?? null);\n };\n this._readfile = (id, flagsNum, encoding) => {\n let result;\n const isUserFd = typeof id === 'number';\n const userOwnsFd = isUserFd && (0, util_3.isFd)(id);\n let fd;\n if (userOwnsFd)\n fd = id;\n else {\n const filename = (0, util_2.pathToFilename)(id);\n // Check if original path had trailing slash (indicates directory intent)\n const originalPath = String(id);\n const hasTrailingSlash = originalPath.length > 1 && originalPath.endsWith('/');\n const link = this._core.getResolvedLinkOrThrow(filename, 'open');\n const node = link.getNode();\n if (node.isDirectory())\n throw (0, util_2.createError)(\"EISDIR\" /* ERROR_CODE.EISDIR */, 'open', link.getPath());\n // If path had trailing slash but resolved to a file, throw ENOTDIR\n if (hasTrailingSlash && node.isFile()) {\n throw (0, util_2.createError)(\"ENOTDIR\" /* ERROR_CODE.ENOTDIR */, 'open', originalPath);\n }\n fd = this.openSync(id, flagsNum);\n }\n try {\n result = (0, util_2.bufferToEncoding)(this._core.getFileByFdOrThrow(fd).getBuffer(), encoding);\n }\n finally {\n if (!userOwnsFd) {\n this.closeSync(fd);\n }\n }\n return result;\n };\n this.readFileSync = (file, options) => {\n const opts = (0, options_1.getReadFileOptions)(options);\n const flagsNum = (0, util_2.flagsToNumber)(opts.flag);\n return this._readfile(file, flagsNum, opts.encoding);\n };\n this.readFile = (id, a, b) => {\n const [opts, callback] = (0, options_1.optsAndCbGenerator)(options_1.getReadFileOptions)(a, b);\n const flagsNum = (0, util_2.flagsToNumber)(opts.flag);\n this.wrapAsync(this._readfile, [id, flagsNum, opts.encoding], callback);\n };\n this.writeSync = (fd, a, b, c, d) => {\n const [, buf, offset, length, position] = (0, util_2.getWriteSyncArgs)(fd, a, b, c, d);\n return this._write(fd, buf, offset, length, position);\n };\n this.write = (fd, a, b, c, d, e) => {\n const [, asStr, buf, offset, length, position, cb] = (0, util_2.getWriteArgs)(fd, a, b, c, d, e);\n Promise.resolve().then(() => {\n try {\n const bytes = this._write(fd, buf, offset, length, position);\n if (!asStr) {\n cb(null, bytes, buf);\n }\n else {\n cb(null, bytes, a);\n }\n }\n catch (err) {\n cb(err);\n }\n });\n };\n this.writev = (fd, buffers, a, b) => {\n let position = a;\n let callback = b;\n if (typeof a === 'function')\n [position, callback] = [null, a];\n (0, util_2.validateCallback)(callback);\n Promise.resolve().then(() => {\n try {\n const bytes = this.writevBase(fd, buffers, position);\n callback(null, bytes, buffers);\n }\n catch (err) {\n callback(err);\n }\n });\n };\n this.writevSync = (fd, buffers, position) => {\n (0, util_3.validateFd)(fd);\n return this.writevBase(fd, buffers, position ?? null);\n };\n this.writeFileSync = (id, data, options) => {\n const opts = (0, options_1.getWriteFileOptions)(options);\n const flagsNum = (0, util_2.flagsToNumber)(opts.flag);\n const modeNum = (0, util_2.modeToNumber)(opts.mode);\n const buf = (0, util_3.dataToBuffer)(data, opts.encoding);\n this._core.writeFile(id, buf, flagsNum, modeNum);\n };\n this.writeFile = (id, data, a, b) => {\n let options = a;\n let callback = b;\n if (typeof a === 'function')\n [options, callback] = [options_1.writeFileDefaults, a];\n const cb = (0, util_2.validateCallback)(callback);\n const opts = (0, options_1.getWriteFileOptions)(options);\n const flagsNum = (0, util_2.flagsToNumber)(opts.flag);\n const modeNum = (0, util_2.modeToNumber)(opts.mode);\n const buf = (0, util_3.dataToBuffer)(data, opts.encoding);\n this.wrapAsync(this._core.writeFile, [id, buf, flagsNum, modeNum], cb);\n };\n this.copyFileSync = (src, dest, flags) => {\n const srcFilename = (0, util_2.pathToFilename)(src);\n const destFilename = (0, util_2.pathToFilename)(dest);\n return this._copyFile(srcFilename, destFilename, (flags || 0) | 0);\n };\n this.copyFile = (src, dest, a, b) => {\n const srcFilename = (0, util_2.pathToFilename)(src);\n const destFilename = (0, util_2.pathToFilename)(dest);\n let flags;\n let callback;\n if (typeof a === 'function')\n [flags, callback] = [0, a];\n else\n [flags, callback] = [a, b];\n (0, util_2.validateCallback)(callback);\n this.wrapAsync(this._copyFile, [srcFilename, destFilename, flags], callback);\n };\n this._cp = (src, dest, options) => {\n if (options.filter && !options.filter(src, dest))\n return;\n const srcStat = options.dereference ? this.statSync(src) : this.lstatSync(src);\n let destStat = null;\n try {\n destStat = this.lstatSync(dest);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n throw err;\n }\n }\n // Check if src and dest are the same (both exist and have same inode)\n if (destStat && srcStat.ino === destStat.ino && srcStat.dev === destStat.dev)\n throw (0, util_2.createError)(\"EINVAL\" /* ERROR_CODE.EINVAL */, 'cp', src, dest);\n // Check type compatibility\n if (destStat) {\n if (srcStat.isDirectory() && !destStat.isDirectory())\n throw (0, util_2.createError)(\"EISDIR\" /* ERROR_CODE.EISDIR */, 'cp', src, dest);\n if (!srcStat.isDirectory() && destStat.isDirectory())\n throw (0, util_2.createError)(\"ENOTDIR\" /* ERROR_CODE.ENOTDIR */, 'cp', src, dest);\n }\n // Check if trying to copy directory to subdirectory of itself\n if (srcStat.isDirectory() && this.isSrcSubdir(src, dest))\n throw (0, util_2.createError)(\"EINVAL\" /* ERROR_CODE.EINVAL */, 'cp', src, dest);\n ENDURE_PARENT_DIR_EXISTS: {\n const parent = pathDirname(dest);\n if (!this.existsSync(parent))\n this.mkdirSync(parent, { recursive: true });\n }\n // Handle different file types\n if (srcStat.isDirectory()) {\n if (!options.recursive)\n throw (0, util_2.createError)(\"EISDIR\" /* ERROR_CODE.EISDIR */, 'cp', src);\n this.cpDirSync(srcStat, destStat, src, dest, options);\n }\n else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) {\n this.cpFileSync(srcStat, destStat, src, dest, options);\n }\n else if (srcStat.isSymbolicLink() && !options.dereference) {\n // Only handle as symlink if not dereferencing\n this.cpSymlinkSync(destStat, src, dest, options);\n }\n else {\n throw (0, util_2.createError)(\"EINVAL\" /* ERROR_CODE.EINVAL */, 'cp', src);\n }\n };\n this.linkSync = (existingPath, newPath) => {\n const existingPathFilename = (0, util_2.pathToFilename)(existingPath);\n const newPathFilename = (0, util_2.pathToFilename)(newPath);\n this._core.link(existingPathFilename, newPathFilename);\n };\n this.link = (existingPath, newPath, callback) => {\n const existingPathFilename = (0, util_2.pathToFilename)(existingPath);\n const newPathFilename = (0, util_2.pathToFilename)(newPath);\n this.wrapAsync(this._core.link, [existingPathFilename, newPathFilename], callback);\n };\n this.unlinkSync = (path) => {\n const filename = (0, util_2.pathToFilename)(path);\n this._core.unlink(filename);\n };\n this.unlink = (path, callback) => {\n const filename = (0, util_2.pathToFilename)(path);\n this.wrapAsync(this._core.unlink, [filename], callback);\n };\n /**\n * `type` argument works only on Windows.\n * @param target\n * @param path\n * @param type\n */\n this.symlinkSync = (target, path, type) => {\n const targetFilename = (0, util_2.pathToFilename)(target);\n const pathFilename = (0, util_2.pathToFilename)(path);\n this._core.symlink(targetFilename, pathFilename);\n };\n this.symlink = (target, path, a, b) => {\n const callback = (0, util_2.validateCallback)(typeof a === 'function' ? a : b);\n const targetFilename = (0, util_2.pathToFilename)(target);\n const pathFilename = (0, util_2.pathToFilename)(path);\n this.wrapAsync(this._core.symlink, [targetFilename, pathFilename], callback);\n };\n this._lstat = (filename, bigint = false, throwIfNoEntry = false) => {\n let link;\n try {\n link = this._core.getLinkOrThrow(filename, 'lstat');\n }\n catch (err) {\n if (err.code === \"ENOENT\" /* ERROR_CODE.ENOENT */ && !throwIfNoEntry)\n return undefined;\n else\n throw err;\n }\n return Stats_1.default.build(link.getNode(), bigint);\n };\n this.lstatSync = (path, options) => {\n const { throwIfNoEntry = true, bigint = false } = (0, options_1.getStatOptions)(options);\n return this._lstat((0, util_2.pathToFilename)(path), bigint, throwIfNoEntry);\n };\n this.renameSync = (oldPath, newPath) => {\n const oldPathFilename = (0, util_2.pathToFilename)(oldPath);\n const newPathFilename = (0, util_2.pathToFilename)(newPath);\n this._core.rename(oldPathFilename, newPathFilename);\n };\n this.rename = (oldPath, newPath, callback) => {\n const oldPathFilename = (0, util_2.pathToFilename)(oldPath);\n const newPathFilename = (0, util_2.pathToFilename)(newPath);\n this.wrapAsync(this._core.rename, [oldPathFilename, newPathFilename], callback);\n };\n this.existsSync = (path) => {\n try {\n return this._exists((0, util_2.pathToFilename)(path));\n }\n catch (err) {\n return false;\n }\n };\n this.exists = (path, callback) => {\n const filename = (0, util_2.pathToFilename)(path);\n if (typeof callback !== 'function')\n throw Error(constants_2.ERRSTR.CB);\n Promise.resolve().then(() => {\n try {\n callback(this._exists(filename));\n }\n catch (err) {\n callback(false);\n }\n });\n };\n this.accessSync = (path, mode = F_OK) => {\n const filename = (0, util_2.pathToFilename)(path);\n mode = mode | 0;\n this._access(filename, mode);\n };\n this.access = (path, a, b) => {\n let mode = F_OK;\n let callback;\n if (typeof a !== 'function')\n [mode, callback] = [a | 0, (0, util_2.validateCallback)(b)];\n else\n callback = a;\n const filename = (0, util_2.pathToFilename)(path);\n this.wrapAsync(this._access, [filename, mode], callback);\n };\n this.appendFileSync = (id, data, options) => {\n const opts = (0, options_1.getAppendFileOpts)(options);\n // Force append behavior when using a supplied file descriptor.\n if (!opts.flag || (0, util_3.isFd)(id))\n opts.flag = 'a';\n this.writeFileSync(id, data, opts);\n };\n this.appendFile = (id, data, a, b) => {\n const [opts, callback] = (0, options_1.getAppendFileOptsAndCb)(a, b);\n // Force append behavior when using a supplied file descriptor.\n if (!opts.flag || (0, util_3.isFd)(id))\n opts.flag = 'a';\n this.writeFile(id, data, opts, callback);\n };\n this._readdir = (filename, options) => {\n const steps = (0, util_3.filenameToSteps)(filename);\n const link = this._core.getResolvedLinkOrThrow(filename, 'scandir');\n const node = link.getNode();\n if (!node.isDirectory())\n throw (0, util_2.createError)(\"ENOTDIR\" /* ERROR_CODE.ENOTDIR */, 'scandir', filename);\n // Check we have permissions\n if (!node.canRead())\n throw (0, util_2.createError)(\"EACCES\" /* ERROR_CODE.EACCES */, 'scandir', filename);\n const list = []; // output list\n for (const name of link.children.keys()) {\n const child = link.getChild(name);\n if (!child || name === '.' || name === '..')\n continue;\n list.push(Dirent_1.default.build(child, options.encoding));\n // recursion\n if (options.recursive && child.children.size) {\n const recurseOptions = { ...options, recursive: true, withFileTypes: true };\n const childList = this._readdir(child.getPath(), recurseOptions);\n list.push(...childList);\n }\n }\n if (!util_3.isWin && options.encoding !== 'buffer')\n list.sort((a, b) => {\n if (a.name < b.name)\n return -1;\n if (a.name > b.name)\n return 1;\n return 0;\n });\n if (options.withFileTypes)\n return list;\n let filename2 = filename;\n if (util_3.isWin)\n filename2 = filename2.replace(/\\\\/g, '/');\n return list.map(dirent => {\n if (options.recursive) {\n let fullPath = pathJoin(dirent.parentPath, dirent.name.toString());\n if (util_3.isWin) {\n fullPath = fullPath.replace(/\\\\/g, '/');\n }\n return fullPath.replace(filename2 + path_1.posix.sep, '');\n }\n return dirent.name;\n });\n };\n this.readdirSync = (path, options) => {\n const opts = (0, options_1.getReaddirOptions)(options);\n const filename = (0, util_2.pathToFilename)(path);\n return this._readdir(filename, opts);\n };\n this.readdir = (path, a, b) => {\n const [options, callback] = (0, options_1.getReaddirOptsAndCb)(a, b);\n const filename = (0, util_2.pathToFilename)(path);\n this.wrapAsync(this._readdir, [filename, options], callback);\n };\n this._readlink = (filename, encoding) => {\n const link = this._core.getLinkOrThrow(filename, 'readlink');\n const node = link.getNode();\n if (!node.isSymlink())\n throw (0, util_2.createError)(\"EINVAL\" /* ERROR_CODE.EINVAL */, 'readlink', filename);\n return (0, encoding_1.strToEncoding)(node.symlink, encoding);\n };\n this.readlinkSync = (path, options) => {\n const opts = (0, options_1.getDefaultOpts)(options);\n const filename = (0, util_2.pathToFilename)(path);\n return this._readlink(filename, opts.encoding);\n };\n this.readlink = (path, a, b) => {\n const [opts, callback] = (0, options_1.getDefaultOptsAndCb)(a, b);\n const filename = (0, util_2.pathToFilename)(path);\n this.wrapAsync(this._readlink, [filename, opts.encoding], callback);\n };\n this._fsync = (fd) => {\n this._core.getFileByFdOrThrow(fd, 'fsync');\n };\n this.fsyncSync = (fd) => {\n this._fsync(fd);\n };\n this.fsync = (fd, callback) => {\n this.wrapAsync(this._fsync, [fd], callback);\n };\n this._fdatasync = (fd) => {\n this._core.getFileByFdOrThrow(fd, 'fdatasync');\n };\n this.fdatasyncSync = (fd) => {\n this._fdatasync(fd);\n };\n this.fdatasync = (fd, callback) => {\n this.wrapAsync(this._fdatasync, [fd], callback);\n };\n this._ftruncate = (fd, len) => {\n const file = this._core.getFileByFdOrThrow(fd, 'ftruncate');\n file.truncate(len);\n };\n this.ftruncateSync = (fd, len) => {\n this._ftruncate(fd, len);\n };\n this.ftruncate = (fd, a, b) => {\n const len = typeof a === 'number' ? a : 0;\n const callback = (0, util_2.validateCallback)(typeof a === 'number' ? b : a);\n this.wrapAsync(this._ftruncate, [fd, len], callback);\n };\n this._truncate = (path, len) => {\n const fd = this.openSync(path, 'r+');\n try {\n this.ftruncateSync(fd, len);\n }\n finally {\n this.closeSync(fd);\n }\n };\n /**\n * `id` should be a file descriptor or a path. `id` as file descriptor will\n * not be supported soon.\n */\n this.truncateSync = (id, len) => {\n if ((0, util_3.isFd)(id))\n return this.ftruncateSync(id, len);\n this._truncate(id, len);\n };\n this.truncate = (id, a, b) => {\n const len = typeof a === 'number' ? a : 0;\n const callback = (0, util_2.validateCallback)(typeof a === 'number' ? b : a);\n if ((0, util_3.isFd)(id))\n return this.ftruncate(id, len, callback);\n this.wrapAsync(this._truncate, [id, len], callback);\n };\n this._futimes = (fd, atime, mtime) => {\n const file = this._core.getFileByFdOrThrow(fd, 'futimes');\n const node = file.node;\n node.atime = new Date(atime * 1000);\n node.mtime = new Date(mtime * 1000);\n };\n this.futimesSync = (fd, atime, mtime) => {\n this._futimes(fd, toUnixTimestamp(atime), toUnixTimestamp(mtime));\n };\n this.futimes = (fd, atime, mtime, callback) => {\n this.wrapAsync(this._futimes, [fd, toUnixTimestamp(atime), toUnixTimestamp(mtime)], callback);\n };\n this._utimes = (filename, atime, mtime, followSymlinks = true) => {\n const core = this._core;\n const link = followSymlinks\n ? core.getResolvedLinkOrThrow(filename, 'utimes')\n : core.getLinkOrThrow(filename, 'lutimes');\n const node = link.getNode();\n node.atime = new Date(atime * 1000);\n node.mtime = new Date(mtime * 1000);\n };\n this.utimesSync = (path, atime, mtime) => {\n this._utimes((0, util_2.pathToFilename)(path), toUnixTimestamp(atime), toUnixTimestamp(mtime), true);\n };\n this.utimes = (path, atime, mtime, callback) => {\n this.wrapAsync(this._utimes, [(0, util_2.pathToFilename)(path), toUnixTimestamp(atime), toUnixTimestamp(mtime), true], callback);\n };\n this.lutimesSync = (path, atime, mtime) => {\n this._utimes((0, util_2.pathToFilename)(path), toUnixTimestamp(atime), toUnixTimestamp(mtime), false);\n };\n this.lutimes = (path, atime, mtime, callback) => {\n this.wrapAsync(this._utimes, [(0, util_2.pathToFilename)(path), toUnixTimestamp(atime), toUnixTimestamp(mtime), false], callback);\n };\n this.mkdirSync = (path, options) => {\n const opts = (0, options_1.getMkdirOptions)(options);\n const modeNum = (0, util_2.modeToNumber)(opts.mode, 0o777);\n const filename = (0, util_2.pathToFilename)(path);\n if (opts.recursive)\n return this._core.mkdirp(filename, modeNum);\n this._core.mkdir(filename, modeNum);\n };\n this.mkdir = (path, a, b) => {\n const opts = (0, options_1.getMkdirOptions)(a);\n const callback = (0, util_2.validateCallback)(typeof a === 'function' ? a : b);\n const modeNum = (0, util_2.modeToNumber)(opts.mode, 0o777);\n const filename = (0, util_2.pathToFilename)(path);\n if (opts.recursive)\n this.wrapAsync(this._core.mkdirp, [filename, modeNum], callback);\n else\n this.wrapAsync(this._core.mkdir, [filename, modeNum], callback);\n };\n this._mkdtemp = (prefix, encoding, retry = 5) => {\n const filename = prefix + (0, util_2.genRndStr6)();\n try {\n this._core.mkdir(filename, 511 /* MODE.DIR */);\n return (0, encoding_1.strToEncoding)(filename, encoding);\n }\n catch (err) {\n if (err.code === \"EEXIST\" /* ERROR_CODE.EEXIST */) {\n if (retry > 1)\n return this._mkdtemp(prefix, encoding, retry - 1);\n else\n throw Error('Could not create temp dir.');\n }\n else\n throw err;\n }\n };\n this.mkdtempSync = (prefix, options) => {\n const { encoding } = (0, options_1.getDefaultOpts)(options);\n if (!prefix || typeof prefix !== 'string')\n throw new TypeError('filename prefix is required');\n (0, util_2.nullCheck)(prefix);\n return this._mkdtemp(prefix, encoding);\n };\n this.mkdtemp = (prefix, a, b) => {\n const [{ encoding }, callback] = (0, options_1.getDefaultOptsAndCb)(a, b);\n if (!prefix || typeof prefix !== 'string')\n throw new TypeError('filename prefix is required');\n if (!(0, util_2.nullCheck)(prefix))\n return;\n this.wrapAsync(this._mkdtemp, [prefix, encoding], callback);\n };\n this.rmdirSync = (path, options) => {\n const opts = (0, options_1.getRmdirOptions)(options);\n this._core.rmdir((0, util_2.pathToFilename)(path), opts.recursive);\n };\n this.rmdir = (path, a, b) => {\n const opts = (0, options_1.getRmdirOptions)(a);\n const callback = (0, util_2.validateCallback)(typeof a === 'function' ? a : b);\n this.wrapAsync(this._core.rmdir, [(0, util_2.pathToFilename)(path), opts.recursive], callback);\n };\n this.rmSync = (path, options) => {\n this._core.rm((0, util_2.pathToFilename)(path), options?.force, options?.recursive);\n };\n this.rm = (path, a, b) => {\n const [opts, callback] = (0, options_1.getRmOptsAndCb)(a, b);\n this.wrapAsync(this._core.rm, [(0, util_2.pathToFilename)(path), opts?.force, opts?.recursive], callback);\n };\n this._fchmod = (fd, modeNum) => {\n const file = this._core.getFileByFdOrThrow(fd, 'fchmod');\n file.chmod(modeNum);\n };\n this.fchmodSync = (fd, mode) => {\n this._fchmod(fd, (0, util_2.modeToNumber)(mode));\n };\n this.fchmod = (fd, mode, callback) => {\n this.wrapAsync(this._fchmod, [fd, (0, util_2.modeToNumber)(mode)], callback);\n };\n this._chmod = (filename, modeNum, followSymlinks = true) => {\n const link = followSymlinks\n ? this._core.getResolvedLinkOrThrow(filename, 'chmod')\n : this._core.getLinkOrThrow(filename, 'chmod');\n const node = link.getNode();\n node.chmod(modeNum);\n };\n this.chmodSync = (path, mode) => {\n const modeNum = (0, util_2.modeToNumber)(mode);\n const filename = (0, util_2.pathToFilename)(path);\n this._chmod(filename, modeNum, true);\n };\n this.chmod = (path, mode, callback) => {\n const modeNum = (0, util_2.modeToNumber)(mode);\n const filename = (0, util_2.pathToFilename)(path);\n this.wrapAsync(this._chmod, [filename, modeNum], callback);\n };\n this._lchmod = (filename, modeNum) => {\n this._chmod(filename, modeNum, false);\n };\n this.lchmodSync = (path, mode) => {\n const modeNum = (0, util_2.modeToNumber)(mode);\n const filename = (0, util_2.pathToFilename)(path);\n this._lchmod(filename, modeNum);\n };\n this.lchmod = (path, mode, callback) => {\n const modeNum = (0, util_2.modeToNumber)(mode);\n const filename = (0, util_2.pathToFilename)(path);\n this.wrapAsync(this._lchmod, [filename, modeNum], callback);\n };\n this._fchown = (fd, uid, gid) => {\n this._core.getFileByFdOrThrow(fd, 'fchown').chown(uid, gid);\n };\n this.fchownSync = (fd, uid, gid) => {\n validateUid(uid);\n validateGid(gid);\n this._fchown(fd, uid, gid);\n };\n this.fchown = (fd, uid, gid, callback) => {\n validateUid(uid);\n validateGid(gid);\n this.wrapAsync(this._fchown, [fd, uid, gid], callback);\n };\n this._chown = (filename, uid, gid) => {\n const link = this._core.getResolvedLinkOrThrow(filename, 'chown');\n const node = link.getNode();\n node.chown(uid, gid);\n };\n this.chownSync = (path, uid, gid) => {\n validateUid(uid);\n validateGid(gid);\n this._chown((0, util_2.pathToFilename)(path), uid, gid);\n };\n this.chown = (path, uid, gid, callback) => {\n validateUid(uid);\n validateGid(gid);\n this.wrapAsync(this._chown, [(0, util_2.pathToFilename)(path), uid, gid], callback);\n };\n this._lchown = (filename, uid, gid) => {\n this._core.getLinkOrThrow(filename, 'lchown').getNode().chown(uid, gid);\n };\n this.lchownSync = (path, uid, gid) => {\n validateUid(uid);\n validateGid(gid);\n this._lchown((0, util_2.pathToFilename)(path), uid, gid);\n };\n this.lchown = (path, uid, gid, callback) => {\n validateUid(uid);\n validateGid(gid);\n this.wrapAsync(this._lchown, [(0, util_2.pathToFilename)(path), uid, gid], callback);\n };\n this.statWatchers = {};\n this.cpSync = (src, dest, options) => {\n const srcFilename = (0, util_2.pathToFilename)(src);\n const destFilename = (0, util_2.pathToFilename)(dest);\n const opts_ = {\n dereference: options?.dereference ?? false,\n errorOnExist: options?.errorOnExist ?? false,\n filter: options?.filter,\n force: options?.force ?? true,\n mode: options?.mode ?? 0,\n preserveTimestamps: options?.preserveTimestamps ?? false,\n recursive: options?.recursive ?? false,\n verbatimSymlinks: options?.verbatimSymlinks ?? false,\n };\n return this._cp(srcFilename, destFilename, opts_);\n };\n this.cp = (src, dest, a, b) => {\n const srcFilename = (0, util_2.pathToFilename)(src);\n const destFilename = (0, util_2.pathToFilename)(dest);\n let options;\n let callback;\n if (typeof a === 'function')\n [options, callback] = [{}, a];\n else\n [options, callback] = [a || {}, b];\n (0, util_2.validateCallback)(callback);\n const opts_ = {\n dereference: options?.dereference ?? false,\n errorOnExist: options?.errorOnExist ?? false,\n filter: options?.filter,\n force: options?.force ?? true,\n mode: options?.mode ?? 0,\n preserveTimestamps: options?.preserveTimestamps ?? false,\n recursive: options?.recursive ?? false,\n verbatimSymlinks: options?.verbatimSymlinks ?? false,\n };\n this.wrapAsync(this._cp, [srcFilename, destFilename, opts_], callback);\n };\n this.openAsBlob = async (path, options) => {\n const filename = (0, util_2.pathToFilename)(path);\n let link;\n try {\n link = this._core.getResolvedLinkOrThrow(filename, 'open');\n }\n catch (error) {\n // Convert ENOENT to Node.js-compatible error for openAsBlob\n if (error && typeof error === 'object' && error.code === 'ENOENT') {\n const nodeError = new errors.TypeError('ERR_INVALID_ARG_VALUE');\n throw nodeError;\n }\n throw error;\n }\n const node = link.getNode();\n // Note: Node.js allows opening directories as blobs, so we don't throw EISDIR\n const buffer = node.getBuffer();\n const type = options?.type || '';\n return new Blob([buffer], { type });\n };\n this.glob = (pattern, ...args) => {\n const [options, callback] = args.length === 1 ? [{}, args[0]] : [args[0], args[1]];\n this.wrapAsync(this._globSync, [pattern, options || {}], callback);\n };\n this.globSync = (pattern, options = {}) => {\n return this._globSync(pattern, options);\n };\n this._globSync = (pattern, options = {}) => {\n const { globSync } = require('./glob');\n return globSync(this, pattern, options);\n };\n this._opendir = (filename, options) => {\n const link = this._core.getResolvedLinkOrThrow(filename, 'scandir');\n const node = link.getNode();\n if (!node.isDirectory())\n throw (0, util_2.createError)(\"ENOTDIR\" /* ERROR_CODE.ENOTDIR */, 'scandir', filename);\n return new Dir_1.Dir(link, options);\n };\n this.opendirSync = (path, options) => {\n const opts = (0, options_1.getOpendirOptions)(options);\n const filename = (0, util_2.pathToFilename)(path);\n return this._opendir(filename, opts);\n };\n this.opendir = (path, a, b) => {\n const [options, callback] = (0, options_1.getOpendirOptsAndCb)(a, b);\n const filename = (0, util_2.pathToFilename)(path);\n this.wrapAsync(this._opendir, [filename, options], callback);\n };\n const self = this; // tslint:disable-line no-this-assignment\n this.StatWatcher = class extends StatWatcher {\n constructor() {\n super(self);\n }\n };\n const _ReadStream = FsReadStream;\n this.ReadStream = class extends _ReadStream {\n constructor(...args) {\n super(self, ...args);\n }\n };\n const _WriteStream = FsWriteStream;\n this.WriteStream = class extends _WriteStream {\n constructor(...args) {\n super(self, ...args);\n }\n };\n this.FSWatcher = class extends FSWatcher {\n constructor() {\n super(self);\n }\n };\n const _realpath = (filename, encoding) => {\n const realLink = this._core.getResolvedLinkOrThrow(filename, 'realpath');\n return (0, encoding_1.strToEncoding)(realLink.getPath() || '/', encoding);\n };\n const realpathImpl = (path, a, b) => {\n const [opts, callback] = (0, options_1.getRealpathOptsAndCb)(a, b);\n const pathFilename = (0, util_2.pathToFilename)(path);\n self.wrapAsync(_realpath, [pathFilename, opts.encoding], callback);\n };\n const realpathSyncImpl = (path, options) => _realpath((0, util_2.pathToFilename)(path), (0, options_1.getRealpathOptions)(options).encoding);\n this.realpath = realpathImpl;\n this.realpath.native = realpathImpl;\n this.realpathSync = realpathSyncImpl;\n this.realpathSync.native = realpathSyncImpl;\n }\n wrapAsync(method, args, callback) {\n (0, util_2.validateCallback)(callback);\n Promise.resolve().then(() => {\n let result;\n try {\n result = method.apply(this, args);\n }\n catch (err) {\n callback(err);\n return;\n }\n callback(null, result);\n });\n }\n toTree(opts = { separator: path_1.sep }) {\n return (0, print_1.toTreeSync)(this, opts);\n }\n reset() {\n this._core.reset();\n }\n toJSON(paths, json = {}, isRelative = false, asBuffer = false) {\n return this._core.toJSON(paths, json, isRelative, asBuffer);\n }\n fromJSON(json, cwd) {\n return this._core.fromJSON(json, cwd);\n }\n fromNestedJSON(json, cwd) {\n return this._core.fromNestedJSON(json, cwd);\n }\n // Legacy interface\n mountSync(mountpoint, json) {\n this._core.fromJSON(json, mountpoint);\n }\n _write(fd, buf, offset, length, position) {\n const file = this._core.getFileByFdOrThrow(fd, 'write');\n if (file.node.isSymlink()) {\n throw (0, util_2.createError)(\"EBADF\" /* ERROR_CODE.EBADF */, 'write', file.link.getPath());\n }\n return file.write(buf, offset, length, position === -1 || typeof position !== 'number' ? undefined : position);\n }\n writevBase(fd, buffers, position) {\n const file = this._core.getFileByFdOrThrow(fd);\n let p = position ?? undefined;\n if (p === -1) {\n p = undefined;\n }\n let bytesWritten = 0;\n for (const buffer of buffers) {\n const nodeBuf = buffer_1.Buffer.from(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n const bytes = file.write(nodeBuf, 0, nodeBuf.byteLength, p);\n p = undefined;\n bytesWritten += bytes;\n if (bytes < nodeBuf.byteLength)\n break;\n }\n return bytesWritten;\n }\n _copyFile(src, dest, flags) {\n const buf = this.readFileSync(src);\n if (flags & COPYFILE_EXCL && this.existsSync(dest))\n throw (0, util_2.createError)(\"EEXIST\" /* ERROR_CODE.EEXIST */, 'copyFile', src, dest);\n if (flags & COPYFILE_FICLONE_FORCE)\n throw (0, util_2.createError)(\"ENOSYS\" /* ERROR_CODE.ENOSYS */, 'copyFile', src, dest);\n this._core.writeFile(dest, buf, constants_2.FLAGS.w, 438 /* MODE.DEFAULT */);\n }\n isSrcSubdir(src, dest) {\n try {\n const normalizedSrc = pathNormalize(src.startsWith('/') ? src : '/' + src);\n const normalizedDest = pathNormalize(dest.startsWith('/') ? dest : '/' + dest);\n if (normalizedSrc === normalizedDest)\n return true;\n // Check if dest is under src by using relative path\n // If dest is under src, the relative path from src to dest won't start with '..'\n const relativePath = pathRelative(normalizedSrc, normalizedDest);\n // If relative path is empty or doesn't start with '..', dest is under src\n return relativePath === '' || (!relativePath.startsWith('..') && !(0, path_1.isAbsolute)(relativePath));\n }\n catch (error) {\n // If path operations fail, assume it's safe (don't block the copy)\n return false;\n }\n }\n cpFileSync(srcStat, destStat, src, dest, options) {\n if (destStat) {\n if (options.errorOnExist)\n throw (0, util_2.createError)(\"EEXIST\" /* ERROR_CODE.EEXIST */, 'cp', dest);\n if (!options.force)\n return;\n this.unlinkSync(dest);\n }\n // Copy the file\n this.copyFileSync(src, dest, options.mode);\n // Preserve timestamps if requested\n if (options.preserveTimestamps)\n this.utimesSync(dest, srcStat.atime, srcStat.mtime);\n // Set file mode\n this.chmodSync(dest, Number(srcStat.mode));\n }\n cpDirSync(srcStat, destStat, src, dest, options) {\n if (!destStat) {\n this.mkdirSync(dest);\n }\n // Read directory contents\n const entries = this.readdirSync(src);\n for (const entry of entries) {\n const srcItem = pathJoin(src, String(entry));\n const destItem = pathJoin(dest, String(entry));\n // Apply filter to each item\n if (options.filter && !options.filter(srcItem, destItem)) {\n continue;\n }\n this._cp(srcItem, destItem, options);\n }\n // Set directory mode\n this.chmodSync(dest, Number(srcStat.mode));\n }\n cpSymlinkSync(destStat, src, dest, options) {\n let linkTarget = String(this.readlinkSync(src));\n if (!options.verbatimSymlinks && !(0, path_1.isAbsolute)(linkTarget))\n linkTarget = resolveCrossPlatform(pathDirname(src), linkTarget);\n if (destStat)\n this.unlinkSync(dest);\n this.symlinkSync(linkTarget, dest);\n }\n lstat(path, a, b) {\n const [{ throwIfNoEntry = true, bigint = false }, callback] = (0, options_1.getStatOptsAndCb)(a, b);\n this.wrapAsync(this._lstat, [(0, util_2.pathToFilename)(path), bigint, throwIfNoEntry], callback);\n }\n _stat(filename, bigint = false, throwIfNoEntry = true) {\n let link;\n try {\n link = this._core.getResolvedLinkOrThrow(filename, 'stat');\n }\n catch (err) {\n if (err.code === \"ENOENT\" /* ERROR_CODE.ENOENT */ && !throwIfNoEntry)\n return undefined;\n else\n throw err;\n }\n return Stats_1.default.build(link.getNode(), bigint);\n }\n statSync(path, options) {\n const { bigint = true, throwIfNoEntry = true } = (0, options_1.getStatOptions)(options);\n return this._stat((0, util_2.pathToFilename)(path), bigint, throwIfNoEntry);\n }\n stat(path, a, b) {\n const [{ bigint = false, throwIfNoEntry = true }, callback] = (0, options_1.getStatOptsAndCb)(a, b);\n this.wrapAsync(this._stat, [(0, util_2.pathToFilename)(path), bigint, throwIfNoEntry], callback);\n }\n fstatBase(fd, bigint = false) {\n const file = this._core.getFileByFd(fd);\n if (!file)\n throw (0, util_2.createError)(\"EBADF\" /* ERROR_CODE.EBADF */, 'fstat');\n return Stats_1.default.build(file.node, bigint);\n }\n fstatSync(fd, options) {\n return this.fstatBase(fd, (0, options_1.getStatOptions)(options).bigint);\n }\n fstat(fd, a, b) {\n const [opts, callback] = (0, options_1.getStatOptsAndCb)(a, b);\n this.wrapAsync(this.fstatBase, [fd, opts.bigint], callback);\n }\n _exists(filename) {\n return !!this._stat(filename);\n }\n _access(filename, mode) {\n const link = this._core.getLinkOrThrow(filename, 'access');\n const node = link.getNode();\n // F_OK (0) just checks for existence, which we already confirmed above\n if (mode === F_OK) {\n return;\n }\n // Check read permission\n if (mode & R_OK && !node.canRead()) {\n throw (0, util_2.createError)(\"EACCES\" /* ERROR_CODE.EACCES */, 'access', filename);\n }\n // Check write permission\n if (mode & W_OK && !node.canWrite()) {\n throw (0, util_2.createError)(\"EACCES\" /* ERROR_CODE.EACCES */, 'access', filename);\n }\n // Check execute permission\n if (mode & X_OK && !node.canExecute()) {\n throw (0, util_2.createError)(\"EACCES\" /* ERROR_CODE.EACCES */, 'access', filename);\n }\n }\n watchFile(path, a, b) {\n const filename = (0, util_2.pathToFilename)(path);\n let options = a;\n let listener = b;\n if (typeof options === 'function') {\n listener = a;\n options = null;\n }\n if (typeof listener !== 'function') {\n throw Error('\"watchFile()\" requires a listener function');\n }\n let interval = 5007;\n let persistent = true;\n if (options && typeof options === 'object') {\n if (typeof options.interval === 'number')\n interval = options.interval;\n if (typeof options.persistent === 'boolean')\n persistent = options.persistent;\n }\n let watcher = this.statWatchers[filename];\n if (!watcher) {\n watcher = new this.StatWatcher();\n watcher.start(filename, persistent, interval);\n this.statWatchers[filename] = watcher;\n }\n watcher.addListener('change', listener);\n return watcher;\n }\n unwatchFile(path, listener) {\n const filename = (0, util_2.pathToFilename)(path);\n const watcher = this.statWatchers[filename];\n if (!watcher)\n return;\n if (typeof listener === 'function') {\n watcher.removeListener('change', listener);\n }\n else {\n watcher.removeAllListeners('change');\n }\n if (watcher.listenerCount('change') === 0) {\n watcher.stop();\n delete this.statWatchers[filename];\n }\n }\n createReadStream(path, options) {\n return new this.ReadStream(path, options);\n }\n createWriteStream(path, options) {\n return new this.WriteStream(path, options);\n }\n // watch(path: PathLike): FSWatcher;\n // watch(path: PathLike, options?: IWatchOptions | string): FSWatcher;\n watch(path, options, listener) {\n const filename = (0, util_2.pathToFilename)(path);\n let givenOptions = options;\n if (typeof options === 'function') {\n listener = options;\n givenOptions = null;\n }\n // tslint:disable-next-line prefer-const\n let { persistent, recursive, encoding } = (0, options_1.getDefaultOpts)(givenOptions);\n if (persistent === undefined)\n persistent = true;\n if (recursive === undefined)\n recursive = false;\n const watcher = new this.FSWatcher();\n watcher.start(filename, persistent, recursive, encoding);\n if (listener) {\n watcher.addListener('change', listener);\n }\n return watcher;\n }\n _statfs(filename, bigint = false) {\n // Verify the path exists to match Node.js behavior\n this._core.getResolvedLinkOrThrow(filename, 'statfs');\n return StatFs_1.default.build(this._core, bigint);\n }\n statfsSync(path, options) {\n const { bigint = false } = (0, options_1.getStatfsOptions)(options);\n return this._statfs((0, util_2.pathToFilename)(path), bigint);\n }\n statfs(path, a, b) {\n const [{ bigint = false }, callback] = (0, options_1.getStatfsOptsAndCb)(a, b);\n this.wrapAsync(this._statfs, [(0, util_2.pathToFilename)(path), bigint], callback);\n }\n}\nexports.Volume = Volume;\nVolume.fromJSON = (json, cwd) => new Volume(core_1.Superblock.fromJSON(json, cwd));\nVolume.fromNestedJSON = (json, cwd) => new Volume(core_1.Superblock.fromNestedJSON(json, cwd));\nfunction emitStop(self) {\n self.emit('stop');\n}\nclass StatWatcher extends events_1.EventEmitter {\n constructor(vol) {\n super();\n this.onInterval = () => {\n try {\n const stats = this.vol.statSync(this.filename);\n if (this.hasChanged(stats)) {\n this.emit('change', stats, this.prev);\n this.prev = stats;\n }\n }\n finally {\n this.loop();\n }\n };\n this.vol = vol;\n }\n loop() {\n this.timeoutRef = this.setTimeout(this.onInterval, this.interval);\n }\n hasChanged(stats) {\n // if(!this.prev) return false;\n if (stats.mtimeMs > this.prev.mtimeMs)\n return true;\n if (stats.nlink !== this.prev.nlink)\n return true;\n return false;\n }\n start(path, persistent = true, interval = 5007) {\n this.filename = (0, util_2.pathToFilename)(path);\n this.setTimeout = persistent\n ? setTimeout.bind(typeof globalThis !== 'undefined' ? globalThis : global)\n : setTimeoutUnref_1.default;\n this.interval = interval;\n this.prev = this.vol.statSync(this.filename);\n this.loop();\n }\n stop() {\n clearTimeout(this.timeoutRef);\n (0, queueMicrotask_1.default)(() => {\n emitStop.call(this, this);\n });\n }\n}\nexports.StatWatcher = StatWatcher;\n/* tslint:disable no-var-keyword prefer-const */\n// ---------------------------------------- ReadStream\nvar pool;\nfunction allocNewPool(poolSize) {\n pool = (0, buffer_1.bufferAllocUnsafe)(poolSize);\n pool.used = 0;\n}\n(0, util_1.inherits)(FsReadStream, stream_1.Readable);\nexports.ReadStream = FsReadStream;\nfunction FsReadStream(vol, path, options) {\n if (!(this instanceof FsReadStream))\n return new FsReadStream(vol, path, options);\n this._vol = vol;\n // a little bit bigger buffer and water marks by default\n options = Object.assign({}, (0, options_1.getOptions)(options, {}));\n if (options.highWaterMark === undefined)\n options.highWaterMark = 64 * 1024;\n stream_1.Readable.call(this, options);\n this.path = (0, util_2.pathToFilename)(path);\n this.fd = options.fd === undefined ? null : typeof options.fd !== 'number' ? options.fd.fd : options.fd;\n this.flags = options.flags === undefined ? 'r' : options.flags;\n this.mode = options.mode === undefined ? 0o666 : options.mode;\n this.start = options.start;\n this.end = options.end;\n this.autoClose = options.autoClose === undefined ? true : options.autoClose;\n this.pos = undefined;\n this.bytesRead = 0;\n if (this.start !== undefined) {\n if (typeof this.start !== 'number') {\n throw new TypeError('\"start\" option must be a Number');\n }\n if (this.end === undefined) {\n this.end = Infinity;\n }\n else if (typeof this.end !== 'number') {\n throw new TypeError('\"end\" option must be a Number');\n }\n if (this.start > this.end) {\n throw new Error('\"start\" option must be <= \"end\" option');\n }\n this.pos = this.start;\n }\n if (typeof this.fd !== 'number')\n this.open();\n this.on('end', function () {\n if (this.autoClose) {\n if (this.destroy)\n this.destroy();\n }\n });\n}\nFsReadStream.prototype.open = function () {\n var self = this; // tslint:disable-line no-this-assignment\n this._vol.open(this.path, this.flags, this.mode, (er, fd) => {\n if (er) {\n if (self.autoClose) {\n if (self.destroy)\n self.destroy();\n }\n self.emit('error', er);\n return;\n }\n self.fd = fd;\n self.emit('open', fd);\n // start the flow of data.\n self.read();\n });\n};\nFsReadStream.prototype._read = function (n) {\n if (typeof this.fd !== 'number') {\n return this.once('open', function () {\n this._read(n);\n });\n }\n if (this.destroyed)\n return;\n if (!pool || pool.length - pool.used < kMinPoolSpace) {\n // discard the old pool.\n allocNewPool(this._readableState.highWaterMark);\n }\n // Grab another reference to the pool in the case that while we're\n // in the thread pool another read() finishes up the pool, and\n // allocates a new one.\n var thisPool = pool;\n var toRead = Math.min(pool.length - pool.used, n);\n var start = pool.used;\n if (this.pos !== undefined)\n toRead = Math.min(this.end - this.pos + 1, toRead);\n // already read everything we were supposed to read!\n // treat as EOF.\n if (toRead <= 0)\n return this.push(null);\n // the actual read.\n var self = this; // tslint:disable-line no-this-assignment\n this._vol.read(this.fd, pool, pool.used, toRead, this.pos, onread);\n // move the pool positions, and internal position for reading.\n if (this.pos !== undefined)\n this.pos += toRead;\n pool.used += toRead;\n function onread(er, bytesRead) {\n if (er) {\n if (self.autoClose && self.destroy) {\n self.destroy();\n }\n self.emit('error', er);\n }\n else {\n var b = null;\n if (bytesRead > 0) {\n self.bytesRead += bytesRead;\n b = thisPool.slice(start, start + bytesRead);\n }\n self.push(b);\n }\n }\n};\nFsReadStream.prototype._destroy = function (err, cb) {\n this.close(err2 => {\n cb(err || err2);\n });\n};\nFsReadStream.prototype.close = function (cb) {\n if (cb)\n this.once('close', cb);\n if (this.closed || typeof this.fd !== 'number') {\n if (typeof this.fd !== 'number') {\n this.once('open', closeOnOpen);\n return;\n }\n return (0, queueMicrotask_1.default)(() => this.emit('close'));\n }\n // Since Node 18, there is only a getter for '.closed'.\n // The first branch mimics other setters from Readable.\n // See https://github.com/nodejs/node/blob/v18.0.0/lib/internal/streams/readable.js#L1243\n if (typeof this._readableState?.closed === 'boolean') {\n this._readableState.closed = true;\n }\n else {\n this.closed = true;\n }\n this._vol.close(this.fd, er => {\n if (er)\n this.emit('error', er);\n else\n this.emit('close');\n });\n this.fd = null;\n};\n// needed because as it will be called with arguments\n// that does not match this.close() signature\nfunction closeOnOpen(fd) {\n this.close();\n}\n(0, util_1.inherits)(FsWriteStream, stream_1.Writable);\nexports.WriteStream = FsWriteStream;\nfunction FsWriteStream(vol, path, options) {\n if (!(this instanceof FsWriteStream))\n return new FsWriteStream(vol, path, options);\n this._vol = vol;\n options = Object.assign({}, (0, options_1.getOptions)(options, {}));\n stream_1.Writable.call(this, options);\n this.path = (0, util_2.pathToFilename)(path);\n this.fd = options.fd === undefined ? null : typeof options.fd !== 'number' ? options.fd.fd : options.fd;\n this.flags = options.flags === undefined ? 'w' : options.flags;\n this.mode = options.mode === undefined ? 0o666 : options.mode;\n this.start = options.start;\n this.autoClose = options.autoClose === undefined ? true : !!options.autoClose;\n this.pos = undefined;\n this.bytesWritten = 0;\n this.pending = true;\n if (this.start !== undefined) {\n if (typeof this.start !== 'number') {\n throw new TypeError('\"start\" option must be a Number');\n }\n if (this.start < 0) {\n throw new Error('\"start\" must be >= zero');\n }\n this.pos = this.start;\n }\n if (options.encoding)\n this.setDefaultEncoding(options.encoding);\n if (typeof this.fd !== 'number')\n this.open();\n // dispose on finish.\n this.once('finish', function () {\n if (this.autoClose) {\n this.close();\n }\n });\n}\nFsWriteStream.prototype.open = function () {\n this._vol.open(this.path, this.flags, this.mode, function (er, fd) {\n if (er) {\n if (this.autoClose && this.destroy) {\n this.destroy();\n }\n this.emit('error', er);\n return;\n }\n this.fd = fd;\n this.pending = false;\n this.emit('open', fd);\n }.bind(this));\n};\nFsWriteStream.prototype._write = function (data, encoding, cb) {\n if (!(data instanceof buffer_1.Buffer || data instanceof Uint8Array))\n return this.emit('error', new Error('Invalid data'));\n if (typeof this.fd !== 'number') {\n return this.once('open', function () {\n this._write(data, encoding, cb);\n });\n }\n var self = this; // tslint:disable-line no-this-assignment\n this._vol.write(this.fd, data, 0, data.length, this.pos, (er, bytes) => {\n if (er) {\n if (self.autoClose && self.destroy) {\n self.destroy();\n }\n return cb(er);\n }\n self.bytesWritten += bytes;\n cb();\n });\n if (this.pos !== undefined)\n this.pos += data.length;\n};\nFsWriteStream.prototype._writev = function (data, cb) {\n if (typeof this.fd !== 'number') {\n return this.once('open', function () {\n this._writev(data, cb);\n });\n }\n const self = this; // tslint:disable-line no-this-assignment\n const len = data.length;\n const chunks = new Array(len);\n var size = 0;\n for (var i = 0; i < len; i++) {\n var chunk = data[i].chunk;\n chunks[i] = chunk;\n size += chunk.length;\n }\n const buf = buffer_1.Buffer.concat(chunks);\n this._vol.write(this.fd, buf, 0, buf.length, this.pos, (er, bytes) => {\n if (er) {\n if (self.destroy)\n self.destroy();\n return cb(er);\n }\n self.bytesWritten += bytes;\n cb();\n });\n if (this.pos !== undefined)\n this.pos += size;\n};\nFsWriteStream.prototype.close = function (cb) {\n if (cb)\n this.once('close', cb);\n if (this.closed || typeof this.fd !== 'number') {\n if (typeof this.fd !== 'number') {\n this.once('open', closeOnOpen);\n return;\n }\n return (0, queueMicrotask_1.default)(() => this.emit('close'));\n }\n // Since Node 18, there is only a getter for '.closed'.\n // The first branch mimics other setters from Writable.\n // See https://github.com/nodejs/node/blob/v18.0.0/lib/internal/streams/writable.js#L766\n if (typeof this._writableState?.closed === 'boolean') {\n this._writableState.closed = true;\n }\n else {\n this.closed = true;\n }\n this._vol.close(this.fd, er => {\n if (er)\n this.emit('error', er);\n else\n this.emit('close');\n });\n this.fd = null;\n};\nFsWriteStream.prototype._destroy = FsReadStream.prototype._destroy;\n// There is no shutdown() for files.\nFsWriteStream.prototype.destroySoon = FsWriteStream.prototype.end;\n// ---------------------------------------- FSWatcher\nclass FSWatcher extends events_1.EventEmitter {\n constructor(vol) {\n super();\n this._filename = '';\n this._filenameEncoded = '';\n // _persistent: boolean = true;\n this._recursive = false;\n this._encoding = encoding_1.ENCODING_UTF8;\n // inode -> removers\n this._listenerRemovers = new Map();\n this._onParentChild = (link) => {\n if (link.getName() === this._getName()) {\n this._emit('rename');\n }\n };\n this._emit = (type) => {\n this.emit('change', type, this._filenameEncoded);\n };\n this._persist = () => {\n this._timer = setTimeout(this._persist, 1e6);\n };\n this._vol = vol;\n // TODO: Emit \"error\" messages when watching.\n // this._handle.onchange = function(status, eventType, filename) {\n // if (status < 0) {\n // self._handle.close();\n // const error = !filename ?\n // errnoException(status, 'Error watching file for changes:') :\n // errnoException(status, `Error watching file ${filename} for changes:`);\n // error.filename = filename;\n // self.emit('error', error);\n // } else {\n // self.emit('change', eventType, filename);\n // }\n // };\n }\n _getName() {\n return this._steps[this._steps.length - 1];\n }\n start(path, persistent = true, recursive = false, encoding = encoding_1.ENCODING_UTF8) {\n this._filename = (0, util_2.pathToFilename)(path);\n this._steps = (0, util_3.filenameToSteps)(this._filename);\n this._filenameEncoded = (0, encoding_1.strToEncoding)(this._filename);\n // this._persistent = persistent;\n this._recursive = recursive;\n this._encoding = encoding;\n try {\n this._link = this._vol._core.getLinkOrThrow(this._filename, 'FSWatcher');\n }\n catch (err) {\n const error = new Error(`watch ${this._filename} ${err.code}`);\n error.code = err.code;\n error.errno = err.code;\n throw error;\n }\n const watchLinkNodeChanged = (link) => {\n const filepath = link.getPath();\n const node = link.getNode();\n const onNodeChange = () => {\n let filename = pathRelative(this._filename, filepath);\n if (!filename)\n filename = this._getName();\n return this.emit('change', 'change', filename);\n };\n const unsub = node.changes.listen(([type]) => {\n if (type === 'modify')\n onNodeChange();\n });\n const removers = this._listenerRemovers.get(node.ino) ?? [];\n removers.push(() => unsub());\n this._listenerRemovers.set(node.ino, removers);\n };\n const watchLinkChildrenChanged = (link) => {\n const node = link.getNode();\n // when a new link added\n const onLinkChildAdd = (l) => {\n this.emit('change', 'rename', pathRelative(this._filename, l.getPath()));\n // 1. watch changes of the new link-node\n watchLinkNodeChanged(l);\n // 2. watch changes of the new link-node's children\n watchLinkChildrenChanged(l);\n };\n // when a new link deleted\n const onLinkChildDelete = (l) => {\n // remove the listeners of the children nodes\n const removeLinkNodeListeners = (curLink) => {\n const ino = curLink.getNode().ino;\n const removers = this._listenerRemovers.get(ino);\n if (removers) {\n removers.forEach(r => r());\n this._listenerRemovers.delete(ino);\n }\n for (const [name, childLink] of curLink.children.entries()) {\n if (childLink && name !== '.' && name !== '..') {\n removeLinkNodeListeners(childLink);\n }\n }\n };\n removeLinkNodeListeners(l);\n this.emit('change', 'rename', pathRelative(this._filename, l.getPath()));\n };\n // children nodes changed\n for (const [name, childLink] of link.children.entries()) {\n if (childLink && name !== '.' && name !== '..') {\n watchLinkNodeChanged(childLink);\n }\n }\n // link children add/remove\n const unsubscribeLinkChanges = link.changes.listen(([type, link]) => {\n if (type === 'child:add')\n onLinkChildAdd(link);\n else if (type === 'child:del')\n onLinkChildDelete(link);\n });\n const removers = this._listenerRemovers.get(node.ino) ?? [];\n removers.push(() => {\n unsubscribeLinkChanges();\n });\n if (recursive) {\n for (const [name, childLink] of link.children.entries()) {\n if (childLink && name !== '.' && name !== '..') {\n watchLinkChildrenChanged(childLink);\n }\n }\n }\n };\n watchLinkNodeChanged(this._link);\n watchLinkChildrenChanged(this._link);\n const parent = this._link.parent;\n if (parent) {\n // parent.on('child:delete', this._onParentChild);\n parent.changes.listen(([type, link]) => {\n if (type === 'child:del')\n this._onParentChild(link);\n });\n }\n if (persistent)\n this._persist();\n }\n close() {\n clearTimeout(this._timer);\n this._listenerRemovers.forEach(removers => {\n removers.forEach(r => r());\n });\n this._listenerRemovers.clear();\n this._parentChangesUnsub?.();\n }\n}\nexports.FSWatcher = FSWatcher;\n//# sourceMappingURL=volume.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toTreeSync = void 0;\nconst tree_dump_1 = require(\"tree-dump\");\nconst util_1 = require(\"../node-to-fsa/util\");\nconst toTreeSync = (fs, opts = {}) => {\n const separator = opts.separator || '/';\n let dir = opts.dir || separator;\n if (dir[dir.length - 1] !== separator)\n dir += separator;\n const tab = opts.tab || '';\n const depth = opts.depth ?? 10;\n let subtree = ' (...)';\n if (depth > 0) {\n const list = fs.readdirSync(dir, { withFileTypes: true });\n subtree = (0, tree_dump_1.printTree)(tab, list.map(entry => tab => {\n if (entry.isDirectory()) {\n return (0, exports.toTreeSync)(fs, { dir: dir + entry.name, depth: depth - 1, tab });\n }\n else if (entry.isSymbolicLink()) {\n return '' + entry.name + ' → ' + fs.readlinkSync(dir + entry.name);\n }\n else {\n return '' + entry.name;\n }\n }));\n }\n const base = (0, util_1.basename)(dir, separator) + separator;\n return base + subtree;\n};\nexports.toTreeSync = toTreeSync;\n//# sourceMappingURL=index.js.map","\"use strict\";\n// Here we mock the global `process` variable in case we are not in Node's environment.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createProcess = createProcess;\n/**\n * Looks to return a `process` object, if one is available.\n *\n * The global `process` is returned if defined;\n * otherwise `require('process')` is attempted.\n *\n * If that fails, `undefined` is returned.\n *\n * @return {IProcess | undefined}\n */\nconst maybeReturnProcess = () => {\n if (typeof process !== 'undefined') {\n return process;\n }\n try {\n return require('process');\n }\n catch {\n return undefined;\n }\n};\nfunction createProcess() {\n const p = maybeReturnProcess() || {};\n if (!p.cwd)\n p.cwd = () => '/';\n if (!p.emitWarning)\n p.emitWarning = (message, type) => {\n // tslint:disable-next-line:no-console\n console.warn(`${type}${type ? ': ' : ''}${message}`);\n };\n if (!p.env)\n p.env = {};\n return p;\n}\nexports.default = createProcess();\n//# sourceMappingURL=process.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = typeof queueMicrotask === 'function' ? queueMicrotask : (cb => Promise.resolve()\n .then(() => cb())\n .catch(() => { }));\n//# sourceMappingURL=queueMicrotask.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * `setTimeoutUnref` is just like `setTimeout`,\n * only in Node's environment it will \"unref\" its macro task.\n */\nfunction setTimeoutUnref(callback, time, args) {\n const ref = setTimeout.apply(typeof globalThis !== 'undefined' ? globalThis : global, arguments);\n if (ref && typeof ref === 'object' && typeof ref.unref === 'function')\n ref.unref();\n return ref;\n}\nexports.default = setTimeoutUnref;\n//# sourceMappingURL=setTimeoutUnref.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Buffer = void 0;\nvar node_buffer_1 = require(\"node:buffer\");\nObject.defineProperty(exports, \"Buffer\", { enumerable: true, get: function () { return node_buffer_1.Buffer; } });\n//# sourceMappingURL=buffer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EventEmitter = void 0;\nvar node_events_1 = require(\"node:events\");\nObject.defineProperty(exports, \"EventEmitter\", { enumerable: true, get: function () { return node_events_1.EventEmitter; } });\n//# sourceMappingURL=events.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.bufferFrom = exports.bufferAllocUnsafe = exports.Buffer = void 0;\nconst buffer_1 = require(\"../buffer\");\nObject.defineProperty(exports, \"Buffer\", { enumerable: true, get: function () { return buffer_1.Buffer; } });\nfunction bufferV0P12Ponyfill(arg0, ...args) {\n return new buffer_1.Buffer(arg0, ...args);\n}\nconst bufferAllocUnsafe = buffer_1.Buffer.allocUnsafe || bufferV0P12Ponyfill;\nexports.bufferAllocUnsafe = bufferAllocUnsafe;\nconst bufferFrom = buffer_1.Buffer.from || bufferV0P12Ponyfill;\nexports.bufferFrom = bufferFrom;\n//# sourceMappingURL=buffer.js.map","\"use strict\";\n// Adapted from Node.js ../internal/errors.js, used for throwing similar errors to Node.js.\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AssertionError = exports.RangeError = exports.TypeError = exports.Error = void 0;\nexports.message = message;\nexports.E = E;\nconst util_1 = require(\"../util\");\nconst kCode = typeof Symbol === 'undefined' ? '_kCode' : Symbol('code');\nconst messages = {};\nfunction makeNodeError(Base) {\n return class NodeError extends Base {\n constructor(key, ...args) {\n super(message(key, args));\n this.code = key;\n this[kCode] = key;\n this.name = `${super.name} [${this[kCode]}]`;\n }\n };\n}\nconst g = typeof globalThis !== 'undefined' ? globalThis : global;\nclass AssertionError extends g.Error {\n constructor(options) {\n if (typeof options !== 'object' || options === null) {\n throw new exports.TypeError('ERR_INVALID_ARG_TYPE', 'options', 'object');\n }\n if (options.message) {\n super(options.message);\n }\n else {\n super(`${(0, util_1.inspect)(options.actual).slice(0, 128)} ` + `${options.operator} ${(0, util_1.inspect)(options.expected).slice(0, 128)}`);\n }\n this.generatedMessage = !options.message;\n this.name = 'AssertionError [ERR_ASSERTION]';\n this.code = 'ERR_ASSERTION';\n this.actual = options.actual;\n this.expected = options.expected;\n this.operator = options.operator;\n exports.Error.captureStackTrace(this, options.stackStartFunction);\n }\n}\nexports.AssertionError = AssertionError;\nfunction message(key, args) {\n if (typeof key !== 'string')\n throw new exports.Error('Error message key must be a string');\n const msg = messages[key];\n if (!msg)\n throw new exports.Error(`An invalid error message key was used: ${key}.`);\n let fmt;\n if (typeof msg === 'function') {\n fmt = msg;\n }\n else {\n fmt = util_1.format;\n if (args === undefined || args.length === 0)\n return msg;\n args.unshift(msg);\n }\n return String(fmt.apply(null, args));\n}\n// Utility function for registering the error codes. Only used here. Exported\n// *only* to allow for testing.\nfunction E(sym, val) {\n messages[sym] = typeof val === 'function' ? val : String(val);\n}\nexports.Error = makeNodeError(g.Error);\nexports.TypeError = makeNodeError(g.TypeError);\nexports.RangeError = makeNodeError(g.RangeError);\nE('ERR_DIR_CLOSED', 'Directory handle was closed');\nE('ERR_DIR_CONCURRENT_OPERATION', 'Cannot do synchronous work on directory handle with concurrent asynchronous operations');\nE('ERR_INVALID_FILE_URL_HOST', 'File URL host must be \"localhost\" or empty on %s');\nE('ERR_INVALID_FILE_URL_PATH', 'File URL path %s');\nE('ERR_INVALID_OPT_VALUE', (name, value) => {\n return `The value \"${String(value)}\" is invalid for option \"${name}\"`;\n});\nE('ERR_INVALID_OPT_VALUE_ENCODING', value => `The value \"${String(value)}\" is invalid for option \"encoding\"`);\nE('ERR_INVALID_ARG_VALUE', 'Unable to open file as blob');\n//# sourceMappingURL=errors.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.basename = exports.isAbsolute = exports.normalize = exports.dirname = exports.relative = exports.join = exports.posix = exports.sep = exports.resolve = void 0;\nvar node_path_1 = require(\"node:path\");\nObject.defineProperty(exports, \"resolve\", { enumerable: true, get: function () { return node_path_1.resolve; } });\nObject.defineProperty(exports, \"sep\", { enumerable: true, get: function () { return node_path_1.sep; } });\nObject.defineProperty(exports, \"posix\", { enumerable: true, get: function () { return node_path_1.posix; } });\nObject.defineProperty(exports, \"join\", { enumerable: true, get: function () { return node_path_1.join; } });\nObject.defineProperty(exports, \"relative\", { enumerable: true, get: function () { return node_path_1.relative; } });\nObject.defineProperty(exports, \"dirname\", { enumerable: true, get: function () { return node_path_1.dirname; } });\nObject.defineProperty(exports, \"normalize\", { enumerable: true, get: function () { return node_path_1.normalize; } });\nObject.defineProperty(exports, \"isAbsolute\", { enumerable: true, get: function () { return node_path_1.isAbsolute; } });\nObject.defineProperty(exports, \"basename\", { enumerable: true, get: function () { return node_path_1.basename; } });\n//# sourceMappingURL=path.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Writable = exports.Readable = void 0;\nvar node_stream_1 = require(\"node:stream\");\nObject.defineProperty(exports, \"Readable\", { enumerable: true, get: function () { return node_stream_1.Readable; } });\nObject.defineProperty(exports, \"Writable\", { enumerable: true, get: function () { return node_stream_1.Writable; } });\n//# sourceMappingURL=stream.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.inherits = inherits;\nexports.promisify = promisify;\nexports.inspect = inspect;\nexports.format = format;\n/**\n * Minimal implementation of Node.js util.inherits function.\n * Sets up prototype inheritance between constructor functions.\n */\nfunction inherits(ctor, superCtor) {\n if (ctor === undefined || ctor === null) {\n throw new TypeError('The constructor to inherit from is not defined');\n }\n if (superCtor === undefined || superCtor === null) {\n throw new TypeError('The super constructor to inherit from is not defined');\n }\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true,\n },\n });\n}\n/**\n * Minimal implementation of Node.js util.promisify function.\n * Converts callback-based functions to Promise-based functions.\n */\nfunction promisify(fn) {\n if (typeof fn !== 'function') {\n throw new TypeError('The \"original\" argument must be of type function');\n }\n return function (...args) {\n return new Promise((resolve, reject) => {\n fn.call(this, ...args, (err, result) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(result);\n }\n });\n });\n };\n}\n/**\n * Minimal implementation of Node.js util.inspect function.\n * Converts a value to a string representation for debugging.\n */\nfunction inspect(value) {\n if (value === null)\n return 'null';\n if (value === undefined)\n return 'undefined';\n if (typeof value === 'string')\n return `'${value}'`;\n if (typeof value === 'number' || typeof value === 'boolean')\n return String(value);\n if (Array.isArray(value)) {\n const items = value.map(item => inspect(item)).join(', ');\n return `[ ${items} ]`;\n }\n if (typeof value === 'object') {\n const entries = Object.entries(value)\n .map(([key, val]) => `${key}: ${inspect(val)}`)\n .join(', ');\n return `{ ${entries} }`;\n }\n return String(value);\n}\n/**\n * Minimal implementation of Node.js util.format function.\n * Provides printf-style string formatting with basic placeholder support.\n */\nfunction format(template, ...args) {\n if (args.length === 0)\n return template;\n let result = template;\n let argIndex = 0;\n // Replace %s (string), %d (number), %j (JSON) placeholders\n result = result.replace(/%[sdj%]/g, match => {\n if (argIndex >= args.length)\n return match;\n const arg = args[argIndex++];\n switch (match) {\n case '%s':\n return String(arg);\n case '%d':\n return Number(arg).toString();\n case '%j':\n try {\n return JSON.stringify(arg);\n }\n catch {\n return '[Circular]';\n }\n case '%%':\n return '%';\n default:\n return match;\n }\n });\n // Append remaining arguments\n while (argIndex < args.length) {\n result += ' ' + String(args[argIndex++]);\n }\n return result;\n}\n//# sourceMappingURL=util.js.map","'use strict'\n/*\n * merge2\n * https://github.com/teambition/merge2\n *\n * Copyright (c) 2014-2020 Teambition\n * Licensed under the MIT license.\n */\nconst Stream = require('stream')\nconst PassThrough = Stream.PassThrough\nconst slice = Array.prototype.slice\n\nmodule.exports = merge2\n\nfunction merge2 () {\n const streamsQueue = []\n const args = slice.call(arguments)\n let merging = false\n let options = args[args.length - 1]\n\n if (options && !Array.isArray(options) && options.pipe == null) {\n args.pop()\n } else {\n options = {}\n }\n\n const doEnd = options.end !== false\n const doPipeError = options.pipeError === true\n if (options.objectMode == null) {\n options.objectMode = true\n }\n if (options.highWaterMark == null) {\n options.highWaterMark = 64 * 1024\n }\n const mergedStream = PassThrough(options)\n\n function addStream () {\n for (let i = 0, len = arguments.length; i < len; i++) {\n streamsQueue.push(pauseStreams(arguments[i], options))\n }\n mergeStream()\n return this\n }\n\n function mergeStream () {\n if (merging) {\n return\n }\n merging = true\n\n let streams = streamsQueue.shift()\n if (!streams) {\n process.nextTick(endStream)\n return\n }\n if (!Array.isArray(streams)) {\n streams = [streams]\n }\n\n let pipesCount = streams.length + 1\n\n function next () {\n if (--pipesCount > 0) {\n return\n }\n merging = false\n mergeStream()\n }\n\n function pipe (stream) {\n function onend () {\n stream.removeListener('merge2UnpipeEnd', onend)\n stream.removeListener('end', onend)\n if (doPipeError) {\n stream.removeListener('error', onerror)\n }\n next()\n }\n function onerror (err) {\n mergedStream.emit('error', err)\n }\n // skip ended stream\n if (stream._readableState.endEmitted) {\n return next()\n }\n\n stream.on('merge2UnpipeEnd', onend)\n stream.on('end', onend)\n\n if (doPipeError) {\n stream.on('error', onerror)\n }\n\n stream.pipe(mergedStream, { end: false })\n // compatible for old stream\n stream.resume()\n }\n\n for (let i = 0; i < streams.length; i++) {\n pipe(streams[i])\n }\n\n next()\n }\n\n function endStream () {\n merging = false\n // emit 'queueDrain' when all streams merged.\n mergedStream.emit('queueDrain')\n if (doEnd) {\n mergedStream.end()\n }\n }\n\n mergedStream.setMaxListeners(0)\n mergedStream.add = addStream\n mergedStream.on('unpipe', function (stream) {\n stream.emit('merge2UnpipeEnd')\n })\n\n if (args.length) {\n addStream.apply(null, args)\n }\n return mergedStream\n}\n\n// check and pause streams for pipe.\nfunction pauseStreams (streams, options) {\n if (!Array.isArray(streams)) {\n // Backwards-compat with old-style streams\n if (!streams._readableState && streams.pipe) {\n streams = streams.pipe(PassThrough(options))\n }\n if (!streams._readableState || !streams.pause || !streams.pipe) {\n throw new Error('Only readable stream can be merged.')\n }\n streams.pause()\n } else {\n for (let i = 0, len = streams.length; i < len; i++) {\n streams[i] = pauseStreams(streams[i], options)\n }\n }\n return streams\n}\n","'use strict';\n\nconst util = require('util');\nconst braces = require('braces');\nconst picomatch = require('picomatch');\nconst utils = require('picomatch/lib/utils');\n\nconst isEmptyString = v => v === '' || v === './';\nconst hasBraces = v => {\n const index = v.indexOf('{');\n return index > -1 && v.indexOf('}', index) > -1;\n};\n\n/**\n * Returns an array of strings that match one or more glob patterns.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm(list, patterns[, options]);\n *\n * console.log(mm(['a.js', 'a.txt'], ['*.js']));\n * //=> [ 'a.js' ]\n * ```\n * @param {String|Array<string>} `list` List of strings to match.\n * @param {String|Array<string>} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options)\n * @return {Array} Returns an array of matches\n * @summary false\n * @api public\n */\n\nconst micromatch = (list, patterns, options) => {\n patterns = [].concat(patterns);\n list = [].concat(list);\n\n let omit = new Set();\n let keep = new Set();\n let items = new Set();\n let negatives = 0;\n\n let onResult = state => {\n items.add(state.output);\n if (options && options.onResult) {\n options.onResult(state);\n }\n };\n\n for (let i = 0; i < patterns.length; i++) {\n let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);\n let negated = isMatch.state.negated || isMatch.state.negatedExtglob;\n if (negated) negatives++;\n\n for (let item of list) {\n let matched = isMatch(item, true);\n\n let match = negated ? !matched.isMatch : matched.isMatch;\n if (!match) continue;\n\n if (negated) {\n omit.add(matched.output);\n } else {\n omit.delete(matched.output);\n keep.add(matched.output);\n }\n }\n }\n\n let result = negatives === patterns.length ? [...items] : [...keep];\n let matches = result.filter(item => !omit.has(item));\n\n if (options && matches.length === 0) {\n if (options.failglob === true) {\n throw new Error(`No matches found for \"${patterns.join(', ')}\"`);\n }\n\n if (options.nonull === true || options.nullglob === true) {\n return options.unescape ? patterns.map(p => p.replace(/\\\\/g, '')) : patterns;\n }\n }\n\n return matches;\n};\n\n/**\n * Backwards compatibility\n */\n\nmicromatch.match = micromatch;\n\n/**\n * Returns a matcher function from the given glob `pattern` and `options`.\n * The returned function takes a string to match as its only argument and returns\n * true if the string is a match.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.matcher(pattern[, options]);\n *\n * const isMatch = mm.matcher('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @param {String} `pattern` Glob pattern\n * @param {Object} `options`\n * @return {Function} Returns a matcher function.\n * @api public\n */\n\nmicromatch.matcher = (pattern, options) => picomatch(pattern, options);\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.isMatch(string, patterns[, options]);\n *\n * console.log(mm.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(mm.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String} `str` The string to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `[options]` See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Backwards compatibility\n */\n\nmicromatch.any = micromatch.isMatch;\n\n/**\n * Returns a list of strings that _**do not match any**_ of the given `patterns`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.not(list, patterns[, options]);\n *\n * console.log(mm.not(['a.a', 'b.b', 'c.c'], '*.a'));\n * //=> ['b.b', 'c.c']\n * ```\n * @param {Array} `list` Array of strings to match.\n * @param {String|Array} `patterns` One or more glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Array} Returns an array of strings that **do not match** the given patterns.\n * @api public\n */\n\nmicromatch.not = (list, patterns, options = {}) => {\n patterns = [].concat(patterns).map(String);\n let result = new Set();\n let items = [];\n\n let onResult = state => {\n if (options.onResult) options.onResult(state);\n items.push(state.output);\n };\n\n let matches = new Set(micromatch(list, patterns, { ...options, onResult }));\n\n for (let item of items) {\n if (!matches.has(item)) {\n result.add(item);\n }\n }\n return [...result];\n};\n\n/**\n * Returns true if the given `string` contains the given pattern. Similar\n * to [.isMatch](#isMatch) but the pattern can match any part of the string.\n *\n * ```js\n * var mm = require('micromatch');\n * // mm.contains(string, pattern[, options]);\n *\n * console.log(mm.contains('aa/bb/cc', '*b'));\n * //=> true\n * console.log(mm.contains('aa/bb/cc', '*d'));\n * //=> false\n * ```\n * @param {String} `str` The string to match.\n * @param {String|Array} `patterns` Glob pattern to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any of the patterns matches any part of `str`.\n * @api public\n */\n\nmicromatch.contains = (str, pattern, options) => {\n if (typeof str !== 'string') {\n throw new TypeError(`Expected a string: \"${util.inspect(str)}\"`);\n }\n\n if (Array.isArray(pattern)) {\n return pattern.some(p => micromatch.contains(str, p, options));\n }\n\n if (typeof pattern === 'string') {\n if (isEmptyString(str) || isEmptyString(pattern)) {\n return false;\n }\n\n if (str.includes(pattern) || (str.startsWith('./') && str.slice(2).includes(pattern))) {\n return true;\n }\n }\n\n return micromatch.isMatch(str, pattern, { ...options, contains: true });\n};\n\n/**\n * Filter the keys of the given object with the given `glob` pattern\n * and `options`. Does not attempt to match nested keys. If you need this feature,\n * use [glob-object][] instead.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.matchKeys(object, patterns[, options]);\n *\n * const obj = { aa: 'a', ab: 'b', ac: 'c' };\n * console.log(mm.matchKeys(obj, '*b'));\n * //=> { ab: 'b' }\n * ```\n * @param {Object} `object` The object with keys to filter.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Object} Returns an object with only keys that match the given patterns.\n * @api public\n */\n\nmicromatch.matchKeys = (obj, patterns, options) => {\n if (!utils.isObject(obj)) {\n throw new TypeError('Expected the first argument to be an object');\n }\n let keys = micromatch(Object.keys(obj), patterns, options);\n let res = {};\n for (let key of keys) res[key] = obj[key];\n return res;\n};\n\n/**\n * Returns true if some of the strings in the given `list` match any of the given glob `patterns`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.some(list, patterns[, options]);\n *\n * console.log(mm.some(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n * // true\n * console.log(mm.some(['foo.js'], ['*.js', '!foo.js']));\n * // false\n * ```\n * @param {String|Array} `list` The string or array of strings to test. Returns as soon as the first match is found.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any `patterns` matches any of the strings in `list`\n * @api public\n */\n\nmicromatch.some = (list, patterns, options) => {\n let items = [].concat(list);\n\n for (let pattern of [].concat(patterns)) {\n let isMatch = picomatch(String(pattern), options);\n if (items.some(item => isMatch(item))) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * Returns true if every string in the given `list` matches\n * any of the given glob `patterns`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.every(list, patterns[, options]);\n *\n * console.log(mm.every('foo.js', ['foo.js']));\n * // true\n * console.log(mm.every(['foo.js', 'bar.js'], ['*.js']));\n * // true\n * console.log(mm.every(['foo.js', 'bar.js'], ['*.js', '!foo.js']));\n * // false\n * console.log(mm.every(['foo.js'], ['*.js', '!foo.js']));\n * // false\n * ```\n * @param {String|Array} `list` The string or array of strings to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if all `patterns` matches all of the strings in `list`\n * @api public\n */\n\nmicromatch.every = (list, patterns, options) => {\n let items = [].concat(list);\n\n for (let pattern of [].concat(patterns)) {\n let isMatch = picomatch(String(pattern), options);\n if (!items.every(item => isMatch(item))) {\n return false;\n }\n }\n return true;\n};\n\n/**\n * Returns true if **all** of the given `patterns` match\n * the specified string.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.all(string, patterns[, options]);\n *\n * console.log(mm.all('foo.js', ['foo.js']));\n * // true\n *\n * console.log(mm.all('foo.js', ['*.js', '!foo.js']));\n * // false\n *\n * console.log(mm.all('foo.js', ['*.js', 'foo.js']));\n * // true\n *\n * console.log(mm.all('foo.js', ['*.js', 'f*', '*o*', '*o.js']));\n * // true\n * ```\n * @param {String|Array} `str` The string to test.\n * @param {String|Array} `patterns` One or more glob patterns to use for matching.\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\nmicromatch.all = (str, patterns, options) => {\n if (typeof str !== 'string') {\n throw new TypeError(`Expected a string: \"${util.inspect(str)}\"`);\n }\n\n return [].concat(patterns).every(p => picomatch(p, options)(str));\n};\n\n/**\n * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.capture(pattern, string[, options]);\n *\n * console.log(mm.capture('test/*.js', 'test/foo.js'));\n * //=> ['foo']\n * console.log(mm.capture('test/*.js', 'foo/bar.css'));\n * //=> null\n * ```\n * @param {String} `glob` Glob pattern to use for matching.\n * @param {String} `input` String to match\n * @param {Object} `options` See available [options](#options) for changing how matches are performed\n * @return {Array|null} Returns an array of captures if the input matches the glob pattern, otherwise `null`.\n * @api public\n */\n\nmicromatch.capture = (glob, input, options) => {\n let posix = utils.isWindows(options);\n let regex = picomatch.makeRe(String(glob), { ...options, capture: true });\n let match = regex.exec(posix ? utils.toPosixSlashes(input) : input);\n\n if (match) {\n return match.slice(1).map(v => v === void 0 ? '' : v);\n }\n};\n\n/**\n * Create a regular expression from the given glob `pattern`.\n *\n * ```js\n * const mm = require('micromatch');\n * // mm.makeRe(pattern[, options]);\n *\n * console.log(mm.makeRe('*.js'));\n * //=> /^(?:(\\.[\\\\\\/])?(?!\\.)(?=.)[^\\/]*?\\.js)$/\n * ```\n * @param {String} `pattern` A glob pattern to convert to regex.\n * @param {Object} `options`\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\nmicromatch.makeRe = (...args) => picomatch.makeRe(...args);\n\n/**\n * Scan a glob pattern to separate the pattern into segments. Used\n * by the [split](#split) method.\n *\n * ```js\n * const mm = require('micromatch');\n * const state = mm.scan(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\nmicromatch.scan = (...args) => picomatch.scan(...args);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const mm = require('micromatch');\n * const state = mm.parse(pattern[, options]);\n * ```\n * @param {String} `glob`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as regex source string.\n * @api public\n */\n\nmicromatch.parse = (patterns, options) => {\n let res = [];\n for (let pattern of [].concat(patterns || [])) {\n for (let str of braces(String(pattern), options)) {\n res.push(picomatch.parse(str, options));\n }\n }\n return res;\n};\n\n/**\n * Process the given brace `pattern`.\n *\n * ```js\n * const { braces } = require('micromatch');\n * console.log(braces('foo/{a,b,c}/bar'));\n * //=> [ 'foo/(a|b|c)/bar' ]\n *\n * console.log(braces('foo/{a,b,c}/bar', { expand: true }));\n * //=> [ 'foo/a/bar', 'foo/b/bar', 'foo/c/bar' ]\n * ```\n * @param {String} `pattern` String with brace pattern to process.\n * @param {Object} `options` Any [options](#options) to change how expansion is performed. See the [braces][] library for all available options.\n * @return {Array}\n * @api public\n */\n\nmicromatch.braces = (pattern, options) => {\n if (typeof pattern !== 'string') throw new TypeError('Expected a string');\n if ((options && options.nobrace === true) || !hasBraces(pattern)) {\n return [pattern];\n }\n return braces(pattern, options);\n};\n\n/**\n * Expand braces\n */\n\nmicromatch.braceExpand = (pattern, options) => {\n if (typeof pattern !== 'string') throw new TypeError('Expected a string');\n return micromatch.braces(pattern, { ...options, expand: true });\n};\n\n/**\n * Expose micromatch\n */\n\n// exposed for tests\nmicromatch.hasBraces = hasBraces;\nmodule.exports = micromatch;\n","module.exports = minimatch\nminimatch.Minimatch = Minimatch\n\nvar path = (function () { try { return require('path') } catch (e) {}}()) || {\n sep: '/'\n}\nminimatch.sep = path.sep\n\nvar GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}\nvar expand = require('brace-expansion')\n\nvar plTypes = {\n '!': { open: '(?:(?!(?:', close: '))[^/]*?)'},\n '?': { open: '(?:', close: ')?' },\n '+': { open: '(?:', close: ')+' },\n '*': { open: '(?:', close: ')*' },\n '@': { open: '(?:', close: ')' }\n}\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nvar qmark = '[^/]'\n\n// * => any number of characters\nvar star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nvar twoStarDot = '(?:(?!(?:\\\\\\/|^)(?:\\\\.{1,2})($|\\\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nvar twoStarNoDot = '(?:(?!(?:\\\\\\/|^)\\\\.).)*?'\n\n// characters that need to be escaped in RegExp.\nvar reSpecials = charSet('().*{}+?[]^$\\\\!')\n\n// \"abc\" -> { a:true, b:true, c:true }\nfunction charSet (s) {\n return s.split('').reduce(function (set, c) {\n set[c] = true\n return set\n }, {})\n}\n\n// normalizes slashes.\nvar slashSplit = /\\/+/\n\nminimatch.filter = filter\nfunction filter (pattern, options) {\n options = options || {}\n return function (p, i, list) {\n return minimatch(p, pattern, options)\n }\n}\n\nfunction ext (a, b) {\n b = b || {}\n var t = {}\n Object.keys(a).forEach(function (k) {\n t[k] = a[k]\n })\n Object.keys(b).forEach(function (k) {\n t[k] = b[k]\n })\n return t\n}\n\nminimatch.defaults = function (def) {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch\n }\n\n var orig = minimatch\n\n var m = function minimatch (p, pattern, options) {\n return orig(p, pattern, ext(def, options))\n }\n\n m.Minimatch = function Minimatch (pattern, options) {\n return new orig.Minimatch(pattern, ext(def, options))\n }\n m.Minimatch.defaults = function defaults (options) {\n return orig.defaults(ext(def, options)).Minimatch\n }\n\n m.filter = function filter (pattern, options) {\n return orig.filter(pattern, ext(def, options))\n }\n\n m.defaults = function defaults (options) {\n return orig.defaults(ext(def, options))\n }\n\n m.makeRe = function makeRe (pattern, options) {\n return orig.makeRe(pattern, ext(def, options))\n }\n\n m.braceExpand = function braceExpand (pattern, options) {\n return orig.braceExpand(pattern, ext(def, options))\n }\n\n m.match = function (list, pattern, options) {\n return orig.match(list, pattern, ext(def, options))\n }\n\n return m\n}\n\nMinimatch.defaults = function (def) {\n return minimatch.defaults(def).Minimatch\n}\n\nfunction minimatch (p, pattern, options) {\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n return new Minimatch(pattern, options).match(p)\n}\n\nfunction Minimatch (pattern, options) {\n if (!(this instanceof Minimatch)) {\n return new Minimatch(pattern, options)\n }\n\n assertValidPattern(pattern)\n\n if (!options) options = {}\n\n pattern = pattern.trim()\n\n // windows support: need to use /, not \\\n if (!options.allowWindowsEscape && path.sep !== '/') {\n pattern = pattern.split(path.sep).join('/')\n }\n\n this.options = options\n this.set = []\n this.pattern = pattern\n this.regexp = null\n this.negate = false\n this.comment = false\n this.empty = false\n this.partial = !!options.partial\n\n // make the set of regexps etc.\n this.make()\n}\n\nMinimatch.prototype.debug = function () {}\n\nMinimatch.prototype.make = make\nfunction make () {\n var pattern = this.pattern\n var options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n var set = this.globSet = this.braceExpand()\n\n if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }\n\n this.debug(this.pattern, set)\n\n // step 3: now we have a set, so turn each one into a series of path-portion\n // matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n set = this.globParts = set.map(function (s) {\n return s.split(slashSplit)\n })\n\n this.debug(this.pattern, set)\n\n // glob --> regexps\n set = set.map(function (s, si, set) {\n return s.map(this.parse, this)\n }, this)\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n set = set.filter(function (s) {\n return s.indexOf(false) === -1\n })\n\n this.debug(this.pattern, set)\n\n this.set = set\n}\n\nMinimatch.prototype.parseNegate = parseNegate\nfunction parseNegate () {\n var pattern = this.pattern\n var negate = false\n var options = this.options\n var negateOffset = 0\n\n if (options.nonegate) return\n\n for (var i = 0, l = pattern.length\n ; i < l && pattern.charAt(i) === '!'\n ; i++) {\n negate = !negate\n negateOffset++\n }\n\n if (negateOffset) this.pattern = pattern.substr(negateOffset)\n this.negate = negate\n}\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nminimatch.braceExpand = function (pattern, options) {\n return braceExpand(pattern, options)\n}\n\nMinimatch.prototype.braceExpand = braceExpand\n\nfunction braceExpand (pattern, options) {\n if (!options) {\n if (this instanceof Minimatch) {\n options = this.options\n } else {\n options = {}\n }\n }\n\n pattern = typeof pattern === 'undefined'\n ? this.pattern : pattern\n\n assertValidPattern(pattern)\n\n // Thanks to Yeting Li <https://github.com/yetingli> for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern)\n}\n\nvar MAX_PATTERN_LENGTH = 1024 * 64\nvar assertValidPattern = function (pattern) {\n if (typeof pattern !== 'string') {\n throw new TypeError('invalid pattern')\n }\n\n if (pattern.length > MAX_PATTERN_LENGTH) {\n throw new TypeError('pattern is too long')\n }\n}\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\nMinimatch.prototype.parse = parse\nvar SUBPARSE = {}\nfunction parse (pattern, isSub) {\n assertValidPattern(pattern)\n\n var options = this.options\n\n // shortcuts\n if (pattern === '**') {\n if (!options.noglobstar)\n return GLOBSTAR\n else\n pattern = '*'\n }\n if (pattern === '') return ''\n\n var re = ''\n var hasMagic = !!options.nocase\n var escaping = false\n // ? => one single character\n var patternListStack = []\n var negativeLists = []\n var stateChar\n var inClass = false\n var reClassStart = -1\n var classStart = -1\n // . and .. never match anything that doesn't start with .,\n // even when options.dot is set.\n var patternStart = pattern.charAt(0) === '.' ? '' // anything\n // not (start or / followed by . or .. followed by / or end)\n : options.dot ? '(?!(?:^|\\\\\\/)\\\\.{1,2}(?:$|\\\\\\/))'\n : '(?!\\\\.)'\n var self = this\n\n function clearStateChar () {\n if (stateChar) {\n // we had some state-tracking character\n // that wasn't consumed by this pass.\n switch (stateChar) {\n case '*':\n re += star\n hasMagic = true\n break\n case '?':\n re += qmark\n hasMagic = true\n break\n default:\n re += '\\\\' + stateChar\n break\n }\n self.debug('clearStateChar %j %j', stateChar, re)\n stateChar = false\n }\n }\n\n for (var i = 0, len = pattern.length, c\n ; (i < len) && (c = pattern.charAt(i))\n ; i++) {\n this.debug('%s\\t%s %s %j', pattern, i, re, c)\n\n // skip over any that are escaped.\n if (escaping && reSpecials[c]) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n switch (c) {\n /* istanbul ignore next */\n case '/': {\n // completely not allowed, even escaped.\n // Should already be path-split by now.\n return false\n }\n\n case '\\\\':\n clearStateChar()\n escaping = true\n continue\n\n // the various stateChar values\n // for the \"extglob\" stuff.\n case '?':\n case '*':\n case '+':\n case '@':\n case '!':\n this.debug('%s\\t%s %s %j <-- stateChar', pattern, i, re, c)\n\n // all of those are literals inside a class, except that\n // the glob [!a] means [^a] in regexp\n if (inClass) {\n this.debug(' in class')\n if (c === '!' && i === classStart + 1) c = '^'\n re += c\n continue\n }\n\n // if we already have a stateChar, then it means\n // that there was something like ** or +? in there.\n // Handle the stateChar, then proceed with this one.\n self.debug('call clearStateChar %j', stateChar)\n clearStateChar()\n stateChar = c\n // if extglob is disabled, then +(asdf|foo) isn't a thing.\n // just clear the statechar *now*, rather than even diving into\n // the patternList stuff.\n if (options.noext) clearStateChar()\n continue\n\n case '(':\n if (inClass) {\n re += '('\n continue\n }\n\n if (!stateChar) {\n re += '\\\\('\n continue\n }\n\n patternListStack.push({\n type: stateChar,\n start: i - 1,\n reStart: re.length,\n open: plTypes[stateChar].open,\n close: plTypes[stateChar].close\n })\n // negation is (?:(?!js)[^/]*)\n re += stateChar === '!' ? '(?:(?!(?:' : '(?:'\n this.debug('plType %j %j', stateChar, re)\n stateChar = false\n continue\n\n case ')':\n if (inClass || !patternListStack.length) {\n re += '\\\\)'\n continue\n }\n\n clearStateChar()\n hasMagic = true\n var pl = patternListStack.pop()\n // negation is (?:(?!js)[^/]*)\n // The others are (?:<pattern>)<type>\n re += pl.close\n if (pl.type === '!') {\n negativeLists.push(pl)\n }\n pl.reEnd = re.length\n continue\n\n case '|':\n if (inClass || !patternListStack.length || escaping) {\n re += '\\\\|'\n escaping = false\n continue\n }\n\n clearStateChar()\n re += '|'\n continue\n\n // these are mostly the same in regexp and glob\n case '[':\n // swallow any state-tracking char before the [\n clearStateChar()\n\n if (inClass) {\n re += '\\\\' + c\n continue\n }\n\n inClass = true\n classStart = i\n reClassStart = re.length\n re += c\n continue\n\n case ']':\n // a right bracket shall lose its special\n // meaning and represent itself in\n // a bracket expression if it occurs\n // first in the list. -- POSIX.2 2.8.3.2\n if (i === classStart + 1 || !inClass) {\n re += '\\\\' + c\n escaping = false\n continue\n }\n\n // handle the case where we left a class open.\n // \"[z-a]\" is valid, equivalent to \"\\[z-a\\]\"\n // split where the last [ was, make sure we don't have\n // an invalid re. if so, re-walk the contents of the\n // would-be class to re-translate any characters that\n // were passed through as-is\n // TODO: It would probably be faster to determine this\n // without a try/catch and a new RegExp, but it's tricky\n // to do safely. For now, this is safe and works.\n var cs = pattern.substring(classStart + 1, i)\n try {\n RegExp('[' + cs + ']')\n } catch (er) {\n // not a valid class!\n var sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0] + '\\\\]'\n hasMagic = hasMagic || sp[1]\n inClass = false\n continue\n }\n\n // finish up the class.\n hasMagic = true\n inClass = false\n re += c\n continue\n\n default:\n // swallow any state char that wasn't consumed\n clearStateChar()\n\n if (escaping) {\n // no need\n escaping = false\n } else if (reSpecials[c]\n && !(c === '^' && inClass)) {\n re += '\\\\'\n }\n\n re += c\n\n } // switch\n } // for\n\n // handle the case where we left a class open.\n // \"[abc\" is valid, equivalent to \"\\[abc\"\n if (inClass) {\n // split where the last [ was, and escape it\n // this is a huge pita. We now have to re-walk\n // the contents of the would-be class to re-translate\n // any characters that were passed through as-is\n cs = pattern.substr(classStart + 1)\n sp = this.parse(cs, SUBPARSE)\n re = re.substr(0, reClassStart) + '\\\\[' + sp[0]\n hasMagic = hasMagic || sp[1]\n }\n\n // handle the case where we had a +( thing at the *end*\n // of the pattern.\n // each pattern list stack adds 3 chars, and we need to go through\n // and escape any | chars that were passed through as-is for the regexp.\n // Go through and escape them, taking care not to double-escape any\n // | chars that were already escaped.\n for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {\n var tail = re.slice(pl.reStart + pl.open.length)\n this.debug('setting tail', re, pl)\n // maybe some even number of \\, then maybe 1 \\, followed by a |\n tail = tail.replace(/((?:\\\\{2}){0,64})(\\\\?)\\|/g, function (_, $1, $2) {\n if (!$2) {\n // the | isn't already escaped, so escape it.\n $2 = '\\\\'\n }\n\n // need to escape all those slashes *again*, without escaping the\n // one that we need for escaping the | character. As it works out,\n // escaping an even number of slashes can be done by simply repeating\n // it exactly after itself. That's why this trick works.\n //\n // I am sorry that you have to see this.\n return $1 + $1 + $2 + '|'\n })\n\n this.debug('tail=%j\\n %s', tail, tail, pl, re)\n var t = pl.type === '*' ? star\n : pl.type === '?' ? qmark\n : '\\\\' + pl.type\n\n hasMagic = true\n re = re.slice(0, pl.reStart) + t + '\\\\(' + tail\n }\n\n // handle trailing things that only matter at the very end.\n clearStateChar()\n if (escaping) {\n // trailing \\\\\n re += '\\\\\\\\'\n }\n\n // only need to apply the nodot start if the re starts with\n // something that could conceivably capture a dot\n var addPatternStart = false\n switch (re.charAt(0)) {\n case '[': case '.': case '(': addPatternStart = true\n }\n\n // Hack to work around lack of negative lookbehind in JS\n // A pattern like: *.!(x).!(y|z) needs to ensure that a name\n // like 'a.xyz.yz' doesn't match. So, the first negative\n // lookahead, has to look ALL the way ahead, to the end of\n // the pattern.\n for (var n = negativeLists.length - 1; n > -1; n--) {\n var nl = negativeLists[n]\n\n var nlBefore = re.slice(0, nl.reStart)\n var nlFirst = re.slice(nl.reStart, nl.reEnd - 8)\n var nlLast = re.slice(nl.reEnd - 8, nl.reEnd)\n var nlAfter = re.slice(nl.reEnd)\n\n nlLast += nlAfter\n\n // Handle nested stuff like *(*.js|!(*.json)), where open parens\n // mean that we should *not* include the ) in the bit that is considered\n // \"after\" the negated section.\n var openParensBefore = nlBefore.split('(').length - 1\n var cleanAfter = nlAfter\n for (i = 0; i < openParensBefore; i++) {\n cleanAfter = cleanAfter.replace(/\\)[+*?]?/, '')\n }\n nlAfter = cleanAfter\n\n var dollar = ''\n if (nlAfter === '' && isSub !== SUBPARSE) {\n dollar = '$'\n }\n var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast\n re = newRe\n }\n\n // if the re is not \"\" at this point, then we need to make sure\n // it doesn't match against an empty path part.\n // Otherwise a/* will match a/, which it should not.\n if (re !== '' && hasMagic) {\n re = '(?=.)' + re\n }\n\n if (addPatternStart) {\n re = patternStart + re\n }\n\n // parsing just a piece of a larger pattern.\n if (isSub === SUBPARSE) {\n return [re, hasMagic]\n }\n\n // skip the regexp for non-magical patterns\n // unescape anything in it, though, so that it'll be\n // an exact match against a file etc.\n if (!hasMagic) {\n return globUnescape(pattern)\n }\n\n var flags = options.nocase ? 'i' : ''\n try {\n var regExp = new RegExp('^' + re + '$', flags)\n } catch (er) /* istanbul ignore next - should be impossible */ {\n // If it was an invalid regular expression, then it can't match\n // anything. This trick looks for a character after the end of\n // the string, which is of course impossible, except in multi-line\n // mode, but it's not a /m regex.\n return new RegExp('$.')\n }\n\n regExp._glob = pattern\n regExp._src = re\n\n return regExp\n}\n\nminimatch.makeRe = function (pattern, options) {\n return new Minimatch(pattern, options || {}).makeRe()\n}\n\nMinimatch.prototype.makeRe = makeRe\nfunction makeRe () {\n if (this.regexp || this.regexp === false) return this.regexp\n\n // at this point, this.set is a 2d array of partial\n // pattern strings, or \"**\".\n //\n // It's better to use .match(). This function shouldn't\n // be used, really, but it's pretty convenient sometimes,\n // when you just want to work with a regex.\n var set = this.set\n\n if (!set.length) {\n this.regexp = false\n return this.regexp\n }\n var options = this.options\n\n var twoStar = options.noglobstar ? star\n : options.dot ? twoStarDot\n : twoStarNoDot\n var flags = options.nocase ? 'i' : ''\n\n var re = set.map(function (pattern) {\n return pattern.map(function (p) {\n return (p === GLOBSTAR) ? twoStar\n : (typeof p === 'string') ? regExpEscape(p)\n : p._src\n }).join('\\\\\\/')\n }).join('|')\n\n // must match entire pattern\n // ending in a * or ** will make it less strict.\n re = '^(?:' + re + ')$'\n\n // can match anything, as long as it's not this.\n if (this.negate) re = '^(?!' + re + ').*$'\n\n try {\n this.regexp = new RegExp(re, flags)\n } catch (ex) /* istanbul ignore next - should be impossible */ {\n this.regexp = false\n }\n return this.regexp\n}\n\nminimatch.match = function (list, pattern, options) {\n options = options || {}\n var mm = new Minimatch(pattern, options)\n list = list.filter(function (f) {\n return mm.match(f)\n })\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\n\nMinimatch.prototype.match = function match (f, partial) {\n if (typeof partial === 'undefined') partial = this.partial\n this.debug('match', f, this.pattern)\n // short-circuit in the case of busted things.\n // comments, etc.\n if (this.comment) return false\n if (this.empty) return f === ''\n\n if (f === '/' && partial) return true\n\n var options = this.options\n\n // windows: need to use /, not \\\n if (path.sep !== '/') {\n f = f.split(path.sep).join('/')\n }\n\n // treat the test path as a set of pathparts.\n f = f.split(slashSplit)\n this.debug(this.pattern, 'split', f)\n\n // just ONE of the pattern sets in this.set needs to match\n // in order for it to be valid. If negating, then just one\n // match means that we have failed.\n // Either way, return on the first hit.\n\n var set = this.set\n this.debug(this.pattern, 'set', set)\n\n // Find the basename of the path by looking for the last non-empty segment\n var filename\n var i\n for (i = f.length - 1; i >= 0; i--) {\n filename = f[i]\n if (filename) break\n }\n\n for (i = 0; i < set.length; i++) {\n var pattern = set[i]\n var file = f\n if (options.matchBase && pattern.length === 1) {\n file = [filename]\n }\n var hit = this.matchOne(file, pattern, partial)\n if (hit) {\n if (options.flipNegate) return true\n return !this.negate\n }\n }\n\n // didn't get any hits. this is success if it's a negative\n // pattern, failure otherwise.\n if (options.flipNegate) return false\n return this.negate\n}\n\n// set partial to true to test if, for example,\n// \"/a/b\" matches the start of \"/*/b/*/d\"\n// Partial means, if you run out of file before you run\n// out of pattern, then that's fine, as long as all\n// the parts match.\nMinimatch.prototype.matchOne = function (file, pattern, partial) {\n var options = this.options\n\n this.debug('matchOne',\n { 'this': this, file: file, pattern: pattern })\n\n this.debug('matchOne', file.length, pattern.length)\n\n for (var fi = 0,\n pi = 0,\n fl = file.length,\n pl = pattern.length\n ; (fi < fl) && (pi < pl)\n ; fi++, pi++) {\n this.debug('matchOne loop')\n var p = pattern[pi]\n var f = file[fi]\n\n this.debug(pattern, p, f)\n\n // should be impossible.\n // some invalid regexp stuff in the set.\n /* istanbul ignore if */\n if (p === false) return false\n\n if (p === GLOBSTAR) {\n this.debug('GLOBSTAR', [pattern, p, f])\n\n // \"**\"\n // a/**/b/**/c would match the following:\n // a/b/x/y/z/c\n // a/x/y/z/b/c\n // a/b/x/b/x/c\n // a/b/c\n // To do this, take the rest of the pattern after\n // the **, and see if it would match the file remainder.\n // If so, return success.\n // If not, the ** \"swallows\" a segment, and try again.\n // This is recursively awful.\n //\n // a/**/b/**/c matching a/b/x/y/z/c\n // - a matches a\n // - doublestar\n // - matchOne(b/x/y/z/c, b/**/c)\n // - b matches b\n // - doublestar\n // - matchOne(x/y/z/c, c) -> no\n // - matchOne(y/z/c, c) -> no\n // - matchOne(z/c, c) -> no\n // - matchOne(c, c) yes, hit\n var fr = fi\n var pr = pi + 1\n if (pr === pl) {\n this.debug('** at the end')\n // a ** at the end will just swallow the rest.\n // We have found a match.\n // however, it will not swallow /.x, unless\n // options.dot is set.\n // . and .. are *never* matched by **, for explosively\n // exponential reasons.\n for (; fi < fl; fi++) {\n if (file[fi] === '.' || file[fi] === '..' ||\n (!options.dot && file[fi].charAt(0) === '.')) return false\n }\n return true\n }\n\n // ok, let's see if we can swallow whatever we can.\n while (fr < fl) {\n var swallowee = file[fr]\n\n this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n // XXX remove this slice. Just pass the start index.\n if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n this.debug('globstar found match!', fr, fl, swallowee)\n // found a match.\n return true\n } else {\n // can't swallow \".\" or \"..\" ever.\n // can only swallow \".foo\" when explicitly asked.\n if (swallowee === '.' || swallowee === '..' ||\n (!options.dot && swallowee.charAt(0) === '.')) {\n this.debug('dot detected!', file, fr, pattern, pr)\n break\n }\n\n // ** swallows a segment, and continue.\n this.debug('globstar swallow a segment, and continue')\n fr++\n }\n }\n\n // no match was found.\n // However, in partial mode, we can't say this is necessarily over.\n // If there's more *pattern* left, then\n /* istanbul ignore if */\n if (partial) {\n // ran out of file\n this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n if (fr === fl) return true\n }\n return false\n }\n\n // something other than **\n // non-magic patterns just have to match exactly\n // patterns with magic have been turned into regexps.\n var hit\n if (typeof p === 'string') {\n hit = f === p\n this.debug('string match', p, f, hit)\n } else {\n hit = f.match(p)\n this.debug('pattern match', p, f, hit)\n }\n\n if (!hit) return false\n }\n\n // Note: ending in / means that we'll get a final \"\"\n // at the end of the pattern. This can only match a\n // corresponding \"\" at the end of the file.\n // If the file ends in /, then it can only match a\n // a pattern that ends in /, unless the pattern just\n // doesn't have any more for it. But, a/b/ should *not*\n // match \"a/b/*\", even though \"\" matches against the\n // [^/]*? pattern, except in partial mode, where it might\n // simply not be reached yet.\n // However, a/b/ should still satisfy a/*\n\n // now either we fell off the end of the pattern, or we're done.\n if (fi === fl && pi === pl) {\n // ran out of pattern and filename at the same time.\n // an exact hit!\n return true\n } else if (fi === fl) {\n // ran out of file, but still had pattern left.\n // this is ok if we're doing the match as part of\n // a glob fs traversal.\n return partial\n } else /* istanbul ignore else */ if (pi === pl) {\n // ran out of pattern, still have file left.\n // this is only acceptable if we're on the very last\n // empty segment of a file with a trailing slash.\n // a/* should match a/b/\n return (fi === fl - 1) && (file[fi] === '')\n }\n\n // should be unreachable.\n /* istanbul ignore next */\n throw new Error('wtf?')\n}\n\n// replace stuff like \\* with *\nfunction globUnescape (s) {\n return s.replace(/\\\\(.)/g, '$1')\n}\n\nfunction regExpEscape (s) {\n return s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n}\n","/*!\n * normalize-path <https://github.com/jonschlinkert/normalize-path>\n *\n * Copyright (c) 2014-2018, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nmodule.exports = function(path, stripTrailing) {\n if (typeof path !== 'string') {\n throw new TypeError('expected path to be a string');\n }\n\n if (path === '\\\\' || path === '/') return '/';\n\n var len = path.length;\n if (len <= 1) return path;\n\n // ensure that win32 namespaces has two leading slashes, so that the path is\n // handled properly by the win32 version of path.parse() after being normalized\n // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces\n var prefix = '';\n if (len > 4 && path[3] === '\\\\') {\n var ch = path[2];\n if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\\\\\') {\n path = path.slice(2);\n prefix = '//';\n }\n }\n\n var segs = path.split(/[/\\\\]+/);\n if (stripTrailing !== false && segs[segs.length - 1] === '') {\n segs.pop();\n }\n return prefix + segs.join('/');\n};\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","var wrappy = require('wrappy')\nmodule.exports = wrappy(once)\nmodule.exports.strict = wrappy(onceStrict)\n\nonce.proto = once(function () {\n Object.defineProperty(Function.prototype, 'once', {\n value: function () {\n return once(this)\n },\n configurable: true\n })\n\n Object.defineProperty(Function.prototype, 'onceStrict', {\n value: function () {\n return onceStrict(this)\n },\n configurable: true\n })\n})\n\nfunction once (fn) {\n var f = function () {\n if (f.called) return f.value\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n f.called = false\n return f\n}\n\nfunction onceStrict (fn) {\n var f = function () {\n if (f.called)\n throw new Error(f.onceError)\n f.called = true\n return f.value = fn.apply(this, arguments)\n }\n var name = fn.name || 'Function wrapped with `once`'\n f.onceError = name + \" shouldn't be called more than once\"\n f.called = false\n return f\n}\n","'use strict';\n\nconst pMap = (iterable, mapper, options) => new Promise((resolve, reject) => {\n\toptions = Object.assign({\n\t\tconcurrency: Infinity\n\t}, options);\n\n\tif (typeof mapper !== 'function') {\n\t\tthrow new TypeError('Mapper function is required');\n\t}\n\n\tconst {concurrency} = options;\n\n\tif (!(typeof concurrency === 'number' && concurrency >= 1)) {\n\t\tthrow new TypeError(`Expected \\`concurrency\\` to be a number from 1 and up, got \\`${concurrency}\\` (${typeof concurrency})`);\n\t}\n\n\tconst ret = [];\n\tconst iterator = iterable[Symbol.iterator]();\n\tlet isRejected = false;\n\tlet isIterableDone = false;\n\tlet resolvingCount = 0;\n\tlet currentIndex = 0;\n\n\tconst next = () => {\n\t\tif (isRejected) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst nextItem = iterator.next();\n\t\tconst i = currentIndex;\n\t\tcurrentIndex++;\n\n\t\tif (nextItem.done) {\n\t\t\tisIterableDone = true;\n\n\t\t\tif (resolvingCount === 0) {\n\t\t\t\tresolve(ret);\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tresolvingCount++;\n\n\t\tPromise.resolve(nextItem.value)\n\t\t\t.then(element => mapper(element, i))\n\t\t\t.then(\n\t\t\t\tvalue => {\n\t\t\t\t\tret[i] = value;\n\t\t\t\t\tresolvingCount--;\n\t\t\t\t\tnext();\n\t\t\t\t},\n\t\t\t\terror => {\n\t\t\t\t\tisRejected = true;\n\t\t\t\t\treject(error);\n\t\t\t\t}\n\t\t\t);\n\t};\n\n\tfor (let i = 0; i < concurrency; i++) {\n\t\tnext();\n\n\t\tif (isIterableDone) {\n\t\t\tbreak;\n\t\t}\n\t}\n});\n\nmodule.exports = pMap;\n// TODO: Remove this for the next major release\nmodule.exports.default = pMap;\n","import AggregateError from 'aggregate-error';\n\n/**\nAn error to be thrown when the request is aborted by AbortController.\nDOMException is thrown instead of this Error when DOMException is available.\n*/\nexport class AbortError extends Error {\n\tconstructor(message) {\n\t\tsuper();\n\t\tthis.name = 'AbortError';\n\t\tthis.message = message;\n\t}\n}\n\n/**\nTODO: Remove AbortError and just throw DOMException when targeting Node 18.\n*/\nconst getDOMException = errorMessage => globalThis.DOMException === undefined\n\t? new AbortError(errorMessage)\n\t: new DOMException(errorMessage);\n\n/**\nTODO: Remove below function and just 'reject(signal.reason)' when targeting Node 18.\n*/\nconst getAbortedReason = signal => {\n\tconst reason = signal.reason === undefined\n\t\t? getDOMException('This operation was aborted.')\n\t\t: signal.reason;\n\n\treturn reason instanceof Error ? reason : getDOMException(reason);\n};\n\nexport default async function pMap(\n\titerable,\n\tmapper,\n\t{\n\t\tconcurrency = Number.POSITIVE_INFINITY,\n\t\tstopOnError = true,\n\t\tsignal,\n\t} = {},\n) {\n\treturn new Promise((resolve, reject_) => {\n\t\tif (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {\n\t\t\tthrow new TypeError(`Expected \\`input\\` to be either an \\`Iterable\\` or \\`AsyncIterable\\`, got (${typeof iterable})`);\n\t\t}\n\n\t\tif (typeof mapper !== 'function') {\n\t\t\tthrow new TypeError('Mapper function is required');\n\t\t}\n\n\t\tif (!((Number.isSafeInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency >= 1)) {\n\t\t\tthrow new TypeError(`Expected \\`concurrency\\` to be an integer from 1 and up or \\`Infinity\\`, got \\`${concurrency}\\` (${typeof concurrency})`);\n\t\t}\n\n\t\tconst result = [];\n\t\tconst errors = [];\n\t\tconst skippedIndexesMap = new Map();\n\t\tlet isRejected = false;\n\t\tlet isResolved = false;\n\t\tlet isIterableDone = false;\n\t\tlet resolvingCount = 0;\n\t\tlet currentIndex = 0;\n\t\tconst iterator = iterable[Symbol.iterator] === undefined ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();\n\n\t\tconst reject = reason => {\n\t\t\tisRejected = true;\n\t\t\tisResolved = true;\n\t\t\treject_(reason);\n\t\t};\n\n\t\tif (signal) {\n\t\t\tif (signal.aborted) {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t}\n\n\t\t\tsignal.addEventListener('abort', () => {\n\t\t\t\treject(getAbortedReason(signal));\n\t\t\t});\n\t\t}\n\n\t\tconst next = async () => {\n\t\t\tif (isResolved) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst nextItem = await iterator.next();\n\n\t\t\tconst index = currentIndex;\n\t\t\tcurrentIndex++;\n\n\t\t\t// Note: `iterator.next()` can be called many times in parallel.\n\t\t\t// This can cause multiple calls to this `next()` function to\n\t\t\t// receive a `nextItem` with `done === true`.\n\t\t\t// The shutdown logic that rejects/resolves must be protected\n\t\t\t// so it runs only one time as the `skippedIndex` logic is\n\t\t\t// non-idempotent.\n\t\t\tif (nextItem.done) {\n\t\t\t\tisIterableDone = true;\n\n\t\t\t\tif (resolvingCount === 0 && !isResolved) {\n\t\t\t\t\tif (!stopOnError && errors.length > 0) {\n\t\t\t\t\t\treject(new AggregateError(errors));\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tisResolved = true;\n\n\t\t\t\t\tif (skippedIndexesMap.size === 0) {\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst pureResult = [];\n\n\t\t\t\t\t// Support multiple `pMapSkip`'s.\n\t\t\t\t\tfor (const [index, value] of result.entries()) {\n\t\t\t\t\t\tif (skippedIndexesMap.get(index) === pMapSkip) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpureResult.push(value);\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(pureResult);\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tresolvingCount++;\n\n\t\t\t// Intentionally detached\n\t\t\t(async () => {\n\t\t\t\ttry {\n\t\t\t\t\tconst element = await nextItem.value;\n\n\t\t\t\t\tif (isResolved) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst value = await mapper(element, index);\n\n\t\t\t\t\t// Use Map to stage the index of the element.\n\t\t\t\t\tif (value === pMapSkip) {\n\t\t\t\t\t\tskippedIndexesMap.set(index, value);\n\t\t\t\t\t}\n\n\t\t\t\t\tresult[index] = value;\n\n\t\t\t\t\tresolvingCount--;\n\t\t\t\t\tawait next();\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (stopOnError) {\n\t\t\t\t\t\treject(error);\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrors.push(error);\n\t\t\t\t\t\tresolvingCount--;\n\n\t\t\t\t\t\t// In that case we can't really continue regardless of `stopOnError` state\n\t\t\t\t\t\t// since an iterable is likely to continue throwing after it throws once.\n\t\t\t\t\t\t// If we continue calling `next()` indefinitely we will likely end up\n\t\t\t\t\t\t// in an infinite loop of failed iteration.\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tawait next();\n\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\treject(error);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})();\n\t\t};\n\n\t\t// Create the concurrent runners in a detached (non-awaited)\n\t\t// promise. We need this so we can await the `next()` calls\n\t\t// to stop creating runners before hitting the concurrency limit\n\t\t// if the iterable has already been marked as done.\n\t\t// NOTE: We *must* do this for async iterators otherwise we'll spin up\n\t\t// infinite `next()` calls by default and never start the event loop.\n\t\t(async () => {\n\t\t\tfor (let index = 0; index < concurrency; index++) {\n\t\t\t\ttry {\n\t\t\t\t\t// eslint-disable-next-line no-await-in-loop\n\t\t\t\t\tawait next();\n\t\t\t\t} catch (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (isIterableDone || isRejected) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t})();\n\t});\n}\n\nexport const pMapSkip = Symbol('skip');\n","'use strict';\n\nfunction posix(path) {\n\treturn path.charAt(0) === '/';\n}\n\nfunction win32(path) {\n\t// https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56\n\tvar splitDeviceRe = /^([a-zA-Z]:|[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/]+[^\\\\\\/]+)?([\\\\\\/])?([\\s\\S]*?)$/;\n\tvar result = splitDeviceRe.exec(path);\n\tvar device = result[1] || '';\n\tvar isUnc = Boolean(device && device.charAt(1) !== ':');\n\n\t// UNC paths are always absolute\n\treturn Boolean(result[2] || isUnc);\n}\n\nmodule.exports = process.platform === 'win32' ? win32 : posix;\nmodule.exports.posix = posix;\nmodule.exports.win32 = win32;\n","\"use strict\";\n\nvar path = require(\"path\");\n\nmodule.exports = function (thePath, potentialParent) {\n // For inside-directory checking, we want to allow trailing slashes, so normalize.\n thePath = stripTrailingSep(thePath);\n potentialParent = stripTrailingSep(potentialParent);\n\n // Node treats only Windows as case-insensitive in its path module; we follow those conventions.\n if (process.platform === \"win32\") {\n thePath = thePath.toLowerCase();\n potentialParent = potentialParent.toLowerCase();\n }\n\n return thePath.lastIndexOf(potentialParent, 0) === 0 &&\n\t\t(\n\t\t\tthePath[potentialParent.length] === path.sep ||\n\t\t\tthePath[potentialParent.length] === undefined\n\t\t);\n};\n\nfunction stripTrailingSep(thePath) {\n if (thePath[thePath.length - 1] === path.sep) {\n return thePath.slice(0, -1);\n }\n return thePath;\n}\n","'use strict';\nconst {promisify} = require('util');\nconst fs = require('fs');\n\nasync function isType(fsStatType, statsMethodName, filePath) {\n\tif (typeof filePath !== 'string') {\n\t\tthrow new TypeError(`Expected a string, got ${typeof filePath}`);\n\t}\n\n\ttry {\n\t\tconst stats = await promisify(fs[fsStatType])(filePath);\n\t\treturn stats[statsMethodName]();\n\t} catch (error) {\n\t\tif (error.code === 'ENOENT') {\n\t\t\treturn false;\n\t\t}\n\n\t\tthrow error;\n\t}\n}\n\nfunction isTypeSync(fsStatType, statsMethodName, filePath) {\n\tif (typeof filePath !== 'string') {\n\t\tthrow new TypeError(`Expected a string, got ${typeof filePath}`);\n\t}\n\n\ttry {\n\t\treturn fs[fsStatType](filePath)[statsMethodName]();\n\t} catch (error) {\n\t\tif (error.code === 'ENOENT') {\n\t\t\treturn false;\n\t\t}\n\n\t\tthrow error;\n\t}\n}\n\nexports.isFile = isType.bind(null, 'stat', 'isFile');\nexports.isDirectory = isType.bind(null, 'stat', 'isDirectory');\nexports.isSymlink = isType.bind(null, 'lstat', 'isSymbolicLink');\nexports.isFileSync = isTypeSync.bind(null, 'statSync', 'isFile');\nexports.isDirectorySync = isTypeSync.bind(null, 'statSync', 'isDirectory');\nexports.isSymlinkSync = isTypeSync.bind(null, 'lstatSync', 'isSymbolicLink');\n","'use strict';\n\nmodule.exports = require('./lib/picomatch');\n","'use strict';\n\nconst path = require('path');\nconst WIN_SLASH = '\\\\\\\\/';\nconst WIN_NO_SLASH = `[^${WIN_SLASH}]`;\n\n/**\n * Posix glob regex\n */\n\nconst DOT_LITERAL = '\\\\.';\nconst PLUS_LITERAL = '\\\\+';\nconst QMARK_LITERAL = '\\\\?';\nconst SLASH_LITERAL = '\\\\/';\nconst ONE_CHAR = '(?=.)';\nconst QMARK = '[^/]';\nconst END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;\nconst START_ANCHOR = `(?:^|${SLASH_LITERAL})`;\nconst DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;\nconst NO_DOT = `(?!${DOT_LITERAL})`;\nconst NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;\nconst NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;\nconst NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;\nconst QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;\nconst STAR = `${QMARK}*?`;\n\nconst POSIX_CHARS = {\n DOT_LITERAL,\n PLUS_LITERAL,\n QMARK_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n QMARK,\n END_ANCHOR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n};\n\n/**\n * Windows glob regex\n */\n\nconst WINDOWS_CHARS = {\n ...POSIX_CHARS,\n\n SLASH_LITERAL: `[${WIN_SLASH}]`,\n QMARK: WIN_NO_SLASH,\n STAR: `${WIN_NO_SLASH}*?`,\n DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`,\n NO_DOT: `(?!${DOT_LITERAL})`,\n NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`,\n NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`,\n QMARK_NO_DOT: `[^.${WIN_SLASH}]`,\n START_ANCHOR: `(?:^|[${WIN_SLASH}])`,\n END_ANCHOR: `(?:[${WIN_SLASH}]|$)`\n};\n\n/**\n * POSIX Bracket Regex\n */\n\nconst POSIX_REGEX_SOURCE = {\n alnum: 'a-zA-Z0-9',\n alpha: 'a-zA-Z',\n ascii: '\\\\x00-\\\\x7F',\n blank: ' \\\\t',\n cntrl: '\\\\x00-\\\\x1F\\\\x7F',\n digit: '0-9',\n graph: '\\\\x21-\\\\x7E',\n lower: 'a-z',\n print: '\\\\x20-\\\\x7E ',\n punct: '\\\\-!\"#$%&\\'()\\\\*+,./:;<=>?@[\\\\]^_`{|}~',\n space: ' \\\\t\\\\r\\\\n\\\\v\\\\f',\n upper: 'A-Z',\n word: 'A-Za-z0-9_',\n xdigit: 'A-Fa-f0-9'\n};\n\nmodule.exports = {\n MAX_LENGTH: 1024 * 64,\n POSIX_REGEX_SOURCE,\n\n // regular expressions\n REGEX_BACKSLASH: /\\\\(?![*+?^${}(|)[\\]])/g,\n REGEX_NON_SPECIAL_CHARS: /^[^@![\\].,$*+?^{}()|\\\\/]+/,\n REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\\]]/,\n REGEX_SPECIAL_CHARS_BACKREF: /(\\\\?)((\\W)(\\3*))/g,\n REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\\]])/g,\n REGEX_REMOVE_BACKSLASH: /(?:\\[.*?[^\\\\]\\]|\\\\(?=.))/g,\n\n // Replace globs with equivalent patterns to reduce parsing time.\n REPLACEMENTS: {\n '***': '*',\n '**/**': '**',\n '**/**/**': '**'\n },\n\n // Digits\n CHAR_0: 48, /* 0 */\n CHAR_9: 57, /* 9 */\n\n // Alphabet chars.\n CHAR_UPPERCASE_A: 65, /* A */\n CHAR_LOWERCASE_A: 97, /* a */\n CHAR_UPPERCASE_Z: 90, /* Z */\n CHAR_LOWERCASE_Z: 122, /* z */\n\n CHAR_LEFT_PARENTHESES: 40, /* ( */\n CHAR_RIGHT_PARENTHESES: 41, /* ) */\n\n CHAR_ASTERISK: 42, /* * */\n\n // Non-alphabetic chars.\n CHAR_AMPERSAND: 38, /* & */\n CHAR_AT: 64, /* @ */\n CHAR_BACKWARD_SLASH: 92, /* \\ */\n CHAR_CARRIAGE_RETURN: 13, /* \\r */\n CHAR_CIRCUMFLEX_ACCENT: 94, /* ^ */\n CHAR_COLON: 58, /* : */\n CHAR_COMMA: 44, /* , */\n CHAR_DOT: 46, /* . */\n CHAR_DOUBLE_QUOTE: 34, /* \" */\n CHAR_EQUAL: 61, /* = */\n CHAR_EXCLAMATION_MARK: 33, /* ! */\n CHAR_FORM_FEED: 12, /* \\f */\n CHAR_FORWARD_SLASH: 47, /* / */\n CHAR_GRAVE_ACCENT: 96, /* ` */\n CHAR_HASH: 35, /* # */\n CHAR_HYPHEN_MINUS: 45, /* - */\n CHAR_LEFT_ANGLE_BRACKET: 60, /* < */\n CHAR_LEFT_CURLY_BRACE: 123, /* { */\n CHAR_LEFT_SQUARE_BRACKET: 91, /* [ */\n CHAR_LINE_FEED: 10, /* \\n */\n CHAR_NO_BREAK_SPACE: 160, /* \\u00A0 */\n CHAR_PERCENT: 37, /* % */\n CHAR_PLUS: 43, /* + */\n CHAR_QUESTION_MARK: 63, /* ? */\n CHAR_RIGHT_ANGLE_BRACKET: 62, /* > */\n CHAR_RIGHT_CURLY_BRACE: 125, /* } */\n CHAR_RIGHT_SQUARE_BRACKET: 93, /* ] */\n CHAR_SEMICOLON: 59, /* ; */\n CHAR_SINGLE_QUOTE: 39, /* ' */\n CHAR_SPACE: 32, /* */\n CHAR_TAB: 9, /* \\t */\n CHAR_UNDERSCORE: 95, /* _ */\n CHAR_VERTICAL_LINE: 124, /* | */\n CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \\uFEFF */\n\n SEP: path.sep,\n\n /**\n * Create EXTGLOB_CHARS\n */\n\n extglobChars(chars) {\n return {\n '!': { type: 'negate', open: '(?:(?!(?:', close: `))${chars.STAR})` },\n '?': { type: 'qmark', open: '(?:', close: ')?' },\n '+': { type: 'plus', open: '(?:', close: ')+' },\n '*': { type: 'star', open: '(?:', close: ')*' },\n '@': { type: 'at', open: '(?:', close: ')' }\n };\n },\n\n /**\n * Create GLOB_CHARS\n */\n\n globChars(win32) {\n return win32 === true ? WINDOWS_CHARS : POSIX_CHARS;\n }\n};\n","'use strict';\n\nconst constants = require('./constants');\nconst utils = require('./utils');\n\n/**\n * Constants\n */\n\nconst {\n MAX_LENGTH,\n POSIX_REGEX_SOURCE,\n REGEX_NON_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_BACKREF,\n REPLACEMENTS\n} = constants;\n\n/**\n * Helpers\n */\n\nconst expandRange = (args, options) => {\n if (typeof options.expandRange === 'function') {\n return options.expandRange(...args, options);\n }\n\n args.sort();\n const value = `[${args.join('-')}]`;\n\n try {\n /* eslint-disable-next-line no-new */\n new RegExp(value);\n } catch (ex) {\n return args.map(v => utils.escapeRegex(v)).join('..');\n }\n\n return value;\n};\n\n/**\n * Create the message for a syntax error\n */\n\nconst syntaxError = (type, char) => {\n return `Missing ${type}: \"${char}\" - use \"\\\\\\\\${char}\" to match literal characters`;\n};\n\n/**\n * Parse the given input string.\n * @param {String} input\n * @param {Object} options\n * @return {Object}\n */\n\nconst parse = (input, options) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected a string');\n }\n\n input = REPLACEMENTS[input] || input;\n\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n\n let len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n const bos = { type: 'bos', value: '', output: opts.prepend || '' };\n const tokens = [bos];\n\n const capture = opts.capture ? '' : '?:';\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const PLATFORM_CHARS = constants.globChars(win32);\n const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);\n\n const {\n DOT_LITERAL,\n PLUS_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOT_SLASH,\n NO_DOTS_SLASH,\n QMARK,\n QMARK_NO_DOT,\n STAR,\n START_ANCHOR\n } = PLATFORM_CHARS;\n\n const globstar = opts => {\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const nodot = opts.dot ? '' : NO_DOT;\n const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;\n let star = opts.bash === true ? globstar(opts) : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n // minimatch options support\n if (typeof opts.noext === 'boolean') {\n opts.noextglob = opts.noext;\n }\n\n const state = {\n input,\n index: -1,\n start: 0,\n dot: opts.dot === true,\n consumed: '',\n output: '',\n prefix: '',\n backtrack: false,\n negated: false,\n brackets: 0,\n braces: 0,\n parens: 0,\n quotes: 0,\n globstar: false,\n tokens\n };\n\n input = utils.removePrefix(input, state);\n len = input.length;\n\n const extglobs = [];\n const braces = [];\n const stack = [];\n let prev = bos;\n let value;\n\n /**\n * Tokenizing helpers\n */\n\n const eos = () => state.index === len - 1;\n const peek = state.peek = (n = 1) => input[state.index + n];\n const advance = state.advance = () => input[++state.index] || '';\n const remaining = () => input.slice(state.index + 1);\n const consume = (value = '', num = 0) => {\n state.consumed += value;\n state.index += num;\n };\n\n const append = token => {\n state.output += token.output != null ? token.output : token.value;\n consume(token.value);\n };\n\n const negate = () => {\n let count = 1;\n\n while (peek() === '!' && (peek(2) !== '(' || peek(3) === '?')) {\n advance();\n state.start++;\n count++;\n }\n\n if (count % 2 === 0) {\n return false;\n }\n\n state.negated = true;\n state.start++;\n return true;\n };\n\n const increment = type => {\n state[type]++;\n stack.push(type);\n };\n\n const decrement = type => {\n state[type]--;\n stack.pop();\n };\n\n /**\n * Push tokens onto the tokens array. This helper speeds up\n * tokenizing by 1) helping us avoid backtracking as much as possible,\n * and 2) helping us avoid creating extra tokens when consecutive\n * characters are plain text. This improves performance and simplifies\n * lookbehinds.\n */\n\n const push = tok => {\n if (prev.type === 'globstar') {\n const isBrace = state.braces > 0 && (tok.type === 'comma' || tok.type === 'brace');\n const isExtglob = tok.extglob === true || (extglobs.length && (tok.type === 'pipe' || tok.type === 'paren'));\n\n if (tok.type !== 'slash' && tok.type !== 'paren' && !isBrace && !isExtglob) {\n state.output = state.output.slice(0, -prev.output.length);\n prev.type = 'star';\n prev.value = '*';\n prev.output = star;\n state.output += prev.output;\n }\n }\n\n if (extglobs.length && tok.type !== 'paren') {\n extglobs[extglobs.length - 1].inner += tok.value;\n }\n\n if (tok.value || tok.output) append(tok);\n if (prev && prev.type === 'text' && tok.type === 'text') {\n prev.value += tok.value;\n prev.output = (prev.output || '') + tok.value;\n return;\n }\n\n tok.prev = prev;\n tokens.push(tok);\n prev = tok;\n };\n\n const extglobOpen = (type, value) => {\n const token = { ...EXTGLOB_CHARS[value], conditions: 1, inner: '' };\n\n token.prev = prev;\n token.parens = state.parens;\n token.output = state.output;\n const output = (opts.capture ? '(' : '') + token.open;\n\n increment('parens');\n push({ type, value, output: state.output ? '' : ONE_CHAR });\n push({ type: 'paren', extglob: true, value: advance(), output });\n extglobs.push(token);\n };\n\n const extglobClose = token => {\n let output = token.close + (opts.capture ? ')' : '');\n let rest;\n\n if (token.type === 'negate') {\n let extglobStar = star;\n\n if (token.inner && token.inner.length > 1 && token.inner.includes('/')) {\n extglobStar = globstar(opts);\n }\n\n if (extglobStar !== star || eos() || /^\\)+$/.test(remaining())) {\n output = token.close = `)$))${extglobStar}`;\n }\n\n if (token.inner.includes('*') && (rest = remaining()) && /^\\.[^\\\\/.]+$/.test(rest)) {\n // Any non-magical string (`.ts`) or even nested expression (`.{ts,tsx}`) can follow after the closing parenthesis.\n // In this case, we need to parse the string and use it in the output of the original pattern.\n // Suitable patterns: `/!(*.d).ts`, `/!(*.d).{ts,tsx}`, `**/!(*-dbg).@(js)`.\n //\n // Disabling the `fastpaths` option due to a problem with parsing strings as `.ts` in the pattern like `**/!(*.d).ts`.\n const expression = parse(rest, { ...options, fastpaths: false }).output;\n\n output = token.close = `)${expression})${extglobStar})`;\n }\n\n if (token.prev.type === 'bos') {\n state.negatedExtglob = true;\n }\n }\n\n push({ type: 'paren', extglob: true, value, output });\n decrement('parens');\n };\n\n /**\n * Fast paths\n */\n\n if (opts.fastpaths !== false && !/(^[*!]|[/()[\\]{}\"])/.test(input)) {\n let backslashes = false;\n\n let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {\n if (first === '\\\\') {\n backslashes = true;\n return m;\n }\n\n if (first === '?') {\n if (esc) {\n return esc + first + (rest ? QMARK.repeat(rest.length) : '');\n }\n if (index === 0) {\n return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : '');\n }\n return QMARK.repeat(chars.length);\n }\n\n if (first === '.') {\n return DOT_LITERAL.repeat(chars.length);\n }\n\n if (first === '*') {\n if (esc) {\n return esc + first + (rest ? star : '');\n }\n return star;\n }\n return esc ? m : `\\\\${m}`;\n });\n\n if (backslashes === true) {\n if (opts.unescape === true) {\n output = output.replace(/\\\\/g, '');\n } else {\n output = output.replace(/\\\\+/g, m => {\n return m.length % 2 === 0 ? '\\\\\\\\' : (m ? '\\\\' : '');\n });\n }\n }\n\n if (output === input && opts.contains === true) {\n state.output = input;\n return state;\n }\n\n state.output = utils.wrapOutput(output, state, options);\n return state;\n }\n\n /**\n * Tokenize input until we reach end-of-string\n */\n\n while (!eos()) {\n value = advance();\n\n if (value === '\\u0000') {\n continue;\n }\n\n /**\n * Escaped characters\n */\n\n if (value === '\\\\') {\n const next = peek();\n\n if (next === '/' && opts.bash !== true) {\n continue;\n }\n\n if (next === '.' || next === ';') {\n continue;\n }\n\n if (!next) {\n value += '\\\\';\n push({ type: 'text', value });\n continue;\n }\n\n // collapse slashes to reduce potential for exploits\n const match = /^\\\\+/.exec(remaining());\n let slashes = 0;\n\n if (match && match[0].length > 2) {\n slashes = match[0].length;\n state.index += slashes;\n if (slashes % 2 !== 0) {\n value += '\\\\';\n }\n }\n\n if (opts.unescape === true) {\n value = advance();\n } else {\n value += advance();\n }\n\n if (state.brackets === 0) {\n push({ type: 'text', value });\n continue;\n }\n }\n\n /**\n * If we're inside a regex character class, continue\n * until we reach the closing bracket.\n */\n\n if (state.brackets > 0 && (value !== ']' || prev.value === '[' || prev.value === '[^')) {\n if (opts.posix !== false && value === ':') {\n const inner = prev.value.slice(1);\n if (inner.includes('[')) {\n prev.posix = true;\n\n if (inner.includes(':')) {\n const idx = prev.value.lastIndexOf('[');\n const pre = prev.value.slice(0, idx);\n const rest = prev.value.slice(idx + 2);\n const posix = POSIX_REGEX_SOURCE[rest];\n if (posix) {\n prev.value = pre + posix;\n state.backtrack = true;\n advance();\n\n if (!bos.output && tokens.indexOf(prev) === 1) {\n bos.output = ONE_CHAR;\n }\n continue;\n }\n }\n }\n }\n\n if ((value === '[' && peek() !== ':') || (value === '-' && peek() === ']')) {\n value = `\\\\${value}`;\n }\n\n if (value === ']' && (prev.value === '[' || prev.value === '[^')) {\n value = `\\\\${value}`;\n }\n\n if (opts.posix === true && value === '!' && prev.value === '[') {\n value = '^';\n }\n\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * If we're inside a quoted string, continue\n * until we reach the closing double quote.\n */\n\n if (state.quotes === 1 && value !== '\"') {\n value = utils.escapeRegex(value);\n prev.value += value;\n append({ value });\n continue;\n }\n\n /**\n * Double quotes\n */\n\n if (value === '\"') {\n state.quotes = state.quotes === 1 ? 0 : 1;\n if (opts.keepQuotes === true) {\n push({ type: 'text', value });\n }\n continue;\n }\n\n /**\n * Parentheses\n */\n\n if (value === '(') {\n increment('parens');\n push({ type: 'paren', value });\n continue;\n }\n\n if (value === ')') {\n if (state.parens === 0 && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '('));\n }\n\n const extglob = extglobs[extglobs.length - 1];\n if (extglob && state.parens === extglob.parens + 1) {\n extglobClose(extglobs.pop());\n continue;\n }\n\n push({ type: 'paren', value, output: state.parens ? ')' : '\\\\)' });\n decrement('parens');\n continue;\n }\n\n /**\n * Square brackets\n */\n\n if (value === '[') {\n if (opts.nobracket === true || !remaining().includes(']')) {\n if (opts.nobracket !== true && opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('closing', ']'));\n }\n\n value = `\\\\${value}`;\n } else {\n increment('brackets');\n }\n\n push({ type: 'bracket', value });\n continue;\n }\n\n if (value === ']') {\n if (opts.nobracket === true || (prev && prev.type === 'bracket' && prev.value.length === 1)) {\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n if (state.brackets === 0) {\n if (opts.strictBrackets === true) {\n throw new SyntaxError(syntaxError('opening', '['));\n }\n\n push({ type: 'text', value, output: `\\\\${value}` });\n continue;\n }\n\n decrement('brackets');\n\n const prevValue = prev.value.slice(1);\n if (prev.posix !== true && prevValue[0] === '^' && !prevValue.includes('/')) {\n value = `/${value}`;\n }\n\n prev.value += value;\n append({ value });\n\n // when literal brackets are explicitly disabled\n // assume we should match with a regex character class\n if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {\n continue;\n }\n\n const escaped = utils.escapeRegex(prev.value);\n state.output = state.output.slice(0, -prev.value.length);\n\n // when literal brackets are explicitly enabled\n // assume we should escape the brackets to match literal characters\n if (opts.literalBrackets === true) {\n state.output += escaped;\n prev.value = escaped;\n continue;\n }\n\n // when the user specifies nothing, try to match both\n prev.value = `(${capture}${escaped}|${prev.value})`;\n state.output += prev.value;\n continue;\n }\n\n /**\n * Braces\n */\n\n if (value === '{' && opts.nobrace !== true) {\n increment('braces');\n\n const open = {\n type: 'brace',\n value,\n output: '(',\n outputIndex: state.output.length,\n tokensIndex: state.tokens.length\n };\n\n braces.push(open);\n push(open);\n continue;\n }\n\n if (value === '}') {\n const brace = braces[braces.length - 1];\n\n if (opts.nobrace === true || !brace) {\n push({ type: 'text', value, output: value });\n continue;\n }\n\n let output = ')';\n\n if (brace.dots === true) {\n const arr = tokens.slice();\n const range = [];\n\n for (let i = arr.length - 1; i >= 0; i--) {\n tokens.pop();\n if (arr[i].type === 'brace') {\n break;\n }\n if (arr[i].type !== 'dots') {\n range.unshift(arr[i].value);\n }\n }\n\n output = expandRange(range, opts);\n state.backtrack = true;\n }\n\n if (brace.comma !== true && brace.dots !== true) {\n const out = state.output.slice(0, brace.outputIndex);\n const toks = state.tokens.slice(brace.tokensIndex);\n brace.value = brace.output = '\\\\{';\n value = output = '\\\\}';\n state.output = out;\n for (const t of toks) {\n state.output += (t.output || t.value);\n }\n }\n\n push({ type: 'brace', value, output });\n decrement('braces');\n braces.pop();\n continue;\n }\n\n /**\n * Pipes\n */\n\n if (value === '|') {\n if (extglobs.length > 0) {\n extglobs[extglobs.length - 1].conditions++;\n }\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Commas\n */\n\n if (value === ',') {\n let output = value;\n\n const brace = braces[braces.length - 1];\n if (brace && stack[stack.length - 1] === 'braces') {\n brace.comma = true;\n output = '|';\n }\n\n push({ type: 'comma', value, output });\n continue;\n }\n\n /**\n * Slashes\n */\n\n if (value === '/') {\n // if the beginning of the glob is \"./\", advance the start\n // to the current index, and don't add the \"./\" characters\n // to the state. This greatly simplifies lookbehinds when\n // checking for BOS characters like \"!\" and \".\" (not \"./\")\n if (prev.type === 'dot' && state.index === state.start + 1) {\n state.start = state.index + 1;\n state.consumed = '';\n state.output = '';\n tokens.pop();\n prev = bos; // reset \"prev\" to the first token\n continue;\n }\n\n push({ type: 'slash', value, output: SLASH_LITERAL });\n continue;\n }\n\n /**\n * Dots\n */\n\n if (value === '.') {\n if (state.braces > 0 && prev.type === 'dot') {\n if (prev.value === '.') prev.output = DOT_LITERAL;\n const brace = braces[braces.length - 1];\n prev.type = 'dots';\n prev.output += value;\n prev.value += value;\n brace.dots = true;\n continue;\n }\n\n if ((state.braces + state.parens) === 0 && prev.type !== 'bos' && prev.type !== 'slash') {\n push({ type: 'text', value, output: DOT_LITERAL });\n continue;\n }\n\n push({ type: 'dot', value, output: DOT_LITERAL });\n continue;\n }\n\n /**\n * Question marks\n */\n\n if (value === '?') {\n const isGroup = prev && prev.value === '(';\n if (!isGroup && opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('qmark', value);\n continue;\n }\n\n if (prev && prev.type === 'paren') {\n const next = peek();\n let output = value;\n\n if (next === '<' && !utils.supportsLookbehinds()) {\n throw new Error('Node.js v10 or higher is required for regex lookbehinds');\n }\n\n if ((prev.value === '(' && !/[!=<:]/.test(next)) || (next === '<' && !/<([!=]|\\w+>)/.test(remaining()))) {\n output = `\\\\${value}`;\n }\n\n push({ type: 'text', value, output });\n continue;\n }\n\n if (opts.dot !== true && (prev.type === 'slash' || prev.type === 'bos')) {\n push({ type: 'qmark', value, output: QMARK_NO_DOT });\n continue;\n }\n\n push({ type: 'qmark', value, output: QMARK });\n continue;\n }\n\n /**\n * Exclamation\n */\n\n if (value === '!') {\n if (opts.noextglob !== true && peek() === '(') {\n if (peek(2) !== '?' || !/[!=<:]/.test(peek(3))) {\n extglobOpen('negate', value);\n continue;\n }\n }\n\n if (opts.nonegate !== true && state.index === 0) {\n negate();\n continue;\n }\n }\n\n /**\n * Plus\n */\n\n if (value === '+') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n extglobOpen('plus', value);\n continue;\n }\n\n if ((prev && prev.value === '(') || opts.regex === false) {\n push({ type: 'plus', value, output: PLUS_LITERAL });\n continue;\n }\n\n if ((prev && (prev.type === 'bracket' || prev.type === 'paren' || prev.type === 'brace')) || state.parens > 0) {\n push({ type: 'plus', value });\n continue;\n }\n\n push({ type: 'plus', value: PLUS_LITERAL });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value === '@') {\n if (opts.noextglob !== true && peek() === '(' && peek(2) !== '?') {\n push({ type: 'at', extglob: true, value, output: '' });\n continue;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Plain text\n */\n\n if (value !== '*') {\n if (value === '$' || value === '^') {\n value = `\\\\${value}`;\n }\n\n const match = REGEX_NON_SPECIAL_CHARS.exec(remaining());\n if (match) {\n value += match[0];\n state.index += match[0].length;\n }\n\n push({ type: 'text', value });\n continue;\n }\n\n /**\n * Stars\n */\n\n if (prev && (prev.type === 'globstar' || prev.star === true)) {\n prev.type = 'star';\n prev.star = true;\n prev.value += value;\n prev.output = star;\n state.backtrack = true;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n let rest = remaining();\n if (opts.noextglob !== true && /^\\([^?]/.test(rest)) {\n extglobOpen('star', value);\n continue;\n }\n\n if (prev.type === 'star') {\n if (opts.noglobstar === true) {\n consume(value);\n continue;\n }\n\n const prior = prev.prev;\n const before = prior.prev;\n const isStart = prior.type === 'slash' || prior.type === 'bos';\n const afterStar = before && (before.type === 'star' || before.type === 'globstar');\n\n if (opts.bash === true && (!isStart || (rest[0] && rest[0] !== '/'))) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n const isBrace = state.braces > 0 && (prior.type === 'comma' || prior.type === 'brace');\n const isExtglob = extglobs.length && (prior.type === 'pipe' || prior.type === 'paren');\n if (!isStart && prior.type !== 'paren' && !isBrace && !isExtglob) {\n push({ type: 'star', value, output: '' });\n continue;\n }\n\n // strip consecutive `/**/`\n while (rest.slice(0, 3) === '/**') {\n const after = input[state.index + 4];\n if (after && after !== '/') {\n break;\n }\n rest = rest.slice(3);\n consume('/**', 3);\n }\n\n if (prior.type === 'bos' && eos()) {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = globstar(opts);\n state.output = prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && !afterStar && eos()) {\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = globstar(opts) + (opts.strictSlashes ? ')' : '|$)');\n prev.value += value;\n state.globstar = true;\n state.output += prior.output + prev.output;\n consume(value);\n continue;\n }\n\n if (prior.type === 'slash' && prior.prev.type !== 'bos' && rest[0] === '/') {\n const end = rest[1] !== void 0 ? '|$' : '';\n\n state.output = state.output.slice(0, -(prior.output + prev.output).length);\n prior.output = `(?:${prior.output}`;\n\n prev.type = 'globstar';\n prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;\n prev.value += value;\n\n state.output += prior.output + prev.output;\n state.globstar = true;\n\n consume(value + advance());\n\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n if (prior.type === 'bos' && rest[0] === '/') {\n prev.type = 'globstar';\n prev.value += value;\n prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;\n state.output = prev.output;\n state.globstar = true;\n consume(value + advance());\n push({ type: 'slash', value: '/', output: '' });\n continue;\n }\n\n // remove single star from output\n state.output = state.output.slice(0, -prev.output.length);\n\n // reset previous token to globstar\n prev.type = 'globstar';\n prev.output = globstar(opts);\n prev.value += value;\n\n // reset output with globstar\n state.output += prev.output;\n state.globstar = true;\n consume(value);\n continue;\n }\n\n const token = { type: 'star', value, output: star };\n\n if (opts.bash === true) {\n token.output = '.*?';\n if (prev.type === 'bos' || prev.type === 'slash') {\n token.output = nodot + token.output;\n }\n push(token);\n continue;\n }\n\n if (prev && (prev.type === 'bracket' || prev.type === 'paren') && opts.regex === true) {\n token.output = value;\n push(token);\n continue;\n }\n\n if (state.index === state.start || prev.type === 'slash' || prev.type === 'dot') {\n if (prev.type === 'dot') {\n state.output += NO_DOT_SLASH;\n prev.output += NO_DOT_SLASH;\n\n } else if (opts.dot === true) {\n state.output += NO_DOTS_SLASH;\n prev.output += NO_DOTS_SLASH;\n\n } else {\n state.output += nodot;\n prev.output += nodot;\n }\n\n if (peek() !== '*') {\n state.output += ONE_CHAR;\n prev.output += ONE_CHAR;\n }\n }\n\n push(token);\n }\n\n while (state.brackets > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ']'));\n state.output = utils.escapeLast(state.output, '[');\n decrement('brackets');\n }\n\n while (state.parens > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', ')'));\n state.output = utils.escapeLast(state.output, '(');\n decrement('parens');\n }\n\n while (state.braces > 0) {\n if (opts.strictBrackets === true) throw new SyntaxError(syntaxError('closing', '}'));\n state.output = utils.escapeLast(state.output, '{');\n decrement('braces');\n }\n\n if (opts.strictSlashes !== true && (prev.type === 'star' || prev.type === 'bracket')) {\n push({ type: 'maybe_slash', value: '', output: `${SLASH_LITERAL}?` });\n }\n\n // rebuild the output if we had to backtrack at any point\n if (state.backtrack === true) {\n state.output = '';\n\n for (const token of state.tokens) {\n state.output += token.output != null ? token.output : token.value;\n\n if (token.suffix) {\n state.output += token.suffix;\n }\n }\n }\n\n return state;\n};\n\n/**\n * Fast paths for creating regular expressions for common glob patterns.\n * This can significantly speed up processing and has very little downside\n * impact when none of the fast paths match.\n */\n\nparse.fastpaths = (input, options) => {\n const opts = { ...options };\n const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;\n const len = input.length;\n if (len > max) {\n throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);\n }\n\n input = REPLACEMENTS[input] || input;\n const win32 = utils.isWindows(options);\n\n // create constants based on platform, for windows or posix\n const {\n DOT_LITERAL,\n SLASH_LITERAL,\n ONE_CHAR,\n DOTS_SLASH,\n NO_DOT,\n NO_DOTS,\n NO_DOTS_SLASH,\n STAR,\n START_ANCHOR\n } = constants.globChars(win32);\n\n const nodot = opts.dot ? NO_DOTS : NO_DOT;\n const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;\n const capture = opts.capture ? '' : '?:';\n const state = { negated: false, prefix: '' };\n let star = opts.bash === true ? '.*?' : STAR;\n\n if (opts.capture) {\n star = `(${star})`;\n }\n\n const globstar = opts => {\n if (opts.noglobstar === true) return star;\n return `(${capture}(?:(?!${START_ANCHOR}${opts.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;\n };\n\n const create = str => {\n switch (str) {\n case '*':\n return `${nodot}${ONE_CHAR}${star}`;\n\n case '.*':\n return `${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*.*':\n return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '*/*':\n return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`;\n\n case '**':\n return nodot + globstar(opts);\n\n case '**/*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`;\n\n case '**/*.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n case '**/.*':\n return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;\n\n default: {\n const match = /^(.*?)\\.(\\w+)$/.exec(str);\n if (!match) return;\n\n const source = create(match[1]);\n if (!source) return;\n\n return source + DOT_LITERAL + match[2];\n }\n }\n };\n\n const output = utils.removePrefix(input, state);\n let source = create(output);\n\n if (source && opts.strictSlashes !== true) {\n source += `${SLASH_LITERAL}?`;\n }\n\n return source;\n};\n\nmodule.exports = parse;\n","'use strict';\n\nconst path = require('path');\nconst scan = require('./scan');\nconst parse = require('./parse');\nconst utils = require('./utils');\nconst constants = require('./constants');\nconst isObject = val => val && typeof val === 'object' && !Array.isArray(val);\n\n/**\n * Creates a matcher function from one or more glob patterns. The\n * returned function takes a string to match as its first argument,\n * and returns true if the string is a match. The returned matcher\n * function also takes a boolean as the second argument that, when true,\n * returns an object with additional information.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch(glob[, options]);\n *\n * const isMatch = picomatch('*.!(*a)');\n * console.log(isMatch('a.a')); //=> false\n * console.log(isMatch('a.b')); //=> true\n * ```\n * @name picomatch\n * @param {String|Array} `globs` One or more glob patterns.\n * @param {Object=} `options`\n * @return {Function=} Returns a matcher function.\n * @api public\n */\n\nconst picomatch = (glob, options, returnState = false) => {\n if (Array.isArray(glob)) {\n const fns = glob.map(input => picomatch(input, options, returnState));\n const arrayMatcher = str => {\n for (const isMatch of fns) {\n const state = isMatch(str);\n if (state) return state;\n }\n return false;\n };\n return arrayMatcher;\n }\n\n const isState = isObject(glob) && glob.tokens && glob.input;\n\n if (glob === '' || (typeof glob !== 'string' && !isState)) {\n throw new TypeError('Expected pattern to be a non-empty string');\n }\n\n const opts = options || {};\n const posix = utils.isWindows(options);\n const regex = isState\n ? picomatch.compileRe(glob, options)\n : picomatch.makeRe(glob, options, false, true);\n\n const state = regex.state;\n delete regex.state;\n\n let isIgnored = () => false;\n if (opts.ignore) {\n const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };\n isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);\n }\n\n const matcher = (input, returnObject = false) => {\n const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix });\n const result = { glob, state, regex, posix, input, output, match, isMatch };\n\n if (typeof opts.onResult === 'function') {\n opts.onResult(result);\n }\n\n if (isMatch === false) {\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (isIgnored(input)) {\n if (typeof opts.onIgnore === 'function') {\n opts.onIgnore(result);\n }\n result.isMatch = false;\n return returnObject ? result : false;\n }\n\n if (typeof opts.onMatch === 'function') {\n opts.onMatch(result);\n }\n return returnObject ? result : true;\n };\n\n if (returnState) {\n matcher.state = state;\n }\n\n return matcher;\n};\n\n/**\n * Test `input` with the given `regex`. This is used by the main\n * `picomatch()` function to test the input string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.test(input, regex[, options]);\n *\n * console.log(picomatch.test('foo/bar', /^(?:([^/]*?)\\/([^/]*?))$/));\n * // { isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' }\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp} `regex`\n * @return {Object} Returns an object with matching info.\n * @api public\n */\n\npicomatch.test = (input, regex, options, { glob, posix } = {}) => {\n if (typeof input !== 'string') {\n throw new TypeError('Expected input to be a string');\n }\n\n if (input === '') {\n return { isMatch: false, output: '' };\n }\n\n const opts = options || {};\n const format = opts.format || (posix ? utils.toPosixSlashes : null);\n let match = input === glob;\n let output = (match && format) ? format(input) : input;\n\n if (match === false) {\n output = format ? format(input) : input;\n match = output === glob;\n }\n\n if (match === false || opts.capture === true) {\n if (opts.matchBase === true || opts.basename === true) {\n match = picomatch.matchBase(input, regex, options, posix);\n } else {\n match = regex.exec(output);\n }\n }\n\n return { isMatch: Boolean(match), match, output };\n};\n\n/**\n * Match the basename of a filepath.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.matchBase(input, glob[, options]);\n * console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true\n * ```\n * @param {String} `input` String to test.\n * @param {RegExp|String} `glob` Glob pattern or regex created by [.makeRe](#makeRe).\n * @return {Boolean}\n * @api public\n */\n\npicomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {\n const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);\n return regex.test(path.basename(input));\n};\n\n/**\n * Returns true if **any** of the given glob `patterns` match the specified `string`.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.isMatch(string, patterns[, options]);\n *\n * console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true\n * console.log(picomatch.isMatch('a.a', 'b.*')); //=> false\n * ```\n * @param {String|Array} str The string to test.\n * @param {String|Array} patterns One or more glob patterns to use for matching.\n * @param {Object} [options] See available [options](#options).\n * @return {Boolean} Returns true if any patterns match `str`\n * @api public\n */\n\npicomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);\n\n/**\n * Parse a glob pattern to create the source string for a regular\n * expression.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const result = picomatch.parse(pattern[, options]);\n * ```\n * @param {String} `pattern`\n * @param {Object} `options`\n * @return {Object} Returns an object with useful properties and output to be used as a regex source string.\n * @api public\n */\n\npicomatch.parse = (pattern, options) => {\n if (Array.isArray(pattern)) return pattern.map(p => picomatch.parse(p, options));\n return parse(pattern, { ...options, fastpaths: false });\n};\n\n/**\n * Scan a glob pattern to separate the pattern into segments.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.scan(input[, options]);\n *\n * const result = picomatch.scan('!./foo/*.js');\n * console.log(result);\n * { prefix: '!./',\n * input: '!./foo/*.js',\n * start: 3,\n * base: 'foo',\n * glob: '*.js',\n * isBrace: false,\n * isBracket: false,\n * isGlob: true,\n * isExtglob: false,\n * isGlobstar: false,\n * negated: true }\n * ```\n * @param {String} `input` Glob pattern to scan.\n * @param {Object} `options`\n * @return {Object} Returns an object with\n * @api public\n */\n\npicomatch.scan = (input, options) => scan(input, options);\n\n/**\n * Compile a regular expression from the `state` object returned by the\n * [parse()](#parse) method.\n *\n * @param {Object} `state`\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Intended for implementors, this argument allows you to return the raw output from the parser.\n * @param {Boolean} `returnState` Adds the state to a `state` property on the returned regex. Useful for implementors and debugging.\n * @return {RegExp}\n * @api public\n */\n\npicomatch.compileRe = (state, options, returnOutput = false, returnState = false) => {\n if (returnOutput === true) {\n return state.output;\n }\n\n const opts = options || {};\n const prepend = opts.contains ? '' : '^';\n const append = opts.contains ? '' : '$';\n\n let source = `${prepend}(?:${state.output})${append}`;\n if (state && state.negated === true) {\n source = `^(?!${source}).*$`;\n }\n\n const regex = picomatch.toRegex(source, options);\n if (returnState === true) {\n regex.state = state;\n }\n\n return regex;\n};\n\n/**\n * Create a regular expression from a parsed glob pattern.\n *\n * ```js\n * const picomatch = require('picomatch');\n * const state = picomatch.parse('*.js');\n * // picomatch.compileRe(state[, options]);\n *\n * console.log(picomatch.compileRe(state));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `state` The object returned from the `.parse` method.\n * @param {Object} `options`\n * @param {Boolean} `returnOutput` Implementors may use this argument to return the compiled output, instead of a regular expression. This is not exposed on the options to prevent end-users from mutating the result.\n * @param {Boolean} `returnState` Implementors may use this argument to return the state from the parsed glob with the returned regular expression.\n * @return {RegExp} Returns a regex created from the given pattern.\n * @api public\n */\n\npicomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {\n if (!input || typeof input !== 'string') {\n throw new TypeError('Expected a non-empty string');\n }\n\n let parsed = { negated: false, fastpaths: true };\n\n if (options.fastpaths !== false && (input[0] === '.' || input[0] === '*')) {\n parsed.output = parse.fastpaths(input, options);\n }\n\n if (!parsed.output) {\n parsed = parse(input, options);\n }\n\n return picomatch.compileRe(parsed, options, returnOutput, returnState);\n};\n\n/**\n * Create a regular expression from the given regex source string.\n *\n * ```js\n * const picomatch = require('picomatch');\n * // picomatch.toRegex(source[, options]);\n *\n * const { output } = picomatch.parse('*.js');\n * console.log(picomatch.toRegex(output));\n * //=> /^(?:(?!\\.)(?=.)[^/]*?\\.js)$/\n * ```\n * @param {String} `source` Regular expression source string.\n * @param {Object} `options`\n * @return {RegExp}\n * @api public\n */\n\npicomatch.toRegex = (source, options) => {\n try {\n const opts = options || {};\n return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));\n } catch (err) {\n if (options && options.debug === true) throw err;\n return /$^/;\n }\n};\n\n/**\n * Picomatch constants.\n * @return {Object}\n */\n\npicomatch.constants = constants;\n\n/**\n * Expose \"picomatch\"\n */\n\nmodule.exports = picomatch;\n","'use strict';\n\nconst utils = require('./utils');\nconst {\n CHAR_ASTERISK, /* * */\n CHAR_AT, /* @ */\n CHAR_BACKWARD_SLASH, /* \\ */\n CHAR_COMMA, /* , */\n CHAR_DOT, /* . */\n CHAR_EXCLAMATION_MARK, /* ! */\n CHAR_FORWARD_SLASH, /* / */\n CHAR_LEFT_CURLY_BRACE, /* { */\n CHAR_LEFT_PARENTHESES, /* ( */\n CHAR_LEFT_SQUARE_BRACKET, /* [ */\n CHAR_PLUS, /* + */\n CHAR_QUESTION_MARK, /* ? */\n CHAR_RIGHT_CURLY_BRACE, /* } */\n CHAR_RIGHT_PARENTHESES, /* ) */\n CHAR_RIGHT_SQUARE_BRACKET /* ] */\n} = require('./constants');\n\nconst isPathSeparator = code => {\n return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;\n};\n\nconst depth = token => {\n if (token.isPrefix !== true) {\n token.depth = token.isGlobstar ? Infinity : 1;\n }\n};\n\n/**\n * Quickly scans a glob pattern and returns an object with a handful of\n * useful properties, like `isGlob`, `path` (the leading non-glob, if it exists),\n * `glob` (the actual pattern), `negated` (true if the path starts with `!` but not\n * with `!(`) and `negatedExtglob` (true if the path starts with `!(`).\n *\n * ```js\n * const pm = require('picomatch');\n * console.log(pm.scan('foo/bar/*.js'));\n * { isGlob: true, input: 'foo/bar/*.js', base: 'foo/bar', glob: '*.js' }\n * ```\n * @param {String} `str`\n * @param {Object} `options`\n * @return {Object} Returns an object with tokens and regex source string.\n * @api public\n */\n\nconst scan = (input, options) => {\n const opts = options || {};\n\n const length = input.length - 1;\n const scanToEnd = opts.parts === true || opts.scanToEnd === true;\n const slashes = [];\n const tokens = [];\n const parts = [];\n\n let str = input;\n let index = -1;\n let start = 0;\n let lastIndex = 0;\n let isBrace = false;\n let isBracket = false;\n let isGlob = false;\n let isExtglob = false;\n let isGlobstar = false;\n let braceEscaped = false;\n let backslashes = false;\n let negated = false;\n let negatedExtglob = false;\n let finished = false;\n let braces = 0;\n let prev;\n let code;\n let token = { value: '', depth: 0, isGlob: false };\n\n const eos = () => index >= length;\n const peek = () => str.charCodeAt(index + 1);\n const advance = () => {\n prev = code;\n return str.charCodeAt(++index);\n };\n\n while (index < length) {\n code = advance();\n let next;\n\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braceEscaped = true;\n }\n continue;\n }\n\n if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (code === CHAR_LEFT_CURLY_BRACE) {\n braces++;\n continue;\n }\n\n if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (braceEscaped !== true && code === CHAR_COMMA) {\n isBrace = token.isBrace = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_RIGHT_CURLY_BRACE) {\n braces--;\n\n if (braces === 0) {\n braceEscaped = false;\n isBrace = token.isBrace = true;\n finished = true;\n break;\n }\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (code === CHAR_FORWARD_SLASH) {\n slashes.push(index);\n tokens.push(token);\n token = { value: '', depth: 0, isGlob: false };\n\n if (finished === true) continue;\n if (prev === CHAR_DOT && index === (start + 1)) {\n start += 2;\n continue;\n }\n\n lastIndex = index + 1;\n continue;\n }\n\n if (opts.noext !== true) {\n const isExtglobChar = code === CHAR_PLUS\n || code === CHAR_AT\n || code === CHAR_ASTERISK\n || code === CHAR_QUESTION_MARK\n || code === CHAR_EXCLAMATION_MARK;\n\n if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n isExtglob = token.isExtglob = true;\n finished = true;\n if (code === CHAR_EXCLAMATION_MARK && index === start) {\n negatedExtglob = true;\n }\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n }\n\n if (code === CHAR_ASTERISK) {\n if (prev === CHAR_ASTERISK) isGlobstar = token.isGlobstar = true;\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_QUESTION_MARK) {\n isGlob = token.isGlob = true;\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n break;\n }\n\n if (code === CHAR_LEFT_SQUARE_BRACKET) {\n while (eos() !== true && (next = advance())) {\n if (next === CHAR_BACKWARD_SLASH) {\n backslashes = token.backslashes = true;\n advance();\n continue;\n }\n\n if (next === CHAR_RIGHT_SQUARE_BRACKET) {\n isBracket = token.isBracket = true;\n isGlob = token.isGlob = true;\n finished = true;\n break;\n }\n }\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n\n if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) {\n negated = token.negated = true;\n start++;\n continue;\n }\n\n if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) {\n isGlob = token.isGlob = true;\n\n if (scanToEnd === true) {\n while (eos() !== true && (code = advance())) {\n if (code === CHAR_LEFT_PARENTHESES) {\n backslashes = token.backslashes = true;\n code = advance();\n continue;\n }\n\n if (code === CHAR_RIGHT_PARENTHESES) {\n finished = true;\n break;\n }\n }\n continue;\n }\n break;\n }\n\n if (isGlob === true) {\n finished = true;\n\n if (scanToEnd === true) {\n continue;\n }\n\n break;\n }\n }\n\n if (opts.noext === true) {\n isExtglob = false;\n isGlob = false;\n }\n\n let base = str;\n let prefix = '';\n let glob = '';\n\n if (start > 0) {\n prefix = str.slice(0, start);\n str = str.slice(start);\n lastIndex -= start;\n }\n\n if (base && isGlob === true && lastIndex > 0) {\n base = str.slice(0, lastIndex);\n glob = str.slice(lastIndex);\n } else if (isGlob === true) {\n base = '';\n glob = str;\n } else {\n base = str;\n }\n\n if (base && base !== '' && base !== '/' && base !== str) {\n if (isPathSeparator(base.charCodeAt(base.length - 1))) {\n base = base.slice(0, -1);\n }\n }\n\n if (opts.unescape === true) {\n if (glob) glob = utils.removeBackslashes(glob);\n\n if (base && backslashes === true) {\n base = utils.removeBackslashes(base);\n }\n }\n\n const state = {\n prefix,\n input,\n start,\n base,\n glob,\n isBrace,\n isBracket,\n isGlob,\n isExtglob,\n isGlobstar,\n negated,\n negatedExtglob\n };\n\n if (opts.tokens === true) {\n state.maxDepth = 0;\n if (!isPathSeparator(code)) {\n tokens.push(token);\n }\n state.tokens = tokens;\n }\n\n if (opts.parts === true || opts.tokens === true) {\n let prevIndex;\n\n for (let idx = 0; idx < slashes.length; idx++) {\n const n = prevIndex ? prevIndex + 1 : start;\n const i = slashes[idx];\n const value = input.slice(n, i);\n if (opts.tokens) {\n if (idx === 0 && start !== 0) {\n tokens[idx].isPrefix = true;\n tokens[idx].value = prefix;\n } else {\n tokens[idx].value = value;\n }\n depth(tokens[idx]);\n state.maxDepth += tokens[idx].depth;\n }\n if (idx !== 0 || value !== '') {\n parts.push(value);\n }\n prevIndex = i;\n }\n\n if (prevIndex && prevIndex + 1 < input.length) {\n const value = input.slice(prevIndex + 1);\n parts.push(value);\n\n if (opts.tokens) {\n tokens[tokens.length - 1].value = value;\n depth(tokens[tokens.length - 1]);\n state.maxDepth += tokens[tokens.length - 1].depth;\n }\n }\n\n state.slashes = slashes;\n state.parts = parts;\n }\n\n return state;\n};\n\nmodule.exports = scan;\n","'use strict';\n\nconst path = require('path');\nconst win32 = process.platform === 'win32';\nconst {\n REGEX_BACKSLASH,\n REGEX_REMOVE_BACKSLASH,\n REGEX_SPECIAL_CHARS,\n REGEX_SPECIAL_CHARS_GLOBAL\n} = require('./constants');\n\nexports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);\nexports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);\nexports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);\nexports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\\\$1');\nexports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');\n\nexports.removeBackslashes = str => {\n return str.replace(REGEX_REMOVE_BACKSLASH, match => {\n return match === '\\\\' ? '' : match;\n });\n};\n\nexports.supportsLookbehinds = () => {\n const segs = process.version.slice(1).split('.').map(Number);\n if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {\n return true;\n }\n return false;\n};\n\nexports.isWindows = options => {\n if (options && typeof options.windows === 'boolean') {\n return options.windows;\n }\n return win32 === true || path.sep === '\\\\';\n};\n\nexports.escapeLast = (input, char, lastIdx) => {\n const idx = input.lastIndexOf(char, lastIdx);\n if (idx === -1) return input;\n if (input[idx - 1] === '\\\\') return exports.escapeLast(input, char, idx - 1);\n return `${input.slice(0, idx)}\\\\${input.slice(idx)}`;\n};\n\nexports.removePrefix = (input, state = {}) => {\n let output = input;\n if (output.startsWith('./')) {\n output = output.slice(2);\n state.prefix = './';\n }\n return output;\n};\n\nexports.wrapOutput = (input, state = {}, options = {}) => {\n const prepend = options.contains ? '' : '^';\n const append = options.contains ? '' : '$';\n\n let output = `${prepend}(?:${input})${append}`;\n if (state.negated === true) {\n output = `(?:^(?!${output}).*$)`;\n }\n return output;\n};\n","'use strict';\n\nvar processFn = function (fn, P, opts) {\n\treturn function () {\n\t\tvar that = this;\n\t\tvar args = new Array(arguments.length);\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\targs[i] = arguments[i];\n\t\t}\n\n\t\treturn new P(function (resolve, reject) {\n\t\t\targs.push(function (err, result) {\n\t\t\t\tif (err) {\n\t\t\t\t\treject(err);\n\t\t\t\t} else if (opts.multiArgs) {\n\t\t\t\t\tvar results = new Array(arguments.length - 1);\n\n\t\t\t\t\tfor (var i = 1; i < arguments.length; i++) {\n\t\t\t\t\t\tresults[i - 1] = arguments[i];\n\t\t\t\t\t}\n\n\t\t\t\t\tresolve(results);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tfn.apply(that, args);\n\t\t});\n\t};\n};\n\nvar pify = module.exports = function (obj, P, opts) {\n\tif (typeof P !== 'function') {\n\t\topts = P;\n\t\tP = Promise;\n\t}\n\n\topts = opts || {};\n\topts.exclude = opts.exclude || [/.+Sync$/];\n\n\tvar filter = function (key) {\n\t\tvar match = function (pattern) {\n\t\t\treturn typeof pattern === 'string' ? key === pattern : pattern.test(key);\n\t\t};\n\n\t\treturn opts.include ? opts.include.some(match) : !opts.exclude.some(match);\n\t};\n\n\tvar ret = typeof obj === 'function' ? function () {\n\t\tif (opts.excludeMain) {\n\t\t\treturn obj.apply(this, arguments);\n\t\t}\n\n\t\treturn processFn(obj, P, opts).apply(this, arguments);\n\t} : {};\n\n\treturn Object.keys(obj).reduce(function (ret, key) {\n\t\tvar x = obj[key];\n\n\t\tret[key] = typeof x === 'function' && filter(key) ? processFn(x, P, opts) : x;\n\n\t\treturn ret;\n\t}, ret);\n};\n\npify.all = pify;\n","'use strict';\n\nconst processFn = (fn, options) => function (...args) {\n\tconst P = options.promiseModule;\n\n\treturn new P((resolve, reject) => {\n\t\tif (options.multiArgs) {\n\t\t\targs.push((...result) => {\n\t\t\t\tif (options.errorFirst) {\n\t\t\t\t\tif (result[0]) {\n\t\t\t\t\t\treject(result);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.shift();\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (options.errorFirst) {\n\t\t\targs.push((error, result) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\targs.push(resolve);\n\t\t}\n\n\t\tfn.apply(this, args);\n\t});\n};\n\nmodule.exports = (input, options) => {\n\toptions = Object.assign({\n\t\texclude: [/.+(Sync|Stream)$/],\n\t\terrorFirst: true,\n\t\tpromiseModule: Promise\n\t}, options);\n\n\tconst objType = typeof input;\n\tif (!(input !== null && (objType === 'object' || objType === 'function'))) {\n\t\tthrow new TypeError(`Expected \\`input\\` to be a \\`Function\\` or \\`Object\\`, got \\`${input === null ? 'null' : objType}\\``);\n\t}\n\n\tconst filter = key => {\n\t\tconst match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);\n\t\treturn options.include ? options.include.some(match) : !options.exclude.some(match);\n\t};\n\n\tlet ret;\n\tif (objType === 'function') {\n\t\tret = function (...args) {\n\t\t\treturn options.excludeMain ? input(...args) : processFn(input, options).apply(this, args);\n\t\t};\n\t} else {\n\t\tret = Object.create(Object.getPrototypeOf(input));\n\t}\n\n\tfor (const key in input) { // eslint-disable-line guard-for-in\n\t\tconst property = input[key];\n\t\tret[key] = typeof property === 'function' && filter(key) ? processFn(property, options) : property;\n\t}\n\n\treturn ret;\n};\n","'use strict';\n\nmodule.exports = typeof Promise === 'function' ? Promise : require('pinkie');\n","'use strict';\n\nvar PENDING = 'pending';\nvar SETTLED = 'settled';\nvar FULFILLED = 'fulfilled';\nvar REJECTED = 'rejected';\nvar NOOP = function () {};\nvar isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function';\n\nvar asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate;\nvar asyncQueue = [];\nvar asyncTimer;\n\nfunction asyncFlush() {\n\t// run promise callbacks\n\tfor (var i = 0; i < asyncQueue.length; i++) {\n\t\tasyncQueue[i][0](asyncQueue[i][1]);\n\t}\n\n\t// reset async asyncQueue\n\tasyncQueue = [];\n\tasyncTimer = false;\n}\n\nfunction asyncCall(callback, arg) {\n\tasyncQueue.push([callback, arg]);\n\n\tif (!asyncTimer) {\n\t\tasyncTimer = true;\n\t\tasyncSetTimer(asyncFlush, 0);\n\t}\n}\n\nfunction invokeResolver(resolver, promise) {\n\tfunction resolvePromise(value) {\n\t\tresolve(promise, value);\n\t}\n\n\tfunction rejectPromise(reason) {\n\t\treject(promise, reason);\n\t}\n\n\ttry {\n\t\tresolver(resolvePromise, rejectPromise);\n\t} catch (e) {\n\t\trejectPromise(e);\n\t}\n}\n\nfunction invokeCallback(subscriber) {\n\tvar owner = subscriber.owner;\n\tvar settled = owner._state;\n\tvar value = owner._data;\n\tvar callback = subscriber[settled];\n\tvar promise = subscriber.then;\n\n\tif (typeof callback === 'function') {\n\t\tsettled = FULFILLED;\n\t\ttry {\n\t\t\tvalue = callback(value);\n\t\t} catch (e) {\n\t\t\treject(promise, e);\n\t\t}\n\t}\n\n\tif (!handleThenable(promise, value)) {\n\t\tif (settled === FULFILLED) {\n\t\t\tresolve(promise, value);\n\t\t}\n\n\t\tif (settled === REJECTED) {\n\t\t\treject(promise, value);\n\t\t}\n\t}\n}\n\nfunction handleThenable(promise, value) {\n\tvar resolved;\n\n\ttry {\n\t\tif (promise === value) {\n\t\t\tthrow new TypeError('A promises callback cannot return that same promise.');\n\t\t}\n\n\t\tif (value && (typeof value === 'function' || typeof value === 'object')) {\n\t\t\t// then should be retrieved only once\n\t\t\tvar then = value.then;\n\n\t\t\tif (typeof then === 'function') {\n\t\t\t\tthen.call(value, function (val) {\n\t\t\t\t\tif (!resolved) {\n\t\t\t\t\t\tresolved = true;\n\n\t\t\t\t\t\tif (value === val) {\n\t\t\t\t\t\t\tfulfill(promise, val);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tresolve(promise, val);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, function (reason) {\n\t\t\t\t\tif (!resolved) {\n\t\t\t\t\t\tresolved = true;\n\n\t\t\t\t\t\treject(promise, reason);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tif (!resolved) {\n\t\t\treject(promise, e);\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\nfunction resolve(promise, value) {\n\tif (promise === value || !handleThenable(promise, value)) {\n\t\tfulfill(promise, value);\n\t}\n}\n\nfunction fulfill(promise, value) {\n\tif (promise._state === PENDING) {\n\t\tpromise._state = SETTLED;\n\t\tpromise._data = value;\n\n\t\tasyncCall(publishFulfillment, promise);\n\t}\n}\n\nfunction reject(promise, reason) {\n\tif (promise._state === PENDING) {\n\t\tpromise._state = SETTLED;\n\t\tpromise._data = reason;\n\n\t\tasyncCall(publishRejection, promise);\n\t}\n}\n\nfunction publish(promise) {\n\tpromise._then = promise._then.forEach(invokeCallback);\n}\n\nfunction publishFulfillment(promise) {\n\tpromise._state = FULFILLED;\n\tpublish(promise);\n}\n\nfunction publishRejection(promise) {\n\tpromise._state = REJECTED;\n\tpublish(promise);\n\tif (!promise._handled && isNode) {\n\t\tglobal.process.emit('unhandledRejection', promise._data, promise);\n\t}\n}\n\nfunction notifyRejectionHandled(promise) {\n\tglobal.process.emit('rejectionHandled', promise);\n}\n\n/**\n * @class\n */\nfunction Promise(resolver) {\n\tif (typeof resolver !== 'function') {\n\t\tthrow new TypeError('Promise resolver ' + resolver + ' is not a function');\n\t}\n\n\tif (this instanceof Promise === false) {\n\t\tthrow new TypeError('Failed to construct \\'Promise\\': Please use the \\'new\\' operator, this object constructor cannot be called as a function.');\n\t}\n\n\tthis._then = [];\n\n\tinvokeResolver(resolver, this);\n}\n\nPromise.prototype = {\n\tconstructor: Promise,\n\n\t_state: PENDING,\n\t_then: null,\n\t_data: undefined,\n\t_handled: false,\n\n\tthen: function (onFulfillment, onRejection) {\n\t\tvar subscriber = {\n\t\t\towner: this,\n\t\t\tthen: new this.constructor(NOOP),\n\t\t\tfulfilled: onFulfillment,\n\t\t\trejected: onRejection\n\t\t};\n\n\t\tif ((onRejection || onFulfillment) && !this._handled) {\n\t\t\tthis._handled = true;\n\t\t\tif (this._state === REJECTED && isNode) {\n\t\t\t\tasyncCall(notifyRejectionHandled, this);\n\t\t\t}\n\t\t}\n\n\t\tif (this._state === FULFILLED || this._state === REJECTED) {\n\t\t\t// already resolved, call callback async\n\t\t\tasyncCall(invokeCallback, subscriber);\n\t\t} else {\n\t\t\t// subscribe\n\t\t\tthis._then.push(subscriber);\n\t\t}\n\n\t\treturn subscriber.then;\n\t},\n\n\tcatch: function (onRejection) {\n\t\treturn this.then(null, onRejection);\n\t}\n};\n\nPromise.all = function (promises) {\n\tif (!Array.isArray(promises)) {\n\t\tthrow new TypeError('You must pass an array to Promise.all().');\n\t}\n\n\treturn new Promise(function (resolve, reject) {\n\t\tvar results = [];\n\t\tvar remaining = 0;\n\n\t\tfunction resolver(index) {\n\t\t\tremaining++;\n\t\t\treturn function (value) {\n\t\t\t\tresults[index] = value;\n\t\t\t\tif (!--remaining) {\n\t\t\t\t\tresolve(results);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tfor (var i = 0, promise; i < promises.length; i++) {\n\t\t\tpromise = promises[i];\n\n\t\t\tif (promise && typeof promise.then === 'function') {\n\t\t\t\tpromise.then(resolver(i), reject);\n\t\t\t} else {\n\t\t\t\tresults[i] = promise;\n\t\t\t}\n\t\t}\n\n\t\tif (!remaining) {\n\t\t\tresolve(results);\n\t\t}\n\t});\n};\n\nPromise.race = function (promises) {\n\tif (!Array.isArray(promises)) {\n\t\tthrow new TypeError('You must pass an array to Promise.race().');\n\t}\n\n\treturn new Promise(function (resolve, reject) {\n\t\tfor (var i = 0, promise; i < promises.length; i++) {\n\t\t\tpromise = promises[i];\n\n\t\t\tif (promise && typeof promise.then === 'function') {\n\t\t\t\tpromise.then(resolve, reject);\n\t\t\t} else {\n\t\t\t\tresolve(promise);\n\t\t\t}\n\t\t}\n\t});\n};\n\nPromise.resolve = function (value) {\n\tif (value && typeof value === 'object' && value.constructor === Promise) {\n\t\treturn value;\n\t}\n\n\treturn new Promise(function (resolve) {\n\t\tresolve(value);\n\t});\n};\n\nPromise.reject = function (reason) {\n\treturn new Promise(function (resolve, reject) {\n\t\treject(reason);\n\t});\n};\n\nmodule.exports = Promise;\n","/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\nlet promise\n\nmodule.exports = typeof queueMicrotask === 'function'\n ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global)\n // reuse resolved promise, and allocate it lazily\n : cb => (promise || (promise = Promise.resolve()))\n .then(cb)\n .catch(err => setTimeout(() => { throw err }, 0))\n","'use strict';\n\nconst fs = require('fs');\nconst { Readable } = require('stream');\nconst sysPath = require('path');\nconst { promisify } = require('util');\nconst picomatch = require('picomatch');\n\nconst readdir = promisify(fs.readdir);\nconst stat = promisify(fs.stat);\nconst lstat = promisify(fs.lstat);\nconst realpath = promisify(fs.realpath);\n\n/**\n * @typedef {Object} EntryInfo\n * @property {String} path\n * @property {String} fullPath\n * @property {fs.Stats=} stats\n * @property {fs.Dirent=} dirent\n * @property {String} basename\n */\n\nconst BANG = '!';\nconst RECURSIVE_ERROR_CODE = 'READDIRP_RECURSIVE_ERROR';\nconst NORMAL_FLOW_ERRORS = new Set(['ENOENT', 'EPERM', 'EACCES', 'ELOOP', RECURSIVE_ERROR_CODE]);\nconst FILE_TYPE = 'files';\nconst DIR_TYPE = 'directories';\nconst FILE_DIR_TYPE = 'files_directories';\nconst EVERYTHING_TYPE = 'all';\nconst ALL_TYPES = [FILE_TYPE, DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE];\n\nconst isNormalFlowError = error => NORMAL_FLOW_ERRORS.has(error.code);\nconst [maj, min] = process.versions.node.split('.').slice(0, 2).map(n => Number.parseInt(n, 10));\nconst wantBigintFsStats = process.platform === 'win32' && (maj > 10 || (maj === 10 && min >= 5));\n\nconst normalizeFilter = filter => {\n if (filter === undefined) return;\n if (typeof filter === 'function') return filter;\n\n if (typeof filter === 'string') {\n const glob = picomatch(filter.trim());\n return entry => glob(entry.basename);\n }\n\n if (Array.isArray(filter)) {\n const positive = [];\n const negative = [];\n for (const item of filter) {\n const trimmed = item.trim();\n if (trimmed.charAt(0) === BANG) {\n negative.push(picomatch(trimmed.slice(1)));\n } else {\n positive.push(picomatch(trimmed));\n }\n }\n\n if (negative.length > 0) {\n if (positive.length > 0) {\n return entry =>\n positive.some(f => f(entry.basename)) && !negative.some(f => f(entry.basename));\n }\n return entry => !negative.some(f => f(entry.basename));\n }\n return entry => positive.some(f => f(entry.basename));\n }\n};\n\nclass ReaddirpStream extends Readable {\n static get defaultOptions() {\n return {\n root: '.',\n /* eslint-disable no-unused-vars */\n fileFilter: (path) => true,\n directoryFilter: (path) => true,\n /* eslint-enable no-unused-vars */\n type: FILE_TYPE,\n lstat: false,\n depth: 2147483648,\n alwaysStat: false\n };\n }\n\n constructor(options = {}) {\n super({\n objectMode: true,\n autoDestroy: true,\n highWaterMark: options.highWaterMark || 4096\n });\n const opts = { ...ReaddirpStream.defaultOptions, ...options };\n const { root, type } = opts;\n\n this._fileFilter = normalizeFilter(opts.fileFilter);\n this._directoryFilter = normalizeFilter(opts.directoryFilter);\n\n const statMethod = opts.lstat ? lstat : stat;\n // Use bigint stats if it's windows and stat() supports options (node 10+).\n if (wantBigintFsStats) {\n this._stat = path => statMethod(path, { bigint: true });\n } else {\n this._stat = statMethod;\n }\n\n this._maxDepth = opts.depth;\n this._wantsDir = [DIR_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type);\n this._wantsFile = [FILE_TYPE, FILE_DIR_TYPE, EVERYTHING_TYPE].includes(type);\n this._wantsEverything = type === EVERYTHING_TYPE;\n this._root = sysPath.resolve(root);\n this._isDirent = ('Dirent' in fs) && !opts.alwaysStat;\n this._statsProp = this._isDirent ? 'dirent' : 'stats';\n this._rdOptions = { encoding: 'utf8', withFileTypes: this._isDirent };\n\n // Launch stream with one parent, the root dir.\n this.parents = [this._exploreDir(root, 1)];\n this.reading = false;\n this.parent = undefined;\n }\n\n async _read(batch) {\n if (this.reading) return;\n this.reading = true;\n\n try {\n while (!this.destroyed && batch > 0) {\n const { path, depth, files = [] } = this.parent || {};\n\n if (files.length > 0) {\n const slice = files.splice(0, batch).map(dirent => this._formatEntry(dirent, path));\n for (const entry of await Promise.all(slice)) {\n if (this.destroyed) return;\n\n const entryType = await this._getEntryType(entry);\n if (entryType === 'directory' && this._directoryFilter(entry)) {\n if (depth <= this._maxDepth) {\n this.parents.push(this._exploreDir(entry.fullPath, depth + 1));\n }\n\n if (this._wantsDir) {\n this.push(entry);\n batch--;\n }\n } else if ((entryType === 'file' || this._includeAsFile(entry)) && this._fileFilter(entry)) {\n if (this._wantsFile) {\n this.push(entry);\n batch--;\n }\n }\n }\n } else {\n const parent = this.parents.pop();\n if (!parent) {\n this.push(null);\n break;\n }\n this.parent = await parent;\n if (this.destroyed) return;\n }\n }\n } catch (error) {\n this.destroy(error);\n } finally {\n this.reading = false;\n }\n }\n\n async _exploreDir(path, depth) {\n let files;\n try {\n files = await readdir(path, this._rdOptions);\n } catch (error) {\n this._onError(error);\n }\n return { files, depth, path };\n }\n\n async _formatEntry(dirent, path) {\n let entry;\n try {\n const basename = this._isDirent ? dirent.name : dirent;\n const fullPath = sysPath.resolve(sysPath.join(path, basename));\n entry = { path: sysPath.relative(this._root, fullPath), fullPath, basename };\n entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);\n } catch (err) {\n this._onError(err);\n }\n return entry;\n }\n\n _onError(err) {\n if (isNormalFlowError(err) && !this.destroyed) {\n this.emit('warn', err);\n } else {\n this.destroy(err);\n }\n }\n\n async _getEntryType(entry) {\n // entry may be undefined, because a warning or an error were emitted\n // and the statsProp is undefined\n const stats = entry && entry[this._statsProp];\n if (!stats) {\n return;\n }\n if (stats.isFile()) {\n return 'file';\n }\n if (stats.isDirectory()) {\n return 'directory';\n }\n if (stats && stats.isSymbolicLink()) {\n const full = entry.fullPath;\n try {\n const entryRealPath = await realpath(full);\n const entryRealPathStats = await lstat(entryRealPath);\n if (entryRealPathStats.isFile()) {\n return 'file';\n }\n if (entryRealPathStats.isDirectory()) {\n const len = entryRealPath.length;\n if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath.sep) {\n const recursiveError = new Error(\n `Circular symlink detected: \"${full}\" points to \"${entryRealPath}\"`\n );\n recursiveError.code = RECURSIVE_ERROR_CODE;\n return this._onError(recursiveError);\n }\n return 'directory';\n }\n } catch (error) {\n this._onError(error);\n }\n }\n }\n\n _includeAsFile(entry) {\n const stats = entry && entry[this._statsProp];\n\n return stats && this._wantsEverything && !stats.isDirectory();\n }\n}\n\n/**\n * @typedef {Object} ReaddirpArguments\n * @property {Function=} fileFilter\n * @property {Function=} directoryFilter\n * @property {String=} type\n * @property {Number=} depth\n * @property {String=} root\n * @property {Boolean=} lstat\n * @property {Boolean=} bigint\n */\n\n/**\n * Main function which ends up calling readdirRec and reads all files and directories in given root recursively.\n * @param {String} root Root directory\n * @param {ReaddirpArguments=} options Options to specify root (start directory), filters and recursion depth\n */\nconst readdirp = (root, options = {}) => {\n let type = options.entryType || options.type;\n if (type === 'both') type = FILE_DIR_TYPE; // backwards-compatibility\n if (type) options.type = type;\n if (!root) {\n throw new Error('readdirp: root argument is required. Usage: readdirp(root, options)');\n } else if (typeof root !== 'string') {\n throw new TypeError('readdirp: root argument must be a string. Usage: readdirp(root, options)');\n } else if (type && !ALL_TYPES.includes(type)) {\n throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(', ')}`);\n }\n\n options.root = root;\n return new ReaddirpStream(options);\n};\n\nconst readdirpPromise = (root, options = {}) => {\n return new Promise((resolve, reject) => {\n const files = [];\n readdirp(root, options)\n .on('data', entry => files.push(entry))\n .on('end', () => resolve(files))\n .on('error', error => reject(error));\n });\n};\n\nreaddirp.promise = readdirpPromise;\nreaddirp.ReaddirpStream = ReaddirpStream;\nreaddirp.default = readdirp;\n\nmodule.exports = readdirp;\n","module.exports = require('./lib/retry');","var RetryOperation = require('./retry_operation');\n\nexports.operation = function(options) {\n var timeouts = exports.timeouts(options);\n return new RetryOperation(timeouts, {\n forever: options && (options.forever || options.retries === Infinity),\n unref: options && options.unref,\n maxRetryTime: options && options.maxRetryTime\n });\n};\n\nexports.timeouts = function(options) {\n if (options instanceof Array) {\n return [].concat(options);\n }\n\n var opts = {\n retries: 10,\n factor: 2,\n minTimeout: 1 * 1000,\n maxTimeout: Infinity,\n randomize: false\n };\n for (var key in options) {\n opts[key] = options[key];\n }\n\n if (opts.minTimeout > opts.maxTimeout) {\n throw new Error('minTimeout is greater than maxTimeout');\n }\n\n var timeouts = [];\n for (var i = 0; i < opts.retries; i++) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n if (options && options.forever && !timeouts.length) {\n timeouts.push(this.createTimeout(i, opts));\n }\n\n // sort the array numerically ascending\n timeouts.sort(function(a,b) {\n return a - b;\n });\n\n return timeouts;\n};\n\nexports.createTimeout = function(attempt, opts) {\n var random = (opts.randomize)\n ? (Math.random() + 1)\n : 1;\n\n var timeout = Math.round(random * Math.max(opts.minTimeout, 1) * Math.pow(opts.factor, attempt));\n timeout = Math.min(timeout, opts.maxTimeout);\n\n return timeout;\n};\n\nexports.wrap = function(obj, options, methods) {\n if (options instanceof Array) {\n methods = options;\n options = null;\n }\n\n if (!methods) {\n methods = [];\n for (var key in obj) {\n if (typeof obj[key] === 'function') {\n methods.push(key);\n }\n }\n }\n\n for (var i = 0; i < methods.length; i++) {\n var method = methods[i];\n var original = obj[method];\n\n obj[method] = function retryWrapper(original) {\n var op = exports.operation(options);\n var args = Array.prototype.slice.call(arguments, 1);\n var callback = args.pop();\n\n args.push(function(err) {\n if (op.retry(err)) {\n return;\n }\n if (err) {\n arguments[0] = op.mainError();\n }\n callback.apply(this, arguments);\n });\n\n op.attempt(function() {\n original.apply(obj, args);\n });\n }.bind(obj, original);\n obj[method].options = options;\n }\n};\n","function RetryOperation(timeouts, options) {\n // Compatibility for the old (timeouts, retryForever) signature\n if (typeof options === 'boolean') {\n options = { forever: options };\n }\n\n this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));\n this._timeouts = timeouts;\n this._options = options || {};\n this._maxRetryTime = options && options.maxRetryTime || Infinity;\n this._fn = null;\n this._errors = [];\n this._attempts = 1;\n this._operationTimeout = null;\n this._operationTimeoutCb = null;\n this._timeout = null;\n this._operationStart = null;\n this._timer = null;\n\n if (this._options.forever) {\n this._cachedTimeouts = this._timeouts.slice(0);\n }\n}\nmodule.exports = RetryOperation;\n\nRetryOperation.prototype.reset = function() {\n this._attempts = 1;\n this._timeouts = this._originalTimeouts.slice(0);\n}\n\nRetryOperation.prototype.stop = function() {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n if (this._timer) {\n clearTimeout(this._timer);\n }\n\n this._timeouts = [];\n this._cachedTimeouts = null;\n};\n\nRetryOperation.prototype.retry = function(err) {\n if (this._timeout) {\n clearTimeout(this._timeout);\n }\n\n if (!err) {\n return false;\n }\n var currentTime = new Date().getTime();\n if (err && currentTime - this._operationStart >= this._maxRetryTime) {\n this._errors.push(err);\n this._errors.unshift(new Error('RetryOperation timeout occurred'));\n return false;\n }\n\n this._errors.push(err);\n\n var timeout = this._timeouts.shift();\n if (timeout === undefined) {\n if (this._cachedTimeouts) {\n // retry forever, only keep last error\n this._errors.splice(0, this._errors.length - 1);\n timeout = this._cachedTimeouts.slice(-1);\n } else {\n return false;\n }\n }\n\n var self = this;\n this._timer = setTimeout(function() {\n self._attempts++;\n\n if (self._operationTimeoutCb) {\n self._timeout = setTimeout(function() {\n self._operationTimeoutCb(self._attempts);\n }, self._operationTimeout);\n\n if (self._options.unref) {\n self._timeout.unref();\n }\n }\n\n self._fn(self._attempts);\n }, timeout);\n\n if (this._options.unref) {\n this._timer.unref();\n }\n\n return true;\n};\n\nRetryOperation.prototype.attempt = function(fn, timeoutOps) {\n this._fn = fn;\n\n if (timeoutOps) {\n if (timeoutOps.timeout) {\n this._operationTimeout = timeoutOps.timeout;\n }\n if (timeoutOps.cb) {\n this._operationTimeoutCb = timeoutOps.cb;\n }\n }\n\n var self = this;\n if (this._operationTimeoutCb) {\n this._timeout = setTimeout(function() {\n self._operationTimeoutCb();\n }, self._operationTimeout);\n }\n\n this._operationStart = new Date().getTime();\n\n this._fn(this._attempts);\n};\n\nRetryOperation.prototype.try = function(fn) {\n console.log('Using RetryOperation.try() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = function(fn) {\n console.log('Using RetryOperation.start() is deprecated');\n this.attempt(fn);\n};\n\nRetryOperation.prototype.start = RetryOperation.prototype.try;\n\nRetryOperation.prototype.errors = function() {\n return this._errors;\n};\n\nRetryOperation.prototype.attempts = function() {\n return this._attempts;\n};\n\nRetryOperation.prototype.mainError = function() {\n if (this._errors.length === 0) {\n return null;\n }\n\n var counts = {};\n var mainError = null;\n var mainErrorCount = 0;\n\n for (var i = 0; i < this._errors.length; i++) {\n var error = this._errors[i];\n var message = error.message;\n var count = (counts[message] || 0) + 1;\n\n counts[message] = count;\n\n if (count >= mainErrorCount) {\n mainError = error;\n mainErrorCount = count;\n }\n }\n\n return mainError;\n};\n","'use strict'\n\nfunction reusify (Constructor) {\n var head = new Constructor()\n var tail = head\n\n function get () {\n var current = head\n\n if (current.next) {\n head = current.next\n } else {\n head = new Constructor()\n tail = head\n }\n\n current.next = null\n\n return current\n }\n\n function release (obj) {\n tail.next = obj\n tail = obj\n }\n\n return {\n get: get,\n release: release\n }\n}\n\nmodule.exports = reusify\n","module.exports = rimraf\nrimraf.sync = rimrafSync\n\nvar assert = require(\"assert\")\nvar path = require(\"path\")\nvar fs = require(\"fs\")\nvar glob = undefined\ntry {\n glob = require(\"glob\")\n} catch (_err) {\n // treat glob as optional.\n}\nvar _0666 = parseInt('666', 8)\n\nvar defaultGlobOpts = {\n nosort: true,\n silent: true\n}\n\n// for EMFILE handling\nvar timeout = 0\n\nvar isWindows = (process.platform === \"win32\")\n\nfunction defaults (options) {\n var methods = [\n 'unlink',\n 'chmod',\n 'stat',\n 'lstat',\n 'rmdir',\n 'readdir'\n ]\n methods.forEach(function(m) {\n options[m] = options[m] || fs[m]\n m = m + 'Sync'\n options[m] = options[m] || fs[m]\n })\n\n options.maxBusyTries = options.maxBusyTries || 3\n options.emfileWait = options.emfileWait || 1000\n if (options.glob === false) {\n options.disableGlob = true\n }\n if (options.disableGlob !== true && glob === undefined) {\n throw Error('glob dependency not found, set `options.disableGlob = true` if intentional')\n }\n options.disableGlob = options.disableGlob || false\n options.glob = options.glob || defaultGlobOpts\n}\n\nfunction rimraf (p, options, cb) {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n assert(p, 'rimraf: missing path')\n assert.equal(typeof p, 'string', 'rimraf: path should be a string')\n assert.equal(typeof cb, 'function', 'rimraf: callback function required')\n assert(options, 'rimraf: invalid options argument provided')\n assert.equal(typeof options, 'object', 'rimraf: options should be object')\n\n defaults(options)\n\n var busyTries = 0\n var errState = null\n var n = 0\n\n if (options.disableGlob || !glob.hasMagic(p))\n return afterGlob(null, [p])\n\n options.lstat(p, function (er, stat) {\n if (!er)\n return afterGlob(null, [p])\n\n glob(p, options.glob, afterGlob)\n })\n\n function next (er) {\n errState = errState || er\n if (--n === 0)\n cb(errState)\n }\n\n function afterGlob (er, results) {\n if (er)\n return cb(er)\n\n n = results.length\n if (n === 0)\n return cb()\n\n results.forEach(function (p) {\n rimraf_(p, options, function CB (er) {\n if (er) {\n if ((er.code === \"EBUSY\" || er.code === \"ENOTEMPTY\" || er.code === \"EPERM\") &&\n busyTries < options.maxBusyTries) {\n busyTries ++\n var time = busyTries * 100\n // try again, with the same exact callback as this one.\n return setTimeout(function () {\n rimraf_(p, options, CB)\n }, time)\n }\n\n // this one won't happen if graceful-fs is used.\n if (er.code === \"EMFILE\" && timeout < options.emfileWait) {\n return setTimeout(function () {\n rimraf_(p, options, CB)\n }, timeout ++)\n }\n\n // already gone\n if (er.code === \"ENOENT\") er = null\n }\n\n timeout = 0\n next(er)\n })\n })\n }\n}\n\n// Two possible strategies.\n// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR\n// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR\n//\n// Both result in an extra syscall when you guess wrong. However, there\n// are likely far more normal files in the world than directories. This\n// is based on the assumption that a the average number of files per\n// directory is >= 1.\n//\n// If anyone ever complains about this, then I guess the strategy could\n// be made configurable somehow. But until then, YAGNI.\nfunction rimraf_ (p, options, cb) {\n assert(p)\n assert(options)\n assert(typeof cb === 'function')\n\n // sunos lets the root user unlink directories, which is... weird.\n // so we have to lstat here and make sure it's not a dir.\n options.lstat(p, function (er, st) {\n if (er && er.code === \"ENOENT\")\n return cb(null)\n\n // Windows can EPERM on stat. Life is suffering.\n if (er && er.code === \"EPERM\" && isWindows)\n fixWinEPERM(p, options, er, cb)\n\n if (st && st.isDirectory())\n return rmdir(p, options, er, cb)\n\n options.unlink(p, function (er) {\n if (er) {\n if (er.code === \"ENOENT\")\n return cb(null)\n if (er.code === \"EPERM\")\n return (isWindows)\n ? fixWinEPERM(p, options, er, cb)\n : rmdir(p, options, er, cb)\n if (er.code === \"EISDIR\")\n return rmdir(p, options, er, cb)\n }\n return cb(er)\n })\n })\n}\n\nfunction fixWinEPERM (p, options, er, cb) {\n assert(p)\n assert(options)\n assert(typeof cb === 'function')\n if (er)\n assert(er instanceof Error)\n\n options.chmod(p, _0666, function (er2) {\n if (er2)\n cb(er2.code === \"ENOENT\" ? null : er)\n else\n options.stat(p, function(er3, stats) {\n if (er3)\n cb(er3.code === \"ENOENT\" ? null : er)\n else if (stats.isDirectory())\n rmdir(p, options, er, cb)\n else\n options.unlink(p, cb)\n })\n })\n}\n\nfunction fixWinEPERMSync (p, options, er) {\n assert(p)\n assert(options)\n if (er)\n assert(er instanceof Error)\n\n try {\n options.chmodSync(p, _0666)\n } catch (er2) {\n if (er2.code === \"ENOENT\")\n return\n else\n throw er\n }\n\n try {\n var stats = options.statSync(p)\n } catch (er3) {\n if (er3.code === \"ENOENT\")\n return\n else\n throw er\n }\n\n if (stats.isDirectory())\n rmdirSync(p, options, er)\n else\n options.unlinkSync(p)\n}\n\nfunction rmdir (p, options, originalEr, cb) {\n assert(p)\n assert(options)\n if (originalEr)\n assert(originalEr instanceof Error)\n assert(typeof cb === 'function')\n\n // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)\n // if we guessed wrong, and it's not a directory, then\n // raise the original error.\n options.rmdir(p, function (er) {\n if (er && (er.code === \"ENOTEMPTY\" || er.code === \"EEXIST\" || er.code === \"EPERM\"))\n rmkids(p, options, cb)\n else if (er && er.code === \"ENOTDIR\")\n cb(originalEr)\n else\n cb(er)\n })\n}\n\nfunction rmkids(p, options, cb) {\n assert(p)\n assert(options)\n assert(typeof cb === 'function')\n\n options.readdir(p, function (er, files) {\n if (er)\n return cb(er)\n var n = files.length\n if (n === 0)\n return options.rmdir(p, cb)\n var errState\n files.forEach(function (f) {\n rimraf(path.join(p, f), options, function (er) {\n if (errState)\n return\n if (er)\n return cb(errState = er)\n if (--n === 0)\n options.rmdir(p, cb)\n })\n })\n })\n}\n\n// this looks simpler, and is strictly *faster*, but will\n// tie up the JavaScript thread and fail on excessively\n// deep directory trees.\nfunction rimrafSync (p, options) {\n options = options || {}\n defaults(options)\n\n assert(p, 'rimraf: missing path')\n assert.equal(typeof p, 'string', 'rimraf: path should be a string')\n assert(options, 'rimraf: missing options')\n assert.equal(typeof options, 'object', 'rimraf: options should be object')\n\n var results\n\n if (options.disableGlob || !glob.hasMagic(p)) {\n results = [p]\n } else {\n try {\n options.lstatSync(p)\n results = [p]\n } catch (er) {\n results = glob.sync(p, options.glob)\n }\n }\n\n if (!results.length)\n return\n\n for (var i = 0; i < results.length; i++) {\n var p = results[i]\n\n try {\n var st = options.lstatSync(p)\n } catch (er) {\n if (er.code === \"ENOENT\")\n return\n\n // Windows can EPERM on stat. Life is suffering.\n if (er.code === \"EPERM\" && isWindows)\n fixWinEPERMSync(p, options, er)\n }\n\n try {\n // sunos lets the root user unlink directories, which is... weird.\n if (st && st.isDirectory())\n rmdirSync(p, options, null)\n else\n options.unlinkSync(p)\n } catch (er) {\n if (er.code === \"ENOENT\")\n return\n if (er.code === \"EPERM\")\n return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)\n if (er.code !== \"EISDIR\")\n throw er\n\n rmdirSync(p, options, er)\n }\n }\n}\n\nfunction rmdirSync (p, options, originalEr) {\n assert(p)\n assert(options)\n if (originalEr)\n assert(originalEr instanceof Error)\n\n try {\n options.rmdirSync(p)\n } catch (er) {\n if (er.code === \"ENOENT\")\n return\n if (er.code === \"ENOTDIR\")\n throw originalEr\n if (er.code === \"ENOTEMPTY\" || er.code === \"EEXIST\" || er.code === \"EPERM\")\n rmkidsSync(p, options)\n }\n}\n\nfunction rmkidsSync (p, options) {\n assert(p)\n assert(options)\n options.readdirSync(p).forEach(function (f) {\n rimrafSync(path.join(p, f), options)\n })\n\n // We only end up here once we got ENOTEMPTY at least once, and\n // at this point, we are guaranteed to have removed all the kids.\n // So, we know that it won't be ENOENT or ENOTDIR or anything else.\n // try really hard to delete stuff on windows, because it has a\n // PROFOUNDLY annoying habit of not closing handles promptly when\n // files are deleted, resulting in spurious ENOTEMPTY errors.\n var retries = isWindows ? 100 : 1\n var i = 0\n do {\n var threw = true\n try {\n var ret = options.rmdirSync(p, options)\n threw = false\n return ret\n } finally {\n if (++i < retries && threw)\n continue\n }\n } while (true)\n}\n","const assert = require(\"assert\")\nconst path = require(\"path\")\nconst fs = require(\"fs\")\nlet glob = undefined\ntry {\n glob = require(\"glob\")\n} catch (_err) {\n // treat glob as optional.\n}\n\nconst defaultGlobOpts = {\n nosort: true,\n silent: true\n}\n\n// for EMFILE handling\nlet timeout = 0\n\nconst isWindows = (process.platform === \"win32\")\n\nconst defaults = options => {\n const methods = [\n 'unlink',\n 'chmod',\n 'stat',\n 'lstat',\n 'rmdir',\n 'readdir'\n ]\n methods.forEach(m => {\n options[m] = options[m] || fs[m]\n m = m + 'Sync'\n options[m] = options[m] || fs[m]\n })\n\n options.maxBusyTries = options.maxBusyTries || 3\n options.emfileWait = options.emfileWait || 1000\n if (options.glob === false) {\n options.disableGlob = true\n }\n if (options.disableGlob !== true && glob === undefined) {\n throw Error('glob dependency not found, set `options.disableGlob = true` if intentional')\n }\n options.disableGlob = options.disableGlob || false\n options.glob = options.glob || defaultGlobOpts\n}\n\nconst rimraf = (p, options, cb) => {\n if (typeof options === 'function') {\n cb = options\n options = {}\n }\n\n assert(p, 'rimraf: missing path')\n assert.equal(typeof p, 'string', 'rimraf: path should be a string')\n assert.equal(typeof cb, 'function', 'rimraf: callback function required')\n assert(options, 'rimraf: invalid options argument provided')\n assert.equal(typeof options, 'object', 'rimraf: options should be object')\n\n defaults(options)\n\n let busyTries = 0\n let errState = null\n let n = 0\n\n const next = (er) => {\n errState = errState || er\n if (--n === 0)\n cb(errState)\n }\n\n const afterGlob = (er, results) => {\n if (er)\n return cb(er)\n\n n = results.length\n if (n === 0)\n return cb()\n\n results.forEach(p => {\n const CB = (er) => {\n if (er) {\n if ((er.code === \"EBUSY\" || er.code === \"ENOTEMPTY\" || er.code === \"EPERM\") &&\n busyTries < options.maxBusyTries) {\n busyTries ++\n // try again, with the same exact callback as this one.\n return setTimeout(() => rimraf_(p, options, CB), busyTries * 100)\n }\n\n // this one won't happen if graceful-fs is used.\n if (er.code === \"EMFILE\" && timeout < options.emfileWait) {\n return setTimeout(() => rimraf_(p, options, CB), timeout ++)\n }\n\n // already gone\n if (er.code === \"ENOENT\") er = null\n }\n\n timeout = 0\n next(er)\n }\n rimraf_(p, options, CB)\n })\n }\n\n if (options.disableGlob || !glob.hasMagic(p))\n return afterGlob(null, [p])\n\n options.lstat(p, (er, stat) => {\n if (!er)\n return afterGlob(null, [p])\n\n glob(p, options.glob, afterGlob)\n })\n\n}\n\n// Two possible strategies.\n// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR\n// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR\n//\n// Both result in an extra syscall when you guess wrong. However, there\n// are likely far more normal files in the world than directories. This\n// is based on the assumption that a the average number of files per\n// directory is >= 1.\n//\n// If anyone ever complains about this, then I guess the strategy could\n// be made configurable somehow. But until then, YAGNI.\nconst rimraf_ = (p, options, cb) => {\n assert(p)\n assert(options)\n assert(typeof cb === 'function')\n\n // sunos lets the root user unlink directories, which is... weird.\n // so we have to lstat here and make sure it's not a dir.\n options.lstat(p, (er, st) => {\n if (er && er.code === \"ENOENT\")\n return cb(null)\n\n // Windows can EPERM on stat. Life is suffering.\n if (er && er.code === \"EPERM\" && isWindows)\n fixWinEPERM(p, options, er, cb)\n\n if (st && st.isDirectory())\n return rmdir(p, options, er, cb)\n\n options.unlink(p, er => {\n if (er) {\n if (er.code === \"ENOENT\")\n return cb(null)\n if (er.code === \"EPERM\")\n return (isWindows)\n ? fixWinEPERM(p, options, er, cb)\n : rmdir(p, options, er, cb)\n if (er.code === \"EISDIR\")\n return rmdir(p, options, er, cb)\n }\n return cb(er)\n })\n })\n}\n\nconst fixWinEPERM = (p, options, er, cb) => {\n assert(p)\n assert(options)\n assert(typeof cb === 'function')\n\n options.chmod(p, 0o666, er2 => {\n if (er2)\n cb(er2.code === \"ENOENT\" ? null : er)\n else\n options.stat(p, (er3, stats) => {\n if (er3)\n cb(er3.code === \"ENOENT\" ? null : er)\n else if (stats.isDirectory())\n rmdir(p, options, er, cb)\n else\n options.unlink(p, cb)\n })\n })\n}\n\nconst fixWinEPERMSync = (p, options, er) => {\n assert(p)\n assert(options)\n\n try {\n options.chmodSync(p, 0o666)\n } catch (er2) {\n if (er2.code === \"ENOENT\")\n return\n else\n throw er\n }\n\n let stats\n try {\n stats = options.statSync(p)\n } catch (er3) {\n if (er3.code === \"ENOENT\")\n return\n else\n throw er\n }\n\n if (stats.isDirectory())\n rmdirSync(p, options, er)\n else\n options.unlinkSync(p)\n}\n\nconst rmdir = (p, options, originalEr, cb) => {\n assert(p)\n assert(options)\n assert(typeof cb === 'function')\n\n // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)\n // if we guessed wrong, and it's not a directory, then\n // raise the original error.\n options.rmdir(p, er => {\n if (er && (er.code === \"ENOTEMPTY\" || er.code === \"EEXIST\" || er.code === \"EPERM\"))\n rmkids(p, options, cb)\n else if (er && er.code === \"ENOTDIR\")\n cb(originalEr)\n else\n cb(er)\n })\n}\n\nconst rmkids = (p, options, cb) => {\n assert(p)\n assert(options)\n assert(typeof cb === 'function')\n\n options.readdir(p, (er, files) => {\n if (er)\n return cb(er)\n let n = files.length\n if (n === 0)\n return options.rmdir(p, cb)\n let errState\n files.forEach(f => {\n rimraf(path.join(p, f), options, er => {\n if (errState)\n return\n if (er)\n return cb(errState = er)\n if (--n === 0)\n options.rmdir(p, cb)\n })\n })\n })\n}\n\n// this looks simpler, and is strictly *faster*, but will\n// tie up the JavaScript thread and fail on excessively\n// deep directory trees.\nconst rimrafSync = (p, options) => {\n options = options || {}\n defaults(options)\n\n assert(p, 'rimraf: missing path')\n assert.equal(typeof p, 'string', 'rimraf: path should be a string')\n assert(options, 'rimraf: missing options')\n assert.equal(typeof options, 'object', 'rimraf: options should be object')\n\n let results\n\n if (options.disableGlob || !glob.hasMagic(p)) {\n results = [p]\n } else {\n try {\n options.lstatSync(p)\n results = [p]\n } catch (er) {\n results = glob.sync(p, options.glob)\n }\n }\n\n if (!results.length)\n return\n\n for (let i = 0; i < results.length; i++) {\n const p = results[i]\n\n let st\n try {\n st = options.lstatSync(p)\n } catch (er) {\n if (er.code === \"ENOENT\")\n return\n\n // Windows can EPERM on stat. Life is suffering.\n if (er.code === \"EPERM\" && isWindows)\n fixWinEPERMSync(p, options, er)\n }\n\n try {\n // sunos lets the root user unlink directories, which is... weird.\n if (st && st.isDirectory())\n rmdirSync(p, options, null)\n else\n options.unlinkSync(p)\n } catch (er) {\n if (er.code === \"ENOENT\")\n return\n if (er.code === \"EPERM\")\n return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er)\n if (er.code !== \"EISDIR\")\n throw er\n\n rmdirSync(p, options, er)\n }\n }\n}\n\nconst rmdirSync = (p, options, originalEr) => {\n assert(p)\n assert(options)\n\n try {\n options.rmdirSync(p)\n } catch (er) {\n if (er.code === \"ENOENT\")\n return\n if (er.code === \"ENOTDIR\")\n throw originalEr\n if (er.code === \"ENOTEMPTY\" || er.code === \"EEXIST\" || er.code === \"EPERM\")\n rmkidsSync(p, options)\n }\n}\n\nconst rmkidsSync = (p, options) => {\n assert(p)\n assert(options)\n options.readdirSync(p).forEach(f => rimrafSync(path.join(p, f), options))\n\n // We only end up here once we got ENOTEMPTY at least once, and\n // at this point, we are guaranteed to have removed all the kids.\n // So, we know that it won't be ENOENT or ENOTDIR or anything else.\n // try really hard to delete stuff on windows, because it has a\n // PROFOUNDLY annoying habit of not closing handles promptly when\n // files are deleted, resulting in spurious ENOTEMPTY errors.\n const retries = isWindows ? 100 : 1\n let i = 0\n do {\n let threw = true\n try {\n const ret = options.rmdirSync(p, options)\n threw = false\n return ret\n } finally {\n if (++i < retries && threw)\n continue\n }\n } while (true)\n}\n\nmodule.exports = rimraf\nrimraf.sync = rimrafSync\n","/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\nmodule.exports = runParallel\n\nconst queueMicrotask = require('queue-microtask')\n\nfunction runParallel (tasks, cb) {\n let results, pending, keys\n let isSync = true\n\n if (Array.isArray(tasks)) {\n results = []\n pending = tasks.length\n } else {\n keys = Object.keys(tasks)\n results = {}\n pending = keys.length\n }\n\n function done (err) {\n function end () {\n if (cb) cb(err, results)\n cb = null\n }\n if (isSync) queueMicrotask(end)\n else end()\n }\n\n function each (i, err, result) {\n results[i] = result\n if (--pending === 0 || err) {\n done(err)\n }\n }\n\n if (!pending) {\n // empty\n done(null)\n } else if (keys) {\n // object\n keys.forEach(function (key) {\n tasks[key](function (err, result) { each(key, err, result) })\n })\n } else {\n // array\n tasks.forEach(function (task, i) {\n task(function (err, result) { each(i, err, result) })\n })\n }\n\n isSync = false\n}\n","export default function slash(path) {\n\tconst isExtendedLengthPath = /^\\\\\\\\\\?\\\\/.test(path);\n\tconst hasNonAscii = /[^\\u0000-\\u0080]+/.test(path); // eslint-disable-line no-control-regex\n\n\tif (isExtendedLengthPath || hasNonAscii) {\n\t\treturn path;\n\t}\n\n\treturn path.replace(/\\\\/g, '/');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FanOut = void 0;\nclass FanOut {\n constructor() {\n this.listeners = new Set();\n }\n emit(data) {\n this.listeners.forEach((listener) => listener(data));\n }\n listen(listener) {\n const listeners = this.listeners;\n listeners.add(listener);\n return () => listeners.delete(listener);\n }\n}\nexports.FanOut = FanOut;\n","/*!\n * to-regex-range <https://github.com/micromatch/to-regex-range>\n *\n * Copyright (c) 2015-present, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nconst isNumber = require('is-number');\n\nconst toRegexRange = (min, max, options) => {\n if (isNumber(min) === false) {\n throw new TypeError('toRegexRange: expected the first argument to be a number');\n }\n\n if (max === void 0 || min === max) {\n return String(min);\n }\n\n if (isNumber(max) === false) {\n throw new TypeError('toRegexRange: expected the second argument to be a number.');\n }\n\n let opts = { relaxZeros: true, ...options };\n if (typeof opts.strictZeros === 'boolean') {\n opts.relaxZeros = opts.strictZeros === false;\n }\n\n let relax = String(opts.relaxZeros);\n let shorthand = String(opts.shorthand);\n let capture = String(opts.capture);\n let wrap = String(opts.wrap);\n let cacheKey = min + ':' + max + '=' + relax + shorthand + capture + wrap;\n\n if (toRegexRange.cache.hasOwnProperty(cacheKey)) {\n return toRegexRange.cache[cacheKey].result;\n }\n\n let a = Math.min(min, max);\n let b = Math.max(min, max);\n\n if (Math.abs(a - b) === 1) {\n let result = min + '|' + max;\n if (opts.capture) {\n return `(${result})`;\n }\n if (opts.wrap === false) {\n return result;\n }\n return `(?:${result})`;\n }\n\n let isPadded = hasPadding(min) || hasPadding(max);\n let state = { min, max, a, b };\n let positives = [];\n let negatives = [];\n\n if (isPadded) {\n state.isPadded = isPadded;\n state.maxLen = String(state.max).length;\n }\n\n if (a < 0) {\n let newMin = b < 0 ? Math.abs(b) : 1;\n negatives = splitToPatterns(newMin, Math.abs(a), state, opts);\n a = state.a = 0;\n }\n\n if (b >= 0) {\n positives = splitToPatterns(a, b, state, opts);\n }\n\n state.negatives = negatives;\n state.positives = positives;\n state.result = collatePatterns(negatives, positives, opts);\n\n if (opts.capture === true) {\n state.result = `(${state.result})`;\n } else if (opts.wrap !== false && (positives.length + negatives.length) > 1) {\n state.result = `(?:${state.result})`;\n }\n\n toRegexRange.cache[cacheKey] = state;\n return state.result;\n};\n\nfunction collatePatterns(neg, pos, options) {\n let onlyNegative = filterPatterns(neg, pos, '-', false, options) || [];\n let onlyPositive = filterPatterns(pos, neg, '', false, options) || [];\n let intersected = filterPatterns(neg, pos, '-?', true, options) || [];\n let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);\n return subpatterns.join('|');\n}\n\nfunction splitToRanges(min, max) {\n let nines = 1;\n let zeros = 1;\n\n let stop = countNines(min, nines);\n let stops = new Set([max]);\n\n while (min <= stop && stop <= max) {\n stops.add(stop);\n nines += 1;\n stop = countNines(min, nines);\n }\n\n stop = countZeros(max + 1, zeros) - 1;\n\n while (min < stop && stop <= max) {\n stops.add(stop);\n zeros += 1;\n stop = countZeros(max + 1, zeros) - 1;\n }\n\n stops = [...stops];\n stops.sort(compare);\n return stops;\n}\n\n/**\n * Convert a range to a regex pattern\n * @param {Number} `start`\n * @param {Number} `stop`\n * @return {String}\n */\n\nfunction rangeToPattern(start, stop, options) {\n if (start === stop) {\n return { pattern: start, count: [], digits: 0 };\n }\n\n let zipped = zip(start, stop);\n let digits = zipped.length;\n let pattern = '';\n let count = 0;\n\n for (let i = 0; i < digits; i++) {\n let [startDigit, stopDigit] = zipped[i];\n\n if (startDigit === stopDigit) {\n pattern += startDigit;\n\n } else if (startDigit !== '0' || stopDigit !== '9') {\n pattern += toCharacterClass(startDigit, stopDigit, options);\n\n } else {\n count++;\n }\n }\n\n if (count) {\n pattern += options.shorthand === true ? '\\\\d' : '[0-9]';\n }\n\n return { pattern, count: [count], digits };\n}\n\nfunction splitToPatterns(min, max, tok, options) {\n let ranges = splitToRanges(min, max);\n let tokens = [];\n let start = min;\n let prev;\n\n for (let i = 0; i < ranges.length; i++) {\n let max = ranges[i];\n let obj = rangeToPattern(String(start), String(max), options);\n let zeros = '';\n\n if (!tok.isPadded && prev && prev.pattern === obj.pattern) {\n if (prev.count.length > 1) {\n prev.count.pop();\n }\n\n prev.count.push(obj.count[0]);\n prev.string = prev.pattern + toQuantifier(prev.count);\n start = max + 1;\n continue;\n }\n\n if (tok.isPadded) {\n zeros = padZeros(max, tok, options);\n }\n\n obj.string = zeros + obj.pattern + toQuantifier(obj.count);\n tokens.push(obj);\n start = max + 1;\n prev = obj;\n }\n\n return tokens;\n}\n\nfunction filterPatterns(arr, comparison, prefix, intersection, options) {\n let result = [];\n\n for (let ele of arr) {\n let { string } = ele;\n\n // only push if _both_ are negative...\n if (!intersection && !contains(comparison, 'string', string)) {\n result.push(prefix + string);\n }\n\n // or _both_ are positive\n if (intersection && contains(comparison, 'string', string)) {\n result.push(prefix + string);\n }\n }\n return result;\n}\n\n/**\n * Zip strings\n */\n\nfunction zip(a, b) {\n let arr = [];\n for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);\n return arr;\n}\n\nfunction compare(a, b) {\n return a > b ? 1 : b > a ? -1 : 0;\n}\n\nfunction contains(arr, key, val) {\n return arr.some(ele => ele[key] === val);\n}\n\nfunction countNines(min, len) {\n return Number(String(min).slice(0, -len) + '9'.repeat(len));\n}\n\nfunction countZeros(integer, zeros) {\n return integer - (integer % Math.pow(10, zeros));\n}\n\nfunction toQuantifier(digits) {\n let [start = 0, stop = ''] = digits;\n if (stop || start > 1) {\n return `{${start + (stop ? ',' + stop : '')}}`;\n }\n return '';\n}\n\nfunction toCharacterClass(a, b, options) {\n return `[${a}${(b - a === 1) ? '' : '-'}${b}]`;\n}\n\nfunction hasPadding(str) {\n return /^-?(0+)\\d/.test(str);\n}\n\nfunction padZeros(value, tok, options) {\n if (!tok.isPadded) {\n return value;\n }\n\n let diff = Math.abs(tok.maxLen - String(value).length);\n let relax = options.relaxZeros !== false;\n\n switch (diff) {\n case 0:\n return '';\n case 1:\n return relax ? '0?' : '0';\n case 2:\n return relax ? '0{0,2}' : '00';\n default: {\n return relax ? `0{0,${diff}}` : `0{${diff}}`;\n }\n }\n}\n\n/**\n * Cache\n */\n\ntoRegexRange.cache = {};\ntoRegexRange.clearCache = () => (toRegexRange.cache = {});\n\n/**\n * Expose `toRegexRange`\n */\n\nmodule.exports = toRegexRange;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./printTree\"), exports);\ntslib_1.__exportStar(require(\"./printBinary\"), exports);\ntslib_1.__exportStar(require(\"./printJson\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.printBinary = void 0;\nconst printBinary = (tab = '', children) => {\n const left = children[0], right = children[1];\n let str = '';\n if (left)\n str += '\\n' + tab + '← ' + left(tab + ' ');\n if (right)\n str += '\\n' + tab + '→ ' + right(tab + ' ');\n return str;\n};\nexports.printBinary = printBinary;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.printJson = void 0;\nconst printJson = (tab = '', json, space = 2) => (JSON.stringify(json, null, space) || 'nil').split('\\n').join('\\n' + tab);\nexports.printJson = printJson;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.printTree = void 0;\nconst printTree = (tab = '', children) => {\n let str = '';\n let last = children.length - 1;\n for (; last >= 0; last--)\n if (children[last])\n break;\n for (let i = 0; i <= last; i++) {\n const fn = children[i];\n if (!fn)\n continue;\n const isLast = i === last;\n const child = fn(tab + (isLast ? ' ' : '│') + ' ');\n const branch = child ? (isLast ? '└─' : '├─') : '│';\n str += '\\n' + tab + branch + (child ? ' ' + child : '');\n }\n return str;\n};\nexports.printTree = printTree;\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","'use strict'\n\nexports.fromCallback = function (fn) {\n return Object.defineProperty(function (...args) {\n if (typeof args[args.length - 1] === 'function') fn.apply(this, args)\n else {\n return new Promise((resolve, reject) => {\n args.push((err, res) => (err != null) ? reject(err) : resolve(res))\n fn.apply(this, args)\n })\n }\n }, 'name', { value: fn.name })\n}\n\nexports.fromPromise = function (fn) {\n return Object.defineProperty(function (...args) {\n const cb = args[args.length - 1]\n if (typeof cb !== 'function') return fn.apply(this, args)\n else {\n args.pop()\n fn.apply(this, args).then(r => cb(null, r), cb)\n }\n }, 'name', { value: fn.name })\n}\n","// Returns a wrapper function that returns a wrapped callback\n// The wrapper function should do some stuff, and return a\n// presumably different callback function.\n// This makes sure that own properties are retained, so that\n// decorations and such are not lost along the way.\nmodule.exports = wrappy\nfunction wrappy (fn, cb) {\n if (fn && cb) return wrappy(fn)(cb)\n\n if (typeof fn !== 'function')\n throw new TypeError('need wrapper function')\n\n Object.keys(fn).forEach(function (k) {\n wrapper[k] = fn[k]\n })\n\n return wrapper\n\n function wrapper() {\n var args = new Array(arguments.length)\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i]\n }\n var ret = fn.apply(this, args)\n var cb = args[args.length-1]\n if (typeof ret === 'function' && ret !== cb) {\n Object.keys(cb).forEach(function (k) {\n ret[k] = cb[k]\n })\n }\n return ret\n }\n}\n","import { CompilerMode } from \".\";\nimport { createContext } from \"../utils/context\";\nimport { XmcpConfigOuputSchema } from \"./config\";\n\ninterface CompilerContext {\n /** The mode of the compiler. */\n mode: CompilerMode;\n /** Whether the adapter is enabled. */\n adapter?: boolean;\n /** The platforms to build for. */\n platforms: {\n /** Generates a .vercel folder to deploy on Vercel */\n vercel?: boolean;\n };\n /** The paths to the tools. */\n toolPaths: Set<string>;\n /** The paths to the prompts. */\n promptPaths: Set<string>;\n /** The paths to the resources. */\n resourcePaths: Set<string>;\n /** Whether the middleware is enabled. */\n hasMiddleware: boolean;\n /** The parsed config. */\n xmcpConfig?: XmcpConfigOuputSchema;\n /** Client bundles mapping for React (toolName -> bundlePath). */\n clientBundles?: Map<string, string>;\n}\n\nexport const compilerContext = createContext<CompilerContext>({\n name: \"xmcp-compiler\",\n});\n\n// Preset some defaults for the compiler context\nexport const compilerContextProvider = (\n initialValue: Omit<\n CompilerContext,\n \"toolPaths\" | \"promptPaths\" | \"resourcePaths\" | \"hasMiddleware\"\n >,\n callback: () => void\n) => {\n return compilerContext.provider(\n {\n ...initialValue,\n toolPaths: new Set(),\n promptPaths: new Set(),\n resourcePaths: new Set(),\n hasMiddleware: false,\n },\n callback\n );\n};\n\nexport const getXmcpConfig = () => {\n const { xmcpConfig } = compilerContext.getContext();\n if (!xmcpConfig) {\n throw new Error(\"xmcp config not found\");\n }\n return xmcpConfig;\n};\n","// ------------------------------------------------------------\n// Constants\n// ------------------------------------------------------------\n\n/**\n * Default values for CORS config\n */\nexport const DEFAULT_CORS_CONFIG = {\n origin: \"*\",\n methods: [\"GET\", \"POST\"],\n allowedHeaders: [\n \"Content-Type\",\n \"Authorization\",\n \"mcp-session-id\",\n \"mcp-protocol-version\",\n ],\n exposedHeaders: [\"Content-Type\", \"Authorization\", \"mcp-session-id\"],\n credentials: false,\n maxAge: 86400,\n};\n\n/**\n * Default values for the HTTP transport\n */\nexport const DEFAULT_HTTP_CONFIG = {\n port: 3001,\n host: \"127.0.0.1\",\n bodySizeLimit: 1024 * 1024 * 10, // 10MB\n debug: false,\n endpoint: \"/mcp\",\n cors: DEFAULT_CORS_CONFIG,\n};\n\n/**\n * Default values for the STDIO transport\n */\nexport const DEFAULT_STDIO_CONFIG = {\n debug: false,\n};\n\n/**\n * Default values for the tools directory\n */\nexport const DEFAULT_PATHS_CONFIG = {\n tools: \"src/tools\",\n prompts: \"src/prompts\",\n resources: \"src/resources\",\n};\n\n/**\n * Default values for the template config\n */\nexport const DEFAULT_TEMPLATE_CONFIG = {\n name: \"xmcp server\",\n description:\n \"This MCP server was bootstrapped with xmcp. Click the button below to connect to the endpoint.\",\n};\n","import { z } from \"zod\";\nimport {\n stdioTransportConfigSchema,\n httpTransportConfigSchema,\n experimentalConfigSchema,\n pathsConfigSchema,\n webpackConfigSchema,\n templateConfigSchema,\n} from \"./schemas\";\nimport { Configuration } from \"webpack\";\n\n/**\n * xmcp Config schema\n */\nexport const configSchema = z.object({\n stdio: stdioTransportConfigSchema.optional(),\n http: httpTransportConfigSchema.optional(),\n experimental: experimentalConfigSchema.optional(),\n paths: pathsConfigSchema.optional(),\n webpack: webpackConfigSchema.optional(),\n template: templateConfigSchema.optional(),\n});\n\ntype WebpackConfig = { webpack?: (config: Configuration) => Configuration };\n\nexport type XmcpConfigInputSchema = Omit<\n z.input<typeof configSchema>,\n \"webpack\"\n> &\n WebpackConfig;\n\nexport type XmcpConfigOuputSchema = Omit<\n z.output<typeof configSchema>,\n \"webpack\"\n> &\n WebpackConfig;\n","import {\n getResolvedHttpConfig,\n getResolvedCorsConfig,\n getResolvedPathsConfig,\n getResolvedOAuthConfig,\n getResolvedTemplateConfig,\n getResolvedExperimentalConfig,\n} from \"./utils\";\nimport { HttpTransportConfig } from \"./schemas/transport/http\";\n\nexport function injectHttpVariables(\n httpConfig: HttpTransportConfig | boolean,\n mode: string\n) {\n const resolvedConfig = getResolvedHttpConfig(httpConfig);\n if (!resolvedConfig) return {};\n\n return {\n HTTP_CONFIG: JSON.stringify({\n port: resolvedConfig.port,\n host: resolvedConfig.host,\n bodySizeLimit: resolvedConfig.bodySizeLimit,\n endpoint: resolvedConfig.endpoint,\n stateless: true,\n debug: mode === \"development\",\n }),\n };\n}\n\nexport type HttpVariables = ReturnType<typeof injectHttpVariables>;\n\nexport function injectCorsVariables(httpConfig: HttpTransportConfig | null) {\n const corsConfig = getResolvedCorsConfig(httpConfig);\n\n return {\n HTTP_CORS_CONFIG: JSON.stringify({\n origin: corsConfig.origin ?? \"\",\n methods: corsConfig.methods ?? \"\",\n allowedHeaders: corsConfig.allowedHeaders ?? \"\",\n exposedHeaders: corsConfig.exposedHeaders ?? \"\",\n credentials: corsConfig.credentials ?? false,\n maxAge: corsConfig.maxAge ?? 0,\n }),\n };\n}\n\nexport type CorsVariables = ReturnType<typeof injectCorsVariables>;\n\nexport function injectOAuthVariables(userConfig: any) {\n const oauthConfig = getResolvedOAuthConfig(userConfig);\n\n return {\n OAUTH_CONFIG: JSON.stringify(oauthConfig),\n };\n}\n\nexport type OAuthVariables = ReturnType<typeof injectOAuthVariables>;\n\nexport function injectPathsVariables(userConfig: any) {\n const pathsConfig = getResolvedPathsConfig(userConfig);\n\n return {\n TOOLS_PATH: JSON.stringify(pathsConfig.tools),\n };\n}\n\nexport type PathsVariables = ReturnType<typeof injectPathsVariables>;\n\nexport function injectStdioVariables(stdioConfig: any) {\n if (!stdioConfig) return {};\n\n const debug = typeof stdioConfig === \"object\" ? stdioConfig.debug : false;\n\n return {\n STDIO_CONFIG: JSON.stringify({\n debug,\n }),\n };\n}\n\nexport type StdioVariables = ReturnType<typeof injectStdioVariables>;\n\nexport function injectTemplateVariables(userConfig: any) {\n const resolvedConfig = getResolvedTemplateConfig(userConfig);\n\n return {\n TEMPLATE_CONFIG: JSON.stringify(resolvedConfig),\n };\n}\n\nexport type TemplateVariables = ReturnType<typeof injectTemplateVariables>;\n\nexport function injectAdapterVariables(userConfig: any) {\n const experimentalConfig = getResolvedExperimentalConfig(userConfig);\n\n return {\n ADAPTER_CONFIG: JSON.stringify(experimentalConfig.adapter ?? null),\n };\n}\n\nexport type AdapterVariables = ReturnType<typeof injectAdapterVariables>;\n\nexport type InjectedVariables =\n | HttpVariables\n | CorsVariables\n | OAuthVariables\n | PathsVariables\n | StdioVariables\n | TemplateVariables\n | AdapterVariables;\n","import { z } from \"zod\";\nimport { oauthConfigSchema } from \"./oauth\";\n\n// ------------------------------------------------------------\n// Adapter config schema (perhaps a separate file but it's small yet)\n// ------------------------------------------------------------\nexport const adapterConfigSchema = z.enum([\"express\", \"nextjs\"]);\n\nexport type AdapterConfig = z.infer<typeof adapterConfigSchema>;\n\n// ------------------------------------------------------------\n// Experimental features schema\n// ------------------------------------------------------------\nexport const experimentalConfigSchema = z.object({\n oauth: oauthConfigSchema.optional(),\n adapter: adapterConfigSchema.optional(),\n});\n\nexport type ExperimentalConfig = z.infer<typeof experimentalConfigSchema>;\n","import { z } from \"zod\";\n\n// ------------------------------------------------------------\n// OAuth endpoints schema\n// ------------------------------------------------------------\nexport const oauthEndpointsSchema = z.object({\n authorizationUrl: z.string(),\n tokenUrl: z.string(),\n revocationUrl: z.string().optional(),\n userInfoUrl: z.string().optional(),\n registerUrl: z.string(),\n});\n\nexport type OauthEndpoints = z.infer<typeof oauthEndpointsSchema>;\n\n// ------------------------------------------------------------\n// OAuth config schema\n// ------------------------------------------------------------\nexport const oauthConfigSchema = z.object({\n endpoints: oauthEndpointsSchema,\n issuerUrl: z.string(),\n baseUrl: z.string(),\n serviceDocumentationUrl: z.string().optional(),\n pathPrefix: z.string().default(\"/oauth2\"),\n defaultScopes: z.array(z.string()).default([\"openid\", \"profile\", \"email\"]),\n});\n\nexport type OAuthConfig = z.infer<typeof oauthConfigSchema>;\n","// re export\nexport {\n httpTransportConfigSchema,\n corsConfigSchema,\n type HttpTransportConfig,\n type CorsConfig,\n} from \"./transport/http\";\nexport {\n stdioTransportConfigSchema,\n type StdioTransportConfig,\n} from \"./transport/stdio\";\nexport { oauthConfigSchema, type OAuthConfig } from \"./experimental/oauth\";\nexport {\n experimentalConfigSchema,\n type ExperimentalConfig,\n} from \"./experimental\";\nexport { pathsConfigSchema, type PathsConfig } from \"./paths\";\nexport { webpackConfigSchema, type WebpackConfig } from \"./webpack\";\nexport { templateConfigSchema, type TemplateConfig } from \"./template\";\n","import { z } from \"zod\";\nimport { DEFAULT_PATHS_CONFIG } from \"../constants\";\n\n// ------------------------------------------------------------\n// Paths config schema\n// ------------------------------------------------------------\nexport const pathsConfigSchema = z.object({\n tools: z.union([z.boolean(), z.string()]).default(true),\n prompts: z.union([z.boolean(), z.string()]).default(true),\n resources: z.union([z.boolean(), z.string()]).default(true),\n});\n\nexport type PathsConfig = z.infer<typeof pathsConfigSchema>;\n","import { z } from \"zod\";\nimport { DEFAULT_TEMPLATE_CONFIG } from \"../constants\";\n\n// ------------------------------------------------------------\n// Template config schema\n// ------------------------------------------------------------\nexport const templateConfigSchema = z.object({\n name: z.string().default(DEFAULT_TEMPLATE_CONFIG.name),\n description: z.string().default(DEFAULT_TEMPLATE_CONFIG.description),\n});\n\nexport type TemplateConfig = z.infer<typeof templateConfigSchema>;\n","import { z } from \"zod\";\nimport { DEFAULT_HTTP_CONFIG } from \"../../constants\";\n\n// ------------------------------------------------------------\n// Cors config schema\n// ------------------------------------------------------------\nexport const corsConfigSchema = z.object({\n origin: z.union([z.string(), z.array(z.string()), z.boolean()]).optional(),\n methods: z.union([z.string(), z.array(z.string())]).optional(),\n allowedHeaders: z.union([z.string(), z.array(z.string())]).optional(),\n exposedHeaders: z.union([z.string(), z.array(z.string())]).optional(),\n credentials: z.boolean().optional(),\n maxAge: z.number().optional(),\n});\n\nexport type CorsConfig = z.infer<typeof corsConfigSchema>;\n\n// ------------------------------------------------------------\n// HTTP Transport config schema\n// ------------------------------------------------------------\nexport const httpTransportConfigSchema = z.union([\n z.boolean(),\n z\n .object({\n port: z.number().optional(),\n host: z.string().optional(),\n bodySizeLimit: z.number().optional(),\n debug: z.boolean().optional(),\n endpoint: z.string().optional(),\n cors: corsConfigSchema.optional(),\n })\n .default(DEFAULT_HTTP_CONFIG)\n .optional(),\n]);\n\nexport type HttpTransportConfig = z.infer<typeof httpTransportConfigSchema>;\n","import { z } from \"zod\";\n\n// ------------------------------------------------------------\n// stdio transport config schema\n// ------------------------------------------------------------\nexport const stdioTransportConfigSchema = z\n .union([\n z.boolean(),\n z.object({\n debug: z.boolean().default(false),\n }),\n ])\n .optional();\n\nexport type StdioTransportConfig = z.infer<typeof stdioTransportConfigSchema>;\n","import z from \"zod\";\n\n// ------------------------------------------------------------\n// Webpack config schema\n// ------------------------------------------------------------\nexport const webpackConfigSchema = z\n .function()\n .args(z.any())\n .returns(z.any())\n .optional();\n\nexport type WebpackConfig = z.infer<typeof webpackConfigSchema>;\n","import {\n HttpTransportConfig,\n CorsConfig,\n PathsConfig,\n OAuthConfig,\n StdioTransportConfig,\n TemplateConfig,\n ExperimentalConfig,\n} from \"./schemas\";\nimport {\n DEFAULT_HTTP_CONFIG,\n DEFAULT_PATHS_CONFIG,\n DEFAULT_STDIO_CONFIG,\n DEFAULT_TEMPLATE_CONFIG,\n} from \"./constants\";\n\nexport function getResolvedHttpConfig(\n userConfig: HttpTransportConfig | undefined\n) {\n if (typeof userConfig === \"boolean\") {\n return userConfig ? DEFAULT_HTTP_CONFIG : null;\n }\n if (typeof userConfig === \"object\") {\n return { ...DEFAULT_HTTP_CONFIG, ...userConfig };\n }\n return null;\n}\n\nexport function getResolvedCorsConfig(\n httpConfig: HttpTransportConfig | null\n): CorsConfig {\n if (typeof httpConfig === \"object\" && httpConfig?.cors) {\n return { ...DEFAULT_HTTP_CONFIG.cors, ...httpConfig.cors };\n }\n return DEFAULT_HTTP_CONFIG.cors;\n}\n\nexport function getResolvedPathsConfig(userConfig: any): {\n tools: string | null;\n prompts: string | null;\n resources: string | null;\n} {\n const userPaths = userConfig?.paths;\n if (!userPaths) {\n return {\n tools: DEFAULT_PATHS_CONFIG.tools,\n prompts: DEFAULT_PATHS_CONFIG.prompts,\n resources: DEFAULT_PATHS_CONFIG.resources,\n };\n }\n\n const resolvedPaths: {\n tools: string | null;\n prompts: string | null;\n resources: string | null;\n } = {\n tools: DEFAULT_PATHS_CONFIG.tools,\n prompts: DEFAULT_PATHS_CONFIG.prompts,\n resources: DEFAULT_PATHS_CONFIG.resources,\n };\n\n // Handle tools path\n if (typeof userPaths.tools === \"boolean\") {\n resolvedPaths.tools = userPaths.tools ? DEFAULT_PATHS_CONFIG.tools : null;\n } else if (typeof userPaths.tools === \"string\") {\n resolvedPaths.tools = userPaths.tools;\n }\n\n // Handle prompts path\n if (typeof userPaths.prompts === \"boolean\") {\n resolvedPaths.prompts = userPaths.prompts\n ? DEFAULT_PATHS_CONFIG.prompts\n : null;\n } else if (typeof userPaths.prompts === \"string\") {\n resolvedPaths.prompts = userPaths.prompts;\n }\n\n // Handle resources path\n if (typeof userPaths.resources === \"boolean\") {\n resolvedPaths.resources = userPaths.resources\n ? DEFAULT_PATHS_CONFIG.resources\n : null;\n } else if (typeof userPaths.resources === \"string\") {\n resolvedPaths.resources = userPaths.resources;\n }\n\n return resolvedPaths;\n}\n\nexport function getResolvedOAuthConfig(userConfig: any): OAuthConfig | null {\n return userConfig?.experimental?.oauth || null;\n}\n\nexport function getResolvedStdioConfig(\n userConfig: any\n): StdioTransportConfig | null {\n return userConfig?.stdio || DEFAULT_STDIO_CONFIG;\n}\n\nexport function getResolvedTemplateConfig(\n userConfig: any\n): TemplateConfig | null {\n const userTemplate = userConfig?.template;\n if (!userTemplate) {\n return DEFAULT_TEMPLATE_CONFIG;\n }\n return { ...DEFAULT_TEMPLATE_CONFIG, ...userTemplate };\n}\n\nexport function getResolvedExperimentalConfig(userConfig: any): {\n adapter: string | undefined;\n} {\n const experimental = userConfig?.experimental;\n return {\n adapter: experimental?.adapter,\n };\n}\n","export function generateEnvCode() {\n return `/// <reference types=\"xmcp\" />\n\n// Do not edit this file`;\n}\n","import { compilerContext } from \"./compiler-context\";\n\nexport function generateImportCode(): string {\n const {\n toolPaths,\n promptPaths,\n resourcePaths,\n hasMiddleware,\n clientBundles,\n } = compilerContext.getContext();\n\n const importToolsCode = Array.from(toolPaths)\n .map((p) => {\n const path = p.replace(/\\\\/g, \"/\");\n const relativePath = `../${path}`;\n return `\"${path}\": () => import(\"${relativePath}\"),`;\n })\n .join(\"\\n\");\n\n const importPromptsCode = Array.from(promptPaths)\n .map((p) => {\n const path = p.replace(/\\\\/g, \"/\");\n const relativePath = `../${path}`;\n return `\"${path}\": () => import(\"${relativePath}\"),`;\n })\n .join(\"\\n\");\n\n const importResourcesCode = Array.from(resourcePaths)\n .map((p) => {\n const path = p.replace(/\\\\/g, \"/\");\n const relativePath = `../${path}`;\n return `\"${path}\": () => import(\"${relativePath}\"),`;\n })\n .join(\"\\n\");\n\n const importMiddlewareCode = hasMiddleware\n ? `export const middleware = () => import(\"../src/middleware\");`\n : \"\";\n\n // Generate client bundles mapping (empty object if none)\n const clientBundlesEntries =\n clientBundles && clientBundles.size > 0\n ? Array.from(clientBundles)\n .map(([toolName, bundlePath]) => ` \"${toolName}\": \"${bundlePath}\",`)\n .join(\"\\n\")\n : \"\";\n\n return `\nexport const tools = {\n${importToolsCode}\n};\n\nexport const prompts = {\n${importPromptsCode}\n};\n\nexport const resources = {\n${importResourcesCode}\n};\n\nexport const clientBundles = {\n${clientBundlesEntries}\n};\n\n${importMiddlewareCode}\n`;\n}\n","import { compilerContext } from \"./compiler-context\";\n\n// this is an experimental feature\n// currently it's only used for the nextjs adapter & is manually generated to resolve the async imports\n// this prevents the tools from being an async function that needs to resolve first, instead it just returns the array\n\nexport function generateToolsExportCode(): string {\n const { toolPaths } = compilerContext.getContext();\n\n const importStatements = Array.from(toolPaths)\n .map((p, index) => {\n const path = p.replace(/\\\\/g, \"/\");\n const relativePath = `../${path}`;\n return `import * as tool${index} from \"${relativePath}\";`;\n })\n .join(\"\\n\");\n\n const toolsArray = Array.from(toolPaths)\n .map((p, index) => {\n const path = p.replace(/\\\\/g, \"/\");\n const fileName = path.split(\"/\").pop() || path;\n const defaultName = fileName.replace(/\\.[^/.]+$/, \"\");\n\n return `{\n path: \"${path}\",\n name: \"${defaultName}\",\n module: tool${index}\n }`;\n })\n .join(\",\\n \");\n\n return `import { z } from \"zod\";\n\n${importStatements}\n\n/** \n * Runtime-accessible tools function that works from any context.\n * Generated at build time - always up to date with discovered tools.\n * @returns {Promise<ToolRegistry>}\n */\nexport async function getTools() {\n const toolsData = [\n ${toolsArray}\n ];\n\n const registry = {};\n\n for (const toolData of toolsData) {\n const { path, name: defaultName, module } = toolData;\n const { default: handler, metadata, schema } = module;\n\n const toolConfig = {\n name: defaultName,\n description: \"No description provided\",\n ...((typeof metadata === \"object\" && metadata !== null) ? metadata : {})\n };\n\n // Determine the actual schema to use\n let toolSchema = {};\n if (schema && typeof schema === \"object\" && schema !== null) {\n // Basic validation for Zod schema object\n const isValidSchema = Object.entries(schema).every(([key, val]) => {\n if (typeof key !== \"string\") return false;\n if (typeof val !== \"object\" || val === null) return false;\n if (!(\"parse\" in val) || typeof val.parse !== \"function\") return false;\n return true;\n });\n \n if (isValidSchema) {\n toolSchema = schema;\n } else {\n console.warn(\\`Invalid schema for tool \"\\${toolConfig.name}\" at \\${path}. Expected Record<string, z.ZodType>\\`);\n }\n }\n\n // Make sure tools has annotations with a title\n if (toolConfig.annotations === undefined) {\n toolConfig.annotations = {};\n }\n if (toolConfig.annotations.title === undefined) {\n toolConfig.annotations.title = toolConfig.name;\n }\n\n // Add to registry in the formatted structure\n registry[toolConfig.name] = {\n description: toolConfig.description,\n inputSchema: z.object(toolSchema || {}),\n execute: async (args, extra) => {\n const result = await handler(args, extra);\n return result;\n },\n };\n }\n\n return registry;\n}\n\nexport const tools = await getTools();`;\n}\n\nexport function generateToolsTypesCode(): string {\n const { toolPaths } = compilerContext.getContext();\n\n const toolNames = Array.from(toolPaths).map((p) => {\n const path = p.replace(/\\\\/g, \"/\");\n const fileName = path.split(\"/\").pop() || path;\n return fileName.replace(/\\.[^/.]+$/, \"\");\n });\n\n const toolNamesUnion =\n toolNames.length > 0\n ? toolNames.map((name) => `\"${name}\"`).join(\" | \")\n : \"never\";\n\n return `import { z } from \"zod\";\n\nexport interface ToolMetadata {\n name: string;\n description: string;\n annotations?: {\n title?: string;\n [key: string]: any;\n };\n [key: string]: any;\n}\n\nexport interface ToolItem {\n path: string;\n name: string;\n metadata: ToolMetadata;\n schema: Record<string, z.ZodType>;\n handler: (args: any) => Promise<any>;\n}\n\nexport interface ToolRegistryItem {\n description: string;\n inputSchema: z.ZodObject<any>;\n execute: (args: any) => Promise<any>;\n}\n\nexport type ToolNames = ${toolNamesUnion};\n\nexport type ToolRegistry = {\n [k in ToolNames]: ToolRegistryItem;\n};\n\ndeclare global {\n namespace XMCP {\n interface Tools extends ToolRegistry {}\n }\n}\n\nexport declare function getTools(): Promise<ToolRegistry>;\nexport declare const tools: ToolRegistry;\n`;\n}\n","import { runtimeFolderPath } from \"@/utils/constants\";\nimport { XmcpConfigOuputSchema } from \"@/compiler/config\";\nimport path from \"path\";\n\n/** Get what packages are gonna be built by xmcp */\nexport function getEntries(\n xmcpConfig: XmcpConfigOuputSchema\n): Record<string, string> {\n const entries: Record<string, string> = {};\n if (xmcpConfig.stdio) {\n entries.stdio = path.join(runtimeFolderPath, \"stdio.js\");\n }\n if (xmcpConfig[\"http\"]) {\n // non adapter mode\n if (!xmcpConfig.experimental?.adapter) {\n entries[\"http\"] = path.join(runtimeFolderPath, \"http.js\");\n }\n\n // adapter mode enabled\n if (xmcpConfig.experimental?.adapter === \"express\") {\n entries[\"adapter\"] = path.join(runtimeFolderPath, \"adapter-express.js\");\n }\n if (xmcpConfig.experimental?.adapter === \"nextjs\") {\n entries[\"adapter\"] = path.join(runtimeFolderPath, \"adapter-nextjs.js\");\n }\n }\n return entries;\n}\n","import { Configuration } from \"webpack\";\nimport { getXmcpConfig } from \"../compiler-context\";\nimport { builtinModules } from \"module\";\nimport { runtimeFiles } from \"./plugins\";\nimport nodeExternals from \"webpack-node-externals\";\n\n/**\n * This function will decide is a file is bundled by xmcp compiler or not.\n * We want to avoid building node modules.\n * When using Next.js, we want to avoid building tools/*, since the nexjs compiler will handle that code.\n */\nexport function getExternals(): Configuration[\"externals\"] {\n const xmcpConfig = getXmcpConfig();\n\n const replacedImports = new Set<string>();\n\n return [\n function (data, callback) {\n const { request } = data;\n\n if (!request) {\n return callback();\n }\n\n /**\n * Externalize Node.js built-in modules\n */\n const isBuiltinModule =\n builtinModules.includes(request) ||\n builtinModules.includes(request.replace(/^node:/, \"\"));\n if (isBuiltinModule) {\n return callback(null, `commonjs ${request}`);\n }\n\n /**\n * Externalize React utilities that depend on @swc/core\n * These are loaded at runtime only when React is enabled\n */\n if (\n request.includes(\"ssr/transpile\") ||\n request.includes(\"ssr/bundler\")\n ) {\n return callback(null, `commonjs ${request}`);\n }\n\n // Check if request is inside .xmcp folder - if so, bundle it\n if (request.includes(\".xmcp\")) {\n return callback();\n }\n\n // Check if request is a runtime file - if so, bundle it\n const filesToInclude = [...Object.keys(runtimeFiles), \"import-map.js\"];\n for (const file of filesToInclude) {\n if (\n request.endsWith(`./${file}`) ||\n request.endsWith(`./${file.replace(\".js\", \"\")}`)\n ) {\n return callback();\n }\n }\n\n /**\n * When using Next.js, we want them to bundle the code for the tool file,\n * so just keep the reference for the import as external\n */\n if (xmcpConfig.experimental?.adapter === \"nextjs\") {\n // Bundle imports from the same folder\n if (request.startsWith(\"./\")) {\n return callback();\n }\n\n let pathRequest = request;\n /**\n * Paths are relative to the .xmcp/nextjs-adapter folder,\n * but we are building in .xmcp/adapter/index.js, so we need to go up 2 levels\n */\n if (request.startsWith(\"../\")) {\n // Only replace the import if it hasn't been replaced yet\n if (!replacedImports.has(request)) {\n pathRequest = pathRequest.replace(\"../\", \"../../\");\n replacedImports.add(pathRequest);\n }\n }\n\n return callback(null, `commonjs ${pathRequest}`);\n }\n\n // Bundle relative imports and absolute paths\n callback();\n },\n ];\n}\n","import { XmcpConfigOuputSchema } from \"@/compiler/config\";\nimport { compilerContext } from \"../compiler-context\";\nimport {\n injectCorsVariables,\n InjectedVariables,\n injectHttpVariables,\n injectOAuthVariables,\n injectPathsVariables,\n injectStdioVariables,\n injectTemplateVariables,\n injectAdapterVariables,\n} from \"../config/injection\";\n\n/**\n * The XMCP runtime uses variables that are not defined by default.\n *\n * This utility will define those variables based on the user's config.\n */\nexport function getInjectedVariables(\n xmcpConfig: XmcpConfigOuputSchema\n): InjectedVariables {\n const { mode } = compilerContext.getContext();\n\n const httpVariables = injectHttpVariables(xmcpConfig.http, mode);\n const corsVariables = injectCorsVariables(xmcpConfig.http);\n const oauthVariables = injectOAuthVariables(xmcpConfig);\n const pathsVariables = injectPathsVariables(xmcpConfig);\n const stdioVariables = injectStdioVariables(xmcpConfig.stdio);\n const templateVariables = injectTemplateVariables(xmcpConfig);\n const adapterVariables = injectAdapterVariables(xmcpConfig);\n\n return {\n ...httpVariables,\n ...corsVariables,\n ...oauthVariables,\n ...pathsVariables,\n ...stdioVariables,\n ...templateVariables,\n ...adapterVariables,\n };\n}\n","import {\n Configuration,\n DefinePlugin,\n ProvidePlugin,\n BannerPlugin,\n IgnorePlugin,\n} from \"webpack\";\nimport path from \"path\";\nimport { distOutputPath, adapterOutputPath } from \"@/utils/constants\";\nimport { compilerContext } from \"@/compiler/compiler-context\";\nimport { XmcpConfigOuputSchema } from \"@/compiler/config\";\nimport { getEntries } from \"./get-entries\";\nimport { getInjectedVariables } from \"./get-injected-variables\";\nimport { resolveTsconfigPathsToAlias } from \"./resolve-tsconfig-paths\";\nimport { CleanWebpackPlugin } from \"clean-webpack-plugin\";\nimport { CreateTypeDefinitionPlugin, InjectRuntimePlugin } from \"./plugins\";\nimport { getExternals } from \"./get-externals\";\n\n/** Creates the webpack configuration that xmcp will use to bundle the user's code */\nexport function getWebpackConfig(\n xmcpConfig: XmcpConfigOuputSchema\n): Configuration {\n const processFolder = process.cwd();\n const { mode } = compilerContext.getContext();\n\n const outputPath = xmcpConfig.experimental?.adapter\n ? adapterOutputPath\n : distOutputPath;\n\n const outputFilename = xmcpConfig.experimental?.adapter\n ? \"index.js\"\n : \"[name].js\";\n\n const config: Configuration = {\n mode,\n watch: mode === \"development\",\n devtool: mode === \"development\" ? \"eval-cheap-module-source-map\" : false,\n output: {\n filename: outputFilename,\n path: outputPath,\n libraryTarget: \"commonjs2\",\n },\n target: \"node\",\n externals: getExternals(),\n resolve: {\n fallback: {\n process: false,\n },\n alias: {\n \"node:process\": \"process\",\n \"xmcp/headers\": path.resolve(processFolder, \".xmcp/headers.js\"),\n \"xmcp/utils\": path.resolve(processFolder, \".xmcp/utils.js\"),\n ...resolveTsconfigPathsToAlias(),\n },\n extensions: [\".tsx\", \".ts\", \".jsx\", \".js\", \".json\"],\n },\n resolveLoader: {\n modules: [\n \"node_modules\",\n path.resolve(__dirname, \"../node_modules\"), // for monorepo/npm\n path.resolve(__dirname, \"../..\"), // for pnpm\n ],\n },\n plugins: [new InjectRuntimePlugin(), new CreateTypeDefinitionPlugin()],\n module: {\n rules: [\n {\n test: /\\.(ts|tsx)$/,\n use: {\n loader: \"swc-loader\",\n options: {\n jsc: {\n parser: {\n syntax: \"typescript\",\n tsx: true,\n },\n transform: {\n react: {\n runtime: \"automatic\",\n },\n },\n target: \"es2020\",\n },\n },\n },\n },\n ],\n },\n optimization: {\n minimize: mode === \"production\",\n splitChunks: false,\n },\n };\n\n // Do not watch the adapter output folder and dist/client, avoid infinite loop\n if (mode === \"development\" && !xmcpConfig.experimental?.adapter) {\n config.watchOptions = {\n ignored: [adapterOutputPath, path.join(processFolder, \"dist/client\")],\n };\n }\n\n const providedPackages = {\n // connects the user exports with our runtime\n INJECTED_TOOLS: [\n path.resolve(processFolder, \".xmcp/import-map.js\"),\n \"tools\",\n ],\n INJECTED_PROMPTS: [\n path.resolve(processFolder, \".xmcp/import-map.js\"),\n \"prompts\",\n ],\n INJECTED_RESOURCES: [\n path.resolve(processFolder, \".xmcp/import-map.js\"),\n \"resources\",\n ],\n INJECTED_MIDDLEWARE: [\n path.resolve(processFolder, \".xmcp/import-map.js\"),\n \"middleware\",\n ],\n };\n\n // add entry points based on config\n config.entry = getEntries(xmcpConfig);\n\n // add injected variables to config\n config.plugins!.push(new ProvidePlugin(providedPackages));\n\n // add defined variables to config\n const definedVariables = getInjectedVariables(xmcpConfig);\n config.plugins!.push(new DefinePlugin(definedVariables));\n\n const fs = require(\"fs\");\n const clientBundlesPath = path.join(processFolder, \"dist/client\");\n\n config.plugins!.push(\n new DefinePlugin({\n INJECTED_CLIENT_BUNDLES: DefinePlugin.runtimeValue(() => {\n if (!fs.existsSync(clientBundlesPath)) {\n // In development mode, bundles may not exist yet if webpack recompiles\n // before bundles are rebuilt. The runtime will fall back to reading from filesystem.\n return JSON.stringify({});\n }\n\n const bundles: Record<string, string> = {};\n const files = fs.readdirSync(clientBundlesPath);\n\n for (const file of files) {\n if (file.endsWith(\".bundle.js\")) {\n const toolName = file.replace(\".bundle.js\", \"\");\n const bundleContent = fs.readFileSync(\n path.join(clientBundlesPath, file),\n \"utf-8\"\n );\n bundles[toolName] = bundleContent;\n }\n }\n\n const bundleCount = Object.keys(bundles).length;\n if (bundleCount > 0) {\n console.log(\n `✓ Injected ${bundleCount} React client bundle(s): ${Object.keys(bundles).join(\", \")}`\n );\n }\n\n return JSON.stringify(bundles);\n }),\n })\n );\n\n // add clean plugin\n if (!xmcpConfig.experimental?.adapter) {\n // not needed in adapter mode since it only outputs one file\n // Exclude dist/client from being cleaned since client bundles are needed during compilation\n // Only clean .js files in the output directory root, not subdirectories like dist/client\n config.plugins!.push(\n new CleanWebpackPlugin({\n cleanOnceBeforeBuildPatterns: [path.join(outputPath, \"*.js\")],\n dangerouslyAllowCleanPatternsOutsideProject: true,\n dry: false, // Explicitly enable actual file deletion (not dry-run mode)\n })\n );\n }\n\n // add shebang to CLI output on stdio mode\n if (xmcpConfig.stdio) {\n config.plugins!.push(\n new BannerPlugin({\n banner: \"#!/usr/bin/env node\",\n raw: true,\n include: /^stdio\\.js$/,\n })\n );\n }\n\n return config;\n}\n","import { adapterOutputPath, runtimeFolderPath } from \"@/utils/constants\";\nimport fs from \"fs-extra\";\nimport path from \"path\";\nimport { Compiler } from \"webpack\";\nimport { getXmcpConfig } from \"../compiler-context\";\n\n// @ts-expect-error: injected by compiler\nexport const runtimeFiles = RUNTIME_FILES as Record<string, string>;\n\nexport class InjectRuntimePlugin {\n apply(compiler: Compiler) {\n let hasRun = false;\n compiler.hooks.beforeCompile.tap(\n \"InjectRuntimePlugin\",\n (_compilationParams) => {\n if (hasRun) return;\n hasRun = true;\n\n for (const [fileName, fileContent] of Object.entries(runtimeFiles)) {\n fs.writeFileSync(path.join(runtimeFolderPath, fileName), fileContent);\n }\n }\n );\n }\n}\n\nconst nextJsTypeDefinition = `\nexport const xmcpHandler: (req: Request) => Promise<Response>;\nexport const withAuth: (handler: (req: Request) => Promise<Response>, authConfig: AuthConfig) => (req: Request) => Promise<Response>;\nexport const resourceMetadataHandler: ({authorizationServers}: {authorizationServers: string[]}) => (req: Request) => Response;\nexport const resourceMetadataOptions: (req: Request) => Response;\nexport const tools: () => Promise<Tool[]>;\nexport const toolRegistry: () => Promise<Record<string, ToolRegistryEntry>>;\nexport type VerifyToken = (req: Request, bearerToken?: string) => Promise<AuthInfo | undefined>;\nexport type AuthConfig = {\n verifyToken: VerifyToken;\n required?: boolean;\n requiredScopes?: string[];\n};\nexport type AuthInfo = {\n token: string;\n clientId: string;\n scopes: string[];\n expiresAt?: number;\n resource?: URL;\n extra?: Record<string, unknown>;\n};\nexport type OAuthProtectedResourceMetadata = {\n resource: string;\n authorization_servers: string[];\n bearer_methods_supported?: string[];\n resource_documentation?: string;\n introspection_endpoint?: string;\n revocation_endpoint?: string;\n [key: string]: unknown;\n};\nexport type Tool = {\n path: string;\n name: string;\n metadata: {\n name: string;\n description: string;\n annotations?: {\n title?: string;\n [key: string]: any;\n };\n [key: string]: any;\n };\n schema: Record<string, any>;\n handler: (args: any) => Promise<any>;\n};\nexport type ToolRegistryEntry = {\n description: string;\n inputSchema: any; // Zod schema object\n execute: (args: any) => Promise<any>;\n};\n\n`;\n\nconst expressTypeDefinition = `\nexport const xmcpHandler: (req: Request, res: Response) => Promise<void>;\n`;\n\nexport class CreateTypeDefinitionPlugin {\n apply(compiler: Compiler) {\n let hasRun = false;\n compiler.hooks.afterEmit.tap(\n \"CreateTypeDefinitionPlugin\",\n (_compilationParams) => {\n if (hasRun) return;\n hasRun = true;\n\n const xmcpConfig = getXmcpConfig();\n\n // Manually type the .xmcp/adapter/index.js file using a .xmcp/adapter/index.d.ts file\n if (xmcpConfig.experimental?.adapter) {\n let typeDefinitionContent = \"\";\n if (xmcpConfig.experimental?.adapter == \"nextjs\") {\n typeDefinitionContent = nextJsTypeDefinition;\n } else if (xmcpConfig.experimental?.adapter == \"express\") {\n typeDefinitionContent = expressTypeDefinition;\n }\n fs.writeFileSync(\n path.join(adapterOutputPath, \"index.d.ts\"),\n typeDefinitionContent\n );\n }\n }\n );\n }\n}\n","// Based on https://gist.github.com/nerdyman/2f97b24ab826623bff9202750013f99e\n\nimport path from \"path\";\nimport { readFileSync, existsSync } from \"fs\";\nimport { parseJson } from \"@/utils/fs-utils\";\n\n/**\n * Resolve tsconfig.json paths to Webpack aliases\n * @param {string} tsconfigPath - Path to tsconfig\n * @param {string} webpackConfigBasePath - Path from tsconfig to Webpack config to create absolute aliases\n * @return {object} - Webpack alias config\n */\nexport function resolveTsconfigPathsToAlias({\n tsconfigPath = \"./tsconfig.json\",\n} = {}) {\n if (!existsSync(tsconfigPath)) {\n return {};\n }\n const tsconfigContent = readFileSync(tsconfigPath, \"utf-8\");\n const [parsedTsconfig, parsingError] = parseJson(tsconfigContent);\n\n if (parsingError) {\n console.error(\n `Error parsing tsconfig.json: ${parsingError.message} at ${tsconfigPath}`\n );\n console.log(tsconfigContent);\n return {};\n }\n\n if (\n !parsedTsconfig.compilerOptions ||\n !parsedTsconfig.compilerOptions.paths\n ) {\n return {};\n }\n\n const paths = parsedTsconfig.compilerOptions.paths;\n\n const aliases: Record<string, string> = {};\n\n Object.keys(paths).forEach((item) => {\n const key = item.replace(\"/*\", \"\");\n const value = path.resolve(\n paths[item][0].replace(\"/*\", \"\").replace(\"*\", \"\")\n );\n\n aliases[key] = value;\n });\n\n return aliases;\n}\n","import { webpack } from \"webpack\";\nimport { getWebpackConfig } from \"./get-webpack-config\";\nimport chalk from \"chalk\";\nimport { getConfig } from \"./parse-xmcp-config\";\nimport { generateImportCode } from \"./generate-import-code\";\nimport {\n generateToolsExportCode,\n generateToolsTypesCode,\n} from \"./generate-tools-code\";\nimport fs from \"fs\";\nimport { rootFolder, runtimeFolderPath } from \"@/utils/constants\";\nimport { createFolder } from \"@/utils/fs-utils\";\nimport path from \"path\";\nimport { deleteSync } from \"del\";\nimport dotenv from \"dotenv\";\nexport { type Middleware } from \"@/types/middleware\";\nimport { generateEnvCode } from \"./generate-env-code\";\nimport { Watcher } from \"@/utils/file-watcher\";\nimport { onFirstBuild } from \"./on-first-build\";\nimport { greenCheck } from \"@/utils/cli-icons\";\nimport {\n telemetry,\n TelemetryEventName,\n TransportType,\n AdapterType,\n ErrorPhase,\n} from \"../telemetry\";\nimport { isReactFile } from \"../runtime/utils/react\";\nimport { compilerContext } from \"./compiler-context\";\nimport { startHttpServer } from \"./start-http-server\";\nimport { isValidPath } from \"@/utils/path-validation\";\nimport { getResolvedPathsConfig } from \"./config/utils\";\nimport { pathToToolName } from \"./utils/path-utils\";\nimport { transpileClientComponent } from \"./transpile-client-components\";\ndotenv.config();\n\nexport type CompilerMode = \"development\" | \"production\";\n\nexport interface CompileOptions {\n onBuild?: () => void;\n}\n\nexport async function compile({ onBuild }: CompileOptions = {}) {\n const { mode, toolPaths, promptPaths, resourcePaths } =\n compilerContext.getContext();\n const startTime = Date.now();\n let compilerStarted = false;\n\n const xmcpConfig = await getConfig();\n compilerContext.setContext({\n xmcpConfig: xmcpConfig,\n });\n let webpackConfig = getWebpackConfig(xmcpConfig);\n\n if (xmcpConfig.webpack) {\n webpackConfig = xmcpConfig.webpack(webpackConfig);\n }\n\n const watcher = new Watcher({\n // keep the watcher running on dev mode after \"onReady\"\n persistent: mode === \"development\",\n ignored: /(^|[\\/\\\\])\\../,\n ignoreInitial: false,\n });\n\n // handle tools\n let toolsPath = isValidPath(\n getResolvedPathsConfig(xmcpConfig).tools,\n \"tools\"\n );\n\n // handle tools\n if (toolsPath) {\n watcher.watch(`${toolsPath}/**/*.{ts,tsx}`, {\n onAdd: async (path) => {\n toolPaths.add(path);\n if (compilerStarted) {\n await generateCode();\n }\n },\n onUnlink: async (path) => {\n toolPaths.delete(path);\n if (compilerStarted) {\n await generateCode();\n }\n },\n onChange: async (changedPath) => {\n if (compilerStarted) {\n await generateCode();\n }\n },\n });\n }\n\n // handle prompts\n let promptsPath = isValidPath(\n getResolvedPathsConfig(xmcpConfig).prompts,\n \"prompts\"\n );\n\n // handle prompts\n if (promptsPath) {\n watcher.watch(`${promptsPath}/**/*.{ts,tsx}`, {\n onAdd: async (path) => {\n promptPaths.add(path);\n if (compilerStarted) {\n await generateCode();\n }\n },\n onUnlink: async (path) => {\n promptPaths.delete(path);\n if (compilerStarted) {\n await generateCode();\n }\n },\n });\n }\n\n // handle resources\n let resourcesPath = isValidPath(\n getResolvedPathsConfig(xmcpConfig).resources,\n \"resources\"\n );\n\n // handle resources\n if (resourcesPath) {\n watcher.watch(`${resourcesPath}/**/*.{ts,tsx}`, {\n onAdd: async (path) => {\n resourcePaths.add(path);\n if (compilerStarted) {\n await generateCode();\n }\n },\n onUnlink: async (path) => {\n resourcePaths.delete(path);\n if (compilerStarted) {\n await generateCode();\n }\n },\n });\n }\n\n // if adapter is not enabled, handle middleware\n if (!xmcpConfig.experimental?.adapter) {\n // handle middleware\n watcher.watch(\"./src/middleware.ts\", {\n onAdd: async () => {\n compilerContext.setContext({\n hasMiddleware: true,\n });\n if (compilerStarted) {\n await generateCode();\n }\n },\n onUnlink: async () => {\n compilerContext.setContext({\n hasMiddleware: false,\n });\n if (compilerStarted) {\n await generateCode();\n }\n },\n });\n }\n\n // start compiler\n watcher.onReady(async () => {\n let firstBuild = true;\n compilerStarted = true;\n\n // delete existing runtime folder\n deleteSync(runtimeFolderPath);\n createFolder(runtimeFolderPath);\n\n // Generate all code (including client bundles) BEFORE webpack runs\n await generateCode();\n\n webpack(webpackConfig, async (err, stats) => {\n // Track compilation time\n let compilationTime: number;\n if (stats?.endTime && stats?.startTime) {\n compilationTime = stats.endTime - stats.startTime;\n } else {\n compilationTime = Date.now() - startTime;\n }\n\n // Handle errors\n if (err || stats?.hasErrors()) {\n if (err) {\n console.error(err);\n }\n if (stats?.hasErrors()) {\n console.error(\n stats.toString({\n colors: true,\n chunks: false,\n })\n );\n }\n\n // Track failed build (only in production)\n if (mode === \"production\") {\n const reactToolsCount =\n Array.from(toolPaths).filter(isReactFile).length;\n\n telemetry.record(\n {\n eventName: TelemetryEventName.BUILD_FAILED,\n fields: {\n success: false,\n duration: compilationTime,\n errorPhase: ErrorPhase.WEBPACK,\n errorType: err ? err.constructor.name : \"WebpackError\",\n toolsCount: toolPaths.size,\n reactToolsCount,\n promptsCount: promptPaths.size,\n resourcesCount: resourcePaths.size,\n transport: xmcpConfig.http\n ? TransportType.HTTP\n : TransportType.STDIO,\n adapter: xmcpConfig.experimental?.adapter\n ? (xmcpConfig.experimental.adapter as AdapterType)\n : AdapterType.NONE,\n nodeVersion: process.version,\n xmcpVersion: require(\"../../package.json\").version,\n },\n },\n true // deferred - we'll use flushDetached\n );\n // Use flushDetached for faster process exit - spawns separate process\n telemetry.flushDetached(\"build\");\n }\n\n return;\n }\n\n // Build succeeded\n if (firstBuild) {\n onFirstBuild(mode, xmcpConfig);\n\n // Track successful build (only in production)\n if (mode === \"production\") {\n const reactToolsCount =\n Array.from(toolPaths).filter(isReactFile).length;\n\n // Get output size\n let outputSize = 0;\n try {\n const distPath = path.join(process.cwd(), \"dist\");\n const fs = require(\"fs\");\n if (fs.existsSync(distPath)) {\n const files = fs.readdirSync(distPath);\n files.forEach((file: string) => {\n const filePath = path.join(distPath, file);\n const stat = fs.statSync(filePath);\n if (stat.isFile()) {\n outputSize += stat.size;\n }\n });\n }\n } catch (e) {\n // Ignore errors getting output size\n }\n\n telemetry.record(\n {\n eventName: TelemetryEventName.BUILD_COMPLETED,\n fields: {\n success: true,\n duration: compilationTime,\n toolsCount: toolPaths.size,\n reactToolsCount,\n promptsCount: promptPaths.size,\n resourcesCount: resourcePaths.size,\n outputSize,\n transport: xmcpConfig.http\n ? TransportType.HTTP\n : TransportType.STDIO,\n adapter: xmcpConfig.experimental?.adapter\n ? (xmcpConfig.experimental.adapter as AdapterType)\n : AdapterType.NONE,\n nodeVersion: process.version,\n xmcpVersion: require(\"../../package.json\").version,\n },\n },\n true // deferred - we'll use flushDetached\n );\n // Use flushDetached for faster process exit - spawns separate process\n telemetry.flushDetached(\"build\");\n // Telemetry runs in background detached process, build exits immediately\n }\n\n // user defined callback\n onBuild?.();\n } else {\n // on dev mode, webpack will recompile the code, so we need to start the http server after the first one\n if (\n mode === \"development\" &&\n xmcpConfig[\"http\"] &&\n !xmcpConfig.experimental?.adapter\n ) {\n startHttpServer();\n }\n }\n\n // Choose color based on compilation time\n let timeColor = (str: string) => str;\n if (mode === \"development\") {\n if (compilationTime > 1000) {\n timeColor = chalk.bold.red;\n } else if (compilationTime > 500) {\n timeColor = chalk.bold.yellow;\n }\n }\n\n console.log(\n `${greenCheck} Compiled in ${timeColor(`${compilationTime}ms`)}`\n );\n\n firstBuild = false;\n // Compiler callback ends\n });\n });\n}\n\n/**\n * Builds client bundles for all React tool components (.tsx files)\n * Returns a map of tool names to their bundle paths\n */\nasync function buildClientBundles(): Promise<Map<string, string> | undefined> {\n const { toolPaths } = compilerContext.getContext();\n const reactToolPaths = Array.from(toolPaths).filter((toolPath) =>\n toolPath.endsWith(\".tsx\")\n );\n\n if (reactToolPaths.length === 0) {\n return undefined;\n }\n\n const clientBundles = new Map<string, string>();\n\n for (const reactToolPath of reactToolPaths) {\n const toolName = pathToToolName(reactToolPath);\n const bundlePath = `dist/client/${toolName}.bundle.js`;\n\n await transpileClientComponent(reactToolPath, toolName, \"dist/client\");\n clientBundles.set(toolName, bundlePath);\n }\n\n return clientBundles;\n}\n\n/**\n * Generates all runtime code and builds client bundles if needed\n * This centralizes all code generation logic including client bundle building\n */\nasync function generateCode() {\n // Build client bundles first (if there are React components)\n const clientBundles = await buildClientBundles();\n\n // Store in context for import map generation\n compilerContext.setContext({ clientBundles });\n\n // Generate import map code (includes client bundles)\n const fileContent = generateImportCode();\n fs.writeFileSync(path.join(runtimeFolderPath, \"import-map.js\"), fileContent);\n\n // Generate runtime exports for global access\n const runtimeExportsCode = generateEnvCode();\n const envFilePath = path.join(rootFolder, \"xmcp-env.d.ts\");\n\n // Delete existing file if it exists\n if (fs.existsSync(envFilePath)) {\n fs.unlinkSync(envFilePath);\n }\n\n fs.writeFileSync(envFilePath, runtimeExportsCode);\n\n // only generating tools files for nextjs adapter mode\n const { xmcpConfig } = compilerContext.getContext();\n if (xmcpConfig?.experimental?.adapter === \"nextjs\") {\n const toolsCode = generateToolsExportCode();\n fs.writeFileSync(path.join(runtimeFolderPath, \"tools.js\"), toolsCode);\n const typesCode = generateToolsTypesCode();\n fs.writeFileSync(path.join(runtimeFolderPath, \"tools.d.ts\"), typesCode);\n }\n}\n","import { spawn } from \"child_process\";\nimport { CompilerMode } from \".\";\nimport { watchdog } from \"../utils/spawn-process\";\nimport { greenCheck } from \"../utils/cli-icons\";\nimport { XmcpConfigOuputSchema } from \"./config\";\n\nexport function onFirstBuild(\n mode: CompilerMode,\n xmcpConfig: XmcpConfigOuputSchema\n) {\n if (mode === \"development\" && false) {\n // disable inspector for now\n console.log(\"🔍 Starting inspector...\");\n\n const inspectorArgs = [\"@modelcontextprotocol/inspector@latest\"];\n\n if (xmcpConfig.stdio) {\n inspectorArgs.push(\"node\", \"dist/stdio.js\");\n }\n\n const inspectorProcess = spawn(\"npx\", inspectorArgs, {\n stdio: [\"inherit\", \"pipe\", \"pipe\"],\n shell: true,\n });\n\n watchdog(inspectorProcess);\n\n // Prefix inspector output with [Inspector]\n inspectorProcess.stdout?.on(\"data\", (data: Buffer) => {\n const lines = data.toString().split(\"\\n\");\n lines.forEach((line) => {\n if (line.trim()) {\n if (line.includes(\"?MCP_PROXY_AUTH_TOKEN\")) {\n console.log(`🔍 Inspector started at ${line}`);\n }\n }\n });\n });\n\n inspectorProcess.stderr?.on(\"data\", (data: Buffer) => {\n const lines = data.toString().split(\"\\n\");\n lines.forEach((line) => {\n if (line.trim()) {\n console.error(`[Inspector] ${line}`);\n }\n });\n });\n\n inspectorProcess.on(\"error\", (err: Error) => {\n console.error(\"[Inspector] Failed to start inspector:\", err);\n });\n }\n\n const builtResults = [];\n\n if (xmcpConfig.stdio) {\n builtResults.push(`${greenCheck} Built STDIO server`);\n }\n if (xmcpConfig[\"http\"]) {\n if (xmcpConfig.experimental?.adapter) {\n builtResults.push(`${greenCheck} Built Adapter`);\n } else {\n builtResults.push(`${greenCheck} Built HTTP server`);\n }\n }\n\n builtResults.forEach((result) => {\n console.log(result);\n });\n}\n","import fs from \"fs\";\nimport path from \"path\";\nimport { webpack, type Configuration } from \"webpack\";\nimport { createFsFromVolume, Volume } from \"memfs\";\nimport { compilerContext } from \"./compiler-context\";\nimport {\n configSchema,\n XmcpConfigInputSchema,\n type XmcpConfigOuputSchema,\n} from \"./config\";\nimport { DEFAULT_PATHS_CONFIG } from \"./config/constants\";\n\nfunction validateConfig(config: unknown): XmcpConfigOuputSchema {\n return configSchema.parse(config);\n}\n\n// read if exists\nfunction readConfigFile(pathToConfig: string): string | null {\n const configPath = path.resolve(process.cwd(), pathToConfig);\n if (!fs.existsSync(configPath)) {\n return null;\n }\n return fs.readFileSync(configPath, \"utf8\");\n}\n\nconst configPaths = {\n ts: \"xmcp.config.ts\",\n json: \"xmcp.config.json\",\n};\n\n/**\n * Parse and validate xmcp config file\n */\nexport async function getConfig(): Promise<XmcpConfigOuputSchema> {\n const config = await readConfig();\n const { platforms } = compilerContext.getContext();\n if (platforms.vercel) {\n // Remove stdio to deploy on vercel\n delete config.stdio;\n }\n return config;\n}\n\n/**\n * Read config from file or return default\n */\nexport async function readConfig(): Promise<XmcpConfigOuputSchema> {\n // Simple json config\n const jsonFile = readConfigFile(configPaths.json);\n if (jsonFile) {\n return validateConfig(JSON.parse(jsonFile));\n }\n\n // TypeScript config, compile it\n const tsFile = readConfigFile(configPaths.ts);\n if (tsFile) {\n try {\n return await compileConfig();\n } catch (error) {\n throw new Error(`Failed to compile xmcp.config.ts:\\n${error}`);\n }\n }\n\n // Default config\n return {\n stdio: true,\n http: true,\n paths: DEFAULT_PATHS_CONFIG,\n } satisfies XmcpConfigInputSchema;\n}\n\n/**\n * If the user is using a typescript config file,\n * we need to bundle it, run it and return its copiled code\n * */\nasync function compileConfig(): Promise<XmcpConfigOuputSchema> {\n const configPath = path.resolve(process.cwd(), configPaths.ts);\n\n // Create memory filesystem\n const memoryFs = createFsFromVolume(new Volume());\n\n // Webpack configuration\n const webpackConfig: Configuration = {\n mode: \"production\",\n entry: configPath,\n target: \"node\",\n output: {\n path: \"/\",\n filename: \"config.js\",\n library: {\n type: \"commonjs2\",\n },\n },\n resolve: {\n extensions: [\".ts\", \".js\"],\n },\n resolveLoader: {\n modules: [\n \"node_modules\",\n path.resolve(__dirname, \"../node_modules\"), // for monorepo/npm\n path.resolve(__dirname, \"../..\"), // for pnpm\n ],\n },\n module: {\n rules: [\n {\n test: /\\.ts$/,\n use: {\n loader: \"swc-loader\",\n options: {\n jsc: {\n parser: {\n syntax: \"typescript\",\n },\n target: \"es2020\",\n },\n module: {\n type: \"commonjs\",\n },\n },\n },\n exclude: /node_modules/,\n },\n ],\n },\n externals: {\n webpack: \"commonjs2 webpack\",\n },\n };\n\n return new Promise((resolve, reject) => {\n const compiler = webpack(webpackConfig);\n\n if (!compiler) {\n reject(new Error(\"Failed to create webpack compiler\"));\n return;\n }\n\n // Use memory filesystem for output\n compiler.outputFileSystem = memoryFs as any;\n\n compiler.run((err, stats) => {\n if (err) {\n reject(err);\n return;\n }\n\n if (stats?.hasErrors()) {\n reject(new Error(stats.toString({ colors: false, errors: true })));\n return;\n }\n\n try {\n // Read the bundled code from memory\n const bundledCode = memoryFs.readFileSync(\n \"/config.js\",\n \"utf8\"\n ) as string;\n\n // Create a temporary module to evaluate the bundled code\n const module = { exports: {} };\n const require = (id: string) => {\n // Handle webpack require\n if (id === \"webpack\") {\n return webpack;\n }\n throw new Error(`Cannot resolve module: ${id}`);\n };\n\n // Evaluate the bundled code\n const func = new Function(\n \"module\",\n \"exports\",\n \"require\",\n \"__filename\",\n \"__dirname\",\n bundledCode\n );\n func(\n module,\n module.exports,\n require,\n configPath,\n path.dirname(configPath)\n );\n\n // Extract the config - it could be default export or direct export\n const configExport = (module.exports as any).default || module.exports;\n const config =\n typeof configExport === \"function\" ? configExport() : configExport;\n\n resolve(validateConfig(config));\n } catch (evalError) {\n reject(evalError);\n }\n });\n });\n}\n","import { yellowArrow } from \"@/utils/cli-icons\";\nimport { watchdog } from \"@/utils/spawn-process\";\nimport { ChildProcess, spawn } from \"child_process\";\n\nlet httpServerProcess: ChildProcess | null = null;\n\nfunction spawnHttpServer() {\n const process = spawn(\"node\", [\"dist/http.js\"], {\n stdio: \"inherit\",\n shell: true,\n });\n\n watchdog(process);\n\n return process;\n}\n\nasync function killProcess(process: ChildProcess) {\n process.kill(\"SIGKILL\");\n await new Promise((resolve) => {\n process.on(\"exit\", resolve);\n });\n}\n\nexport async function startHttpServer() {\n if (!httpServerProcess) {\n console.log(`${yellowArrow} Starting http server`);\n // first time starting the server\n httpServerProcess = spawnHttpServer();\n } else {\n console.log(`${yellowArrow} Restarting http server`);\n // restart the server\n await killProcess(httpServerProcess);\n httpServerProcess = spawnHttpServer();\n }\n}\n","import fs from \"fs\";\nimport path from \"path\";\n\n/**\n * Build a client-side bundle for a React component\n * Writes the bundle to disk at outputDir/${toolName}.bundle.js\n */\nexport async function transpileClientComponent(\n componentPath: string,\n toolName: string,\n outputDir: string\n): Promise<void> {\n try {\n const absolutePath = path.resolve(process.cwd(), componentPath);\n\n const sourceCode = fs.readFileSync(absolutePath, \"utf-8\");\n\n const dynamicRequire = eval(\"require\");\n const { transformSync } = dynamicRequire(\"@swc/core\");\n\n const result = transformSync(sourceCode, {\n filename: componentPath,\n jsc: {\n parser: {\n syntax: \"typescript\",\n tsx: true,\n },\n transform: {\n react: {\n runtime: \"automatic\",\n importSource: \"react\",\n },\n },\n target: \"es2015\",\n },\n module: {\n type: \"es6\",\n },\n });\n\n const bundleCode = result.code.trim();\n\n if (!fs.existsSync(outputDir)) {\n fs.mkdirSync(outputDir, { recursive: true });\n }\n\n const outputPath = path.join(outputDir, `${toolName}.bundle.js`);\n fs.writeFileSync(outputPath, bundleCode, \"utf-8\");\n\n console.log(`✓ Built client bundle: ${outputPath}`);\n } catch (error) {\n throw new Error(\n `Failed to transpile client component \"${toolName}\" at ${componentPath}: ${error instanceof Error ? error.message : String(error)}`\n );\n }\n}\n","export function pathToToolName(path: string): string {\n const fileName = path.split(\"/\").pop() || path;\n return fileName.replace(/\\.[^/.]+$/, \"\");\n}\n","import path from \"path\";\nimport fs from \"fs\";\n\nconst rootDir = process.cwd();\n\nasync function buildVercelOutput() {\n const outputDir = path.join(rootDir, \".vercel\", \"output\");\n const functionsDir = path.join(outputDir, \"functions\", \"api\", \"index.func\");\n\n console.log(\"🚀 Building Vercel output structure...\");\n\n fs.mkdirSync(outputDir, { recursive: true });\n fs.mkdirSync(functionsDir, { recursive: true });\n\n const distDir = path.join(rootDir, \"dist\");\n const sourceFile = path.join(distDir, \"http.js\");\n const targetFile = path.join(functionsDir, \"index.js\");\n\n if (!fs.existsSync(distDir)) {\n throw new Error(\"❌ Dist directory not found. Run build first.\");\n }\n\n if (fs.existsSync(sourceFile)) {\n fs.copyFileSync(sourceFile, targetFile);\n } else {\n throw new Error(\n \"❌ Application server file not found in dist/. Run build first.\"\n );\n }\n\n // copy all other files from dist directory that http.js might depend on\n const distContents = fs.readdirSync(distDir);\n\n // to do add proper error handling for failed copy\n for (const item of distContents) {\n const sourcePath = path.join(distDir, item);\n const targetPath = path.join(functionsDir, item);\n\n if (item === \"http.js\" || item === \"stdio.js\" || item === \"auth-ui\")\n continue;\n\n const stat = fs.statSync(sourcePath);\n if (stat.isFile()) {\n fs.copyFileSync(sourcePath, targetPath);\n } else if (stat.isDirectory()) {\n fs.cpSync(sourcePath, targetPath, { recursive: true });\n }\n }\n\n const packageJsonSource = path.join(rootDir, \"package.json\");\n const packageJsonTarget = path.join(functionsDir, \"package.json\");\n fs.copyFileSync(packageJsonSource, packageJsonTarget);\n\n console.log(\"Server and dependency files copied to function directory\");\n\n // Copy static assets to static directory for Vercel\n const staticDir = path.join(outputDir, \"static\");\n fs.mkdirSync(staticDir, { recursive: true });\n\n // Check if auth-ui assets exist in dist or node_modules and copy them\n let authUiDir = path.join(distDir, \"auth-ui\");\n if (!fs.existsSync(authUiDir)) {\n authUiDir = path.join(\n rootDir,\n \"node_modules\",\n \"@xmcp-dev\",\n \"better-auth\",\n \"dist\",\n \"auth-ui\"\n );\n }\n\n if (fs.existsSync(authUiDir)) {\n const staticAuthDir = path.join(staticDir, \"auth\");\n fs.cpSync(authUiDir, staticAuthDir, { recursive: true });\n console.log(\"Auth UI assets copied to static directory\");\n\n // Remove auth-ui from function directory if it was copied there\n const functionAuthDir = path.join(functionsDir, \"auth-ui\");\n if (fs.existsSync(functionAuthDir)) {\n fs.rmSync(functionAuthDir, { recursive: true });\n console.log(\"Auth UI assets removed from function directory\");\n }\n }\n\n const vcConfig = {\n handler: \"index.js\",\n runtime: \"nodejs22.x\",\n launcherType: \"Nodejs\",\n shouldAddHelpers: true,\n };\n\n fs.writeFileSync(\n path.join(functionsDir, \".vc-config.json\"),\n JSON.stringify(vcConfig, null, 2)\n );\n\n const config = {\n version: 3,\n routes: [\n // static auth assets first\n {\n src: \"^/auth/assets/(.*)$\",\n dest: \"/auth/assets/$1\",\n },\n // filesystem (static files)\n {\n handle: \"filesystem\",\n },\n // auth routes should serve the static index.html for client-side routing\n {\n src: \"^/auth/(sign-in|callback/.*|index\\\\.html)?$\",\n dest: \"/auth/index.html\",\n },\n // rest of the endpoints\n {\n src: \"^/(.*)$\",\n dest: \"/api\",\n },\n ],\n };\n\n fs.writeFileSync(\n path.join(outputDir, \"config.json\"),\n JSON.stringify(config, null, 2)\n );\n\n console.log(\"✅ Vercel output structure created successfully\");\n}\n\nexport { buildVercelOutput };\n","/**\n * Check if a file path is a React component (.tsx file)\n */\nexport function isReactFile(filePath: string): boolean {\n return filePath.endsWith(\".tsx\");\n}\n","import ciEnvironment from \"ci-info\";\n\nconst { isCI: _isCI, name: _name } = ciEnvironment;\n\nexport const isCI = _isCI;\nexport const name = _name;\n","/**\n * Telemetry Event Definitions\n */\n\nexport enum TelemetryEventName {\n BUILD_COMPLETED = \"build:completed\",\n BUILD_FAILED = \"build:failed\",\n}\n\nexport enum TransportType {\n HTTP = \"http\",\n STDIO = \"stdio\",\n}\n\nexport enum ErrorPhase {\n CONFIG = \"config\",\n COMPILE = \"compile\",\n WEBPACK = \"webpack\",\n TRANSPILE = \"transpile\",\n}\n\nexport enum AdapterType {\n NONE = \"none\",\n EXPRESS = \"express\",\n NEXTJS = \"nextjs\",\n}\n\ntype EventPayload = {\n success: boolean;\n duration: number; // milliseconds\n toolsCount: number;\n reactToolsCount: number;\n promptsCount: number;\n resourcesCount: number;\n transport: TransportType;\n adapter: AdapterType;\n nodeVersion: string;\n xmcpVersion: string;\n};\n\nexport type BuildCompletedPayload = EventPayload & {\n outputSize: number; // bytes\n};\n\nexport type BuildFailedPayload = EventPayload & {\n errorPhase: ErrorPhase;\n errorType: string;\n};\n\nexport type TelemetryEventPayload = BuildCompletedPayload | BuildFailedPayload;\n","import retry from \"async-retry\";\n\n/**\n * Build event data (only event type we track)\n */\nexport interface BuildEventData {\n success: boolean;\n duration: number;\n toolsCount: number;\n reactToolsCount: number;\n promptsCount: number;\n resourcesCount: number;\n outputSize?: number;\n transport: string;\n adapter: string;\n nodeVersion?: string;\n xmcpVersion?: string;\n errorPhase?: string;\n errorType?: string;\n}\n\n/**\n * Telemetry payload structure\n */\nexport interface TelemetryPayload {\n context: {\n anonymousId: string;\n projectHash: string;\n sessionId: string;\n };\n\n meta: {\n platform?: string;\n arch?: string;\n systemRelease?: string;\n cpuModel?: string;\n cpuSpeed?: number;\n cpuCores?: number;\n memoryTotal?: number;\n isCI?: boolean;\n ciName?: string | null;\n isDocker?: boolean;\n };\n\n events: Array<{\n eventName: string;\n timestamp: string;\n fields: BuildEventData;\n }>;\n}\n\n/**\n * Post telemetry payload to the endpoint\n *\n * Features:\n * - Automatic retry with exponential backoff using async-retry\n * - Timeout handling (5s default)\n * - Error swallowing (never breaks the build)\n * - Voided promise (fire and forget)\n *\n * @param payload - The telemetry payload\n * @param signal - Optional AbortSignal for timeout control\n * @returns Voided promise\n */\nexport function postTelemetryPayload(\n payload: TelemetryPayload,\n signal?: AbortSignal\n): Promise<void> {\n if (!signal && \"timeout\" in AbortSignal) {\n signal = AbortSignal.timeout(5000);\n }\n\n return (\n retry(\n async () => {\n const response = await fetch(\n \"https://telemetry.xmcp.dev/api/telemetry/events\",\n {\n method: \"POST\",\n body: JSON.stringify(payload),\n headers: { \"content-type\": \"application/json\" },\n signal,\n }\n );\n\n // Try to parse response body\n const responseText = await response.text();\n let responseData;\n try {\n responseData = JSON.parse(responseText);\n } catch (e) {\n // response might not be json\n // ignore\n }\n\n if (!response.ok) {\n const err = new Error(\n `HTTP ${response.status}: ${response.statusText}`\n );\n (err as any).response = response;\n (err as any).responseData = responseData;\n throw err;\n }\n },\n { minTimeout: 500, retries: 1, factor: 1 }\n )\n .catch((error) => {\n // swallow errors in production - telemetry should never break the build\n })\n // Ensure promise is voided (fire and forget)\n .then(\n () => {},\n () => {}\n )\n );\n}\n\n/**\n * Helper to create payload from metadata and events\n */\nexport function createPayload(\n context: TelemetryPayload[\"context\"],\n meta: Record<string, any>,\n events: TelemetryPayload[\"events\"]\n): TelemetryPayload {\n return { context, meta, events };\n}\n","import { randomBytes } from \"crypto\";\nimport { writeFileSync, mkdirSync } from \"fs\";\nimport path from \"path\";\nimport { TelemetryStorage } from \"../storage\";\nimport { getAnonymousMeta } from \"../metadata\";\nimport {\n postTelemetryPayload,\n createPayload,\n BuildEventData,\n} from \"./post-payload\";\nimport { getProjectId } from \"../project-id\";\n\nexport type TelemetryEvent = {\n eventName: string;\n fields: BuildEventData;\n};\n\ntype RecordObject = {\n isFulfilled: boolean;\n isRejected: boolean;\n value?: any;\n reason?: any;\n};\n\nexport class TelemetryTracker {\n private storage: TelemetryStorage;\n private sessionId: string;\n private queue: Set<Promise<RecordObject>>;\n private loadProjectId: undefined | string | Promise<string>;\n private distDir: string;\n\n constructor(distDir: string = \".xmcp\") {\n this.storage = new TelemetryStorage(distDir);\n this.sessionId = randomBytes(32).toString(\"hex\");\n this.queue = new Set();\n this.distDir = distDir;\n }\n\n get anonymousId(): string {\n return this.storage.anonymousId;\n }\n\n get isDisabled(): boolean {\n return this.storage.isDisabled;\n }\n\n get isEnabled(): boolean {\n return this.storage.isEnabled;\n }\n\n setEnabled(enabled: boolean): string | undefined {\n return this.storage.setEnabled(enabled);\n }\n\n private async getProjectId(): Promise<string> {\n this.loadProjectId =\n this.loadProjectId ||\n getProjectId(this.storage.oneWayHash.bind(this.storage));\n return await this.loadProjectId;\n }\n\n /**\n * Record telemetry events\n * Returns a promise that resolves to a RecordObject\n */\n record(\n _events: TelemetryEvent | TelemetryEvent[],\n deferred?: boolean\n ): Promise<RecordObject> {\n const prom = (\n deferred\n ? // if we know we are going to immediately call\n // flushDetached we can skip starting the initial\n // submitRecord which will then be cancelled\n new Promise((resolve) =>\n resolve({\n isFulfilled: true,\n isRejected: false,\n value: _events,\n })\n )\n : this.submitRecord(_events)\n )\n .then((value) => ({\n isFulfilled: true,\n isRejected: false,\n value,\n }))\n .catch((reason) => ({\n isFulfilled: false,\n isRejected: true,\n reason,\n }))\n // Acts as `Promise#finally` because `catch` transforms the error\n .then((res) => {\n // Clean up the event to prevent unbounded `Set` growth\n if (!deferred) {\n this.queue.delete(prom);\n }\n return res;\n });\n\n (prom as any)._events = Array.isArray(_events) ? _events : [_events];\n\n // Track this `Promise` so we can flush pending events\n this.queue.add(prom);\n\n return prom;\n }\n\n private async submitRecord(\n _events: TelemetryEvent | TelemetryEvent[]\n ): Promise<any> {\n let events: TelemetryEvent[];\n if (Array.isArray(_events)) {\n events = _events;\n } else {\n events = [_events];\n }\n\n if (events.length < 1) {\n return Promise.resolve();\n }\n\n // Skip recording telemetry if the feature is disabled\n if (this.isDisabled) {\n return Promise.resolve();\n }\n\n const meta = getAnonymousMeta();\n\n const payload = createPayload(\n {\n anonymousId: this.storage.anonymousId,\n projectHash: await this.getProjectId(),\n sessionId: this.sessionId,\n },\n meta,\n events.map((event) => ({\n eventName: event.eventName,\n timestamp: new Date().toISOString(),\n fields: event.fields,\n }))\n );\n\n return await postTelemetryPayload(payload);\n }\n\n /**\n * Flush all pending telemetry events\n */\n async flush(): Promise<void> {\n await Promise.all(this.queue).catch(() => null);\n }\n\n /**\n * Writes current events to disk and spawns separate\n * detached process to submit the records without blocking\n * the main process from exiting\n */\n flushDetached(mode: \"dev\" | \"build\"): void {\n const allEvents: TelemetryEvent[] = [];\n\n this.queue.forEach((item: any) => {\n try {\n allEvents.push(...item._events);\n } catch (_) {\n // if we fail to collect events, ignore\n }\n });\n\n // Skip if no events to send\n if (allEvents.length === 0) {\n return;\n }\n\n try {\n mkdirSync(this.distDir, { recursive: true });\n const eventsFilePath = path.join(this.distDir, \"_events.json\");\n writeFileSync(eventsFilePath, JSON.stringify(allEvents));\n\n // Note: cross-spawn is not used here as it causes\n // a new command window to appear when we don't want it to\n const child_process =\n require(\"child_process\") as typeof import(\"child_process\");\n\n // we use spawnSync when debugging to ensure logs are piped\n // correctly to stdout/stderr\n const spawn = child_process.spawn;\n\n // Resolve the detached-flush script path\n // After webpack compilation, detached-flush.js is in the dist root\n // We need to go up from wherever this compiled file is to find it\n // This file will be bundled into index.js, so __dirname will be dist/\n const detachedFlushPath = path.join(__dirname, \"detached-flush.js\");\n\n const result = spawn(\n process.execPath,\n [detachedFlushPath, mode, this.distDir],\n {\n detached: true,\n windowsHide: true,\n shell: false,\n }\n );\n\n // Unref the child process so it doesn't keep the parent alive\n if (\"unref\" in result && result.unref) {\n result.unref();\n }\n } catch (error) {\n // Silently fail - telemetry should never break the build\n }\n }\n\n // For testing purposes\n getStorage(): TelemetryStorage {\n return this.storage;\n }\n\n getSessionId(): string {\n return this.sessionId;\n }\n\n getQueueSize(): number {\n return this.queue.size;\n }\n}\n\n// Singleton instance\nlet telemetryInstance: TelemetryTracker | null = null;\n\nexport function getTelemetry(distDir?: string): TelemetryTracker {\n if (!telemetryInstance) {\n telemetryInstance = new TelemetryTracker(distDir);\n }\n return telemetryInstance;\n}\n\nexport const telemetry = getTelemetry();\n","export { telemetry } from \"./events/tracker\";\nexport {\n TelemetryEventName,\n TransportType,\n ErrorPhase,\n AdapterType,\n} from \"./events/definitions\";\n","import isDockerFunction from \"is-docker\";\nimport isWslBoolean from \"is-wsl\";\nimport os from \"os\";\nimport ciEnvironment from \"ci-info\";\n\n// CI details\nconst { isCI: _isCI, name: _name } = ciEnvironment;\n\ntype AnonymousMeta = {\n systemPlatform: NodeJS.Platform;\n systemRelease: string;\n systemArchitecture: string;\n cpuCount: number;\n cpuModel: string | null;\n cpuSpeed: number | null;\n memoryInMb: number;\n isDocker: boolean;\n isWsl: boolean;\n isCI: typeof _isCI;\n ciName: typeof _name | null;\n};\n\nlet traits: AnonymousMeta | undefined;\n\nexport function getAnonymousMeta(): AnonymousMeta {\n if (traits) {\n return traits;\n }\n\n const cpus = os.cpus() || [];\n traits = {\n // Software information\n systemPlatform: os.platform(),\n systemRelease: os.release(),\n systemArchitecture: os.arch(),\n // Machine information\n cpuCount: cpus.length,\n cpuModel: cpus.length ? cpus[0].model : null,\n cpuSpeed: cpus.length ? cpus[0].speed : null,\n memoryInMb: Math.trunc(os.totalmem() / Math.pow(1024, 2)),\n // Environment information\n isDocker: isDockerFunction(),\n isWsl: isWslBoolean,\n isCI: _isCI,\n ciName: (_isCI && _name) || null,\n };\n\n return traits;\n}\n","import { readFileSync } from \"fs\";\nimport path from \"path\";\nimport { createHash } from \"crypto\";\n\n/**\n * Get raw project ID from package.json\n */\nexport async function getRawProjectId(): Promise<string> {\n try {\n // Try to read package.json from current working directory\n const packageJsonPath = path.join(process.cwd(), \"package.json\");\n const packageJson = JSON.parse(readFileSync(packageJsonPath, \"utf-8\"));\n\n // Use package name and version as stable identifier\n // This gives us a stable ID even across different machines\n const identifier = `${packageJson.name || \"unknown\"}@${\n packageJson.version || \"0.0.0\"\n }`;\n\n return identifier;\n } catch (error) {\n // Fallback to directory path if package.json not found\n return process.cwd();\n }\n}\n\n/**\n * Get a hashed project ID\n */\nexport async function getProjectId(\n oneWayHash: (payload: string) => string\n): Promise<string> {\n const rawId = await getRawProjectId();\n return oneWayHash(rawId);\n}\n","import { randomBytes, createHash, BinaryLike } from \"crypto\";\nimport {\n readFileSync,\n writeFileSync,\n existsSync,\n mkdirSync,\n unlinkSync,\n} from \"fs\";\nimport path from \"path\";\nimport os from \"os\";\nimport isDockerFunction from \"is-docker\";\nimport { isCI } from \"./ci-info\";\n\n// This is the key that stores whether or not telemetry is enabled or disabled.\nconst TELEMETRY_KEY_ENABLED = \"telemetry.enabled\";\n\n// This is the key that specifies when the user was informed about anonymous\n// telemetry collection.\nconst TELEMETRY_KEY_NOTIFY_DATE = \"telemetry.notifiedAt\";\n\n// This is a quasi-persistent identifier used to dedupe recurring events. It's\n// generated from random data and completely anonymous.\nconst TELEMETRY_KEY_ID = \"telemetry.anonymousId\";\n\n// This is the cryptographic salt that is included within every hashed value.\n// This salt value is never sent to us, ensuring privacy and the one-way nature\n// of the hash (prevents dictionary lookups of pre-computed hashes).\n// See the `oneWayHash` function.\nconst TELEMETRY_KEY_SALT = \"telemetry.salt\";\n\nfunction getConfigPath(distDir?: string): string {\n const isEphemeral = isCI || isDockerFunction();\n\n if (isEphemeral && distDir) {\n return path.join(distDir, \"cache\", \"telemetry.json\");\n }\n\n // Use system config directory for local development\n const configDir = path.join(\n os.homedir(),\n process.platform === \"win32\" ? \"AppData/Local/xmcp\" : \".config/xmcp\"\n );\n\n return path.join(configDir, \"telemetry.json\");\n}\n\ninterface TelemetryConfig {\n [TELEMETRY_KEY_ENABLED]?: boolean;\n [TELEMETRY_KEY_NOTIFY_DATE]?: string;\n [TELEMETRY_KEY_ID]?: string;\n [TELEMETRY_KEY_SALT]?: string;\n}\n\nexport class TelemetryStorage {\n private configPath: string;\n private config: TelemetryConfig | null = null;\n private XMCP_TELEMETRY_DISABLED: string | undefined;\n\n constructor(distDir?: string) {\n this.configPath = getConfigPath(distDir);\n this.XMCP_TELEMETRY_DISABLED = process.env.XMCP_TELEMETRY_DISABLED;\n this.ensureConfig();\n }\n\n private ensureConfig(): void {\n try {\n // Ensure directory exists\n const dir = path.dirname(this.configPath);\n if (!existsSync(dir)) {\n mkdirSync(dir, { recursive: true });\n }\n\n // Read existing config\n if (existsSync(this.configPath)) {\n const data = readFileSync(this.configPath, \"utf-8\");\n this.config = JSON.parse(data);\n } else {\n this.config = {};\n }\n } catch (error) {\n // If we can't read/write, use empty config\n this.config = {};\n }\n }\n\n private get<T>(key: string, defaultValue?: T): T | undefined {\n if (!this.config) {\n return defaultValue;\n }\n const val = this.config[key as keyof TelemetryConfig];\n return val !== undefined ? (val as T) : defaultValue;\n }\n\n private set<T>(key: string, value: T): void {\n if (!this.config) {\n return;\n }\n this.config[key as keyof TelemetryConfig] = value as any;\n try {\n writeFileSync(\n this.configPath,\n JSON.stringify(this.config, null, 2),\n \"utf-8\"\n );\n } catch (error) {\n // Ignore write errors\n }\n }\n\n private notify(): void {\n if (this.isDisabled || !this.config) {\n return;\n }\n\n // The end-user has already been notified about our telemetry integration. We\n // don't need to constantly annoy them about it.\n // We will re-inform users about the telemetry if significant changes are\n // ever made.\n if (this.get(TELEMETRY_KEY_NOTIFY_DATE, \"\")) {\n return;\n }\n this.set(TELEMETRY_KEY_NOTIFY_DATE, Date.now().toString());\n\n if (!isCI) {\n console.log(\"\");\n console.log(\n \"xmcp collects anonymous usage data to improve the framework.\"\n );\n console.log(\" No personal information is collected.\");\n console.log(\n \" You can learn more and opt-out by visiting: https://xmcp.dev/telemetry\"\n );\n console.log(\" Or disable with: npx xmcp telemetry disable\");\n console.log(\"\");\n }\n }\n\n get anonymousId(): string {\n this.notify();\n\n const val = this.get<string>(TELEMETRY_KEY_ID);\n if (val) {\n return val;\n }\n\n const generated = randomBytes(32).toString(\"hex\");\n this.set(TELEMETRY_KEY_ID, generated);\n return generated;\n }\n\n get salt(): string {\n const val = this.get<string>(TELEMETRY_KEY_SALT);\n if (val) {\n return val;\n }\n\n const generated = randomBytes(16).toString(\"hex\");\n this.set(TELEMETRY_KEY_SALT, generated);\n return generated;\n }\n\n get isDisabled(): boolean {\n if (!!this.XMCP_TELEMETRY_DISABLED || !this.config) {\n return true;\n }\n return this.get<boolean>(TELEMETRY_KEY_ENABLED, true) === false;\n }\n\n get isEnabled(): boolean {\n return (\n !this.XMCP_TELEMETRY_DISABLED &&\n !!this.config &&\n this.get<boolean>(TELEMETRY_KEY_ENABLED, true) !== false\n );\n }\n\n setEnabled(enabled: boolean): string | undefined {\n this.set(TELEMETRY_KEY_ENABLED, !!enabled);\n return this.configPath;\n }\n\n /**\n * Create a one-way hash with salt.\n * This ensures the hash is truly one-way and prevents dictionary attacks.\n */\n oneWayHash(payload: BinaryLike): string {\n const hash = createHash(\"sha256\");\n\n // Always prepend the payload value with salt. This ensures the hash is truly\n // one-way.\n hash.update(this.salt);\n\n // Update is an append operation, not a replacement. The salt from the prior\n // update is still present!\n hash.update(payload);\n return hash.digest(\"hex\");\n }\n\n clear(): void {\n try {\n if (existsSync(this.configPath)) {\n unlinkSync(this.configPath);\n }\n } catch (error) {\n // Ignore errors\n }\n }\n\n get configFilePath(): string {\n return this.configPath;\n }\n}\n","import chalk from \"chalk\";\n\nexport const greenCheck = chalk.bold.green(\"✔\");\nexport const xmcpLogo = chalk.bold.black.bgWhite(\" XMCP \");\nexport const yellowArrow = chalk.bold.yellow(\"❯\");\n","import path from \"path\";\n\nexport const runtimeFolder = \".xmcp\";\nexport const runtimeFolderPath = path.join(process.cwd(), runtimeFolder);\nexport const rootFolder = path.join(process.cwd());\n\nexport const processFolder = process.cwd();\nexport const distOutputPath = path.join(processFolder, \"dist\");\nexport const adapterOutputPath = path.join(runtimeFolderPath, \"adapter\");\n","import { AsyncLocalStorage } from \"async_hooks\";\n\ntype DefaultContext = Object;\n\ntype GetContext<T extends DefaultContext> = () => T;\n\ntype SetContext<T extends DefaultContext> = (data: Partial<T>) => void;\n\nexport interface Context<T extends DefaultContext> {\n /** Run a callback with a specific context. */\n provider: (initialValue: T, callback: () => void) => void;\n /** Get the context. */\n getContext: GetContext<T>;\n /** Partially update the context. */\n setContext: SetContext<T>;\n}\n\ninterface CreateContextOptions {\n name: string;\n}\n\nconst setGlobalContext = <T>(key: symbol, context: T) => {\n (globalThis as any)[key] = context;\n};\n\nconst getGlobalContext = <T>(key: symbol): T => {\n return (globalThis as any)[key] as T;\n};\n\n/**\n * Create context allows you to create scoped variables for fucntions.\n * Similar to React's context API.\n * Usage:\n * ```ts\n * interface MyContext {\n * value: string;\n * }\n *\n * const context = createContext({ name: \"my-context\" });\n *\n * context.provider({\n * value: \"hello\",\n * }, () => {\n * // Do something with the context\n * })```\n */\nexport function createContext<T extends Object>({\n name,\n}: CreateContextOptions): Context<T> {\n const storageKey = Symbol.for(`xmcp-context-${name}`);\n\n if (getGlobalContext(storageKey)) {\n return getGlobalContext<Context<T>>(storageKey);\n }\n\n const context = new AsyncLocalStorage<T>();\n\n const getContext: GetContext<T> = () => {\n const store = context.getStore();\n\n if (!store) {\n throw new Error(\n `getContext() can only be used within the ${name} context.`\n );\n }\n\n return store;\n };\n\n const setContext: SetContext<T> = (data) => {\n const store = context.getStore();\n\n if (!store) {\n throw new Error(\n `setContext() can only be used within the ${name} context.`\n );\n }\n\n Object.assign(store, data);\n };\n\n const provider = (initialValue: T, callback: () => void) => {\n return context.run(initialValue, callback);\n };\n\n const result: Context<T> = {\n provider,\n getContext,\n setContext,\n };\n\n setGlobalContext(storageKey, result);\n\n return result;\n}\n","import chokidar from \"chokidar\";\nimport { subscribable, Subscribable } from \"./subscribable\";\n\ninterface WatcherInstance {\n isReady: boolean;\n watcher: chokidar.FSWatcher;\n}\n\ninterface WatcherOptions {\n onAdd?: (path: string) => void;\n onUnlink?: (path: string) => void;\n onChange?: (path: string) => void;\n}\n\nexport class Watcher {\n private watchers: WatcherInstance[] = [];\n\n isReady: boolean = false;\n\n globalOptions: chokidar.WatchOptions = {};\n\n onReadySubscribable: Subscribable = subscribable();\n\n constructor(options: chokidar.WatchOptions = {}) {\n this.globalOptions = options;\n }\n\n watch(\n path: string,\n options: WatcherOptions,\n chokidarOptions: chokidar.WatchOptions = {}\n ) {\n const instance = chokidar.watch(path, {\n ...this.globalOptions,\n ...chokidarOptions,\n });\n\n options.onAdd && instance.on(\"add\", options.onAdd);\n options.onUnlink && instance.on(\"unlink\", options.onUnlink);\n options.onChange && instance.on(\"change\", options.onChange);\n\n const watcherInstance: WatcherInstance = {\n isReady: false,\n watcher: instance,\n };\n\n this.watchers.push(watcherInstance);\n\n instance.on(\"ready\", () => {\n watcherInstance.isReady = true;\n this.checkReady();\n });\n }\n\n public onReady(callback: () => void) {\n this.onReadySubscribable.addCallback(callback);\n }\n\n private checkReady() {\n if (this.watchers.every((watcher) => watcher.isReady)) {\n this.onReadySubscribable.runCallbacks();\n\n this.onReadySubscribable.clearCallbacks();\n }\n }\n}\n","import fs from \"fs\";\nimport json5 from \"json5\";\n\nexport function createFolder(folderPath: string) {\n if (!fs.existsSync(folderPath)) {\n fs.mkdirSync(folderPath, { recursive: true });\n }\n}\n\nexport function parseJson<T = any>(json: string) {\n try {\n return [json5.parse(json) as T, null] as const;\n } catch (e) {\n return [null, e as Error] as const;\n }\n}\n","import { rootFolder } from \"@/utils/constants\";\nimport chalk from \"chalk\";\nimport fs from \"fs\";\nimport path from \"path\";\n\n// for further addition of resources, prompts, etc, we can add more path types\n// used for the message error to the user\ntype PathType = \"tools\" | \"prompts\" | \"resources\";\n\nexport function isValidPath(\n pathStr: string | boolean | null | undefined,\n type: PathType\n): string | undefined {\n function isNonEmptyString(str: unknown): str is string {\n return typeof str === \"string\" && str.length > 0;\n }\n\n function isGlob(str: string): boolean {\n return /[*?\\[\\]{}]/.test(str);\n }\n\n function normalizePath(p: string): string {\n // normalize to posix (forward slashes)\n return p.split(/\\\\|\\//).join(\"/\");\n }\n\n function resolveAndCheckExists(p: string): string {\n const normalized = normalizePath(p);\n const absPath = path.resolve(rootFolder, normalized);\n if (!fs.existsSync(absPath)) {\n exitError(\n `The path set in xmcp.config.ts for ${type} does not exist: ${absPath}.\n If you're not using this folder, set the ${type} path to false`\n );\n }\n\n return normalized; // still return the normalized path cause we're formatting to glob later\n }\n\n if (pathStr === undefined || pathStr === null || pathStr === false) {\n return undefined;\n }\n\n // reject empty string\n if (pathStr === \"\") {\n exitError(`${type} path cannot be an empty string`);\n }\n\n if (isNonEmptyString(pathStr)) {\n if (isGlob(pathStr)) {\n exitError(\n `If you are using a glob pattern, please use a string for the ${type} path`\n );\n }\n return resolveAndCheckExists(pathStr);\n }\n\n exitError(`${type} path must be a non-empty string`);\n}\n\nfunction exitError(message: string) {\n console.log(\"\");\n console.log(chalk.red.bold(message));\n console.log(\"\");\n process.exit(1);\n}\n","// Based on https://www.npmjs.com/package/foreground-child\n\n// this spawns a child process that listens for SIGHUP when the\n// parent process exits, and after 200ms, sends a SIGKILL to the\n// child, in case it did not terminate.\n\nimport { ChildProcess, spawn } from \"child_process\";\n\nconst watchdogCode = String.raw`\nconst pid = parseInt(process.argv[1], 10)\nprocess.title = 'node (foreground-child watchdog pid=' + pid + ')'\nif (!isNaN(pid)) {\n let barked = false\n // keepalive\n const interval = setInterval(() => {}, 60000)\n const bark = () => {\n clearInterval(interval)\n if (barked) return\n barked = true\n process.removeListener('SIGHUP', bark)\n setTimeout(() => {\n try {\n process.kill(pid, 'SIGKILL')\n setTimeout(() => process.exit(), 200)\n } catch (_) {}\n }, 500)\n })\n process.on('SIGHUP', bark)\n}\n`;\n\n/**\n * Pass in a ChildProcess, and this will spawn a watchdog process that\n * will make sure it exits if the parent does, thus preventing any\n * dangling detached zombie processes.\n *\n * If the child ends before the parent, then the watchdog will terminate.\n */\nexport const watchdog = (child: ChildProcess) => {\n let dogExited = false;\n const dog = spawn(process.execPath, [\"-e\", watchdogCode, String(child.pid)], {\n stdio: \"ignore\",\n });\n dog.on(\"exit\", () => (dogExited = true));\n child.on(\"exit\", () => {\n if (!dogExited) dog.kill(\"SIGKILL\");\n });\n return dog;\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\ntype AnyFunction = (...args: any[]) => any;\n\nexport interface Subscribable<T extends AnyFunction = AnyFunction> {\n addCallback: (callback: T, id?: string) => string;\n removeCallback: (id: string | T) => void;\n getCallbacks: () => T[];\n getCallback: (id: string) => T;\n getCallbackIds: () => string[];\n clearCallbacks: () => void;\n runCallbacks: T;\n}\n\nexport const subscribable = <\n T extends AnyFunction = AnyFunction,\n>(): Subscribable<T> => {\n const callbacks: Record<string, T> = {};\n\n const addCallback = (callback: T, id: string): string => {\n const _id = id || crypto.randomUUID();\n callbacks[_id] = callback;\n return _id;\n };\n\n const removeCallback = (id: string | AnyFunction): void => {\n if (typeof id === \"function\") {\n const key = Object.keys(callbacks).find((k) => callbacks[k] === id);\n if (key) delete callbacks[key];\n return;\n }\n\n delete callbacks[id];\n };\n\n const getCallbacks = (): T[] => Object.values(callbacks);\n\n const getCallback = (id: string): T => callbacks[id];\n\n const clearCallbacks = (): void => {\n Object.keys(callbacks).forEach((id) => {\n removeCallback(id);\n });\n };\n\n const runCallbacks = (...params: unknown[]): void => {\n let response = undefined as any;\n Object.values(callbacks).forEach((callback) => {\n response = callback(...params);\n });\n return response;\n };\n\n return {\n addCallback,\n removeCallback,\n getCallback,\n getCallbacks,\n getCallbackIds: () => Object.keys(callbacks),\n clearCallbacks,\n runCallbacks: runCallbacks as unknown as T,\n } as Subscribable<T>;\n};\n","module.exports = require(\"assert\");","module.exports = require(\"async_hooks\");","module.exports = require(\"child_process\");","module.exports = require(\"constants\");","module.exports = require(\"crypto\");","module.exports = require(\"events\");","module.exports = require(\"fs\");","module.exports = require(\"module\");","module.exports = require(\"node:buffer\");","module.exports = require(\"node:events\");","module.exports = require(\"node:fs\");","module.exports = require(\"node:os\");","module.exports = require(\"node:path\");","module.exports = require(\"node:process\");","module.exports = require(\"node:stream\");","module.exports = require(\"node:tty\");","module.exports = require(\"node:url\");","module.exports = require(\"node:util\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"process\");","module.exports = require(\"stream\");","module.exports = require(\"url\");","module.exports = require(\"util\");","module.exports = require(\"webpack\");","module.exports = require(\"zod\");","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","#!/usr/bin/env node\nimport { Command } from \"commander\";\nimport { compile } from \"./compiler\";\nimport { buildVercelOutput } from \"./platforms/build-vercel-output\";\nimport chalk from \"chalk\";\nimport { xmcpLogo } from \"./utils/cli-icons\";\nimport { compilerContextProvider } from \"./compiler/compiler-context\";\n\nconst program = new Command();\n\nprogram.name(\"xmcp\").description(\"The MCP framework CLI\").version(\"0.0.1\");\n\nprogram\n .command(\"dev\")\n .description(\"Start development mode\")\n .action(() => {\n console.log(`${xmcpLogo} Starting development mode...`);\n compilerContextProvider(\n {\n mode: \"development\",\n // Ignore platforms on dev mode\n platforms: {},\n },\n () => {\n compile();\n }\n );\n });\n\nprogram\n .command(\"build\")\n .description(\"Build for production\")\n .option(\"--vercel\", \"Build for Vercel deployment\")\n .action(async (options) => {\n console.log(`${xmcpLogo} Building for production...`);\n const isVercelBuild = options.vercel || process.env.VERCEL === \"1\";\n\n compilerContextProvider(\n {\n mode: \"production\",\n platforms: {\n vercel: isVercelBuild,\n },\n },\n () => {\n compile({\n onBuild: async () => {\n if (isVercelBuild) {\n console.log(`${xmcpLogo} Building for Vercel...`);\n try {\n await buildVercelOutput();\n } catch (error) {\n console.error(\n chalk.red(\"❌ Failed to create Vercel output structure:\"),\n error\n );\n }\n }\n },\n });\n }\n );\n });\n\nprogram.parse();\n"],"names":["createContext","compilerContext","name","compilerContextProvider","initialValue","callback","provider","toolPaths","Set","promptPaths","resourcePaths","hasMiddleware","getXmcpConfig","xmcpConfig","getContext","Error","DEFAULT_CORS_CONFIG","origin","methods","allowedHeaders","exposedHeaders","credentials","maxAge","DEFAULT_HTTP_CONFIG","port","host","bodySizeLimit","debug","endpoint","cors","DEFAULT_STDIO_CONFIG","DEFAULT_PATHS_CONFIG","tools","prompts","resources","DEFAULT_TEMPLATE_CONFIG","description","z","stdioTransportConfigSchema","httpTransportConfigSchema","experimentalConfigSchema","pathsConfigSchema","webpackConfigSchema","templateConfigSchema","configSchema","object","stdio","optional","http","experimental","paths","webpack","template","getResolvedHttpConfig","getResolvedCorsConfig","getResolvedPathsConfig","getResolvedOAuthConfig","getResolvedTemplateConfig","getResolvedExperimentalConfig","injectHttpVariables","httpConfig","mode","resolvedConfig","HTTP_CONFIG","JSON","stringify","stateless","injectCorsVariables","corsConfig","HTTP_CORS_CONFIG","injectOAuthVariables","userConfig","oauthConfig","OAUTH_CONFIG","injectPathsVariables","pathsConfig","TOOLS_PATH","injectStdioVariables","stdioConfig","STDIO_CONFIG","injectTemplateVariables","TEMPLATE_CONFIG","injectAdapterVariables","experimentalConfig","ADAPTER_CONFIG","adapter","oauthConfigSchema","adapterConfigSchema","enum","oauth","oauthEndpointsSchema","authorizationUrl","string","tokenUrl","revocationUrl","userInfoUrl","registerUrl","endpoints","issuerUrl","baseUrl","serviceDocumentationUrl","pathPrefix","default","defaultScopes","array","corsConfigSchema","union","boolean","number","function","args","any","returns","userPaths","resolvedPaths","getResolvedStdioConfig","userTemplate","generateEnvCode","generateImportCode","clientBundles","importToolsCode","Array","from","map","p","path","replace","relativePath","join","importPromptsCode","importResourcesCode","importMiddlewareCode","clientBundlesEntries","size","toolName","bundlePath","generateToolsExportCode","importStatements","index","toolsArray","fileName","split","pop","defaultName","generateToolsTypesCode","toolNames","toolNamesUnion","length","runtimeFolderPath","getEntries","entries","builtinModules","runtimeFiles","getExternals","replacedImports","data","request","isBuiltinModule","includes","filesToInclude","Object","keys","file","endsWith","startsWith","pathRequest","has","add","getInjectedVariables","httpVariables","corsVariables","oauthVariables","pathsVariables","stdioVariables","templateVariables","adapterVariables","DefinePlugin","ProvidePlugin","BannerPlugin","distOutputPath","adapterOutputPath","resolveTsconfigPathsToAlias","CleanWebpackPlugin","CreateTypeDefinitionPlugin","InjectRuntimePlugin","getWebpackConfig","processFolder","process","cwd","outputPath","outputFilename","config","watch","devtool","output","filename","libraryTarget","target","externals","resolve","fallback","alias","extensions","resolveLoader","modules","__dirname","plugins","module","rules","test","use","loader","options","jsc","parser","syntax","tsx","transform","react","runtime","optimization","minimize","splitChunks","watchOptions","ignored","providedPackages","INJECTED_TOOLS","INJECTED_PROMPTS","INJECTED_RESOURCES","INJECTED_MIDDLEWARE","entry","push","definedVariables","fs","require","clientBundlesPath","INJECTED_CLIENT_BUNDLES","runtimeValue","existsSync","bundles","files","readdirSync","bundleContent","readFileSync","bundleCount","console","log","cleanOnceBeforeBuildPatterns","dangerouslyAllowCleanPatternsOutsideProject","dry","banner","raw","include","RUNTIME_FILES","apply","compiler","hasRun","hooks","beforeCompile","tap","_compilationParams","fileContent","writeFileSync","nextJsTypeDefinition","expressTypeDefinition","afterEmit","typeDefinitionContent","parseJson","tsconfigPath","tsconfigContent","parsedTsconfig","parsingError","error","message","compilerOptions","aliases","forEach","item","key","value","chalk","getConfig","rootFolder","createFolder","deleteSync","dotenv","Watcher","onFirstBuild","greenCheck","telemetry","TelemetryEventName","TransportType","AdapterType","ErrorPhase","isReactFile","startHttpServer","isValidPath","pathToToolName","transpileClientComponent","compile","onBuild","startTime","Date","now","compilerStarted","setContext","webpackConfig","watcher","persistent","ignoreInitial","toolsPath","onAdd","generateCode","onUnlink","delete","onChange","changedPath","promptsPath","resourcesPath","onReady","firstBuild","err","stats","compilationTime","endTime","hasErrors","toString","colors","chunks","reactToolsCount","filter","record","eventName","BUILD_FAILED","fields","success","duration","errorPhase","WEBPACK","errorType","constructor","toolsCount","promptsCount","resourcesCount","transport","HTTP","STDIO","NONE","nodeVersion","version","xmcpVersion","flushDetached","outputSize","distPath","filePath","stat","statSync","isFile","e","BUILD_COMPLETED","timeColor","str","bold","red","yellow","buildClientBundles","reactToolPaths","toolPath","undefined","Map","reactToolPath","set","runtimeExportsCode","envFilePath","unlinkSync","toolsCode","typesCode","spawn","watchdog","inspectorArgs","inspectorProcess","shell","stdout","on","lines","line","trim","stderr","builtResults","result","createFsFromVolume","Volume","validateConfig","parse","readConfigFile","pathToConfig","configPath","configPaths","ts","json","readConfig","platforms","vercel","jsonFile","tsFile","compileConfig","memoryFs","library","type","exclude","Promise","reject","outputFileSystem","run","errors","bundledCode","exports","id","func","Function","dirname","configExport","evalError","yellowArrow","httpServerProcess","spawnHttpServer","killProcess","kill","componentPath","outputDir","absolutePath","sourceCode","dynamicRequire","eval","transformSync","importSource","bundleCode","code","mkdirSync","recursive","String","rootDir","buildVercelOutput","functionsDir","distDir","sourceFile","targetFile","copyFileSync","distContents","sourcePath","targetPath","isDirectory","cpSync","packageJsonSource","packageJsonTarget","staticDir","authUiDir","staticAuthDir","functionAuthDir","rmSync","vcConfig","handler","launcherType","shouldAddHelpers","routes","src","dest","handle","ciEnvironment","isCI","_isCI","_name","retry","postTelemetryPayload","payload","signal","AbortSignal","timeout","response","fetch","method","body","headers","responseText","text","responseData","ok","status","statusText","minTimeout","retries","factor","catch","then","createPayload","context","meta","events","randomBytes","TelemetryStorage","getAnonymousMeta","getProjectId","TelemetryTracker","anonymousId","storage","isDisabled","isEnabled","setEnabled","enabled","loadProjectId","oneWayHash","bind","_events","deferred","prom","isFulfilled","isRejected","submitRecord","reason","res","queue","isArray","projectHash","sessionId","event","timestamp","toISOString","flush","all","allEvents","_","eventsFilePath","child_process","detachedFlushPath","execPath","detached","windowsHide","unref","getStorage","getSessionId","getQueueSize","telemetryInstance","getTelemetry","isDockerFunction","isWslBoolean","os","traits","cpus","systemPlatform","platform","systemRelease","release","systemArchitecture","arch","cpuCount","cpuModel","model","cpuSpeed","speed","memoryInMb","Math","trunc","totalmem","pow","isDocker","isWsl","ciName","getRawProjectId","packageJsonPath","packageJson","identifier","rawId","createHash","TELEMETRY_KEY_ENABLED","TELEMETRY_KEY_NOTIFY_DATE","TELEMETRY_KEY_ID","TELEMETRY_KEY_SALT","getConfigPath","isEphemeral","configDir","homedir","ensureConfig","dir","get","defaultValue","val","notify","generated","salt","XMCP_TELEMETRY_DISABLED","hash","update","digest","clear","configFilePath","env","green","xmcpLogo","black","bgWhite","runtimeFolder","AsyncLocalStorage","setGlobalContext","globalThis","getGlobalContext","storageKey","Symbol","for","store","getStore","assign","chokidar","subscribable","chokidarOptions","instance","globalOptions","watcherInstance","isReady","watchers","checkReady","onReadySubscribable","addCallback","every","runCallbacks","clearCallbacks","json5","folderPath","pathStr","isNonEmptyString","isGlob","normalizePath","resolveAndCheckExists","normalized","absPath","exitError","exit","watchdogCode","child","dogExited","dog","pid","callbacks","_id","crypto","randomUUID","removeCallback","find","k","getCallbacks","values","getCallback","params","getCallbackIds","Command","program","command","action","option","isVercelBuild","VERCEL"],"sourceRoot":""}
|