@glydeunity/voice-sdk 1.5.12 → 1.5.13

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.
@@ -196,20 +196,20 @@ class yg {
196
196
  if (!this.active) {
197
197
  this.active = !0;
198
198
  try {
199
- this.config.systemPrompt || (this.serverConfig = await this.fetchConfig(), console.log("[GlydeVoice] Fetched config:", this.serverConfig));
199
+ this.serverConfig = await this.fetchConfig(), console.log("[GlydeVoice] Fetched config:", this.serverConfig);
200
200
  const f = {
201
201
  context_id: this.config.contextId,
202
202
  domain: typeof window < "u" ? window.location.hostname : "localhost"
203
203
  };
204
- this.config.systemPrompt && (f.system_prompt = this.config.systemPrompt), this.config.deepgramConfig && (f.deepgram_config = this.config.deepgramConfig);
204
+ this.config.deepgramConfig && (f.deepgram_config = this.config.deepgramConfig), this.conversationHistory.length > 0 && (f.conversation_history = this.conversationHistory);
205
205
  const y = await fetch(`${this.unityUrl}/api/unity/voice/auth`, {
206
206
  method: "POST",
207
207
  headers: this.getAuthHeaders(),
208
208
  body: JSON.stringify(f)
209
209
  });
210
210
  if (!y.ok) {
211
- const U = await y.json();
212
- throw new Error(U.error?.message || U.message || "Failed to authenticate voice session");
211
+ const D = await y.json();
212
+ throw new Error(D.error?.message || D.message || "Failed to authenticate voice session");
213
213
  }
214
214
  const { data: M } = await y.json(), { token: o, agent_config: O, deepgram_config: H } = M;
215
215
  this.setSessionContext({
@@ -218,26 +218,20 @@ class yg {
218
218
  contextType: this.config.contextType,
219
219
  currentJobUuid: O?.job_uuid
220
220
  });
221
- let X = this.config.systemPrompt || O.instructions || this.serverConfig?.system_prompt || "You are a helpful AI assistant.";
222
- this.conversationHistory && this.conversationHistory.length > 0 && (X = `Previous conversation context:
223
- ${this.conversationHistory.map((j) => `${j.role === "agent" ? "Assistant" : "User"}: ${j.content}`).join(`
224
- `)}
225
-
226
- IMPORTANT: This is a continuation of a previous conversation. When the user starts speaking, you must first greet them warmly and acknowledge that you're continuing the conversation. Say something like "Welcome back! I'm glad you're continuing our conversation. How can I help you today?" or similar, then continue naturally based on the previous context.
227
-
228
- ${X}`), await this.initializeAudio();
229
- let D = "wss://agent.deepgram.com/v1/agent/converse";
221
+ const V = O?.instructions || this.serverConfig?.system_prompt || "You are a helpful AI assistant.";
222
+ await this.initializeAudio();
223
+ let U = "wss://agent.deepgram.com/v1/agent/converse";
230
224
  const S = this.config.deepgramConfig || H || this.serverConfig?.deepgram_config;
231
225
  if (S?.tags && S.tags.length > 0) {
232
- const U = new URLSearchParams();
233
- S.tags.forEach((j) => U.append("tag", j)), D += `?${U.toString()}`;
226
+ const D = new URLSearchParams();
227
+ S.tags.forEach((R) => D.append("tag", R)), U += `?${D.toString()}`;
234
228
  }
235
- this.ws = new WebSocket(D, ["bearer", o]), this.ws.onopen = () => {
236
- const U = S || {
229
+ this.ws = new WebSocket(U, ["bearer", o]), this.ws.onopen = () => {
230
+ const D = S || {
237
231
  think: { provider: { type: "open_ai", model: "gpt-4.1-nano" } },
238
232
  speak: { provider: { type: "deepgram", model: "aura-2-thalia-en" } },
239
233
  listen: { provider: { type: "deepgram", version: "v2", model: "flux-general-en" } }
240
- }, j = {
234
+ }, R = {
241
235
  type: "Settings",
242
236
  audio: {
243
237
  input: {
@@ -252,30 +246,36 @@ ${X}`), await this.initializeAudio();
252
246
  },
253
247
  agent: {
254
248
  language: "en",
255
- speak: U.speak || {
249
+ speak: D.speak || {
256
250
  provider: { type: "deepgram", model: "aura-2-thalia-en" }
257
251
  },
258
- listen: U.listen || {
252
+ listen: D.listen || {
259
253
  provider: { type: "deepgram", version: "v2", model: "flux-general-en" }
260
254
  },
261
255
  think: {
262
- provider: U.think?.provider || { type: "open_ai", model: "gpt-4.1-nano" },
263
- // Functions come from server config - no client-side defaults
264
- ...U.think?.functions && { functions: U.think.functions }
256
+ provider: D.think?.provider || { type: "open_ai", model: "gpt-4.1-nano" },
257
+ // Server functions plus optional client-added tools only
258
+ ...((D.think?.functions?.length || 0) > 0 || (this.config.additionalFunctions?.length || 0) > 0) && {
259
+ functions: [
260
+ ...D.think?.functions || [],
261
+ ...this.config.additionalFunctions || []
262
+ ]
263
+ }
265
264
  },
266
- // Only show greeting if there's no previous conversation history
267
- // When resuming a conversation, skip the greeting to continue naturally
268
- ...!this.conversationHistory || this.conversationHistory.length === 0 ? { greeting: "Hi! I'm excited you chose to speak with me. Are you ready to start?" } : {}
265
+ // Greeting is server-controlled; only set when server provides it
266
+ ...(O?.greeting ?? D?.greeting) && {
267
+ greeting: O?.greeting ?? D?.greeting
268
+ }
269
269
  }
270
270
  };
271
- U.tags && U.tags.length > 0 && (j.tags = U.tags), this.ws.send(JSON.stringify(j)), this.emit({ type: "open", payload: { config: O, serverConfig: this.serverConfig } });
271
+ D.tags && D.tags.length > 0 && (R.tags = D.tags), this.ws.send(JSON.stringify(R)), this.emit({ type: "open", payload: { config: O, serverConfig: this.serverConfig } });
272
272
  };
273
- const Y = X;
274
- this.ws.onmessage = (U) => {
275
- if (typeof U.data == "string") {
273
+ const Y = V;
274
+ this.ws.onmessage = (D) => {
275
+ if (typeof D.data == "string") {
276
276
  try {
277
- const j = JSON.parse(U.data);
278
- if (j.type === "SettingsApplied") {
277
+ const R = JSON.parse(D.data);
278
+ if (R.type === "SettingsApplied") {
279
279
  const w = {
280
280
  type: "UpdatePrompt",
281
281
  prompt: Y
@@ -286,15 +286,15 @@ ${X}`), await this.initializeAudio();
286
286
  });
287
287
  }, 500);
288
288
  }
289
- j.type === "PromptUpdated" && (this.mediaStream || this.startMicrophone().catch((w) => {
289
+ R.type === "PromptUpdated" && (this.mediaStream || this.startMicrophone().catch((w) => {
290
290
  console.error("[GlydeVoice] Failed to start microphone:", w);
291
291
  }));
292
292
  } catch {
293
293
  }
294
- this.handleTextMessage(U.data);
295
- } else U.data instanceof Blob ? this.handleAudioData(U.data) : U.data instanceof ArrayBuffer && this.handleAudioBuffer(U.data);
296
- }, this.ws.onerror = (U) => {
297
- console.error("[GlydeVoice] WebSocket error:", U), this.emit({ type: "error", payload: U });
294
+ this.handleTextMessage(D.data);
295
+ } else D.data instanceof Blob ? this.handleAudioData(D.data) : D.data instanceof ArrayBuffer && this.handleAudioBuffer(D.data);
296
+ }, this.ws.onerror = (D) => {
297
+ console.error("[GlydeVoice] WebSocket error:", D), this.emit({ type: "error", payload: D });
298
298
  }, this.ws.onclose = () => {
299
299
  this.cleanup(), this.emit({ type: "close" });
300
300
  }, this.renderUI();
@@ -397,13 +397,13 @@ ${X}`), await this.initializeAudio();
397
397
  const o = M === y ? f : f.slice(0, M), O = new Int16Array(o), H = new Float32Array(O.length);
398
398
  for (let S = 0; S < O.length; S++)
399
399
  H[S] = O[S] / 32768;
400
- const X = this.resample24kTo48k(H);
400
+ const V = this.resample24kTo48k(H);
401
401
  !this.isAgentSpeaking && !this.agentAudioDoneReceived && (this.isAgentSpeaking = !0, this.emit({ type: "agent_speaking", payload: !0 }));
402
- const D = new Float32Array(X);
402
+ const U = new Float32Array(V);
403
403
  this.playbackWorkletNode.port.postMessage({
404
404
  type: "audio",
405
- data: D
406
- }, [D.buffer]);
405
+ data: U
406
+ }, [U.buffer]);
407
407
  }
408
408
  /**
409
409
  * Resample audio from 24kHz to 48kHz using linear interpolation
@@ -411,8 +411,8 @@ ${X}`), await this.initializeAudio();
411
411
  resample24kTo48k(f) {
412
412
  const y = f.length * 2, M = new Float32Array(y);
413
413
  for (let O = 0; O < f.length - 1; O++) {
414
- const H = f[O], X = f[O + 1];
415
- M[O * 2] = H, M[O * 2 + 1] = (H + X) / 2;
414
+ const H = f[O], V = f[O + 1];
415
+ M[O * 2] = H, M[O * 2 + 1] = (H + V) / 2;
416
416
  }
417
417
  const o = f.length - 1;
418
418
  return M[o * 2] = f[o], M[o * 2 + 1] = f[o], M;
@@ -587,15 +587,15 @@ ${X}`), await this.initializeAudio();
587
587
  })
588
588
  });
589
589
  if (!o.ok) {
590
- const H = await o.json().catch(() => ({})), X = H.error?.message || H.message || `HTTP ${o.status}`;
591
- throw console.error("[GlydeVoice] Voice function API call failed:", o.status, X), new Error(X);
590
+ const H = await o.json().catch(() => ({})), V = H.error?.message || H.message || `HTTP ${o.status}`;
591
+ throw console.error("[GlydeVoice] Voice function API call failed:", o.status, V), new Error(V);
592
592
  }
593
593
  const O = await o.json();
594
594
  if (O.success && O.data?.output !== void 0) {
595
595
  const H = O.data.output;
596
596
  if (typeof H == "object" && H !== null && H.success === !1) {
597
- const X = H.error ?? H.fallback_message;
598
- console.warn("[GlydeVoice] Voice function backend reported failure:", f, X);
597
+ const V = H.error ?? H.fallback_message;
598
+ console.warn("[GlydeVoice] Voice function backend reported failure:", f, V);
599
599
  }
600
600
  return typeof H == "string" ? H : JSON.stringify(H);
601
601
  }
@@ -749,14 +749,14 @@ class gg {
749
749
  })
750
750
  });
751
751
  if (!M.ok) {
752
- const X = await M.json().catch(() => ({}));
753
- throw new Error(X.error?.message || X.message || "Failed to send message");
752
+ const V = await M.json().catch(() => ({}));
753
+ throw new Error(V.error?.message || V.message || "Failed to send message");
754
754
  }
755
755
  const o = await M.json();
756
756
  o.history?.messages && (this.history = o.history.messages.filter(
757
- (X) => X.role !== "system"
757
+ (V) => V.role !== "system"
758
758
  ));
759
- const O = [...this.history].reverse().find((X) => X.role === "assistant");
759
+ const O = [...this.history].reverse().find((V) => V.role === "assistant");
760
760
  return O ? (this.config.onMessage && this.config.onMessage(O), this.emit({ type: "message", payload: O }), O) : {
761
761
  role: "assistant",
762
762
  content: o.response || "I received your message.",
@@ -808,7 +808,7 @@ function vg() {
808
808
  if (Md) return K;
809
809
  Md = 1;
810
810
  var g = { env: { NODE_ENV: "production" } };
811
- var f = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), M = /* @__PURE__ */ Symbol.for("react.fragment"), o = /* @__PURE__ */ Symbol.for("react.strict_mode"), O = /* @__PURE__ */ Symbol.for("react.profiler"), H = /* @__PURE__ */ Symbol.for("react.consumer"), X = /* @__PURE__ */ Symbol.for("react.context"), D = /* @__PURE__ */ Symbol.for("react.forward_ref"), S = /* @__PURE__ */ Symbol.for("react.suspense"), Y = /* @__PURE__ */ Symbol.for("react.memo"), U = /* @__PURE__ */ Symbol.for("react.lazy"), j = /* @__PURE__ */ Symbol.for("react.activity"), w = Symbol.iterator;
811
+ var f = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), M = /* @__PURE__ */ Symbol.for("react.fragment"), o = /* @__PURE__ */ Symbol.for("react.strict_mode"), O = /* @__PURE__ */ Symbol.for("react.profiler"), H = /* @__PURE__ */ Symbol.for("react.consumer"), V = /* @__PURE__ */ Symbol.for("react.context"), U = /* @__PURE__ */ Symbol.for("react.forward_ref"), S = /* @__PURE__ */ Symbol.for("react.suspense"), Y = /* @__PURE__ */ Symbol.for("react.memo"), D = /* @__PURE__ */ Symbol.for("react.lazy"), R = /* @__PURE__ */ Symbol.for("react.activity"), w = Symbol.iterator;
812
812
  function ft(d) {
813
813
  return d === null || typeof d != "object" ? null : (d = w && d[w] || d["@@iterator"], typeof d == "function" ? d : null);
814
814
  }
@@ -841,8 +841,8 @@ function vg() {
841
841
  function St(d, E, N) {
842
842
  this.props = d, this.context = E, this.refs = rt, this.updater = N || $;
843
843
  }
844
- var V = St.prototype = new pt();
845
- V.constructor = St, J(V, yt.prototype), V.isPureReactComponent = !0;
844
+ var Q = St.prototype = new pt();
845
+ Q.constructor = St, J(Q, yt.prototype), Q.isPureReactComponent = !0;
846
846
  var Et = Array.isArray;
847
847
  function qt() {
848
848
  }
@@ -873,7 +873,7 @@ function vg() {
873
873
  function Jt(d, E) {
874
874
  return typeof d == "object" && d !== null && d.key != null ? Wt("" + d.key) : E.toString(36);
875
875
  }
876
- function R(d) {
876
+ function j(d) {
877
877
  switch (d.status) {
878
878
  case "fulfilled":
879
879
  return d.value;
@@ -914,7 +914,7 @@ function vg() {
914
914
  case y:
915
915
  ot = !0;
916
916
  break;
917
- case U:
917
+ case D:
918
918
  return ot = d._init, _(
919
919
  ot(d._payload),
920
920
  E,
@@ -957,7 +957,7 @@ function vg() {
957
957
  else if (I === "object") {
958
958
  if (typeof d.then == "function")
959
959
  return _(
960
- R(d),
960
+ j(d),
961
961
  E,
962
962
  N,
963
963
  G,
@@ -1035,7 +1035,7 @@ function vg() {
1035
1035
  return d;
1036
1036
  }
1037
1037
  };
1038
- return K.Activity = j, K.Children = ie, K.Component = yt, K.Fragment = M, K.Profiler = O, K.PureComponent = St, K.StrictMode = o, K.Suspense = S, K.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = et, K.__COMPILER_RUNTIME = {
1038
+ return K.Activity = R, K.Children = ie, K.Component = yt, K.Fragment = M, K.Profiler = O, K.PureComponent = St, K.StrictMode = o, K.Suspense = S, K.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = et, K.__COMPILER_RUNTIME = {
1039
1039
  __proto__: null,
1040
1040
  c: function(d) {
1041
1041
  return et.H.useMemoCache(d);
@@ -1065,7 +1065,7 @@ function vg() {
1065
1065
  return It(d.type, F, G);
1066
1066
  }, K.createContext = function(d) {
1067
1067
  return d = {
1068
- $$typeof: X,
1068
+ $$typeof: V,
1069
1069
  _currentValue: d,
1070
1070
  _currentValue2: d,
1071
1071
  _threadCount: 0,
@@ -1094,10 +1094,10 @@ function vg() {
1094
1094
  }, K.createRef = function() {
1095
1095
  return { current: null };
1096
1096
  }, K.forwardRef = function(d) {
1097
- return { $$typeof: D, render: d };
1097
+ return { $$typeof: U, render: d };
1098
1098
  }, K.isValidElement = Yt, K.lazy = function(d) {
1099
1099
  return {
1100
- $$typeof: U,
1100
+ $$typeof: D,
1101
1101
  _payload: { _status: -1, _result: d },
1102
1102
  _init: ut
1103
1103
  };
@@ -1170,51 +1170,51 @@ function Tf() {
1170
1170
  var Z = Tf();
1171
1171
  const Zu = /* @__PURE__ */ mg(Z);
1172
1172
  function pg(g) {
1173
- const [f, y] = Z.useState("idle"), [M, o] = Z.useState([]), [O, H] = Z.useState(!1), [X, D] = Z.useState(!1), [S, Y] = Z.useState(!1), [U, j] = Z.useState(null), w = Z.useRef(null), ft = Z.useCallback((V) => {
1174
- switch (V.type) {
1173
+ const [f, y] = Z.useState("idle"), [M, o] = Z.useState([]), [O, H] = Z.useState(!1), [V, U] = Z.useState(!1), [S, Y] = Z.useState(!1), [D, R] = Z.useState(null), w = Z.useRef(null), ft = Z.useCallback((Q) => {
1174
+ switch (Q.type) {
1175
1175
  case "ready":
1176
1176
  y("active");
1177
1177
  break;
1178
1178
  case "close":
1179
- y("idle"), H(!1), D(!1);
1179
+ y("idle"), H(!1), U(!1);
1180
1180
  break;
1181
1181
  case "error":
1182
- y("error"), j(
1183
- typeof V.payload == "object" && V.payload !== null && "message" in V.payload ? String(V.payload.message) : "Connection error"
1182
+ y("error"), R(
1183
+ typeof Q.payload == "object" && Q.payload !== null && "message" in Q.payload ? String(Q.payload.message) : "Connection error"
1184
1184
  );
1185
1185
  break;
1186
1186
  case "user_speaking":
1187
- H(!!V.payload);
1187
+ H(!!Q.payload);
1188
1188
  break;
1189
1189
  case "agent_speaking":
1190
- D(!!V.payload);
1190
+ U(!!Q.payload);
1191
1191
  break;
1192
1192
  }
1193
- }, []), $ = Z.useCallback((V, Et) => {
1193
+ }, []), $ = Z.useCallback((Q, Et) => {
1194
1194
  o((qt) => [...qt, {
1195
1195
  role: Et,
1196
- content: V,
1196
+ content: Q,
1197
1197
  timestamp: /* @__PURE__ */ new Date()
1198
1198
  }]);
1199
1199
  }, []), J = Z.useCallback(async () => {
1200
- y("connecting"), j(null);
1200
+ y("connecting"), R(null);
1201
1201
  try {
1202
- const V = new yg({
1202
+ const Q = new yg({
1203
1203
  ...g,
1204
1204
  onEvent: ft,
1205
1205
  onTranscript: $
1206
1206
  });
1207
- w.current = V, await V.start();
1208
- } catch (V) {
1209
- console.error("[useVoiceAgent] Failed to start:", V), y("error"), j(V instanceof Error ? V.message : "Failed to connect");
1207
+ w.current = Q, await Q.start();
1208
+ } catch (Q) {
1209
+ console.error("[useVoiceAgent] Failed to start:", Q), y("error"), R(Q instanceof Error ? Q.message : "Failed to connect");
1210
1210
  }
1211
1211
  }, [g, ft, $]), rt = Z.useCallback(() => {
1212
- w.current?.stop(), w.current = null, y("idle"), H(!1), D(!1);
1212
+ w.current?.stop(), w.current = null, y("idle"), H(!1), U(!1);
1213
1213
  }, []), yt = Z.useCallback(() => {
1214
- const V = !S;
1215
- Y(V), w.current?.setMuted(V);
1216
- }, [S]), pt = Z.useCallback((V) => {
1217
- Y(V), w.current?.setMuted(V);
1214
+ const Q = !S;
1215
+ Y(Q), w.current?.setMuted(Q);
1216
+ }, [S]), pt = Z.useCallback((Q) => {
1217
+ Y(Q), w.current?.setMuted(Q);
1218
1218
  }, []), St = Z.useCallback(() => {
1219
1219
  o([]);
1220
1220
  }, []);
@@ -1226,9 +1226,9 @@ function pg(g) {
1226
1226
  status: f,
1227
1227
  transcripts: M,
1228
1228
  isUserSpeaking: O,
1229
- isAgentSpeaking: X,
1229
+ isAgentSpeaking: V,
1230
1230
  isMuted: S,
1231
- errorMessage: U,
1231
+ errorMessage: D,
1232
1232
  start: J,
1233
1233
  stop: rt,
1234
1234
  toggleMute: yt,
@@ -1238,24 +1238,24 @@ function pg(g) {
1238
1238
  };
1239
1239
  }
1240
1240
  function bg(g) {
1241
- const [f, y] = Z.useState("idle"), [M, o] = Z.useState([]), [O, H] = Z.useState(!1), [X, D] = Z.useState(null), S = Z.useRef(null), Y = Z.useRef(!1), U = Z.useCallback(() => (S.current || (S.current = new gg({
1241
+ const [f, y] = Z.useState("idle"), [M, o] = Z.useState([]), [O, H] = Z.useState(!1), [V, U] = Z.useState(null), S = Z.useRef(null), Y = Z.useRef(!1), D = Z.useCallback(() => (S.current || (S.current = new gg({
1242
1242
  ...g,
1243
1243
  onTyping: H
1244
- })), S.current), [g]), j = Z.useCallback(async () => {
1244
+ })), S.current), [g]), R = Z.useCallback(async () => {
1245
1245
  if (!Y.current) {
1246
- y("loading"), D(null);
1246
+ y("loading"), U(null);
1247
1247
  try {
1248
- const J = await U().initialize();
1248
+ const J = await D().initialize();
1249
1249
  o(J), y("ready"), Y.current = !0;
1250
1250
  } catch ($) {
1251
- console.error("[useTextChat] Initialization error:", $), y("error"), D($ instanceof Error ? $.message : "Failed to initialize chat");
1251
+ console.error("[useTextChat] Initialization error:", $), y("error"), U($ instanceof Error ? $.message : "Failed to initialize chat");
1252
1252
  }
1253
1253
  }
1254
- }, [U]), w = Z.useCallback(async ($) => {
1254
+ }, [D]), w = Z.useCallback(async ($) => {
1255
1255
  if ($.trim()) {
1256
- D(null);
1256
+ U(null);
1257
1257
  try {
1258
- const J = U(), rt = {
1258
+ const J = D(), rt = {
1259
1259
  role: "user",
1260
1260
  content: $.trim(),
1261
1261
  created: (/* @__PURE__ */ new Date()).toISOString()
@@ -1264,22 +1264,22 @@ function bg(g) {
1264
1264
  const yt = J.getHistory();
1265
1265
  o(yt), f !== "ready" && (y("ready"), Y.current = !0);
1266
1266
  } catch (J) {
1267
- console.error("[useTextChat] Send message error:", J), D(J instanceof Error ? J.message : "Failed to send message");
1267
+ console.error("[useTextChat] Send message error:", J), U(J instanceof Error ? J.message : "Failed to send message");
1268
1268
  }
1269
1269
  }
1270
- }, [U, f]), ft = Z.useCallback(() => {
1270
+ }, [D, f]), ft = Z.useCallback(() => {
1271
1271
  S.current?.clearHistory(), o([]), Y.current = !1, y("idle");
1272
1272
  }, []);
1273
1273
  return Z.useEffect(() => {
1274
- g.autoInit && !Y.current && g.contextId && j();
1275
- }, [g.autoInit, g.contextId, j]), Z.useEffect(() => () => {
1274
+ g.autoInit && !Y.current && g.contextId && R();
1275
+ }, [g.autoInit, g.contextId, R]), Z.useEffect(() => () => {
1276
1276
  S.current = null;
1277
1277
  }, []), {
1278
1278
  status: f,
1279
1279
  messages: M,
1280
1280
  isLoading: O,
1281
- errorMessage: X,
1282
- initialize: j,
1281
+ errorMessage: V,
1282
+ initialize: R,
1283
1283
  sendMessage: w,
1284
1284
  clearHistory: ft,
1285
1285
  textChat: S.current
@@ -1295,8 +1295,8 @@ function Sg() {
1295
1295
  var H = null;
1296
1296
  if (O !== void 0 && (H = "" + O), o.key !== void 0 && (H = "" + o.key), "key" in o) {
1297
1297
  O = {};
1298
- for (var X in o)
1299
- X !== "key" && (O[X] = o[X]);
1298
+ for (var V in o)
1299
+ V !== "key" && (O[V] = o[V]);
1300
1300
  } else O = o;
1301
1301
  return o = O.ref, {
1302
1302
  $$typeof: g,
@@ -1959,13 +1959,13 @@ const Gd = ({
1959
1959
  unityApiUrl: o = "https://api.glydeunity.com",
1960
1960
  contextType: O = "screening",
1961
1961
  height: H = "600px",
1962
- onTranscript: X,
1963
- onCallEnd: D,
1962
+ onTranscript: V,
1963
+ onCallEnd: U,
1964
1964
  onError: S,
1965
1965
  onSwitchToText: Y
1966
1966
  }) => {
1967
- const U = Z.useRef(null), {
1968
- status: j,
1967
+ const D = Z.useRef(null), {
1968
+ status: R,
1969
1969
  transcripts: w,
1970
1970
  isUserSpeaking: ft,
1971
1971
  isAgentSpeaking: $,
@@ -1974,7 +1974,7 @@ const Gd = ({
1974
1974
  start: yt,
1975
1975
  stop: pt,
1976
1976
  toggleMute: St,
1977
- clearTranscripts: V
1977
+ clearTranscripts: Q
1978
1978
  } = pg({
1979
1979
  publishableKey: f,
1980
1980
  apiKey: y,
@@ -1984,15 +1984,15 @@ const Gd = ({
1984
1984
  unityBaseUrl: o
1985
1985
  });
1986
1986
  Z.useEffect(() => {
1987
- U.current?.scrollIntoView({ behavior: "smooth" });
1987
+ D.current?.scrollIntoView({ behavior: "smooth" });
1988
1988
  }, [w]), Z.useEffect(() => {
1989
- if (X && w.length > 0) {
1989
+ if (V && w.length > 0) {
1990
1990
  const xt = w[w.length - 1];
1991
- X(xt.content, xt.role);
1991
+ V(xt.content, xt.role);
1992
1992
  }
1993
- }, [w, X]), Z.useEffect(() => {
1994
- j === "error" && rt && S && S(new Error(rt));
1995
- }, [j, rt, S]);
1993
+ }, [w, V]), Z.useEffect(() => {
1994
+ R === "error" && rt && S && S(new Error(rt));
1995
+ }, [R, rt, S]);
1996
1996
  const Et = () => {
1997
1997
  switch (O) {
1998
1998
  case "screening":
@@ -2007,9 +2007,9 @@ const Gd = ({
2007
2007
  return "Voice Interview";
2008
2008
  }
2009
2009
  }, qt = async () => {
2010
- V(), await yt();
2010
+ Q(), await yt();
2011
2011
  }, et = () => {
2012
- pt(), D?.();
2012
+ pt(), U?.();
2013
2013
  };
2014
2014
  return /* @__PURE__ */ p.jsxs("div", { style: {
2015
2015
  background: "var(--glyde-background, white)",
@@ -2031,7 +2031,7 @@ const Gd = ({
2031
2031
  /* @__PURE__ */ p.jsx("h2", { style: { margin: 0, fontSize: "1.1rem", fontWeight: 600, color: "var(--glyde-text, #1f2937)" }, children: Et() }),
2032
2032
  /* @__PURE__ */ p.jsx("small", { style: { color: "var(--glyde-text-secondary, #6b7280)", fontSize: "0.8rem" }, children: M ? "JWT Auth" : f ? "Publishable Key" : "API Key" })
2033
2033
  ] }),
2034
- j === "active" && /* @__PURE__ */ p.jsxs("div", { style: {
2034
+ R === "active" && /* @__PURE__ */ p.jsxs("div", { style: {
2035
2035
  ...Ct.statusBadge,
2036
2036
  ...Ct.statusBadgeLive
2037
2037
  }, children: [
@@ -2039,7 +2039,7 @@ const Gd = ({
2039
2039
  " Live"
2040
2040
  ] })
2041
2041
  ] }),
2042
- /* @__PURE__ */ p.jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" }, children: j === "idle" || j === "error" ? (
2042
+ /* @__PURE__ */ p.jsx("div", { style: { flex: 1, display: "flex", flexDirection: "column", overflow: "hidden" }, children: R === "idle" || R === "error" ? (
2043
2043
  /* Idle State */
2044
2044
  /* @__PURE__ */ p.jsxs("div", { style: {
2045
2045
  flex: 1,
@@ -2119,16 +2119,16 @@ const Gd = ({
2119
2119
  padding: "16px",
2120
2120
  background: "var(--glyde-surface, #f9fafb)"
2121
2121
  }, children: [
2122
- j === "connecting" && /* @__PURE__ */ p.jsxs("div", { style: { textAlign: "center", color: "var(--glyde-text-secondary, #6b7280)", padding: "40px" }, children: [
2122
+ R === "connecting" && /* @__PURE__ */ p.jsxs("div", { style: { textAlign: "center", color: "var(--glyde-text-secondary, #6b7280)", padding: "40px" }, children: [
2123
2123
  /* @__PURE__ */ p.jsx("div", { className: "glyde-spinner", style: { margin: "0 auto 12px" } }),
2124
2124
  "Connecting to AI Agent..."
2125
2125
  ] }),
2126
- w.length === 0 && j === "active" && /* @__PURE__ */ p.jsxs("div", { style: { textAlign: "center", color: "var(--glyde-text-muted, #9ca3af)", padding: "40px" }, children: [
2126
+ w.length === 0 && R === "active" && /* @__PURE__ */ p.jsxs("div", { style: { textAlign: "center", color: "var(--glyde-text-muted, #9ca3af)", padding: "40px" }, children: [
2127
2127
  /* @__PURE__ */ p.jsx(xf, { size: 32, color: "var(--glyde-text-muted, #9ca3af)" }),
2128
2128
  /* @__PURE__ */ p.jsx("p", { style: { marginTop: "8px" }, children: "Start speaking - the AI will respond" })
2129
2129
  ] }),
2130
2130
  w.map((xt, It) => /* @__PURE__ */ p.jsx(jg, { transcript: xt, contextType: O }, It)),
2131
- /* @__PURE__ */ p.jsx("div", { ref: U })
2131
+ /* @__PURE__ */ p.jsx("div", { ref: D })
2132
2132
  ] }),
2133
2133
  /* @__PURE__ */ p.jsxs("div", { style: {
2134
2134
  padding: "16px",
@@ -2242,12 +2242,12 @@ const Gd = ({
2242
2242
  unityApiUrl: o = "https://api.glydeunity.com",
2243
2243
  height: O = "600px",
2244
2244
  title: H = "AI Chat",
2245
- placeholder: X = "Type your message...",
2246
- autoInit: D = !0,
2245
+ placeholder: V = "Type your message...",
2246
+ autoInit: U = !0,
2247
2247
  onMessage: S,
2248
2248
  onError: Y
2249
2249
  }) => {
2250
- const [U, j] = Z.useState(""), w = Z.useRef(null), {
2250
+ const [D, R] = Z.useState(""), w = Z.useRef(null), {
2251
2251
  status: ft,
2252
2252
  messages: $,
2253
2253
  isLoading: J,
@@ -2259,7 +2259,7 @@ const Gd = ({
2259
2259
  authToken: M,
2260
2260
  contextId: g,
2261
2261
  unityBaseUrl: o,
2262
- autoInit: D
2262
+ autoInit: U
2263
2263
  });
2264
2264
  Z.useEffect(() => {
2265
2265
  w.current?.scrollIntoView({ behavior: "smooth" });
@@ -2267,11 +2267,11 @@ const Gd = ({
2267
2267
  ft === "error" && rt && Y && Y(new Error(rt));
2268
2268
  }, [ft, rt, Y]);
2269
2269
  const pt = async () => {
2270
- if (!U.trim() || J) return;
2271
- const V = U.trim();
2272
- j(""), await yt(V), S && S({ role: "user", content: V });
2273
- }, St = (V) => {
2274
- V.key === "Enter" && !V.shiftKey && (V.preventDefault(), pt());
2270
+ if (!D.trim() || J) return;
2271
+ const Q = D.trim();
2272
+ R(""), await yt(Q), S && S({ role: "user", content: Q });
2273
+ }, St = (Q) => {
2274
+ Q.key === "Enter" && !Q.shiftKey && (Q.preventDefault(), pt());
2275
2275
  };
2276
2276
  return /* @__PURE__ */ p.jsxs("div", { style: {
2277
2277
  background: "var(--glyde-background, white)",
@@ -2303,7 +2303,7 @@ const Gd = ({
2303
2303
  /* @__PURE__ */ p.jsx("div", { className: "glyde-spinner", style: { margin: "0 auto 12px" } }),
2304
2304
  "Loading conversation..."
2305
2305
  ] }),
2306
- $.map((V, Et) => /* @__PURE__ */ p.jsx(Ng, { message: V }, Et)),
2306
+ $.map((Q, Et) => /* @__PURE__ */ p.jsx(Ng, { message: Q }, Et)),
2307
2307
  J && /* @__PURE__ */ p.jsx("div", { style: { color: "var(--glyde-text-muted, #94a3b8)", fontSize: "0.9rem", marginLeft: "42px" }, children: /* @__PURE__ */ p.jsx(Hg, {}) }),
2308
2308
  /* @__PURE__ */ p.jsx("div", { ref: w })
2309
2309
  ] }),
@@ -2318,10 +2318,10 @@ const Gd = ({
2318
2318
  "input",
2319
2319
  {
2320
2320
  type: "text",
2321
- value: U,
2322
- onChange: (V) => j(V.target.value),
2321
+ value: D,
2322
+ onChange: (Q) => R(Q.target.value),
2323
2323
  onKeyDown: St,
2324
- placeholder: X,
2324
+ placeholder: V,
2325
2325
  style: {
2326
2326
  ...Ct.inputField,
2327
2327
  flex: 1
@@ -2333,14 +2333,14 @@ const Gd = ({
2333
2333
  "button",
2334
2334
  {
2335
2335
  onClick: pt,
2336
- disabled: J || !U.trim(),
2336
+ disabled: J || !D.trim(),
2337
2337
  style: {
2338
2338
  ...Ct.iconButton,
2339
2339
  background: "var(--glyde-secondary, #0284c7)",
2340
2340
  width: "48px",
2341
2341
  height: "48px",
2342
- opacity: J || !U.trim() ? 0.5 : 1,
2343
- cursor: J || !U.trim() ? "not-allowed" : "pointer"
2342
+ opacity: J || !D.trim() ? 0.5 : 1,
2343
+ cursor: J || !D.trim() ? "not-allowed" : "pointer"
2344
2344
  },
2345
2345
  children: /* @__PURE__ */ p.jsx(Tg, { size: 20, color: "white" })
2346
2346
  }
@@ -2423,12 +2423,12 @@ const Gd = ({
2423
2423
  unityBaseUrl: o = "https://api.glydeunity.com",
2424
2424
  contextType: O = "screening",
2425
2425
  defaultMode: H = "voice",
2426
- position: X = "bottom-right",
2427
- theme: D = "light",
2426
+ position: V = "bottom-right",
2427
+ theme: U = "light",
2428
2428
  allowModeSwitch: S = !0,
2429
2429
  container: Y,
2430
- displayMode: U = "floating",
2431
- dimensions: j,
2430
+ displayMode: D = "floating",
2431
+ dimensions: R,
2432
2432
  showHeader: w = !0,
2433
2433
  allowClose: ft = !0,
2434
2434
  onReady: $,
@@ -2439,26 +2439,26 @@ const Gd = ({
2439
2439
  initialExpanded: St = !1
2440
2440
  }) => {
2441
2441
  console.log("[ChatWidget] Received unityBaseUrl:", o);
2442
- const [V, Et] = Z.useState(
2443
- U === "floating" ? St : !0
2442
+ const [Q, Et] = Z.useState(
2443
+ D === "floating" ? St : !0
2444
2444
  ), [qt, et] = Z.useState(!0), [xt, It] = Z.useState(H || "voice");
2445
2445
  Z.useEffect(() => {
2446
- const C = D === "auto" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : D;
2446
+ const C = U === "auto" ? window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" : U;
2447
2447
  ku(C);
2448
- }, [D]), Z.useEffect(() => {
2448
+ }, [U]), Z.useEffect(() => {
2449
2449
  $?.();
2450
2450
  }, [$]);
2451
- const Ue = Ug(X), Yt = (C) => {
2451
+ const Ue = Ug(V), Yt = (C) => {
2452
2452
  It(C), J?.(C);
2453
2453
  }, Wt = (C, ut) => {
2454
2454
  rt?.(C, ut);
2455
2455
  }, ve = (C) => {
2456
2456
  yt?.(C);
2457
2457
  }, Jt = () => {
2458
- U === "floating" ? Et(!1) : (et(!1), pt?.());
2459
- }, R = {
2460
- ...Bg[U],
2461
- ...j
2458
+ D === "floating" ? Et(!1) : (et(!1), pt?.());
2459
+ }, j = {
2460
+ ...Bg[D],
2461
+ ...R
2462
2462
  }, _ = (C) => {
2463
2463
  if (C !== void 0)
2464
2464
  return typeof C == "number" ? `${C}px` : C;
@@ -2476,13 +2476,13 @@ const Gd = ({
2476
2476
  allowModeSwitch: S,
2477
2477
  showHeader: w,
2478
2478
  allowClose: ft,
2479
- dimensions: R,
2479
+ dimensions: j,
2480
2480
  onModeChange: Yt,
2481
2481
  onTranscript: Wt,
2482
2482
  onError: ve,
2483
2483
  onClose: Jt
2484
2484
  }
2485
- ) : U === "modal" ? /* @__PURE__ */ p.jsx(
2485
+ ) : D === "modal" ? /* @__PURE__ */ p.jsx(
2486
2486
  qg,
2487
2487
  {
2488
2488
  publishableKey: g,
@@ -2495,21 +2495,21 @@ const Gd = ({
2495
2495
  allowModeSwitch: S,
2496
2496
  showHeader: w,
2497
2497
  allowClose: ft,
2498
- dimensions: R,
2498
+ dimensions: j,
2499
2499
  onModeChange: Yt,
2500
2500
  onTranscript: Wt,
2501
2501
  onError: ve,
2502
2502
  onClose: Jt
2503
2503
  }
2504
- ) : U === "inline" ? /* @__PURE__ */ p.jsx(
2504
+ ) : D === "inline" ? /* @__PURE__ */ p.jsx(
2505
2505
  "div",
2506
2506
  {
2507
2507
  className: "glyde-widget-root",
2508
2508
  style: {
2509
- width: _(R.width),
2510
- height: _(R.height),
2511
- maxWidth: _(R.maxWidth),
2512
- maxHeight: _(R.maxHeight),
2509
+ width: _(j.width),
2510
+ height: _(j.height),
2511
+ maxWidth: _(j.maxWidth),
2512
+ maxHeight: _(j.maxHeight),
2513
2513
  minHeight: "500px"
2514
2514
  // Ensure enough height for voice controls
2515
2515
  },
@@ -2526,7 +2526,7 @@ const Gd = ({
2526
2526
  allowModeSwitch: S,
2527
2527
  showHeader: w,
2528
2528
  allowClose: ft,
2529
- dimensions: R,
2529
+ dimensions: j,
2530
2530
  onModeChange: Yt,
2531
2531
  onTranscript: Wt,
2532
2532
  onError: ve,
@@ -2535,7 +2535,7 @@ const Gd = ({
2535
2535
  )
2536
2536
  }
2537
2537
  ) : /* @__PURE__ */ p.jsxs("div", { className: "glyde-widget-root", children: [
2538
- !V && /* @__PURE__ */ p.jsx(
2538
+ !Q && /* @__PURE__ */ p.jsx(
2539
2539
  "button",
2540
2540
  {
2541
2541
  onClick: () => Et(!0),
@@ -2548,7 +2548,7 @@ const Gd = ({
2548
2548
  children: /* @__PURE__ */ p.jsx(Ju, { size: 28, color: "white" })
2549
2549
  }
2550
2550
  ),
2551
- V && /* @__PURE__ */ p.jsxs(
2551
+ Q && /* @__PURE__ */ p.jsxs(
2552
2552
  "div",
2553
2553
  {
2554
2554
  style: {
@@ -2683,12 +2683,12 @@ const Gd = ({
2683
2683
  unityBaseUrl: o,
2684
2684
  contextType: O,
2685
2685
  mode: H,
2686
- allowModeSwitch: X,
2687
- showHeader: D = !0,
2686
+ allowModeSwitch: V,
2687
+ showHeader: U = !0,
2688
2688
  allowClose: S = !0,
2689
2689
  dimensions: Y,
2690
- onModeChange: U,
2691
- onTranscript: j,
2690
+ onModeChange: D,
2691
+ onTranscript: R,
2692
2692
  onError: w,
2693
2693
  onClose: ft
2694
2694
  }) => {
@@ -2697,7 +2697,7 @@ const Gd = ({
2697
2697
  J(H);
2698
2698
  }, [H]);
2699
2699
  const rt = (pt) => {
2700
- J(pt), U(pt);
2700
+ J(pt), D(pt);
2701
2701
  }, yt = (pt) => {
2702
2702
  if (pt !== void 0)
2703
2703
  return typeof pt == "number" ? `${pt}px` : pt;
@@ -2722,7 +2722,7 @@ const Gd = ({
2722
2722
  background: "var(--glyde-background, white)"
2723
2723
  },
2724
2724
  children: [
2725
- D && /* @__PURE__ */ p.jsx(
2725
+ U && /* @__PURE__ */ p.jsx(
2726
2726
  Ld,
2727
2727
  {
2728
2728
  contextType: O,
@@ -2731,7 +2731,7 @@ const Gd = ({
2731
2731
  onClose: ft
2732
2732
  }
2733
2733
  ),
2734
- X && /* @__PURE__ */ p.jsx("div", { style: {
2734
+ V && /* @__PURE__ */ p.jsx("div", { style: {
2735
2735
  padding: "12px 16px",
2736
2736
  borderBottom: "1px solid var(--glyde-border, #e5e7eb)",
2737
2737
  background: "var(--glyde-background, white)"
@@ -2746,8 +2746,8 @@ const Gd = ({
2746
2746
  unityApiUrl: o,
2747
2747
  contextType: O,
2748
2748
  height: "100%",
2749
- onTranscript: j,
2750
- onSwitchToText: X ? () => rt("text") : void 0,
2749
+ onTranscript: R,
2750
+ onSwitchToText: V ? () => rt("text") : void 0,
2751
2751
  onError: w
2752
2752
  }
2753
2753
  ) : /* @__PURE__ */ p.jsx(
@@ -2816,38 +2816,38 @@ var vf = { exports: {} }, Mn = {}, pf = { exports: {} }, bf = {};
2816
2816
  var Dd;
2817
2817
  function Yg() {
2818
2818
  return Dd || (Dd = 1, (function(g) {
2819
- function f(R, _) {
2820
- var C = R.length;
2821
- R.push(_);
2819
+ function f(j, _) {
2820
+ var C = j.length;
2821
+ j.push(_);
2822
2822
  t: for (; 0 < C; ) {
2823
- var ut = C - 1 >>> 1, At = R[ut];
2823
+ var ut = C - 1 >>> 1, At = j[ut];
2824
2824
  if (0 < o(At, _))
2825
- R[ut] = _, R[C] = At, C = ut;
2825
+ j[ut] = _, j[C] = At, C = ut;
2826
2826
  else break t;
2827
2827
  }
2828
2828
  }
2829
- function y(R) {
2830
- return R.length === 0 ? null : R[0];
2829
+ function y(j) {
2830
+ return j.length === 0 ? null : j[0];
2831
2831
  }
2832
- function M(R) {
2833
- if (R.length === 0) return null;
2834
- var _ = R[0], C = R.pop();
2832
+ function M(j) {
2833
+ if (j.length === 0) return null;
2834
+ var _ = j[0], C = j.pop();
2835
2835
  if (C !== _) {
2836
- R[0] = C;
2837
- t: for (var ut = 0, At = R.length, ie = At >>> 1; ut < ie; ) {
2838
- var d = 2 * (ut + 1) - 1, E = R[d], N = d + 1, G = R[N];
2836
+ j[0] = C;
2837
+ t: for (var ut = 0, At = j.length, ie = At >>> 1; ut < ie; ) {
2838
+ var d = 2 * (ut + 1) - 1, E = j[d], N = d + 1, G = j[N];
2839
2839
  if (0 > o(E, C))
2840
- N < At && 0 > o(G, E) ? (R[ut] = G, R[N] = C, ut = N) : (R[ut] = E, R[d] = C, ut = d);
2840
+ N < At && 0 > o(G, E) ? (j[ut] = G, j[N] = C, ut = N) : (j[ut] = E, j[d] = C, ut = d);
2841
2841
  else if (N < At && 0 > o(G, C))
2842
- R[ut] = G, R[N] = C, ut = N;
2842
+ j[ut] = G, j[N] = C, ut = N;
2843
2843
  else break t;
2844
2844
  }
2845
2845
  }
2846
2846
  return _;
2847
2847
  }
2848
- function o(R, _) {
2849
- var C = R.sortIndex - _.sortIndex;
2850
- return C !== 0 ? C : R.id - _.id;
2848
+ function o(j, _) {
2849
+ var C = j.sortIndex - _.sortIndex;
2850
+ return C !== 0 ? C : j.id - _.id;
2851
2851
  }
2852
2852
  if (g.unstable_now = void 0, typeof performance == "object" && typeof performance.now == "function") {
2853
2853
  var O = performance;
@@ -2855,28 +2855,28 @@ function Yg() {
2855
2855
  return O.now();
2856
2856
  };
2857
2857
  } else {
2858
- var H = Date, X = H.now();
2858
+ var H = Date, V = H.now();
2859
2859
  g.unstable_now = function() {
2860
- return H.now() - X;
2860
+ return H.now() - V;
2861
2861
  };
2862
2862
  }
2863
- var D = [], S = [], Y = 1, U = null, j = 3, w = !1, ft = !1, $ = !1, J = !1, rt = typeof setTimeout == "function" ? setTimeout : null, yt = typeof clearTimeout == "function" ? clearTimeout : null, pt = typeof setImmediate < "u" ? setImmediate : null;
2864
- function St(R) {
2863
+ var U = [], S = [], Y = 1, D = null, R = 3, w = !1, ft = !1, $ = !1, J = !1, rt = typeof setTimeout == "function" ? setTimeout : null, yt = typeof clearTimeout == "function" ? clearTimeout : null, pt = typeof setImmediate < "u" ? setImmediate : null;
2864
+ function St(j) {
2865
2865
  for (var _ = y(S); _ !== null; ) {
2866
2866
  if (_.callback === null) M(S);
2867
- else if (_.startTime <= R)
2868
- M(S), _.sortIndex = _.expirationTime, f(D, _);
2867
+ else if (_.startTime <= j)
2868
+ M(S), _.sortIndex = _.expirationTime, f(U, _);
2869
2869
  else break;
2870
2870
  _ = y(S);
2871
2871
  }
2872
2872
  }
2873
- function V(R) {
2874
- if ($ = !1, St(R), !ft)
2875
- if (y(D) !== null)
2873
+ function Q(j) {
2874
+ if ($ = !1, St(j), !ft)
2875
+ if (y(U) !== null)
2876
2876
  ft = !0, Et || (Et = !0, Yt());
2877
2877
  else {
2878
2878
  var _ = y(S);
2879
- _ !== null && Jt(V, _.startTime - R);
2879
+ _ !== null && Jt(Q, _.startTime - j);
2880
2880
  }
2881
2881
  }
2882
2882
  var Et = !1, qt = -1, et = 5, xt = -1;
@@ -2885,42 +2885,42 @@ function Yg() {
2885
2885
  }
2886
2886
  function Ue() {
2887
2887
  if (J = !1, Et) {
2888
- var R = g.unstable_now();
2889
- xt = R;
2888
+ var j = g.unstable_now();
2889
+ xt = j;
2890
2890
  var _ = !0;
2891
2891
  try {
2892
2892
  t: {
2893
2893
  ft = !1, $ && ($ = !1, yt(qt), qt = -1), w = !0;
2894
- var C = j;
2894
+ var C = R;
2895
2895
  try {
2896
2896
  e: {
2897
- for (St(R), U = y(D); U !== null && !(U.expirationTime > R && It()); ) {
2898
- var ut = U.callback;
2897
+ for (St(j), D = y(U); D !== null && !(D.expirationTime > j && It()); ) {
2898
+ var ut = D.callback;
2899
2899
  if (typeof ut == "function") {
2900
- U.callback = null, j = U.priorityLevel;
2900
+ D.callback = null, R = D.priorityLevel;
2901
2901
  var At = ut(
2902
- U.expirationTime <= R
2902
+ D.expirationTime <= j
2903
2903
  );
2904
- if (R = g.unstable_now(), typeof At == "function") {
2905
- U.callback = At, St(R), _ = !0;
2904
+ if (j = g.unstable_now(), typeof At == "function") {
2905
+ D.callback = At, St(j), _ = !0;
2906
2906
  break e;
2907
2907
  }
2908
- U === y(D) && M(D), St(R);
2909
- } else M(D);
2910
- U = y(D);
2908
+ D === y(U) && M(U), St(j);
2909
+ } else M(U);
2910
+ D = y(U);
2911
2911
  }
2912
- if (U !== null) _ = !0;
2912
+ if (D !== null) _ = !0;
2913
2913
  else {
2914
2914
  var ie = y(S);
2915
2915
  ie !== null && Jt(
2916
- V,
2917
- ie.startTime - R
2916
+ Q,
2917
+ ie.startTime - j
2918
2918
  ), _ = !1;
2919
2919
  }
2920
2920
  }
2921
2921
  break t;
2922
2922
  } finally {
2923
- U = null, j = C, w = !1;
2923
+ D = null, R = C, w = !1;
2924
2924
  }
2925
2925
  _ = void 0;
2926
2926
  }
@@ -2943,40 +2943,40 @@ function Yg() {
2943
2943
  Yt = function() {
2944
2944
  rt(Ue, 0);
2945
2945
  };
2946
- function Jt(R, _) {
2946
+ function Jt(j, _) {
2947
2947
  qt = rt(function() {
2948
- R(g.unstable_now());
2948
+ j(g.unstable_now());
2949
2949
  }, _);
2950
2950
  }
2951
- g.unstable_IdlePriority = 5, g.unstable_ImmediatePriority = 1, g.unstable_LowPriority = 4, g.unstable_NormalPriority = 3, g.unstable_Profiling = null, g.unstable_UserBlockingPriority = 2, g.unstable_cancelCallback = function(R) {
2952
- R.callback = null;
2953
- }, g.unstable_forceFrameRate = function(R) {
2954
- 0 > R || 125 < R ? console.error(
2951
+ g.unstable_IdlePriority = 5, g.unstable_ImmediatePriority = 1, g.unstable_LowPriority = 4, g.unstable_NormalPriority = 3, g.unstable_Profiling = null, g.unstable_UserBlockingPriority = 2, g.unstable_cancelCallback = function(j) {
2952
+ j.callback = null;
2953
+ }, g.unstable_forceFrameRate = function(j) {
2954
+ 0 > j || 125 < j ? console.error(
2955
2955
  "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
2956
- ) : et = 0 < R ? Math.floor(1e3 / R) : 5;
2956
+ ) : et = 0 < j ? Math.floor(1e3 / j) : 5;
2957
2957
  }, g.unstable_getCurrentPriorityLevel = function() {
2958
- return j;
2959
- }, g.unstable_next = function(R) {
2960
- switch (j) {
2958
+ return R;
2959
+ }, g.unstable_next = function(j) {
2960
+ switch (R) {
2961
2961
  case 1:
2962
2962
  case 2:
2963
2963
  case 3:
2964
2964
  var _ = 3;
2965
2965
  break;
2966
2966
  default:
2967
- _ = j;
2967
+ _ = R;
2968
2968
  }
2969
- var C = j;
2970
- j = _;
2969
+ var C = R;
2970
+ R = _;
2971
2971
  try {
2972
- return R();
2972
+ return j();
2973
2973
  } finally {
2974
- j = C;
2974
+ R = C;
2975
2975
  }
2976
2976
  }, g.unstable_requestPaint = function() {
2977
2977
  J = !0;
2978
- }, g.unstable_runWithPriority = function(R, _) {
2979
- switch (R) {
2978
+ }, g.unstable_runWithPriority = function(j, _) {
2979
+ switch (j) {
2980
2980
  case 1:
2981
2981
  case 2:
2982
2982
  case 3:
@@ -2984,18 +2984,18 @@ function Yg() {
2984
2984
  case 5:
2985
2985
  break;
2986
2986
  default:
2987
- R = 3;
2987
+ j = 3;
2988
2988
  }
2989
- var C = j;
2990
- j = R;
2989
+ var C = R;
2990
+ R = j;
2991
2991
  try {
2992
2992
  return _();
2993
2993
  } finally {
2994
- j = C;
2994
+ R = C;
2995
2995
  }
2996
- }, g.unstable_scheduleCallback = function(R, _, C) {
2996
+ }, g.unstable_scheduleCallback = function(j, _, C) {
2997
2997
  var ut = g.unstable_now();
2998
- switch (typeof C == "object" && C !== null ? (C = C.delay, C = typeof C == "number" && 0 < C ? ut + C : ut) : C = ut, R) {
2998
+ switch (typeof C == "object" && C !== null ? (C = C.delay, C = typeof C == "number" && 0 < C ? ut + C : ut) : C = ut, j) {
2999
2999
  case 1:
3000
3000
  var At = -1;
3001
3001
  break;
@@ -3011,23 +3011,23 @@ function Yg() {
3011
3011
  default:
3012
3012
  At = 5e3;
3013
3013
  }
3014
- return At = C + At, R = {
3014
+ return At = C + At, j = {
3015
3015
  id: Y++,
3016
3016
  callback: _,
3017
- priorityLevel: R,
3017
+ priorityLevel: j,
3018
3018
  startTime: C,
3019
3019
  expirationTime: At,
3020
3020
  sortIndex: -1
3021
- }, C > ut ? (R.sortIndex = C, f(S, R), y(D) === null && R === y(S) && ($ ? (yt(qt), qt = -1) : $ = !0, Jt(V, C - ut))) : (R.sortIndex = At, f(D, R), ft || w || (ft = !0, Et || (Et = !0, Yt()))), R;
3022
- }, g.unstable_shouldYield = It, g.unstable_wrapCallback = function(R) {
3023
- var _ = j;
3021
+ }, C > ut ? (j.sortIndex = C, f(S, j), y(U) === null && j === y(S) && ($ ? (yt(qt), qt = -1) : $ = !0, Jt(Q, C - ut))) : (j.sortIndex = At, f(U, j), ft || w || (ft = !0, Et || (Et = !0, Yt()))), j;
3022
+ }, g.unstable_shouldYield = It, g.unstable_wrapCallback = function(j) {
3023
+ var _ = R;
3024
3024
  return function() {
3025
- var C = j;
3026
- j = _;
3025
+ var C = R;
3026
+ R = _;
3027
3027
  try {
3028
- return R.apply(this, arguments);
3028
+ return j.apply(this, arguments);
3029
3029
  } finally {
3030
- j = C;
3030
+ R = C;
3031
3031
  }
3032
3032
  };
3033
3033
  };
@@ -3043,14 +3043,14 @@ function wg() {
3043
3043
  if (jd) return kt;
3044
3044
  jd = 1;
3045
3045
  var g = Tf();
3046
- function f(D) {
3047
- var S = "https://react.dev/errors/" + D;
3046
+ function f(U) {
3047
+ var S = "https://react.dev/errors/" + U;
3048
3048
  if (1 < arguments.length) {
3049
3049
  S += "?args[]=" + encodeURIComponent(arguments[1]);
3050
3050
  for (var Y = 2; Y < arguments.length; Y++)
3051
3051
  S += "&args[]=" + encodeURIComponent(arguments[Y]);
3052
3052
  }
3053
- return "Minified React error #" + D + "; visit " + S + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
3053
+ return "Minified React error #" + U + "; visit " + S + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
3054
3054
  }
3055
3055
  function y() {
3056
3056
  }
@@ -3071,76 +3071,76 @@ function wg() {
3071
3071
  p: 0,
3072
3072
  findDOMNode: null
3073
3073
  }, o = /* @__PURE__ */ Symbol.for("react.portal");
3074
- function O(D, S, Y) {
3075
- var U = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
3074
+ function O(U, S, Y) {
3075
+ var D = 3 < arguments.length && arguments[3] !== void 0 ? arguments[3] : null;
3076
3076
  return {
3077
3077
  $$typeof: o,
3078
- key: U == null ? null : "" + U,
3079
- children: D,
3078
+ key: D == null ? null : "" + D,
3079
+ children: U,
3080
3080
  containerInfo: S,
3081
3081
  implementation: Y
3082
3082
  };
3083
3083
  }
3084
3084
  var H = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
3085
- function X(D, S) {
3086
- if (D === "font") return "";
3085
+ function V(U, S) {
3086
+ if (U === "font") return "";
3087
3087
  if (typeof S == "string")
3088
3088
  return S === "use-credentials" ? S : "";
3089
3089
  }
3090
- return kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = M, kt.createPortal = function(D, S) {
3090
+ return kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = M, kt.createPortal = function(U, S) {
3091
3091
  var Y = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : null;
3092
3092
  if (!S || S.nodeType !== 1 && S.nodeType !== 9 && S.nodeType !== 11)
3093
3093
  throw Error(f(299));
3094
- return O(D, S, null, Y);
3095
- }, kt.flushSync = function(D) {
3094
+ return O(U, S, null, Y);
3095
+ }, kt.flushSync = function(U) {
3096
3096
  var S = H.T, Y = M.p;
3097
3097
  try {
3098
- if (H.T = null, M.p = 2, D) return D();
3098
+ if (H.T = null, M.p = 2, U) return U();
3099
3099
  } finally {
3100
3100
  H.T = S, M.p = Y, M.d.f();
3101
3101
  }
3102
- }, kt.preconnect = function(D, S) {
3103
- typeof D == "string" && (S ? (S = S.crossOrigin, S = typeof S == "string" ? S === "use-credentials" ? S : "" : void 0) : S = null, M.d.C(D, S));
3104
- }, kt.prefetchDNS = function(D) {
3105
- typeof D == "string" && M.d.D(D);
3106
- }, kt.preinit = function(D, S) {
3107
- if (typeof D == "string" && S && typeof S.as == "string") {
3108
- var Y = S.as, U = X(Y, S.crossOrigin), j = typeof S.integrity == "string" ? S.integrity : void 0, w = typeof S.fetchPriority == "string" ? S.fetchPriority : void 0;
3102
+ }, kt.preconnect = function(U, S) {
3103
+ typeof U == "string" && (S ? (S = S.crossOrigin, S = typeof S == "string" ? S === "use-credentials" ? S : "" : void 0) : S = null, M.d.C(U, S));
3104
+ }, kt.prefetchDNS = function(U) {
3105
+ typeof U == "string" && M.d.D(U);
3106
+ }, kt.preinit = function(U, S) {
3107
+ if (typeof U == "string" && S && typeof S.as == "string") {
3108
+ var Y = S.as, D = V(Y, S.crossOrigin), R = typeof S.integrity == "string" ? S.integrity : void 0, w = typeof S.fetchPriority == "string" ? S.fetchPriority : void 0;
3109
3109
  Y === "style" ? M.d.S(
3110
- D,
3110
+ U,
3111
3111
  typeof S.precedence == "string" ? S.precedence : void 0,
3112
3112
  {
3113
- crossOrigin: U,
3114
- integrity: j,
3113
+ crossOrigin: D,
3114
+ integrity: R,
3115
3115
  fetchPriority: w
3116
3116
  }
3117
- ) : Y === "script" && M.d.X(D, {
3118
- crossOrigin: U,
3119
- integrity: j,
3117
+ ) : Y === "script" && M.d.X(U, {
3118
+ crossOrigin: D,
3119
+ integrity: R,
3120
3120
  fetchPriority: w,
3121
3121
  nonce: typeof S.nonce == "string" ? S.nonce : void 0
3122
3122
  });
3123
3123
  }
3124
- }, kt.preinitModule = function(D, S) {
3125
- if (typeof D == "string")
3124
+ }, kt.preinitModule = function(U, S) {
3125
+ if (typeof U == "string")
3126
3126
  if (typeof S == "object" && S !== null) {
3127
3127
  if (S.as == null || S.as === "script") {
3128
- var Y = X(
3128
+ var Y = V(
3129
3129
  S.as,
3130
3130
  S.crossOrigin
3131
3131
  );
3132
- M.d.M(D, {
3132
+ M.d.M(U, {
3133
3133
  crossOrigin: Y,
3134
3134
  integrity: typeof S.integrity == "string" ? S.integrity : void 0,
3135
3135
  nonce: typeof S.nonce == "string" ? S.nonce : void 0
3136
3136
  });
3137
3137
  }
3138
- } else S == null && M.d.M(D);
3139
- }, kt.preload = function(D, S) {
3140
- if (typeof D == "string" && typeof S == "object" && S !== null && typeof S.as == "string") {
3141
- var Y = S.as, U = X(Y, S.crossOrigin);
3142
- M.d.L(D, Y, {
3143
- crossOrigin: U,
3138
+ } else S == null && M.d.M(U);
3139
+ }, kt.preload = function(U, S) {
3140
+ if (typeof U == "string" && typeof S == "object" && S !== null && typeof S.as == "string") {
3141
+ var Y = S.as, D = V(Y, S.crossOrigin);
3142
+ M.d.L(U, Y, {
3143
+ crossOrigin: D,
3144
3144
  integrity: typeof S.integrity == "string" ? S.integrity : void 0,
3145
3145
  nonce: typeof S.nonce == "string" ? S.nonce : void 0,
3146
3146
  type: typeof S.type == "string" ? S.type : void 0,
@@ -3151,22 +3151,22 @@ function wg() {
3151
3151
  media: typeof S.media == "string" ? S.media : void 0
3152
3152
  });
3153
3153
  }
3154
- }, kt.preloadModule = function(D, S) {
3155
- if (typeof D == "string")
3154
+ }, kt.preloadModule = function(U, S) {
3155
+ if (typeof U == "string")
3156
3156
  if (S) {
3157
- var Y = X(S.as, S.crossOrigin);
3158
- M.d.m(D, {
3157
+ var Y = V(S.as, S.crossOrigin);
3158
+ M.d.m(U, {
3159
3159
  as: typeof S.as == "string" && S.as !== "script" ? S.as : void 0,
3160
3160
  crossOrigin: Y,
3161
3161
  integrity: typeof S.integrity == "string" ? S.integrity : void 0
3162
3162
  });
3163
- } else M.d.m(D);
3164
- }, kt.requestFormReset = function(D) {
3165
- M.d.r(D);
3166
- }, kt.unstable_batchedUpdates = function(D, S) {
3167
- return D(S);
3168
- }, kt.useFormState = function(D, S, Y) {
3169
- return H.H.useFormState(D, S, Y);
3163
+ } else M.d.m(U);
3164
+ }, kt.requestFormReset = function(U) {
3165
+ M.d.r(U);
3166
+ }, kt.unstable_batchedUpdates = function(U, S) {
3167
+ return U(S);
3168
+ }, kt.useFormState = function(U, S, Y) {
3169
+ return H.H.useFormState(U, S, Y);
3170
3170
  }, kt.useFormStatus = function() {
3171
3171
  return H.H.useHostTransitionStatus();
3172
3172
  }, kt.version = "19.2.4", kt;
@@ -3214,14 +3214,14 @@ function Xg() {
3214
3214
  }
3215
3215
  return e.tag === 3 ? l : null;
3216
3216
  }
3217
- function X(t) {
3217
+ function V(t) {
3218
3218
  if (t.tag === 13) {
3219
3219
  var e = t.memoizedState;
3220
3220
  if (e === null && (t = t.alternate, t !== null && (e = t.memoizedState)), e !== null) return e.dehydrated;
3221
3221
  }
3222
3222
  return null;
3223
3223
  }
3224
- function D(t) {
3224
+ function U(t) {
3225
3225
  if (t.tag === 31) {
3226
3226
  var e = t.memoizedState;
3227
3227
  if (e === null && (t = t.alternate, t !== null && (e = t.memoizedState)), e !== null) return e.dehydrated;
@@ -3290,16 +3290,16 @@ function Xg() {
3290
3290
  if (l.tag !== 3) throw Error(o(188));
3291
3291
  return l.stateNode.current === l ? t : e;
3292
3292
  }
3293
- function U(t) {
3293
+ function D(t) {
3294
3294
  var e = t.tag;
3295
3295
  if (e === 5 || e === 26 || e === 27 || e === 6) return t;
3296
3296
  for (t = t.child; t !== null; ) {
3297
- if (e = U(t), e !== null) return e;
3297
+ if (e = D(t), e !== null) return e;
3298
3298
  t = t.sibling;
3299
3299
  }
3300
3300
  return null;
3301
3301
  }
3302
- var j = Object.assign, w = /* @__PURE__ */ Symbol.for("react.element"), ft = /* @__PURE__ */ Symbol.for("react.transitional.element"), $ = /* @__PURE__ */ Symbol.for("react.portal"), J = /* @__PURE__ */ Symbol.for("react.fragment"), rt = /* @__PURE__ */ Symbol.for("react.strict_mode"), yt = /* @__PURE__ */ Symbol.for("react.profiler"), pt = /* @__PURE__ */ Symbol.for("react.consumer"), St = /* @__PURE__ */ Symbol.for("react.context"), V = /* @__PURE__ */ Symbol.for("react.forward_ref"), Et = /* @__PURE__ */ Symbol.for("react.suspense"), qt = /* @__PURE__ */ Symbol.for("react.suspense_list"), et = /* @__PURE__ */ Symbol.for("react.memo"), xt = /* @__PURE__ */ Symbol.for("react.lazy"), It = /* @__PURE__ */ Symbol.for("react.activity"), Ue = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel"), Yt = Symbol.iterator;
3302
+ var R = Object.assign, w = /* @__PURE__ */ Symbol.for("react.element"), ft = /* @__PURE__ */ Symbol.for("react.transitional.element"), $ = /* @__PURE__ */ Symbol.for("react.portal"), J = /* @__PURE__ */ Symbol.for("react.fragment"), rt = /* @__PURE__ */ Symbol.for("react.strict_mode"), yt = /* @__PURE__ */ Symbol.for("react.profiler"), pt = /* @__PURE__ */ Symbol.for("react.consumer"), St = /* @__PURE__ */ Symbol.for("react.context"), Q = /* @__PURE__ */ Symbol.for("react.forward_ref"), Et = /* @__PURE__ */ Symbol.for("react.suspense"), qt = /* @__PURE__ */ Symbol.for("react.suspense_list"), et = /* @__PURE__ */ Symbol.for("react.memo"), xt = /* @__PURE__ */ Symbol.for("react.lazy"), It = /* @__PURE__ */ Symbol.for("react.activity"), Ue = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel"), Yt = Symbol.iterator;
3303
3303
  function Wt(t) {
3304
3304
  return t === null || typeof t != "object" ? null : (t = Yt && t[Yt] || t["@@iterator"], typeof t == "function" ? t : null);
3305
3305
  }
@@ -3331,7 +3331,7 @@ function Xg() {
3331
3331
  return t.displayName || "Context";
3332
3332
  case pt:
3333
3333
  return (t._context.displayName || "Context") + ".Consumer";
3334
- case V:
3334
+ case Q:
3335
3335
  var e = t.render;
3336
3336
  return t = t.displayName, t || (t = e.displayName || e.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
3337
3337
  case et:
@@ -3345,7 +3345,7 @@ function Xg() {
3345
3345
  }
3346
3346
  return null;
3347
3347
  }
3348
- var R = Array.isArray, _ = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = M.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ut = {
3348
+ var j = Array.isArray, _ = y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = M.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ut = {
3349
3349
  pending: !1,
3350
3350
  data: null,
3351
3351
  method: null,
@@ -3984,7 +3984,7 @@ Error generating stack: ` + a.message + `
3984
3984
  if (e == null) {
3985
3985
  if (a != null) {
3986
3986
  if (l != null) throw Error(o(92));
3987
- if (R(a)) {
3987
+ if (j(a)) {
3988
3988
  if (1 < a.length) throw Error(o(93));
3989
3989
  a = a[0];
3990
3990
  }
@@ -4261,7 +4261,7 @@ Error generating stack: ` + a.message + `
4261
4261
  t.hasOwnProperty(c) && (l = t[c], this[c] = l ? l(u) : u[c]);
4262
4262
  return this.isDefaultPrevented = (u.defaultPrevented != null ? u.defaultPrevented : u.returnValue === !1) ? Gn : $f, this.isPropagationStopped = $f, this;
4263
4263
  }
4264
- return j(e.prototype, {
4264
+ return R(e.prototype, {
4265
4265
  preventDefault: function() {
4266
4266
  this.defaultPrevented = !0;
4267
4267
  var l = this.nativeEvent;
@@ -4285,7 +4285,7 @@ Error generating stack: ` + a.message + `
4285
4285
  },
4286
4286
  defaultPrevented: 0,
4287
4287
  isTrusted: 0
4288
- }, wn = te(Cl), Ga = j({}, Cl, { view: 0, detail: 0 }), oh = te(Ga), mi, vi, wa, Ln = j({}, Ga, {
4288
+ }, wn = te(Cl), Ga = R({}, Cl, { view: 0, detail: 0 }), oh = te(Ga), mi, vi, wa, Ln = R({}, Ga, {
4289
4289
  screenX: 0,
4290
4290
  screenY: 0,
4291
4291
  clientX: 0,
@@ -4308,15 +4308,15 @@ Error generating stack: ` + a.message + `
4308
4308
  movementY: function(t) {
4309
4309
  return "movementY" in t ? t.movementY : vi;
4310
4310
  }
4311
- }), Ff = te(Ln), rh = j({}, Ln, { dataTransfer: 0 }), dh = te(rh), hh = j({}, Ga, { relatedTarget: 0 }), pi = te(hh), yh = j({}, Cl, {
4311
+ }), Ff = te(Ln), rh = R({}, Ln, { dataTransfer: 0 }), dh = te(rh), hh = R({}, Ga, { relatedTarget: 0 }), pi = te(hh), yh = R({}, Cl, {
4312
4312
  animationName: 0,
4313
4313
  elapsedTime: 0,
4314
4314
  pseudoElement: 0
4315
- }), gh = te(yh), mh = j({}, Cl, {
4315
+ }), gh = te(yh), mh = R({}, Cl, {
4316
4316
  clipboardData: function(t) {
4317
4317
  return "clipboardData" in t ? t.clipboardData : window.clipboardData;
4318
4318
  }
4319
- }), vh = te(mh), ph = j({}, Cl, { data: 0 }), If = te(ph), bh = {
4319
+ }), vh = te(mh), ph = R({}, Cl, { data: 0 }), If = te(ph), bh = {
4320
4320
  Esc: "Escape",
4321
4321
  Spacebar: " ",
4322
4322
  Left: "ArrowLeft",
@@ -4379,7 +4379,7 @@ Error generating stack: ` + a.message + `
4379
4379
  function bi() {
4380
4380
  return Ah;
4381
4381
  }
4382
- var Th = j({}, Ga, {
4382
+ var Th = R({}, Ga, {
4383
4383
  key: function(t) {
4384
4384
  if (t.key) {
4385
4385
  var e = bh[t.key] || t.key;
@@ -4405,7 +4405,7 @@ Error generating stack: ` + a.message + `
4405
4405
  which: function(t) {
4406
4406
  return t.type === "keypress" ? Yn(t) : t.type === "keydown" || t.type === "keyup" ? t.keyCode : 0;
4407
4407
  }
4408
- }), zh = te(Th), Eh = j({}, Ln, {
4408
+ }), zh = te(Th), Eh = R({}, Ln, {
4409
4409
  pointerId: 0,
4410
4410
  width: 0,
4411
4411
  height: 0,
@@ -4416,7 +4416,7 @@ Error generating stack: ` + a.message + `
4416
4416
  twist: 0,
4417
4417
  pointerType: 0,
4418
4418
  isPrimary: 0
4419
- }), Pf = te(Eh), Mh = j({}, Ga, {
4419
+ }), Pf = te(Eh), Mh = R({}, Ga, {
4420
4420
  touches: 0,
4421
4421
  targetTouches: 0,
4422
4422
  changedTouches: 0,
@@ -4425,11 +4425,11 @@ Error generating stack: ` + a.message + `
4425
4425
  ctrlKey: 0,
4426
4426
  shiftKey: 0,
4427
4427
  getModifierState: bi
4428
- }), _h = te(Mh), Oh = j({}, Cl, {
4428
+ }), _h = te(Mh), Oh = R({}, Cl, {
4429
4429
  propertyName: 0,
4430
4430
  elapsedTime: 0,
4431
4431
  pseudoElement: 0
4432
- }), Ch = te(Oh), Dh = j({}, Ln, {
4432
+ }), Ch = te(Oh), Dh = R({}, Ln, {
4433
4433
  deltaX: function(t) {
4434
4434
  return "deltaX" in t ? t.deltaX : "wheelDeltaX" in t ? -t.wheelDeltaX : 0;
4435
4435
  },
@@ -4438,7 +4438,7 @@ Error generating stack: ` + a.message + `
4438
4438
  },
4439
4439
  deltaZ: 0,
4440
4440
  deltaMode: 0
4441
- }), Uh = te(Dh), jh = j({}, Cl, {
4441
+ }), Uh = te(Dh), jh = R({}, Cl, {
4442
4442
  newState: 0,
4443
4443
  oldState: 0
4444
4444
  }), Rh = te(jh), Nh = [9, 13, 27, 32], Si = Ye && "CompositionEvent" in window, La = null;
@@ -4800,7 +4800,7 @@ Error generating stack: ` + a.message + `
4800
4800
  case pt:
4801
4801
  i = 9;
4802
4802
  break t;
4803
- case V:
4803
+ case Q:
4804
4804
  i = 11;
4805
4805
  break t;
4806
4806
  case et:
@@ -5343,7 +5343,7 @@ Error generating stack: ` + a.message + `
5343
5343
  case xt:
5344
5344
  return r = Yl(r), z(h, r, m);
5345
5345
  }
5346
- if (R(r) || Wt(r))
5346
+ if (j(r) || Wt(r))
5347
5347
  return r = Rl(
5348
5348
  r,
5349
5349
  h.mode,
@@ -5375,7 +5375,7 @@ Error generating stack: ` + a.message + `
5375
5375
  case xt:
5376
5376
  return m = Yl(m), b(h, r, m, T);
5377
5377
  }
5378
- if (R(m) || Wt(m))
5378
+ if (j(m) || Wt(m))
5379
5379
  return L !== null ? null : A(h, r, m, T, null);
5380
5380
  if (typeof m.then == "function")
5381
5381
  return b(
@@ -5417,7 +5417,7 @@ Error generating stack: ` + a.message + `
5417
5417
  L
5418
5418
  );
5419
5419
  }
5420
- if (R(T) || Wt(T))
5420
+ if (j(T) || Wt(T))
5421
5421
  return h = h.get(m) || null, A(r, h, T, L, null);
5422
5422
  if (typeof T.then == "function")
5423
5423
  return x(
@@ -5483,7 +5483,7 @@ Error generating stack: ` + a.message + `
5483
5483
  return e(h, El);
5484
5484
  }), nt && we(h, W), L;
5485
5485
  }
5486
- function Q(h, r, m, T) {
5486
+ function X(h, r, m, T) {
5487
5487
  if (m == null) throw Error(o(151));
5488
5488
  for (var L = null, it = null, q = r, W = r = 0, at = null, ct = m.next(); q !== null && !ct.done; W++, ct = m.next()) {
5489
5489
  q.index > W ? (at = q, q = null) : at = q.sibling;
@@ -5580,7 +5580,7 @@ Error generating stack: ` + a.message + `
5580
5580
  T
5581
5581
  );
5582
5582
  }
5583
- if (R(m))
5583
+ if (j(m))
5584
5584
  return B(
5585
5585
  h,
5586
5586
  r,
@@ -5589,7 +5589,7 @@ Error generating stack: ` + a.message + `
5589
5589
  );
5590
5590
  if (Wt(m)) {
5591
5591
  if (L = Wt(m), typeof L != "function") throw Error(o(150));
5592
- return m = L.call(m), Q(
5592
+ return m = L.call(m), X(
5593
5593
  h,
5594
5594
  r,
5595
5595
  m,
@@ -5729,12 +5729,12 @@ Error generating stack: ` + a.message + `
5729
5729
  next: null
5730
5730
  });
5731
5731
  t: {
5732
- var B = t, Q = c;
5732
+ var B = t, X = c;
5733
5733
  b = e;
5734
5734
  var vt = l;
5735
- switch (Q.tag) {
5735
+ switch (X.tag) {
5736
5736
  case 1:
5737
- if (B = Q.payload, typeof B == "function") {
5737
+ if (B = X.payload, typeof B == "function") {
5738
5738
  z = B.call(vt, z, b);
5739
5739
  break t;
5740
5740
  }
@@ -5743,8 +5743,8 @@ Error generating stack: ` + a.message + `
5743
5743
  case 3:
5744
5744
  B.flags = B.flags & -65537 | 128;
5745
5745
  case 0:
5746
- if (B = Q.payload, b = typeof B == "function" ? B.call(vt, z, b) : B, b == null) break t;
5747
- z = j({}, z, b);
5746
+ if (B = X.payload, b = typeof B == "function" ? B.call(vt, z, b) : B, b == null) break t;
5747
+ z = R({}, z, b);
5748
5748
  break t;
5749
5749
  case 2:
5750
5750
  fl = !0;
@@ -6851,7 +6851,7 @@ Error generating stack: ` + a.message + `
6851
6851
  };
6852
6852
  Co.useEffectEvent = ro;
6853
6853
  function yc(t, e, l, a) {
6854
- e = t.memoizedState, l = l(a, e), l = l == null ? e : j({}, e, l), t.memoizedState = l, t.lanes === 0 && (t.updateQueue.baseState = l);
6854
+ e = t.memoizedState, l = l(a, e), l = l == null ? e : R({}, e, l), t.memoizedState = l, t.lanes === 0 && (t.updateQueue.baseState = l);
6855
6855
  }
6856
6856
  var gc = {
6857
6857
  enqueueSetState: function(t, e, l) {
@@ -6884,7 +6884,7 @@ Error generating stack: ` + a.message + `
6884
6884
  a !== "ref" && (l[a] = e[a]);
6885
6885
  }
6886
6886
  if (t = t.defaultProps) {
6887
- l === e && (l = j({}, l));
6887
+ l === e && (l = R({}, l));
6888
6888
  for (var n in t)
6889
6889
  l[n] === void 0 && (l[n] = t[n]);
6890
6890
  }
@@ -7629,7 +7629,7 @@ Error generating stack: ` + a.message + `
7629
7629
  else {
7630
7630
  if (t != null) {
7631
7631
  var n = t.$$typeof;
7632
- if (n === V) {
7632
+ if (n === Q) {
7633
7633
  e.tag = 11, e = Yo(
7634
7634
  null,
7635
7635
  e,
@@ -8475,11 +8475,11 @@ Error generating stack: ` + a.message + `
8475
8475
  B,
8476
8476
  u
8477
8477
  ), a.__reactInternalSnapshotBeforeUpdate = t;
8478
- } catch (Q) {
8478
+ } catch (X) {
8479
8479
  ht(
8480
8480
  l,
8481
8481
  l.return,
8482
- Q
8482
+ X
8483
8483
  );
8484
8484
  }
8485
8485
  }
@@ -10137,18 +10137,18 @@ Error generating stack: ` + a.message + `
10137
10137
  else {
10138
10138
  var z = c.ownerDocument || document, b = z && z.defaultView || window;
10139
10139
  if (b.getSelection) {
10140
- var x = b.getSelection(), B = c.textContent.length, Q = Math.min(s.start, B), vt = s.end === void 0 ? Q : Math.min(s.end, B);
10141
- !x.extend && Q > vt && (i = vt, vt = Q, Q = i);
10140
+ var x = b.getSelection(), B = c.textContent.length, X = Math.min(s.start, B), vt = s.end === void 0 ? X : Math.min(s.end, B);
10141
+ !x.extend && X > vt && (i = vt, vt = X, X = i);
10142
10142
  var h = hs(
10143
10143
  c,
10144
- Q
10144
+ X
10145
10145
  ), r = hs(
10146
10146
  c,
10147
10147
  vt
10148
10148
  );
10149
10149
  if (h && r && (x.rangeCount !== 1 || x.anchorNode !== h.node || x.anchorOffset !== h.offset || x.focusNode !== r.node || x.focusOffset !== r.offset)) {
10150
10150
  var m = z.createRange();
10151
- m.setStart(h.node, h.offset), x.removeAllRanges(), Q > vt ? (x.addRange(m), x.extend(r.node, r.offset)) : (m.setEnd(r.node, r.offset), x.addRange(m));
10151
+ m.setStart(h.node, h.offset), x.removeAllRanges(), X > vt ? (x.addRange(m), x.extend(r.node, r.offset)) : (m.setEnd(r.node, r.offset), x.addRange(m));
10152
10152
  }
10153
10153
  }
10154
10154
  }
@@ -10722,73 +10722,73 @@ Error generating stack: ` + a.message + `
10722
10722
  case "beforetoggle":
10723
10723
  x = Rh;
10724
10724
  }
10725
- var Q = (e & 4) !== 0, vt = !Q && (t === "scroll" || t === "scrollend"), h = Q ? b !== null ? b + "Capture" : null : b;
10726
- Q = [];
10725
+ var X = (e & 4) !== 0, vt = !X && (t === "scroll" || t === "scrollend"), h = X ? b !== null ? b + "Capture" : null : b;
10726
+ X = [];
10727
10727
  for (var r = v, m; r !== null; ) {
10728
10728
  var T = r;
10729
- if (m = T.stateNode, T = T.tag, T !== 5 && T !== 26 && T !== 27 || m === null || h === null || (T = qa(r, h), T != null && Q.push(
10729
+ if (m = T.stateNode, T = T.tag, T !== 5 && T !== 26 && T !== 27 || m === null || h === null || (T = qa(r, h), T != null && X.push(
10730
10730
  vn(r, T, m)
10731
10731
  )), vt) break;
10732
10732
  r = r.return;
10733
10733
  }
10734
- 0 < Q.length && (b = new x(
10734
+ 0 < X.length && (b = new x(
10735
10735
  b,
10736
10736
  B,
10737
10737
  null,
10738
10738
  l,
10739
10739
  A
10740
- ), z.push({ event: b, listeners: Q }));
10740
+ ), z.push({ event: b, listeners: X }));
10741
10741
  }
10742
10742
  }
10743
10743
  if ((e & 7) === 0) {
10744
10744
  t: {
10745
10745
  if (b = t === "mouseover" || t === "pointerover", x = t === "mouseout" || t === "pointerout", b && l !== ri && (B = l.relatedTarget || l.fromElement) && (kl(B) || B[Jl]))
10746
10746
  break t;
10747
- if ((x || b) && (b = A.window === A ? A : (b = A.ownerDocument) ? b.defaultView || b.parentWindow : window, x ? (B = l.relatedTarget || l.toElement, x = v, B = B ? kl(B) : null, B !== null && (vt = H(B), Q = B.tag, B !== vt || Q !== 5 && Q !== 27 && Q !== 6) && (B = null)) : (x = null, B = v), x !== B)) {
10748
- if (Q = Ff, T = "onMouseLeave", h = "onMouseEnter", r = "mouse", (t === "pointerout" || t === "pointerover") && (Q = Pf, T = "onPointerLeave", h = "onPointerEnter", r = "pointer"), vt = x == null ? b : Ba(x), m = B == null ? b : Ba(B), b = new Q(
10747
+ if ((x || b) && (b = A.window === A ? A : (b = A.ownerDocument) ? b.defaultView || b.parentWindow : window, x ? (B = l.relatedTarget || l.toElement, x = v, B = B ? kl(B) : null, B !== null && (vt = H(B), X = B.tag, B !== vt || X !== 5 && X !== 27 && X !== 6) && (B = null)) : (x = null, B = v), x !== B)) {
10748
+ if (X = Ff, T = "onMouseLeave", h = "onMouseEnter", r = "mouse", (t === "pointerout" || t === "pointerover") && (X = Pf, T = "onPointerLeave", h = "onPointerEnter", r = "pointer"), vt = x == null ? b : Ba(x), m = B == null ? b : Ba(B), b = new X(
10749
10749
  T,
10750
10750
  r + "leave",
10751
10751
  x,
10752
10752
  l,
10753
10753
  A
10754
- ), b.target = vt, b.relatedTarget = m, T = null, kl(A) === v && (Q = new Q(
10754
+ ), b.target = vt, b.relatedTarget = m, T = null, kl(A) === v && (X = new X(
10755
10755
  h,
10756
10756
  r + "enter",
10757
10757
  B,
10758
10758
  l,
10759
10759
  A
10760
- ), Q.target = m, Q.relatedTarget = vt, T = Q), vt = T, x && B)
10760
+ ), X.target = m, X.relatedTarget = vt, T = X), vt = T, x && B)
10761
10761
  e: {
10762
- for (Q = jy, h = x, r = B, m = 0, T = h; T; T = Q(T))
10762
+ for (X = jy, h = x, r = B, m = 0, T = h; T; T = X(T))
10763
10763
  m++;
10764
10764
  T = 0;
10765
- for (var L = r; L; L = Q(L))
10765
+ for (var L = r; L; L = X(L))
10766
10766
  T++;
10767
10767
  for (; 0 < m - T; )
10768
- h = Q(h), m--;
10768
+ h = X(h), m--;
10769
10769
  for (; 0 < T - m; )
10770
- r = Q(r), T--;
10770
+ r = X(r), T--;
10771
10771
  for (; m--; ) {
10772
10772
  if (h === r || r !== null && h === r.alternate) {
10773
- Q = h;
10773
+ X = h;
10774
10774
  break e;
10775
10775
  }
10776
- h = Q(h), r = Q(r);
10776
+ h = X(h), r = X(r);
10777
10777
  }
10778
- Q = null;
10778
+ X = null;
10779
10779
  }
10780
- else Q = null;
10780
+ else X = null;
10781
10781
  x !== null && Zr(
10782
10782
  z,
10783
10783
  b,
10784
10784
  x,
10785
- Q,
10785
+ X,
10786
10786
  !1
10787
10787
  ), B !== null && vt !== null && Zr(
10788
10788
  z,
10789
10789
  vt,
10790
10790
  B,
10791
- Q,
10791
+ X,
10792
10792
  !0
10793
10793
  );
10794
10794
  }
@@ -11595,8 +11595,8 @@ Error generating stack: ` + a.message + `
11595
11595
  case "track":
11596
11596
  case "wbr":
11597
11597
  case "menuitem":
11598
- for (var Q in l)
11599
- b = l[Q], l.hasOwnProperty(Q) && b != null && !a.hasOwnProperty(Q) && mt(t, e, Q, null, a, b);
11598
+ for (var X in l)
11599
+ b = l[X], l.hasOwnProperty(X) && b != null && !a.hasOwnProperty(X) && mt(t, e, X, null, a, b);
11600
11600
  for (v in a)
11601
11601
  if (b = a[v], x = l[v], a.hasOwnProperty(v) && b !== x && (b != null || x != null))
11602
11602
  switch (v) {
@@ -11966,7 +11966,7 @@ Error generating stack: ` + a.message + `
11966
11966
  case "script":
11967
11967
  u = Ca(t);
11968
11968
  }
11969
- _e.has(u) || (t = j(
11969
+ _e.has(u) || (t = R(
11970
11970
  {
11971
11971
  rel: "preload",
11972
11972
  href: e === "image" && l && l.imageSrcSet ? void 0 : t,
@@ -11990,7 +11990,7 @@ Error generating stack: ` + a.message + `
11990
11990
  case "script":
11991
11991
  u = Ca(t);
11992
11992
  }
11993
- if (!_e.has(u) && (t = j({ rel: "modulepreload", href: t }, e), _e.set(u, t), l.querySelector(n) === null)) {
11993
+ if (!_e.has(u) && (t = R({ rel: "modulepreload", href: t }, e), _e.set(u, t), l.querySelector(n) === null)) {
11994
11994
  switch (a) {
11995
11995
  case "audioworklet":
11996
11996
  case "paintworklet":
@@ -12019,7 +12019,7 @@ Error generating stack: ` + a.message + `
12019
12019
  ))
12020
12020
  c.loading = 5;
12021
12021
  else {
12022
- t = j(
12022
+ t = R(
12023
12023
  { rel: "stylesheet", href: t, "data-precedence": e },
12024
12024
  l
12025
12025
  ), (l = _e.get(u)) && uf(t, l);
@@ -12046,7 +12046,7 @@ Error generating stack: ` + a.message + `
12046
12046
  var l = _a;
12047
12047
  if (l && t) {
12048
12048
  var a = $l(l).hoistableScripts, n = Ca(t), u = a.get(n);
12049
- u || (u = l.querySelector(Sn(n)), u || (t = j({ src: t, async: !0 }, e), (e = _e.get(n)) && cf(t, e), u = l.createElement("script"), wt(u), Kt(u, "link", t), l.head.appendChild(u)), u = {
12049
+ u || (u = l.querySelector(Sn(n)), u || (t = R({ src: t, async: !0 }, e), (e = _e.get(n)) && cf(t, e), u = l.createElement("script"), wt(u), Kt(u, "link", t), l.head.appendChild(u)), u = {
12050
12050
  type: "script",
12051
12051
  instance: u,
12052
12052
  count: 1,
@@ -12059,7 +12059,7 @@ Error generating stack: ` + a.message + `
12059
12059
  var l = _a;
12060
12060
  if (l && t) {
12061
12061
  var a = $l(l).hoistableScripts, n = Ca(t), u = a.get(n);
12062
- u || (u = l.querySelector(Sn(n)), u || (t = j({ src: t, async: !0, type: "module" }, e), (e = _e.get(n)) && cf(t, e), u = l.createElement("script"), wt(u), Kt(u, "link", t), l.head.appendChild(u)), u = {
12062
+ u || (u = l.querySelector(Sn(n)), u || (t = R({ src: t, async: !0, type: "module" }, e), (e = _e.get(n)) && cf(t, e), u = l.createElement("script"), wt(u), Kt(u, "link", t), l.head.appendChild(u)), u = {
12063
12063
  type: "script",
12064
12064
  instance: u,
12065
12065
  count: 1,
@@ -12137,7 +12137,7 @@ Error generating stack: ` + a.message + `
12137
12137
  return 'link[rel="stylesheet"][' + t + "]";
12138
12138
  }
12139
12139
  function fd(t) {
12140
- return j({}, t, {
12140
+ return R({}, t, {
12141
12141
  "data-precedence": t.precedence,
12142
12142
  precedence: null
12143
12143
  });
@@ -12164,7 +12164,7 @@ Error generating stack: ` + a.message + `
12164
12164
  );
12165
12165
  if (a)
12166
12166
  return e.instance = a, wt(a), a;
12167
- var n = j({}, l, {
12167
+ var n = R({}, l, {
12168
12168
  "data-href": l.href,
12169
12169
  "data-precedence": l.precedence,
12170
12170
  href: null,
@@ -12188,7 +12188,7 @@ Error generating stack: ` + a.message + `
12188
12188
  case "script":
12189
12189
  return u = Ca(l.src), (n = t.querySelector(
12190
12190
  Sn(u)
12191
- )) ? (e.instance = n, wt(n), n) : (a = l, (n = _e.get(u)) && (a = j({}, l), cf(a, n)), t = t.ownerDocument || t, n = t.createElement("script"), wt(n), Kt(n, "link", a), t.head.appendChild(n), e.instance = n);
12191
+ )) ? (e.instance = n, wt(n), n) : (a = l, (n = _e.get(u)) && (a = R({}, l), cf(a, n)), t = t.ownerDocument || t, n = t.createElement("script"), wt(n), Kt(n, "link", a), t.head.appendChild(n), e.instance = n);
12192
12192
  case "void":
12193
12193
  return null;
12194
12194
  default:
@@ -12485,10 +12485,10 @@ Error generating stack: ` + a.message + `
12485
12485
  else {
12486
12486
  var l = e.tag;
12487
12487
  if (l === 13) {
12488
- if (t = X(e), t !== null) return t;
12488
+ if (t = V(e), t !== null) return t;
12489
12489
  t = null;
12490
12490
  } else if (l === 31) {
12491
- if (t = D(e), t !== null) return t;
12491
+ if (t = U(e), t !== null) return t;
12492
12492
  t = null;
12493
12493
  } else if (l === 3) {
12494
12494
  if (e.stateNode.current.memoizedState.isDehydrated)
@@ -12690,14 +12690,14 @@ Error generating stack: ` + a.message + `
12690
12690
  var l = H(e);
12691
12691
  if (l !== null) {
12692
12692
  if (e = l.tag, e === 13) {
12693
- if (e = X(l), e !== null) {
12693
+ if (e = V(l), e !== null) {
12694
12694
  t.blockedOn = e, Nf(t.priority, function() {
12695
12695
  pd(l);
12696
12696
  });
12697
12697
  return;
12698
12698
  }
12699
12699
  } else if (e === 31) {
12700
- if (e = D(l), e !== null) {
12700
+ if (e = U(l), e !== null) {
12701
12701
  t.blockedOn = e, Nf(t.priority, function() {
12702
12702
  pd(l);
12703
12703
  });
@@ -12868,7 +12868,7 @@ Error generating stack: ` + a.message + `
12868
12868
  var e = t._reactInternals;
12869
12869
  if (e === void 0)
12870
12870
  throw typeof t.render == "function" ? Error(o(188)) : (t = Object.keys(t).join(","), Error(o(268, t)));
12871
- return t = Y(e), t = t !== null ? U(t) : null, t = t === null ? null : t.stateNode, t;
12871
+ return t = Y(e), t = t !== null ? D(t) : null, t = t === null ? null : t.stateNode, t;
12872
12872
  };
12873
12873
  var og = {
12874
12874
  bundleType: 0,
@@ -13058,11 +13058,11 @@ function Vg() {
13058
13058
  console.warn("[GlydeChat] Auto-init skipped: no authentication provided (publishableKey, apiKey, or authToken required)");
13059
13059
  return;
13060
13060
  }
13061
- const D = f.getAttribute("data-width"), S = f.getAttribute("data-height"), Y = f.getAttribute("data-max-width"), U = f.getAttribute("data-max-height"), j = D || S || Y || U ? {
13062
- width: D ? isNaN(Number(D)) ? D : Number(D) : void 0,
13061
+ const U = f.getAttribute("data-width"), S = f.getAttribute("data-height"), Y = f.getAttribute("data-max-width"), D = f.getAttribute("data-max-height"), R = U || S || Y || D ? {
13062
+ width: U ? isNaN(Number(U)) ? U : Number(U) : void 0,
13063
13063
  height: S ? isNaN(Number(S)) ? S : Number(S) : void 0,
13064
13064
  maxWidth: Y ? isNaN(Number(Y)) ? Y : Number(Y) : void 0,
13065
- maxHeight: U ? isNaN(Number(U)) ? U : Number(U) : void 0
13065
+ maxHeight: D ? isNaN(Number(D)) ? D : Number(D) : void 0
13066
13066
  } : void 0, w = {
13067
13067
  publishableKey: M,
13068
13068
  apiKey: o,
@@ -13075,7 +13075,7 @@ function Vg() {
13075
13075
  theme: f.getAttribute("data-theme") || "light",
13076
13076
  allowModeSwitch: f.getAttribute("data-allow-mode-switch") !== "false",
13077
13077
  displayMode: f.getAttribute("data-display-mode") || "floating",
13078
- dimensions: j,
13078
+ dimensions: R,
13079
13079
  showHeader: f.getAttribute("data-show-header") !== "false",
13080
13080
  allowClose: f.getAttribute("data-allow-close") !== "false"
13081
13081
  };