(t0)
| 13 | start: number; |
| 14 | }; |
| 15 | export function HighlightedInput(t0) { |
| 16 | const $ = _c(23); |
| 17 | const { |
| 18 | text, |
| 19 | highlights |
| 20 | } = t0; |
| 21 | let lines; |
| 22 | if ($[0] !== highlights || $[1] !== text) { |
| 23 | const segments = segmentTextByHighlights(text, highlights); |
| 24 | lines = [[]]; |
| 25 | let pos = 0; |
| 26 | for (const segment of segments) { |
| 27 | const parts = segment.text.split("\n"); |
| 28 | for (let i = 0; i < parts.length; i++) { |
| 29 | if (i > 0) { |
| 30 | lines.push([]); |
| 31 | pos = pos + 1; |
| 32 | } |
| 33 | const part = parts[i]; |
| 34 | if (part.length > 0) { |
| 35 | lines[lines.length - 1].push({ |
| 36 | text: part, |
| 37 | highlight: segment.highlight, |
| 38 | start: pos |
| 39 | }); |
| 40 | } |
| 41 | pos = pos + part.length; |
| 42 | } |
| 43 | } |
| 44 | $[0] = highlights; |
| 45 | $[1] = text; |
| 46 | $[2] = lines; |
| 47 | } else { |
| 48 | lines = $[2]; |
| 49 | } |
| 50 | let t1; |
| 51 | if ($[3] !== highlights) { |
| 52 | t1 = highlights.some(_temp); |
| 53 | $[3] = highlights; |
| 54 | $[4] = t1; |
| 55 | } else { |
| 56 | t1 = $[4]; |
| 57 | } |
| 58 | const hasShimmer = t1; |
| 59 | let sweepStart = 0; |
| 60 | let cycleLength = 1; |
| 61 | if (hasShimmer) { |
| 62 | let lo = Infinity; |
| 63 | let hi = -Infinity; |
| 64 | if ($[5] !== hi || $[6] !== highlights || $[7] !== lo) { |
| 65 | for (const h_0 of highlights) { |
| 66 | if (h_0.shimmerColor) { |
| 67 | lo = Math.min(lo, h_0.start); |
| 68 | hi = Math.max(hi, h_0.end); |
| 69 | } |
| 70 | } |
| 71 | $[5] = hi; |
| 72 | $[6] = highlights; |
nothing calls this directly
no test coverage detected