@gamention/pulse-elements 0.1.19 → 0.1.20

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.
@@ -43,7 +43,7 @@ let Ge = class {
43
43
  * Copyright 2021 Google LLC
44
44
  * SPDX-License-Identifier: BSD-3-Clause
45
45
  */
46
- let Lt = class {
46
+ let jt = class {
47
47
  get value() {
48
48
  return this.o;
49
49
  }
@@ -76,11 +76,11 @@ let Lt = class {
76
76
  * Copyright 2021 Google LLC
77
77
  * SPDX-License-Identifier: BSD-3-Clause
78
78
  */
79
- let jt = class extends Event {
79
+ let zt = class extends Event {
80
80
  constructor(e, t) {
81
81
  super("context-provider", { bubbles: !0, composed: !0 }), this.context = e, this.contextTarget = t;
82
82
  }
83
- }, Je = class extends Lt {
83
+ }, Je = class extends jt {
84
84
  constructor(e, t, i) {
85
85
  var s, o;
86
86
  super(t.context !== void 0 ? t.initialValue : i), this.onContextRequest = (r) => {
@@ -98,7 +98,7 @@ let jt = class extends Event {
98
98
  this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
99
99
  }
100
100
  hostConnected() {
101
- this.host.dispatchEvent(new jt(this.context, this.host));
101
+ this.host.dispatchEvent(new zt(this.context, this.host));
102
102
  }
103
103
  };
104
104
  /**
@@ -106,7 +106,7 @@ let jt = class extends Event {
106
106
  * Copyright 2017 Google LLC
107
107
  * SPDX-License-Identifier: BSD-3-Clause
108
108
  */
109
- function zt({ context: n }) {
109
+ function Ut({ context: n }) {
110
110
  return (e, t) => {
111
111
  const i = /* @__PURE__ */ new WeakMap();
112
112
  if (typeof t == "object") return { get() {
@@ -157,7 +157,7 @@ function fe({ context: n, subscribe: e }) {
157
157
  }));
158
158
  };
159
159
  }
160
- var Ut = Object.defineProperty, Dt = (n, e, t) => e in n ? Ut(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, k = (n, e, t) => Dt(n, typeof e != "symbol" ? e + "" : e, t);
160
+ var Dt = Object.defineProperty, Ht = (n, e, t) => e in n ? Dt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, k = (n, e, t) => Ht(n, typeof e != "symbol" ? e + "" : e, t);
161
161
  const _e = {
162
162
  allowImages: !0,
163
163
  allowAudio: !0,
@@ -170,7 +170,7 @@ const _e = {
170
170
  showCursors: !0,
171
171
  showPresence: !0,
172
172
  showTypingIndicators: !0
173
- }, Ht = "ws://localhost:4567", Ze = 50, Nt = 3e4, Bt = 1e3, Ft = 3e4;
173
+ }, Nt = "ws://localhost:4567", Ze = 50, Bt = 3e4, Ft = 1e3, qt = 3e4;
174
174
  let He = class {
175
175
  constructor() {
176
176
  k(this, "handlers", /* @__PURE__ */ new Map());
@@ -191,9 +191,9 @@ let He = class {
191
191
  removeAll() {
192
192
  this.handlers.clear();
193
193
  }
194
- }, qt = class extends He {
194
+ }, Vt = class extends He {
195
195
  constructor(e) {
196
- super(), k(this, "ws", null), k(this, "endpoint"), k(this, "reconnectAttempt", 0), k(this, "reconnectTimer", null), k(this, "_state", "disconnected"), this.endpoint = e ?? Ht;
196
+ super(), k(this, "ws", null), k(this, "endpoint"), k(this, "reconnectAttempt", 0), k(this, "reconnectTimer", null), k(this, "_state", "disconnected"), this.endpoint = e ?? Nt;
197
197
  }
198
198
  get state() {
199
199
  return this._state;
@@ -221,14 +221,14 @@ let He = class {
221
221
  }
222
222
  scheduleReconnect() {
223
223
  const e = Math.min(
224
- Bt * 2 ** this.reconnectAttempt,
225
- Ft
224
+ Ft * 2 ** this.reconnectAttempt,
225
+ qt
226
226
  );
227
227
  this.reconnectAttempt++, this.reconnectTimer = setTimeout(() => {
228
228
  this.reconnectTimer = null, this.connect();
229
229
  }, e);
230
230
  }
231
- }, Vt = class extends He {
231
+ }, Wt = class extends He {
232
232
  constructor() {
233
233
  super(...arguments), k(this, "baseUrl", ""), k(this, "_user", null), k(this, "_config", { ..._e }), k(this, "_users", /* @__PURE__ */ new Map()), k(this, "_presence", /* @__PURE__ */ new Map()), k(this, "_threads", /* @__PURE__ */ new Map()), k(this, "_reactions", /* @__PURE__ */ new Map()), k(this, "_notifications", []), k(this, "_activityLogs", []), k(this, "_typing", /* @__PURE__ */ new Map()), k(this, "_viewports", /* @__PURE__ */ new Map()), k(this, "_selections", /* @__PURE__ */ new Map());
234
234
  }
@@ -456,9 +456,9 @@ let He = class {
456
456
  }, Et = class extends He {
457
457
  constructor(e) {
458
458
  var t;
459
- super(), k(this, "state"), k(this, "connection"), k(this, "config"), k(this, "heartbeatTimer", null), k(this, "lastCursorSend", 0), k(this, "pendingCursor", null), k(this, "cursorTimer", null), this.config = e, this.state = new Vt(), this.state.baseUrl = (e.endpoint ?? "").replace(/^ws(s?):/, "http$1:").replace(/\/$/, "");
459
+ super(), k(this, "state"), k(this, "connection"), k(this, "config"), k(this, "heartbeatTimer", null), k(this, "lastCursorSend", 0), k(this, "pendingCursor", null), k(this, "cursorTimer", null), this.config = e, this.state = new Wt(), this.state.baseUrl = (e.endpoint ?? "").replace(/^ws(s?):/, "http$1:").replace(/\/$/, "");
460
460
  const i = ((t = e.endpoint) == null ? void 0 : t.replace(/^http/, "ws")) ?? void 0;
461
- this.connection = new qt(i), this.connection.on("message", (s) => {
461
+ this.connection = new Vt(i), this.connection.on("message", (s) => {
462
462
  this.state.handleMessage(s), this.emit(s.type, s);
463
463
  }), this.connection.on("state", (s) => {
464
464
  this.emit("connection", s), s === "connected" ? (this.authenticate(), this.startHeartbeat()) : s === "disconnected" && this.stopHeartbeat();
@@ -502,7 +502,7 @@ let He = class {
502
502
  startHeartbeat() {
503
503
  this.heartbeatTimer = setInterval(() => {
504
504
  this.send({ type: "presence:update", status: "online" });
505
- }, Nt);
505
+ }, Bt);
506
506
  }
507
507
  stopHeartbeat() {
508
508
  this.heartbeatTimer && (clearInterval(this.heartbeatTimer), this.heartbeatTimer = null);
@@ -621,14 +621,14 @@ let Ct = class {
621
621
  return this.cssText;
622
622
  }
623
623
  };
624
- const Wt = (n) => new Ct(typeof n == "string" ? n : n + "", void 0, Be), M = (n, ...e) => {
624
+ const Xt = (n) => new Ct(typeof n == "string" ? n : n + "", void 0, Be), O = (n, ...e) => {
625
625
  const t = n.length === 1 ? n[0] : e.reduce((i, s, o) => i + ((r) => {
626
626
  if (r._$cssResult$ === !0) return r.cssText;
627
627
  if (typeof r == "number") return r;
628
628
  throw Error("Value passed to 'css' function must be a 'css' function result: " + r + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
629
629
  })(s) + n[o + 1], n[0]);
630
630
  return new Ct(t, n, Be);
631
- }, Xt = (n, e) => {
631
+ }, Yt = (n, e) => {
632
632
  if (Ne) n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
633
633
  else for (const t of e) {
634
634
  const i = document.createElement("style"), s = ye.litNonce;
@@ -637,17 +637,17 @@ const Wt = (n) => new Ct(typeof n == "string" ? n : n + "", void 0, Be), M = (n,
637
637
  }, et = Ne ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((e) => {
638
638
  let t = "";
639
639
  for (const i of e.cssRules) t += i.cssText;
640
- return Wt(t);
640
+ return Xt(t);
641
641
  })(n) : n;
642
642
  /**
643
643
  * @license
644
644
  * Copyright 2017 Google LLC
645
645
  * SPDX-License-Identifier: BSD-3-Clause
646
646
  */
647
- const { is: Yt, defineProperty: Kt, getOwnPropertyDescriptor: Gt, getOwnPropertyNames: Jt, getOwnPropertySymbols: Zt, getPrototypeOf: Qt } = Object, H = globalThis, tt = H.trustedTypes, ei = tt ? tt.emptyScript : "", Ie = H.reactiveElementPolyfillSupport, ne = (n, e) => n, ke = { toAttribute(n, e) {
647
+ const { is: Kt, defineProperty: Gt, getOwnPropertyDescriptor: Jt, getOwnPropertyNames: Zt, getOwnPropertySymbols: Qt, getPrototypeOf: ei } = Object, H = globalThis, tt = H.trustedTypes, ti = tt ? tt.emptyScript : "", Ie = H.reactiveElementPolyfillSupport, ne = (n, e) => n, ke = { toAttribute(n, e) {
648
648
  switch (e) {
649
649
  case Boolean:
650
- n = n ? ei : null;
650
+ n = n ? ti : null;
651
651
  break;
652
652
  case Object:
653
653
  case Array:
@@ -672,7 +672,7 @@ const { is: Yt, defineProperty: Kt, getOwnPropertyDescriptor: Gt, getOwnProperty
672
672
  }
673
673
  }
674
674
  return t;
675
- } }, Fe = (n, e) => !Yt(n, e), it = { attribute: !0, type: String, converter: ke, reflect: !1, useDefault: !1, hasChanged: Fe };
675
+ } }, Fe = (n, e) => !Kt(n, e), it = { attribute: !0, type: String, converter: ke, reflect: !1, useDefault: !1, hasChanged: Fe };
676
676
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), H.litPropertyMetadata ?? (H.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
677
677
  let G = class extends HTMLElement {
678
678
  static addInitializer(e) {
@@ -684,11 +684,11 @@ let G = class extends HTMLElement {
684
684
  static createProperty(e, t = it) {
685
685
  if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
686
686
  const i = Symbol(), s = this.getPropertyDescriptor(e, i, t);
687
- s !== void 0 && Kt(this.prototype, e, s);
687
+ s !== void 0 && Gt(this.prototype, e, s);
688
688
  }
689
689
  }
690
690
  static getPropertyDescriptor(e, t, i) {
691
- const { get: s, set: o } = Gt(this.prototype, e) ?? { get() {
691
+ const { get: s, set: o } = Jt(this.prototype, e) ?? { get() {
692
692
  return this[t];
693
693
  }, set(r) {
694
694
  this[t] = r;
@@ -703,13 +703,13 @@ let G = class extends HTMLElement {
703
703
  }
704
704
  static _$Ei() {
705
705
  if (this.hasOwnProperty(ne("elementProperties"))) return;
706
- const e = Qt(this);
706
+ const e = ei(this);
707
707
  e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
708
708
  }
709
709
  static finalize() {
710
710
  if (this.hasOwnProperty(ne("finalized"))) return;
711
711
  if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ne("properties"))) {
712
- const t = this.properties, i = [...Jt(t), ...Zt(t)];
712
+ const t = this.properties, i = [...Zt(t), ...Qt(t)];
713
713
  for (const s of i) this.createProperty(s, t[s]);
714
714
  }
715
715
  const e = this[Symbol.metadata];
@@ -758,7 +758,7 @@ let G = class extends HTMLElement {
758
758
  }
759
759
  createRenderRoot() {
760
760
  const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
761
- return Xt(e, this.constructor.elementStyles), e;
761
+ return Yt(e, this.constructor.elementStyles), e;
762
762
  }
763
763
  connectedCallback() {
764
764
  var e;
@@ -883,14 +883,14 @@ G.elementStyles = [], G.shadowRootOptions = { mode: "open" }, G[ne("elementPrope
883
883
  * Copyright 2017 Google LLC
884
884
  * SPDX-License-Identifier: BSD-3-Clause
885
885
  */
886
- const oe = globalThis, st = (n) => n, Ee = oe.trustedTypes, nt = Ee ? Ee.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Tt = "$lit$", D = `lit$${Math.random().toFixed(9).slice(2)}$`, St = "?" + D, ti = `<${St}>`, V = document, ae = () => V.createComment(""), le = (n) => n === null || typeof n != "object" && typeof n != "function", qe = Array.isArray, ii = (n) => qe(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", Me = `[
886
+ const oe = globalThis, st = (n) => n, Ee = oe.trustedTypes, nt = Ee ? Ee.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, Tt = "$lit$", D = `lit$${Math.random().toFixed(9).slice(2)}$`, St = "?" + D, ii = `<${St}>`, V = document, ae = () => V.createComment(""), le = (n) => n === null || typeof n != "object" && typeof n != "function", qe = Array.isArray, si = (n) => qe(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", Me = `[
887
887
  \f\r]`, se = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ot = /-->/g, rt = />/g, B = RegExp(`>|${Me}(?:([^\\s"'>=/]+)(${Me}*=${Me}*(?:[^
888
- \f\r"'\`<>=]|("|')|))|$)`, "g"), at = /'/g, lt = /"/g, At = /^(?:script|style|textarea|title)$/i, Pt = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), u = Pt(1), si = Pt(2), W = Symbol.for("lit-noChange"), v = Symbol.for("lit-nothing"), ct = /* @__PURE__ */ new WeakMap(), F = V.createTreeWalker(V, 129);
888
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), at = /'/g, lt = /"/g, At = /^(?:script|style|textarea|title)$/i, Pt = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), u = Pt(1), ni = Pt(2), W = Symbol.for("lit-noChange"), v = Symbol.for("lit-nothing"), ct = /* @__PURE__ */ new WeakMap(), F = V.createTreeWalker(V, 129);
889
889
  function _t(n, e) {
890
890
  if (!qe(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
891
891
  return nt !== void 0 ? nt.createHTML(e) : e;
892
892
  }
893
- const ni = (n, e) => {
893
+ const oi = (n, e) => {
894
894
  const t = n.length - 1, i = [];
895
895
  let s, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", r = se;
896
896
  for (let a = 0; a < t; a++) {
@@ -898,7 +898,7 @@ const ni = (n, e) => {
898
898
  let d, c, h = -1, p = 0;
899
899
  for (; p < l.length && (r.lastIndex = p, c = r.exec(l), c !== null); ) p = r.lastIndex, r === se ? c[1] === "!--" ? r = ot : c[1] !== void 0 ? r = rt : c[2] !== void 0 ? (At.test(c[2]) && (s = RegExp("</" + c[2], "g")), r = B) : c[3] !== void 0 && (r = B) : r === B ? c[0] === ">" ? (r = s ?? se, h = -1) : c[1] === void 0 ? h = -2 : (h = r.lastIndex - c[2].length, d = c[1], r = c[3] === void 0 ? B : c[3] === '"' ? lt : at) : r === lt || r === at ? r = B : r === ot || r === rt ? r = se : (r = B, s = void 0);
900
900
  const m = r === B && n[a + 1].startsWith("/>") ? " " : "";
901
- o += r === se ? l + ti : h >= 0 ? (i.push(d), l.slice(0, h) + Tt + l.slice(h) + D + m) : l + D + (h === -2 ? a : m);
901
+ o += r === se ? l + ii : h >= 0 ? (i.push(d), l.slice(0, h) + Tt + l.slice(h) + D + m) : l + D + (h === -2 ? a : m);
902
902
  }
903
903
  return [_t(n, o + (n[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
904
904
  };
@@ -907,7 +907,7 @@ class ce {
907
907
  let s;
908
908
  this.parts = [];
909
909
  let o = 0, r = 0;
910
- const a = e.length - 1, l = this.parts, [d, c] = ni(e, t);
910
+ const a = e.length - 1, l = this.parts, [d, c] = oi(e, t);
911
911
  if (this.el = ce.createElement(d, i), F.currentNode = this.el.content, t === 2 || t === 3) {
912
912
  const h = this.el.content.firstChild;
913
913
  h.replaceWith(...h.childNodes);
@@ -916,7 +916,7 @@ class ce {
916
916
  if (s.nodeType === 1) {
917
917
  if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(Tt)) {
918
918
  const p = c[r++], m = s.getAttribute(h).split(D), g = /([.?@])?(.*)/.exec(p);
919
- l.push({ type: 1, index: o, name: g[2], strings: m, ctor: g[1] === "." ? ri : g[1] === "?" ? ai : g[1] === "@" ? li : Se }), s.removeAttribute(h);
919
+ l.push({ type: 1, index: o, name: g[2], strings: m, ctor: g[1] === "." ? ai : g[1] === "?" ? li : g[1] === "@" ? ci : Se }), s.removeAttribute(h);
920
920
  } else h.startsWith(D) && (l.push({ type: 6, index: o }), s.removeAttribute(h));
921
921
  if (At.test(s.tagName)) {
922
922
  const h = s.textContent.split(D), p = h.length - 1;
@@ -946,7 +946,7 @@ function J(n, e, t = n, i) {
946
946
  const o = le(e) ? void 0 : e._$litDirective$;
947
947
  return (s == null ? void 0 : s.constructor) !== o && ((a = s == null ? void 0 : s._$AO) == null || a.call(s, !1), o === void 0 ? s = void 0 : (s = new o(n), s._$AT(n, t, i)), i !== void 0 ? (t._$Co ?? (t._$Co = []))[i] = s : t._$Cl = s), s !== void 0 && (e = J(n, s._$AS(n, e.values), s, i)), e;
948
948
  }
949
- class oi {
949
+ class ri {
950
950
  constructor(e, t) {
951
951
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
952
952
  }
@@ -963,7 +963,7 @@ class oi {
963
963
  for (; l !== void 0; ) {
964
964
  if (r === l.index) {
965
965
  let d;
966
- l.type === 2 ? d = new me(o, o.nextSibling, this, e) : l.type === 1 ? d = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (d = new ci(o, this, e)), this._$AV.push(d), l = i[++a];
966
+ l.type === 2 ? d = new me(o, o.nextSibling, this, e) : l.type === 1 ? d = new l.ctor(o, l.name, l.strings, this, e) : l.type === 6 && (d = new di(o, this, e)), this._$AV.push(d), l = i[++a];
967
967
  }
968
968
  r !== (l == null ? void 0 : l.index) && (o = F.nextNode(), r++);
969
969
  }
@@ -994,7 +994,7 @@ class me {
994
994
  return this._$AB;
995
995
  }
996
996
  _$AI(e, t = this) {
997
- e = J(this, e, t), le(e) ? e === v || e == null || e === "" ? (this._$AH !== v && this._$AR(), this._$AH = v) : e !== this._$AH && e !== W && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : ii(e) ? this.k(e) : this._(e);
997
+ e = J(this, e, t), le(e) ? e === v || e == null || e === "" ? (this._$AH !== v && this._$AR(), this._$AH = v) : e !== this._$AH && e !== W && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : si(e) ? this.k(e) : this._(e);
998
998
  }
999
999
  O(e) {
1000
1000
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -1010,7 +1010,7 @@ class me {
1010
1010
  const { values: t, _$litType$: i } = e, s = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = ce.createElement(_t(i.h, i.h[0]), this.options)), i);
1011
1011
  if (((o = this._$AH) == null ? void 0 : o._$AD) === s) this._$AH.p(t);
1012
1012
  else {
1013
- const r = new oi(s, this), a = r.u(this.options);
1013
+ const r = new ri(s, this), a = r.u(this.options);
1014
1014
  r.p(t), this.T(a), this._$AH = r;
1015
1015
  }
1016
1016
  }
@@ -1062,7 +1062,7 @@ class Se {
1062
1062
  e === v ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
1063
1063
  }
1064
1064
  }
1065
- class ri extends Se {
1065
+ class ai extends Se {
1066
1066
  constructor() {
1067
1067
  super(...arguments), this.type = 3;
1068
1068
  }
@@ -1070,7 +1070,7 @@ class ri extends Se {
1070
1070
  this.element[this.name] = e === v ? void 0 : e;
1071
1071
  }
1072
1072
  }
1073
- class ai extends Se {
1073
+ class li extends Se {
1074
1074
  constructor() {
1075
1075
  super(...arguments), this.type = 4;
1076
1076
  }
@@ -1078,7 +1078,7 @@ class ai extends Se {
1078
1078
  this.element.toggleAttribute(this.name, !!e && e !== v);
1079
1079
  }
1080
1080
  }
1081
- class li extends Se {
1081
+ class ci extends Se {
1082
1082
  constructor(e, t, i, s, o) {
1083
1083
  super(e, t, i, s, o), this.type = 5;
1084
1084
  }
@@ -1092,7 +1092,7 @@ class li extends Se {
1092
1092
  typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
1093
1093
  }
1094
1094
  }
1095
- class ci {
1095
+ class di {
1096
1096
  constructor(e, t, i) {
1097
1097
  this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
1098
1098
  }
@@ -1105,7 +1105,7 @@ class ci {
1105
1105
  }
1106
1106
  const Oe = oe.litHtmlPolyfillSupport;
1107
1107
  Oe == null || Oe(ce, me), (oe.litHtmlVersions ?? (oe.litHtmlVersions = [])).push("3.3.2");
1108
- const di = (n, e, t) => {
1108
+ const hi = (n, e, t) => {
1109
1109
  const i = (t == null ? void 0 : t.renderBefore) ?? e;
1110
1110
  let s = i._$litPart$;
1111
1111
  if (s === void 0) {
@@ -1120,7 +1120,7 @@ const di = (n, e, t) => {
1120
1120
  * SPDX-License-Identifier: BSD-3-Clause
1121
1121
  */
1122
1122
  const q = globalThis;
1123
- let A = class extends G {
1123
+ let P = class extends G {
1124
1124
  constructor() {
1125
1125
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
1126
1126
  }
@@ -1131,7 +1131,7 @@ let A = class extends G {
1131
1131
  }
1132
1132
  update(e) {
1133
1133
  const t = this.render();
1134
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = di(t, this.renderRoot, this.renderOptions);
1134
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = hi(t, this.renderRoot, this.renderOptions);
1135
1135
  }
1136
1136
  connectedCallback() {
1137
1137
  var e;
@@ -1146,9 +1146,9 @@ let A = class extends G {
1146
1146
  }
1147
1147
  };
1148
1148
  var $t;
1149
- A._$litElement$ = !0, A.finalized = !0, ($t = q.litElementHydrateSupport) == null || $t.call(q, { LitElement: A });
1149
+ P._$litElement$ = !0, P.finalized = !0, ($t = q.litElementHydrateSupport) == null || $t.call(q, { LitElement: P });
1150
1150
  const Re = q.litElementPolyfillSupport;
1151
- Re == null || Re({ LitElement: A });
1151
+ Re == null || Re({ LitElement: P });
1152
1152
  (q.litElementVersions ?? (q.litElementVersions = [])).push("4.2.2");
1153
1153
  /**
1154
1154
  * @license
@@ -1165,7 +1165,7 @@ const L = (n) => (e, t) => {
1165
1165
  * Copyright 2017 Google LLC
1166
1166
  * SPDX-License-Identifier: BSD-3-Clause
1167
1167
  */
1168
- const hi = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged: Fe }, pi = (n = hi, e, t) => {
1168
+ const pi = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged: Fe }, ui = (n = pi, e, t) => {
1169
1169
  const { kind: i, metadata: s } = t;
1170
1170
  let o = globalThis.litPropertyMetadata.get(s);
1171
1171
  if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), i === "setter" && ((n = Object.create(n)).wrapped = !0), o.set(t.name, n), i === "accessor") {
@@ -1187,7 +1187,7 @@ const hi = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged
1187
1187
  throw Error("Unsupported decorator location: " + i);
1188
1188
  };
1189
1189
  function x(n) {
1190
- return (e, t) => typeof t == "object" ? pi(n, e, t) : ((i, s, o) => {
1190
+ return (e, t) => typeof t == "object" ? ui(n, e, t) : ((i, s, o) => {
1191
1191
  const r = s.hasOwnProperty(o);
1192
1192
  return s.constructor.createProperty(o, i), r ? Object.getOwnPropertyDescriptor(s, o) : void 0;
1193
1193
  })(n, e, t);
@@ -1201,12 +1201,12 @@ function $(n) {
1201
1201
  return x({ ...n, state: !0, attribute: !1 });
1202
1202
  }
1203
1203
  const Q = "pulse-client";
1204
- var ui = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, ee = (n, e, t, i) => {
1205
- for (var s = i > 1 ? void 0 : i ? fi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1204
+ var fi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, ee = (n, e, t, i) => {
1205
+ for (var s = i > 1 ? void 0 : i ? mi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1206
1206
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
1207
- return i && s && ui(e, t, s), s;
1207
+ return i && s && fi(e, t, s), s;
1208
1208
  };
1209
- let X = class extends A {
1209
+ let X = class extends P {
1210
1210
  constructor() {
1211
1211
  super(...arguments), this.apiKey = "", this.token = "", this.room = "";
1212
1212
  }
@@ -1241,17 +1241,17 @@ ee([
1241
1241
  x()
1242
1242
  ], X.prototype, "endpoint", 2);
1243
1243
  ee([
1244
- zt({ context: Q })
1244
+ Ut({ context: Q })
1245
1245
  ], X.prototype, "client", 2);
1246
1246
  X = ee([
1247
1247
  L("pulse-provider")
1248
1248
  ], X);
1249
- var mi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, Ae = (n, e, t, i) => {
1250
- for (var s = i > 1 ? void 0 : i ? gi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1249
+ var gi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, Ae = (n, e, t, i) => {
1250
+ for (var s = i > 1 ? void 0 : i ? vi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1251
1251
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
1252
- return i && s && mi(e, t, s), s;
1252
+ return i && s && gi(e, t, s), s;
1253
1253
  };
1254
- let Z = class extends A {
1254
+ let Z = class extends P {
1255
1255
  constructor() {
1256
1256
  super(...arguments), this.maxVisible = 5, this.users = [];
1257
1257
  }
@@ -1295,7 +1295,7 @@ let Z = class extends A {
1295
1295
  `;
1296
1296
  }
1297
1297
  };
1298
- Z.styles = M`
1298
+ Z.styles = O`
1299
1299
  :host {
1300
1300
  display: inline-flex;
1301
1301
  align-items: center;
@@ -1412,12 +1412,12 @@ Ae([
1412
1412
  Z = Ae([
1413
1413
  L("pulse-presence")
1414
1414
  ], Z);
1415
- var vi = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, Ve = (n, e, t, i) => {
1416
- for (var s = i > 1 ? void 0 : i ? bi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1415
+ var bi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, Ve = (n, e, t, i) => {
1416
+ for (var s = i > 1 ? void 0 : i ? xi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1417
1417
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
1418
- return i && s && vi(e, t, s), s;
1418
+ return i && s && bi(e, t, s), s;
1419
1419
  };
1420
- let de = class extends A {
1420
+ let de = class extends P {
1421
1421
  constructor() {
1422
1422
  super(...arguments), this.cursors = /* @__PURE__ */ new Map(), this.unsubs = [], this.handleLocalCursor = (n) => {
1423
1423
  var e;
@@ -1494,7 +1494,7 @@ let de = class extends A {
1494
1494
  `;
1495
1495
  }
1496
1496
  };
1497
- de.styles = M`
1497
+ de.styles = O`
1498
1498
  :host {
1499
1499
  position: fixed;
1500
1500
  top: 0;
@@ -1541,12 +1541,12 @@ Ve([
1541
1541
  de = Ve([
1542
1542
  L("pulse-cursors")
1543
1543
  ], de);
1544
- var xi = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, ge = (n, e, t, i) => {
1545
- for (var s = i > 1 ? void 0 : i ? yi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1544
+ var yi = Object.defineProperty, wi = Object.getOwnPropertyDescriptor, ge = (n, e, t, i) => {
1545
+ for (var s = i > 1 ? void 0 : i ? wi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1546
1546
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
1547
- return i && s && xi(e, t, s), s;
1547
+ return i && s && yi(e, t, s), s;
1548
1548
  };
1549
- let Y = class extends A {
1549
+ let Y = class extends P {
1550
1550
  constructor() {
1551
1551
  super(...arguments), this.showResolved = !1, this.threads = [], this.replyingTo = null;
1552
1552
  }
@@ -1664,7 +1664,7 @@ let Y = class extends A {
1664
1664
  return o < 24 ? `${o}h ago` : e.toLocaleDateString();
1665
1665
  }
1666
1666
  };
1667
- Y.styles = M`
1667
+ Y.styles = O`
1668
1668
  :host {
1669
1669
  display: block;
1670
1670
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
@@ -1892,25 +1892,25 @@ ge([
1892
1892
  Y = ge([
1893
1893
  L("pulse-comments")
1894
1894
  ], Y);
1895
- var wi = Object.defineProperty, $i = Object.getOwnPropertyDescriptor, We = (n, e, t, i) => {
1896
- for (var s = i > 1 ? void 0 : i ? $i(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1895
+ var $i = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, We = (n, e, t, i) => {
1896
+ for (var s = i > 1 ? void 0 : i ? ki(e, t) : e, o = n.length - 1, r; o >= 0; o--)
1897
1897
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
1898
- return i && s && wi(e, t, s), s;
1898
+ return i && s && $i(e, t, s), s;
1899
1899
  };
1900
- const ki = {
1900
+ const Ei = {
1901
1901
  "comment:created": "left a comment",
1902
1902
  "comment:mention": "mentioned you",
1903
1903
  "comment:reply": "replied to your comment",
1904
1904
  "thread:resolved": "resolved a thread",
1905
1905
  "reaction:added": "reacted to your comment"
1906
- }, Ei = {
1906
+ }, Ci = {
1907
1907
  "comment:created": "💬",
1908
1908
  "comment:mention": "📣",
1909
1909
  "comment:reply": "↩️",
1910
1910
  "thread:resolved": "✅",
1911
1911
  "reaction:added": "🎉"
1912
1912
  };
1913
- let he = class extends A {
1913
+ let he = class extends P {
1914
1914
  constructor() {
1915
1915
  super(...arguments), this.notifications = [];
1916
1916
  }
@@ -1977,11 +1977,11 @@ let he = class extends A {
1977
1977
  class="item ${e.read ? "" : "unread"}"
1978
1978
  @click=${() => this.handleClick(e)}
1979
1979
  >
1980
- <span class="icon">${Ei[e.type] ?? "🔔"}</span>
1980
+ <span class="icon">${Ci[e.type] ?? "🔔"}</span>
1981
1981
  <div class="content">
1982
1982
  <div class="text">
1983
1983
  <span class="actor">${this.getActorName(e.actorId)}</span>
1984
- ${ki[e.type] ?? e.type}
1984
+ ${Ei[e.type] ?? e.type}
1985
1985
  </div>
1986
1986
  <div class="time">${this.formatTime(e.createdAt)}</div>
1987
1987
  </div>
@@ -1993,7 +1993,7 @@ let he = class extends A {
1993
1993
  `;
1994
1994
  }
1995
1995
  };
1996
- he.styles = M`
1996
+ he.styles = O`
1997
1997
  :host {
1998
1998
  display: block;
1999
1999
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
@@ -2144,13 +2144,13 @@ We([
2144
2144
  he = We([
2145
2145
  L("pulse-notifications")
2146
2146
  ], he);
2147
- var Ci = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, te = (n, e, t, i) => {
2148
- for (var s = i > 1 ? void 0 : i ? Ti(e, t) : e, o = n.length - 1, r; o >= 0; o--)
2147
+ var Ti = Object.defineProperty, Si = Object.getOwnPropertyDescriptor, te = (n, e, t, i) => {
2148
+ for (var s = i > 1 ? void 0 : i ? Si(e, t) : e, o = n.length - 1, r; o >= 0; o--)
2149
2149
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
2150
- return i && s && Ci(e, t, s), s;
2150
+ return i && s && Ti(e, t, s), s;
2151
2151
  };
2152
- const Si = ["👍", "👎", "❤️", "🎉", "👀", "🚀"];
2153
- let N = class extends A {
2152
+ const Ai = ["👍", "👎", "❤️", "🎉", "👀", "🚀"];
2153
+ let N = class extends P {
2154
2154
  constructor() {
2155
2155
  super(...arguments), this.targetId = "", this.targetType = "comment", this.reactions = [], this.showPicker = !1;
2156
2156
  }
@@ -2211,7 +2211,7 @@ let N = class extends A {
2211
2211
  </button>
2212
2212
  ${this.showPicker ? u`
2213
2213
  <div class="picker">
2214
- ${Si.map(
2214
+ ${Ai.map(
2215
2215
  (e) => u`
2216
2216
  <button @click=${() => this.addEmoji(e)}>
2217
2217
  ${e}
@@ -2224,7 +2224,7 @@ let N = class extends A {
2224
2224
  `;
2225
2225
  }
2226
2226
  };
2227
- N.styles = M`
2227
+ N.styles = O`
2228
2228
  :host {
2229
2229
  display: inline-flex;
2230
2230
  align-items: center;
@@ -2355,13 +2355,26 @@ te([
2355
2355
  N = te([
2356
2356
  L("pulse-reactions")
2357
2357
  ], N);
2358
+ const It = {
2359
+ allowImages: !0,
2360
+ allowAudio: !0,
2361
+ allowVideo: !0,
2362
+ maxFileSizeMb: 10,
2363
+ maxAttachmentsPerComment: 5,
2364
+ allowReactions: !0,
2365
+ allowDrawing: !0,
2366
+ allowMentions: !0,
2367
+ showCursors: !0,
2368
+ showPresence: !0,
2369
+ showTypingIndicators: !0
2370
+ };
2358
2371
  /**
2359
2372
  * @license
2360
2373
  * Copyright 2017 Google LLC
2361
2374
  * SPDX-License-Identifier: BSD-3-Clause
2362
2375
  */
2363
- const Ai = { CHILD: 2 }, Pi = (n) => (...e) => ({ _$litDirective$: n, values: e });
2364
- class _i {
2376
+ const Pi = { CHILD: 2 }, _i = (n) => (...e) => ({ _$litDirective$: n, values: e });
2377
+ class Ii {
2365
2378
  constructor(e) {
2366
2379
  }
2367
2380
  get _$AU() {
@@ -2382,9 +2395,9 @@ class _i {
2382
2395
  * Copyright 2017 Google LLC
2383
2396
  * SPDX-License-Identifier: BSD-3-Clause
2384
2397
  */
2385
- class Le extends _i {
2398
+ class Le extends Ii {
2386
2399
  constructor(e) {
2387
- if (super(e), this.it = v, e.type !== Ai.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
2400
+ if (super(e), this.it = v, e.type !== Pi.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
2388
2401
  }
2389
2402
  render(e) {
2390
2403
  if (e === v || e == null) return this._t = void 0, this.it = e;
@@ -2405,14 +2418,14 @@ Le.directiveName = "unsafeHTML", Le.resultType = 1;
2405
2418
  class je extends Le {
2406
2419
  }
2407
2420
  je.directiveName = "unsafeSVG", je.resultType = 2;
2408
- const Ii = Pi(je);
2421
+ const Mi = _i(je);
2409
2422
  /**
2410
2423
  * @license lucide v0.577.0 - ISC
2411
2424
  *
2412
2425
  * This source code is licensed under the ISC license.
2413
2426
  * See the LICENSE file in the root directory of this source tree.
2414
2427
  */
2415
- const Mi = [
2428
+ const Oi = [
2416
2429
  ["path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }],
2417
2430
  [
2418
2431
  "path",
@@ -2427,7 +2440,7 @@ const Mi = [
2427
2440
  * This source code is licensed under the ISC license.
2428
2441
  * See the LICENSE file in the root directory of this source tree.
2429
2442
  */
2430
- const Oi = [
2443
+ const Ri = [
2431
2444
  ["circle", { cx: "12", cy: "12", r: "10" }],
2432
2445
  ["path", { d: "M12 6v6l4 2" }]
2433
2446
  ];
@@ -2437,7 +2450,7 @@ const Oi = [
2437
2450
  * This source code is licensed under the ISC license.
2438
2451
  * See the LICENSE file in the root directory of this source tree.
2439
2452
  */
2440
- const Ri = [
2453
+ const Li = [
2441
2454
  [
2442
2455
  "path",
2443
2456
  {
@@ -2451,7 +2464,7 @@ const Ri = [
2451
2464
  * This source code is licensed under the ISC license.
2452
2465
  * See the LICENSE file in the root directory of this source tree.
2453
2466
  */
2454
- const Li = [
2467
+ const ji = [
2455
2468
  ["path", { d: "M12 19v3" }],
2456
2469
  ["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }],
2457
2470
  ["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3" }]
@@ -2462,7 +2475,7 @@ const Li = [
2462
2475
  * This source code is licensed under the ISC license.
2463
2476
  * See the LICENSE file in the root directory of this source tree.
2464
2477
  */
2465
- const ji = [
2478
+ const zi = [
2466
2479
  [
2467
2480
  "path",
2468
2481
  {
@@ -2476,7 +2489,7 @@ const ji = [
2476
2489
  * This source code is licensed under the ISC license.
2477
2490
  * See the LICENSE file in the root directory of this source tree.
2478
2491
  */
2479
- const zi = [
2492
+ const Ui = [
2480
2493
  [
2481
2494
  "path",
2482
2495
  {
@@ -2498,7 +2511,7 @@ const zi = [
2498
2511
  * This source code is licensed under the ISC license.
2499
2512
  * See the LICENSE file in the root directory of this source tree.
2500
2513
  */
2501
- const Ui = [
2514
+ const Di = [
2502
2515
  [
2503
2516
  "path",
2504
2517
  {
@@ -2513,7 +2526,7 @@ const Ui = [
2513
2526
  * This source code is licensed under the ISC license.
2514
2527
  * See the LICENSE file in the root directory of this source tree.
2515
2528
  */
2516
- const It = [
2529
+ const Mt = [
2517
2530
  ["path", { d: "M12 17v5" }],
2518
2531
  [
2519
2532
  "path",
@@ -2528,7 +2541,7 @@ const It = [
2528
2541
  * This source code is licensed under the ISC license.
2529
2542
  * See the LICENSE file in the root directory of this source tree.
2530
2543
  */
2531
- const Di = [
2544
+ const Hi = [
2532
2545
  [
2533
2546
  "path",
2534
2547
  {
@@ -2543,7 +2556,7 @@ const Di = [
2543
2556
  * This source code is licensed under the ISC license.
2544
2557
  * See the LICENSE file in the root directory of this source tree.
2545
2558
  */
2546
- const Hi = [
2559
+ const Ni = [
2547
2560
  ["path", { d: "M10 11v6" }],
2548
2561
  ["path", { d: "M14 11v6" }],
2549
2562
  ["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }],
@@ -2556,7 +2569,7 @@ const Hi = [
2556
2569
  * This source code is licensed under the ISC license.
2557
2570
  * See the LICENSE file in the root directory of this source tree.
2558
2571
  */
2559
- const Ni = [
2572
+ const Bi = [
2560
2573
  ["path", { d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" }],
2561
2574
  ["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2" }]
2562
2575
  ];
@@ -2576,7 +2589,7 @@ const ve = [
2576
2589
  * This source code is licensed under the ISC license.
2577
2590
  * See the LICENSE file in the root directory of this source tree.
2578
2591
  */
2579
- const Bi = [
2592
+ const Fi = [
2580
2593
  [
2581
2594
  "path",
2582
2595
  {
@@ -2584,14 +2597,14 @@ const Bi = [
2584
2597
  }
2585
2598
  ]
2586
2599
  ];
2587
- function Fi(n) {
2600
+ function qi(n) {
2588
2601
  return n.map(([e, t]) => {
2589
2602
  const i = Object.entries(t).filter(([, s]) => s != null).map(([s, o]) => `${s}="${o}"`).join(" ");
2590
2603
  return `<${e} ${i}/>`;
2591
2604
  }).join("");
2592
2605
  }
2593
- function C(n, e = 18) {
2594
- return si`<svg
2606
+ function T(n, e = 18) {
2607
+ return ni`<svg
2595
2608
  xmlns="http://www.w3.org/2000/svg"
2596
2609
  width="${e}"
2597
2610
  height="${e}"
@@ -2601,9 +2614,9 @@ function C(n, e = 18) {
2601
2614
  stroke-width="2"
2602
2615
  stroke-linecap="round"
2603
2616
  stroke-linejoin="round"
2604
- >${Ii(Fi(n))}</svg>`;
2617
+ >${Mi(qi(n))}</svg>`;
2605
2618
  }
2606
- const ie = M`
2619
+ const ie = O`
2607
2620
  * {
2608
2621
  box-sizing: border-box;
2609
2622
  margin: 0;
@@ -2646,7 +2659,7 @@ const ie = M`
2646
2659
  --pw-shadow: var(--pulse-shadow);
2647
2660
  --pw-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
2648
2661
  }
2649
- `, be = M`
2662
+ `, be = O`
2650
2663
  .pw-btn {
2651
2664
  display: inline-flex;
2652
2665
  align-items: center;
@@ -2690,7 +2703,7 @@ const ie = M`
2690
2703
  width: 18px;
2691
2704
  height: 18px;
2692
2705
  }
2693
- `, Pe = M`
2706
+ `, Pe = O`
2694
2707
  .pw-scrollable::-webkit-scrollbar {
2695
2708
  width: 4px;
2696
2709
  }
@@ -2702,12 +2715,12 @@ const ie = M`
2702
2715
  background: transparent;
2703
2716
  }
2704
2717
  `;
2705
- var qi = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, Xe = (n, e, t, i) => {
2706
- for (var s = i > 1 ? void 0 : i ? Vi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
2718
+ var Vi = Object.defineProperty, Wi = Object.getOwnPropertyDescriptor, Xe = (n, e, t, i) => {
2719
+ for (var s = i > 1 ? void 0 : i ? Wi(e, t) : e, o = n.length - 1, r; o >= 0; o--)
2707
2720
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
2708
- return i && s && qi(e, t, s), s;
2721
+ return i && s && Vi(e, t, s), s;
2709
2722
  };
2710
- let K = class extends A {
2723
+ let K = class extends P {
2711
2724
  constructor() {
2712
2725
  super(...arguments), this.items = [], this.unsubs = [], this.counter = 0;
2713
2726
  }
@@ -2758,7 +2771,7 @@ let K = class extends A {
2758
2771
  <div class="panel-header">
2759
2772
  <span class="panel-title">Activity</span>
2760
2773
  <button class="close-btn" @click=${this.fireClose} title="Close">
2761
- ${C(ve, 16)}
2774
+ ${T(ve, 16)}
2762
2775
  </button>
2763
2776
  </div>
2764
2777
 
@@ -2793,7 +2806,7 @@ K.styles = [
2793
2806
  ie,
2794
2807
  be,
2795
2808
  Pe,
2796
- M`
2809
+ O`
2797
2810
  :host {
2798
2811
  display: block;
2799
2812
  }
@@ -2927,7 +2940,7 @@ Xe([
2927
2940
  K = Xe([
2928
2941
  L("pulse-widget-activity-panel")
2929
2942
  ], K);
2930
- const Wi = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", dt = "#6366f1", ht = "#e2e8f0", Xi = "#f8fafc", Yi = "#e2e8f0", pt = "#64748b", we = 28, Ki = Array.from({ length: we }, (n, e) => 0.2 + Math.abs(Math.sin(e * 12.9898 + 78.233) * 43758.5453) % 1 * 0.8);
2943
+ const Xi = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", dt = "#6366f1", ht = "#e2e8f0", Yi = "#f8fafc", Ki = "#e2e8f0", pt = "#64748b", we = 28, Gi = Array.from({ length: we }, (n, e) => 0.2 + Math.abs(Math.sin(e * 12.9898 + 78.233) * 43758.5453) % 1 * 0.8);
2931
2944
  function ut(n) {
2932
2945
  const e = Math.max(0, Math.floor(n)), t = Math.floor(e / 60), i = e % 60;
2933
2946
  return `${t}:${i.toString().padStart(2, "0")}`;
@@ -2953,10 +2966,10 @@ class ze {
2953
2966
  width: "220px",
2954
2967
  height: "44px",
2955
2968
  padding: "0 10px",
2956
- background: Xi,
2969
+ background: Yi,
2957
2970
  borderRadius: "12px",
2958
- border: `1px solid ${Yi}`,
2959
- fontFamily: Wi,
2971
+ border: `1px solid ${Ki}`,
2972
+ fontFamily: Xi,
2960
2973
  fontSize: "11px",
2961
2974
  color: pt,
2962
2975
  userSelect: "none",
@@ -3016,7 +3029,7 @@ class ze {
3016
3029
  });
3017
3030
  const g = [];
3018
3031
  for (let E = 0; E < we; E++) {
3019
- const I = document.createElement("div"), z = Math.round(Ki[E] * 20);
3032
+ const I = document.createElement("div"), z = Math.round(Gi[E] * 20);
3020
3033
  Object.assign(I.style, {
3021
3034
  flex: "1",
3022
3035
  height: `${Math.max(3, z)}px`,
@@ -3218,7 +3231,7 @@ class Ue {
3218
3231
  this.recorder = null, this.container && (this.container.remove(), this.container = null), this.canvas = null, this.timerEl = null;
3219
3232
  }
3220
3233
  }
3221
- const Gi = 180, Ji = 120, Zi = "#e2e8f0", Qi = `
3234
+ const Ji = 180, Zi = 120, Qi = "#e2e8f0", es = `
3222
3235
  <svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
3223
3236
  <circle cx="14" cy="14" r="14" fill="rgba(0,0,0,0.35)"/>
3224
3237
  <polygon points="11,8 22,14 11,20" fill="rgba(255,255,255,0.9)"/>
@@ -3227,12 +3240,12 @@ const Gi = 180, Ji = 120, Zi = "#e2e8f0", Qi = `
3227
3240
  <polygon points="11,5 6,9 2,9 2,15 6,15 11,19"/>
3228
3241
  <line x1="23" y1="9" x2="17" y2="15"/>
3229
3242
  <line x1="17" y1="9" x2="23" y2="15"/>
3230
- </svg>`, es = `
3243
+ </svg>`, ts = `
3231
3244
  <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="rgba(255,255,255,0.9)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
3232
3245
  <polygon points="11,5 6,9 2,9 2,15 6,15 11,19"/>
3233
3246
  <path d="M19.07 4.93a10 10 0 0 1 0 14.14"/>
3234
3247
  <path d="M15.54 8.46a5 5 0 0 1 0 7.07"/>
3235
- </svg>`, ts = `
3248
+ </svg>`, is = `
3236
3249
  <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="rgba(255,255,255,0.9)" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">
3237
3250
  <polyline points="15,3 21,3 21,9"/><line x1="21" y1="3" x2="14" y2="10"/>
3238
3251
  <polyline points="9,21 3,21 3,15"/><line x1="3" y1="21" x2="10" y2="14"/>
@@ -3248,10 +3261,10 @@ const Gi = 180, Ji = 120, Zi = "#e2e8f0", Qi = `
3248
3261
  Object.assign(o.style, {
3249
3262
  position: "relative",
3250
3263
  display: "inline-block",
3251
- width: `${Gi}px`,
3252
- height: `${Ji}px`,
3264
+ width: `${Ji}px`,
3265
+ height: `${Zi}px`,
3253
3266
  borderRadius: "8px",
3254
- border: `1px solid ${Zi}`,
3267
+ border: `1px solid ${Qi}`,
3255
3268
  boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
3256
3269
  overflow: "hidden",
3257
3270
  cursor: "pointer",
@@ -3281,7 +3294,7 @@ const Gi = 180, Ji = 120, Zi = "#e2e8f0", Qi = `
3281
3294
  transition: "opacity 0.25s ease",
3282
3295
  opacity: "1",
3283
3296
  pointerEvents: "none"
3284
- }), a.innerHTML = Qi, o.appendChild(a);
3297
+ }), a.innerHTML = es, o.appendChild(a);
3285
3298
  const l = document.createElement("div");
3286
3299
  Object.assign(l.style, {
3287
3300
  position: "absolute",
@@ -3312,7 +3325,7 @@ const Gi = 180, Ji = 120, Zi = "#e2e8f0", Qi = `
3312
3325
  cursor: "pointer",
3313
3326
  pointerEvents: "auto",
3314
3327
  transition: "opacity 0.2s ease, background 0.15s ease"
3315
- }), d.innerHTML = ts, d.title = "Fullscreen", d.addEventListener("mouseenter", () => {
3328
+ }), d.innerHTML = is, d.title = "Fullscreen", d.addEventListener("mouseenter", () => {
3316
3329
  d.style.background = "rgba(0,0,0,0.7)";
3317
3330
  }), d.addEventListener("mouseleave", () => {
3318
3331
  d.style.background = "rgba(0,0,0,0.45)";
@@ -3323,7 +3336,7 @@ const Gi = 180, Ji = 120, Zi = "#e2e8f0", Qi = `
3323
3336
  a.style.opacity = i ? "0" : "1";
3324
3337
  }
3325
3338
  function h() {
3326
- l.style.display = i ? "flex" : "none", l.innerHTML = s ? ft : es, d.style.display = i ? "flex" : "none";
3339
+ l.style.display = i ? "flex" : "none", l.innerHTML = s ? ft : ts, d.style.display = i ? "flex" : "none";
3327
3340
  }
3328
3341
  return o.addEventListener("click", (p) => {
3329
3342
  p.stopPropagation(), i ? s ? (r.muted = !1, s = !1) : (r.pause(), i = !1, s = !0, r.muted = !0) : (r.muted = !0, s = !0, r.play().catch(() => {
@@ -3402,7 +3415,7 @@ const Gi = 180, Ji = 120, Zi = "#e2e8f0", Qi = `
3402
3415
  };
3403
3416
  S.fullscreenOverlay = null, S.fullscreenKeyHandler = null;
3404
3417
  let Ce = S;
3405
- const mt = 60, is = `
3418
+ const mt = 60, ss = `
3406
3419
  .vr-overlay {
3407
3420
  display: flex;
3408
3421
  flex-direction: column;
@@ -3512,11 +3525,11 @@ const mt = 60, is = `
3512
3525
  function gt(n) {
3513
3526
  return n.toString().padStart(2, "0");
3514
3527
  }
3515
- function ss(n) {
3528
+ function ns(n) {
3516
3529
  const e = Math.floor(n / 60), t = n % 60;
3517
3530
  return `${gt(e)}:${gt(t)}`;
3518
3531
  }
3519
- function ns() {
3532
+ function os() {
3520
3533
  const n = [
3521
3534
  "video/webm;codecs=vp9,opus",
3522
3535
  "video/webm;codecs=vp8,opus",
@@ -3527,7 +3540,7 @@ function ns() {
3527
3540
  if (MediaRecorder.isTypeSupported(e)) return e;
3528
3541
  return "";
3529
3542
  }
3530
- function os(n) {
3543
+ function rs(n) {
3531
3544
  return new Promise((e, t) => {
3532
3545
  const i = URL.createObjectURL(n), s = document.createElement("video");
3533
3546
  s.muted = !0, s.playsInline = !0, s.preload = "auto", s.src = i, s.addEventListener("loadeddata", () => {
@@ -3563,7 +3576,7 @@ class De {
3563
3576
  }
3564
3577
  this.stream = t, this.container = e, this.recording = !0, this.elapsed = 0, this.chunks = [], this.buildUI(e), this.videoEl && (this.videoEl.srcObject = t, this.videoEl.play().catch(() => {
3565
3578
  }));
3566
- const i = ns(), s = {};
3579
+ const i = os(), s = {};
3567
3580
  i && (s.mimeType = i);
3568
3581
  const o = new MediaRecorder(t, s);
3569
3582
  return this.mediaRecorder = o, o.ondataavailable = (r) => {
@@ -3588,7 +3601,7 @@ class De {
3588
3601
  }
3589
3602
  // ── Private ──
3590
3603
  buildUI(e) {
3591
- this.styleEl = document.createElement("style"), this.styleEl.textContent = is, document.head.appendChild(this.styleEl), this.root = document.createElement("div"), this.root.className = "vr-overlay";
3604
+ this.styleEl = document.createElement("style"), this.styleEl.textContent = ss, document.head.appendChild(this.styleEl), this.root = document.createElement("div"), this.root.className = "vr-overlay";
3592
3605
  const t = document.createElement("div");
3593
3606
  t.className = "vr-circle-wrapper";
3594
3607
  const i = document.createElement("div");
@@ -3605,14 +3618,14 @@ class De {
3605
3618
  updateTimer() {
3606
3619
  if (!this.timerEl) return;
3607
3620
  const e = mt - this.elapsed;
3608
- this.timerEl.textContent = ss(this.elapsed), e <= 10 ? this.timerEl.classList.add("vr-countdown") : this.timerEl.classList.remove("vr-countdown");
3621
+ this.timerEl.textContent = ns(this.elapsed), e <= 10 ? this.timerEl.classList.add("vr-countdown") : this.timerEl.classList.remove("vr-countdown");
3609
3622
  }
3610
3623
  async handleRecordingComplete() {
3611
3624
  var s, o;
3612
3625
  const e = ((s = this.mediaRecorder) == null ? void 0 : s.mimeType) || "video/webm", t = new Blob(this.chunks, { type: e });
3613
3626
  let i;
3614
3627
  try {
3615
- i = await os(t);
3628
+ i = await rs(t);
3616
3629
  } catch {
3617
3630
  const r = document.createElement("canvas");
3618
3631
  r.width = 1, r.height = 1, i = await new Promise((a) => {
@@ -3864,7 +3877,7 @@ class re {
3864
3877
  this.input.remove();
3865
3878
  }
3866
3879
  }
3867
- const rs = ["👍", "👎", "❤️", "🎉", "👀", "🚀"], xe = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", as = '<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>', ls = '<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>', bt = `<button class="pulse-close-btn" style="
3880
+ const as = ["👍", "👎", "❤️", "🎉", "👀", "🚀"], xe = "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif", ls = '<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/><path d="m15 5 4 4"/></svg>', cs = '<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>', bt = `<button class="pulse-close-btn" style="
3868
3881
  border:none;background:none;cursor:pointer;color:#94a3b8;padding:4px;
3869
3882
  border-radius:6px;display:flex;align-items:center;justify-content:center;
3870
3883
  transition:all 0.15s;flex-shrink:0;
@@ -3872,7 +3885,7 @@ const rs = ["👍", "👎", "❤️", "🎉", "👀", "🚀"], xe = "-apple-syst
3872
3885
  onmouseout="this.style.background='none';this.style.color='#94a3b8'">
3873
3886
  <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
3874
3887
  </button>`;
3875
- class cs {
3888
+ class ds {
3876
3889
  constructor(e, t = {}) {
3877
3890
  this.container = null, this.overlay = null, this.form = null, this.popover = null, this.threads = [], this.pinEls = /* @__PURE__ */ new Map(), this._pinModeActive = !1, this.editingPopoverCommentId = null, this.popoverPickerOpen = null, this.lastTypingSendPins = /* @__PURE__ */ new Map(), this.repositionDebounce = null, this.mutationObserver = null, this.upload = null, this.audioRecorder = null, this.videoRecorder = null, this.pendingAttachmentIds = [], this.handleReposition = () => {
3878
3891
  this.repositionDebounce || (this.repositionDebounce = setTimeout(() => {
@@ -4176,7 +4189,7 @@ class cs {
4176
4189
  }
4177
4190
  const i = (d = this.client.state.user) == null ? void 0 : d.id;
4178
4191
  t.innerHTML = e.comments.map((c) => {
4179
- const h = this.client.state.getUser(c.userId), p = h ? h.name.split(" ").map((O) => O[0]).join("").toUpperCase().slice(0, 2) : "?", m = (h == null ? void 0 : h.color) ?? "#94a3b8", g = this.escapeHtml((h == null ? void 0 : h.name) ?? "Unknown"), y = this.formatTime(c.createdAt), b = i === c.userId, w = c.editedAt ? '<span style="font-size:10px;color:#94a3b8;font-style:italic;">(edited)</span>' : "";
4192
+ const h = this.client.state.getUser(c.userId), p = h ? h.name.split(" ").map((R) => R[0]).join("").toUpperCase().slice(0, 2) : "?", m = (h == null ? void 0 : h.color) ?? "#94a3b8", g = this.escapeHtml((h == null ? void 0 : h.name) ?? "Unknown"), y = this.formatTime(c.createdAt), b = i === c.userId, w = c.editedAt ? '<span style="font-size:10px;color:#94a3b8;font-style:italic;">(edited)</span>' : "";
4180
4193
  if (this.editingPopoverCommentId === c.id)
4181
4194
  return `
4182
4195
  <div style="margin-bottom:10px;" data-comment-id="${c.id}">
@@ -4196,22 +4209,22 @@ class cs {
4196
4209
  const E = c.body && c.body !== "(attachment)" ? c.body.replace(
4197
4210
  /@(\w+)/g,
4198
4211
  '<span style="color:#6366f1;font-weight:600;background:#eef2ff;padding:0 3px;border-radius:3px;">@$1</span>'
4199
- ) : "", I = (c.attachments ?? []).map((O) => {
4200
- if (O.type === "image") {
4201
- const Rt = O.thumbnailUrl || O.url;
4202
- return `<div class="popover-attachment-img" data-full-url="${this.escapeHtml(O.url)}" style="margin:4px 0 4px 29px;cursor:pointer;">
4203
- <img src="${this.escapeHtml(Rt)}" alt="${this.escapeHtml(O.filename)}" style="max-width:180px;max-height:120px;border-radius:8px;border:1px solid #e2e8f0;display:block;" />
4212
+ ) : "", I = (c.attachments ?? []).map((R) => {
4213
+ if (R.type === "image") {
4214
+ const Lt = R.thumbnailUrl || R.url;
4215
+ return `<div class="popover-attachment-img" data-full-url="${this.escapeHtml(R.url)}" style="margin:4px 0 4px 29px;cursor:pointer;">
4216
+ <img src="${this.escapeHtml(Lt)}" alt="${this.escapeHtml(R.filename)}" style="max-width:180px;max-height:120px;border-radius:8px;border:1px solid #e2e8f0;display:block;" />
4204
4217
  </div>`;
4205
4218
  }
4206
- return O.type === "audio" ? `<div class="popover-attachment-audio" data-url="${this.escapeHtml(O.url)}" data-duration="${O.durationMs ?? ""}" style="margin:4px 0 4px 29px;"></div>` : O.type === "video" ? `<div class="popover-attachment-video" data-url="${this.escapeHtml(O.url)}" data-poster="${this.escapeHtml(O.thumbnailUrl ?? "")}" style="margin:4px 0 4px 29px;"></div>` : "";
4219
+ return R.type === "audio" ? `<div class="popover-attachment-audio" data-url="${this.escapeHtml(R.url)}" data-duration="${R.durationMs ?? ""}" style="margin:4px 0 4px 29px;"></div>` : R.type === "video" ? `<div class="popover-attachment-video" data-url="${this.escapeHtml(R.url)}" data-poster="${this.escapeHtml(R.thumbnailUrl ?? "")}" style="margin:4px 0 4px 29px;"></div>` : "";
4207
4220
  }).join(""), z = b ? `<div class="popover-comment-actions" style="display:flex;gap:2px;margin-top:2px;margin-left:29px;">
4208
4221
  <button class="edit-btn" data-comment-id="${c.id}" style="border:none;background:none;cursor:pointer;color:#94a3b8;padding:3px;border-radius:4px;display:flex;align-items:center;transition:all 0.15s;" title="Edit"
4209
4222
  onmouseover="this.style.color='#6366f1';this.style.background='#eef2ff'"
4210
- onmouseout="this.style.color='#94a3b8';this.style.background='none'">${as}</button>
4223
+ onmouseout="this.style.color='#94a3b8';this.style.background='none'">${ls}</button>
4211
4224
  <button class="delete-btn" data-comment-id="${c.id}" style="border:none;background:none;cursor:pointer;color:#94a3b8;padding:3px;border-radius:4px;display:flex;align-items:center;transition:all 0.15s;" title="Delete"
4212
4225
  onmouseover="this.style.color='#ef4444';this.style.background='#fef2f2'"
4213
- onmouseout="this.style.color='#94a3b8';this.style.background='none'">${ls}</button>
4214
- </div>` : "", Ot = this.buildReactionPillsHtml(c.id);
4226
+ onmouseout="this.style.color='#94a3b8';this.style.background='none'">${cs}</button>
4227
+ </div>` : "", Rt = this.buildReactionPillsHtml(c.id);
4215
4228
  return `
4216
4229
  <div class="popover-comment" style="margin-bottom:10px;" data-comment-id="${c.id}">
4217
4230
  <div style="display:flex;align-items:center;gap:7px;margin-bottom:2px;">
@@ -4223,7 +4236,7 @@ class cs {
4223
4236
  ${E ? `<div style="font-size:13px;color:#334155;line-height:1.45;margin-left:29px;word-wrap:break-word;">${E}</div>` : ""}
4224
4237
  ${I}
4225
4238
  ${z}
4226
- ${Ot}
4239
+ ${Rt}
4227
4240
  </div>
4228
4241
  `;
4229
4242
  }).join(""), t.querySelectorAll(".edit-btn").forEach((c) => {
@@ -4396,7 +4409,7 @@ class cs {
4396
4409
  zIndex: "10002",
4397
4410
  fontFamily: xe
4398
4411
  });
4399
- for (const s of rs) {
4412
+ for (const s of as) {
4400
4413
  const o = document.createElement("button");
4401
4414
  Object.assign(o.style, {
4402
4415
  border: "none",
@@ -4531,13 +4544,13 @@ class cs {
4531
4544
  });
4532
4545
  }
4533
4546
  }
4534
- var ds = Object.defineProperty, hs = Object.getOwnPropertyDescriptor, U = (n, e, t, i) => {
4535
- for (var s = i > 1 ? void 0 : i ? hs(e, t) : e, o = n.length - 1, r; o >= 0; o--)
4547
+ var hs = Object.defineProperty, ps = Object.getOwnPropertyDescriptor, U = (n, e, t, i) => {
4548
+ for (var s = i > 1 ? void 0 : i ? ps(e, t) : e, o = n.length - 1, r; o >= 0; o--)
4536
4549
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
4537
- return i && s && ds(e, t, s), s;
4550
+ return i && s && hs(e, t, s), s;
4538
4551
  };
4539
- const ps = ["👍", "👎", "❤️", "🎉", "👀", "🚀"];
4540
- let P = class extends A {
4552
+ const us = ["👍", "👎", "❤️", "🎉", "👀", "🚀"];
4553
+ let _ = class extends P {
4541
4554
  constructor() {
4542
4555
  super(...arguments), this.highlightThreadId = null, this.threadsVersion = 0, this.replyingTo = null, this.editingCommentId = null, this.editBody = "", this.pickerOpenForComment = null, this.typingByThread = /* @__PURE__ */ new Map(), this.reactionsVersion = 0, this.typingTimers = /* @__PURE__ */ new Map(), this.lastTypingSend = /* @__PURE__ */ new Map(), this.replyAttachmentIds = [];
4543
4556
  }
@@ -4652,14 +4665,14 @@ let P = class extends A {
4652
4665
  }
4653
4666
  async handleAttachImage() {
4654
4667
  this.upload || (this.upload = new re(this.client));
4655
- const n = P.MAX_ATTACHMENTS - this.replyAttachmentIds.length;
4668
+ const n = _.MAX_ATTACHMENTS - this.replyAttachmentIds.length;
4656
4669
  if (n <= 0) return;
4657
4670
  const e = await this.upload.pickFiles("image/*", n);
4658
4671
  e.length > 0 && (this.replyAttachmentIds.push(...e.map((t) => t.id)), this.requestUpdate());
4659
4672
  }
4660
4673
  async handleRecordAudio(n) {
4661
4674
  var i;
4662
- if (this.replyAttachmentIds.length >= P.MAX_ATTACHMENTS) return;
4675
+ if (this.replyAttachmentIds.length >= _.MAX_ATTACHMENTS) return;
4663
4676
  this.upload || (this.upload = new re(this.client)), this.audioRecorder || (this.audioRecorder = new Ue());
4664
4677
  const e = (i = this.shadowRoot) == null ? void 0 : i.querySelector(`[data-thread-id="${n}"]`), t = await this.audioRecorder.startRecording(e ?? document.body);
4665
4678
  if (t) {
@@ -4669,7 +4682,7 @@ let P = class extends A {
4669
4682
  }
4670
4683
  async handleRecordVideo(n) {
4671
4684
  var i;
4672
- if (this.replyAttachmentIds.length >= P.MAX_ATTACHMENTS) return;
4685
+ if (this.replyAttachmentIds.length >= _.MAX_ATTACHMENTS) return;
4673
4686
  this.upload || (this.upload = new re(this.client)), this.videoRecorder || (this.videoRecorder = new De());
4674
4687
  const e = (i = this.shadowRoot) == null ? void 0 : i.querySelector(`[data-thread-id="${n}"]`), t = await this.videoRecorder.startRecording(e ?? document.body);
4675
4688
  if (t) {
@@ -4754,7 +4767,7 @@ let P = class extends A {
4754
4767
  +
4755
4768
  ${this.pickerOpenForComment === n.id ? u`
4756
4769
  <div class="emoji-picker">
4757
- ${ps.map(
4770
+ ${us.map(
4758
4771
  (o) => u`
4759
4772
  <button @click=${(r) => {
4760
4773
  r.stopPropagation(), this.toggleReaction(n.id, o);
@@ -4790,7 +4803,7 @@ let P = class extends A {
4790
4803
  <span class="thread-count">${this.threads.length}</span>
4791
4804
  </span>
4792
4805
  <button class="close-btn" @click=${this.fireClose} title="Close">
4793
- ${C(ve, 16)}
4806
+ ${T(ve, 16)}
4794
4807
  </button>
4795
4808
  </div>
4796
4809
 
@@ -4852,7 +4865,7 @@ let P = class extends A {
4852
4865
  data-thread-id=${n.id}
4853
4866
  >
4854
4867
  ${n.position ? u`<div class="pin-badge">
4855
- ${C(It, 12)}
4868
+ ${T(Mt, 12)}
4856
4869
  Pinned
4857
4870
  </div>` : v}
4858
4871
  ${n.comments.map((t, i) => {
@@ -4876,8 +4889,8 @@ let P = class extends A {
4876
4889
  ${this.renderAttachments(t.attachments ?? [])}
4877
4890
  `}
4878
4891
  ${o && !r ? u`<div class="comment-actions">
4879
- <button @click=${() => this.startEdit(t)} title="Edit">${C(Ui, 14)}</button>
4880
- <button class="danger" @click=${() => this.deleteComment(t.id)} title="Delete">${C(Hi, 14)}</button>
4892
+ <button @click=${() => this.startEdit(t)} title="Edit">${T(Di, 14)}</button>
4893
+ <button class="danger" @click=${() => this.deleteComment(t.id)} title="Delete">${T(Ni, 14)}</button>
4881
4894
  </div>` : v}
4882
4895
  ${this.renderReactions(t)}
4883
4896
  </div>
@@ -4918,19 +4931,19 @@ let P = class extends A {
4918
4931
  class="reply-media-btn"
4919
4932
  title="Attach image"
4920
4933
  @click=${() => this.handleAttachImage()}
4921
- >${C(ji, 16)}</button>
4934
+ >${T(zi, 16)}</button>
4922
4935
  <button
4923
4936
  type="button"
4924
4937
  class="reply-media-btn"
4925
4938
  title="Record audio"
4926
4939
  @click=${() => this.handleRecordAudio(n.id)}
4927
- >${C(Li, 16)}</button>
4940
+ >${T(ji, 16)}</button>
4928
4941
  <button
4929
4942
  type="button"
4930
4943
  class="reply-media-btn"
4931
4944
  title="Record video"
4932
4945
  @click=${() => this.handleRecordVideo(n.id)}
4933
- >${C(Ni, 16)}</button>
4946
+ >${T(Bi, 16)}</button>
4934
4947
  <div class="reply-preview">
4935
4948
  ${this.replyAttachmentIds.map(
4936
4949
  (t, i) => u`<span class="reply-preview-badge">
@@ -4950,11 +4963,11 @@ let P = class extends A {
4950
4963
  `;
4951
4964
  }
4952
4965
  };
4953
- P.styles = [
4966
+ _.styles = [
4954
4967
  ie,
4955
4968
  be,
4956
4969
  Pe,
4957
- M`
4970
+ O`
4958
4971
  :host {
4959
4972
  display: block;
4960
4973
  }
@@ -5494,56 +5507,56 @@ P.styles = [
5494
5507
  }
5495
5508
  `
5496
5509
  ];
5497
- P.MAX_ATTACHMENTS = 5;
5510
+ _.MAX_ATTACHMENTS = 5;
5498
5511
  U([
5499
5512
  x({ attribute: !1 })
5500
- ], P.prototype, "client", 2);
5513
+ ], _.prototype, "client", 2);
5501
5514
  U([
5502
5515
  x()
5503
- ], P.prototype, "highlightThreadId", 2);
5516
+ ], _.prototype, "highlightThreadId", 2);
5504
5517
  U([
5505
5518
  $()
5506
- ], P.prototype, "threadsVersion", 2);
5519
+ ], _.prototype, "threadsVersion", 2);
5507
5520
  U([
5508
5521
  $()
5509
- ], P.prototype, "replyingTo", 2);
5522
+ ], _.prototype, "replyingTo", 2);
5510
5523
  U([
5511
5524
  $()
5512
- ], P.prototype, "editingCommentId", 2);
5525
+ ], _.prototype, "editingCommentId", 2);
5513
5526
  U([
5514
5527
  $()
5515
- ], P.prototype, "editBody", 2);
5528
+ ], _.prototype, "editBody", 2);
5516
5529
  U([
5517
5530
  $()
5518
- ], P.prototype, "pickerOpenForComment", 2);
5531
+ ], _.prototype, "pickerOpenForComment", 2);
5519
5532
  U([
5520
5533
  $()
5521
- ], P.prototype, "typingByThread", 2);
5534
+ ], _.prototype, "typingByThread", 2);
5522
5535
  U([
5523
5536
  $()
5524
- ], P.prototype, "reactionsVersion", 2);
5525
- P = U([
5537
+ ], _.prototype, "reactionsVersion", 2);
5538
+ _ = U([
5526
5539
  L("pulse-widget-comments-panel")
5527
- ], P);
5528
- var us = Object.defineProperty, fs = Object.getOwnPropertyDescriptor, Ye = (n, e, t, i) => {
5529
- for (var s = i > 1 ? void 0 : i ? fs(e, t) : e, o = n.length - 1, r; o >= 0; o--)
5540
+ ], _);
5541
+ var fs = Object.defineProperty, ms = Object.getOwnPropertyDescriptor, Ye = (n, e, t, i) => {
5542
+ for (var s = i > 1 ? void 0 : i ? ms(e, t) : e, o = n.length - 1, r; o >= 0; o--)
5530
5543
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
5531
- return i && s && us(e, t, s), s;
5544
+ return i && s && fs(e, t, s), s;
5532
5545
  };
5533
- const ms = {
5546
+ const gs = {
5534
5547
  "comment:created": "left a comment",
5535
5548
  "comment:mention": "mentioned you",
5536
5549
  "comment:reply": "replied to your comment",
5537
5550
  "thread:resolved": "resolved a thread",
5538
5551
  "reaction:added": "reacted to your comment"
5539
- }, gs = {
5552
+ }, vs = {
5540
5553
  "comment:created": "💬",
5541
5554
  "comment:mention": "📣",
5542
5555
  "comment:reply": "↩️",
5543
5556
  "thread:resolved": "✅",
5544
5557
  "reaction:added": "🎉"
5545
5558
  };
5546
- let pe = class extends A {
5559
+ let pe = class extends P {
5547
5560
  constructor() {
5548
5561
  super(...arguments), this.notifications = [];
5549
5562
  }
@@ -5599,7 +5612,7 @@ let pe = class extends A {
5599
5612
  Mark all read
5600
5613
  </button>` : v}
5601
5614
  <button class="close-btn" @click=${this.fireClose} title="Close">
5602
- ${C(ve, 16)}
5615
+ ${T(ve, 16)}
5603
5616
  </button>
5604
5617
  </div>
5605
5618
  </div>
@@ -5614,11 +5627,11 @@ let pe = class extends A {
5614
5627
  class="item ${e.read ? "" : "unread"}"
5615
5628
  @click=${() => this.handleClick(e)}
5616
5629
  >
5617
- <span class="icon">${gs[e.type] ?? "🔔"}</span>
5630
+ <span class="icon">${vs[e.type] ?? "🔔"}</span>
5618
5631
  <div class="content">
5619
5632
  <div class="text">
5620
5633
  <span class="actor">${this.getActorName(e.actorId)}</span>
5621
- ${ms[e.type] ?? e.type}
5634
+ ${gs[e.type] ?? e.type}
5622
5635
  </div>
5623
5636
  <div class="time">${this.formatTime(e.createdAt)}</div>
5624
5637
  </div>
@@ -5635,7 +5648,7 @@ pe.styles = [
5635
5648
  ie,
5636
5649
  be,
5637
5650
  Pe,
5638
- M`
5651
+ O`
5639
5652
  :host {
5640
5653
  display: block;
5641
5654
  }
@@ -5837,8 +5850,8 @@ Ye([
5837
5850
  pe = Ye([
5838
5851
  L("pulse-widget-notifications-panel")
5839
5852
  ], pe);
5840
- const vs = 3e3;
5841
- class bs {
5853
+ const bs = 3e3;
5854
+ class xs {
5842
5855
  constructor(e) {
5843
5856
  this.container = null, this.cursors = /* @__PURE__ */ new Map(), this.cursorEls = /* @__PURE__ */ new Map(), this.cursorLastSeen = /* @__PURE__ */ new Map(), this.unsubs = [], this.enabled = !1, this.sending = !1, this.staleTimer = null, this.handleLocalCursor = (t) => {
5844
5857
  t.pointerType !== "touch" && this.client.moveCursor({
@@ -5890,7 +5903,7 @@ class bs {
5890
5903
  ), this.setSending(!0), this.staleTimer = setInterval(() => {
5891
5904
  const e = Date.now();
5892
5905
  for (const [t, i] of this.cursorLastSeen)
5893
- if (e - i > vs) {
5906
+ if (e - i > bs) {
5894
5907
  this.cursors.delete(t);
5895
5908
  const s = this.cursorEls.get(t);
5896
5909
  s && s.remove(), this.cursorEls.delete(t), this.cursorLastSeen.delete(t);
@@ -5986,7 +5999,7 @@ class bs {
5986
5999
  i.style.transform = `translate(${t.position.x}px, ${t.position.y}px)`;
5987
6000
  }
5988
6001
  }
5989
- class xs {
6002
+ class ys {
5990
6003
  constructor(e) {
5991
6004
  this.container = null, this.unsubs = [], this.enabled = !1, this.drawMode = !1, this.currentPoints = [], this.currentPath = null, this.lastPoint = null, this.fadeTimers = /* @__PURE__ */ new Map(), this.handlePointerDown = (t) => {
5992
6005
  var a, l, d;
@@ -6069,7 +6082,7 @@ class xs {
6069
6082
  this.fadeTimers.set(e, t);
6070
6083
  }
6071
6084
  }
6072
- function ys(n) {
6085
+ function ws(n) {
6073
6086
  if (!n.rangeCount || n.isCollapsed) return null;
6074
6087
  const e = n.getRangeAt(0), t = e.startContainer, i = e.endContainer, s = xt(t), o = xt(i);
6075
6088
  return !s || !o ? null : {
@@ -6079,7 +6092,7 @@ function ys(n) {
6079
6092
  endOffset: e.endOffset
6080
6093
  };
6081
6094
  }
6082
- function ws(n) {
6095
+ function $s(n) {
6083
6096
  var e, t;
6084
6097
  try {
6085
6098
  const i = wt(n.startSelector), s = wt(n.endSelector);
@@ -6144,7 +6157,7 @@ function wt(n) {
6144
6157
  return null;
6145
6158
  }
6146
6159
  }
6147
- class $s {
6160
+ class ks {
6148
6161
  constructor(e) {
6149
6162
  this.container = null, this.unsubs = [], this.enabled = !1, this.selectionEls = /* @__PURE__ */ new Map(), this.clearTimers = /* @__PURE__ */ new Map(), this.client = e;
6150
6163
  }
@@ -6188,7 +6201,7 @@ class $s {
6188
6201
  if (!this.container) return;
6189
6202
  const i = (a = this.client.state.user) == null ? void 0 : a.id;
6190
6203
  if (e === i || (this.clearSelection(e), !t)) return;
6191
- const s = ws(t);
6204
+ const s = $s(t);
6192
6205
  if (!s) return;
6193
6206
  const o = this.client.state.presence.find(
6194
6207
  (l) => l.user.id === e
@@ -6227,12 +6240,12 @@ class $s {
6227
6240
  }
6228
6241
  }
6229
6242
  }
6230
- var ks = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, Ke = (n, e, t, i) => {
6231
- for (var s = i > 1 ? void 0 : i ? Es(e, t) : e, o = n.length - 1, r; o >= 0; o--)
6243
+ var Es = Object.defineProperty, Cs = Object.getOwnPropertyDescriptor, Ke = (n, e, t, i) => {
6244
+ for (var s = i > 1 ? void 0 : i ? Cs(e, t) : e, o = n.length - 1, r; o >= 0; o--)
6232
6245
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
6233
- return i && s && ks(e, t, s), s;
6246
+ return i && s && Es(e, t, s), s;
6234
6247
  };
6235
- let ue = class extends A {
6248
+ let ue = class extends P {
6236
6249
  constructor() {
6237
6250
  super(...arguments), this.roomId = "";
6238
6251
  }
@@ -6273,7 +6286,7 @@ let ue = class extends A {
6273
6286
  <div class="panel-header">
6274
6287
  <span class="panel-title">Settings</span>
6275
6288
  <button class="close-btn" @click=${this.fireClose} title="Close">
6276
- ${C(ve, 16)}
6289
+ ${T(ve, 16)}
6277
6290
  </button>
6278
6291
  </div>
6279
6292
 
@@ -6322,7 +6335,7 @@ ue.styles = [
6322
6335
  ie,
6323
6336
  be,
6324
6337
  Pe,
6325
- M`
6338
+ O`
6326
6339
  :host {
6327
6340
  display: block;
6328
6341
  }
@@ -6513,26 +6526,26 @@ const $e = {
6513
6526
  showViewportIndicators: !0,
6514
6527
  showSelections: !0,
6515
6528
  showDrawings: !0
6516
- }, Mt = "pulse:settings:";
6517
- function Cs(n) {
6529
+ }, Ot = "pulse:settings:";
6530
+ function Ts(n) {
6518
6531
  try {
6519
- const e = localStorage.getItem(`${Mt}${n}`);
6532
+ const e = localStorage.getItem(`${Ot}${n}`);
6520
6533
  return e ? { ...$e, ...JSON.parse(e) } : { ...$e };
6521
6534
  } catch {
6522
6535
  return { ...$e };
6523
6536
  }
6524
6537
  }
6525
- function Ts(n, e) {
6526
- localStorage.setItem(`${Mt}${n}`, JSON.stringify(e));
6538
+ function Ss(n, e) {
6539
+ localStorage.setItem(`${Ot}${n}`, JSON.stringify(e));
6527
6540
  }
6528
- var Ss = Object.defineProperty, As = Object.getOwnPropertyDescriptor, j = (n, e, t, i) => {
6529
- for (var s = i > 1 ? void 0 : i ? As(e, t) : e, o = n.length - 1, r; o >= 0; o--)
6541
+ var As = Object.defineProperty, Ps = Object.getOwnPropertyDescriptor, j = (n, e, t, i) => {
6542
+ for (var s = i > 1 ? void 0 : i ? Ps(e, t) : e, o = n.length - 1, r; o >= 0; o--)
6530
6543
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
6531
- return i && s && Ss(e, t, s), s;
6544
+ return i && s && As(e, t, s), s;
6532
6545
  };
6533
- let R = class extends A {
6546
+ let M = class extends P {
6534
6547
  constructor() {
6535
- super(...arguments), this.collapsed = !1, this.activePanel = null, this.pinModeActive = !1, this.featuresDisabled = !1, this.drawModeActive = !1, this.followingUserId = null, this.display = "floating", this.users = [], this.unreadCount = 0;
6548
+ super(...arguments), this.collapsed = !1, this.activePanel = null, this.pinModeActive = !1, this.featuresDisabled = !1, this.drawModeActive = !1, this.followingUserId = null, this.display = "floating", this.envConfig = { ...It }, this.users = [], this.unreadCount = 0;
6536
6549
  }
6537
6550
  connectedCallback() {
6538
6551
  super.connectedCallback(), this.setupPresence();
@@ -6585,14 +6598,14 @@ let R = class extends A {
6585
6598
  if (this.collapsed)
6586
6599
  return u`
6587
6600
  <div class="toolbar collapsed ${n ? "inline" : ""}" @click=${this.fireToggle}>
6588
- <span class="fab-icon">${C(Bi, n ? 18 : 24)}</span>
6601
+ <span class="fab-icon">${T(Fi, n ? 18 : 24)}</span>
6589
6602
  </div>
6590
6603
  `;
6591
6604
  const e = this.users.slice(0, 3), t = this.users.length - 3;
6592
6605
  return u`
6593
6606
  <div class="toolbar ${n ? "inline" : ""}"
6594
6607
  <!-- Presence avatars -->
6595
- ${this.users.length > 0 ? u`
6608
+ ${this.users.length > 0 && this.envConfig.showPresence ? u`
6596
6609
  <div class="presence">
6597
6610
  ${t > 0 ? u`<div class="presence-overflow">+${t}</div>` : v}
6598
6611
  ${e.map(
@@ -6621,7 +6634,7 @@ let R = class extends A {
6621
6634
  ?disabled=${this.featuresDisabled}
6622
6635
  style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
6623
6636
  >
6624
- ${C(It)}
6637
+ ${T(Mt)}
6625
6638
  </button>
6626
6639
 
6627
6640
  <!-- View comments -->
@@ -6632,7 +6645,7 @@ let R = class extends A {
6632
6645
  ?disabled=${this.featuresDisabled}
6633
6646
  style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
6634
6647
  >
6635
- ${C(Ri)}
6648
+ ${T(Li)}
6636
6649
  </button>
6637
6650
 
6638
6651
  <!-- Activity feed -->
@@ -6643,19 +6656,21 @@ let R = class extends A {
6643
6656
  ?disabled=${this.featuresDisabled}
6644
6657
  style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
6645
6658
  >
6646
- ${C(Oi)}
6659
+ ${T(Ri)}
6647
6660
  </button>
6648
6661
 
6649
6662
  <!-- Draw mode -->
6650
- <button
6651
- class="pw-btn pw-btn-icon ${this.drawModeActive ? "active" : ""}"
6652
- @click=${() => this.fire("draw-mode")}
6653
- title="Draw on page"
6654
- ?disabled=${this.featuresDisabled}
6655
- style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
6656
- >
6657
- ${C(zi)}
6658
- </button>
6663
+ ${this.envConfig.allowDrawing ? u`
6664
+ <button
6665
+ class="pw-btn pw-btn-icon ${this.drawModeActive ? "active" : ""}"
6666
+ @click=${() => this.fire("draw-mode")}
6667
+ title="Draw on page"
6668
+ ?disabled=${this.featuresDisabled}
6669
+ style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
6670
+ >
6671
+ ${T(Ui)}
6672
+ </button>
6673
+ ` : v}
6659
6674
 
6660
6675
  <!-- Notifications -->
6661
6676
  <button
@@ -6665,7 +6680,7 @@ let R = class extends A {
6665
6680
  ?disabled=${this.featuresDisabled}
6666
6681
  style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : "position:relative"}"
6667
6682
  >
6668
- ${C(Mi)}
6683
+ ${T(Oi)}
6669
6684
  ${this.unreadCount > 0 ? u`<span class="badge">${this.unreadCount > 9 ? "9+" : this.unreadCount}</span>` : v}
6670
6685
  </button>
6671
6686
 
@@ -6675,7 +6690,7 @@ let R = class extends A {
6675
6690
  @click=${() => this.fire("settings")}
6676
6691
  title="Settings"
6677
6692
  >
6678
- ${C(Di)}
6693
+ ${T(Hi)}
6679
6694
  </button>
6680
6695
 
6681
6696
  <div class="separator"></div>
@@ -6686,16 +6701,16 @@ let R = class extends A {
6686
6701
  @click=${this.fireToggle}
6687
6702
  title="Collapse"
6688
6703
  >
6689
- ${C(ve, 14)}
6704
+ ${T(ve, 14)}
6690
6705
  </button>
6691
6706
  </div>
6692
6707
  `;
6693
6708
  }
6694
6709
  };
6695
- R.styles = [
6710
+ M.styles = [
6696
6711
  ie,
6697
6712
  be,
6698
- M`
6713
+ O`
6699
6714
  :host {
6700
6715
  display: block;
6701
6716
  }
@@ -6909,38 +6924,41 @@ R.styles = [
6909
6924
  ];
6910
6925
  j([
6911
6926
  x({ attribute: !1 })
6912
- ], R.prototype, "client", 2);
6927
+ ], M.prototype, "client", 2);
6913
6928
  j([
6914
6929
  x({ type: Boolean })
6915
- ], R.prototype, "collapsed", 2);
6930
+ ], M.prototype, "collapsed", 2);
6916
6931
  j([
6917
6932
  x()
6918
- ], R.prototype, "activePanel", 2);
6933
+ ], M.prototype, "activePanel", 2);
6919
6934
  j([
6920
6935
  x({ type: Boolean })
6921
- ], R.prototype, "pinModeActive", 2);
6936
+ ], M.prototype, "pinModeActive", 2);
6922
6937
  j([
6923
6938
  x({ type: Boolean })
6924
- ], R.prototype, "featuresDisabled", 2);
6939
+ ], M.prototype, "featuresDisabled", 2);
6925
6940
  j([
6926
6941
  x({ type: Boolean })
6927
- ], R.prototype, "drawModeActive", 2);
6942
+ ], M.prototype, "drawModeActive", 2);
6928
6943
  j([
6929
6944
  x()
6930
- ], R.prototype, "followingUserId", 2);
6945
+ ], M.prototype, "followingUserId", 2);
6931
6946
  j([
6932
6947
  x()
6933
- ], R.prototype, "display", 2);
6948
+ ], M.prototype, "display", 2);
6949
+ j([
6950
+ x({ attribute: !1 })
6951
+ ], M.prototype, "envConfig", 2);
6934
6952
  j([
6935
6953
  $()
6936
- ], R.prototype, "users", 2);
6954
+ ], M.prototype, "users", 2);
6937
6955
  j([
6938
6956
  $()
6939
- ], R.prototype, "unreadCount", 2);
6940
- R = j([
6957
+ ], M.prototype, "unreadCount", 2);
6958
+ M = j([
6941
6959
  L("pulse-widget-toolbar")
6942
- ], R);
6943
- class Ps {
6960
+ ], M);
6961
+ class _s {
6944
6962
  constructor(e) {
6945
6963
  this.container = null, this.unsubs = [], this.enabled = !1, this.pillEls = /* @__PURE__ */ new Map(), this.client = e;
6946
6964
  }
@@ -7018,14 +7036,14 @@ class Ps {
7018
7036
  return e.split(" ").map((t) => t[0]).join("").toUpperCase().slice(0, 2);
7019
7037
  }
7020
7038
  }
7021
- var _s = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, _ = (n, e, t, i) => {
7022
- for (var s = i > 1 ? void 0 : i ? Is(e, t) : e, o = n.length - 1, r; o >= 0; o--)
7039
+ var Is = Object.defineProperty, Ms = Object.getOwnPropertyDescriptor, A = (n, e, t, i) => {
7040
+ for (var s = i > 1 ? void 0 : i ? Ms(e, t) : e, o = n.length - 1, r; o >= 0; o--)
7023
7041
  (r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
7024
- return i && s && _s(e, t, s), s;
7042
+ return i && s && Is(e, t, s), s;
7025
7043
  };
7026
- let T = class extends A {
7044
+ let C = class extends P {
7027
7045
  constructor() {
7028
- super(...arguments), this.apiKey = "", this.token = "", this.room = "", this.position = "bottom-right", this.display = "floating", this.collapsed = !0, this.activePanel = null, this.pinModeActive = !1, this.highlightThreadId = null, this.settings = { ...$e }, this.followingUserId = null, this.drawModeActive = !1, this.connectionState = "disconnected", this.showConnectedFlash = !1, this.unsubs = [], this.clientConfigKey = "", this._isFollowScrolling = !1, this._viewportThrottleTimer = null, this._selectionThrottleTimer = null, this._connectedFlashTimer = null, this._wasDisconnected = !1, this.handleScroll = () => {
7046
+ super(...arguments), this.apiKey = "", this.token = "", this.room = "", this.position = "bottom-right", this.display = "floating", this.collapsed = !0, this.activePanel = null, this.pinModeActive = !1, this.highlightThreadId = null, this.settings = { ...$e }, this.followingUserId = null, this.drawModeActive = !1, this.connectionState = "disconnected", this.showConnectedFlash = !1, this.envConfig = { ...It }, this.unsubs = [], this.clientConfigKey = "", this._isFollowScrolling = !1, this._viewportThrottleTimer = null, this._selectionThrottleTimer = null, this._connectedFlashTimer = null, this._wasDisconnected = !1, this.handleScroll = () => {
7029
7047
  !this.settings.enabled || !this.client || this._isFollowScrolling || (this.followingUserId && (this.followingUserId = null), !this._viewportThrottleTimer && (this._viewportThrottleTimer = setTimeout(() => {
7030
7048
  var n;
7031
7049
  this._viewportThrottleTimer = null, (n = this.client) == null || n.updateViewport({
@@ -7046,7 +7064,7 @@ let T = class extends A {
7046
7064
  (t = this.client) == null || t.updateSelection(null);
7047
7065
  return;
7048
7066
  }
7049
- const e = ys(n);
7067
+ const e = ws(n);
7050
7068
  (i = this.client) == null || i.updateSelection(e);
7051
7069
  }, 500));
7052
7070
  }, this.handleDocumentClick = (n) => {
@@ -7078,11 +7096,16 @@ let T = class extends A {
7078
7096
  room: this.room,
7079
7097
  endpoint: this.endpoint
7080
7098
  };
7081
- this.client = new Et(n), this.clientConfigKey = this.getConfigKey(), this.cursorOverlay = new bs(this.client), this.commentPins = new cs(this.client, {
7099
+ this.client = new Et(n), this.clientConfigKey = this.getConfigKey(), this.cursorOverlay = new xs(this.client), this.commentPins = new ds(this.client, {
7082
7100
  onPinModeExit: () => {
7083
7101
  this.pinModeActive = !1;
7084
7102
  }
7085
- }), this.viewportOverlay = new Ps(this.client), this.selectionOverlay = new $s(this.client), this.drawingOverlay = new xs(this.client), this.settings = Cs(this.room), this.applySettings(this.settings), this.unsubs.push(
7103
+ }), this.viewportOverlay = new _s(this.client), this.selectionOverlay = new ks(this.client), this.drawingOverlay = new ys(this.client), this.settings = Ts(this.room), this.applySettings(this.settings), this.unsubs.push(
7104
+ this.client.state.on("auth", () => {
7105
+ var e, t;
7106
+ this.envConfig = this.client.state.config, this.envConfig.showCursors || (e = this.cursorOverlay) == null || e.disable(), !this.envConfig.allowDrawing && this.drawModeActive && ((t = this.drawingOverlay) == null || t.disableDrawMode(), this.drawModeActive = !1);
7107
+ })
7108
+ ), this.unsubs.push(
7086
7109
  this.client.on("connection", (e) => {
7087
7110
  this.connectionState = e, e === "connected" && this._wasDisconnected ? (this.showConnectedFlash = !0, this._connectedFlashTimer && clearTimeout(this._connectedFlashTimer), this._connectedFlashTimer = setTimeout(() => {
7088
7111
  this.showConnectedFlash = !1, this._connectedFlashTimer = null;
@@ -7140,6 +7163,7 @@ let T = class extends A {
7140
7163
  this.pinModeActive = !this.pinModeActive, this.pinModeActive && ((o = this.commentPins) == null || o.enterPinMode());
7141
7164
  break;
7142
7165
  case "draw-mode":
7166
+ if (!this.envConfig.allowDrawing) break;
7143
7167
  this.drawModeActive = !this.drawModeActive, this.drawModeActive && ((r = this.drawingOverlay) == null || r.enableDrawMode());
7144
7168
  break;
7145
7169
  }
@@ -7150,7 +7174,7 @@ let T = class extends A {
7150
7174
  }
7151
7175
  handleSettingsChange(n) {
7152
7176
  const e = n.detail;
7153
- this.settings = e, Ts(this.room, e), this.applySettings(e);
7177
+ this.settings = e, Ss(this.room, e), this.applySettings(e);
7154
7178
  }
7155
7179
  applySettings(n) {
7156
7180
  var e, t, i, s, o, r, a, l, d, c, h, p, m, g, y, b, w;
@@ -7268,6 +7292,7 @@ let T = class extends A {
7268
7292
  .drawModeActive=${this.drawModeActive}
7269
7293
  .followingUserId=${this.followingUserId}
7270
7294
  .display=${this.display}
7295
+ .envConfig=${this.envConfig}
7271
7296
  @toolbar-action=${this.handleToolbarAction}
7272
7297
  @toolbar-toggle=${this.handleToolbarToggle}
7273
7298
  @toolbar-follow=${this.handleFollow}
@@ -7289,6 +7314,7 @@ let T = class extends A {
7289
7314
  .drawModeActive=${this.drawModeActive}
7290
7315
  .followingUserId=${this.followingUserId}
7291
7316
  .display=${this.display}
7317
+ .envConfig=${this.envConfig}
7292
7318
  @toolbar-action=${this.handleToolbarAction}
7293
7319
  @toolbar-toggle=${this.handleToolbarToggle}
7294
7320
  @toolbar-follow=${this.handleFollow}
@@ -7297,9 +7323,9 @@ let T = class extends A {
7297
7323
  `;
7298
7324
  }
7299
7325
  };
7300
- T.styles = [
7326
+ C.styles = [
7301
7327
  ie,
7302
- M`
7328
+ O`
7303
7329
  :host {
7304
7330
  display: block;
7305
7331
  }
@@ -7475,54 +7501,57 @@ T.styles = [
7475
7501
  }
7476
7502
  `
7477
7503
  ];
7478
- _([
7504
+ A([
7479
7505
  x({ attribute: "api-key" })
7480
- ], T.prototype, "apiKey", 2);
7481
- _([
7506
+ ], C.prototype, "apiKey", 2);
7507
+ A([
7482
7508
  x()
7483
- ], T.prototype, "token", 2);
7484
- _([
7509
+ ], C.prototype, "token", 2);
7510
+ A([
7485
7511
  x()
7486
- ], T.prototype, "room", 2);
7487
- _([
7512
+ ], C.prototype, "room", 2);
7513
+ A([
7488
7514
  x()
7489
- ], T.prototype, "endpoint", 2);
7490
- _([
7515
+ ], C.prototype, "endpoint", 2);
7516
+ A([
7491
7517
  x({ reflect: !0 })
7492
- ], T.prototype, "position", 2);
7493
- _([
7518
+ ], C.prototype, "position", 2);
7519
+ A([
7494
7520
  x({ reflect: !0 })
7495
- ], T.prototype, "display", 2);
7496
- _([
7521
+ ], C.prototype, "display", 2);
7522
+ A([
7523
+ $()
7524
+ ], C.prototype, "collapsed", 2);
7525
+ A([
7497
7526
  $()
7498
- ], T.prototype, "collapsed", 2);
7499
- _([
7527
+ ], C.prototype, "activePanel", 2);
7528
+ A([
7500
7529
  $()
7501
- ], T.prototype, "activePanel", 2);
7502
- _([
7530
+ ], C.prototype, "pinModeActive", 2);
7531
+ A([
7503
7532
  $()
7504
- ], T.prototype, "pinModeActive", 2);
7505
- _([
7533
+ ], C.prototype, "highlightThreadId", 2);
7534
+ A([
7506
7535
  $()
7507
- ], T.prototype, "highlightThreadId", 2);
7508
- _([
7536
+ ], C.prototype, "settings", 2);
7537
+ A([
7509
7538
  $()
7510
- ], T.prototype, "settings", 2);
7511
- _([
7539
+ ], C.prototype, "followingUserId", 2);
7540
+ A([
7512
7541
  $()
7513
- ], T.prototype, "followingUserId", 2);
7514
- _([
7542
+ ], C.prototype, "drawModeActive", 2);
7543
+ A([
7515
7544
  $()
7516
- ], T.prototype, "drawModeActive", 2);
7517
- _([
7545
+ ], C.prototype, "connectionState", 2);
7546
+ A([
7518
7547
  $()
7519
- ], T.prototype, "connectionState", 2);
7520
- _([
7548
+ ], C.prototype, "showConnectedFlash", 2);
7549
+ A([
7521
7550
  $()
7522
- ], T.prototype, "showConnectedFlash", 2);
7523
- T = _([
7551
+ ], C.prototype, "envConfig", 2);
7552
+ C = A([
7524
7553
  L("pulse-widget")
7525
- ], T);
7554
+ ], C);
7526
7555
  export {
7527
7556
  Y as PulseComments,
7528
7557
  de as PulseCursors,
@@ -7530,5 +7559,5 @@ export {
7530
7559
  Z as PulsePresence,
7531
7560
  X as PulseProvider,
7532
7561
  N as PulseReactions,
7533
- T as PulseWidget
7562
+ C as PulseWidget
7534
7563
  };