@expo/repack-app 0.1.15 → 0.2.0

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.js +1 -1
  3. package/package.json +2 -2
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-present 650 Industries, Inc. (aka Expo)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ ${i}`),Object.assign(m,v),c(m)}else n(v)},z=K=>{_?r.removeListener("exit",w):r.r
14
14
  `,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});pe.entityMap=pe.HTML_ENTITIES});var Q_=V(qr=>{var Fe=ke().NAMESPACE,vr=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Y_=new RegExp("[\\-\\.0-9"+vr.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Z_=new RegExp("^"+vr.source+Y_.source+"*(?::"+vr.source+Y_.source+"*)?$"),Ce=0,ct=1,Lt=2,Ne=3,Tt=4,Ut=5,Se=6,oi=7;function Qt(t,o){this.message=t,this.locator=o,Error.captureStackTrace&&Error.captureStackTrace(this,Qt)}Qt.prototype=new Error;Qt.prototype.name=Qt.name;function L_(){}L_.prototype={parse:function(t,o,e){var s=this.domBuilder;s.startDocument(),T_(o,o={}),Rg(t,o,e,s,this.errorHandler),s.endDocument()}};function Rg(t,o,e,s,i){function r(M){if(M>65535){M-=65536;var X=55296+(M>>10),Z=56320+(M&1023);return String.fromCharCode(X,Z)}else return String.fromCharCode(M)}function a(M){var X=M.slice(1,-1);return Object.hasOwnProperty.call(e,X)?e[X]:X.charAt(0)==="#"?r(parseInt(X.substr(1).replace("x","0x"))):(i.error("entity not found:"+M),M)}function n(M){if(M>K){var X=t.substring(K,M).replace(/&#?\w+;/g,a);O&&c(K),s.characters(X,0,M-K),K=M}}function c(M,X){for(;M>=d&&(X=g.exec(t));)_=X.index,d=_+X[0].length,O.lineNumber++;O.columnNumber=M-_+1}for(var _=0,d=0,g=/.*(?:\r\n?|\n)|.*$/g,O=s.locator,w=[{currentNSMap:o}],z={},K=0;;){try{var q=t.indexOf("<",K);if(q<0){if(!t.substr(K).match(/^\s*$/)){var v=s.doc,p=v.createTextNode(t.substr(K));v.appendChild(p),s.currentElement=p}return}switch(q>K&&n(q),t.charAt(q+1)){case"/":var b=t.indexOf(">",q+3),m=t.substring(q+2,b).replace(/[ \t\n\r]+$/g,""),l=w.pop();b<0?(m=t.substring(q+2).replace(/[\s<].*/,""),i.error("end tag name: "+m+" is not complete:"+l.tagName),b=q+1+m.length):m.match(/\s</)&&(m=m.replace(/[\s<].*/,""),i.error("end tag name: "+m+" maybe not complete"),b=q+1+m.length);var x=l.localNSMap,u=l.tagName==m,G=u||l.tagName&&l.tagName.toLowerCase()==m.toLowerCase();if(G){if(s.endElement(l.uri,l.localName,m),x)for(var y in x)Object.prototype.hasOwnProperty.call(x,y)&&s.endPrefixMapping(y);u||i.fatalError("end tag name: "+m+" is not match the current start tagName:"+l.tagName)}else w.push(l);b++;break;case"?":O&&c(q),b=Hg(t,q,s);break;case"!":O&&c(q),b=$g(t,q,s,i);break;default:O&&c(q);var h=new U_,f=w[w.length-1].currentNSMap,b=Jg(t,q,h,f,a,i),N=h.length;if(!h.closed&&Dg(t,b,h.tagName,z)&&(h.closed=!0,e.nbsp||i.warning("unclosed xml attribute")),O&&N){for(var S=I_(O,{}),E=0;E<N;E++){var Y=h[E];c(Y.offset),Y.locator=I_(O,{})}s.locator=S,P_(h,s,f)&&w.push(h),s.locator=O}else P_(h,s,f)&&w.push(h);Fe.isHTML(h.uri)&&!h.closed?b=Bg(t,b,h.tagName,a,s):b++}}catch(M){if(M instanceof Qt)throw M;i.error("element parse error: "+M),b=-1}b>K?K=b:n(Math.max(q,K)+1)}}function I_(t,o){return o.lineNumber=t.lineNumber,o.columnNumber=t.columnNumber,o}function Jg(t,o,e,s,i,r){function a(w,z,K){e.attributeNames.hasOwnProperty(w)&&r.fatalError("Attribute "+w+" redefined"),e.addValue(w,z.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,i),K)}for(var n,c,_=++o,d=Ce;;){var g=t.charAt(_);switch(g){case"=":if(d===ct)n=t.slice(o,_),d=Ne;else if(d===Lt)d=Ne;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(d===Ne||d===ct)if(d===ct&&(r.warning('attribute value must after "="'),n=t.slice(o,_)),o=_+1,_=t.indexOf(g,o),_>0)c=t.slice(o,_),a(n,c,o-1),d=Ut;else throw new Error("attribute value no end '"+g+"' match");else if(d==Tt)c=t.slice(o,_),a(n,c,o),r.warning('attribute "'+n+'" missed start quot('+g+")!!"),o=_+1,d=Ut;else throw new Error('attribute value must after "="');break;case"/":switch(d){case Ce:e.setTagName(t.slice(o,_));case Ut:case Se:case oi:d=oi,e.closed=!0;case Tt:case ct:break;case Lt:e.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return r.error("unexpected end of input"),d==Ce&&e.setTagName(t.slice(o,_)),_;case">":switch(d){case Ce:e.setTagName(t.slice(o,_));case Ut:case Se:case oi:break;case Tt:case ct:c=t.slice(o,_),c.slice(-1)==="/"&&(e.closed=!0,c=c.slice(0,-1));case Lt:d===Lt&&(c=n),d==Tt?(r.warning('attribute "'+c+'" missed quot(")!'),a(n,c,o)):((!Fe.isHTML(s[""])||!c.match(/^(?:disabled|checked|selected)$/i))&&r.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),a(c,c,o));break;case Ne:throw new Error("attribute value missed!!")}return _;case"\x80":g=" ";default:if(g<=" ")switch(d){case Ce:e.setTagName(t.slice(o,_)),d=Se;break;case ct:n=t.slice(o,_),d=Lt;break;case Tt:var c=t.slice(o,_);r.warning('attribute "'+c+'" missed quot(")!!'),a(n,c,o);case Ut:d=Se;break}else switch(d){case Lt:var O=e.tagName;(!Fe.isHTML(s[""])||!n.match(/^(?:disabled|checked|selected)$/i))&&r.warning('attribute "'+n+'" missed value!! "'+n+'" instead2!!'),a(n,n,o),o=_,d=ct;break;case Ut:r.warning('attribute space is required"'+n+'"!!');case Se:d=ct,o=_;break;case Ne:d=Tt,o=_;break;case oi:throw new Error("elements closed character '/' and '>' must be connected to")}}_++}}function P_(t,o,e){for(var s=t.tagName,i=null,g=t.length;g--;){var r=t[g],a=r.qName,n=r.value,O=a.indexOf(":");if(O>0)var c=r.prefix=a.slice(0,O),_=a.slice(O+1),d=c==="xmlns"&&_;else _=a,c=null,d=a==="xmlns"&&"";r.localName=_,d!==!1&&(i==null&&(i={},T_(e,e={})),e[d]=i[d]=n,r.uri=Fe.XMLNS,o.startPrefixMapping(d,n))}for(var g=t.length;g--;){r=t[g];var c=r.prefix;c&&(c==="xml"&&(r.uri=Fe.XML),c!=="xmlns"&&(r.uri=e[c||""]))}var O=s.indexOf(":");O>0?(c=t.prefix=s.slice(0,O),_=t.localName=s.slice(O+1)):(c=null,_=t.localName=s);var w=t.uri=e[c||""];if(o.startElement(w,_,s,t),t.closed){if(o.endElement(w,_,s),i)for(c in i)Object.prototype.hasOwnProperty.call(i,c)&&o.endPrefixMapping(c)}else return t.currentNSMap=e,t.localNSMap=i,!0}function Bg(t,o,e,s,i){if(/^(?:script|textarea)$/i.test(e)){var r=t.indexOf("</"+e+">",o),a=t.substring(o+1,r);if(/[&<]/.test(a))return/^script$/i.test(e)?(i.characters(a,0,a.length),r):(a=a.replace(/&#?\w+;/g,s),i.characters(a,0,a.length),r)}return o+1}function Dg(t,o,e,s){var i=s[e];return i==null&&(i=t.lastIndexOf("</"+e+">"),i<o&&(i=t.lastIndexOf("</"+e)),s[e]=i),i<o}function T_(t,o){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(o[e]=t[e])}function $g(t,o,e,s){var i=t.charAt(o+2);switch(i){case"-":if(t.charAt(o+3)==="-"){var r=t.indexOf("-->",o+4);return r>o?(e.comment(t,o+4,r-o-4),r+3):(s.error("Unclosed comment"),-1)}else return-1;default:if(t.substr(o+3,6)=="CDATA["){var r=t.indexOf("]]>",o+9);return e.startCDATA(),e.characters(t,o+9,r-o-9),e.endCDATA(),r+3}var a=oO(t,o),n=a.length;if(n>1&&/!doctype/i.test(a[0][0])){var c=a[1][0],_=!1,d=!1;n>3&&(/^public$/i.test(a[2][0])?(_=a[3][0],d=n>4&&a[4][0]):/^system$/i.test(a[2][0])&&(d=a[3][0]));var g=a[n-1];return e.startDTD(c,_,d),e.endDTD(),g.index+g[0].length}}return-1}function Hg(t,o,e){var s=t.indexOf("?>",o);if(s){var i=t.substring(o,s).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){var r=i[0].length;return e.processingInstruction(i[1],i[2]),s+2}else return-1}return-1}function U_(){this.attributeNames={}}U_.prototype={setTagName:function(t){if(!Z_.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,o,e){if(!Z_.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:o,offset:e}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}};function oO(t,o){var e,s=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(i.lastIndex=o,i.exec(t);e=i.exec(t);)if(s.push(e),e[1])return s}qr.XMLReader=L_;qr.ParseError=Qt});var $_=V(ei=>{var tO=ke(),eO=br(),A_=X_(),J_=Q_(),sO=eO.DOMImplementation,j_=tO.NAMESPACE,iO=J_.ParseError,rO=J_.XMLReader;function B_(t){return t.replace(/\r[\n\u0085]/g,`
15
15
  `).replace(/[\r\u0085\u2028]/g,`
16
16
  `)}function D_(t){this.options=t||{locator:{}}}D_.prototype.parseFromString=function(t,o){var e=this.options,s=new rO,i=e.domBuilder||new Me,r=e.errorHandler,a=e.locator,n=e.xmlns||{},c=/\/x?html?$/.test(o),_=c?A_.HTML_ENTITIES:A_.XML_ENTITIES;a&&i.setDocumentLocator(a),s.errorHandler=aO(r,i,a),s.domBuilder=e.domBuilder||i,c&&(n[""]=j_.HTML),n.xml=n.xml||j_.XML;var d=e.normalizeLineEndings||B_;return t&&typeof t=="string"?s.parse(d(t),n,_):s.errorHandler.error("invalid doc source"),i.doc};function aO(t,o,e){if(!t){if(o instanceof Me)return o;t=o}var s={},i=t instanceof Function;e=e||{};function r(a){var n=t[a];!n&&i&&(n=t.length==2?function(c){t(a,c)}:t),s[a]=n&&function(c){n("[xmldom "+a+"] "+c+pr(e))}||function(){}}return r("warning"),r("error"),r("fatalError"),s}function Me(){this.cdata=!1}function At(t,o){o.lineNumber=t.lineNumber,o.columnNumber=t.columnNumber}Me.prototype={startDocument:function(){this.doc=new sO().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,o,e,s){var i=this.doc,r=i.createElementNS(t,e||o),a=s.length;ti(this,r),this.currentElement=r,this.locator&&At(this.locator,r);for(var n=0;n<a;n++){var t=s.getURI(n),c=s.getValue(n),e=s.getQName(n),_=i.createAttributeNS(t,e);this.locator&&At(s.getLocator(n),_),_.value=_.nodeValue=c,r.setAttributeNode(_)}},endElement:function(t,o,e){var s=this.currentElement,i=s.tagName;this.currentElement=s.parentNode},startPrefixMapping:function(t,o){},endPrefixMapping:function(t){},processingInstruction:function(t,o){var e=this.doc.createProcessingInstruction(t,o);this.locator&&At(this.locator,e),ti(this,e)},ignorableWhitespace:function(t,o,e){},characters:function(t,o,e){if(t=R_.apply(this,arguments),t){if(this.cdata)var s=this.doc.createCDATASection(t);else var s=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(s):/^\s*$/.test(t)&&this.doc.appendChild(s),this.locator&&At(this.locator,s)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,o,e){t=R_.apply(this,arguments);var s=this.doc.createComment(t);this.locator&&At(this.locator,s),ti(this,s)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,o,e){var s=this.doc.implementation;if(s&&s.createDocumentType){var i=s.createDocumentType(t,o,e);this.locator&&At(this.locator,i),ti(this,i),this.doc.doctype=i}},warning:function(t){console.warn("[xmldom warning] "+t,pr(this.locator))},error:function(t){console.error("[xmldom error] "+t,pr(this.locator))},fatalError:function(t){throw new iO(t,this.locator)}};function pr(t){if(t)return`
17
- @`+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function R_(t,o,e){return typeof t=="string"?t.substr(o,e):t.length>=o+e||o?new java.lang.String(t,o,e)+"":t}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){Me.prototype[t]=function(){return null}});function ti(t,o){t.currentElement?t.currentElement.appendChild(o):t.doc.appendChild(o)}ei.__DOMHandler=Me;ei.normalizeLineEndings=B_;ei.DOMParser=D_});var ox=V(si=>{var H_=br();si.DOMImplementation=H_.DOMImplementation;si.XMLSerializer=H_.XMLSerializer;si.DOMParser=$_().DOMParser});var ex=V(Ve=>{"use strict";var nO=Ve&&Ve.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.parse=uO;var cO=ox(),jt=nO(require("assert")),ii=3,tx=4,lO=8;function Cr(t){return t.nodeType===ii||t.nodeType===lO||t.nodeType===tx}function Bo(t){return!t.childNodes||t.childNodes.length===0}function uO(t){let o=new cO.DOMParser({errorHandler(){}}).parseFromString(t);(0,jt.default)(o.documentElement.nodeName==="plist","malformed document. First element should be <plist>");let e=Rt(o.documentElement);return e.length===1&&(e=e[0]),e}function Rt(t){let o,e,s,i,r,a;if(!t)return null;if(t.nodeName==="plist"){if(i=[],Bo(t))return i;for(o=0;o<t.childNodes.length;o++)Cr(t.childNodes[o])||i.push(Rt(t.childNodes[o]));return i}else if(t.nodeName==="dict"){if(e={},s=null,a=0,Bo(t))return e;for(o=0;o<t.childNodes.length;o++)Cr(t.childNodes[o])||(a%2===0?((0,jt.default)(t.childNodes[o].nodeName==="key","Missing key while parsing <dict/>."),s=Rt(t.childNodes[o])):((0,jt.default)(t.childNodes[o].nodeName!=="key",'Unexpected key "'+Rt(t.childNodes[o])+'" while parsing <dict/>.'),e[s]=Rt(t.childNodes[o])),a+=1);if(a%2===1)throw new Error('Missing value for "'+s+'" while parsing <dict/>');return e}else if(t.nodeName==="array"){if(i=[],Bo(t))return i;for(o=0;o<t.childNodes.length;o++)Cr(t.childNodes[o])||(r=Rt(t.childNodes[o]),r!=null&&i.push(r));return i}else if(t.nodeName!=="#text"){if(t.nodeName==="key")return Bo(t)?"":t.childNodes[0].nodeValue;if(t.nodeName==="string"){if(r="",Bo(t))return r;for(o=0;o<t.childNodes.length;o++){let n=t.childNodes[o].nodeType;(n===ii||n===tx)&&(r+=t.childNodes[o].nodeValue)}return r}else{if(t.nodeName==="integer")return(0,jt.default)(!Bo(t),'Cannot parse "" as integer.'),parseInt(t.childNodes[0].nodeValue,10);if(t.nodeName==="real"){for((0,jt.default)(!Bo(t),'Cannot parse "" as real.'),r="",o=0;o<t.childNodes.length;o++)t.childNodes[o].nodeType===ii&&(r+=t.childNodes[o].nodeValue);return parseFloat(r)}else if(t.nodeName==="data"){if(r="",Bo(t))return Buffer.from(r,"base64");for(o=0;o<t.childNodes.length;o++)t.childNodes[o].nodeType===ii&&(r+=t.childNodes[o].nodeValue.replace(/\s+/g,""));return Buffer.from(r,"base64")}else{if(t.nodeName==="date")return(0,jt.default)(!Bo(t),'Cannot parse "" as Date.'),new Date(t.childNodes[0].nodeValue);if(t.nodeName==="true")return!0;if(t.nodeName==="false")return!1}}}}});var sx=V(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});var _O=a_(),xO=ex();Nr.default={parse:xO.parse,build:_O.build}});var gO={};wx(gO,{ConsoleLogger:()=>oe,repackAppAndroidAsync:()=>vc,repackAppIosAsync:()=>lx});module.exports=dx(gO);var Zi=I(require("node:assert")),xt=I(require("node:fs/promises")),Uo=I(require("node:path")),bc=I(ui());var Co=I(require("fs/promises")),$t=I(require("node:assert")),ko=I(require("node:path")),ts=I(zi());var cn="./apktool.jar";var ln=ko.default.resolve(__dirname,cn);async function un(t,o){let{spawnAsync:e,workingDirectory:s}=o,i="decoded-apk";return await e("java",["-jar",ln,"decode",t,"-s","-o",i],{cwd:s}),ko.default.join(s,i)}async function _n(t,o){let{spawnAsync:e,workingDirectory:s}=o,r=ko.default.resolve(s,"apktool-packed.apk");return await e("java",["-jar",ln,"build","-o",r,"--use-aapt2",t]),r}async function xn({decodedApkRoot:t,assetRoot:o,bundleOutputPath:e}){await Co.default.copyFile(e,ko.default.join(t,"assets","index.android.bundle"));let s=await gn(o,ko.default.join(t,"res"));await Kx(t,s)}async function mn(t,o){let e=ko.default.join(t,"apktool.yml"),s=await Co.default.readFile(e,"utf8");s=s.replace(/^(\s+renameManifestPackage:\s+)(.+)$/gm,`$1${o}`),await Co.default.writeFile(e,s)}async function Kx(t,o){let e=ko.default.join(t,"res/values/public.xml"),s=await Co.default.readFile(e,"utf8"),i=new ts.Parser,r=new Set,a=await i.parseStringPromise(s),n=0,c=0,_=0;for(let K of a.resources.public){let q=parseInt(K.$.id,16);K.$.type==="drawable"?(n=Math.max(n,q),r.add(K.$.name)):K.$.type==="raw"&&(c=Math.max(c,q),r.add(K.$.name)),_=Math.max(_,q)}(0,$t.default)(n!==0,"Drawable resources must be defined."),c===0&&(c=(_&4294901760)+65536);let d=(n&4294901760)+65536,g=(c&4294901760)+65536,O=new Set([...o.keys()].filter(K=>!r.has(K)));for(let K of O){let q=o.get(K);q!=null&&(q.type==="drawable"?(n+=1,(0,$t.default)(n<d,"Drawable resource ID boundary exceeded."),a.resources.public.push({$:{type:"drawable",name:q.name,id:`0x${n.toString(16)}`}})):q.type==="raw"&&(c+=1,(0,$t.default)(c<g,"Raw resource ID boundary exceeded."),a.resources.public.push({$:{type:"raw",name:q.name,id:`0x${c.toString(16)}`}})))}let z=new ts.Builder().buildObject(a);await Co.default.writeFile(e,z)}function kx(t){if(t.startsWith("drawable"))return"drawable";if(t==="raw")return"raw";throw new Error(`Unsupported asset type for ${t}`)}async function gn(t,o,e=0,s=2,i=void 0,r=new Map){await Co.default.mkdir(o,{recursive:!0});let a=await Co.default.readdir(t,{withFileTypes:!0});return await Promise.all(a.map(async n=>{let c=ko.default.join(t,n.name),_=ko.default.join(o,n.name);if(n.isDirectory()){let d=i??kx(n.name);e<s-1?await gn(c,_,e+1,s,d,r):await Co.default.mkdir(_,{recursive:!0})}else{await Co.default.copyFile(c,_);let{name:d}=ko.default.parse(n.name);(0,$t.default)(i,"Asset type must be defined."),r.set(d,{name:d,type:i})}})),r}var ki=I(require("node:assert")),On=I(require("node:fs/promises")),Lo=I(require("node:path")),Ki=null;async function wn(t){if(Ki==null){let o=t?.androidBuildToolsDir??await Gx(t);(0,ki.default)(o!=null,"Unable to find the Android build-tools directory."),Ki={aapt2Path:Lo.default.join(o,"aapt2"),apksignerPath:Lo.default.join(o,"apksigner"),dexdumpPath:Lo.default.join(o,"dexdump"),zipalignPath:Lo.default.join(o,"zipalign")}}return Ki}async function dn(t,o,e){let{spawnAsync:s,workingDirectory:i}=o,{apksignerPath:r,zipalignPath:a}=await wn(o),n=Lo.default.join(i,"resigned.apk"),c=Lo.default.resolve(i,"resigned-unaligned.apk");await s("zip",["-r","-0",c,"lib","resources.arsc"],{cwd:t}),await s("zip",["-r",c,".","-x","lib/*","-x","resources.arsc"],{cwd:t}),await s(a,["-v","-p","4",c,n]);let _=["sign","--ks",e.keyStorePath,"--ks-pass",e.keyStorePassword];return e.keyAlias&&_.push("--ks-key-alias",e.keyAlias),e.keyPassword&&_.push("--key-pass",e.keyPassword),_.push(n),await s(r,_),n}async function Gx(t){let{logger:o}=t,e=process.env.ANDROID_SDK_ROOT;(0,ki.default)(e!=null,"ANDROID_SDK_ROOT environment variable is not set");let s=Lo.default.join(e,"build-tools");try{let r=(await On.default.readdir(s,{withFileTypes:!0})).filter(a=>a.isDirectory()).map(a=>a.name).sort((a,n)=>{let c=a.split(".").map(Number),_=n.split(".").map(Number);for(let d=0;d<Math.min(c.length,_.length);d++)if(c[d]!==_[d])return _[d]-c[d];return _.length-c.length});return r.length>0?Lo.default.join(s,r[0]):(o.error("No build-tools directories found."),null)}catch(i){return o.error(`Failed to read the build-tools directory: ${i}`),null}}async function yn(t,o,e){let{logger:s,spawnAsync:i}=e,{dexdumpPath:r}=await wn(e),a=`"^ Class descriptor : 'L${o.replace(/\./g,"/")}\\/"`;try{let{stdout:n}=await i(r,["classes*.dex","|","grep",a],{cwd:t,shell:!0,stdio:"pipe"}),c=n.split(`
17
+ @`+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function R_(t,o,e){return typeof t=="string"?t.substr(o,e):t.length>=o+e||o?new java.lang.String(t,o,e)+"":t}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){Me.prototype[t]=function(){return null}});function ti(t,o){t.currentElement?t.currentElement.appendChild(o):t.doc.appendChild(o)}ei.__DOMHandler=Me;ei.normalizeLineEndings=B_;ei.DOMParser=D_});var ox=V(si=>{var H_=br();si.DOMImplementation=H_.DOMImplementation;si.XMLSerializer=H_.XMLSerializer;si.DOMParser=$_().DOMParser});var ex=V(Ve=>{"use strict";var nO=Ve&&Ve.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ve,"__esModule",{value:!0});Ve.parse=uO;var cO=ox(),jt=nO(require("assert")),ii=3,tx=4,lO=8;function Cr(t){return t.nodeType===ii||t.nodeType===lO||t.nodeType===tx}function Bo(t){return!t.childNodes||t.childNodes.length===0}function uO(t){let o=new cO.DOMParser({errorHandler(){}}).parseFromString(t);(0,jt.default)(o.documentElement.nodeName==="plist","malformed document. First element should be <plist>");let e=Rt(o.documentElement);return e.length===1&&(e=e[0]),e}function Rt(t){let o,e,s,i,r,a;if(!t)return null;if(t.nodeName==="plist"){if(i=[],Bo(t))return i;for(o=0;o<t.childNodes.length;o++)Cr(t.childNodes[o])||i.push(Rt(t.childNodes[o]));return i}else if(t.nodeName==="dict"){if(e={},s=null,a=0,Bo(t))return e;for(o=0;o<t.childNodes.length;o++)Cr(t.childNodes[o])||(a%2===0?((0,jt.default)(t.childNodes[o].nodeName==="key","Missing key while parsing <dict/>."),s=Rt(t.childNodes[o])):((0,jt.default)(t.childNodes[o].nodeName!=="key",'Unexpected key "'+Rt(t.childNodes[o])+'" while parsing <dict/>.'),e[s]=Rt(t.childNodes[o])),a+=1);if(a%2===1)throw new Error('Missing value for "'+s+'" while parsing <dict/>');return e}else if(t.nodeName==="array"){if(i=[],Bo(t))return i;for(o=0;o<t.childNodes.length;o++)Cr(t.childNodes[o])||(r=Rt(t.childNodes[o]),r!=null&&i.push(r));return i}else if(t.nodeName!=="#text"){if(t.nodeName==="key")return Bo(t)?"":t.childNodes[0].nodeValue;if(t.nodeName==="string"){if(r="",Bo(t))return r;for(o=0;o<t.childNodes.length;o++){let n=t.childNodes[o].nodeType;(n===ii||n===tx)&&(r+=t.childNodes[o].nodeValue)}return r}else{if(t.nodeName==="integer")return(0,jt.default)(!Bo(t),'Cannot parse "" as integer.'),parseInt(t.childNodes[0].nodeValue,10);if(t.nodeName==="real"){for((0,jt.default)(!Bo(t),'Cannot parse "" as real.'),r="",o=0;o<t.childNodes.length;o++)t.childNodes[o].nodeType===ii&&(r+=t.childNodes[o].nodeValue);return parseFloat(r)}else if(t.nodeName==="data"){if(r="",Bo(t))return Buffer.from(r,"base64");for(o=0;o<t.childNodes.length;o++)t.childNodes[o].nodeType===ii&&(r+=t.childNodes[o].nodeValue.replace(/\s+/g,""));return Buffer.from(r,"base64")}else{if(t.nodeName==="date")return(0,jt.default)(!Bo(t),'Cannot parse "" as Date.'),new Date(t.childNodes[0].nodeValue);if(t.nodeName==="true")return!0;if(t.nodeName==="false")return!1}}}}});var sx=V(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});var _O=a_(),xO=ex();Nr.default={parse:xO.parse,build:_O.build}});var gO={};wx(gO,{ConsoleLogger:()=>oe,repackAppAndroidAsync:()=>vc,repackAppIosAsync:()=>lx});module.exports=dx(gO);var Zi=I(require("node:assert")),xt=I(require("node:fs/promises")),Uo=I(require("node:path")),bc=I(ui());var Co=I(require("fs/promises")),$t=I(require("node:assert")),ko=I(require("node:path")),ts=I(zi());var cn="./apktool.jar";var ln=ko.default.resolve(__dirname,cn);async function un(t,o){let{spawnAsync:e,workingDirectory:s}=o,i="decoded-apk";return await e("java",["-jar",ln,"decode",t,"-s","-o",i],{cwd:s}),ko.default.join(s,i)}async function _n(t,o){let{spawnAsync:e,workingDirectory:s}=o,r=ko.default.resolve(s,"apktool-packed.apk");return await e("java",["-jar",ln,"build","-o",r,t]),r}async function xn({decodedApkRoot:t,assetRoot:o,bundleOutputPath:e}){await Co.default.copyFile(e,ko.default.join(t,"assets","index.android.bundle"));let s=await gn(o,ko.default.join(t,"res"));await Kx(t,s)}async function mn(t,o){let e=ko.default.join(t,"apktool.yml"),s=await Co.default.readFile(e,"utf8");s=s.replace(/^(\s+renameManifestPackage:\s+)(.+)$/gm,`$1${o}`),await Co.default.writeFile(e,s)}async function Kx(t,o){let e=ko.default.join(t,"res/values/public.xml"),s=await Co.default.readFile(e,"utf8"),i=new ts.Parser,r=new Set,a=await i.parseStringPromise(s),n=0,c=0,_=0;for(let K of a.resources.public){let q=parseInt(K.$.id,16);K.$.type==="drawable"?(n=Math.max(n,q),r.add(K.$.name)):K.$.type==="raw"&&(c=Math.max(c,q),r.add(K.$.name)),_=Math.max(_,q)}(0,$t.default)(n!==0,"Drawable resources must be defined."),c===0&&(c=(_&4294901760)+65536);let d=(n&4294901760)+65536,g=(c&4294901760)+65536,O=new Set([...o.keys()].filter(K=>!r.has(K)));for(let K of O){let q=o.get(K);q!=null&&(q.type==="drawable"?(n+=1,(0,$t.default)(n<d,"Drawable resource ID boundary exceeded."),a.resources.public.push({$:{type:"drawable",name:q.name,id:`0x${n.toString(16)}`}})):q.type==="raw"&&(c+=1,(0,$t.default)(c<g,"Raw resource ID boundary exceeded."),a.resources.public.push({$:{type:"raw",name:q.name,id:`0x${c.toString(16)}`}})))}let z=new ts.Builder().buildObject(a);await Co.default.writeFile(e,z)}function kx(t){if(t.startsWith("drawable"))return"drawable";if(t==="raw")return"raw";throw new Error(`Unsupported asset type for ${t}`)}async function gn(t,o,e=0,s=2,i=void 0,r=new Map){await Co.default.mkdir(o,{recursive:!0});let a=await Co.default.readdir(t,{withFileTypes:!0});return await Promise.all(a.map(async n=>{let c=ko.default.join(t,n.name),_=ko.default.join(o,n.name);if(n.isDirectory()){let d=i??kx(n.name);e<s-1?await gn(c,_,e+1,s,d,r):await Co.default.mkdir(_,{recursive:!0})}else{await Co.default.copyFile(c,_);let{name:d}=ko.default.parse(n.name);(0,$t.default)(i,"Asset type must be defined."),r.set(d,{name:d,type:i})}})),r}var ki=I(require("node:assert")),On=I(require("node:fs/promises")),Lo=I(require("node:path")),Ki=null;async function wn(t){if(Ki==null){let o=t?.androidBuildToolsDir??await Gx(t);(0,ki.default)(o!=null,"Unable to find the Android build-tools directory."),Ki={aapt2Path:Lo.default.join(o,"aapt2"),apksignerPath:Lo.default.join(o,"apksigner"),dexdumpPath:Lo.default.join(o,"dexdump"),zipalignPath:Lo.default.join(o,"zipalign")}}return Ki}async function dn(t,o,e){let{spawnAsync:s,workingDirectory:i}=o,{apksignerPath:r,zipalignPath:a}=await wn(o),n=Lo.default.join(i,"resigned.apk"),c=Lo.default.resolve(i,"resigned-unaligned.apk");await s("zip",["-r","-0",c,"lib","resources.arsc"],{cwd:t}),await s("zip",["-r",c,".","-x","lib/*","-x","resources.arsc"],{cwd:t}),await s(a,["-v","-p","4",c,n]);let _=["sign","--ks",e.keyStorePath,"--ks-pass",e.keyStorePassword];return e.keyAlias&&_.push("--ks-key-alias",e.keyAlias),e.keyPassword&&_.push("--key-pass",e.keyPassword),_.push(n),await s(r,_),n}async function Gx(t){let{logger:o}=t,e=process.env.ANDROID_SDK_ROOT;(0,ki.default)(e!=null,"ANDROID_SDK_ROOT environment variable is not set");let s=Lo.default.join(e,"build-tools");try{let r=(await On.default.readdir(s,{withFileTypes:!0})).filter(a=>a.isDirectory()).map(a=>a.name).sort((a,n)=>{let c=a.split(".").map(Number),_=n.split(".").map(Number);for(let d=0;d<Math.min(c.length,_.length);d++)if(c[d]!==_[d])return _[d]-c[d];return _.length-c.length});return r.length>0?Lo.default.join(s,r[0]):(o.error("No build-tools directories found."),null)}catch(i){return o.error(`Failed to read the build-tools directory: ${i}`),null}}async function yn(t,o,e){let{logger:s,spawnAsync:i}=e,{dexdumpPath:r}=await wn(e),a=`"^ Class descriptor : 'L${o.replace(/\./g,"/")}\\/"`;try{let{stdout:n}=await i(r,["classes*.dex","|","grep",a],{cwd:t,shell:!0,stdio:"pipe"}),c=n.split(`
18
18
  `).map(_=>_.match(/Class descriptor\s+?:\s+?'L(.+);'/)?.[1].replace(/\//g,".")).filter(Boolean);return new Set(c)}catch(n){return s.info(`Failed to search for classes in the APK - grepAppIdPattern[${o}]: ${n}`),null}}var _t=I(require("node:assert")),se=I(require("node:fs/promises")),mc=I(require("node:path")),is=I(zi());var _c=I(cc()),xc=I(require("node:assert")),kt=I(require("node:fs/promises")),Ht=I(require("node:path"));async function ss(t){return(await kt.default.stat(t).catch(()=>null))?.isDirectory()??!1}function te(t){return(0,xc.default)(t!=null,"Expected value to be non-null"),t}async function ee(t){let o=t.platform==="android"?".apk":".ipa";return{...t,workingDirectory:t.workingDirectory??await kt.default.mkdtemp(Ht.default.join(uc(),"repack-app-")),outputPath:t.outputPath??Ht.default.join(t.projectRoot,`repacked${o}`),logger:t.logger??new oe,spawnAsync:t.spawnAsync??em(!!t.verbose)}}var oe=class{debug(...o){console.debug(...o)}info(...o){console.log(...o)}warn(...o){console.warn(...o)}error(...o){console.error(...o)}time(o){console.time(o)}timeEnd(o){console.timeEnd(o)}};function em(t){return function(e,s,i){return(0,_c.default)(e,s,{stdio:t?"inherit":"pipe",...i})}}async function Gt(t,o){await kt.default.mkdir(o,{recursive:!0});let e=await kt.default.readdir(t,{withFileTypes:!0});for(let s of e){let i=Ht.default.join(t,s.name),r=Ht.default.join(o,s.name);s.isDirectory()?await Gt(i,r):s.isFile()&&await kt.default.copyFile(i,r)}}async function gc({config:t,decodedApkRoot:o}){let e=mc.default.join(o,"res","values","strings.xml"),s=await se.default.readFile(e,"utf8");s=s.replace(/(<string name="app_name">)(.+)(<\/string>)/,`$1${t.name}$3`),await se.default.writeFile(e,s)}async function Oc({config:t,androidManiestXml:o,dexClasses:e,originalAppId:s,originalAppIdFallback:i,updatesRuntimeVersion:r}){let a=te(t.android?.package);o.manifest.$.package=a,Ei(o,d=>d.startsWith(s)&&!e.has(d)?d.replace(s,a):d);let n=Vi("manifest",o.manifest,(d,g)=>d==="intent-filter"&&Vi(d,g,(O,w)=>O==="action"&&w[0].$?.["android:name"]==="android.intent.action.VIEW").length>0),c=Array.isArray(t.scheme)?t.scheme[0]:t.scheme;for(let d of n)Ei(d,g=>{let O=g.replace(s,a).replace(/^exp\+.+$/g,`exp+${te(t.slug)}`);return c&&(O=O.replace(/^myapp$/g,c)),i!=null&&(O=O.replace(i,a)),O});let _=o.manifest.application[0];(0,_t.default)(_.$?.["android:name"]?.endsWith(".MainApplication"),"Expected application node to be named as MainApplication"),r&&sm(_,t,r)}async function wc(t){let o=await se.default.readFile(t,"utf8");return await new is.Parser().parseStringPromise(o)}async function dc(t,o){let s=new is.Builder().buildObject(t);await se.default.writeFile(o,s)}function yc(t){let o=t.manifest.$.package;return(0,_t.default)(o!=null,"Expected package attribute to be present in AndroidManifest.xml"),o}function hc(t,o){let e=t.manifest.application?.[0]?.$?.["android:name"];if(e){let s=e.replace(/\.[^.]+$/,"");if(s!==e&&s!==o)return s}return null}function sm(t,o,e){let s=t["meta-data"]??[],i=s.find(c=>c.$?.["android:name"]==="expo.modules.updates.ENABLED");i!=null?((0,_t.default)(i.$!=null),i.$["android:value"]="true"):s.push({$:{"android:name":"expo.modules.updates.ENABLED","android:value":"true"}});let r=s.find(c=>c.$?.["android:name"]==="expo.modules.updates.EXPO_RUNTIME_VERSION");r!=null?((0,_t.default)(r.$!=null),r.$["android:value"]=e):s.push({$:{"android:name":"expo.modules.updates.EXPO_RUNTIME_VERSION","android:value":e}});let a=s.find(c=>c.$?.["android:name"]==="expo.modules.updates.EXPO_UPDATE_URL"),n=o.updates?.url;(0,_t.default)(n),a!=null?((0,_t.default)(a.$!=null),a.$["android:value"]=n):s.push({$:{"android:name":"expo.modules.updates.EXPO_UPDATE_URL","android:value":n}})}function Vi(t,o,e){return o==null?[]:e(t,o)?[o]:Object.keys(o).filter(s=>s!=="$"&&s!=="_").flatMap(s=>{let i=o[s];return Vi(s,i,e)})}function Ei(t,o){if(t==null)return;let e=t.$??{};for(let[s,i]of Object.entries(e))e[s]=o(i);for(let[s,i]of Object.entries(t))s==="$"||s==="_"||Ei(i,o)}var fc="./debug.keystore";var rs=I(require("node:assert")),Yi=I(require("node:fs/promises")),To=I(require("node:path")),Wt=I(Gc());async function as(t,o){let{workingDirectory:e}=t,s=To.default.join(e,"app.config");return await Yi.default.writeFile(s,JSON.stringify(o)),s}async function ns(t){let{platform:o,projectRoot:e,spawnAsync:s,workingDirectory:i}=t,{stdout:r}=await s("node",["-e","require('expo/scripts/resolveAppEntry')",e,o,"absolute"],{cwd:e,stdio:"pipe"}),a=Wt.default.silent(t.projectRoot,"expo-updates/utils/build/createUpdatesResources.js");return(0,rs.default)(a,"Failed to resolve `createUpdatesResources.js` within expo-updates package"),await s("node",[a,o,e,i,"all",r.trim()],{cwd:e}),To.default.join(i,"app.manifest")}function cs(t){let o=Wc(t);(0,rs.default)(o,"Failed to resolve '@expo/config' package in the project");let{getPackageJson:e}=require(o),s=e(t);return!!(s.dependencies&&"expo-updates"in s.dependencies)}async function ls(t,o){let{projectRoot:e,spawnAsync:s}=t,i=Wt.default.silent(e,"expo-updates/bin/cli")??(0,Wt.default)(e,"expo-updates/bin/cli.js"),{stdout:r}=await s(i,["runtimeversion:resolve","--platform","android","--workflow","managed"],{cwd:e,stdio:"pipe"});return JSON.parse(r).runtimeVersion??o.version??"1.0.0"}function Wc(t){let o=Wt.default.silent(t,"expo/package.json");return o?Wt.default.silent(To.default.dirname(o),"@expo/config")??null:null}function us(t,o){let e=Wc(t);(0,rs.default)(e,"Failed to resolve '@expo/config' package in the project");let{getConfig:s}=require(e);return s(t,o)}async function _s(t,o){let{projectRoot:e,platform:s,spawnAsync:i,workingDirectory:r}=o,a=To.default.resolve(r,"bundles");await Yi.default.mkdir(a,{recursive:!0});let{stdout:n}=await i("node",["-e","require('expo/scripts/resolveAppEntry')",e,s,"absolute"],{cwd:e,stdio:"pipe"}),c=am(t,s),_=s==="android"?"index.android.bundle":"main.bundle",d=To.default.join(a,_),g=To.default.join(a,"assets"),O=["expo","export:embed","--platform",s,"--entry-file",n.trim(),"--bundle-output",To.default.join(a,_),"--assets-dest",To.default.join(a,"assets"),"--dev","false","--reset-cache"];return c?(O.push("--minify","false"),O.push("--bytecode","true"),O.push("--unstable-transform-profile","hermes")):O.push("--minify","true"),o.exportEmbedOptions?.sourcemapOutput&&O.push("--sourcemap-output",o.exportEmbedOptions.sourcemapOutput),await i("npx",O,{cwd:e}),{bundleOutputPath:d,assetRoot:g}}function am(t,o){switch(o){case"android":return(t.android?.jsEngine??t.jsEngine)!=="jsc";case"ios":return(t.ios?.jsEngine??t.jsEngine)!=="jsc";default:return!1}}var nm=Uo.default.resolve(__dirname,fc);async function vc(t){let o=await ee(t),{logger:e,spawnAsync:s,workingDirectory:i}=o;await xt.default.mkdir(i,{recursive:!0});let{exp:r}=us(o.projectRoot,{isPublicConfig:!0,skipSDKVersionRequirement:!0}),a=await un(Uo.default.resolve(o.sourceAppPath),o);(0,Zi.default)(r.android?.package,"Expected app ID (`android.package`) to be defined in app.json");let n=cs(o.projectRoot),c=n?await ls(o,r):null;if(e.info(bc.default.dim(`Resolved runtime version: ${c}`)),o.exportEmbedOptions!=null){e.time("Generating bundle");let{assetRoot:m,bundleOutputPath:l}=await _s(r,o);if(e.timeEnd("Generating bundle"),e.time("Adding bundled resources"),await xn({decodedApkRoot:a,assetRoot:m,bundleOutputPath:l}),e.timeEnd("Adding bundled resources"),n){e.time("Generating 'app.manifest' for expo-updates");let x=await ns(o),u=Uo.default.join(a,"assets");await xt.default.copyFile(x,Uo.default.join(u,Uo.default.basename(x))),e.timeEnd("Generating 'app.manifest' for expo-updates")}}e.time("Updating AndroidManifest.xml");let _=Uo.default.join(a,"AndroidManifest.xml"),d=await wc(_),g=yc(d),O=new Set([g]),w=hc(d,g);w!=null&&O.add(w);let z=await Promise.any(Array.from(O).map(m=>yn(a,m,o)));(0,Zi.default)(z!=null,"Failed to search for dex classes with appId in the APK"),await Oc({config:r,androidManiestXml:d,dexClasses:z,originalAppId:g,originalAppIdFallback:w,options:o,updatesRuntimeVersion:c}),await mn(a,r.android?.package),await dc(d,_),e.timeEnd("Updating AndroidManifest.xml"),e.time("Updating resources"),await gc({config:r,decodedApkRoot:a}),e.timeEnd("Updating resources"),e.time("Generating app config");let K=await as(o,r);await xt.default.copyFile(K,Uo.default.join(a,"assets","app.config")),e.timeEnd("Generating app config"),e.time("Creating updated apk");let q=await _n(a,o),v=Uo.default.join(i,"unzip");await xt.default.mkdir(v,{recursive:!0}),await s("unzip",["-o",q,"-d",v]);let p=await dn(v,o,{keyStorePath:o.androidSigningOptions?.keyStorePath??nm,keyStorePassword:o.androidSigningOptions?.keyStorePassword??"android",keyAlias:o.androidSigningOptions?.keyAlias,keyPassword:o.androidSigningOptions?.keyPassword});if(e.timeEnd("Creating updated apk"),await xt.default.rename(p,o.outputPath),!o.skipWorkingDirCleanup)try{await xt.default.rm(i,{recursive:!0})}catch{}return o.outputPath}var ni=I(require("node:assert")),lt=I(require("node:fs/promises")),Do=I(require("node:path")),cx=I(ui());var Rc=I(Ic(),1);var re=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var Om={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ae=t=>t.replace(/[[\]\\-]/g,"\\$&"),wm=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Pc=t=>t.join(""),Lc=(t,o)=>{let e=o;if(t.charAt(e)!=="[")throw new Error("not in a brace expression");let s=[],i=[],r=e+1,a=!1,n=!1,c=!1,_=!1,d=e,g="";o:for(;r<t.length;){let K=t.charAt(r);if((K==="!"||K==="^")&&r===e+1){_=!0,r++;continue}if(K==="]"&&a&&!c){d=r+1;break}if(a=!0,K==="\\"&&!c){c=!0,r++;continue}if(K==="["&&!c){for(let[q,[v,p,m]]of Object.entries(Om))if(t.startsWith(q,r)){if(g)return["$.",!1,t.length-e,!0];r+=q.length,m?i.push(v):s.push(v),n=n||p;continue o}}if(c=!1,g){K>g?s.push(ae(g)+"-"+ae(K)):K===g&&s.push(ae(K)),g="",r++;continue}if(t.startsWith("-]",r+1)){s.push(ae(K+"-")),r+=2;continue}if(t.startsWith("-",r+1)){g=K,r+=2;continue}s.push(ae(K)),r++}if(d<r)return["",!1,0,!1];if(!s.length&&!i.length)return["$.",!1,t.length-e,!0];if(i.length===0&&s.length===1&&/^\\?.$/.test(s[0])&&!_){let K=s[0].length===2?s[0].slice(-1):s[0];return[wm(K),!1,d-e,!1]}let O="["+(_?"^":"")+Pc(s)+"]",w="["+(_?"":"^")+Pc(i)+"]";return[s.length&&i.length?"("+O+"|"+w+")":s.length?O:w,n,d-e,!0]};var Go=(t,{windowsPathsNoEscape:o=!1}={})=>o?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var dm=new Set(["!","?","+","*","@"]),Tc=t=>dm.has(t),ym="(?!(?:^|/)\\.\\.?(?:$|/))",xs="(?!\\.)",hm=new Set(["[","."]),fm=new Set(["..","."]),zm=new Set("().*{}+?[]^$\\!"),Km=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Li="[^/]",Uc=Li+"*?",Qc=Li+"+?",bt=class t{type;#o;#t;#r=!1;#s=[];#a;#f;#l;#_=!1;#n;#c;#i=!1;constructor(o,e,s={}){this.type=o,o&&(this.#t=!0),this.#a=e,this.#o=this.#a?this.#a.#o:this,this.#n=this.#o===this?s:this.#o.#n,this.#l=this.#o===this?[]:this.#o.#l,o==="!"&&!this.#o.#_&&this.#l.push(this),this.#f=this.#a?this.#a.#s.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let o of this.#s)if(typeof o!="string"&&(o.type||o.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#s.map(o=>String(o)).join("|")+")":this.#c=this.#s.map(o=>String(o)).join("")}#w(){if(this!==this.#o)throw new Error("should only call on root");if(this.#_)return this;this.toString(),this.#_=!0;let o;for(;o=this.#l.pop();){if(o.type!=="!")continue;let e=o,s=e.#a;for(;s;){for(let i=e.#f+1;!s.type&&i<s.#s.length;i++)for(let r of o.#s){if(typeof r=="string")throw new Error("string part in extglob AST??");r.copyIn(s.#s[i])}e=s,s=e.#a}}return this}push(...o){for(let e of o)if(e!==""){if(typeof e!="string"&&!(e instanceof t&&e.#a===this))throw new Error("invalid part: "+e);this.#s.push(e)}}toJSON(){let o=this.type===null?this.#s.slice().map(e=>typeof e=="string"?e:e.toJSON()):[this.type,...this.#s.map(e=>e.toJSON())];return this.isStart()&&!this.type&&o.unshift([]),this.isEnd()&&(this===this.#o||this.#o.#_&&this.#a?.type==="!")&&o.push({}),o}isStart(){if(this.#o===this)return!0;if(!this.#a?.isStart())return!1;if(this.#f===0)return!0;let o=this.#a;for(let e=0;e<this.#f;e++){let s=o.#s[e];if(!(s instanceof t&&s.type==="!"))return!1}return!0}isEnd(){if(this.#o===this||this.#a?.type==="!")return!0;if(!this.#a?.isEnd())return!1;if(!this.type)return this.#a?.isEnd();let o=this.#a?this.#a.#s.length:0;return this.#f===o-1}copyIn(o){typeof o=="string"?this.push(o):this.push(o.clone(this))}clone(o){let e=new t(this.type,o);for(let s of this.#s)e.copyIn(s);return e}static#d(o,e,s,i){let r=!1,a=!1,n=-1,c=!1;if(e.type===null){let w=s,z="";for(;w<o.length;){let K=o.charAt(w++);if(r||K==="\\"){r=!r,z+=K;continue}if(a){w===n+1?(K==="^"||K==="!")&&(c=!0):K==="]"&&!(w===n+2&&c)&&(a=!1),z+=K;continue}else if(K==="["){a=!0,n=w,c=!1,z+=K;continue}if(!i.noext&&Tc(K)&&o.charAt(w)==="("){e.push(z),z="";let q=new t(K,e);w=t.#d(o,q,w,i),e.push(q);continue}z+=K}return e.push(z),w}let _=s+1,d=new t(null,e),g=[],O="";for(;_<o.length;){let w=o.charAt(_++);if(r||w==="\\"){r=!r,O+=w;continue}if(a){_===n+1?(w==="^"||w==="!")&&(c=!0):w==="]"&&!(_===n+2&&c)&&(a=!1),O+=w;continue}else if(w==="["){a=!0,n=_,c=!1,O+=w;continue}if(Tc(w)&&o.charAt(_)==="("){d.push(O),O="";let z=new t(w,d);d.push(z),_=t.#d(o,z,_,i);continue}if(w==="|"){d.push(O),O="",g.push(d),d=new t(null,e);continue}if(w===")")return O===""&&e.#s.length===0&&(e.#i=!0),d.push(O),O="",e.push(...g,d),_;O+=w}return e.type=null,e.#t=void 0,e.#s=[o.substring(s-1)],_}static fromGlob(o,e={}){let s=new t(null,void 0,e);return t.#d(o,s,0,e),s}toMMPattern(){if(this!==this.#o)return this.#o.toMMPattern();let o=this.toString(),[e,s,i,r]=this.toRegExpSource();if(!(i||this.#t||this.#n.nocase&&!this.#n.nocaseMagicOnly&&o.toUpperCase()!==o.toLowerCase()))return s;let n=(this.#n.nocase?"i":"")+(r?"u":"");return Object.assign(new RegExp(`^${e}$`,n),{_src:e,_glob:o})}get options(){return this.#n}toRegExpSource(o){let e=o??!!this.#n.dot;if(this.#o===this&&this.#w(),!this.type){let c=this.isStart()&&this.isEnd(),_=this.#s.map(w=>{let[z,K,q,v]=typeof w=="string"?t.#x(w,this.#t,c):w.toRegExpSource(o);return this.#t=this.#t||q,this.#r=this.#r||v,z}).join(""),d="";if(this.isStart()&&typeof this.#s[0]=="string"&&!(this.#s.length===1&&fm.has(this.#s[0]))){let z=hm,K=e&&z.has(_.charAt(0))||_.startsWith("\\.")&&z.has(_.charAt(2))||_.startsWith("\\.\\.")&&z.has(_.charAt(4)),q=!e&&!o&&z.has(_.charAt(0));d=K?ym:q?xs:""}let g="";return this.isEnd()&&this.#o.#_&&this.#a?.type==="!"&&(g="(?:$|\\/)"),[d+_+g,Go(_),this.#t=!!this.#t,this.#r]}let s=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",r=this.#m(e);if(this.isStart()&&this.isEnd()&&!r&&this.type!=="!"){let c=this.toString();return this.#s=[c],this.type=null,this.#t=void 0,[c,Go(this.toString()),!1,!1]}let a=!s||o||e||!xs?"":this.#m(!0);a===r&&(a=""),a&&(r=`(?:${r})(?:${a})*?`);let n="";if(this.type==="!"&&this.#i)n=(this.isStart()&&!e?xs:"")+Qc;else{let c=this.type==="!"?"))"+(this.isStart()&&!e&&!o?xs:"")+Uc+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;n=i+r+c}return[n,Go(r),this.#t=!!this.#t,this.#r]}#m(o){return this.#s.map(e=>{if(typeof e=="string")throw new Error("string type in extglob ast??");let[s,i,r,a]=e.toRegExpSource(o);return this.#r=this.#r||a,s}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join("|")}static#x(o,e,s=!1){let i=!1,r="",a=!1;for(let n=0;n<o.length;n++){let c=o.charAt(n);if(i){i=!1,r+=(zm.has(c)?"\\":"")+c;continue}if(c==="\\"){n===o.length-1?r+="\\\\":i=!0;continue}if(c==="["){let[_,d,g,O]=Lc(o,n);if(g){r+=_,a=a||d,n+=g-1,e=e||O;continue}}if(c==="*"){s&&o==="*"?r+=Qc:r+=Uc,e=!0;continue}if(c==="?"){r+=Li,e=!0;continue}r+=Km(c)}return[r,Go(o),!!e,a]}};var vt=(t,{windowsPathsNoEscape:o=!1}={})=>o?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var ro=(t,o,e={})=>(re(o),!e.nocomment&&o.charAt(0)==="#"?!1:new mo(o,e).match(t)),km=/^\*+([^+@!?\*\[\(]*)$/,Gm=t=>o=>!o.startsWith(".")&&o.endsWith(t),Wm=t=>o=>o.endsWith(t),bm=t=>(t=t.toLowerCase(),o=>!o.startsWith(".")&&o.toLowerCase().endsWith(t)),vm=t=>(t=t.toLowerCase(),o=>o.toLowerCase().endsWith(t)),qm=/^\*+\.\*+$/,pm=t=>!t.startsWith(".")&&t.includes("."),Cm=t=>t!=="."&&t!==".."&&t.includes("."),Nm=/^\.\*+$/,Sm=t=>t!=="."&&t!==".."&&t.startsWith("."),Fm=/^\*+$/,Mm=t=>t.length!==0&&!t.startsWith("."),Vm=t=>t.length!==0&&t!=="."&&t!=="..",Em=/^\?+([^+@!?\*\[\(]*)?$/,Xm=([t,o=""])=>{let e=Jc([t]);return o?(o=o.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(o)):e},Ym=([t,o=""])=>{let e=Bc([t]);return o?(o=o.toLowerCase(),s=>e(s)&&s.toLowerCase().endsWith(o)):e},Zm=([t,o=""])=>{let e=Bc([t]);return o?s=>e(s)&&s.endsWith(o):e},Im=([t,o=""])=>{let e=Jc([t]);return o?s=>e(s)&&s.endsWith(o):e},Jc=([t])=>{let o=t.length;return e=>e.length===o&&!e.startsWith(".")},Bc=([t])=>{let o=t.length;return e=>e.length===o&&e!=="."&&e!==".."},Dc=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Ac={win32:{sep:"\\"},posix:{sep:"/"}},Pm=Dc==="win32"?Ac.win32.sep:Ac.posix.sep;ro.sep=Pm;var oo=Symbol("globstar **");ro.GLOBSTAR=oo;var Lm="[^/]",Tm=Lm+"*?",Um="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Qm="(?:(?!(?:\\/|^)\\.).)*?",Am=(t,o={})=>e=>ro(e,t,o);ro.filter=Am;var ho=(t,o={})=>Object.assign({},t,o),jm=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return ro;let o=ro;return Object.assign((s,i,r={})=>o(s,i,ho(t,r)),{Minimatch:class extends o.Minimatch{constructor(i,r={}){super(i,ho(t,r))}static defaults(i){return o.defaults(ho(t,i)).Minimatch}},AST:class extends o.AST{constructor(i,r,a={}){super(i,r,ho(t,a))}static fromGlob(i,r={}){return o.AST.fromGlob(i,ho(t,r))}},unescape:(s,i={})=>o.unescape(s,ho(t,i)),escape:(s,i={})=>o.escape(s,ho(t,i)),filter:(s,i={})=>o.filter(s,ho(t,i)),defaults:s=>o.defaults(ho(t,s)),makeRe:(s,i={})=>o.makeRe(s,ho(t,i)),braceExpand:(s,i={})=>o.braceExpand(s,ho(t,i)),match:(s,i,r={})=>o.match(s,i,ho(t,r)),sep:o.sep,GLOBSTAR:oo})};ro.defaults=jm;var $c=(t,o={})=>(re(t),o.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,Rc.default)(t));ro.braceExpand=$c;var Rm=(t,o={})=>new mo(t,o).makeRe();ro.makeRe=Rm;var Jm=(t,o,e={})=>{let s=new mo(o,e);return t=t.filter(i=>s.match(i)),s.options.nonull&&!t.length&&t.push(o),t};ro.match=Jm;var jc=/[?*]|[+@!]\(.*?\)|\[|\]/,Bm=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),mo=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(o,e={}){re(o),e=e||{},this.options=e,this.pattern=o,this.platform=e.platform||Dc,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=e.windowsNoMagicRoot!==void 0?e.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let o of this.set)for(let e of o)if(typeof e!="string")return!0;return!1}debug(...o){}make(){let o=this.pattern,e=this.options;if(!e.nocomment&&o.charAt(0)==="#"){this.comment=!0;return}if(!o){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...r)=>console.error(...r)),this.debug(this.pattern,this.globSet);let s=this.globSet.map(r=>this.slashSplit(r));this.globParts=this.preprocess(s),this.debug(this.pattern,this.globParts);let i=this.globParts.map((r,a,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=r[0]===""&&r[1]===""&&(r[2]==="?"||!jc.test(r[2]))&&!jc.test(r[3]),_=/^[a-z]:/i.test(r[0]);if(c)return[...r.slice(0,4),...r.slice(4).map(d=>this.parse(d))];if(_)return[r[0],...r.slice(1).map(d=>this.parse(d))]}return r.map(c=>this.parse(c))});if(this.debug(this.pattern,i),this.set=i.filter(r=>r.indexOf(!1)===-1),this.isWindows)for(let r=0;r<this.set.length;r++){let a=this.set[r];a[0]===""&&a[1]===""&&this.globParts[r][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(o){if(this.options.noglobstar)for(let s=0;s<o.length;s++)for(let i=0;i<o[s].length;i++)o[s][i]==="**"&&(o[s][i]="*");let{optimizationLevel:e=1}=this.options;return e>=2?(o=this.firstPhasePreProcess(o),o=this.secondPhasePreProcess(o)):e>=1?o=this.levelOneOptimize(o):o=this.adjascentGlobstarOptimize(o),o}adjascentGlobstarOptimize(o){return o.map(e=>{let s=-1;for(;(s=e.indexOf("**",s+1))!==-1;){let i=s;for(;e[i+1]==="**";)i++;i!==s&&e.splice(s,i-s)}return e})}levelOneOptimize(o){return o.map(e=>(e=e.reduce((s,i)=>{let r=s[s.length-1];return i==="**"&&r==="**"?s:i===".."&&r&&r!==".."&&r!=="."&&r!=="**"?(s.pop(),s):(s.push(i),s)},[]),e.length===0?[""]:e))}levelTwoFileOptimize(o){Array.isArray(o)||(o=this.slashSplit(o));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let i=1;i<o.length-1;i++){let r=o[i];i===1&&r===""&&o[0]===""||(r==="."||r==="")&&(e=!0,o.splice(i,1),i--)}o[0]==="."&&o.length===2&&(o[1]==="."||o[1]==="")&&(e=!0,o.pop())}let s=0;for(;(s=o.indexOf("..",s+1))!==-1;){let i=o[s-1];i&&i!=="."&&i!==".."&&i!=="**"&&(e=!0,o.splice(s-1,2),s-=2)}}while(e);return o.length===0?[""]:o}firstPhasePreProcess(o){let e=!1;do{e=!1;for(let s of o){let i=-1;for(;(i=s.indexOf("**",i+1))!==-1;){let a=i;for(;s[a+1]==="**";)a++;a>i&&s.splice(i+1,a-i);let n=s[i+1],c=s[i+2],_=s[i+3];if(n!==".."||!c||c==="."||c===".."||!_||_==="."||_==="..")continue;e=!0,s.splice(i,1);let d=s.slice(0);d[i]="**",o.push(d),i--}if(!this.preserveMultipleSlashes){for(let a=1;a<s.length-1;a++){let n=s[a];a===1&&n===""&&s[0]===""||(n==="."||n==="")&&(e=!0,s.splice(a,1),a--)}s[0]==="."&&s.length===2&&(s[1]==="."||s[1]==="")&&(e=!0,s.pop())}let r=0;for(;(r=s.indexOf("..",r+1))!==-1;){let a=s[r-1];if(a&&a!=="."&&a!==".."&&a!=="**"){e=!0;let c=r===1&&s[r+1]==="**"?["."]:[];s.splice(r-1,2,...c),s.length===0&&s.push(""),r-=2}}}}while(e);return o}secondPhasePreProcess(o){for(let e=0;e<o.length-1;e++)for(let s=e+1;s<o.length;s++){let i=this.partsMatch(o[e],o[s],!this.preserveMultipleSlashes);if(i){o[e]=[],o[s]=i;break}}return o.filter(e=>e.length)}partsMatch(o,e,s=!1){let i=0,r=0,a=[],n="";for(;i<o.length&&r<e.length;)if(o[i]===e[r])a.push(n==="b"?e[r]:o[i]),i++,r++;else if(s&&o[i]==="**"&&e[r]===o[i+1])a.push(o[i]),i++;else if(s&&e[r]==="**"&&o[i]===e[r+1])a.push(e[r]),r++;else if(o[i]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(n==="b")return!1;n="a",a.push(o[i]),i++,r++}else if(e[r]==="*"&&o[i]&&(this.options.dot||!o[i].startsWith("."))&&o[i]!=="**"){if(n==="a")return!1;n="b",a.push(e[r]),i++,r++}else return!1;return o.length===e.length&&a}parseNegate(){if(this.nonegate)return;let o=this.pattern,e=!1,s=0;for(let i=0;i<o.length&&o.charAt(i)==="!";i++)e=!e,s++;s&&(this.pattern=o.slice(s)),this.negate=e}matchOne(o,e,s=!1){let i=this.options;if(this.isWindows){let K=typeof o[0]=="string"&&/^[a-z]:$/i.test(o[0]),q=!K&&o[0]===""&&o[1]===""&&o[2]==="?"&&/^[a-z]:$/i.test(o[3]),v=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),p=!v&&e[0]===""&&e[1]===""&&e[2]==="?"&&typeof e[3]=="string"&&/^[a-z]:$/i.test(e[3]),m=q?3:K?0:void 0,l=p?3:v?0:void 0;if(typeof m=="number"&&typeof l=="number"){let[x,u]=[o[m],e[l]];x.toLowerCase()===u.toLowerCase()&&(e[l]=x,l>m?e=e.slice(l):m>l&&(o=o.slice(m)))}}let{optimizationLevel:r=1}=this.options;r>=2&&(o=this.levelTwoFileOptimize(o)),this.debug("matchOne",this,{file:o,pattern:e}),this.debug("matchOne",o.length,e.length);for(var a=0,n=0,c=o.length,_=e.length;a<c&&n<_;a++,n++){this.debug("matchOne loop");var d=e[n],g=o[a];if(this.debug(e,d,g),d===!1)return!1;if(d===oo){this.debug("GLOBSTAR",[e,d,g]);var O=a,w=n+1;if(w===_){for(this.debug("** at the end");a<c;a++)if(o[a]==="."||o[a]===".."||!i.dot&&o[a].charAt(0)===".")return!1;return!0}for(;O<c;){var z=o[O];if(this.debug(`
19
19
  globstar while`,o,O,e,w,z),this.matchOne(o.slice(O),e.slice(w),s))return this.debug("globstar found match!",O,c,z),!0;if(z==="."||z===".."||!i.dot&&z.charAt(0)==="."){this.debug("dot detected!",o,O,e,w);break}this.debug("globstar swallow a segment, and continue"),O++}return!!(s&&(this.debug(`
20
20
  >>> no match, partial?`,o,O,e,w),O===c))}let K;if(typeof d=="string"?(K=g===d,this.debug("string match",d,g,K)):(K=d.test(g),this.debug("pattern match",d,g,K)),!K)return!1}if(a===c&&n===_)return!0;if(a===c)return s;if(n===_)return a===c-1&&o[a]==="";throw new Error("wtf?")}braceExpand(){return $c(this.pattern,this.options)}parse(o){re(o);let e=this.options;if(o==="**")return oo;if(o==="")return"";let s,i=null;(s=o.match(Fm))?i=e.dot?Vm:Mm:(s=o.match(km))?i=(e.nocase?e.dot?vm:bm:e.dot?Wm:Gm)(s[1]):(s=o.match(Em))?i=(e.nocase?e.dot?Ym:Xm:e.dot?Zm:Im)(s):(s=o.match(qm))?i=e.dot?Cm:pm:(s=o.match(Nm))&&(i=Sm);let r=bt.fromGlob(o,this.options).toMMPattern();return i&&typeof r=="object"&&Reflect.defineProperty(r,"test",{value:i}),r}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let o=this.set;if(!o.length)return this.regexp=!1,this.regexp;let e=this.options,s=e.noglobstar?Tm:e.dot?Um:Qm,i=new Set(e.nocase?["i"]:[]),r=o.map(c=>{let _=c.map(d=>{if(d instanceof RegExp)for(let g of d.flags.split(""))i.add(g);return typeof d=="string"?Bm(d):d===oo?oo:d._src});return _.forEach((d,g)=>{let O=_[g+1],w=_[g-1];d!==oo||w===oo||(w===void 0?O!==void 0&&O!==oo?_[g+1]="(?:\\/|"+s+"\\/)?"+O:_[g]=s:O===void 0?_[g-1]=w+"(?:\\/|"+s+")?":O!==oo&&(_[g-1]=w+"(?:\\/|\\/"+s+"\\/)"+O,_[g+1]=oo))}),_.filter(d=>d!==oo).join("/")}).join("|"),[a,n]=o.length>1?["(?:",")"]:["",""];r="^"+a+r+n+"$",this.negate&&(r="^(?!"+r+").+$");try{this.regexp=new RegExp(r,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(o){return this.preserveMultipleSlashes?o.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(o)?["",...o.split(/\/+/)]:o.split(/\/+/)}match(o,e=this.partial){if(this.debug("match",o,this.pattern),this.comment)return!1;if(this.empty)return o==="";if(o==="/"&&e)return!0;let s=this.options;this.isWindows&&(o=o.split("\\").join("/"));let i=this.slashSplit(o);this.debug(this.pattern,"split",i);let r=this.set;this.debug(this.pattern,"set",r);let a=i[i.length-1];if(!a)for(let n=i.length-2;!a&&n>=0;n--)a=i[n];for(let n=0;n<r.length;n++){let c=r[n],_=i;if(s.matchBase&&c.length===1&&(_=[a]),this.matchOne(_,c,e))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(o){return ro.defaults(o).Minimatch}};ro.AST=bt;ro.Minimatch=mo;ro.escape=vt;ro.unescape=Go;var Kl=require("node:url");var qt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ol=new Set,Ti=typeof process=="object"&&process?process:{},tl=(t,o,e,s)=>{typeof Ti.emitWarning=="function"?Ti.emitWarning(t,o,e,s):console.error(`[${e}] ${o}: ${t}`)},ms=globalThis.AbortController,Hc=globalThis.AbortSignal;if(typeof ms>"u"){Hc=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,i){this._onabort.push(i)}},ms=class{constructor(){o()}signal=new Hc;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let i of this.signal._onabort)i(s);this.signal.onabort?.(s)}}};let t=Ti.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",o=()=>{t&&(t=!1,tl("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",o))}}var Dm=t=>!ol.has(t),kw=Symbol("type"),tt=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),el=t=>tt(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?pt:null:null,pt=class extends Array{constructor(o){super(o),this.fill(0)}},Ui=class t{heap;length;static#o=!1;static create(o){let e=el(o);if(!e)return[];t.#o=!0;let s=new t(o,e);return t.#o=!1,s}constructor(o,e){if(!t.#o)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(o),this.length=0}push(o){this.heap[this.length++]=o}pop(){return this.heap[--this.length]}},ne=class t{#o;#t;#r;#s;#a;#f;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#l;#_;#n;#c;#i;#w;#d;#m;#x;#k;#O;#G;#W;#h;#z;#K;#g;static unsafeExposeInternals(o){return{starts:o.#W,ttls:o.#h,sizes:o.#G,keyMap:o.#n,keyList:o.#c,valList:o.#i,next:o.#w,prev:o.#d,get head(){return o.#m},get tail(){return o.#x},free:o.#k,isBackgroundFetch:e=>o.#u(e),backgroundFetch:(e,s,i,r)=>o.#Y(e,s,i,r),moveToTail:e=>o.#I(e),indexes:e=>o.#v(e),rindexes:e=>o.#q(e),isStale:e=>o.#y(e)}}get max(){return this.#o}get maxSize(){return this.#t}get calculatedSize(){return this.#_}get size(){return this.#l}get fetchMethod(){return this.#a}get memoMethod(){return this.#f}get dispose(){return this.#r}get disposeAfter(){return this.#s}constructor(o){let{max:e=0,ttl:s,ttlResolution:i=1,ttlAutopurge:r,updateAgeOnGet:a,updateAgeOnHas:n,allowStale:c,dispose:_,disposeAfter:d,noDisposeOnSet:g,noUpdateTTL:O,maxSize:w=0,maxEntrySize:z=0,sizeCalculation:K,fetchMethod:q,memoMethod:v,noDeleteOnFetchRejection:p,noDeleteOnStaleGet:m,allowStaleOnFetchRejection:l,allowStaleOnFetchAbort:x,ignoreFetchAbort:u}=o;if(e!==0&&!tt(e))throw new TypeError("max option must be a nonnegative integer");let G=e?el(e):Array;if(!G)throw new Error("invalid max value: "+e);if(this.#o=e,this.#t=w,this.maxEntrySize=z||this.#t,this.sizeCalculation=K,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(v!==void 0&&typeof v!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#f=v,q!==void 0&&typeof q!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=q,this.#K=!!q,this.#n=new Map,this.#c=new Array(e).fill(void 0),this.#i=new Array(e).fill(void 0),this.#w=new G(e),this.#d=new G(e),this.#m=0,this.#x=0,this.#k=Ui.create(e),this.#l=0,this.#_=0,typeof _=="function"&&(this.#r=_),typeof d=="function"?(this.#s=d,this.#O=[]):(this.#s=void 0,this.#O=void 0),this.#z=!!this.#r,this.#g=!!this.#s,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!O,this.noDeleteOnFetchRejection=!!p,this.allowStaleOnFetchRejection=!!l,this.allowStaleOnFetchAbort=!!x,this.ignoreFetchAbort=!!u,this.maxEntrySize!==0){if(this.#t!==0&&!tt(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!tt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#C()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!m,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!n,this.ttlResolution=tt(i)||i===0?i:1,this.ttlAutopurge=!!r,this.ttl=s||0,this.ttl){if(!tt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#p()}if(this.#o===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#o&&!this.#t){let y="LRU_CACHE_UNBOUNDED";Dm(y)&&(ol.add(y),tl("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",y,t))}}getRemainingTTL(o){return this.#n.has(o)?1/0:0}#p(){let o=new pt(this.#o),e=new pt(this.#o);this.#h=o,this.#W=e,this.#S=(r,a,n=qt.now())=>{if(e[r]=a!==0?n:0,o[r]=a,a!==0&&this.ttlAutopurge){let c=setTimeout(()=>{this.#y(r)&&this.#N(this.#c[r],"expire")},a+1);c.unref&&c.unref()}},this.#b=r=>{e[r]=o[r]!==0?qt.now():0},this.#e=(r,a)=>{if(o[a]){let n=o[a],c=e[a];if(!n||!c)return;r.ttl=n,r.start=c,r.now=s||i();let _=r.now-c;r.remainingTTL=n-_}};let s=0,i=()=>{let r=qt.now();if(this.ttlResolution>0){s=r;let a=setTimeout(()=>s=0,this.ttlResolution);a.unref&&a.unref()}return r};this.getRemainingTTL=r=>{let a=this.#n.get(r);if(a===void 0)return 0;let n=o[a],c=e[a];if(!n||!c)return 1/0;let _=(s||i())-c;return n-_},this.#y=r=>{let a=e[r],n=o[r];return!!n&&!!a&&(s||i())-a>n}}#b=()=>{};#e=()=>{};#S=()=>{};#y=()=>!1;#C(){let o=new pt(this.#o);this.#_=0,this.#G=o,this.#F=e=>{this.#_-=o[e],o[e]=0},this.#V=(e,s,i,r)=>{if(this.#u(s))return 0;if(!tt(i))if(r){if(typeof r!="function")throw new TypeError("sizeCalculation must be a function");if(i=r(s,e),!tt(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#M=(e,s,i)=>{if(o[e]=s,this.#t){let r=this.#t-o[e];for(;this.#_>r;)this.#X(!0)}this.#_+=o[e],i&&(i.entrySize=s,i.totalCalculatedSize=this.#_)}}#F=o=>{};#M=(o,e,s)=>{};#V=(o,e,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#v({allowStale:o=this.allowStale}={}){if(this.#l)for(let e=this.#x;!(!this.#E(e)||((o||!this.#y(e))&&(yield e),e===this.#m));)e=this.#d[e]}*#q({allowStale:o=this.allowStale}={}){if(this.#l)for(let e=this.#m;!(!this.#E(e)||((o||!this.#y(e))&&(yield e),e===this.#x));)e=this.#w[e]}#E(o){return o!==void 0&&this.#n.get(this.#c[o])===o}*entries(){for(let o of this.#v())this.#i[o]!==void 0&&this.#c[o]!==void 0&&!this.#u(this.#i[o])&&(yield[this.#c[o],this.#i[o]])}*rentries(){for(let o of this.#q())this.#i[o]!==void 0&&this.#c[o]!==void 0&&!this.#u(this.#i[o])&&(yield[this.#c[o],this.#i[o]])}*keys(){for(let o of this.#v()){let e=this.#c[o];e!==void 0&&!this.#u(this.#i[o])&&(yield e)}}*rkeys(){for(let o of this.#q()){let e=this.#c[o];e!==void 0&&!this.#u(this.#i[o])&&(yield e)}}*values(){for(let o of this.#v())this.#i[o]!==void 0&&!this.#u(this.#i[o])&&(yield this.#i[o])}*rvalues(){for(let o of this.#q())this.#i[o]!==void 0&&!this.#u(this.#i[o])&&(yield this.#i[o])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(o,e={}){for(let s of this.#v()){let i=this.#i[s],r=this.#u(i)?i.__staleWhileFetching:i;if(r!==void 0&&o(r,this.#c[s],this))return this.get(this.#c[s],e)}}forEach(o,e=this){for(let s of this.#v()){let i=this.#i[s],r=this.#u(i)?i.__staleWhileFetching:i;r!==void 0&&o.call(e,r,this.#c[s],this)}}rforEach(o,e=this){for(let s of this.#q()){let i=this.#i[s],r=this.#u(i)?i.__staleWhileFetching:i;r!==void 0&&o.call(e,r,this.#c[s],this)}}purgeStale(){let o=!1;for(let e of this.#q({allowStale:!0}))this.#y(e)&&(this.#N(this.#c[e],"expire"),o=!0);return o}info(o){let e=this.#n.get(o);if(e===void 0)return;let s=this.#i[e],i=this.#u(s)?s.__staleWhileFetching:s;if(i===void 0)return;let r={value:i};if(this.#h&&this.#W){let a=this.#h[e],n=this.#W[e];if(a&&n){let c=a-(qt.now()-n);r.ttl=c,r.start=Date.now()}}return this.#G&&(r.size=this.#G[e]),r}dump(){let o=[];for(let e of this.#v({allowStale:!0})){let s=this.#c[e],i=this.#i[e],r=this.#u(i)?i.__staleWhileFetching:i;if(r===void 0||s===void 0)continue;let a={value:r};if(this.#h&&this.#W){a.ttl=this.#h[e];let n=qt.now()-this.#W[e];a.start=Math.floor(Date.now()-n)}this.#G&&(a.size=this.#G[e]),o.unshift([s,a])}return o}load(o){this.clear();for(let[e,s]of o){if(s.start){let i=Date.now()-s.start;s.start=qt.now()-i}this.set(e,s.value,s)}}set(o,e,s={}){if(e===void 0)return this.delete(o),this;let{ttl:i=this.ttl,start:r,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:n=this.sizeCalculation,status:c}=s,{noUpdateTTL:_=this.noUpdateTTL}=s,d=this.#V(o,e,s.size||0,n);if(this.maxEntrySize&&d>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.#N(o,"set"),this;let g=this.#l===0?void 0:this.#n.get(o);if(g===void 0)g=this.#l===0?this.#x:this.#k.length!==0?this.#k.pop():this.#l===this.#o?this.#X(!1):this.#l,this.#c[g]=o,this.#i[g]=e,this.#n.set(o,g),this.#w[this.#x]=g,this.#d[g]=this.#x,this.#x=g,this.#l++,this.#M(g,d,c),c&&(c.set="add"),_=!1;else{this.#I(g);let O=this.#i[g];if(e!==O){if(this.#K&&this.#u(O)){O.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:w}=O;w!==void 0&&!a&&(this.#z&&this.#r?.(w,o,"set"),this.#g&&this.#O?.push([w,o,"set"]))}else a||(this.#z&&this.#r?.(O,o,"set"),this.#g&&this.#O?.push([O,o,"set"]));if(this.#F(g),this.#M(g,d,c),this.#i[g]=e,c){c.set="replace";let w=O&&this.#u(O)?O.__staleWhileFetching:O;w!==void 0&&(c.oldValue=w)}}else c&&(c.set="update")}if(i!==0&&!this.#h&&this.#p(),this.#h&&(_||this.#S(g,i,r),c&&this.#e(c,g)),!a&&this.#g&&this.#O){let O=this.#O,w;for(;w=O?.shift();)this.#s?.(...w)}return this}pop(){try{for(;this.#l;){let o=this.#i[this.#m];if(this.#X(!0),this.#u(o)){if(o.__staleWhileFetching)return o.__staleWhileFetching}else if(o!==void 0)return o}}finally{if(this.#g&&this.#O){let o=this.#O,e;for(;e=o?.shift();)this.#s?.(...e)}}}#X(o){let e=this.#m,s=this.#c[e],i=this.#i[e];return this.#K&&this.#u(i)?i.__abortController.abort(new Error("evicted")):(this.#z||this.#g)&&(this.#z&&this.#r?.(i,s,"evict"),this.#g&&this.#O?.push([i,s,"evict"])),this.#F(e),o&&(this.#c[e]=void 0,this.#i[e]=void 0,this.#k.push(e)),this.#l===1?(this.#m=this.#x=0,this.#k.length=0):this.#m=this.#w[e],this.#n.delete(s),this.#l--,e}has(o,e={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=e,r=this.#n.get(o);if(r!==void 0){let a=this.#i[r];if(this.#u(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#y(r))i&&(i.has="stale",this.#e(i,r));else return s&&this.#b(r),i&&(i.has="hit",this.#e(i,r)),!0}else i&&(i.has="miss");return!1}peek(o,e={}){let{allowStale:s=this.allowStale}=e,i=this.#n.get(o);if(i===void 0||!s&&this.#y(i))return;let r=this.#i[i];return this.#u(r)?r.__staleWhileFetching:r}#Y(o,e,s,i){let r=e===void 0?void 0:this.#i[e];if(this.#u(r))return r;let a=new ms,{signal:n}=s;n?.addEventListener("abort",()=>a.abort(n.reason),{signal:a.signal});let c={signal:a.signal,options:s,context:i},_=(K,q=!1)=>{let{aborted:v}=a.signal,p=s.ignoreFetchAbort&&K!==void 0;if(s.status&&(v&&!q?(s.status.fetchAborted=!0,s.status.fetchError=a.signal.reason,p&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),v&&!p&&!q)return g(a.signal.reason);let m=w;return this.#i[e]===w&&(K===void 0?m.__staleWhileFetching?this.#i[e]=m.__staleWhileFetching:this.#N(o,"fetch"):(s.status&&(s.status.fetchUpdated=!0),this.set(o,K,c.options))),K},d=K=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=K),g(K)),g=K=>{let{aborted:q}=a.signal,v=q&&s.allowStaleOnFetchAbort,p=v||s.allowStaleOnFetchRejection,m=p||s.noDeleteOnFetchRejection,l=w;if(this.#i[e]===w&&(!m||l.__staleWhileFetching===void 0?this.#N(o,"fetch"):v||(this.#i[e]=l.__staleWhileFetching)),p)return s.status&&l.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),l.__staleWhileFetching;if(l.__returned===l)throw K},O=(K,q)=>{let v=this.#a?.(o,r,c);v&&v instanceof Promise&&v.then(p=>K(p===void 0?void 0:p),q),a.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(K(void 0),s.allowStaleOnFetchAbort&&(K=p=>_(p,!0)))})};s.status&&(s.status.fetchDispatched=!0);let w=new Promise(O).then(_,d),z=Object.assign(w,{__abortController:a,__staleWhileFetching:r,__returned:void 0});return e===void 0?(this.set(o,z,{...c.options,status:void 0}),e=this.#n.get(o)):this.#i[e]=z,z}#u(o){if(!this.#K)return!1;let e=o;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof ms}async fetch(o,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:n=this.noDisposeOnSet,size:c=0,sizeCalculation:_=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:O=this.allowStaleOnFetchRejection,ignoreFetchAbort:w=this.ignoreFetchAbort,allowStaleOnFetchAbort:z=this.allowStaleOnFetchAbort,context:K,forceRefresh:q=!1,status:v,signal:p}=e;if(!this.#K)return v&&(v.fetch="get"),this.get(o,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,status:v});let m={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:r,ttl:a,noDisposeOnSet:n,size:c,sizeCalculation:_,noUpdateTTL:d,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:O,allowStaleOnFetchAbort:z,ignoreFetchAbort:w,status:v,signal:p},l=this.#n.get(o);if(l===void 0){v&&(v.fetch="miss");let x=this.#Y(o,l,m,K);return x.__returned=x}else{let x=this.#i[l];if(this.#u(x)){let f=s&&x.__staleWhileFetching!==void 0;return v&&(v.fetch="inflight",f&&(v.returnedStale=!0)),f?x.__staleWhileFetching:x.__returned=x}let u=this.#y(l);if(!q&&!u)return v&&(v.fetch="hit"),this.#I(l),i&&this.#b(l),v&&this.#e(v,l),x;let G=this.#Y(o,l,m,K),h=G.__staleWhileFetching!==void 0&&s;return v&&(v.fetch=u?"stale":"refresh",h&&u&&(v.returnedStale=!0)),h?G.__staleWhileFetching:G.__returned=G}}async forceFetch(o,e={}){let s=await this.fetch(o,e);if(s===void 0)throw new Error("fetch() returned undefined");return s}memo(o,e={}){let s=this.#f;if(!s)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:r,...a}=e,n=this.get(o,a);if(!r&&n!==void 0)return n;let c=s(o,n,{options:a,context:i});return this.set(o,c,a),c}get(o,e={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:r=this.noDeleteOnStaleGet,status:a}=e,n=this.#n.get(o);if(n!==void 0){let c=this.#i[n],_=this.#u(c);return a&&this.#e(a,n),this.#y(n)?(a&&(a.get="stale"),_?(a&&s&&c.__staleWhileFetching!==void 0&&(a.returnedStale=!0),s?c.__staleWhileFetching:void 0):(r||this.#N(o,"expire"),a&&s&&(a.returnedStale=!0),s?c:void 0)):(a&&(a.get="hit"),_?c.__staleWhileFetching:(this.#I(n),i&&this.#b(n),c))}else a&&(a.get="miss")}#Z(o,e){this.#d[e]=o,this.#w[o]=e}#I(o){o!==this.#x&&(o===this.#m?this.#m=this.#w[o]:this.#Z(this.#d[o],this.#w[o]),this.#Z(this.#x,o),this.#x=o)}delete(o){return this.#N(o,"delete")}#N(o,e){let s=!1;if(this.#l!==0){let i=this.#n.get(o);if(i!==void 0)if(s=!0,this.#l===1)this.#P(e);else{this.#F(i);let r=this.#i[i];if(this.#u(r)?r.__abortController.abort(new Error("deleted")):(this.#z||this.#g)&&(this.#z&&this.#r?.(r,o,e),this.#g&&this.#O?.push([r,o,e])),this.#n.delete(o),this.#c[i]=void 0,this.#i[i]=void 0,i===this.#x)this.#x=this.#d[i];else if(i===this.#m)this.#m=this.#w[i];else{let a=this.#d[i];this.#w[a]=this.#w[i];let n=this.#w[i];this.#d[n]=this.#d[i]}this.#l--,this.#k.push(i)}}if(this.#g&&this.#O?.length){let i=this.#O,r;for(;r=i?.shift();)this.#s?.(...r)}return s}clear(){return this.#P("delete")}#P(o){for(let e of this.#q({allowStale:!0})){let s=this.#i[e];if(this.#u(s))s.__abortController.abort(new Error("deleted"));else{let i=this.#c[e];this.#z&&this.#r?.(s,i,o),this.#g&&this.#O?.push([s,i,o])}}if(this.#n.clear(),this.#i.fill(void 0),this.#c.fill(void 0),this.#h&&this.#W&&(this.#h.fill(0),this.#W.fill(0)),this.#G&&this.#G.fill(0),this.#m=0,this.#x=0,this.#k.length=0,this.#_=0,this.#l=0,this.#g&&this.#O){let e=this.#O,s;for(;s=e?.shift();)this.#s?.(...s)}}};var St=require("node:path"),xl=require("node:url"),Fo=require("fs"),ng=I(require("node:fs"),1),it=require("node:fs/promises");var fs=require("node:events"),Di=I(require("node:stream"),1),nl=require("node:string_decoder"),sl=typeof process=="object"&&process?process:{stdout:null,stderr:null},$m=t=>!!t&&typeof t=="object"&&(t instanceof st||t instanceof Di.default||Hm(t)||og(t)),Hm=t=>!!t&&typeof t=="object"&&t instanceof fs.EventEmitter&&typeof t.pipe=="function"&&t.pipe!==Di.default.Writable.prototype.pipe,og=t=>!!t&&typeof t=="object"&&t instanceof fs.EventEmitter&&typeof t.write=="function"&&typeof t.end=="function",Qo=Symbol("EOF"),Ao=Symbol("maybeEmitEnd"),et=Symbol("emittedEnd"),gs=Symbol("emittingEnd"),ce=Symbol("emittedError"),Os=Symbol("closed"),il=Symbol("read"),ws=Symbol("flush"),rl=Symbol("flushChunk"),Wo=Symbol("encoding"),Ct=Symbol("decoder"),J=Symbol("flowing"),le=Symbol("paused"),Nt=Symbol("resume"),B=Symbol("buffer"),ao=Symbol("pipes"),D=Symbol("bufferLength"),Qi=Symbol("bufferPush"),ds=Symbol("bufferShift"),eo=Symbol("objectMode"),U=Symbol("destroyed"),Ai=Symbol("error"),ji=Symbol("emitData"),al=Symbol("emitEnd"),Ri=Symbol("emitEnd2"),No=Symbol("async"),Ji=Symbol("abort"),ys=Symbol("aborted"),ue=Symbol("signal"),mt=Symbol("dataListeners"),go=Symbol("discarded"),_e=t=>Promise.resolve().then(t),tg=t=>t(),eg=t=>t==="end"||t==="finish"||t==="prefinish",sg=t=>t instanceof ArrayBuffer||!!t&&typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,ig=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),hs=class{src;dest;opts;ondrain;constructor(o,e,s){this.src=o,this.dest=e,this.opts=s,this.ondrain=()=>o[Nt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(o){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},Bi=class extends hs{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(o,e,s){super(o,e,s),this.proxyErrors=i=>e.emit("error",i),o.on("error",this.proxyErrors)}},rg=t=>!!t.objectMode,ag=t=>!t.objectMode&&!!t.encoding&&t.encoding!=="buffer",st=class extends fs.EventEmitter{[J]=!1;[le]=!1;[ao]=[];[B]=[];[eo];[Wo];[No];[Ct];[Qo]=!1;[et]=!1;[gs]=!1;[Os]=!1;[ce]=null;[D]=0;[U]=!1;[ue];[ys]=!1;[mt]=0;[go]=!1;writable=!0;readable=!0;constructor(...o){let e=o[0]||{};if(super(),e.objectMode&&typeof e.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");rg(e)?(this[eo]=!0,this[Wo]=null):ag(e)?(this[Wo]=e.encoding,this[eo]=!1):(this[eo]=!1,this[Wo]=null),this[No]=!!e.async,this[Ct]=this[Wo]?new nl.StringDecoder(this[Wo]):null,e&&e.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[B]}),e&&e.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[ao]});let{signal:s}=e;s&&(this[ue]=s,s.aborted?this[Ji]():s.addEventListener("abort",()=>this[Ji]()))}get bufferLength(){return this[D]}get encoding(){return this[Wo]}set encoding(o){throw new Error("Encoding must be set at instantiation time")}setEncoding(o){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[eo]}set objectMode(o){throw new Error("objectMode must be set at instantiation time")}get async(){return this[No]}set async(o){this[No]=this[No]||!!o}[Ji](){this[ys]=!0,this.emit("abort",this[ue]?.reason),this.destroy(this[ue]?.reason)}get aborted(){return this[ys]}set aborted(o){}write(o,e,s){if(this[ys])return!1;if(this[Qo])throw new Error("write after end");if(this[U])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof e=="function"&&(s=e,e="utf8"),e||(e="utf8");let i=this[No]?_e:tg;if(!this[eo]&&!Buffer.isBuffer(o)){if(ig(o))o=Buffer.from(o.buffer,o.byteOffset,o.byteLength);else if(sg(o))o=Buffer.from(o);else if(typeof o!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[eo]?(this[J]&&this[D]!==0&&this[ws](!0),this[J]?this.emit("data",o):this[Qi](o),this[D]!==0&&this.emit("readable"),s&&i(s),this[J]):o.length?(typeof o=="string"&&!(e===this[Wo]&&!this[Ct]?.lastNeed)&&(o=Buffer.from(o,e)),Buffer.isBuffer(o)&&this[Wo]&&(o=this[Ct].write(o)),this[J]&&this[D]!==0&&this[ws](!0),this[J]?this.emit("data",o):this[Qi](o),this[D]!==0&&this.emit("readable"),s&&i(s),this[J]):(this[D]!==0&&this.emit("readable"),s&&i(s),this[J])}read(o){if(this[U])return null;if(this[go]=!1,this[D]===0||o===0||o&&o>this[D])return this[Ao](),null;this[eo]&&(o=null),this[B].length>1&&!this[eo]&&(this[B]=[this[Wo]?this[B].join(""):Buffer.concat(this[B],this[D])]);let e=this[il](o||null,this[B][0]);return this[Ao](),e}[il](o,e){if(this[eo])this[ds]();else{let s=e;o===s.length||o===null?this[ds]():typeof s=="string"?(this[B][0]=s.slice(o),e=s.slice(0,o),this[D]-=o):(this[B][0]=s.subarray(o),e=s.subarray(0,o),this[D]-=o)}return this.emit("data",e),!this[B].length&&!this[Qo]&&this.emit("drain"),e}end(o,e,s){return typeof o=="function"&&(s=o,o=void 0),typeof e=="function"&&(s=e,e="utf8"),o!==void 0&&this.write(o,e),s&&this.once("end",s),this[Qo]=!0,this.writable=!1,(this[J]||!this[le])&&this[Ao](),this}[Nt](){this[U]||(!this[mt]&&!this[ao].length&&(this[go]=!0),this[le]=!1,this[J]=!0,this.emit("resume"),this[B].length?this[ws]():this[Qo]?this[Ao]():this.emit("drain"))}resume(){return this[Nt]()}pause(){this[J]=!1,this[le]=!0,this[go]=!1}get destroyed(){return this[U]}get flowing(){return this[J]}get paused(){return this[le]}[Qi](o){this[eo]?this[D]+=1:this[D]+=o.length,this[B].push(o)}[ds](){return this[eo]?this[D]-=1:this[D]-=this[B][0].length,this[B].shift()}[ws](o=!1){do;while(this[rl](this[ds]())&&this[B].length);!o&&!this[B].length&&!this[Qo]&&this.emit("drain")}[rl](o){return this.emit("data",o),this[J]}pipe(o,e){if(this[U])return o;this[go]=!1;let s=this[et];return e=e||{},o===sl.stdout||o===sl.stderr?e.end=!1:e.end=e.end!==!1,e.proxyErrors=!!e.proxyErrors,s?e.end&&o.end():(this[ao].push(e.proxyErrors?new Bi(this,o,e):new hs(this,o,e)),this[No]?_e(()=>this[Nt]()):this[Nt]()),o}unpipe(o){let e=this[ao].find(s=>s.dest===o);e&&(this[ao].length===1?(this[J]&&this[mt]===0&&(this[J]=!1),this[ao]=[]):this[ao].splice(this[ao].indexOf(e),1),e.unpipe())}addListener(o,e){return this.on(o,e)}on(o,e){let s=super.on(o,e);if(o==="data")this[go]=!1,this[mt]++,!this[ao].length&&!this[J]&&this[Nt]();else if(o==="readable"&&this[D]!==0)super.emit("readable");else if(eg(o)&&this[et])super.emit(o),this.removeAllListeners(o);else if(o==="error"&&this[ce]){let i=e;this[No]?_e(()=>i.call(this,this[ce])):i.call(this,this[ce])}return s}removeListener(o,e){return this.off(o,e)}off(o,e){let s=super.off(o,e);return o==="data"&&(this[mt]=this.listeners("data").length,this[mt]===0&&!this[go]&&!this[ao].length&&(this[J]=!1)),s}removeAllListeners(o){let e=super.removeAllListeners(o);return(o==="data"||o===void 0)&&(this[mt]=0,!this[go]&&!this[ao].length&&(this[J]=!1)),e}get emittedEnd(){return this[et]}[Ao](){!this[gs]&&!this[et]&&!this[U]&&this[B].length===0&&this[Qo]&&(this[gs]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Os]&&this.emit("close"),this[gs]=!1)}emit(o,...e){let s=e[0];if(o!=="error"&&o!=="close"&&o!==U&&this[U])return!1;if(o==="data")return!this[eo]&&!s?!1:this[No]?(_e(()=>this[ji](s)),!0):this[ji](s);if(o==="end")return this[al]();if(o==="close"){if(this[Os]=!0,!this[et]&&!this[U])return!1;let r=super.emit("close");return this.removeAllListeners("close"),r}else if(o==="error"){this[ce]=s,super.emit(Ai,s);let r=!this[ue]||this.listeners("error").length?super.emit("error",s):!1;return this[Ao](),r}else if(o==="resume"){let r=super.emit("resume");return this[Ao](),r}else if(o==="finish"||o==="prefinish"){let r=super.emit(o);return this.removeAllListeners(o),r}let i=super.emit(o,...e);return this[Ao](),i}[ji](o){for(let s of this[ao])s.dest.write(o)===!1&&this.pause();let e=this[go]?!1:super.emit("data",o);return this[Ao](),e}[al](){return this[et]?!1:(this[et]=!0,this.readable=!1,this[No]?(_e(()=>this[Ri]()),!0):this[Ri]())}[Ri](){if(this[Ct]){let e=this[Ct].end();if(e){for(let s of this[ao])s.dest.write(e);this[go]||super.emit("data",e)}}for(let e of this[ao])e.end();let o=super.emit("end");return this.removeAllListeners("end"),o}async collect(){let o=Object.assign([],{dataLength:0});this[eo]||(o.dataLength=0);let e=this.promise();return this.on("data",s=>{o.push(s),this[eo]||(o.dataLength+=s.length)}),await e,o}async concat(){if(this[eo])throw new Error("cannot concat in objectMode");let o=await this.collect();return this[Wo]?o.join(""):Buffer.concat(o,o.dataLength)}async promise(){return new Promise((o,e)=>{this.on(U,()=>e(new Error("stream destroyed"))),this.on("error",s=>e(s)),this.on("end",()=>o())})}[Symbol.asyncIterator](){this[go]=!1;let o=!1,e=async()=>(this.pause(),o=!0,{value:void 0,done:!0});return{next:()=>{if(o)return e();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[Qo])return e();let r,a,n=g=>{this.off("data",c),this.off("end",_),this.off(U,d),e(),a(g)},c=g=>{this.off("error",n),this.off("end",_),this.off(U,d),this.pause(),r({value:g,done:!!this[Qo]})},_=()=>{this.off("error",n),this.off("data",c),this.off(U,d),e(),r({done:!0,value:void 0})},d=()=>n(new Error("stream destroyed"));return new Promise((g,O)=>{a=O,r=g,this.once(U,d),this.once("error",n),this.once("end",_),this.once("data",c)})},throw:e,return:e,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[go]=!1;let o=!1,e=()=>(this.pause(),this.off(Ai,e),this.off(U,e),this.off("end",e),o=!0,{done:!0,value:void 0}),s=()=>{if(o)return e();let i=this.read();return i===null?e():{done:!1,value:i}};return this.once("end",e),this.once(Ai,e),this.once(U,e),{next:s,throw:e,return:e,[Symbol.iterator](){return this}}}destroy(o){if(this[U])return o?this.emit("error",o):this.emit(U),this;this[U]=!0,this[go]=!0,this[B].length=0,this[D]=0;let e=this;return typeof e.close=="function"&&!this[Os]&&e.close(),o?this.emit("error",o):this.emit(U),this}static get isStream(){return $m}};var cg=Fo.realpathSync.native,me={lstatSync:Fo.lstatSync,readdir:Fo.readdir,readdirSync:Fo.readdirSync,readlinkSync:Fo.readlinkSync,realpathSync:cg,promises:{lstat:it.lstat,readdir:it.readdir,readlink:it.readlink,realpath:it.realpath}},ml=t=>!t||t===me||t===ng?me:{...me,...t,promises:{...me.promises,...t.promises||{}}},gl=/^\\\\\?\\([a-z]:)\\?$/i,lg=t=>t.replace(/\//g,"\\").replace(gl,"$1\\"),ug=/[\\\/]/,zo=0,Ol=1,wl=2,So=4,dl=6,yl=8,gt=10,hl=12,fo=15,xe=~fo,$i=16,cl=32,ge=64,bo=128,zs=256,ks=512,ll=ge|bo|ks,_g=1023,Hi=t=>t.isFile()?yl:t.isDirectory()?So:t.isSymbolicLink()?gt:t.isCharacterDevice()?wl:t.isBlockDevice()?dl:t.isSocket()?hl:t.isFIFO()?Ol:zo,ul=new Map,Oe=t=>{let o=ul.get(t);if(o)return o;let e=t.normalize("NFKD");return ul.set(t,e),e},_l=new Map,Ks=t=>{let o=_l.get(t);if(o)return o;let e=Oe(t.toLowerCase());return _l.set(t,e),e},Gs=class extends ne{constructor(){super({max:256})}},or=class extends ne{constructor(o=16*1024){super({maxSize:o,sizeCalculation:e=>e.length+1})}},fl=Symbol("PathScurry setAsCwd"),so=class{name;root;roots;parent;nocase;isCWD=!1;#o;#t;get dev(){return this.#t}#r;get mode(){return this.#r}#s;get nlink(){return this.#s}#a;get uid(){return this.#a}#f;get gid(){return this.#f}#l;get rdev(){return this.#l}#_;get blksize(){return this.#_}#n;get ino(){return this.#n}#c;get size(){return this.#c}#i;get blocks(){return this.#i}#w;get atimeMs(){return this.#w}#d;get mtimeMs(){return this.#d}#m;get ctimeMs(){return this.#m}#x;get birthtimeMs(){return this.#x}#k;get atime(){return this.#k}#O;get mtime(){return this.#O}#G;get ctime(){return this.#G}#W;get birthtime(){return this.#W}#h;#z;#K;#g;#p;#b;#e;#S;#y;#C;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(o,e=zo,s,i,r,a,n){this.name=o,this.#h=r?Ks(o):Oe(o),this.#e=e&_g,this.nocase=r,this.roots=i,this.root=s||this,this.#S=a,this.#K=n.fullpath,this.#p=n.relative,this.#b=n.relativePosix,this.parent=n.parent,this.parent?this.#o=this.parent.#o:this.#o=ml(n.fs)}depth(){return this.#z!==void 0?this.#z:this.parent?this.#z=this.parent.depth()+1:this.#z=0}childrenCache(){return this.#S}resolve(o){if(!o)return this;let e=this.getRootString(o),i=o.substring(e.length).split(this.splitSep);return e?this.getRoot(e).#F(i):this.#F(i)}#F(o){let e=this;for(let s of o)e=e.child(s);return e}children(){let o=this.#S.get(this);if(o)return o;let e=Object.assign([],{provisional:0});return this.#S.set(this,e),this.#e&=~$i,e}child(o,e){if(o===""||o===".")return this;if(o==="..")return this.parent||this;let s=this.children(),i=this.nocase?Ks(o):Oe(o);for(let c of s)if(c.#h===i)return c;let r=this.parent?this.sep:"",a=this.#K?this.#K+r+o:void 0,n=this.newChild(o,zo,{...e,parent:this,fullpath:a});return this.canReaddir()||(n.#e|=bo),s.push(n),n}relative(){if(this.isCWD)return"";if(this.#p!==void 0)return this.#p;let o=this.name,e=this.parent;if(!e)return this.#p=this.name;let s=e.relative();return s+(!s||!e.parent?"":this.sep)+o}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#b!==void 0)return this.#b;let o=this.name,e=this.parent;if(!e)return this.#b=this.fullpathPosix();let s=e.relativePosix();return s+(!s||!e.parent?"":"/")+o}fullpath(){if(this.#K!==void 0)return this.#K;let o=this.name,e=this.parent;if(!e)return this.#K=this.name;let i=e.fullpath()+(e.parent?this.sep:"")+o;return this.#K=i}fullpathPosix(){if(this.#g!==void 0)return this.#g;if(this.sep==="/")return this.#g=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#g=`//?/${i}`:this.#g=i}let o=this.parent,e=o.fullpathPosix(),s=e+(!e||!o.parent?"":"/")+this.name;return this.#g=s}isUnknown(){return(this.#e&fo)===zo}isType(o){return this[`is${o}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#e&fo)===yl}isDirectory(){return(this.#e&fo)===So}isCharacterDevice(){return(this.#e&fo)===wl}isBlockDevice(){return(this.#e&fo)===dl}isFIFO(){return(this.#e&fo)===Ol}isSocket(){return(this.#e&fo)===hl}isSymbolicLink(){return(this.#e&gt)===gt}lstatCached(){return this.#e&cl?this:void 0}readlinkCached(){return this.#y}realpathCached(){return this.#C}readdirCached(){let o=this.children();return o.slice(0,o.provisional)}canReadlink(){if(this.#y)return!0;if(!this.parent)return!1;let o=this.#e&fo;return!(o!==zo&&o!==gt||this.#e&zs||this.#e&bo)}calledReaddir(){return!!(this.#e&$i)}isENOENT(){return!!(this.#e&bo)}isNamed(o){return this.nocase?this.#h===Ks(o):this.#h===Oe(o)}async readlink(){let o=this.#y;if(o)return o;if(this.canReadlink()&&this.parent)try{let e=await this.#o.promises.readlink(this.fullpath()),s=(await this.parent.realpath())?.resolve(e);if(s)return this.#y=s}catch(e){this.#u(e.code);return}}readlinkSync(){let o=this.#y;if(o)return o;if(this.canReadlink()&&this.parent)try{let e=this.#o.readlinkSync(this.fullpath()),s=this.parent.realpathSync()?.resolve(e);if(s)return this.#y=s}catch(e){this.#u(e.code);return}}#M(o){this.#e|=$i;for(let e=o.provisional;e<o.length;e++){let s=o[e];s&&s.#V()}}#V(){this.#e&bo||(this.#e=(this.#e|bo)&xe,this.#v())}#v(){let o=this.children();o.provisional=0;for(let e of o)e.#V()}#q(){this.#e|=ks,this.#E()}#E(){if(this.#e&ge)return;let o=this.#e;(o&fo)===So&&(o&=xe),this.#e=o|ge,this.#v()}#X(o=""){o==="ENOTDIR"||o==="EPERM"?this.#E():o==="ENOENT"?this.#V():this.children().provisional=0}#Y(o=""){o==="ENOTDIR"?this.parent.#E():o==="ENOENT"&&this.#V()}#u(o=""){let e=this.#e;e|=zs,o==="ENOENT"&&(e|=bo),(o==="EINVAL"||o==="UNKNOWN")&&(e&=xe),this.#e=e,o==="ENOTDIR"&&this.parent&&this.parent.#E()}#Z(o,e){return this.#N(o,e)||this.#I(o,e)}#I(o,e){let s=Hi(o),i=this.newChild(o.name,s,{parent:this}),r=i.#e&fo;return r!==So&&r!==gt&&r!==zo&&(i.#e|=ge),e.unshift(i),e.provisional++,i}#N(o,e){for(let s=e.provisional;s<e.length;s++){let i=e[s];if((this.nocase?Ks(o.name):Oe(o.name))===i.#h)return this.#P(o,i,s,e)}}#P(o,e,s,i){let r=e.name;return e.#e=e.#e&xe|Hi(o),r!==o.name&&(e.name=o.name),s!==i.provisional&&(s===i.length-1?i.pop():i.splice(s,1),i.unshift(e)),i.provisional++,e}async lstat(){if((this.#e&bo)===0)try{return this.#Q(await this.#o.promises.lstat(this.fullpath())),this}catch(o){this.#Y(o.code)}}lstatSync(){if((this.#e&bo)===0)try{return this.#Q(this.#o.lstatSync(this.fullpath())),this}catch(o){this.#Y(o.code)}}#Q(o){let{atime:e,atimeMs:s,birthtime:i,birthtimeMs:r,blksize:a,blocks:n,ctime:c,ctimeMs:_,dev:d,gid:g,ino:O,mode:w,mtime:z,mtimeMs:K,nlink:q,rdev:v,size:p,uid:m}=o;this.#k=e,this.#w=s,this.#W=i,this.#x=r,this.#_=a,this.#i=n,this.#G=c,this.#m=_,this.#t=d,this.#f=g,this.#n=O,this.#r=w,this.#O=z,this.#d=K,this.#s=q,this.#l=v,this.#c=p,this.#a=m;let l=Hi(o);this.#e=this.#e&xe|l|cl,l!==zo&&l!==So&&l!==gt&&(this.#e|=ge)}#T=[];#U=!1;#A(o){this.#U=!1;let e=this.#T.slice();this.#T.length=0,e.forEach(s=>s(null,o))}readdirCB(o,e=!1){if(!this.canReaddir()){e?o(null,[]):queueMicrotask(()=>o(null,[]));return}let s=this.children();if(this.calledReaddir()){let r=s.slice(0,s.provisional);e?o(null,r):queueMicrotask(()=>o(null,r));return}if(this.#T.push(o),this.#U)return;this.#U=!0;let i=this.fullpath();this.#o.readdir(i,{withFileTypes:!0},(r,a)=>{if(r)this.#X(r.code),s.provisional=0;else{for(let n of a)this.#Z(n,s);this.#M(s)}this.#A(s.slice(0,s.provisional))})}#L;async readdir(){if(!this.canReaddir())return[];let o=this.children();if(this.calledReaddir())return o.slice(0,o.provisional);let e=this.fullpath();if(this.#L)await this.#L;else{let s=()=>{};this.#L=new Promise(i=>s=i);try{for(let i of await this.#o.promises.readdir(e,{withFileTypes:!0}))this.#Z(i,o);this.#M(o)}catch(i){this.#X(i.code),o.provisional=0}this.#L=void 0,s()}return o.slice(0,o.provisional)}readdirSync(){if(!this.canReaddir())return[];let o=this.children();if(this.calledReaddir())return o.slice(0,o.provisional);let e=this.fullpath();try{for(let s of this.#o.readdirSync(e,{withFileTypes:!0}))this.#Z(s,o);this.#M(o)}catch(s){this.#X(s.code),o.provisional=0}return o.slice(0,o.provisional)}canReaddir(){if(this.#e&ll)return!1;let o=fo&this.#e;return o===zo||o===So||o===gt}shouldWalk(o,e){return(this.#e&So)===So&&!(this.#e&ll)&&!o.has(this)&&(!e||e(this))}async realpath(){if(this.#C)return this.#C;if(!((ks|zs|bo)&this.#e))try{let o=await this.#o.promises.realpath(this.fullpath());return this.#C=this.resolve(o)}catch{this.#q()}}realpathSync(){if(this.#C)return this.#C;if(!((ks|zs|bo)&this.#e))try{let o=this.#o.realpathSync(this.fullpath());return this.#C=this.resolve(o)}catch{this.#q()}}[fl](o){if(o===this)return;o.isCWD=!1,this.isCWD=!0;let e=new Set([]),s=[],i=this;for(;i&&i.parent;)e.add(i),i.#p=s.join(this.sep),i.#b=s.join("/"),i=i.parent,s.push("..");for(i=o;i&&i.parent&&!e.has(i);)i.#p=void 0,i.#b=void 0,i=i.parent}},Ws=class t extends so{sep="\\";splitSep=ug;constructor(o,e=zo,s,i,r,a,n){super(o,e,s,i,r,a,n)}newChild(o,e=zo,s={}){return new t(o,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}getRootString(o){return St.win32.parse(o).root}getRoot(o){if(o=lg(o.toUpperCase()),o===this.root.name)return this.root;for(let[e,s]of Object.entries(this.roots))if(this.sameRoot(o,e))return this.roots[o]=s;return this.roots[o]=new Ft(o,this).root}sameRoot(o,e=this.root.name){return o=o.toUpperCase().replace(/\//g,"\\").replace(gl,"$1\\"),o===e}},bs=class t extends so{splitSep="/";sep="/";constructor(o,e=zo,s,i,r,a,n){super(o,e,s,i,r,a,n)}getRootString(o){return o.startsWith("/")?"/":""}getRoot(o){return this.root}newChild(o,e=zo,s={}){return new t(o,e,this.root,this.roots,this.nocase,this.childrenCache(),s)}},vs=class{root;rootPath;roots;cwd;#o;#t;#r;nocase;#s;constructor(o=process.cwd(),e,s,{nocase:i,childrenCacheSize:r=16*1024,fs:a=me}={}){this.#s=ml(a),(o instanceof URL||o.startsWith("file://"))&&(o=(0,xl.fileURLToPath)(o));let n=e.resolve(o);this.roots=Object.create(null),this.rootPath=this.parseRootPath(n),this.#o=new Gs,this.#t=new Gs,this.#r=new or(r);let c=n.substring(this.rootPath.length).split(s);if(c.length===1&&!c[0]&&c.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#s),this.roots[this.rootPath]=this.root;let _=this.root,d=c.length-1,g=e.sep,O=this.rootPath,w=!1;for(let z of c){let K=d--;_=_.child(z,{relative:new Array(K).fill("..").join(g),relativePosix:new Array(K).fill("..").join("/"),fullpath:O+=(w?"":g)+z}),w=!0}this.cwd=_}depth(o=this.cwd){return typeof o=="string"&&(o=this.cwd.resolve(o)),o.depth()}childrenCache(){return this.#r}resolve(...o){let e="";for(let r=o.length-1;r>=0;r--){let a=o[r];if(!(!a||a===".")&&(e=e?`${a}/${e}`:a,this.isAbsolute(a)))break}let s=this.#o.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpath();return this.#o.set(e,i),i}resolvePosix(...o){let e="";for(let r=o.length-1;r>=0;r--){let a=o[r];if(!(!a||a===".")&&(e=e?`${a}/${e}`:a,this.isAbsolute(a)))break}let s=this.#t.get(e);if(s!==void 0)return s;let i=this.cwd.resolve(e).fullpathPosix();return this.#t.set(e,i),i}relative(o=this.cwd){return typeof o=="string"&&(o=this.cwd.resolve(o)),o.relative()}relativePosix(o=this.cwd){return typeof o=="string"&&(o=this.cwd.resolve(o)),o.relativePosix()}basename(o=this.cwd){return typeof o=="string"&&(o=this.cwd.resolve(o)),o.name}dirname(o=this.cwd){return typeof o=="string"&&(o=this.cwd.resolve(o)),(o.parent||o).fullpath()}async readdir(o=this.cwd,e={withFileTypes:!0}){typeof o=="string"?o=this.cwd.resolve(o):o instanceof so||(e=o,o=this.cwd);let{withFileTypes:s}=e;if(o.canReaddir()){let i=await o.readdir();return s?i:i.map(r=>r.name)}else return[]}readdirSync(o=this.cwd,e={withFileTypes:!0}){typeof o=="string"?o=this.cwd.resolve(o):o instanceof so||(e=o,o=this.cwd);let{withFileTypes:s=!0}=e;return o.canReaddir()?s?o.readdirSync():o.readdirSync().map(i=>i.name):[]}async lstat(o=this.cwd){return typeof o=="string"&&(o=this.cwd.resolve(o)),o.lstat()}lstatSync(o=this.cwd){return typeof o=="string"&&(o=this.cwd.resolve(o)),o.lstatSync()}async readlink(o=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof o=="string"?o=this.cwd.resolve(o):o instanceof so||(e=o.withFileTypes,o=this.cwd);let s=await o.readlink();return e?s:s?.fullpath()}readlinkSync(o=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof o=="string"?o=this.cwd.resolve(o):o instanceof so||(e=o.withFileTypes,o=this.cwd);let s=o.readlinkSync();return e?s:s?.fullpath()}async realpath(o=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof o=="string"?o=this.cwd.resolve(o):o instanceof so||(e=o.withFileTypes,o=this.cwd);let s=await o.realpath();return e?s:s?.fullpath()}realpathSync(o=this.cwd,{withFileTypes:e}={withFileTypes:!1}){typeof o=="string"?o=this.cwd.resolve(o):o instanceof so||(e=o.withFileTypes,o=this.cwd);let s=o.realpathSync();return e?s:s?.fullpath()}async walk(o=this.cwd,e={}){typeof o=="string"?o=this.cwd.resolve(o):o instanceof so||(e=o,o=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:a}=e,n=[];(!r||r(o))&&n.push(s?o:o.fullpath());let c=new Set,_=(g,O)=>{c.add(g),g.readdirCB((w,z)=>{if(w)return O(w);let K=z.length;if(!K)return O();let q=()=>{--K===0&&O()};for(let v of z)(!r||r(v))&&n.push(s?v:v.fullpath()),i&&v.isSymbolicLink()?v.realpath().then(p=>p?.isUnknown()?p.lstat():p).then(p=>p?.shouldWalk(c,a)?_(p,q):q()):v.shouldWalk(c,a)?_(v,q):q()},!0)},d=o;return new Promise((g,O)=>{_(d,w=>{if(w)return O(w);g(n)})})}walkSync(o=this.cwd,e={}){typeof o=="string"?o=this.cwd.resolve(o):o instanceof so||(e=o,o=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:a}=e,n=[];(!r||r(o))&&n.push(s?o:o.fullpath());let c=new Set([o]);for(let _ of c){let d=_.readdirSync();for(let g of d){(!r||r(g))&&n.push(s?g:g.fullpath());let O=g;if(g.isSymbolicLink()){if(!(i&&(O=g.realpathSync())))continue;O.isUnknown()&&O.lstatSync()}O.shouldWalk(c,a)&&c.add(O)}}return n}[Symbol.asyncIterator](){return this.iterate()}iterate(o=this.cwd,e={}){return typeof o=="string"?o=this.cwd.resolve(o):o instanceof so||(e=o,o=this.cwd),this.stream(o,e)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(o=this.cwd,e={}){typeof o=="string"?o=this.cwd.resolve(o):o instanceof so||(e=o,o=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:a}=e;(!r||r(o))&&(yield s?o:o.fullpath());let n=new Set([o]);for(let c of n){let _=c.readdirSync();for(let d of _){(!r||r(d))&&(yield s?d:d.fullpath());let g=d;if(d.isSymbolicLink()){if(!(i&&(g=d.realpathSync())))continue;g.isUnknown()&&g.lstatSync()}g.shouldWalk(n,a)&&n.add(g)}}}stream(o=this.cwd,e={}){typeof o=="string"?o=this.cwd.resolve(o):o instanceof so||(e=o,o=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:a}=e,n=new st({objectMode:!0});(!r||r(o))&&n.write(s?o:o.fullpath());let c=new Set,_=[o],d=0,g=()=>{let O=!1;for(;!O;){let w=_.shift();if(!w){d===0&&n.end();return}d++,c.add(w);let z=(q,v,p=!1)=>{if(q)return n.emit("error",q);if(i&&!p){let m=[];for(let l of v)l.isSymbolicLink()&&m.push(l.realpath().then(x=>x?.isUnknown()?x.lstat():x));if(m.length){Promise.all(m).then(()=>z(null,v,!0));return}}for(let m of v)m&&(!r||r(m))&&(n.write(s?m:m.fullpath())||(O=!0));d--;for(let m of v){let l=m.realpathCached()||m;l.shouldWalk(c,a)&&_.push(l)}O&&!n.flowing?n.once("drain",g):K||g()},K=!0;w.readdirCB(z,!0),K=!1}};return g(),n}streamSync(o=this.cwd,e={}){typeof o=="string"?o=this.cwd.resolve(o):o instanceof so||(e=o,o=this.cwd);let{withFileTypes:s=!0,follow:i=!1,filter:r,walkFilter:a}=e,n=new st({objectMode:!0}),c=new Set;(!r||r(o))&&n.write(s?o:o.fullpath());let _=[o],d=0,g=()=>{let O=!1;for(;!O;){let w=_.shift();if(!w){d===0&&n.end();return}d++,c.add(w);let z=w.readdirSync();for(let K of z)(!r||r(K))&&(n.write(s?K:K.fullpath())||(O=!0));d--;for(let K of z){let q=K;if(K.isSymbolicLink()){if(!(i&&(q=K.realpathSync())))continue;q.isUnknown()&&q.lstatSync()}q.shouldWalk(c,a)&&_.push(q)}}O&&!n.flowing&&n.once("drain",g)};return g(),n}chdir(o=this.cwd){let e=this.cwd;this.cwd=typeof o=="string"?this.cwd.resolve(o):o,this.cwd[fl](e)}},Ft=class extends vs{sep="\\";constructor(o=process.cwd(),e={}){let{nocase:s=!0}=e;super(o,St.win32,"\\",{...e,nocase:s}),this.nocase=s;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(o){return St.win32.parse(o).root.toUpperCase()}newRoot(o){return new Ws(this.rootPath,So,void 0,this.roots,this.nocase,this.childrenCache(),{fs:o})}isAbsolute(o){return o.startsWith("/")||o.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(o)}},Mt=class extends vs{sep="/";constructor(o=process.cwd(),e={}){let{nocase:s=!1}=e;super(o,St.posix,"/",{...e,nocase:s}),this.nocase=s}parseRootPath(o){return"/"}newRoot(o){return new bs(this.rootPath,So,void 0,this.roots,this.nocase,this.childrenCache(),{fs:o})}isAbsolute(o){return o.startsWith("/")}},we=class extends Mt{constructor(o=process.cwd(),e={}){let{nocase:s=!0}=e;super(o,{...e,nocase:s})}},qw=process.platform==="win32"?Ws:bs,zl=process.platform==="win32"?Ft:process.platform==="darwin"?we:Mt;var xg=t=>t.length>=1,mg=t=>t.length>=1,Vt=class t{#o;#t;#r;length;#s;#a;#f;#l;#_;#n;#c=!0;constructor(o,e,s,i){if(!xg(o))throw new TypeError("empty pattern list");if(!mg(e))throw new TypeError("empty glob list");if(e.length!==o.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=o.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#o=o,this.#t=e,this.#r=s,this.#s=i,this.#r===0){if(this.isUNC()){let[r,a,n,c,..._]=this.#o,[d,g,O,w,...z]=this.#t;_[0]===""&&(_.shift(),z.shift());let K=[r,a,n,c,""].join("/"),q=[d,g,O,w,""].join("/");this.#o=[K,..._],this.#t=[q,...z],this.length=this.#o.length}else if(this.isDrive()||this.isAbsolute()){let[r,...a]=this.#o,[n,...c]=this.#t;a[0]===""&&(a.shift(),c.shift());let _=r+"/",d=n+"/";this.#o=[_,...a],this.#t=[d,...c],this.length=this.#o.length}}}pattern(){return this.#o[this.#r]}isString(){return typeof this.#o[this.#r]=="string"}isGlobstar(){return this.#o[this.#r]===oo}isRegExp(){return this.#o[this.#r]instanceof RegExp}globString(){return this.#f=this.#f||(this.#r===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#r).join("/"))}hasMore(){return this.length>this.#r+1}rest(){return this.#a!==void 0?this.#a:this.hasMore()?(this.#a=new t(this.#o,this.#t,this.#r+1,this.#s),this.#a.#n=this.#n,this.#a.#_=this.#_,this.#a.#l=this.#l,this.#a):this.#a=null}isUNC(){let o=this.#o;return this.#_!==void 0?this.#_:this.#_=this.#s==="win32"&&this.#r===0&&o[0]===""&&o[1]===""&&typeof o[2]=="string"&&!!o[2]&&typeof o[3]=="string"&&!!o[3]}isDrive(){let o=this.#o;return this.#l!==void 0?this.#l:this.#l=this.#s==="win32"&&this.#r===0&&this.length>1&&typeof o[0]=="string"&&/^[a-z]:$/i.test(o[0])}isAbsolute(){let o=this.#o;return this.#n!==void 0?this.#n:this.#n=o[0]===""&&o.length>1||this.isDrive()||this.isUNC()}root(){let o=this.#o[0];return typeof o=="string"&&this.isAbsolute()&&this.#r===0?o:""}checkFollowGlobstar(){return!(this.#r===0||!this.isGlobstar()||!this.#c)}markFollowGlobstar(){return this.#r===0||!this.isGlobstar()||!this.#c?!1:(this.#c=!1,!0)}};var gg=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Et=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(o,{nobrace:e,nocase:s,noext:i,noglobstar:r,platform:a=gg}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:e,nocase:s,noext:i,noglobstar:r,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let n of o)this.add(n)}add(o){let e=new mo(o,this.mmopts);for(let s=0;s<e.set.length;s++){let i=e.set[s],r=e.globParts[s];if(!i||!r)throw new Error("invalid pattern object");for(;i[0]==="."&&r[0]===".";)i.shift(),r.shift();let a=new Vt(i,r,0,this.platform),n=new mo(a.globString(),this.mmopts),c=r[r.length-1]==="**",_=a.isAbsolute();_?this.absolute.push(n):this.relative.push(n),c&&(_?this.absoluteChildren.push(n):this.relativeChildren.push(n))}}ignored(o){let e=o.fullpath(),s=`${e}/`,i=o.relative()||".",r=`${i}/`;for(let a of this.relative)if(a.match(i)||a.match(r))return!0;for(let a of this.absolute)if(a.match(e)||a.match(s))return!0;return!1}childrenIgnored(o){let e=o.fullpath()+"/",s=(o.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(s))return!0;for(let i of this.absoluteChildren)if(i.match(e))return!0;return!1}};var tr=class t{store;constructor(o=new Map){this.store=o}copy(){return new t(new Map(this.store))}hasWalked(o,e){return this.store.get(o.fullpath())?.has(e.globString())}storeWalked(o,e){let s=o.fullpath(),i=this.store.get(s);i?i.add(e.globString()):this.store.set(s,new Set([e.globString()]))}},er=class{store=new Map;add(o,e,s){let i=(e?2:0)|(s?1:0),r=this.store.get(o);this.store.set(o,r===void 0?i:i&r)}entries(){return[...this.store.entries()].map(([o,e])=>[o,!!(e&2),!!(e&1)])}},sr=class{store=new Map;add(o,e){if(!o.canReaddir())return;let s=this.store.get(o);s?s.find(i=>i.globString()===e.globString())||s.push(e):this.store.set(o,[e])}get(o){let e=this.store.get(o);if(!e)throw new Error("attempting to walk unknown path");return e}entries(){return this.keys().map(o=>[o,this.store.get(o)])}keys(){return[...this.store.keys()].filter(o=>o.canReaddir())}},de=class t{hasWalkedCache;matches=new er;subwalks=new sr;patterns;follow;dot;opts;constructor(o,e){this.opts=o,this.follow=!!o.follow,this.dot=!!o.dot,this.hasWalkedCache=e?e.copy():new tr}processPatterns(o,e){this.patterns=e;let s=e.map(i=>[o,i]);for(let[i,r]of s){this.hasWalkedCache.storeWalked(i,r);let a=r.root(),n=r.isAbsolute()&&this.opts.absolute!==!1;if(a){i=i.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let g=r.rest();if(g)r=g;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let c,_,d=!1;for(;typeof(c=r.pattern())=="string"&&(_=r.rest());)i=i.resolve(c),r=_,d=!0;if(c=r.pattern(),_=r.rest(),d){if(this.hasWalkedCache.hasWalked(i,r))continue;this.hasWalkedCache.storeWalked(i,r)}if(typeof c=="string"){let g=c===".."||c===""||c===".";this.matches.add(i.resolve(c),n,g);continue}else if(c===oo){(!i.isSymbolicLink()||this.follow||r.checkFollowGlobstar())&&this.subwalks.add(i,r);let g=_?.pattern(),O=_?.rest();if(!_||(g===""||g===".")&&!O)this.matches.add(i,n,g===""||g===".");else if(g===".."){let w=i.parent||i;O?this.hasWalkedCache.hasWalked(w,O)||this.subwalks.add(w,O):this.matches.add(w,n,!0)}}else c instanceof RegExp&&this.subwalks.add(i,r)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new t(this.opts,this.hasWalkedCache)}filterEntries(o,e){let s=this.subwalks.get(o),i=this.child();for(let r of e)for(let a of s){let n=a.isAbsolute(),c=a.pattern(),_=a.rest();c===oo?i.testGlobstar(r,a,_,n):c instanceof RegExp?i.testRegExp(r,c,_,n):i.testString(r,c,_,n)}return i}testGlobstar(o,e,s,i){if((this.dot||!o.name.startsWith("."))&&(e.hasMore()||this.matches.add(o,i,!1),o.canReaddir()&&(this.follow||!o.isSymbolicLink()?this.subwalks.add(o,e):o.isSymbolicLink()&&(s&&e.checkFollowGlobstar()?this.subwalks.add(o,s):e.markFollowGlobstar()&&this.subwalks.add(o,e)))),s){let r=s.pattern();if(typeof r=="string"&&r!==".."&&r!==""&&r!==".")this.testString(o,r,s.rest(),i);else if(r===".."){let a=o.parent||o;this.subwalks.add(a,s)}else r instanceof RegExp&&this.testRegExp(o,r,s.rest(),i)}}testRegExp(o,e,s,i){e.test(o.name)&&(s?this.subwalks.add(o,s):this.matches.add(o,i,!1))}testString(o,e,s,i){o.isNamed(e)&&(s?this.subwalks.add(o,s):this.matches.add(o,i,!1))}};var Og=(t,o)=>typeof t=="string"?new Et([t],o):Array.isArray(t)?new Et(t,o):t,qs=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#o=[];#t;#r;signal;maxDepth;includeChildMatches;constructor(o,e,s){if(this.patterns=o,this.path=e,this.opts=s,this.#r=!s.posix&&s.platform==="win32"?"\\":"/",this.includeChildMatches=s.includeChildMatches!==!1,(s.ignore||!this.includeChildMatches)&&(this.#t=Og(s.ignore??[],s),!this.includeChildMatches&&typeof this.#t.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=s.maxDepth||1/0,s.signal&&(this.signal=s.signal,this.signal.addEventListener("abort",()=>{this.#o.length=0}))}#s(o){return this.seen.has(o)||!!this.#t?.ignored?.(o)}#a(o){return!!this.#t?.childrenIgnored?.(o)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let o;for(;!this.paused&&(o=this.#o.shift());)o()}onResume(o){this.signal?.aborted||(this.paused?this.#o.push(o):o())}async matchCheck(o,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=o.realpathCached()||await o.realpath(),!s)return;o=s}let r=o.isUnknown()||this.opts.stat?await o.lstat():o;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let a=await r.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(r,e)}matchCheckTest(o,e){return o&&(this.maxDepth===1/0||o.depth()<=this.maxDepth)&&(!e||o.canReaddir())&&(!this.opts.nodir||!o.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!o.isSymbolicLink()||!o.realpathCached()?.isDirectory())&&!this.#s(o)?o:void 0}matchCheckSync(o,e){if(e&&this.opts.nodir)return;let s;if(this.opts.realpath){if(s=o.realpathCached()||o.realpathSync(),!s)return;o=s}let r=o.isUnknown()||this.opts.stat?o.lstatSync():o;if(this.opts.follow&&this.opts.nodir&&r?.isSymbolicLink()){let a=r.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(r,e)}matchFinish(o,e){if(this.#s(o))return;if(!this.includeChildMatches&&this.#t?.add){let r=`${o.relativePosix()}/**`;this.#t.add(r)}let s=this.opts.absolute===void 0?e:this.opts.absolute;this.seen.add(o);let i=this.opts.mark&&o.isDirectory()?this.#r:"";if(this.opts.withFileTypes)this.matchEmit(o);else if(s){let r=this.opts.posix?o.fullpathPosix():o.fullpath();this.matchEmit(r+i)}else{let r=this.opts.posix?o.relativePosix():o.relative(),a=this.opts.dotRelative&&!r.startsWith(".."+this.#r)?"."+this.#r:"";this.matchEmit(r?a+r+i:"."+i)}}async match(o,e,s){let i=await this.matchCheck(o,s);i&&this.matchFinish(i,e)}matchSync(o,e,s){let i=this.matchCheckSync(o,s);i&&this.matchFinish(i,e)}walkCB(o,e,s){this.signal?.aborted&&s(),this.walkCB2(o,e,new de(this.opts),s)}walkCB2(o,e,s,i){if(this.#a(o))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(o,e,s,i));return}s.processPatterns(o,e);let r=1,a=()=>{--r===0&&i()};for(let[n,c,_]of s.matches.entries())this.#s(n)||(r++,this.match(n,c,_).then(()=>a()));for(let n of s.subwalkTargets()){if(this.maxDepth!==1/0&&n.depth()>=this.maxDepth)continue;r++;let c=n.readdirCached();n.calledReaddir()?this.walkCB3(n,c,s,a):n.readdirCB((_,d)=>this.walkCB3(n,d,s,a),!0)}a()}walkCB3(o,e,s,i){s=s.filterEntries(o,e);let r=1,a=()=>{--r===0&&i()};for(let[n,c,_]of s.matches.entries())this.#s(n)||(r++,this.match(n,c,_).then(()=>a()));for(let[n,c]of s.subwalks.entries())r++,this.walkCB2(n,c,s.child(),a);a()}walkCBSync(o,e,s){this.signal?.aborted&&s(),this.walkCB2Sync(o,e,new de(this.opts),s)}walkCB2Sync(o,e,s,i){if(this.#a(o))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(o,e,s,i));return}s.processPatterns(o,e);let r=1,a=()=>{--r===0&&i()};for(let[n,c,_]of s.matches.entries())this.#s(n)||this.matchSync(n,c,_);for(let n of s.subwalkTargets()){if(this.maxDepth!==1/0&&n.depth()>=this.maxDepth)continue;r++;let c=n.readdirSync();this.walkCB3Sync(n,c,s,a)}a()}walkCB3Sync(o,e,s,i){s=s.filterEntries(o,e);let r=1,a=()=>{--r===0&&i()};for(let[n,c,_]of s.matches.entries())this.#s(n)||this.matchSync(n,c,_);for(let[n,c]of s.subwalks.entries())r++,this.walkCB2Sync(n,c,s.child(),a);a()}},ye=class extends qs{matches=new Set;constructor(o,e,s){super(o,e,s)}matchEmit(o){this.matches.add(o)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((o,e)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?e(this.signal.reason):o(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},he=class extends qs{results;constructor(o,e,s){super(o,e,s),this.results=new st({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(o){this.results.write(o),this.results.flowing||this.pause()}stream(){let o=this.path;return o.isUnknown()?o.lstat().then(()=>{this.walkCB(o,this.patterns,()=>this.results.end())}):this.walkCB(o,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};var wg=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",vo=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(o,e){if(!e)throw new TypeError("glob options required");if(this.withFileTypes=!!e.withFileTypes,this.signal=e.signal,this.follow=!!e.follow,this.dot=!!e.dot,this.dotRelative=!!e.dotRelative,this.nodir=!!e.nodir,this.mark=!!e.mark,e.cwd?(e.cwd instanceof URL||e.cwd.startsWith("file://"))&&(e.cwd=(0,Kl.fileURLToPath)(e.cwd)):this.cwd="",this.cwd=e.cwd||"",this.root=e.root,this.magicalBraces=!!e.magicalBraces,this.nobrace=!!e.nobrace,this.noext=!!e.noext,this.realpath=!!e.realpath,this.absolute=e.absolute,this.includeChildMatches=e.includeChildMatches!==!1,this.noglobstar=!!e.noglobstar,this.matchBase=!!e.matchBase,this.maxDepth=typeof e.maxDepth=="number"?e.maxDepth:1/0,this.stat=!!e.stat,this.ignore=e.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof o=="string"&&(o=[o]),this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||e.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(o=o.map(c=>c.replace(/\\/g,"/"))),this.matchBase){if(e.noglobstar)throw new TypeError("base matching requires globstar");o=o.map(c=>c.includes("/")?c:`./**/${c}`)}if(this.pattern=o,this.platform=e.platform||wg,this.opts={...e,platform:this.platform},e.scurry){if(this.scurry=e.scurry,e.nocase!==void 0&&e.nocase!==e.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let c=e.platform==="win32"?Ft:e.platform==="darwin"?we:e.platform?Mt:zl;this.scurry=new c(this.cwd,{nocase:e.nocase,fs:e.fs})}this.nocase=this.scurry.nocase;let s=this.platform==="darwin"||this.platform==="win32",i={...e,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:s,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},r=this.pattern.map(c=>new mo(c,i)),[a,n]=r.reduce((c,_)=>(c[0].push(..._.set),c[1].push(..._.globParts),c),[[],[]]);this.patterns=a.map((c,_)=>{let d=n[_];if(!d)throw new Error("invalid pattern object");return new Vt(c,d,0,this.platform)})}async walk(){return[...await new ye(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new ye(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new he(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new he(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};var ir=(t,o={})=>{Array.isArray(t)||(t=[t]);for(let e of t)if(new mo(e,o).hasMagic())return!0;return!1};function Cs(t,o={}){return new vo(t,o).streamSync()}function Gl(t,o={}){return new vo(t,o).stream()}function Wl(t,o={}){return new vo(t,o).walkSync()}async function kl(t,o={}){return new vo(t,o).walk()}function Ns(t,o={}){return new vo(t,o).iterateSync()}function bl(t,o={}){return new vo(t,o).iterate()}var dg=Cs,yg=Object.assign(Gl,{sync:Cs}),hg=Ns,fg=Object.assign(bl,{sync:Ns}),zg=Object.assign(Wl,{stream:Cs,iterate:Ns}),ps=Object.assign(kl,{glob:kl,globSync:Wl,sync:zg,globStream:Gl,stream:yg,globStreamSync:Cs,streamSync:dg,globIterate:bl,iterate:fg,globIterateSync:Ns,iterateSync:hg,Glob:vo,hasMagic:ir,escape:vt,unescape:Go});ps.glob=ps;var Cl=I(require("node:assert")),Xt=I(require("node:fs/promises")),no=I(require("node:path"));var pl=I(vl());function Ss(t){return ql(t)||ql((0,pl.default)(t))||"app"}function ql(t){return t.replace(/[\W_]+/g,"").normalize("NFD").replace(/[\u0300-\u036f]/g,"")}async function Nl(t){let{spawnAsync:o,sourceAppPath:e}=t,s=no.default.join(t.workingDirectory,"extracted");if(await Xt.default.mkdir(s,{recursive:!0}),e.endsWith(".zip")||e.endsWith(".ipa"))await o("unzip",[e,"-d",s]);else if(e.endsWith(".tar.gz"))await o("tar",["-xzf",e,"-C",s]);else if(e.endsWith(".app")){let a=no.default.basename(e);await Gt(e,no.default.join(s,a))}else throw new Error("Unsupported file type. Please provide a .zip, .tar.gz, or .app file.");let r=(await ps("{Payload/*.app,*.app}",{cwd:s,absolute:!0}))[0];return(0,Cl.default)(r,`Failed to find the .app directory in the extracted artifact: ${s}`),r}async function Sl(t,o){let{dir:e,name:s}=no.default.parse(o),i=Ss(t.name),r=no.default.join(e,`${i}.app`);return await Xt.default.rename(no.default.join(e,`${s}.app`),r),await Xt.default.rename(no.default.join(r,s),no.default.join(r,i)),r}async function Fl(t,o){let e=no.default.resolve(t.workingDirectory,no.default.basename(o));return await Gt(o,e),e}async function Ml(t,o){let{spawnAsync:e,workingDirectory:s}=t;await Xt.default.mkdir(no.default.join(s,"Payload"),{recursive:!0}),await Xt.default.rename(o,no.default.join(s,"Payload",no.default.basename(o)));let i=no.default.resolve(s,"repacked.ipa");return await e("zip",["-r",i,"Payload"],{cwd:s}),i}function Vl(t,o,e){let s=e.keychainPath?`keychain_path: "${e.keychainPath}",`:"",i;if(typeof e.provisioningProfile=="string")i=`provisioning_profile: "${e.provisioningProfile}",`;else if(typeof e.provisioningProfile=="object"&&!Array.isArray(e.provisioningProfile)){let a="";for(let[n,c]of Object.entries(e.provisioningProfile))a+=` "${n}" => "${c}",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/repack-app",
3
- "version": "0.1.15",
3
+ "version": "0.2.0",
4
4
  "description": "Repacking tool for Expo apps",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "dist"
25
25
  ],
26
26
  "author": "650 Industries, Inc.",
27
- "license": "BUSL-1.1",
27
+ "license": "MIT",
28
28
  "dependencies": {
29
29
  "commander": "^13.1.0",
30
30
  "picocolors": "^1.1.1"