| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 |
|
| 11 | import { flattenAndRankRoutes, matchRoutesImpl } from "./utils.js";
|
| 12 |
|
| 13 | var V6RegExMatcher = class {
|
| 14 | #routes = [];
|
| 15 | #branches = [];
|
| 16 | #basename;
|
| 17 | constructor(basename) {
|
| 18 | this.#basename = basename;
|
| 19 | }
|
| 20 | update(routes) {
|
| 21 | this.#routes = routes;
|
| 22 | this.#branches = flattenAndRankRoutes(routes);
|
| 23 | }
|
| 24 | match(locationArg, allowPartial = false) {
|
| 25 | return matchRoutesImpl(this.#routes, locationArg, this.#basename, allowPartial, this.#branches);
|
| 26 | }
|
| 27 | };
|
| 28 |
|
| 29 | export { V6RegExMatcher };
|