tocco-devcon 1.0.3 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/changelog.md +20 -0
  2. package/dist/0b923a43967ff893ec63b92dc4f19017.js +1 -0
  3. package/dist/25894751679e07fd95b21d0d3f6c8c8b.js +1 -0
  4. package/dist/54560f13b36626237959e93b7771a484.js +1 -0
  5. package/dist/58c35e5c73bbc1664bbd67c570342aa0.js +1 -0
  6. package/dist/637e363c105dce85c12fb99d7ef2fa7d.js +1 -0
  7. package/dist/8423f61a6b43ebee39273fd08e332d47.js +1 -0
  8. package/dist/8f5997c65fc8937aa89d15d9a7237f63.js +1 -0
  9. package/dist/a2d3450d9a39c72312a0afa486269a02.js +1 -0
  10. package/dist/a4d638b976f02f35740be031f996e088.js +1 -0
  11. package/dist/aa0619cbb003e1dd873d027494aa84c4.js +1 -0
  12. package/dist/cf26dd07f19bcb5b7efbf057a6cfeb8f.js +1 -0
  13. package/dist/cf9c7cbfc2b609b9ae59daeab82719c4.js +1 -0
  14. package/dist/chunk-314.e86335551ef008332d0b.js +1 -0
  15. package/dist/chunk-333.6e2b4bd987bb0a389434.js +1 -0
  16. package/dist/chunk-696.6412df2b10fa072eaf80.js +13 -0
  17. package/dist/chunk-82.d8e2f9fc408d506ceb28.js +13 -0
  18. package/dist/chunk-code-editor.d24ffee05722047a1a7d.js +1 -0
  19. package/dist/chunk-vendor-fontawesome.511607848878b714a005.js +7 -0
  20. package/dist/chunk-vendor-libphonenumber-js.d1823895c9e1013739f8.js +1 -0
  21. package/dist/e56fe7e8042772742953d0daa47cd621.js +1 -0
  22. package/dist/f9891d13237b59ce53f07874ab7a711b.js +1 -0
  23. package/dist/fc00657a30e4c8d53e47374ba0b1e8bf.js +1 -0
  24. package/dist/index.js +9 -10
  25. package/package.json +1 -1
  26. package/dist/18e63e724098792b95b076412a860636.js +0 -1
  27. package/dist/6fe3f0823e345813c2084b243cb6650b.js +0 -1
  28. package/dist/77dd68f6396b8ab4ce2c238d6ddb5354.js +0 -1
  29. package/dist/chunk-277.0af81c9b7e1548b99110.js +0 -2
  30. package/dist/chunk-277.0af81c9b7e1548b99110.js.map +0 -1
  31. package/dist/chunk-378.5ad4b80176f57ab52eed.js +0 -2
  32. package/dist/chunk-378.5ad4b80176f57ab52eed.js.map +0 -1
  33. package/dist/chunk-669.8a80f3127dd26f6aa3cc.js +0 -18
  34. package/dist/chunk-669.8a80f3127dd26f6aa3cc.js.map +0 -1
  35. package/dist/chunk-687.51f51a01b7ab160061d4.js +0 -2
  36. package/dist/chunk-687.51f51a01b7ab160061d4.js.map +0 -1
  37. package/dist/chunk-696.14f872b12be45b6b73b6.js +0 -2
  38. package/dist/chunk-696.14f872b12be45b6b73b6.js.map +0 -1
  39. package/dist/chunk-82.c072846d20587bb0bb2a.js +0 -2
  40. package/dist/chunk-82.c072846d20587bb0bb2a.js.map +0 -1
  41. package/dist/chunk-code-editor.a05c61137cf171c6945b.js +0 -2
  42. package/dist/chunk-code-editor.a05c61137cf171c6945b.js.map +0 -1
  43. package/dist/chunk-vendor-fontawesome.ba189cb93222b9d56bac.js +0 -6
  44. package/dist/chunk-vendor-libphonenumber-js.37b12356c360c7f4fa63.js +0 -1
  45. package/dist/index.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tocco-devcon",
