import { __require as requireUserAgent } from '../../../../fbjs@2.0.0/node_modules/fbjs/lib/UserAgent.js';
import { __require as requireEditOnBeforeInput } from './editOnBeforeInput.js';
import { __require as requireEditOnBlur } from './editOnBlur.js';
import { __require as requireEditOnCompositionStart } from './editOnCompositionStart.js';
import { __require as requireEditOnCopy } from './editOnCopy.js';
import { __require as requireEditOnCut } from './editOnCut.js';
import { __require as requireEditOnDragOver } from './editOnDragOver.js';
import { __require as requireEditOnDragStart } from './editOnDragStart.js';
import { __require as requireEditOnFocus } from './editOnFocus.js';
import { __require as requireEditOnInput } from './editOnInput.js';
import { __require as requireEditOnKeyDown } from './editOnKeyDown.js';
import { __require as requireEditOnPaste } from './editOnPaste.js';
import { __require as requireEditOnSelect } from './editOnSelect.js';

/**
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @format
 * 
 * @emails oncall+draft_js
 */

var DraftEditorEditHandler_1;
var hasRequiredDraftEditorEditHandler;

function requireDraftEditorEditHandler () {
	if (hasRequiredDraftEditorEditHandler) return DraftEditorEditHandler_1;
	hasRequiredDraftEditorEditHandler = 1;

	var UserAgent = requireUserAgent();

	var onBeforeInput = requireEditOnBeforeInput();

	var onBlur = requireEditOnBlur();

	var onCompositionStart = requireEditOnCompositionStart();

	var onCopy = requireEditOnCopy();

	var onCut = requireEditOnCut();

	var onDragOver = requireEditOnDragOver();

	var onDragStart = requireEditOnDragStart();

	var onFocus = requireEditOnFocus();

	var onInput = requireEditOnInput();

	var onKeyDown = requireEditOnKeyDown();

	var onPaste = requireEditOnPaste();

	var onSelect = requireEditOnSelect();

	var isChrome = UserAgent.isBrowser('Chrome');
	var isFirefox = UserAgent.isBrowser('Firefox');
	var selectionHandler = isChrome || isFirefox ? onSelect : function (e) {};
	var DraftEditorEditHandler = {
	  onBeforeInput: onBeforeInput,
	  onBlur: onBlur,
	  onCompositionStart: onCompositionStart,
	  onCopy: onCopy,
	  onCut: onCut,
	  onDragOver: onDragOver,
	  onDragStart: onDragStart,
	  onFocus: onFocus,
	  onInput: onInput,
	  onKeyDown: onKeyDown,
	  onPaste: onPaste,
	  onSelect: onSelect,
	  // In certain cases, contenteditable on chrome does not fire the onSelect
	  // event, causing problems with cursor positioning. Therefore, the selection
	  // state update handler is added to more events to ensure that the selection
	  // state is always synced with the actual cursor positions.
	  onMouseUp: selectionHandler,
	  onKeyUp: selectionHandler
	};
	DraftEditorEditHandler_1 = DraftEditorEditHandler;
	return DraftEditorEditHandler_1;
}

export { requireDraftEditorEditHandler as __require };
//# sourceMappingURL=DraftEditorEditHandler.js.map
