| 326 | return this; |
| 327 | } |
| 328 | clone() { |
| 329 | const cloned = new MagicString(this.original, { filename: this.filename }); |
| 330 | let originalChunk = this.firstChunk; |
| 331 | let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone()); |
| 332 | while (originalChunk) { |
| 333 | cloned.byStart[clonedChunk.start] = clonedChunk; |
| 334 | cloned.byEnd[clonedChunk.end] = clonedChunk; |
| 335 | const nextOriginalChunk = originalChunk.next; |
| 336 | const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); |
| 337 | if (nextClonedChunk) { |
| 338 | clonedChunk.next = nextClonedChunk; |
| 339 | nextClonedChunk.previous = clonedChunk; |
| 340 | clonedChunk = nextClonedChunk; |
| 341 | } |
| 342 | originalChunk = nextOriginalChunk; |
| 343 | } |
| 344 | cloned.lastChunk = clonedChunk; |
| 345 | if (this.indentExclusionRanges) { |
| 346 | cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); |
| 347 | } |
| 348 | cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); |
| 349 | cloned.intro = this.intro; |
| 350 | cloned.outro = this.outro; |
| 351 | return cloned; |
| 352 | } |
| 353 | generateDecodedMap(options) { |
| 354 | options = options || {}; |
| 355 | const sourceIndex = 0; |