{"version":3,"sources":["webpack:///./node_modules/react-codemirror2/index.js"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_typeof","obj","Symbol","iterator","constructor","_extendStatics","__extends","extendStatics","d","b","setPrototypeOf","__proto__","Array","p","__","create","defineProperty","exports","value","cm","React","SERVER_RENDERED","navigator","global","Helper","equals","x","y","_this","ok","keys","tx","ty","every","Shared","editor","props","delegateCursor","position","scroll","focus","doc","getDoc","setCursor","delegateScroll","coordinates","scrollTo","delegateSelection","ranges","setSelections","selection","cursor","autoScroll","getOption","applyNext","next","preserved","autoCursor","applyUserDefined","wire","filter","test","forEach","prop","on","event","onBlur","onContextMenu","onCopy","onCursor","getCursor","onCursorActivity","onCut","onDblClick","onDragEnter","onDragLeave","onDragOver","onDragStart","onDrop","onFocus","lineNumber","gutter","onGutterClick","onKeyDown","onKeyPress","onKeyUp","onMouseDown","onPaste","line","element","onRenderLine","onScroll","getScrollInfo","data","onSelection","onTouchStart","onUpdate","from","to","onViewportChange","Controlled","_super","applied","appliedNext","appliedUserDefined","deferred","emulating","hydrated","initCb","editorDidConfigure","mounted","hydrate","_options","options","userDefinedOptions","defaults","some","setOption","mirror","resolveChange","initChange","lastLine","lastChar","getLine","replaceRange","ch","setValue","clearHistory","origin","undo","redo","text","mirrorChange","setHistory","getHistory","getValue","componentDidMount","defineMode","name","fn","ref","shared","cancel","phantomChange","onBeforeChange","onChange","editorDidMount","componentWillReceiveProps","nextProps","undefined","componentWillUnmount","editorWillUnmount","shouldComponentUpdate","nextState","render","className","createElement","self","Component","UnControlled","continueChange","detached","onBeforeChangeCb","detach","editorDidAttach","editorDidDetach","update"],"mappings":"6FAAA,YAEA,SAASA,WAYP,OAXAA,SAAWC,OAAOC,QAAU,SAASC,GACnC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GACvB,IAAK,IAAII,KAAOD,EACVN,OAAOQ,UAAUC,e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ASpD,KAAKoC,OAAOO,SAAS4B,aAG1CvE,KAAKgH,QAAQqC,GAERrJ,KAAKuG,UACRvG,KAAK8I,OAAO/I,MAAMC,KAAKqC,OACvBrC,KAAKuG,SAAU,GAGZvG,KAAKyG,qBACRzG,KAAK8I,OAAOnF,iBAAiB3D,KAAKqC,MAAOoB,GACzCzD,KAAKyG,oBAAqB,KAI9BuD,aAAapK,UAAU2J,qBAAuB,WACxCjI,GAEAtB,KAAKqC,MAAMmH,mBACbxJ,KAAKqC,MAAMmH,kBAAkBpI,IAIjC4I,aAAapK,UAAU6J,sBAAwB,SAASJ,EAAWK,GACjE,IAAIa,GAAS,EAGb,OAFIjJ,IAAiBiJ,GAAS,GAC1BvK,KAAKkK,WAAUK,GAAS,GACrBA,GAGTP,aAAapK,UAAU+J,OAAS,WAC9B,IAAI9H,EAAQ7B,KAEZ,GAAIsB,EAAiB,OAAO,KAC5B,IAAIsI,EAAY5J,KAAKqC,MAAMuH,UAAY,qBAAuB5J,KAAKqC,MAAMuH,UAAY,oBACrF,OAAOvI,EAAMwI,cAAc,MAAO,CAChCD,UAAWA,EACXf,IAAK,SAASA,IAAIiB,GAChB,OAAOjI,EAAMgH,IAAMiB,MAKlBE,aAtLU,CAuLjB3I,EAAM0I,WAER7I,EAAQ8I,aAAeA,I","file":"npm.react-codemirror2-5c8960687efdf8e3ec0f.js","sourcesContent":["'use strict';\n\nfunction _extends() {\n _extends = Object.assign || function(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n return _typeof(obj);\n}\n\nvar __extends = void 0 && (void 0).__extends || function() {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n }\n instanceof Array && function(d, b) {\n d.__proto__ = b;\n } || function(d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function(d, b) {\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\n\nvar React = require('react');\n\nvar SERVER_RENDERED = typeof navigator === 'undefined' || global['PREVENT_CODEMIRROR_RENDER'] === true;\nvar cm;\n\nif (!SERVER_RENDERED) {\n cm = require('codemirror');\n}\n\nvar Helper = function() {\n function Helper() {}\n\n Helper.equals = function(x, y) {\n var _this = this;\n\n var ok = Object.keys,\n tx = _typeof(x),\n ty = _typeof(y);\n\n return x && y && tx === 'object' && tx === ty ? ok(x).length === ok(y).length && ok(x).every(function(key) {\n return _this.equals(x[key], y[key]);\n }) : x === y;\n };\n\n return Helper;\n}();\n\nvar Shared = function() {\n function Shared(editor, props) {\n this.editor = editor;\n this.props = props;\n }\n\n Shared.prototype.delegateCursor = function(position, scroll, focus) {\n var doc = this.editor.getDoc();\n\n if (focus) {\n this.editor.focus();\n }\n\n scroll ? doc.setCursor(position) : doc.setCursor(position, null, {\n scroll: false\n });\n };\n\n Shared.prototype.delegateScroll = function(coordinates) {\n this.editor.scrollTo(coordinates.x, coordinates.y);\n };\n\n Shared.prototype.delegateSelection = function(ranges, focus) {\n var doc = this.editor.getDoc();\n doc.setSelections(ranges);\n\n if (focus) {\n this.editor.focus();\n }\n };\n\n Shared.prototype.apply = function(props) {\n if (props && props.selection && props.selection.ranges) {\n this.delegateSelection(props.selection.ranges, props.selection.focus || false);\n }\n\n if (props && props.cursor) {\n this.delegateCursor(props.cursor, props.autoScroll || false, this.editor.getOption('autofocus') || false);\n }\n\n if (props && props.scroll) {\n this.delegateScroll(props.scroll);\n }\n };\n\n Shared.prototype.applyNext = function(props, next, preserved) {\n if (props && props.selection && props.selection.ranges) {\n if (next && next.selection && next.selection.ranges && !Helper.equals(props.selection.ranges, next.selection.ranges)) {\n this.delegateSelection(next.selection.ranges, next.selection.focus || false);\n }\n }\n\n if (props && props.cursor) {\n if (next && next.cursor && !Helper.equals(props.cursor, next.cursor)) {\n this.delegateCursor(preserved.cursor || next.cursor, next.autoScroll || false, next.autoCursor || false);\n }\n }\n\n if (props && props.scroll) {\n if (next && next.scroll && !Helper.equals(props.scroll, next.scroll)) {\n this.delegateScroll(next.scroll);\n }\n }\n };\n\n Shared.prototype.applyUserDefined = function(props, preserved) {\n if (preserved && preserved.cursor) {\n this.delegateCursor(preserved.cursor, props.autoScroll || false, this.editor.getOption('autofocus') || false);\n }\n };\n\n Shared.prototype.wire = function(props) {\n var _this = this;\n\n Object.keys(props || {}).filter(function(p) {\n return /^on/.test(p);\n }).forEach(function(prop) {\n switch (prop) {\n case 'onBlur':\n {\n _this.editor.on('blur', function(cm, event) {\n _this.props.onBlur(_this.editor, event);\n });\n }\n break;\n\n case 'onContextMenu':\n {\n _this.editor.on('contextmenu', function(cm, event) {\n _this.props.onContextMenu(_this.editor, event);\n });\n\n break;\n }\n\n case 'onCopy':\n {\n _this.editor.on('copy', function(cm, event) {\n _this.props.onCopy(_this.editor, event);\n });\n\n break;\n }\n\n case 'onCursor':\n {\n _this.editor.on('cursorActivity', function(cm) {\n _this.props.onCursor(_this.editor, _this.editor.getDoc().getCursor());\n });\n }\n break;\n\n case 'onCursorActivity':\n {\n _this.editor.on('cursorActivity', function(cm) {\n _this.props.onCursorActivity(_this.editor);\n });\n }\n break;\n\n case 'onCut':\n {\n _this.editor.on('cut', function(cm, event) {\n _this.props.onCut(_this.editor, event);\n });\n\n break;\n }\n\n case 'onDblClick':\n {\n _this.editor.on('dblclick', function(cm, event) {\n _this.props.onDblClick(_this.editor, event);\n });\n\n break;\n }\n\n case 'onDragEnter':\n {\n _this.editor.on('dragenter', function(cm, event) {\n _this.props.onDragEnter(_this.editor, event);\n });\n }\n break;\n\n case 'onDragLeave':\n {\n _this.editor.on('dragleave', function(cm, event) {\n _this.props.onDragLeave(_this.editor, event);\n });\n\n break;\n }\n\n case 'onDragOver':\n {\n _this.editor.on('dragover', function(cm, event) {\n _this.props.onDragOver(_this.editor, event);\n });\n }\n break;\n\n case 'onDragStart':\n {\n _this.editor.on('dragstart', function(cm, event) {\n _this.props.onDragStart(_this.editor, event);\n });\n\n break;\n }\n\n case 'onDrop':\n {\n _this.editor.on('drop', function(cm, event) {\n _this.props.onDrop(_this.editor, event);\n });\n }\n break;\n\n case 'onFocus':\n {\n _this.editor.on('focus', function(cm, event) {\n _this.props.onFocus(_this.editor, event);\n });\n }\n break;\n\n case 'onGutterClick':\n {\n _this.editor.on('gutterClick', function(cm, lineNumber, gutter, event) {\n _this.props.onGutterClick(_this.editor, lineNumber, gutter, event);\n });\n }\n break;\n\n case 'onKeyDown':\n {\n _this.editor.on('keydown', function(cm, event) {\n _this.props.onKeyDown(_this.editor, event);\n });\n }\n break;\n\n case 'onKeyPress':\n {\n _this.editor.on('keypress', function(cm, event) {\n _this.props.onKeyPress(_this.editor, event);\n });\n }\n break;\n\n case 'onKeyUp':\n {\n _this.editor.on('keyup', function(cm, event) {\n _this.props.onKeyUp(_this.editor, event);\n });\n }\n break;\n\n case 'onMouseDown':\n {\n _this.editor.on('mousedown', function(cm, event) {\n _this.props.onMouseDown(_this.editor, event);\n });\n\n break;\n }\n\n case 'onPaste':\n {\n _this.editor.on('paste', function(cm, event) {\n _this.props.onPaste(_this.editor, event);\n });\n\n break;\n }\n\n case 'onRenderLine':\n {\n _this.editor.on('renderLine', function(cm, line, element) {\n _this.props.onRenderLine(_this.editor, line, element);\n });\n\n break;\n }\n\n case 'onScroll':\n {\n _this.editor.on('scroll', function(cm) {\n _this.props.onScroll(_this.editor, _this.editor.getScrollInfo());\n });\n }\n break;\n\n case 'onSelection':\n {\n _this.editor.on('beforeSelectionChange', function(cm, data) {\n _this.props.onSelection(_this.editor, data);\n });\n }\n break;\n\n case 'onTouchStart':\n {\n _this.editor.on('touchstart', function(cm, event) {\n _this.props.onTouchStart(_this.editor, event);\n });\n\n break;\n }\n\n case 'onUpdate':\n {\n _this.editor.on('update', function(cm) {\n _this.props.onUpdate(_this.editor);\n });\n }\n break;\n\n case 'onViewportChange':\n {\n _this.editor.on('viewportChange', function(cm, from, to) {\n _this.props.onViewportChange(_this.editor, from, to);\n });\n }\n break;\n }\n });\n };\n\n return Shared;\n}();\n\nvar Controlled = function(_super) {\n __extends(Controlled, _super);\n\n function Controlled(props) {\n var _this = _super.call(this, props) || this;\n\n if (SERVER_RENDERED) return _this;\n _this.applied = false;\n _this.appliedNext = false;\n _this.appliedUserDefined = false;\n _this.deferred = null;\n _this.emulating = false;\n _this.hydrated = false;\n\n _this.initCb = function() {\n if (_this.props.editorDidConfigure) {\n _this.props.editorDidConfigure(_this.editor);\n }\n };\n\n _this.mounted = false;\n return _this;\n }\n\n Controlled.prototype.hydrate = function(props) {\n var _this = this;\n\n var _options = props && props.options ? props.options : {};\n\n var userDefinedOptions = _extends({}, cm.defaults, this.editor.options, _options);\n\n var optionDelta = Object.keys(userDefinedOptions).some(function(key) {\n return _this.editor.getOption(key) !== userDefinedOptions[key];\n });\n\n if (optionDelta) {\n Object.keys(userDefinedOptions).forEach(function(key) {\n if (_options.hasOwnProperty(key)) {\n if (_this.editor.getOption(key) !== userDefinedOptions[key]) {\n _this.editor.setOption(key, userDefinedOptions[key]);\n\n _this.mirror.setOption(key, userDefinedOptions[key]);\n }\n }\n });\n }\n\n if (!this.hydrated) {\n this.deferred ? this.resolveChange() : this.initChange(props.value || '');\n }\n\n this.hydrated = true;\n };\n\n Controlled.prototype.initChange = function(value) {\n this.emulating = true;\n var doc = this.editor.getDoc();\n var lastLine = doc.lastLine();\n var lastChar = doc.getLine(doc.lastLine()).length;\n doc.replaceRange(value || '', {\n line: 0,\n ch: 0\n }, {\n line: lastLine,\n ch: lastChar\n });\n this.mirror.setValue(value);\n doc.clearHistory();\n this.mirror.clearHistory();\n this.emulating = false;\n };\n\n Controlled.prototype.resolveChange = function() {\n this.emulating = true;\n var doc = this.editor.getDoc();\n\n if (this.deferred.origin === 'undo') {\n doc.undo();\n } else if (this.deferred.origin === 'redo') {\n doc.redo();\n } else {\n doc.replaceRange(this.deferred.text, this.deferred.from, this.deferred.to, this.deferred.origin);\n }\n\n this.emulating = false;\n this.deferred = null;\n };\n\n Controlled.prototype.mirrorChange = function(deferred) {\n var doc = this.editor.getDoc();\n\n if (deferred.origin === 'undo') {\n doc.setHistory(this.mirror.getHistory());\n this.mirror.undo();\n } else if (deferred.origin === 'redo') {\n doc.setHistory(this.mirror.getHistory());\n this.mirror.redo();\n } else {\n this.mirror.replaceRange(deferred.text, deferred.from, deferred.to, deferred.origin);\n }\n\n return this.mirror.getValue();\n };\n\n Controlled.prototype.componentDidMount = function() {\n var _this = this;\n\n if (SERVER_RENDERED) return;\n\n if (this.props.defineMode) {\n if (this.props.defineMode.name && this.props.defineMode.fn) {\n cm.defineMode(this.props.defineMode.name, this.props.defineMode.fn);\n }\n }\n\n this.editor = cm(this.ref);\n this.shared = new Shared(this.editor, this.props);\n this.mirror = cm(function() {});\n this.editor.on('electricInput', function() {\n _this.mirror.setHistory(_this.editor.getDoc().getHistory());\n });\n this.editor.on('cursorActivity', function() {\n _this.mirror.setCursor(_this.editor.getDoc().getCursor());\n });\n this.editor.on('beforeChange', function(cm, data) {\n if (_this.emulating) {\n return;\n }\n\n data.cancel();\n _this.deferred = data;\n\n var phantomChange = _this.mirrorChange(_this.deferred);\n\n if (_this.props.onBeforeChange) _this.props.onBeforeChange(_this.editor, _this.deferred, phantomChange);\n });\n this.editor.on('change', function(cm, data) {\n if (!_this.mounted) {\n return;\n }\n\n if (_this.props.onChange) {\n _this.props.onChange(_this.editor, data, _this.editor.getValue());\n }\n });\n this.hydrate(this.props);\n this.shared.apply(this.props);\n this.applied = true;\n this.mounted = true;\n this.shared.wire(this.props);\n\n if (this.editor.getOption('autofocus')) {\n this.editor.focus();\n }\n\n if (this.props.editorDidMount) {\n this.props.editorDidMount(this.editor, this.editor.getValue(), this.initCb);\n }\n };\n\n Controlled.prototype.componentWillReceiveProps = function(nextProps) {\n if (SERVER_RENDERED) return;\n var preserved = {\n cursor: null\n };\n\n if (nextProps.value !== this.props.value) {\n this.hydrated = false;\n }\n\n if (!this.props.autoCursor && this.props.autoCursor !== undefined) {\n preserved.cursor = this.editor.getDoc().getCursor();\n }\n\n this.hydrate(nextProps);\n\n if (!this.appliedNext) {\n this.shared.applyNext(this.props, nextProps, preserved);\n this.appliedNext = true;\n }\n\n this.shared.applyUserDefined(this.props, preserved);\n this.appliedUserDefined = true;\n };\n\n Controlled.prototype.componentWillUnmount = function() {\n if (SERVER_RENDERED) return;\n\n if (this.props.editorWillUnmount) {\n this.props.editorWillUnmount(cm);\n }\n };\n\n Controlled.prototype.shouldComponentUpdate = function(nextProps, nextState) {\n return !SERVER_RENDERED;\n };\n\n Controlled.prototype.render = function() {\n var _this = this;\n\n if (SERVER_RENDERED) return null;\n var className = this.props.className ? 'react-codemirror2 ' + this.props.className : 'react-codemirror2';\n return React.createElement('div', {\n className: className,\n ref: function ref(self) {\n return _this.ref = self;\n }\n });\n };\n\n return Controlled;\n}(React.Component);\n\nexports.Controlled = Controlled;\n\nvar UnControlled = function(_super) {\n __extends(UnControlled, _super);\n\n function UnControlled(props) {\n var _this = _super.call(this, props) || this;\n\n if (SERVER_RENDERED) return _this;\n _this.applied = false;\n _this.appliedUserDefined = false;\n _this.continueChange = false;\n _this.detached = false;\n _this.hydrated = false;\n\n _this.initCb = function() {\n if (_this.props.editorDidConfigure) {\n _this.props.editorDidConfigure(_this.editor);\n }\n };\n\n _this.mounted = false;\n\n _this.onBeforeChangeCb = function() {\n _this.continueChange = true;\n };\n\n return _this;\n }\n\n UnControlled.prototype.hydrate = function(props) {\n var _this = this;\n\n var _options = props && props.options ? props.options : {};\n\n var userDefinedOptions = _extends({}, cm.defaults, this.editor.options, _options);\n\n var optionDelta = Object.keys(userDefinedOptions).some(function(key) {\n return _this.editor.getOption(key) !== userDefinedOptions[key];\n });\n\n if (optionDelta) {\n Object.keys(userDefinedOptions).forEach(function(key) {\n if (_options.hasOwnProperty(key)) {\n if (_this.editor.getOption(key) !== userDefinedOptions[key]) {\n _this.editor.setOption(key, userDefinedOptions[key]);\n }\n }\n });\n }\n\n if (!this.hydrated) {\n var doc = this.editor.getDoc();\n var lastLine = doc.lastLine();\n var lastChar = doc.getLine(doc.lastLine()).length;\n doc.replaceRange(props.value || '', {\n line: 0,\n ch: 0\n }, {\n line: lastLine,\n ch: lastChar\n });\n }\n\n this.hydrated = true;\n };\n\n UnControlled.prototype.componentDidMount = function() {\n var _this = this;\n\n if (SERVER_RENDERED) return;\n this.detached = this.props.detach === true;\n\n if (this.props.defineMode) {\n if (this.props.defineMode.name && this.props.defineMode.fn) {\n cm.defineMode(this.props.defineMode.name, this.props.defineMode.fn);\n }\n }\n\n this.editor = cm(this.ref);\n this.shared = new Shared(this.editor, this.props);\n this.editor.on('beforeChange', function(cm, data) {\n if (_this.props.onBeforeChange) {\n _this.props.onBeforeChange(_this.editor, data, _this.editor.getValue(), _this.onBeforeChangeCb);\n }\n });\n this.editor.on('change', function(cm, data) {\n if (!_this.mounted || !_this.props.onChange) {\n return;\n }\n\n if (_this.props.onBeforeChange) {\n if (_this.continueChange) {\n _this.props.onChange(_this.editor, data, _this.editor.getValue());\n }\n } else {\n _this.props.onChange(_this.editor, data, _this.editor.getValue());\n }\n });\n this.hydrate(this.props);\n this.shared.apply(this.props);\n this.applied = true;\n this.mounted = true;\n this.shared.wire(this.props);\n this.editor.getDoc().clearHistory();\n\n if (this.props.editorDidMount) {\n this.props.editorDidMount(this.editor, this.editor.getValue(), this.initCb);\n }\n };\n\n UnControlled.prototype.componentWillReceiveProps = function(nextProps) {\n if (this.detached && nextProps.detach === false) {\n this.detached = false;\n\n if (this.props.editorDidAttach) {\n this.props.editorDidAttach(this.editor);\n }\n }\n\n if (!this.detached && nextProps.detach === true) {\n this.detached = true;\n\n if (this.props.editorDidDetach) {\n this.props.editorDidDetach(this.editor);\n }\n }\n\n if (SERVER_RENDERED || this.detached) return;\n var preserved = {\n cursor: null\n };\n\n if (nextProps.value !== this.props.value) {\n this.hydrated = false;\n this.applied = false;\n this.appliedUserDefined = false;\n }\n\n if (!this.props.autoCursor && this.props.autoCursor !== undefined) {\n preserved.cursor = this.editor.getDoc().getCursor();\n }\n\n this.hydrate(nextProps);\n\n if (!this.applied) {\n this.shared.apply(this.props);\n this.applied = true;\n }\n\n if (!this.appliedUserDefined) {\n this.shared.applyUserDefined(this.props, preserved);\n this.appliedUserDefined = true;\n }\n };\n\n UnControlled.prototype.componentWillUnmount = function() {\n if (SERVER_RENDERED) return;\n\n if (this.props.editorWillUnmount) {\n this.props.editorWillUnmount(cm);\n }\n };\n\n UnControlled.prototype.shouldComponentUpdate = function(nextProps, nextState) {\n var update = true;\n if (SERVER_RENDERED) update = false;\n if (this.detached) update = false;\n return update;\n };\n\n UnControlled.prototype.render = function() {\n var _this = this;\n\n if (SERVER_RENDERED) return null;\n var className = this.props.className ? 'react-codemirror2 ' + this.props.className : 'react-codemirror2';\n return React.createElement('div', {\n className: className,\n ref: function ref(self) {\n return _this.ref = self;\n }\n });\n };\n\n return UnControlled;\n}(React.Component);\n\nexports.UnControlled = UnControlled;"],"sourceRoot":""}