@vyredo/module-kit 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,155 @@
1
- # Temporary Holding Version
1
+ # @vyredo/module-kit
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Point it at a folder, and every subfolder with a `manifest.ts` becomes an isolated module:
4
+
5
+ - **Manifests** declare each module's id and what it depends on.
6
+ - **Dependency checks** refuse unknown ids, self-references, an id in both lists and cycles, and keep core modules apart.
7
+ - **Isolation**: each module gets its own `tsconfig.json`. In it, the import alias resolves only the modules that module declared, and only their public paths, so the editor flags an undeclared dependency as you type.
8
+ - **Boundary check**: a CI-ready check of every import, with the same rules, for code the editor never opened.
9
+ - **Realms** (optional): split each module into `node/`, `browser/`, `worker/` or any names you choose, and code in one realm can't import another.
10
+ - **Typed clients over [`@vyredo/rpc-bus`](../rpc-bus)** (optional): call any module's public members from anywhere, with the class's own types.
11
+ - **Runtime host**: starts modules in dependency order and answers their calls on the bus.
12
+
13
+ ## Install
14
+
15
+ ```bash
16
+ npm install -D @vyredo/module-kit typescript-6@npm:typescript@^6.0.3
17
+ npm install @vyredo/rpc-bus # only for the rpc clients and the runtime host
18
+ ```
19
+
20
+ ## Layout
21
+
22
+ ```
23
+ src/modules/ <- `root`
24
+ Session/
25
+ manifest.ts <- makes the folder a module
26
+ shared/types.ts <- public: other modules may import it
27
+ node/index.ts <- the node realm's class (realms on)
28
+ browser/index.ts <- the browser realm's class
29
+ node/services/... <- private to Session
30
+ Replay/
31
+ manifest.ts
32
+ index.ts <- the module's class (realms off)
33
+ ```
34
+
35
+ The search stops at a folder with a `manifest.ts`, so a module's own subfolders are never modules. Folders named `node_modules`, `.generated`, `shared`, a realm, or listed in `ignore` are never searched.
36
+
37
+ ## Manifest
38
+
39
+ ```ts
40
+ // src/modules/Replay/manifest.ts
41
+ import { defineManifest } from "@vyredo/module-kit/runtime";
42
+
43
+ export default defineManifest({
44
+ id: "Replay", // unique; an identifier
45
+ version: "1.0.0",
46
+ requireModules: ["Session"], // starts after Session; may call it
47
+ optionalModules: ["Score"], // may call Score when it is there
48
+ // core: true, // available to every module without listing
49
+ });
50
+ ```
51
+
52
+ The kit reads the literal from the file and never runs it, so values must be literals. `defineManifest(...)`, `satisfies` and `as const` are all fine.
53
+
54
+ ## The class: what a module exposes
55
+
56
+ ```ts
57
+ // src/modules/Session/node/index.ts
58
+ import { createSession } from "./services/create";
59
+
60
+ export default class SessionNode {
61
+ public Create = createSession; // public: any module may call it
62
+ List = async () => []; // no modifier: public too
63
+ protected Sweep = async (p: { olderThanMs: number }) => 0; // only Session itself
64
+ private cache = new Map(); // never exposed
65
+ onStart = () => () => this.cache.clear(); // hook; returns a cleanup
66
+ onStop = () => {}; // hook
67
+ }
68
+ ```
69
+
70
+ Exposed members are methods, and properties initialised with a function or a reference to one. Members take one object parameter. Don't give it a `type` field: the bus uses `type` for the event name and overwrites it.
71
+
72
+ ## Config: `module-kit.config.json`
73
+
74
+ ```json
75
+ {
76
+ "root": "src/modules",
77
+ "realms": ["node", "browser"],
78
+ "alias": "@modules",
79
+ "publicPaths": ["manifest.ts", "shared/**"],
80
+ "tsconfigBase": "tsconfig.base.json",
81
+ "rpc": { "bus": { "from": "./src/bus", "name": "getBus" } }
82
+ }
83
+ ```
84
+
85
+ Only `root` is required. Paths are relative to the config file.
86
+
87
+ | Field | Default | Meaning |
88
+ |---|---|---|
89
+ | `realms` | none | Realm folders. Without it, each module has one class in `index.ts`. |
90
+ | `alias` | `@modules` | The import prefix: `@modules/Session`. |
91
+ | `publicPaths` | `["manifest.ts", "shared/**"]` | What other modules may import. `.generated/**` is always public. |
92
+ | `tsconfigBase` | none | What each module's tsconfig extends. Its own `paths` are carried over. |
93
+ | `rpc` | none | Generate rpc-bus clients. `from` exports a function `name()` that returns the bus. |
94
+ | `ignore` | `[]` | More folder names never searched for modules. |
95
+
96
+ ## Commands
97
+
98
+ ```bash
99
+ npx module-kit generate # scan, check, write .generated/ and each module's tsconfig.json
100
+ npx module-kit generate --check # write nothing; exit 1 if anything is stale (CI)
101
+ npx module-kit check # the boundary check only
102
+ npx module-kit scan [--json] # the modules in start order
103
+ ```
104
+
105
+ ## Calling another module
106
+
107
+ ```ts
108
+ // src/modules/Replay/node/services/replay.ts
109
+ import { Session } from "@modules/Session"; // the client (rpc)
110
+ import type { SessionRow } from "@modules/Session/shared/types"; // a public path
111
+
112
+ export const replay = async (p: { id: string }): Promise<SessionRow> =>
113
+ Session.Node.Create({ id: p.id }); // typed from SessionNode.Create
114
+ ```
115
+
116
+ A module calls its own protected members through `@modules/<Id>/protected` (`SessionProtected.Node.Sweep(...)`). This is how one realm reaches the other.
117
+
118
+ To make the alias resolve in the app's own build, extend `<root>/.generated/tsconfig.paths.json`, or feed `<root>/.generated/aliases.json` to your bundler.
119
+
120
+ ## The rules `check` enforces
121
+
122
+ 1. Another module is reached only through `@modules/<Id>`, either its client or one of its public paths. A relative path into another module's folder is refused.
123
+ 2. A **value** import of another module needs it in `requireModules` or `optionalModules`. Type-only imports and core modules don't.
124
+ 3. `@modules/<Id>/protected` is only for module `<Id>` itself.
125
+ 4. With realms, a realm folder never imports a different realm, and `shared/` imports none.
126
+ 5. `.generated/surface*` files are imported with `import type` only, because they load the realm class.
127
+
128
+ ## Runtime host
129
+
130
+ ```ts
131
+ import { createEventBus } from "@vyredo/rpc-bus";
132
+ import { createModuleHost } from "@vyredo/module-kit/runtime";
133
+ import modules from "./modules/.generated/registry.node";
134
+
135
+ const host = createModuleHost({ modules, bus: createEventBus("main", { transports: [/* ... */] }) });
136
+ await host.startAll(); // in start order; a failing module is logged and the rest still start
137
+ await host.stop("Session"); // its dependents keep running
138
+ ```
139
+
140
+ Dependencies decide start order and nothing else. A module whose required module is down still starts, with a warning. Stopping a module never stops the modules that use it. Calls to a stopped module reject with `"<Id> is not running"` and log a warning. `host.status()` and `host.onChange()` report each module's state (`stopped`, `starting`, `running`, `failed`).
141
+
142
+ ## What is generated
143
+
144
+ | File | What it is |
145
+ |---|---|
146
+ | `<module>/.generated/surface.<realm>.ts` | The class's public members (`Pick`) and its protected ones (re-exposed through a subclass, so their types come from TypeScript itself) |
147
+ | `<module>/.generated/api.ts` | `<Id>Api` (what others see) and `<Id>ProtectedApi` |
148
+ | `<module>/.generated/client.ts`, `client.protected.ts` | The rpc-bus clients `<Id>` and `<Id>Protected` |
149
+ | `<module>/.generated/index.ts`, `protected.ts` | What `@modules/<Id>` and `@modules/<Id>/protected` resolve to |
150
+ | `<module>/tsconfig.json` | The module's isolated program |
151
+ | `<root>/.generated/modules.json` | The scan: modules, start order, members and events |
152
+ | `<root>/.generated/registry[.<realm>].ts` | The classes and manifest facts, for the host |
153
+ | `<root>/.generated/aliases.json`, `tsconfig.paths.json` | The alias table, for a bundler and for the app's tsconfig |
154
+
155
+ Generated files carry a header. Only files with that header are ever overwritten or removed, so a hand-written `tsconfig.json` in a module folder is reported, never replaced.
package/dist/bind.d.ts ADDED
@@ -0,0 +1,26 @@
1
+ import type { Member } from "./types";
2
+ /** The part of `EventBus` the host needs. */
3
+ export interface HostBus {
4
+ on(channel: string, cb: (event: {
5
+ type: string;
6
+ }) => unknown, claims?: string[]): string;
7
+ off(channel: string, handlerId: string): void;
8
+ }
9
+ export interface HostLogger {
10
+ info(message: string, meta?: Record<string, unknown>): void;
11
+ warn(message: string, meta?: Record<string, unknown>): void;
12
+ error(message: string, meta?: Record<string, unknown>): void;
13
+ }
14
+ /**
15
+ * Bind a module instance's members on the bus: one handler on the module's
16
+ * channel claiming every member's event, calling the member with the request's
17
+ * params (the event without its `type`). For a host of your own; `createModuleHost`
18
+ * uses it. Returns the handler id and an unbind, or null for a class with no members.
19
+ */
20
+ export declare function bindModule(bus: HostBus, entry: {
21
+ id: string;
22
+ members: readonly Member[];
23
+ }, instance: object): {
24
+ handlerId: string;
25
+ unbind: () => void;
26
+ } | null;
@@ -0,0 +1,9 @@
1
+ import type { Issue, ModuleGraph, ResolvedConfig } from "./types";
2
+ export interface ImportRef {
3
+ spec: string;
4
+ typeOnly: boolean;
5
+ line: number;
6
+ }
7
+ /** Every module specifier a file names, and whether each is type-only. */
8
+ export declare function importsOf(file: string): ImportRef[];
9
+ export declare function checkBoundaries(graph: ModuleGraph, config: ResolvedConfig): Issue[];
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ const _0x26279c=_0x2713;(function(_0x27bce7,_0x18bb13){const _0x4b865c=_0x2713,_0x503c8d=_0x27bce7();while(!![]){try{const _0x1cb569=parseInt(_0x4b865c(0x180))/0x1+parseInt(_0x4b865c(0x217))/0x2+parseInt(_0x4b865c(0x232))/0x3*(-parseInt(_0x4b865c(0x1c6))/0x4)+parseInt(_0x4b865c(0x21e))/0x5*(parseInt(_0x4b865c(0x234))/0x6)+-parseInt(_0x4b865c(0x1a2))/0x7+-parseInt(_0x4b865c(0x1ec))/0x8+-parseInt(_0x4b865c(0x24a))/0x9;if(_0x1cb569===_0x18bb13)break;else _0x503c8d['push'](_0x503c8d['shift']());}catch(_0x3c4c1b){_0x503c8d['push'](_0x503c8d['shift']());}}}(_0x2f4f,0x4974b));import{resolve as _0x1411aa}from'node:path';import{existsSync as _0x10f2cf,readFileSync as _0x477e7c}from'node:fs';import{dirname as _0x8a212d,resolve as _0x4c0fce}from'node:path';var de=_0x26279c(0x25d),ce=/^[a-z][a-z0-9]*$/;function Ge(_0x2e3e92,_0xe5294f){const _0x230b7b=_0x26279c;if(!_0x2e3e92[_0x230b7b(0x15f)])throw new Error('module-kit:\x20`root`\x20is\x20required');let _0x1debae=_0x2e3e92['realms']&&_0x2e3e92[_0x230b7b(0x1a4)][_0x230b7b(0x27f)]>0x0?[..._0x2e3e92[_0x230b7b(0x1a4)]]:null;for(let _0x369058 of _0x1debae??[])if(!ce[_0x230b7b(0x25e)](_0x369058))throw new Error(_0x230b7b(0x258)+_0x369058+_0x230b7b(0x212));if(_0x1debae&&new Set(_0x1debae)[_0x230b7b(0x244)]!==_0x1debae[_0x230b7b(0x27f)])throw new Error(_0x230b7b(0x27e));let _0x1ea08c=(_0x2e3e92['alias']??_0x230b7b(0x20b))[_0x230b7b(0x215)](/\/+$/,'');if(!_0x1ea08c)throw new Error(_0x230b7b(0x18d));for(let [_0x1b1d51,_0x2ce7d4]of Object['entries'](_0x2e3e92['views']??{})){if(!ce[_0x230b7b(0x25e)](_0x1b1d51))throw new Error('module-kit:\x20view\x20\x22'+_0x1b1d51+'\x22\x20must\x20be\x20lowercase\x20letters\x20and\x20digits,\x20starting\x20with\x20a\x20letter');for(let _0x14b2c3 of _0x2ce7d4)if(!_0x1debae?.[_0x230b7b(0x1c2)](_0x14b2c3))throw new Error(_0x230b7b(0x24d)+_0x1b1d51+_0x230b7b(0x26e)+_0x14b2c3+'\x22,\x20which\x20is\x20not\x20in\x20`realms`');}for(let _0x1cb1fc of _0x2e3e92[_0x230b7b(0x17f)]??[]){if(_0x1cb1fc[_0x230b7b(0x240)]&&!(_0x2e3e92[_0x230b7b(0x22d)]??{})[_0x1cb1fc[_0x230b7b(0x240)]])throw new Error('module-kit:\x20tsconfigPaths\x20\x22'+_0x1cb1fc[_0x230b7b(0x1ea)]+'\x22\x20names\x20view\x20\x22'+_0x1cb1fc[_0x230b7b(0x240)]+'\x22,\x20which\x20`views`\x20does\x20not\x20define');if(_0x1cb1fc[_0x230b7b(0x1b0)]==='write'&&!_0x1cb1fc[_0x230b7b(0x29b)])throw new Error(_0x230b7b(0x2aa)+_0x1cb1fc[_0x230b7b(0x1ea)]+_0x230b7b(0x1db));}for(let _0x445aad of Object[_0x230b7b(0x2b9)](_0x2e3e92[_0x230b7b(0x250)]??{}))if(!/^[A-Za-z0-9_-]+$/['test'](_0x445aad)||_0x445aad==='protected')throw new Error(_0x230b7b(0x23d)+_0x445aad+_0x230b7b(0x1d4));return{'cwd':_0xe5294f,'root':_0x4c0fce(_0xe5294f,_0x2e3e92[_0x230b7b(0x15f)]),'realms':_0x1debae,'alias':_0x1ea08c,'publicPaths':_0x2e3e92[_0x230b7b(0x1cd)]?[..._0x2e3e92[_0x230b7b(0x1cd)]]:['manifest.ts',_0x230b7b(0x28a)],'ignore':new Set([_0x230b7b(0x209),_0x230b7b(0x293),_0x230b7b(0x288),'__fixtures__',..._0x1debae??[],..._0x2e3e92[_0x230b7b(0x1b8)]??[]]),'tsconfigBase':_0x2e3e92[_0x230b7b(0x154)]?_0x4c0fce(_0xe5294f,_0x2e3e92[_0x230b7b(0x154)]):null,'rpc':_0x2e3e92[_0x230b7b(0x1fc)]??null,'manifestFields':{..._0x2e3e92[_0x230b7b(0x1e3)]??{}},'hooks':_0x2e3e92['hooks']?[..._0x2e3e92[_0x230b7b(0x158)]]:[_0x230b7b(0x1ac),_0x230b7b(0x27b)],'timeoutsField':_0x2e3e92[_0x230b7b(0x1e4)]??_0x230b7b(0x267),'exports':{..._0x2e3e92[_0x230b7b(0x250)]??{}},'callUp':_0x2e3e92[_0x230b7b(0x16a)]??_0x230b7b(0x264),'tsconfigPaths':[..._0x2e3e92[_0x230b7b(0x17f)]??[]],'plugins':(_0x2e3e92[_0x230b7b(0x261)]??[])[_0x230b7b(0x254)](_0x40150c=>_0x4c0fce(_0xe5294f,_0x40150c)),'views':Object[_0x230b7b(0x1d0)](Object[_0x230b7b(0x299)](_0x2e3e92[_0x230b7b(0x22d)]??{})[_0x230b7b(0x254)](([_0x19194e,_0x3247b2])=>[_0x19194e,[..._0x3247b2]])),'checkExclude':[..._0x2e3e92[_0x230b7b(0x190)]??[]],'tsconfig':{'compilerOptions':{..._0x2e3e92[_0x230b7b(0x2bb)]?.['compilerOptions']??{}},'exclude':[..._0x2e3e92['tsconfig']?.[_0x230b7b(0x1dd)]??[]],'include':(_0x2e3e92['tsconfig']?.['include']??[])[_0x230b7b(0x254)](_0x67e2ca=>_0x4c0fce(_0xe5294f,_0x67e2ca)),'isolation':_0x2e3e92[_0x230b7b(0x2bb)]?.[_0x230b7b(0x20f)]??_0x230b7b(0x220)}};}function ue(_0x2a7d4d){const _0xb37fa9=_0x26279c;let _0x3e7eed=_0x4c0fce(_0x2a7d4d);if(!_0x10f2cf(_0x3e7eed))throw new Error('module-kit:\x20no\x20config\x20at\x20'+_0x3e7eed);let _0x4f21e2;try{_0x4f21e2=JSON[_0xb37fa9(0x17d)](_0x477e7c(_0x3e7eed,_0xb37fa9(0x207)));}catch(_0x19df03){throw new Error(_0xb37fa9(0x236)+_0x3e7eed+'\x20is\x20not\x20valid\x20JSON:\x20'+_0x19df03[_0xb37fa9(0x201)]);}return Ge(_0x4f21e2,_0x8a212d(_0x3e7eed));}var fe=_0x5093d7=>_0x5093d7[0x0][_0x26279c(0x155)]()+_0x5093d7[_0x26279c(0x15a)](0x1);import{existsSync as _0xd009af,readdirSync as _0x1c93ec,readFileSync as _0x3f81ba,statSync as _0x967f53}from'node:fs';import{dirname as _0x39fad3,join as _0x520add,relative as _0x3cda75,resolve as _0x2a0d0d,sep as _0x48f3ad}from'node:path';import _0x4e2725 from'typescript-6';import{relative as _0xbc528c,sep as _0x1230de}from'node:path';var y=_0x475754=>_0x475754[_0x26279c(0x253)](_0x1230de)['join']('/');function Y(_0x57890f,_0x48ed4a){const _0x55b1f4=_0x26279c;let _0x5d3ab5=y(_0xbc528c(_0x57890f,_0x48ed4a))['replace'](/\.tsx?$/,'');return _0x5d3ab5[_0x55b1f4(0x25a)]('./')||_0x5d3ab5[_0x55b1f4(0x25a)]('../')?_0x5d3ab5:'./'+_0x5d3ab5;}function J(_0x2b8393,_0x119a0c){const _0x1ec9b6=_0x26279c;let _0x23110a='';for(let _0x2eaa25=0x0;_0x2eaa25<_0x2b8393['length'];_0x2eaa25++){let _0x536a8f=_0x2b8393[_0x2eaa25];if(_0x536a8f==='*'&&_0x2b8393[_0x2eaa25+0x1]==='*'){let _0x187efa=_0x2b8393[_0x2eaa25+0x2]==='/';_0x23110a+=_0x187efa?_0x1ec9b6(0x210):'.*',_0x2eaa25+=_0x187efa?0x2:0x1;}else _0x536a8f==='*'?_0x23110a+=_0x1ec9b6(0x194):_0x23110a+=_0x536a8f[_0x1ec9b6(0x215)](/[.+?^${}()|[\]\\]/g,_0x1ec9b6(0x165));}return _0x2b8393[_0x1ec9b6(0x208)](_0x1ec9b6(0x1e1))&&(_0x23110a=_0x23110a[_0x1ec9b6(0x15a)](0x0,-0x3)+_0x1ec9b6(0x189)),new RegExp('^'+_0x23110a+'$')[_0x1ec9b6(0x25e)](_0x119a0c);}var He=/\.(ts|tsx|mts|cts|js|jsx|mjs|cjs)$/,Ze=new Set([_0x26279c(0x209),_0x26279c(0x293)]);function Xe(_0x5ee4de){const _0x4a9d24=_0x26279c;let _0x3c9c73=_0x3f81ba(_0x5ee4de,'utf8'),_0x19778e=_0x4e2725[_0x4a9d24(0x1b9)](_0x5ee4de,_0x3c9c73,_0x4e2725['ScriptTarget'][_0x4a9d24(0x2b8)],!0x0,/x$/[_0x4a9d24(0x25e)](_0x5ee4de)?_0x4e2725[_0x4a9d24(0x162)]['TSX']:_0x4e2725[_0x4a9d24(0x162)]['TS']),_0x57897e=[],_0x3b3377=_0x47964d=>_0x19778e[_0x4a9d24(0x1e8)](_0x47964d[_0x4a9d24(0x227)](_0x19778e))[_0x4a9d24(0x172)]+0x1,_0x235e9f=(_0x314f3d,_0x252445,_0x3e178a)=>{const _0x4d6cc4=_0x4a9d24;_0x314f3d&&(_0x4e2725[_0x4d6cc4(0x282)](_0x314f3d)||_0x4e2725[_0x4d6cc4(0x2a5)](_0x314f3d))&&_0x57897e[_0x4d6cc4(0x287)]({'spec':_0x314f3d['text'],'typeOnly':_0x252445,'line':_0x3b3377(_0x3e178a)});},_0x35c4d7=_0x242a7c=>{const _0x418263=_0x4a9d24;if(_0x4e2725[_0x418263(0x1cf)](_0x242a7c)){let _0x3409b6=_0x242a7c[_0x418263(0x159)],_0x1226a1=!!_0x3409b6&&(_0x3409b6[_0x418263(0x1b1)]||!_0x3409b6[_0x418263(0x1a1)]&&!!_0x3409b6[_0x418263(0x28e)]&&_0x4e2725[_0x418263(0x1ce)](_0x3409b6[_0x418263(0x28e)])&&_0x3409b6[_0x418263(0x28e)]['elements']['length']>0x0&&_0x3409b6[_0x418263(0x28e)]['elements'][_0x418263(0x204)](_0x4431b6=>_0x4431b6['isTypeOnly']));_0x235e9f(_0x242a7c[_0x418263(0x213)],_0x1226a1,_0x242a7c);}else{if(_0x4e2725[_0x418263(0x193)](_0x242a7c)&&_0x242a7c['moduleSpecifier']){let _0x2be2a2=_0x242a7c['isTypeOnly']||!!_0x242a7c['exportClause']&&_0x4e2725['isNamedExports'](_0x242a7c['exportClause'])&&_0x242a7c[_0x418263(0x1c1)][_0x418263(0x1f0)]['length']>0x0&&_0x242a7c[_0x418263(0x1c1)][_0x418263(0x1f0)][_0x418263(0x204)](_0x21731d=>_0x21731d[_0x418263(0x1b1)]);_0x235e9f(_0x242a7c['moduleSpecifier'],_0x2be2a2,_0x242a7c);}else _0x4e2725[_0x418263(0x2ac)](_0x242a7c)&&_0x4e2725[_0x418263(0x206)](_0x242a7c[_0x418263(0x18b)])?_0x235e9f(_0x242a7c['moduleReference'][_0x418263(0x252)],_0x242a7c[_0x418263(0x1b1)],_0x242a7c):_0x4e2725['isCallExpression'](_0x242a7c)&&(_0x242a7c[_0x418263(0x252)][_0x418263(0x16f)]===_0x4e2725[_0x418263(0x239)][_0x418263(0x198)]||_0x4e2725[_0x418263(0x283)](_0x242a7c['expression'])&&_0x242a7c[_0x418263(0x252)][_0x418263(0x21a)]===_0x418263(0x2a0))?_0x235e9f(_0x242a7c[_0x418263(0x226)][0x0],!0x1,_0x242a7c):_0x4e2725[_0x418263(0x2ba)](_0x242a7c)&&_0x4e2725[_0x418263(0x1b4)](_0x242a7c[_0x418263(0x1bf)])&&_0x235e9f(_0x242a7c['argument'][_0x418263(0x1eb)],!0x0,_0x242a7c);}_0x4e2725[_0x418263(0x1ba)](_0x242a7c,_0x35c4d7);};return _0x35c4d7(_0x19778e),_0x57897e;}function me(_0x57d5b4,_0xf8e42d=[]){const _0x3b97c5=_0x26279c;for(let _0x29d71b of _0x1c93ec(_0x57d5b4,{'withFileTypes':!0x0}))_0x29d71b[_0x3b97c5(0x1af)]()?Ze[_0x3b97c5(0x15c)](_0x29d71b['name'])||me(_0x520add(_0x57d5b4,_0x29d71b[_0x3b97c5(0x1a1)]),_0xf8e42d):He[_0x3b97c5(0x25e)](_0x29d71b[_0x3b97c5(0x1a1)])&&!_0x29d71b[_0x3b97c5(0x1a1)]['endsWith'](_0x3b97c5(0x219))&&_0xf8e42d[_0x3b97c5(0x287)](_0x520add(_0x57d5b4,_0x29d71b[_0x3b97c5(0x1a1)]));return _0xf8e42d;}function Ye(_0x46c122,_0x338dea){const _0x11794c=_0x26279c;let _0x5002a6=_0x2a0d0d(_0x39fad3(_0x46c122),_0x338dea);return[_0x5002a6,...[_0x11794c(0x169),_0x11794c(0x1b3),_0x11794c(0x20d),_0x11794c(0x174)][_0x11794c(0x254)](_0x5a629b=>_0x5002a6['replace'](/\.js$/,'')+_0x5a629b),_0x520add(_0x5002a6,_0x11794c(0x161)),_0x520add(_0x5002a6,_0x11794c(0x1c0))]['find'](_0x73e8b7=>_0xd009af(_0x73e8b7)&&_0x967f53(_0x73e8b7)['isFile']())??_0x5002a6;}function pe(_0x2467f3,_0x25a3b5){const _0x39ffaf=_0x26279c;let _0x189150=[],_0x496fc0=new Map(_0x2467f3[_0x39ffaf(0x1a3)]['map'](_0x131016=>[_0x131016['id'],_0x131016])),_0x2b1937=_0x20e1e3=>_0x520add(_0x25a3b5[_0x39ffaf(0x15f)],_0x20e1e3['path']),_0x3fe4d4=[..._0x2467f3[_0x39ffaf(0x1a3)]][_0x39ffaf(0x277)]((_0x3b4936,_0xff81b)=>_0xff81b[_0x39ffaf(0x26a)][_0x39ffaf(0x27f)]-_0x3b4936[_0x39ffaf(0x26a)][_0x39ffaf(0x27f)]),_0x14e24c=_0xf37fe0=>_0x3fe4d4[_0x39ffaf(0x1d6)](_0x34aebc=>_0xf37fe0===_0x2b1937(_0x34aebc)||_0xf37fe0[_0x39ffaf(0x25a)](_0x2b1937(_0x34aebc)+_0x48f3ad)),_0x101025=new Set(_0x25a3b5['realms']??[]),_0x5c6625=(_0x35c51a,_0x5207d0)=>{const _0x4f0e7c=_0x39ffaf;let _0x517349=y(_0x3cda75(_0x2b1937(_0x35c51a),_0x5207d0))[_0x4f0e7c(0x253)]('/')[0x0];return _0x101025[_0x4f0e7c(0x15c)](_0x517349)||_0x517349===_0x4f0e7c(0x288)?_0x517349:null;},_0xae6003=_0x517b0f=>_0x517b0f in _0x25a3b5[_0x39ffaf(0x250)]||_0x517b0f[_0x39ffaf(0x25a)]('.generated/')||_0x25a3b5[_0x39ffaf(0x1cd)][_0x39ffaf(0x156)](_0x5b3a7a=>J(_0x5b3a7a,_0x517b0f)||J(_0x5b3a7a,_0x517b0f+_0x39ffaf(0x169))||J(_0x5b3a7a,_0x517b0f+_0x39ffaf(0x1b3))),_0xdee385=_0x1f62cd=>{let _0x2b4c13=new Set(),_0x1dbf2f=_0xdab34=>{const _0x1e3f30=_0x2713;for(let _0x11cfd4 of _0x2467f3[_0x1e3f30(0x1a3)])_0x2b4c13[_0x1e3f30(0x15c)](_0x11cfd4['id'])||!(_0x11cfd4[_0x1e3f30(0x1c4)][_0x1e3f30(0x1c2)](_0xdab34)||_0x11cfd4['optional'][_0x1e3f30(0x1c2)](_0xdab34))||(_0x2b4c13['add'](_0x11cfd4['id']),_0x1dbf2f(_0x11cfd4['id']));};return _0x1dbf2f(_0x1f62cd),_0x2b4c13;};for(let _0x2be41d of _0x2467f3['modules']){let _0x2b88b5=new Set([..._0x2be41d[_0x39ffaf(0x1c4)],..._0x2be41d[_0x39ffaf(0x24f)]]),_0x4824e4=_0x25a3b5['callUp']===_0x39ffaf(0x1e9)?_0xdee385(_0x2be41d['id']):new Set();for(let _0x594fc9 of me(_0x2b1937(_0x2be41d))){let _0x1725b1=y(_0x3cda75(_0x25a3b5[_0x39ffaf(0x15f)],_0x594fc9));if(_0x25a3b5[_0x39ffaf(0x190)][_0x39ffaf(0x156)](_0x37c079=>J(_0x37c079,_0x1725b1)))continue;let _0x2c9d84=y(_0x3cda75(_0x25a3b5[_0x39ffaf(0x203)],_0x594fc9)),_0x2f9218=_0x5c6625(_0x2be41d,_0x594fc9),_0x5d8b98=(_0x2b059e,_0x3c9a1d)=>_0x189150[_0x39ffaf(0x287)]({'file':_0x2c9d84,'line':_0x2b059e,'message':_0x3c9a1d}),_0x489b7b=(_0x4d6d77,_0x2b1c46,_0x1d0fda)=>{const _0x2ee29c=_0x39ffaf;let _0x24a3d1=_0x5c6625(_0x2be41d,_0x1d0fda);!_0x24a3d1||_0x24a3d1===_0x2ee29c(0x288)||!_0x2f9218||_0x24a3d1===_0x2f9218||_0x5d8b98(_0x4d6d77,_0x2f9218===_0x2ee29c(0x288)?_0x2ee29c(0x29c)+_0x24a3d1+_0x2ee29c(0x1c7)+_0x2b1c46+_0x2ee29c(0x2af):_0x2f9218+_0x2ee29c(0x259)+_0x24a3d1+_0x2ee29c(0x1c7)+_0x2b1c46+')');};for(let _0x5b89e1 of Xe(_0x594fc9)){let {spec:_0x1bc917,typeOnly:_0x2b46e5,line:_0x1ed0c7}=_0x5b89e1;if(_0x1bc917===_0x25a3b5[_0x39ffaf(0x1ad)]||_0x1bc917[_0x39ffaf(0x25a)](_0x25a3b5[_0x39ffaf(0x1ad)]+'/')){let [_0x39bb6d='',..._0x53eed9]=_0x1bc917[_0x39ffaf(0x15a)](_0x25a3b5[_0x39ffaf(0x1ad)][_0x39ffaf(0x27f)]+0x1)[_0x39ffaf(0x253)]('/'),_0x4f0784=_0x53eed9['join']('/'),_0x2dab07=_0x496fc0['get'](_0x39bb6d);if(!_0x2dab07){_0x5d8b98(_0x1ed0c7,_0x1bc917+_0x39ffaf(0x199)+_0x39bb6d+'\x22');continue;}if(_0x2dab07['id']===_0x2be41d['id']){_0x4f0784&&_0x4f0784!==_0x39ffaf(0x2bc)&&_0x489b7b(_0x1ed0c7,_0x1bc917,_0x520add(_0x2b1937(_0x2be41d),_0x4f0784));continue;}if(_0x4f0784==='protected'){_0x5d8b98(_0x1ed0c7,_0x1bc917+_0x39ffaf(0x237)+_0x2be41d['id']+_0x39ffaf(0x289)+_0x2dab07['id']+'\x27s');continue;}if(_0x4f0784&&!_0xae6003(_0x4f0784)){_0x5d8b98(_0x1ed0c7,_0x1bc917+_0x39ffaf(0x15d)+_0x2dab07['id']+'\x27s\x20public\x20paths\x20('+[_0x39ffaf(0x20e),..._0x25a3b5['publicPaths'],'.generated/**']['join'](',\x20')+')');continue;}/^\.generated\/surface/[_0x39ffaf(0x25e)](_0x4f0784)&&!_0x2b46e5&&_0x5d8b98(_0x1ed0c7,_0x1bc917+_0x39ffaf(0x16c)),!_0x2b46e5&&!_0x2dab07[_0x39ffaf(0x1f2)]&&!_0x2b88b5[_0x39ffaf(0x15c)](_0x2dab07['id'])&&!_0x4824e4['has'](_0x2dab07['id'])&&_0x5d8b98(_0x1ed0c7,_0x2be41d['id']+_0x39ffaf(0x281)+_0x2dab07['id']+'\x20('+_0x1bc917+_0x39ffaf(0x275)+_0x2dab07['id']+_0x39ffaf(0x257));continue;}if(!_0x1bc917[_0x39ffaf(0x25a)]('.')&&!_0x1bc917[_0x39ffaf(0x25a)]('/'))continue;let _0x524f49=Ye(_0x594fc9,_0x1bc917),_0xec4cbe=_0x14e24c(_0x524f49);if(_0xec4cbe){if(_0xec4cbe['id']!==_0x2be41d['id']){let _0x20b8e4=y(_0x3cda75(_0x2b1937(_0xec4cbe),_0x524f49))[_0x39ffaf(0x215)](/\.(tsx?|mts|js)$/,'')[_0x39ffaf(0x215)](/\/index$/,'');_0x5d8b98(_0x1ed0c7,_0x1bc917+_0x39ffaf(0x195)+_0xec4cbe['id']+_0x39ffaf(0x286)+_0x25a3b5[_0x39ffaf(0x1ad)]+'/'+_0xec4cbe['id']+(_0xae6003(_0x20b8e4)&&_0x20b8e4?'/'+_0x20b8e4:''));continue;}/[\\/]\.generated[\\/]surface[^\\/]*$/[_0x39ffaf(0x25e)](_0x524f49[_0x39ffaf(0x215)](/\.ts$/,''))&&!_0x2b46e5&&_0x5d8b98(_0x1ed0c7,_0x1bc917+_0x39ffaf(0x16c)),_0x489b7b(_0x1ed0c7,_0x1bc917,_0x524f49);}}}}return _0x189150;}import{createRequire as _0x25ee49}from'node:module';import{join as _0x466c9c}from'node:path';import{pathToFileURL as _0x3f9f28}from'node:url';import{existsSync as _0x3713dc,mkdirSync as _0x3409df,readdirSync as _0x2aaca2,readFileSync as _0x32f5fb,rmSync as _0x10dee1,writeFileSync as _0x5704fe}from'node:fs';import{dirname as _0x1a96b6,join as _0x20fcf2,relative as _0x5ccb5a,resolve as _0x4f61f2}from'node:path';import _0x46e511 from'typescript-6';var M='//\x20Auto-generated\x20by\x20@vyredo/module-kit.\x20DO\x20NOT\x20EDIT.',D='@vyredo/module-kit',st={'suffix':'','realms':null},te=(_0x477527,_0x734602)=>_0x734602[_0x26279c(0x1a4)]?_0x477527['realms'][_0x26279c(0x1aa)](_0x2fb01a=>_0x2fb01a[_0x26279c(0x21f)]===null||_0x734602[_0x26279c(0x1a4)]['includes'](_0x2fb01a['realm'])):_0x477527[_0x26279c(0x1a4)],$e=_0xa19607=>_0xa19607['realm']?_0x26279c(0x177)+_0xa19607[_0x26279c(0x21f)]+_0x26279c(0x169):_0x26279c(0x292),v=(_0x578ec2,_0x5c4999,_0x538066)=>''+_0x578ec2['id']+(_0x5c4999['key']??'')+_0x538066,ye=_0x37ecb1=>_0x37ecb1['length']?_0x37ecb1[_0x26279c(0x254)](_0x5d28e3=>JSON['stringify'](_0x5d28e3))[_0x26279c(0x223)](_0x26279c(0x28d)):_0x26279c(0x164);function it(_0x2bc535,_0x2b9da5){const _0x36540c=_0x26279c;let _0x49e06a=v(_0x2bc535,_0x2b9da5,_0x36540c(0x230)),_0x55443c=_0x2b9da5[_0x36540c(0x18a)][_0x36540c(0x1aa)](_0x4baec6=>_0x4baec6[_0x36540c(0x29d)]===_0x36540c(0x246))['map'](_0x543a31=>_0x543a31[_0x36540c(0x1a1)]),_0x3ba4b7=_0x2b9da5[_0x36540c(0x18a)][_0x36540c(0x1aa)](_0x1749bd=>_0x1749bd[_0x36540c(0x29d)]==='protected')[_0x36540c(0x254)](_0x2a66a9=>_0x2a66a9[_0x36540c(0x1a1)]),_0x300ad5=_0x36540c(0x1a5)+_0x2b9da5[_0x36540c(0x1ea)][_0x36540c(0x215)](/\.tsx?$/,''),_0x5a56c3=[M,'//\x20'+_0x2bc535['id']+_0x36540c(0x166)+(_0x2b9da5[_0x36540c(0x21f)]??'module')+_0x36540c(0x2a9),_0x36540c(0x1ed),_0x36540c(0x249)+_0x49e06a+_0x36540c(0x278)+JSON[_0x36540c(0x218)](_0x300ad5)+';','',_0x36540c(0x1ee),_0x36540c(0x191)+v(_0x2bc535,_0x2b9da5,_0x36540c(0x29a))+_0x36540c(0x271)+_0x49e06a+',\x20'+ye(_0x55443c)+'>;'];return _0x3ba4b7[_0x36540c(0x27f)]===0x0?_0x5a56c3['push']('',_0x36540c(0x191)+v(_0x2bc535,_0x2b9da5,_0x36540c(0x2b6))+_0x36540c(0x1ca)):_0x5a56c3[_0x36540c(0x287)]('','/**\x20Never\x20instantiated:\x20re-exposes\x20the\x20protected\x20members\x20so\x20their\x20types\x20can\x20be\x20named.\x20*/',_0x36540c(0x1d9)+v(_0x2bc535,_0x2b9da5,_0x36540c(0x231))+'\x20extends\x20'+_0x49e06a+'\x20{',..._0x3ba4b7[_0x36540c(0x254)](_0x2a31db=>_0x36540c(0x262)+JSON[_0x36540c(0x218)]('__protected_'+_0x2a31db)+_0x36540c(0x241)+JSON[_0x36540c(0x218)](_0x2a31db)+'];'),'}','','/**\x20What\x20only\x20'+_0x2bc535['id']+_0x36540c(0x2a8),_0x36540c(0x191)+v(_0x2bc535,_0x2b9da5,_0x36540c(0x2b6))+_0x36540c(0x1f7),..._0x3ba4b7[_0x36540c(0x254)](_0x175b14=>'\x20\x20'+JSON[_0x36540c(0x218)](_0x175b14)+':\x20'+v(_0x2bc535,_0x2b9da5,_0x36540c(0x231))+'['+JSON[_0x36540c(0x218)](_0x36540c(0x1a0)+_0x175b14)+'];'),'};'),_0x5a56c3['join']('\x0a')+'\x0a';}function nt(_0x5068b8,_0x317bbc){const _0x2e3ef9=_0x26279c;let _0x3d1440={..._0x5068b8,'realms':te(_0x5068b8,_0x317bbc)},_0x48cac8=_0x3d1440[_0x2e3ef9(0x1a4)][_0x2e3ef9(0x254)](_0x509c5a=>_0x2e3ef9(0x260)+v(_0x3d1440,_0x509c5a,_0x2e3ef9(0x29a))+',\x20'+v(_0x3d1440,_0x509c5a,_0x2e3ef9(0x2b6))+_0x2e3ef9(0x294)+$e(_0x509c5a)[_0x2e3ef9(0x215)](/\.ts$/,'')+'\x22;'),_0x336781,_0x1d7c45;if(_0x3d1440['realms']['length']===0x0)_0x336781='{}',_0x1d7c45='{}';else{if(_0x3d1440[_0x2e3ef9(0x1a4)][0x0][_0x2e3ef9(0x1f5)]===null){let _0x37c0ec=_0x3d1440['realms'][0x0];_0x336781=v(_0x3d1440,_0x37c0ec,'Public'),_0x1d7c45=v(_0x3d1440,_0x37c0ec,_0x2e3ef9(0x29a))+_0x2e3ef9(0x20c)+v(_0x3d1440,_0x37c0ec,_0x2e3ef9(0x2b6));}else _0x336781='{\x0a'+_0x3d1440[_0x2e3ef9(0x1a4)][_0x2e3ef9(0x254)](_0x1db4a8=>'\x20\x20'+_0x1db4a8[_0x2e3ef9(0x1f5)]+':\x20'+v(_0x3d1440,_0x1db4a8,'Public')+';')[_0x2e3ef9(0x223)]('\x0a')+'\x0a}',_0x1d7c45='{\x0a'+_0x3d1440['realms'][_0x2e3ef9(0x254)](_0x3edf8e=>'\x20\x20'+_0x3edf8e['key']+':\x20'+v(_0x3d1440,_0x3edf8e,'Public')+_0x2e3ef9(0x20c)+v(_0x3d1440,_0x3edf8e,'Protected')+';')[_0x2e3ef9(0x223)]('\x0a')+'\x0a}';}return[M,..._0x48cac8,'',_0x2e3ef9(0x25f)+_0x3d1440['id']+'\x20as\x20other\x20modules\x20see\x20it:\x20its\x20public\x20members'+(_0x3d1440['realms'][0x0]?.[_0x2e3ef9(0x1f5)]?',\x20by\x20realm':'')+_0x2e3ef9(0x27a),_0x2e3ef9(0x191)+_0x3d1440['id']+_0x2e3ef9(0x1fb)+_0x336781+';','',_0x2e3ef9(0x25f)+_0x3d1440['id']+_0x2e3ef9(0x171),_0x2e3ef9(0x191)+_0x3d1440['id']+_0x2e3ef9(0x26b)+_0x1d7c45+';',''][_0x2e3ef9(0x223)]('\x0a');}function rt(_0x50005d,_0x335963,_0x56b2b1){const _0x55cdfb=_0x26279c;return te(_0x50005d,_0x56b2b1)[_0x55cdfb(0x1de)](_0x5b0cad=>_0x5b0cad[_0x55cdfb(0x18a)][_0x55cdfb(0x1aa)](_0x24b904=>_0x335963(_0x24b904[_0x55cdfb(0x29d)]))[_0x55cdfb(0x254)](_0x4906a5=>[_0x5b0cad[_0x55cdfb(0x1f5)]?_0x5b0cad[_0x55cdfb(0x1f5)]+'.'+_0x4906a5[_0x55cdfb(0x1a1)]:_0x4906a5[_0x55cdfb(0x1a1)],_0x4906a5[_0x55cdfb(0x273)]]));}function he(_0x1cc203,_0x9b4a29,_0xf0384b,_0x38e662,_0x23bf3e){const _0x38b9b5=_0x26279c;let _0x2a1987=_0xf0384b['rpc'][_0x38b9b5(0x2ad)],_0xbed0d3=_0x2a1987[_0x38b9b5(0x1ae)][_0x38b9b5(0x25a)]('.')?Y(_0x9b4a29,_0x4f61f2(_0xf0384b[_0x38b9b5(0x203)],_0x2a1987['from'])):_0x2a1987[_0x38b9b5(0x1ae)],_0x271dcc=rt(_0x1cc203,_0xb27d23=>_0x38e662==='protected'||_0xb27d23===_0x38b9b5(0x246),_0x23bf3e),_0x48ba93=te(_0x1cc203,_0x23bf3e)[_0x38b9b5(0x1de)](_0x31a9c0=>_0x31a9c0[_0x38b9b5(0x18a)][_0x38b9b5(0x1aa)](_0x46998b=>_0x46998b[_0x38b9b5(0x2b2)]!==void 0x0&&(_0x38e662===_0x38b9b5(0x2bc)||_0x46998b['visibility']===_0x38b9b5(0x246)))[_0x38b9b5(0x254)](_0x32e258=>[_0x31a9c0[_0x38b9b5(0x1f5)]?_0x31a9c0[_0x38b9b5(0x1f5)]+'.'+_0x32e258[_0x38b9b5(0x1a1)]:_0x32e258[_0x38b9b5(0x1a1)],_0x32e258['timeoutMs']])),_0x1d7f33=_0x38e662===_0x38b9b5(0x246)?_0x1cc203['id']:_0x1cc203['id']+_0x38b9b5(0x2b6),_0xa5505c=_0x38e662===_0x38b9b5(0x246)?_0x1cc203['id']+_0x38b9b5(0x29e):_0x1cc203['id']+'ProtectedApi';return[M,_0x38b9b5(0x1f6)+(_0x38e662===_0x38b9b5(0x246)?_0x1cc203['id']+_0x38b9b5(0x1dc)+_0x1cc203['id']+_0x38b9b5(0x1da):_0x1cc203['id']+_0x38b9b5(0x1d3)),'import\x20{\x20makeRemoteWith\x20}\x20from\x20\x22@vyredo/rpc-bus\x22;',_0x38b9b5(0x2b0)+_0x2a1987['name']+_0x38b9b5(0x1bd)+JSON[_0x38b9b5(0x218)](_0xbed0d3)+';',_0x38b9b5(0x260)+_0xa5505c+_0x38b9b5(0x19d)+_0x23bf3e[_0x38b9b5(0x221)]+'\x22;','',_0x38b9b5(0x228)+_0x2a1987['name']+_0x38b9b5(0x26d),'',_0x38b9b5(0x1e7)+_0x1d7f33+_0x38b9b5(0x21c)+_0xa5505c+',\x20'+ye(_0x271dcc['map'](([_0x42d98])=>_0x42d98))+'>('+JSON[_0x38b9b5(0x218)](_0x1cc203['id'])+_0x38b9b5(0x290),..._0x271dcc[_0x38b9b5(0x254)](([_0x3e2e2f,_0x49c594])=>'\x20\x20'+JSON[_0x38b9b5(0x218)](_0x3e2e2f)+':\x20'+JSON[_0x38b9b5(0x218)](_0x49c594)+','),..._0x48ba93[_0x38b9b5(0x27f)]>0x0?[_0x38b9b5(0x22b),..._0x48ba93['map'](([_0x36542e,_0x4232d9])=>'\x20\x20'+JSON[_0x38b9b5(0x218)](_0x36542e)+':\x20'+_0x4232d9+',')]:[],_0x38b9b5(0x1e2),''][_0x38b9b5(0x223)]('\x0a');}function ot(_0x67bf1e,_0x17d762,_0x4ac09f){const _0x17819d=_0x26279c;return[M,_0x17819d(0x186)+_0x17d762['alias']+'/'+_0x67bf1e['id']+_0x17819d(0x243)+(_0x4ac09f['realms']?_0x17819d(0x160)+_0x4ac09f[_0x17819d(0x1a4)][_0x17819d(0x223)](',\x20'):'')+'.',_0x17819d(0x251)+_0x67bf1e['id']+'Api\x20}\x20from\x20\x22./api'+_0x4ac09f[_0x17819d(0x221)]+'\x22;',..._0x17d762[_0x17819d(0x1fc)]?[_0x17819d(0x268)+_0x67bf1e['id']+_0x17819d(0x1c3)+_0x4ac09f[_0x17819d(0x221)]+'\x22;']:[],'']['join']('\x0a');}function at(_0x480b53,_0xa4c578,_0xae1d2d){const _0x3c5f33=_0x26279c;return[M,_0x3c5f33(0x186)+_0xa4c578[_0x3c5f33(0x1ad)]+'/'+_0x480b53['id']+_0x3c5f33(0x1b2)+_0x480b53['id']+_0x3c5f33(0x1be),_0x3c5f33(0x251)+_0x480b53['id']+_0x3c5f33(0x17c)+_0xae1d2d['suffix']+'\x22;',..._0xa4c578['rpc']?[_0x3c5f33(0x268)+_0x480b53['id']+_0x3c5f33(0x2a7)+_0xae1d2d[_0x3c5f33(0x221)]+'\x22;']:[],''][_0x3c5f33(0x223)]('\x0a');}function Z(_0x12f6f8,_0x3bcf8c,_0x4aa9f6,_0x310c18=_0x3713dc,_0x42299b){const _0xa03893=_0x26279c;let _0x1ba6d5=_0x42299b?'.'+_0x42299b:'',_0xd2507c=new Map(),_0x27ac4c=_0x3bcf8c[_0xa03893(0x1fc)]?.['bus'],_0x49cd55=_0x27ac4c?.[_0xa03893(0x192)]?.[_0x4aa9f6?_0xa03893(0x2ae):_0x42299b??'default'];_0x27ac4c&&_0x49cd55&&_0xd2507c[_0xa03893(0x178)](_0x27ac4c[_0xa03893(0x1ae)],[_0x4f61f2(_0x3bcf8c['cwd'],_0x49cd55)]);let _0x49f2cc=_0x4aa9f6?new Set([_0x4aa9f6['id'],..._0x4aa9f6[_0xa03893(0x1c4)],..._0x4aa9f6[_0xa03893(0x24f)],..._0x12f6f8[_0xa03893(0x1a3)][_0xa03893(0x1aa)](_0x20484b=>_0x20484b[_0xa03893(0x1f2)])[_0xa03893(0x254)](_0x45c757=>_0x45c757['id'])]):null;for(let _0x46c2e3 of _0x12f6f8['modules']){if(_0x49f2cc&&!_0x49f2cc['has'](_0x46c2e3['id']))continue;let _0x1f13b6=_0x20fcf2(_0x3bcf8c[_0xa03893(0x15f)],_0x46c2e3[_0xa03893(0x26a)]);_0xd2507c[_0xa03893(0x178)](_0x3bcf8c[_0xa03893(0x1ad)]+'/'+_0x46c2e3['id'],[_0x20fcf2(_0x1f13b6,_0xa03893(0x21b)+_0x1ba6d5+_0xa03893(0x169))]);for(let [_0xb32a1b,_0x137105]of Object['entries'](_0x3bcf8c[_0xa03893(0x250)]))_0x310c18(_0x20fcf2(_0x1f13b6,_0x137105))&&_0xd2507c[_0xa03893(0x178)](_0x3bcf8c['alias']+'/'+_0x46c2e3['id']+'/'+_0xb32a1b,[_0x20fcf2(_0x1f13b6,_0x137105)]);if((!_0x4aa9f6||_0x4aa9f6['id']===_0x46c2e3['id'])&&_0xd2507c['set'](_0x3bcf8c[_0xa03893(0x1ad)]+'/'+_0x46c2e3['id']+'/protected',[_0x20fcf2(_0x1f13b6,_0xa03893(0x229)+_0x1ba6d5+_0xa03893(0x169))]),_0x4aa9f6&&_0x4aa9f6['id']!==_0x46c2e3['id']){for(let _0x4d4c1d of _0x3bcf8c['publicPaths'])_0x4d4c1d[_0xa03893(0x208)]('/**')?_0xd2507c[_0xa03893(0x178)](_0x3bcf8c[_0xa03893(0x1ad)]+'/'+_0x46c2e3['id']+'/'+_0x4d4c1d[_0xa03893(0x15a)](0x0,-0x3)+'/*',[_0x20fcf2(_0x1f13b6,_0x4d4c1d['slice'](0x0,-0x3),'*')]):_0x4d4c1d['includes']('*')||_0xd2507c[_0xa03893(0x178)](_0x3bcf8c[_0xa03893(0x1ad)]+'/'+_0x46c2e3['id']+'/'+_0x4d4c1d[_0xa03893(0x215)](/\.tsx?$/,''),[_0x20fcf2(_0x1f13b6,_0x4d4c1d)]);}else _0xd2507c['set'](_0x3bcf8c[_0xa03893(0x1ad)]+'/'+_0x46c2e3['id']+'/*',[_0x20fcf2(_0x1f13b6,'*')]);}return _0xd2507c;}var se=(_0x8750d0,_0x1512e3)=>_0x1512e3===_0x8750d0['alias']||_0x1512e3[_0x26279c(0x25a)](_0x8750d0[_0x26279c(0x1ad)]+'/')||_0x8750d0['rpc']?.['bus']['targets']!==void 0x0&&_0x1512e3===_0x8750d0[_0x26279c(0x1fc)][_0x26279c(0x2ad)][_0x26279c(0x1ae)];function lt(_0x28a72f,_0x2ebe1b,_0x31048c){const _0x15ea9c=_0x26279c;let _0x5af22c=_0x46e511[_0x15ea9c(0x17b)](_0x2ebe1b,_0x46e511['sys'][_0x15ea9c(0x151)]),_0x45ac73=_0x5af22c[_0x15ea9c(0x1b5)]?.[_0x15ea9c(0x16e)]?.[_0x15ea9c(0x1fe)]??{},_0x526750=_0x5af22c[_0x15ea9c(0x1b5)]?.[_0x15ea9c(0x16e)]?.['baseUrl'],_0x4ba9c7=_0x4f61f2(_0x1a96b6(_0x2ebe1b),_0x526750??'.'),_0x1cd854={};for(let [_0x5c4d43,_0x5baf42]of Object[_0x15ea9c(0x299)](_0x45ac73))se(_0x28a72f,_0x5c4d43)||(_0x1cd854[_0x5c4d43]=_0x5baf42['map'](_0x9b11ef=>A(_0x31048c,_0x4f61f2(_0x4ba9c7,_0x9b11ef))));return _0x1cd854;}function ct(_0x3e64bb,_0x312dac){const _0x3bb518=_0x26279c;if(!_0x3e64bb[_0x3bb518(0x154)])return{};let _0x1c78ae=_0x46e511[_0x3bb518(0x17b)](_0x3e64bb[_0x3bb518(0x154)],_0x46e511[_0x3bb518(0x163)][_0x3bb518(0x151)]),_0x43c9f5=_0x1c78ae[_0x3bb518(0x1b5)]?.[_0x3bb518(0x16e)]?.[_0x3bb518(0x1fe)]??{},_0x46c5a6=_0x1c78ae[_0x3bb518(0x1b5)]?.[_0x3bb518(0x16e)]?.['baseUrl'],_0x16a75c=_0x4f61f2(_0x1a96b6(_0x3e64bb['tsconfigBase']),_0x46c5a6??'.'),_0x33c2be={};for(let [_0x1ab3e8,_0x4ee437]of Object['entries'](_0x43c9f5))se(_0x3e64bb,_0x1ab3e8)||(_0x33c2be[_0x1ab3e8]=_0x4ee437[_0x3bb518(0x254)](_0x15464a=>A(_0x312dac,_0x4f61f2(_0x16a75c,_0x15464a))));return _0x33c2be;}var A=(_0x783bd1,_0x508b5b)=>{const _0x1c5bf2=_0x26279c;let _0x52b9e7=y(_0x5ccb5a(_0x783bd1,_0x508b5b));return _0x52b9e7[_0x1c5bf2(0x25a)]('./')||_0x52b9e7['startsWith']('../')?_0x52b9e7:'./'+_0x52b9e7;};function ee(_0x64ac5e,_0x525b21){const _0x5881c4=_0x26279c;return Object[_0x5881c4(0x1d0)]([..._0x525b21]['sort'](([_0x113975],[_0x59a7b3])=>_0x113975[_0x5881c4(0x279)](_0x59a7b3))[_0x5881c4(0x254)](([_0x119f69,_0x4e37c0])=>[_0x119f69,_0x4e37c0[_0x5881c4(0x254)](_0x1a37a7=>A(_0x64ac5e,_0x1a37a7))]));}function dt(_0x5a0828,_0x35beb0,_0x4ec719,_0x39636b){const _0x21020a=_0x26279c;let _0x6973a1=_0x20fcf2(_0x35beb0['root'],_0x4ec719[_0x21020a(0x26a)]),_0x3eae7a={'$comment':D+':\x20'+_0x4ec719['id']+_0x21020a(0x222),..._0x35beb0[_0x21020a(0x154)]?{'extends':A(_0x6973a1,_0x35beb0[_0x21020a(0x154)])}:{},'compilerOptions':{..._0x35beb0[_0x21020a(0x2bb)][_0x21020a(0x16e)],'paths':{...ct(_0x35beb0,_0x6973a1),...ee(_0x6973a1,Z(_0x5a0828,_0x35beb0,_0x35beb0[_0x21020a(0x2bb)]['isolation']===_0x21020a(0x1df)?void 0x0:_0x4ec719,_0x39636b))}},'include':[_0x21020a(0x19e),..._0x35beb0[_0x21020a(0x2bb)][_0x21020a(0x24e)][_0x21020a(0x254)](_0x2aab7e=>A(_0x6973a1,_0x2aab7e))],..._0x35beb0[_0x21020a(0x2bb)][_0x21020a(0x1dd)]['length']>0x0?{'exclude':[..._0x35beb0[_0x21020a(0x2bb)][_0x21020a(0x1dd)]]}:{}};return JSON[_0x21020a(0x218)](_0x3eae7a,null,0x2)+'\x0a';}function ut(_0x26cbeb,_0x5cef2f,_0x4331f3){const _0x38ef07=_0x26279c;let _0x5b4d5a=_0x20fcf2(_0x5cef2f[_0x38ef07(0x15f)],_0x38ef07(0x293)),_0x44bb87=_0x26cbeb['modules']['map'](_0xdcca78=>({'m':_0xdcca78,'r':_0xdcca78[_0x38ef07(0x1a4)]['find'](_0x3a9766=>_0x3a9766[_0x38ef07(0x21f)]===_0x4331f3)}))[_0x38ef07(0x1aa)](_0x1d61ad=>_0x1d61ad['r']!==void 0x0);return[M,_0x38ef07(0x276)+(_0x4331f3?_0x4331f3+'\x20':'')+_0x38ef07(0x168),_0x38ef07(0x1c8),..._0x44bb87[_0x38ef07(0x254)](({m:_0x167431,r:_0x1ab775},_0x4b6c14)=>'import\x20M'+_0x4b6c14+_0x38ef07(0x278)+JSON[_0x38ef07(0x218)](Y(_0x5b4d5a,_0x20fcf2(_0x5cef2f[_0x38ef07(0x15f)],_0x167431['path'],_0x1ab775[_0x38ef07(0x1ea)])))+';'),'',_0x38ef07(0x1f3),..._0x44bb87[_0x38ef07(0x254)](({m:_0x5eded5,r:_0x16f212},_0xf5d9f3)=>'\x20\x20'+JSON[_0x38ef07(0x218)]({'id':_0x5eded5['id'],'version':_0x5eded5['version'],'core':_0x5eded5[_0x38ef07(0x1f2)],'requires':_0x5eded5[_0x38ef07(0x1c4)],'optional':_0x5eded5[_0x38ef07(0x24f)],'startOrder':_0x5eded5[_0x38ef07(0x1bc)],'realm':_0x16f212[_0x38ef07(0x1f5)],'members':_0x16f212[_0x38ef07(0x18a)],'hooks':_0x16f212['hooks'],'extra':_0x5eded5[_0x38ef07(0x1f4)]})[_0x38ef07(0x215)](/}$/,_0x38ef07(0x245)+_0xf5d9f3+'\x20}')+','),'];','',_0x38ef07(0x295),''][_0x38ef07(0x223)]('\x0a');}function ft(_0x3fbaf3,_0x36c668,_0x29a75b=[]){const _0x20de13=_0x26279c;let _0x3e44d3=new Map(),_0x4af6c4={'graph':_0x3fbaf3,'config':_0x36c668,'header':M,'dirOf':_0x5c1427=>_0x20fcf2(_0x36c668[_0x20de13(0x15f)],_0x5c1427['path'])};for(let _0x30560b of _0x29a75b){let _0xa401f0=_0x30560b[_0x20de13(0x16d)](_0x4af6c4);for(let [_0x157fce,_0x20b682]of _0xa401f0 instanceof Map?_0xa401f0:Object[_0x20de13(0x299)](_0xa401f0)){let _0x3cf891=_0x4f61f2(_0x157fce);if(_0x3e44d3[_0x20de13(0x15c)](_0x3cf891))throw new Error(_0x20de13(0x263)+_0x30560b[_0x20de13(0x1a1)]+_0x20de13(0x1ff)+_0x3cf891+_0x20de13(0x296));_0x3e44d3[_0x20de13(0x178)](_0x3cf891,_0x20b682);}}let _0x4bfd24=_0x36c33c=>_0x3e44d3[_0x20de13(0x15c)](_0x36c33c)||_0x3713dc(_0x36c33c),_0x47e542=(_0x3df457,_0xdc0cdb)=>{const _0x535d75=_0x20de13;if(_0x3e44d3[_0x535d75(0x15c)](_0x3df457))throw new Error(_0x535d75(0x238)+_0x3df457+_0x535d75(0x2b3));_0x3e44d3[_0x535d75(0x178)](_0x3df457,_0xdc0cdb);},_0x66c90d=[st,...Object['entries'](_0x36c668[_0x20de13(0x22d)])[_0x20de13(0x254)](([_0x3a7507,_0x491d35])=>({'suffix':'.'+_0x3a7507,'realms':_0x491d35}))];for(let _0x4a7b54 of _0x3fbaf3[_0x20de13(0x1a3)]){let _0x4498f0=_0x20fcf2(_0x36c668[_0x20de13(0x15f)],_0x4a7b54[_0x20de13(0x26a)]),_0x197ae1=_0x20fcf2(_0x4498f0,_0x20de13(0x293));for(let _0x4f5069 of _0x4a7b54[_0x20de13(0x1a4)])_0x47e542(_0x20fcf2(_0x197ae1,$e(_0x4f5069)),it(_0x4a7b54,_0x4f5069));for(let _0x53a503 of _0x66c90d){let _0xb61f76=_0x53a503[_0x20de13(0x221)];_0x47e542(_0x20fcf2(_0x197ae1,_0x20de13(0x22f)+_0xb61f76+'.ts'),nt(_0x4a7b54,_0x53a503)),_0x47e542(_0x20fcf2(_0x197ae1,_0x20de13(0x27c)+_0xb61f76+_0x20de13(0x169)),ot(_0x4a7b54,_0x36c668,_0x53a503)),_0x47e542(_0x20fcf2(_0x197ae1,'protected'+_0xb61f76+_0x20de13(0x169)),at(_0x4a7b54,_0x36c668,_0x53a503)),_0x36c668[_0x20de13(0x1fc)]&&(_0x47e542(_0x20fcf2(_0x197ae1,_0x20de13(0x23c)+_0xb61f76+_0x20de13(0x169)),he(_0x4a7b54,_0x197ae1,_0x36c668,_0x20de13(0x246),_0x53a503)),_0x47e542(_0x20fcf2(_0x197ae1,_0x20de13(0x202)+_0xb61f76+'.ts'),he(_0x4a7b54,_0x197ae1,_0x36c668,_0x20de13(0x2bc),_0x53a503)));}_0x47e542(_0x20fcf2(_0x4498f0,_0x20de13(0x173)),dt(_0x3fbaf3,_0x36c668,_0x4a7b54,_0x4bfd24));}let _0x1c056d=_0x20fcf2(_0x36c668[_0x20de13(0x15f)],_0x20de13(0x293));for(let _0x14ed96 of _0x36c668['realms']??[null])_0x47e542(_0x20fcf2(_0x1c056d,_0x14ed96?_0x20de13(0x2a4)+_0x14ed96+_0x20de13(0x169):'registry.ts'),ut(_0x3fbaf3,_0x36c668,_0x14ed96));for(let _0x54e0d7 of[void 0x0,...Object[_0x20de13(0x2b9)](_0x36c668[_0x20de13(0x22d)])]){let _0x59cc4e=_0x54e0d7?'.'+_0x54e0d7:'',_0x50d215=Z(_0x3fbaf3,_0x36c668,void 0x0,_0x4bfd24,_0x54e0d7),_0x1350f4=Object[_0x20de13(0x1d0)]([..._0x50d215]['sort'](([_0x4006b8],[_0x3bfb31])=>_0x4006b8['localeCompare'](_0x3bfb31))[_0x20de13(0x254)](([_0x591c71,_0x12b7e7])=>[_0x591c71,y(_0x5ccb5a(_0x36c668[_0x20de13(0x203)],_0x12b7e7[0x0]))])),_0x173212=_0x54e0d7?_0x20de13(0x214)+_0x54e0d7+_0x20de13(0x176):'';_0x47e542(_0x20fcf2(_0x1c056d,_0x20de13(0x1f8)+_0x59cc4e+_0x20de13(0x205)),JSON[_0x20de13(0x218)]({'$comment':D+_0x20de13(0x20a)+_0x173212+_0x20de13(0x2b4),..._0x1350f4},null,0x2)+'\x0a'),_0x47e542(_0x20fcf2(_0x1c056d,'tsconfig.paths'+_0x59cc4e+'.json'),JSON[_0x20de13(0x218)]({'$comment':D+_0x20de13(0x1bb)+_0x173212+_0x20de13(0x2b4),'compilerOptions':{'paths':ee(_0x1c056d,_0x50d215)}},null,0x2)+'\x0a');}for(let _0x4dd2ee of _0x36c668[_0x20de13(0x17f)][_0x20de13(0x1aa)](_0x2a914e=>_0x2a914e[_0x20de13(0x1b0)]===_0x20de13(0x1b7))){let _0x3fb0f6=_0x4f61f2(_0x36c668['cwd'],_0x4dd2ee[_0x20de13(0x1ea)]),_0x42d58a=_0x1a96b6(_0x3fb0f6),_0x249c6f={...lt(_0x36c668,_0x4f61f2(_0x36c668['cwd'],_0x4dd2ee[_0x20de13(0x29b)]),_0x42d58a),...ee(_0x42d58a,Z(_0x3fbaf3,_0x36c668,void 0x0,_0x4bfd24,_0x4dd2ee[_0x20de13(0x240)]))};_0x47e542(_0x3fb0f6,JSON[_0x20de13(0x218)]({'$comment':D+':\x20'+y(_0x5ccb5a(_0x36c668['cwd'],_0x4f61f2(_0x36c668[_0x20de13(0x203)],_0x4dd2ee[_0x20de13(0x29b)])))+'\x27s\x20paths\x20plus\x20the\x20module\x20aliases'+(_0x4dd2ee[_0x20de13(0x240)]?_0x20de13(0x1d5)+_0x4dd2ee[_0x20de13(0x240)]+'\x22\x20view)':'')+_0x20de13(0x2b4),'compilerOptions':{'paths':_0x249c6f}},null,0x2)+'\x0a');}let _0x15fded=_0x20fcf2(_0x1c056d,xe),_0x26ea91=[..._0x3e44d3[_0x20de13(0x2b9)](),_0x15fded][_0x20de13(0x254)](_0x1baa1f=>y(_0x5ccb5a(_0x36c668['cwd'],_0x1baa1f)))['sort']();return _0x3e44d3['set'](_0x15fded,JSON[_0x20de13(0x218)]({'$comment':D+_0x20de13(0x1d1),'modules':_0x3fbaf3[_0x20de13(0x1a3)],'files':_0x26ea91},null,0x2)+'\x0a'),_0x3e44d3;}var xe=_0x26279c(0x235);function mt(_0x212df8){const _0x15cbcf=_0x26279c;let _0x3d8323=_0x20fcf2(_0x212df8['root'],_0x15cbcf(0x293),xe);if(!_0x3713dc(_0x3d8323))return new Set();try{let _0x1cbc7f=JSON[_0x15cbcf(0x17d)](_0x32f5fb(_0x3d8323,'utf8'))[_0x15cbcf(0x16d)]??[];return new Set(_0x1cbc7f[_0x15cbcf(0x254)](_0x3c02a8=>_0x4f61f2(_0x212df8[_0x15cbcf(0x203)],_0x3c02a8)));}catch{return new Set();}}function we(_0x4a127c,_0xd3da82){const _0x3480d0=_0x26279c;if(_0xd3da82[_0x3480d0(0x15c)](_0x4a127c))return!0x0;if(!_0x3713dc(_0x4a127c))return!0x1;let _0x127555=_0x32f5fb(_0x4a127c,_0x3480d0(0x207))['slice'](0x0,0xc8);return _0x127555[_0x3480d0(0x25a)](M)||_0x127555['includes']('\x22'+D);}function pt(_0x4df2b8,_0x2330fd,_0x50ae3c,_0x3e9a7d){const _0x3a3d10=_0x26279c;let _0x5d88b1=new Set([..._0x3e9a7d][_0x3a3d10(0x1aa)](_0x598b12=>!_0x50ae3c['has'](_0x598b12)&&_0x3713dc(_0x598b12))),_0x235035=[_0x20fcf2(_0x2330fd['root'],_0x3a3d10(0x293)),..._0x4df2b8[_0x3a3d10(0x1a3)][_0x3a3d10(0x254)](_0x18b915=>_0x20fcf2(_0x2330fd[_0x3a3d10(0x15f)],_0x18b915[_0x3a3d10(0x26a)],_0x3a3d10(0x293)))];for(let _0x5198ad of _0x235035)if(_0x3713dc(_0x5198ad))for(let _0x6e1689 of _0x2aaca2(_0x5198ad,{'withFileTypes':!0x0})){let _0x337a4a=_0x20fcf2(_0x5198ad,_0x6e1689[_0x3a3d10(0x1a1)]);_0x6e1689[_0x3a3d10(0x197)]()&&!_0x50ae3c[_0x3a3d10(0x15c)](_0x337a4a)&&we(_0x337a4a,new Set())&&_0x5d88b1[_0x3a3d10(0x1a7)](_0x337a4a);}return[..._0x5d88b1][_0x3a3d10(0x277)]();}function Se(_0x1f6c3c,_0x321091,_0x5125f8={}){const _0x28d2fc=_0x26279c;let _0x5c4eaf=ft(_0x1f6c3c,_0x321091,_0x5125f8['plugins']),_0x193861=mt(_0x321091),_0x4a99c4=[];for(let [_0x2d99ad,_0x1f3d11]of _0x5c4eaf)if(!(_0x3713dc(_0x2d99ad)&&_0x32f5fb(_0x2d99ad,_0x28d2fc(0x207))===_0x1f3d11)){if(_0x3713dc(_0x2d99ad)&&!we(_0x2d99ad,_0x193861))throw new Error('module-kit:\x20'+y(_0x5ccb5a(_0x321091[_0x28d2fc(0x203)],_0x2d99ad))+_0x28d2fc(0x16b));_0x4a99c4[_0x28d2fc(0x287)](y(_0x5ccb5a(_0x321091[_0x28d2fc(0x203)],_0x2d99ad))),_0x5125f8[_0x28d2fc(0x298)]||(_0x3409df(_0x1a96b6(_0x2d99ad),{'recursive':!0x0}),_0x5704fe(_0x2d99ad,_0x1f3d11));}for(let _0xf8e338 of _0x321091[_0x28d2fc(0x17f)][_0x28d2fc(0x1aa)](_0x300a6c=>_0x300a6c[_0x28d2fc(0x1b0)]==='splice')){let _0x480180=_0x4f61f2(_0x321091[_0x28d2fc(0x203)],_0xf8e338['file']),_0x3b883a=_0x32f5fb(_0x480180,_0x28d2fc(0x207)),_0x10abf4=_0x1a96b6(_0x480180),_0x154f4e=gt(_0x3b883a,_0x321091,Object['fromEntries']([...Z(_0x1f6c3c,_0x321091,void 0x0,void 0x0,_0xf8e338[_0x28d2fc(0x240)])][_0x28d2fc(0x254)](([_0x4e1d97,_0xa51abd])=>[_0x4e1d97,_0xa51abd[_0x28d2fc(0x254)](_0x2ca66e=>A(_0x10abf4,_0x2ca66e))])));_0x154f4e!==_0x3b883a&&(_0x4a99c4[_0x28d2fc(0x287)](y(_0x5ccb5a(_0x321091['cwd'],_0x480180))),_0x5125f8[_0x28d2fc(0x298)]||_0x5704fe(_0x480180,_0x154f4e));}let _0x579df2=pt(_0x1f6c3c,_0x321091,_0x5c4eaf,_0x193861)[_0x28d2fc(0x254)](_0x13123f=>(_0x5125f8[_0x28d2fc(0x298)]||_0x10dee1(_0x13123f),y(_0x5ccb5a(_0x321091[_0x28d2fc(0x203)],_0x13123f))));return{'written':_0x4a99c4,'removed':_0x579df2};}var Q=/^\s*"/;function gt(_0x154a25,_0x160387,_0x3df34d){const _0x506244=_0x26279c;let _0x4ee37d=_0x154a25[_0x506244(0x1c2)]('\x0d\x0a')?'\x0d\x0a':'\x0a',_0x1694c8=_0x154a25['split'](/\r?\n/),_0x12f153=_0x1694c8[_0x506244(0x233)](_0x44b867=>/^\s*"paths"\s*:\s*\{\s*$/['test'](_0x44b867));if(_0x12f153<0x0)throw new Error('module-kit:\x20a\x20spliced\x20tsconfig\x20needs\x20a\x20`\x22paths\x22:\x20{`\x20line\x20of\x20its\x20own');let _0x4f055b=-0x1;for(let _0x2e93f9=_0x12f153+0x1;_0x2e93f9<_0x1694c8['length'];_0x2e93f9++)if(/^\s*\}/[_0x506244(0x25e)](_0x1694c8[_0x2e93f9])){_0x4f055b=_0x2e93f9;break;}if(_0x4f055b<0x0)throw new Error(_0x506244(0x2ab));let _0x76f876=_0x26c049=>/^\s*"([^"]+)"\s*:/[_0x506244(0x266)](_0x26c049)?.[0x1],_0x296445=_0x1694c8[_0x506244(0x15a)](_0x12f153+0x1,_0x4f055b)[_0x506244(0x1d6)](_0x49f313=>Q[_0x506244(0x25e)](_0x49f313)),_0x342f1c=_0x296445?_0x296445[_0x506244(0x15a)](0x0,_0x296445[_0x506244(0x29f)]('\x22')):'\x20'[_0x506244(0x1fd)](_0x1694c8[_0x12f153][_0x506244(0x29f)](_0x506244(0x242))+0x2),_0x26eea4=_0x1694c8[_0x506244(0x15a)](_0x12f153+0x1,_0x4f055b)['filter'](_0x1e25e5=>{let _0x373540=_0x76f876(_0x1e25e5);return _0x373540===void 0x0||!se(_0x160387,_0x373540);}),_0x5bda78=[...Object[_0x506244(0x2b9)](_0x3df34d)['sort']()['map'](_0x3fb553=>''+_0x342f1c+JSON[_0x506244(0x218)](_0x3fb553)+':\x20'+JSON[_0x506244(0x218)](_0x3df34d[_0x3fb553])+','),..._0x26eea4],_0x3c8b31=-0x1;for(let _0x1ff0d3=0x0;_0x1ff0d3<_0x5bda78['length'];_0x1ff0d3++)Q[_0x506244(0x25e)](_0x5bda78[_0x1ff0d3])&&(_0x3c8b31=_0x1ff0d3);_0x3c8b31>=0x0&&(_0x5bda78[_0x3c8b31]=_0x5bda78[_0x3c8b31][_0x506244(0x215)](/,\s*$/,''));for(let _0x4cf9fe=0x0;_0x4cf9fe<_0x3c8b31;_0x4cf9fe++)Q[_0x506244(0x25e)](_0x5bda78[_0x4cf9fe])&&!/,\s*$/['test'](_0x5bda78[_0x4cf9fe])&&(_0x5bda78[_0x4cf9fe]=_0x5bda78[_0x4cf9fe][_0x506244(0x215)](/\s*$/,'')+',');return[..._0x1694c8[_0x506244(0x15a)](0x0,_0x12f153+0x1),..._0x5bda78,..._0x1694c8[_0x506244(0x15a)](_0x4f055b)][_0x506244(0x223)](_0x4ee37d);}import{existsSync as _0x599b92}from'node:fs';import{join as _0x3406a5,relative as _0x1ab6fb}from'node:path';import{existsSync as _0x2e2afc,readdirSync as _0x4e684e,readFileSync as _0x31acb5}from'node:fs';import{join as _0x1affe4,relative as _0x115b67}from'node:path';import _0x18e1a5 from'typescript-6';function be(_0x268a00){const _0x4bb664=_0x26279c;return _0x4e684e(_0x268a00,{'withFileTypes':!0x0})[_0x4bb664(0x1aa)](_0x25b247=>_0x25b247[_0x4bb664(0x1af)]())[_0x4bb664(0x254)](_0x9ed85f=>_0x9ed85f[_0x4bb664(0x1a1)])['sort']();}function yt(_0x10250e){const _0x4f3d35=_0x26279c;let _0x5b26dc=[],_0x52b083=_0x288cdd=>{const _0x50a0fd=_0x2713;if(_0x2e2afc(_0x1affe4(_0x288cdd,'manifest.ts'))){_0x5b26dc[_0x50a0fd(0x287)](_0x288cdd);return;}for(let _0x5c82b8 of be(_0x288cdd))!_0x10250e['ignore']['has'](_0x5c82b8)&&!_0x5c82b8[_0x50a0fd(0x25a)]('.')&&_0x52b083(_0x1affe4(_0x288cdd,_0x5c82b8));};for(let _0x53d0fd of be(_0x10250e[_0x4f3d35(0x15f)]))!_0x10250e[_0x4f3d35(0x1b8)][_0x4f3d35(0x15c)](_0x53d0fd)&&!_0x53d0fd[_0x4f3d35(0x25a)]('.')&&_0x52b083(_0x1affe4(_0x10250e[_0x4f3d35(0x15f)],_0x53d0fd));return _0x5b26dc;}function ne(_0x48df4b){const _0x43231f=_0x26279c;for(;;)if(_0x18e1a5[_0x43231f(0x2a3)](_0x48df4b)||_0x18e1a5[_0x43231f(0x1ef)](_0x48df4b)||_0x18e1a5['isParenthesizedExpression'](_0x48df4b))_0x48df4b=_0x48df4b[_0x43231f(0x252)];else{if(_0x18e1a5['isCallExpression'](_0x48df4b)&&_0x48df4b[_0x43231f(0x226)]['length']===0x1&&_0x18e1a5[_0x43231f(0x283)](_0x48df4b['expression'])&&_0x48df4b[_0x43231f(0x252)]['text']===_0x43231f(0x1f9))_0x48df4b=_0x48df4b['arguments'][0x0];else return _0x48df4b;}}function xt(_0x34b8de){const _0x368a8f=_0x26279c;let _0x3a698f=ne(_0x34b8de);if(_0x18e1a5[_0x368a8f(0x282)](_0x3a698f)||_0x18e1a5['isNoSubstitutionTemplateLiteral'](_0x3a698f))return _0x3a698f[_0x368a8f(0x21a)];if(_0x3a698f['kind']===_0x18e1a5[_0x368a8f(0x239)]['TrueKeyword'])return!0x0;if(_0x3a698f[_0x368a8f(0x16f)]===_0x18e1a5['SyntaxKind'][_0x368a8f(0x1d7)])return!0x1;if(_0x18e1a5[_0x368a8f(0x1e6)](_0x3a698f)){let _0x51bd20=[];for(let _0x40ad71 of _0x3a698f[_0x368a8f(0x1f0)]){if(!_0x18e1a5[_0x368a8f(0x282)](_0x40ad71)&&!_0x18e1a5['isNoSubstitutionTemplateLiteral'](_0x40ad71))return;_0x51bd20[_0x368a8f(0x287)](_0x40ad71[_0x368a8f(0x21a)]);}return _0x51bd20;}}var wt={'id':_0x26279c(0x21d),'version':_0x26279c(0x21d),'requireModules':_0x26279c(0x1f1),'optionalModules':_0x26279c(0x1f1),'core':_0x26279c(0x2b1)};function St(_0xb700eb,_0x1c779b,_0x10a339={}){const _0x3a1728=_0x26279c;let _0x229130=_0x18e1a5[_0x3a1728(0x1b9)](_0xb700eb,_0x31acb5(_0xb700eb,_0x3a1728(0x207)),_0x18e1a5[_0x3a1728(0x2b5)][_0x3a1728(0x2b8)],!0x0),_0x52df2d=[],_0x442c7d={},_0x309186=_0x2ba988=>_0x229130[_0x3a1728(0x1e8)](_0x2ba988['getStart'](_0x229130))[_0x3a1728(0x172)]+0x1,_0x456334=(_0x2f3b0b,_0x331c44)=>_0x52df2d[_0x3a1728(0x287)]({'file':_0x1c779b,'line':_0x309186(_0x2f3b0b),'message':_0x331c44}),_0x108db1=_0x229130['statements']['find'](_0x323ad1=>_0x18e1a5[_0x3a1728(0x1c5)](_0x323ad1)&&!_0x323ad1['isExportEquals']),_0x299d42=_0x108db1?ne(_0x108db1[_0x3a1728(0x252)]):void 0x0;if(!_0x299d42||!_0x18e1a5[_0x3a1728(0x23f)](_0x299d42))return _0x456334(_0x108db1??_0x229130,'manifest.ts\x20must\x20`export\x20default`\x20an\x20object\x20literal\x20(optionally\x20through\x20defineManifest)'),{'manifest':null,'extra':_0x442c7d,'issues':_0x52df2d};let _0xa34de8={};for(let _0x1239eb of _0x299d42[_0x3a1728(0x17a)]){if(!_0x18e1a5[_0x3a1728(0x1d2)](_0x1239eb)||!(_0x18e1a5['isIdentifier'](_0x1239eb[_0x3a1728(0x1a1)])||_0x18e1a5[_0x3a1728(0x282)](_0x1239eb[_0x3a1728(0x1a1)]))){_0x456334(_0x1239eb,'manifest\x20entries\x20must\x20be\x20plain\x20`key:\x20value`\x20pairs');continue;}let _0x32f653=_0x1239eb[_0x3a1728(0x1a1)][_0x3a1728(0x21a)],_0x57525b=wt[_0x32f653],_0x1b3a7f=_0x57525b??_0x10a339[_0x32f653];if(!_0x1b3a7f){_0x456334(_0x1239eb,'unknown\x20manifest\x20field\x20\x22'+_0x32f653+'\x22');continue;}if(_0x1b3a7f===_0x3a1728(0x175)){let _0x519a41=ne(_0x1239eb[_0x3a1728(0x1a9)]);_0x18e1a5[_0x3a1728(0x283)](_0x519a41)?_0x442c7d[_0x32f653]={'identifier':_0x519a41[_0x3a1728(0x21a)]}:_0x456334(_0x1239eb['initializer'],_0x3a1728(0x153)+_0x32f653+_0x3a1728(0x26f));continue;}let _0x265c70=xt(_0x1239eb['initializer']);if(!(_0x265c70!==void 0x0&&(_0x1b3a7f===_0x3a1728(0x1f1)?Array[_0x3a1728(0x255)](_0x265c70):typeof _0x265c70===_0x1b3a7f))){_0x456334(_0x1239eb['initializer'],_0x3a1728(0x153)+_0x32f653+_0x3a1728(0x26c)+(_0x1b3a7f===_0x3a1728(0x1f1)?'array\x20of\x20strings':_0x1b3a7f));continue;}_0x57525b?_0xa34de8[_0x32f653]=_0x265c70:_0x442c7d[_0x32f653]=_0x265c70;}return typeof _0xa34de8['id']!=_0x3a1728(0x21d)||_0xa34de8['id']===''?(_0x456334(_0x299d42,_0x3a1728(0x15b)),{'manifest':null,'extra':_0x442c7d,'issues':_0x52df2d}):{'manifest':_0xa34de8,'extra':_0x442c7d,'issues':_0x52df2d};}function _0x2f4f(){const _0x598f3d=['yhn0yxrPyYa','DMLLD3m','ANnVBG','yxbP','q2XHC3m','u3vYzMfJzq','ntfnA2jWvxy','zMLUzeLUzgv4','nKjnzNnvvG','Bw9KDwXLlwTPDc5QC29U','Bw9KDwXLlwTPDdOG','oIbHig1VzhvSzsDZihbYB3rLy3rLzcbJBgLLBNqGAxmGAxrZig93BJSG','Bw9KDwXLlwTPDdOGysbWBhvNAw4GD3jPDgvZia','u3LUDgf4s2LUza','AxnoDw1LCMLJtgL0zxjHBa','ycbLBNrYAwvZig11C3qGyMuGye5HBwu6idXUDw1Izxi+ya','y2XPzw50','Bw9KDwXLlwTPDdOGzxHWB3j0ici','zgvWzw5Kzw5JEsbJEwnSztOG','AxnpyMPLy3rmAxrLCMfSrxHWCMvZC2LVBG','DMLLDW','id0GDgHPC1S','iNbHDgHZiG','ycbYzxnVBhzLCYb0BW','C2L6zq','lcbdBgfZCZOGtq','ChvIBgLJ','ig11C3qGzgvMyxvSDc1LEhbVCNqGysbWBhvNAw4Gkg9YigeGzNvUy3rPB24GB2yGDgHLignVBMzPzYDZigrPCMvJDg9YEsbYzxr1CM5PBMCGB25Lkq','DMvYC2LVBG','Aw1WB3j0ia','mti3odaYn29PueLMrq','C3rHDgvTzw50CW','Bw9KDwXLigLKici','Bw9KDwXLlwTPDdOGDMLLDYaI','Aw5JBhvKzq','B3b0Aw9UywW','zxHWB3j0CW','zxHWB3j0ihr5CguGEYa','zxHWCMvZC2LVBG','C3bSAxq','BwfW','AxnbCNjHEq','zNvUy3rPB24','iIb0BYbYzxf1AxjLtw9KDwXLCYbVCIbVChrPB25HBe1VzhvSzxm','Bw9KDwXLlwTPDdOGCMvHBg0GiG','ignVzguGBwf5ig5VDcbPBxbVCNqGDgHLia','C3rHCNrZv2L0Aa','vfny','Bw9KDwXLlwTPDdOGz2vUzxjHDgvKigzPBgvZigfYzsbZDgfSztSGCNvUigbTB2r1BguTA2L0igDLBMvYyxrLydO','Bw9KDwXLlwTPDc5JB25MAwCUANnVBG','DgvZDa','lYOQia','Aw1WB3j0ihr5CguGEYa','CgX1z2LUCW','icbYzwfKB25SEsa','Bw9KDwXLlwTPDdOGCgX1z2LUici','CMvMDxnL','zgLY','zxHLyW','DgLTzw91Dhm','zxHWB3j0ihSG','C2nHBG','Cgf0Aa','uhjVDgvJDgvKqxbPid0G','iIbTDxn0igjLigeGBgL0zxjHBca','kcKPoW','iIbUyw1LCYbYzwfSBsaI','iIbTDxn0ig5HBwuGysb2ywX1zsaOyw4GAwrLBNrPzMLLCIK','zgvSzxrL','id0GugLJAZW','AxnfEhbVCNrfCxvHBhm','zxzLBNq','BxvZDcbGzxHWB3j0igrLzMf1BhrGigeGy2XHC3m6ihrOzsbTB2r1BguNCYbTzw1IzxjZigfYzsbPDhmGBwv0Ag9KCYbHBMqGzNvUy3rPB24GChjVCgvYDgLLCW','ksb3AxrOB3v0igrLy2XHCMLUzYbPDdOGywrKici','lY8GrxzLCNKG','C29YDa','igzYB20G','Bg9JywXLq29TCgfYzq','lIaQlW','B25tDg9W','Aw5KzxG','igzPBguOCYKGy2HHBMDLza','Bw9KDwXLlwTPDdOGyhjLywXTC2aGBgLZDhmGysbYzwfSBsb0D2LJzq','BgvUz3rO','ig1VzhvSzsHZksWGz2vUzxjHDgvKigzPBgvZihvWihrVigrHDgu','ihvZzxmG','AxntDhjPBMDmAxrLCMfS','AxnjzgvUDgLMAwvY','AxndBgfZC0rLy2XHCMf0Aw9U','B3b0Aw9UywXnB2r1BgvZ','j3mGzM9SzgvYoIbPBxbVCNqGAxqGyxmG','ChvZAa','C2HHCMvK','ig1HEsbUB3qGAw1WB3j0ia','C2HHCMvKlYOQ','rgvMyxvSDeTLExDVCMq','AxnqCM9Wzxj0EurLy2XHCMf0Aw9U','ihWG','BMfTzwrcAw5KAw5NCW','iIbPCYbPBIbIB3rOihjLCxvPCMvnB2r1BgvZigfUzcbVChrPB25HBe1VzhvSzxm7igXPC3qGAxqGAw4GB25L','lcb7','iIbPCYbHBhjLywr5ihvZzwqGyNKG','C3vYzMfJzs50CW','lMDLBMvYyxrLza','ih0GzNjVBsaIlI8','zxHWB3j0igrLzMf1BhqGBw9KDwXLCZS','lcb3AgLJAcbHBM90AgvYihbSDwDPBIb3CML0zxmGDg9V','AxnqCML2yxrLswrLBNrPzMLLCG','y2HLy2S','zw50CMLLCW','uhvIBgLJ','Aw5OzxjPDa','C2HHCMvKignVzguGBwf5ig5VDcbPBxbVCNqGDgHLia','DMLZAwjPBgL0Eq','qxbP','Aw5KzxHpzG','CMvXDwLYzq','ig1VzhvSzsHZksWG','CMvXDwLYzu1VzhvSzxm','AxntyxrPC2zPzxnfEhbYzxnZAw9U','CMvNAxn0CNKU','AxnoB1n1yNn0Axr1DgLVBLrLBxbSyxrLtgL0zxjHBa','ig1VzhvSzsHZksWGyM91BMrHCMLLCYbpsW','uhjVDgvJDgvKih0GzNjVBsaIlI9JBgLLBNqUChjVDgvJDgvK','igL0C2vSzIbTyxKGy2fSBcWGDgHYB3vNAcbPDhmGChjVDgvJDgvKignSAwvUDc4GkI8','ignSyxnZlcbHCYb0ExbLCY4GsxqGAw1WB3j0CYb0AguGy2XHC3mGyNKGDMfSDwuSihnVigLTCg9YDa','Bw9KDwXLlwTPDdOGDhnJB25MAwDqyxrOCYaI','Bw9KDwXLlwTPDdOGDgHLihrZy29UzMLNj3mGyhbHDgHZycbVyMPLy3qGAxmGBMv2zxiGy2XVC2vK','AxnjBxbVCNrfCxvHBhnezwnSyxjHDgLVBG','yNvZ','zgvMyxvSDa','ktOGC2HHCMvKlYbYDw5ZigLUigv2zxj5ihjLywXT','Aw1WB3j0ihSG','yM9VBgvHBG','DgLTzw91De1Z','lcb3AgLJAcb0AguGA2L0ihDYAxrLCYbPDhnLBgy','lIbetYbot1qGrurjvc4','u2nYAxb0vgfYz2v0','uhjVDgvJDgvK','zxjYB3i','rvmYmdiY','A2v5CW','AxnjBxbVCNruExbLtM9Kzq','DhnJB25MAwC','ChjVDgvJDgvK','CMvHzezPBgu','z2vUzxjHDgvK','BwfUAwzLC3qGzMLLBgqGiG','DhnJB25MAwDcyxnL','Dg9vChbLCKnHC2u','C29Tzq','AxndywXSrxHWCMvZC2LVBG','Ag9VA3m','Aw1WB3j0q2XHDxnL','C2XPy2u','BwfUAwzLC3qGBMvLzhmGyw4GygLKya','AgfZ','oIbUB3qGB25Lig9Mia','AxnnzxrOB2rezwnSyxjHDgLVBG','CM9VDa','igzVCIbHignVBNn1BwvYihrOyxqGC2vLCYa','Aw5KzxGUDhm','u2nYAxb0s2LUza','C3LZ','BMv2zxi','xcqM','j3mG','uhjVDgvJDgvKs2v5D29Yza','Bw9KDwXLignSyxnZigLUihn0yxj0ig9YzgvYlcb3AxrOigL0CYbTyw5PzMvZDcbMywn0CZOGD2HHDcb0AguGCNvUDgLTzsbOB3n0ihn0yxj0CY4','lNrZ','y2fSBfvW','igv4Axn0CYbHBMqGD2fZig5VDcbNzw5LCMf0zwq7ig1VDMuGAxqGyxnPzgu','oIbPBxbVCNqGysbZDxjMywnLigzPBguGD2L0AcbGAw1WB3j0ihr5CgvGig9UBhK7igL0igXVywrZihrOzsbYzwfSBsbJBgfZCW','zMLSzxm','y29TCgLSzxjpChrPB25Z','A2LUza','y2fUsgf2zu1VzgLMAwvYCW','igfZigL0ihnLzxmGAxrZzwXMoIbWDwjSAwmGyw5KihbYB3rLy3rLzcbTzw1IzxjZlIaQlW','BgLUzq','DhnJB25MAwCUANnVBG','lMPZ','AwrLBNrPzMLLCG','iIb2Awv3','C3vYzMfJzs4','C2v0','u3rHDgLJs2v5D29Yza','ChjVCgvYDgLLCW','CMvHzenVBMzPz0zPBgu','uhjVDgvJDgvKqxbPih0GzNjVBsaIlI9HCgK','CgfYC2u','DgHLBG','DhnJB25MAwDqyxrOCW','ndC0mtGWuu5Uzxbg','Bg9N','DxnHz2u6ig1VzhvSzs1RAxqGpgDLBMvYyxrLFgnOzwnRFhnJyw4+ifSTlwnVBMzPzYa8zMLSzt5DifSTlwnOzwnRxsbBls1QC29Uxq','ic0+ia','B2jQzwn0','AxngDw5JDgLVBKv4ChjLC3nPB24','lY8Gv2HHDcbG','zxHPDenVzgu','CgfKu3rHCNq','kd86lY4Qkt8','BwvTyMvYCW','Bw9KDwXLuMvMzxjLBMnL','ycbUyw1LCYaI','Bw9KDwXLlwTPDdOGygfSAwfZycbJyw5UB3qGyMuGzw1WDhK','CMvZB2X2zq','BwfUAwzLC3qUDhm','y2HLy2TfEgnSDwrL','zxHWB3j0ihr5CguG','DgfYz2v0CW','AxnfEhbVCNrezwnSyxjHDgLVBG','w14VxsO','ihjLywnOzxmGAw50BYa','Cg9W','AxngAwXL','sw1WB3j0s2v5D29Yza','oIb0AgvYzsbPCYbUBYbTB2r1BguGiG','AhjLzG','AxnZDwvZ','igXPC3rZigeGBw9KDwXLihr3AwnL','ih0GzNjVBsaIlI9HCgK','lI8QkI8Q','icHYzw1VDMvKkq','x19WCM90zwn0zwrF','BMfTzq','mtm3mZuYnLboDwz4Dq','Bw9KDwXLCW','CMvHBg1Z','lI4V','z2v0','ywrK','ywz0zxi','Aw5PDgLHBgL6zxi','zMLSDgvY','z2v0tw9KAwzPzxjZ','B25tDgfYDa','ywXPyxm','zNjVBq','AxneAxjLy3rVCNK','Bw9Kzq','AxnuExbLt25SEq','l3bYB3rLy3rLzgaGCMvZB2X2zxmGDg86ig9UBhKG','lNrZEa','AxnmAxrLCMfSvhLWzu5Vzgu','y29UzMLN','igXPC3rZihrOzsbTB2r1BguGAxrZzwXM','D3jPDgu','AwDUB3jL','y3jLyxrLu291CMnLrMLSzq','zM9YrwfJAenOAwXK','oIbLEhrLBMqGDgHPCYbMCM9TihrOzsbHChaNCYb0C2nVBMzPzW','C3rHCNrpCMrLCG','ih0GzNjVBsa','igL0C2vSzIbTyxKGAw1WB3j0igL0lG','yxjNDw1LBNq','Aw5KzxGUDhn4','zxHWB3j0q2XHDxnL','Aw5JBhvKzxm','ih0GzNjVBsaIlI9JBgLLBNq','CMvXDwLYzxm','AxnfEhbVCNrbC3nPz25Tzw50','mte1odeYvxrKuLv5','ihjLywXTicG','Aw1WB3j0ihr5CguGEYbszwDPC3rYEuvUDhj5ih0GzNjVBsaIqhz5CMvKBY9TB2r1BguTA2L0l3j1BNrPBwuIoW','BwfUAwzLC3q','id0GE307','Bw9KDwXLlwTPDdOGBM90igDLBMvYyxrLzcWGDgHLihnJyw4GAgfZigLZC3vLCW','D3jPDhrLBG','ChvIBgLJugf0Ahm','Axnoyw1LzeLTCg9YDhm','AxnjBxbVCNrezwnSyxjHDgLVBG','zNjVBuvUDhjPzxm','oIb0AguGC2nHBIWGyw5Kigv2zxj5igzPBguGAxqGz2vUzxjHDgvKlIbetYbot1qGrurjvc4','AxnqCM9Wzxj0EufZC2LNBM1LBNq','j3mGy2XPzw50ihrVigL0C2vSzJOGAxrZihb1yMXPyYbHBMqGChjVDgvJDgvKig1LBwjLCNmU','iIbTDxn0igjLig9UzsbWyxrOihnLz21LBNqGB3rOzxiGDgHHBIaIChjVDgvJDgvKiG','icH0AguGiG','zMLUza','rMfSC2vlzxL3B3jK','iIbPCYbHignVCMuGBw9KDwXLoYbJB3jLig1VzhvSzxmGyxjLigf2ywLSywjSzsb0BYbLDMvYEsbTB2r1BguSigrVig5VDcbSAxn0ihrOzw0','zxHWB3j0igfIC3rYywn0ignSyxnZia','ihrOCM91z2GGAxqU','iIbPCYaID3jPDguIigfUzcbUzwvKCYbGAw5OzxjPDga','j3mGy2XPzw50oIbLDMvYEsbTB2r1BguGy2fSBhmG','zxHJBhvKzq','zMXHDe1HCa','ywXS','iIbTyxKGBM90igrLCgvUzcbVBIbUB24Ty29YzsbTB2r1BguGiG','lYOQ','FsK7','BwfUAwzLC3rgAwvSzhm','DgLTzw91DhngAwvSza','uhjPDMf0zuTLExDVCMq','AxnbCNjHEuXPDgvYywXfEhbYzxnZAw9U','zxHWB3j0ignVBNn0ia','z2v0tgLUzufUzenOyxjHy3rLCK9Mug9ZAxrPB24','ywXSB3C','zMLSzq','BgL0zxjHBa','mZm4ode4nfzgBwPbza','lY8GDgHPCYbMAwXLig9UBhKGD2L0AcbGAw1WB3j0ihr5CgvGoIbHihzHBhvLigLTCg9YDcbWDwXSCYb0AguGCMvHBg0NCYbJB2rLigLUlG','lYOQifDOyxqGzxzLCNKGBw9KDwXLig1HEsbJywXSlIaQlW','AxnbC0v4ChjLC3nPB24','zwXLBwvUDhm','yxjYyxK','y29Yzq','zxHWB3j0ignVBNn0ig1VzhvSzxm6ifjLz2LZDhj5rw50CNLBxsa9ifS','zxH0CMe','A2v5','lY8G','id0GEW','ywXPyxnLCW','zgvMAw5LtwfUAwzLC3q','y29YzsbTB2r1BguGiG','qxbPid0G','CNbJ','CMvWzwf0','Cgf0Ahm','iIb3CML0zxmG','DgHLig1VzhvSzsbYB290igrVzxmGBM90igv4Axn0','BwvZC2fNzq','y2XPzw50lNbYB3rLy3rLza','y3DK','zxzLCNK','lMPZB24','AxnfEhrLCM5HBe1VzhvSzvjLzMvYzw5Jzq','DxrMoa','zw5KC1DPDgG','BM9Kzv9TB2r1BgvZ','oIbHBgLHCYaTpIbMAwXL','qg1VzhvSzxm','icyG','lM10CW','kgnSAwvUDcK','AxnVBgf0Aw9U','kd86lIOVkt8','mc4WlJa','iIbTDxn0igjLigXVD2vYy2fZzsbSzxr0zxjZigfUzcbKAwDPDhmSihn0yxj0Aw5NihDPDgGGysbSzxr0zxi','Bw9KDwXLu3bLy2LMAwvY','igzVCIb0AguGiG','CMvWBgfJzq','AxnqyxjLBNrOzxnPEMvKrxHWCMvZC2LVBG','mteZndyZnfLiyxzJvq','C3rYAw5NAwz5','lMqUDhm','Dgv4Da','lMDLBMvYyxrLzc9PBMrLEa','id0GCMvTB3rLpa','C3rYAw5N','mJu2nJyXnufUCLPysW','CMvHBg0','zgvJBgfYzwq','C3vMzML4','j3mGChjVz3jHBs4GvgHLigfSAwfZihjLC29SDMvZig9UBhKGDgHLig1VzhvSzxmGAxqGzgvJBgfYzxmUierpie5pvcbfreLulG','AM9PBG','igLZC3vLkhmP','AxnbCNjVD0z1BMn0Aw9U','yxjNDw1LBNrZ','z2v0u3rHCNq','y29UC3qGCMvTB3rLid0GBwfRzvjLBw90zvDPDgGOkcKGpt4G','lMDLBMvYyxrLzc9WCM90zwn0zwq','z2vUzxjHDgu','FsWGEW'];_0x2f4f=function(){return _0x598f3d;};return _0x2f4f();}function ke(_0x4ea266){const _0xf5718=_0x26279c;let _0x3e6043=[];return _0x2e2afc(_0x4ea266['root'])?{'found':yt(_0x4ea266)[_0xf5718(0x254)](_0x28470f=>{const _0x52c9d3=_0xf5718;let _0x1f9ad3=y(_0x115b67(_0x4ea266[_0x52c9d3(0x203)],_0x1affe4(_0x28470f,'manifest.ts'))),_0x43ddf4=St(_0x1affe4(_0x28470f,'manifest.ts'),_0x1f9ad3,_0x4ea266[_0x52c9d3(0x1e3)]);return _0x3e6043[_0x52c9d3(0x287)](..._0x43ddf4['issues']),{'dir':_0x28470f,'path':y(_0x115b67(_0x4ea266[_0x52c9d3(0x15f)],_0x28470f)),'manifest':_0x43ddf4[_0x52c9d3(0x1c9)],'extra':_0x43ddf4['extra']};}),'issues':_0x3e6043}:{'found':[],'issues':[{'file':y(_0x115b67(_0x4ea266['cwd'],_0x4ea266[_0xf5718(0x15f)])),'line':0x1,'message':_0xf5718(0x200)}]};}var bt=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function Oe(_0x415cc7,_0x125816){const _0x18f627=_0x26279c;return _0x415cc7[_0x18f627(0x1aa)](_0x32e399=>_0x32e399['manifest']!==null)['map'](_0x3a216e=>({'id':_0x3a216e[_0x18f627(0x1c9)]['id'],'core':_0x3a216e[_0x18f627(0x1c9)]['core']===!0x0,'requires':[..._0x3a216e[_0x18f627(0x1c9)][_0x18f627(0x2a2)]??[]],'optional':[..._0x3a216e[_0x18f627(0x1c9)][_0x18f627(0x285)]??[]],'file':_0x125816(_0x3a216e)}));}function Me(_0x3d33aa){const _0x49e443=_0x26279c;let _0x2c357c=[],_0x4bea51=(_0x49f641,_0x2646b4)=>_0x2c357c[_0x49e443(0x287)]({'file':_0x49f641[_0x49e443(0x1ea)],'line':0x1,'message':_0x2646b4}),_0x2ae0e6=new Map();for(let _0xe2ca20 of _0x3d33aa){let _0x5b35f3=_0x2ae0e6[_0x49e443(0x1a6)](_0xe2ca20['id']);_0x5b35f3?_0x4bea51(_0xe2ca20,'module\x20id\x20\x22'+_0xe2ca20['id']+_0x49e443(0x291)+_0x5b35f3[_0x49e443(0x1ea)]):_0x2ae0e6['set'](_0xe2ca20['id'],_0xe2ca20),bt[_0x49e443(0x25e)](_0xe2ca20['id'])||_0x4bea51(_0xe2ca20,_0x49e443(0x24c)+_0xe2ca20['id']+'\x22\x20must\x20be\x20an\x20identifier\x20(letters,\x20digits,\x20_\x20or\x20$;\x20not\x20starting\x20with\x20a\x20digit)');}for(let _0xc4c266 of _0x3d33aa){for(let [_0x290a64,_0xf0445a]of[[_0x49e443(0x2a2),_0xc4c266[_0x49e443(0x1c4)]],[_0x49e443(0x285),_0xc4c266[_0x49e443(0x24f)]]]){new Set(_0xf0445a)[_0x49e443(0x244)]!==_0xf0445a[_0x49e443(0x27f)]&&_0x4bea51(_0xc4c266,_0x290a64+_0x49e443(0x19c));for(let _0x3eae02 of _0xf0445a){let _0x5178d6=_0x2ae0e6[_0x49e443(0x1a6)](_0x3eae02);_0x3eae02===_0xc4c266['id']?_0x4bea51(_0xc4c266,_0x290a64+_0x49e443(0x1b6)):_0x5178d6?!_0xc4c266['core']&&_0x5178d6[_0x49e443(0x1f2)]?_0x4bea51(_0xc4c266,_0x290a64+'\x20\x22'+_0x3eae02+_0x49e443(0x1d8)):_0xc4c266[_0x49e443(0x1f2)]&&!_0x5178d6[_0x49e443(0x1f2)]&&_0x4bea51(_0xc4c266,_0x49e443(0x1fa)+_0xc4c266['id']+_0x49e443(0x1e0)+_0x3eae02+'\x22'):_0x4bea51(_0xc4c266,_0x290a64+'\x20\x22'+_0x3eae02+'\x22\x20names\x20no\x20existing\x20module');}}for(let _0x54b635 of _0xc4c266['requires'][_0x49e443(0x1aa)](_0x5efbca=>_0xc4c266[_0x49e443(0x24f)][_0x49e443(0x1c2)](_0x5efbca)))_0x4bea51(_0xc4c266,'\x22'+_0x54b635+_0x49e443(0x28f));}let _0x4ce39e=vt(new Map(_0x3d33aa['map'](_0x50b469=>[_0x50b469['id'],Ce(_0x50b469,_0x2ae0e6)])));return _0x4ce39e&&_0x4bea51(_0x2ae0e6[_0x49e443(0x1a6)](_0x4ce39e[0x0]),_0x49e443(0x23e)+_0x4ce39e['join'](_0x49e443(0x183))),_0x2c357c;}function Ce(_0x578164,_0x55989e){const _0x4da487=_0x26279c;let _0x2b0f7e=[..._0x578164[_0x4da487(0x1c4)],..._0x578164[_0x4da487(0x24f)]]['filter'](_0x203351=>_0x55989e[_0x4da487(0x15c)](_0x203351)&&_0x203351!==_0x578164['id']);return _0x578164[_0x4da487(0x1f2)]?_0x2b0f7e:[...new Set([...[..._0x55989e['values']()][_0x4da487(0x1aa)](_0x2f6f1b=>_0x2f6f1b[_0x4da487(0x1f2)])['map'](_0x5642db=>_0x5642db['id']),..._0x2b0f7e])];}function vt(_0x3e10f7){const _0x27197e=_0x26279c;let _0x3a3197=new Map(),_0x240b68=[],_0x2b0555=_0x4a1772=>{const _0xfa5a26=_0x2713;_0x3a3197['set'](_0x4a1772,0x1),_0x240b68[_0xfa5a26(0x287)](_0x4a1772);for(let _0xa02443 of _0x3e10f7[_0xfa5a26(0x1a6)](_0x4a1772)??[]){if(_0x3a3197['get'](_0xa02443)===0x1)return[..._0x240b68[_0xfa5a26(0x15a)](_0x240b68[_0xfa5a26(0x29f)](_0xa02443)),_0xa02443];if(!_0x3a3197[_0xfa5a26(0x15c)](_0xa02443)){let _0x315328=_0x2b0555(_0xa02443);if(_0x315328)return _0x315328;}}return _0x240b68[_0xfa5a26(0x196)](),_0x3a3197['set'](_0x4a1772,0x2),null;};for(let _0x52c86e of[..._0x3e10f7[_0x27197e(0x2b9)]()][_0x27197e(0x277)]())if(!_0x3a3197[_0x27197e(0x15c)](_0x52c86e)){let _0x516379=_0x2b0555(_0x52c86e);if(_0x516379)return _0x516379;}return null;}function Ee(_0x17d70f){const _0xc52420=_0x26279c;let _0x2d2ca2=new Map(_0x17d70f['map'](_0x252088=>[_0x252088['id'],_0x252088])),_0x338295=new Map(_0x17d70f[_0xc52420(0x254)](_0x5d1027=>[_0x5d1027['id'],new Set(Ce(_0x5d1027,_0x2d2ca2))])),_0x2d80ca=[];for(;_0x338295[_0xc52420(0x244)]>0x0;){let _0x445269=[..._0x338295]['filter'](([,_0x5d95dc])=>[..._0x5d95dc]['every'](_0x487f70=>!_0x338295[_0xc52420(0x15c)](_0x487f70)))[_0xc52420(0x254)](([_0x1f19fa])=>_0x1f19fa)[_0xc52420(0x277)](),_0x3dbc17=_0x445269[_0xc52420(0x27f)]>0x0?_0x445269:[..._0x338295['keys']()][_0xc52420(0x277)]();for(let _0x45ee29 of _0x3dbc17)_0x2d80ca[_0xc52420(0x287)](_0x45ee29),_0x338295[_0xc52420(0x270)](_0x45ee29);}return _0x2d80ca;}import{readFileSync as _0x533870}from'node:fs';import _0x469125 from'typescript-6';var j=(_0x184a82,_0x91dc4c)=>(_0x469125[_0x26279c(0x170)](_0x184a82)?_0x469125[_0x26279c(0x1ab)](_0x184a82):void 0x0)?.[_0x26279c(0x156)](_0x15e8b9=>_0x15e8b9[_0x26279c(0x16f)]===_0x91dc4c)??!0x1,Ot=_0x5a87f5=>{const _0x4531d9=_0x26279c;if(!_0x5a87f5)return!0x1;let _0x3816f6=_0x5a87f5;for(;_0x469125[_0x4531d9(0x216)](_0x3816f6)||_0x469125['isAsExpression'](_0x3816f6)||_0x469125[_0x4531d9(0x2a3)](_0x3816f6);)_0x3816f6=_0x3816f6['expression'];return _0x469125[_0x4531d9(0x225)](_0x3816f6)||_0x469125[_0x4531d9(0x185)](_0x3816f6)||_0x469125['isIdentifier'](_0x3816f6)||_0x469125['isPropertyAccessExpression'](_0x3816f6)||_0x469125[_0x4531d9(0x157)](_0x3816f6);};function Mt(_0x4d77ea){const _0x56f10c=_0x26279c;for(let _0xe6486d of _0x4d77ea[_0x56f10c(0x24b)])if(_0x469125[_0x56f10c(0x284)](_0xe6486d)&&j(_0xe6486d,_0x469125[_0x56f10c(0x239)]['ExportKeyword'])&&j(_0xe6486d,_0x469125[_0x56f10c(0x239)][_0x56f10c(0x28b)]))return _0xe6486d;let _0x51be46=_0x4d77ea[_0x56f10c(0x24b)][_0x56f10c(0x1d6)](_0x1c9ff7=>_0x469125[_0x56f10c(0x1c5)](_0x1c9ff7)&&!_0x1c9ff7[_0x56f10c(0x272)]&&_0x469125[_0x56f10c(0x283)](_0x1c9ff7['expression']));if(!_0x51be46)return;let _0x4a187d=_0x51be46[_0x56f10c(0x252)]['text'];return _0x4d77ea['statements']['find'](_0x104f24=>_0x469125[_0x56f10c(0x284)](_0x104f24)&&_0x104f24[_0x56f10c(0x1a1)]?.[_0x56f10c(0x21a)]===_0x4a187d);}function Re(_0x458754,_0x39fb18,_0x4fb16c={'hooks':[_0x26279c(0x1ac),'onStop'],'timeoutsField':_0x26279c(0x267)}){const _0x45154f=_0x26279c;let _0x44b215=_0x469125[_0x45154f(0x1b9)](_0x458754,_0x533870(_0x458754,_0x45154f(0x207)),_0x469125['ScriptTarget'][_0x45154f(0x2b8)],!0x0,_0x458754[_0x45154f(0x208)](_0x45154f(0x1b3))?_0x469125[_0x45154f(0x162)][_0x45154f(0x25b)]:_0x469125[_0x45154f(0x162)]['TS']),_0x783f3c=[],_0x33ab34=_0x29142c=>_0x44b215[_0x45154f(0x1e8)](_0x29142c[_0x45154f(0x227)](_0x44b215))[_0x45154f(0x172)]+0x1,_0x47d862=Mt(_0x44b215);if(!_0x47d862)return{'members':[],'hooks':[],'issues':[{'file':_0x39fb18,'line':0x1,'message':_0x45154f(0x274)}]};let _0x3e6fa1=[],_0x12e32=[],_0x354ed=new Map();for(let _0x46307c of _0x47d862[_0x45154f(0x18a)]){if(!_0x469125[_0x45154f(0x28c)](_0x46307c)||!j(_0x46307c,_0x469125[_0x45154f(0x239)][_0x45154f(0x179)])||!_0x469125[_0x45154f(0x283)](_0x46307c[_0x45154f(0x1a1)])||_0x46307c[_0x45154f(0x1a1)][_0x45154f(0x21a)]!==_0x4fb16c[_0x45154f(0x1e4)])continue;let _0x236e66=_0x46307c[_0x45154f(0x1a9)];if(!_0x236e66||!_0x469125[_0x45154f(0x23f)](_0x236e66)){_0x783f3c[_0x45154f(0x287)]({'file':_0x39fb18,'line':_0x33ab34(_0x46307c),'message':_0x45154f(0x22c)+_0x4fb16c[_0x45154f(0x1e4)]+'`\x20must\x20be\x20an\x20object\x20literal\x20of\x20numbers'});continue;}for(let _0x3967dc of _0x236e66['properties'])_0x469125[_0x45154f(0x1d2)](_0x3967dc)&&(_0x469125[_0x45154f(0x283)](_0x3967dc['name'])||_0x469125[_0x45154f(0x282)](_0x3967dc[_0x45154f(0x1a1)]))&&_0x469125[_0x45154f(0x23a)](_0x3967dc[_0x45154f(0x1a9)])?_0x354ed['set'](_0x3967dc[_0x45154f(0x1a1)]['text'],Number(_0x3967dc[_0x45154f(0x1a9)]['text'][_0x45154f(0x215)](/_/g,''))):_0x783f3c[_0x45154f(0x287)]({'file':_0x39fb18,'line':_0x33ab34(_0x3967dc),'message':_0x45154f(0x22c)+_0x4fb16c[_0x45154f(0x1e4)]+_0x45154f(0x23b)});}for(let _0xf80d1f of _0x47d862[_0x45154f(0x18a)]){if(!(_0x469125[_0x45154f(0x28c)](_0xf80d1f)||_0x469125[_0x45154f(0x15e)](_0xf80d1f))||!_0xf80d1f['name']||_0x469125[_0x45154f(0x297)](_0xf80d1f[_0x45154f(0x1a1)])||j(_0xf80d1f,_0x469125[_0x45154f(0x239)]['StaticKeyword'])||j(_0xf80d1f,_0x469125[_0x45154f(0x239)][_0x45154f(0x1e5)])||!(_0x469125[_0x45154f(0x283)](_0xf80d1f[_0x45154f(0x1a1)])||_0x469125['isStringLiteral'](_0xf80d1f[_0x45154f(0x1a1)])))continue;let _0x40a1da=_0xf80d1f[_0x45154f(0x1a1)][_0x45154f(0x21a)];if(_0x4fb16c[_0x45154f(0x158)][_0x45154f(0x1c2)](_0x40a1da)){j(_0xf80d1f,_0x469125[_0x45154f(0x239)]['PublicKeyword'])&&_0x783f3c[_0x45154f(0x287)]({'file':_0x39fb18,'line':_0x33ab34(_0xf80d1f),'message':_0x40a1da+'\x20is\x20a\x20lifecycle\x20hook:\x20leave\x20it\x20without\x20`public`'}),_0x12e32[_0x45154f(0x287)](_0x40a1da);continue;}if(_0x469125[_0x45154f(0x28c)](_0xf80d1f)&&!Ot(_0xf80d1f[_0x45154f(0x1a9)]))continue;let _0x2ca960=_0x354ed['get'](_0x40a1da);_0x3e6fa1[_0x45154f(0x287)]({'name':_0x40a1da,'visibility':j(_0xf80d1f,_0x469125[_0x45154f(0x239)][_0x45154f(0x167)])?_0x45154f(0x2bc):_0x45154f(0x246),..._0x2ca960!==void 0x0?{'timeoutMs':_0x2ca960}:{}});}for(let _0x3f894 of _0x354ed[_0x45154f(0x2b9)]())_0x3e6fa1[_0x45154f(0x156)](_0x1426e6=>_0x1426e6[_0x45154f(0x1a1)]===_0x3f894)||_0x783f3c[_0x45154f(0x287)]({'file':_0x39fb18,'line':_0x33ab34(_0x47d862),'message':_0x45154f(0x22c)+_0x4fb16c[_0x45154f(0x1e4)]+_0x45154f(0x18c)+_0x3f894+'\x22,\x20which\x20is\x20not\x20an\x20exposed\x20member'});return{'members':_0x3e6fa1,'hooks':_0x12e32,'issues':_0x783f3c};}function Et(_0x26da7e,_0x3f02eb){const _0x1040fa=_0x26279c;return(_0x26da7e[_0x1040fa(0x1a4)]?_0x26da7e[_0x1040fa(0x1a4)][_0x1040fa(0x254)](_0x8b4179=>({'realm':_0x8b4179,'file':_0x8b4179+'/index.ts'})):[{'realm':null,'file':_0x1040fa(0x161)}])[_0x1040fa(0x1aa)](_0x4a95b3=>_0x599b92(_0x3406a5(_0x3f02eb,_0x4a95b3['file']))||_0x599b92(_0x3406a5(_0x3f02eb,_0x4a95b3[_0x1040fa(0x1ea)]+'x')))[_0x1040fa(0x254)](_0x529e22=>({'realm':_0x529e22[_0x1040fa(0x21f)],'file':_0x599b92(_0x3406a5(_0x3f02eb,_0x529e22['file']))?_0x529e22['file']:_0x529e22['file']+'x'}));}function Pe(_0x104b1b){const _0x55136c=_0x26279c;let _0x4f126d=_0x49175b=>y(_0x1ab6fb(_0x104b1b[_0x55136c(0x203)],_0x49175b)),{found:_0x286ce9,issues:_0x42c7c9}=ke(_0x104b1b),_0x57a121=Oe(_0x286ce9,_0x559e00=>_0x4f126d(_0x3406a5(_0x559e00[_0x55136c(0x265)],_0x55136c(0x18f))));_0x42c7c9[_0x55136c(0x287)](...Me(_0x57a121));let _0x2e446b=Ee(_0x57a121),_0x10504a=[];for(let _0x3316f8 of _0x286ce9){if(!_0x3316f8['manifest'])continue;let _0x24196f=_0x3316f8[_0x55136c(0x1c9)]['id'],_0x22bc40=Et(_0x104b1b,_0x3316f8[_0x55136c(0x265)])[_0x55136c(0x254)](({realm:_0xb4ec99,file:_0x5e9ae5})=>{const _0x190e3e=_0x55136c;let _0x4379ea=Re(_0x3406a5(_0x3316f8[_0x190e3e(0x265)],_0x5e9ae5),_0x4f126d(_0x3406a5(_0x3316f8[_0x190e3e(0x265)],_0x5e9ae5)),{'hooks':_0x104b1b[_0x190e3e(0x158)],'timeoutsField':_0x104b1b[_0x190e3e(0x1e4)]});_0x42c7c9[_0x190e3e(0x287)](..._0x4379ea[_0x190e3e(0x19b)]);let _0x253dcb=_0xb4ec99?fe(_0xb4ec99):null;return{'realm':_0xb4ec99,'key':_0x253dcb,'file':_0x5e9ae5,'hooks':_0x4379ea[_0x190e3e(0x158)],'members':_0x4379ea[_0x190e3e(0x18a)][_0x190e3e(0x254)](_0x2303ce=>({..._0x2303ce,'event':_0x253dcb?_0x24196f+':'+_0x253dcb+':'+_0x2303ce[_0x190e3e(0x1a1)]:_0x24196f+':'+_0x2303ce[_0x190e3e(0x1a1)]}))};});_0x10504a[_0x55136c(0x287)]({'id':_0x24196f,'version':_0x3316f8[_0x55136c(0x1c9)][_0x55136c(0x248)]??_0x55136c(0x211),'core':_0x3316f8['manifest']['core']===!0x0,'path':_0x3316f8[_0x55136c(0x26a)],'requires':[..._0x3316f8[_0x55136c(0x1c9)][_0x55136c(0x2a2)]??[]],'optional':[..._0x3316f8[_0x55136c(0x1c9)][_0x55136c(0x285)]??[]],'realms':_0x22bc40,'extra':_0x3316f8['extra'],'startOrder':_0x2e446b['indexOf'](_0x24196f)+0x1});}let _0x141b0c=_0x10504a[_0x55136c(0x1aa)]((_0x430c56,_0x4da1d9)=>_0x10504a[_0x55136c(0x233)](_0x7e266e=>_0x7e266e['id']===_0x430c56['id'])===_0x4da1d9);return _0x141b0c['sort']((_0x780fb7,_0x1ca690)=>_0x780fb7[_0x55136c(0x1bc)]-_0x1ca690['startOrder']),{'modules':_0x141b0c,'issues':oe(_0x42c7c9)};}var oe=_0x30adba=>[..._0x30adba][_0x26279c(0x277)]((_0x276bd9,_0x22f7eb)=>_0x276bd9[_0x26279c(0x1ea)][_0x26279c(0x279)](_0x22f7eb[_0x26279c(0x1ea)])||_0x276bd9[_0x26279c(0x172)]-_0x22f7eb['line']||_0x276bd9['message'][_0x26279c(0x279)](_0x22f7eb[_0x26279c(0x201)]));function Pt(_0x570dc2,_0xf674ad={}){const _0x4eb370=_0x26279c;let _0xb04b64=Pe(_0x570dc2),_0xcb1c03=oe([..._0xb04b64[_0x4eb370(0x19b)],...pe(_0xb04b64,_0x570dc2)]),_0x4ac506=_0xf674ad['generate']!==!0x1&&_0xb04b64[_0x4eb370(0x19b)]['length']===0x0?Se(_0xb04b64,_0x570dc2,{'check':_0xf674ad['check'],'plugins':_0xf674ad['plugins']}):null;return{'graph':_0xb04b64,'issues':_0xcb1c03,'generated':_0x4ac506};}function _0x2713(_0x3213c3,_0x65d1bb){_0x3213c3=_0x3213c3-0x151;const _0x2f4ffd=_0x2f4f();let _0x27133d=_0x2f4ffd[_0x3213c3];if(_0x2713['NcTIcj']===undefined){var _0x55a708=function(_0x4db804){const _0x262eca='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1411aa='',_0x10f2cf='';for(let _0x477e7c=0x0,_0x8a212d,_0x4c0fce,_0xd009af=0x0;_0x4c0fce=_0x4db804['charAt'](_0xd009af++);~_0x4c0fce&&(_0x8a212d=_0x477e7c%0x4?_0x8a212d*0x40+_0x4c0fce:_0x4c0fce,_0x477e7c++%0x4)?_0x1411aa+=String['fromCharCode'](0xff&_0x8a212d>>(-0x2*_0x477e7c&0x6)):0x0){_0x4c0fce=_0x262eca['indexOf'](_0x4c0fce);}for(let _0x1c93ec=0x0,_0x3f81ba=_0x1411aa['length'];_0x1c93ec<_0x3f81ba;_0x1c93ec++){_0x10f2cf+='%'+('00'+_0x1411aa['charCodeAt'](_0x1c93ec)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x10f2cf);};_0x2713['ymqYyV']=_0x55a708,_0x2713['lMxDFM']={},_0x2713['NcTIcj']=!![];}const _0x6acd48=_0x2f4ffd[0x0],_0x155eb8=_0x3213c3+_0x6acd48,_0x2c2883=_0x2713['lMxDFM'][_0x155eb8];return!_0x2c2883?(_0x27133d=_0x2713['ymqYyV'](_0x27133d),_0x2713['lMxDFM'][_0x155eb8]=_0x27133d):_0x27133d=_0x2c2883,_0x27133d;}async function It(_0x1205c2){const _0x845580=_0x26279c;if(_0x1205c2[_0x845580(0x261)][_0x845580(0x156)](_0x41102a=>/\.[cm]?tsx?$/[_0x845580(0x25e)](_0x41102a))){let _0x4179f9=_0x25ee49(_0x466c9c(_0x1205c2[_0x845580(0x203)],'package.json')),_0x28c132;try{_0x28c132=_0x4179f9[_0x845580(0x18e)]('tsx/esm/api');}catch{throw new Error('module-kit:\x20a\x20.ts\x20plugin\x20needs\x20`tsx`\x20installed\x20in\x20the\x20project');}let {register:_0x179499}=await import(_0x3f9f28(_0x28c132)[_0x845580(0x19a)]);_0x179499();}let _0x3cb9c9=[];for(let _0x4da98e of _0x1205c2['plugins']){let _0xe0be02=(await import(_0x3f9f28(_0x4da98e)[_0x845580(0x19a)]))['default'];_0xe0be02&&typeof _0xe0be02==_0x845580(0x184)&&'default'in _0xe0be02&&(_0xe0be02=_0xe0be02[_0x845580(0x2ae)]);let _0x1f63fe=typeof _0xe0be02=='function'?_0xe0be02(_0x1205c2[_0x845580(0x203)]):_0xe0be02;if(!_0x1f63fe||typeof _0x1f63fe['files']!=_0x845580(0x256))throw new Error('module-kit:\x20'+_0x4da98e+_0x845580(0x247));_0x3cb9c9[_0x845580(0x287)](_0x1f63fe);}return _0x3cb9c9;}async function X(_0x236c6f,_0x317e20={}){const _0x5b6071=_0x26279c;let _0x337495=_0x317e20[_0x5b6071(0x261)]??await It(_0x236c6f),_0x4c42d4=Pt(_0x236c6f,{..._0x317e20,'plugins':_0x337495});if(_0x4c42d4[_0x5b6071(0x152)]&&!_0x317e20[_0x5b6071(0x298)]){let _0x1302f7={'graph':_0x4c42d4['graph'],'config':_0x236c6f,'header':M,'dirOf':_0x42e28a=>_0x466c9c(_0x236c6f['root'],_0x42e28a['path'])};for(let _0x5a3c83 of _0x337495){let _0x459d75=await _0x5a3c83[_0x5b6071(0x1a8)]?.(_0x1302f7);_0x459d75&&_0x4c42d4[_0x5b6071(0x152)][_0x5b6071(0x1cc)][_0x5b6071(0x287)](..._0x459d75);}}return _0x4c42d4;}var je=_0x26279c(0x182);function Fe(_0x112917,_0x2cb3a4){const _0x659936=_0x26279c;return _0x112917[_0x659936(0x1c2)]('--'+_0x2cb3a4);}function jt(_0x4734ca,_0x51edee){const _0x1626b7=_0x26279c;let _0x9717f4=_0x4734ca[_0x1626b7(0x29f)]('--'+_0x51edee);return _0x9717f4>=0x0?_0x4734ca[_0x9717f4+0x1]:void 0x0;}var ae=_0x328a68=>{const _0x5121c1=_0x26279c;for(let _0xd5a12d of _0x328a68)console[_0x5121c1(0x2b7)]('\x20\x20'+_0xd5a12d[_0x5121c1(0x1ea)]+':'+_0xd5a12d[_0x5121c1(0x172)]+'\x20\x20'+_0xd5a12d[_0x5121c1(0x201)]);console['error'](_0x328a68[_0x5121c1(0x27f)]+_0x5121c1(0x224));};async function Ft(_0x85a01d){const _0x2321de=_0x26279c;let [_0x12e216,..._0x555540]=_0x85a01d;if(!_0x12e216||_0x12e216==='--help'||_0x12e216==='-h')return console[_0x2321de(0x181)](je),_0x12e216?0x0:0x1;let _0x4d12b4=ue(_0x1411aa(jt(_0x555540,_0x2321de(0x1b5))??de));if(_0x12e216===_0x2321de(0x269)){let {graph:_0x3c5202,issues:_0x431aa1}=await X(_0x4d12b4,{'generate':!0x1,'plugins':[]});if(Fe(_0x555540,_0x2321de(0x22e)))console['log'](JSON['stringify'](_0x3c5202,null,0x2));else{for(let _0x1ada6d of _0x3c5202[_0x2321de(0x1a3)])console[_0x2321de(0x181)](String(_0x1ada6d[_0x2321de(0x1bc)])[_0x2321de(0x188)](0x3)+'\x20\x20'+_0x1ada6d['id']+(_0x1ada6d['core']?'\x20(core)':'')+'\x20\x20'+_0x1ada6d[_0x2321de(0x26a)]);}return _0x431aa1[_0x2321de(0x27f)]>0x0&&ae(_0x431aa1),_0x431aa1[_0x2321de(0x27f)]>0x0?0x1:0x0;}if(_0x12e216===_0x2321de(0x298)){let {graph:_0x1c33fd,issues:_0x49d0f1}=await X(_0x4d12b4,{'generate':!0x1,'plugins':[]});return _0x49d0f1[_0x2321de(0x27f)]>0x0?(ae(_0x49d0f1),0x1):(console['log']('module-kit:\x20'+_0x1c33fd['modules'][_0x2321de(0x27f)]+_0x2321de(0x2a6)),0x0);}if(_0x12e216===_0x2321de(0x22a)){let _0x1f8e8b=Fe(_0x555540,'check'),{graph:_0x5dd3b8,issues:_0x53652a,generated:_0x52fde9}=await X(_0x4d12b4,{'check':_0x1f8e8b});if(_0x53652a[_0x2321de(0x27f)]>0x0&&ae(_0x53652a),!_0x52fde9)return console[_0x2321de(0x2b7)](_0x2321de(0x1cb)),0x1;let _0x53b039=[..._0x52fde9[_0x2321de(0x1cc)],..._0x52fde9['removed']['map'](_0x6a23b8=>_0x6a23b8+_0x2321de(0x19f))];if(_0x1f8e8b){if(_0x53b039[_0x2321de(0x27f)]>0x0){console[_0x2321de(0x2b7)](_0x2321de(0x25c));for(let _0x52656a of _0x53b039)console['error']('\x20\x20'+_0x52656a);return 0x1;}return console[_0x2321de(0x181)](_0x2321de(0x236)+_0x5dd3b8['modules'][_0x2321de(0x27f)]+_0x2321de(0x280)),_0x53652a['length']>0x0?0x1:0x0;}for(let _0x5279c1 of _0x53b039)console[_0x2321de(0x181)]('\x20\x20'+_0x5279c1);return console['log']('module-kit:\x20'+_0x5dd3b8[_0x2321de(0x1a3)]['length']+_0x2321de(0x2a1)+_0x53b039[_0x2321de(0x27f)]+_0x2321de(0x27d)),_0x53652a['length']>0x0?0x1:0x0;}return console[_0x2321de(0x2b7)](je),0x1;}Ft(process['argv'][_0x26279c(0x15a)](0x2))[_0x26279c(0x17e)](_0x59dd6c=>{const _0x344a24=_0x26279c;process[_0x344a24(0x187)]=_0x59dd6c;},_0x2aad62=>{const _0x4303ac=_0x26279c;console[_0x4303ac(0x2b7)](_0x2aad62 instanceof Error?_0x2aad62['message']:_0x2aad62),process[_0x4303ac(0x187)]=0x1;});
@@ -0,0 +1,10 @@
1
+ import type { ModuleKitConfig, ResolvedConfig } from "./types";
2
+ export declare const CONFIG_FILE = "module-kit.config.json";
3
+ /** Type the config object; an identity function, for editor completion in a `.ts` config. */
4
+ export declare const defineConfig: (config: ModuleKitConfig) => ModuleKitConfig;
5
+ /** Apply the defaults to a config whose paths are relative to `cwd`. Throws on a config that cannot work. */
6
+ export declare function resolveConfig(config: ModuleKitConfig, cwd: string): ResolvedConfig;
7
+ /** Read a JSON config file; its directory is what its paths are relative to. */
8
+ export declare function loadConfig(file: string): ResolvedConfig;
9
+ /** `Node` for `node`: a realm's name in clients and event names. */
10
+ export declare const realmKey: (realm: string) => string;
@@ -0,0 +1,22 @@
1
+ import type { Issue, Manifest, ManifestFieldKind, ManifestValue, ResolvedConfig } from "./types";
2
+ /** A module folder with its manifest as written; `manifest` is null when it could not be read. */
3
+ export interface Discovered {
4
+ /** Absolute folder. */
5
+ dir: string;
6
+ /** Folder relative to the root. */
7
+ path: string;
8
+ manifest: Manifest | null;
9
+ /** The config's extra manifest fields this manifest sets. */
10
+ extra: Record<string, ManifestValue>;
11
+ }
12
+ /** Read one manifest file. `extraFields` are the config's own fields beyond the kit's. */
13
+ export declare function readManifest(file: string, displayFile: string, extraFields?: Readonly<Record<string, ManifestFieldKind>>): {
14
+ manifest: Manifest | null;
15
+ extra: Record<string, ManifestValue>;
16
+ issues: Issue[];
17
+ };
18
+ /** Every module folder under the root, with its manifest. */
19
+ export declare function discover(config: ResolvedConfig): {
20
+ found: Discovered[];
21
+ issues: Issue[];
22
+ };
@@ -0,0 +1,21 @@
1
+ export interface FollowerOptions {
2
+ /** This realm's classes, by module id. A module with none here is ignored. */
3
+ modules: Readonly<Record<string, new () => object>>;
4
+ /** The hook member names. Default `onStart`, `onStop`. */
5
+ hooks?: {
6
+ start?: string;
7
+ stop?: string;
8
+ };
9
+ /** A start or stop that failed. Default: rethrown into the void (logged by nothing). */
10
+ onError?: (id: string, error: unknown) => void;
11
+ }
12
+ export interface Follower {
13
+ /** The module should (or should not) be running in this realm. */
14
+ follow(id: string, running: boolean): void;
15
+ /** Every module at once: `true` for the ones that should run. Modules not named should not. */
16
+ followAll(running: Readonly<Record<string, boolean>>): void;
17
+ isRunning(id: string): boolean;
18
+ /** Stop every running module. */
19
+ stopAll(): Promise<void>;
20
+ }
21
+ export declare function createFollower(options: FollowerOptions): Follower;
@@ -0,0 +1,49 @@
1
+ import type { ModuleGraph, ResolvedConfig, ScannedModule } from "./types";
2
+ export declare const HEADER = "// Auto-generated by @vyredo/module-kit. DO NOT EDIT.";
3
+ export interface GenerateResult {
4
+ /** Files whose content changed (or would, with `check`), relative to the config's directory. */
5
+ written: string[];
6
+ /** Generated files no longer produced, removed (or that would be). */
7
+ removed: string[];
8
+ }
9
+ /** The alias table: alias -> absolute file or folder pattern. `*` patterns follow tsconfig's `paths`. */
10
+ export declare function aliasTable(graph: ModuleGraph, config: ResolvedConfig, forModule?: ScannedModule, exists?: (file: string) => boolean, view?: string): Map<string, string[]>;
11
+ /** What a plugin is given. */
12
+ export interface PluginContext {
13
+ graph: ModuleGraph;
14
+ config: ResolvedConfig;
15
+ /** The first line the kit's own files carry; a plugin's `.ts` files may use it too. */
16
+ header: string;
17
+ /** A module's absolute folder. */
18
+ dirOf(m: ScannedModule): string;
19
+ }
20
+ /**
21
+ * Adds files to a generation: absolute path -> content. A plugin's files are
22
+ * written, checked for drift and removed when stale exactly as the kit's own.
23
+ * A file it writes at a path the config's `exports` names becomes that alias.
24
+ */
25
+ export interface Plugin {
26
+ name: string;
27
+ files(ctx: PluginContext): Map<string, string> | Record<string, string>;
28
+ /**
29
+ * Runs once every file is written (never with `check`), for a step that needs
30
+ * them on disk. Returns the files it changed, relative to the config's directory.
31
+ */
32
+ after?(ctx: PluginContext): string[] | void | Promise<string[] | void>;
33
+ }
34
+ /** Every file a generation produces: absolute path -> content. */
35
+ export declare function render(graph: ModuleGraph, config: ResolvedConfig, plugins?: readonly Plugin[]): Map<string, string>;
36
+ /**
37
+ * Write what changed and remove what is stale. With `check`, write nothing and
38
+ * report what would change: a CI step fails on a non-empty result.
39
+ */
40
+ export declare function generate(graph: ModuleGraph, config: ResolvedConfig, opts?: {
41
+ check?: boolean;
42
+ plugins?: readonly Plugin[];
43
+ }): GenerateResult;
44
+ /**
45
+ * Rewrite the kit's own entries inside a JSONC tsconfig's `compilerOptions.paths`:
46
+ * text, not a JSON round-trip, so every comment and every other entry is kept,
47
+ * and the trailing comma is re-balanced.
48
+ */
49
+ export declare function splicePaths(source: string, config: ResolvedConfig, table: Record<string, string[]>): string;
@@ -0,0 +1,22 @@
1
+ import type { Discovered } from "./discover";
2
+ import type { Issue } from "./types";
3
+ export interface Node {
4
+ id: string;
5
+ core: boolean;
6
+ requires: string[];
7
+ optional: string[];
8
+ /** For issues: the manifest's display path. */
9
+ file: string;
10
+ }
11
+ export declare function toNodes(found: Discovered[], displayFile: (d: Discovered) => string): Node[];
12
+ export declare function checkGraph(nodes: Node[]): Issue[];
13
+ /** What a module depends on: what it lists, plus every core module when it is not one. */
14
+ export declare function edges(n: Node, byId: Map<string, Node>): string[];
15
+ /** DFS with an on-stack mark; the cycle as a path, such as `["A", "B", "A"]`. */
16
+ export declare function findCycle(graph: Map<string, string[]>): string[] | null;
17
+ /**
18
+ * The start order: a module after everything it depends on, ties broken by id so
19
+ * the order is the same on every machine. Assumes `checkGraph` found no cycle; a
20
+ * module left on a cycle is appended in id order rather than dropped.
21
+ */
22
+ export declare function startOrder(nodes: Node[]): string[];
@@ -0,0 +1,36 @@
1
+ import { type GenerateResult, type Plugin } from "./generate";
2
+ import type { Issue, ModuleGraph, ResolvedConfig } from "./types";
3
+ export { CONFIG_FILE, defineConfig, loadConfig, resolveConfig } from "./config";
4
+ export { scan } from "./scan";
5
+ export { generate, render, aliasTable, splicePaths, HEADER, type GenerateResult, type Plugin, type PluginContext } from "./generate";
6
+ export { checkBoundaries, importsOf } from "./boundary";
7
+ export { defineManifest } from "./runtime";
8
+ export type * from "./types";
9
+ export interface RunResult {
10
+ graph: ModuleGraph;
11
+ /** Manifest, class and boundary issues together, sorted. */
12
+ issues: Issue[];
13
+ generated: GenerateResult | null;
14
+ }
15
+ /**
16
+ * Everything in one call: scan, check the boundaries, and (unless `generate` is
17
+ * false) generate. Nothing is written while the scan has issues, so a broken
18
+ * manifest never produces half a tree. `check` reports drift instead of writing.
19
+ */
20
+ export declare function run(config: ResolvedConfig, opts?: {
21
+ generate?: boolean;
22
+ check?: boolean;
23
+ plugins?: readonly Plugin[];
24
+ }): RunResult;
25
+ /**
26
+ * Load the config's plugin files. Each default-exports a `Plugin`, or a function
27
+ * of the config's directory returning one. A `.ts` plugin is loaded through the
28
+ * project's own `tsx`, resolved from the config's directory.
29
+ */
30
+ export declare function loadPlugins(config: ResolvedConfig): Promise<Plugin[]>;
31
+ /** `run`, then each plugin's `after` once the files are written; what they changed joins `written`. */
32
+ export declare function runWithPlugins(config: ResolvedConfig, opts?: {
33
+ generate?: boolean;
34
+ check?: boolean;
35
+ plugins?: readonly Plugin[];
36
+ }): Promise<RunResult>;