<commit_before>/* global internalScope */

(function () {
  function offsetPathParse (input) {
    var parseAngleAsDegrees = internalScope.parseAngleAsDegrees;
    var isInArray = internalScope.isInArray;
    // https://drafts.fxtf.org/motion-1/#offset-path-property

    if (input === 'none') {
      return {type: null, input: null};
    }

    var ray = /^ray\((.*)\)$/.exec(input);
    var path = /^path\((.*)\)$/.exec(input);

    if (ray === null && path === null) {
      return undefined;
    } else if (ray !== null) {
      var rayInput = ray[1].split(/\s+/);
      if (rayInput.length > 3) {
        return undefined;
      }

      var result = {type: 'ray', input: null, contain: false, size: null};
      var validSizes = ['closest-side', 'farthest-side', 'closest-corner', 'farthest-corner'];

      for (var i = 0; i < rayInput.length; i++) {
        if (rayInput[i] === 'contain' && !result.contain) {
          result.contain = true;
        } else if (isInArray(validSizes, rayInput[i])) {
          if (result.size === null) {
            result.size = rayInput[i];
          } else {
            return undefined;
          }
        } else if (result.input === null) {
          var rayInputDegrees = parseAngleAsDegrees(rayInput[i]);
          if (rayInputDegrees === null) {
            return undefined;
          }
          result.input = rayInputDegrees;
        } else {
          return undefined;
        }
      }
      return result;
    } else if (path !== null) {
      var pathInput = path[1];
      return {type: 'path', input: pathInput};
    }
  }

  function offsetPathMerge (start, end) {
    function serializeParsed (angle, contain, size, type) {
      if (type === 'ray') {<commit_msg>changes according to review comments.<commit_after>/* global internalScope */

(function () {
  function offsetPathParse (input) {
    var parseAngleAsDegrees = internalScope.parseAngleAsDegrees;
    var isInArray = internalScope.isInArray;
    // https://drafts.fxtf.org/motion-1/#offset-path-property

    if (input === 'none') {
      return {type: null, input: null};
    }

    var ray = /^ray\((.*)\)$/.exec(input);
    var path = /^path\((.*)\)$/.exec(input);

    if (ray === null && path === null) {
      return undefined;
    } else if (ray !== null) {
      var rayInput = ray[1].split(/\s+/);
      if (rayInput.length > 3) {
        return undefined;
      }

      var result = {type: 'ray', input: null, contain: false, size: null};
      var validSizes = ['closest-side', 'farthest-side', 'closest-corner', 'farthest-corner'];

      for (var i = 0; i < rayInput.length; i++) {
        if (rayInput[i] === 'contain') {
          if (result.contain) {
            return undefined;
          }
          result.contain = true;
        } else if (isInArray(validSizes, rayInput[i])) {
          if (result.size === null) {
            result.size = rayInput[i];
          } else {
            return undefined;
          }
        } else if (result.input === null) {
          var rayInputDegrees = parseAngleAsDegrees(rayInput[i]);
          if (rayInputDegrees === null) {
            return undefined;
          }
          result.input = rayInputDegrees;
        } else {
          return undefined;
        }
      }
      return result;
    } else if (path !== null) {
      var pathInput = path[1];
      return {type: 'path', input: pathInput};
    }
  }

  function offsetPathMerge (start, end) {
    function serializeParsed (angle, contain, size, type) {
      if (type === 'ray') {
{'fraction_non_alphanumeric': 0.15521628498727735, 'fraction_numerical': 0.0028272547356516823, 'mean_word_length': 2.1035087719298247, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1953830', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1085, 'n_words': 271}