@thestatic-tv/dcl-sdk 2.12.0 → 2.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1323,7 +1323,7 @@ async function signedRequest(url, init = {}) {
1323
1323
  }
1324
1324
 
1325
1325
  // src/ui/guide-ui.tsx
1326
- var import_react_ecs3 = __toESM(require("@dcl/sdk/react-ecs"));
1326
+ var import_react_ecs2 = __toESM(require("@dcl/sdk/react-ecs"));
1327
1327
  var import_math3 = require("@dcl/sdk/math");
1328
1328
  var import_RestrictedActions2 = require("~system/RestrictedActions");
1329
1329
 
@@ -1566,105 +1566,8 @@ function truncateText(text, maxLength) {
1566
1566
  return text.substring(0, maxLength - 3) + "...";
1567
1567
  }
1568
1568
 
1569
- // src/ui/toolbar-button.ts
1570
- var import_react_ecs2 = __toESM(require("@dcl/sdk/react-ecs"));
1571
-
1572
- // src/ui/toolbar.ts
1573
- var TOOLBAR = { edge: 20, gap: 10, buttonWidth: 100, buttonHeight: 45, bottom: 10 };
1574
- var COLUMN_SLOTS = 5;
1575
- function platformOf(answer) {
1576
- const raw = answer?.platform;
1577
- if (typeof raw !== "string") return "unknown";
1578
- const p = raw.trim().toLowerCase();
1579
- return p === "desktop" || p === "mobile" || p === "vr" || p === "web" ? p : "unknown";
1580
- }
1581
- function isPhonePlatform(platform) {
1582
- return platform === "mobile";
1583
- }
1584
- var scaled = (value, uiScale) => Math.round(value * uiScale);
1585
- function rowRight(slot, uiScale = 1) {
1586
- return TOOLBAR.edge + slot * (scaled(TOOLBAR.buttonWidth, uiScale) + TOOLBAR.gap);
1587
- }
1588
- function columnSlot(slot, uiScale = 1) {
1589
- const h = scaled(TOOLBAR.buttonHeight, uiScale);
1590
- return {
1591
- right: TOOLBAR.edge,
1592
- boxHeight: COLUMN_SLOTS * h + (COLUMN_SLOTS - 1) * TOOLBAR.gap,
1593
- above: Math.max(0, slot) * (h + TOOLBAR.gap)
1594
- };
1595
- }
1596
- function panelRight(phone, desktopRight, uiScale = 1) {
1597
- return phone ? TOOLBAR.edge + scaled(TOOLBAR.buttonWidth, uiScale) + TOOLBAR.gap : desktopRight;
1598
- }
1599
- var DESKTOP_CLOSES = { guide: ["admin"], admin: ["guide"] };
1600
- function panelsToClose(opened, registered, phone) {
1601
- if (phone) return registered.filter((name) => name !== opened);
1602
- const closes = DESKTOP_CLOSES[opened] ?? [];
1603
- return registered.filter((name) => closes.includes(name));
1604
- }
1605
- var PanelRules = class {
1606
- constructor(phone) {
1607
- this.hides = /* @__PURE__ */ new Map();
1608
- this.phone = phone;
1609
- }
1610
- /** Register (or replace) a panel; its hide runs when another panel opens and the rule says so */
1611
- register(name, hide) {
1612
- this.hides.set(name, hide);
1613
- }
1614
- /** A panel opened: close the ones the rule names. One failing hide does not stop the rest. */
1615
- opened(name) {
1616
- for (const other of panelsToClose(name, [...this.hides.keys()], this.phone())) {
1617
- try {
1618
- this.hides.get(other)?.();
1619
- } catch {
1620
- }
1621
- }
1622
- }
1623
- get names() {
1624
- return [...this.hides.keys()];
1625
- }
1626
- };
1627
-
1628
- // src/ui/toolbar-button.ts
1629
- function toolbarButton(slot, props, phone, uiScale = 1) {
1630
- const width = Math.round(TOOLBAR.buttonWidth * uiScale);
1631
- const height = Math.round(TOOLBAR.buttonHeight * uiScale);
1632
- if (!phone) {
1633
- return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1634
- ...props,
1635
- uiTransform: {
1636
- positionType: "absolute",
1637
- position: { right: rowRight(slot, uiScale), bottom: TOOLBAR.bottom },
1638
- width,
1639
- height,
1640
- ...props.uiTransform
1641
- }
1642
- });
1643
- }
1644
- const place = columnSlot(slot, uiScale);
1645
- return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1646
- uiTransform: {
1647
- positionType: "absolute",
1648
- position: { right: place.right, top: 0 },
1649
- width,
1650
- height: "100%",
1651
- flexDirection: "column",
1652
- justifyContent: "center"
1653
- },
1654
- children: [
1655
- import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1656
- uiTransform: { width, height: place.boxHeight, flexDirection: "column", flexShrink: 0 },
1657
- children: [
1658
- import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, { uiTransform: { width, height: place.above, flexShrink: 0 } }),
1659
- import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1660
- ...props,
1661
- uiTransform: { width, height, flexShrink: 0, ...props.uiTransform }
1662
- })
1663
- ]
1664
- })
1665
- ]
1666
- });
1667
- }
1569
+ // src/version.ts
1570
+ var SDK_VERSION = true ? "2.14.0" : "unknown";
1668
1571
 
1669
1572
  // src/ui/guide-ui.tsx
1670
1573
  function withLock(mapped, v, fallback) {
@@ -1701,7 +1604,7 @@ var GuideUIModule = class {
1701
1604
  if (this.client.isVisitorBlocked) return null;
1702
1605
  const windowW = UI_DIMENSIONS.guide.width;
1703
1606
  const windowH = UI_DIMENSIONS.guide.height;
1704
- return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1607
+ return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1705
1608
  key: `guide-root-${this.client.uiScale}`,
1706
1609
  uiTransform: {
1707
1610
  width: "100%",
@@ -1713,14 +1616,14 @@ var GuideUIModule = class {
1713
1616
  this.renderToggleButton(),
1714
1617
  // Render panel when visible - Guide positioned relative to Chat's scaled width
1715
1618
  // Guide.right = Chat.right + Chat.scaledWidth + gap (10px)
1716
- this._isVisible ? import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1619
+ // On a phone centered beside the toolbar's column (2.13.0, src/ui/toolbar-panel.ts); elsewhere as here
1620
+ this._isVisible ? this.client.toolbarPanel({
1717
1621
  key: `guide-panel-${this.client.uiScale}`,
1718
1622
  uiTransform: {
1719
1623
  width: windowW,
1720
1624
  height: windowH,
1721
1625
  positionType: "absolute",
1722
- // On a phone, left of the toolbar's column (2.12.0); elsewhere left of the chat panel, as before
1723
- position: { bottom: UI_DIMENSIONS.guide.bottom, right: this.client.panelRight(UI_DIMENSIONS.chat.right + this.s(UI_DIMENSIONS.chat.width) + 10) },
1626
+ position: { bottom: UI_DIMENSIONS.guide.bottom, right: UI_DIMENSIONS.chat.right + this.s(UI_DIMENSIONS.chat.width) + 10 },
1724
1627
  flexDirection: "row",
1725
1628
  border: { top: 2, bottom: 2, left: 2, right: 2 },
1726
1629
  borderColor: THEME.colors.panelBorder
@@ -1930,7 +1833,7 @@ var GuideUIModule = class {
1930
1833
  const nodesPlaylist = this.featuredPlaylists.find((p) => p.name === "NODES");
1931
1834
  const nodesCount = nodesPlaylist ? nodesPlaylist.videos.filter((v) => v.isCreator).length : 0;
1932
1835
  const displayedPlaylists = this.featuredPlaylists.filter((p) => p.name !== "NODES").slice(0, 6);
1933
- return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1836
+ return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1934
1837
  uiTransform: {
1935
1838
  width: sidebarW,
1936
1839
  minWidth: sidebarW,
@@ -1944,11 +1847,11 @@ var GuideUIModule = class {
1944
1847
  uiBackground: { color: import_math3.Color4.create(0, 0, 0, 0.4) },
1945
1848
  children: [
1946
1849
  // Header & Search
1947
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1850
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1948
1851
  uiTransform: { width: "100%", flexDirection: "column", padding: 10 },
1949
1852
  children: [
1950
1853
  // Title row
1951
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1854
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1952
1855
  uiTransform: {
1953
1856
  width: "100%",
1954
1857
  height: this.s(40),
@@ -1958,7 +1861,7 @@ var GuideUIModule = class {
1958
1861
  },
1959
1862
  children: [
1960
1863
  // Title
1961
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1864
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1962
1865
  uiText: {
1963
1866
  value: "THE STATIC TV",
1964
1867
  fontSize: this.s(UI_DIMENSIONS.guide.sidebar.headerSize),
@@ -1969,7 +1872,7 @@ var GuideUIModule = class {
1969
1872
  ]
1970
1873
  }),
1971
1874
  // Random Signal button
1972
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1875
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1973
1876
  uiTransform: {
1974
1877
  width: "100%",
1975
1878
  height: this.s(40),
@@ -1987,13 +1890,13 @@ var GuideUIModule = class {
1987
1890
  }
1988
1891
  },
1989
1892
  children: [
1990
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1893
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1991
1894
  uiText: { value: ">> RANDOM SIGNAL <<", fontSize: this.s(14), color: THEME.colors.cyan }
1992
1895
  })
1993
1896
  ]
1994
1897
  }),
1995
1898
  // Search input
1996
- import_react_ecs3.default.createElement(import_react_ecs3.Input, {
1899
+ import_react_ecs2.default.createElement(import_react_ecs2.Input, {
1997
1900
  placeholder: "SCAN FREQ...",
1998
1901
  fontSize: this.s(UI_DIMENSIONS.guide.sidebar.fontSize),
1999
1902
  uiTransform: {
@@ -2013,11 +1916,11 @@ var GuideUIModule = class {
2013
1916
  ]
2014
1917
  }),
2015
1918
  // Menu items
2016
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1919
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2017
1920
  uiTransform: { flexGrow: 1, flexDirection: "column", width: "100%", padding: { top: 5 } },
2018
1921
  children: [
2019
1922
  // Section header
2020
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1923
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2021
1924
  uiTransform: { padding: { left: 10, bottom: 8, top: 5 } },
2022
1925
  uiText: { value: "GLOBAL NETWORK", fontSize: this.s(12), color: THEME.colors.cyan }
2023
1926
  }),
@@ -2026,12 +1929,12 @@ var GuideUIModule = class {
2026
1929
  this.renderMenuButton("SIGNALS", signalCount, THEME.colors.white, void 0, "VODS & RECORDINGS"),
2027
1930
  this.renderMenuButton("NODES", nodesCount, THEME.colors.magenta, void 0, "CHANNELS & CREATORS"),
2028
1931
  // Divider
2029
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1932
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2030
1933
  uiTransform: { height: 1, width: "90%", margin: { top: 12, bottom: 8, left: 5 } },
2031
1934
  uiBackground: { color: THEME.colors.panelBorder }
2032
1935
  }),
2033
1936
  // Archives section
2034
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1937
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2035
1938
  uiTransform: { padding: { left: 10, bottom: 8 } },
2036
1939
  uiText: { value: "ARCHIVES", fontSize: this.s(12), color: THEME.colors.cyan }
2037
1940
  }),
@@ -2040,6 +1943,11 @@ var GuideUIModule = class {
2040
1943
  (pl) => this.renderMenuButton(pl.name.toUpperCase(), pl.videos.length, THEME.colors.white, void 0, "PLAYLIST")
2041
1944
  )
2042
1945
  ]
1946
+ }),
1947
+ // The SDK's version, small and dim at the bottom, for a visitor reporting a problem (2.14.0)
1948
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
1949
+ uiTransform: { width: "100%", flexShrink: 0, padding: { left: 10, bottom: 6, top: 4 } },
1950
+ uiText: { value: `TheStatic SDK ${SDK_VERSION}`, fontSize: this.s(11), color: THEME.colors.grayText, textAlign: "bottom-left" }
2043
1951
  })
2044
1952
  ]
2045
1953
  });
