@gamention/pulse-elements 0.1.18 → 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.
- package/dist/index.d.ts +1 -0
- package/dist/pulse-elements.cjs +111 -107
- package/dist/pulse-elements.js +437 -393
- package/package.json +3 -3
package/dist/pulse-elements.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright 2021 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
let
|
|
6
|
+
let kt = class extends Event {
|
|
7
7
|
constructor(e, t, i, s) {
|
|
8
8
|
super("context-request", { bubbles: !0, composed: !0 }), this.context = e, this.contextTarget = t, this.callback = i, this.subscribe = s ?? !1;
|
|
9
9
|
}
|
|
@@ -18,7 +18,7 @@ let wt = class extends Event {
|
|
|
18
18
|
* Copyright 2021 Google LLC
|
|
19
19
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
20
20
|
*/
|
|
21
|
-
let
|
|
21
|
+
let Ge = class {
|
|
22
22
|
constructor(e, t, i, s) {
|
|
23
23
|
if (this.subscribe = !1, this.provided = !1, this.value = void 0, this.t = (o, r) => {
|
|
24
24
|
this.unsubscribe && (this.unsubscribe !== r && (this.provided = !1, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = o, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = !0, this.callback && this.callback(o, r)), this.unsubscribe = r;
|
|
@@ -35,7 +35,7 @@ let Ke = class {
|
|
|
35
35
|
this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0);
|
|
36
36
|
}
|
|
37
37
|
dispatchRequest() {
|
|
38
|
-
this.host.dispatchEvent(new
|
|
38
|
+
this.host.dispatchEvent(new kt(this.context, this.host, this.t, this.subscribe));
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
@@ -43,7 +43,7 @@ let Ke = class {
|
|
|
43
43
|
* Copyright 2021 Google LLC
|
|
44
44
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
45
|
*/
|
|
46
|
-
let
|
|
46
|
+
let jt = class {
|
|
47
47
|
get value() {
|
|
48
48
|
return this.o;
|
|
49
49
|
}
|
|
@@ -76,11 +76,11 @@ let Ot = class {
|
|
|
76
76
|
* Copyright 2021 Google LLC
|
|
77
77
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
78
78
|
*/
|
|
79
|
-
let
|
|
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
|
-
},
|
|
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) => {
|
|
@@ -90,7 +90,7 @@ let Rt = class extends Event {
|
|
|
90
90
|
}, this.onProviderRequest = (r) => {
|
|
91
91
|
if (r.context !== this.context || (r.contextTarget ?? r.composedPath()[0]) === this.host) return;
|
|
92
92
|
const a = /* @__PURE__ */ new Set();
|
|
93
|
-
for (const [l, { consumerHost: d }] of this.subscriptions) a.has(l) || (a.add(l), d.dispatchEvent(new
|
|
93
|
+
for (const [l, { consumerHost: d }] of this.subscriptions) a.has(l) || (a.add(l), d.dispatchEvent(new kt(this.context, d, l, !0)));
|
|
94
94
|
r.stopPropagation();
|
|
95
95
|
}, this.host = e, t.context !== void 0 ? this.context = t.context : this.context = t, this.attachListeners(), (o = (s = this.host).addController) == null || o.call(s, this);
|
|
96
96
|
}
|
|
@@ -98,7 +98,7 @@ let Rt = 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
|
|
101
|
+
this.host.dispatchEvent(new zt(this.context, this.host));
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
/**
|
|
@@ -106,7 +106,7 @@ let Rt = class extends Event {
|
|
|
106
106
|
* Copyright 2017 Google LLC
|
|
107
107
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
108
108
|
*/
|
|
109
|
-
function
|
|
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() {
|
|
@@ -114,11 +114,11 @@ function Lt({ context: n }) {
|
|
|
114
114
|
}, set(s) {
|
|
115
115
|
return i.get(this).setValue(s), e.set.call(this, s);
|
|
116
116
|
}, init(s) {
|
|
117
|
-
return i.set(this, new
|
|
117
|
+
return i.set(this, new Je(this, { context: n, initialValue: s })), s;
|
|
118
118
|
} };
|
|
119
119
|
{
|
|
120
120
|
e.constructor.addInitializer(((r) => {
|
|
121
|
-
i.set(r, new
|
|
121
|
+
i.set(r, new Je(r, { context: n }));
|
|
122
122
|
}));
|
|
123
123
|
const s = Object.getOwnPropertyDescriptor(e, t);
|
|
124
124
|
let o;
|
|
@@ -147,19 +147,31 @@ function Lt({ context: n }) {
|
|
|
147
147
|
function fe({ context: n, subscribe: e }) {
|
|
148
148
|
return (t, i) => {
|
|
149
149
|
typeof i == "object" ? i.addInitializer((function() {
|
|
150
|
-
new
|
|
150
|
+
new Ge(this, { context: n, callback: (s) => {
|
|
151
151
|
t.set.call(this, s);
|
|
152
152
|
}, subscribe: e });
|
|
153
153
|
})) : t.constructor.addInitializer(((s) => {
|
|
154
|
-
new
|
|
154
|
+
new Ge(s, { context: n, callback: (o) => {
|
|
155
155
|
s[i] = o;
|
|
156
156
|
}, subscribe: e });
|
|
157
157
|
}));
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
|
-
var
|
|
161
|
-
const
|
|
162
|
-
|
|
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
|
+
const _e = {
|
|
162
|
+
allowImages: !0,
|
|
163
|
+
allowAudio: !0,
|
|
164
|
+
allowVideo: !0,
|
|
165
|
+
maxFileSizeMb: 10,
|
|
166
|
+
maxAttachmentsPerComment: 5,
|
|
167
|
+
allowReactions: !0,
|
|
168
|
+
allowDrawing: !0,
|
|
169
|
+
allowMentions: !0,
|
|
170
|
+
showCursors: !0,
|
|
171
|
+
showPresence: !0,
|
|
172
|
+
showTypingIndicators: !0
|
|
173
|
+
}, Nt = "ws://localhost:4567", Ze = 50, Bt = 3e4, Ft = 1e3, qt = 3e4;
|
|
174
|
+
let He = class {
|
|
163
175
|
constructor() {
|
|
164
176
|
k(this, "handlers", /* @__PURE__ */ new Map());
|
|
165
177
|
}
|
|
@@ -179,9 +191,9 @@ let De = class {
|
|
|
179
191
|
removeAll() {
|
|
180
192
|
this.handlers.clear();
|
|
181
193
|
}
|
|
182
|
-
},
|
|
194
|
+
}, Vt = class extends He {
|
|
183
195
|
constructor(e) {
|
|
184
|
-
super(), k(this, "ws", null), k(this, "endpoint"), k(this, "reconnectAttempt", 0), k(this, "reconnectTimer", null), k(this, "_state", "disconnected"), this.endpoint = 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 ?? Nt;
|
|
185
197
|
}
|
|
186
198
|
get state() {
|
|
187
199
|
return this._state;
|
|
@@ -209,20 +221,23 @@ let De = class {
|
|
|
209
221
|
}
|
|
210
222
|
scheduleReconnect() {
|
|
211
223
|
const e = Math.min(
|
|
212
|
-
|
|
213
|
-
|
|
224
|
+
Ft * 2 ** this.reconnectAttempt,
|
|
225
|
+
qt
|
|
214
226
|
);
|
|
215
227
|
this.reconnectAttempt++, this.reconnectTimer = setTimeout(() => {
|
|
216
228
|
this.reconnectTimer = null, this.connect();
|
|
217
229
|
}, e);
|
|
218
230
|
}
|
|
219
|
-
},
|
|
231
|
+
}, Wt = class extends He {
|
|
220
232
|
constructor() {
|
|
221
|
-
super(...arguments), k(this, "baseUrl", ""), k(this, "_user", null), 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());
|
|
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());
|
|
222
234
|
}
|
|
223
235
|
get user() {
|
|
224
236
|
return this._user;
|
|
225
237
|
}
|
|
238
|
+
get config() {
|
|
239
|
+
return this._config;
|
|
240
|
+
}
|
|
226
241
|
/** Optimistically remove a comment from local state (before server round-trip). */
|
|
227
242
|
removeComment(e) {
|
|
228
243
|
for (const [t, i] of this._threads) {
|
|
@@ -306,7 +321,7 @@ let De = class {
|
|
|
306
321
|
handleMessage(e) {
|
|
307
322
|
switch (e.type) {
|
|
308
323
|
case "auth:ok":
|
|
309
|
-
this._user = e.user, this._users.clear();
|
|
324
|
+
this._config = e.config ?? { ..._e }, this._user = e.user, this._users.clear();
|
|
310
325
|
for (const t of e.users) this._users.set(t.id, t);
|
|
311
326
|
this._presence.clear();
|
|
312
327
|
for (const t of e.presence)
|
|
@@ -436,14 +451,14 @@ let De = class {
|
|
|
436
451
|
}
|
|
437
452
|
}
|
|
438
453
|
reset() {
|
|
439
|
-
this._user = null, this._users.clear(), this._presence.clear(), this._threads.clear(), this._reactions.clear(), this._notifications = [], this._activityLogs = [], this._typing.clear(), this._viewports.clear(), this._selections.clear();
|
|
454
|
+
this._user = null, this._config = { ..._e }, this._users.clear(), this._presence.clear(), this._threads.clear(), this._reactions.clear(), this._notifications = [], this._activityLogs = [], this._typing.clear(), this._viewports.clear(), this._selections.clear();
|
|
440
455
|
}
|
|
441
|
-
},
|
|
456
|
+
}, Et = class extends He {
|
|
442
457
|
constructor(e) {
|
|
443
458
|
var t;
|
|
444
|
-
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
|
|
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(/\/$/, "");
|
|
445
460
|
const i = ((t = e.endpoint) == null ? void 0 : t.replace(/^http/, "ws")) ?? void 0;
|
|
446
|
-
this.connection = new
|
|
461
|
+
this.connection = new Vt(i), this.connection.on("message", (s) => {
|
|
447
462
|
this.state.handleMessage(s), this.emit(s.type, s);
|
|
448
463
|
}), this.connection.on("state", (s) => {
|
|
449
464
|
this.emit("connection", s), s === "connected" ? (this.authenticate(), this.startHeartbeat()) : s === "disconnected" && this.stopHeartbeat();
|
|
@@ -473,9 +488,9 @@ let De = class {
|
|
|
473
488
|
// ── Cursors ──
|
|
474
489
|
moveCursor(e) {
|
|
475
490
|
const t = Date.now();
|
|
476
|
-
this.pendingCursor = e, t - this.lastCursorSend >=
|
|
491
|
+
this.pendingCursor = e, t - this.lastCursorSend >= Ze ? this.flushCursor() : this.cursorTimer || (this.cursorTimer = setTimeout(() => {
|
|
477
492
|
this.cursorTimer = null, this.flushCursor();
|
|
478
|
-
},
|
|
493
|
+
}, Ze));
|
|
479
494
|
}
|
|
480
495
|
flushCursor() {
|
|
481
496
|
this.pendingCursor && (this.send({ type: "cursor:move", position: this.pendingCursor }), this.lastCursorSend = Date.now(), this.pendingCursor = null);
|
|
@@ -487,7 +502,7 @@ let De = class {
|
|
|
487
502
|
startHeartbeat() {
|
|
488
503
|
this.heartbeatTimer = setInterval(() => {
|
|
489
504
|
this.send({ type: "presence:update", status: "online" });
|
|
490
|
-
},
|
|
505
|
+
}, Bt);
|
|
491
506
|
}
|
|
492
507
|
stopHeartbeat() {
|
|
493
508
|
this.heartbeatTimer && (clearInterval(this.heartbeatTimer), this.heartbeatTimer = null);
|
|
@@ -587,18 +602,18 @@ let De = class {
|
|
|
587
602
|
* Copyright 2019 Google LLC
|
|
588
603
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
589
604
|
*/
|
|
590
|
-
const ye = globalThis,
|
|
591
|
-
let
|
|
605
|
+
const ye = globalThis, Ne = ye.ShadowRoot && (ye.ShadyCSS === void 0 || ye.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Be = Symbol(), Qe = /* @__PURE__ */ new WeakMap();
|
|
606
|
+
let Ct = class {
|
|
592
607
|
constructor(e, t, i) {
|
|
593
|
-
if (this._$cssResult$ = !0, i !==
|
|
608
|
+
if (this._$cssResult$ = !0, i !== Be) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
594
609
|
this.cssText = e, this.t = t;
|
|
595
610
|
}
|
|
596
611
|
get styleSheet() {
|
|
597
612
|
let e = this.o;
|
|
598
613
|
const t = this.t;
|
|
599
|
-
if (
|
|
614
|
+
if (Ne && e === void 0) {
|
|
600
615
|
const i = t !== void 0 && t.length === 1;
|
|
601
|
-
i && (e =
|
|
616
|
+
i && (e = Qe.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), i && Qe.set(t, e));
|
|
602
617
|
}
|
|
603
618
|
return e;
|
|
604
619
|
}
|
|
@@ -606,33 +621,33 @@ let kt = class {
|
|
|
606
621
|
return this.cssText;
|
|
607
622
|
}
|
|
608
623
|
};
|
|
609
|
-
const
|
|
624
|
+
const Xt = (n) => new Ct(typeof n == "string" ? n : n + "", void 0, Be), O = (n, ...e) => {
|
|
610
625
|
const t = n.length === 1 ? n[0] : e.reduce((i, s, o) => i + ((r) => {
|
|
611
626
|
if (r._$cssResult$ === !0) return r.cssText;
|
|
612
627
|
if (typeof r == "number") return r;
|
|
613
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.");
|
|
614
629
|
})(s) + n[o + 1], n[0]);
|
|
615
|
-
return new
|
|
616
|
-
},
|
|
617
|
-
if (
|
|
630
|
+
return new Ct(t, n, Be);
|
|
631
|
+
}, Yt = (n, e) => {
|
|
632
|
+
if (Ne) n.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
618
633
|
else for (const t of e) {
|
|
619
634
|
const i = document.createElement("style"), s = ye.litNonce;
|
|
620
635
|
s !== void 0 && i.setAttribute("nonce", s), i.textContent = t.cssText, n.appendChild(i);
|
|
621
636
|
}
|
|
622
|
-
},
|
|
637
|
+
}, et = Ne ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((e) => {
|
|
623
638
|
let t = "";
|
|
624
639
|
for (const i of e.cssRules) t += i.cssText;
|
|
625
|
-
return
|
|
640
|
+
return Xt(t);
|
|
626
641
|
})(n) : n;
|
|
627
642
|
/**
|
|
628
643
|
* @license
|
|
629
644
|
* Copyright 2017 Google LLC
|
|
630
645
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
631
646
|
*/
|
|
632
|
-
const { is:
|
|
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) {
|
|
633
648
|
switch (e) {
|
|
634
649
|
case Boolean:
|
|
635
|
-
n = n ?
|
|
650
|
+
n = n ? ti : null;
|
|
636
651
|
break;
|
|
637
652
|
case Object:
|
|
638
653
|
case Array:
|
|
@@ -657,7 +672,7 @@ const { is: Ft, defineProperty: qt, getOwnPropertyDescriptor: Vt, getOwnProperty
|
|
|
657
672
|
}
|
|
658
673
|
}
|
|
659
674
|
return t;
|
|
660
|
-
} },
|
|
675
|
+
} }, Fe = (n, e) => !Kt(n, e), it = { attribute: !0, type: String, converter: ke, reflect: !1, useDefault: !1, hasChanged: Fe };
|
|
661
676
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), H.litPropertyMetadata ?? (H.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
662
677
|
let G = class extends HTMLElement {
|
|
663
678
|
static addInitializer(e) {
|
|
@@ -666,14 +681,14 @@ let G = class extends HTMLElement {
|
|
|
666
681
|
static get observedAttributes() {
|
|
667
682
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
668
683
|
}
|
|
669
|
-
static createProperty(e, t =
|
|
684
|
+
static createProperty(e, t = it) {
|
|
670
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) {
|
|
671
686
|
const i = Symbol(), s = this.getPropertyDescriptor(e, i, t);
|
|
672
|
-
s !== void 0 &&
|
|
687
|
+
s !== void 0 && Gt(this.prototype, e, s);
|
|
673
688
|
}
|
|
674
689
|
}
|
|
675
690
|
static getPropertyDescriptor(e, t, i) {
|
|
676
|
-
const { get: s, set: o } =
|
|
691
|
+
const { get: s, set: o } = Jt(this.prototype, e) ?? { get() {
|
|
677
692
|
return this[t];
|
|
678
693
|
}, set(r) {
|
|
679
694
|
this[t] = r;
|
|
@@ -684,17 +699,17 @@ let G = class extends HTMLElement {
|
|
|
684
699
|
}, configurable: !0, enumerable: !0 };
|
|
685
700
|
}
|
|
686
701
|
static getPropertyOptions(e) {
|
|
687
|
-
return this.elementProperties.get(e) ??
|
|
702
|
+
return this.elementProperties.get(e) ?? it;
|
|
688
703
|
}
|
|
689
704
|
static _$Ei() {
|
|
690
705
|
if (this.hasOwnProperty(ne("elementProperties"))) return;
|
|
691
|
-
const e =
|
|
706
|
+
const e = ei(this);
|
|
692
707
|
e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
|
|
693
708
|
}
|
|
694
709
|
static finalize() {
|
|
695
710
|
if (this.hasOwnProperty(ne("finalized"))) return;
|
|
696
711
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(ne("properties"))) {
|
|
697
|
-
const t = this.properties, i = [...
|
|
712
|
+
const t = this.properties, i = [...Zt(t), ...Qt(t)];
|
|
698
713
|
for (const s of i) this.createProperty(s, t[s]);
|
|
699
714
|
}
|
|
700
715
|
const e = this[Symbol.metadata];
|
|
@@ -713,8 +728,8 @@ let G = class extends HTMLElement {
|
|
|
713
728
|
const t = [];
|
|
714
729
|
if (Array.isArray(e)) {
|
|
715
730
|
const i = new Set(e.flat(1 / 0).reverse());
|
|
716
|
-
for (const s of i) t.unshift(
|
|
717
|
-
} else e !== void 0 && t.push(
|
|
731
|
+
for (const s of i) t.unshift(et(s));
|
|
732
|
+
} else e !== void 0 && t.push(et(e));
|
|
718
733
|
return t;
|
|
719
734
|
}
|
|
720
735
|
static _$Eu(e, t) {
|
|
@@ -743,7 +758,7 @@ let G = class extends HTMLElement {
|
|
|
743
758
|
}
|
|
744
759
|
createRenderRoot() {
|
|
745
760
|
const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
746
|
-
return
|
|
761
|
+
return Yt(e, this.constructor.elementStyles), e;
|
|
747
762
|
}
|
|
748
763
|
connectedCallback() {
|
|
749
764
|
var e;
|
|
@@ -786,7 +801,7 @@ let G = class extends HTMLElement {
|
|
|
786
801
|
var r;
|
|
787
802
|
if (e !== void 0) {
|
|
788
803
|
const a = this.constructor;
|
|
789
|
-
if (s === !1 && (o = this[e]), i ?? (i = a.getPropertyOptions(e)), !((i.hasChanged ??
|
|
804
|
+
if (s === !1 && (o = this[e]), i ?? (i = a.getPropertyOptions(e)), !((i.hasChanged ?? Fe)(o, t) || i.useDefault && i.reflect && o === ((r = this._$Ej) == null ? void 0 : r.get(e)) && !this.hasAttribute(a._$Eu(e, i)))) return;
|
|
790
805
|
this.C(e, t, i);
|
|
791
806
|
}
|
|
792
807
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -862,48 +877,48 @@ let G = class extends HTMLElement {
|
|
|
862
877
|
firstUpdated(e) {
|
|
863
878
|
}
|
|
864
879
|
};
|
|
865
|
-
G.elementStyles = [], G.shadowRootOptions = { mode: "open" }, G[ne("elementProperties")] = /* @__PURE__ */ new Map(), G[ne("finalized")] = /* @__PURE__ */ new Map(),
|
|
880
|
+
G.elementStyles = [], G.shadowRootOptions = { mode: "open" }, G[ne("elementProperties")] = /* @__PURE__ */ new Map(), G[ne("finalized")] = /* @__PURE__ */ new Map(), Ie == null || Ie({ ReactiveElement: G }), (H.reactiveElementVersions ?? (H.reactiveElementVersions = [])).push("2.1.2");
|
|
866
881
|
/**
|
|
867
882
|
* @license
|
|
868
883
|
* Copyright 2017 Google LLC
|
|
869
884
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
870
885
|
*/
|
|
871
|
-
const oe = globalThis,
|
|
872
|
-
\f\r]`, se = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
873
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
874
|
-
function
|
|
875
|
-
if (!
|
|
876
|
-
return
|
|
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
|
+
\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), ni = Pt(2), W = Symbol.for("lit-noChange"), v = Symbol.for("lit-nothing"), ct = /* @__PURE__ */ new WeakMap(), F = V.createTreeWalker(V, 129);
|
|
889
|
+
function _t(n, e) {
|
|
890
|
+
if (!qe(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
891
|
+
return nt !== void 0 ? nt.createHTML(e) : e;
|
|
877
892
|
}
|
|
878
|
-
const
|
|
893
|
+
const oi = (n, e) => {
|
|
879
894
|
const t = n.length - 1, i = [];
|
|
880
895
|
let s, o = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", r = se;
|
|
881
896
|
for (let a = 0; a < t; a++) {
|
|
882
897
|
const l = n[a];
|
|
883
898
|
let d, c, h = -1, p = 0;
|
|
884
|
-
for (; p < l.length && (r.lastIndex = p, c = r.exec(l), c !== null); ) p = r.lastIndex, r === se ? c[1] === "!--" ? r =
|
|
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);
|
|
885
900
|
const m = r === B && n[a + 1].startsWith("/>") ? " " : "";
|
|
886
|
-
o += r === se ? l +
|
|
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);
|
|
887
902
|
}
|
|
888
|
-
return [
|
|
903
|
+
return [_t(n, o + (n[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
|
|
889
904
|
};
|
|
890
905
|
class ce {
|
|
891
906
|
constructor({ strings: e, _$litType$: t }, i) {
|
|
892
907
|
let s;
|
|
893
908
|
this.parts = [];
|
|
894
909
|
let o = 0, r = 0;
|
|
895
|
-
const a = e.length - 1, l = this.parts, [d, c] =
|
|
910
|
+
const a = e.length - 1, l = this.parts, [d, c] = oi(e, t);
|
|
896
911
|
if (this.el = ce.createElement(d, i), F.currentNode = this.el.content, t === 2 || t === 3) {
|
|
897
912
|
const h = this.el.content.firstChild;
|
|
898
913
|
h.replaceWith(...h.childNodes);
|
|
899
914
|
}
|
|
900
915
|
for (; (s = F.nextNode()) !== null && l.length < a; ) {
|
|
901
916
|
if (s.nodeType === 1) {
|
|
902
|
-
if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(
|
|
917
|
+
if (s.hasAttributes()) for (const h of s.getAttributeNames()) if (h.endsWith(Tt)) {
|
|
903
918
|
const p = c[r++], m = s.getAttribute(h).split(D), g = /([.?@])?(.*)/.exec(p);
|
|
904
|
-
l.push({ type: 1, index: o, name: g[2], strings: m, ctor: g[1] === "." ?
|
|
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);
|
|
905
920
|
} else h.startsWith(D) && (l.push({ type: 6, index: o }), s.removeAttribute(h));
|
|
906
|
-
if (
|
|
921
|
+
if (At.test(s.tagName)) {
|
|
907
922
|
const h = s.textContent.split(D), p = h.length - 1;
|
|
908
923
|
if (p > 0) {
|
|
909
924
|
s.textContent = Ee ? Ee.emptyScript : "";
|
|
@@ -911,7 +926,7 @@ class ce {
|
|
|
911
926
|
s.append(h[p], ae());
|
|
912
927
|
}
|
|
913
928
|
}
|
|
914
|
-
} else if (s.nodeType === 8) if (s.data ===
|
|
929
|
+
} else if (s.nodeType === 8) if (s.data === St) l.push({ type: 2, index: o });
|
|
915
930
|
else {
|
|
916
931
|
let h = -1;
|
|
917
932
|
for (; (h = s.data.indexOf(D, h + 1)) !== -1; ) l.push({ type: 7, index: o }), h += D.length - 1;
|
|
@@ -931,7 +946,7 @@ function J(n, e, t = n, i) {
|
|
|
931
946
|
const o = le(e) ? void 0 : e._$litDirective$;
|
|
932
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;
|
|
933
948
|
}
|
|
934
|
-
class
|
|
949
|
+
class ri {
|
|
935
950
|
constructor(e, t) {
|
|
936
951
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
937
952
|
}
|
|
@@ -948,7 +963,7 @@ class ei {
|
|
|
948
963
|
for (; l !== void 0; ) {
|
|
949
964
|
if (r === l.index) {
|
|
950
965
|
let d;
|
|
951
|
-
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
|
|
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];
|
|
952
967
|
}
|
|
953
968
|
r !== (l == null ? void 0 : l.index) && (o = F.nextNode(), r++);
|
|
954
969
|
}
|
|
@@ -979,7 +994,7 @@ class me {
|
|
|
979
994
|
return this._$AB;
|
|
980
995
|
}
|
|
981
996
|
_$AI(e, t = this) {
|
|
982
|
-
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) :
|
|
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);
|
|
983
998
|
}
|
|
984
999
|
O(e) {
|
|
985
1000
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -992,19 +1007,19 @@ class me {
|
|
|
992
1007
|
}
|
|
993
1008
|
$(e) {
|
|
994
1009
|
var o;
|
|
995
|
-
const { values: t, _$litType$: i } = e, s = typeof i == "number" ? this._$AC(e) : (i.el === void 0 && (i.el = ce.createElement(
|
|
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);
|
|
996
1011
|
if (((o = this._$AH) == null ? void 0 : o._$AD) === s) this._$AH.p(t);
|
|
997
1012
|
else {
|
|
998
|
-
const r = new
|
|
1013
|
+
const r = new ri(s, this), a = r.u(this.options);
|
|
999
1014
|
r.p(t), this.T(a), this._$AH = r;
|
|
1000
1015
|
}
|
|
1001
1016
|
}
|
|
1002
1017
|
_$AC(e) {
|
|
1003
|
-
let t =
|
|
1004
|
-
return t === void 0 &&
|
|
1018
|
+
let t = ct.get(e.strings);
|
|
1019
|
+
return t === void 0 && ct.set(e.strings, t = new ce(e)), t;
|
|
1005
1020
|
}
|
|
1006
1021
|
k(e) {
|
|
1007
|
-
|
|
1022
|
+
qe(this._$AH) || (this._$AH = [], this._$AR());
|
|
1008
1023
|
const t = this._$AH;
|
|
1009
1024
|
let i, s = 0;
|
|
1010
1025
|
for (const o of e) s === t.length ? t.push(i = new me(this.O(ae()), this.O(ae()), this, this.options)) : i = t[s], i._$AI(o), s++;
|
|
@@ -1013,8 +1028,8 @@ class me {
|
|
|
1013
1028
|
_$AR(e = this._$AA.nextSibling, t) {
|
|
1014
1029
|
var i;
|
|
1015
1030
|
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, t); e !== this._$AB; ) {
|
|
1016
|
-
const s =
|
|
1017
|
-
|
|
1031
|
+
const s = st(e).nextSibling;
|
|
1032
|
+
st(e).remove(), e = s;
|
|
1018
1033
|
}
|
|
1019
1034
|
}
|
|
1020
1035
|
setConnected(e) {
|
|
@@ -1047,7 +1062,7 @@ class Se {
|
|
|
1047
1062
|
e === v ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
1048
1063
|
}
|
|
1049
1064
|
}
|
|
1050
|
-
class
|
|
1065
|
+
class ai extends Se {
|
|
1051
1066
|
constructor() {
|
|
1052
1067
|
super(...arguments), this.type = 3;
|
|
1053
1068
|
}
|
|
@@ -1055,7 +1070,7 @@ class ti extends Se {
|
|
|
1055
1070
|
this.element[this.name] = e === v ? void 0 : e;
|
|
1056
1071
|
}
|
|
1057
1072
|
}
|
|
1058
|
-
class
|
|
1073
|
+
class li extends Se {
|
|
1059
1074
|
constructor() {
|
|
1060
1075
|
super(...arguments), this.type = 4;
|
|
1061
1076
|
}
|
|
@@ -1063,7 +1078,7 @@ class ii extends Se {
|
|
|
1063
1078
|
this.element.toggleAttribute(this.name, !!e && e !== v);
|
|
1064
1079
|
}
|
|
1065
1080
|
}
|
|
1066
|
-
class
|
|
1081
|
+
class ci extends Se {
|
|
1067
1082
|
constructor(e, t, i, s, o) {
|
|
1068
1083
|
super(e, t, i, s, o), this.type = 5;
|
|
1069
1084
|
}
|
|
@@ -1077,7 +1092,7 @@ class si extends Se {
|
|
|
1077
1092
|
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
|
|
1078
1093
|
}
|
|
1079
1094
|
}
|
|
1080
|
-
class
|
|
1095
|
+
class di {
|
|
1081
1096
|
constructor(e, t, i) {
|
|
1082
1097
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = i;
|
|
1083
1098
|
}
|
|
@@ -1088,9 +1103,9 @@ class ni {
|
|
|
1088
1103
|
J(this, e);
|
|
1089
1104
|
}
|
|
1090
1105
|
}
|
|
1091
|
-
const
|
|
1092
|
-
|
|
1093
|
-
const
|
|
1106
|
+
const Oe = oe.litHtmlPolyfillSupport;
|
|
1107
|
+
Oe == null || Oe(ce, me), (oe.litHtmlVersions ?? (oe.litHtmlVersions = [])).push("3.3.2");
|
|
1108
|
+
const hi = (n, e, t) => {
|
|
1094
1109
|
const i = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
1095
1110
|
let s = i._$litPart$;
|
|
1096
1111
|
if (s === void 0) {
|
|
@@ -1105,7 +1120,7 @@ const oi = (n, e, t) => {
|
|
|
1105
1120
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1106
1121
|
*/
|
|
1107
1122
|
const q = globalThis;
|
|
1108
|
-
let
|
|
1123
|
+
let P = class extends G {
|
|
1109
1124
|
constructor() {
|
|
1110
1125
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
1111
1126
|
}
|
|
@@ -1116,7 +1131,7 @@ let A = class extends G {
|
|
|
1116
1131
|
}
|
|
1117
1132
|
update(e) {
|
|
1118
1133
|
const t = this.render();
|
|
1119
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do =
|
|
1134
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = hi(t, this.renderRoot, this.renderOptions);
|
|
1120
1135
|
}
|
|
1121
1136
|
connectedCallback() {
|
|
1122
1137
|
var e;
|
|
@@ -1130,10 +1145,10 @@ let A = class extends G {
|
|
|
1130
1145
|
return W;
|
|
1131
1146
|
}
|
|
1132
1147
|
};
|
|
1133
|
-
var
|
|
1134
|
-
|
|
1135
|
-
const
|
|
1136
|
-
|
|
1148
|
+
var $t;
|
|
1149
|
+
P._$litElement$ = !0, P.finalized = !0, ($t = q.litElementHydrateSupport) == null || $t.call(q, { LitElement: P });
|
|
1150
|
+
const Re = q.litElementPolyfillSupport;
|
|
1151
|
+
Re == null || Re({ LitElement: P });
|
|
1137
1152
|
(q.litElementVersions ?? (q.litElementVersions = [])).push("4.2.2");
|
|
1138
1153
|
/**
|
|
1139
1154
|
* @license
|
|
@@ -1150,7 +1165,7 @@ const L = (n) => (e, t) => {
|
|
|
1150
1165
|
* Copyright 2017 Google LLC
|
|
1151
1166
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1152
1167
|
*/
|
|
1153
|
-
const
|
|
1168
|
+
const pi = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged: Fe }, ui = (n = pi, e, t) => {
|
|
1154
1169
|
const { kind: i, metadata: s } = t;
|
|
1155
1170
|
let o = globalThis.litPropertyMetadata.get(s);
|
|
1156
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") {
|
|
@@ -1172,7 +1187,7 @@ const ri = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged
|
|
|
1172
1187
|
throw Error("Unsupported decorator location: " + i);
|
|
1173
1188
|
};
|
|
1174
1189
|
function x(n) {
|
|
1175
|
-
return (e, t) => typeof t == "object" ?
|
|
1190
|
+
return (e, t) => typeof t == "object" ? ui(n, e, t) : ((i, s, o) => {
|
|
1176
1191
|
const r = s.hasOwnProperty(o);
|
|
1177
1192
|
return s.constructor.createProperty(o, i), r ? Object.getOwnPropertyDescriptor(s, o) : void 0;
|
|
1178
1193
|
})(n, e, t);
|
|
@@ -1186,12 +1201,12 @@ function $(n) {
|
|
|
1186
1201
|
return x({ ...n, state: !0, attribute: !1 });
|
|
1187
1202
|
}
|
|
1188
1203
|
const Q = "pulse-client";
|
|
1189
|
-
var
|
|
1190
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
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--)
|
|
1191
1206
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
1192
|
-
return i && s &&
|
|
1207
|
+
return i && s && fi(e, t, s), s;
|
|
1193
1208
|
};
|
|
1194
|
-
let X = class extends
|
|
1209
|
+
let X = class extends P {
|
|
1195
1210
|
constructor() {
|
|
1196
1211
|
super(...arguments), this.apiKey = "", this.token = "", this.room = "";
|
|
1197
1212
|
}
|
|
@@ -1203,7 +1218,7 @@ let X = class extends A {
|
|
|
1203
1218
|
room: this.room,
|
|
1204
1219
|
endpoint: this.endpoint
|
|
1205
1220
|
};
|
|
1206
|
-
this.client = new
|
|
1221
|
+
this.client = new Et(n), this.client.connect();
|
|
1207
1222
|
}
|
|
1208
1223
|
disconnectedCallback() {
|
|
1209
1224
|
var n;
|
|
@@ -1226,17 +1241,17 @@ ee([
|
|
|
1226
1241
|
x()
|
|
1227
1242
|
], X.prototype, "endpoint", 2);
|
|
1228
1243
|
ee([
|
|
1229
|
-
|
|
1244
|
+
Ut({ context: Q })
|
|
1230
1245
|
], X.prototype, "client", 2);
|
|
1231
1246
|
X = ee([
|
|
1232
1247
|
L("pulse-provider")
|
|
1233
1248
|
], X);
|
|
1234
|
-
var
|
|
1235
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
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--)
|
|
1236
1251
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
1237
|
-
return i && s &&
|
|
1252
|
+
return i && s && gi(e, t, s), s;
|
|
1238
1253
|
};
|
|
1239
|
-
let Z = class extends
|
|
1254
|
+
let Z = class extends P {
|
|
1240
1255
|
constructor() {
|
|
1241
1256
|
super(...arguments), this.maxVisible = 5, this.users = [];
|
|
1242
1257
|
}
|
|
@@ -1280,7 +1295,7 @@ let Z = class extends A {
|
|
|
1280
1295
|
`;
|
|
1281
1296
|
}
|
|
1282
1297
|
};
|
|
1283
|
-
Z.styles =
|
|
1298
|
+
Z.styles = O`
|
|
1284
1299
|
:host {
|
|
1285
1300
|
display: inline-flex;
|
|
1286
1301
|
align-items: center;
|
|
@@ -1397,12 +1412,12 @@ Ae([
|
|
|
1397
1412
|
Z = Ae([
|
|
1398
1413
|
L("pulse-presence")
|
|
1399
1414
|
], Z);
|
|
1400
|
-
var
|
|
1401
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
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--)
|
|
1402
1417
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
1403
|
-
return i && s &&
|
|
1418
|
+
return i && s && bi(e, t, s), s;
|
|
1404
1419
|
};
|
|
1405
|
-
let de = class extends
|
|
1420
|
+
let de = class extends P {
|
|
1406
1421
|
constructor() {
|
|
1407
1422
|
super(...arguments), this.cursors = /* @__PURE__ */ new Map(), this.unsubs = [], this.handleLocalCursor = (n) => {
|
|
1408
1423
|
var e;
|
|
@@ -1479,7 +1494,7 @@ let de = class extends A {
|
|
|
1479
1494
|
`;
|
|
1480
1495
|
}
|
|
1481
1496
|
};
|
|
1482
|
-
de.styles =
|
|
1497
|
+
de.styles = O`
|
|
1483
1498
|
:host {
|
|
1484
1499
|
position: fixed;
|
|
1485
1500
|
top: 0;
|
|
@@ -1516,22 +1531,22 @@ de.styles = M`
|
|
|
1516
1531
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
1517
1532
|
}
|
|
1518
1533
|
`;
|
|
1519
|
-
|
|
1534
|
+
Ve([
|
|
1520
1535
|
fe({ context: Q, subscribe: !0 }),
|
|
1521
1536
|
x({ attribute: !1 })
|
|
1522
1537
|
], de.prototype, "client", 2);
|
|
1523
|
-
|
|
1538
|
+
Ve([
|
|
1524
1539
|
$()
|
|
1525
1540
|
], de.prototype, "cursors", 2);
|
|
1526
|
-
de =
|
|
1541
|
+
de = Ve([
|
|
1527
1542
|
L("pulse-cursors")
|
|
1528
1543
|
], de);
|
|
1529
|
-
var
|
|
1530
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
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--)
|
|
1531
1546
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
1532
|
-
return i && s &&
|
|
1547
|
+
return i && s && yi(e, t, s), s;
|
|
1533
1548
|
};
|
|
1534
|
-
let Y = class extends
|
|
1549
|
+
let Y = class extends P {
|
|
1535
1550
|
constructor() {
|
|
1536
1551
|
super(...arguments), this.showResolved = !1, this.threads = [], this.replyingTo = null;
|
|
1537
1552
|
}
|
|
@@ -1649,7 +1664,7 @@ let Y = class extends A {
|
|
|
1649
1664
|
return o < 24 ? `${o}h ago` : e.toLocaleDateString();
|
|
1650
1665
|
}
|
|
1651
1666
|
};
|
|
1652
|
-
Y.styles =
|
|
1667
|
+
Y.styles = O`
|
|
1653
1668
|
:host {
|
|
1654
1669
|
display: block;
|
|
1655
1670
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
@@ -1877,25 +1892,25 @@ ge([
|
|
|
1877
1892
|
Y = ge([
|
|
1878
1893
|
L("pulse-comments")
|
|
1879
1894
|
], Y);
|
|
1880
|
-
var
|
|
1881
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
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--)
|
|
1882
1897
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
1883
|
-
return i && s &&
|
|
1898
|
+
return i && s && $i(e, t, s), s;
|
|
1884
1899
|
};
|
|
1885
|
-
const
|
|
1900
|
+
const Ei = {
|
|
1886
1901
|
"comment:created": "left a comment",
|
|
1887
1902
|
"comment:mention": "mentioned you",
|
|
1888
1903
|
"comment:reply": "replied to your comment",
|
|
1889
1904
|
"thread:resolved": "resolved a thread",
|
|
1890
1905
|
"reaction:added": "reacted to your comment"
|
|
1891
|
-
},
|
|
1906
|
+
}, Ci = {
|
|
1892
1907
|
"comment:created": "💬",
|
|
1893
1908
|
"comment:mention": "📣",
|
|
1894
1909
|
"comment:reply": "↩️",
|
|
1895
1910
|
"thread:resolved": "✅",
|
|
1896
1911
|
"reaction:added": "🎉"
|
|
1897
1912
|
};
|
|
1898
|
-
let he = class extends
|
|
1913
|
+
let he = class extends P {
|
|
1899
1914
|
constructor() {
|
|
1900
1915
|
super(...arguments), this.notifications = [];
|
|
1901
1916
|
}
|
|
@@ -1962,11 +1977,11 @@ let he = class extends A {
|
|
|
1962
1977
|
class="item ${e.read ? "" : "unread"}"
|
|
1963
1978
|
@click=${() => this.handleClick(e)}
|
|
1964
1979
|
>
|
|
1965
|
-
<span class="icon">${
|
|
1980
|
+
<span class="icon">${Ci[e.type] ?? "🔔"}</span>
|
|
1966
1981
|
<div class="content">
|
|
1967
1982
|
<div class="text">
|
|
1968
1983
|
<span class="actor">${this.getActorName(e.actorId)}</span>
|
|
1969
|
-
${
|
|
1984
|
+
${Ei[e.type] ?? e.type}
|
|
1970
1985
|
</div>
|
|
1971
1986
|
<div class="time">${this.formatTime(e.createdAt)}</div>
|
|
1972
1987
|
</div>
|
|
@@ -1978,7 +1993,7 @@ let he = class extends A {
|
|
|
1978
1993
|
`;
|
|
1979
1994
|
}
|
|
1980
1995
|
};
|
|
1981
|
-
he.styles =
|
|
1996
|
+
he.styles = O`
|
|
1982
1997
|
:host {
|
|
1983
1998
|
display: block;
|
|
1984
1999
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
@@ -2119,23 +2134,23 @@ he.styles = M`
|
|
|
2119
2134
|
opacity: 0.4;
|
|
2120
2135
|
}
|
|
2121
2136
|
`;
|
|
2122
|
-
|
|
2137
|
+
We([
|
|
2123
2138
|
fe({ context: Q, subscribe: !0 }),
|
|
2124
2139
|
x({ attribute: !1 })
|
|
2125
2140
|
], he.prototype, "client", 2);
|
|
2126
|
-
|
|
2141
|
+
We([
|
|
2127
2142
|
$()
|
|
2128
2143
|
], he.prototype, "notifications", 2);
|
|
2129
|
-
he =
|
|
2144
|
+
he = We([
|
|
2130
2145
|
L("pulse-notifications")
|
|
2131
2146
|
], he);
|
|
2132
|
-
var
|
|
2133
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
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--)
|
|
2134
2149
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
2135
|
-
return i && s &&
|
|
2150
|
+
return i && s && Ti(e, t, s), s;
|
|
2136
2151
|
};
|
|
2137
|
-
const
|
|
2138
|
-
let N = class extends
|
|
2152
|
+
const Ai = ["👍", "👎", "❤️", "🎉", "👀", "🚀"];
|
|
2153
|
+
let N = class extends P {
|
|
2139
2154
|
constructor() {
|
|
2140
2155
|
super(...arguments), this.targetId = "", this.targetType = "comment", this.reactions = [], this.showPicker = !1;
|
|
2141
2156
|
}
|
|
@@ -2196,7 +2211,7 @@ let N = class extends A {
|
|
|
2196
2211
|
</button>
|
|
2197
2212
|
${this.showPicker ? u`
|
|
2198
2213
|
<div class="picker">
|
|
2199
|
-
${
|
|
2214
|
+
${Ai.map(
|
|
2200
2215
|
(e) => u`
|
|
2201
2216
|
<button @click=${() => this.addEmoji(e)}>
|
|
2202
2217
|
${e}
|
|
@@ -2209,7 +2224,7 @@ let N = class extends A {
|
|
|
2209
2224
|
`;
|
|
2210
2225
|
}
|
|
2211
2226
|
};
|
|
2212
|
-
N.styles =
|
|
2227
|
+
N.styles = O`
|
|
2213
2228
|
:host {
|
|
2214
2229
|
display: inline-flex;
|
|
2215
2230
|
align-items: center;
|
|
@@ -2340,13 +2355,26 @@ te([
|
|
|
2340
2355
|
N = te([
|
|
2341
2356
|
L("pulse-reactions")
|
|
2342
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
|
+
};
|
|
2343
2371
|
/**
|
|
2344
2372
|
* @license
|
|
2345
2373
|
* Copyright 2017 Google LLC
|
|
2346
2374
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2347
2375
|
*/
|
|
2348
|
-
const
|
|
2349
|
-
class
|
|
2376
|
+
const Pi = { CHILD: 2 }, _i = (n) => (...e) => ({ _$litDirective$: n, values: e });
|
|
2377
|
+
class Ii {
|
|
2350
2378
|
constructor(e) {
|
|
2351
2379
|
}
|
|
2352
2380
|
get _$AU() {
|
|
@@ -2367,9 +2395,9 @@ class Ci {
|
|
|
2367
2395
|
* Copyright 2017 Google LLC
|
|
2368
2396
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2369
2397
|
*/
|
|
2370
|
-
class
|
|
2398
|
+
class Le extends Ii {
|
|
2371
2399
|
constructor(e) {
|
|
2372
|
-
if (super(e), this.it = v, e.type !==
|
|
2400
|
+
if (super(e), this.it = v, e.type !== Pi.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
2373
2401
|
}
|
|
2374
2402
|
render(e) {
|
|
2375
2403
|
if (e === v || e == null) return this._t = void 0, this.it = e;
|
|
@@ -2381,23 +2409,23 @@ class Re extends Ci {
|
|
|
2381
2409
|
return t.raw = t, this._t = { _$litType$: this.constructor.resultType, strings: t, values: [] };
|
|
2382
2410
|
}
|
|
2383
2411
|
}
|
|
2384
|
-
|
|
2412
|
+
Le.directiveName = "unsafeHTML", Le.resultType = 1;
|
|
2385
2413
|
/**
|
|
2386
2414
|
* @license
|
|
2387
2415
|
* Copyright 2017 Google LLC
|
|
2388
2416
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2389
2417
|
*/
|
|
2390
|
-
class
|
|
2418
|
+
class je extends Le {
|
|
2391
2419
|
}
|
|
2392
|
-
|
|
2393
|
-
const
|
|
2420
|
+
je.directiveName = "unsafeSVG", je.resultType = 2;
|
|
2421
|
+
const Mi = _i(je);
|
|
2394
2422
|
/**
|
|
2395
2423
|
* @license lucide v0.577.0 - ISC
|
|
2396
2424
|
*
|
|
2397
2425
|
* This source code is licensed under the ISC license.
|
|
2398
2426
|
* See the LICENSE file in the root directory of this source tree.
|
|
2399
2427
|
*/
|
|
2400
|
-
const
|
|
2428
|
+
const Oi = [
|
|
2401
2429
|
["path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }],
|
|
2402
2430
|
[
|
|
2403
2431
|
"path",
|
|
@@ -2412,7 +2440,7 @@ const Si = [
|
|
|
2412
2440
|
* This source code is licensed under the ISC license.
|
|
2413
2441
|
* See the LICENSE file in the root directory of this source tree.
|
|
2414
2442
|
*/
|
|
2415
|
-
const
|
|
2443
|
+
const Ri = [
|
|
2416
2444
|
["circle", { cx: "12", cy: "12", r: "10" }],
|
|
2417
2445
|
["path", { d: "M12 6v6l4 2" }]
|
|
2418
2446
|
];
|
|
@@ -2422,7 +2450,7 @@ const Ai = [
|
|
|
2422
2450
|
* This source code is licensed under the ISC license.
|
|
2423
2451
|
* See the LICENSE file in the root directory of this source tree.
|
|
2424
2452
|
*/
|
|
2425
|
-
const
|
|
2453
|
+
const Li = [
|
|
2426
2454
|
[
|
|
2427
2455
|
"path",
|
|
2428
2456
|
{
|
|
@@ -2436,7 +2464,7 @@ const Pi = [
|
|
|
2436
2464
|
* This source code is licensed under the ISC license.
|
|
2437
2465
|
* See the LICENSE file in the root directory of this source tree.
|
|
2438
2466
|
*/
|
|
2439
|
-
const
|
|
2467
|
+
const ji = [
|
|
2440
2468
|
["path", { d: "M12 19v3" }],
|
|
2441
2469
|
["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2" }],
|
|
2442
2470
|
["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3" }]
|
|
@@ -2447,7 +2475,7 @@ const _i = [
|
|
|
2447
2475
|
* This source code is licensed under the ISC license.
|
|
2448
2476
|
* See the LICENSE file in the root directory of this source tree.
|
|
2449
2477
|
*/
|
|
2450
|
-
const
|
|
2478
|
+
const zi = [
|
|
2451
2479
|
[
|
|
2452
2480
|
"path",
|
|
2453
2481
|
{
|
|
@@ -2461,7 +2489,7 @@ const Ii = [
|
|
|
2461
2489
|
* This source code is licensed under the ISC license.
|
|
2462
2490
|
* See the LICENSE file in the root directory of this source tree.
|
|
2463
2491
|
*/
|
|
2464
|
-
const
|
|
2492
|
+
const Ui = [
|
|
2465
2493
|
[
|
|
2466
2494
|
"path",
|
|
2467
2495
|
{
|
|
@@ -2483,7 +2511,7 @@ const Mi = [
|
|
|
2483
2511
|
* This source code is licensed under the ISC license.
|
|
2484
2512
|
* See the LICENSE file in the root directory of this source tree.
|
|
2485
2513
|
*/
|
|
2486
|
-
const
|
|
2514
|
+
const Di = [
|
|
2487
2515
|
[
|
|
2488
2516
|
"path",
|
|
2489
2517
|
{
|
|
@@ -2498,7 +2526,7 @@ const Oi = [
|
|
|
2498
2526
|
* This source code is licensed under the ISC license.
|
|
2499
2527
|
* See the LICENSE file in the root directory of this source tree.
|
|
2500
2528
|
*/
|
|
2501
|
-
const
|
|
2529
|
+
const Mt = [
|
|
2502
2530
|
["path", { d: "M12 17v5" }],
|
|
2503
2531
|
[
|
|
2504
2532
|
"path",
|
|
@@ -2513,7 +2541,7 @@ const Pt = [
|
|
|
2513
2541
|
* This source code is licensed under the ISC license.
|
|
2514
2542
|
* See the LICENSE file in the root directory of this source tree.
|
|
2515
2543
|
*/
|
|
2516
|
-
const
|
|
2544
|
+
const Hi = [
|
|
2517
2545
|
[
|
|
2518
2546
|
"path",
|
|
2519
2547
|
{
|
|
@@ -2528,7 +2556,7 @@ const Ri = [
|
|
|
2528
2556
|
* This source code is licensed under the ISC license.
|
|
2529
2557
|
* See the LICENSE file in the root directory of this source tree.
|
|
2530
2558
|
*/
|
|
2531
|
-
const
|
|
2559
|
+
const Ni = [
|
|
2532
2560
|
["path", { d: "M10 11v6" }],
|
|
2533
2561
|
["path", { d: "M14 11v6" }],
|
|
2534
2562
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }],
|
|
@@ -2541,7 +2569,7 @@ const Li = [
|
|
|
2541
2569
|
* This source code is licensed under the ISC license.
|
|
2542
2570
|
* See the LICENSE file in the root directory of this source tree.
|
|
2543
2571
|
*/
|
|
2544
|
-
const
|
|
2572
|
+
const Bi = [
|
|
2545
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" }],
|
|
2546
2574
|
["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2" }]
|
|
2547
2575
|
];
|
|
@@ -2561,7 +2589,7 @@ const ve = [
|
|
|
2561
2589
|
* This source code is licensed under the ISC license.
|
|
2562
2590
|
* See the LICENSE file in the root directory of this source tree.
|
|
2563
2591
|
*/
|
|
2564
|
-
const
|
|
2592
|
+
const Fi = [
|
|
2565
2593
|
[
|
|
2566
2594
|
"path",
|
|
2567
2595
|
{
|
|
@@ -2569,14 +2597,14 @@ const zi = [
|
|
|
2569
2597
|
}
|
|
2570
2598
|
]
|
|
2571
2599
|
];
|
|
2572
|
-
function
|
|
2600
|
+
function qi(n) {
|
|
2573
2601
|
return n.map(([e, t]) => {
|
|
2574
2602
|
const i = Object.entries(t).filter(([, s]) => s != null).map(([s, o]) => `${s}="${o}"`).join(" ");
|
|
2575
2603
|
return `<${e} ${i}/>`;
|
|
2576
2604
|
}).join("");
|
|
2577
2605
|
}
|
|
2578
|
-
function
|
|
2579
|
-
return
|
|
2606
|
+
function T(n, e = 18) {
|
|
2607
|
+
return ni`<svg
|
|
2580
2608
|
xmlns="http://www.w3.org/2000/svg"
|
|
2581
2609
|
width="${e}"
|
|
2582
2610
|
height="${e}"
|
|
@@ -2586,9 +2614,9 @@ function C(n, e = 18) {
|
|
|
2586
2614
|
stroke-width="2"
|
|
2587
2615
|
stroke-linecap="round"
|
|
2588
2616
|
stroke-linejoin="round"
|
|
2589
|
-
>${
|
|
2617
|
+
>${Mi(qi(n))}</svg>`;
|
|
2590
2618
|
}
|
|
2591
|
-
const ie =
|
|
2619
|
+
const ie = O`
|
|
2592
2620
|
* {
|
|
2593
2621
|
box-sizing: border-box;
|
|
2594
2622
|
margin: 0;
|
|
@@ -2631,7 +2659,7 @@ const ie = M`
|
|
|
2631
2659
|
--pw-shadow: var(--pulse-shadow);
|
|
2632
2660
|
--pw-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.08);
|
|
2633
2661
|
}
|
|
2634
|
-
`, be =
|
|
2662
|
+
`, be = O`
|
|
2635
2663
|
.pw-btn {
|
|
2636
2664
|
display: inline-flex;
|
|
2637
2665
|
align-items: center;
|
|
@@ -2675,7 +2703,7 @@ const ie = M`
|
|
|
2675
2703
|
width: 18px;
|
|
2676
2704
|
height: 18px;
|
|
2677
2705
|
}
|
|
2678
|
-
`, Pe =
|
|
2706
|
+
`, Pe = O`
|
|
2679
2707
|
.pw-scrollable::-webkit-scrollbar {
|
|
2680
2708
|
width: 4px;
|
|
2681
2709
|
}
|
|
@@ -2687,12 +2715,12 @@ const ie = M`
|
|
|
2687
2715
|
background: transparent;
|
|
2688
2716
|
}
|
|
2689
2717
|
`;
|
|
2690
|
-
var
|
|
2691
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
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--)
|
|
2692
2720
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
2693
|
-
return i && s &&
|
|
2721
|
+
return i && s && Vi(e, t, s), s;
|
|
2694
2722
|
};
|
|
2695
|
-
let K = class extends
|
|
2723
|
+
let K = class extends P {
|
|
2696
2724
|
constructor() {
|
|
2697
2725
|
super(...arguments), this.items = [], this.unsubs = [], this.counter = 0;
|
|
2698
2726
|
}
|
|
@@ -2743,7 +2771,7 @@ let K = class extends A {
|
|
|
2743
2771
|
<div class="panel-header">
|
|
2744
2772
|
<span class="panel-title">Activity</span>
|
|
2745
2773
|
<button class="close-btn" @click=${this.fireClose} title="Close">
|
|
2746
|
-
${
|
|
2774
|
+
${T(ve, 16)}
|
|
2747
2775
|
</button>
|
|
2748
2776
|
</div>
|
|
2749
2777
|
|
|
@@ -2778,7 +2806,7 @@ K.styles = [
|
|
|
2778
2806
|
ie,
|
|
2779
2807
|
be,
|
|
2780
2808
|
Pe,
|
|
2781
|
-
|
|
2809
|
+
O`
|
|
2782
2810
|
:host {
|
|
2783
2811
|
display: block;
|
|
2784
2812
|
}
|
|
@@ -2903,21 +2931,21 @@ K.TYPE_COLORS = {
|
|
|
2903
2931
|
comment: "#3b82f6",
|
|
2904
2932
|
resolve: "#22c55e"
|
|
2905
2933
|
};
|
|
2906
|
-
|
|
2934
|
+
Xe([
|
|
2907
2935
|
x({ attribute: !1 })
|
|
2908
2936
|
], K.prototype, "client", 2);
|
|
2909
|
-
|
|
2937
|
+
Xe([
|
|
2910
2938
|
$()
|
|
2911
2939
|
], K.prototype, "items", 2);
|
|
2912
|
-
K =
|
|
2940
|
+
K = Xe([
|
|
2913
2941
|
L("pulse-widget-activity-panel")
|
|
2914
2942
|
], K);
|
|
2915
|
-
const
|
|
2916
|
-
function
|
|
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);
|
|
2944
|
+
function ut(n) {
|
|
2917
2945
|
const e = Math.max(0, Math.floor(n)), t = Math.floor(e / 60), i = e % 60;
|
|
2918
2946
|
return `${t}:${i.toString().padStart(2, "0")}`;
|
|
2919
2947
|
}
|
|
2920
|
-
class
|
|
2948
|
+
class ze {
|
|
2921
2949
|
/**
|
|
2922
2950
|
* Create and return a fully self-contained inline audio player element.
|
|
2923
2951
|
*
|
|
@@ -2938,12 +2966,12 @@ class je {
|
|
|
2938
2966
|
width: "220px",
|
|
2939
2967
|
height: "44px",
|
|
2940
2968
|
padding: "0 10px",
|
|
2941
|
-
background:
|
|
2969
|
+
background: Yi,
|
|
2942
2970
|
borderRadius: "12px",
|
|
2943
|
-
border: `1px solid ${
|
|
2944
|
-
fontFamily:
|
|
2971
|
+
border: `1px solid ${Ki}`,
|
|
2972
|
+
fontFamily: Xi,
|
|
2945
2973
|
fontSize: "11px",
|
|
2946
|
-
color:
|
|
2974
|
+
color: pt,
|
|
2947
2975
|
userSelect: "none",
|
|
2948
2976
|
boxSizing: "border-box"
|
|
2949
2977
|
});
|
|
@@ -2954,7 +2982,7 @@ class je {
|
|
|
2954
2982
|
minWidth: "28px",
|
|
2955
2983
|
borderRadius: "50%",
|
|
2956
2984
|
border: "none",
|
|
2957
|
-
background:
|
|
2985
|
+
background: dt,
|
|
2958
2986
|
cursor: "pointer",
|
|
2959
2987
|
display: "flex",
|
|
2960
2988
|
alignItems: "center",
|
|
@@ -3001,12 +3029,12 @@ class je {
|
|
|
3001
3029
|
});
|
|
3002
3030
|
const g = [];
|
|
3003
3031
|
for (let E = 0; E < we; E++) {
|
|
3004
|
-
const I = document.createElement("div"), z = Math.round(
|
|
3032
|
+
const I = document.createElement("div"), z = Math.round(Gi[E] * 20);
|
|
3005
3033
|
Object.assign(I.style, {
|
|
3006
3034
|
flex: "1",
|
|
3007
3035
|
height: `${Math.max(3, z)}px`,
|
|
3008
3036
|
borderRadius: "1px",
|
|
3009
|
-
background:
|
|
3037
|
+
background: ht,
|
|
3010
3038
|
transition: "background 0.1s ease",
|
|
3011
3039
|
minWidth: "0"
|
|
3012
3040
|
}), g.push(I), m.appendChild(I);
|
|
@@ -3014,19 +3042,19 @@ class je {
|
|
|
3014
3042
|
const y = document.createElement("div");
|
|
3015
3043
|
Object.assign(y.style, {
|
|
3016
3044
|
fontSize: "10px",
|
|
3017
|
-
color:
|
|
3045
|
+
color: pt,
|
|
3018
3046
|
whiteSpace: "nowrap",
|
|
3019
3047
|
lineHeight: "1"
|
|
3020
3048
|
});
|
|
3021
3049
|
function b() {
|
|
3022
|
-
const E =
|
|
3050
|
+
const E = ut(o), I = ut(s);
|
|
3023
3051
|
y.textContent = `${E} / ${I}`;
|
|
3024
3052
|
}
|
|
3025
3053
|
b(), p.appendChild(m), p.appendChild(y), a.appendChild(l), a.appendChild(p);
|
|
3026
3054
|
function w() {
|
|
3027
3055
|
const E = s > 0 ? o / s : 0, I = Math.floor(E * we);
|
|
3028
3056
|
for (let z = 0; z < we; z++)
|
|
3029
|
-
g[z].style.background = z <= I ?
|
|
3057
|
+
g[z].style.background = z <= I ? dt : ht;
|
|
3030
3058
|
}
|
|
3031
3059
|
return m.addEventListener("click", (E) => {
|
|
3032
3060
|
if (s <= 0) return;
|
|
@@ -3053,7 +3081,7 @@ class je {
|
|
|
3053
3081
|
}), a;
|
|
3054
3082
|
}
|
|
3055
3083
|
}
|
|
3056
|
-
class
|
|
3084
|
+
class Ue {
|
|
3057
3085
|
constructor() {
|
|
3058
3086
|
this.container = null, this.stream = null, this.recorder = null, this.analyser = null, this.audioCtx = null, this.recording = !1, this.animFrame = null, this.startTime = 0, this.maxDuration = 12e4, this.maxTimer = null, this.canvas = null, this.timerEl = null, this.resolve = null, this.animate = () => {
|
|
3059
3087
|
this.recording && (this.drawWaveform(), this.updateTimer(), this.animFrame = requestAnimationFrame(this.animate));
|
|
@@ -3203,21 +3231,21 @@ class ze {
|
|
|
3203
3231
|
this.recorder = null, this.container && (this.container.remove(), this.container = null), this.canvas = null, this.timerEl = null;
|
|
3204
3232
|
}
|
|
3205
3233
|
}
|
|
3206
|
-
const
|
|
3234
|
+
const Ji = 180, Zi = 120, Qi = "#e2e8f0", es = `
|
|
3207
3235
|
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3208
3236
|
<circle cx="14" cy="14" r="14" fill="rgba(0,0,0,0.35)"/>
|
|
3209
3237
|
<polygon points="11,8 22,14 11,20" fill="rgba(255,255,255,0.9)"/>
|
|
3210
|
-
</svg>`,
|
|
3238
|
+
</svg>`, ft = `
|
|
3211
3239
|
<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">
|
|
3212
3240
|
<polygon points="11,5 6,9 2,9 2,15 6,15 11,19"/>
|
|
3213
3241
|
<line x1="23" y1="9" x2="17" y2="15"/>
|
|
3214
3242
|
<line x1="17" y1="9" x2="23" y2="15"/>
|
|
3215
|
-
</svg>`,
|
|
3243
|
+
</svg>`, ts = `
|
|
3216
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">
|
|
3217
3245
|
<polygon points="11,5 6,9 2,9 2,15 6,15 11,19"/>
|
|
3218
3246
|
<path d="M19.07 4.93a10 10 0 0 1 0 14.14"/>
|
|
3219
3247
|
<path d="M15.54 8.46a5 5 0 0 1 0 7.07"/>
|
|
3220
|
-
</svg>`,
|
|
3248
|
+
</svg>`, is = `
|
|
3221
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">
|
|
3222
3250
|
<polyline points="15,3 21,3 21,9"/><line x1="21" y1="3" x2="14" y2="10"/>
|
|
3223
3251
|
<polyline points="9,21 3,21 3,15"/><line x1="3" y1="21" x2="10" y2="14"/>
|
|
@@ -3233,10 +3261,10 @@ const Vi = 180, Wi = 120, Xi = "#e2e8f0", Yi = `
|
|
|
3233
3261
|
Object.assign(o.style, {
|
|
3234
3262
|
position: "relative",
|
|
3235
3263
|
display: "inline-block",
|
|
3236
|
-
width: `${
|
|
3237
|
-
height: `${
|
|
3264
|
+
width: `${Ji}px`,
|
|
3265
|
+
height: `${Zi}px`,
|
|
3238
3266
|
borderRadius: "8px",
|
|
3239
|
-
border: `1px solid ${
|
|
3267
|
+
border: `1px solid ${Qi}`,
|
|
3240
3268
|
boxShadow: "0 2px 8px rgba(0,0,0,0.1)",
|
|
3241
3269
|
overflow: "hidden",
|
|
3242
3270
|
cursor: "pointer",
|
|
@@ -3266,7 +3294,7 @@ const Vi = 180, Wi = 120, Xi = "#e2e8f0", Yi = `
|
|
|
3266
3294
|
transition: "opacity 0.25s ease",
|
|
3267
3295
|
opacity: "1",
|
|
3268
3296
|
pointerEvents: "none"
|
|
3269
|
-
}), a.innerHTML =
|
|
3297
|
+
}), a.innerHTML = es, o.appendChild(a);
|
|
3270
3298
|
const l = document.createElement("div");
|
|
3271
3299
|
Object.assign(l.style, {
|
|
3272
3300
|
position: "absolute",
|
|
@@ -3281,7 +3309,7 @@ const Vi = 180, Wi = 120, Xi = "#e2e8f0", Yi = `
|
|
|
3281
3309
|
justifyContent: "center",
|
|
3282
3310
|
pointerEvents: "none",
|
|
3283
3311
|
transition: "opacity 0.2s ease"
|
|
3284
|
-
}), l.innerHTML =
|
|
3312
|
+
}), l.innerHTML = ft, o.appendChild(l);
|
|
3285
3313
|
const d = document.createElement("div");
|
|
3286
3314
|
Object.assign(d.style, {
|
|
3287
3315
|
position: "absolute",
|
|
@@ -3297,7 +3325,7 @@ const Vi = 180, Wi = 120, Xi = "#e2e8f0", Yi = `
|
|
|
3297
3325
|
cursor: "pointer",
|
|
3298
3326
|
pointerEvents: "auto",
|
|
3299
3327
|
transition: "opacity 0.2s ease, background 0.15s ease"
|
|
3300
|
-
}), d.innerHTML =
|
|
3328
|
+
}), d.innerHTML = is, d.title = "Fullscreen", d.addEventListener("mouseenter", () => {
|
|
3301
3329
|
d.style.background = "rgba(0,0,0,0.7)";
|
|
3302
3330
|
}), d.addEventListener("mouseleave", () => {
|
|
3303
3331
|
d.style.background = "rgba(0,0,0,0.45)";
|
|
@@ -3308,7 +3336,7 @@ const Vi = 180, Wi = 120, Xi = "#e2e8f0", Yi = `
|
|
|
3308
3336
|
a.style.opacity = i ? "0" : "1";
|
|
3309
3337
|
}
|
|
3310
3338
|
function h() {
|
|
3311
|
-
l.style.display = i ? "flex" : "none", l.innerHTML = s ?
|
|
3339
|
+
l.style.display = i ? "flex" : "none", l.innerHTML = s ? ft : ts, d.style.display = i ? "flex" : "none";
|
|
3312
3340
|
}
|
|
3313
3341
|
return o.addEventListener("click", (p) => {
|
|
3314
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(() => {
|
|
@@ -3387,7 +3415,7 @@ const Vi = 180, Wi = 120, Xi = "#e2e8f0", Yi = `
|
|
|
3387
3415
|
};
|
|
3388
3416
|
S.fullscreenOverlay = null, S.fullscreenKeyHandler = null;
|
|
3389
3417
|
let Ce = S;
|
|
3390
|
-
const
|
|
3418
|
+
const mt = 60, ss = `
|
|
3391
3419
|
.vr-overlay {
|
|
3392
3420
|
display: flex;
|
|
3393
3421
|
flex-direction: column;
|
|
@@ -3494,14 +3522,14 @@ const ut = 60, Ji = `
|
|
|
3494
3522
|
color: #0f172a;
|
|
3495
3523
|
}
|
|
3496
3524
|
`;
|
|
3497
|
-
function
|
|
3525
|
+
function gt(n) {
|
|
3498
3526
|
return n.toString().padStart(2, "0");
|
|
3499
3527
|
}
|
|
3500
|
-
function
|
|
3528
|
+
function ns(n) {
|
|
3501
3529
|
const e = Math.floor(n / 60), t = n % 60;
|
|
3502
|
-
return `${
|
|
3530
|
+
return `${gt(e)}:${gt(t)}`;
|
|
3503
3531
|
}
|
|
3504
|
-
function
|
|
3532
|
+
function os() {
|
|
3505
3533
|
const n = [
|
|
3506
3534
|
"video/webm;codecs=vp9,opus",
|
|
3507
3535
|
"video/webm;codecs=vp8,opus",
|
|
@@ -3512,7 +3540,7 @@ function Qi() {
|
|
|
3512
3540
|
if (MediaRecorder.isTypeSupported(e)) return e;
|
|
3513
3541
|
return "";
|
|
3514
3542
|
}
|
|
3515
|
-
function
|
|
3543
|
+
function rs(n) {
|
|
3516
3544
|
return new Promise((e, t) => {
|
|
3517
3545
|
const i = URL.createObjectURL(n), s = document.createElement("video");
|
|
3518
3546
|
s.muted = !0, s.playsInline = !0, s.preload = "auto", s.src = i, s.addEventListener("loadeddata", () => {
|
|
@@ -3531,7 +3559,7 @@ function es(n) {
|
|
|
3531
3559
|
}), s.load();
|
|
3532
3560
|
});
|
|
3533
3561
|
}
|
|
3534
|
-
class
|
|
3562
|
+
class De {
|
|
3535
3563
|
constructor() {
|
|
3536
3564
|
this.recording = !1, this.container = null, this.stream = null, this.mediaRecorder = null, this.chunks = [], this.timerInterval = null, this.elapsed = 0, this.resolvePromise = null, this.root = null, this.styleEl = null, this.videoEl = null, this.timerEl = null;
|
|
3537
3565
|
}
|
|
@@ -3548,7 +3576,7 @@ class Ue {
|
|
|
3548
3576
|
}
|
|
3549
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(() => {
|
|
3550
3578
|
}));
|
|
3551
|
-
const i =
|
|
3579
|
+
const i = os(), s = {};
|
|
3552
3580
|
i && (s.mimeType = i);
|
|
3553
3581
|
const o = new MediaRecorder(t, s);
|
|
3554
3582
|
return this.mediaRecorder = o, o.ondataavailable = (r) => {
|
|
@@ -3556,7 +3584,7 @@ class Ue {
|
|
|
3556
3584
|
}, o.onstop = () => {
|
|
3557
3585
|
this.handleRecordingComplete();
|
|
3558
3586
|
}, o.start(), this.timerInterval = setInterval(() => {
|
|
3559
|
-
this.elapsed++, this.updateTimer(), this.elapsed >=
|
|
3587
|
+
this.elapsed++, this.updateTimer(), this.elapsed >= mt && this.stopRecording();
|
|
3560
3588
|
}, 1e3), new Promise((r) => {
|
|
3561
3589
|
this.resolvePromise = r;
|
|
3562
3590
|
});
|
|
@@ -3573,7 +3601,7 @@ class Ue {
|
|
|
3573
3601
|
}
|
|
3574
3602
|
// ── Private ──
|
|
3575
3603
|
buildUI(e) {
|
|
3576
|
-
this.styleEl = document.createElement("style"), this.styleEl.textContent =
|
|
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";
|
|
3577
3605
|
const t = document.createElement("div");
|
|
3578
3606
|
t.className = "vr-circle-wrapper";
|
|
3579
3607
|
const i = document.createElement("div");
|
|
@@ -3589,15 +3617,15 @@ class Ue {
|
|
|
3589
3617
|
}
|
|
3590
3618
|
updateTimer() {
|
|
3591
3619
|
if (!this.timerEl) return;
|
|
3592
|
-
const e =
|
|
3593
|
-
this.timerEl.textContent =
|
|
3620
|
+
const e = mt - this.elapsed;
|
|
3621
|
+
this.timerEl.textContent = ns(this.elapsed), e <= 10 ? this.timerEl.classList.add("vr-countdown") : this.timerEl.classList.remove("vr-countdown");
|
|
3594
3622
|
}
|
|
3595
3623
|
async handleRecordingComplete() {
|
|
3596
3624
|
var s, o;
|
|
3597
3625
|
const e = ((s = this.mediaRecorder) == null ? void 0 : s.mimeType) || "video/webm", t = new Blob(this.chunks, { type: e });
|
|
3598
3626
|
let i;
|
|
3599
3627
|
try {
|
|
3600
|
-
i = await
|
|
3628
|
+
i = await rs(t);
|
|
3601
3629
|
} catch {
|
|
3602
3630
|
const r = document.createElement("canvas");
|
|
3603
3631
|
r.width = 1, r.height = 1, i = await new Promise((a) => {
|
|
@@ -3620,7 +3648,7 @@ class Ue {
|
|
|
3620
3648
|
this.videoEl && (this.videoEl.srcObject = null, this.videoEl = null), this.root && this.root.parentElement && this.root.parentElement.removeChild(this.root), this.root = null, this.styleEl && this.styleEl.parentElement && this.styleEl.parentElement.removeChild(this.styleEl), this.styleEl = null, this.chunks = [], this.elapsed = 0;
|
|
3621
3649
|
}
|
|
3622
3650
|
}
|
|
3623
|
-
const
|
|
3651
|
+
const vt = {
|
|
3624
3652
|
position: "absolute",
|
|
3625
3653
|
top: "50%",
|
|
3626
3654
|
transform: "translateY(-50%)",
|
|
@@ -3701,7 +3729,7 @@ const mt = {
|
|
|
3701
3729
|
transition: "opacity 150ms ease"
|
|
3702
3730
|
}), a.addEventListener("click", (d) => d.stopPropagation()), o.appendChild(a), f.imgEl = a, s) {
|
|
3703
3731
|
const d = document.createElement("button");
|
|
3704
|
-
d.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="15,18 9,12 15,6"/></svg>', Object.assign(d.style, { ...
|
|
3732
|
+
d.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="15,18 9,12 15,6"/></svg>', Object.assign(d.style, { ...vt, left: "16px" }), d.addEventListener("mouseenter", () => {
|
|
3705
3733
|
d.style.background = "rgba(255,255,255,0.3)";
|
|
3706
3734
|
}), d.addEventListener("mouseleave", () => {
|
|
3707
3735
|
d.style.background = "rgba(255,255,255,0.15)";
|
|
@@ -3709,7 +3737,7 @@ const mt = {
|
|
|
3709
3737
|
p.stopPropagation(), f.navigate(-1);
|
|
3710
3738
|
}), o.appendChild(d), f.prevBtn = d;
|
|
3711
3739
|
const c = document.createElement("button");
|
|
3712
|
-
c.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="9,18 15,12 9,6"/></svg>', Object.assign(c.style, { ...
|
|
3740
|
+
c.innerHTML = '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="9,18 15,12 9,6"/></svg>', Object.assign(c.style, { ...vt, right: "16px" }), c.addEventListener("mouseenter", () => {
|
|
3713
3741
|
c.style.background = "rgba(255,255,255,0.3)";
|
|
3714
3742
|
}), c.addEventListener("mouseleave", () => {
|
|
3715
3743
|
c.style.background = "rgba(255,255,255,0.15)";
|
|
@@ -3849,7 +3877,7 @@ class re {
|
|
|
3849
3877
|
this.input.remove();
|
|
3850
3878
|
}
|
|
3851
3879
|
}
|
|
3852
|
-
const
|
|
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="
|
|
3853
3881
|
border:none;background:none;cursor:pointer;color:#94a3b8;padding:4px;
|
|
3854
3882
|
border-radius:6px;display:flex;align-items:center;justify-content:center;
|
|
3855
3883
|
transition:all 0.15s;flex-shrink:0;
|
|
@@ -3857,7 +3885,7 @@ const ts = ["👍", "👎", "❤️", "🎉", "👀", "🚀"], xe = "-apple-syst
|
|
|
3857
3885
|
onmouseout="this.style.background='none';this.style.color='#94a3b8'">
|
|
3858
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>
|
|
3859
3887
|
</button>`;
|
|
3860
|
-
class
|
|
3888
|
+
class ds {
|
|
3861
3889
|
constructor(e, t = {}) {
|
|
3862
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 = () => {
|
|
3863
3891
|
this.repositionDebounce || (this.repositionDebounce = setTimeout(() => {
|
|
@@ -3997,7 +4025,7 @@ class ns {
|
|
|
3997
4025
|
}), this.form.innerHTML = `
|
|
3998
4026
|
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;">
|
|
3999
4027
|
<span style="font-size:13px;font-weight:600;color:#0f172a;">Add a comment here</span>
|
|
4000
|
-
${
|
|
4028
|
+
${bt}
|
|
4001
4029
|
</div>
|
|
4002
4030
|
<textarea
|
|
4003
4031
|
placeholder="Write a comment..."
|
|
@@ -4069,7 +4097,7 @@ class ns {
|
|
|
4069
4097
|
}
|
|
4070
4098
|
}), this.form.querySelector(".attach-mic").addEventListener("click", async () => {
|
|
4071
4099
|
if (this.pendingAttachmentIds.length >= m) return;
|
|
4072
|
-
this.audioRecorder || (this.audioRecorder = new
|
|
4100
|
+
this.audioRecorder || (this.audioRecorder = new Ue());
|
|
4073
4101
|
const g = await this.audioRecorder.startRecording(h);
|
|
4074
4102
|
if (g) {
|
|
4075
4103
|
const y = await this.upload.uploadBlob(g, "audio.webm");
|
|
@@ -4081,7 +4109,7 @@ class ns {
|
|
|
4081
4109
|
}
|
|
4082
4110
|
}), this.form.querySelector(".attach-video").addEventListener("click", async () => {
|
|
4083
4111
|
if (this.pendingAttachmentIds.length >= m) return;
|
|
4084
|
-
this.videoRecorder || (this.videoRecorder = new
|
|
4112
|
+
this.videoRecorder || (this.videoRecorder = new De());
|
|
4085
4113
|
const g = await this.videoRecorder.startRecording(h);
|
|
4086
4114
|
if (g) {
|
|
4087
4115
|
const y = await this.upload.uploadBlob(g.blob, "video.webm");
|
|
@@ -4133,7 +4161,7 @@ class ns {
|
|
|
4133
4161
|
flexShrink: "0"
|
|
4134
4162
|
}), l.innerHTML = `
|
|
4135
4163
|
<span style="font-size:13px;font-weight:700;color:#0f172a;">Thread</span>
|
|
4136
|
-
${
|
|
4164
|
+
${bt}
|
|
4137
4165
|
`, l.querySelector(".pulse-close-btn").addEventListener("click", () => {
|
|
4138
4166
|
this.closePopover();
|
|
4139
4167
|
}), this.popover.appendChild(l), this.refreshPopoverComments(e), this.addPopoverReplyForm(e), document.body.appendChild(this.popover);
|
|
@@ -4161,7 +4189,7 @@ class ns {
|
|
|
4161
4189
|
}
|
|
4162
4190
|
const i = (d = this.client.state.user) == null ? void 0 : d.id;
|
|
4163
4191
|
t.innerHTML = e.comments.map((c) => {
|
|
4164
|
-
const h = this.client.state.getUser(c.userId), p = h ? h.name.split(" ").map((
|
|
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>' : "";
|
|
4165
4193
|
if (this.editingPopoverCommentId === c.id)
|
|
4166
4194
|
return `
|
|
4167
4195
|
<div style="margin-bottom:10px;" data-comment-id="${c.id}">
|
|
@@ -4181,22 +4209,22 @@ class ns {
|
|
|
4181
4209
|
const E = c.body && c.body !== "(attachment)" ? c.body.replace(
|
|
4182
4210
|
/@(\w+)/g,
|
|
4183
4211
|
'<span style="color:#6366f1;font-weight:600;background:#eef2ff;padding:0 3px;border-radius:3px;">@$1</span>'
|
|
4184
|
-
) : "", I = (c.attachments ?? []).map((
|
|
4185
|
-
if (
|
|
4186
|
-
const
|
|
4187
|
-
return `<div class="popover-attachment-img" data-full-url="${this.escapeHtml(
|
|
4188
|
-
<img src="${this.escapeHtml(
|
|
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;" />
|
|
4189
4217
|
</div>`;
|
|
4190
4218
|
}
|
|
4191
|
-
return
|
|
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>` : "";
|
|
4192
4220
|
}).join(""), z = b ? `<div class="popover-comment-actions" style="display:flex;gap:2px;margin-top:2px;margin-left:29px;">
|
|
4193
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"
|
|
4194
4222
|
onmouseover="this.style.color='#6366f1';this.style.background='#eef2ff'"
|
|
4195
|
-
onmouseout="this.style.color='#94a3b8';this.style.background='none'">${
|
|
4223
|
+
onmouseout="this.style.color='#94a3b8';this.style.background='none'">${ls}</button>
|
|
4196
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"
|
|
4197
4225
|
onmouseover="this.style.color='#ef4444';this.style.background='#fef2f2'"
|
|
4198
|
-
onmouseout="this.style.color='#94a3b8';this.style.background='none'">${
|
|
4199
|
-
</div>` : "",
|
|
4226
|
+
onmouseout="this.style.color='#94a3b8';this.style.background='none'">${cs}</button>
|
|
4227
|
+
</div>` : "", Rt = this.buildReactionPillsHtml(c.id);
|
|
4200
4228
|
return `
|
|
4201
4229
|
<div class="popover-comment" style="margin-bottom:10px;" data-comment-id="${c.id}">
|
|
4202
4230
|
<div style="display:flex;align-items:center;gap:7px;margin-bottom:2px;">
|
|
@@ -4208,7 +4236,7 @@ class ns {
|
|
|
4208
4236
|
${E ? `<div style="font-size:13px;color:#334155;line-height:1.45;margin-left:29px;word-wrap:break-word;">${E}</div>` : ""}
|
|
4209
4237
|
${I}
|
|
4210
4238
|
${z}
|
|
4211
|
-
${
|
|
4239
|
+
${Rt}
|
|
4212
4240
|
</div>
|
|
4213
4241
|
`;
|
|
4214
4242
|
}).join(""), t.querySelectorAll(".edit-btn").forEach((c) => {
|
|
@@ -4256,7 +4284,7 @@ class ns {
|
|
|
4256
4284
|
}), t.querySelectorAll(".popover-attachment-audio").forEach((c) => {
|
|
4257
4285
|
const h = c.dataset.url;
|
|
4258
4286
|
if (h) {
|
|
4259
|
-
const p = c.dataset.duration ? parseInt(c.dataset.duration) : void 0, m =
|
|
4287
|
+
const p = c.dataset.duration ? parseInt(c.dataset.duration) : void 0, m = ze.render(h, p);
|
|
4260
4288
|
c.appendChild(m);
|
|
4261
4289
|
}
|
|
4262
4290
|
}), t.querySelectorAll(".popover-attachment-video").forEach((c) => {
|
|
@@ -4331,7 +4359,7 @@ class ns {
|
|
|
4331
4359
|
l.push(g.id), d(g.id, "📎 Image");
|
|
4332
4360
|
}), t.querySelector(".reply-attach-mic").addEventListener("click", async () => {
|
|
4333
4361
|
if (l.length >= c) return;
|
|
4334
|
-
this.audioRecorder || (this.audioRecorder = new
|
|
4362
|
+
this.audioRecorder || (this.audioRecorder = new Ue());
|
|
4335
4363
|
const p = await this.audioRecorder.startRecording(t);
|
|
4336
4364
|
if (p) {
|
|
4337
4365
|
const m = await this.upload.uploadBlob(p, "audio.webm");
|
|
@@ -4339,7 +4367,7 @@ class ns {
|
|
|
4339
4367
|
}
|
|
4340
4368
|
}), t.querySelector(".reply-attach-video").addEventListener("click", async () => {
|
|
4341
4369
|
if (l.length >= c) return;
|
|
4342
|
-
this.videoRecorder || (this.videoRecorder = new
|
|
4370
|
+
this.videoRecorder || (this.videoRecorder = new De());
|
|
4343
4371
|
const p = await this.videoRecorder.startRecording(t);
|
|
4344
4372
|
if (p) {
|
|
4345
4373
|
const m = await this.upload.uploadBlob(p.blob, "video.webm");
|
|
@@ -4381,7 +4409,7 @@ class ns {
|
|
|
4381
4409
|
zIndex: "10002",
|
|
4382
4410
|
fontFamily: xe
|
|
4383
4411
|
});
|
|
4384
|
-
for (const s of
|
|
4412
|
+
for (const s of as) {
|
|
4385
4413
|
const o = document.createElement("button");
|
|
4386
4414
|
Object.assign(o.style, {
|
|
4387
4415
|
border: "none",
|
|
@@ -4516,13 +4544,13 @@ class ns {
|
|
|
4516
4544
|
});
|
|
4517
4545
|
}
|
|
4518
4546
|
}
|
|
4519
|
-
var
|
|
4520
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
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--)
|
|
4521
4549
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
4522
|
-
return i && s &&
|
|
4550
|
+
return i && s && hs(e, t, s), s;
|
|
4523
4551
|
};
|
|
4524
|
-
const
|
|
4525
|
-
let
|
|
4552
|
+
const us = ["👍", "👎", "❤️", "🎉", "👀", "🚀"];
|
|
4553
|
+
let _ = class extends P {
|
|
4526
4554
|
constructor() {
|
|
4527
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 = [];
|
|
4528
4556
|
}
|
|
@@ -4546,7 +4574,7 @@ let P = class extends A {
|
|
|
4546
4574
|
const s = i.dataset.url;
|
|
4547
4575
|
if (s) {
|
|
4548
4576
|
const o = i.dataset.duration ? parseInt(i.dataset.duration) : void 0;
|
|
4549
|
-
i.appendChild(
|
|
4577
|
+
i.appendChild(ze.render(s, o));
|
|
4550
4578
|
}
|
|
4551
4579
|
}), (t = this.shadowRoot) == null || t.querySelectorAll(".video-player-host").forEach((i) => {
|
|
4552
4580
|
if (i.children.length > 0) return;
|
|
@@ -4637,15 +4665,15 @@ let P = class extends A {
|
|
|
4637
4665
|
}
|
|
4638
4666
|
async handleAttachImage() {
|
|
4639
4667
|
this.upload || (this.upload = new re(this.client));
|
|
4640
|
-
const n =
|
|
4668
|
+
const n = _.MAX_ATTACHMENTS - this.replyAttachmentIds.length;
|
|
4641
4669
|
if (n <= 0) return;
|
|
4642
4670
|
const e = await this.upload.pickFiles("image/*", n);
|
|
4643
4671
|
e.length > 0 && (this.replyAttachmentIds.push(...e.map((t) => t.id)), this.requestUpdate());
|
|
4644
4672
|
}
|
|
4645
4673
|
async handleRecordAudio(n) {
|
|
4646
4674
|
var i;
|
|
4647
|
-
if (this.replyAttachmentIds.length >=
|
|
4648
|
-
this.upload || (this.upload = new re(this.client)), this.audioRecorder || (this.audioRecorder = new
|
|
4675
|
+
if (this.replyAttachmentIds.length >= _.MAX_ATTACHMENTS) return;
|
|
4676
|
+
this.upload || (this.upload = new re(this.client)), this.audioRecorder || (this.audioRecorder = new Ue());
|
|
4649
4677
|
const e = (i = this.shadowRoot) == null ? void 0 : i.querySelector(`[data-thread-id="${n}"]`), t = await this.audioRecorder.startRecording(e ?? document.body);
|
|
4650
4678
|
if (t) {
|
|
4651
4679
|
const s = await this.upload.uploadBlob(t, "audio.webm");
|
|
@@ -4654,8 +4682,8 @@ let P = class extends A {
|
|
|
4654
4682
|
}
|
|
4655
4683
|
async handleRecordVideo(n) {
|
|
4656
4684
|
var i;
|
|
4657
|
-
if (this.replyAttachmentIds.length >=
|
|
4658
|
-
this.upload || (this.upload = new re(this.client)), this.videoRecorder || (this.videoRecorder = new
|
|
4685
|
+
if (this.replyAttachmentIds.length >= _.MAX_ATTACHMENTS) return;
|
|
4686
|
+
this.upload || (this.upload = new re(this.client)), this.videoRecorder || (this.videoRecorder = new De());
|
|
4659
4687
|
const e = (i = this.shadowRoot) == null ? void 0 : i.querySelector(`[data-thread-id="${n}"]`), t = await this.videoRecorder.startRecording(e ?? document.body);
|
|
4660
4688
|
if (t) {
|
|
4661
4689
|
const s = await this.upload.uploadBlob(t.blob, "video.webm");
|
|
@@ -4739,7 +4767,7 @@ let P = class extends A {
|
|
|
4739
4767
|
+
|
|
4740
4768
|
${this.pickerOpenForComment === n.id ? u`
|
|
4741
4769
|
<div class="emoji-picker">
|
|
4742
|
-
${
|
|
4770
|
+
${us.map(
|
|
4743
4771
|
(o) => u`
|
|
4744
4772
|
<button @click=${(r) => {
|
|
4745
4773
|
r.stopPropagation(), this.toggleReaction(n.id, o);
|
|
@@ -4775,7 +4803,7 @@ let P = class extends A {
|
|
|
4775
4803
|
<span class="thread-count">${this.threads.length}</span>
|
|
4776
4804
|
</span>
|
|
4777
4805
|
<button class="close-btn" @click=${this.fireClose} title="Close">
|
|
4778
|
-
${
|
|
4806
|
+
${T(ve, 16)}
|
|
4779
4807
|
</button>
|
|
4780
4808
|
</div>
|
|
4781
4809
|
|
|
@@ -4823,7 +4851,7 @@ let P = class extends A {
|
|
|
4823
4851
|
`;
|
|
4824
4852
|
}
|
|
4825
4853
|
renderAudioPlayer(n) {
|
|
4826
|
-
const e = document.createElement("div"), t =
|
|
4854
|
+
const e = document.createElement("div"), t = ze.render(n.url, n.durationMs);
|
|
4827
4855
|
return e.appendChild(t), u`<div class="audio-player-host" data-url=${n.url} data-duration=${n.durationMs ?? ""}></div>`;
|
|
4828
4856
|
}
|
|
4829
4857
|
renderVideoPlayer(n) {
|
|
@@ -4837,7 +4865,7 @@ let P = class extends A {
|
|
|
4837
4865
|
data-thread-id=${n.id}
|
|
4838
4866
|
>
|
|
4839
4867
|
${n.position ? u`<div class="pin-badge">
|
|
4840
|
-
${
|
|
4868
|
+
${T(Mt, 12)}
|
|
4841
4869
|
Pinned
|
|
4842
4870
|
</div>` : v}
|
|
4843
4871
|
${n.comments.map((t, i) => {
|
|
@@ -4861,8 +4889,8 @@ let P = class extends A {
|
|
|
4861
4889
|
${this.renderAttachments(t.attachments ?? [])}
|
|
4862
4890
|
`}
|
|
4863
4891
|
${o && !r ? u`<div class="comment-actions">
|
|
4864
|
-
<button @click=${() => this.startEdit(t)} title="Edit">${
|
|
4865
|
-
<button class="danger" @click=${() => this.deleteComment(t.id)} title="Delete">${
|
|
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>
|
|
4866
4894
|
</div>` : v}
|
|
4867
4895
|
${this.renderReactions(t)}
|
|
4868
4896
|
</div>
|
|
@@ -4903,19 +4931,19 @@ let P = class extends A {
|
|
|
4903
4931
|
class="reply-media-btn"
|
|
4904
4932
|
title="Attach image"
|
|
4905
4933
|
@click=${() => this.handleAttachImage()}
|
|
4906
|
-
>${
|
|
4934
|
+
>${T(zi, 16)}</button>
|
|
4907
4935
|
<button
|
|
4908
4936
|
type="button"
|
|
4909
4937
|
class="reply-media-btn"
|
|
4910
4938
|
title="Record audio"
|
|
4911
4939
|
@click=${() => this.handleRecordAudio(n.id)}
|
|
4912
|
-
>${
|
|
4940
|
+
>${T(ji, 16)}</button>
|
|
4913
4941
|
<button
|
|
4914
4942
|
type="button"
|
|
4915
4943
|
class="reply-media-btn"
|
|
4916
4944
|
title="Record video"
|
|
4917
4945
|
@click=${() => this.handleRecordVideo(n.id)}
|
|
4918
|
-
>${
|
|
4946
|
+
>${T(Bi, 16)}</button>
|
|
4919
4947
|
<div class="reply-preview">
|
|
4920
4948
|
${this.replyAttachmentIds.map(
|
|
4921
4949
|
(t, i) => u`<span class="reply-preview-badge">
|
|
@@ -4935,11 +4963,11 @@ let P = class extends A {
|
|
|
4935
4963
|
`;
|
|
4936
4964
|
}
|
|
4937
4965
|
};
|
|
4938
|
-
|
|
4966
|
+
_.styles = [
|
|
4939
4967
|
ie,
|
|
4940
4968
|
be,
|
|
4941
4969
|
Pe,
|
|
4942
|
-
|
|
4970
|
+
O`
|
|
4943
4971
|
:host {
|
|
4944
4972
|
display: block;
|
|
4945
4973
|
}
|
|
@@ -5479,56 +5507,56 @@ P.styles = [
|
|
|
5479
5507
|
}
|
|
5480
5508
|
`
|
|
5481
5509
|
];
|
|
5482
|
-
|
|
5510
|
+
_.MAX_ATTACHMENTS = 5;
|
|
5483
5511
|
U([
|
|
5484
5512
|
x({ attribute: !1 })
|
|
5485
|
-
],
|
|
5513
|
+
], _.prototype, "client", 2);
|
|
5486
5514
|
U([
|
|
5487
5515
|
x()
|
|
5488
|
-
],
|
|
5516
|
+
], _.prototype, "highlightThreadId", 2);
|
|
5489
5517
|
U([
|
|
5490
5518
|
$()
|
|
5491
|
-
],
|
|
5519
|
+
], _.prototype, "threadsVersion", 2);
|
|
5492
5520
|
U([
|
|
5493
5521
|
$()
|
|
5494
|
-
],
|
|
5522
|
+
], _.prototype, "replyingTo", 2);
|
|
5495
5523
|
U([
|
|
5496
5524
|
$()
|
|
5497
|
-
],
|
|
5525
|
+
], _.prototype, "editingCommentId", 2);
|
|
5498
5526
|
U([
|
|
5499
5527
|
$()
|
|
5500
|
-
],
|
|
5528
|
+
], _.prototype, "editBody", 2);
|
|
5501
5529
|
U([
|
|
5502
5530
|
$()
|
|
5503
|
-
],
|
|
5531
|
+
], _.prototype, "pickerOpenForComment", 2);
|
|
5504
5532
|
U([
|
|
5505
5533
|
$()
|
|
5506
|
-
],
|
|
5534
|
+
], _.prototype, "typingByThread", 2);
|
|
5507
5535
|
U([
|
|
5508
5536
|
$()
|
|
5509
|
-
],
|
|
5510
|
-
|
|
5537
|
+
], _.prototype, "reactionsVersion", 2);
|
|
5538
|
+
_ = U([
|
|
5511
5539
|
L("pulse-widget-comments-panel")
|
|
5512
|
-
],
|
|
5513
|
-
var
|
|
5514
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
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--)
|
|
5515
5543
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
5516
|
-
return i && s &&
|
|
5544
|
+
return i && s && fs(e, t, s), s;
|
|
5517
5545
|
};
|
|
5518
|
-
const
|
|
5546
|
+
const gs = {
|
|
5519
5547
|
"comment:created": "left a comment",
|
|
5520
5548
|
"comment:mention": "mentioned you",
|
|
5521
5549
|
"comment:reply": "replied to your comment",
|
|
5522
5550
|
"thread:resolved": "resolved a thread",
|
|
5523
5551
|
"reaction:added": "reacted to your comment"
|
|
5524
|
-
},
|
|
5552
|
+
}, vs = {
|
|
5525
5553
|
"comment:created": "💬",
|
|
5526
5554
|
"comment:mention": "📣",
|
|
5527
5555
|
"comment:reply": "↩️",
|
|
5528
5556
|
"thread:resolved": "✅",
|
|
5529
5557
|
"reaction:added": "🎉"
|
|
5530
5558
|
};
|
|
5531
|
-
let pe = class extends
|
|
5559
|
+
let pe = class extends P {
|
|
5532
5560
|
constructor() {
|
|
5533
5561
|
super(...arguments), this.notifications = [];
|
|
5534
5562
|
}
|
|
@@ -5584,7 +5612,7 @@ let pe = class extends A {
|
|
|
5584
5612
|
Mark all read
|
|
5585
5613
|
</button>` : v}
|
|
5586
5614
|
<button class="close-btn" @click=${this.fireClose} title="Close">
|
|
5587
|
-
${
|
|
5615
|
+
${T(ve, 16)}
|
|
5588
5616
|
</button>
|
|
5589
5617
|
</div>
|
|
5590
5618
|
</div>
|
|
@@ -5599,11 +5627,11 @@ let pe = class extends A {
|
|
|
5599
5627
|
class="item ${e.read ? "" : "unread"}"
|
|
5600
5628
|
@click=${() => this.handleClick(e)}
|
|
5601
5629
|
>
|
|
5602
|
-
<span class="icon">${
|
|
5630
|
+
<span class="icon">${vs[e.type] ?? "🔔"}</span>
|
|
5603
5631
|
<div class="content">
|
|
5604
5632
|
<div class="text">
|
|
5605
5633
|
<span class="actor">${this.getActorName(e.actorId)}</span>
|
|
5606
|
-
${
|
|
5634
|
+
${gs[e.type] ?? e.type}
|
|
5607
5635
|
</div>
|
|
5608
5636
|
<div class="time">${this.formatTime(e.createdAt)}</div>
|
|
5609
5637
|
</div>
|
|
@@ -5620,7 +5648,7 @@ pe.styles = [
|
|
|
5620
5648
|
ie,
|
|
5621
5649
|
be,
|
|
5622
5650
|
Pe,
|
|
5623
|
-
|
|
5651
|
+
O`
|
|
5624
5652
|
:host {
|
|
5625
5653
|
display: block;
|
|
5626
5654
|
}
|
|
@@ -5813,17 +5841,17 @@ pe.styles = [
|
|
|
5813
5841
|
}
|
|
5814
5842
|
`
|
|
5815
5843
|
];
|
|
5816
|
-
|
|
5844
|
+
Ye([
|
|
5817
5845
|
x({ attribute: !1 })
|
|
5818
5846
|
], pe.prototype, "client", 2);
|
|
5819
|
-
|
|
5847
|
+
Ye([
|
|
5820
5848
|
$()
|
|
5821
5849
|
], pe.prototype, "notifications", 2);
|
|
5822
|
-
pe =
|
|
5850
|
+
pe = Ye([
|
|
5823
5851
|
L("pulse-widget-notifications-panel")
|
|
5824
5852
|
], pe);
|
|
5825
|
-
const
|
|
5826
|
-
class
|
|
5853
|
+
const bs = 3e3;
|
|
5854
|
+
class xs {
|
|
5827
5855
|
constructor(e) {
|
|
5828
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) => {
|
|
5829
5857
|
t.pointerType !== "touch" && this.client.moveCursor({
|
|
@@ -5875,7 +5903,7 @@ class us {
|
|
|
5875
5903
|
), this.setSending(!0), this.staleTimer = setInterval(() => {
|
|
5876
5904
|
const e = Date.now();
|
|
5877
5905
|
for (const [t, i] of this.cursorLastSeen)
|
|
5878
|
-
if (e - i >
|
|
5906
|
+
if (e - i > bs) {
|
|
5879
5907
|
this.cursors.delete(t);
|
|
5880
5908
|
const s = this.cursorEls.get(t);
|
|
5881
5909
|
s && s.remove(), this.cursorEls.delete(t), this.cursorLastSeen.delete(t);
|
|
@@ -5971,7 +5999,7 @@ class us {
|
|
|
5971
5999
|
i.style.transform = `translate(${t.position.x}px, ${t.position.y}px)`;
|
|
5972
6000
|
}
|
|
5973
6001
|
}
|
|
5974
|
-
class
|
|
6002
|
+
class ys {
|
|
5975
6003
|
constructor(e) {
|
|
5976
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) => {
|
|
5977
6005
|
var a, l, d;
|
|
@@ -6054,9 +6082,9 @@ class fs {
|
|
|
6054
6082
|
this.fadeTimers.set(e, t);
|
|
6055
6083
|
}
|
|
6056
6084
|
}
|
|
6057
|
-
function
|
|
6085
|
+
function ws(n) {
|
|
6058
6086
|
if (!n.rangeCount || n.isCollapsed) return null;
|
|
6059
|
-
const e = n.getRangeAt(0), t = e.startContainer, i = e.endContainer, s =
|
|
6087
|
+
const e = n.getRangeAt(0), t = e.startContainer, i = e.endContainer, s = xt(t), o = xt(i);
|
|
6060
6088
|
return !s || !o ? null : {
|
|
6061
6089
|
startSelector: s,
|
|
6062
6090
|
startOffset: e.startOffset,
|
|
@@ -6064,10 +6092,10 @@ function ms(n) {
|
|
|
6064
6092
|
endOffset: e.endOffset
|
|
6065
6093
|
};
|
|
6066
6094
|
}
|
|
6067
|
-
function
|
|
6095
|
+
function $s(n) {
|
|
6068
6096
|
var e, t;
|
|
6069
6097
|
try {
|
|
6070
|
-
const i =
|
|
6098
|
+
const i = wt(n.startSelector), s = wt(n.endSelector);
|
|
6071
6099
|
if (!i || !s) return null;
|
|
6072
6100
|
const o = document.createRange(), r = i.nodeType === Node.TEXT_NODE ? ((e = i.textContent) == null ? void 0 : e.length) ?? 0 : i.childNodes.length, a = s.nodeType === Node.TEXT_NODE ? ((t = s.textContent) == null ? void 0 : t.length) ?? 0 : s.childNodes.length;
|
|
6073
6101
|
return o.setStart(i, Math.min(n.startOffset, r)), o.setEnd(s, Math.min(n.endOffset, a)), o;
|
|
@@ -6075,18 +6103,18 @@ function gs(n) {
|
|
|
6075
6103
|
return null;
|
|
6076
6104
|
}
|
|
6077
6105
|
}
|
|
6078
|
-
function
|
|
6106
|
+
function xt(n) {
|
|
6079
6107
|
if (n.nodeType === Node.TEXT_NODE) {
|
|
6080
6108
|
const e = n.parentElement;
|
|
6081
6109
|
if (!e) return null;
|
|
6082
|
-
const t =
|
|
6110
|
+
const t = yt(e);
|
|
6083
6111
|
if (!t) return null;
|
|
6084
6112
|
const i = Array.from(e.childNodes).indexOf(n);
|
|
6085
6113
|
return `${t}::text(${i})`;
|
|
6086
6114
|
}
|
|
6087
|
-
return n.nodeType === Node.ELEMENT_NODE ?
|
|
6115
|
+
return n.nodeType === Node.ELEMENT_NODE ? yt(n) : null;
|
|
6088
6116
|
}
|
|
6089
|
-
function
|
|
6117
|
+
function yt(n) {
|
|
6090
6118
|
if (!n || n === document.documentElement) return "html";
|
|
6091
6119
|
if (n === document.body) return "body";
|
|
6092
6120
|
if (n.id) return `#${CSS.escape(n.id)}`;
|
|
@@ -6112,7 +6140,7 @@ function bt(n) {
|
|
|
6112
6140
|
}
|
|
6113
6141
|
return e.length > 0 ? e.join(" > ") : null;
|
|
6114
6142
|
}
|
|
6115
|
-
function
|
|
6143
|
+
function wt(n) {
|
|
6116
6144
|
const e = n.match(/^(.+)::text\((\d+)\)$/);
|
|
6117
6145
|
if (e) {
|
|
6118
6146
|
const t = e[1], i = parseInt(e[2], 10);
|
|
@@ -6129,7 +6157,7 @@ function xt(n) {
|
|
|
6129
6157
|
return null;
|
|
6130
6158
|
}
|
|
6131
6159
|
}
|
|
6132
|
-
class
|
|
6160
|
+
class ks {
|
|
6133
6161
|
constructor(e) {
|
|
6134
6162
|
this.container = null, this.unsubs = [], this.enabled = !1, this.selectionEls = /* @__PURE__ */ new Map(), this.clearTimers = /* @__PURE__ */ new Map(), this.client = e;
|
|
6135
6163
|
}
|
|
@@ -6173,7 +6201,7 @@ class vs {
|
|
|
6173
6201
|
if (!this.container) return;
|
|
6174
6202
|
const i = (a = this.client.state.user) == null ? void 0 : a.id;
|
|
6175
6203
|
if (e === i || (this.clearSelection(e), !t)) return;
|
|
6176
|
-
const s =
|
|
6204
|
+
const s = $s(t);
|
|
6177
6205
|
if (!s) return;
|
|
6178
6206
|
const o = this.client.state.presence.find(
|
|
6179
6207
|
(l) => l.user.id === e
|
|
@@ -6212,12 +6240,12 @@ class vs {
|
|
|
6212
6240
|
}
|
|
6213
6241
|
}
|
|
6214
6242
|
}
|
|
6215
|
-
var
|
|
6216
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
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--)
|
|
6217
6245
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
6218
|
-
return i && s &&
|
|
6246
|
+
return i && s && Es(e, t, s), s;
|
|
6219
6247
|
};
|
|
6220
|
-
let ue = class extends
|
|
6248
|
+
let ue = class extends P {
|
|
6221
6249
|
constructor() {
|
|
6222
6250
|
super(...arguments), this.roomId = "";
|
|
6223
6251
|
}
|
|
@@ -6258,7 +6286,7 @@ let ue = class extends A {
|
|
|
6258
6286
|
<div class="panel-header">
|
|
6259
6287
|
<span class="panel-title">Settings</span>
|
|
6260
6288
|
<button class="close-btn" @click=${this.fireClose} title="Close">
|
|
6261
|
-
${
|
|
6289
|
+
${T(ve, 16)}
|
|
6262
6290
|
</button>
|
|
6263
6291
|
</div>
|
|
6264
6292
|
|
|
@@ -6307,7 +6335,7 @@ ue.styles = [
|
|
|
6307
6335
|
ie,
|
|
6308
6336
|
be,
|
|
6309
6337
|
Pe,
|
|
6310
|
-
|
|
6338
|
+
O`
|
|
6311
6339
|
:host {
|
|
6312
6340
|
display: block;
|
|
6313
6341
|
}
|
|
@@ -6478,13 +6506,13 @@ ue.styles = [
|
|
|
6478
6506
|
}
|
|
6479
6507
|
`
|
|
6480
6508
|
];
|
|
6481
|
-
|
|
6509
|
+
Ke([
|
|
6482
6510
|
x({ attribute: !1 })
|
|
6483
6511
|
], ue.prototype, "settings", 2);
|
|
6484
|
-
|
|
6512
|
+
Ke([
|
|
6485
6513
|
x()
|
|
6486
6514
|
], ue.prototype, "roomId", 2);
|
|
6487
|
-
ue =
|
|
6515
|
+
ue = Ke([
|
|
6488
6516
|
L("pulse-widget-settings-panel")
|
|
6489
6517
|
], ue);
|
|
6490
6518
|
const $e = {
|
|
@@ -6498,26 +6526,26 @@ const $e = {
|
|
|
6498
6526
|
showViewportIndicators: !0,
|
|
6499
6527
|
showSelections: !0,
|
|
6500
6528
|
showDrawings: !0
|
|
6501
|
-
},
|
|
6502
|
-
function
|
|
6529
|
+
}, Ot = "pulse:settings:";
|
|
6530
|
+
function Ts(n) {
|
|
6503
6531
|
try {
|
|
6504
|
-
const e = localStorage.getItem(`${
|
|
6532
|
+
const e = localStorage.getItem(`${Ot}${n}`);
|
|
6505
6533
|
return e ? { ...$e, ...JSON.parse(e) } : { ...$e };
|
|
6506
6534
|
} catch {
|
|
6507
6535
|
return { ...$e };
|
|
6508
6536
|
}
|
|
6509
6537
|
}
|
|
6510
|
-
function
|
|
6511
|
-
localStorage.setItem(`${
|
|
6538
|
+
function Ss(n, e) {
|
|
6539
|
+
localStorage.setItem(`${Ot}${n}`, JSON.stringify(e));
|
|
6512
6540
|
}
|
|
6513
|
-
var
|
|
6514
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
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--)
|
|
6515
6543
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
6516
|
-
return i && s &&
|
|
6544
|
+
return i && s && As(e, t, s), s;
|
|
6517
6545
|
};
|
|
6518
|
-
let
|
|
6546
|
+
let M = class extends P {
|
|
6519
6547
|
constructor() {
|
|
6520
|
-
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;
|
|
6521
6549
|
}
|
|
6522
6550
|
connectedCallback() {
|
|
6523
6551
|
super.connectedCallback(), this.setupPresence();
|
|
@@ -6570,14 +6598,14 @@ let R = class extends A {
|
|
|
6570
6598
|
if (this.collapsed)
|
|
6571
6599
|
return u`
|
|
6572
6600
|
<div class="toolbar collapsed ${n ? "inline" : ""}" @click=${this.fireToggle}>
|
|
6573
|
-
<span class="fab-icon">${
|
|
6601
|
+
<span class="fab-icon">${T(Fi, n ? 18 : 24)}</span>
|
|
6574
6602
|
</div>
|
|
6575
6603
|
`;
|
|
6576
6604
|
const e = this.users.slice(0, 3), t = this.users.length - 3;
|
|
6577
6605
|
return u`
|
|
6578
6606
|
<div class="toolbar ${n ? "inline" : ""}"
|
|
6579
6607
|
<!-- Presence avatars -->
|
|
6580
|
-
${this.users.length > 0 ? u`
|
|
6608
|
+
${this.users.length > 0 && this.envConfig.showPresence ? u`
|
|
6581
6609
|
<div class="presence">
|
|
6582
6610
|
${t > 0 ? u`<div class="presence-overflow">+${t}</div>` : v}
|
|
6583
6611
|
${e.map(
|
|
@@ -6606,7 +6634,7 @@ let R = class extends A {
|
|
|
6606
6634
|
?disabled=${this.featuresDisabled}
|
|
6607
6635
|
style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
|
|
6608
6636
|
>
|
|
6609
|
-
${
|
|
6637
|
+
${T(Mt)}
|
|
6610
6638
|
</button>
|
|
6611
6639
|
|
|
6612
6640
|
<!-- View comments -->
|
|
@@ -6617,7 +6645,7 @@ let R = class extends A {
|
|
|
6617
6645
|
?disabled=${this.featuresDisabled}
|
|
6618
6646
|
style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
|
|
6619
6647
|
>
|
|
6620
|
-
${
|
|
6648
|
+
${T(Li)}
|
|
6621
6649
|
</button>
|
|
6622
6650
|
|
|
6623
6651
|
<!-- Activity feed -->
|
|
@@ -6628,19 +6656,21 @@ let R = class extends A {
|
|
|
6628
6656
|
?disabled=${this.featuresDisabled}
|
|
6629
6657
|
style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : ""}"
|
|
6630
6658
|
>
|
|
6631
|
-
${
|
|
6659
|
+
${T(Ri)}
|
|
6632
6660
|
</button>
|
|
6633
6661
|
|
|
6634
6662
|
<!-- Draw mode -->
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
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}
|
|
6644
6674
|
|
|
6645
6675
|
<!-- Notifications -->
|
|
6646
6676
|
<button
|
|
@@ -6650,7 +6680,7 @@ let R = class extends A {
|
|
|
6650
6680
|
?disabled=${this.featuresDisabled}
|
|
6651
6681
|
style="${this.featuresDisabled ? "opacity:0.35;pointer-events:none" : "position:relative"}"
|
|
6652
6682
|
>
|
|
6653
|
-
${
|
|
6683
|
+
${T(Oi)}
|
|
6654
6684
|
${this.unreadCount > 0 ? u`<span class="badge">${this.unreadCount > 9 ? "9+" : this.unreadCount}</span>` : v}
|
|
6655
6685
|
</button>
|
|
6656
6686
|
|
|
@@ -6660,7 +6690,7 @@ let R = class extends A {
|
|
|
6660
6690
|
@click=${() => this.fire("settings")}
|
|
6661
6691
|
title="Settings"
|
|
6662
6692
|
>
|
|
6663
|
-
${
|
|
6693
|
+
${T(Hi)}
|
|
6664
6694
|
</button>
|
|
6665
6695
|
|
|
6666
6696
|
<div class="separator"></div>
|
|
@@ -6671,16 +6701,16 @@ let R = class extends A {
|
|
|
6671
6701
|
@click=${this.fireToggle}
|
|
6672
6702
|
title="Collapse"
|
|
6673
6703
|
>
|
|
6674
|
-
${
|
|
6704
|
+
${T(ve, 14)}
|
|
6675
6705
|
</button>
|
|
6676
6706
|
</div>
|
|
6677
6707
|
`;
|
|
6678
6708
|
}
|
|
6679
6709
|
};
|
|
6680
|
-
|
|
6710
|
+
M.styles = [
|
|
6681
6711
|
ie,
|
|
6682
6712
|
be,
|
|
6683
|
-
|
|
6713
|
+
O`
|
|
6684
6714
|
:host {
|
|
6685
6715
|
display: block;
|
|
6686
6716
|
}
|
|
@@ -6894,38 +6924,41 @@ R.styles = [
|
|
|
6894
6924
|
];
|
|
6895
6925
|
j([
|
|
6896
6926
|
x({ attribute: !1 })
|
|
6897
|
-
],
|
|
6927
|
+
], M.prototype, "client", 2);
|
|
6898
6928
|
j([
|
|
6899
6929
|
x({ type: Boolean })
|
|
6900
|
-
],
|
|
6930
|
+
], M.prototype, "collapsed", 2);
|
|
6901
6931
|
j([
|
|
6902
6932
|
x()
|
|
6903
|
-
],
|
|
6933
|
+
], M.prototype, "activePanel", 2);
|
|
6904
6934
|
j([
|
|
6905
6935
|
x({ type: Boolean })
|
|
6906
|
-
],
|
|
6936
|
+
], M.prototype, "pinModeActive", 2);
|
|
6907
6937
|
j([
|
|
6908
6938
|
x({ type: Boolean })
|
|
6909
|
-
],
|
|
6939
|
+
], M.prototype, "featuresDisabled", 2);
|
|
6910
6940
|
j([
|
|
6911
6941
|
x({ type: Boolean })
|
|
6912
|
-
],
|
|
6942
|
+
], M.prototype, "drawModeActive", 2);
|
|
6913
6943
|
j([
|
|
6914
6944
|
x()
|
|
6915
|
-
],
|
|
6945
|
+
], M.prototype, "followingUserId", 2);
|
|
6916
6946
|
j([
|
|
6917
6947
|
x()
|
|
6918
|
-
],
|
|
6948
|
+
], M.prototype, "display", 2);
|
|
6949
|
+
j([
|
|
6950
|
+
x({ attribute: !1 })
|
|
6951
|
+
], M.prototype, "envConfig", 2);
|
|
6919
6952
|
j([
|
|
6920
6953
|
$()
|
|
6921
|
-
],
|
|
6954
|
+
], M.prototype, "users", 2);
|
|
6922
6955
|
j([
|
|
6923
6956
|
$()
|
|
6924
|
-
],
|
|
6925
|
-
|
|
6957
|
+
], M.prototype, "unreadCount", 2);
|
|
6958
|
+
M = j([
|
|
6926
6959
|
L("pulse-widget-toolbar")
|
|
6927
|
-
],
|
|
6928
|
-
class
|
|
6960
|
+
], M);
|
|
6961
|
+
class _s {
|
|
6929
6962
|
constructor(e) {
|
|
6930
6963
|
this.container = null, this.unsubs = [], this.enabled = !1, this.pillEls = /* @__PURE__ */ new Map(), this.client = e;
|
|
6931
6964
|
}
|
|
@@ -7003,14 +7036,14 @@ class Es {
|
|
|
7003
7036
|
return e.split(" ").map((t) => t[0]).join("").toUpperCase().slice(0, 2);
|
|
7004
7037
|
}
|
|
7005
7038
|
}
|
|
7006
|
-
var
|
|
7007
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
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--)
|
|
7008
7041
|
(r = n[o]) && (s = (i ? r(e, t, s) : r(s)) || s);
|
|
7009
|
-
return i && s &&
|
|
7042
|
+
return i && s && Is(e, t, s), s;
|
|
7010
7043
|
};
|
|
7011
|
-
let
|
|
7044
|
+
let C = class extends P {
|
|
7012
7045
|
constructor() {
|
|
7013
|
-
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 = () => {
|
|
7014
7047
|
!this.settings.enabled || !this.client || this._isFollowScrolling || (this.followingUserId && (this.followingUserId = null), !this._viewportThrottleTimer && (this._viewportThrottleTimer = setTimeout(() => {
|
|
7015
7048
|
var n;
|
|
7016
7049
|
this._viewportThrottleTimer = null, (n = this.client) == null || n.updateViewport({
|
|
@@ -7031,7 +7064,7 @@ let T = class extends A {
|
|
|
7031
7064
|
(t = this.client) == null || t.updateSelection(null);
|
|
7032
7065
|
return;
|
|
7033
7066
|
}
|
|
7034
|
-
const e =
|
|
7067
|
+
const e = ws(n);
|
|
7035
7068
|
(i = this.client) == null || i.updateSelection(e);
|
|
7036
7069
|
}, 500));
|
|
7037
7070
|
}, this.handleDocumentClick = (n) => {
|
|
@@ -7063,11 +7096,16 @@ let T = class extends A {
|
|
|
7063
7096
|
room: this.room,
|
|
7064
7097
|
endpoint: this.endpoint
|
|
7065
7098
|
};
|
|
7066
|
-
this.client = new
|
|
7099
|
+
this.client = new Et(n), this.clientConfigKey = this.getConfigKey(), this.cursorOverlay = new xs(this.client), this.commentPins = new ds(this.client, {
|
|
7067
7100
|
onPinModeExit: () => {
|
|
7068
7101
|
this.pinModeActive = !1;
|
|
7069
7102
|
}
|
|
7070
|
-
}), this.viewportOverlay = new
|
|
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(
|
|
7071
7109
|
this.client.on("connection", (e) => {
|
|
7072
7110
|
this.connectionState = e, e === "connected" && this._wasDisconnected ? (this.showConnectedFlash = !0, this._connectedFlashTimer && clearTimeout(this._connectedFlashTimer), this._connectedFlashTimer = setTimeout(() => {
|
|
7073
7111
|
this.showConnectedFlash = !1, this._connectedFlashTimer = null;
|
|
@@ -7125,6 +7163,7 @@ let T = class extends A {
|
|
|
7125
7163
|
this.pinModeActive = !this.pinModeActive, this.pinModeActive && ((o = this.commentPins) == null || o.enterPinMode());
|
|
7126
7164
|
break;
|
|
7127
7165
|
case "draw-mode":
|
|
7166
|
+
if (!this.envConfig.allowDrawing) break;
|
|
7128
7167
|
this.drawModeActive = !this.drawModeActive, this.drawModeActive && ((r = this.drawingOverlay) == null || r.enableDrawMode());
|
|
7129
7168
|
break;
|
|
7130
7169
|
}
|
|
@@ -7135,7 +7174,7 @@ let T = class extends A {
|
|
|
7135
7174
|
}
|
|
7136
7175
|
handleSettingsChange(n) {
|
|
7137
7176
|
const e = n.detail;
|
|
7138
|
-
this.settings = e,
|
|
7177
|
+
this.settings = e, Ss(this.room, e), this.applySettings(e);
|
|
7139
7178
|
}
|
|
7140
7179
|
applySettings(n) {
|
|
7141
7180
|
var e, t, i, s, o, r, a, l, d, c, h, p, m, g, y, b, w;
|
|
@@ -7253,6 +7292,7 @@ let T = class extends A {
|
|
|
7253
7292
|
.drawModeActive=${this.drawModeActive}
|
|
7254
7293
|
.followingUserId=${this.followingUserId}
|
|
7255
7294
|
.display=${this.display}
|
|
7295
|
+
.envConfig=${this.envConfig}
|
|
7256
7296
|
@toolbar-action=${this.handleToolbarAction}
|
|
7257
7297
|
@toolbar-toggle=${this.handleToolbarToggle}
|
|
7258
7298
|
@toolbar-follow=${this.handleFollow}
|
|
@@ -7274,6 +7314,7 @@ let T = class extends A {
|
|
|
7274
7314
|
.drawModeActive=${this.drawModeActive}
|
|
7275
7315
|
.followingUserId=${this.followingUserId}
|
|
7276
7316
|
.display=${this.display}
|
|
7317
|
+
.envConfig=${this.envConfig}
|
|
7277
7318
|
@toolbar-action=${this.handleToolbarAction}
|
|
7278
7319
|
@toolbar-toggle=${this.handleToolbarToggle}
|
|
7279
7320
|
@toolbar-follow=${this.handleFollow}
|
|
@@ -7282,9 +7323,9 @@ let T = class extends A {
|
|
|
7282
7323
|
`;
|
|
7283
7324
|
}
|
|
7284
7325
|
};
|
|
7285
|
-
|
|
7326
|
+
C.styles = [
|
|
7286
7327
|
ie,
|
|
7287
|
-
|
|
7328
|
+
O`
|
|
7288
7329
|
:host {
|
|
7289
7330
|
display: block;
|
|
7290
7331
|
}
|
|
@@ -7460,54 +7501,57 @@ T.styles = [
|
|
|
7460
7501
|
}
|
|
7461
7502
|
`
|
|
7462
7503
|
];
|
|
7463
|
-
|
|
7504
|
+
A([
|
|
7464
7505
|
x({ attribute: "api-key" })
|
|
7465
|
-
],
|
|
7466
|
-
|
|
7506
|
+
], C.prototype, "apiKey", 2);
|
|
7507
|
+
A([
|
|
7467
7508
|
x()
|
|
7468
|
-
],
|
|
7469
|
-
|
|
7509
|
+
], C.prototype, "token", 2);
|
|
7510
|
+
A([
|
|
7470
7511
|
x()
|
|
7471
|
-
],
|
|
7472
|
-
|
|
7512
|
+
], C.prototype, "room", 2);
|
|
7513
|
+
A([
|
|
7473
7514
|
x()
|
|
7474
|
-
],
|
|
7475
|
-
|
|
7515
|
+
], C.prototype, "endpoint", 2);
|
|
7516
|
+
A([
|
|
7476
7517
|
x({ reflect: !0 })
|
|
7477
|
-
],
|
|
7478
|
-
|
|
7518
|
+
], C.prototype, "position", 2);
|
|
7519
|
+
A([
|
|
7479
7520
|
x({ reflect: !0 })
|
|
7480
|
-
],
|
|
7481
|
-
|
|
7521
|
+
], C.prototype, "display", 2);
|
|
7522
|
+
A([
|
|
7523
|
+
$()
|
|
7524
|
+
], C.prototype, "collapsed", 2);
|
|
7525
|
+
A([
|
|
7482
7526
|
$()
|
|
7483
|
-
],
|
|
7484
|
-
|
|
7527
|
+
], C.prototype, "activePanel", 2);
|
|
7528
|
+
A([
|
|
7485
7529
|
$()
|
|
7486
|
-
],
|
|
7487
|
-
|
|
7530
|
+
], C.prototype, "pinModeActive", 2);
|
|
7531
|
+
A([
|
|
7488
7532
|
$()
|
|
7489
|
-
],
|
|
7490
|
-
|
|
7533
|
+
], C.prototype, "highlightThreadId", 2);
|
|
7534
|
+
A([
|
|
7491
7535
|
$()
|
|
7492
|
-
],
|
|
7493
|
-
|
|
7536
|
+
], C.prototype, "settings", 2);
|
|
7537
|
+
A([
|
|
7494
7538
|
$()
|
|
7495
|
-
],
|
|
7496
|
-
|
|
7539
|
+
], C.prototype, "followingUserId", 2);
|
|
7540
|
+
A([
|
|
7497
7541
|
$()
|
|
7498
|
-
],
|
|
7499
|
-
|
|
7542
|
+
], C.prototype, "drawModeActive", 2);
|
|
7543
|
+
A([
|
|
7500
7544
|
$()
|
|
7501
|
-
],
|
|
7502
|
-
|
|
7545
|
+
], C.prototype, "connectionState", 2);
|
|
7546
|
+
A([
|
|
7503
7547
|
$()
|
|
7504
|
-
],
|
|
7505
|
-
|
|
7548
|
+
], C.prototype, "showConnectedFlash", 2);
|
|
7549
|
+
A([
|
|
7506
7550
|
$()
|
|
7507
|
-
],
|
|
7508
|
-
|
|
7551
|
+
], C.prototype, "envConfig", 2);
|
|
7552
|
+
C = A([
|
|
7509
7553
|
L("pulse-widget")
|
|
7510
|
-
],
|
|
7554
|
+
], C);
|
|
7511
7555
|
export {
|
|
7512
7556
|
Y as PulseComments,
|
|
7513
7557
|
de as PulseCursors,
|
|
@@ -7515,5 +7559,5 @@ export {
|
|
|
7515
7559
|
Z as PulsePresence,
|
|
7516
7560
|
X as PulseProvider,
|
|
7517
7561
|
N as PulseReactions,
|
|
7518
|
-
|
|
7562
|
+
C as PulseWidget
|
|
7519
7563
|
};
|