<commit_before>import { FieldSchema } from '@ephox/boulder';
import { window } from '@ephox/dom-globals';
import { VisualViewport } from '@ephox/sugar';

import * as Fields from '../../data/Fields';
import { Bounds } from '../../alien/Boxes';

const defaultLazyViewport = (): Bounds => {
  return VisualViewport.getBounds(window);
};

export default FieldSchema.optionObjOf('snaps', [
  FieldSchema.strict('getSnapPoints'),
  Fields.onHandler('onSensor'),
  FieldSchema.strict('leftAttr'),
  FieldSchema.strict('topAttr'),
  FieldSchema.defaulted('lazyViewport', defaultLazyViewport)
]);<commit_msg>TINY-4078: remove duplicate code<commit_after>import { FieldSchema } from '@ephox/boulder';

import * as Fields from '../../data/Fields';
import * as Boxes from '../../alien/Boxes';

export default FieldSchema.optionObjOf('snaps', [
  FieldSchema.strict('getSnapPoints'),
  Fields.onHandler('onSensor'),
  FieldSchema.strict('leftAttr'),
  FieldSchema.strict('topAttr'),
  FieldSchema.defaulted('lazyViewport', Boxes.win)
]);
{'fraction_non_alphanumeric': 0.169921875, 'fraction_numerical': 0.00390625, 'mean_word_length': 5.528662420382165, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, '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': '4362816', 'n_tokens_mistral': 326, 'n_tokens_neox': 327, 'n_words': 61}