@@ -2047,7 +1955,7 @@ var GuideUIModule = class {
2047
1955
  renderMenuButton(label, count, color, badge, subtitle) {
2048
1956
  const isActive = this.activeTab === label;
2049
1957
  const buttonHeight = this.s(UI_DIMENSIONS.guide.sidebar.buttonHeight);
2050
- return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1958
+ return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2051
1959
  key: label,
2052
1960
  uiTransform: {
2053
1961
  width: "100%",
@@ -2066,10 +1974,10 @@ var GuideUIModule = class {
2066
1974
  this.currentPage = 0;
2067
1975
  },
2068
1976
  children: [
2069
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1977
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2070
1978
  uiTransform: { flexDirection: "column", alignItems: "flex-start", justifyContent: "center", gap: 0 },
2071
1979
  children: [
2072
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1980
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2073
1981
  uiTransform: { height: this.s(18) },
2074
1982
  uiText: {
2075
1983
  value: `${label} [${count}]`,
@@ -2079,7 +1987,7 @@ var GuideUIModule = class {
2079
1987
  }
2080
1988
  }),
2081
1989
  ...subtitle ? [
2082
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
1990
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2083
1991
  key: "subtitle",
2084
1992
  uiTransform: { height: this.s(12), marginTop: -2 },
2085
1993
  uiText: {
@@ -2093,7 +2001,7 @@ var GuideUIModule = class {
2093
2001
  ]
2094
2002
  }),
2095
2003
  ...badge ? [
2096
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2004
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2097
2005
  key: "badge",
2098
2006
  uiText: { value: badge, fontSize: this.s(UI_DIMENSIONS.guide.sidebar.fontSize), color: THEME.colors.red }
2099
2007
  })
@@ -2122,7 +2030,7 @@ var GuideUIModule = class {
2122
2030
  const start = this.currentPage * this.itemsPerPage;
2123
2031
  const paged = videosToShow.slice(start, start + this.itemsPerPage);
2124
2032
  const totalPages = Math.ceil(videosToShow.length / this.itemsPerPage);
2125
- return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2033
+ return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2126
2034
  uiTransform: {
2127
2035
  flexGrow: 1,
2128
2036
  flexDirection: "column",
@@ -2133,7 +2041,7 @@ var GuideUIModule = class {
2133
2041
  this.renderCardGrid(paged),
2134
2042
  // Pagination
2135
2043
  ...totalPages > 1 ? [
2136
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2044
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2137
2045
  key: "pagination",
2138
2046
  uiTransform: {
2139
2047
  width: "100%",
@@ -2146,7 +2054,7 @@ var GuideUIModule = class {
2146
2054
  },
2147
2055
  children: [
2148
2056
  ...this.currentPage > 0 ? [
2149
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2057
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2150
2058
  key: "prev",
2151
2059
  uiText: {
2152
2060
  value: "< PREV",
@@ -2156,7 +2064,7 @@ var GuideUIModule = class {
2156
2064
  onMouseDown: () => this.currentPage--
2157
2065
  })
2158
2066
  ] : [],
2159
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2067
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2160
2068
  uiText: {
2161
2069
  value: `${this.currentPage + 1}/${totalPages}`,
2162
2070
  fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize),
@@ -2164,7 +2072,7 @@ var GuideUIModule = class {
2164
2072
  }
2165
2073
  }),
2166
2074
  ...this.currentPage < totalPages - 1 ? [
2167
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2075
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2168
2076
  key: "next",
2169
2077
  uiText: {
2170
2078
  value: "NEXT >",
@@ -2182,7 +2090,7 @@ var GuideUIModule = class {
2182
2090
  }
2183
2091
  renderCardGrid(videos) {
2184
2092
  if (videos.length === 0) {
2185
- return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2093
+ return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2186
2094
  uiTransform: { width: "100%", flexGrow: 1, justifyContent: "center", alignItems: "center" },
2187
2095
  uiText: { value: "NO SIGNAL", fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize), color: THEME.colors.gray }
2188
2096
  });
@@ -2192,7 +2100,7 @@ var GuideUIModule = class {
2192
2100
  rows.push(videos.slice(i, i + 2));
2193
2101
  }
2194
2102
  const cardH = this.s(UI_DIMENSIONS.guide.content.cardHeight);
2195
- return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2103
+ return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2196
2104
  uiTransform: {
2197
2105
  width: "100%",
2198
2106
  flexGrow: 1,
@@ -2201,7 +2109,7 @@ var GuideUIModule = class {
2201
2109
  gap: 8
2202
2110
  },
2203
2111
  children: rows.map(
2204
- (row, rowIndex) => import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2112
+ (row, rowIndex) => import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2205
2113
  key: `row-${rowIndex}`,
2206
2114
  uiTransform: {
2207
2115
  width: "100%",
@@ -2228,7 +2136,7 @@ var GuideUIModule = class {
2228
2136
  } else if (isActive) {
2229
2137
  cardBgColor = import_math3.Color4.create(0, 0.4, 0, 0.5);
2230
2138
  }
2231
- return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2139
+ return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2232
2140
  key: video.id,
2233
2141
  uiTransform: {
2234
2142
  width: cardW,
@@ -2243,7 +2151,7 @@ var GuideUIModule = class {
2243
2151
  uiBackground: { color: cardBgColor },
2244
2152
  children: [
2245
2153
  // Main click area
2246
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2154
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2247
2155
  uiTransform: {
2248
2156
  width: "100%",
2249
2157
  height: "70%",
@@ -2253,7 +2161,7 @@ var GuideUIModule = class {
2253
2161
  },
2254
2162
  onMouseDown: () => this.handleVideoSelect(video),
2255
2163
  children: [
2256
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2164
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2257
2165
  uiText: {
2258
2166
  value: truncateText(video.name || "Unknown", 22),
2259
2167
  fontSize: this.s(UI_DIMENSIONS.guide.content.headerSize),
@@ -2262,7 +2170,7 @@ var GuideUIModule = class {
2262
2170
  }),
2263
2171
  // Status indicator: OFFLINE > CONNECTING > PLAYING > LIVE
2264
2172
  ...isOffline ? [
2265
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2173
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2266
2174
  key: "offline",
2267
2175
  uiText: {
2268
2176
  value: "OFFLINE",
@@ -2271,7 +2179,7 @@ var GuideUIModule = class {
2271
2179
  }
2272
2180
  })
2273
2181
  ] : isConnecting ? [
2274
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2182
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2275
2183
  key: "connecting",
2276
2184
  uiText: {
2277
2185
  value: "CONNECTING...",
@@ -2280,7 +2188,7 @@ var GuideUIModule = class {
2280
2188
  }
2281
2189
  })
2282
2190
  ] : isActive ? [
2283
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2191
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2284
2192
  key: "playing",
2285
2193
  uiText: {
2286
2194
  value: "PLAYING",
@@ -2289,18 +2197,18 @@ var GuideUIModule = class {
2289
2197
  }
2290
2198
  })
2291
2199
  ] : video.isLive ? [
2292
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2200
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2293
2201
  key: "live",
2294
2202
  uiTransform: { padding: { left: 4, right: 4, top: 2, bottom: 2 }, marginTop: 4 },
2295
2203
  uiBackground: { color: THEME.colors.red },
2296
2204
  children: [
2297
- import_react_ecs3.default.createElement(import_react_ecs3.Label, { value: "LIVE", fontSize: this.s(10), color: THEME.colors.white })
2205
+ import_react_ecs2.default.createElement(import_react_ecs2.Label, { value: "LIVE", fontSize: this.s(10), color: THEME.colors.white })
2298
2206
  ]
2299
2207
  })
2300
2208
  ] : [],
2301
2209
  // A locked channel (2026-11-20): its badge, the words a refused pick shows - one line, 12px in the 260px card
2302
2210
  ...video.locked === true ? [
2303
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2211
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2304
2212
  key: "locked",
2305
2213
  uiTransform: { height: this.s(16), marginTop: 4 },
2306
2214
  uiText: { value: LOCKED_LINE, fontSize: this.s(12), color: THEME.colors.yellow }
@@ -2309,7 +2217,7 @@ var GuideUIModule = class {
2309
2217
  ]
2310
2218
  }),
2311
2219
  // Channel link
2312
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2220
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2313
2221
  uiTransform: {
2314
2222
  width: "100%",
2315
2223
  height: "30%",
@@ -2320,7 +2228,7 @@ var GuideUIModule = class {
2320
2228
  uiBackground: { color: import_math3.Color4.create(0, 0, 0, 0.3) },
2321
2229
  onMouseDown: () => this.handleChannelClick(video),
2322
2230
  children: [
2323
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2231
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2324
2232
  uiText: {
2325
2233
  value: "CHANNEL",
2326
2234
  fontSize: this.s(UI_DIMENSIONS.guide.content.bodySize),
@@ -2337,7 +2245,7 @@ var GuideUIModule = class {
2337
2245
  const buttonW = this.s(170);
2338
2246
  const buttonH = this.s(44);
2339
2247
  const bodyH = this.s(UI_DIMENSIONS.guide.content.bodySize * 1.5 * 2);
2340
- return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2248
+ return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2341
2249
  key: "age-choice",
2342
2250
  uiTransform: {
2343
2251
  positionType: "absolute",
@@ -2351,7 +2259,7 @@ var GuideUIModule = class {
2351
2259
  },
2352
2260
  uiBackground: { color: import_math3.Color4.create(0, 0, 0, 0.85) },
2353
2261
  children: [
2354
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2262
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2355
2263
  uiTransform: {
2356
2264
  width: this.s(480),
2357
2265
  flexDirection: "column",
@@ -2362,15 +2270,15 @@ var GuideUIModule = class {
2362
2270
  },
2363
2271
  uiBackground: { color: THEME.colors.panel },
2364
2272
  children: [
2365
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2273
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2366
2274
  uiTransform: { marginBottom: this.s(8) },
2367
2275
  uiText: { value: "MATURE CONTENT", fontSize: this.s(24), color: THEME.colors.red }
2368
2276
  }),
2369
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2277
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2370
2278
  uiTransform: { marginBottom: this.s(12) },
2371
2279
  uiText: { value: truncateText(video.name || "Unknown", 40), fontSize: this.s(16), color: THEME.colors.cyan }
2372
2280
  }),
2373
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2281
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2374
2282
  uiTransform: { width: "100%", minHeight: bodyH, marginBottom: this.s(20) },
2375
2283
  uiText: {
2376
2284
  value: "This channel is for viewers aged 18 and older. Are you 18 or older?",
@@ -2380,21 +2288,21 @@ var GuideUIModule = class {
2380
2288
  textWrap: "wrap"
2381
2289
  }
2382
2290
  }),
2383
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2291
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2384
2292
  uiTransform: { flexDirection: "row", justifyContent: "center", gap: this.s(16) },
2385
2293
  children: [
2386
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2294
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2387
2295
  key: "age-yes",
2388
2296
  uiTransform: { width: buttonW, height: buttonH, justifyContent: "center", alignItems: "center" },
2389
2297
  uiBackground: { color: THEME.colors.red },
2390
2298
  onMouseDown: () => this.answerAge(true),
2391
2299
  children: [
2392
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2300
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2393
2301
  uiText: { value: "YES, I AM 18+", fontSize: this.s(14), color: THEME.colors.white }
2394
2302
  })
2395
2303
  ]
2396
2304
  }),
2397
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2305
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2398
2306
  key: "age-no",
2399
2307
  uiTransform: {
2400
2308
  width: buttonW,
@@ -2407,7 +2315,7 @@ var GuideUIModule = class {
2407
2315
  uiBackground: { color: THEME.colors.buttonBackground },
2408
2316
  onMouseDown: () => this.answerAge(false),
2409
2317
  children: [
2410
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2318
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2411
2319
  uiText: { value: "NO", fontSize: this.s(14), color: THEME.colors.white }
2412
2320
  })
2413
2321
  ]
@@ -2421,7 +2329,7 @@ var GuideUIModule = class {
2421
2329
  }
2422
2330
  renderCloseButton() {
2423
2331
  const closeSize = this.s(UI_DIMENSIONS.closeButton.size);
2424
- return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2332
+ return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2425
2333
  uiTransform: {
2426
2334
  positionType: "absolute",
2427
2335
  position: { top: -5, right: -5 },
@@ -2433,7 +2341,7 @@ var GuideUIModule = class {
2433
2341
  uiBackground: { color: THEME.colors.panel },
2434
2342
  onMouseDown: () => this.hide(),
2435
2343
  children: [
2436
- import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2344
+ import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2437
2345
  uiText: { value: "X", fontSize: this.s(UI_DIMENSIONS.closeButton.fontSize), color: THEME.colors.red }
2438
2346
  })
2439
2347
  ]
@@ -2442,7 +2350,7 @@ var GuideUIModule = class {
2442
2350
  renderToggleButton() {
2443
2351
  const buttonText = this._isVisible ? "CLOSE" : "GUIDE";
2444
2352
  const buttonColor = this._isVisible ? import_math3.Color4.create(0.2, 0.2, 0.28, 0.9) : import_math3.Color4.create(0, 0.5, 0.5, 0.9);
2445
- const label = import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2353
+ const label = import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2446
2354
  uiText: {
2447
2355
  value: buttonText,
2448
2356
  fontSize: this.s(14),
@@ -2451,16 +2359,16 @@ var GuideUIModule = class {
2451
2359
  }
2452
2360
  });
2453
2361
  const press = () => this._isVisible ? this.hide() : this.show();
2454
- if (this.client.isPhone) {
2455
- return toolbarButton(1, {
2362
+ if (this.client.isPhone || this.client.toolbarCollapsed) {
2363
+ return this.client.toolbarButton(1, {
2456
2364
  uiTransform: { justifyContent: "center", alignItems: "center" },
2457
2365
  uiBackground: { color: buttonColor },
2458
2366
  onMouseDown: press,
2459
2367
  children: [label]
2460
- }, true, this.client.uiScale);
2368
+ });
2461
2369
  }
2462
2370
  const buttonPos = 20 + this.s(100) + 10;
2463
- return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2371
+ return import_react_ecs2.default.createElement(import_react_ecs2.UiEntity, {
2464
2372
  uiTransform: {
2465
2373
  positionType: "absolute",
2466
2374
  position: { right: buttonPos, bottom: 10 },
@@ -2477,7 +2385,7 @@ var GuideUIModule = class {
2477
2385
  };
2478
2386
 
2479
2387
  // src/ui/chat-ui.tsx
2480
- var import_react_ecs4 = __toESM(require("@dcl/sdk/react-ecs"));
2388
+ var import_react_ecs3 = __toESM(require("@dcl/sdk/react-ecs"));
2481
2389
  var import_math4 = require("@dcl/sdk/math");
2482
2390
  var import_SignedFetch3 = require("~system/SignedFetch");
2483
2391
  var import_players = require("@dcl/sdk/players");
@@ -2528,7 +2436,7 @@ var ChatUIModule = class {
2528
2436
  if (this.client.isVisitorBlocked) return null;
2529
2437
  const scaledTheme = scaleChatTheme(DEFAULT_CHAT_THEME, this.client.uiScale);
2530
2438
  const positionStyle = this.getPositionStyle();
2531
- return import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2439
+ return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2532
2440
  uiTransform: {
2533
2441
  width: "100%",
2534
2442
  height: "100%",
@@ -2537,16 +2445,18 @@ var ChatUIModule = class {
2537
2445
  children: [
2538
2446
  // Always render toggle button
2539
2447
  this.renderToggleButton(),
2448
+ // The toolbar's collapse handle, drawn here once for the whole toolbar (2.14.0; nothing while collapsed)
2449
+ this.client.toolbarHandle(),
2540
2450
  // Render panel when visible - scaled sizes, fixed position
2541
2451
  // Key includes uiScale to force re-render when scale changes from other panels
2542
- this._isVisible ? import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2452
+ // On a phone centered beside the toolbar's column (2.13.0, src/ui/toolbar-panel.ts); elsewhere as here
2453
+ this._isVisible ? this.client.toolbarPanel({
2543
2454
  key: `chat-panel-${this.client.uiScale}`,
2544
2455
  uiTransform: {
2545
2456
  width: this.s(UI_DIMENSIONS.chat.width),
2546
2457
  height: this.s(UI_DIMENSIONS.chat.height),
2547
2458
  positionType: "absolute",
2548
- // On a phone, left of the toolbar's column (2.12.0); elsewhere at the right edge, as before
2549
- position: { bottom: UI_DIMENSIONS.chat.bottom, right: this.client.panelRight(UI_DIMENSIONS.chat.right) },
2459
+ position: { bottom: UI_DIMENSIONS.chat.bottom, right: UI_DIMENSIONS.chat.right },
2550
2460
  flexDirection: "column",
2551
2461
  border: { top: 2, bottom: 2, left: 2, right: 2 },
2552
2462
  borderColor: THEME.colors.panelBorder
@@ -2556,7 +2466,7 @@ var ChatUIModule = class {
2556
2466
  this.renderHeader(),
2557
2467
  this.renderChannelButton(scaledTheme),
2558
2468
  this.renderMessagesArea(scaledTheme),
2559
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2469
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2560
2470
  uiTransform: { width: "100%", height: 1, flexShrink: 0 },
2561
2471
  uiBackground: { color: THEME.colors.panelBorder }
2562
2472
  }),
@@ -2898,7 +2808,7 @@ var ChatUIModule = class {
2898
2808
  renderChannelButton(theme) {
2899
2809
  const currentChannel = this.channels.find((c) => c.id === this.currentChannelId);
2900
2810
  const displayName = currentChannel?.name || this.currentChannelId;
2901
- return import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2811
+ return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2902
2812
  uiTransform: {
2903
2813
  height: 40,
2904
2814
  width: "100%",
@@ -2913,12 +2823,12 @@ var ChatUIModule = class {
2913
2823
  this.showChannelDropdown = !this.showChannelDropdown;
2914
2824
  },
2915
2825
  children: [
2916
- import_react_ecs4.default.createElement(import_react_ecs4.Label, {
2826
+ import_react_ecs3.default.createElement(import_react_ecs3.Label, {
2917
2827
  value: `// ${truncateText(displayName, 24)}`,
2918
2828
  fontSize: theme.channelButton,
2919
2829
  color: THEME.colors.white
2920
2830
  }),
2921
- import_react_ecs4.default.createElement(import_react_ecs4.Label, {
2831
+ import_react_ecs3.default.createElement(import_react_ecs3.Label, {
2922
2832
  value: this.showChannelDropdown ? "\u25B2" : "\u25BC",
2923
2833
  fontSize: 10,
2924
2834
  color: THEME.colors.cyan
@@ -2947,7 +2857,7 @@ var ChatUIModule = class {
2947
2857
  const visibleMessages = allMessages.slice(startIdx, endIdx);
2948
2858
  const canScrollUp = this.chatScrollOffset < maxOffset;
2949
2859
  const canScrollDown = this.chatScrollOffset > 0;
2950
- return import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2860
+ return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2951
2861
  uiTransform: { flexGrow: 1, width: "100%", flexDirection: "row", overflow: "hidden" },
2952
2862
  children: [
2953
2863
  // Messages - anchored at the bottom, so the newest stays in view now that a row grows with its text
@@ -2955,7 +2865,7 @@ var ChatUIModule = class {
2955
2865
  // past it; now its oldest clips at the top, one scroll up away. The rows keep their height
2956
2866
  // (flexShrink 0 - the protocol's default of 1 squeezes them onto each other) in one column
2957
2867
  // (nowrap - the protocol documents wrap as its default).
2958
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2868
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2959
2869
  uiTransform: {
2960
2870
  flexGrow: 1,
2961
2871
  flexDirection: "column",
@@ -2969,7 +2879,7 @@ var ChatUIModule = class {
2969
2879
  )
2970
2880
  }),
2971
2881
  // Scroll controls
2972
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2882
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2973
2883
  uiTransform: {
2974
2884
  width: 28,
2975
2885
  height: "100%",
@@ -2979,22 +2889,22 @@ var ChatUIModule = class {
2979
2889
  gap: 8
2980
2890
  },
2981
2891
  children: [
2982
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2892
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2983
2893
  uiTransform: { width: 26, height: 36, justifyContent: "center", alignItems: "center" },
2984
2894
  uiBackground: { color: canScrollUp ? THEME.colors.buttonBackground : import_math4.Color4.create(0.1, 0.1, 0.1, 0.3) },
2985
2895
  onMouseDown: () => {
2986
2896
  if (canScrollUp) this.chatScrollOffset += 1;
2987
2897
  },
2988
2898
  children: [
2989
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2899
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2990
2900
  uiText: { value: "\u25B2", fontSize: 14, color: canScrollUp ? THEME.colors.cyan : THEME.colors.gray }
2991
2901
  })
2992
2902
  ]
2993
2903
  }),
2994
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2904
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2995
2905
  uiTransform: { width: 26, height: 24, justifyContent: "center", alignItems: "center" },
2996
2906
  children: [
2997
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2907
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
2998
2908
  uiText: {
2999
2909
  value: totalMessages > UI_DIMENSIONS.chat.messagesPerPage ? `${this.chatScrollOffset}` : "-",
3000
2910
  fontSize: 10,
@@ -3003,14 +2913,14 @@ var ChatUIModule = class {
3003
2913
  })
3004
2914
  ]
3005
2915
  }),
3006
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2916
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3007
2917
  uiTransform: { width: 26, height: 36, justifyContent: "center", alignItems: "center" },
3008
2918
  uiBackground: { color: canScrollDown ? THEME.colors.buttonBackground : import_math4.Color4.create(0.1, 0.1, 0.1, 0.3) },
3009
2919
  onMouseDown: () => {
3010
2920
  if (canScrollDown) this.chatScrollOffset -= 1;
3011
2921
  },
3012
2922
  children: [
3013
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2923
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3014
2924
  uiText: { value: "\u25BC", fontSize: 14, color: canScrollDown ? THEME.colors.cyan : THEME.colors.gray }
3015
2925
  })
3016
2926
  ]
@@ -3021,7 +2931,7 @@ var ChatUIModule = class {
3021
2931
  });
3022
2932
  }
3023
2933
  renderSystemMessage(msg, theme) {
3024
- return import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2934
+ return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3025
2935
  key: msg.id,
3026
2936
  uiTransform: { width: "100%", height: 24, marginBottom: 4, flexShrink: 0 },
3027
2937
  uiText: {
@@ -3041,12 +2951,12 @@ var ChatUIModule = class {
3041
2951
  if (displayName.toLowerCase().includes("admin")) accentColor = THEME.colors.magenta;
3042
2952
  else if (isCurrentUser) accentColor = THEME.colors.green;
3043
2953
  const textRoom = this.messageTextRoom(msg.text, theme.chatMessage);
3044
- return import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2954
+ return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3045
2955
  key: msg.id,
3046
2956
  uiTransform: { width: "100%", flexDirection: "column", marginBottom: 16, flexShrink: 0 },
3047
2957
  children: [
3048
2958
  // Header row
3049
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2959
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3050
2960
  uiTransform: {
3051
2961
  width: "100%",
3052
2962
  height: 24,
@@ -3056,23 +2966,23 @@ var ChatUIModule = class {
3056
2966
  marginBottom: 4
3057
2967
  },
3058
2968
  children: [
3059
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2969
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3060
2970
  uiText: { value: displayName, fontSize: theme.chatUsername, color: accentColor, textAlign: "middle-left" }
3061
2971
  }),
3062
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2972
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3063
2973
  uiText: { value: time, fontSize: theme.chatTimestamp, color: THEME.colors.gray, textAlign: "middle-right" }
3064
2974
  })
3065
2975
  ]
3066
2976
  }),
3067
2977
  // Message content
3068
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2978
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3069
2979
  uiTransform: { width: "100%", flexDirection: "row", alignItems: "stretch", paddingLeft: 8 },
3070
2980
  children: [
3071
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2981
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3072
2982
  uiTransform: { width: 3, minHeight: textRoom },
3073
2983
  uiBackground: { color: accentColor }
3074
2984
  }),
3075
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
2985
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3076
2986
  uiTransform: { flexGrow: 1, minHeight: textRoom, paddingLeft: 12, paddingTop: 4, paddingBottom: 4 },
3077
2987
  uiText: {
3078
2988
  value: msg.text,
@@ -3088,7 +2998,7 @@ var ChatUIModule = class {
3088
2998
  });
3089
2999
  }
3090
3000
  renderUserInfoBar(theme) {
3091
- return import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
3001
+ return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3092
3002
  uiTransform: {
3093
3003
  width: "100%",
3094
3004
  height: 34,
@@ -3100,12 +3010,12 @@ var ChatUIModule = class {
3100
3010
  },
3101
3011
  uiBackground: { color: import_math4.Color4.create(0.03, 0.03, 0.05, 1) },
3102
3012
  children: [
3103
- import_react_ecs4.default.createElement(import_react_ecs4.Label, {
3013
+ import_react_ecs3.default.createElement(import_react_ecs3.Label, {
3104
3014
  value: `// ${this.currentUsername || "Guest"}`,
3105
3015
  fontSize: theme.userInfo,
3106
3016
  color: THEME.colors.yellow
3107
3017
  }),
3108
- import_react_ecs4.default.createElement(import_react_ecs4.Label, {
3018
+ import_react_ecs3.default.createElement(import_react_ecs3.Label, {
3109
3019
  value: this.isRegisteredUser ? "\u25CF CITIZEN" : "\u25CB GUEST",
3110
3020
  fontSize: theme.authStatus,
3111
3021
  color: this.isRegisteredUser ? THEME.colors.green : THEME.colors.gray
@@ -3116,7 +3026,7 @@ var ChatUIModule = class {
3116
3026
  renderInputArea(theme) {
3117
3027
  const baseUrl = this.getBaseUrl();
3118
3028
  if (!this.isRegisteredUser) {
3119
- return import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
3029
+ return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3120
3030
  uiTransform: {
3121
3031
  height: 75,
3122
3032
  minHeight: 75,
@@ -3130,14 +3040,14 @@ var ChatUIModule = class {
3130
3040
  },
3131
3041
  uiBackground: { color: import_math4.Color4.create(0.08, 0.08, 0.1, 1) },
3132
3042
  children: [
3133
- import_react_ecs4.default.createElement(import_react_ecs4.Label, {
3043
+ import_react_ecs3.default.createElement(import_react_ecs3.Label, {
3134
3044
  value: "ACCESS RESTRICTED: CITIZENS ONLY",
3135
3045
  fontSize: 12,
3136
3046
  color: THEME.colors.red,
3137
3047
  textAlign: "middle-center",
3138
3048
  uiTransform: { marginBottom: 5 }
3139
3049
  }),
3140
- import_react_ecs4.default.createElement(import_react_ecs4.Button, {
3050
+ import_react_ecs3.default.createElement(import_react_ecs3.Button, {
3141
3051
  value: "REGISTER IDENTITY",
3142
3052
  fontSize: 14,
3143
3053
  uiTransform: { width: 200, height: 30 },
@@ -3150,7 +3060,7 @@ var ChatUIModule = class {
3150
3060
  ]
3151
3061
  });
3152
3062
  }
3153
- return import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
3063
+ return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3154
3064
  uiTransform: {
3155
3065
  height: 75,
3156
3066
  minHeight: 75,
@@ -3162,7 +3072,7 @@ var ChatUIModule = class {
3162
3072
  },
3163
3073
  uiBackground: { color: import_math4.Color4.create(0.08, 0.08, 0.1, 1) },
3164
3074
  children: [
3165
- import_react_ecs4.default.createElement(import_react_ecs4.Input, {
3075
+ import_react_ecs3.default.createElement(import_react_ecs3.Input, {
3166
3076
  onChange: (v) => {
3167
3077
  this.inputText = v;
3168
3078
  },
@@ -3175,7 +3085,7 @@ var ChatUIModule = class {
3175
3085
  uiBackground: { color: import_math4.Color4.create(0.12, 0.12, 0.14, 1) },
3176
3086
  uiTransform: { flexGrow: 1, height: "100%", margin: { right: 10 } }
3177
3087
  }),
3178
- import_react_ecs4.default.createElement(import_react_ecs4.Button, {
3088
+ import_react_ecs3.default.createElement(import_react_ecs3.Button, {
3179
3089
  value: this.isSigningIn ? "..." : "SEND",
3180
3090
  onMouseDown: () => this.handleSend(),
3181
3091
  uiTransform: { width: 80, height: "100%" },
@@ -3192,7 +3102,7 @@ var ChatUIModule = class {
3192
3102
  const endIdx = startIdx + UI_DIMENSIONS.chat.channelsPerPage;
3193
3103
  const visibleChannels = this.channels.slice(startIdx, endIdx);
3194
3104
  const totalPages = Math.ceil(this.channels.length / UI_DIMENSIONS.chat.channelsPerPage);
3195
- return import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
3105
+ return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3196
3106
  uiTransform: {
3197
3107
  width: "100%",
3198
3108
  height: 260,
@@ -3203,13 +3113,13 @@ var ChatUIModule = class {
3203
3113
  uiBackground: { color: import_math4.Color4.create(0.08, 0.1, 0.14, 1) },
3204
3114
  children: [
3205
3115
  // Top border
3206
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
3116
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3207
3117
  uiTransform: { width: "100%", height: 2, flexShrink: 0 },
3208
3118
  uiBackground: { color: THEME.colors.cyan }
3209
3119
  }),
3210
3120
  // Channel list
3211
3121
  ...visibleChannels.map(
3212
- (channel) => import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
3122
+ (channel) => import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3213
3123
  key: channel.id,
3214
3124
  uiTransform: {
3215
3125
  height: 38,
@@ -3222,7 +3132,7 @@ var ChatUIModule = class {
3222
3132
  },
3223
3133
  onMouseDown: () => this.switchChannel(channel.id),
3224
3134
  children: [
3225
- import_react_ecs4.default.createElement(import_react_ecs4.Label, {
3135
+ import_react_ecs3.default.createElement(import_react_ecs3.Label, {
3226
3136
  value: channel.id === this.currentChannelId ? `\u25B8 ${channel.name}` : channel.name,
3227
3137
  fontSize: theme.channelDropdown,
3228
3138
  color: channel.id === this.currentChannelId ? THEME.colors.cyan : THEME.colors.gray
@@ -3232,7 +3142,7 @@ var ChatUIModule = class {
3232
3142
  ),
3233
3143
  // Pagination
3234
3144
  ...totalPages > 1 ? [
3235
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
3145
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3236
3146
  key: "pagination",
3237
3147
  uiTransform: {
3238
3148
  width: "100%",
@@ -3245,11 +3155,11 @@ var ChatUIModule = class {
3245
3155
  },
3246
3156
  children: [
3247
3157
  ...this.channelPage > 0 ? [
3248
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
3158
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3249
3159
  key: "prev",
3250
3160
  onMouseDown: () => this.channelPage--,
3251
3161
  children: [
3252
- import_react_ecs4.default.createElement(import_react_ecs4.Label, {
3162
+ import_react_ecs3.default.createElement(import_react_ecs3.Label, {
3253
3163
  value: "<< PREV",
3254
3164
  fontSize: 10,
3255
3165
  color: THEME.colors.cyan
@@ -3257,17 +3167,17 @@ var ChatUIModule = class {
3257
3167
  ]
3258
3168
  })
3259
3169
  ] : [],
3260
- import_react_ecs4.default.createElement(import_react_ecs4.Label, {
3170
+ import_react_ecs3.default.createElement(import_react_ecs3.Label, {
3261
3171
  value: `${this.channelPage + 1}/${totalPages}`,
3262
3172
  fontSize: 10,
3263
3173
  color: THEME.colors.gray
3264
3174
  }),
3265
3175
  ...this.channelPage < totalPages - 1 ? [
3266
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
3176
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3267
3177
  key: "next",
3268
3178
  onMouseDown: () => this.channelPage++,
3269
3179
  children: [
3270
- import_react_ecs4.default.createElement(import_react_ecs4.Label, {
3180
+ import_react_ecs3.default.createElement(import_react_ecs3.Label, {
3271
3181
  value: "NEXT >>",
3272
3182
  fontSize: 10,
3273
3183
  color: THEME.colors.cyan
@@ -3279,7 +3189,7 @@ var ChatUIModule = class {
3279
3189
  })
3280
3190
  ] : [],
3281
3191
  // Bottom border
3282
- import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
3192
+ import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3283
3193
  uiTransform: { width: "100%", height: 1, flexShrink: 0 },
3284
3194
  uiBackground: { color: THEME.colors.panelBorder }
3285
3195
  })
@@ -3290,7 +3200,7 @@ var ChatUIModule = class {
3290
3200
  const unreadBadge = this._unreadCount > 0 ? ` (${this._unreadCount})` : "";
3291
3201
  const buttonText = this._isVisible ? "CLOSE" : `CHAT${unreadBadge}`;
3292
3202
  const buttonColor = this._isVisible ? import_math4.Color4.create(0.2, 0.2, 0.28, 0.9) : import_math4.Color4.create(0.6, 0, 0.5, 0.9);
3293
- const label = import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
3203
+ const label = import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3294
3204
  uiText: {
3295
3205
  value: buttonText,
3296
3206
  fontSize: this.s(14),
@@ -3299,15 +3209,15 @@ var ChatUIModule = class {
3299
3209
  }
3300
3210
  });
3301
3211
  const press = () => this._isVisible ? this.hide() : this.show();
3302
- if (this.client.isPhone) {
3303
- return toolbarButton(0, {
3212
+ if (this.client.isPhone || this.client.toolbarCollapsed) {
3213
+ return this.client.toolbarButton(0, {
3304
3214
  uiTransform: { justifyContent: "center", alignItems: "center" },
3305
3215
  uiBackground: { color: buttonColor },
3306
3216
  onMouseDown: press,
3307
3217
  children: [label]
3308
- }, true, this.client.uiScale);
3218
+ });
3309
3219
  }
3310
- return import_react_ecs4.default.createElement(import_react_ecs4.UiEntity, {
3220
+ return import_react_ecs3.default.createElement(import_react_ecs3.UiEntity, {
3311
3221
  uiTransform: {
3312
3222
  positionType: "absolute",
3313
3223
  position: { right: 20, bottom: 10 },
@@ -3324,13 +3234,13 @@ var ChatUIModule = class {
3324
3234
  };
3325
3235
 
3326
3236
  // src/ui/admin-panel-ui.tsx
3327
- var import_react_ecs7 = __toESM(require("@dcl/sdk/react-ecs"));
3237
+ var import_react_ecs6 = __toESM(require("@dcl/sdk/react-ecs"));
3328
3238
  var import_math7 = require("@dcl/sdk/math");
3329
3239
  var import_players2 = require("@dcl/sdk/players");
3330
3240
  var import_RestrictedActions6 = require("~system/RestrictedActions");
3331
3241
 
3332
3242
  // src/ui/ui-renderer.tsx
3333
- var import_react_ecs5 = __toESM(require("@dcl/sdk/react-ecs"));
3243
+ var import_react_ecs4 = __toESM(require("@dcl/sdk/react-ecs"));
3334
3244
  var import_ecs3 = require("@dcl/sdk/ecs");
3335
3245
  var notificationText = "";
3336
3246
  var notificationVisible = false;
@@ -3363,8 +3273,8 @@ function NotificationBanner() {
3363
3273
  if (!notificationVisible) return null;
3364
3274
  return (
3365
3275
  // Full-width container to center the notification
3366
- /* @__PURE__ */ import_react_ecs5.default.createElement(
3367
- import_react_ecs5.UiEntity,
3276
+ /* @__PURE__ */ import_react_ecs4.default.createElement(
3277
+ import_react_ecs4.UiEntity,
3368
3278
  {
3369
3279
  uiTransform: {
3370
3280
  positionType: "absolute",
@@ -3374,8 +3284,8 @@ function NotificationBanner() {
3374
3284
  alignItems: "center"
3375
3285
  }
3376
3286
  },
3377
- /* @__PURE__ */ import_react_ecs5.default.createElement(
3378
- import_react_ecs5.UiEntity,
3287
+ /* @__PURE__ */ import_react_ecs4.default.createElement(
3288
+ import_react_ecs4.UiEntity,
3379
3289
  {
3380
3290
  uiTransform: {
3381
3291
  width: N.width,
@@ -3385,8 +3295,8 @@ function NotificationBanner() {
3385
3295
  },
3386
3296
  uiBackground: { color: C.panel }
3387
3297
  },
3388
- /* @__PURE__ */ import_react_ecs5.default.createElement(
3389
- import_react_ecs5.UiEntity,
3298
+ /* @__PURE__ */ import_react_ecs4.default.createElement(
3299
+ import_react_ecs4.UiEntity,
3390
3300
  {
3391
3301
  uiTransform: {
3392
3302
  width: N.borderWidth,
@@ -3395,8 +3305,8 @@ function NotificationBanner() {
3395
3305
  uiBackground: { color: C.cyan }
3396
3306
  }
3397
3307
  ),
3398
- /* @__PURE__ */ import_react_ecs5.default.createElement(
3399
- import_react_ecs5.UiEntity,
3308
+ /* @__PURE__ */ import_react_ecs4.default.createElement(
3309
+ import_react_ecs4.UiEntity,
3400
3310
  {
3401
3311
  uiTransform: {
3402
3312
  flexGrow: 1,
@@ -3406,8 +3316,8 @@ function NotificationBanner() {
3406
3316
  alignItems: "flex-start"
3407
3317
  }
3408
3318
  },
3409
- /* @__PURE__ */ import_react_ecs5.default.createElement(
3410
- import_react_ecs5.Label,
3319
+ /* @__PURE__ */ import_react_ecs4.default.createElement(
3320
+ import_react_ecs4.Label,
3411
3321
  {
3412
3322
  value: notificationText,
3413
3323
  fontSize: N.fontSize,
@@ -3416,8 +3326,8 @@ function NotificationBanner() {
3416
3326
  }
3417
3327
  )
3418
3328
  ),
3419
- /* @__PURE__ */ import_react_ecs5.default.createElement(
3420
- import_react_ecs5.UiEntity,
3329
+ /* @__PURE__ */ import_react_ecs4.default.createElement(
3330
+ import_react_ecs4.UiEntity,
3421
3331
  {
3422
3332
  uiTransform: {
3423
3333
  width: 5,
@@ -3439,8 +3349,8 @@ function createStaticUI(client) {
3439
3349
  const guideComponent = client.guideUI?.getComponent() ?? null;
3440
3350
  const chatComponent = client.chatUI?.getComponent() ?? null;
3441
3351
  const adminComponent = client.adminPanel?.getComponent() ?? null;
3442
- return /* @__PURE__ */ import_react_ecs5.default.createElement(
3443
- import_react_ecs5.UiEntity,
3352
+ return /* @__PURE__ */ import_react_ecs4.default.createElement(
3353
+ import_react_ecs4.UiEntity,
3444
3354
  {
3445
3355
  key: `static-ui-root-${currentScale}`,
3446
3356
  uiTransform: {
@@ -3451,7 +3361,7 @@ function createStaticUI(client) {
3451
3361
  alignItems: "center"
3452
3362
  }
3453
3363
  },
3454
- blocked ? null : /* @__PURE__ */ import_react_ecs5.default.createElement(NotificationBanner, null),
3364
+ blocked ? null : /* @__PURE__ */ import_react_ecs4.default.createElement(NotificationBanner, null),
3455
3365
  guideComponent,
3456
3366
  chatComponent,
3457
3367
  adminComponent
@@ -3460,11 +3370,11 @@ function createStaticUI(client) {
3460
3370
  }
3461
3371
  function setupStaticUI(client) {
3462
3372
  const StaticUI = createStaticUI(client);
3463
- import_react_ecs5.ReactEcsRenderer.setUiRenderer(StaticUI);
3373
+ import_react_ecs4.ReactEcsRenderer.setUiRenderer(StaticUI);
3464
3374
  }
3465
3375
 
3466
3376
  // src/ui/blocked-notice.tsx
3467
- var import_react_ecs6 = __toESM(require("@dcl/sdk/react-ecs"));
3377
+ var import_react_ecs5 = __toESM(require("@dcl/sdk/react-ecs"));
3468
3378
  var import_math5 = require("@dcl/sdk/math");
3469
3379
  var import_RestrictedActions4 = require("~system/RestrictedActions");
3470
3380
  var DEFAULT_SITE_URL = "https://thestatic.tv";
@@ -3491,8 +3401,8 @@ function BlockedNotice(props) {
3491
3401
  const s = (v) => Math.round(v * props.scale);
3492
3402
  const [title, ...body] = lines;
3493
3403
  const action = blockedNoticeAction(props.standing, props.siteUrl || DEFAULT_SITE_URL);
3494
- return /* @__PURE__ */ import_react_ecs6.default.createElement(
3495
- import_react_ecs6.UiEntity,
3404
+ return /* @__PURE__ */ import_react_ecs5.default.createElement(
3405
+ import_react_ecs5.UiEntity,
3496
3406
  {
3497
3407
  uiTransform: {
3498
3408
  width: "100%",
@@ -3502,16 +3412,16 @@ function BlockedNotice(props) {
3502
3412
  alignItems: "center"
3503
3413
  }
3504
3414
  },
3505
- /* @__PURE__ */ import_react_ecs6.default.createElement(
3506
- import_react_ecs6.UiEntity,
3415
+ /* @__PURE__ */ import_react_ecs5.default.createElement(
3416
+ import_react_ecs5.UiEntity,
3507
3417
  {
3508
3418
  uiTransform: { width: s(460), flexDirection: "column", alignItems: "center", padding: s(20) },
3509
3419
  uiBackground: { color: import_math5.Color4.create(0.05, 0.05, 0.08, 0.95) }
3510
3420
  },
3511
- /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: title, fontSize: s(22), color: import_math5.Color4.create(0.9, 0.2, 0.2, 1), uiTransform: { height: s(34) } }),
3512
- body.map((line, i) => /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { key: `blocked-line-${i}`, value: line, fontSize: s(16), color: import_math5.Color4.White(), uiTransform: { height: s(26) } })),
3513
- action && /* @__PURE__ */ import_react_ecs6.default.createElement(
3514
- import_react_ecs6.Button,
3421
+ /* @__PURE__ */ import_react_ecs5.default.createElement(import_react_ecs5.Label, { value: title, fontSize: s(22), color: import_math5.Color4.create(0.9, 0.2, 0.2, 1), uiTransform: { height: s(34) } }),
3422
+ body.map((line, i) => /* @__PURE__ */ import_react_ecs5.default.createElement(import_react_ecs5.Label, { key: `blocked-line-${i}`, value: line, fontSize: s(16), color: import_math5.Color4.White(), uiTransform: { height: s(26) } })),
3423
+ action && /* @__PURE__ */ import_react_ecs5.default.createElement(
3424
+ import_react_ecs5.Button,
3515
3425
  {
3516
3426
  uiTransform: { width: s(220), height: s(36), margin: { top: s(12) } },
3517
3427
  uiBackground: { color: import_math5.Color4.create(0, 0.8, 0.8, 1) },
@@ -4001,16 +3911,16 @@ var AdminPanelUIModule = class {
4001
3911
  this.privateStatus = line;
4002
3912
  } };
4003
3913
  // --- UI Components ---
4004
- this.SectionHead = ({ label, color }) => /* @__PURE__ */ import_react_ecs7.default.createElement(
4005
- import_react_ecs7.UiEntity,
3914
+ this.SectionHead = ({ label, color }) => /* @__PURE__ */ import_react_ecs6.default.createElement(
3915
+ import_react_ecs6.UiEntity,
4006
3916
  {
4007
3917
  uiTransform: { width: "100%", height: this.s(UI_DIMENSIONS.admin.sectionHeadHeight), margin: { bottom: 8 }, padding: { left: 10 }, alignItems: "center" },
4008
3918
  uiBackground: { color: import_math7.Color4.create(color.r * 0.3, color.g * 0.3, color.b * 0.3, 0.5) }
4009
3919
  },
4010
- /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: label, fontSize: this.theme.sectionHead, color })
3920
+ /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: label, fontSize: this.theme.sectionHead, color })
4011
3921
  );
4012
- this.TabBtn = ({ label, tab }) => /* @__PURE__ */ import_react_ecs7.default.createElement(
4013
- import_react_ecs7.Button,
3922
+ this.TabBtn = ({ label, tab }) => /* @__PURE__ */ import_react_ecs6.default.createElement(
3923
+ import_react_ecs6.Button,
4014
3924
  {
4015
3925
  uiTransform: { flexGrow: 1, height: this.s(UI_DIMENSIONS.admin.tabHeight), justifyContent: "center", alignItems: "center" },
4016
3926
  uiBackground: { color: this.activeTab === tab ? C2.tabActive : C2.tabInactive },
@@ -4028,8 +3938,8 @@ var AdminPanelUIModule = class {
4028
3938
  */
4029
3939
  this.ControlsTab = () => {
4030
3940
  const t = this.theme;
4031
- return /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, this.controls.map((control) => /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { key: `control-${control.id}`, uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(this.SectionHead, { label: control.label, color: C2.cyan }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap" } }, control.options.map((option) => this.controlButton(control, option.id, option.label)), control.off === true && this.controlButton(control, "off", "OFF")))), this.controlStatus && /* @__PURE__ */ import_react_ecs7.default.createElement(
4032
- import_react_ecs7.Label,
3941
+ return /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, this.controls.map((control) => /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { key: `control-${control.id}`, uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(this.SectionHead, { label: control.label, color: C2.cyan }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap" } }, control.options.map((option) => this.controlButton(control, option.id, option.label)), control.off === true && this.controlButton(control, "off", "OFF")))), this.controlStatus && /* @__PURE__ */ import_react_ecs6.default.createElement(
3942
+ import_react_ecs6.Label,
4033
3943
  {
4034
3944
  value: this.controlStatus,
4035
3945
  fontSize: t.status,
@@ -4043,8 +3953,8 @@ var AdminPanelUIModule = class {
4043
3953
  this.fetchStreamData();
4044
3954
  }
4045
3955
  const t = this.theme;
4046
- return /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, !this.streamData?.hasChannel && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(this.SectionHead, { label: "LIVE STREAM", color: C2.btn }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "No streaming channel linked", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { bottom: 8 } } }), this.isOwner && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column" } }, this.streamData?.trialAvailable && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 10 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(
4047
- import_react_ecs7.Button,
3956
+ return /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, !this.streamData?.hasChannel && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(this.SectionHead, { label: "LIVE STREAM", color: C2.btn }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "No streaming channel linked", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { bottom: 8 } } }), this.isOwner && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column" } }, this.streamData?.trialAvailable && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 10 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(
3957
+ import_react_ecs6.Button,
4048
3958
  {
4049
3959
  uiTransform: { width: this.s(200), height: this.s(UI_DIMENSIONS.admin.buttonHeight), margin: { bottom: 6 } },
4050
3960
  uiBackground: { color: this.trialClaiming ? C2.btn : C2.green },
@@ -4053,8 +3963,8 @@ var AdminPanelUIModule = class {
4053
3963
  color: C2.text,
4054
3964
  onMouseDown: () => this.claimTrial()
4055
3965
  }
4056
- ), this.trialClaimError && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: this.trialClaimError, fontSize: t.status, color: C2.red }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: trialNoteText(this.streamData?.trialSparks), fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { top: 4 } } })), !this.streamData?.trialAvailable && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column" } }, /* @__PURE__ */ import_react_ecs7.default.createElement(
4057
- import_react_ecs7.Button,
3966
+ ), this.trialClaimError && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: this.trialClaimError, fontSize: t.status, color: C2.red }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: trialNoteText(this.streamData?.trialSparks), fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { top: 4 } } })), !this.streamData?.trialAvailable && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column" } }, /* @__PURE__ */ import_react_ecs6.default.createElement(
3967
+ import_react_ecs6.Button,
4058
3968
  {
4059
3969
  uiTransform: { width: this.s(170), height: this.s(UI_DIMENSIONS.admin.buttonHeight), margin: { bottom: 6 } },
4060
3970
  uiBackground: { color: this.channelCreating ? C2.btn : C2.cyan },
@@ -4063,47 +3973,47 @@ var AdminPanelUIModule = class {
4063
3973
  color: C2.text,
4064
3974
  onMouseDown: () => this.createChannel()
4065
3975
  }
4066
- ), this.channelCreateError && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: this.channelCreateError, fontSize: t.status, color: C2.red }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "Relay tier \u2022 $25/mo \u2022 8 hours streaming", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { top: 4 } } })))), this.streamData?.hasChannel && this.isOwner && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(this.SectionHead, { label: this.streamData.isLive ? "LIVE STREAM" : "STREAM SETTINGS", color: this.streamData.isLive ? C2.red : C2.yellow }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 8 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(
4067
- import_react_ecs7.Label,
3976
+ ), this.channelCreateError && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: this.channelCreateError, fontSize: t.status, color: C2.red }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "Relay tier \u2022 $25/mo \u2022 8 hours streaming", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { margin: { top: 4 } } })))), this.streamData?.hasChannel && this.isOwner && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(this.SectionHead, { label: this.streamData.isLive ? "LIVE STREAM" : "STREAM SETTINGS", color: this.streamData.isLive ? C2.red : C2.yellow }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 8 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(
3977
+ import_react_ecs6.Label,
4068
3978
  {
4069
3979
  value: this.streamData.isLive ? `LIVE \u2022 ${this.streamData.currentViewers || 0} viewers` : "OFFLINE",
4070
3980
  fontSize: t.label,
4071
3981
  color: this.streamData.isLive ? C2.red : C2.textDim
4072
3982
  }
4073
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: ` \u2022 ${this.streamData.tier?.toUpperCase() || "RELAY"}`, fontSize: t.labelSmall, color: C2.cyan }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: ` \u2022 ${this.streamData.sparksBalance || 0} Sparks`, fontSize: t.labelSmall, color: C2.textDim })), /* @__PURE__ */ import_react_ecs7.default.createElement(
4074
- import_react_ecs7.Label,
3983
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: ` \u2022 ${this.streamData.tier?.toUpperCase() || "RELAY"}`, fontSize: t.labelSmall, color: C2.cyan }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: ` \u2022 ${this.streamData.sparksBalance || 0} Sparks`, fontSize: t.labelSmall, color: C2.textDim })), /* @__PURE__ */ import_react_ecs6.default.createElement(
3984
+ import_react_ecs6.Label,
4075
3985
  {
4076
3986
  value: `Channel: ${this.streamData.channelName || this.streamData.channelId}`,
4077
3987
  fontSize: t.labelSmall,
4078
3988
  color: C2.textDim,
4079
3989
  uiTransform: { margin: { bottom: 10 } }
4080
3990
  }
4081
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "RTMP Server:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ import_react_ecs7.default.createElement(
4082
- import_react_ecs7.Label,
3991
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "RTMP Server:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ import_react_ecs6.default.createElement(
3992
+ import_react_ecs6.Label,
4083
3993
  {
4084
3994
  value: this.streamData.rtmpUrl || "Loading...",
4085
3995
  fontSize: t.label,
4086
3996
  color: this.streamData.rtmpUrl ? C2.text : C2.textDim,
4087
3997
  uiTransform: { margin: { left: 6 } }
4088
3998
  }
4089
- )), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "Stream Key:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ import_react_ecs7.default.createElement(
4090
- import_react_ecs7.Label,
3999
+ )), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "Stream Key:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ import_react_ecs6.default.createElement(
4000
+ import_react_ecs6.Label,
4091
4001
  {
4092
4002
  value: this.streamData.streamKey || "Loading...",
4093
4003
  fontSize: t.label,
4094
4004
  color: this.streamData.streamKey ? C2.cyan : C2.textDim,
4095
4005
  uiTransform: { margin: { left: 6 } }
4096
4006
  }
4097
- )), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 10 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "HLS Playback:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ import_react_ecs7.default.createElement(
4098
- import_react_ecs7.Label,
4007
+ )), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 10 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "HLS Playback:", fontSize: t.labelSmall, color: C2.textDim }), /* @__PURE__ */ import_react_ecs6.default.createElement(
4008
+ import_react_ecs6.Label,
4099
4009
  {
4100
4010
  value: this.streamData.locked === true ? LOCKED_LINE : this.streamData.hlsUrl || "Not available",
4101
4011
  fontSize: t.label,
4102
4012
  color: this.streamData.locked === true ? C2.yellow : this.streamData.hlsUrl ? C2.green : C2.textDim,
4103
4013
  uiTransform: { margin: { left: 6 } }
4104
4014
  }
4105
- )), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, !this.streamData.isLive && /* @__PURE__ */ import_react_ecs7.default.createElement(
4106
- import_react_ecs7.Button,
4015
+ )), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, !this.streamData.isLive && /* @__PURE__ */ import_react_ecs6.default.createElement(
4016
+ import_react_ecs6.Button,
4107
4017
  {
4108
4018
  uiTransform: { width: this.s(110), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
4109
4019
  uiBackground: { color: this.streamControlling ? C2.btn : C2.green },
@@ -4112,8 +4022,8 @@ var AdminPanelUIModule = class {
4112
4022
  color: C2.text,
4113
4023
  onMouseDown: () => this.startStream()
4114
4024
  }
4115
- ), this.streamData.isLive && /* @__PURE__ */ import_react_ecs7.default.createElement(
4116
- import_react_ecs7.Button,
4025
+ ), this.streamData.isLive && /* @__PURE__ */ import_react_ecs6.default.createElement(
4026
+ import_react_ecs6.Button,
4117
4027
  {
4118
4028
  uiTransform: { width: this.s(110), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
4119
4029
  uiBackground: { color: this.streamControlling ? C2.btn : C2.red },
@@ -4122,8 +4032,8 @@ var AdminPanelUIModule = class {
4122
4032
  color: C2.text,
4123
4033
  onMouseDown: () => this.stopStream()
4124
4034
  }
4125
- ), this.streamData.isLive && (this.streamData.hlsUrl || this.streamData.locked === true) && /* @__PURE__ */ import_react_ecs7.default.createElement(
4126
- import_react_ecs7.Button,
4035
+ ), this.streamData.isLive && (this.streamData.hlsUrl || this.streamData.locked === true) && /* @__PURE__ */ import_react_ecs6.default.createElement(
4036
+ import_react_ecs6.Button,
4127
4037
  {
4128
4038
  uiTransform: { width: this.s(100), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
4129
4039
  uiBackground: { color: C2.cyan },
@@ -4132,8 +4042,8 @@ var AdminPanelUIModule = class {
4132
4042
  color: C2.text,
4133
4043
  onMouseDown: () => this.playStreamOnScreen()
4134
4044
  }
4135
- )), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(
4136
- import_react_ecs7.Button,
4045
+ )), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 6 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(
4046
+ import_react_ecs6.Button,
4137
4047
  {
4138
4048
  uiTransform: { width: this.s(80), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
4139
4049
  uiBackground: { color: C2.btn },
@@ -4142,8 +4052,8 @@ var AdminPanelUIModule = class {
4142
4052
  color: C2.text,
4143
4053
  onMouseDown: () => this.refreshStreamStatus()
4144
4054
  }
4145
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(
4146
- import_react_ecs7.Button,
4055
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(
4056
+ import_react_ecs6.Button,
4147
4057
  {
4148
4058
  uiTransform: { width: this.s(95), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
4149
4059
  uiBackground: { color: this.keyRotating ? C2.btn : C2.yellow },
@@ -4152,8 +4062,8 @@ var AdminPanelUIModule = class {
4152
4062
  color: C2.text,
4153
4063
  onMouseDown: () => this.rotateStreamKey()
4154
4064
  }
4155
- ), !this.streamData.isLive && !this.channelDeleteLook && /* @__PURE__ */ import_react_ecs7.default.createElement(
4156
- import_react_ecs7.Button,
4065
+ ), !this.streamData.isLive && !this.channelDeleteLook && /* @__PURE__ */ import_react_ecs6.default.createElement(
4066
+ import_react_ecs6.Button,
4157
4067
  {
4158
4068
  uiTransform: { width: this.s(70), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
4159
4069
  uiBackground: { color: this.channelDeleting ? C2.btn : C2.red },
@@ -4162,8 +4072,8 @@ var AdminPanelUIModule = class {
4162
4072
  color: C2.text,
4163
4073
  onMouseDown: () => this.deleteChannel()
4164
4074
  }
4165
- )), !this.streamData.isLive && this.channelDeleteLook && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 6 }, padding: 6 }, uiBackground: { color: C2.section } }, /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "DELETE THIS CHANNEL?", fontSize: t.labelSmall, color: C2.red, uiTransform: { height: this.s(18) } }), channelDeleteLines(this.channelDeleteLook, this.channelDeleteChanged).map((line, i) => /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { key: `delete-line-${i}`, value: line, fontSize: t.status, color: line.startsWith("WHAT") ? C2.yellow : C2.text, uiTransform: { height: this.s(18) } })), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "row", margin: { top: 4 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(
4166
- import_react_ecs7.Button,
4075
+ )), !this.streamData.isLive && this.channelDeleteLook && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 6 }, padding: 6 }, uiBackground: { color: C2.section } }, /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "DELETE THIS CHANNEL?", fontSize: t.labelSmall, color: C2.red, uiTransform: { height: this.s(18) } }), channelDeleteLines(this.channelDeleteLook, this.channelDeleteChanged).map((line, i) => /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { key: `delete-line-${i}`, value: line, fontSize: t.status, color: line.startsWith("WHAT") ? C2.yellow : C2.text, uiTransform: { height: this.s(18) } })), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "row", margin: { top: 4 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(
4076
+ import_react_ecs6.Button,
4167
4077
  {
4168
4078
  uiTransform: { width: this.s(120), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
4169
4079
  uiBackground: { color: this.channelDeleting ? C2.btn : C2.red },
@@ -4172,8 +4082,8 @@ var AdminPanelUIModule = class {
4172
4082
  color: C2.text,
4173
4083
  onMouseDown: () => this.confirmDeleteChannel()
4174
4084
  }
4175
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(
4176
- import_react_ecs7.Button,
4085
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(
4086
+ import_react_ecs6.Button,
4177
4087
  {
4178
4088
  uiTransform: { width: this.s(70), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
4179
4089
  uiBackground: { color: C2.btn },
@@ -4182,8 +4092,8 @@ var AdminPanelUIModule = class {
4182
4092
  color: C2.text,
4183
4093
  onMouseDown: () => this.cancelDeleteChannel()
4184
4094
  }
4185
- ))), this.streamControlStatus === "started" && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "Stream started - begin broadcasting in OBS", fontSize: t.status, color: C2.green }), this.streamControlStatus === "stopped" && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "Stream stopped", fontSize: t.status, color: C2.textDim }), this.keyRotateStatus === "success" && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "Key rotated! Update OBS", fontSize: t.status, color: C2.green }), this.keyRotateStatus === "error" && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "Failed to rotate key", fontSize: t.status, color: C2.red }), this.channelDeleteError && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: this.channelDeleteError, fontSize: t.status, color: C2.red }), this.streamControlStatus === "error" && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "Stream control failed", fontSize: t.status, color: C2.red })), /* @__PURE__ */ import_react_ecs7.default.createElement(this.SectionHead, { label: "PLAY NOW", color: C2.orange }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(
4186
- import_react_ecs7.Input,
4095
+ ))), this.streamControlStatus === "started" && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "Stream started - begin broadcasting in OBS", fontSize: t.status, color: C2.green }), this.streamControlStatus === "stopped" && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "Stream stopped", fontSize: t.status, color: C2.textDim }), this.keyRotateStatus === "success" && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "Key rotated! Update OBS", fontSize: t.status, color: C2.green }), this.keyRotateStatus === "error" && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "Failed to rotate key", fontSize: t.status, color: C2.red }), this.channelDeleteError && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: this.channelDeleteError, fontSize: t.status, color: C2.red }), this.streamControlStatus === "error" && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "Stream control failed", fontSize: t.status, color: C2.red })), /* @__PURE__ */ import_react_ecs6.default.createElement(this.SectionHead, { label: "PLAY NOW", color: C2.orange }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(
4096
+ import_react_ecs6.Input,
4187
4097
  {
4188
4098
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
4189
4099
  uiBackground: { color: import_math7.Color4.create(0.15, 0.15, 0.2, 1) },
@@ -4196,8 +4106,8 @@ var AdminPanelUIModule = class {
4196
4106
  this.customVideoUrl = val;
4197
4107
  }
4198
4108
  }
4199
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(
4200
- import_react_ecs7.Button,
4109
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(
4110
+ import_react_ecs6.Button,
4201
4111
  {
4202
4112
  uiTransform: { width: this.s(75), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
4203
4113
  uiBackground: { color: C2.green },
@@ -4206,8 +4116,8 @@ var AdminPanelUIModule = class {
4206
4116
  color: C2.text,
4207
4117
  onMouseDown: () => this.playNow()
4208
4118
  }
4209
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(
4210
- import_react_ecs7.Button,
4119
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(
4120
+ import_react_ecs6.Button,
4211
4121
  {
4212
4122
  uiTransform: { width: this.s(65), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 6 } },
4213
4123
  uiBackground: { color: C2.btn },
@@ -4218,16 +4128,16 @@ var AdminPanelUIModule = class {
4218
4128
  this.customVideoUrl = "";
4219
4129
  }
4220
4130
  }
4221
- )), this.videoStatus && /* @__PURE__ */ import_react_ecs7.default.createElement(
4222
- import_react_ecs7.Label,
4131
+ )), this.videoStatus && /* @__PURE__ */ import_react_ecs6.default.createElement(
4132
+ import_react_ecs6.Label,
4223
4133
  {
4224
4134
  value: this.videoStatus,
4225
4135
  fontSize: t.status,
4226
4136
  color: this.videoStatus.startsWith("Not sent") || this.videoStatus === LOCKED_LINE || this.videoStatus === UNAVAILABLE_LINE ? C2.red : C2.green,
4227
4137
  uiTransform: { height: this.s(18), margin: { bottom: 6 } }
4228
4138
  }
4229
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(this.SectionHead, { label: "PLAYBACK", color: C2.green }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(
4230
- import_react_ecs7.Button,
4139
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(this.SectionHead, { label: "PLAYBACK", color: C2.green }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(
4140
+ import_react_ecs6.Button,
4231
4141
  {
4232
4142
  uiTransform: { width: this.s(75), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
4233
4143
  uiBackground: { color: C2.green },
@@ -4236,8 +4146,8 @@ var AdminPanelUIModule = class {
4236
4146
  color: C2.text,
4237
4147
  onMouseDown: () => this.playbackPlay()
4238
4148
  }
4239
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(
4240
- import_react_ecs7.Button,
4149
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(
4150
+ import_react_ecs6.Button,
4241
4151
  {
4242
4152
  uiTransform: { width: this.s(75), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
4243
4153
  uiBackground: { color: C2.red },
@@ -4246,8 +4156,8 @@ var AdminPanelUIModule = class {
4246
4156
  color: C2.text,
4247
4157
  onMouseDown: () => this.playbackStop()
4248
4158
  }
4249
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(
4250
- import_react_ecs7.Button,
4159
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(
4160
+ import_react_ecs6.Button,
4251
4161
  {
4252
4162
  uiTransform: { width: this.s(100), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
4253
4163
  uiBackground: { color: C2.btn },
@@ -4256,8 +4166,8 @@ var AdminPanelUIModule = class {
4256
4166
  color: C2.text,
4257
4167
  onMouseDown: () => this.resetDefault()
4258
4168
  }
4259
- )), /* @__PURE__ */ import_react_ecs7.default.createElement(this.SectionHead, { label: "VIDEO SLOTS", color: C2.cyan }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 10 } } }, ["slot1", "slot2", "slot3", "slot4", "slot5"].map((slot, i) => /* @__PURE__ */ import_react_ecs7.default.createElement(
4260
- import_react_ecs7.Button,
4169
+ )), /* @__PURE__ */ import_react_ecs6.default.createElement(this.SectionHead, { label: "VIDEO SLOTS", color: C2.cyan }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 10 } } }, ["slot1", "slot2", "slot3", "slot4", "slot5"].map((slot, i) => /* @__PURE__ */ import_react_ecs6.default.createElement(
4170
+ import_react_ecs6.Button,
4261
4171
  {
4262
4172
  key: `play-${slot}`,
4263
4173
  uiTransform: { width: this.s(70), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4267,8 +4177,8 @@ var AdminPanelUIModule = class {
4267
4177
  color: C2.text,
4268
4178
  onMouseDown: () => this.pressSlot(slot)
4269
4179
  }
4270
- ))), /* @__PURE__ */ import_react_ecs7.default.createElement(
4271
- import_react_ecs7.Button,
4180
+ ))), /* @__PURE__ */ import_react_ecs6.default.createElement(
4181
+ import_react_ecs6.Button,
4272
4182
  {
4273
4183
  uiTransform: { height: this.s(24) },
4274
4184
  uiBackground: { color: import_math7.Color4.create(0, 0, 0, 0) },
@@ -4281,16 +4191,16 @@ var AdminPanelUIModule = class {
4281
4191
  };
4282
4192
  this.ModTab = () => {
4283
4193
  const t = this.theme;
4284
- return /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, this.modStatus === "loading" && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "Loading...", fontSize: t.status, color: C2.yellow }), this.modStatus === "saved" && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "Saved!", fontSize: t.status, color: C2.green }), this.modStatus === "error" && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "Error - check input", fontSize: t.status, color: C2.red }), this.kickStatus && /* @__PURE__ */ import_react_ecs7.default.createElement(
4285
- import_react_ecs7.Label,
4194
+ return /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column", width: "100%", padding: 10 } }, this.modStatus === "loading" && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "Loading...", fontSize: t.status, color: C2.yellow }), this.modStatus === "saved" && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "Saved!", fontSize: t.status, color: C2.green }), this.modStatus === "error" && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "Error - check input", fontSize: t.status, color: C2.red }), this.kickStatus && /* @__PURE__ */ import_react_ecs6.default.createElement(
4195
+ import_react_ecs6.Label,
4286
4196
  {
4287
4197
  value: this.kickStatus,
4288
4198
  fontSize: t.status,
4289
4199
  color: this.kickStatus.startsWith("Kick not sent") ? C2.red : C2.green,
4290
4200
  uiTransform: { height: this.s(18) }
4291
4201
  }
4292
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(this.SectionHead, { label: "BROADCAST", color: C2.orange }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(
4293
- import_react_ecs7.Input,
4202
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(this.SectionHead, { label: "BROADCAST", color: C2.orange }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(
4203
+ import_react_ecs6.Input,
4294
4204
  {
4295
4205
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
4296
4206
  uiBackground: { color: import_math7.Color4.create(0.15, 0.15, 0.2, 1) },
@@ -4303,8 +4213,8 @@ var AdminPanelUIModule = class {
4303
4213
  this.broadcastText = val;
4304
4214
  }
4305
4215
  }
4306
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(
4307
- import_react_ecs7.Button,
4216
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(
4217
+ import_react_ecs6.Button,
4308
4218
  {
4309
4219
  uiTransform: { width: this.s(65), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
4310
4220
  uiBackground: { color: C2.orange },
@@ -4313,16 +4223,16 @@ var AdminPanelUIModule = class {
4313
4223
  color: C2.text,
4314
4224
  onMouseDown: () => this.sendBroadcast()
4315
4225
  }
4316
- )), this.broadcastStatus && /* @__PURE__ */ import_react_ecs7.default.createElement(
4317
- import_react_ecs7.Label,
4226
+ )), this.broadcastStatus && /* @__PURE__ */ import_react_ecs6.default.createElement(
4227
+ import_react_ecs6.Label,
4318
4228
  {
4319
4229
  value: this.broadcastStatus,
4320
4230
  fontSize: t.status,
4321
4231
  color: this.broadcastStatus.startsWith("Not sent") ? C2.red : C2.green,
4322
4232
  uiTransform: { height: this.s(18), margin: { bottom: 6 } }
4323
4233
  }
4324
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(this.SectionHead, { label: "CHAOS MODE", color: C2.red }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(
4325
- import_react_ecs7.Button,
4234
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(this.SectionHead, { label: "CHAOS MODE", color: C2.red }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(
4235
+ import_react_ecs6.Button,
4326
4236
  {
4327
4237
  uiTransform: { width: this.s(130), height: this.s(UI_DIMENSIONS.admin.buttonHeight), margin: 4 },
4328
4238
  uiBackground: { color: C2.red },
@@ -4331,8 +4241,8 @@ var AdminPanelUIModule = class {
4331
4241
  color: C2.text,
4332
4242
  onMouseDown: () => this.kickAll()
4333
4243
  }
4334
- )), this.venue && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(this.SectionHead, { label: "PRIVATE MODE", color: C2.yellow }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "While ON, only citizens get in", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { height: this.s(18), margin: { bottom: 4 } } }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap" } }, [true, false].map((on) => /* @__PURE__ */ import_react_ecs7.default.createElement(
4335
- import_react_ecs7.Button,
4244
+ )), this.venue && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(this.SectionHead, { label: "PRIVATE MODE", color: C2.yellow }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "While ON, only citizens get in", fontSize: t.labelSmall, color: C2.textDim, uiTransform: { height: this.s(18), margin: { bottom: 4 } } }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "row", flexWrap: "wrap" } }, [true, false].map((on) => /* @__PURE__ */ import_react_ecs6.default.createElement(
4245
+ import_react_ecs6.Button,
4336
4246
  {
4337
4247
  key: `private-${on ? "on" : "off"}`,
4338
4248
  uiTransform: { width: this.s(70), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4 },
@@ -4342,22 +4252,22 @@ var AdminPanelUIModule = class {
4342
4252
  color: this.privateModeOn === on ? import_math7.Color4.Black() : C2.text,
4343
4253
  onMouseDown: () => this.setPrivateMode(on)
4344
4254
  }
4345
- ))), this.privateStatus && /* @__PURE__ */ import_react_ecs7.default.createElement(
4346
- import_react_ecs7.Label,
4255
+ ))), this.privateStatus && /* @__PURE__ */ import_react_ecs6.default.createElement(
4256
+ import_react_ecs6.Label,
4347
4257
  {
4348
4258
  value: this.privateStatus,
4349
4259
  fontSize: t.status,
4350
4260
  color: this.privateStatus.startsWith("Not sent") ? C2.red : C2.green,
4351
4261
  uiTransform: { height: this.s(18) }
4352
4262
  }
4353
- )), /* @__PURE__ */ import_react_ecs7.default.createElement(this.SectionHead, { label: "SCENE ADMINS", color: C2.purple }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, this.sceneAdmins.length === 0 && this.modStatus !== "loading" && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "No scene admins", fontSize: t.labelSmall, color: C2.textDim }), this.sceneAdmins.map((wallet, i) => /* @__PURE__ */ import_react_ecs7.default.createElement(
4354
- import_react_ecs7.UiEntity,
4263
+ )), /* @__PURE__ */ import_react_ecs6.default.createElement(this.SectionHead, { label: "SCENE ADMINS", color: C2.purple }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, this.sceneAdmins.length === 0 && this.modStatus !== "loading" && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "No scene admins", fontSize: t.labelSmall, color: C2.textDim }), this.sceneAdmins.map((wallet, i) => /* @__PURE__ */ import_react_ecs6.default.createElement(
4264
+ import_react_ecs6.UiEntity,
4355
4265
  {
4356
4266
  key: `admin-${i}`,
4357
4267
  uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 5 }, width: "100%" }
4358
4268
  },
4359
- /* @__PURE__ */ import_react_ecs7.default.createElement(
4360
- import_react_ecs7.Label,
4269
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
4270
+ import_react_ecs6.Label,
4361
4271
  {
4362
4272
  value: `${wallet.slice(0, 6)}...${wallet.slice(-4)}`,
4363
4273
  fontSize: t.label,
@@ -4365,8 +4275,8 @@ var AdminPanelUIModule = class {
4365
4275
  uiTransform: { width: this.s(130) }
4366
4276
  }
4367
4277
  ),
4368
- /* @__PURE__ */ import_react_ecs7.default.createElement(
4369
- import_react_ecs7.Button,
4278
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
4279
+ import_react_ecs6.Button,
4370
4280
  {
4371
4281
  uiTransform: { width: this.s(70), height: this.s(28), margin: { left: 8 } },
4372
4282
  uiBackground: { color: C2.btn },
@@ -4376,8 +4286,8 @@ var AdminPanelUIModule = class {
4376
4286
  onMouseDown: () => this.removeSceneAdmin(wallet)
4377
4287
  }
4378
4288
  )
4379
- ))), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(
4380
- import_react_ecs7.Input,
4289
+ ))), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 14 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(
4290
+ import_react_ecs6.Input,
4381
4291
  {
4382
4292
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
4383
4293
  uiBackground: { color: import_math7.Color4.create(0.15, 0.15, 0.2, 1) },
@@ -4390,8 +4300,8 @@ var AdminPanelUIModule = class {
4390
4300
  this.newAdminWallet = val;
4391
4301
  }
4392
4302
  }
4393
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(
4394
- import_react_ecs7.Button,
4303
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(
4304
+ import_react_ecs6.Button,
4395
4305
  {
4396
4306
  uiTransform: { width: this.s(60), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
4397
4307
  uiBackground: { color: C2.purple },
@@ -4402,14 +4312,14 @@ var AdminPanelUIModule = class {
4402
4312
  if (this.newAdminWallet) this.addSceneAdmin(this.newAdminWallet);
4403
4313
  }
4404
4314
  }
4405
- )), /* @__PURE__ */ import_react_ecs7.default.createElement(this.SectionHead, { label: "BANNED WALLETS", color: C2.red }), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, this.bannedWallets.length === 0 && this.modStatus !== "loading" && /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: "No banned wallets", fontSize: t.labelSmall, color: C2.textDim }), this.bannedWallets.map((wallet, i) => /* @__PURE__ */ import_react_ecs7.default.createElement(
4406
- import_react_ecs7.UiEntity,
4315
+ )), /* @__PURE__ */ import_react_ecs6.default.createElement(this.SectionHead, { label: "BANNED WALLETS", color: C2.red }), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "column", margin: { bottom: 6 } } }, this.bannedWallets.length === 0 && this.modStatus !== "loading" && /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: "No banned wallets", fontSize: t.labelSmall, color: C2.textDim }), this.bannedWallets.map((wallet, i) => /* @__PURE__ */ import_react_ecs6.default.createElement(
4316
+ import_react_ecs6.UiEntity,
4407
4317
  {
4408
4318
  key: `ban-${i}`,
4409
4319
  uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 5 }, width: "100%" }
4410
4320
  },
4411
- /* @__PURE__ */ import_react_ecs7.default.createElement(
4412
- import_react_ecs7.Label,
4321
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
4322
+ import_react_ecs6.Label,
4413
4323
  {
4414
4324
  value: `${wallet.slice(0, 6)}...${wallet.slice(-4)}`,
4415
4325
  fontSize: t.label,
@@ -4417,8 +4327,8 @@ var AdminPanelUIModule = class {
4417
4327
  uiTransform: { width: this.s(130) }
4418
4328
  }
4419
4329
  ),
4420
- /* @__PURE__ */ import_react_ecs7.default.createElement(
4421
- import_react_ecs7.Button,
4330
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
4331
+ import_react_ecs6.Button,
4422
4332
  {
4423
4333
  uiTransform: { width: this.s(70), height: this.s(28), margin: { left: 8 } },
4424
4334
  uiBackground: { color: C2.green },
@@ -4428,8 +4338,8 @@ var AdminPanelUIModule = class {
4428
4338
  onMouseDown: () => this.unbanWallet(wallet)
4429
4339
  }
4430
4340
  )
4431
- ))), /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 10 } } }, /* @__PURE__ */ import_react_ecs7.default.createElement(
4432
- import_react_ecs7.Input,
4341
+ ))), /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { flexDirection: "row", alignItems: "center", margin: { bottom: 10 } } }, /* @__PURE__ */ import_react_ecs6.default.createElement(
4342
+ import_react_ecs6.Input,
4433
4343
  {
4434
4344
  uiTransform: { width: this.s(230), height: this.s(UI_DIMENSIONS.admin.inputHeight) },
4435
4345
  uiBackground: { color: import_math7.Color4.create(0.15, 0.15, 0.2, 1) },
@@ -4442,8 +4352,8 @@ var AdminPanelUIModule = class {
4442
4352
  this.newBanWallet = val;
4443
4353
  }
4444
4354
  }
4445
- ), /* @__PURE__ */ import_react_ecs7.default.createElement(
4446
- import_react_ecs7.Button,
4355
+ ), /* @__PURE__ */ import_react_ecs6.default.createElement(
4356
+ import_react_ecs6.Button,
4447
4357
  {
4448
4358
  uiTransform: { width: this.s(60), height: this.s(UI_DIMENSIONS.admin.inputHeight), margin: { left: 8 } },
4449
4359
  uiBackground: { color: C2.red },
@@ -4454,8 +4364,8 @@ var AdminPanelUIModule = class {
4454
4364
  if (this.newBanWallet) this.banWallet(this.newBanWallet);
4455
4365
  }
4456
4366
  }
4457
- )), /* @__PURE__ */ import_react_ecs7.default.createElement(
4458
- import_react_ecs7.Button,
4367
+ )), /* @__PURE__ */ import_react_ecs6.default.createElement(
4368
+ import_react_ecs6.Button,
4459
4369
  {
4460
4370
  uiTransform: { height: this.s(24) },
4461
4371
  uiBackground: { color: import_math7.Color4.create(0, 0, 0, 0) },
@@ -4501,8 +4411,8 @@ var AdminPanelUIModule = class {
4501
4411
  if (!tabs.find((tab) => tab.id === this.activeTab) && tabs.length > 0) {
4502
4412
  this.activeTab = tabs[0].id;
4503
4413
  }
4504
- return /* @__PURE__ */ import_react_ecs7.default.createElement(
4505
- import_react_ecs7.UiEntity,
4414
+ return /* @__PURE__ */ import_react_ecs6.default.createElement(
4415
+ import_react_ecs6.UiEntity,
4506
4416
  {
4507
4417
  uiTransform: {
4508
4418
  width: "100%",
@@ -4511,8 +4421,11 @@ var AdminPanelUIModule = class {
4511
4421
  }
4512
4422
  },
4513
4423
  this.renderScaledNotification(),
4514
- this.client.isPhone ? toolbarButton(2, { children: [this.renderToggleFace()] }, true, this.client.uiScale) : /* @__PURE__ */ import_react_ecs7.default.createElement(
4515
- import_react_ecs7.UiEntity,
4424
+ this.client.isPhone || this.client.toolbarCollapsed ? this.client.toolbarButton(2, {
4425
+ uiBackground: { color: this.panelOpen ? C2.btn : C2.header },
4426
+ children: [this.renderToggleFace()]
4427
+ }) : /* @__PURE__ */ import_react_ecs6.default.createElement(
4428
+ import_react_ecs6.UiEntity,
4516
4429
  {
4517
4430
  uiTransform: {
4518
4431
  position: { right: 20 + this.s(100) + 10 + this.s(100) + 10, bottom: 10 },
@@ -4521,87 +4434,89 @@ var AdminPanelUIModule = class {
4521
4434
  },
4522
4435
  this.renderToggleFace()
4523
4436
  ),
4524
- this.panelOpen && /* @__PURE__ */ import_react_ecs7.default.createElement(
4525
- import_react_ecs7.UiEntity,
4526
- {
4527
- key: `admin-panel-${this.client.uiScale}`,
4528
- uiTransform: {
4529
- width: this.s(UI_DIMENSIONS.admin.width),
4530
- height: this.s(UI_DIMENSIONS.admin.height),
4531
- maxHeight: this.s(UI_DIMENSIONS.admin.maxHeight),
4532
- // On a phone, left of the toolbar's column (2.12.0); elsewhere left of the chat panel, as before
4533
- position: { right: this.client.panelRight(UI_DIMENSIONS.chat.right + this.s(UI_DIMENSIONS.chat.width) + 10), bottom: UI_DIMENSIONS.admin.bottom },
4534
- positionType: "absolute",
4535
- flexDirection: "column"
4536
- },
4537
- uiBackground: { color: C2.bg }
4437
+ this.panelOpen && this.client.toolbarPanel({
4438
+ key: `admin-panel-${this.client.uiScale}`,
4439
+ uiTransform: {
4440
+ width: this.s(UI_DIMENSIONS.admin.width),
4441
+ height: this.s(UI_DIMENSIONS.admin.height),
4442
+ maxHeight: this.s(UI_DIMENSIONS.admin.maxHeight),
4443
+ position: { right: UI_DIMENSIONS.chat.right + this.s(UI_DIMENSIONS.chat.width) + 10, bottom: UI_DIMENSIONS.admin.bottom },
4444
+ positionType: "absolute",
4445
+ flexDirection: "column"
4538
4446
  },
4539
- /* @__PURE__ */ import_react_ecs7.default.createElement(
4540
- import_react_ecs7.UiEntity,
4541
- {
4542
- uiTransform: {
4543
- width: "100%",
4544
- height: this.s(UI_DIMENSIONS.admin.headerHeight),
4545
- justifyContent: "space-between",
4546
- alignItems: "center",
4547
- flexDirection: "row",
4548
- padding: { left: 12, right: 8 }
4447
+ uiBackground: { color: C2.bg },
4448
+ children: [
4449
+ // Header with font controls
4450
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
4451
+ import_react_ecs6.UiEntity,
4452
+ {
4453
+ uiTransform: {
4454
+ width: "100%",
4455
+ height: this.s(UI_DIMENSIONS.admin.headerHeight),
4456
+ justifyContent: "space-between",
4457
+ alignItems: "center",
4458
+ flexDirection: "row",
4459
+ padding: { left: 12, right: 8 }
4460
+ },
4461
+ uiBackground: { color: C2.header }
4549
4462
  },
4550
- uiBackground: { color: C2.header }
4551
- },
4552
- /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.Label, { value: this.config.title || "ADMIN PANEL", fontSize: t.header, color: C2.text }),
4553
- /* @__PURE__ */ import_react_ecs7.default.createElement(
4554
- import_react_ecs7.Button,
4463
+ /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.Label, { value: this.config.title || "ADMIN PANEL", fontSize: t.header, color: C2.text }),
4464
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
4465
+ import_react_ecs6.Button,
4466
+ {
4467
+ uiTransform: { width: this.s(28), height: this.s(28) },
4468
+ uiBackground: { color: import_math7.Color4.create(0, 0, 0, 0.3) },
4469
+ value: "X",
4470
+ fontSize: t.header,
4471
+ color: THEME.colors.red,
4472
+ onMouseDown: () => this.hide()
4473
+ }
4474
+ )
4475
+ ),
4476
+ // Tabs
4477
+ /* @__PURE__ */ import_react_ecs6.default.createElement(import_react_ecs6.UiEntity, { uiTransform: { width: "100%", height: this.s(UI_DIMENSIONS.admin.tabHeight), flexDirection: "row" } }, tabs.map((tab) => /* @__PURE__ */ import_react_ecs6.default.createElement(this.TabBtn, { label: tab.label, tab: tab.id }))),
4478
+ // Content
4479
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
4480
+ import_react_ecs6.UiEntity,
4555
4481
  {
4556
- uiTransform: { width: this.s(28), height: this.s(28) },
4557
- uiBackground: { color: import_math7.Color4.create(0, 0, 0, 0.3) },
4558
- value: "X",
4559
- fontSize: t.header,
4560
- color: THEME.colors.red,
4561
- onMouseDown: () => this.hide()
4562
- }
4563
- )
4564
- ),
4565
- /* @__PURE__ */ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { width: "100%", height: this.s(UI_DIMENSIONS.admin.tabHeight), flexDirection: "row" } }, tabs.map((tab) => /* @__PURE__ */ import_react_ecs7.default.createElement(this.TabBtn, { label: tab.label, tab: tab.id }))),
4566
- /* @__PURE__ */ import_react_ecs7.default.createElement(
4567
- import_react_ecs7.UiEntity,
4568
- {
4569
- uiTransform: {
4570
- width: "100%",
4571
- flexGrow: 1,
4572
- overflow: "scroll",
4573
- flexDirection: "column"
4574
- }
4575
- },
4576
- this.activeTab === "controls" && this.venue && this.controls.length > 0 && /* @__PURE__ */ import_react_ecs7.default.createElement(this.ControlsTab, null),
4577
- this.activeTab === "video" && /* @__PURE__ */ import_react_ecs7.default.createElement(this.VideoTab, null),
4578
- this.activeTab === "mod" && this.isOwner && /* @__PURE__ */ import_react_ecs7.default.createElement(this.ModTab, null),
4579
- this.config.sceneTabs?.map((tab) => this.activeTab === tab.id && tab.render())
4580
- ),
4581
- /* @__PURE__ */ import_react_ecs7.default.createElement(
4582
- import_react_ecs7.UiEntity,
4583
- {
4584
- uiTransform: {
4585
- width: "100%",
4586
- height: this.s(UI_DIMENSIONS.admin.footerHeight),
4587
- justifyContent: "center",
4588
- alignItems: "center"
4482
+ uiTransform: {
4483
+ width: "100%",
4484
+ flexGrow: 1,
4485
+ overflow: "scroll",
4486
+ flexDirection: "column"
4487
+ }
4589
4488
  },
4590
- uiBackground: { color: C2.section }
4591
- },
4592
- /* @__PURE__ */ import_react_ecs7.default.createElement(
4593
- import_react_ecs7.Button,
4489
+ this.activeTab === "controls" && this.venue && this.controls.length > 0 && /* @__PURE__ */ import_react_ecs6.default.createElement(this.ControlsTab, null),
4490
+ this.activeTab === "video" && /* @__PURE__ */ import_react_ecs6.default.createElement(this.VideoTab, null),
4491
+ this.activeTab === "mod" && this.isOwner && /* @__PURE__ */ import_react_ecs6.default.createElement(this.ModTab, null),
4492
+ this.config.sceneTabs?.map((tab) => this.activeTab === tab.id && tab.render())
4493
+ ),
4494
+ // Footer
4495
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
4496
+ import_react_ecs6.UiEntity,
4594
4497
  {
4595
- uiTransform: { height: this.s(24) },
4596
- uiBackground: { color: import_math7.Color4.create(0, 0, 0, 0) },
4597
- value: `thestatic.tv/scene/${this.config.sceneId}`,
4598
- fontSize: t.labelSmall,
4599
- color: C2.cyan,
4600
- onMouseDown: () => (0, import_RestrictedActions6.openExternalUrl)({ url: this.config.footerLink || `https://thestatic.tv/scene/${this.config.sceneId}` })
4601
- }
4498
+ uiTransform: {
4499
+ width: "100%",
4500
+ height: this.s(UI_DIMENSIONS.admin.footerHeight),
4501
+ justifyContent: "center",
4502
+ alignItems: "center"
4503
+ },
4504
+ uiBackground: { color: C2.section }
4505
+ },
4506
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
4507
+ import_react_ecs6.Button,
4508
+ {
4509
+ uiTransform: { height: this.s(24) },
4510
+ uiBackground: { color: import_math7.Color4.create(0, 0, 0, 0) },
4511
+ value: `thestatic.tv/scene/${this.config.sceneId}`,
4512
+ fontSize: t.labelSmall,
4513
+ color: C2.cyan,
4514
+ onMouseDown: () => (0, import_RestrictedActions6.openExternalUrl)({ url: this.config.footerLink || `https://thestatic.tv/scene/${this.config.sceneId}` })
4515
+ }
4516
+ )
4602
4517
  )
4603
- )
4604
- )
4518
+ ]
4519
+ })
4605
4520
  );
4606
4521
  };
4607
4522
  this.client = client;
@@ -5757,8 +5672,8 @@ var AdminPanelUIModule = class {
5757
5672
  /** A control's button (2026-11-18): the option's label, highlighted while that option is current on this copy */
5758
5673
  controlButton(control, option, label) {
5759
5674
  const current = this.currentOption[control.id] === option;
5760
- return /* @__PURE__ */ import_react_ecs7.default.createElement(
5761
- import_react_ecs7.Button,
5675
+ return /* @__PURE__ */ import_react_ecs6.default.createElement(
5676
+ import_react_ecs6.Button,
5762
5677
  {
5763
5678
  key: `control-${control.id}-${option}`,
5764
5679
  uiTransform: { minWidth: this.s(70), height: this.s(UI_DIMENSIONS.admin.buttonHeightSmall), margin: 4, padding: { left: 10, right: 10 } },
@@ -5780,8 +5695,8 @@ var AdminPanelUIModule = class {
5780
5695
  if (!state.visible) return null;
5781
5696
  const N2 = UI_DIMENSIONS.notification;
5782
5697
  const colors = THEME.colors;
5783
- return /* @__PURE__ */ import_react_ecs7.default.createElement(
5784
- import_react_ecs7.UiEntity,
5698
+ return /* @__PURE__ */ import_react_ecs6.default.createElement(
5699
+ import_react_ecs6.UiEntity,
5785
5700
  {
5786
5701
  uiTransform: {
5787
5702
  positionType: "absolute",
@@ -5791,8 +5706,8 @@ var AdminPanelUIModule = class {
5791
5706
  alignItems: "center"
5792
5707
  }
5793
5708
  },
5794
- /* @__PURE__ */ import_react_ecs7.default.createElement(
5795
- import_react_ecs7.UiEntity,
5709
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
5710
+ import_react_ecs6.UiEntity,
5796
5711
  {
5797
5712
  uiTransform: {
5798
5713
  minWidth: this.s(200),
@@ -5804,15 +5719,15 @@ var AdminPanelUIModule = class {
5804
5719
  },
5805
5720
  uiBackground: { color: colors.panel }
5806
5721
  },
5807
- /* @__PURE__ */ import_react_ecs7.default.createElement(
5808
- import_react_ecs7.UiEntity,
5722
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
5723
+ import_react_ecs6.UiEntity,
5809
5724
  {
5810
5725
  uiTransform: { width: N2.borderWidth, height: "100%" },
5811
5726
  uiBackground: { color: colors.cyan }
5812
5727
  }
5813
5728
  ),
5814
- /* @__PURE__ */ import_react_ecs7.default.createElement(
5815
- import_react_ecs7.UiEntity,
5729
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
5730
+ import_react_ecs6.UiEntity,
5816
5731
  {
5817
5732
  uiTransform: {
5818
5733
  flexGrow: 1,
@@ -5822,8 +5737,8 @@ var AdminPanelUIModule = class {
5822
5737
  alignItems: "center"
5823
5738
  }
5824
5739
  },
5825
- /* @__PURE__ */ import_react_ecs7.default.createElement(
5826
- import_react_ecs7.Label,
5740
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
5741
+ import_react_ecs6.Label,
5827
5742
  {
5828
5743
  value: state.text,
5829
5744
  fontSize: this.s(N2.fontSize),
@@ -5832,8 +5747,8 @@ var AdminPanelUIModule = class {
5832
5747
  }
5833
5748
  )
5834
5749
  ),
5835
- /* @__PURE__ */ import_react_ecs7.default.createElement(
5836
- import_react_ecs7.UiEntity,
5750
+ /* @__PURE__ */ import_react_ecs6.default.createElement(
5751
+ import_react_ecs6.UiEntity,
5837
5752
  {
5838
5753
  uiTransform: { width: 5, height: 5, margin: { right: 10 } },
5839
5754
  uiBackground: { color: colors.cyan }
@@ -5844,8 +5759,8 @@ var AdminPanelUIModule = class {
5844
5759
  }
5845
5760
  /** The ADMIN / CLOSE button itself; its place is the row's or, on a phone, the column's (2.12.0) */
5846
5761
  renderToggleFace() {
5847
- return /* @__PURE__ */ import_react_ecs7.default.createElement(
5848
- import_react_ecs7.Button,
5762
+ return /* @__PURE__ */ import_react_ecs6.default.createElement(
5763
+ import_react_ecs6.Button,
5849
5764
  {
5850
5765
  uiTransform: { width: this.s(100), height: this.s(45) },
5851
5766
  uiBackground: { color: this.panelOpen ? C2.btn : C2.header },
@@ -5860,6 +5775,247 @@ var AdminPanelUIModule = class {
5860
5775
 
5861
5776
  // src/StaticTVClient.ts
5862
5777
  var import_Runtime2 = require("~system/Runtime");
5778
+
5779
+ // src/ui/toolbar.ts
5780
+ var TOOLBAR = { edge: 20, gap: 10, buttonWidth: 100, buttonHeight: 45, bottom: 10 };
5781
+ var COLUMN_SLOTS = 5;
5782
+ var PHONE_EDGE = 0;
5783
+ var HANDLE = 24;
5784
+ var STRIP = { phone: 12, desktop: 10 };
5785
+ function platformOf(answer) {
5786
+ const raw = answer?.platform;
5787
+ if (typeof raw !== "string") return "unknown";
5788
+ const p = raw.trim().toLowerCase();
5789
+ return p === "desktop" || p === "mobile" || p === "vr" || p === "web" ? p : "unknown";
5790
+ }
5791
+ function isPhonePlatform(platform) {
5792
+ return platform === "mobile";
5793
+ }
5794
+ var scaled = (value, uiScale) => Math.round(value * uiScale);
5795
+ function rowRight(slot, uiScale = 1) {
5796
+ return TOOLBAR.edge + slot * (scaled(TOOLBAR.buttonWidth, uiScale) + TOOLBAR.gap);
5797
+ }
5798
+ function columnSlot(slot, uiScale = 1) {
5799
+ const h = scaled(TOOLBAR.buttonHeight, uiScale);
5800
+ const handle = scaled(HANDLE, uiScale) + TOOLBAR.gap;
5801
+ return {
5802
+ right: PHONE_EDGE,
5803
+ boxHeight: handle + COLUMN_SLOTS * h + (COLUMN_SLOTS - 1) * TOOLBAR.gap,
5804
+ above: handle + Math.max(0, slot) * (h + TOOLBAR.gap)
5805
+ };
5806
+ }
5807
+ function handlePlace(phone, lastSlot, uiScale = 1) {
5808
+ if (phone) {
5809
+ return {
5810
+ right: PHONE_EDGE,
5811
+ width: scaled(TOOLBAR.buttonWidth, uiScale),
5812
+ height: scaled(HANDLE, uiScale),
5813
+ boxHeight: columnSlot(0, uiScale).boxHeight,
5814
+ above: 0
5815
+ };
5816
+ }
5817
+ return {
5818
+ right: rowRight(Math.max(0, lastSlot) + 1, uiScale),
5819
+ bottom: TOOLBAR.bottom,
5820
+ width: scaled(HANDLE, uiScale),
5821
+ height: scaled(TOOLBAR.buttonHeight, uiScale)
5822
+ };
5823
+ }
5824
+ function stripPlace(slot, phone, uiScale = 1) {
5825
+ if (phone) return { right: PHONE_EDGE, width: scaled(STRIP.phone, uiScale), height: scaled(TOOLBAR.buttonHeight, uiScale) };
5826
+ return { right: rowRight(slot, uiScale), bottom: 0, width: scaled(TOOLBAR.buttonWidth, uiScale), height: scaled(STRIP.desktop, uiScale) };
5827
+ }
5828
+ var ToolbarFold = class {
5829
+ constructor(closeAll) {
5830
+ this._collapsed = false;
5831
+ this._sceneLast = -1;
5832
+ this.closeAll = closeAll;
5833
+ }
5834
+ get collapsed() {
5835
+ return this._collapsed;
5836
+ }
5837
+ collapse() {
5838
+ if (this._collapsed) return;
5839
+ this.closeAll();
5840
+ this._collapsed = true;
5841
+ }
5842
+ expand() {
5843
+ this._collapsed = false;
5844
+ }
5845
+ /** A button was drawn in `slot` */
5846
+ seen(slot) {
5847
+ if (slot > this._sceneLast) this._sceneLast = slot;
5848
+ }
5849
+ /** The row's last slot: the SDK's own last (ADMIN's 2 when drawn, else GUIDE's 1) or a scene's, whichever is higher */
5850
+ lastSlot(sdkLast) {
5851
+ return Math.max(sdkLast, this._sceneLast);
5852
+ }
5853
+ };
5854
+ function panelRight(phone, desktopRight, uiScale = 1) {
5855
+ return phone ? PHONE_EDGE + scaled(TOOLBAR.buttonWidth, uiScale) + TOOLBAR.gap : desktopRight;
5856
+ }
5857
+ var DESKTOP_CLOSES = { guide: ["admin"], admin: ["guide"] };
5858
+ var GUIDE_PLACE = ["guide", "admin"];
5859
+ function panelsToClose(opened, registered, phone, coversGuide = []) {
5860
+ if (phone) return registered.filter((name) => name !== opened);
5861
+ const closes = [...DESKTOP_CLOSES[opened] ?? []];
5862
+ if (GUIDE_PLACE.includes(opened)) closes.push(...coversGuide);
5863
+ if (coversGuide.includes(opened)) closes.push(...GUIDE_PLACE);
5864
+ return registered.filter((name) => name !== opened && closes.includes(name));
5865
+ }
5866
+ var PanelRules = class {
5867
+ constructor(phone) {
5868
+ this.hides = /* @__PURE__ */ new Map();
5869
+ this.coveringGuide = /* @__PURE__ */ new Set();
5870
+ this.phone = phone;
5871
+ }
5872
+ /** Register (or replace) a panel; its hide runs when another panel opens and the rule says so */
5873
+ register(name, hide, options = {}) {
5874
+ this.hides.set(name, hide);
5875
+ if (options.coversGuide === true) this.coveringGuide.add(name);
5876
+ else this.coveringGuide.delete(name);
5877
+ }
5878
+ /** Close every registered panel (2.14.0, the toolbar collapsing). One failing hide does not stop the rest. */
5879
+ closeAll() {
5880
+ for (const hide of this.hides.values()) {
5881
+ try {
5882
+ hide();
5883
+ } catch {
5884
+ }
5885
+ }
5886
+ }
5887
+ /** A panel opened: close the ones the rule names. One failing hide does not stop the rest. */
5888
+ opened(name) {
5889
+ for (const other of panelsToClose(name, [...this.hides.keys()], this.phone(), [...this.coveringGuide])) {
5890
+ try {
5891
+ this.hides.get(other)?.();
5892
+ } catch {
5893
+ }
5894
+ }
5895
+ }
5896
+ get names() {
5897
+ return [...this.hides.keys()];
5898
+ }
5899
+ };
5900
+
5901
+ // src/ui/toolbar-button.ts
5902
+ var import_react_ecs7 = __toESM(require("@dcl/sdk/react-ecs"));
5903
+ function inColumn(width, boxHeight, above, right, entity) {
5904
+ return import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, {
5905
+ uiTransform: {
5906
+ positionType: "absolute",
5907
+ position: { right, top: 0 },
5908
+ width,
5909
+ height: "100%",
5910
+ flexDirection: "column",
5911
+ justifyContent: "center"
5912
+ },
5913
+ children: [
5914
+ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, {
5915
+ uiTransform: { width, height: boxHeight, flexDirection: "column", flexShrink: 0 },
5916
+ children: [
5917
+ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, { uiTransform: { width, height: above, flexShrink: 0 } }),
5918
+ entity
5919
+ ]
5920
+ })
5921
+ ]
5922
+ });
5923
+ }
5924
+ function toolbarButton(slot, props, phone, uiScale = 1, fold) {
5925
+ const width = Math.round(TOOLBAR.buttonWidth * uiScale);
5926
+ const height = Math.round(TOOLBAR.buttonHeight * uiScale);
5927
+ if (fold?.collapsed) {
5928
+ const strip = stripPlace(slot, phone, uiScale);
5929
+ const face = { uiBackground: props.uiBackground, onMouseDown: () => fold.expand() };
5930
+ if (!phone) {
5931
+ return import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, {
5932
+ ...face,
5933
+ uiTransform: {
5934
+ positionType: "absolute",
5935
+ position: { right: strip.right, bottom: strip.bottom },
5936
+ width: strip.width,
5937
+ height: strip.height
5938
+ }
5939
+ });
5940
+ }
5941
+ const place2 = columnSlot(slot, uiScale);
5942
+ return inColumn(strip.width, place2.boxHeight, place2.above, strip.right, import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, {
5943
+ ...face,
5944
+ uiTransform: { width: strip.width, height: strip.height, flexShrink: 0 }
5945
+ }));
5946
+ }
5947
+ if (!phone) {
5948
+ return import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, {
5949
+ ...props,
5950
+ uiTransform: {
5951
+ positionType: "absolute",
5952
+ position: { right: rowRight(slot, uiScale), bottom: TOOLBAR.bottom },
5953
+ width,
5954
+ height,
5955
+ ...props.uiTransform
5956
+ }
5957
+ });
5958
+ }
5959
+ const place = columnSlot(slot, uiScale);
5960
+ return inColumn(width, place.boxHeight, place.above, place.right, import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, {
5961
+ ...props,
5962
+ uiTransform: { width, height, flexShrink: 0, ...props.uiTransform }
5963
+ }));
5964
+ }
5965
+ function toolbarHandle(phone, lastSlot, collapse, uiScale = 1) {
5966
+ const place = handlePlace(phone, lastSlot, uiScale);
5967
+ const face = {
5968
+ uiBackground: { color: THEME.colors.buttonBackground },
5969
+ onMouseDown: collapse,
5970
+ children: [
5971
+ import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, {
5972
+ uiText: { value: ">", fontSize: Math.round(14 * uiScale), color: THEME.colors.gray, textAlign: "middle-center" }
5973
+ })
5974
+ ]
5975
+ };
5976
+ if (!phone) {
5977
+ return import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, {
5978
+ ...face,
5979
+ uiTransform: {
5980
+ positionType: "absolute",
5981
+ position: { right: place.right, bottom: place.bottom },
5982
+ width: place.width,
5983
+ height: place.height,
5984
+ justifyContent: "center",
5985
+ alignItems: "center"
5986
+ }
5987
+ });
5988
+ }
5989
+ return inColumn(place.width, place.boxHeight, place.above, place.right, import_react_ecs7.default.createElement(import_react_ecs7.UiEntity, {
5990
+ ...face,
5991
+ uiTransform: { width: place.width, height: place.height, flexShrink: 0, justifyContent: "center", alignItems: "center" }
5992
+ }));
5993
+ }
5994
+
5995
+ // src/ui/toolbar-panel.ts
5996
+ var import_react_ecs8 = __toESM(require("@dcl/sdk/react-ecs"));
5997
+ function toolbarPanel(props, phone, uiScale = 1) {
5998
+ if (!phone) return import_react_ecs8.default.createElement(import_react_ecs8.UiEntity, props);
5999
+ const { key, uiTransform = {}, ...rest } = props;
6000
+ const { position: _position, positionType: _positionType, ...ownLayout } = uiTransform;
6001
+ const spacer = () => import_react_ecs8.default.createElement(import_react_ecs8.UiEntity, { uiTransform: { height: 0, flexGrow: 1 } });
6002
+ return import_react_ecs8.default.createElement(import_react_ecs8.UiEntity, {
6003
+ key,
6004
+ uiTransform: {
6005
+ positionType: "absolute",
6006
+ position: { right: panelRight(true, 0, uiScale), top: 0 },
6007
+ height: "100%",
6008
+ flexDirection: "column"
6009
+ },
6010
+ children: [
6011
+ spacer(),
6012
+ import_react_ecs8.default.createElement(import_react_ecs8.UiEntity, { ...rest, uiTransform: { ...ownLayout, flexShrink: 0 } }),
6013
+ spacer()
6014
+ ]
6015
+ });
6016
+ }
6017
+
6018
+ // src/StaticTVClient.ts
5863
6019
  var import_ecs5 = require("@dcl/sdk/ecs");
5864
6020
  var utils = __toESM(require("@dcl-sdk/utils"));
5865
6021
  var DEFAULT_BASE_URL = "https://thestatic.tv/api/v1/dcl";
@@ -5933,6 +6089,8 @@ var _StaticTVClient = class _StaticTVClient {
5933
6089
  * scene's (registerPanel); elsewhere the guide and the admin panel close each other, as before.
5934
6090
  */
5935
6091
  this.panelRules = new PanelRules(() => this.isPhone);
6092
+ /** The toolbar collapsed to strips or not, for the visit (2.14.0): collapsing closes every panel first */
6093
+ this.fold = new ToolbarFold(() => this.panelRules.closeAll());
5936
6094
  // =============================================================================
5937
6095
  // --- VIDEO PLAYBACK (Internal handler for videoScreen) ---
5938
6096
  // =============================================================================
@@ -6866,7 +7024,8 @@ var _StaticTVClient = class _StaticTVClient {
6866
7024
  * placed its own by hand before), the column on a phone. Slots count from the right (the row) or the top (the
6867
7025
  * column): 0 is CHAT's, 1 GUIDE's, 2 ADMIN's (for a non-admin the scene's first button may take it), then the
6868
7026
  * scene's. `props` is the button's face - its uiBackground, onMouseDown and children - the slot gives its place and
6869
- * size (a width or height in props.uiTransform wins).
7027
+ * size (a width or height in props.uiTransform wins). Collapsed (2.14.0) it draws a strip in the face's uiBackground
7028
+ * color instead, flush on the edge, and a press on any strip expands the toolbar.
6870
7029
  *
6871
7030
  * @example
6872
7031
  * ```typescript
@@ -6879,26 +7038,72 @@ var _StaticTVClient = class _StaticTVClient {
6879
7038
  * ```
6880
7039
  */
6881
7040
  toolbarButton(slot, props) {
6882
- return toolbarButton(slot, props, this.isPhone, this.uiScale);
7041
+ this.fold.seen(slot);
7042
+ return toolbarButton(slot, props, this.isPhone, this.uiScale, {
7043
+ collapsed: this.fold.collapsed,
7044
+ expand: () => this.fold.expand()
7045
+ });
7046
+ }
7047
+ /**
7048
+ * The toolbar collapsed to strips (2.14.0, his ask: "small tabs out of users way"): the `>` handle collapses it and
7049
+ * closes every open panel, the scene's registered ones too; any strip expands it. For the visit only; it starts
7050
+ * expanded. A scene drawing its buttons through toolbarButton needs nothing more.
7051
+ */
7052
+ get toolbarCollapsed() {
7053
+ return this.fold.collapsed;
7054
+ }
7055
+ /**
7056
+ * The `>` handle, drawn by the SDK's chat (2.14.0): on a phone a bar on top of the column, on desktop a tab one slot
7057
+ * past the row's last button (ADMIN's or a scene's), so no button moves. Nothing while collapsed.
7058
+ * @internal
7059
+ */
7060
+ toolbarHandle() {
7061
+ if (this.fold.collapsed) return null;
7062
+ const sdkLast = this.adminPanel?.hasAccess === true ? 2 : 1;
7063
+ return toolbarHandle(this.isPhone, this.fold.lastSlot(sdkLast), () => this.fold.collapse(), this.uiScale);
6883
7064
  }
6884
- /** Where a scene's own panel's right edge goes: on a phone just left of the column; elsewhere `desktopRight` */
7065
+ /** Where a scene's own panel's right edge goes: on a phone one gap left of the column; elsewhere `desktopRight` */
6885
7066
  panelRight(desktopRight) {
6886
7067
  return panelRight(this.isPhone, desktopRight, this.uiScale);
6887
7068
  }
6888
7069
  /**
6889
- * Put one of the scene's own panels under the one-panel rule: on a phone, when another panel opens (the SDK's or the
6890
- * scene's), `hide` runs. The SDK's own names (guide, chat, admin) are taken. Call panelOpened(name) when it opens.
7070
+ * Draw one of the scene's own panels in its place (2.13.0): on desktop exactly as `props` say (their absolute
7071
+ * position included), on a phone centered on the screen's height one gap left of the toolbar's column, its top at
7072
+ * (canvas height - panel height) / 2 - or at the canvas's top when the panel is taller, so its header and close
7073
+ * button stay on screen. `props` is the panel's UiEntity props as on desktop: key, uiTransform, uiBackground,
7074
+ * children. The SDK's own chat, guide and admin panel draw through it.
7075
+ *
7076
+ * @example
7077
+ * ```typescript
7078
+ * myPanel.isOpen ? staticTV.toolbarPanel({
7079
+ * uiTransform: { positionType: 'absolute', position: { right: 20, bottom: 55 }, width: 380, height: 580 },
7080
+ * uiBackground: { color: Color4.create(0.05, 0.05, 0.08, 0.98) },
7081
+ * children: [header, body],
7082
+ * }) : null
7083
+ * ```
7084
+ */
7085
+ toolbarPanel(props) {
7086
+ return toolbarPanel(props, this.isPhone, this.uiScale);
7087
+ }
7088
+ /**
7089
+ * Put one of the scene's own panels under the panel rule: on a phone, when another panel opens (the SDK's or the
7090
+ * scene's), `hide` runs. On desktop (2.13.0), with `{ coversGuide: true }`, the panel and the guide's place close
7091
+ * each other: opening it closes the guide and the admin panel, and opening either runs `hide`; without it, the SDK
7092
+ * leaves the panel to the scene there. The SDK's own names (guide, chat, admin) are taken. Call panelOpened(name)
7093
+ * when it opens.
6891
7094
  */
6892
- registerPanel(name, hide) {
7095
+ registerPanel(name, hide, options = {}) {
6893
7096
  if (_StaticTVClient.OWN_PANELS.includes(name)) {
6894
7097
  this.log(`registerPanel: '${name}' is one of the SDK's own panels - pick another name`);
6895
7098
  return;
6896
7099
  }
6897
- this.panelRules.register(name, hide);
7100
+ this.panelRules.register(name, hide, options);
6898
7101
  }
6899
7102
  /**
6900
- * A panel opened: on a phone every other one closes, the SDK's and the scene's registered ones; elsewhere the guide
6901
- * and the admin panel close each other, as before, and a scene's own panel closes nothing here.
7103
+ * A panel opened: on a phone every other one closes, the SDK's and the scene's registered ones. Elsewhere a panel
7104
+ * closes any panel it would cover: the guide and the admin panel close each other, and each closes a scene's panel
7105
+ * registered with coversGuide, as that panel closes them (2.13.0); the chat stays open beside the guide or the admin
7106
+ * panel, and a scene's other panels are left to the scene.
6902
7107
  */
6903
7108
  panelOpened(name) {
6904
7109
  this.panelRules.opened(name);