3
- "version": "1.0.3",
3
+ "version": "1.0.6",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1 +0,0 @@
1
- ace.define("ace/mode/vhdl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,r){"use strict";var o=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,n=function(){var e=this.createKeywordMapper({"keyword.operator":"abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|srasrl|xnor|xor",keyword:"access|after|ailas|all|architecture|assert|attribute|begin|block|buffer|bus|case|component|configuration|disconnect|downto|else|elsif|end|entity|file|for|function|generate|generic|guarded|if|impure|in|inertial|inout|is|label|linkage|literal|loop|mapnew|next|of|on|open|others|out|port|process|pure|range|record|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|united|until|wait|when|while|with","constant.language":"true|false|null","storage.modifier":"array|constant","storage.type":"bit|bit_vector|boolean|character|integer|line|natural|positive|real|register|signed|std_logic|std_logic_vector|string||text|time|unsigned|variable"},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"keyword",regex:"\\s*(?:library|package|use)\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>"},{token:"punctuation.operator",regex:"\\'|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[(]"},{token:"paren.rparen",regex:"[\\])]"},{token:"text",regex:"\\s+"}]}};o.inherits(n,i),t.VHDLHighlightRules=n})),ace.define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules"],(function(e,t,r){"use strict";var o=e("../lib/oop"),i=e("./text").Mode,n=e("./vhdl_highlight_rules").VHDLHighlightRules,a=function(){this.HighlightRules=n,this.$behaviour=this.$defaultBehaviour};o.inherits(a,i),function(){this.lineCommentStart="--",this.$id="ace/mode/vhdl"}.call(a.prototype),t.Mode=a})),ace.require(["ace/mode/vhdl"],(function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}));
@@ -1 +0,0 @@
1
- ace.define("ace/ext/hardwrap",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range;t.hardWrap=function(e,t){for(var n=t.column||e.getOption("printMarginColumn"),o=Math.min(t.startRow,t.endRow),i=Math.max(t.startRow,t.endRow),a=e.session;o<=i;){var s=a.getLine(o);if(s.length>n)(l=f(s,n,5))&&a.replace(new r(o,l.start,o,l.end),"\n"),i++;else if(/\S/.test(s)&&o!=i){var c=a.getLine(o+1);if(c&&/\S/.test(c)){var l,u=s.replace(/\s+$/,""),h=c.replace(/^\s+/,""),d=u+" "+h;if((l=f(d,n,5))&&l.start>u.length||d.length<n){var p=new r(o,u.length,o+1,c.length-h.length);a.replace(p," "),o--,i--}}}o++}function f(e,t,n){if(!(e.length<t)){var r=e.slice(0,t),o=e.slice(t),i=/^(?:(\s+)|(\S+)(\s+))/.exec(o),a=/(?:(\s+)|(\s+)(\S+))$/.exec(r),s=0,c=0;return a&&!a[2]&&(s=t-a[1].length,c=t),i&&!i[2]&&(s||(s=t),c=t+i[1].length),s?{start:s,end:c}:a&&a[2]&&a.index>n?{start:a.index,end:a.index+a[3].length}:void 0}}}})),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],(function(e,t,n){"use strict";var r=e("../range").Range,o=e("../lib/event_emitter").EventEmitter,i=e("../lib/dom"),a=e("../lib/oop"),s=e("../lib/keys"),c=e("../lib/event"),l=e("../search").Search,u=e("../lib/useragent"),h=e("../search_highlight").SearchHighlight,d=e("../commands/multi_select_commands"),p=e("../mode/text").Mode.prototype.tokenRe,f=e("../ext/hardwrap").hardWrap;e("../multi_select");var m=function(e){this.ace=e,this.state={},this.marks={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};function g(e){return{row:e.line,column:e.ch}}function v(e){return new w(e.row,e.column)}m.Pos=function(e,t){if(!(this instanceof w))return new w(e,t);this.line=e,this.ch=t},m.defineOption=function(e,t,n){},m.commands={redo:function(e){e.ace.redo()},undo:function(e){e.ace.undo()},newlineAndIndent:function(e){e.ace.insert("\n")}},m.keyMap={},m.addClass=m.rmClass=function(){},m.e_stop=m.e_preventDefault=c.stopEvent,m.keyName=function(e){var t=s[e.keyCode]||e.key||"";return 1==t.length&&(t=t.toUpperCase()),t=c.getModifierString(e).replace(/(^|-)\w/g,(function(e){return e.toUpperCase()}))+t},m.keyMap.default=function(e){return function(t){var n=t.ace.commands.commandKeyBinding[e.toLowerCase()];return n&&!1!==t.ace.execCommand(n)}},m.lookupKey=function e(t,n,r){n||(n="default"),"string"==typeof n&&(n=m.keyMap[n]);var o="function"==typeof n?n(t):n[t];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&r(o))return"handled";if(n.fallthrough){if(!Array.isArray(n.fallthrough))return e(t,n.fallthrough,r);for(var i=0;i<n.fallthrough.length;i++){var a=e(t,n.fallthrough[i],r);if(a)return a}}},m.findMatchingTag=function(e,t){},m.signal=function(e,t,n){return e._signal(t,n)},m.on=c.addListener,m.off=c.removeListener,m.isWordChar=function(e){return e<""?/^\w$/.test(e):(p.lastIndex=0,p.test(e))},function(){a.implement(m.prototype,o),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(e){var t={text:"i"==e.action[0]?e.lines:[]},n=this.curOp=this.curOp||{};n.changeHandlers||(n.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),n.lastChange?n.lastChange.next=n.lastChange=t:n.lastChange=n.change=t,this.$updateMarkers(e)},this.onSelectionChange=function(){var e=this.curOp=this.curOp||{};e.cursorActivityHandlers||(e.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(d.keyboardHandler)},this.operation=function(e,t){if(!t&&this.curOp||t&&this.curOp&&this.curOp.force)return e();if(!t&&this.ace.curOp||this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var n=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var r=this.curOp=this.curOp||{};this.curOp.force=t;var o=e();return this.ace.curOp&&"vim"==this.ace.curOp.command.name&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=!1),this.ace.endOperation(),r.cursorActivity||r.lastChange||!n||(this.ace.prevOp=n)),!t&&this.ace.curOp||this.curOp&&this.onBeforeEndOperation(),o},this.onBeforeEndOperation=function(){var e=this.curOp;e&&(e.change&&this.signal("change",e.change,e),e&&e.cursorActivity&&this.signal("cursorActivity",null,e),this.curOp=null)},this.signal=function(e,t,n){var r=n?n[e+"Handlers"]:(this._eventRegistry||{})[e];if(r){r=r.slice();for(var o=0;o<r.length;o++)r[o](this,t)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(e,t){"object"==typeof e&&(t=e.ch,e=e.line);var n=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:e,column:t}),this.ace.selection.moveTo(e,t),n&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(e){var t=this.ace.selection;return v("anchor"==e?t.isEmpty()?t.lead:t.anchor:"head"!=e&&e?t.getRange()[e]:t.lead)},this.listSelections=function(e){var t=this.ace.multiSelect.rangeList.ranges;return!t.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:t.map((function(e){return{anchor:this.clipPos(v(e.cursor==e.end?e.start:e.end)),head:this.clipPos(v(e.cursor))}}),this)},this.setSelections=function(e,t){var n=this.ace.multiSelect,o=e.map((function(e){var t=g(e.anchor),n=g(e.head),o=r.comparePoints(t,n)<0?new r.fromPoints(t,n):new r.fromPoints(n,t);return o.cursor=r.comparePoints(o.start,n)?o.end:o.start,o}));if(this.ace.inVirtualSelectionMode)this.ace.selection.fromOrientedRange(o[0]);else{t?o[t]&&o.push(o.splice(t,1)[0]):o=o.reverse(),n.toSingleRange(o[0].clone());for(var i=this.ace.session,a=0;a<o.length;a++){var s=i.$clipRangeToDocument(o[a]);n.addRange(s)}}},this.setSelection=function(e,t,n){var r=this.ace.selection;r.moveTo(e.line,e.ch),r.selectTo(t.line,t.ch),n&&"*mouse"==n.origin&&this.onBeforeEndOperation()},this.somethingSelected=function(e){return!this.ace.selection.isEmpty()},this.clipPos=function(e){return v(this.ace.session.$clipPositionToDocument(e.line,e.ch))},this.foldCode=function(e){this.ace.session.$toggleFoldWidget(e.line,{})},this.markText=function(e){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(e){var t="insert"==e.action,n=e.start,o=e.end,i=(o.row-n.row)*(t?1:-1),a=(o.column-n.column)*(t?1:-1);for(var s in t&&(o=n),this.marks){var c=this.marks[s],l=r.comparePoints(c,n);if(!(l<0)){if(0===l&&t){if(1!=c.bias){c.bias=-1;continue}l=1}var u=t?l:r.comparePoints(c,o);u>0?(c.row+=i,c.column+=c.row==o.row?a:0):!t&&u<=0&&(c.row=n.row,c.column=n.column,0===u&&(c.bias=1))}}};var e=function(e,t,n,r){this.cm=e,this.id=t,this.row=n,this.column=r,e.marks[this.id]=this};e.prototype.clear=function(){delete this.cm.marks[this.id]},e.prototype.find=function(){return v(this)},this.setBookmark=function(t,n){var r=new e(this,this.$uid++,t.line,t.ch);return n&&n.insertLeft||(r.$insertRight=!0),this.marks[r.id]=r,r},this.moveH=function(e,t){if("char"==t){var n=this.ace.selection;n.clearSelection(),n.moveCursorBy(0,e)}},this.findPosV=function(e,t,n,r){if("page"==n){var o=this.ace.renderer.layerConfig;t*=Math.floor(o.height/o.lineHeight),n="line"}if("line"==n){var i=this.ace.session.documentToScreenPosition(e.line,e.ch);return null!=r&&(i.column=r),i.row+=t,i.row=Math.min(Math.max(0,i.row),this.ace.session.getScreenLength()-1),v(this.ace.session.screenToDocumentPosition(i.row,i.column))}},this.charCoords=function(e,t){if("div"==t||!t)return{left:(r=this.ace.session.documentToScreenPosition(e.line,e.ch)).column,top:r.row};if("local"==t){var n=this.ace.renderer,r=this.ace.session.documentToScreenPosition(e.line,e.ch),o=n.layerConfig.lineHeight,i=n.layerConfig.characterWidth,a=o*r.row;return{left:r.column*i,top:a,bottom:a+o}}},this.coordsChar=function(e,t){var n=this.ace.renderer;if("local"==t){var r=Math.max(0,Math.floor(e.top/n.lineHeight)),o=Math.max(0,Math.floor(e.left/n.characterWidth));return v(n.session.screenToDocumentPosition(r,o))}if("div"==t)throw"not implemented"},this.getSearchCursor=function(e,t,n){var r=!1,o=!1;e instanceof RegExp&&!e.global&&(r=!e.ignoreCase,e=e.source,o=!0),"\\n"==e&&(e="\n",o=!1);var i=new l;null==t.ch&&(t.ch=Number.MAX_VALUE);var a={row:t.line,column:t.ch},s=this,c=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){i.setOptions({needle:e,caseSensitive:r,wrap:!1,backwards:t,regExp:o,start:c||a});var n=i.find(s.ace.session);return(c=n)&&[!c.isEmpty()]},from:function(){return c&&v(c.start)},to:function(){return c&&v(c.end)},replace:function(e){c&&(c.end=s.ace.session.doc.replace(c,e))}}},this.scrollTo=function(e,t){var n=this.ace.renderer,r=n.layerConfig,o=r.maxHeight;o-=(n.$size.scrollerHeight-n.lineHeight)*n.$scrollPastEnd,null!=t&&this.ace.session.setScrollTop(Math.max(0,Math.min(t,o))),null!=e&&this.ace.session.setScrollLeft(Math.max(0,Math.min(e,r.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(e,t){if(e){var n=this.ace.renderer,r={top:0,bottom:t};n.scrollCursorIntoView(g(e),2*n.lineHeight/n.$size.scrollerHeight,r)}},this.getLine=function(e){return this.ace.session.getLine(e)},this.getRange=function(e,t){return this.ace.session.getTextRange(new r(e.line,e.ch,t.line,t.ch))},this.replaceRange=function(e,t,n){n||(n=t);var o=new r(t.line,t.ch,n.line,n.ch);return this.ace.session.$clipRangeToDocument(o),this.ace.session.replace(o,e)},this.replaceSelection=this.replaceSelections=function(e){var t=this.ace.selection;if(this.ace.inVirtualSelectionMode)this.ace.session.replace(t.getRange(),e[0]||"");else{t.inVirtualSelectionMode=!0;var n=t.rangeList.ranges;n.length||(n=[this.ace.multiSelect.getRange()]);for(var r=n.length;r--;)this.ace.session.replace(n[r],e[r]||"");t.inVirtualSelectionMode=!1}},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map((function(e){return this.getRange(e.anchor,e.head)}),this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var t={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(e,n){switch(this.state[e]=n,e){case"indentWithTabs":e=t[e],n=!n;break;case"keyMap":return void(this.state.$keyMap=n);default:e=t[e]}e&&this.ace.setOption(e,n)},this.getOption=function(e,n){var r=t[e];switch(r&&(n=this.ace.getOption(r)),e){case"indentWithTabs":return e=t[e],!n;case"keyMap":return this.state.$keyMap}return r?n:this.state[e]},this.toggleOverwrite=function(e){return this.state.overwrite=e,this.ace.setOverwrite(e)},this.addOverlay=function(e){if(!this.$searchHighlight||!this.$searchHighlight.session){var t=new h(null,"ace_highlight-marker","text"),n=this.ace.session.addDynamicMarker(t);t.id=n.id,t.session=this.ace.session,t.destroy=function(e){t.session.off("change",t.updateOnChange),t.session.off("changeEditor",t.destroy),t.session.removeMarker(t.id),t.session=null},t.updateOnChange=function(e){var n=e.start.row;n==e.end.row?t.cache[n]=void 0:t.cache.splice(n,t.cache.length)},t.session.on("changeEditor",t.destroy),t.session.on("change",t.updateOnChange)}var r=new RegExp(e.query.source,"gmi");this.$searchHighlight=e.highlight=t,this.$searchHighlight.setRegexp(r),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(e){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var e=this.ace.renderer,t=e.layerConfig;return{left:e.scrollLeft,top:e.scrollTop,height:t.maxHeight,width:t.width,clientHeight:t.height,clientWidth:t.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(e){return this.ace.setValue(e,-1)},this.getTokenTypeAt=function(e){var t=this.ace.session.getTokenAt(e.line,e.ch);return t&&/comment|string/.test(t.type)?"string":""},this.findMatchingBracket=function(e){var t=this.ace.session.findMatchingBracket(g(e));return{to:t&&v(t)}},this.indentLine=function(e,t){!0===t?this.ace.session.indentRows(e,e,"\t"):!1===t&&this.ace.session.outdentRows(new r(e,0,e,0))},this.indexFromPos=function(e){return this.ace.session.doc.positionToIndex(g(e))},this.posFromIndex=function(e){return v(this.ace.session.doc.indexToPosition(e))},this.focus=function(e){return this.ace.textInput.focus()},this.blur=function(e){return this.ace.blur()},this.defaultTextHeight=function(e){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(e,t,n,r){var o=r.bracketRegex.source,i=/paren|text|operator|tag/;if(1==t)var a=this.ace.session.$findClosingBracket(o.slice(1,2),g(e),i);else a=this.ace.session.$findOpeningBracket(o.slice(-2,-1),{row:e.line,column:e.ch+1},i);return a&&{pos:v(a)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(e){"indentAuto"==e?this.ace.execCommand("autoindent"):console.log(e+" is not implemented")},this.getLineNumber=function(e){return e.row},this.getLineHandle=function(e){return{text:this.ace.session.getLine(e),row:e}}}.call(m.prototype),(m.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0}).prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var n=t==e;else n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}},m.defineExtension=function(e,t){m.prototype[e]=t},i.importCssString(".normal-mode .ace_cursor{ border: none; background-color: rgba(255,0,0,0.5);}.normal-mode .ace_hidden-cursors .ace_cursor{ background-color: transparent; border: 1px solid red; opacity: 0.7}.ace_dialog { position: absolute; left: 0; right: 0; background: inherit; z-index: 15; padding: .1em .8em; overflow: hidden; color: inherit;}.ace_dialog-top { border-bottom: 1px solid #444; top: 0;}.ace_dialog-bottom { border-top: 1px solid #444; bottom: 0;}.ace_dialog input { border: none; outline: none; background: transparent; width: 20em; color: inherit; font-family: monospace;}","vimMode",!1),function(){function e(e,t,n){var r;return(r=e.ace.container.appendChild(document.createElement("div"))).className=n?"ace_dialog ace_dialog-bottom":"ace_dialog ace_dialog-top","string"==typeof t?r.innerHTML=t:r.appendChild(t),r}function t(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}m.defineExtension("openDialog",(function(n,r,o){if(!this.virtualSelectionMode()){o||(o={}),t(this,null);var i=e(this,n,o.bottom),a=!1,s=this;this.state.dialog=i;var c,l=i.getElementsByTagName("input")[0];return l?(o.value&&(l.value=o.value,!1!==o.selectValueOnOpen&&l.select()),o.onInput&&m.on(l,"input",(function(e){o.onInput(e,l.value,u)})),o.onKeyUp&&m.on(l,"keyup",(function(e){o.onKeyUp(e,l.value,u)})),m.on(l,"keydown",(function(e){o&&o.onKeyDown&&o.onKeyDown(e,l.value,u)||(13==e.keyCode&&r(l.value),(27==e.keyCode||!1!==o.closeOnEnter&&13==e.keyCode)&&(l.blur(),m.e_stop(e),u()))})),!1!==o.closeOnBlur&&m.on(l,"blur",u),l.focus()):(c=i.getElementsByTagName("button")[0])&&(m.on(c,"click",(function(){u(),s.focus()})),!1!==o.closeOnBlur&&m.on(c,"blur",u),c.focus()),u}function u(e){if("string"==typeof e)l.value=e;else{if(a)return;if(e&&"blur"==e.type&&document.activeElement===l)return;s.state.dialog=null,a=!0,i.parentNode.removeChild(i),s.focus(),o.onClose&&o.onClose(i);var t=s;t.state.vim&&(t.state.vim.status=null,t.ace._signal("changeStatus"),t.ace.renderer.$loop.schedule(t.ace.renderer.CHANGE_CURSOR))}}})),m.defineExtension("openNotification",(function(n,r){if(!this.virtualSelectionMode()){t(this,c);var o,i=e(this,n,r&&r.bottom),a=!1,s=r&&void 0!==r.duration?r.duration:5e3;return m.on(i,"click",(function(e){m.e_preventDefault(e),c()})),s&&(o=setTimeout(c,s)),c}function c(){a||(a=!0,clearTimeout(o),i.parentNode.removeChild(i))}}))}();var y=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<Del>",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],C=y.length,k=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"global",shortName:"g"}],w=m.Pos,x=function(){return ne};function S(e,t){this==m.keyMap.vim&&m.rmClass(e.getWrapperElement(),"cm-fat-cursor"),t&&t.attach==M||function(e){e.setOption("disableInput",!1),e.off("cursorActivity",mt),m.off(e.getInputField(),"paste",O(e)),e.state.vim=null}(e)}function M(e,t){this==m.keyMap.vim&&m.addClass(e.getWrapperElement(),"cm-fat-cursor"),t&&t.attach==M||function(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),m.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",mt),ee(e),m.on(e.getInputField(),"paste",O(e))}(e)}function A(e,t){if(t){if(this[e])return this[e];var n=function(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),n=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==n.length)return!1;for(var r=!1,o=0;o<t.length;o++){var i=t[o];i in b?t[o]=b[i]:r=!0,i in L&&(t[o]=L[i])}if(!r)return!1;j(n)&&(t[t.length-1]=n.toLowerCase());return"<"+t.join("-")+">"}(e);if(!n)return!1;var r=m.Vim.findKey(t,n);return"function"==typeof r&&m.signal(t,"vim-keypress",n),r}}m.defineOption("vimMode",!1,(function(e,t,n){t&&"vim"!=e.getOption("keyMap")?e.setOption("keyMap","vim"):!t&&n!=m.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")}));var b={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},L={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function O(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(me(e.getCursor(),0,1)),de.enterInsertMode(e,{},t))}),t.onPasteFn}var T=/[\d]/,E=[m.isWordChar,function(e){return e&&!m.isWordChar(e)&&!/\s/.test(e)}],R=[function(e){return/\S/.test(e)}];function B(e,t){for(var n=[],r=e;r<e+t;r++)n.push(String.fromCharCode(r));return n}var I,K=B(65,26),N=B(97,26),P=B(48,10),_=[].concat(K,N,P,["<",">"]),H=[].concat(K,N,P,["-",'"',".",":","_","/"]);try{I=new RegExp("^[\\p{Lu}]$","u")}catch(e){I=/^[A-Z]$/}function V(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function $(e){return/^[a-z]$/.test(e)}function j(e){return I.test(e)}function W(e){return/^\s*$/.test(e)}function D(e){return-1!=".?!".indexOf(e)}function F(e,t){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}var U={};function z(e,t,n,r,o){if(void 0===t&&!o)throw Error("defaultValue is required unless callback is provided");if(n||(n="string"),U[e]={type:n,defaultValue:t,callback:o},r)for(var i=0;i<r.length;i++)U[r[i]]=U[e];t&&J(e,t)}function J(e,t,n,r){var o=U[e],i=(r=r||{}).scope;if(!o)return new Error("Unknown option: "+e);if("boolean"==o.type){if(t&&!0!==t)return new Error("Invalid argument: "+e+"="+t);!1!==t&&(t=!0)}o.callback?("local"!==i&&o.callback(t,void 0),"global"!==i&&n&&o.callback(t,n)):("local"!==i&&(o.value="boolean"==o.type?!!t:t),"global"!==i&&n&&(n.state.vim.options[e]={value:t}))}function q(e,t,n){var r=U[e],o=(n=n||{}).scope;if(!r)return new Error("Unknown option: "+e);if(r.callback){var i=t&&r.callback(void 0,t);return"global"!==o&&void 0!==i?i:"local"!==o?r.callback():void 0}return((i="global"!==o&&t&&t.state.vim.options[e])||"local"!==o&&r||{}).value}z("filetype",void 0,"string",["ft"],(function(e,t){if(void 0!==t){if(void 0===e)return"null"==(n=t.getOption("mode"))?"":n;var n=""==e?"null":e;t.setOption("mode",n)}}));var Q,G,X=function(){var e=-1,t=0,n=0,r=new Array(100);function o(o,i){(e+=i)>t?e=t:e<n&&(e=n);var a=r[(100+e)%100];if(a&&!a.find()){var s,c=i>0?1:-1,l=o.getCursor();do{if((a=r[(100+(e+=c))%100])&&(s=a.find())&&!Ce(l,s))break}while(e<t&&e>n)}return a}return{cachedCursor:void 0,add:function(o,i,a){var s=r[e%100];function c(t){var n=++e%100,i=r[n];i&&i.clear(),r[n]=o.setBookmark(t)}if(s){var l=s.find();l&&!Ce(l,i)&&c(i)}else c(i);c(a),t=e,(n=e-100+1)<0&&(n=0)},find:function(t,n){var r=e,i=o(t,n);return e=r,i&&i.find()},move:o}},Z=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function Y(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Z()}function ee(e){return e.state.vim||(e.state.vim={inputState:new re,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function te(){for(var e in Q={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:X(),macroModeState:new Y,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new ae({}),searchHistoryController:new se,exCommandHistoryController:new se},U){var t=U[e];t.value=t.defaultValue}}Y.prototype={exitMacroRecordMode:function(){var e=Q.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=Q.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog(document.createTextNode("(recording)["+t+"]"),null,{bottom:!0})),this.isRecording=!0)}};var ne={buildKeyMap:function(){},getRegisterController:function(){return Q.registerController},resetVimGlobalState_:te,getVimGlobalState_:function(){return Q},maybeInitVimState_:ee,suppressErrorLogging:!1,InsertModeKey:vt,map:function(e,t,n){ut.map(e,t,n)},unmap:function(e,t){ut.unmap(e,t)},noremap:function(e,t,n){function r(e){return e?[e]:["normal","insert","visual"]}for(var o=r(n),i=y.length,a=i-C;a<i&&o.length;a++){var s=y[a];if(!(s.keys!=t||n&&s.context&&s.context!==n||"ex"===s.type.substr(0,2)||"key"===s.type.substr(0,3))){var c={};for(var l in s)c[l]=s[l];c.keys=e,n&&!c.context&&(c.context=n),this._mapCommand(c);var u=r(s.context);o=o.filter((function(e){return-1===u.indexOf(e)}))}}},mapclear:function(e){var t=y.length,n=C,r=y.slice(0,t-n);if(y=y.slice(t-n),e)for(var o=r.length-1;o>=0;o--){var i=r[o];if(e!==i.context)if(i.context)this._mapCommand(i);else{var a=["normal","insert","visual"];for(var s in a)if(a[s]!==e){var c={};for(var l in i)c[l]=i[l];c.context=a[s],this._mapCommand(c)}}}},setOption:J,getOption:q,defineOption:z,defineEx:function(e,t,n){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;lt[e]=n,ut.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if("function"==typeof r)return r()},findKey:function(e,t,n){var r,o=ee(e);function i(){var r=Q.macroModeState;if(r.isRecording){if("q"==t)return r.exitMacroRecordMode(),oe(e),!0;"mapping"!=n&&function(e,t){if(e.isPlaying)return;var n=e.latestRegister,r=Q.registerController.getRegister(n);r&&r.pushText(t)}(r,t)}}function a(){if("<Esc>"==t)return oe(e),o.visualMode?Be(e):o.insertMode&&ht(e),!0}return!1===(r=o.insertMode?function(){if(a())return!0;for(var n=o.inputState.keyBuffer=o.inputState.keyBuffer+t,r=1==t.length,i=ce.matchCommand(n,y,o.inputState,"insert");n.length>1&&"full"!=i.type;){n=o.inputState.keyBuffer=n.slice(1);var s=ce.matchCommand(n,y,o.inputState,"insert");"none"!=s.type&&(i=s)}if("none"==i.type)return oe(e),!1;if("partial"==i.type)return G&&window.clearTimeout(G),G=window.setTimeout((function(){o.insertMode&&o.inputState.keyBuffer&&oe(e)}),q("insertModeEscKeysTimeout")),!r;if(G&&window.clearTimeout(G),r){for(var c=e.listSelections(),l=0;l<c.length;l++){var u=c[l].head;e.replaceRange("",me(u,0,-(n.length-1)),u,"+input")}Q.macroModeState.lastInsertModeChanges.changes.pop()}return oe(e),i.command}():function(){if(i()||a())return!0;var n=o.inputState.keyBuffer=o.inputState.keyBuffer+t;if(/^[1-9]\d*$/.test(n))return!0;if(!(c=/^(\d*)(.*)$/.exec(n)))return oe(e),!1;var r=o.visualMode?"visual":"normal",s=c[2]||c[1];o.inputState.operatorShortcut&&o.inputState.operatorShortcut.slice(-1)==s&&(s=o.inputState.operatorShortcut);var c,l=ce.matchCommand(s,y,o.inputState,r);return"none"==l.type?(oe(e),!1):"partial"==l.type||(o.inputState.keyBuffer="",(c=/^(\d*)(.*)$/.exec(n))[1]&&"0"!=c[1]&&o.inputState.pushRepeatDigit(c[1]),l.command)}())?void 0:!0===r?function(){return!0}:function(){if(!r.operator&&!r.isEdit||!e.getOption("readOnly"))return e.operation((function(){e.curOp.isVimOp=!0;try{"keyToKey"==r.type?function(n){for(var r;n;)r=/<\w+-.+?>|<\w+>|./.exec(n),t=r[0],n=n.substring(r.index+t.length),m.Vim.handleKey(e,t,"mapping")}(r.toKeys):ce.processCommand(e,o,r)}catch(t){throw e.state.vim=void 0,ee(e),m.Vim.suppressErrorLogging||console.log(t),t}return!0}))}},handleEx:function(e,t){ut.processCommand(e,t)},defineMotion:function(e,t){le[e]=t},defineAction:function(e,t){de[e]=t},defineOperator:function(e,t){he[e]=t},mapCommand:function(e,t,n,r,o){var i={keys:e,type:t};for(var a in i[t]=n,i[t+"Args"]=r,o)i[a]=o[a];dt(i)},_mapCommand:dt,defineRegister:function(e,t){var n=Q.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");n[e]=t,H.push(e)},exitVisualMode:Be,exitInsertMode:ht};function re(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function oe(e,t){e.state.vim.inputState=new re,m.signal(e,"vim-command-done",t)}function ie(e,t,n){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}function ae(e){this.registers=e,this.unnamedRegister=e['"']=new ie,e["."]=new ie,e[":"]=new ie,e["/"]=new ie}function se(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}re.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},re.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},ie.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(Z(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},ae.prototype={pushText:function(e,t,n,r,o){if("_"!==e){r&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var i=this.isValidRegister(e)?this.getRegister(e):null;if(i){j(e)?i.pushText(n,r):i.setText(n,r,o),this.unnamedRegister.setText(i.toString(),r)}else{switch(t){case"yank":this.registers[0]=new ie(n,r,o);break;case"delete":case"change":-1==n.indexOf("\n")?this.registers["-"]=new ie(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new ie(n,r))}this.unnamedRegister.setText(n,r,o)}}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new ie),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&F(e,H)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},se.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var o=this.iterator+r;t?o>=0:o<n.length;o+=r)for(var i=n[o],a=0;a<=i.length;a++)if(this.initialPrefix==i.substring(0,a))return this.iterator=o,i;return o>=n.length?(this.iterator=n.length,this.initialPrefix):o<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var ce={matchCommand:function(e,t,n,r){var o,i=function(e,t,n,r){for(var o,i=[],a=[],s=0;s<t.length;s++){var c=t[s];"insert"==n&&"insert"!=c.context||c.context&&c.context!=n||r.operator&&"action"==c.type||!(o=ge(e,c.keys))||("partial"==o&&i.push(c),"full"==o&&a.push(c))}return{partial:i.length&&i,full:a.length&&a}}(e,t,r,n);if(!i.full&&!i.partial)return{type:"none"};if(!i.full&&i.partial)return{type:"partial"};for(var a=0;a<i.full.length;a++){var s=i.full[a];o||(o=s)}if("<character>"==o.keys.slice(-11)){var c=function(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"<CR>":n="\n";break;case"<Space>":n=" ";break;default:n=""}return n}(e);if(/<C-.>/.test(c)||!c)return{type:"none"};n.selectedCharacter=c}return{type:"full",command:o}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=fe(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator)return r.motion="expandToLine",r.motionArgs={linewise:!0},void this.evalInput(e,t);oe(e)}r.operator=n.operator,r.operatorArgs=fe(n.operatorArgs),n.keys.length>1&&(r.operatorShortcut=n.keys),n.exitVisualBlock&&(t.visualBlock=!1,Ee(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,o=fe(n.operatorMotionArgs);o&&r&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,o=r.getRepeat(),i=!!o,a=fe(n.actionArgs)||{};r.selectedCharacter&&(a.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),a.repeat=o||1,a.repeatIsExplicit=i,a.registerName=r.registerName,oe(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),de[n.action](e,a,t)},processSearch:function(e,t,n){if(e.getSearchCursor){var r=n.searchArgs.forward,o=n.searchArgs.wholeWordOnly;ze(e).setReversed(!r);var i=r?"/":"?",a=ze(e).getQuery(),s=e.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":var c=Q.macroModeState;if(c.isPlaying)d(h=c.replaySearchQueries.shift(),!0,!1);else et(e,{onClose:function(e){d(e,!0,!0);var t=Q.macroModeState;t.isRecording&&function(e,t){if(e.isPlaying)return;var n=e.latestRegister,r=Q.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}(t,e)},prefix:i,desc:"(JavaScript regexp)",onKeyUp:function(t,n,o){var i,a,c,l=m.keyName(t);"Up"==l||"Down"==l?(i="Up"==l,a=t.target?t.target.selectionEnd:0,o(n=Q.searchHistoryController.nextMatch(n,i)||""),a&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(a,t.target.value.length))):"Left"!=l&&"Right"!=l&&"Ctrl"!=l&&"Alt"!=l&&"Shift"!=l&&Q.searchHistoryController.reset();try{c=tt(e,n,!0,!0)}catch(t){}c?e.scrollIntoView(rt(e,!r,c),30):(ot(e),e.scrollTo(s.left,s.top))},onKeyDown:function(t,n,r){var o=m.keyName(t);"Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==n?(Q.searchHistoryController.pushInput(n),Q.searchHistoryController.reset(),tt(e,a),ot(e),e.scrollTo(s.left,s.top),m.e_stop(t),oe(e),r(),e.focus()):"Up"==o||"Down"==o?m.e_stop(t):"Ctrl-U"==o&&(m.e_stop(t),r(""))}});break;case"wordUnderCursor":var l=Ke(e,!1,!0,!1,!0),u=!0;if(l||(l=Ke(e,!1,!0,!1,!1),u=!1),!l)return;var h=e.getLine(l.start.line).substring(l.start.ch,l.end.ch);h=u&&o?"\\b"+h+"\\b":h.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),Q.jumpList.cachedCursor=e.getCursor(),e.setCursor(l.start),d(h,!0,!1)}}function d(r,o,i){Q.searchHistoryController.pushInput(r),Q.searchHistoryController.reset();try{tt(e,r,o,i)}catch(t){return Ye(e,"Invalid regex: "+r),void oe(e)}ce.processMotion(e,t,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}},processEx:function(e,t,n){function r(t){Q.exCommandHistoryController.pushInput(t),Q.exCommandHistoryController.reset(),ut.processCommand(e,t)}function o(t,n,r){var o,i,a=m.keyName(t);("Esc"==a||"Ctrl-C"==a||"Ctrl-["==a||"Backspace"==a&&""==n)&&(Q.exCommandHistoryController.pushInput(n),Q.exCommandHistoryController.reset(),m.e_stop(t),oe(e),r(),e.focus()),"Up"==a||"Down"==a?(m.e_stop(t),o="Up"==a,i=t.target?t.target.selectionEnd:0,r(n=Q.exCommandHistoryController.nextMatch(n,o)||""),i&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(i,t.target.value.length))):"Ctrl-U"==a?(m.e_stop(t),r("")):"Left"!=a&&"Right"!=a&&"Ctrl"!=a&&"Alt"!=a&&"Shift"!=a&&Q.exCommandHistoryController.reset()}"keyToEx"==n.type?ut.processCommand(e,n.exArgs.input):t.visualMode?et(e,{onClose:r,prefix:":",value:"'<,'>",onKeyDown:o,selectValueOnOpen:!1}):et(e,{onClose:r,prefix:":",onKeyDown:o})},evalInput:function(e,t){var n,r,o,i=t.inputState,a=i.motion,s=i.motionArgs||{},c=i.operator,l=i.operatorArgs||{},u=i.registerName,h=t.sel,d=ye(t.visualMode?pe(e,h.head):e.getCursor("head")),p=ye(t.visualMode?pe(e,h.anchor):e.getCursor("anchor")),f=ye(d),m=ye(p);if(c&&this.recordLastEdit(t,i),(o=void 0!==i.repeatOverride?i.repeatOverride:i.getRepeat())>0&&s.explicitRepeat?s.repeatIsExplicit=!0:(s.noRepeat||!s.explicitRepeat&&0===o)&&(o=1,s.repeatIsExplicit=!1),i.selectedCharacter&&(s.selectedCharacter=l.selectedCharacter=i.selectedCharacter),s.repeat=o,oe(e),a){var g=le[a](e,d,s,t,i);if(t.lastMotion=le[a],!g)return;if(s.toJumplist){c||null==e.ace.curOp||(e.ace.curOp.command.scrollIntoView="center-animate");var v=Q.jumpList,y=v.cachedCursor;y?(Ne(e,y,g),delete v.cachedCursor):Ne(e,d,g)}g instanceof Array?(r=g[0],n=g[1]):n=g,n||(n=ye(d)),t.visualMode?(t.visualBlock&&n.ch===1/0||(n=pe(e,n)),r&&(r=pe(e,r)),r=r||m,h.anchor=r,h.head=n,Ee(e),We(e,t,"<",ke(r,n)?r:n),We(e,t,">",ke(r,n)?n:r)):c||(n=pe(e,n),e.setCursor(n.line,n.ch))}if(c){if(l.lastSel){r=m;var C=l.lastSel,k=Math.abs(C.head.line-C.anchor.line),x=Math.abs(C.head.ch-C.anchor.ch);n=C.visualLine?w(m.line+k,m.ch):C.visualBlock?w(m.line+k,m.ch+x):C.head.line==C.anchor.line?w(m.line,m.ch+x):w(m.line+k,m.ch),t.visualMode=!0,t.visualLine=C.visualLine,t.visualBlock=C.visualBlock,h=t.sel={anchor:r,head:n},Ee(e)}else t.visualMode&&(l.lastSel={anchor:ye(h.anchor),head:ye(h.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var S,M,A,b,L;if(t.visualMode){if(S=we(h.head,h.anchor),M=xe(h.head,h.anchor),A=t.visualLine||l.linewise,L=Re(e,{anchor:S,head:M},b=t.visualBlock?"block":A?"line":"char"),A){var O=L.ranges;if("block"==b)for(var T=0;T<O.length;T++)O[T].head.ch=Me(e,O[T].head.line);else"line"==b&&(O[0].head=w(O[0].head.line+1,0))}}else{if(S=ye(r||m),ke(M=ye(n||f),S)){var E=S;S=M,M=E}(A=s.linewise||l.linewise)?function(e,t,n){t.ch=0,n.ch=0,n.line++}(0,S,M):s.forward&&function(e,t,n){var r=e.getRange(t,n);if(/\n\s*$/.test(r)){var o=r.split("\n");o.pop();for(var i=o.pop();o.length>0&&i&&W(i);i=o.pop())n.line--,n.ch=0;i?(n.line--,n.ch=Me(e,n.line)):n.ch=0}}(e,S,M),L=Re(e,{anchor:S,head:M},b="char",!s.inclusive||A)}e.setSelections(L.ranges,L.primary),t.lastMotion=null,l.repeat=o,l.registerName=u,l.linewise=A;var R=he[c](e,l,L.ranges,m,n);t.visualMode&&Be(e,null!=R),R&&e.setCursor(R)}},recordLastEdit:function(e,t,n){var r=Q.macroModeState;r.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=n,r.lastInsertModeChanges.changes=[],r.lastInsertModeChanges.expectCursorActivityForChange=!1,r.lastInsertModeChanges.visualBlock=e.visualBlock?e.sel.head.line-e.sel.anchor.line:0)}},le={moveToTopLine:function(e,t,n){var r=it(e).top+n.repeat-1;return w(r,Ie(e.getLine(r)))},moveToMiddleLine:function(e){var t=it(e),n=Math.floor(.5*(t.top+t.bottom));return w(n,Ie(e.getLine(n)))},moveToBottomLine:function(e,t,n){var r=it(e).bottom-n.repeat+1;return w(r,Ie(e.getLine(r)))},expandToLine:function(e,t,n){return w(t.line+n.repeat-1,1/0)},findNext:function(e,t,n){var r=ze(e),o=r.getQuery();if(o){var i=!n.forward;return i=r.isReversed()?!i:i,nt(e,o),rt(e,i,o,n.repeat)}},findAndSelectNextInclusive:function(e,t,n,r,o){var i=ze(e),a=i.getQuery();if(a){var s=!n.forward,c=function(e,t,n,r,o){void 0===r&&(r=1);return e.operation((function(){var i=e.getCursor(),a=e.getSearchCursor(n,i),s=a.find(!t);!o.visualMode&&s&&Ce(a.from(),i)&&a.find(!t);for(var c=0;c<r;c++)if(!(s=a.find(t))&&!(a=e.getSearchCursor(n,t?w(e.lastLine()):w(e.firstLine(),0))).find(t))return;return[a.from(),a.to()]}))}(e,s=i.isReversed()?!s:s,a,n.repeat,r);if(c){if(o.operator)return c;var l=c[0],u=w(c[1].line,c[1].ch-1);if(r.visualMode){(r.visualLine||r.visualBlock)&&(r.visualLine=!1,r.visualBlock=!1,m.signal(e,"vim-mode-change",{mode:"visual",subMode:""}));var h=r.sel.anchor;if(h)return i.isReversed()?n.forward?[h,l]:[h,u]:n.forward?[h,u]:[h,l]}else r.visualMode=!0,r.visualLine=!1,r.visualBlock=!1,m.signal(e,"vim-mode-change",{mode:"visual",subMode:""});return s?[u,l]:[l,u]}}},goToMark:function(e,t,n,r){var o=at(e,r,n.selectedCharacter);return o?n.linewise?{line:o.line,ch:Ie(e.getLine(o.line))}:o:null},moveToOtherHighlightedEnd:function(e,t,n,r){if(r.visualBlock&&n.sameLine){var o=r.sel;return[pe(e,w(o.anchor.line,o.head.ch)),pe(e,w(o.head.line,o.anchor.ch))]}return[r.sel.head,r.sel.anchor]},jumpToMark:function(e,t,n,r){for(var o=t,i=0;i<n.repeat;i++){var a=o;for(var s in r.marks)if($(s)){var c=r.marks[s].find();if(!((n.forward?ke(c,a):ke(a,c))||n.linewise&&c.line==a.line)){var l=Ce(a,o),u=n.forward?Se(a,c,o):Se(o,c,a);(l||u)&&(o=c)}}}return n.linewise&&(o=w(o.line,Ie(e.getLine(o.line)))),o},moveByCharacters:function(e,t,n){var r=t,o=n.repeat,i=n.forward?r.ch+o:r.ch-o;return w(r.line,i)},moveByLines:function(e,t,n,r){var o=t,i=o.ch;switch(r.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:i=r.lastHPos;break;default:r.lastHPos=i}var a=n.repeat+(n.repeatOffset||0),s=n.forward?o.line+a:o.line-a,c=e.firstLine(),l=e.lastLine();if(s<c&&o.line==c)return this.moveToStartOfLine(e,t,n,r);if(s>l&&o.line==l)return $e(e,t,n,r,!0);var u=e.ace.session.getFoldLine(s);return u&&(n.forward?s>u.start.row&&(s=u.end.row+1):s=u.start.row),n.toFirstChar&&(i=Ie(e.getLine(s)),r.lastHPos=i),r.lastHSPos=e.charCoords(w(s,i),"div").left,w(s,i)},moveByDisplayLines:function(e,t,n,r){var o=t;switch(r.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:r.lastHSPos=e.charCoords(o,"div").left}var i=n.repeat;if((s=e.findPosV(o,n.forward?i:-i,"line",r.lastHSPos)).hitSide)if(n.forward)var a={top:e.charCoords(s,"div").top+8,left:r.lastHSPos},s=e.coordsChar(a,"div");else{var c=e.charCoords(w(e.firstLine(),0),"div");c.left=r.lastHSPos,s=e.coordsChar(c,"div")}return r.lastHPos=s.ch,s},moveByPage:function(e,t,n){var r=t,o=n.repeat;return e.findPosV(r,n.forward?o:-o,"page")},moveByParagraph:function(e,t,n){var r=n.forward?1:-1;return Fe(e,t,n.repeat,r)},moveBySentence:function(e,t,n){var r=n.forward?1:-1;return function(e,t,n,r){function o(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!V(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function i(e,t,n,r){var i=""===(l=e.getLine(t)),a={line:l,ln:t,pos:n,dir:r},s={ln:a.ln,pos:a.pos},c=""===a.line;for(o(e,a);null!==a.line;){if(s.ln=a.ln,s.pos=a.pos,""===a.line&&!c)return{ln:a.ln,pos:a.pos};if(i&&""!==a.line&&!W(a.line[a.pos]))return{ln:a.ln,pos:a.pos};!D(a.line[a.pos])||i||a.pos!==a.line.length-1&&!W(a.line[a.pos+1])||(i=!0),o(e,a)}var l=e.getLine(s.ln);s.pos=0;for(var u=l.length-1;u>=0;--u)if(!W(l[u])){s.pos=u;break}return s}function a(e,t,n,r){var i={line:c=e.getLine(t),ln:t,pos:n,dir:r},a={ln:i.ln,pos:null},s=""===i.line;for(o(e,i);null!==i.line;){if(""===i.line&&!s)return null!==a.pos?a:{ln:i.ln,pos:i.pos};if(D(i.line[i.pos])&&null!==a.pos&&(i.ln!==a.ln||i.pos+1!==a.pos))return a;""===i.line||W(i.line[i.pos])||(s=!1,a={ln:i.ln,pos:i.pos}),o(e,i)}var c=e.getLine(a.ln);a.pos=0;for(var l=0;l<c.length;++l)if(!W(c[l])){a.pos=l;break}return a}var s={ln:t.line,pos:t.ch};for(;n>0;)s=r<0?a(e,s.ln,s.pos,r):i(e,s.ln,s.pos,r),n--;return w(s.ln,s.pos)}(e,t,n.repeat,r)},moveByScroll:function(e,t,n,r){var o=e.getScrollInfo(),i=null,a=n.repeat;a||(a=o.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(n.repeat=a,!(i=le.moveByDisplayLines(e,t,n,r)))return null;var c=e.charCoords(i,"local");return e.scrollTo(null,o.top+c.top-s.top),i},moveByWords:function(e,t,n){return function(e,t,n,r,o,i){var a=ye(t),s=[];(r&&!o||!r&&o)&&n++;for(var c=!(r&&o),l=0;l<n;l++){var u=Ve(e,t,r,i,c);if(!u){var h=Me(e,e.lastLine());s.push(r?{line:e.lastLine(),from:h,to:h}:{line:0,from:0,to:0});break}s.push(u),t=w(u.line,r?u.to-1:u.from)}var d=s.length!=n,p=s[0],f=s.pop();return r&&!o?(d||p.from==a.ch&&p.line==a.line||(f=s.pop()),w(f.line,f.from)):r&&o?w(f.line,f.to-1):!r&&o?(d||p.to==a.ch&&p.line==a.line||(f=s.pop()),w(f.line,f.to)):w(f.line,f.from)}(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var r=je(e,n.repeat,n.forward,n.selectedCharacter),o=n.forward?-1:1;return Pe(o,n),r?(r.ch+=o,r):null},moveToCharacter:function(e,t,n){var r=n.repeat;return Pe(0,n),je(e,r,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){return function(e,t,n,r){var o=ye(e.getCursor()),i=n?1:-1,a=n?e.lineCount():-1,s=o.ch,c=o.line,l=e.getLine(c),u={lineText:l,nextCh:l.charAt(s),lastCh:null,index:s,symb:r,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[r],forward:n,depth:0,curMoveThrough:!1},h=_e[r];if(!h)return o;var d=He[h].init,p=He[h].isComplete;d&&d(u);for(;c!==a&&t;){if(u.index+=i,u.nextCh=u.lineText.charAt(u.index),!u.nextCh){if(c+=i,u.lineText=e.getLine(c)||"",i>0)u.index=0;else{var f=u.lineText.length;u.index=f>0?f-1:0}u.nextCh=u.lineText.charAt(u.index)}p(u)&&(o.line=c,o.ch=u.index,t--)}if(u.nextCh||u.curMoveThrough)return w(c,u.index);return o}(e,n.repeat,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var o=n.repeat;return r.lastHPos=o-1,r.lastHSPos=e.charCoords(t,"div").left,function(e,t){var n=e.getCursor().line;return pe(e,w(n,t-1))}(e,o)},moveToEol:function(e,t,n,r){return $e(e,t,n,r,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return w(n.line,Ie(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){for(var n,r=t,o=r.line,i=r.ch,a=e.getLine(o);i<a.length;i++)if((n=a.charAt(i))&&-1!="()[]{}".indexOf(n)){var s=e.getTokenTypeAt(w(o,i+1));if("string"!==s&&"comment"!==s)break}if(i<a.length){var c=/[<>]/.test(a[i])?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(w(o,i+1),{bracketRegex:c}).to}return r},moveToStartOfLine:function(e,t){return w(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var r=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(r=n.repeat-e.getOption("firstLineNumber")),w(r,Ie(e.getLine(r)))},textObjectManipulation:function(e,t,n,r){var o=n.selectedCharacter;"b"==o?o="(":"B"==o&&(o="{");var i,a=!n.textObjectInner;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"}[o])i=function(e,t,n,r){var o,i,a=t,s={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[n],c={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[n],l=e.getLine(a.line).charAt(a.ch)===c?1:0;if(o=e.scanForBracket(w(a.line,a.ch+l),-1,void 0,{bracketRegex:s}),i=e.scanForBracket(w(a.line,a.ch+l),1,void 0,{bracketRegex:s}),!o||!i)return{start:a,end:a};if(o=o.pos,i=i.pos,o.line==i.line&&o.ch>i.ch||o.line>i.line){var u=o;o=i,i=u}r?i.ch+=1:o.ch+=1;return{start:o,end:i}}(e,t,o,a);else if({"'":!0,'"':!0,"`":!0}[o])i=function(e,t,n,r){var o,i,a,s,c=ye(t),l=e.getLine(c.line).split(""),u=l.indexOf(n);c.ch<u?c.ch=u:u<c.ch&&l[c.ch]==n&&(i=c.ch,--c.ch);if(l[c.ch]!=n||i)for(a=c.ch;a>-1&&!o;a--)l[a]==n&&(o=a+1);else o=c.ch+1;if(o&&!i)for(a=o,s=l.length;a<s&&!i;a++)l[a]==n&&(i=a);if(!o||!i)return{start:c,end:c};r&&(--o,++i);return{start:w(c.line,o),end:w(c.line,i)}}(e,t,o,a);else if("W"===o)i=Ke(e,a,!0,!0);else if("w"===o)i=Ke(e,a,!0,!1);else if("p"===o)if(i=Fe(e,t,n.repeat,0,a),n.linewise=!0,r.visualMode)r.visualLine||(r.visualLine=!0);else{var s=r.inputState.operatorArgs;s&&(s.linewise=!0),i.end.line--}else{if("t"!==o)return null;i=function(e,t,n){var r=t;if(!m.findMatchingTag||!m.findEnclosingTag)return{start:r,end:r};var o=m.findMatchingTag(e,t)||m.findEnclosingTag(e,t);if(!o||!o.open||!o.close)return{start:r,end:r};if(n)return{start:o.open.from,end:o.close.to};return{start:o.open.to,end:o.close.from}}(e,t,a)}return e.state.vim.visualMode?function(e,t,n){var r,o=e.state.vim.sel,i=o.head,a=o.anchor;ke(n,t)&&(r=n,n=t,t=r);ke(i,a)?(i=we(t,i),a=xe(a,n)):(a=we(t,a),-1==(i=me(i=xe(i,n),0,-1)).ch&&i.line!=e.firstLine()&&(i=w(i.line-1,Me(e,i.line-1))));return[a,i]}(e,i.start,i.end):[i.start,i.end]},repeatLastCharacterSearch:function(e,t,n){var r=Q.lastCharacterSearch,o=n.repeat,i=n.forward===r.forward,a=(r.increment?1:0)*(i?-1:1);e.moveH(-a,"char"),n.inclusive=!!i;var s=je(e,o,i,r.selectedCharacter);return s?(s.ch+=a,s):(e.moveH(a,"char"),t)}};function ue(e,t){for(var n=[],r=0;r<t;r++)n.push(e);return n}var he={change:function(e,t,n){var r,o,i=e.state.vim,a=n[0].anchor,s=n[0].head;if(i.visualMode)if(t.fullLine)s.ch=Number.MAX_VALUE,s.line--,e.setSelection(a,s),o=e.getSelection(),e.replaceSelection(""),r=a;else{o=e.getSelection();var c=ue("",n.length);e.replaceSelections(c),r=we(n[0].head,n[0].anchor)}else{o=e.getRange(a,s);var l=i.lastEditInputState||{};if("moveByWords"==l.motion&&!W(o)){var u=/\s+$/.exec(o);u&&l.motionArgs&&l.motionArgs.forward&&(s=me(s,0,-u[0].length),o=o.slice(0,-u[0].length))}var h=new w(a.line-1,Number.MAX_VALUE),d=e.firstLine()==e.lastLine();s.line>e.lastLine()&&t.linewise&&!d?e.replaceRange("",h,s):e.replaceRange("",a,s),t.linewise&&(d||(e.setCursor(h),m.commands.newlineAndIndent(e)),a.ch=Number.MAX_VALUE),r=a}Q.registerController.pushText(t.registerName,"change",o,t.linewise,n.length>1),de.enterInsertMode(e,{head:r},e.state.vim)},delete:function(e,t,n){var r,o,i=e.state.vim;if(i.visualBlock){o=e.getSelection();var a=ue("",n.length);e.replaceSelections(a),r=n[0].anchor}else{var s=n[0].anchor,c=n[0].head;t.linewise&&c.line!=e.firstLine()&&s.line==e.lastLine()&&s.line==c.line-1&&(s.line==e.firstLine()?s.ch=0:s=w(s.line-1,Me(e,s.line-1))),o=e.getRange(s,c),e.replaceRange("",s,c),r=s,t.linewise&&(r=le.moveToFirstNonWhiteSpaceCharacter(e,s))}return Q.registerController.pushText(t.registerName,"delete",o,t.linewise,i.visualBlock),pe(e,r)},indent:function(e,t,n){var r=e.state.vim,o=n[0].anchor.line,i=r.visualBlock?n[n.length-1].anchor.line:n[0].head.line,a=r.visualMode?t.repeat:1;t.linewise&&i--;for(var s=o;s<=i;s++)for(var c=0;c<a;c++)e.indentLine(s,t.indentRight);return le.moveToFirstNonWhiteSpaceCharacter(e,n[0].anchor)},indentAuto:function(e,t,n){return n.length>1&&e.setSelection(n[0].anchor,n[n.length-1].head),e.execCommand("indentAuto"),le.moveToFirstNonWhiteSpaceCharacter(e,n[0].anchor)},changeCase:function(e,t,n,r,o){for(var i=e.getSelections(),a=[],s=t.toLower,c=0;c<i.length;c++){var l=i[c],u="";if(!0===s)u=l.toLowerCase();else if(!1===s)u=l.toUpperCase();else for(var h=0;h<l.length;h++){var d=l.charAt(h);u+=j(d)?d.toLowerCase():d.toUpperCase()}a.push(u)}return e.replaceSelections(a),t.shouldMoveCursor?o:!e.state.vim.visualMode&&t.linewise&&n[0].anchor.line+1==n[0].head.line?le.moveToFirstNonWhiteSpaceCharacter(e,r):t.linewise?r:we(n[0].anchor,n[0].head)},yank:function(e,t,n,r){var o=e.state.vim,i=e.getSelection(),a=o.visualMode?we(o.sel.anchor,o.sel.head,n[0].head,n[0].anchor):r;return Q.registerController.pushText(t.registerName,"yank",i,t.linewise,o.visualBlock),a}};var de={jumpListWalk:function(e,t,n){if(!n.visualMode){var r=t.repeat,o=t.forward,i=Q.jumpList.move(e,o?r:-r),a=i?i.find():void 0;a=a||e.getCursor(),e.setCursor(a),e.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(e,t,n){if(!n.visualMode){var r=t.repeat||1,o=e.defaultTextHeight(),i=e.getScrollInfo().top,a=o*r,s=t.forward?i+a:i-a,c=ye(e.getCursor()),l=e.charCoords(c,"local");if(t.forward)s>l.top?(c.line+=(s-l.top)/o,c.line=Math.ceil(c.line),e.setCursor(c),l=e.charCoords(c,"local"),e.scrollTo(null,l.top)):e.scrollTo(null,s);else{var u=s+e.getScrollInfo().clientHeight;u<l.bottom?(c.line-=(l.bottom-u)/o,c.line=Math.floor(c.line),e.setCursor(c),l=e.charCoords(c,"local"),e.scrollTo(null,l.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,s)}}},scrollToCursor:function(e,t){var n=e.getCursor().line,r=e.charCoords(w(n,0),"local"),o=e.getScrollInfo().clientHeight,i=r.top,a=r.bottom-i;switch(t.position){case"center":i=i-o/2+a;break;case"bottom":i=i-o+a}e.scrollTo(null,i)},replayMacro:function(e,t,n){var r=t.selectedCharacter,o=t.repeat,i=Q.macroModeState;for("@"==r?r=i.latestRegister:i.latestRegister=r;o--;)pt(e,n,i,r)},enterMacroRecordMode:function(e,t){var n=Q.macroModeState,r=t.selectedCharacter;Q.registerController.isValidRegister(r)&&n.enterMacroRecordMode(e,r)},toggleOverwrite:function(e){e.state.overwrite?(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),m.signal(e,"vim-mode-change",{mode:"insert"})):(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),m.signal(e,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(e,t,n){if(!e.getOption("readOnly")){n.insertMode=!0,n.insertModeRepeat=t&&t.repeat||1;var r=t?t.insertAt:null,o=n.sel,i=t.head||e.getCursor("head"),a=e.listSelections().length;if("eol"==r)i=w(i.line,Me(e,i.line));else if("bol"==r)i=w(i.line,0);else if("charAfter"==r)i=me(i,0,1);else if("firstNonBlank"==r)i=le.moveToFirstNonWhiteSpaceCharacter(e,i);else if("startOfSelectedArea"==r){if(!n.visualMode)return;n.visualBlock?(i=w(Math.min(o.head.line,o.anchor.line),Math.min(o.head.ch,o.anchor.ch)),a=Math.abs(o.head.line-o.anchor.line)+1):i=o.head.line<o.anchor.line?o.head:w(o.anchor.line,0)}else if("endOfSelectedArea"==r){if(!n.visualMode)return;n.visualBlock?(i=w(Math.min(o.head.line,o.anchor.line),Math.max(o.head.ch+1,o.anchor.ch)),a=Math.abs(o.head.line-o.anchor.line)+1):i=o.head.line>=o.anchor.line?me(o.head,0,1):w(o.anchor.line,0)}else if("inplace"==r){if(n.visualMode)return}else"lastEdit"==r&&(i=st(e)||i);e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),m.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),m.signal(e,"vim-mode-change",{mode:"insert"})),Q.macroModeState.isPlaying||(e.on("change",ft),m.on(e.getInputField(),"keydown",yt)),n.visualMode&&Be(e),Oe(e,i,a)}},toggleVisualMode:function(e,t,n){var r,o=t.repeat,i=e.getCursor();n.visualMode?n.visualLine^t.linewise||n.visualBlock^t.blockwise?(n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,m.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),Ee(e)):Be(e):(n.visualMode=!0,n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,r=pe(e,w(i.line,i.ch+o-1)),n.sel={anchor:i,head:r},m.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),Ee(e),We(e,n,"<",we(i,r)),We(e,n,">",xe(i,r)))},reselectLastSelection:function(e,t,n){var r=n.lastSelection;if(n.visualMode&&Te(e,n),r){var o=r.anchorMark.find(),i=r.headMark.find();if(!o||!i)return;n.sel={anchor:o,head:i},n.visualMode=!0,n.visualLine=r.visualLine,n.visualBlock=r.visualBlock,Ee(e),We(e,n,"<",we(o,i)),We(e,n,">",xe(o,i)),m.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var r,o;if(n.visualMode){if(r=e.getCursor("anchor"),ke(o=e.getCursor("head"),r)){var i=o;o=r,r=i}o.ch=Me(e,o.line)-1}else{var a=Math.max(t.repeat,2);r=e.getCursor(),o=pe(e,w(r.line+a-1,1/0))}for(var s=0,c=r.line;c<o.line;c++){s=Me(e,r.line);i=w(r.line+1,Me(e,r.line+1));var l=e.getRange(r,i);l=t.keepSpaces?l.replace(/\n\r?/g,""):l.replace(/\n\s*/g," "),e.replaceRange(l,r,i)}var u=w(r.line,s);n.visualMode&&Be(e,!1),e.setCursor(u)},newLineAndEnterInsertMode:function(e,t,n){n.insertMode=!0;var r=ye(e.getCursor());r.line!==e.firstLine()||t.after?(r.line=t.after?r.line:r.line-1,r.ch=Me(e,r.line),e.setCursor(r),(m.commands.newlineAndIndentContinueComment||m.commands.newlineAndIndent)(e)):(e.replaceRange("\n",w(e.firstLine(),0)),e.setCursor(e.firstLine(),0));this.enterInsertMode(e,{repeat:t.repeat},n)},paste:function(e,t,n){var r=ye(e.getCursor()),o=Q.registerController.getRegister(t.registerName);if(d=o.toString()){if(t.matchIndent){var i=e.getOption("tabSize"),a=function(e){var t=e.split("\t").length-1,n=e.split(" ").length-1;return t*i+1*n},s=e.getLine(e.getCursor().line),c=a(s.match(/^\s*/)[0]),l=d.replace(/\n$/,""),u=d!==l,h=a(d.match(/^\s*/)[0]),d=l.replace(/^\s*/gm,(function(t){var n=c+(a(t)-h);if(n<0)return"";if(e.getOption("indentWithTabs")){var r=Math.floor(n/i);return Array(r+1).join("\t")}return Array(n+1).join(" ")}));d+=u?"\n":""}if(t.repeat>1)d=Array(t.repeat+1).join(d);var p,f,m=o.linewise,g=o.blockwise;if(g){d=d.split("\n"),m&&d.pop();for(var v=0;v<d.length;v++)d[v]=""==d[v]?" ":d[v];r.ch+=t.after?1:0,r.ch=Math.min(Me(e,r.line),r.ch)}else m?n.visualMode?d=n.visualLine?d.slice(0,-1):"\n"+d.slice(0,d.length-1)+"\n":t.after?(d="\n"+d.slice(0,d.length-1),r.ch=Me(e,r.line)):r.ch=0:r.ch+=t.after?1:0;if(n.visualMode){var y;n.lastPastedText=d;var C=function(e,t){var n=t.lastSelection;return t.visualMode?function(){var t=e.listSelections(),n=t[0],r=t[t.length-1];return[ke(n.anchor,n.head)?n.anchor:n.head,ke(r.anchor,r.head)?r.head:r.anchor]}():function(){var t=e.getCursor(),r=e.getCursor(),o=n.visualBlock;if(o){var i=o.width,a=o.height;r=w(t.line+a,t.ch+i);for(var s=[],c=t.line;c<r.line;c++){var l={anchor:w(c,t.ch),head:w(c,r.ch)};s.push(l)}e.setSelections(s)}else{var u=n.anchorMark.find(),h=n.headMark.find(),d=h.line-u.line,p=h.ch-u.ch;r={line:r.line+d,ch:d?r.ch:p+r.ch},n.visualLine&&(t=w(t.line,0),r=w(r.line,Me(e,r.line))),e.setSelection(t,r)}return[t,r]}()}(e,n),k=C[0],x=C[1],S=e.getSelection(),M=e.listSelections(),A=new Array(M.length).join("1").split("1");n.lastSelection&&(y=n.lastSelection.headMark.find()),Q.registerController.unnamedRegister.setText(S),g?(e.replaceSelections(A),x=w(k.line+d.length-1,k.ch),e.setCursor(k),Le(e,x),e.replaceSelections(d),p=k):n.visualBlock?(e.replaceSelections(A),e.setCursor(k),e.replaceRange(d,k,k),p=k):(e.replaceRange(d,k,x),p=e.posFromIndex(e.indexFromPos(k)+d.length-1)),y&&(n.lastSelection.headMark=e.setBookmark(y)),m&&(p.ch=0)}else if(g){e.setCursor(r);for(v=0;v<d.length;v++){var b=r.line+v;b>e.lastLine()&&e.replaceRange("\n",w(b,0)),Me(e,b)<r.ch&&be(e,b,r.ch)}e.setCursor(r),Le(e,w(r.line+d.length-1,r.ch)),e.replaceSelections(d),p=r}else e.replaceRange(d,r),m&&t.after?p=w(r.line+1,Ie(e.getLine(r.line+1))):m&&!t.after?p=w(r.line,Ie(e.getLine(r.line))):!m&&t.after?(f=e.indexFromPos(r),p=e.posFromIndex(f+d.length-1)):(f=e.indexFromPos(r),p=e.posFromIndex(f+d.length));n.visualMode&&Be(e,!1),e.setCursor(p)}},undo:function(e,t){e.operation((function(){ve(e,m.commands.undo,t.repeat)(),e.setCursor(e.getCursor("anchor"))}))},redo:function(e,t){ve(e,m.commands.redo,t.repeat)()},setRegister:function(e,t,n){n.inputState.registerName=t.selectedCharacter},setMark:function(e,t,n){We(e,n,t.selectedCharacter,e.getCursor())},replace:function(e,t,n){var r,o,i=t.selectedCharacter,a=e.getCursor(),s=e.listSelections();if(n.visualMode)a=e.getCursor("start"),o=e.getCursor("end");else{var c=e.getLine(a.line);(r=a.ch+t.repeat)>c.length&&(r=c.length),o=w(a.line,r)}if("\n"==i)n.visualMode||e.replaceRange("",a,o),(m.commands.newlineAndIndentContinueComment||m.commands.newlineAndIndent)(e);else{var l=e.getRange(a,o);if(l=l.replace(/[^\n]/g,i),n.visualBlock){var u=new Array(e.getOption("tabSize")+1).join(" ");l=(l=e.getSelection()).replace(/\t/g,u).replace(/[^\n]/g,i).split("\n"),e.replaceSelections(l)}else e.replaceRange(l,a,o);n.visualMode?(a=ke(s[0].anchor,s[0].head)?s[0].anchor:s[0].head,e.setCursor(a),Be(e,!1)):e.setCursor(me(o,0,-1))}},incrementNumberToken:function(e,t){for(var n,r,o,i,a=e.getCursor(),s=e.getLine(a.line),c=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(n=c.exec(s))&&(o=(r=n.index)+n[0].length,!(a.ch<o)););if((t.backtrack||!(o<=a.ch))&&n){var l=n[2]||n[4],u=n[3]||n[5],h=t.increase?1:-1,d={"0b":2,0:8,"":10,"0x":16}[l.toLowerCase()];i=(parseInt(n[1]+u,d)+h*t.repeat).toString(d);var p=l?new Array(u.length-i.length+1+n[1].length).join("0"):"";i="-"===i.charAt(0)?"-"+l+p+i.substr(1):l+p+i;var f=w(a.line,r),m=w(a.line,o);e.replaceRange(i,f,m),e.setCursor(w(a.line,r+i.length-1))}},repeatLastEdit:function(e,t,n){if(n.lastEditInputState){var r=t.repeat;r&&t.repeatIsExplicit?n.lastEditInputState.repeatOverride=r:r=n.lastEditInputState.repeatOverride||r,Ct(e,n,r,!1)}},indent:function(e,t){e.indentLine(e.getCursor().line,t.indentRight)},exitInsertMode:ht};function pe(e,t){var n=e.state.vim,r=n.insertMode||n.visualMode,o=Math.min(Math.max(e.firstLine(),t.line),e.lastLine()),i=Me(e,o)-1+!!r,a=Math.min(Math.max(0,t.ch),i);return w(o,a)}function fe(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function me(e,t,n){return"object"==typeof t&&(n=t.ch,t=t.line),w(e.line+t,e.ch+n)}function ge(e,t){if("<character>"==t.slice(-11)){var n=t.length-11,r=e.slice(0,n),o=t.slice(0,n);return r==o&&e.length>n?"full":0==o.indexOf(r)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function ve(e,t,n){return function(){for(var r=0;r<n;r++)t(e)}}function ye(e){return w(e.line,e.ch)}function Ce(e,t){return e.ch==t.ch&&e.line==t.line}function ke(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function we(e,t){return arguments.length>2&&(t=we.apply(void 0,Array.prototype.slice.call(arguments,1))),ke(e,t)?e:t}function xe(e,t){return arguments.length>2&&(t=xe.apply(void 0,Array.prototype.slice.call(arguments,1))),ke(e,t)?t:e}function Se(e,t,n){var r=ke(e,t),o=ke(t,n);return r&&o}function Me(e,t){return e.getLine(t).length}function Ae(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function be(e,t,n){var r=Me(e,t),o=new Array(n-r+1).join(" ");e.setCursor(w(t,r)),e.replaceRange(o,e.getCursor())}function Le(e,t){var n=[],r=e.listSelections(),o=ye(e.clipPos(t)),i=!Ce(t,o),a=function(e,t,n){for(var r=0;r<e.length;r++){var o="head"!=n&&Ce(e[r].anchor,t),i="anchor"!=n&&Ce(e[r].head,t);if(o||i)return r}return-1}(r,e.getCursor("head")),s=Ce(r[a].head,r[a].anchor),c=r.length-1,l=c-a>a?c:0,u=r[l].anchor,h=Math.min(u.line,o.line),d=Math.max(u.line,o.line),p=u.ch,f=o.ch,m=r[l].head.ch-p,g=f-p;m>0&&g<=0?(p++,i||f--):m<0&&g>=0?(p--,s||f++):m<0&&-1==g&&(p--,f++);for(var v=h;v<=d;v++){var y={anchor:new w(v,p),head:new w(v,f)};n.push(y)}return e.setSelections(n),t.ch=f,u.ch=p,u}function Oe(e,t,n){for(var r=[],o=0;o<n;o++){var i=me(t,o,0);r.push({anchor:i,head:i})}e.setSelections(r,0)}function Te(e,t){var n=t.sel.anchor,r=t.sel.head;t.lastPastedText&&(r=e.posFromIndex(e.indexFromPos(n)+t.lastPastedText.length),t.lastPastedText=null),t.lastSelection={anchorMark:e.setBookmark(n),headMark:e.setBookmark(r),anchor:ye(n),head:ye(r),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function Ee(e,t,n){var r=e.state.vim,o=Re(e,t=t||r.sel,n=n||r.visualLine?"line":r.visualBlock?"block":"char");e.setSelections(o.ranges,o.primary)}function Re(e,t,n,r){var o=ye(t.head),i=ye(t.anchor);if("char"==n){var a=r||ke(t.head,t.anchor)?0:1,s=ke(t.head,t.anchor)?1:0;return o=me(t.head,0,a),{ranges:[{anchor:i=me(t.anchor,0,s),head:o}],primary:0}}if("line"==n){if(ke(t.head,t.anchor))o.ch=0,i.ch=Me(e,i.line);else{i.ch=0;var c=e.lastLine();o.line>c&&(o.line=c),o.ch=Me(e,o.line)}return{ranges:[{anchor:i,head:o}],primary:0}}if("block"==n){for(var l=Math.min(i.line,o.line),u=Math.min(i.ch,o.ch),h=Math.max(i.line,o.line),d=Math.max(i.ch,o.ch)+1,p=h-l+1,f=o.line==l?0:p-1,m=[],g=0;g<p;g++)m.push({anchor:w(l+g,u),head:w(l+g,d)});return{ranges:m,primary:f}}}function Be(e,t){var n=e.state.vim;!1!==t&&e.setCursor(pe(e,n.sel.head)),Te(e,n),n.visualMode=!1,n.visualLine=!1,n.visualBlock=!1,n.insertMode||m.signal(e,"vim-mode-change",{mode:"normal"})}function Ie(e){if(!e)return 0;var t=e.search(/\S/);return-1==t?e.length:t}function Ke(e,t,n,r,o){for(var i=function(e){var t=e.getCursor("head");return 1==e.getSelection().length&&(t=we(t,e.getCursor("anchor"))),t}(e),a=e.getLine(i.line),s=i.ch,c=o?E[0]:R[0];!c(a.charAt(s));)if(++s>=a.length)return null;r?c=R[0]:(c=E[0])(a.charAt(s))||(c=E[1]);for(var l=s,u=s;c(a.charAt(l))&&l<a.length;)l++;for(;c(a.charAt(u))&&u>=0;)u--;if(u++,t){for(var h=l;/\s/.test(a.charAt(l))&&l<a.length;)l++;if(h==l){for(var d=u;/\s/.test(a.charAt(u-1))&&u>0;)u--;u||(u=d)}}return{start:w(i.line,u),end:w(i.line,l)}}function Ne(e,t,n){Ce(t,n)||Q.jumpList.add(e,t,n)}function Pe(e,t){Q.lastCharacterSearch.increment=e,Q.lastCharacterSearch.forward=t.forward,Q.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var _e={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},He={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/^#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function Ve(e,t,n,r,o){var i=t.line,a=t.ch,s=e.getLine(i),c=n?1:-1,l=r?R:E;if(o&&""==s){if(i+=c,s=e.getLine(i),!V(e,i))return null;a=n?0:s.length}for(;;){if(o&&""==s)return{from:0,to:0,line:i};for(var u=c>0?s.length:-1,h=u,d=u;a!=u;){for(var p=!1,f=0;f<l.length&&!p;++f)if(l[f](s.charAt(a))){for(h=a;a!=u&&l[f](s.charAt(a));)a+=c;if(p=h!=(d=a),h==t.ch&&i==t.line&&d==h+c)continue;return{from:Math.min(h,d+1),to:Math.max(h,d),line:i}}p||(a+=c)}if(!V(e,i+=c))return null;s=e.getLine(i),a=c>0?0:s.length}}function $e(e,t,n,r,o){var i=w(t.line+n.repeat-1,1/0),a=e.clipPos(i);return a.ch--,o||(r.lastHPos=1/0,r.lastHSPos=e.charCoords(a,"div").left),i}function je(e,t,n,r){for(var o,i=e.getCursor(),a=i.ch,s=0;s<t;s++){if(-1==(o=De(a,e.getLine(i.line),r,n,!0)))return null;a=o}return w(e.getCursor().line,o)}function We(e,t,n,r){F(n,_)&&(t.marks[n]&&t.marks[n].clear(),t.marks[n]=e.setBookmark(r))}function De(e,t,n,r,o){var i;return r?-1==(i=t.indexOf(n,e+1))||o||(i-=1):-1==(i=t.lastIndexOf(n,e-1))||o||(i+=1),i}function Fe(e,t,n,r,o){var i,a=t.line,s=e.firstLine(),c=e.lastLine(),l=a;function u(t){return!/\S/.test(e.getLine(t))}function h(e,t,n){return n?u(e)!=u(e+t):!u(e)&&u(e+t)}function d(t){r=r>0?1:-1;var n=e.ace.session.getFoldLine(t);n&&t+r>n.start.row&&t+r<n.end.row&&(r=(r>0?n.end.row:n.start.row)-t)}if(r){for(;s<=l&&l<=c&&n>0;)d(l),h(l,r)&&n--,l+=r;return new w(l,0)}var p=e.state.vim;if(p.visualLine&&h(a,1,!0)){var f=p.sel.anchor;h(f.line,-1,!0)&&(o&&f.line==a||(a+=1))}var m=u(a);for(l=a;l<=c&&n;l++)h(l,1,!0)&&(o&&u(l)==m||n--);for(i=new w(l,0),l>c&&!m?m=!0:o=!1,l=a;l>s&&(o&&u(l)!=m&&l!=a||!h(l,-1,!0));l--);return{start:new w(l,0),end:i}}function Ue(){}function ze(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new Ue)}function Je(e,t){var n=qe(e,t)||[];if(!n.length)return[];var r=[];if(0===n[0]){for(var o=0;o<n.length;o++)"number"==typeof n[o]&&r.push(e.substring(n[o]+1,n[o+1]));return r}}function qe(e,t){t||(t="/");for(var n=!1,r=[],o=0;o<e.length;o++){var i=e.charAt(o);n||i!=t||r.push(o),n=!n&&"\\"==i}return r}z("pcre",!0,"boolean"),Ue.prototype={getQuery:function(){return Q.query},setQuery:function(e){Q.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return Q.isReversed},setReversed:function(e){Q.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var Qe={"\\n":"\n","\\r":"\r","\\t":"\t"};var Ge={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t","\\&":"&"};function Xe(e,t,n){if(Q.registerController.getRegister("/").setText(e),e instanceof RegExp)return e;var r,o,i=qe(e,"/");i.length?(r=e.substring(0,i[0]),o=-1!=e.substring(i[0]).indexOf("i")):r=e;return r?(q("pcre")||(r=function(e){for(var t=!1,n=[],r=-1;r<e.length;r++){var o=e.charAt(r)||"",i=e.charAt(r+1)||"",a=i&&-1!="|(){".indexOf(i);t?("\\"===o&&a||n.push(o),t=!1):"\\"===o?(t=!0,i&&-1!="}".indexOf(i)&&(a=!0),a&&"\\"!==i||n.push(o)):(n.push(o),a&&"\\"!==i&&n.push("\\"))}return n.join("")}(r)),n&&(t=/^[^A-Z]*$/.test(r)),new RegExp(r,t||o?"im":"m")):null}function Ze(e){"string"==typeof e&&(e=document.createElement(e));for(var t,n=1;n<arguments.length;n++)if(t=arguments[n])if("object"!=typeof t&&(t=document.createTextNode(t)),t.nodeType)e.appendChild(t);else for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&("$"===r[0]?e.style[r.slice(1)]=t[r]:e.setAttribute(r,t[r]));return e}function Ye(e,t){var n=Ze("span",{$color:"red",$whiteSpace:"pre"},t);e.openNotification?e.openNotification(n,{bottom:!0,duration:5e3}):alert(n.innerText)}function et(e,t){var n,r,o=(t.prefix||"")+" "+(t.desc||""),i=(n=t.prefix,r=t.desc,Ze(document.createDocumentFragment(),Ze("span",{$fontFamily:"monospace",$whiteSpace:"pre"},n,Ze("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false"})),r&&Ze("span",{$color:"#888"},r)));e.openDialog?e.openDialog(i,t.onClose,{onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:t.value}):t.onClose(prompt(o,""))}function tt(e,t,n,r){if(t){var o=ze(e),i=Xe(t,!!n,!!r);if(i)return nt(e,i),function(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],r=0;r<n.length;r++){var o=n[r];if(e[o]!==t[o])return!1}return!0}return!1}(i,o.getQuery())||o.setQuery(i),i}}function nt(e,t){var n=ze(e),r=n.getOverlay();r&&t==r.query||(r&&e.removeOverlay(r),r=function(e){if("^"==e.source.charAt(0))var t=!0;return{token:function(n){if(!t||n.sol()){var r=n.match(e,!1);if(r)return 0==r[0].length?(n.next(),"searching"):n.sol()||(n.backUp(1),e.exec(n.next()+r[0]))?(n.match(e),"searching"):(n.next(),null);for(;!n.eol()&&(n.next(),!n.match(e,!1)););}else n.skipToEnd()},query:e}}(t),e.addOverlay(r),e.showMatchesOnScrollbar&&(n.getScrollbarAnnotate()&&n.getScrollbarAnnotate().clear(),n.setScrollbarAnnotate(e.showMatchesOnScrollbar(t))),n.setOverlay(r))}function rt(e,t,n,r){return void 0===r&&(r=1),e.operation((function(){for(var o=e.getCursor(),i=e.getSearchCursor(n,o),a=0;a<r;a++){var s=i.find(t);if(0==a&&s&&Ce(i.from(),o)){var c=t?i.from():i.to();(s=i.find(t))&&!s[0]&&Ce(i.from(),c)&&e.getLine(c.line).length==c.ch&&(s=i.find(t))}if(!s&&!(i=e.getSearchCursor(n,t?w(e.lastLine()):w(e.firstLine(),0))).find(t))return}return i.from()}))}function ot(e){var t=ze(e);e.removeOverlay(ze(e).getOverlay()),t.setOverlay(null),t.getScrollbarAnnotate()&&(t.getScrollbarAnnotate().clear(),t.setScrollbarAnnotate(null))}function it(e){var t=e.ace.renderer;return{top:t.getFirstFullyVisibleRow(),bottom:t.getLastFullyVisibleRow()}}function at(e,t,n){if("'"==n||"`"==n)return Q.jumpList.find(e,-1)||w(0,0);if("."==n)return st(e);var r=t.marks[n];return r&&r.find()}function st(e){var t=e.ace.session.$undoManager;if(t&&t.$lastDelta)return v(t.$lastDelta.end)}var ct=function(){this.buildCommandMap_()};ct.prototype={processCommand:function(e,t,n){var r=this;e.operation((function(){e.curOp.isVimOp=!0,r._processCommand(e,t,n)}))},_processCommand:function(e,t,n){var r=e.state.vim,o=Q.registerController.getRegister(":"),i=o.toString();r.visualMode&&Be(e);var a=new m.StringStream(t);o.setText(t);var s,c,l=n||{};l.input=t;try{this.parseInput_(e,a,l)}catch(t){throw Ye(e,t.toString()),t}if(l.commandName){if(s=this.matchCommand_(l.commandName)){if(c=s.name,s.excludeFromCommandHistory&&o.setText(i),this.parseCommandArgs_(a,l,s),"exToKey"==s.type){for(var u=0;u<s.toKeys.length;u++)m.Vim.handleKey(e,s.toKeys[u],"mapping");return}if("exToEx"==s.type)return void this.processCommand(e,s.toInput)}}else void 0!==l.line&&(c="move");if(c)try{lt[c](e,l),s&&s.possiblyAsync||!l.callback||l.callback()}catch(t){throw Ye(e,t.toString()),t}else Ye(e,'Not an editor command ":'+t+'"')},parseInput_:function(e,t,n){t.eatWhile(":"),t.eat("%")?(n.line=e.firstLine(),n.lineEnd=e.lastLine()):(n.line=this.parseLineSpec_(e,t),void 0!==n.line&&t.eat(",")&&(n.lineEnd=this.parseLineSpec_(e,t)));var r=t.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return n.commandName=r?r[1]:t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var r=t.next(),o=at(e,e.state.vim,r);if(!o)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,o.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1)}},parseLineSpecOffset_:function(e,t){var n=e.match(/^([+-])?(\d+)/);if(n){var r=parseInt(n[2],10);"-"==n[1]?t-=r:t+=r}return t},parseCommandArgs_:function(e,t,n){if(!e.eol()){t.argString=e.match(/.*/)[0];var r=n.argDelimiter||/\s+/,o=Ae(t.argString).split(r);o.length&&o[0]&&(t.args=o)}},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(0===r.name.indexOf(e))return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e<k.length;e++){var t=k[e],n=t.shortName||t.name;this.commandMap_[n]=t}},map:function(e,t,n){if(":"!=e&&":"==e.charAt(0)){if(n)throw Error("Mode not supported for ex mappings");var r=e.substring(1);":"!=t&&":"==t.charAt(0)?this.commandMap_[r]={name:r,type:"exToEx",toInput:t.substring(1),user:!0}:this.commandMap_[r]={name:r,type:"exToKey",toKeys:t,user:!0}}else if(":"!=t&&":"==t.charAt(0)){var o={keys:e,type:"keyToEx",exArgs:{input:t.substring(1)}};n&&(o.context=n),y.unshift(o)}else{o={keys:e,type:"keyToKey",toKeys:t};n&&(o.context=n),y.unshift(o)}},unmap:function(e,t){if(":"!=e&&":"==e.charAt(0)){if(t)throw Error("Mode not supported for ex mappings");var n=e.substring(1);if(this.commandMap_[n]&&this.commandMap_[n].user)return void delete this.commandMap_[n]}else for(var r=e,o=0;o<y.length;o++)if(r==y[o].keys&&y[o].context===t)return void y.splice(o,1)}};var lt={colorscheme:function(e,t){!t.args||t.args.length<1?Ye(e,e.getOption("theme")):e.setOption("theme",t.args[0])},map:function(e,t,n){var r=t.args;!r||r.length<2?e&&Ye(e,"Invalid mapping: "+t.input):ut.map(r[0],r[1],n)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,n){var r=t.args;!r||r.length<1?e&&Ye(e,"No such mapping: "+t.input):ut.unmap(r[0],n)},move:function(e,t){ce.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var n=t.args,r=t.setCfg||{};if(!n||n.length<1)e&&Ye(e,"Invalid mapping: "+t.input);else{var o=n[0].split("="),i=o[0],a=o[1],s=!1;if("?"==i.charAt(i.length-1)){if(a)throw Error("Trailing characters: "+t.argString);i=i.substring(0,i.length-1),s=!0}void 0===a&&"no"==i.substring(0,2)&&(i=i.substring(2),a=!1);var c=U[i]&&"boolean"==U[i].type;if(c&&null==a&&(a=!0),!c&&void 0===a||s){var l=q(i,e,r);l instanceof Error?Ye(e,l.message):Ye(e,!0===l||!1===l?" "+(l?"":"no")+i:" "+i+"="+l)}else{var u=J(i,a,e,r);u instanceof Error&&Ye(e,u.message)}}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,t){var n=t.args,r=Q.registerController.registers,o="----------Registers----------\n\n";if(n){n=n.join("");for(var i=0;i<n.length;i++){if(a=n.charAt(i),Q.registerController.isValidRegister(a))o+='"'+a+" "+(r[a]||new ie).toString()+"\n"}}else for(var a in r){var s=r[a].toString();s.length&&(o+='"'+a+" "+s+"\n")}Ye(e,o)},sort:function(e,t){var n,r,o,i,a;var s=function(){if(t.argString){var e=new m.StringStream(t.argString);if(e.eat("!")&&(n=!0),e.eol())return;if(!e.eatSpace())return"Invalid arguments";var s=e.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!s&&!e.eol())return"Invalid arguments";if(s[1]){r=-1!=s[1].indexOf("i"),o=-1!=s[1].indexOf("u");var c=-1!=s[1].indexOf("d")||-1!=s[1].indexOf("n")&&1,l=-1!=s[1].indexOf("x")&&1,u=-1!=s[1].indexOf("o")&&1;if(c+l+u>1)return"Invalid arguments";i=(c?"decimal":l&&"hex")||u&&"octal"}s[2]&&(a=new RegExp(s[2].substr(1,s[2].length-2),r?"i":""))}}();if(s)Ye(e,s+": "+t.argString);else{var c=t.line||e.firstLine(),l=t.lineEnd||t.line||e.lastLine();if(c!=l){var u=w(c,0),h=w(l,Me(e,l)),d=e.getRange(u,h).split("\n"),p=a||("decimal"==i?/(-?)([\d]+)/:"hex"==i?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==i?/([0-7]+)/:null),f="decimal"==i?10:"hex"==i?16:"octal"==i?8:null,g=[],v=[];if(i||a)for(var y=0;y<d.length;y++){var C=a?d[y].match(a):null;C&&""!=C[0]?g.push(C):!a&&p.exec(d[y])?g.push(d[y]):v.push(d[y])}else v=d;if(g.sort(a?function(e,t){var o;return n&&(o=e,e=t,t=o),r&&(e[0]=e[0].toLowerCase(),t[0]=t[0].toLowerCase()),e[0]<t[0]?-1:1}:S),a)for(y=0;y<g.length;y++)g[y]=g[y].input;else i||v.sort(S);if(d=n?g.concat(v):v.concat(g),o){var k,x=d;d=[];for(y=0;y<x.length;y++)x[y]!=k&&d.push(x[y]),k=x[y]}e.replaceRange(d.join("\n"),u,h)}}function S(e,t){var o;n&&(o=e,e=t,t=o);r&&(e=e.toLowerCase(),t=t.toLowerCase());var a=i&&p.exec(e),s=i&&p.exec(t);return a?(a=parseInt((a[1]+a[2]).toLowerCase(),f))-(s=parseInt((s[1]+s[2]).toLowerCase(),f)):e<t?-1:1}},vglobal:function(e,t){this.global(e,t)},global:function(e,t){var n=t.argString;if(n){var r,o="v"===t.commandName[0],i=void 0!==t.line?t.line:e.firstLine(),a=t.lineEnd||t.line||e.lastLine(),s=function(e){return Je(e,"/")}(n),c=n;if(s.length&&(c=s[0],r=s.slice(1,s.length).join("/")),c)try{tt(e,c,!0,!0)}catch(t){return void Ye(e,"Invalid regex: "+c)}for(var l=ze(e).getQuery(),u=[],h=i;h<=a;h++){var d=e.getLineHandle(h);l.test(d.text)!==o&&u.push(r?d:d.text)}if(r){var p=0,f=function(){if(p<u.length){var t=u[p++],n=e.getLineNumber(t);if(null==n)return void f();var o=n+1+r;ut.processCommand(e,o,{callback:f})}};f()}else Ye(e,u.join("\n"))}else Ye(e,"Regular Expression missing from global")},substitute:function(e,t){if(!e.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var n,r,o,i,a=t.argString,s=a?Je(a,a[0]):[],c="",l=!1,u=!1;if(s.length)n=s[0],q("pcre")&&""!==n&&(n=new RegExp(n).source),void 0!==(c=s[1])&&(c=q("pcre")?function(e){for(var t=new m.StringStream(e),n=[];!t.eol();){for(;t.peek()&&"\\"!=t.peek();)n.push(t.next());var r=!1;for(var o in Ge)if(t.match(o,!0)){r=!0,n.push(Ge[o]);break}r||n.push(t.next())}return n.join("")}(c.replace(/([^\\])&/g,"$1$$&")):function(e){for(var t,n=!1,r=[],o=-1;o<e.length;o++){var i=e.charAt(o)||"",a=e.charAt(o+1)||"";Qe[i+a]?(r.push(Qe[i+a]),o++):n?(r.push(i),n=!1):"\\"===i?(n=!0,t=a,T.test(t)||"$"===a?r.push("$"):"/"!==a&&"\\"!==a&&r.push("\\")):("$"===i&&r.push("$"),r.push(i),"/"===a&&r.push("\\"))}return r.join("")}(c),Q.lastSubstituteReplacePart=c),r=s[2]?s[2].split(" "):[];else if(a&&a.length)return void Ye(e,"Substitutions should be of the form :s/pattern/replace/");if(r&&(o=r[0],i=parseInt(r[1]),o&&(-1!=o.indexOf("c")&&(l=!0),-1!=o.indexOf("g")&&(u=!0),n=q("pcre")?n+"/"+o:n.replace(/\//g,"\\/")+"/"+o)),n)try{tt(e,n,!0,!0)}catch(t){return void Ye(e,"Invalid regex: "+n)}if(void 0!==(c=c||Q.lastSubstituteReplacePart)){var h=ze(e).getQuery(),d=void 0!==t.line?t.line:e.getCursor().line,p=t.lineEnd||d;d==e.firstLine()&&p==e.lastLine()&&(p=1/0),i&&(p=(d=p)+i-1);var f=pe(e,w(d,0)),g=e.getSearchCursor(h,f);!function(e,t,n,r,o,i,a,s,c){e.state.vim.exMode=!0;var l,u,h,d=!1;function p(){e.operation((function(){for(;!d;)f(),g();v()}))}function f(){var t=e.getRange(i.from(),i.to()).replace(a,s),n=i.to().line;i.replace(t),u=i.to().line,o+=u-n,h=u<n}function g(){for(;c=void 0,p=void 0,c=l&&ye(i.to()),(p=i.findNext())&&!p[0]&&c&&Ce(i.from(),c)&&(p=i.findNext()),p&&(t=i.from(),a=r,s=o,"number"!=typeof t&&(t=t.line),a instanceof Array?F(t,a):"number"==typeof s?t>=a&&t<=s:t==a);)if(n||i.from().line!=u||h)return e.scrollIntoView(i.from(),30),e.setSelection(i.from(),i.to()),l=i.from(),void(d=!1);var t,a,s,c,p;d=!0}function v(t){if(t&&t(),e.focus(),l){e.setCursor(l);var n=e.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=l.ch}c&&c()}if(g(),d)return void Ye(e,"No matches for "+a.source);if(!t)return p(),void(c&&c());et(e,{prefix:Ze("span","replace with ",Ze("strong",s)," (y/n/a/q/l)"),onKeyDown:function(t,n,r){switch(m.e_stop(t),m.keyName(t)){case"Y":f(),g();break;case"N":g();break;case"A":var o=c;c=void 0,e.operation(p),c=o;break;case"L":f();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":v(r)}return d&&v(r),!0}})}(e,l,u,d,p,g,h,c,t.callback)}else Ye(e,"No previous substitute regular expression")},redo:m.commands.redo,undo:m.commands.undo,write:function(e){m.commands.save?m.commands.save(e):e.save&&e.save()},nohlsearch:function(e){ot(e)},yank:function(e){var t=ye(e.getCursor()).line,n=e.getLine(t);Q.registerController.pushText("0","yank",n,!0,!0)},delmarks:function(e,t){if(t.argString&&Ae(t.argString))for(var n=e.state.vim,r=new m.StringStream(Ae(t.argString));!r.eol();){r.eatSpace();var o=r.pos;if(!r.match(/[a-zA-Z]/,!1))return void Ye(e,"Invalid argument: "+t.argString.substring(o));var i=r.next();if(r.match("-",!0)){if(!r.match(/[a-zA-Z]/,!1))return void Ye(e,"Invalid argument: "+t.argString.substring(o));var a=i,s=r.next();if(!($(a)&&$(s)||j(a)&&j(s)))return void Ye(e,"Invalid argument: "+a+"-");var c=a.charCodeAt(0),l=s.charCodeAt(0);if(c>=l)return void Ye(e,"Invalid argument: "+t.argString.substring(o));for(var u=0;u<=l-c;u++){var h=String.fromCharCode(c+u);delete n.marks[h]}}else delete n.marks[i]}else Ye(e,"Argument required")}},ut=new ct;function ht(e){var t=e.state.vim,n=Q.macroModeState,r=Q.registerController.getRegister("."),o=n.isPlaying,i=n.lastInsertModeChanges;o||(e.off("change",ft),m.off(e.getInputField(),"keydown",yt)),!o&&t.insertModeRepeat>1&&(Ct(e,t,t.insertModeRepeat-1,!0),t.lastEditInputState.repeatOverride=t.insertModeRepeat),delete t.insertModeRepeat,t.insertMode=!1,e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),r.setText(i.changes.join("")),m.signal(e,"vim-mode-change",{mode:"normal"}),n.isRecording&&function(e){if(e.isPlaying)return;var t=e.latestRegister,n=Q.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}(n)}function dt(e){y.unshift(e)}function pt(e,t,n,r){var o=Q.registerController.getRegister(r);if(":"==r)return o.keyBuffer[0]&&ut.processCommand(e,o.keyBuffer[0]),void(n.isPlaying=!1);var i=o.keyBuffer,a=0;n.isPlaying=!0,n.replaySearchQueries=o.searchQueries.slice(0);for(var s=0;s<i.length;s++)for(var c,l,u=i[s];u;)if(l=(c=/<\w+-.+?>|<\w+>|./.exec(u))[0],u=u.substring(c.index+l.length),m.Vim.handleKey(e,l,"macro"),t.insertMode){var h=o.insertModeChanges[a++].changes;Q.macroModeState.lastInsertModeChanges.changes=h,kt(e,h,1),ht(e)}n.isPlaying=!1}function ft(e,t){var n=Q.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(r.expectCursorActivityForChange=!0,r.ignoreCount>1)r.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var o=e.listSelections().length;o>1&&(r.ignoreCount=o);var i=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1),i&&(e.state.overwrite&&!/\n/.test(i)?r.changes.push([i]):r.changes.push(i))}t=t.next}}function mt(e){var t=e.state.vim;if(t.insertMode){var n=Q.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:r.maybeReset=!0}else e.curOp.isVimOp||gt(e,t);t.visualMode}function gt(e,t,n){var r=e.getCursor("anchor"),o=e.getCursor("head");if(t.visualMode&&!e.somethingSelected()?Be(e,!1):t.visualMode||t.insertMode||!e.somethingSelected()||(t.visualMode=!0,t.visualLine=!1,m.signal(e,"vim-mode-change",{mode:"visual"})),t.visualMode){var i=ke(o,r)?0:-1,a=ke(o,r)?-1:0;o=me(o,0,i),r=me(r,0,a),t.sel={anchor:r,head:o},We(e,t,"<",we(o,r)),We(e,t,">",xe(o,r))}else t.insertMode||n||(t.lastHPos=e.getCursor().ch)}function vt(e){this.keyName=e}function yt(e){var t=Q.macroModeState.lastInsertModeChanges,n=m.keyName(e);n&&(-1==n.indexOf("Delete")&&-1==n.indexOf("Backspace")||m.lookupKey(n,"vim-insert",(function(){return t.maybeReset&&(t.changes=[],t.maybeReset=!1),t.changes.push(new vt(n)),!0})))}function Ct(e,t,n,r){var o=Q.macroModeState;o.isPlaying=!0;var i=!!t.lastEditActionCommand,a=t.inputState;function s(){i?ce.processAction(e,t,t.lastEditActionCommand):ce.evalInput(e,t)}function c(n){if(o.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=o.lastInsertModeChanges;kt(e,r.changes,n)}}if(t.inputState=t.lastEditInputState,i&&t.lastEditActionCommand.interlaceInsertRepeat)for(var l=0;l<n;l++)s(),c(1);else r||s(),c(n);t.inputState=a,t.insertMode&&!r&&ht(e),o.isPlaying=!1}function kt(e,t,n){function r(t){return"string"==typeof t?m.commands[t](e):t(e),!0}var o=e.getCursor("head"),i=Q.macroModeState.lastInsertModeChanges.visualBlock;i&&(Oe(e,o,i+1),n=e.listSelections().length,e.setCursor(o));for(var a=0;a<n;a++){i&&e.setCursor(me(o,a,0));for(var s=0;s<t.length;s++){var c=t[s];if(c instanceof vt)m.lookupKey(c.keyName,"vim-insert",r);else if("string"==typeof c){var l=e.getCursor();e.replaceRange(c,l,l)}else{var u=e.getCursor(),h=me(u,0,c[0].length);e.replaceRange(c[0],u,h)}}}i&&e.setCursor(me(o,0,1))}m.keyMap.vim={attach:M,detach:S,call:A},z("insertModeEscKeysTimeout",200,"number"),m.keyMap["vim-insert"]={fallthrough:["default"],attach:M,detach:S,call:A},m.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:M,detach:S,call:A},te(),m.Vim=x();var wt={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"};var xt=(x=m.Vim).handleKey.bind(x);function St(e){var t=new e.constructor;return Object.keys(e).forEach((function(n){var r=e[n];Array.isArray(r)?r=r.slice():r&&"object"==typeof r&&r.constructor!=Object&&(r=St(r)),t[n]=r})),e.sel&&(t.sel={head:e.sel.head&&ye(e.sel.head),anchor:e.sel.anchor&&ye(e.sel.anchor)}),t}x.handleKey=function(e,t,n){return e.operation((function(){return xt(e,t,n)}),!0)},t.CodeMirror=m;var Mt=x.maybeInitVimState_;function At(e,t){t.off("beforeEndOperation",At);var n=t.state.cm.vimCmd;n&&t.execCommand(n.exec?n:n.name,n.args),t.curOp=t.prevOp}t.handler={$id:"ace/keyboard/vim",drawCursor:function(e,t,n,o,a){var s=this.state.vim||{},c=n.characterWidth,l=n.lineHeight,u=t.top,h=t.left;s.insertMode||!(o.cursor?r.comparePoints(o.cursor,o.start)<=0:a.selection.isBackwards()||a.selection.isEmpty())&&h>c&&(h-=c);!s.insertMode&&s.status&&(u+=l/=2),i.translate(e,h,u),i.setStyle(e.style,"width",c+"px"),i.setStyle(e.style,"height",l+"px")},handleKeyboard:function(e,t,n,r,o){var i=e.editor,a=i.state.cm,s=Mt(a);if(-1!=r){if(s.insertMode||(-1==t?(n.charCodeAt(0)>255&&e.inputKey&&(n=e.inputKey)&&4==e.inputHash&&(n=n.toUpperCase()),e.inputChar=n):4==t||0==t?e.inputKey==n&&e.inputHash==t&&e.inputChar?(n=e.inputChar,t=-1):(e.inputChar=null,e.inputKey=n,e.inputHash=t):e.inputChar=e.inputKey=null),"c"==n&&1==t&&!u.isMac&&i.getCopyText())return i.once("copy",(function(){i.selection.clearSelection()})),{command:"null",passEvent:!0};if("esc"==n&&!s.insertMode&&!s.visualMode&&!a.ace.inMultiSelectMode){var c=ze(a).getOverlay();c&&a.removeOverlay(c)}if(-1==t||1&t||0===t&&n.length>1){var l=s.insertMode,h=function(e,t,n){t.length>1&&"n"==t[0]&&(t=t.replace("numpad","")),t=wt[t]||t;var r="";return n.ctrlKey&&(r+="C-"),n.altKey&&(r+="A-"),(r||t.length>1)&&n.shiftKey&&(r+="S-"),(r+=t).length>1&&(r="<"+r+">"),r}(0,n,o||{});null==s.status&&(s.status="");var d=function(e,t,n){var r=!1,o=x.maybeInitVimState_(e),i=o.visualBlock||o.wasInVisualBlock,a=e.ace.inMultiSelectMode;if(o.wasInVisualBlock&&!a?o.wasInVisualBlock=!1:a&&o.visualBlock&&(o.wasInVisualBlock=!0),"<Esc>"!=t||o.insertMode||o.visualMode||!a)if(i||!a||e.ace.inVirtualSelectionMode)r=x.handleKey(e,t,n);else{var s=St(o);e.operation((function(){e.ace.forEachSelection((function(){var o=e.ace.selection;e.state.vim.lastHPos=null==o.$desiredColumn?o.lead.column:o.$desiredColumn;var i=e.getCursor("head"),a=e.getCursor("anchor"),c=ke(i,a)?0:-1,l=ke(i,a)?-1:0;i=me(i,0,c),a=me(a,0,l),e.state.vim.sel.head=i,e.state.vim.sel.anchor=a,r=xt(e,t,n),o.$desiredColumn=-1==e.state.vim.lastHPos?null:e.state.vim.lastHPos,e.virtualSelectionMode()&&(e.state.vim=St(s))})),e.curOp.cursorActivity&&!r&&(e.curOp.cursorActivity=!1)}),!0)}else e.ace.exitMultiSelectMode();return!r||o.visualMode||o.insert||o.visualMode==e.somethingSelected()||gt(e,o,!0),r}(a,h,"user");if(s=Mt(a),d&&null!=s.status?s.status+=h:null==s.status&&(s.status=""),a._signal("changeStatus"),!d&&(-1!=t||l))return;return{command:"null",passEvent:!d}}}},attach:function(e){e.state||(e.state={});var t=new m(e);function n(){var n=Mt(t).insertMode;t.ace.renderer.setStyle("normal-mode",!n),e.textInput.setCommandMode(!n),e.renderer.$keepTextAreaAtCursor=n,e.renderer.$blockCursor=!n}e.state.cm=t,e.$vimModeHandler=this,m.keyMap.vim.attach(t),Mt(t).status=null,t.on("vim-command-done",(function(){t.virtualSelectionMode()||(Mt(t).status=null,t.ace._signal("changeStatus"),t.ace.session.markUndoGroup())})),t.on("changeStatus",(function(){t.ace.renderer.updateCursor(),t.ace._signal("changeStatus")})),t.on("vim-mode-change",(function(){t.virtualSelectionMode()||(n(),t._signal("changeStatus"))})),n(),e.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(t)},detach:function(e){var t=e.state.cm;m.keyMap.vim.detach(t),t.destroy(),e.state.cm=null,e.$vimModeHandler=null,e.renderer.$cursorLayer.drawCursor=null,e.renderer.setStyle("normal-mode",!1),e.textInput.setCommandMode(!1),e.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(e){var t=e.state.cm,n=Mt(t);if(n.insertMode)return"INSERT";var r="";return n.visualMode&&(r+="VISUAL",n.visualLine&&(r+=" LINE"),n.visualBlock&&(r+=" BLOCK")),n.status&&(r+=(r?" ":"")+n.status),r}},x.defineOption({name:"wrap",set:function(e,t){t&&t.ace.setOption("wrap",e)},type:"boolean"},!1),x.defineEx("write","w",(function(){console.log(":write is not implemented")})),y.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),y.push({keys:"gq",type:"operator",operator:"hardWrap"}),x.defineOperator("hardWrap",(function(e,t,n,r,o){var i=n[0].anchor.line,a=n[0].head.line;return t.linewise&&a--,f(e.ace,{startRow:i,endRow:a}),w(a,0)})),z("textwidth",void 0,"number",["tw"],(function(e,t){if(void 0!==t){if(void 0===e)return t.ace.getOption("printMarginColumn");var n=Math.round(e);n>1&&t.ace.setOption("printMarginColumn",n)}})),de.aceCommand=function(e,t,n){e.vimCmd=t,e.ace.inVirtualSelectionMode?e.ace.on("beforeEndOperation",At):At(null,e.ace)},de.fold=function(e,t,n){e.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(t.all?2:0)+(t.open?1:0)])},t.handler.defaultKeymap=y,t.handler.actions=de,t.Vim=x})),ace.require(["ace/keyboard/vim"],(function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}));
@@ -1 +0,0 @@
1
- ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator"],(function(e,t,r){"use strict";var a=e("../token_iterator").TokenIterator;function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}t.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],t.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],t.beautify=function(e){for(var r,s,n,i=new a(e,0,0),c=i.getCurrentToken(),u=e.getTabString(),l=t.singletonTags,m=t.blockTags,p=!1,f=!1,h=!1,y="",d="",b="",g=0,$=0,k=0,w=0,x=0,v=0,T=0,R=0,O=0,q=!1,C=!1,I=!1,_=!1,j={0:0},B=[],F=!1,S=function(){r&&r.value&&"string.regexp"!==r.type&&(r.value=r.value.replace(/^\s*/,""))},K=function(){y=y.replace(/ +$/,"")},L=function(){y=y.trimRight(),p=!1};null!==c;){if(R=i.getCurrentTokenRow(),i.$rowTokens,r=i.stepForward(),void 0!==c){if(d=c.value,x=0,I="style"===b||"ace/mode/css"===e.$modeId,o(c,"tag-open")?(C=!0,r&&(_=-1!==m.indexOf(r.value)),"</"===d&&(_&&!p&&O<1&&O++,I&&(O=1),x=1,_=!1)):o(c,"tag-close")?C=!1:o(c,"comment.start")?_=!0:o(c,"comment.end")&&(_=!1),C||O||"paren.rparen"!==c.type||"}"!==c.value.substr(0,1)||O++,R!==s&&(O=R,s&&(O-=s)),O){for(L();O>0;O--)y+="\n";p=!0,o(c,"comment")||c.type.match(/^(comment|string)$/)||(d=d.trimLeft())}if(d){if("keyword"===c.type&&d.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(B[g]=d,S(),h=!0,d.match(/^(else|elseif)$/)&&y.match(/\}[\s]*$/)&&(L(),f=!0)):"paren.lparen"===c.type?(S(),"{"===d.substr(-1)&&(h=!0,q=!1,C||(O=1)),"{"===d.substr(0,1)&&(f=!0,"["!==y.substr(-1)&&"["===y.trimRight().substr(-1)?(L(),f=!1):")"===y.trimRight().substr(-1)?L():K())):"paren.rparen"===c.type?(x=1,"}"===d.substr(0,1)&&("case"===B[g-1]&&x++,"{"===y.trimRight().substr(-1)?L():(f=!0,I&&(O+=2))),"]"===d.substr(0,1)&&"}"!==y.substr(-1)&&"}"===y.trimRight().substr(-1)&&(f=!1,w++,L()),")"===d.substr(0,1)&&"("!==y.substr(-1)&&"("===y.trimRight().substr(-1)&&(f=!1,w++,L()),K()):"keyword.operator"!==c.type&&"keyword"!==c.type||!d.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?"punctuation.operator"===c.type&&";"===d?(L(),S(),h=!0,I&&O++):"punctuation.operator"===c.type&&d.match(/^(:|,)$/)?(L(),S(),d.match(/^(,)$/)&&T>0&&0===v?O++:(h=!0,p=!1)):"support.php_tag"!==c.type||"?>"!==d||p?o(c,"attribute-name")&&y.substr(-1).match(/^\s$/)?f=!0:o(c,"attribute-equals")?(K(),S()):o(c,"tag-close")?(K(),"/>"===d&&(f=!0)):"keyword"===c.type&&d.match(/^(case|default)$/)&&F&&(x=1):(L(),f=!0):(L(),S(),f=!0,h=!0),p&&(!c.type.match(/^(comment)$/)||d.substr(0,1).match(/^[/#]$/))&&(!c.type.match(/^(string)$/)||d.substr(0,1).match(/^['"]$/))){if(w=k,g>$)for(w++,n=g;n>$;n--)j[n]=w;else g<$&&(w=j[g]);for($=g,k=w,x&&(w-=x),q&&!v&&(w++,q=!1),n=0;n<w;n++)y+=u}if("keyword"===c.type&&d.match(/^(case|default)$/)?!1===F&&(B[g]=d,g++,F=!0):"keyword"===c.type&&d.match(/^(break)$/)&&B[g-1]&&B[g-1].match(/^(case|default)$/)&&(g--,F=!1),"paren.lparen"===c.type&&(v+=(d.match(/\(/g)||[]).length,T+=(d.match(/\{/g)||[]).length,g+=d.length),"keyword"===c.type&&d.match(/^(if|else|elseif|for|while)$/)?(q=!0,v=0):!v&&d.trim()&&"comment"!==c.type&&(q=!1),"paren.rparen"===c.type)for(v-=(d.match(/\)/g)||[]).length,T-=(d.match(/\}/g)||[]).length,n=0;n<d.length;n++)g--,"}"===d.substr(n,1)&&"case"===B[g]&&g--;"text"==c.type&&(d=d.replace(/\s+$/," ")),f&&!p&&(K(),"\n"!==y.substr(-1)&&(y+=" ")),y+=d,h&&(y+=" "),p=!1,f=!1,h=!1,(o(c,"tag-close")&&(_||-1!==m.indexOf(b))||o(c,"doctype")&&">"===d)&&(O=_&&r&&"</"===r.value?-1:1),o(c,"tag-open")&&"</"===d?g--:o(c,"tag-open")&&"<"===d&&-1===l.indexOf(r.value)?g++:o(c,"tag-name")?b=d:o(c,"tag-close")&&"/>"===d&&-1===l.indexOf(b)&&g--,s=R}}c=r}y=y.trim(),e.doc.setValue(y)},t.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]})),ace.require(["ace/ext/beautify"],(function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}));
@@ -1,2 +0,0 @@
1
- (self.webpackChunktocco_devcon=self.webpackChunktocco_devcon||[]).push([[277],{7691:(e,t,n)=>{var r=n(35615);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},35615:e=>{e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},59839:e=>{e.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=13)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n=e.exports={version:"2.5.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(4)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(32)("wks"),o=n(9),i=n(0).Symbol,s="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=s&&i[e]||(s?i:o)("Symbol."+e))}).store=r},function(e,t,n){var r=n(0),o=n(2),i=n(8),s=n(22),u=n(10),a=function(e,t,n){var l,c,f,g,p=e&a.F,d=e&a.G,h=e&a.S,m=e&a.P,v=e&a.B,y=d?r:h?r[t]||(r[t]={}):(r[t]||{}).prototype,S=d?o:o[t]||(o[t]={}),b=S.prototype||(S.prototype={});for(l in d&&(n=t),n)f=((c=!p&&y&&void 0!==y[l])?y:n)[l],g=v&&c?u(f,r):m&&"function"==typeof f?u(Function.call,f):f,y&&s(y,l,f,e&a.U),S[l]!=f&&i(S,l,g),m&&b[l]!=f&&(b[l]=f)};r.core=o,a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,e.exports=a},function(e,t,n){var r=n(16),o=n(21);e.exports=n(3)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(24);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(28),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=e.type||"",i=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim();return"."===t.charAt(0)?r.toLowerCase().endsWith(t.toLowerCase()):t.endsWith("/*")?i===t.replace(/\/.*$/,""):o===t}))}return!0},n(14),n(34)},function(e,t,n){n(15),e.exports=n(2).Array.some},function(e,t,n){"use strict";var r=n(7),o=n(25)(3);r(r.P+r.F*!n(33)([].some,!0),"Array",{some:function(e){return o(this,e,arguments[1])}})},function(e,t,n){var r=n(17),o=n(18),i=n(20),s=Object.defineProperty;t.f=n(3)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(1);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(3)&&!n(4)((function(){return 7!=Object.defineProperty(n(19)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(1),o=n(0).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(1);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(0),o=n(8),i=n(23),s=n(9)("src"),u=Function.toString,a=(""+u).split("toString");n(2).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,u){var l="function"==typeof n;l&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(l&&(i(n,s)||o(n,s,e[t]?""+e[t]:a.join(String(t)))),e===r?e[t]=n:u?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[s]||u.call(this)}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(10),o=n(26),i=n(27),s=n(12),u=n(29);e.exports=function(e,t){var n=1==e,a=2==e,l=3==e,c=4==e,f=6==e,g=5==e||f,p=t||u;return function(t,u,d){for(var h,m,v=i(t),y=o(v),S=r(u,d,3),b=s(y.length),w=0,I=n?p(t,b):a?p(t,0):void 0;b>w;w++)if((g||w in y)&&(m=S(h=y[w],w,v),e))if(n)I[w]=m;else if(m)switch(e){case 3:return!0;case 5:return h;case 6:return w;case 2:I.push(h)}else if(c)return!1;return f?-1:l||c?c:I}}},function(e,t,n){var r=n(5);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(11);e.exports=function(e){return Object(r(e))}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(30);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(1),o=n(31),i=n(6)("species");e.exports=function(e){var t;return o(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&null===(t=t[i])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var r=n(5);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(0),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return o[e]||(o[e]={})}},function(e,t,n){"use strict";var r=n(4);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){n(35),e.exports=n(2).String.endsWith},function(e,t,n){"use strict";var r=n(7),o=n(12),i=n(36),s="".endsWith;r(r.P+r.F*n(38)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=o(t.length),u=void 0===n?r:Math.min(o(n),r),a=String(e);return s?s.call(t,a,u):t.slice(u-a.length,u)===a}})},function(e,t,n){var r=n(37),o=n(11);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(e))}},function(e,t,n){var r=n(1),o=n(5),i=n(6)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(6)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}}])},47834:(e,t,n)=>{var r=n(1496)();e.exports=r},26794:(e,t,n)=>{var r=n(47834),o=n(9820);e.exports=function(e,t){return e&&r(e,t,o)}},24113:e=>{e.exports=function(e){return e}},1496:e=>{e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),s=r(t),u=s.length;u--;){var a=s[e?u:++o];if(!1===n(i[a],a,i))break}return t}}},1538:(e,t,n)=>{var r=n(26794),o=n(24113);e.exports=function(e,t){return e&&r(e,o(t))}},34217:(e,t,n)=>{var r=n(6363);e.exports=function(e,t){return r(e,t)}},73012:(e,t,n)=>{"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1024),s=f(i),u=f(n(35989)),a=f(n(32827)),l=f(n(65786)),c=n(27388);function f(e){return e&&e.__esModule?e:{default:e}}var g=function(){return!0},p=function(e){function t(e){var n=e.alwaysRenderSuggestions;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return d.call(r),r.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},r.justPressedUpDown=!1,r.justMouseEntered=!1,r.pressedSuggestion=null,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"componentWillReceiveProps",value:function(e){(0,a.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered&&this.highlightFirstSuggestion():this.willRenderSuggestions(e)?this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions():this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,o=n.onSuggestionHighlighted,i=n.highlightFirstSuggestion;if(!(0,a.default)(r,e.suggestions)&&r.length>0&&i)this.highlightFirstSuggestion();else if(o){var s=this.getHighlightedSuggestion();s!=t.highlightedSuggestion&&o({suggestion:s})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState((function(o){var i=o.valueBeforeUpDown;return null===t?i=null:null===i&&void 0!==n&&(i=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:i}}))}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState((function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}}))}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,o=n.multiSection,i=n.getSectionSuggestions;return o?i(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,o=r.value,i=r.onChange;t!==o&&i(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e){var t=e.suggestions,n=e.inputProps,r=e.shouldRenderSuggestions,o=n.value;return t.length>0&&r(o)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,o=t.renderInputComponent,i=t.onSuggestionsFetchRequested,u=t.renderSuggestion,a=t.inputProps,f=t.multiSection,p=t.renderSectionTitle,d=t.id,h=t.getSectionSuggestions,m=t.theme,v=t.getSuggestionValue,y=t.alwaysRenderSuggestions,S=t.highlightFirstSuggestion,b=this.state,w=b.isFocused,I=b.isCollapsed,x=b.highlightedSectionIndex,O=b.highlightedSuggestionIndex,C=b.valueBeforeUpDown,D=y?g:this.props.shouldRenderSuggestions,k=a.value,P=a.onFocus,_=a.onKeyDown,j=this.willRenderSuggestions(this.props),E=y||w&&!I&&j,T=E?n:[],R=r({},a,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=D(k);e.setState({isFocused:!0,isCollapsed:!n}),P&&P(t),n&&i({value:k,reason:"input-focused"})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,o=D(n);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(r({},S?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!o})),o?i({value:n,reason:"input-changed"}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var o=t.keyCode;switch(o){case 40:case 38:if(I)D(k)&&(i({value:k,reason:"suggestions-revealed"}),e.revealSuggestions());else if(n.length>0){var s=r.newHighlightedSectionIndex,u=r.newHighlightedItemIndex,a=void 0;a=null===u?null===C?k:C:e.getSuggestionValueByIndex(s,u),e.updateHighlightedSuggestion(s,u,k),e.maybeCallOnChange(t,a,40===o?"down":"up")}t.preventDefault(),e.justPressedUpDown=!0,setTimeout((function(){e.justPressedUpDown=!1}));break;case 13:if(229===t.keyCode)break;var l=e.getHighlightedSuggestion();if(E&&!y&&e.closeSuggestions(),null!=l){var c=v(l);e.maybeCallOnChange(t,c,"enter"),e.onSuggestionSelected(t,{suggestion:l,suggestionValue:c,suggestionIndex:O,sectionIndex:x,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:E&&t.preventDefault();var f=E&&!y;if(null===C){if(!f){e.maybeCallOnChange(t,"","escape"),D("")?i({value:"",reason:"escape-pressed"}):e.onSuggestionsClearRequested()}}else e.maybeCallOnChange(t,C,"escape");f?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}_&&_(t)}}),F={query:this.getQuery()};return s.default.createElement(l.default,{multiSection:f,items:T,renderInputComponent:o,renderItemsContainer:this.renderSuggestionsContainer,renderItem:u,renderItemData:F,renderSectionTitle:p,getSectionItems:h,highlightedSectionIndex:x,highlightedItemIndex:O,inputProps:R,itemProps:this.itemProps,theme:(0,c.mapToAutowhateverTheme)(m),id:d,ref:this.storeAutowhateverRef})}}]),t}(i.Component);p.propTypes={suggestions:u.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){var n=e[t];if("function"!=typeof n)throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},onSuggestionSelected:u.default.func,onSuggestionHighlighted:u.default.func,renderInputComponent:u.default.func,renderSuggestionsContainer:u.default.func,getSuggestionValue:u.default.func.isRequired,renderSuggestion:u.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n.hasOwnProperty("value"))throw new Error("'inputProps' must have 'value'.");if(!n.hasOwnProperty("onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:u.default.func,alwaysRenderSuggestions:u.default.bool,multiSection:u.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:u.default.bool,highlightFirstSuggestion:u.default.bool,theme:u.default.object,id:u.default.string},p.defaultProps={renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return s.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:c.defaultTheme,id:"1"};var d=function(){var e=this;this.onDocumentMouseDown=function(t){e.justClickedOnSuggestionsContainer=!1;for(var n=t.detail&&t.detail.target||t.target;null!==n&&n!==document;){if(null!==n.getAttribute("data-suggestion-index"))return;if(n===e.suggestionsContainer)return void(e.justClickedOnSuggestionsContainer=!0);n=n.parentNode}},this.storeAutowhateverRef=function(t){null!==t&&(e.autowhatever=t)},this.onSuggestionMouseEnter=function(t,n){var r=n.sectionIndex,o=n.itemIndex;e.updateHighlightedSuggestion(r,o),t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!0),e.justMouseEntered=!0,setTimeout((function(){e.justMouseEntered=!1}))},this.highlightFirstSuggestion=function(){e.updateHighlightedSuggestion(e.props.multiSection?0:null,0)},this.onDocumentMouseUp=function(){e.pressedSuggestion&&!e.justSelectedSuggestion&&e.input.focus(),e.pressedSuggestion=null},this.onSuggestionMouseDown=function(t){e.justSelectedSuggestion||(e.justSelectedSuggestion=!0,e.pressedSuggestion=t.target)},this.onSuggestionsClearRequested=function(){var t=e.props.onSuggestionsClearRequested;t&&t()},this.onSuggestionSelected=function(t,n){var r=e.props,o=r.alwaysRenderSuggestions,i=r.onSuggestionSelected,s=r.onSuggestionsFetchRequested;i&&i(t,n),o?s({value:n.suggestionValue,reason:"suggestion-selected"}):e.onSuggestionsClearRequested(),e.resetHighlightedSuggestion()},this.onSuggestionClick=function(t){var n=e.props,r=n.alwaysRenderSuggestions,o=n.focusInputOnSuggestionClick,i=e.getSuggestionIndices(e.findSuggestionElement(t.target)),s=i.sectionIndex,u=i.suggestionIndex,a=e.getSuggestion(s,u),l=e.props.getSuggestionValue(a);e.maybeCallOnChange(t,l,"click"),e.onSuggestionSelected(t,{suggestion:a,suggestionValue:l,suggestionIndex:u,sectionIndex:s,method:"click"}),r||e.closeSuggestions(),!0===o?e.input.focus():e.onBlur(),setTimeout((function(){e.justSelectedSuggestion=!1}))},this.onBlur=function(){var t=e.props,n=t.inputProps,r=t.shouldRenderSuggestions,o=n.value,i=n.onBlur,s=e.getHighlightedSuggestion(),u=r(o);e.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!u}),i&&i(e.blurEvent,{highlightedSuggestion:s})},this.onSuggestionMouseLeave=function(t){e.resetHighlightedSuggestion(!1),e.justSelectedSuggestion&&t.target===e.pressedSuggestion&&(e.justSelectedSuggestion=!1)},this.onSuggestionTouchStart=function(){e.justSelectedSuggestion=!0},this.onSuggestionTouchMove=function(){e.justSelectedSuggestion=!1,e.pressedSuggestion=null,e.input.focus()},this.itemProps=function(t){return{"data-section-index":t.sectionIndex,"data-suggestion-index":t.itemIndex,onMouseEnter:e.onSuggestionMouseEnter,onMouseLeave:e.onSuggestionMouseLeave,onMouseDown:e.onSuggestionMouseDown,onTouchStart:e.onSuggestionTouchStart,onTouchMove:e.onSuggestionTouchMove,onClick:e.onSuggestionClick}},this.renderSuggestionsContainer=function(t){var n=t.containerProps,r=t.children;return(0,e.props.renderSuggestionsContainer)({containerProps:n,children:r,query:e.getQuery()})}};t.default=p},38366:(e,t,n)=>{"use strict";e.exports=n(73012).default},27388:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},86818:(e,t,n)=>{"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,u=e[Symbol.iterator]();!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1024),u=p(s),a=p(n(35989)),l=p(n(44274)),c=p(n(91079)),f=p(n(48139)),g=p(n(90835));function p(e){return e&&e.__esModule?e:{default:e}}var d={},h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.storeInputReference=function(e){null!==e&&(n.input=e)},n.storeItemsContainerReference=function(e){null!==e&&(n.itemsContainer=e)},n.onHighlightedItemChange=function(e){n.highlightedItem=e},n.getItemId=function(e,t){return null===t?null:"react-autowhatever-"+n.props.id+"-"+(null===e?"":"section-"+e)+"-item-"+t},n.onFocus=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!0}),t.onFocus&&t.onFocus(e)},n.onBlur=function(e){var t=n.props.inputProps;n.setState({isInputFocused:!1}),t.onBlur&&t.onBlur(e)},n.onKeyDown=function(e){var t=n.props,r=t.inputProps,i=t.highlightedSectionIndex,s=t.highlightedItemIndex;switch(e.key){case"ArrowDown":case"ArrowUp":var u="ArrowDown"===e.key?"next":"prev",a=n.sectionIterator[u]([i,s]),l=o(a,2),c=l[0],f=l[1];r.onKeyDown(e,{newHighlightedSectionIndex:c,newHighlightedItemIndex:f});break;default:r.onKeyDown(e,{highlightedSectionIndex:i,highlightedItemIndex:s})}},n.highlightedItem=null,n.state={isInputFocused:!1},n.setSectionsItems(e),n.setSectionIterator(e),n.setTheme(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map((function(t){return e.getSectionItems(t)})),this.sectionsLengths=this.sectionsItems.map((function(e){return e.length})),this.allSectionsAreEmpty=this.sectionsLengths.every((function(e){return 0===e})))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,l.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,c.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,r=n.id,o=n.items,i=n.renderItem,s=n.renderItemData,a=n.renderSectionTitle,l=n.highlightedSectionIndex,c=n.highlightedItemIndex,p=n.itemProps;return o.map((function(n,o){var d="react-autowhatever-"+r+"-",h=d+"section-"+o+"-",m=0===o;return u.default.createElement("div",t(h+"container","sectionContainer",m&&"sectionContainerFirst"),u.default.createElement(f.default,{section:n,renderSectionTitle:a,theme:t,sectionKeyPrefix:h}),u.default.createElement(g.default,{items:e.sectionsItems[o],itemProps:p,renderItem:i,renderItemData:s,sectionIndex:o,highlightedItemIndex:l===o?c:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:d,ref:e.storeItemsListReference}))}))}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,r=n.id,o=n.renderItem,i=n.renderItemData,s=n.highlightedSectionIndex,a=n.highlightedItemIndex,l=n.itemProps;return u.default.createElement(g.default,{items:e,itemProps:l,renderItem:o,renderItemData:i,highlightedItemIndex:null===s?a:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-"+r+"-"})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,o=t.multiSection,i=t.renderInputComponent,s=t.renderItemsContainer,a=t.highlightedSectionIndex,l=t.highlightedItemIndex,c=this.state.isInputFocused,f=o?this.renderSections():this.renderItems(),g=null!==f,p=this.getItemId(a,l),d="react-autowhatever-"+n,h=r({role:"combobox","aria-haspopup":"listbox","aria-owns":d,"aria-expanded":g},e("react-autowhatever-"+n+"-container","container",g&&"containerOpen"),this.props.containerProps),m=i(r({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":d,"aria-activedescendant":p},e("react-autowhatever-"+n+"-input","input",g&&"inputOpen",c&&"inputFocused"),this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),v=s({containerProps:r({id:d,role:"listbox"},e("react-autowhatever-"+n+"-items-container","itemsContainer",g&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:f});return u.default.createElement("div",h,m,v)}}]),t}(s.Component);h.propTypes={id:a.default.string,multiSection:a.default.bool,renderInputComponent:a.default.func,renderItemsContainer:a.default.func,items:a.default.array.isRequired,renderItem:a.default.func,renderItemData:a.default.object,renderSectionTitle:a.default.func,getSectionItems:a.default.func,containerProps:a.default.object,inputProps:a.default.object,itemProps:a.default.oneOfType([a.default.object,a.default.func]),highlightedSectionIndex:a.default.number,highlightedItemIndex:a.default.number,theme:a.default.oneOfType([a.default.object,a.default.array])},h.defaultProps={id:"1",multiSection:!1,renderInputComponent:function(e){return u.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return u.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:d,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:d,inputProps:d,itemProps:d,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}},t.default=h},36978:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1024),s=l(i),u=l(n(35989)),a=l(n(62791));function l(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var g=function(e){function t(){var e,n,r;c(this,t);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return n=r=f(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.storeItemReference=function(e){null!==e&&(r.item=e)},r.onMouseEnter=function(e){var t=r.props,n=t.sectionIndex,o=t.itemIndex;r.props.onMouseEnter(e,{sectionIndex:n,itemIndex:o})},r.onMouseLeave=function(e){var t=r.props,n=t.sectionIndex,o=t.itemIndex;r.props.onMouseLeave(e,{sectionIndex:n,itemIndex:o})},r.onMouseDown=function(e){var t=r.props,n=t.sectionIndex,o=t.itemIndex;r.props.onMouseDown(e,{sectionIndex:n,itemIndex:o})},r.onClick=function(e){var t=r.props,n=t.sectionIndex,o=t.itemIndex;r.props.onClick(e,{sectionIndex:n,itemIndex:o})},f(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"shouldComponentUpdate",value:function(e){return(0,a.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,o=e.renderItem,i=e.renderItemData,u=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["isHighlighted","item","renderItem","renderItemData"]);return delete u.sectionIndex,delete u.itemIndex,"function"==typeof u.onMouseEnter&&(u.onMouseEnter=this.onMouseEnter),"function"==typeof u.onMouseLeave&&(u.onMouseLeave=this.onMouseLeave),"function"==typeof u.onMouseDown&&(u.onMouseDown=this.onMouseDown),"function"==typeof u.onClick&&(u.onClick=this.onClick),s.default.createElement("li",r({role:"option"},u,{ref:this.storeItemReference}),o(n,r({isHighlighted:t},i)))}}]),t}(i.Component);g.propTypes={sectionIndex:u.default.number,isHighlighted:u.default.bool.isRequired,itemIndex:u.default.number.isRequired,item:u.default.any.isRequired,renderItem:u.default.func.isRequired,renderItemData:u.default.object.isRequired,onMouseEnter:u.default.func,onMouseLeave:u.default.func,onMouseDown:u.default.func,onClick:u.default.func},t.default=g},90835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1024),s=c(i),u=c(n(35989)),a=c(n(36978)),l=c(n(62791));function c(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var p=function(e){function t(){var e,n,r;f(this,t);for(var o=arguments.length,i=Array(o),s=0;s<o;s++)i[s]=arguments[s];return n=r=g(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.storeHighlightedItemReference=function(e){r.props.onHighlightedItemChange(null===e?null:e.item)},g(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"shouldComponentUpdate",value:function(e){return(0,l.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,o=t.itemProps,i=t.renderItem,u=t.renderItemData,l=t.sectionIndex,c=t.highlightedItemIndex,f=t.getItemId,g=t.theme,p=t.keyPrefix,d=null===l?p:p+"section-"+l+"-",h="function"==typeof o;return s.default.createElement("ul",r({role:"listbox"},g(d+"items-list","itemsList")),n.map((function(t,n){var p=0===n,m=n===c,v=d+"item-"+n,y=h?o({sectionIndex:l,itemIndex:n}):o,S=r({id:f(l,n),"aria-selected":m},g(v,"item",p&&"itemFirst",m&&"itemHighlighted"),y);return m&&(S.ref=e.storeHighlightedItemReference),s.default.createElement(a.default,r({},S,{sectionIndex:l,isHighlighted:m,itemIndex:n,item:t,renderItem:i,renderItemData:u}))})))}}]),t}(i.Component);p.propTypes={items:u.default.array.isRequired,itemProps:u.default.oneOfType([u.default.object,u.default.func]),renderItem:u.default.func.isRequired,renderItemData:u.default.object.isRequired,sectionIndex:u.default.number,highlightedItemIndex:u.default.number,onHighlightedItemChange:u.default.func.isRequired,getItemId:u.default.func.isRequired,theme:u.default.func.isRequired,keyPrefix:u.default.string.isRequired},p.defaultProps={sectionIndex:null},t.default=p},48139:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(1024),i=a(o),s=a(n(35989)),u=a(n(62791));function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=function(e){function t(){return l(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"shouldComponentUpdate",value:function(e){return(0,u.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,r=e.theme,o=e.sectionKeyPrefix,s=n(t);return s?i.default.createElement("div",r(o+"title","sectionTitle"),s):null}}]),t}(o.Component);f.propTypes={section:s.default.any.isRequired,renderSectionTitle:s.default.func.isRequired,theme:s.default.func.isRequired,sectionKeyPrefix:s.default.string.isRequired},t.default=f},62791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!0;var s={},u=void 0,a=void 0;for(u=0,a=r.length;u<a;u++)s[r[u]]=!0;for(u=0,a=o.length;u<a;u++){var l=o[u],c=e[l],f=t[l];if(c!==f){if(!s[l]||null===c||null===f||"object"!==(void 0===c?"undefined":n(c))||"object"!==(void 0===f?"undefined":n(f)))return!0;var g=Object.keys(c),p=Object.keys(f);if(g.length!==p.length)return!0;for(var d=0,h=g.length;d<h;d++){var m=g[d];if(c[m]!==f[m])return!0}}}return!1}},65786:(e,t,n)=>{"use strict";e.exports=n(86818).default},76142:(e,t,n)=>{"use strict";n.d(t,{Z:()=>I});var r=n(1024),o=n.n(r),i=n(35989),s=n.n(i),u=n(59839),a=n.n(u),l="undefined"==typeof document||!document||!document.createElement||"multiple"in document.createElement("input");function c(e,t){return"application/x-moz-file"===e.type||a()(e,t)}function f(e){e.preventDefault()}function g(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function p(e){return-1!==e.indexOf("Edge/")}const d={borderStyle:"solid",borderColor:"#c66",backgroundColor:"#eee"},h={opacity:.5},m={borderStyle:"solid",borderColor:"#6c6",backgroundColor:"#eee"},v={width:200,height:200,borderWidth:2,borderColor:"#666",borderStyle:"dashed",borderRadius:5};var y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function b(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var w=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return r.renderChildren=function(e,t,n,o){return"function"==typeof e?e(y({},r.state,{isDragActive:t,isDragAccept:n,isDragReject:o})):e},r.composeHandlers=r.composeHandlers.bind(r),r.onClick=r.onClick.bind(r),r.onDocumentDrop=r.onDocumentDrop.bind(r),r.onDragEnter=r.onDragEnter.bind(r),r.onDragLeave=r.onDragLeave.bind(r),r.onDragOver=r.onDragOver.bind(r),r.onDragStart=r.onDragStart.bind(r),r.onDrop=r.onDrop.bind(r),r.onFileDialogCancel=r.onFileDialogCancel.bind(r),r.onInputElementClick=r.onInputElementClick.bind(r),r.setRef=r.setRef.bind(r),r.setRefs=r.setRefs.bind(r),r.isFileDialogActive=!1,r.state={draggedFiles:[],acceptedFiles:[],rejectedFiles:[]},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),S(t,[{key:"componentDidMount",value:function(){var e=this.props.preventDropOnDocument;this.dragTargets=[],e&&(document.addEventListener("dragover",f,!1),document.addEventListener("drop",this.onDocumentDrop,!1)),this.fileInputEl.addEventListener("click",this.onInputElementClick,!1),window.addEventListener("focus",this.onFileDialogCancel,!1)}},{key:"componentWillUnmount",value:function(){this.props.preventDropOnDocument&&(document.removeEventListener("dragover",f),document.removeEventListener("drop",this.onDocumentDrop)),null!=this.fileInputEl&&this.fileInputEl.removeEventListener("click",this.onInputElementClick,!1),window.removeEventListener("focus",this.onFileDialogCancel,!1)}},{key:"composeHandlers",value:function(e){return this.props.disabled?null:e}},{key:"onDocumentDrop",value:function(e){this.node&&this.node.contains(e.target)||(e.preventDefault(),this.dragTargets=[])}},{key:"onDragStart",value:function(e){this.props.onDragStart&&this.props.onDragStart.call(this,e)}},{key:"onDragEnter",value:function(e){var t=this;e.preventDefault(),-1===this.dragTargets.indexOf(e.target)&&this.dragTargets.push(e.target),Promise.resolve(this.props.getDataTransferItems(e)).then((function(e){t.setState({isDragActive:!0,draggedFiles:e})})),this.props.onDragEnter&&this.props.onDragEnter.call(this,e)}},{key:"onDragOver",value:function(e){e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect=this.isFileDialogActive?"none":"copy"}catch(e){}return this.props.onDragOver&&this.props.onDragOver.call(this,e),!1}},{key:"onDragLeave",value:function(e){var t=this;e.preventDefault(),this.dragTargets=this.dragTargets.filter((function(n){return n!==e.target&&t.node.contains(n)})),this.dragTargets.length>0||(this.setState({isDragActive:!1,draggedFiles:[]}),this.props.onDragLeave&&this.props.onDragLeave.call(this,e))}},{key:"onDrop",value:function(e){var t=this,n=this.props,r=n.onDrop,o=n.onDropAccepted,i=n.onDropRejected,s=n.multiple,u=n.disablePreview,a=n.accept,l=n.getDataTransferItems;e.preventDefault(),this.dragTargets=[],this.isFileDialogActive=!1,this.draggedFiles=null,this.setState({isDragActive:!1,draggedFiles:[]}),Promise.resolve(l(e)).then((function(n){var l=[],f=[];n.forEach((function(e){if(!u)try{e.preview=window.URL.createObjectURL(e)}catch(e){0}c(e,a)&&function(e,t,n){return e.size<=t&&e.size>=n}(e,t.props.maxSize,t.props.minSize)?l.push(e):f.push(e)})),s||f.push.apply(f,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(l.splice(1))),r&&r.call(t,l,f,e),f.length>0&&i&&i.call(t,f,e),l.length>0&&o&&o.call(t,l,e)}))}},{key:"onClick",value:function(e){var t=this.props,n=t.onClick;t.disableClick||(e.stopPropagation(),n&&n.call(this,e),!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return g(e)||p(e)}()?this.open():setTimeout(this.open.bind(this),0))}},{key:"onInputElementClick",value:function(e){e.stopPropagation(),this.props.inputProps&&this.props.inputProps.onClick&&this.props.inputProps.onClick()}},{key:"onFileDialogCancel",value:function(){var e=this,t=this.props.onFileDialogCancel;this.isFileDialogActive&&setTimeout((function(){null!=e.fileInputEl&&(e.fileInputEl.files.length||(e.isFileDialogActive=!1));"function"==typeof t&&t()}),300)}},{key:"setRef",value:function(e){this.node=e}},{key:"setRefs",value:function(e){this.fileInputEl=e}},{key:"open",value:function(){this.isFileDialogActive=!0,this.fileInputEl.value=null,this.fileInputEl.click()}},{key:"render",value:function(){var e=this.props,t=e.accept,n=e.acceptClassName,r=e.activeClassName,i=e.children,s=e.disabled,u=e.disabledClassName,a=e.inputProps,f=e.multiple,g=e.name,p=e.rejectClassName,S=b(e,["accept","acceptClassName","activeClassName","children","disabled","disabledClassName","inputProps","multiple","name","rejectClassName"]),w=S.acceptStyle,I=S.activeStyle,x=S.className,O=void 0===x?"":x,C=S.disabledStyle,D=S.rejectStyle,k=S.style,P=b(S,["acceptStyle","activeStyle","className","disabledStyle","rejectStyle","style"]),_=this.state,j=_.isDragActive,E=_.draggedFiles,T=E.length,R=f||T<=1,F=T>0&&function(e,t){return e.every((function(e){return c(e,t)}))}(E,this.props.accept),A=T>0&&(!F||!R),M=!(O||k||I||w||D||C);j&&r&&(O+=" "+r),F&&n&&(O+=" "+n),A&&p&&(O+=" "+p),s&&u&&(O+=" "+u),M&&(k=v,I=m,w=m,D=d,C=h);var N=y({position:"relative"},k);I&&j&&(N=y({},N,I)),w&&F&&(N=y({},N,w)),D&&A&&(N=y({},N,D)),C&&s&&(N=y({},N,C));var H={accept:t,disabled:s,type:"file",style:y({position:"absolute",top:0,right:0,bottom:0,left:0,opacity:1e-5,pointerEvents:"none"},a.style),multiple:l&&f,ref:this.setRefs,onChange:this.onDrop,autoComplete:"off"};g&&g.length&&(H.name=g);P.acceptedFiles,P.preventDropOnDocument,P.disablePreview,P.disableClick,P.onDropAccepted,P.onDropRejected,P.onFileDialogCancel,P.maxSize,P.minSize,P.getDataTransferItems;var L=b(P,["acceptedFiles","preventDropOnDocument","disablePreview","disableClick","onDropAccepted","onDropRejected","onFileDialogCancel","maxSize","minSize","getDataTransferItems"]);return o().createElement("div",y({className:O,style:N},L,{onClick:this.composeHandlers(this.onClick),onDragStart:this.composeHandlers(this.onDragStart),onDragEnter:this.composeHandlers(this.onDragEnter),onDragOver:this.composeHandlers(this.onDragOver),onDragLeave:this.composeHandlers(this.onDragLeave),onDrop:this.composeHandlers(this.onDrop),ref:this.setRef,"aria-disabled":s}),this.renderChildren(i,j,F,A),o().createElement("input",y({},a,H)))}}]),t}(o().Component);const I=w;w.propTypes={accept:s().oneOfType([s().string,s().arrayOf(s().string)]),children:s().oneOfType([s().node,s().func]),disableClick:s().bool,disabled:s().bool,disablePreview:s().bool,preventDropOnDocument:s().bool,inputProps:s().object,multiple:s().bool,name:s().string,maxSize:s().number,minSize:s().number,className:s().string,activeClassName:s().string,acceptClassName:s().string,rejectClassName:s().string,disabledClassName:s().string,style:s().object,activeStyle:s().object,acceptStyle:s().object,rejectStyle:s().object,disabledStyle:s().object,getDataTransferItems:s().func,onClick:s().func,onDrop:s().func,onDropAccepted:s().func,onDropRejected:s().func,onDragStart:s().func,onDragEnter:s().func,onDragOver:s().func,onDragLeave:s().func,onFileDialogCancel:s().func},w.defaultProps={preventDropOnDocument:!0,disabled:!1,disablePreview:!1,disableClick:!1,inputProps:{},multiple:!0,maxSize:1/0,minSize:0,getDataTransferItems:function(e){var t=[];if(e.dataTransfer){var n=e.dataTransfer;n.files&&n.files.length?t=n.files:n.items&&n.items.length&&(t=n.items)}else e.target&&e.target.files&&(t=e.target.files);return Array.prototype.slice.call(t)}}},50360:(e,t,n)=>{"use strict";n.d(t,{Z:()=>C});var r=n(1024),o=n.n(r);function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(){}function f(){}f.resetWarningCache=c;var g=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:f,resetWarningCache:c};return n.PropTypes=n,n}()}));function p(){}function d(e){return!!(e||"").match(/\d/)}function h(e){return null==e}function m(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function v(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),i=o[0],s=o[1]||"";return{beforeDecimal:i,afterDecimal:s,hasNagation:n,addNegation:r}}function y(e,t,n){for(var r="",o=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||o;return r}function S(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function b(e,t,n){return Math.min(Math.max(e,t),n)}function w(e){return Math.max(e.selectionStart,e.selectionEnd)}var I={thousandSeparator:g.oneOfType([g.string,g.oneOf([!0])]),decimalSeparator:g.string,allowedDecimalSeparators:g.arrayOf(g.string),thousandsGroupStyle:g.oneOf(["thousand","lakh","wan"]),decimalScale:g.number,fixedDecimalScale:g.bool,displayType:g.oneOf(["input","text"]),prefix:g.string,suffix:g.string,format:g.oneOfType([g.string,g.func]),removeFormatting:g.func,mask:g.oneOfType([g.string,g.arrayOf(g.string)]),value:g.oneOfType([g.number,g.string]),defaultValue:g.oneOfType([g.number,g.string]),isNumericString:g.bool,customInput:g.elementType,allowNegative:g.bool,allowEmptyFormatting:g.bool,allowLeadingZeros:g.bool,onValueChange:g.func,onKeyDown:g.func,onMouseUp:g.func,onChange:g.func,onFocus:g.func,onBlur:g.func,type:g.oneOf(["text","tel","password"]),isAllowed:g.func,renderText:g.func,getInputRef:g.oneOfType([g.func,g.shape({current:g.any})])},x={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:p,onChange:p,onKeyDown:p,onMouseUp:p,onFocus:p,onBlur:p,isAllowed:function(){return!0}},O=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?l(e):t}(this,u(t).call(this,e));var r=e.defaultValue;n.validateProps();var o=n.formatValueProp(r);return n.state={value:o,numAsString:n.removeFormatting(o),mounted:!1},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(l(n)),n.onKeyDown=n.onKeyDown.bind(l(n)),n.onMouseUp=n.onMouseUp.bind(l(n)),n.onFocus=n.onFocus.bind(l(n)),n.onBlur=n.onBlur.bind(l(n)),n}var n,r,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(t,e),n=t,(r=[{key:"componentDidMount",value:function(){this.setState({mounted:!0})}},{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,i=n.numAsString,s=void 0===i?"":i;if(e!==t){this.validateProps();var u=this.formatNumString(s),a=h(t.value)?u:this.formatValueProp(),l=this.removeFormatting(a),c=parseFloat(l),f=parseFloat(s);(isNaN(c)&&isNaN(f)||c===f)&&u===o&&(null!==r||a===o)||this.updateValue({formattedValue:a,numAsString:l,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),i="-"===e[0];i&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var s=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==s&&(e="".concat(e.substring(0,s),".").concat(e.substring(s+1,e.length).replace(new RegExp(m(r),"g"),""))),i&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,i=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!i||0===o||t||r?"":"|"+m(i)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){S(e,t),setTimeout((function(){e.value===n&&S(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,i=r.suffix,s=r.format;if(""===e)return 0;if(t=b(t,0,e.length),!s){var u="-"===e[0];return b(t,o.length+(u?1:0),e.length-i.length)}if("function"==typeof s)return t;if("#"===s[t]&&d(e[t]))return t;if("#"===s[t-1]&&d(e[t-1]))return t;var a=s.indexOf("#");t=b(t,a,s.lastIndexOf("#")+1);for(var l=s.substring(t,s.length).indexOf("#"),c=t,f=t+(-1===l?0:l);c>a&&("#"!==s[c]||!d(e[c]));)c-=1;return!d(e[f])||"left"===n&&t!==a||t-c<f-t?d(e[c])?c+1:c:f}},{key:"getCaretPosition",value:function(e,t,n){var r,o,i=this.props.format,s=this.state.value,u=this.getNumberRegex(!0),a=(e.match(u)||[]).join(""),l=(t.match(u)||[]).join("");for(r=0,o=0;o<n;o++){var c=e[o]||"",f=t[r]||"";if((c.match(u)||c===f)&&("0"!==c||!f.match(u)||"0"===f||a.length===l.length)){for(;c!==t[r]&&r<t.length;)r++;r++}}return"string"!=typeof i||s||(r=t.length),r=this.correctCaretPosition(t,r)}},{key:"removePrefixAndSuffix",value:function(e){var t=this.props,n=t.format,r=t.prefix,o=t.suffix;if(!n&&e){var i="-"===e[0];i&&(e=e.substring(1,e.length));var s=(e=r&&0===e.indexOf(r)?e.substring(r.length,e.length):e).lastIndexOf(o);e=o&&-1!==s&&s===e.length-o.length?e.substring(0,s):e,i&&(e="-"+e)}return e}},{key:"removePatternFormatting",value:function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),n=0,r="",o=0,i=t.length;o<=i;o++){var s=t[o]||"",u=o===i?e.length:e.indexOf(s,n);if(-1===u){r=e;break}r+=e.substring(n,u),n=u+s.length}return(r.match(/\d/g)||[]).join("")}},{key:"removeFormatting",value:function(e){var t=this.props,n=t.format,r=t.removeFormatting;return e?(n?e="string"==typeof n?this.removePatternFormatting(e):"function"==typeof r?r(e):(e.match(/\d/g)||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e}},{key:"formatWithPattern",value:function(e){for(var t=this.props.format,n=0,r=t.split(""),o=0,i=t.length;o<i;o++)"#"===t[o]&&(r[o]=e[n]||this.getMaskAtIndex(n),n+=1);return r.join("")}},{key:"formatAsNumber",value:function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix,i=t.suffix,s=t.allowNegative,u=t.thousandsGroupStyle,a=this.getSeparators(),l=a.thousandSeparator,c=a.decimalSeparator,f=-1!==e.indexOf(".")||n&&r,g=v(e,s),p=g.beforeDecimal,d=g.afterDecimal,h=g.addNegation;return void 0!==n&&(d=y(d,n,r)),l&&(p=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(p,l,u)),o&&(p=o+p),i&&(d+=i),h&&(p="-"+p),e=p+(f&&c||"")+d}},{key:"formatNumString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.format,r=t.allowEmptyFormatting,o=e;return o=""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,i=t.allowEmptyFormatting,s=this.props,u=s.value,a=s.isNumericString,l=!(u=h(u)?e:u)&&0!==u;return l&&i&&(u=""),l&&!i?"":("number"==typeof u&&(u=u.toString(),a=!0),"Infinity"===u&&a&&(u=""),a&&!n&&"number"==typeof r&&(u=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=v(e),i=o.beforeDecimal,s=o.afterDecimal,u=o.hasNagation,a=parseFloat("0.".concat(s||"0")),l=(s.length<=t?a.toString():a.toFixed(t)).split("."),c=i.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),l[0]),f=y(l[1]||"",Math.min(t,s.length),n),g=r?".":"";return"".concat(u?"-":"").concat(c).concat(g).concat(f)}(u,r,o)),a?this.formatNumString(u):this.formatInput(u))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,i=n.suffix,s=n.decimalScale,u=n.fixedDecimalScale,a=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e<o.length||e>=t.length-i.length||s&&u&&t[e]===a))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;r<t;r++)if(this.isCharacterAFormat(r,n))return!0;return!1}},{key:"correctInputValue",value:function(e,t,n){var r=this.props,o=r.format,i=r.allowNegative,s=r.prefix,u=r.suffix,a=r.decimalScale,l=this.getSeparators(),c=l.allowedDecimalSeparators,f=l.decimalSeparator,g=this.state.numAsString||"",p=this.selectionBeforeInput,d=p.selectionStart,h=p.selectionEnd,m=function(e,t){for(var n=0,r=0,o=e.length,i=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[i-1-r]&&i-r>n&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),y=m.start,S=m.end;if(!o&&y===S&&-1!==c.indexOf(n[d])){var b=0===a?"":f;return n.substr(0,d)+b+n.substr(d+1,n.length)}var w=o?0:s.length,I=t.length-(o?0:u.length);if(n.length>t.length||!n.length||y===S||0===d&&h===t.length||d===w&&h===I)return n;if(this.checkIfFormatGotDeleted(y,S,t)&&(n=t),!o){var x=this.removeFormatting(n),O=v(x,i),C=O.beforeDecimal,D=O.afterDecimal,k=O.addNegation,P=e<n.indexOf(f)+1;if(x.length<g.length&&P&&""===C&&!parseFloat(D))return k?"-":""}return n}},{key:"updateValue",value:function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition,o=void 0===r||r,i=e.numAsString,s=e.caretPos,u=this.props.onValueChange,a=this.state.value;if(n)if(o){if(!s){var l=e.inputValue||n.value,c=w(n);n.value=t,s=this.getCaretPosition(l,t,c)}this.setPatchedCaretPosition(n,s,t)}else n.value=t;void 0===i&&(i=this.removeFormatting(t)),t!==a&&(this.setState({value:t,numAsString:i}),u(this.getValueObject(t,i)))}},{key:"onChange",value:function(e){var t=e.target,n=t.value,r=this.state,o=this.props,i=o.isAllowed,s=r.value||"",u=w(t);n=this.correctInputValue(u,s,n);var a=this.formatInput(n)||"",l=this.removeFormatting(a);i(this.getValueObject(a,l))||(a=s),this.updateValue({formattedValue:a,numAsString:l,inputValue:n,input:t}),o.onChange(e)}},{key:"onBlur",value:function(e){var t=this.props,n=this.state,r=t.format,o=t.onBlur,i=t.allowLeadingZeros,s=n.numAsString,u=n.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),!r){isNaN(parseFloat(s))&&(s=""),i||(s=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return"".concat(t?"-":"").concat(r).concat(o?".".concat(o):"")}(s));var a=this.formatNumString(s);if(a!==u)return this.updateValue({formattedValue:a,numAsString:s,input:e.target,setCaretPosition:!1}),void o(e)}o(e)}},{key:"onKeyDown",value:function(e){var t,n=e.target,r=e.key,o=n.selectionStart,i=n.selectionEnd,s=n.value,u=void 0===s?"":s,a=this.props,l=a.decimalScale,c=a.fixedDecimalScale,f=a.prefix,g=a.suffix,p=a.format,d=a.onKeyDown,h=void 0!==l&&c,m=this.getNumberRegex(!1,h),v=new RegExp("-"),y="string"==typeof p;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:i},"ArrowLeft"===r||"Backspace"===r?t=o-1:"ArrowRight"===r?t=o+1:"Delete"===r&&(t=o),void 0!==t&&o===i){var S=t,b=y?p.indexOf("#"):f.length,w=y?p.lastIndexOf("#")+1:u.length-g.length;if("ArrowLeft"===r||"ArrowRight"===r){var I="ArrowLeft"===r?"left":"right";S=this.correctCaretPosition(u,t,I)}else if("Delete"!==r||m.test(u[t])||v.test(u[t])){if("Backspace"===r&&!m.test(u[t]))if(o<=b+1&&"-"===u[0]&&void 0===p){var x=u.substring(1);this.updateValue({formattedValue:x,caretPos:S,input:n})}else if(!v.test(u[t])){for(;!m.test(u[S-1])&&S>b;)S--;S=this.correctCaretPosition(u,S,"left")}}else for(;!m.test(u[S])&&S<w;)S++;(S!==t||t<b||t>w)&&(e.preventDefault(),this.setPatchedCaretPosition(n,S,u)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,S,u),d(e)}else d(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,i=void 0===o?"":o;if(n===r){var s=this.correctCaretPosition(i,n);s!==n&&this.setPatchedCaretPosition(t,s,i)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,i=n.value,s=void 0===i?"":i,u=t.correctCaretPosition(s,r);u===r||0===r&&o===s.length||t.setPatchedCaretPosition(n,u,s),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,i=r.type,u=r.displayType,a=r.customInput,l=r.renderText,c=r.getInputRef,f=r.format,g=this.state,p=g.value,d=g.mounted,h=(e=this.props,t=I,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),m=s({inputMode:d&&function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(f)?"numeric":void 0},h,{type:i,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===u)return l?l(p,h)||null:o().createElement("span",s({},h,{ref:c}),p);if(a){var v=a;return o().createElement(v,s({},m,{ref:c}))}return o().createElement("input",s({},m,{ref:c}))}}])&&i(n.prototype,r),c&&i(n,c),t}(o().Component);O.propTypes=I,O.defaultProps=x;const C=O},91079:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,u=e[Symbol.iterator]();!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i,s=n(24679),u=(i=s)&&i.__esModule?i:{default:i},a=function(e){return e};t.default=function(e){var t=Array.isArray(e)&&2===e.length?e:[e,null],n=r(t,2),i=n[0],s=n[1];return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var l=n.map((function(e){return i[e]})).filter(a);return"string"==typeof l[0]||"function"==typeof s?{key:e,className:s?s.apply(void 0,o(l)):l.join(" ")}:{key:e,style:u.default.apply(void 0,[{}].concat(o(l)))}}},e.exports=t.default},24679:e=>{"use strict";var t=Object.prototype.propertyIsEnumerable;function n(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(e){var n=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(e))),n.filter((function(n){return t.call(e,n)}))}e.exports=Object.assign||function(e,t){for(var o,i,s=n(e),u=1;u<arguments.length;u++){o=arguments[u],i=r(Object(o));for(var a=0;a<i.length;a++)s[i[a]]=o[i[a]]}return s}},44274:e=>{"use strict";var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,u=e[Symbol.iterator]();!(r=(s=u.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var n=e.data,r=e.multiSection;function o(e){var o=t(e,2),i=o[0],s=o[1];return r?null===s||s===n[i]-1?null===(i=function(e){for(null===e?e=0:e++;e<n.length&&0===n[e];)e++;return e===n.length?null:e}(i))?[null,null]:[i,0]:[i,s+1]:0===n||s===n-1?[null,null]:null===s?[null,0]:[null,s+1]}return{next:o,prev:function(e){var o=t(e,2),i=o[0],s=o[1];return r?null===s||0===s?null===(i=function(e){for(null===e?e=n.length-1:e--;e>=0&&0===n[e];)e--;return-1===e?null:e}(i))?[null,null]:[i,n[i]-1]:[i,s-1]:0===n||0===s?[null,null]:null===s?[null,n-1]:[null,s-1]},isLast:function(e){return null===o(e)[1]}}}},32827:e=>{"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}}}]);
2
- //# sourceMappingURL=chunk-277.0af81c9b7e1548b99110.js.map