;

  for (const line in positions) {
    if (positions[line].length > 0) {
      lines.push(Number(line));
    }
  }

  return lines;
}

function setBreakableLines(cx, sourceId) {
  return async ({
    getState,
    dispatch,
    client
  }) => {
    let breakableLines;

    if ((0, _devtoolsSourceMap.isOriginalId)(sourceId)) {
      const positions = await dispatch((0, _breakpointPositions.setBreakpointPositions)({
        cx,
        sourceId
      }));
      breakableLines = calculateBreakableLines(positions);
      const existingBreakableLines = (0, _selectors.getBreakableLines)(getState(), sourceId);

      if (existingBreakableLines) {
        breakableLines = (0, _lodash.union)(existingBreakableLines, breakableLines);
      }

      dispatch({
        type: "SET_ORIGINAL_BREAKABLE_LINES",
        cx,
        sourceId,
        breakableLines
      });
    } else {
      const actors = (0, _selectors.getSourceActorsForSource)(getState(), sourceId);
      await Promise.all(actors.map(({
        id
      }) => dispatch((0, _sourceActors.loadSourceActorBreakableLines)({
        id,
        cx
      }))));
    }
  };
}PK