| 634 | return (this._seed++).toString(); |
| 635 | } |
| 636 | _send(i) { |
| 637 | if (this._mode == 2) |
| 638 | return void setTimeout(() => this._send(), 100); |
| 639 | const t = i ? [i] : this._queue.filter((s) => s.status === 1); |
| 640 | if (!t.length) |
| 641 | return; |
| 642 | const n = t.map((s) => (s.status = 2, s.data)); |
| 643 | this._mode !== 3 ? this.fetch(this._url, JSON.stringify(n)).catch((s) => this.onError(s)).then((s) => this.result(s, n)) : this._socket.send(JSON.stringify({ action: "call", body: n })); |
| 644 | } |
| 645 | result(i, t) { |
| 646 | const n = {}; |
| 647 | if (i) |