@ozaiya/openclaw-channel 0.10.29 → 0.10.31
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/src/api.d.ts +6 -2
- package/dist/src/api.js +7 -3
- package/dist/src/api.js.map +1 -1
- package/dist/src/channel.js +19 -2
- package/dist/src/channel.js.map +1 -1
- package/dist/src/crypto.d.ts +13 -0
- package/dist/src/crypto.js +21 -0
- package/dist/src/crypto.js.map +1 -1
- package/dist/src/gateway.js +140 -39
- package/dist/src/gateway.js.map +1 -1
- package/dist/src/h264Packetizer.d.ts +55 -0
- package/dist/src/h264Packetizer.js +153 -0
- package/dist/src/h264Packetizer.js.map +1 -0
- package/dist/src/sandboxScreenCdp.d.ts +28 -0
- package/dist/src/sandboxScreenCdp.js +417 -37
- package/dist/src/sandboxScreenCdp.js.map +1 -1
- package/dist/src/sandboxScreenH264.d.ts +26 -0
- package/dist/src/sandboxScreenH264.js +198 -0
- package/dist/src/sandboxScreenH264.js.map +1 -0
- package/dist/src/sandboxScreenRtc.d.ts +11 -0
- package/dist/src/sandboxScreenRtc.js +221 -63
- package/dist/src/sandboxScreenRtc.js.map +1 -1
- package/package.json +3 -3
|
@@ -9,14 +9,23 @@
|
|
|
9
9
|
* stateless self-contained JPEGs, so they render cleanly over the DataChannel
|
|
10
10
|
* (unlike the old stateful VNC/RFB stream, which stalled).
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* On top of the DataChannel, when the gateway has a working ffmpeg (enableVideo)
|
|
13
|
+
* and the viewer's offer includes an m=video section, we ALSO answer with a
|
|
14
|
+
* sendonly H.264 media track — the JPEG poll then feeds an ffmpeg transcoder and
|
|
15
|
+
* the video rides RTP/SRTP with native browser decode (mirrors the machine-screen
|
|
16
|
+
* daemon's proven werift media mode). Inter-frame compression carries ~20fps where
|
|
17
|
+
* independent JPEGs managed ~10 on the same uplink. Ladder: H.264 media track →
|
|
18
|
+
* JPEG DataChannel → JPEG relay.
|
|
19
|
+
*
|
|
20
|
+
* Transport ladder fallback is automatic: if the channel never opens or drops, the
|
|
21
|
+
* relay (kept connected as the signaling pipe) resumes carrying frames. Signaling
|
|
22
|
+
* rides the existing sandbox-screen relay WS as JSON **text**; the server never has
|
|
23
|
+
* to parse anything.
|
|
16
24
|
*
|
|
17
25
|
* The viewer is the OFFERER (mirrors the machine-screen path); this plugin is the
|
|
18
|
-
* ANSWERER.
|
|
19
|
-
*
|
|
26
|
+
* ANSWERER. The peer connection is built lazily when the offer arrives, so codec
|
|
27
|
+
* config can depend on what the viewer offered. `werift` is pure-TS (no native
|
|
28
|
+
* build) and loaded lazily, so a gateway without it simply keeps using the relay.
|
|
20
29
|
*/
|
|
21
30
|
import { createRequire } from "node:module";
|
|
22
31
|
const esmRequire = createRequire(import.meta.url);
|
|
@@ -32,6 +41,27 @@ function getWerift() {
|
|
|
32
41
|
}
|
|
33
42
|
return weriftModule;
|
|
34
43
|
}
|
|
44
|
+
let packetizerModule;
|
|
45
|
+
function getPacketizer() {
|
|
46
|
+
if (packetizerModule === undefined) {
|
|
47
|
+
try {
|
|
48
|
+
// Static import would make werift a hard dependency of the plugin entry;
|
|
49
|
+
// resolved lazily so a werift-less install still loads (relay-only).
|
|
50
|
+
packetizerModule = esmRequire("./h264Packetizer.js");
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
packetizerModule = null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return packetizerModule;
|
|
57
|
+
}
|
|
58
|
+
const H264_RTCP_FEEDBACK = [
|
|
59
|
+
{ type: "nack" },
|
|
60
|
+
{ type: "nack", parameter: "pli" },
|
|
61
|
+
{ type: "goog-remb" },
|
|
62
|
+
{ type: "transport-cc" },
|
|
63
|
+
{ type: "ccm", parameter: "fir" },
|
|
64
|
+
];
|
|
35
65
|
/**
|
|
36
66
|
* Create an answerer WebRTC session for one viewer. Returns null when werift is
|
|
37
67
|
* unavailable so the caller transparently falls back to the relay pipe.
|
|
@@ -42,81 +72,188 @@ export function createSandboxRtcSession(opts) {
|
|
|
42
72
|
opts.log?.warn?.("[sandbox-rtc] werift not available; relay only");
|
|
43
73
|
return null;
|
|
44
74
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
75
|
+
// OZAIYA_RTC_NO_TURN=1 strips TURN from OUR candidates (diagnostic knob —
|
|
76
|
+
// werift 0.22.x had a dead TURN data path where relay↔relay pairs passed
|
|
77
|
+
// ICE but dropped every DTLS packet; fixed by the werift upgrade, but keep
|
|
78
|
+
// the escape hatch). NOTE: werift never sends checks from host candidates
|
|
79
|
+
// toward remote RELAY candidates (verified with tcpdump on the coturn), so
|
|
80
|
+
// stripping TURN here leaves only hairpin/host pairs — on a typical
|
|
81
|
+
// home-router + Docker-Desktop-NAT topology that means NO usable pair.
|
|
82
|
+
const stripTurn = process.env.OZAIYA_RTC_NO_TURN === "1";
|
|
83
|
+
const iceServers = (opts.iceServers ?? [])
|
|
84
|
+
.filter((s) => !stripTurn || !String(s.urls).includes("turn"))
|
|
85
|
+
.concat([{ urls: "stun:stun.l.google.com:19302" }]);
|
|
86
|
+
let pc = null;
|
|
49
87
|
let dc = null;
|
|
50
88
|
let active = false;
|
|
51
89
|
let closed = false;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
pc.onIceCandidate.subscribe((candidate) => {
|
|
60
|
-
if (!candidate || closed)
|
|
90
|
+
let mediaReady = false;
|
|
91
|
+
let videoTrack = null;
|
|
92
|
+
let packetizer = null;
|
|
93
|
+
let tsBaseNs = null;
|
|
94
|
+
const earlyIce = []; // candidates that beat the offer
|
|
95
|
+
const setMediaReady = (ready) => {
|
|
96
|
+
if (mediaReady === ready)
|
|
61
97
|
return;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
//
|
|
73
|
-
//
|
|
74
|
-
|
|
75
|
-
|
|
98
|
+
mediaReady = ready;
|
|
99
|
+
opts.onMediaStateChange?.(ready);
|
|
100
|
+
};
|
|
101
|
+
/** Build the peer once the offer is known (codec config depends on it). */
|
|
102
|
+
function buildPeer(offerSdp) {
|
|
103
|
+
const pkt = getPacketizer();
|
|
104
|
+
const wantsVideo = !!opts.enableVideo && /\bm=video\b/.test(offerSdp) && !!pkt;
|
|
105
|
+
const config = { iceServers };
|
|
106
|
+
// Containerized gateways can't NAT-traverse reliably (the Docker NAT is
|
|
107
|
+
// symmetric, the browser's host candidates are mDNS-obfuscated, and a
|
|
108
|
+
// same-router viewer would need hairpin) — but when the deployment
|
|
109
|
+
// PUBLISHES a UDP port range and tells us the host's reachable IP(s),
|
|
110
|
+
// werift binds inside that range and advertises those IPs as plain host
|
|
111
|
+
// candidates, giving the viewer a directly checkable address. Set
|
|
112
|
+
// OZAIYA_RTC_PORT_RANGE=50700-50719 (must match the compose `ports`
|
|
113
|
+
// mapping 1:1) and OZAIYA_RTC_HOST_IPS=<lan-ip>[,<public-ip>].
|
|
114
|
+
const range = process.env.OZAIYA_RTC_PORT_RANGE?.match(/^(\d+)-(\d+)$/);
|
|
115
|
+
if (range)
|
|
116
|
+
config.icePortRange = [Number(range[1]), Number(range[2])];
|
|
117
|
+
const hostIps = (process.env.OZAIYA_RTC_HOST_IPS ?? "")
|
|
118
|
+
.split(",").map((s) => s.trim()).filter(Boolean);
|
|
119
|
+
if (hostIps.length)
|
|
120
|
+
config.iceAdditionalHostAddresses = hostIps;
|
|
121
|
+
if (range || hostIps.length) {
|
|
122
|
+
opts.log?.info?.(`[sandbox-rtc] direct-candidate config: ports=${range ? `${range[1]}-${range[2]}` : "auto"} hostIps=${hostIps.join(",") || "none"}`);
|
|
76
123
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
124
|
+
if (wantsVideo) {
|
|
125
|
+
config.codecs = {
|
|
126
|
+
video: [
|
|
127
|
+
new werift.RTCRtpCodecParameters({
|
|
128
|
+
mimeType: "video/H264",
|
|
129
|
+
clockRate: 90000,
|
|
130
|
+
rtcpFeedback: H264_RTCP_FEEDBACK,
|
|
131
|
+
parameters: "level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f",
|
|
132
|
+
}),
|
|
133
|
+
],
|
|
134
|
+
};
|
|
135
|
+
config.headerExtensions = {
|
|
136
|
+
video: [werift.useSdesMid(), werift.useAbsSendTime(), werift.useTransportWideCC()],
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
pc = new werift.RTCPeerConnection(config);
|
|
140
|
+
if (wantsVideo && pkt) {
|
|
141
|
+
videoTrack = new werift.MediaStreamTrack({ kind: "video" });
|
|
142
|
+
const transceiver = pc.addTransceiver(videoTrack, { direction: "sendonly" });
|
|
143
|
+
packetizer = new pkt.H264Packetizer();
|
|
144
|
+
// Viewer lost frames it can't recover via NACK — with a ≤1s GOP the next
|
|
145
|
+
// IDR lands soon, so PLI is informational here.
|
|
146
|
+
transceiver.sender.onPictureLossIndication.subscribe(() => {
|
|
147
|
+
opts.log?.info?.("[sandbox-rtc] PLI from viewer (next keyframe ≤1s away)");
|
|
148
|
+
});
|
|
149
|
+
opts.log?.info?.("[sandbox-rtc] answering with sendonly H.264 track");
|
|
150
|
+
}
|
|
151
|
+
pc.onIceCandidate.subscribe((candidate) => {
|
|
152
|
+
if (!candidate || closed)
|
|
83
153
|
return;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
154
|
+
opts.sendSignal(JSON.stringify({
|
|
155
|
+
type: "rtc-ice",
|
|
156
|
+
candidate: JSON.stringify({
|
|
157
|
+
candidate: candidate.candidate,
|
|
158
|
+
sdpMid: candidate.sdpMid ?? null,
|
|
159
|
+
sdpMLineIndex: candidate.sdpMLineIndex ?? null,
|
|
160
|
+
}),
|
|
161
|
+
}));
|
|
90
162
|
});
|
|
91
|
-
|
|
92
|
-
if (
|
|
163
|
+
pc.connectionStateChange.subscribe((state) => {
|
|
164
|
+
if (closed)
|
|
93
165
|
return;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if (state === "
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
if (
|
|
166
|
+
opts.log?.info?.(`[sandbox-rtc] connection state: ${state}`);
|
|
167
|
+
if (state === "connected") {
|
|
168
|
+
if (videoTrack)
|
|
169
|
+
setMediaReady(true);
|
|
170
|
+
}
|
|
171
|
+
else if (state === "failed" || state === "closed" || state === "disconnected") {
|
|
172
|
+
setMediaReady(false);
|
|
173
|
+
// Terminal failure before the channel ever opened → let the caller keep
|
|
174
|
+
// the relay alive (it does anyway). 'disconnected' may recover.
|
|
175
|
+
if ((state === "failed" || state === "closed") && !active)
|
|
104
176
|
opts.onClosed();
|
|
105
177
|
}
|
|
106
178
|
});
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
179
|
+
pc.iceConnectionStateChange?.subscribe?.((state) => {
|
|
180
|
+
if (!closed)
|
|
181
|
+
opts.log?.info?.(`[sandbox-rtc] ice state: ${state}`);
|
|
182
|
+
});
|
|
183
|
+
pc.onDataChannel.subscribe((channel) => {
|
|
184
|
+
dc = channel;
|
|
185
|
+
opts.log?.info?.(`[sandbox-rtc] onDataChannel readyState=${channel.readyState}`);
|
|
186
|
+
channel.onMessage.subscribe((msg) => {
|
|
187
|
+
if (closed)
|
|
188
|
+
return;
|
|
189
|
+
// Preserve text vs binary: text = JSON control (input/viewport), binary =
|
|
190
|
+
// the app's compact input encoding.
|
|
191
|
+
if (typeof msg === "string")
|
|
192
|
+
opts.onData(msg);
|
|
193
|
+
else
|
|
194
|
+
opts.onData(Buffer.isBuffer(msg) ? msg : Buffer.from(msg));
|
|
195
|
+
});
|
|
196
|
+
const markOpen = () => {
|
|
197
|
+
if (active || closed)
|
|
198
|
+
return;
|
|
199
|
+
active = true;
|
|
200
|
+
opts.log?.info?.("[sandbox-rtc] DataChannel open — P2P carrying the screencast");
|
|
201
|
+
opts.onActive();
|
|
202
|
+
};
|
|
203
|
+
channel.stateChanged.subscribe((state) => {
|
|
204
|
+
if (state === "open")
|
|
205
|
+
markOpen();
|
|
206
|
+
else if (state === "closed") {
|
|
207
|
+
active = false;
|
|
208
|
+
if (!closed)
|
|
209
|
+
opts.onClosed();
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
// werift may hand over an ALREADY-open channel (more likely over the slower
|
|
213
|
+
// TURN-relayed path) — stateChanged won't re-fire 'open', so check now.
|
|
214
|
+
if (channel.readyState === "open")
|
|
215
|
+
markOpen();
|
|
216
|
+
});
|
|
217
|
+
}
|
|
112
218
|
async function handleOffer(sdp) {
|
|
219
|
+
// A fresh offer after a terminal ICE failure is the viewer retrying —
|
|
220
|
+
// a failed werift peer can't renegotiate, so rebuild from scratch.
|
|
221
|
+
if (pc && (pc.connectionState === "failed" || pc.connectionState === "closed")) {
|
|
222
|
+
opts.log?.info?.("[sandbox-rtc] fresh offer on a dead peer — rebuilding");
|
|
223
|
+
try {
|
|
224
|
+
pc.close();
|
|
225
|
+
}
|
|
226
|
+
catch { /* already dead */ }
|
|
227
|
+
pc = null;
|
|
228
|
+
dc = null;
|
|
229
|
+
active = false;
|
|
230
|
+
videoTrack = null;
|
|
231
|
+
packetizer = null;
|
|
232
|
+
tsBaseNs = null;
|
|
233
|
+
setMediaReady(false);
|
|
234
|
+
}
|
|
235
|
+
if (!pc)
|
|
236
|
+
buildPeer(sdp);
|
|
113
237
|
await pc.setRemoteDescription({ type: "offer", sdp });
|
|
238
|
+
for (const c of earlyIce.splice(0)) {
|
|
239
|
+
pc.addIceCandidate(c).catch(() => { });
|
|
240
|
+
}
|
|
114
241
|
const answer = await pc.createAnswer();
|
|
242
|
+
// Send the answer IMMEDIATELY (trickle ICE). werift's setLocalDescription
|
|
243
|
+
// does not resolve until ICE GATHERING completes — behind a symmetric-NAT
|
|
244
|
+
// container doing TURN allocations that takes tens of seconds (or hangs),
|
|
245
|
+
// and the viewer can't apply our trickled candidates until it has the
|
|
246
|
+
// answer, so awaiting first deadlocks the whole handshake on slow
|
|
247
|
+
// gathering. Candidates stream via onIceCandidate as they're found.
|
|
248
|
+
opts.sendSignal(JSON.stringify({ type: "rtc-answer", sdp: answer.sdp }));
|
|
115
249
|
await pc.setLocalDescription(answer);
|
|
116
|
-
opts.sendSignal(JSON.stringify({ type: "rtc-answer", sdp: pc.localDescription?.sdp ?? answer.sdp }));
|
|
117
250
|
}
|
|
118
251
|
async function handleIce(candidate) {
|
|
119
252
|
const parsed = typeof candidate === "string" ? JSON.parse(candidate) : candidate;
|
|
253
|
+
if (!pc) {
|
|
254
|
+
earlyIce.push(parsed);
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
120
257
|
await pc.addIceCandidate(parsed);
|
|
121
258
|
}
|
|
122
259
|
return {
|
|
@@ -156,9 +293,30 @@ export function createSandboxRtcSession(opts) {
|
|
|
156
293
|
return 0;
|
|
157
294
|
}
|
|
158
295
|
},
|
|
296
|
+
isMediaReady: () => mediaReady && !closed,
|
|
297
|
+
sendVideoFrame: (accessUnit) => {
|
|
298
|
+
if (closed || !mediaReady || !videoTrack || !packetizer)
|
|
299
|
+
return false;
|
|
300
|
+
const now = process.hrtime.bigint();
|
|
301
|
+
if (tsBaseNs === null)
|
|
302
|
+
tsBaseNs = now;
|
|
303
|
+
// 90 kHz RTP timestamp from a monotonic clock — inter-frame spacing stays
|
|
304
|
+
// accurate regardless of the (backpressure-varying) capture rate.
|
|
305
|
+
const rtpTs = Number(((now - tsBaseNs) * 90000n) / 1000000000n) >>> 0;
|
|
306
|
+
try {
|
|
307
|
+
for (const p of packetizer.packetize(accessUnit, rtpTs)) {
|
|
308
|
+
videoTrack.writeRtp(p);
|
|
309
|
+
}
|
|
310
|
+
return true;
|
|
311
|
+
}
|
|
312
|
+
catch {
|
|
313
|
+
return false;
|
|
314
|
+
}
|
|
315
|
+
},
|
|
159
316
|
close: () => {
|
|
160
317
|
closed = true;
|
|
161
318
|
active = false;
|
|
319
|
+
setMediaReady(false);
|
|
162
320
|
try {
|
|
163
321
|
dc?.close?.();
|
|
164
322
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandboxScreenRtc.js","sourceRoot":"","sources":["../../src/sandboxScreenRtc.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sandboxScreenRtc.js","sourceRoot":"","sources":["../../src/sandboxScreenRtc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAElD,IAAI,YAAqB,CAAC;AAC1B,SAAS,SAAS;IAChB,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,IAAI,CAAC;YACH,YAAY,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;QAAC,MAAM,CAAC;YACP,YAAY,GAAG,IAAI,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,YAAmB,CAAC;AAC7B,CAAC;AAED,IAAI,gBAAyB,CAAC;AAC9B,SAAS,aAAa;IACpB,IAAI,gBAAgB,KAAK,SAAS,EAAE,CAAC;QACnC,IAAI,CAAC;YACH,yEAAyE;YACzE,qEAAqE;YACrE,gBAAgB,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;QACvD,CAAC;QAAC,MAAM,CAAC;YACP,gBAAgB,GAAG,IAAI,CAAC;QAC1B,CAAC;IACH,CAAC;IACD,OAAO,gBAA+D,C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AAC,SAAS,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC;oBACxD,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBACzB,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QACD,KAAK,EAAE,GAAG,EAAE;YACV,MAAM,GAAG,IAAI,CAAC;YACd,MAAM,GAAG,KAAK,CAAC;YACf,aAAa,CAAC,KAAK,CAAC,CAAC;YACrB,IAAI,CAAC;gBAAC,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;YAC7C,IAAI,CAAC;gBAAC,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;QAC/C,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ozaiya/openclaw-channel",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.31",
|
|
4
4
|
"description": "OpenClaw channel plugin for Ozaiya Chat",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"libsodium-wrappers": "^0.7.15",
|
|
68
68
|
"node-pty": "^1.0.0",
|
|
69
69
|
"socket.io-client": "^4.8.1",
|
|
70
|
-
"werift": "^0.
|
|
70
|
+
"werift": "^0.23.0",
|
|
71
71
|
"ws": "^8.18.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
@@ -77,4 +77,4 @@
|
|
|
77
77
|
"registry": "https://registry.npmjs.org",
|
|
78
78
|
"access": "public"
|
|
79
79
|
}
|
|
80
|
-
}
|
|
80
|
+
}
|