@bluebottle_gg/league-broadcast-client 1.3.1 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +590 -631
- package/dist/index.js +496 -57
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -454,6 +454,134 @@ var ChampSelectStateStore = class {
|
|
|
454
454
|
}
|
|
455
455
|
};
|
|
456
456
|
|
|
457
|
+
// src/reactivity/PostGameStateStore.ts
|
|
458
|
+
var PostGameStateStore = class {
|
|
459
|
+
constructor(initialState) {
|
|
460
|
+
/** Global listeners — called on every state change regardless of selector. */
|
|
461
|
+
this.listeners = /* @__PURE__ */ new Set();
|
|
462
|
+
/** Monotonically increasing version — used for cheap stale checks. */
|
|
463
|
+
this.version = 0;
|
|
464
|
+
this.snapshot = Object.freeze({
|
|
465
|
+
postGameData: initialState,
|
|
466
|
+
isActive: initialState.isActive,
|
|
467
|
+
version: this.version
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
// ---------------------------------------------------------------------------
|
|
471
|
+
// Core API
|
|
472
|
+
// ---------------------------------------------------------------------------
|
|
473
|
+
/** Return the current full snapshot. */
|
|
474
|
+
getSnapshot() {
|
|
475
|
+
return this.snapshot;
|
|
476
|
+
}
|
|
477
|
+
/** Return the current version number. */
|
|
478
|
+
getVersion() {
|
|
479
|
+
return this.version;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Subscribe to **all** state changes (unfiltered).
|
|
483
|
+
* Returns an unsubscribe function.
|
|
484
|
+
*/
|
|
485
|
+
subscribe(listener) {
|
|
486
|
+
this.listeners.add(listener);
|
|
487
|
+
return () => {
|
|
488
|
+
this.listeners.delete(listener);
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
// ---------------------------------------------------------------------------
|
|
492
|
+
// Selectors
|
|
493
|
+
// ---------------------------------------------------------------------------
|
|
494
|
+
/**
|
|
495
|
+
* Create a **subscribable slice** that only triggers when the selected
|
|
496
|
+
* value changes according to `equalityFn` (defaults to `===`).
|
|
497
|
+
*/
|
|
498
|
+
select(selector, equalityFn = Object.is) {
|
|
499
|
+
let currentValue = selector(this.snapshot);
|
|
500
|
+
let lastVersion = this.version;
|
|
501
|
+
const sliceListeners = /* @__PURE__ */ new Set();
|
|
502
|
+
const getSnapshot = () => {
|
|
503
|
+
if (lastVersion !== this.version) {
|
|
504
|
+
const next = selector(this.snapshot);
|
|
505
|
+
if (!equalityFn(currentValue, next)) {
|
|
506
|
+
currentValue = next;
|
|
507
|
+
}
|
|
508
|
+
lastVersion = this.version;
|
|
509
|
+
}
|
|
510
|
+
return currentValue;
|
|
511
|
+
};
|
|
512
|
+
const subscribe = (listener) => {
|
|
513
|
+
sliceListeners.add(listener);
|
|
514
|
+
const unsub = this.subscribe(() => {
|
|
515
|
+
const prev = currentValue;
|
|
516
|
+
const next = selector(this.snapshot);
|
|
517
|
+
lastVersion = this.version;
|
|
518
|
+
if (!equalityFn(prev, next)) {
|
|
519
|
+
currentValue = next;
|
|
520
|
+
listener();
|
|
521
|
+
}
|
|
522
|
+
});
|
|
523
|
+
return () => {
|
|
524
|
+
sliceListeners.delete(listener);
|
|
525
|
+
unsub();
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
return { subscribe, getSnapshot };
|
|
529
|
+
}
|
|
530
|
+
// ---------------------------------------------------------------------------
|
|
531
|
+
// Convenience helpers
|
|
532
|
+
// ---------------------------------------------------------------------------
|
|
533
|
+
/**
|
|
534
|
+
* Watch a derived value and invoke `callback` whenever it changes.
|
|
535
|
+
* Returns an unsubscribe function.
|
|
536
|
+
*/
|
|
537
|
+
watch(selector, callback, equalityFn = Object.is) {
|
|
538
|
+
let prev = selector(this.snapshot);
|
|
539
|
+
return this.subscribe(() => {
|
|
540
|
+
const next = selector(this.snapshot);
|
|
541
|
+
if (!equalityFn(prev, next)) {
|
|
542
|
+
const old = prev;
|
|
543
|
+
prev = next;
|
|
544
|
+
callback(next, old);
|
|
545
|
+
}
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Watch a derived value and invoke `callback` whenever it changes,
|
|
550
|
+
* **and** invoke it immediately with the current value.
|
|
551
|
+
*/
|
|
552
|
+
watchImmediate(selector, callback, equalityFn = Object.is) {
|
|
553
|
+
const current = selector(this.snapshot);
|
|
554
|
+
callback(current, void 0);
|
|
555
|
+
return this.watch(selector, callback, equalityFn);
|
|
556
|
+
}
|
|
557
|
+
// ---------------------------------------------------------------------------
|
|
558
|
+
// Internal — called by LeagueBroadcastClient
|
|
559
|
+
// ---------------------------------------------------------------------------
|
|
560
|
+
/** @internal Replace post-game data snapshot and notify listeners. */
|
|
561
|
+
_setPostGameData(data) {
|
|
562
|
+
this.version++;
|
|
563
|
+
this.snapshot = Object.freeze({
|
|
564
|
+
postGameData: data,
|
|
565
|
+
isActive: data.isActive,
|
|
566
|
+
version: this.version
|
|
567
|
+
});
|
|
568
|
+
this.emit();
|
|
569
|
+
}
|
|
570
|
+
/** @internal Replace entire snapshot (used on post-game hide / reset). */
|
|
571
|
+
_reset(data) {
|
|
572
|
+
this.version++;
|
|
573
|
+
this.snapshot = Object.freeze({
|
|
574
|
+
postGameData: data,
|
|
575
|
+
isActive: data.isActive,
|
|
576
|
+
version: this.version
|
|
577
|
+
});
|
|
578
|
+
this.emit();
|
|
579
|
+
}
|
|
580
|
+
emit() {
|
|
581
|
+
this.listeners.forEach((l) => l());
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
|
|
457
585
|
// src/reactivity/structuralShare.ts
|
|
458
586
|
function structuralShare(prev, next) {
|
|
459
587
|
if (Object.is(prev, next)) {
|
|
@@ -512,7 +640,7 @@ function isObject(value) {
|
|
|
512
640
|
return value !== null && typeof value === "object";
|
|
513
641
|
}
|
|
514
642
|
|
|
515
|
-
// types/shared/
|
|
643
|
+
// types/shared/GameState.ts
|
|
516
644
|
var GameState = /* @__PURE__ */ ((GameState2) => {
|
|
517
645
|
GameState2[GameState2["OutOfGame"] = 0] = "OutOfGame";
|
|
518
646
|
GameState2[GameState2["Loading"] = 1] = "Loading";
|
|
@@ -551,6 +679,16 @@ var champSelectStateData = class {
|
|
|
551
679
|
}
|
|
552
680
|
};
|
|
553
681
|
|
|
682
|
+
// types/postgame/postGameStateData.ts
|
|
683
|
+
var postGameStateData = class {
|
|
684
|
+
constructor() {
|
|
685
|
+
this.isActive = false;
|
|
686
|
+
this.isConnected = false;
|
|
687
|
+
this.isMocking = false;
|
|
688
|
+
this.overview = null;
|
|
689
|
+
}
|
|
690
|
+
};
|
|
691
|
+
|
|
554
692
|
// src/api/ApiClient.ts
|
|
555
693
|
var ApiClient = class {
|
|
556
694
|
constructor(baseUrl) {
|
|
@@ -1823,6 +1961,7 @@ var LeagueBroadcastClient = class {
|
|
|
1823
1961
|
this.gameState = 0 /* OutOfGame */;
|
|
1824
1962
|
this._isTestingEnvironment = false;
|
|
1825
1963
|
this.champSelectWasActive = false;
|
|
1964
|
+
this.postGameSeedPromise = null;
|
|
1826
1965
|
// -- In-game event handlers -------------------------------------------------
|
|
1827
1966
|
this.stateUpdateHandlers = /* @__PURE__ */ new Set();
|
|
1828
1967
|
this.gameStatusHandlers = /* @__PURE__ */ new Set();
|
|
@@ -1843,11 +1982,21 @@ var LeagueBroadcastClient = class {
|
|
|
1843
1982
|
onChampSelectEnd: /* @__PURE__ */ new Set(),
|
|
1844
1983
|
onRouteUpdate: /* @__PURE__ */ new Set()
|
|
1845
1984
|
};
|
|
1985
|
+
// -- Post-game event handlers -----------------------------------------------
|
|
1986
|
+
this.postGameUpdateHandlers = /* @__PURE__ */ new Set();
|
|
1987
|
+
this.postGameEventHandlers = {
|
|
1988
|
+
onRouteUpdate: /* @__PURE__ */ new Set(),
|
|
1989
|
+
onMockingUpdate: /* @__PURE__ */ new Set(),
|
|
1990
|
+
onActiveComponentChanged: /* @__PURE__ */ new Set(),
|
|
1991
|
+
onPostGameShow: /* @__PURE__ */ new Set(),
|
|
1992
|
+
onPostGameHide: /* @__PURE__ */ new Set()
|
|
1993
|
+
};
|
|
1846
1994
|
this.config = {
|
|
1847
1995
|
host: config.host,
|
|
1848
1996
|
port: config.port ?? 58869,
|
|
1849
1997
|
ingameWsRoute: config.ingameWsRoute ?? "/ws/in",
|
|
1850
1998
|
preGameWsRoute: config.preGameWsRoute ?? "/ws/pre",
|
|
1999
|
+
postGameWsRoute: config.postGameWsRoute ?? "/ws/post",
|
|
1851
2000
|
apiRoute: config.apiRoute ?? "/api",
|
|
1852
2001
|
cacheRoute: config.cacheRoute ?? "/cache",
|
|
1853
2002
|
useHttps: config.useHttps ?? false,
|
|
@@ -1868,6 +2017,13 @@ var LeagueBroadcastClient = class {
|
|
|
1868
2017
|
this.preGameStore = new ChampSelectStateStore(this.champSelectData);
|
|
1869
2018
|
this.setupPreGameMessageHandler();
|
|
1870
2019
|
this.preGameWs.onDisconnect(() => this.endChampSelect());
|
|
2020
|
+
this.postGameWs = new WebSocketManager();
|
|
2021
|
+
this.postGameData = new postGameStateData();
|
|
2022
|
+
this.postGameStore = new PostGameStateStore(this.postGameData);
|
|
2023
|
+
this.setupPostGameMessageHandler();
|
|
2024
|
+
this.postGameWs.onConnect(() => {
|
|
2025
|
+
this.postGameSeedPromise = this.seedPostGameState();
|
|
2026
|
+
});
|
|
1871
2027
|
if (this.config.autoConnect) {
|
|
1872
2028
|
this.connect();
|
|
1873
2029
|
}
|
|
@@ -1895,10 +2051,16 @@ var LeagueBroadcastClient = class {
|
|
|
1895
2051
|
// Connection management
|
|
1896
2052
|
// ===========================================================================
|
|
1897
2053
|
/**
|
|
1898
|
-
* Connect to
|
|
2054
|
+
* Connect to the in-game, pre-game, and (unless disabled) post-game
|
|
2055
|
+
* WebSocket endpoints.
|
|
2056
|
+
*
|
|
2057
|
+
* All connections are attempted in parallel. If any fails the returned
|
|
2058
|
+
* promise rejects, but the other connections may still succeed.
|
|
1899
2059
|
*
|
|
1900
|
-
*
|
|
1901
|
-
*
|
|
2060
|
+
* On a successful post-game connection the current post-game state
|
|
2061
|
+
* (`isMocking`, `activeComponent`) is seeded from the REST API before the
|
|
2062
|
+
* promise resolves, so pages that connect mid-session see the live backend
|
|
2063
|
+
* state instead of stale defaults.
|
|
1902
2064
|
*/
|
|
1903
2065
|
async connect() {
|
|
1904
2066
|
this.startOverlayHealthIfEnabled();
|
|
@@ -1906,10 +2068,15 @@ var LeagueBroadcastClient = class {
|
|
|
1906
2068
|
const base = `${protocol}://${this.config.host}:${this.config.port}`;
|
|
1907
2069
|
const ingameUrl = `${base}${this.config.ingameWsRoute}`;
|
|
1908
2070
|
const preGameUrl = `${base}${this.config.preGameWsRoute}`;
|
|
1909
|
-
const
|
|
2071
|
+
const connections = [
|
|
1910
2072
|
this.ingameWs.connect(ingameUrl),
|
|
1911
2073
|
this.preGameWs.connect(preGameUrl)
|
|
1912
|
-
]
|
|
2074
|
+
];
|
|
2075
|
+
if (this.config.postGameWsRoute !== false) {
|
|
2076
|
+
const postGameUrl = `${base}${this.config.postGameWsRoute}`;
|
|
2077
|
+
connections.push(this.postGameWs.connect(postGameUrl));
|
|
2078
|
+
}
|
|
2079
|
+
const results = await Promise.allSettled(connections);
|
|
1913
2080
|
const failures = results.filter((r) => r.status === "rejected");
|
|
1914
2081
|
if (failures.length > 0) {
|
|
1915
2082
|
const reasons = failures.map(
|
|
@@ -1921,6 +2088,9 @@ var LeagueBroadcastClient = class {
|
|
|
1921
2088
|
);
|
|
1922
2089
|
throw reasons[0];
|
|
1923
2090
|
}
|
|
2091
|
+
if (this.postGameSeedPromise) {
|
|
2092
|
+
await this.postGameSeedPromise;
|
|
2093
|
+
}
|
|
1924
2094
|
}
|
|
1925
2095
|
/**
|
|
1926
2096
|
* Disconnect from both WebSocket endpoints.
|
|
@@ -1928,7 +2098,11 @@ var LeagueBroadcastClient = class {
|
|
|
1928
2098
|
disconnect() {
|
|
1929
2099
|
this.ingameWs.disconnect();
|
|
1930
2100
|
this.preGameWs.disconnect();
|
|
1931
|
-
this.
|
|
2101
|
+
this.postGameWs.disconnect();
|
|
2102
|
+
try {
|
|
2103
|
+
this._overlayHealth?.stop();
|
|
2104
|
+
} catch {
|
|
2105
|
+
}
|
|
1932
2106
|
this._overlayHealth = null;
|
|
1933
2107
|
}
|
|
1934
2108
|
/**
|
|
@@ -1963,6 +2137,12 @@ var LeagueBroadcastClient = class {
|
|
|
1963
2137
|
isPreGameConnected() {
|
|
1964
2138
|
return this.preGameWs.isConnected();
|
|
1965
2139
|
}
|
|
2140
|
+
/**
|
|
2141
|
+
* Whether the post-game WebSocket is connected.
|
|
2142
|
+
*/
|
|
2143
|
+
isPostGameConnected() {
|
|
2144
|
+
return this.postGameWs.isConnected();
|
|
2145
|
+
}
|
|
1966
2146
|
// ===========================================================================
|
|
1967
2147
|
// In-game data access
|
|
1968
2148
|
// ===========================================================================
|
|
@@ -1990,6 +2170,17 @@ var LeagueBroadcastClient = class {
|
|
|
1990
2170
|
return this.champSelectData.isActive;
|
|
1991
2171
|
}
|
|
1992
2172
|
// ===========================================================================
|
|
2173
|
+
// Post-game data access
|
|
2174
|
+
// ===========================================================================
|
|
2175
|
+
/** Get the current post-game state. */
|
|
2176
|
+
getPostGameData() {
|
|
2177
|
+
return this.postGameData;
|
|
2178
|
+
}
|
|
2179
|
+
/** Whether post-game is currently active. */
|
|
2180
|
+
isPostGameActive() {
|
|
2181
|
+
return this.postGameData.isActive;
|
|
2182
|
+
}
|
|
2183
|
+
// ===========================================================================
|
|
1993
2184
|
// In-game event handlers
|
|
1994
2185
|
// ===========================================================================
|
|
1995
2186
|
/** Register a handler for in-game state updates. */
|
|
@@ -2049,6 +2240,32 @@ var LeagueBroadcastClient = class {
|
|
|
2049
2240
|
};
|
|
2050
2241
|
}
|
|
2051
2242
|
// ===========================================================================
|
|
2243
|
+
// Post-game event handlers
|
|
2244
|
+
// ===========================================================================
|
|
2245
|
+
/** Register a handler for post-game state updates. */
|
|
2246
|
+
onPostGameUpdate(handler) {
|
|
2247
|
+
this.postGameUpdateHandlers.add(handler);
|
|
2248
|
+
return () => this.postGameUpdateHandlers.delete(handler);
|
|
2249
|
+
}
|
|
2250
|
+
/** Register handlers for post-game lifecycle and analysis events. Returns an unsubscribe function. */
|
|
2251
|
+
onPostGameEvents(handlers) {
|
|
2252
|
+
const entries = Object.entries(handlers);
|
|
2253
|
+
for (const [key, handler] of entries) {
|
|
2254
|
+
if (handler) {
|
|
2255
|
+
this.postGameEventHandlers[key].add(handler);
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
return () => {
|
|
2259
|
+
for (const [key, handler] of entries) {
|
|
2260
|
+
if (handler) {
|
|
2261
|
+
this.postGameEventHandlers[key].delete(
|
|
2262
|
+
handler
|
|
2263
|
+
);
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
};
|
|
2267
|
+
}
|
|
2268
|
+
// ===========================================================================
|
|
2052
2269
|
// Connection event handlers
|
|
2053
2270
|
// ===========================================================================
|
|
2054
2271
|
/** Register a handler for in-game connection. */
|
|
@@ -2075,6 +2292,18 @@ var LeagueBroadcastClient = class {
|
|
|
2075
2292
|
onPreGameError(handler) {
|
|
2076
2293
|
return this.preGameWs.onError(handler);
|
|
2077
2294
|
}
|
|
2295
|
+
/** Register a handler for post-game connection. */
|
|
2296
|
+
onPostGameConnect(handler) {
|
|
2297
|
+
return this.postGameWs.onConnect(handler);
|
|
2298
|
+
}
|
|
2299
|
+
/** Register a handler for post-game disconnection. */
|
|
2300
|
+
onPostGameDisconnect(handler) {
|
|
2301
|
+
return this.postGameWs.onDisconnect(handler);
|
|
2302
|
+
}
|
|
2303
|
+
/** Register a handler for post-game connection errors. */
|
|
2304
|
+
onPostGameError(handler) {
|
|
2305
|
+
return this.postGameWs.onError(handler);
|
|
2306
|
+
}
|
|
2078
2307
|
// ===========================================================================
|
|
2079
2308
|
// Reactive API — in-game (convenience wrappers around this.store)
|
|
2080
2309
|
// ===========================================================================
|
|
@@ -2140,6 +2369,37 @@ var LeagueBroadcastClient = class {
|
|
|
2140
2369
|
return this.preGameStore.watch(selector, callback, equalityFn);
|
|
2141
2370
|
}
|
|
2142
2371
|
// ===========================================================================
|
|
2372
|
+
// Reactive API — post-game (convenience wrappers around this.postGameStore)
|
|
2373
|
+
// ===========================================================================
|
|
2374
|
+
/**
|
|
2375
|
+
* Create a subscribable slice of **post-game** (analysis) state.
|
|
2376
|
+
*
|
|
2377
|
+
* ```tsx
|
|
2378
|
+
* const overview = client.selectPostGame(s => s.postGameData.overview);
|
|
2379
|
+
* function Winner() {
|
|
2380
|
+
* const value = useSyncExternalStore(overview.subscribe, overview.getSnapshot);
|
|
2381
|
+
* return <span>{value?.winnerSide}</span>;
|
|
2382
|
+
* }
|
|
2383
|
+
* ```
|
|
2384
|
+
*/
|
|
2385
|
+
selectPostGame(selector, equalityFn) {
|
|
2386
|
+
return this.postGameStore.select(selector, equalityFn);
|
|
2387
|
+
}
|
|
2388
|
+
/**
|
|
2389
|
+
* Watch a derived **post-game** value and invoke `callback` whenever it
|
|
2390
|
+
* changes. Returns an unsubscribe function.
|
|
2391
|
+
*
|
|
2392
|
+
* ```ts
|
|
2393
|
+
* client.watchPostGame(
|
|
2394
|
+
* s => s.postGameData.overview?.winnerSide,
|
|
2395
|
+
* (winner, prev) => console.log(`Winner: ${prev} → ${winner}`),
|
|
2396
|
+
* );
|
|
2397
|
+
* ```
|
|
2398
|
+
*/
|
|
2399
|
+
watchPostGame(selector, callback, equalityFn) {
|
|
2400
|
+
return this.postGameStore.watch(selector, callback, equalityFn);
|
|
2401
|
+
}
|
|
2402
|
+
// ===========================================================================
|
|
2143
2403
|
// URLs
|
|
2144
2404
|
// ===========================================================================
|
|
2145
2405
|
/** Get the base HTTP URL for API requests. */
|
|
@@ -2348,6 +2608,139 @@ var LeagueBroadcastClient = class {
|
|
|
2348
2608
|
(handler) => handler(this.champSelectData)
|
|
2349
2609
|
);
|
|
2350
2610
|
}
|
|
2611
|
+
// ===========================================================================
|
|
2612
|
+
// Private — post-game message handling
|
|
2613
|
+
// ===========================================================================
|
|
2614
|
+
setupPostGameMessageHandler() {
|
|
2615
|
+
this.postGameWs.onMessage((messageData) => {
|
|
2616
|
+
switch (messageData.type) {
|
|
2617
|
+
case "postgame-route-change":
|
|
2618
|
+
case "frontend-route-update":
|
|
2619
|
+
this.handlePostGameRouteUpdate(messageData.uri);
|
|
2620
|
+
break;
|
|
2621
|
+
case "postgame-mocking-update":
|
|
2622
|
+
this.handlePostGameMockingUpdate(
|
|
2623
|
+
messageData.mockingState ?? messageData.mocking
|
|
2624
|
+
);
|
|
2625
|
+
break;
|
|
2626
|
+
case "active-component-changed":
|
|
2627
|
+
this.handleActiveComponentChanged(messageData);
|
|
2628
|
+
break;
|
|
2629
|
+
}
|
|
2630
|
+
});
|
|
2631
|
+
}
|
|
2632
|
+
/**
|
|
2633
|
+
* Seed `isMocking` and `activeComponent` from the REST API.
|
|
2634
|
+
*
|
|
2635
|
+
* The post-game WebSocket only broadcasts changes, so a client that
|
|
2636
|
+
* connects while mocking is already enabled or a component is already
|
|
2637
|
+
* active would keep the stale defaults until the next broadcast. Runs on
|
|
2638
|
+
* every (re)connect; event handlers fire only for values that actually
|
|
2639
|
+
* changed. Never rejects — a failed request leaves that field untouched.
|
|
2640
|
+
*/
|
|
2641
|
+
async seedPostGameState() {
|
|
2642
|
+
const [mockingResult, activeComponentResult] = await Promise.allSettled([
|
|
2643
|
+
this.api.postGame.getMocking(),
|
|
2644
|
+
this.api.postGame.getActivePostGameAnalysis()
|
|
2645
|
+
]);
|
|
2646
|
+
const nextData = { ...this.postGameData };
|
|
2647
|
+
if (mockingResult.status === "fulfilled") {
|
|
2648
|
+
nextData.isMocking = Boolean(mockingResult.value);
|
|
2649
|
+
}
|
|
2650
|
+
if (activeComponentResult.status === "fulfilled") {
|
|
2651
|
+
const active = activeComponentResult.value ?? null;
|
|
2652
|
+
if (active !== null || this.postGameData.activeComponent != null) {
|
|
2653
|
+
nextData.activeComponent = active;
|
|
2654
|
+
}
|
|
2655
|
+
}
|
|
2656
|
+
const prevData = this.postGameData;
|
|
2657
|
+
this.postGameData = structuralShare(prevData, nextData);
|
|
2658
|
+
if (this.postGameData === prevData) return;
|
|
2659
|
+
this.postGameStore._setPostGameData(this.postGameData);
|
|
2660
|
+
this.postGameUpdateHandlers.forEach(
|
|
2661
|
+
(handler) => handler(this.postGameData)
|
|
2662
|
+
);
|
|
2663
|
+
if (this.postGameData.isMocking !== prevData.isMocking) {
|
|
2664
|
+
this.postGameEventHandlers.onMockingUpdate.forEach(
|
|
2665
|
+
(h) => h(this.postGameData.isMocking)
|
|
2666
|
+
);
|
|
2667
|
+
}
|
|
2668
|
+
const activeComponent = this.postGameData.activeComponent;
|
|
2669
|
+
if (activeComponent != null && activeComponent !== prevData.activeComponent) {
|
|
2670
|
+
this.postGameEventHandlers.onActiveComponentChanged.forEach(
|
|
2671
|
+
(h) => h(activeComponent)
|
|
2672
|
+
);
|
|
2673
|
+
}
|
|
2674
|
+
}
|
|
2675
|
+
handlePostGameRouteUpdate(uri) {
|
|
2676
|
+
if (typeof uri !== "string" || uri.length === 0) return;
|
|
2677
|
+
this.postGameEventHandlers.onRouteUpdate.forEach((h) => h(uri));
|
|
2678
|
+
}
|
|
2679
|
+
handlePostGameMockingUpdate(mocking) {
|
|
2680
|
+
const isMocking = Boolean(mocking);
|
|
2681
|
+
const nextData = {
|
|
2682
|
+
...this.postGameData,
|
|
2683
|
+
isMocking
|
|
2684
|
+
};
|
|
2685
|
+
this.postGameData = structuralShare(this.postGameData, nextData);
|
|
2686
|
+
this.postGameStore._setPostGameData(this.postGameData);
|
|
2687
|
+
this.postGameUpdateHandlers.forEach(
|
|
2688
|
+
(handler) => handler(this.postGameData)
|
|
2689
|
+
);
|
|
2690
|
+
this.postGameEventHandlers.onMockingUpdate.forEach((h) => h(isMocking));
|
|
2691
|
+
}
|
|
2692
|
+
handleActiveComponentChanged(messageData) {
|
|
2693
|
+
const { type: _type, ...rest } = messageData ?? {};
|
|
2694
|
+
const args = messageData?.args ?? rest;
|
|
2695
|
+
const nextData = {
|
|
2696
|
+
...this.postGameData,
|
|
2697
|
+
activeComponent: args
|
|
2698
|
+
};
|
|
2699
|
+
this.postGameData = structuralShare(this.postGameData, nextData);
|
|
2700
|
+
this.postGameStore._setPostGameData(this.postGameData);
|
|
2701
|
+
this.postGameUpdateHandlers.forEach(
|
|
2702
|
+
(handler) => handler(this.postGameData)
|
|
2703
|
+
);
|
|
2704
|
+
this.postGameEventHandlers.onActiveComponentChanged.forEach((h) => h(args));
|
|
2705
|
+
}
|
|
2706
|
+
// ===========================================================================
|
|
2707
|
+
// Post-game data methods
|
|
2708
|
+
// ===========================================================================
|
|
2709
|
+
/** Fetch the postgame overview (current game, a specific game, or the mock overview when mocking) and activate the postgame state. */
|
|
2710
|
+
async showPostGame(gameId) {
|
|
2711
|
+
const overview = this.postGameData.isMocking ? await this.api.postGame.getMockGameOverview() : gameId !== void 0 ? await this.api.postGame.getGameOverview(gameId) : await this.api.postGame.getCurrentGameOverview();
|
|
2712
|
+
const nextData = {
|
|
2713
|
+
...this.postGameData,
|
|
2714
|
+
isActive: true,
|
|
2715
|
+
gameId,
|
|
2716
|
+
overview
|
|
2717
|
+
};
|
|
2718
|
+
this.postGameData = structuralShare(this.postGameData, nextData);
|
|
2719
|
+
this.postGameStore._setPostGameData(this.postGameData);
|
|
2720
|
+
this.postGameUpdateHandlers.forEach(
|
|
2721
|
+
(handler) => handler(this.postGameData)
|
|
2722
|
+
);
|
|
2723
|
+
this.postGameEventHandlers.onPostGameShow.forEach((h) => h(overview));
|
|
2724
|
+
return overview;
|
|
2725
|
+
}
|
|
2726
|
+
/** Re-fetch the postgame overview using the stored game id / mocking state. No-op when postgame is not active. */
|
|
2727
|
+
async refreshPostGame() {
|
|
2728
|
+
if (!this.postGameData.isActive) return;
|
|
2729
|
+
await this.showPostGame(this.postGameData.gameId);
|
|
2730
|
+
}
|
|
2731
|
+
/** Hide / reset the postgame state (preserves `isMocking` and `isConnected`). */
|
|
2732
|
+
hidePostGame() {
|
|
2733
|
+
console.log("[LeagueBroadcastClient] Post-game hidden, resetting data");
|
|
2734
|
+
const reset = new postGameStateData();
|
|
2735
|
+
reset.isMocking = this.postGameData.isMocking;
|
|
2736
|
+
reset.isConnected = this.postGameData.isConnected;
|
|
2737
|
+
this.postGameData = reset;
|
|
2738
|
+
this.postGameStore._reset(this.postGameData);
|
|
2739
|
+
this.postGameEventHandlers.onPostGameHide.forEach((h) => h());
|
|
2740
|
+
this.postGameUpdateHandlers.forEach(
|
|
2741
|
+
(handler) => handler(this.postGameData)
|
|
2742
|
+
);
|
|
2743
|
+
}
|
|
2351
2744
|
};
|
|
2352
2745
|
|
|
2353
2746
|
// types/cloud/changeDetectionResponse.ts
|
|
@@ -2433,7 +2826,7 @@ var cloudSyncResult = class {
|
|
|
2433
2826
|
}
|
|
2434
2827
|
};
|
|
2435
2828
|
|
|
2436
|
-
// types/shared/style/set/
|
|
2829
|
+
// types/shared/style/set/SetPhaseType.ts
|
|
2437
2830
|
var SetPhaseType = /* @__PURE__ */ ((SetPhaseType2) => {
|
|
2438
2831
|
SetPhaseType2[SetPhaseType2["Pre"] = 0] = "Pre";
|
|
2439
2832
|
SetPhaseType2[SetPhaseType2["In"] = 1] = "In";
|
|
@@ -2504,7 +2897,7 @@ var cloudOverlayUploadResponse = class {
|
|
|
2504
2897
|
var casterModeConfigDto = class {
|
|
2505
2898
|
};
|
|
2506
2899
|
|
|
2507
|
-
// types/hotkey/
|
|
2900
|
+
// types/hotkey/Lane.ts
|
|
2508
2901
|
var Lane = /* @__PURE__ */ ((Lane2) => {
|
|
2509
2902
|
Lane2[Lane2["Top"] = 0] = "Top";
|
|
2510
2903
|
Lane2[Lane2["Jungle"] = 1] = "Jungle";
|
|
@@ -2553,7 +2946,7 @@ var singlePostgameHotkeyConfigDto = class {
|
|
|
2553
2946
|
}
|
|
2554
2947
|
};
|
|
2555
2948
|
|
|
2556
|
-
// types/ingame/
|
|
2949
|
+
// types/ingame/SpellSlotIndex.ts
|
|
2557
2950
|
var SpellSlotIndex = /* @__PURE__ */ ((SpellSlotIndex2) => {
|
|
2558
2951
|
SpellSlotIndex2[SpellSlotIndex2["Q"] = 0] = "Q";
|
|
2559
2952
|
SpellSlotIndex2[SpellSlotIndex2["W"] = 1] = "W";
|
|
@@ -2629,7 +3022,7 @@ var announcementParameter = class {
|
|
|
2629
3022
|
}
|
|
2630
3023
|
};
|
|
2631
3024
|
|
|
2632
|
-
// types/ingame/announcer/
|
|
3025
|
+
// types/ingame/announcer/AnnouncementType.ts
|
|
2633
3026
|
var AnnouncementType = /* @__PURE__ */ ((AnnouncementType2) => {
|
|
2634
3027
|
AnnouncementType2[AnnouncementType2["Unknown"] = 0] = "Unknown";
|
|
2635
3028
|
AnnouncementType2[AnnouncementType2["Kill"] = 1] = "Kill";
|
|
@@ -2687,7 +3080,7 @@ var championCombatStats = class {
|
|
|
2687
3080
|
}
|
|
2688
3081
|
};
|
|
2689
3082
|
|
|
2690
|
-
// types/shared/style/
|
|
3083
|
+
// types/shared/style/Team.ts
|
|
2691
3084
|
var Team = /* @__PURE__ */ ((Team2) => {
|
|
2692
3085
|
Team2[Team2["None"] = 0] = "None";
|
|
2693
3086
|
Team2[Team2["Order"] = 1] = "Order";
|
|
@@ -2763,7 +3156,7 @@ var ingameDamageCompositionData = class {
|
|
|
2763
3156
|
}
|
|
2764
3157
|
};
|
|
2765
3158
|
|
|
2766
|
-
// types/ingame/damageEvent/
|
|
3159
|
+
// types/ingame/damageEvent/DamageEventType.ts
|
|
2767
3160
|
var DamageEventType = /* @__PURE__ */ ((DamageEventType2) => {
|
|
2768
3161
|
DamageEventType2[DamageEventType2["PlayerDeath"] = 0] = "PlayerDeath";
|
|
2769
3162
|
DamageEventType2[DamageEventType2["ObjectiveKill"] = 1] = "ObjectiveKill";
|
|
@@ -2843,7 +3236,7 @@ var damageRecapEntry = class {
|
|
|
2843
3236
|
}
|
|
2844
3237
|
};
|
|
2845
3238
|
|
|
2846
|
-
// types/ingame/damageRecap/
|
|
3239
|
+
// types/ingame/damageRecap/DamageType.ts
|
|
2847
3240
|
var DamageType = /* @__PURE__ */ ((DamageType2) => {
|
|
2848
3241
|
DamageType2[DamageType2["Physical"] = 0] = "Physical";
|
|
2849
3242
|
DamageType2[DamageType2["Magic"] = 1] = "Magic";
|
|
@@ -2874,7 +3267,7 @@ var damageRecapTimelineEntry = class {
|
|
|
2874
3267
|
}
|
|
2875
3268
|
};
|
|
2876
3269
|
|
|
2877
|
-
// types/ingame/damageRecap/
|
|
3270
|
+
// types/ingame/damageRecap/ObjectiveRecapDisplayMode.ts
|
|
2878
3271
|
var ObjectiveRecapDisplayMode = /* @__PURE__ */ ((ObjectiveRecapDisplayMode2) => {
|
|
2879
3272
|
ObjectiveRecapDisplayMode2[ObjectiveRecapDisplayMode2["None"] = 0] = "None";
|
|
2880
3273
|
ObjectiveRecapDisplayMode2[ObjectiveRecapDisplayMode2["ObjectiveInfo"] = 1] = "ObjectiveInfo";
|
|
@@ -2895,7 +3288,7 @@ var ingameDamageRecapData = class {
|
|
|
2895
3288
|
}
|
|
2896
3289
|
};
|
|
2897
3290
|
|
|
2898
|
-
// types/ingame/damageSplit/
|
|
3291
|
+
// types/ingame/damageSplit/DamageSplitMode.ts
|
|
2899
3292
|
var DamageSplitMode = /* @__PURE__ */ ((DamageSplitMode2) => {
|
|
2900
3293
|
DamageSplitMode2[DamageSplitMode2["Detail"] = 0] = "Detail";
|
|
2901
3294
|
DamageSplitMode2[DamageSplitMode2["Flow"] = 1] = "Flow";
|
|
@@ -2950,7 +3343,7 @@ var killFeedEvent = class {
|
|
|
2950
3343
|
}
|
|
2951
3344
|
};
|
|
2952
3345
|
|
|
2953
|
-
// types/ingame/event/
|
|
3346
|
+
// types/ingame/event/ObjectiveEventType.ts
|
|
2954
3347
|
var ObjectiveEventType = /* @__PURE__ */ ((ObjectiveEventType2) => {
|
|
2955
3348
|
ObjectiveEventType2[ObjectiveEventType2["Spawn"] = 0] = "Spawn";
|
|
2956
3349
|
ObjectiveEventType2[ObjectiveEventType2["Kill"] = 1] = "Kill";
|
|
@@ -3027,7 +3420,7 @@ var singleGameGoldGraphData = class {
|
|
|
3027
3420
|
}
|
|
3028
3421
|
};
|
|
3029
3422
|
|
|
3030
|
-
// types/ingame/objective/
|
|
3423
|
+
// types/ingame/objective/IngameObjectiveType.ts
|
|
3031
3424
|
var IngameObjectiveType = /* @__PURE__ */ ((IngameObjectiveType2) => {
|
|
3032
3425
|
IngameObjectiveType2[IngameObjectiveType2["GRUB"] = 0] = "GRUB";
|
|
3033
3426
|
IngameObjectiveType2[IngameObjectiveType2["HERALD"] = 1] = "HERALD";
|
|
@@ -3095,7 +3488,7 @@ var killParticipationPlayer = class {
|
|
|
3095
3488
|
}
|
|
3096
3489
|
};
|
|
3097
3490
|
|
|
3098
|
-
// types/ingame/objective/
|
|
3491
|
+
// types/ingame/objective/CampLocation.ts
|
|
3099
3492
|
var CampLocation = /* @__PURE__ */ ((CampLocation2) => {
|
|
3100
3493
|
CampLocation2[CampLocation2["DragonPit"] = 2] = "DragonPit";
|
|
3101
3494
|
CampLocation2[CampLocation2["BaronPit"] = 3] = "BaronPit";
|
|
@@ -3858,7 +4251,7 @@ var killFeed = class {
|
|
|
3858
4251
|
}
|
|
3859
4252
|
};
|
|
3860
4253
|
|
|
3861
|
-
// types/shared/style/
|
|
4254
|
+
// types/shared/style/ContentAlign.ts
|
|
3862
4255
|
var ContentAlign = /* @__PURE__ */ ((ContentAlign2) => {
|
|
3863
4256
|
ContentAlign2[ContentAlign2["TopLeft"] = 0] = "TopLeft";
|
|
3864
4257
|
ContentAlign2[ContentAlign2["TopCenter"] = 1] = "TopCenter";
|
|
@@ -3968,7 +4361,7 @@ var lFrameRotation = class {
|
|
|
3968
4361
|
}
|
|
3969
4362
|
};
|
|
3970
4363
|
|
|
3971
|
-
// types/ingame/style/lframe/
|
|
4364
|
+
// types/ingame/style/lframe/TransitionType.ts
|
|
3972
4365
|
var TransitionType = /* @__PURE__ */ ((TransitionType2) => {
|
|
3973
4366
|
TransitionType2[TransitionType2["Cut"] = 0] = "Cut";
|
|
3974
4367
|
TransitionType2[TransitionType2["Fade"] = 1] = "Fade";
|
|
@@ -4706,7 +5099,7 @@ var ingameHealthData = class {
|
|
|
4706
5099
|
}
|
|
4707
5100
|
};
|
|
4708
5101
|
|
|
4709
|
-
// types/ingame/tab/
|
|
5102
|
+
// types/ingame/tab/ResourceType.ts
|
|
4710
5103
|
var ResourceType = /* @__PURE__ */ ((ResourceType2) => {
|
|
4711
5104
|
ResourceType2[ResourceType2["mana"] = 0] = "mana";
|
|
4712
5105
|
ResourceType2[ResourceType2["energy"] = 1] = "energy";
|
|
@@ -4736,7 +5129,7 @@ var ingameResourceData = class {
|
|
|
4736
5129
|
}
|
|
4737
5130
|
};
|
|
4738
5131
|
|
|
4739
|
-
// types/ingame/tab/
|
|
5132
|
+
// types/ingame/tab/IngameSideInfoPageType.ts
|
|
4740
5133
|
var IngameSideInfoPageType = /* @__PURE__ */ ((IngameSideInfoPageType2) => {
|
|
4741
5134
|
IngameSideInfoPageType2[IngameSideInfoPageType2["Gold"] = 1] = "Gold";
|
|
4742
5135
|
IngameSideInfoPageType2[IngameSideInfoPageType2["Experience"] = 2] = "Experience";
|
|
@@ -4852,7 +5245,7 @@ var teamfightTimelineSample = class {
|
|
|
4852
5245
|
}
|
|
4853
5246
|
};
|
|
4854
5247
|
|
|
4855
|
-
// types/shared/
|
|
5248
|
+
// types/shared/BestOfType.ts
|
|
4856
5249
|
var BestOfType = /* @__PURE__ */ ((BestOfType2) => {
|
|
4857
5250
|
BestOfType2[BestOfType2["BestOf1"] = 1] = "BestOf1";
|
|
4858
5251
|
BestOfType2[BestOfType2["BestOf2"] = 2] = "BestOf2";
|
|
@@ -5160,7 +5553,7 @@ var applicationNotificationMessage = class {
|
|
|
5160
5553
|
}
|
|
5161
5554
|
};
|
|
5162
5555
|
|
|
5163
|
-
// types/message/ui/
|
|
5556
|
+
// types/message/ui/AssetType.ts
|
|
5164
5557
|
var AssetType = /* @__PURE__ */ ((AssetType2) => {
|
|
5165
5558
|
AssetType2[AssetType2["Item"] = 0] = "Item";
|
|
5166
5559
|
AssetType2[AssetType2["ItemModifier"] = 1] = "ItemModifier";
|
|
@@ -5184,7 +5577,7 @@ var brushPresetsChangedMessage = class {
|
|
|
5184
5577
|
}
|
|
5185
5578
|
};
|
|
5186
5579
|
|
|
5187
|
-
// types/message/ui/
|
|
5580
|
+
// types/message/ui/CacheOperation.ts
|
|
5188
5581
|
var CacheOperation = /* @__PURE__ */ ((CacheOperation2) => {
|
|
5189
5582
|
CacheOperation2[CacheOperation2["Starting"] = 0] = "Starting";
|
|
5190
5583
|
CacheOperation2[CacheOperation2["FetchingMetadata"] = 1] = "FetchingMetadata";
|
|
@@ -5270,7 +5663,7 @@ var fontsChangedMessage = class {
|
|
|
5270
5663
|
}
|
|
5271
5664
|
};
|
|
5272
5665
|
|
|
5273
|
-
// types/shared/
|
|
5666
|
+
// types/shared/DatabaseUpdateType.ts
|
|
5274
5667
|
var DatabaseUpdateType = /* @__PURE__ */ ((DatabaseUpdateType2) => {
|
|
5275
5668
|
DatabaseUpdateType2[DatabaseUpdateType2["Add"] = 0] = "Add";
|
|
5276
5669
|
DatabaseUpdateType2[DatabaseUpdateType2["Remove"] = 1] = "Remove";
|
|
@@ -5344,7 +5737,7 @@ var seasonDatabaseUpdateMessage = class {
|
|
|
5344
5737
|
}
|
|
5345
5738
|
};
|
|
5346
5739
|
|
|
5347
|
-
// types/message/ui/
|
|
5740
|
+
// types/message/ui/StrokeLayer.ts
|
|
5348
5741
|
var StrokeLayer = /* @__PURE__ */ ((StrokeLayer2) => {
|
|
5349
5742
|
StrokeLayer2[StrokeLayer2["underEverything"] = 0] = "underEverything";
|
|
5350
5743
|
StrokeLayer2[StrokeLayer2["aboveTerrain"] = 1] = "aboveTerrain";
|
|
@@ -5354,7 +5747,7 @@ var StrokeLayer = /* @__PURE__ */ ((StrokeLayer2) => {
|
|
|
5354
5747
|
return StrokeLayer2;
|
|
5355
5748
|
})(StrokeLayer || {});
|
|
5356
5749
|
|
|
5357
|
-
// types/message/ui/
|
|
5750
|
+
// types/message/ui/StrokeLineStyle.ts
|
|
5358
5751
|
var StrokeLineStyle = /* @__PURE__ */ ((StrokeLineStyle2) => {
|
|
5359
5752
|
StrokeLineStyle2[StrokeLineStyle2["solid"] = 0] = "solid";
|
|
5360
5753
|
StrokeLineStyle2[StrokeLineStyle2["dashed"] = 1] = "dashed";
|
|
@@ -5369,7 +5762,7 @@ var strokePropertiesChangedMessage = class {
|
|
|
5369
5762
|
}
|
|
5370
5763
|
};
|
|
5371
5764
|
|
|
5372
|
-
// types/message/ui/
|
|
5765
|
+
// types/message/ui/StrokeTipStyle.ts
|
|
5373
5766
|
var StrokeTipStyle = /* @__PURE__ */ ((StrokeTipStyle2) => {
|
|
5374
5767
|
StrokeTipStyle2[StrokeTipStyle2["circle"] = 0] = "circle";
|
|
5375
5768
|
StrokeTipStyle2[StrokeTipStyle2["rectangle"] = 1] = "rectangle";
|
|
@@ -5416,7 +5809,7 @@ var teamDatabaseUpdateMessage = class {
|
|
|
5416
5809
|
}
|
|
5417
5810
|
};
|
|
5418
5811
|
|
|
5419
|
-
// types/message/ui/
|
|
5812
|
+
// types/message/ui/Tier.ts
|
|
5420
5813
|
var Tier = /* @__PURE__ */ ((Tier2) => {
|
|
5421
5814
|
Tier2[Tier2["Free"] = 0] = "Free";
|
|
5422
5815
|
Tier2[Tier2["Basic"] = 1] = "Basic";
|
|
@@ -5494,7 +5887,7 @@ var playerDeath = class {
|
|
|
5494
5887
|
}
|
|
5495
5888
|
};
|
|
5496
5889
|
|
|
5497
|
-
// types/postgame/
|
|
5890
|
+
// types/postgame/PostGameDataType.ts
|
|
5498
5891
|
var PostGameDataType = /* @__PURE__ */ ((PostGameDataType2) => {
|
|
5499
5892
|
PostGameDataType2[PostGameDataType2["At14Min"] = 0] = "At14Min";
|
|
5500
5893
|
PostGameDataType2[PostGameDataType2["FullGame"] = 1] = "FullGame";
|
|
@@ -5665,7 +6058,7 @@ var combinedViewStyle = class {
|
|
|
5665
6058
|
}
|
|
5666
6059
|
};
|
|
5667
6060
|
|
|
5668
|
-
// types/postgame/style/combinedView/
|
|
6061
|
+
// types/postgame/style/combinedView/CombinedViewTransitionType.ts
|
|
5669
6062
|
var CombinedViewTransitionType = /* @__PURE__ */ ((CombinedViewTransitionType2) => {
|
|
5670
6063
|
CombinedViewTransitionType2[CombinedViewTransitionType2["Cut"] = 0] = "Cut";
|
|
5671
6064
|
CombinedViewTransitionType2[CombinedViewTransitionType2["Fade"] = 1] = "Fade";
|
|
@@ -6012,7 +6405,7 @@ var matchupVersusStyle = class {
|
|
|
6012
6405
|
}
|
|
6013
6406
|
};
|
|
6014
6407
|
|
|
6015
|
-
// types/postgame/style/matchupTable/
|
|
6408
|
+
// types/postgame/style/matchupTable/ScoreDisplayMode.ts
|
|
6016
6409
|
var ScoreDisplayMode = /* @__PURE__ */ ((ScoreDisplayMode2) => {
|
|
6017
6410
|
ScoreDisplayMode2[ScoreDisplayMode2["Dots"] = 0] = "Dots";
|
|
6018
6411
|
ScoreDisplayMode2[ScoreDisplayMode2["Squares"] = 1] = "Squares";
|
|
@@ -6021,7 +6414,7 @@ var ScoreDisplayMode = /* @__PURE__ */ ((ScoreDisplayMode2) => {
|
|
|
6021
6414
|
return ScoreDisplayMode2;
|
|
6022
6415
|
})(ScoreDisplayMode || {});
|
|
6023
6416
|
|
|
6024
|
-
// types/postgame/style/matchupTable/
|
|
6417
|
+
// types/postgame/style/matchupTable/ScoreDotBorderMode.ts
|
|
6025
6418
|
var ScoreDotBorderMode = /* @__PURE__ */ ((ScoreDotBorderMode2) => {
|
|
6026
6419
|
ScoreDotBorderMode2[ScoreDotBorderMode2["Always"] = 0] = "Always";
|
|
6027
6420
|
ScoreDotBorderMode2[ScoreDotBorderMode2["EmptyOnly"] = 1] = "EmptyOnly";
|
|
@@ -6145,7 +6538,7 @@ var runeIcon = class {
|
|
|
6145
6538
|
}
|
|
6146
6539
|
};
|
|
6147
6540
|
|
|
6148
|
-
// types/pregame/
|
|
6541
|
+
// types/pregame/ActionSubType.ts
|
|
6149
6542
|
var ActionSubType = /* @__PURE__ */ ((ActionSubType2) => {
|
|
6150
6543
|
ActionSubType2[ActionSubType2["START"] = 0] = "START";
|
|
6151
6544
|
ActionSubType2[ActionSubType2["HOVER"] = 1] = "HOVER";
|
|
@@ -6153,7 +6546,7 @@ var ActionSubType = /* @__PURE__ */ ((ActionSubType2) => {
|
|
|
6153
6546
|
return ActionSubType2;
|
|
6154
6547
|
})(ActionSubType || {});
|
|
6155
6548
|
|
|
6156
|
-
// types/pregame/
|
|
6549
|
+
// types/pregame/ActionType.ts
|
|
6157
6550
|
var ActionType = /* @__PURE__ */ ((ActionType2) => {
|
|
6158
6551
|
ActionType2[ActionType2["TEN_BANS_REVEAL"] = 0] = "TEN_BANS_REVEAL";
|
|
6159
6552
|
ActionType2[ActionType2["PHASE_TRANSITION"] = 1] = "PHASE_TRANSITION";
|
|
@@ -6197,7 +6590,7 @@ var champSelectStatePerformanceData = class {
|
|
|
6197
6590
|
}
|
|
6198
6591
|
};
|
|
6199
6592
|
|
|
6200
|
-
// types/shared/
|
|
6593
|
+
// types/shared/MatchRuleSet.ts
|
|
6201
6594
|
var MatchRuleSet = /* @__PURE__ */ ((MatchRuleSet2) => {
|
|
6202
6595
|
MatchRuleSet2[MatchRuleSet2["Standard"] = 0] = "Standard";
|
|
6203
6596
|
MatchRuleSet2[MatchRuleSet2["PartialFearless"] = 1] = "PartialFearless";
|
|
@@ -6228,7 +6621,7 @@ var pickBanActionEventArgs = class {
|
|
|
6228
6621
|
}
|
|
6229
6622
|
};
|
|
6230
6623
|
|
|
6231
|
-
// types/pregame/
|
|
6624
|
+
// types/pregame/PickBanPhase.ts
|
|
6232
6625
|
var PickBanPhase = /* @__PURE__ */ ((PickBanPhase2) => {
|
|
6233
6626
|
PickBanPhase2[PickBanPhase2["BEGIN"] = 0] = "BEGIN";
|
|
6234
6627
|
PickBanPhase2[PickBanPhase2["BAN1"] = 1] = "BAN1";
|
|
@@ -6259,7 +6652,7 @@ var pickSlot = class {
|
|
|
6259
6652
|
}
|
|
6260
6653
|
};
|
|
6261
6654
|
|
|
6262
|
-
// types/pregame/
|
|
6655
|
+
// types/pregame/TimeLineActionType.ts
|
|
6263
6656
|
var TimeLineActionType = /* @__PURE__ */ ((TimeLineActionType2) => {
|
|
6264
6657
|
TimeLineActionType2[TimeLineActionType2["HoverPick"] = 0] = "HoverPick";
|
|
6265
6658
|
TimeLineActionType2[TimeLineActionType2["Pick"] = 1] = "Pick";
|
|
@@ -6292,7 +6685,7 @@ var banStyle = class {
|
|
|
6292
6685
|
}
|
|
6293
6686
|
};
|
|
6294
6687
|
|
|
6295
|
-
// types/pregame/style/
|
|
6688
|
+
// types/pregame/style/HeroStatsDisplayMode.ts
|
|
6296
6689
|
var HeroStatsDisplayMode = /* @__PURE__ */ ((HeroStatsDisplayMode2) => {
|
|
6297
6690
|
HeroStatsDisplayMode2[HeroStatsDisplayMode2["None"] = 0] = "None";
|
|
6298
6691
|
HeroStatsDisplayMode2[HeroStatsDisplayMode2["UGG"] = 1] = "UGG";
|
|
@@ -6729,7 +7122,7 @@ var checkoutCompleteResponse = class {
|
|
|
6729
7122
|
}
|
|
6730
7123
|
};
|
|
6731
7124
|
|
|
6732
|
-
// types/rest/account/
|
|
7125
|
+
// types/rest/account/PaymentInterval.ts
|
|
6733
7126
|
var PaymentInterval = /* @__PURE__ */ ((PaymentInterval2) => {
|
|
6734
7127
|
PaymentInterval2[PaymentInterval2["Monthly"] = 0] = "Monthly";
|
|
6735
7128
|
PaymentInterval2[PaymentInterval2["Yearly"] = 1] = "Yearly";
|
|
@@ -6866,7 +7259,7 @@ var billingCycle = class {
|
|
|
6866
7259
|
}
|
|
6867
7260
|
};
|
|
6868
7261
|
|
|
6869
|
-
// types/rest/billing_cycle/
|
|
7262
|
+
// types/rest/billing_cycle/Interval.ts
|
|
6870
7263
|
var Interval = /* @__PURE__ */ ((Interval2) => {
|
|
6871
7264
|
Interval2[Interval2["day"] = 0] = "day";
|
|
6872
7265
|
Interval2[Interval2["week"] = 1] = "week";
|
|
@@ -6875,7 +7268,7 @@ var Interval = /* @__PURE__ */ ((Interval2) => {
|
|
|
6875
7268
|
return Interval2;
|
|
6876
7269
|
})(Interval || {});
|
|
6877
7270
|
|
|
6878
|
-
// types/shared/customoverlay/
|
|
7271
|
+
// types/shared/customoverlay/CustomOverlayMode.ts
|
|
6879
7272
|
var CustomOverlayMode = /* @__PURE__ */ ((CustomOverlayMode2) => {
|
|
6880
7273
|
CustomOverlayMode2[CustomOverlayMode2["Static"] = 0] = "Static";
|
|
6881
7274
|
CustomOverlayMode2[CustomOverlayMode2["Dev"] = 1] = "Dev";
|
|
@@ -7074,7 +7467,7 @@ var simpleChampionData = class {
|
|
|
7074
7467
|
}
|
|
7075
7468
|
};
|
|
7076
7469
|
|
|
7077
|
-
// types/shared/
|
|
7470
|
+
// types/shared/SpellClassification.ts
|
|
7078
7471
|
var SpellClassification = /* @__PURE__ */ ((SpellClassification2) => {
|
|
7079
7472
|
SpellClassification2[SpellClassification2["Ability"] = 0] = "Ability";
|
|
7080
7473
|
SpellClassification2[SpellClassification2["Passive"] = 1] = "Passive";
|
|
@@ -7119,7 +7512,7 @@ var teamData = class {
|
|
|
7119
7512
|
}
|
|
7120
7513
|
};
|
|
7121
7514
|
|
|
7122
|
-
// types/shared/
|
|
7515
|
+
// types/shared/TeamMemberRole.ts
|
|
7123
7516
|
var TeamMemberRole = /* @__PURE__ */ ((TeamMemberRole2) => {
|
|
7124
7517
|
TeamMemberRole2[TeamMemberRole2["Unknown"] = 0] = "Unknown";
|
|
7125
7518
|
TeamMemberRole2[TeamMemberRole2["Player"] = 1] = "Player";
|
|
@@ -7199,7 +7592,7 @@ var customOverlayDescriptor = class {
|
|
|
7199
7592
|
}
|
|
7200
7593
|
};
|
|
7201
7594
|
|
|
7202
|
-
// types/shared/customoverlay/
|
|
7595
|
+
// types/shared/customoverlay/DevServerStatus.ts
|
|
7203
7596
|
var DevServerStatus = /* @__PURE__ */ ((DevServerStatus2) => {
|
|
7204
7597
|
DevServerStatus2[DevServerStatus2["Stopped"] = 0] = "Stopped";
|
|
7205
7598
|
DevServerStatus2[DevServerStatus2["Starting"] = 1] = "Starting";
|
|
@@ -7225,7 +7618,7 @@ var borderStyle = class {
|
|
|
7225
7618
|
}
|
|
7226
7619
|
};
|
|
7227
7620
|
|
|
7228
|
-
// types/shared/style/
|
|
7621
|
+
// types/shared/style/ChampionIconType.ts
|
|
7229
7622
|
var ChampionIconType = /* @__PURE__ */ ((ChampionIconType2) => {
|
|
7230
7623
|
ChampionIconType2[ChampionIconType2["Splash"] = 0] = "Splash";
|
|
7231
7624
|
ChampionIconType2[ChampionIconType2["SplashCentered"] = 1] = "SplashCentered";
|
|
@@ -7235,7 +7628,7 @@ var ChampionIconType = /* @__PURE__ */ ((ChampionIconType2) => {
|
|
|
7235
7628
|
return ChampionIconType2;
|
|
7236
7629
|
})(ChampionIconType || {});
|
|
7237
7630
|
|
|
7238
|
-
// types/shared/style/
|
|
7631
|
+
// types/shared/style/ObjectFit.ts
|
|
7239
7632
|
var ObjectFit = /* @__PURE__ */ ((ObjectFit2) => {
|
|
7240
7633
|
ObjectFit2[ObjectFit2["Fill"] = 0] = "Fill";
|
|
7241
7634
|
ObjectFit2[ObjectFit2["Contain"] = 1] = "Contain";
|
|
@@ -7260,7 +7653,7 @@ var championIconStyle = class {
|
|
|
7260
7653
|
}
|
|
7261
7654
|
};
|
|
7262
7655
|
|
|
7263
|
-
// types/shared/style/
|
|
7656
|
+
// types/shared/style/GradientType.ts
|
|
7264
7657
|
var GradientType = /* @__PURE__ */ ((GradientType2) => {
|
|
7265
7658
|
GradientType2[GradientType2["Linear"] = 0] = "Linear";
|
|
7266
7659
|
GradientType2[GradientType2["Radial"] = 1] = "Radial";
|
|
@@ -7361,7 +7754,7 @@ var layoutStyle = class {
|
|
|
7361
7754
|
}
|
|
7362
7755
|
};
|
|
7363
7756
|
|
|
7364
|
-
// types/shared/style/text/
|
|
7757
|
+
// types/shared/style/text/TextOrientation.ts
|
|
7365
7758
|
var TextOrientation = /* @__PURE__ */ ((TextOrientation2) => {
|
|
7366
7759
|
TextOrientation2[TextOrientation2["None"] = 0] = "None";
|
|
7367
7760
|
TextOrientation2[TextOrientation2["Upright"] = 1] = "Upright";
|
|
@@ -7369,7 +7762,7 @@ var TextOrientation = /* @__PURE__ */ ((TextOrientation2) => {
|
|
|
7369
7762
|
return TextOrientation2;
|
|
7370
7763
|
})(TextOrientation || {});
|
|
7371
7764
|
|
|
7372
|
-
// types/shared/style/text/
|
|
7765
|
+
// types/shared/style/text/WritingMode.ts
|
|
7373
7766
|
var WritingMode = /* @__PURE__ */ ((WritingMode2) => {
|
|
7374
7767
|
WritingMode2[WritingMode2["None"] = 0] = "None";
|
|
7375
7768
|
WritingMode2[WritingMode2["Horizontal"] = 1] = "Horizontal";
|
|
@@ -7393,7 +7786,7 @@ var optionalTextStyle = class {
|
|
|
7393
7786
|
}
|
|
7394
7787
|
};
|
|
7395
7788
|
|
|
7396
|
-
// types/shared/style/
|
|
7789
|
+
// types/shared/style/TeamColorType.ts
|
|
7397
7790
|
var TeamColorType = /* @__PURE__ */ ((TeamColorType2) => {
|
|
7398
7791
|
TeamColorType2[TeamColorType2["Primary"] = 0] = "Primary";
|
|
7399
7792
|
TeamColorType2[TeamColorType2["Secondary"] = 1] = "Secondary";
|
|
@@ -7423,7 +7816,7 @@ var textStyle = class {
|
|
|
7423
7816
|
}
|
|
7424
7817
|
};
|
|
7425
7818
|
|
|
7426
|
-
// types/shared/style/set/
|
|
7819
|
+
// types/shared/style/set/Feature.ts
|
|
7427
7820
|
var Feature = /* @__PURE__ */ ((Feature2) => {
|
|
7428
7821
|
Feature2[Feature2["BasicTier"] = 0] = "BasicTier";
|
|
7429
7822
|
Feature2[Feature2["ProTier"] = 1] = "ProTier";
|
|
@@ -7471,7 +7864,7 @@ var styleSetNameCollection = class {
|
|
|
7471
7864
|
}
|
|
7472
7865
|
};
|
|
7473
7866
|
|
|
7474
|
-
// types/shared/window/
|
|
7867
|
+
// types/shared/window/AppTheme.ts
|
|
7475
7868
|
var AppTheme = /* @__PURE__ */ ((AppTheme2) => {
|
|
7476
7869
|
AppTheme2[AppTheme2["Light"] = 0] = "Light";
|
|
7477
7870
|
AppTheme2[AppTheme2["Dark"] = 1] = "Dark";
|
|
@@ -7479,7 +7872,7 @@ var AppTheme = /* @__PURE__ */ ((AppTheme2) => {
|
|
|
7479
7872
|
return AppTheme2;
|
|
7480
7873
|
})(AppTheme || {});
|
|
7481
7874
|
|
|
7482
|
-
// types/shared/window/
|
|
7875
|
+
// types/shared/window/WindowType.ts
|
|
7483
7876
|
var WindowType = /* @__PURE__ */ ((WindowType2) => {
|
|
7484
7877
|
WindowType2[WindowType2["Main"] = 0] = "Main";
|
|
7485
7878
|
WindowType2[WindowType2["Startup"] = 1] = "Startup";
|
|
@@ -7754,6 +8147,52 @@ function normalizeDamageEntries(entries, limit = 5) {
|
|
|
7754
8147
|
return [...grouped.values()].sort((a, b) => b.totalDamage - a.totalDamage).slice(0, limit);
|
|
7755
8148
|
}
|
|
7756
8149
|
|
|
7757
|
-
export { ActionSubType, ActionType, AnnouncementType, ApiClient, ApiError, AppTheme, AssetType, BestOfType, CacheOperation, CampLocation, ChampSelectStateStore, ChampionIconType, CombinedViewTransitionType, ContentAlign, CustomOverlayMode, DamageEventType, DamageSplitMode, DamageType, DatabaseUpdateType, DevServerStatus, Feature, GameApi, GameState, GameStateApi, GameStateStore, GradientType, HeroStatsDisplayMode, IngameApi, IngameObjectiveType, IngameSideInfoPageType, Interval, Lane, LeagueBroadcastClient, MAGIC_COLOR, MatchApi, MatchRuleSet, ObjectFit, ObjectiveEventType, ObjectiveRecapDisplayMode, PHYS_COLOR, PaymentInterval, PickBanPhase, PostGameApi, PostGameDataType, damageBarStyle2 as PostgameDamageBarStyle, PreGameApi, divider2 as PregameDivider, ResourceType, RestApi, ScoreDisplayMode, ScoreDotBorderMode, SeasonApi, SetPhaseType, SpellClassification, SpellSlotIndex, StrokeLayer, StrokeLineStyle, StrokeTipStyle, TRUE_COLOR, Team, TeamColorType, TeamMemberRole, TextOrientation, Tier, TimeLineActionType, TransitionType, WebSocketManager, WindowType, WritingMode, activeComponentChangedEventArgs, activeComponentChangedMessage, addMatchRequestArgs, aggregateSpellEntries, announcementParameter, announcerColors, announcerEvent, announcerUniversalStyle, applicationLifetimeMessage, applicationNotificationCompletedMessage, applicationNotificationMessage, authHelloMessage, authHelloOkMessage, banSlot, banSlotLayoutStyling, banStyle, barStyle, billingCycle, borderStyle, bottomRowPickBanStyle, bottomRowSizeStyle, bottomRowTeamStyle, bottomRowTournamentData, brushPresetsChangedMessage, cDragonPerkInfo, casterModeConfigDto, centerContent, centerContentLayoutStyling, centerContentStyling, champSelectActionMessage, champSelectStateData, champSelectStateMessage, champSelectStateMetaData, champSelectStatePerformanceData, championAbilityData, championCombatStats, championContainer, championData, championDetailData, championIamgeStyle, championIconStyle, championImage, championImageStyle, championRuneStat, championSelectEUStyle, championSelectTeam, championSkinInfo, championSlot, championStackStyle, championStatistics, championStats, championStatsContainer, championStatusStyle, championTabContainerStyle, championTabNameStyle, championTabsStyle, championUltimateStyle, championsSlot, changeDetectionResponse, changeEmailRequest, changeEmailResponse, changePasswordRequest, chatVoteOption, chatVoteResultDto, checkoutCompleteResponse, checkoutRequestDTO, choiceBar, choiceTitel, choiceVotes, cloudOverlayDownloadResponse, cloudOverlayMetadata, cloudOverlayUploadRequest, cloudOverlayUploadResponse, cloudOverlaysResponse, cloudStyleSetDownloadResponse, cloudStyleSetMetadata, cloudStyleSetUploadRequest, cloudStyleSetUploadResponse, cloudStyleSetsResponse, cloudSyncConfig, cloudSyncResult, coachSlot, colorByDamageType, colorComponentStyling, colorGradientData, colorImageData, colorRGBA, colorStop, colorStyle, colorStyling, combinedViewStyle, combinedViewTransitionStyle, communityDragonCacheProgressMessage, communityDragonV2ProgressMessage, communityDragonV2StatusMessage, componentStyle, contentContainerStyle, createChoice, createIngameTimerUtils, createPollDto, createPredictionDto, creepScore, curveStyle, customOverlay, customOverlayDescriptor, customOverlayUpdateMessage, damageBarSegments, damageBarStyle, damageCompositionBarStyle, damageCompositionColors, damageCompositionDonutStyle, damageCompositionPlayer, damageCompositionStyle, damageCompositionTeam, damageDealtStyle, damageEventHistoryEntry, damageEventHistoryUpdateMessage, damageFlow, damageFlowEdge, damageFlowNode, damageFlowNodeStyle, damageFlowRibbonStyle, damageGraphEntry, damageGraphSide, damageRecapDamageBarStyle, damageRecapEntry, damageRecapEntryStyle, damageRecapSpellEntry, damageRecapStyle, damageRecapTimelineEntry, damageSplitBarStyle, damageSplitEntryStyle, damageSplitSpellEntry, damageSplitStyle, damageSplitTargetEntry, damageStatsStyle, devServerState, displayColorData, divider, dmgTypeColor, drawingEventMessage, drawingStateMessage, drawingStateRequestMessage, drawingStrokeDto, emailConfirmRequest, emailForgotPasswordRequest, emailLoginRequest, emailResendCodeRequest, emailResetPasswordRequest, emailSignUpRequest, endPollDto, endPredictionDto, fearLessByGame, fearLessSingleRow, fearlessChampionImage, fearlessDraftStyle, fearlessDraftStylePregame, fearlessTree, fearlessTreeBanRowStyle, fearlessTreeConnectorStyle, fearlessTreeGameNodeStyle, fearlessTreeHeaderStyle, fontsChangedMessage, formatDamage, frontendRouteUpdateMessage, fullPlayerScoreboardSlots, gameAnalysis, gameDatabaseUpdateMessage, gameInfoRotation, gameStatusMessage, gameTeamSidesSwappedMessage, gameTimer, gameTimerStyle, gameWithTeams, getAbilityCooldownFraction, getAbilityCooldownRemaining, getDamageByType, getItemCooldownFraction, getItemCooldownRemaining, getRemaining, getRespawnRemaining, getRoleQuest, getSortedInventory, getTrinket, globalPosition, globalScoreboard, globalScoreboardBooleanIndicator, globalScoreboardSection, globalStyleProperties, goldAdvantage, goldEfficiencyEntry, goldEfficiencyHeaderStyle, goldEfficiencyHeatStyle, goldEfficiencyPlayerRowStyle, goldEfficiencyStyle, goldGraph, goldGraphStyle, gridLineStyle, headline, healthBarStyle, hotkeyFiredMessage, hubErrorMessage, hubMemberDto, hubPingMessage, hubPongMessage, imageComponentStyle, imageStyle, infoContentColorStyling, infoContentLayoutStyling, infoContentTextStyle, infoRow, ingameAbilityInfo, ingameDamageCompositionData, ingameDamageFlowData, ingameDamageGraphData, ingameDamageRecapData, ingameDamageSplitData, ingameExperienceData, ingameFrontendData, ingameGoldEfficiencyData, ingameGoldGraphData, ingameHealthData, ingameKillParticipationData, ingameObjectiveDpsData, ingameObjectiveEvent, ingameObjectivePowerPlay, ingameResourceData, ingameRewindMessage, ingameRuneData, ingameScoreboardBottomData, ingameScoreboardBottomPlayerData, ingameScoreboardBottomTeamData, ingameScoreboardData, ingameScoreboardTeamData, ingameSideInfoPage, ingameSideInfoPageDisplayData, ingameSideInfoPageRow, ingameSingleRuneData, ingameSkinDisplayData, ingameSkinDisplayPlayerData, ingameSkinDisplayTeamData, ingameStateMessage, ingameStateSettingsWrapper, ingameTeamfightTimelineData, ingameTelemetry, ingameTelemetryMessage, inhibitorRespawnData, inhibitorTimer, inhibitorTimerContainer, inhibitorTimerDual, inhibitorTimerIconContainer, inhibitorTimerSingle, inhibitorTimerTimerContainer, isAbilityOnCooldown, isActive, isItemOnCooldown, isPlayerDead, itemAsset, itemIcon, itemSlot, itemStats, itemWithAsset, killFeed, killFeedAssistersStyle, killFeedContainerStyle, killFeedEntryStyle, killFeedEvent, killFeedIconStyle, killFeedKillIconStyle, killParticipationLink, killParticipationPlayer, killParticipationStyle, lFrameRotation, laneIconStyle, laneRowLayoutStyle, layoutComponentStyling, layoutStyle, legacyPickBanStyle, levelXpTrackerStyle, lineStyle, localSyncState, localizedPriceData, matchCardStyle, matchData, matchDatabaseUpdateMessage, matchOverviewData, matchOverviewGameSummary, matchOverviewTeamSummary, matchSummaryStyle, matchWithGamesAndTeams, matchupGridStyle, matchupHeaderStyle, matchupOverview, matchupOverviewGameRowStyle, matchupOverviewHeaderStyle, matchupOverviewTeamBarStyle, matchupScoreStyle, matchupTable, matchupTableContentStyle, matchupVersusStyle, normalizeDamageEntries, numberContainerStyle, objectiveDamagePerTeamStyle, objectiveDpsBarStyle, objectiveDpsHeaderStyle, objectiveDpsSample, objectiveDpsSmiteStrip, objectiveDpsTeamNumbersStyle, objectiveList, objectiveRecapCardStyle, objectiveRecapHeaderStyle, objectiveRecapSmiteBarStyle, objectiveRecapStyle, objectiveTimer, optionBar, optionTitel, optionVotes, optionalGameData, optionalMatchData, optionalTextStyle, partialStrokeProperties, perkData, perkInfoV2, perkStyleInfoV2, phaseTimer, phaseTimerColorStyling, phaseTimerLayoutStyling, pickBanActionEventArgs, pickBanTimer, pickBans, pickSlot, planDescriptorRecord, planDetails, playerDeath, playerHotkeyDto, playerKDA, playerScoreboard, playerScoreboardContainer, playerScoreboardGoldComparison, playerScoreboardSlot, playerSlot, playerSlotColorStyling, playerSlotLayoutStyling, playerSlotPickingStyle, playerSlotStyle, playerUpdateEvent, playerXpLevelStyle, pollChoice, pollWrapper, portalSessionResponse, postGameDamageGraph, postGameDamageGraphByTeam, postGameDamageGraphEntry, postGameGoldGraph, postGameOverview, postGamePlayerInfo, postGamePlayerPage, postGamePlayerRunesAndItems, postGamePlayerStats, postGameTeamInfo, postGameTeamOverview, predictionBar, predictionOutcome, predictionOutcomeRequest, predictionPoints, predictionWrapper, profileResponse, progressBarStyle, registerOverlayRequest, respawnTimer, roleQuestSlot, roomJoinMessage, roomJoinedMessage, roomLeaveMessage, roomMemberJoinedMessage, roomMemberLeftMessage, runeContainer, runeDisplayPerkStyle, runeDisplayStyle, runeDisplayTeamStyle, runeIcon, runeStyle, scoreStyle, scoreboardChampionSlot, scoreboardDamageGraphStyle, seasonData, seasonDatabaseUpdateMessage, shallowEqual, simpleChampionData, singleChampionDetailHotkeyConfigDto, singleGameGoldGraph, singleGameGoldGraphData, singleIngameHotkeyConfigDto, singlePostgameHotkeyConfigDto, skinDisplayInfoStyle, skinDisplayPoweredByStyle, skinDisplayRoleIconStyle, skinDisplayStyle, smiteReactionBadgeStyle, smiteReactionPoweredByStyle, smiteReactionResult, smiteReactionRingStyle, smiteReactionStyle, smiteReactionTextStyle, spawnTimer, spawnTimerIconContainerStyle, spawnTimerInfoContainerStyle, spawnTimerStyle, startChatVoteDto, startCheckoutResponse, strokePropertiesChangedMessage, styleSet, styleSetEntry, styleSetNameCollection, styleSetUpdatedMessage, styleVariantUpdateMessage, styleVariantUpdatedEventArgs, summonerSpellData, summonerSpellInfoV2, tabLevelUpStyle, tabPlayer, tabTeam, tabsStyle, teamColorStyling, teamDamageStyle, teamData, teamDatabaseUpdateMessage, teamFightDamageStyle, teamIconStyle, teamInfo, teamInfoStyle, teamInhibitorData, teamLayoutStyling, teamMember, teamName, teamScore, teamScores, teamSummaryStyle, teamTextStyle, teamUpdateResults, teamWithMembers, teamfightDamageEntryStyle, teamfightDeathIconStyle, teamfightKillEvent, teamfightTimelinePlayer, teamfightTimelineSample, teamfightTimelineStyle, teamsAndTimerStyle, textComponentStyling, textContentWithStyle, textOutline, textStyle, textStyleWithBorder, textWithContent, timelineEntry, timerBadgePoll, timerBadgePrediction, timerBarStyle, timerTeamStyle, totalBadge, totalVotes, tournamentData, tournamentLogo, transitionEvents, transitionStyle, turretPlatingFallEvent, twitchChatVote, twitchPoll, twitchPollDto, twitchPrediction, twitchPredictionDto, twitchStatusDTO, ultiAbilityStyle, updateNameRequest, updateOverlayRequest, userFeaturesUpdatedMessage, userTierUpdatedMessage, vector3, verifyEmailRequest, voteWrapper, websocketMessageTypes };
|
|
8150
|
+
// src/util/postGameUtils.ts
|
|
8151
|
+
function getPostGameSides(overview) {
|
|
8152
|
+
const source = overview.teamOverviewBySide && Object.keys(overview.teamOverviewBySide).length > 0 ? overview.teamOverviewBySide : overview.teamInfoBySide ?? {};
|
|
8153
|
+
return Object.keys(source).map(Number).sort((a, b) => a - b);
|
|
8154
|
+
}
|
|
8155
|
+
function buildGoldSeries(graph) {
|
|
8156
|
+
const goldAtTime = graph?.goldAtTime ?? {};
|
|
8157
|
+
return Object.keys(goldAtTime).map(Number).sort((a, b) => a - b).map((time) => ({
|
|
8158
|
+
time,
|
|
8159
|
+
goldBySide: goldAtTime[time]
|
|
8160
|
+
}));
|
|
8161
|
+
}
|
|
8162
|
+
function buildGoldDiffSeries(graph, referenceSide) {
|
|
8163
|
+
const series = buildGoldSeries(graph);
|
|
8164
|
+
if (series.length === 0) return [];
|
|
8165
|
+
const ref = referenceSide ?? Math.min(
|
|
8166
|
+
...series.flatMap((entry) => Object.keys(entry.goldBySide).map(Number))
|
|
8167
|
+
);
|
|
8168
|
+
return series.map((entry) => {
|
|
8169
|
+
const refGold = entry.goldBySide[ref] ?? 0;
|
|
8170
|
+
let otherGold = 0;
|
|
8171
|
+
for (const [side, gold] of Object.entries(entry.goldBySide)) {
|
|
8172
|
+
if (Number(side) !== ref) otherGold += gold;
|
|
8173
|
+
}
|
|
8174
|
+
return { time: entry.time, diff: refGold - otherGold };
|
|
8175
|
+
});
|
|
8176
|
+
}
|
|
8177
|
+
function formatGameClock(seconds) {
|
|
8178
|
+
const total = Math.max(0, Math.floor(seconds));
|
|
8179
|
+
const hours = Math.floor(total / 3600);
|
|
8180
|
+
const minutes = Math.floor(total % 3600 / 60);
|
|
8181
|
+
const secs = total % 60;
|
|
8182
|
+
const ss = secs.toString().padStart(2, "0");
|
|
8183
|
+
if (hours > 0) {
|
|
8184
|
+
const mm = minutes.toString().padStart(2, "0");
|
|
8185
|
+
return `${hours}:${mm}:${ss}`;
|
|
8186
|
+
}
|
|
8187
|
+
return `${minutes}:${ss}`;
|
|
8188
|
+
}
|
|
8189
|
+
function damageGraphTeamTotal(team) {
|
|
8190
|
+
return (team?.entries ?? []).reduce((sum, entry) => sum + entry.damage, 0);
|
|
8191
|
+
}
|
|
8192
|
+
function sortDamageEntries(entries) {
|
|
8193
|
+
return [...entries].sort((a, b) => b.damage - a.damage);
|
|
8194
|
+
}
|
|
8195
|
+
|
|
8196
|
+
export { ActionSubType, ActionType, AnnouncementType, ApiClient, ApiError, AppTheme, AssetType, BestOfType, CacheOperation, CampLocation, ChampSelectStateStore, ChampionIconType, CombinedViewTransitionType, ContentAlign, CustomOverlayMode, DamageEventType, DamageSplitMode, DamageType, DatabaseUpdateType, DevServerStatus, Feature, GameApi, GameState, GameStateApi, GameStateStore, GradientType, HeroStatsDisplayMode, IngameApi, IngameObjectiveType, IngameSideInfoPageType, Interval, Lane, LeagueBroadcastClient, MAGIC_COLOR, MatchApi, MatchRuleSet, ObjectFit, ObjectiveEventType, ObjectiveRecapDisplayMode, PHYS_COLOR, PaymentInterval, PickBanPhase, PostGameApi, PostGameDataType, PostGameStateStore, damageBarStyle2 as PostgameDamageBarStyle, PreGameApi, divider2 as PregameDivider, ResourceType, RestApi, ScoreDisplayMode, ScoreDotBorderMode, SeasonApi, SetPhaseType, SpellClassification, SpellSlotIndex, StrokeLayer, StrokeLineStyle, StrokeTipStyle, TRUE_COLOR, Team, TeamColorType, TeamMemberRole, TextOrientation, Tier, TimeLineActionType, TransitionType, WebSocketManager, WindowType, WritingMode, activeComponentChangedEventArgs, activeComponentChangedMessage, addMatchRequestArgs, aggregateSpellEntries, announcementParameter, announcerColors, announcerEvent, announcerUniversalStyle, applicationLifetimeMessage, applicationNotificationCompletedMessage, applicationNotificationMessage, authHelloMessage, authHelloOkMessage, banSlot, banSlotLayoutStyling, banStyle, barStyle, billingCycle, borderStyle, bottomRowPickBanStyle, bottomRowSizeStyle, bottomRowTeamStyle, bottomRowTournamentData, brushPresetsChangedMessage, buildGoldDiffSeries, buildGoldSeries, cDragonPerkInfo, casterModeConfigDto, centerContent, centerContentLayoutStyling, centerContentStyling, champSelectActionMessage, champSelectStateData, champSelectStateMessage, champSelectStateMetaData, champSelectStatePerformanceData, championAbilityData, championCombatStats, championContainer, championData, championDetailData, championIamgeStyle, championIconStyle, championImage, championImageStyle, championRuneStat, championSelectEUStyle, championSelectTeam, championSkinInfo, championSlot, championStackStyle, championStatistics, championStats, championStatsContainer, championStatusStyle, championTabContainerStyle, championTabNameStyle, championTabsStyle, championUltimateStyle, championsSlot, changeDetectionResponse, changeEmailRequest, changeEmailResponse, changePasswordRequest, chatVoteOption, chatVoteResultDto, checkoutCompleteResponse, checkoutRequestDTO, choiceBar, choiceTitel, choiceVotes, cloudOverlayDownloadResponse, cloudOverlayMetadata, cloudOverlayUploadRequest, cloudOverlayUploadResponse, cloudOverlaysResponse, cloudStyleSetDownloadResponse, cloudStyleSetMetadata, cloudStyleSetUploadRequest, cloudStyleSetUploadResponse, cloudStyleSetsResponse, cloudSyncConfig, cloudSyncResult, coachSlot, colorByDamageType, colorComponentStyling, colorGradientData, colorImageData, colorRGBA, colorStop, colorStyle, colorStyling, combinedViewStyle, combinedViewTransitionStyle, communityDragonCacheProgressMessage, communityDragonV2ProgressMessage, communityDragonV2StatusMessage, componentStyle, contentContainerStyle, createChoice, createIngameTimerUtils, createPollDto, createPredictionDto, creepScore, curveStyle, customOverlay, customOverlayDescriptor, customOverlayUpdateMessage, damageBarSegments, damageBarStyle, damageCompositionBarStyle, damageCompositionColors, damageCompositionDonutStyle, damageCompositionPlayer, damageCompositionStyle, damageCompositionTeam, damageDealtStyle, damageEventHistoryEntry, damageEventHistoryUpdateMessage, damageFlow, damageFlowEdge, damageFlowNode, damageFlowNodeStyle, damageFlowRibbonStyle, damageGraphEntry, damageGraphSide, damageGraphTeamTotal, damageRecapDamageBarStyle, damageRecapEntry, damageRecapEntryStyle, damageRecapSpellEntry, damageRecapStyle, damageRecapTimelineEntry, damageSplitBarStyle, damageSplitEntryStyle, damageSplitSpellEntry, damageSplitStyle, damageSplitTargetEntry, damageStatsStyle, devServerState, displayColorData, divider, dmgTypeColor, drawingEventMessage, drawingStateMessage, drawingStateRequestMessage, drawingStrokeDto, emailConfirmRequest, emailForgotPasswordRequest, emailLoginRequest, emailResendCodeRequest, emailResetPasswordRequest, emailSignUpRequest, endPollDto, endPredictionDto, fearLessByGame, fearLessSingleRow, fearlessChampionImage, fearlessDraftStyle, fearlessDraftStylePregame, fearlessTree, fearlessTreeBanRowStyle, fearlessTreeConnectorStyle, fearlessTreeGameNodeStyle, fearlessTreeHeaderStyle, fontsChangedMessage, formatDamage, formatGameClock, frontendRouteUpdateMessage, fullPlayerScoreboardSlots, gameAnalysis, gameDatabaseUpdateMessage, gameInfoRotation, gameStatusMessage, gameTeamSidesSwappedMessage, gameTimer, gameTimerStyle, gameWithTeams, getAbilityCooldownFraction, getAbilityCooldownRemaining, getDamageByType, getItemCooldownFraction, getItemCooldownRemaining, getPostGameSides, getRemaining, getRespawnRemaining, getRoleQuest, getSortedInventory, getTrinket, globalPosition, globalScoreboard, globalScoreboardBooleanIndicator, globalScoreboardSection, globalStyleProperties, goldAdvantage, goldEfficiencyEntry, goldEfficiencyHeaderStyle, goldEfficiencyHeatStyle, goldEfficiencyPlayerRowStyle, goldEfficiencyStyle, goldGraph, goldGraphStyle, gridLineStyle, headline, healthBarStyle, hotkeyFiredMessage, hubErrorMessage, hubMemberDto, hubPingMessage, hubPongMessage, imageComponentStyle, imageStyle, infoContentColorStyling, infoContentLayoutStyling, infoContentTextStyle, infoRow, ingameAbilityInfo, ingameDamageCompositionData, ingameDamageFlowData, ingameDamageGraphData, ingameDamageRecapData, ingameDamageSplitData, ingameExperienceData, ingameFrontendData, ingameGoldEfficiencyData, ingameGoldGraphData, ingameHealthData, ingameKillParticipationData, ingameObjectiveDpsData, ingameObjectiveEvent, ingameObjectivePowerPlay, ingameResourceData, ingameRewindMessage, ingameRuneData, ingameScoreboardBottomData, ingameScoreboardBottomPlayerData, ingameScoreboardBottomTeamData, ingameScoreboardData, ingameScoreboardTeamData, ingameSideInfoPage, ingameSideInfoPageDisplayData, ingameSideInfoPageRow, ingameSingleRuneData, ingameSkinDisplayData, ingameSkinDisplayPlayerData, ingameSkinDisplayTeamData, ingameStateMessage, ingameStateSettingsWrapper, ingameTeamfightTimelineData, ingameTelemetry, ingameTelemetryMessage, inhibitorRespawnData, inhibitorTimer, inhibitorTimerContainer, inhibitorTimerDual, inhibitorTimerIconContainer, inhibitorTimerSingle, inhibitorTimerTimerContainer, isAbilityOnCooldown, isActive, isItemOnCooldown, isPlayerDead, itemAsset, itemIcon, itemSlot, itemStats, itemWithAsset, killFeed, killFeedAssistersStyle, killFeedContainerStyle, killFeedEntryStyle, killFeedEvent, killFeedIconStyle, killFeedKillIconStyle, killParticipationLink, killParticipationPlayer, killParticipationStyle, lFrameRotation, laneIconStyle, laneRowLayoutStyle, layoutComponentStyling, layoutStyle, legacyPickBanStyle, levelXpTrackerStyle, lineStyle, localSyncState, localizedPriceData, matchCardStyle, matchData, matchDatabaseUpdateMessage, matchOverviewData, matchOverviewGameSummary, matchOverviewTeamSummary, matchSummaryStyle, matchWithGamesAndTeams, matchupGridStyle, matchupHeaderStyle, matchupOverview, matchupOverviewGameRowStyle, matchupOverviewHeaderStyle, matchupOverviewTeamBarStyle, matchupScoreStyle, matchupTable, matchupTableContentStyle, matchupVersusStyle, normalizeDamageEntries, numberContainerStyle, objectiveDamagePerTeamStyle, objectiveDpsBarStyle, objectiveDpsHeaderStyle, objectiveDpsSample, objectiveDpsSmiteStrip, objectiveDpsTeamNumbersStyle, objectiveList, objectiveRecapCardStyle, objectiveRecapHeaderStyle, objectiveRecapSmiteBarStyle, objectiveRecapStyle, objectiveTimer, optionBar, optionTitel, optionVotes, optionalGameData, optionalMatchData, optionalTextStyle, partialStrokeProperties, perkData, perkInfoV2, perkStyleInfoV2, phaseTimer, phaseTimerColorStyling, phaseTimerLayoutStyling, pickBanActionEventArgs, pickBanTimer, pickBans, pickSlot, planDescriptorRecord, planDetails, playerDeath, playerHotkeyDto, playerKDA, playerScoreboard, playerScoreboardContainer, playerScoreboardGoldComparison, playerScoreboardSlot, playerSlot, playerSlotColorStyling, playerSlotLayoutStyling, playerSlotPickingStyle, playerSlotStyle, playerUpdateEvent, playerXpLevelStyle, pollChoice, pollWrapper, portalSessionResponse, postGameDamageGraph, postGameDamageGraphByTeam, postGameDamageGraphEntry, postGameGoldGraph, postGameOverview, postGamePlayerInfo, postGamePlayerPage, postGamePlayerRunesAndItems, postGamePlayerStats, postGameStateData, postGameTeamInfo, postGameTeamOverview, predictionBar, predictionOutcome, predictionOutcomeRequest, predictionPoints, predictionWrapper, profileResponse, progressBarStyle, registerOverlayRequest, respawnTimer, roleQuestSlot, roomJoinMessage, roomJoinedMessage, roomLeaveMessage, roomMemberJoinedMessage, roomMemberLeftMessage, runeContainer, runeDisplayPerkStyle, runeDisplayStyle, runeDisplayTeamStyle, runeIcon, runeStyle, scoreStyle, scoreboardChampionSlot, scoreboardDamageGraphStyle, seasonData, seasonDatabaseUpdateMessage, shallowEqual, simpleChampionData, singleChampionDetailHotkeyConfigDto, singleGameGoldGraph, singleGameGoldGraphData, singleIngameHotkeyConfigDto, singlePostgameHotkeyConfigDto, skinDisplayInfoStyle, skinDisplayPoweredByStyle, skinDisplayRoleIconStyle, skinDisplayStyle, smiteReactionBadgeStyle, smiteReactionPoweredByStyle, smiteReactionResult, smiteReactionRingStyle, smiteReactionStyle, smiteReactionTextStyle, sortDamageEntries, spawnTimer, spawnTimerIconContainerStyle, spawnTimerInfoContainerStyle, spawnTimerStyle, startChatVoteDto, startCheckoutResponse, strokePropertiesChangedMessage, styleSet, styleSetEntry, styleSetNameCollection, styleSetUpdatedMessage, styleVariantUpdateMessage, styleVariantUpdatedEventArgs, summonerSpellData, summonerSpellInfoV2, tabLevelUpStyle, tabPlayer, tabTeam, tabsStyle, teamColorStyling, teamDamageStyle, teamData, teamDatabaseUpdateMessage, teamFightDamageStyle, teamIconStyle, teamInfo, teamInfoStyle, teamInhibitorData, teamLayoutStyling, teamMember, teamName, teamScore, teamScores, teamSummaryStyle, teamTextStyle, teamUpdateResults, teamWithMembers, teamfightDamageEntryStyle, teamfightDeathIconStyle, teamfightKillEvent, teamfightTimelinePlayer, teamfightTimelineSample, teamfightTimelineStyle, teamsAndTimerStyle, textComponentStyling, textContentWithStyle, textOutline, textStyle, textStyleWithBorder, textWithContent, timelineEntry, timerBadgePoll, timerBadgePrediction, timerBarStyle, timerTeamStyle, totalBadge, totalVotes, tournamentData, tournamentLogo, transitionEvents, transitionStyle, turretPlatingFallEvent, twitchChatVote, twitchPoll, twitchPollDto, twitchPrediction, twitchPredictionDto, twitchStatusDTO, ultiAbilityStyle, updateNameRequest, updateOverlayRequest, userFeaturesUpdatedMessage, userTierUpdatedMessage, vector3, verifyEmailRequest, voteWrapper, websocketMessageTypes };
|
|
7758
8197
|
//# sourceMappingURL=index.js.map
|
|
7759
8198
|
//# sourceMappingURL=index.js.map
|