@pepperdash/mobile-control-react-app-core 1.22.6-volume-hook-fix.3 → 1.22.6-volume-hook-fix.4

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.
@@ -3,135 +3,135 @@ var m2 = (e, t, o) => t in e ? w2(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var q = (e, t, o) => m2(e, typeof t != "symbol" ? t + "" : t, o);
4
4
  import M3, { AxiosError as p2 } from "axios";
5
5
  import { useDispatch as M2, useSelector as x2, Provider as Z2 } from "react-redux";
6
- import { createSelector as m, createSlice as u1, combineReducers as S2, configureStore as j2 } from "@reduxjs/toolkit";
7
- import x3, { createContext as C2, useEffect as O1, useCallback as r1, useContext as b2, useRef as $1, useMemo as n1, useState as Y, useLayoutEffect as Z3 } from "react";
6
+ import { createSelector as p, createSlice as u1, combineReducers as S2, configureStore as j2 } from "@reduxjs/toolkit";
7
+ import x3, { createContext as C2, useEffect as M1, useCallback as r1, useContext as b2, useRef as A1, useMemo as n1, useState as Y, useLayoutEffect as Z3 } from "react";
8
8
  import { useNavigate as y2, useRouteError as I2, isRouteErrorResponse as R2 } from "react-router-dom";
9
9
  import * as S3 from "lodash";
10
- const W1 = M2.withTypes(), f = x2.withTypes(), M1 = (e) => e.appConfig, E2 = m(
11
- M1,
10
+ const W1 = M2.withTypes(), w = x2.withTypes(), x1 = (e) => e.appConfig, E2 = p(
11
+ x1,
12
12
  (e) => e.config
13
- ), T2 = m(
14
- M1,
13
+ ), T2 = p(
14
+ x1,
15
15
  (e) => e.config.apiPath
16
- ), D2 = m(
17
- M1,
16
+ ), D2 = p(
17
+ x1,
18
18
  (e) => e.config.logoPath
19
- ), _2 = m(
20
- M1,
19
+ ), _2 = p(
20
+ x1,
21
21
  (e) => e.config.partnerMetadata
22
- ), X8 = () => f(E2), Q8 = () => f(T2), N8 = () => f(D2), e6 = () => f(_2), j3 = (e) => e.devices, C3 = m(
22
+ ), X8 = () => w(E2), Q8 = () => w(T2), N8 = () => w(D2), e6 = () => w(_2), j3 = (e) => e.devices, C3 = p(
23
23
  j3,
24
24
  (e) => e
25
- ), P2 = (e) => m(
25
+ ), P2 = (e) => p(
26
26
  j3,
27
27
  (t) => t[e] ? t[e] : void 0
28
- ), t6 = () => f(C3);
28
+ ), t6 = () => w(C3);
29
29
  function _(e) {
30
- return f(P2(e));
30
+ return w(P2(e));
31
31
  }
32
- const A = (e) => e.rooms, L2 = (e) => m(
32
+ const A = (e) => e.rooms, L2 = (e) => p(
33
33
  A,
34
34
  (t) => t[e] ? t[e].configuration : void 0
35
- ), $2 = m(
35
+ ), $2 = p(
36
36
  A,
37
37
  (e) => e
38
- ), A2 = (e) => m(
38
+ ), A2 = (e) => p(
39
39
  A,
40
40
  (t) => t[e] ? t[e] : void 0
41
- ), B2 = (e) => m(
41
+ ), B2 = (e) => p(
42
42
  A,
43
43
  (t) => t[e] ? t[e].name : void 0
44
- ), k2 = (e, t) => m(
44
+ ), k2 = (e, t) => p(
45
45
  A,
46
46
  (o) => o[e] ? o[e].volumes[t] : void 0
47
- ), O2 = (e) => m(
47
+ ), O2 = (e) => p(
48
48
  A,
49
49
  (t) => t[e] ? t[e] : void 0
50
- ), W2 = (e) => m(
50
+ ), W2 = (e) => p(
51
51
  A,
52
52
  (t) => {
53
53
  var o, c;
54
54
  return t[e] ? (c = (o = t[e]) == null ? void 0 : o.configuration) == null ? void 0 : c.sourceList : void 0;
55
55
  }
56
- ), V2 = (e) => m(
56
+ ), V2 = (e) => p(
57
57
  A,
58
58
  (t) => {
59
59
  var o, c;
60
60
  return t[e] ? (c = (o = t[e]) == null ? void 0 : o.configuration) == null ? void 0 : c.audioControlPointList : void 0;
61
61
  }
62
- ), U2 = (e) => m(
62
+ ), U2 = (e) => p(
63
63
  A,
64
64
  (t) => {
65
65
  var o, c;
66
66
  return t[e] ? (c = (o = t[e]) == null ? void 0 : o.configuration) == null ? void 0 : c.destinations : void 0;
67
67
  }
68
- ), H2 = (e) => m(
68
+ ), H2 = (e) => p(
69
69
  A,
70
70
  (t) => {
71
71
  var o, c;
72
72
  return t[e] ? (c = (o = t[e]) == null ? void 0 : o.configuration) == null ? void 0 : c.destinationList : void 0;
73
73
  }
74
- ), F2 = (e) => m(
74
+ ), F2 = (e) => p(
75
75
  A,
76
76
  (t) => {
77
77
  var o, c;
78
78
  return t[e] ? (c = (o = t[e]) == null ? void 0 : o.configuration) == null ? void 0 : c.environmentalDevices : void 0;
79
79
  }
80
- ), K2 = (e) => m(
80
+ ), K2 = (e) => p(
81
81
  A,
82
82
  (t) => {
83
- var o, c, r, i, v, g, a, p;
84
- return (c = (o = t[e]) == null ? void 0 : o.configuration) != null && c.destinationList.programAudio ? (v = (i = (r = t[e]) == null ? void 0 : r.configuration) == null ? void 0 : i.destinationList.programAudio) == null ? void 0 : v.sinkKey : ((p = (a = (g = t[e]) == null ? void 0 : g.configuration) == null ? void 0 : a.destinationList.defaultDisplay) == null ? void 0 : p.sinkKey) || "";
83
+ var o, c, r, i, v, f, h, d;
84
+ return (c = (o = t[e]) == null ? void 0 : o.configuration) != null && c.destinationList.programAudio ? (v = (i = (r = t[e]) == null ? void 0 : r.configuration) == null ? void 0 : i.destinationList.programAudio) == null ? void 0 : v.sinkKey : ((d = (h = (f = t[e]) == null ? void 0 : f.configuration) == null ? void 0 : h.destinationList.defaultDisplay) == null ? void 0 : d.sinkKey) || "";
85
85
  }
86
- ), q2 = (e) => m(
86
+ ), q2 = (e) => p(
87
87
  A,
88
88
  (t) => {
89
89
  var o, c, r;
90
90
  return t[e] ? (r = (c = (o = t[e]) == null ? void 0 : o.configuration) == null ? void 0 : c.destinationList.codecContent) == null ? void 0 : r.sinkKey : void 0;
91
91
  }
92
- ), G2 = (e) => m(
92
+ ), G2 = (e) => p(
93
93
  A,
94
94
  (t) => {
95
95
  var o;
96
96
  return t[e] ? (o = t[e]) == null ? void 0 : o.isInCall : void 0;
97
97
  }
98
- ), Y2 = (e) => m(
98
+ ), Y2 = (e) => p(
99
99
  A,
100
100
  (t) => {
101
101
  var o;
102
102
  return t[e] ? (o = t[e]) == null ? void 0 : o.isWarmingUp : void 0;
103
103
  }
104
- ), z2 = (e) => m(
104
+ ), z2 = (e) => p(
105
105
  A,
106
106
  (t) => {
107
107
  var o;
108
108
  return t[e] ? (o = t[e]) == null ? void 0 : o.isCoolingDown : void 0;
109
109
  }
110
- ), J2 = (e) => m(
110
+ ), J2 = (e) => p(
111
111
  A,
112
112
  (t) => {
113
113
  var o;
114
114
  return t[e] ? (o = t[e]) == null ? void 0 : o.isOn : void 0;
115
115
  }
116
- ), X2 = (e) => m(
116
+ ), X2 = (e) => p(
117
117
  A,
118
118
  (t) => {
119
119
  var o;
120
120
  return t[e] ? (o = t[e]) == null ? void 0 : o.advancedSharingActive : void 0;
121
121
  }
122
- ), Q2 = (e) => m(
122
+ ), Q2 = (e) => p(
123
123
  A,
124
124
  (t) => {
125
125
  var o;
126
126
  return t[e] ? (o = t[e]) == null ? void 0 : o.share : void 0;
127
127
  }
128
- ), N2 = (e) => m(
128
+ ), N2 = (e) => p(
129
129
  A,
130
130
  (t) => {
131
131
  var o, c;
132
132
  return t[e] ? (c = (o = t[e]) == null ? void 0 : o.configuration) == null ? void 0 : c.zoomRoomControllerKey : void 0;
133
133
  }
134
- ), ee = m(
134
+ ), ee = p(
135
135
  [
136
136
  (e, t) => t,
137
137
  () => C3,
@@ -147,76 +147,76 @@ const A = (e) => e.rooms, L2 = (e) => m(
147
147
  }
148
148
  );
149
149
  function n6(e) {
150
- return f(
150
+ return w(
151
151
  L2(e)
152
152
  );
153
153
  }
154
154
  function o6() {
155
- return f($2);
155
+ return w($2);
156
156
  }
157
- function x1(e) {
158
- return f(A2(e));
157
+ function Z1(e) {
158
+ return w(A2(e));
159
159
  }
160
- const s6 = x1, c6 = (e) => f(
160
+ const s6 = Z1, c6 = (e) => w(
161
161
  B2(e)
162
- ), te = (e, t) => f(
162
+ ), te = (e, t) => w(
163
163
  k2(e, t)
164
- ), ne = (e) => f(O2(e)) || void 0, r6 = (e) => f(W2(e)), l6 = (e) => f(V2(e)), i6 = (e) => f(U2(e)), a6 = (e) => f(H2(e)), u6 = (e) => f(F2(e)), d6 = (e) => f(K2(e)), v6 = (e) => f(q2(e)), h6 = (e) => f(G2(e)), g6 = (e) => f(Y2(e)), f6 = (e) => f(z2(e)), w6 = (e) => f(J2(e)), m6 = (e) => f(X2(e)), p6 = (e) => f(Q2(e)), M6 = (e) => f((t) => ee(t, e)), x6 = (e) => f(N2(e)), G = (e) => e.runtimeConfig, oe = m(
164
+ ), ne = (e) => w(O2(e)) || void 0, r6 = (e) => w(W2(e)), l6 = (e) => w(V2(e)), i6 = (e) => w(U2(e)), a6 = (e) => w(H2(e)), u6 = (e) => w(F2(e)), d6 = (e) => w(K2(e)), v6 = (e) => w(q2(e)), h6 = (e) => w(G2(e)), g6 = (e) => w(Y2(e)), f6 = (e) => w(z2(e)), w6 = (e) => w(J2(e)), m6 = (e) => w(X2(e)), p6 = (e) => w(Q2(e)), M6 = (e) => w((t) => ee(t, e)), x6 = (e) => w(N2(e)), G = (e) => e.runtimeConfig, oe = p(
165
165
  G,
166
166
  (e) => e.websocket.isConnected
167
- ), se = m(
167
+ ), se = p(
168
168
  G,
169
169
  (e) => e.currentRoomKey
170
- ), ce = m(
170
+ ), ce = p(
171
171
  G,
172
172
  (e) => e.roomData.clientId
173
- ), re = m(
173
+ ), re = p(
174
174
  G,
175
175
  (e) => e.roomData.systemUuid
176
- ), le = m(
176
+ ), le = p(
177
177
  G,
178
178
  (e) => e.roomData.userCode
179
- ), ie = m(
179
+ ), ie = p(
180
180
  G,
181
181
  (e) => e.serverIsRunningOnProcessorHardware
182
- ), ae = m(
182
+ ), ae = p(
183
183
  G,
184
184
  (e) => {
185
185
  var t;
186
186
  return (t = e.roomData.config) == null ? void 0 : t.runtimeInfo;
187
187
  }
188
- ), ue = m(
188
+ ), ue = p(
189
189
  G,
190
190
  (e) => e.touchpanelKey
191
- ), de = m(
191
+ ), de = p(
192
192
  G,
193
193
  (e) => e.touchpanelKey !== ""
194
- ), b3 = m(
194
+ ), b3 = p(
195
195
  G,
196
196
  (e) => e.roomData.deviceInterfaceSupport
197
- ), y3 = (e) => m(
197
+ ), y3 = (e) => p(
198
198
  b3,
199
199
  (t) => {
200
200
  var o;
201
201
  return ((o = t == null ? void 0 : t[e]) == null ? void 0 : o.interfaces) ?? [];
202
202
  }
203
- ), ve = (e, t) => m(
203
+ ), ve = (e, t) => p(
204
204
  y3(e),
205
205
  (o) => o.includes(t)
206
- ), I3 = () => f(oe), Z6 = () => f(se), S6 = () => f(ce), j6 = () => f(re), C6 = () => f(le), b6 = () => f(ie), y6 = () => f(ae), I6 = () => f(ue), R6 = () => f(de), E6 = () => f(b3), T6 = (e) => f(y3(e)), D6 = (e, t) => f(ve(e, t)), N = (e) => e.ui, V1 = (e) => m(N, (t) => t.modalVisibility[e]), he = (e) => m(N, (t) => {
206
+ ), I3 = () => w(oe), Z6 = () => w(se), S6 = () => w(ce), j6 = () => w(re), C6 = () => w(le), b6 = () => w(ie), y6 = () => w(ae), I6 = () => w(ue), R6 = () => w(de), E6 = () => w(b3), T6 = (e) => w(y3(e)), D6 = (e, t) => w(ve(e, t)), N = (e) => e.ui, V1 = (e) => p(N, (t) => t.modalVisibility[e]), he = (e) => p(N, (t) => {
207
207
  const o = t.popoverVisibility[e];
208
208
  if (o)
209
209
  return Object.keys(o).find((c) => o[c]);
210
- }), ge = (e, t) => m(
210
+ }), ge = (e, t) => p(
211
211
  N,
212
212
  (o) => {
213
213
  var c;
214
214
  return ((c = o.popoverVisibility[e]) == null ? void 0 : c[t]) ?? !1;
215
215
  }
216
- ), fe = m(N, (e) => e.error), we = m(
216
+ ), fe = p(N, (e) => e.error), we = p(
217
217
  N,
218
218
  (e) => e.showReconnect
219
- ), me = m(N, (e) => e.theme), pe = (e) => m(N, (t) => t.syncState.includes(e)), _6 = () => f(V1("showShutdownModal")), P6 = () => f(V1("showIncomingCallModal")), L6 = (e) => f(V1(e)), $6 = (e) => f(he(e)), A6 = (e, t) => f(ge(e, t)), Me = () => f(fe), xe = () => f(we), B6 = () => f(me), Ze = (e) => f(pe(e)), Se = {
219
+ ), me = p(N, (e) => e.theme), pe = (e) => p(N, (t) => t.syncState.includes(e)), _6 = () => w(V1("showShutdownModal")), P6 = () => w(V1("showIncomingCallModal")), L6 = (e) => w(V1(e)), $6 = (e) => w(he(e)), A6 = (e, t) => w(ge(e, t)), Me = () => w(fe), xe = () => w(we), B6 = () => w(me), Ze = (e) => w(pe(e)), Se = {
220
220
  showReconnect: !1,
221
221
  error: "",
222
222
  modalVisibility: {
@@ -289,7 +289,7 @@ const s6 = x1, c6 = (e) => f(
289
289
  e.config = t.payload;
290
290
  }
291
291
  }
292
- }), T3 = E3.actions, be = E3.reducer, v3 = {}, A1 = u1({
292
+ }), T3 = E3.actions, be = E3.reducer, v3 = {}, B1 = u1({
293
293
  name: "devices",
294
294
  initialState: v3,
295
295
  reducers: {
@@ -304,9 +304,9 @@ const s6 = x1, c6 = (e) => f(
304
304
  }
305
305
  }
306
306
  }), f1 = {
307
- setDeviceState: A1.actions.setDeviceState,
308
- clearDevices: A1.actions.clearDevices
309
- }, ye = A1.reducer;
307
+ setDeviceState: B1.actions.setDeviceState,
308
+ clearDevices: B1.actions.clearDevices
309
+ }, ye = B1.reducer;
310
310
  class Ie {
311
311
  constructor() {
312
312
  q(this, "uuid", "current-uuid");
@@ -322,7 +322,7 @@ function Re(e) {
322
322
  function Ee(e, t) {
323
323
  sessionStorage.setItem(e, t);
324
324
  }
325
- const g3 = {}, B1 = u1({
325
+ const g3 = {}, k1 = u1({
326
326
  name: "rooms",
327
327
  initialState: g3,
328
328
  reducers: {
@@ -337,9 +337,9 @@ const g3 = {}, B1 = u1({
337
337
  }
338
338
  }
339
339
  }), w1 = {
340
- setRoomState: B1.actions.setRoomState,
341
- clearRooms: B1.actions.clearRooms
342
- }, Te = B1.reducer, De = {
340
+ setRoomState: k1.actions.setRoomState,
341
+ clearRooms: k1.actions.clearRooms
342
+ }, Te = k1.reducer, De = {
343
343
  apiVersion: "",
344
344
  serverIsRunningOnProcessorHardware: !1,
345
345
  websocket: {
@@ -405,7 +405,7 @@ const g3 = {}, B1 = u1({
405
405
  e.touchpanelKey = t.payload;
406
406
  }
407
407
  }
408
- }), U = D3.actions, _e = D3.reducer, _1 = M3.create(), _3 = "websocket/connect", P3 = "websocket/disconnect", L3 = "websocket/sendMessage", $3 = "websocket/addEventHandler", A3 = "websocket/removeEventHandler", B3 = "websocket/reconnect", k3 = () => ({ type: _3 }), k6 = () => ({ type: P3 }), Pe = (e, t) => ({
408
+ }), U = D3.actions, _e = D3.reducer, P1 = M3.create(), _3 = "websocket/connect", P3 = "websocket/disconnect", L3 = "websocket/sendMessage", $3 = "websocket/addEventHandler", A3 = "websocket/removeEventHandler", B3 = "websocket/reconnect", k3 = () => ({ type: _3 }), k6 = () => ({ type: P3 }), Pe = (e, t) => ({
409
409
  type: L3,
410
410
  payload: { messageType: e, content: t }
411
411
  }), Le = (e, t, o) => ({
@@ -421,30 +421,30 @@ const g3 = {}, B1 = u1({
421
421
  waitingToReconnect: !1,
422
422
  reconnectTimer: null,
423
423
  eventHandlers: {}
424
- }, t = async (u) => {
424
+ }, t = async (a) => {
425
425
  try {
426
426
  const Z = location.pathname.split("/").filter((b) => b.length > 0);
427
427
  Z.length >= 5 ? Z.length = 5 : Z.length = 2;
428
- const j = `/${Z.join("/")}`, C = await _1.get(
428
+ const j = `/${Z.join("/")}`, C = await P1.get(
429
429
  "/_local-config/_config.local.json",
430
430
  { baseURL: j }
431
431
  );
432
432
  if (C.status === 200 && C.data) {
433
433
  const b = C.data.apiPath;
434
- u(T3.setAppConfig(C.data));
435
- const x = await _1.get(
434
+ a(T3.setAppConfig(C.data));
435
+ const x = await P1.get(
436
436
  `${b}/version`
437
437
  );
438
- x.status === 200 && x.data && u(U.setRuntimeConfig(x.data));
438
+ x.status === 200 && x.data && a(U.setRuntimeConfig(x.data));
439
439
  }
440
440
  } catch (Z) {
441
441
  console.error("Error getting config", Z);
442
442
  }
443
443
  return !0;
444
- }, o = async (u, Z, j) => {
444
+ }, o = async (a, Z, j) => {
445
445
  try {
446
- const C = await _1.get(
447
- `${u}/ui/joinroom?token=${Z}`
446
+ const C = await P1.get(
447
+ `${a}/ui/joinroom?token=${Z}`
448
448
  );
449
449
  return C.status === 200 && C.data ? (j(U.setRoomData(C.data)), !0) : !1;
450
450
  } catch (C) {
@@ -454,16 +454,16 @@ const g3 = {}, B1 = u1({
454
454
  )
455
455
  ), !1) : (console.error("Error getting room data", C), C instanceof Error ? j(O.setErrorMessage(C.message)) : j(O.setErrorMessage("Error getting room data")), !1);
456
456
  }
457
- }, c = (u) => {
457
+ }, c = (a) => {
458
458
  e.reconnectTimer && (clearTimeout(e.reconnectTimer), e.reconnectTimer = null), console.log("WebSocket middleware: Starting reconnection loop..."), e.reconnectTimer = setTimeout(() => {
459
- e.waitingToReconnect = !1, e.reconnectTimer = null, console.log("WebSocket middleware: Attempting automatic reconnection..."), u(k3());
459
+ e.waitingToReconnect = !1, e.reconnectTimer = null, console.log("WebSocket middleware: Attempting automatic reconnection..."), a(k3());
460
460
  }, 5e3);
461
461
  }, r = () => {
462
462
  e.reconnectTimer && (console.log("WebSocket middleware: Stopping reconnection loop"), clearTimeout(e.reconnectTimer), e.reconnectTimer = null);
463
- }, i = (u) => {
464
- u(O.setShowReconnect(!0)), u(U.setWebsocketIsConnected(!1)), u(f1.clearDevices()), u(w1.clearRooms()), u(O.clearAllModals()), u(O.clearSyncState());
465
- }, v = (u, Z) => {
466
- const j = u(), C = Z ?? j.runtimeConfig.roomData.roomKey, { clientId: b } = j.runtimeConfig.roomData, x = j.runtimeConfig.websocket.isConnected;
463
+ }, i = (a) => {
464
+ a(O.setShowReconnect(!0)), a(U.setWebsocketIsConnected(!1)), a(f1.clearDevices()), a(w1.clearRooms()), a(O.clearAllModals()), a(O.clearSyncState());
465
+ }, v = (a, Z) => {
466
+ const j = a(), C = Z ?? j.runtimeConfig.roomData.roomKey, { clientId: b } = j.runtimeConfig.roomData, x = j.runtimeConfig.websocket.isConnected;
467
467
  if (!Z || !x || !b) {
468
468
  console.log("WebSocket middleware: Cannot request room status", {
469
469
  hasRoomKey: !!Z,
@@ -479,7 +479,7 @@ const g3 = {}, B1 = u1({
479
479
  content: null
480
480
  })
481
481
  );
482
- }, g = async (u, Z) => {
482
+ }, f = async (a, Z) => {
483
483
  console.log("WebSocket middleware: Attempting to connect...");
484
484
  const j = Z(), { apiPath: C } = j.appConfig.config, { serverIsRunningOnProcessorHardware: b } = j.runtimeConfig;
485
485
  if (!C || !e.token) {
@@ -504,20 +504,20 @@ const g3 = {}, B1 = u1({
504
504
  }
505
505
  e.waitingToReconnect = !0;
506
506
  try {
507
- if (!await o(C, e.token, u)) {
507
+ if (!await o(C, e.token, a)) {
508
508
  console.log(
509
509
  "WebSocket middleware: Failed to get room data, will retry..."
510
- ), c(u);
510
+ ), c(a);
511
511
  return;
512
512
  }
513
513
  console.log("WebSocket middleware: Connecting to websocket");
514
- const S1 = `${C.replace("http", "ws")}/ui/join/${e.token}`, K = new WebSocket(S1);
514
+ const j1 = `${C.replace("http", "ws")}/ui/join/${e.token}`, K = new WebSocket(j1);
515
515
  e.client = K, K.onopen = (B) => {
516
516
  console.log("WebSocket middleware: Connected", B.type, B.target), e.waitingToReconnect = !1, r(), setTimeout(() => {
517
- e.client === K && K.readyState === WebSocket.OPEN && u(U.setWebsocketIsConnected(!0));
517
+ e.client === K && K.readyState === WebSocket.OPEN && a(U.setWebsocketIsConnected(!0));
518
518
  }, 100);
519
519
  }, K.onerror = (B) => {
520
- console.error("WebSocket middleware: Error", B), i(u);
520
+ console.error("WebSocket middleware: Error", B), i(a);
521
521
  }, K.onclose = (B) => {
522
522
  var D;
523
523
  if (console.log(
@@ -525,25 +525,25 @@ const g3 = {}, B1 = u1({
525
525
  B.reason,
526
526
  B.code
527
527
  ), B.code === 4100) {
528
- console.log("WebSocket middleware: Closed by client (cleanup)"), r(), i(u);
528
+ console.log("WebSocket middleware: Closed by client (cleanup)"), r(), i(a);
529
529
  return;
530
530
  }
531
531
  if (e.waitingToReconnect = !0, B.code === 4e3) {
532
- console.log("WebSocket middleware: User code changed"), r(), u(
532
+ console.log("WebSocket middleware: User code changed"), r(), a(
533
533
  U.setUserCode({ userCode: "", qrUrl: "" })
534
- ), u(
534
+ ), a(
535
535
  O.setErrorMessage(
536
536
  "User code changed. Click reconnect to enter the new code"
537
537
  )
538
- ), i(u);
538
+ ), i(a);
539
539
  return;
540
540
  }
541
541
  if (B.code === 4002) {
542
- console.log("WebSocket middleware: Room combination changed"), r(), u(
542
+ console.log("WebSocket middleware: Room combination changed"), r(), a(
543
543
  O.setErrorMessage(
544
544
  "Room combination changed. Click Reconnect to re-join the room"
545
545
  )
546
- ), i(u);
546
+ ), i(a);
547
547
  return;
548
548
  }
549
549
  if (B.code === 4001)
@@ -558,11 +558,11 @@ const g3 = {}, B1 = u1({
558
558
  else {
559
559
  console.log(
560
560
  "WebSocket middleware: Processor disconnected (no touchpanel key, not on processor hardware)"
561
- ), r(), u(
561
+ ), r(), a(
562
562
  O.setErrorMessage(
563
563
  "Processor has disconnected. Click Reconnect to continue."
564
564
  )
565
- ), i(u);
565
+ ), i(a);
566
566
  return;
567
567
  }
568
568
  if (e.client)
@@ -573,11 +573,11 @@ const g3 = {}, B1 = u1({
573
573
  console.log("WebSocket middleware: Closed by client");
574
574
  return;
575
575
  }
576
- e.client = null, console.log("WebSocket middleware: Clearing state on disconnect"), u(
576
+ e.client = null, console.log("WebSocket middleware: Clearing state on disconnect"), a(
577
577
  O.setErrorMessage(
578
578
  "Connection lost. Attempting to reconnect..."
579
579
  )
580
- ), u(U.setWebsocketIsConnected(!1)), u(f1.clearDevices()), u(w1.clearRooms()), u(O.clearAllModals()), u(O.clearSyncState()), c(u);
580
+ ), a(U.setWebsocketIsConnected(!1)), a(f1.clearDevices()), a(w1.clearRooms()), a(O.clearAllModals()), a(O.clearSyncState()), c(a);
581
581
  }, K.onmessage = (B) => {
582
582
  try {
583
583
  const D = JSON.parse(B.data);
@@ -588,21 +588,21 @@ const g3 = {}, B1 = u1({
588
588
  if (D.type.startsWith("/system/"))
589
589
  switch (D.type) {
590
590
  case "/system/touchpanelKey":
591
- u(
591
+ a(
592
592
  U.setTouchpanelKey(
593
593
  D.content
594
594
  )
595
595
  );
596
596
  break;
597
597
  case "/system/roomKey":
598
- u(w1.clearRooms()), u(f1.clearDevices()), u(O.clearSyncState()), u(
598
+ a(w1.clearRooms()), a(f1.clearDevices()), a(O.clearSyncState()), a(
599
599
  U.setCurrentRoomKey(
600
600
  D.content
601
601
  )
602
602
  );
603
603
  break;
604
604
  case "/system/userCodeChanged":
605
- u(
605
+ a(
606
606
  U.setUserCode(D.content)
607
607
  );
608
608
  break;
@@ -611,7 +611,7 @@ const g3 = {}, B1 = u1({
611
611
  break;
612
612
  case "/system/deviceInterfaces": {
613
613
  const z = D.content;
614
- u(
614
+ a(
615
615
  U.setDeviceInterfaces(
616
616
  z.deviceInterfaces
617
617
  )
@@ -633,14 +633,14 @@ const g3 = {}, B1 = u1({
633
633
  ), z && Object.values(z).forEach((o1) => {
634
634
  try {
635
635
  o1(D);
636
- } catch (j1) {
636
+ } catch (C1) {
637
637
  console.error(
638
638
  "WebSocket middleware: Event handler error",
639
- j1
639
+ C1
640
640
  );
641
641
  }
642
642
  });
643
- } else D.type.startsWith("/room/") ? u(w1.setRoomState(D)) : D.type.startsWith("/device/") && u(f1.setDeviceState(D));
643
+ } else D.type.startsWith("/room/") ? a(w1.setRoomState(D)) : D.type.startsWith("/device/") && a(f1.setDeviceState(D));
644
644
  } catch (D) {
645
645
  console.error("WebSocket middleware: Message handling error", D);
646
646
  }
@@ -648,26 +648,26 @@ const g3 = {}, B1 = u1({
648
648
  } catch (x) {
649
649
  console.error("WebSocket middleware: Connection error", x), e.waitingToReconnect = !1, e.client = null;
650
650
  }
651
- }, a = () => {
651
+ }, h = () => {
652
652
  e.client && (console.log("WebSocket middleware: Disconnecting"), r(), e.client.close(4100, "Client requested disconnect"), e.client = null);
653
- }, p = (u, Z, j) => {
653
+ }, d = (a, Z, j) => {
654
654
  const C = j(), b = C.runtimeConfig.websocket.isConnected, x = C.runtimeConfig.roomData.clientId;
655
655
  e.client && b ? e.client.send(
656
- JSON.stringify({ type: u, clientId: x, content: Z })
656
+ JSON.stringify({ type: a, clientId: x, content: Z })
657
657
  ) : console.warn("WebSocket middleware: Cannot send message - not connected");
658
- }, M = (u, Z, j) => {
659
- e.eventHandlers[u] || (e.eventHandlers[u] = {}), e.eventHandlers[u][Z] = j, console.log("WebSocket middleware: Event handler added", u, Z);
660
- }, P = (u, Z) => {
661
- e.eventHandlers[u] && (delete e.eventHandlers[u][Z], console.log(
658
+ }, M = (a, Z, j) => {
659
+ e.eventHandlers[a] || (e.eventHandlers[a] = {}), e.eventHandlers[a][Z] = j, console.log("WebSocket middleware: Event handler added", a, Z);
660
+ }, P = (a, Z) => {
661
+ e.eventHandlers[a] && (delete e.eventHandlers[a][Z], console.log(
662
662
  "WebSocket middleware: Event handler removed",
663
- u,
663
+ a,
664
664
  Z
665
665
  ));
666
- }, H = (u) => {
667
- const Z = u(), { gatewayAppPath: j } = Z.appConfig.config, C = Z.runtimeConfig.roomData.roomKey, b = Z.runtimeConfig.roomData.systemUuid, x = Z.runtimeConfig.roomData.userCode, W = `${j}?uuid=${b}&roomKey=${C}`;
666
+ }, H = (a) => {
667
+ const Z = a(), { gatewayAppPath: j } = Z.appConfig.config, C = Z.runtimeConfig.roomData.roomKey, b = Z.runtimeConfig.roomData.systemUuid, x = Z.runtimeConfig.roomData.userCode, W = `${j}?uuid=${b}&roomKey=${C}`;
668
668
  window.location.href = x ? `${W}&Code=${x}` : W;
669
669
  };
670
- return (u) => (Z) => (j) => {
670
+ return (a) => (Z) => (j) => {
671
671
  const C = Z(j);
672
672
  if (!j || typeof j != "object" || !("type" in j))
673
673
  return C;
@@ -676,17 +676,17 @@ const g3 = {}, B1 = u1({
676
676
  switch (b.type) {
677
677
  case _3: {
678
678
  let W = new URLSearchParams(window.location.search).get("token");
679
- W ? (console.log("WebSocket middleware: Saving token"), Ee(h3.uuid, W)) : (W = Re(h3.uuid), console.log("WebSocket middleware: Loading token")), e.token = W, await t(u.dispatch), await g(u.dispatch, u.getState);
679
+ W ? (console.log("WebSocket middleware: Saving token"), Ee(h3.uuid, W)) : (W = Re(h3.uuid), console.log("WebSocket middleware: Loading token")), e.token = W, await t(a.dispatch), await f(a.dispatch, a.getState);
680
680
  break;
681
681
  }
682
682
  case P3:
683
- a();
683
+ h();
684
684
  break;
685
685
  case L3:
686
- p(
686
+ d(
687
687
  b.payload.messageType,
688
688
  b.payload.content,
689
- u.getState
689
+ a.getState
690
690
  );
691
691
  break;
692
692
  case $3:
@@ -703,25 +703,25 @@ const g3 = {}, B1 = u1({
703
703
  );
704
704
  break;
705
705
  case B3:
706
- H(u.getState);
706
+ H(a.getState);
707
707
  break;
708
708
  default:
709
709
  if (j.type === U.setWebsocketIsConnected.type)
710
710
  j.payload === !0 && (console.log(
711
711
  "[WebSocket Middleware] Connection established, requesting room status..."
712
- ), setTimeout(() => v(u.getState), 100));
712
+ ), setTimeout(() => v(a.getState), 100));
713
713
  else if (j.type === U.setRoomData.type) {
714
- const x = u.getState(), W = j.payload;
714
+ const x = a.getState(), W = j.payload;
715
715
  x.runtimeConfig.websocket.isConnected && (W != null && W.clientId) && (console.log(
716
716
  "[WebSocket Middleware] Room data received, requesting room status..."
717
- ), setTimeout(() => v(u.getState), 100));
717
+ ), setTimeout(() => v(a.getState), 100));
718
718
  } else if (j.type === U.setCurrentRoomKey.type) {
719
719
  const x = j.payload;
720
720
  x && (console.log(
721
721
  "[WebSocket Middleware] Room changed to:",
722
722
  x,
723
723
  ", requesting room status..."
724
- ), setTimeout(() => v(u.getState, x), 100));
724
+ ), setTimeout(() => v(a.getState, x), 100));
725
725
  }
726
726
  break;
727
727
  }
@@ -783,12 +783,12 @@ function We() {
783
783
  if (w3) return l1;
784
784
  w3 = 1;
785
785
  var e = x3, t = Symbol.for("react.element"), o = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
786
- function v(g, a, p) {
787
- var M, P = {}, H = null, u = null;
788
- p !== void 0 && (H = "" + p), a.key !== void 0 && (H = "" + a.key), a.ref !== void 0 && (u = a.ref);
789
- for (M in a) c.call(a, M) && !i.hasOwnProperty(M) && (P[M] = a[M]);
790
- if (g && g.defaultProps) for (M in a = g.defaultProps, a) P[M] === void 0 && (P[M] = a[M]);
791
- return { $$typeof: t, type: g, key: H, ref: u, props: P, _owner: r.current };
786
+ function v(f, h, d) {
787
+ var M, P = {}, H = null, a = null;
788
+ d !== void 0 && (H = "" + d), h.key !== void 0 && (H = "" + h.key), h.ref !== void 0 && (a = h.ref);
789
+ for (M in h) c.call(h, M) && !i.hasOwnProperty(M) && (P[M] = h[M]);
790
+ if (f && f.defaultProps) for (M in h = f.defaultProps, h) P[M] === void 0 && (P[M] = h[M]);
791
+ return { $$typeof: t, type: f, key: H, ref: a, props: P, _owner: r.current };
792
792
  }
793
793
  return l1.Fragment = o, l1.jsx = v, l1.jsxs = v, l1;
794
794
  }
@@ -805,7 +805,7 @@ var i1 = {};
805
805
  var m3;
806
806
  function Ve() {
807
807
  return m3 || (m3 = 1, process.env.NODE_ENV !== "production" && function() {
808
- var e = x3, t = Symbol.for("react.element"), o = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), g = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), u = Symbol.for("react.offscreen"), Z = Symbol.iterator, j = "@@iterator";
808
+ var e = x3, t = Symbol.for("react.element"), o = Symbol.for("react.portal"), c = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), v = Symbol.for("react.provider"), f = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), a = Symbol.for("react.offscreen"), Z = Symbol.iterator, j = "@@iterator";
809
809
  function C(s) {
810
810
  if (s === null || typeof s != "object")
811
811
  return null;
@@ -815,36 +815,36 @@ function Ve() {
815
815
  var b = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
816
816
  function x(s) {
817
817
  {
818
- for (var l = arguments.length, d = new Array(l > 1 ? l - 1 : 0), w = 1; w < l; w++)
819
- d[w - 1] = arguments[w];
820
- W("error", s, d);
818
+ for (var l = arguments.length, u = new Array(l > 1 ? l - 1 : 0), m = 1; m < l; m++)
819
+ u[m - 1] = arguments[m];
820
+ W("error", s, u);
821
821
  }
822
822
  }
823
- function W(s, l, d) {
823
+ function W(s, l, u) {
824
824
  {
825
- var w = b.ReactDebugCurrentFrame, E = w.getStackAddendum();
826
- E !== "" && (l += "%s", d = d.concat([E]));
827
- var T = d.map(function(y) {
825
+ var m = b.ReactDebugCurrentFrame, E = m.getStackAddendum();
826
+ E !== "" && (l += "%s", u = u.concat([E]));
827
+ var T = u.map(function(y) {
828
828
  return String(y);
829
829
  });
830
830
  T.unshift("Warning: " + l), Function.prototype.apply.call(console[s], console, T);
831
831
  }
832
832
  }
833
- var S1 = !1, K = !1, B = !1, D = !1, z = !1, o1;
833
+ var j1 = !1, K = !1, B = !1, D = !1, z = !1, o1;
834
834
  o1 = Symbol.for("react.module.reference");
835
- function j1(s) {
836
- return !!(typeof s == "string" || typeof s == "function" || s === c || s === i || z || s === r || s === p || s === M || D || s === u || S1 || K || B || typeof s == "object" && s !== null && (s.$$typeof === H || s.$$typeof === P || s.$$typeof === v || s.$$typeof === g || s.$$typeof === a || // This needs to include all possible module reference object
835
+ function C1(s) {
836
+ return !!(typeof s == "string" || typeof s == "function" || s === c || s === i || z || s === r || s === d || s === M || D || s === a || j1 || K || B || typeof s == "object" && s !== null && (s.$$typeof === H || s.$$typeof === P || s.$$typeof === v || s.$$typeof === f || s.$$typeof === h || // This needs to include all possible module reference object
837
837
  // types supported by any Flight configuration anywhere since
838
838
  // we don't know which Flight build this will end up being used
839
839
  // with.
840
840
  s.$$typeof === o1 || s.getModuleId !== void 0));
841
841
  }
842
- function U3(s, l, d) {
843
- var w = s.displayName;
844
- if (w)
845
- return w;
842
+ function U3(s, l, u) {
843
+ var m = s.displayName;
844
+ if (m)
845
+ return m;
846
846
  var E = l.displayName || l.name || "";
847
- return E !== "" ? d + "(" + E + ")" : d;
847
+ return E !== "" ? u + "(" + E + ")" : u;
848
848
  }
849
849
  function U1(s) {
850
850
  return s.displayName || "Context";
@@ -865,24 +865,24 @@ function Ve() {
865
865
  return "Profiler";
866
866
  case r:
867
867
  return "StrictMode";
868
- case p:
868
+ case d:
869
869
  return "Suspense";
870
870
  case M:
871
871
  return "SuspenseList";
872
872
  }
873
873
  if (typeof s == "object")
874
874
  switch (s.$$typeof) {
875
- case g:
875
+ case f:
876
876
  var l = s;
877
877
  return U1(l) + ".Consumer";
878
878
  case v:
879
- var d = s;
880
- return U1(d._context) + ".Provider";
881
- case a:
879
+ var u = s;
880
+ return U1(u._context) + ".Provider";
881
+ case h:
882
882
  return U3(s, s.render, "ForwardRef");
883
883
  case P:
884
- var w = s.displayName || null;
885
- return w !== null ? w : J(s.type) || "Memo";
884
+ var m = s.displayName || null;
885
+ return m !== null ? m : J(s.type) || "Memo";
886
886
  case H: {
887
887
  var E = s, T = E._payload, y = E._init;
888
888
  try {
@@ -956,39 +956,39 @@ function Ve() {
956
956
  s1 < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
957
957
  }
958
958
  }
959
- var C1 = b.ReactCurrentDispatcher, b1;
960
- function d1(s, l, d) {
959
+ var b1 = b.ReactCurrentDispatcher, y1;
960
+ function d1(s, l, u) {
961
961
  {
962
- if (b1 === void 0)
962
+ if (y1 === void 0)
963
963
  try {
964
964
  throw Error();
965
965
  } catch (E) {
966
- var w = E.stack.trim().match(/\n( *(at )?)/);
967
- b1 = w && w[1] || "";
966
+ var m = E.stack.trim().match(/\n( *(at )?)/);
967
+ y1 = m && m[1] || "";
968
968
  }
969
969
  return `
970
- ` + b1 + s;
970
+ ` + y1 + s;
971
971
  }
972
972
  }
973
- var y1 = !1, v1;
973
+ var I1 = !1, v1;
974
974
  {
975
975
  var K3 = typeof WeakMap == "function" ? WeakMap : Map;
976
976
  v1 = new K3();
977
977
  }
978
978
  function X1(s, l) {
979
- if (!s || y1)
979
+ if (!s || I1)
980
980
  return "";
981
981
  {
982
- var d = v1.get(s);
983
- if (d !== void 0)
984
- return d;
982
+ var u = v1.get(s);
983
+ if (u !== void 0)
984
+ return u;
985
985
  }
986
- var w;
987
- y1 = !0;
986
+ var m;
987
+ I1 = !0;
988
988
  var E = Error.prepareStackTrace;
989
989
  Error.prepareStackTrace = void 0;
990
990
  var T;
991
- T = C1.current, C1.current = null, H3();
991
+ T = b1.current, b1.current = null, H3();
992
992
  try {
993
993
  if (l) {
994
994
  var y = function() {
@@ -1002,14 +1002,14 @@ function Ve() {
1002
1002
  try {
1003
1003
  Reflect.construct(y, []);
1004
1004
  } catch (V) {
1005
- w = V;
1005
+ m = V;
1006
1006
  }
1007
1007
  Reflect.construct(s, [], y);
1008
1008
  } else {
1009
1009
  try {
1010
1010
  y.call();
1011
1011
  } catch (V) {
1012
- w = V;
1012
+ m = V;
1013
1013
  }
1014
1014
  s.call(y.prototype);
1015
1015
  }
@@ -1017,14 +1017,14 @@ function Ve() {
1017
1017
  try {
1018
1018
  throw Error();
1019
1019
  } catch (V) {
1020
- w = V;
1020
+ m = V;
1021
1021
  }
1022
1022
  s();
1023
1023
  }
1024
1024
  } catch (V) {
1025
- if (V && w && typeof V.stack == "string") {
1025
+ if (V && m && typeof V.stack == "string") {
1026
1026
  for (var S = V.stack.split(`
1027
- `), k = w.stack.split(`
1027
+ `), k = m.stack.split(`
1028
1028
  `), L = S.length - 1, $ = k.length - 1; L >= 1 && $ >= 0 && S[L] !== k[$]; )
1029
1029
  $--;
1030
1030
  for (; L >= 1 && $ >= 0; L--, $--)
@@ -1041,19 +1041,19 @@ function Ve() {
1041
1041
  }
1042
1042
  }
1043
1043
  } finally {
1044
- y1 = !1, C1.current = T, F3(), Error.prepareStackTrace = E;
1044
+ I1 = !1, b1.current = T, F3(), Error.prepareStackTrace = E;
1045
1045
  }
1046
1046
  var t1 = s ? s.displayName || s.name : "", Q = t1 ? d1(t1) : "";
1047
1047
  return typeof s == "function" && v1.set(s, Q), Q;
1048
1048
  }
1049
- function q3(s, l, d) {
1049
+ function q3(s, l, u) {
1050
1050
  return X1(s, !1);
1051
1051
  }
1052
1052
  function G3(s) {
1053
1053
  var l = s.prototype;
1054
1054
  return !!(l && l.isReactComponent);
1055
1055
  }
1056
- function h1(s, l, d) {
1056
+ function h1(s, l, u) {
1057
1057
  if (s == null)
1058
1058
  return "";
1059
1059
  if (typeof s == "function")
@@ -1061,21 +1061,21 @@ function Ve() {
1061
1061
  if (typeof s == "string")
1062
1062
  return d1(s);
1063
1063
  switch (s) {
1064
- case p:
1064
+ case d:
1065
1065
  return d1("Suspense");
1066
1066
  case M:
1067
1067
  return d1("SuspenseList");
1068
1068
  }
1069
1069
  if (typeof s == "object")
1070
1070
  switch (s.$$typeof) {
1071
- case a:
1071
+ case h:
1072
1072
  return q3(s.render);
1073
1073
  case P:
1074
- return h1(s.type, l, d);
1074
+ return h1(s.type, l, u);
1075
1075
  case H: {
1076
- var w = s, E = w._payload, T = w._init;
1076
+ var m = s, E = m._payload, T = m._init;
1077
1077
  try {
1078
- return h1(T(E), l, d);
1078
+ return h1(T(E), l, u);
1079
1079
  } catch {
1080
1080
  }
1081
1081
  }
@@ -1085,12 +1085,12 @@ function Ve() {
1085
1085
  var c1 = Object.prototype.hasOwnProperty, Q1 = {}, N1 = b.ReactDebugCurrentFrame;
1086
1086
  function g1(s) {
1087
1087
  if (s) {
1088
- var l = s._owner, d = h1(s.type, s._source, l ? l.type : null);
1089
- N1.setExtraStackFrame(d);
1088
+ var l = s._owner, u = h1(s.type, s._source, l ? l.type : null);
1089
+ N1.setExtraStackFrame(u);
1090
1090
  } else
1091
1091
  N1.setExtraStackFrame(null);
1092
1092
  }
1093
- function Y3(s, l, d, w, E) {
1093
+ function Y3(s, l, u, m, E) {
1094
1094
  {
1095
1095
  var T = Function.call.bind(c1);
1096
1096
  for (var y in s)
@@ -1098,25 +1098,25 @@ function Ve() {
1098
1098
  var S = void 0;
1099
1099
  try {
1100
1100
  if (typeof s[y] != "function") {
1101
- var k = Error((w || "React class") + ": " + d + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1101
+ var k = Error((m || "React class") + ": " + u + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1102
1102
  throw k.name = "Invariant Violation", k;
1103
1103
  }
1104
- S = s[y](l, y, w, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1104
+ S = s[y](l, y, m, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1105
1105
  } catch (L) {
1106
1106
  S = L;
1107
1107
  }
1108
- S && !(S instanceof Error) && (g1(E), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", w || "React class", d, y, typeof S), g1(null)), S instanceof Error && !(S.message in Q1) && (Q1[S.message] = !0, g1(E), x("Failed %s type: %s", d, S.message), g1(null));
1108
+ S && !(S instanceof Error) && (g1(E), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", m || "React class", u, y, typeof S), g1(null)), S instanceof Error && !(S.message in Q1) && (Q1[S.message] = !0, g1(E), x("Failed %s type: %s", u, S.message), g1(null));
1109
1109
  }
1110
1110
  }
1111
1111
  }
1112
1112
  var z3 = Array.isArray;
1113
- function I1(s) {
1113
+ function R1(s) {
1114
1114
  return z3(s);
1115
1115
  }
1116
1116
  function J3(s) {
1117
1117
  {
1118
- var l = typeof Symbol == "function" && Symbol.toStringTag, d = l && s[Symbol.toStringTag] || s.constructor.name || "Object";
1119
- return d;
1118
+ var l = typeof Symbol == "function" && Symbol.toStringTag, u = l && s[Symbol.toStringTag] || s.constructor.name || "Object";
1119
+ return u;
1120
1120
  }
1121
1121
  }
1122
1122
  function X3(s) {
@@ -1160,34 +1160,34 @@ function Ve() {
1160
1160
  }
1161
1161
  function n2(s, l) {
1162
1162
  {
1163
- var d = function() {
1163
+ var u = function() {
1164
1164
  o3 || (o3 = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
1165
1165
  };
1166
- d.isReactWarning = !0, Object.defineProperty(s, "key", {
1167
- get: d,
1166
+ u.isReactWarning = !0, Object.defineProperty(s, "key", {
1167
+ get: u,
1168
1168
  configurable: !0
1169
1169
  });
1170
1170
  }
1171
1171
  }
1172
1172
  function o2(s, l) {
1173
1173
  {
1174
- var d = function() {
1174
+ var u = function() {
1175
1175
  s3 || (s3 = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", l));
1176
1176
  };
1177
- d.isReactWarning = !0, Object.defineProperty(s, "ref", {
1178
- get: d,
1177
+ u.isReactWarning = !0, Object.defineProperty(s, "ref", {
1178
+ get: u,
1179
1179
  configurable: !0
1180
1180
  });
1181
1181
  }
1182
1182
  }
1183
- var s2 = function(s, l, d, w, E, T, y) {
1183
+ var s2 = function(s, l, u, m, E, T, y) {
1184
1184
  var S = {
1185
1185
  // This tag allows us to uniquely identify this as a React Element
1186
1186
  $$typeof: t,
1187
1187
  // Built-in properties that belong on the element
1188
1188
  type: s,
1189
1189
  key: l,
1190
- ref: d,
1190
+ ref: u,
1191
1191
  props: y,
1192
1192
  // Record the component responsible for creating this element.
1193
1193
  _owner: T
@@ -1201,7 +1201,7 @@ function Ve() {
1201
1201
  configurable: !1,
1202
1202
  enumerable: !1,
1203
1203
  writable: !1,
1204
- value: w
1204
+ value: m
1205
1205
  }), Object.defineProperty(S, "_source", {
1206
1206
  configurable: !1,
1207
1207
  enumerable: !1,
@@ -1209,10 +1209,10 @@ function Ve() {
1209
1209
  value: E
1210
1210
  }), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
1211
1211
  };
1212
- function c2(s, l, d, w, E) {
1212
+ function c2(s, l, u, m, E) {
1213
1213
  {
1214
1214
  var T, y = {}, S = null, k = null;
1215
- d !== void 0 && (t3(d), S = "" + d), e2(l) && (t3(l.key), S = "" + l.key), N3(l) && (k = l.ref, t2(l, E));
1215
+ u !== void 0 && (t3(u), S = "" + u), e2(l) && (t3(l.key), S = "" + l.key), N3(l) && (k = l.ref, t2(l, E));
1216
1216
  for (T in l)
1217
1217
  c1.call(l, T) && !Q3.hasOwnProperty(T) && (y[T] = l[T]);
1218
1218
  if (s && s.defaultProps) {
@@ -1224,26 +1224,26 @@ function Ve() {
1224
1224
  var $ = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
1225
1225
  S && n2(y, $), k && o2(y, $);
1226
1226
  }
1227
- return s2(s, S, k, E, w, n3.current, y);
1227
+ return s2(s, S, k, E, m, n3.current, y);
1228
1228
  }
1229
1229
  }
1230
- var R1 = b.ReactCurrentOwner, c3 = b.ReactDebugCurrentFrame;
1230
+ var E1 = b.ReactCurrentOwner, c3 = b.ReactDebugCurrentFrame;
1231
1231
  function e1(s) {
1232
1232
  if (s) {
1233
- var l = s._owner, d = h1(s.type, s._source, l ? l.type : null);
1234
- c3.setExtraStackFrame(d);
1233
+ var l = s._owner, u = h1(s.type, s._source, l ? l.type : null);
1234
+ c3.setExtraStackFrame(u);
1235
1235
  } else
1236
1236
  c3.setExtraStackFrame(null);
1237
1237
  }
1238
- var E1;
1239
- E1 = !1;
1240
- function T1(s) {
1238
+ var T1;
1239
+ T1 = !1;
1240
+ function D1(s) {
1241
1241
  return typeof s == "object" && s !== null && s.$$typeof === t;
1242
1242
  }
1243
1243
  function r3() {
1244
1244
  {
1245
- if (R1.current) {
1246
- var s = J(R1.current.type);
1245
+ if (E1.current) {
1246
+ var s = J(E1.current.type);
1247
1247
  if (s)
1248
1248
  return `
1249
1249
 
@@ -1260,10 +1260,10 @@ Check the render method of \`` + s + "`.";
1260
1260
  {
1261
1261
  var l = r3();
1262
1262
  if (!l) {
1263
- var d = typeof s == "string" ? s : s.displayName || s.name;
1264
- d && (l = `
1263
+ var u = typeof s == "string" ? s : s.displayName || s.name;
1264
+ u && (l = `
1265
1265
 
1266
- Check the top-level render call using <` + d + ">.");
1266
+ Check the top-level render call using <` + u + ">.");
1267
1267
  }
1268
1268
  return l;
1269
1269
  }
@@ -1273,30 +1273,30 @@ Check the top-level render call using <` + d + ">.");
1273
1273
  if (!s._store || s._store.validated || s.key != null)
1274
1274
  return;
1275
1275
  s._store.validated = !0;
1276
- var d = l2(l);
1277
- if (l3[d])
1276
+ var u = l2(l);
1277
+ if (l3[u])
1278
1278
  return;
1279
- l3[d] = !0;
1280
- var w = "";
1281
- s && s._owner && s._owner !== R1.current && (w = " It was passed a child from " + J(s._owner.type) + "."), e1(s), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, w), e1(null);
1279
+ l3[u] = !0;
1280
+ var m = "";
1281
+ s && s._owner && s._owner !== E1.current && (m = " It was passed a child from " + J(s._owner.type) + "."), e1(s), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, m), e1(null);
1282
1282
  }
1283
1283
  }
1284
1284
  function a3(s, l) {
1285
1285
  {
1286
1286
  if (typeof s != "object")
1287
1287
  return;
1288
- if (I1(s))
1289
- for (var d = 0; d < s.length; d++) {
1290
- var w = s[d];
1291
- T1(w) && i3(w, l);
1288
+ if (R1(s))
1289
+ for (var u = 0; u < s.length; u++) {
1290
+ var m = s[u];
1291
+ D1(m) && i3(m, l);
1292
1292
  }
1293
- else if (T1(s))
1293
+ else if (D1(s))
1294
1294
  s._store && (s._store.validated = !0);
1295
1295
  else if (s) {
1296
1296
  var E = C(s);
1297
1297
  if (typeof E == "function" && E !== s.entries)
1298
1298
  for (var T = E.call(s), y; !(y = T.next()).done; )
1299
- T1(y.value) && i3(y.value, l);
1299
+ D1(y.value) && i3(y.value, l);
1300
1300
  }
1301
1301
  }
1302
1302
  }
@@ -1305,20 +1305,20 @@ Check the top-level render call using <` + d + ">.");
1305
1305
  var l = s.type;
1306
1306
  if (l == null || typeof l == "string")
1307
1307
  return;
1308
- var d;
1308
+ var u;
1309
1309
  if (typeof l == "function")
1310
- d = l.propTypes;
1311
- else if (typeof l == "object" && (l.$$typeof === a || // Note: Memo only checks outer props here.
1310
+ u = l.propTypes;
1311
+ else if (typeof l == "object" && (l.$$typeof === h || // Note: Memo only checks outer props here.
1312
1312
  // Inner props are checked in the reconciler.
1313
1313
  l.$$typeof === P))
1314
- d = l.propTypes;
1314
+ u = l.propTypes;
1315
1315
  else
1316
1316
  return;
1317
- if (d) {
1318
- var w = J(l);
1319
- Y3(d, s.props, "prop", w, s);
1320
- } else if (l.PropTypes !== void 0 && !E1) {
1321
- E1 = !0;
1317
+ if (u) {
1318
+ var m = J(l);
1319
+ Y3(u, s.props, "prop", m, s);
1320
+ } else if (l.PropTypes !== void 0 && !T1) {
1321
+ T1 = !0;
1322
1322
  var E = J(l);
1323
1323
  x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
1324
1324
  }
@@ -1327,10 +1327,10 @@ Check the top-level render call using <` + d + ">.");
1327
1327
  }
1328
1328
  function a2(s) {
1329
1329
  {
1330
- for (var l = Object.keys(s.props), d = 0; d < l.length; d++) {
1331
- var w = l[d];
1332
- if (w !== "children" && w !== "key") {
1333
- e1(s), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), e1(null);
1330
+ for (var l = Object.keys(s.props), u = 0; u < l.length; u++) {
1331
+ var m = l[u];
1332
+ if (m !== "children" && m !== "key") {
1333
+ e1(s), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", m), e1(null);
1334
1334
  break;
1335
1335
  }
1336
1336
  }
@@ -1338,25 +1338,25 @@ Check the top-level render call using <` + d + ">.");
1338
1338
  }
1339
1339
  }
1340
1340
  var u3 = {};
1341
- function d3(s, l, d, w, E, T) {
1341
+ function d3(s, l, u, m, E, T) {
1342
1342
  {
1343
- var y = j1(s);
1343
+ var y = C1(s);
1344
1344
  if (!y) {
1345
1345
  var S = "";
1346
1346
  (s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (S += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1347
1347
  var k = r2();
1348
1348
  k ? S += k : S += r3();
1349
1349
  var L;
1350
- s === null ? L = "null" : I1(s) ? L = "array" : s !== void 0 && s.$$typeof === t ? (L = "<" + (J(s.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : L = typeof s, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", L, S);
1350
+ s === null ? L = "null" : R1(s) ? L = "array" : s !== void 0 && s.$$typeof === t ? (L = "<" + (J(s.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : L = typeof s, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", L, S);
1351
1351
  }
1352
- var $ = c2(s, l, d, E, T);
1352
+ var $ = c2(s, l, u, E, T);
1353
1353
  if ($ == null)
1354
1354
  return $;
1355
1355
  if (y) {
1356
1356
  var F = l.children;
1357
1357
  if (F !== void 0)
1358
- if (w)
1359
- if (I1(F)) {
1358
+ if (m)
1359
+ if (R1(F)) {
1360
1360
  for (var t1 = 0; t1 < F.length; t1++)
1361
1361
  a3(F[t1], s);
1362
1362
  Object.freeze && Object.freeze(F);
@@ -1368,25 +1368,25 @@ Check the top-level render call using <` + d + ">.");
1368
1368
  if (c1.call(l, "key")) {
1369
1369
  var Q = J(s), V = Object.keys(l).filter(function(f2) {
1370
1370
  return f2 !== "key";
1371
- }), D1 = V.length > 0 ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}";
1372
- if (!u3[Q + D1]) {
1371
+ }), _1 = V.length > 0 ? "{key: someKey, " + V.join(": ..., ") + ": ...}" : "{key: someKey}";
1372
+ if (!u3[Q + _1]) {
1373
1373
  var g2 = V.length > 0 ? "{" + V.join(": ..., ") + ": ...}" : "{}";
1374
1374
  x(`A props object containing a "key" prop is being spread into JSX:
1375
1375
  let props = %s;
1376
1376
  <%s {...props} />
1377
1377
  React keys must be passed directly to JSX without using spread:
1378
1378
  let props = %s;
1379
- <%s key={someKey} {...props} />`, D1, Q, g2, Q), u3[Q + D1] = !0;
1379
+ <%s key={someKey} {...props} />`, _1, Q, g2, Q), u3[Q + _1] = !0;
1380
1380
  }
1381
1381
  }
1382
1382
  return s === c ? a2($) : i2($), $;
1383
1383
  }
1384
1384
  }
1385
- function u2(s, l, d) {
1386
- return d3(s, l, d, !0);
1385
+ function u2(s, l, u) {
1386
+ return d3(s, l, u, !0);
1387
1387
  }
1388
- function d2(s, l, d) {
1389
- return d3(s, l, d, !1);
1388
+ function d2(s, l, u) {
1389
+ return d3(s, l, u, !1);
1390
1390
  }
1391
1391
  var v2 = d2, h2 = u2;
1392
1392
  i1.Fragment = c, i1.jsx = v2, i1.jsxs = h2;
@@ -1416,30 +1416,30 @@ const He = "_mwfit_ppa3l_1", Fe = {
1416
1416
  reconnect: () => null
1417
1417
  }), qe = ({ children: e }) => {
1418
1418
  const t = W1(), o = I3();
1419
- O1(() => {
1419
+ M1(() => {
1420
1420
  t(k3());
1421
1421
  }, [t]);
1422
1422
  const c = r1(
1423
- (a, p) => {
1424
- t(Pe(a, p));
1423
+ (h, d) => {
1424
+ t(Pe(h, d));
1425
1425
  },
1426
1426
  [t]
1427
1427
  ), r = r1(
1428
- (a, p) => {
1429
- c(a, { value: p });
1428
+ (h, d) => {
1429
+ c(h, { value: d });
1430
1430
  },
1431
1431
  [c]
1432
1432
  ), i = r1(
1433
- (a, p, M) => {
1434
- t(Le(a, p, M));
1433
+ (h, d, M) => {
1434
+ t(Le(h, d, M));
1435
1435
  },
1436
1436
  [t]
1437
1437
  ), v = r1(
1438
- (a, p) => {
1439
- t($e(a, p));
1438
+ (h, d) => {
1439
+ t($e(h, d));
1440
1440
  },
1441
1441
  [t]
1442
- ), g = r1(() => {
1442
+ ), f = r1(() => {
1443
1443
  t(Ae());
1444
1444
  }, [t]);
1445
1445
  return /* @__PURE__ */ n.jsx(
@@ -1450,7 +1450,7 @@ const He = "_mwfit_ppa3l_1", Fe = {
1450
1450
  sendSimpleMessage: r,
1451
1451
  addEventHandler: i,
1452
1452
  removeEventHandler: v,
1453
- reconnect: g
1453
+ reconnect: f
1454
1454
  },
1455
1455
  children: o ? e : /* @__PURE__ */ n.jsx(Ke, {})
1456
1456
  }
@@ -1465,26 +1465,26 @@ function Ge({
1465
1465
  onHold: o,
1466
1466
  holdTimeMs: c = 500
1467
1467
  }) {
1468
- const r = $1(null), i = $1(!1);
1468
+ const r = A1(null), i = A1(!1);
1469
1469
  function v() {
1470
1470
  i.current = !0, e == null || e(), r.current = setTimeout(() => {
1471
1471
  o == null || o(), r.current = null;
1472
1472
  }, c);
1473
1473
  }
1474
- function g() {
1474
+ function f() {
1475
1475
  i.current = !1, t == null || t(), r.current && (clearTimeout(r.current), r.current = null);
1476
1476
  }
1477
- function a() {
1478
- i.current && g();
1477
+ function h() {
1478
+ i.current && f();
1479
1479
  }
1480
1480
  return {
1481
1481
  onPointerDown: v,
1482
- onPointerUp: g,
1483
- onPointerLeave: a
1482
+ onPointerUp: f,
1483
+ onPointerLeave: h
1484
1484
  };
1485
1485
  }
1486
- function h(e, t) {
1487
- const { sendMessage: c } = R(), r = $1(null);
1486
+ function g(e, t) {
1487
+ const { sendMessage: c } = R(), r = A1(null);
1488
1488
  function i() {
1489
1489
  c(`${e}/${t}`, { value: "pressed" }), r.current || (r.current = setInterval(() => {
1490
1490
  c(`${e}/${t}`, { value: "held" });
@@ -1495,8 +1495,8 @@ function h(e, t) {
1495
1495
  }
1496
1496
  return Ge({ onPress: i, onRelease: v });
1497
1497
  }
1498
- function Z1(e) {
1499
- const { sendMessage: t } = R(), o = h(`${e}`, "volumeUp"), c = h(`${e}`, "volumeDown");
1498
+ function S1(e) {
1499
+ const { sendMessage: t } = R(), o = g(`${e}`, "volumeUp"), c = g(`${e}`, "volumeDown");
1500
1500
  return n1(() => ({
1501
1501
  volumeUp: o,
1502
1502
  volumeDown: c,
@@ -1504,7 +1504,7 @@ function Z1(e) {
1504
1504
  }), [e, t, o, c]);
1505
1505
  }
1506
1506
  function V6(e) {
1507
- const { sendMessage: t } = R(), o = h(`${e}`, "volumeUp"), c = h(`${e}`, "volumeDown");
1507
+ const { sendMessage: t } = R(), o = g(`${e}`, "volumeUp"), c = g(`${e}`, "volumeDown");
1508
1508
  return n1(() => ({
1509
1509
  volumeUp: o,
1510
1510
  volumeDown: c,
@@ -1512,7 +1512,7 @@ function V6(e) {
1512
1512
  }), [e, t, o, c]);
1513
1513
  }
1514
1514
  function W3(e, t) {
1515
- const { sendMessage: o, sendSimpleMessage: c } = R(), r = Z1(e);
1515
+ const { sendMessage: o, sendSimpleMessage: c } = R(), r = S1(e);
1516
1516
  return n1(() => {
1517
1517
  if (!r) {
1518
1518
  console.log("baseVolume is undefined");
@@ -1525,14 +1525,14 @@ function W3(e, t) {
1525
1525
  return {
1526
1526
  ...r,
1527
1527
  volumeState: t,
1528
- setLevel: (a) => c(`${e}/level`, a),
1528
+ setLevel: (h) => c(`${e}/level`, h),
1529
1529
  muteOn: () => o(`${e}/muteOn`, null),
1530
1530
  muteOff: () => o(`${e}/muteOff`, null)
1531
1531
  };
1532
1532
  }, [r, t, e, o, c]);
1533
1533
  }
1534
1534
  function U6(e, t) {
1535
- const { sendMessage: o, sendSimpleMessage: c } = R(), r = Z1(e);
1535
+ const { sendMessage: o, sendSimpleMessage: c } = R(), r = S1(e);
1536
1536
  return n1(() => {
1537
1537
  if (!r) {
1538
1538
  console.log("baseVolume is undefined");
@@ -1545,7 +1545,7 @@ function U6(e, t) {
1545
1545
  return {
1546
1546
  ...r,
1547
1547
  volumeState: t,
1548
- setLevel: (a) => c(`${e}/level`, a),
1548
+ setLevel: (h) => c(`${e}/level`, h),
1549
1549
  muteOn: () => o(`${e}/muteOn`, null),
1550
1550
  muteOff: () => o(`${e}/muteOff`, null)
1551
1551
  };
@@ -1568,7 +1568,7 @@ function V3(e) {
1568
1568
  t(`/device/${e}/powerToggle`, null);
1569
1569
  } };
1570
1570
  }
1571
- function k1(e) {
1571
+ function O1(e) {
1572
1572
  const { sendMessage: t } = R(), o = _(e);
1573
1573
  return console.log("deviceState", o), o ? { itemsState: o, selectItem: (r) => {
1574
1574
  t(`/device/${e}/${r}`, null);
@@ -1579,14 +1579,14 @@ function ze(e) {
1579
1579
  t(`/device/${e}/setDefaultChannelLevels`, null);
1580
1580
  }, r = () => {
1581
1581
  if ((o == null ? void 0 : o.levelControls) === void 0) return;
1582
- Object.keys(o == null ? void 0 : o.levelControls).forEach((g) => {
1583
- t(`/device/${e}/${g}/fullStatus`, null);
1582
+ Object.keys(o == null ? void 0 : o.levelControls).forEach((f) => {
1583
+ t(`/device/${e}/${f}/fullStatus`, null);
1584
1584
  });
1585
1585
  };
1586
1586
  return o ? { levelControls: o.levelControls, setDefaultChannelLevels: c, getFullStatus: r } : void 0;
1587
1587
  }
1588
1588
  function H6(e) {
1589
- const t = _(e), o = V3(e), c = k1(e), r = k1(e), i = Ye(e), v = ze(e);
1589
+ const t = _(e), o = V3(e), c = O1(e), r = O1(e), i = Ye(e), v = ze(e);
1590
1590
  if (t)
1591
1591
  return {
1592
1592
  avrState: t,
@@ -1599,7 +1599,7 @@ function H6(e) {
1599
1599
  }
1600
1600
  const F6 = ({ className: e }) => {
1601
1601
  const [t, o] = Y();
1602
- return O1(() => {
1602
+ return M1(() => {
1603
1603
  setInterval(() => {
1604
1604
  const c = (/* @__PURE__ */ new Date()).toLocaleTimeString("en-US", { hour12: !0, hour: "numeric", minute: "numeric" });
1605
1605
  o(c);
@@ -1611,8 +1611,8 @@ const F6 = ({ className: e }) => {
1611
1611
  };
1612
1612
  function K6(e) {
1613
1613
  const { sendMessage: t } = R(), o = _(e), c = `/device/${e}`;
1614
- return o ? { state: o, recallPreset: (v, g) => {
1615
- t(`${c}/presets/recall`, { deviceKey: v, preset: g });
1614
+ return o ? { state: o, recallPreset: (v, f) => {
1615
+ t(`${c}/presets/recall`, { deviceKey: v, preset: f });
1616
1616
  }, savePresets: (v) => {
1617
1617
  t(`${c}/presets/save`, v);
1618
1618
  } } : void 0;
@@ -1623,11 +1623,11 @@ function q6(e) {
1623
1623
  return { endpointState: t };
1624
1624
  }
1625
1625
  function G6(e) {
1626
- const t = `/device/${e}`, o = h(t, "chanUp"), c = h(t, "chanDown"), r = h(t, "lastChan"), i = h(t, "guide"), v = h(t, "info"), g = h(t, "exit");
1627
- return { channelUp: o, channelDown: c, lastChannel: r, guide: i, info: v, exit: g };
1626
+ const t = `/device/${e}`, o = g(t, "chanUp"), c = g(t, "chanDown"), r = g(t, "lastChan"), i = g(t, "guide"), v = g(t, "info"), f = g(t, "exit");
1627
+ return { channelUp: o, channelDown: c, lastChannel: r, guide: i, info: v, exit: f };
1628
1628
  }
1629
1629
  function Y6(e) {
1630
- const t = `/device/${e}`, o = h(t, "red"), c = h(t, "green"), r = h(t, "yellow"), i = h(t, "blue");
1630
+ const t = `/device/${e}`, o = g(t, "red"), c = g(t, "green"), r = g(t, "yellow"), i = g(t, "blue");
1631
1631
  return { red: o, green: c, yellow: r, blue: i };
1632
1632
  }
1633
1633
  function z6(e) {
@@ -1643,20 +1643,20 @@ function J6(e) {
1643
1643
  return t.deviceInfo || void 0;
1644
1644
  }
1645
1645
  function X6(e) {
1646
- const t = `/device/${e}`, o = h(t, "up"), c = h(t, "down"), r = h(t, "left"), i = h(t, "right"), v = h(t, "select"), g = h(t, "menu"), a = h(t, "exit");
1647
- return { up: o, down: c, left: r, right: i, select: v, menu: g, exit: a };
1646
+ const t = `/device/${e}`, o = g(t, "up"), c = g(t, "down"), r = g(t, "left"), i = g(t, "right"), v = g(t, "select"), f = g(t, "menu"), h = g(t, "exit");
1647
+ return { up: o, down: c, left: r, right: i, select: v, menu: f, exit: h };
1648
1648
  }
1649
1649
  function Q6(e) {
1650
- const { sendMessage: t } = R(), o = `/device/${e}`, c = _(e), r = h(o, "cameraUp"), i = h(o, "cameraDown"), v = h(o, "cameraLeft"), g = h(o, "cameraRight"), a = h(o, "cameraZoomIn"), p = h(o, "cameraZoomOut"), M = (P) => t("/camera/recallPreset", P);
1650
+ const { sendMessage: t } = R(), o = `/device/${e}`, c = _(e), r = g(o, "cameraUp"), i = g(o, "cameraDown"), v = g(o, "cameraLeft"), f = g(o, "cameraRight"), h = g(o, "cameraZoomIn"), d = g(o, "cameraZoomOut"), M = (P) => t("/camera/recallPreset", P);
1651
1651
  if (c)
1652
1652
  return {
1653
1653
  state: c,
1654
- zoomIn: a,
1655
- zoomOut: p,
1654
+ zoomIn: h,
1655
+ zoomOut: d,
1656
1656
  up: r,
1657
1657
  down: i,
1658
1658
  left: v,
1659
- right: g,
1659
+ right: f,
1660
1660
  recallPreset: M
1661
1661
  };
1662
1662
  }
@@ -1670,7 +1670,7 @@ function N6(e) {
1670
1670
  } };
1671
1671
  }
1672
1672
  function et(e) {
1673
- const t = `/device/${e}`, o = h(t, "dvrList"), c = h(t, "record");
1673
+ const t = `/device/${e}`, o = g(t, "dvrList"), c = g(t, "record");
1674
1674
  return { dvrList: o, record: c };
1675
1675
  }
1676
1676
  function tt(e) {
@@ -1681,10 +1681,10 @@ function tt(e) {
1681
1681
  t(`/device/${e}/setManualMode`, null);
1682
1682
  }, toggleMode: () => {
1683
1683
  t(`/device/${e}/toggleMode`, null);
1684
- }, togglePartitionState: (a) => {
1685
- t(`/device/${e}/togglePartitionState`, a);
1686
- }, setRoomCombinationScenario: (a) => {
1687
- t(`/device/${e}/setRoomCombinationScenario`, a);
1684
+ }, togglePartitionState: (h) => {
1685
+ t(`/device/${e}/togglePartitionState`, h);
1686
+ }, setRoomCombinationScenario: (h) => {
1687
+ t(`/device/${e}/setRoomCombinationScenario`, h);
1688
1688
  } } : void 0;
1689
1689
  }
1690
1690
  function nt(e) {
@@ -1730,20 +1730,20 @@ function lt(e) {
1730
1730
  } };
1731
1731
  }
1732
1732
  function it(e) {
1733
- const t = `/device/${e}`, o = h(t, "num0"), c = h(t, "num1"), r = h(t, "num2"), i = h(t, "num3"), v = h(t, "num4"), g = h(t, "num5"), a = h(t, "num6"), p = h(t, "num7"), M = h(t, "num8"), P = h(t, "num9"), H = h(t, "numDash"), u = h(t, "numEnter");
1733
+ const t = `/device/${e}`, o = g(t, "num0"), c = g(t, "num1"), r = g(t, "num2"), i = g(t, "num3"), v = g(t, "num4"), f = g(t, "num5"), h = g(t, "num6"), d = g(t, "num7"), M = g(t, "num8"), P = g(t, "num9"), H = g(t, "numDash"), a = g(t, "numEnter");
1734
1734
  return {
1735
1735
  digit0: o,
1736
1736
  digit1: c,
1737
1737
  digit2: r,
1738
1738
  digit3: i,
1739
1739
  digit4: v,
1740
- digit5: g,
1741
- digit6: a,
1742
- digit7: p,
1740
+ digit5: f,
1741
+ digit6: h,
1742
+ digit7: d,
1743
1743
  digit8: M,
1744
1744
  digit9: P,
1745
1745
  keypadAccessoryButton1: H,
1746
- keypadAccessoryButton2: u
1746
+ keypadAccessoryButton2: a
1747
1747
  };
1748
1748
  }
1749
1749
  function at(e) {
@@ -1755,7 +1755,7 @@ function at(e) {
1755
1755
  } } : void 0;
1756
1756
  }
1757
1757
  function ut(e) {
1758
- const { sendMessage: t } = R(), o = x1(e);
1758
+ const { sendMessage: t } = R(), o = Z1(e);
1759
1759
  return o ? { roomEventScheduleState: o, save: (r) => {
1760
1760
  t(`/room/${e}/saveScheduledEvents`, r);
1761
1761
  } } : void 0;
@@ -1779,7 +1779,7 @@ function ht(e) {
1779
1779
  } };
1780
1780
  }
1781
1781
  function gt(e) {
1782
- const t = `/device/${e}`, o = h(t, "chanUp"), c = h(t, "chanDown");
1782
+ const t = `/device/${e}`, o = g(t, "chanUp"), c = g(t, "chanDown");
1783
1783
  return { dvrList: o, replay: c };
1784
1784
  }
1785
1785
  function ft(e) {
@@ -1793,9 +1793,9 @@ function ft(e) {
1793
1793
  } } : void 0;
1794
1794
  }
1795
1795
  function wt(e) {
1796
- const { sendMessage: t } = R(), o = x1(e);
1797
- return o ? { shutdownPromptTimerState: o, setShutdownPromptSeconds: (g) => {
1798
- t(`/room/${e}/setShutdownPromptSeconds`, g);
1796
+ const { sendMessage: t } = R(), o = Z1(e);
1797
+ return o ? { shutdownPromptTimerState: o, setShutdownPromptSeconds: (f) => {
1798
+ t(`/room/${e}/setShutdownPromptSeconds`, f);
1799
1799
  }, shutdownStart: () => {
1800
1800
  t(`/room/${e}/shutdownStart`, null);
1801
1801
  }, shutdownEnd: () => {
@@ -1813,7 +1813,7 @@ function mt(e) {
1813
1813
  } } : void 0;
1814
1814
  }
1815
1815
  function pt(e) {
1816
- const { sendMessage: t } = R(), o = x1(e);
1816
+ const { sendMessage: t } = R(), o = Z1(e);
1817
1817
  return o ? { techPasswordState: o, validatePassword: (i) => {
1818
1818
  t(`/room/${e}/validateTechPassword`, { password: i });
1819
1819
  }, setPassword: (i, v) => {
@@ -1834,16 +1834,16 @@ function xt(e) {
1834
1834
  };
1835
1835
  }
1836
1836
  function Zt(e) {
1837
- const t = `/device/${e}`, o = h(t, "play"), c = h(t, "pause"), r = h(t, "stop"), i = h(t, "prevTrack"), v = h(t, "nextTrack"), g = h(t, "rewind"), a = h(t, "ffwd"), p = h(t, "record");
1837
+ const t = `/device/${e}`, o = g(t, "play"), c = g(t, "pause"), r = g(t, "stop"), i = g(t, "prevTrack"), v = g(t, "nextTrack"), f = g(t, "rewind"), h = g(t, "ffwd"), d = g(t, "record");
1838
1838
  return {
1839
1839
  play: o,
1840
1840
  pause: c,
1841
1841
  stop: r,
1842
1842
  prevTrack: i,
1843
1843
  nextTrack: v,
1844
- rewind: g,
1845
- fastForward: a,
1846
- record: p
1844
+ rewind: f,
1845
+ fastForward: h,
1846
+ record: d
1847
1847
  };
1848
1848
  }
1849
1849
  function St(e) {
@@ -1863,7 +1863,7 @@ function St(e) {
1863
1863
  } : void 0;
1864
1864
  }
1865
1865
  function jt(e) {
1866
- const t = _(e), o = V3(e), c = k1(e);
1866
+ const t = _(e), o = V3(e), c = O1(e);
1867
1867
  if (!t) return;
1868
1868
  const r = (t.powerState || t.isWarming) && !t.isCooling, i = (!t.powerState || t.isCooling) && !t.isWarming;
1869
1869
  return {
@@ -1875,73 +1875,75 @@ function jt(e) {
1875
1875
  }
1876
1876
  function Ct(e) {
1877
1877
  const t = `/device/${e}`;
1878
- return Z1(t);
1878
+ return S1(t);
1879
1879
  }
1880
1880
  const bt = ({
1881
1881
  config: e
1882
1882
  }, t = !0) => {
1883
- const { sendMessage: o } = R();
1884
- return n1(() => {
1885
- var r, i, v, g;
1883
+ const { sendMessage: o } = R(), c = n1(() => {
1884
+ var i, v, f, h;
1885
+ const r = /* @__PURE__ */ new Set();
1886
1886
  if (!e)
1887
- return;
1888
- const c = /* @__PURE__ */ new Set();
1889
- if (e.destinations && Object.values(e.destinations).forEach((a) => {
1890
- c.add(a);
1891
- }), e.destinationList && Object.values(e.destinationList).forEach((a) => {
1892
- c.add(a.sinkKey);
1893
- }), e.audioControlPointList && Object.values((r = e.audioControlPointList) == null ? void 0 : r.levelControls).forEach(
1894
- (a) => {
1895
- a.itemKey ? c.add(a.parentDeviceKey + "--" + a.itemKey) : c.add(a.parentDeviceKey);
1887
+ return r;
1888
+ if (e.destinations && Object.values(e.destinations).forEach((d) => {
1889
+ r.add(d);
1890
+ }), e.destinationList && Object.values(e.destinationList).forEach((d) => {
1891
+ r.add(d.sinkKey);
1892
+ }), e.audioControlPointList && Object.values((i = e.audioControlPointList) == null ? void 0 : i.levelControls).forEach(
1893
+ (d) => {
1894
+ d.itemKey ? r.add(d.parentDeviceKey + "--" + d.itemKey) : r.add(d.parentDeviceKey);
1896
1895
  }
1897
- ), (i = e.touchpanelKeys) == null || i.forEach((a) => {
1898
- c.add(a);
1899
- }), (v = e.environmentalDevices) == null || v.forEach((a) => {
1900
- a.deviceKey && c.add(a.deviceKey);
1901
- }), (g = e.accessoryDeviceKeys) == null || g.forEach((a) => {
1902
- c.add(a);
1903
- }), e.audioCodecKey && c.add(e.audioCodecKey), e.videoCodecKey && c.add(e.videoCodecKey), e.matrixRoutingKey && c.add(e.matrixRoutingKey), e.roomCombinerKey && c.add(e.roomCombinerKey), e.endpointKeys && e.endpointKeys.forEach((a) => {
1904
- c.add(a);
1896
+ ), (v = e.touchpanelKeys) == null || v.forEach((d) => {
1897
+ r.add(d);
1898
+ }), (f = e.environmentalDevices) == null || f.forEach((d) => {
1899
+ d.deviceKey && r.add(d.deviceKey);
1900
+ }), (h = e.accessoryDeviceKeys) == null || h.forEach((d) => {
1901
+ r.add(d);
1902
+ }), e.audioCodecKey && r.add(e.audioCodecKey), e.videoCodecKey && r.add(e.videoCodecKey), e.matrixRoutingKey && r.add(e.matrixRoutingKey), e.roomCombinerKey && r.add(e.roomCombinerKey), e.endpointKeys && e.endpointKeys.forEach((d) => {
1903
+ r.add(d);
1905
1904
  }), e.sourceList)
1906
- for (const a of Object.values(e.sourceList))
1907
- a.sourceKey && a.sourceKey !== "$off" && c.add(a.sourceKey);
1908
- return console.log("requesting state for deviceKeys:", c), t && c.forEach((a) => {
1909
- o(`/device/${a}/fullStatus`, { deviceKey: a });
1910
- }), c;
1911
- }, [e, o, t]);
1905
+ for (const d of Object.values(e.sourceList))
1906
+ d.sourceKey && d.sourceKey !== "$off" && r.add(d.sourceKey);
1907
+ return r;
1908
+ }, [e]);
1909
+ return M1(() => {
1910
+ !t || c.size === 0 || (console.log("requesting state for deviceKeys:", c), c.forEach((r) => {
1911
+ o(`/device/${r}/fullStatus`, { deviceKey: r });
1912
+ }));
1913
+ }, [c, t, o]), c;
1912
1914
  };
1913
1915
  function yt(e, t) {
1914
1916
  const [o, c] = Y(!1), [r, i] = Y(!1);
1915
1917
  return Z3(() => {
1916
- const { current: v } = e, g = () => {
1917
- const a = v && v.scrollHeight > v.clientHeight, p = v && v.scrollWidth > v.clientWidth;
1918
- i(a ?? !1), c(p ?? !1), t && t(a ?? !1, p ?? !1);
1918
+ const { current: v } = e, f = () => {
1919
+ const h = v && v.scrollHeight > v.clientHeight, d = v && v.scrollWidth > v.clientWidth;
1920
+ i(h ?? !1), c(d ?? !1), t && t(h ?? !1, d ?? !1);
1919
1921
  };
1920
- v && g();
1922
+ v && f();
1921
1923
  }, [e, t]), { overflowHorizontal: o, overflowVertical: r };
1922
1924
  }
1923
1925
  function It(e, t) {
1924
1926
  const o = `/room/${e}/volumes/${t}`;
1925
- return Z1(o);
1927
+ return S1(o);
1926
1928
  }
1927
1929
  function Rt(e, t) {
1928
1930
  const o = te(e, t), c = `/room/${e}/volumes/${t}`;
1929
1931
  return W3(c, o);
1930
1932
  }
1931
1933
  function Et(e) {
1932
- var g, a;
1933
- const [t, o] = Y(((g = e == null ? void 0 : e.current) == null ? void 0 : g.scrollLeft) ?? 0), [c, r] = Y(((a = e == null ? void 0 : e.current) == null ? void 0 : a.scrollTop) ?? 0), i = (p) => {
1934
+ var f, h;
1935
+ const [t, o] = Y(((f = e == null ? void 0 : e.current) == null ? void 0 : f.scrollLeft) ?? 0), [c, r] = Y(((h = e == null ? void 0 : e.current) == null ? void 0 : h.scrollTop) ?? 0), i = (d) => {
1934
1936
  const { current: M } = e;
1935
- M && (console.log(M.scrollLeft), M.scrollLeft += p, console.log(M.scrollLeft));
1936
- }, v = (p) => {
1937
+ M && (console.log(M.scrollLeft), M.scrollLeft += d, console.log(M.scrollLeft));
1938
+ }, v = (d) => {
1937
1939
  const { current: M } = e;
1938
- M && (console.log(M.scrollTop), M.scrollTop += p, console.log(M.scrollTop));
1940
+ M && (console.log(M.scrollTop), M.scrollTop += d, console.log(M.scrollTop));
1939
1941
  };
1940
1942
  return Z3(() => {
1941
- const { current: p } = e, M = () => {
1942
- o((p == null ? void 0 : p.scrollLeft) ?? 0), r((p == null ? void 0 : p.scrollTop) ?? 0);
1943
+ const { current: d } = e, M = () => {
1944
+ o((d == null ? void 0 : d.scrollLeft) ?? 0), r((d == null ? void 0 : d.scrollTop) ?? 0);
1943
1945
  };
1944
- p && M();
1946
+ d && M();
1945
1947
  }, [e]), { horizontalScrollPosition: t, verticalScrollPosition: c, scrollHorizontal: i, scrollVertical: v };
1946
1948
  }
1947
1949
  function Tt(e) {
@@ -1970,7 +1972,7 @@ function _t() {
1970
1972
  const i = (/* @__PURE__ */ new Date()).toLocaleTimeString("en-US", { hour12: !0, hour: "numeric", minute: "numeric" });
1971
1973
  c(i);
1972
1974
  }
1973
- return O1(() => {
1975
+ return M1(() => {
1974
1976
  r();
1975
1977
  const i = setInterval(() => {
1976
1978
  r();
@@ -2001,7 +2003,7 @@ const Pt = () => {
2001
2003
  ),
2002
2004
  e && /* @__PURE__ */ n.jsx("p", { children: r })
2003
2005
  ] });
2004
- }, Je = "_iconbtn_16qss_1", Xe = "_iconbtnvert_16qss_7", Qe = "_iconsm_16qss_18", P1 = {
2006
+ }, Je = "_iconbtn_16qss_1", Xe = "_iconbtnvert_16qss_7", Qe = "_iconsm_16qss_18", L1 = {
2005
2007
  iconbtn: Je,
2006
2008
  iconbtnvert: Xe,
2007
2009
  iconsm: Qe
@@ -2013,23 +2015,23 @@ const Pt = () => {
2013
2015
  iconClassName: r = "",
2014
2016
  otherContentClassName: i = "",
2015
2017
  disabled: v,
2016
- feedback: g,
2017
- feedbackClassName: a,
2018
- onPointerDown: p,
2018
+ feedback: f,
2019
+ feedbackClassName: h,
2020
+ onPointerDown: d,
2019
2021
  onPointerUp: M,
2020
2022
  onPointerLeave: P,
2021
2023
  ...H
2022
2024
  }) => {
2023
- const [u, Z] = Y(!1), j = !v && g ? a : "", C = !v && (u || g);
2025
+ const [a, Z] = Y(!1), j = !v && f ? h : "", C = !v && (a || f);
2024
2026
  return /* @__PURE__ */ n.jsxs(
2025
2027
  "button",
2026
2028
  {
2027
2029
  type: "button",
2028
- className: `${P1.iconbtn} ${o ? P1.iconbtnvert : ""} ${c} ${j}`,
2030
+ className: `${L1.iconbtn} ${o ? L1.iconbtnvert : ""} ${c} ${j}`,
2029
2031
  ...H,
2030
2032
  disabled: v,
2031
2033
  onPointerDown: (b) => {
2032
- Z(!0), p == null || p(b);
2034
+ Z(!0), d == null || d(b);
2033
2035
  },
2034
2036
  onPointerUp: (b) => {
2035
2037
  Z(!1), M == null || M(b);
@@ -2041,7 +2043,7 @@ const Pt = () => {
2041
2043
  e && /* @__PURE__ */ n.jsx(
2042
2044
  e,
2043
2045
  {
2044
- className: `${r || P1.iconsm}`,
2046
+ className: `${r || L1.iconsm}`,
2045
2047
  active: C,
2046
2048
  disabled: v
2047
2049
  }
@@ -3724,13 +3726,13 @@ const P8 = "_grid_1cmpp_1", L8 = "_header_1cmpp_11", $8 = "_content_1cmpp_17", A
3724
3726
  /* @__PURE__ */ n.jsx("div", { className: p1.header, children: t }),
3725
3727
  c && /* @__PURE__ */ n.jsx("div", { className: p1.leftNav, children: c }),
3726
3728
  /* @__PURE__ */ n.jsx("div", { className: p1.content, children: o })
3727
- ] }), V8 = "_grid_1uwfo_1", U8 = "_header_1uwfo_11", H8 = "_content_1uwfo_17", L1 = {
3729
+ ] }), V8 = "_grid_1uwfo_1", U8 = "_header_1uwfo_11", H8 = "_content_1uwfo_17", $1 = {
3728
3730
  grid: V8,
3729
3731
  header: U8,
3730
3732
  content: H8
3731
- }, kt = ({ className: e, header: t, content: o }) => /* @__PURE__ */ n.jsxs("div", { className: `${e} ${L1.grid}`, children: [
3732
- /* @__PURE__ */ n.jsx("div", { className: L1.header, children: t }),
3733
- /* @__PURE__ */ n.jsx("div", { className: L1.content, children: o })
3733
+ }, kt = ({ className: e, header: t, content: o }) => /* @__PURE__ */ n.jsxs("div", { className: `${e} ${$1.grid}`, children: [
3734
+ /* @__PURE__ */ n.jsx("div", { className: $1.header, children: t }),
3735
+ /* @__PURE__ */ n.jsx("div", { className: $1.content, children: o })
3734
3736
  ] });
3735
3737
  class Ot {
3736
3738
  constructor() {
@@ -3865,9 +3867,9 @@ export {
3865
3867
  Q8 as useApiPath,
3866
3868
  X8 as useAppConfig,
3867
3869
  W1 as useAppDispatch,
3868
- f as useAppSelector,
3870
+ w as useAppSelector,
3869
3871
  H6 as useAvrControl,
3870
- h as useButtonHeldHeartbeat,
3872
+ g as useButtonHeldHeartbeat,
3871
3873
  Q6 as useCameraBase,
3872
3874
  S6 as useClientId,
3873
3875
  Ct as useDeviceIBasicVolume,
@@ -3887,7 +3889,7 @@ export {
3887
3889
  s6 as useGetRoom,
3888
3890
  M6 as useGetRoomDisplayStates,
3889
3891
  x6 as useGetZoomRoomControllerKey,
3890
- Z1 as useIBasicVolume,
3892
+ S1 as useIBasicVolume,
3891
3893
  W3 as useIBasicVolumeWithFeedback,
3892
3894
  G6 as useIChannel,
3893
3895
  Y6 as useIColor,
@@ -3899,7 +3901,7 @@ export {
3899
3901
  tt as useIEssentialsRoomCombiner,
3900
3902
  nt as useIHasCameras,
3901
3903
  V3 as useIHasPowerControl,
3902
- k1 as useIHasSelectableItems,
3904
+ O1 as useIHasSelectableItems,
3903
3905
  ot as useIHumiditySensor,
3904
3906
  st as useILevelControls,
3905
3907
  ct as useILightingScenes,
@@ -3947,7 +3949,7 @@ export {
3947
3949
  d6 as useRoomProgramAudioDestinationKey,
3948
3950
  p6 as useRoomShareState,
3949
3951
  r6 as useRoomSourceList,
3950
- x1 as useRoomState,
3952
+ Z1 as useRoomState,
3951
3953
  te as useRoomVolume,
3952
3954
  y6 as useRuntimeInfo,
3953
3955
  Et as useScroll,