| 550 | } |
| 551 | } |
| 552 | _splitChunk(t, e) { |
| 553 | if (t.edited && t.content.length) { |
| 554 | const i = C(this.original)(e); |
| 555 | throw new Error( |
| 556 | `Cannot split a chunk that has already been edited (${i.line}:${i.column} \u2013 "${t.original}")`, |
| 557 | ); |
| 558 | } |
| 559 | const n = t.split(e); |
| 560 | return ( |
| 561 | (this.byEnd[e] = t), |
| 562 | (this.byStart[e] = n), |
| 563 | (this.byEnd[n.end] = n), |
| 564 | t === this.lastChunk && (this.lastChunk = n), |
| 565 | (this.lastSearchedChunk = t), |
| 566 | !0 |
| 567 | ); |
| 568 | } |
| 569 | toString() { |
| 570 | let t = this.intro, |
| 571 | e = this.firstChunk; |