export default(new function(){const e={},t=e;
/*! taboverride v4.0.3 | https://github.com/wjbryant/taboverride
(c) 2015 Bill Bryant | http://opensource.org/licenses/mit */!function(e){"use strict";e("object"==typeof t?t:window.tabOverride={})}((function(e){"use strict";var t,n,r,i=window.document,l="\t",o=9,c=9,s=[],a=["shiftKey"],f=!0,u=!1,d=i.createElement("textarea"),h={};function v(e,t){var n,r,i,l=["alt","ctrl","meta","shift"],o=e.length,c=!0;for(n=0;n<o;n+=1)if(!t[e[n]]){c=!1;break}if(c)for(n=0;n<l.length;n+=1){if(t[i=l[n]+"Key"])if(o){for(c=!1,r=0;r<o;r+=1)if(i===e[r]){c=!0;break}}else c=!1;if(!c)break}return c}function p(e,t){return e===o&&v(s,t)}function g(e,t){return e===c&&v(a,t)}function m(e,t){return function(n,r){var i,l="";if(arguments.length){if("number"==typeof n&&(e(n),t.length=0,r&&r.length))for(i=0;i<r.length;i+=1)t.push(r[i]+"Key");return this}for(i=0;i<t.length;i+=1)l+=t[i].slice(0,-3)+"+";return l+e()}}function y(e){var t,s,a,d,h,v,m,y,E,x,b,w,L,S,k,T,O,K,_=(e=e||event).currentTarget||e.srcElement,A=e.keyCode,C="character";if((!_.nodeName||"textarea"===_.nodeName.toLowerCase())&&(A===o||A===c||13===A&&f)){if(u=!1,a=_.value,y=_.scrollTop,"number"==typeof _.selectionStart)E=_.selectionStart,x=_.selectionEnd,b=a.slice(E,x);else{if(!i.selection)return;b=(d=i.selection.createRange()).text,(h=d.duplicate()).moveToElementText(_),h.setEndPoint("EndToEnd",d),E=(x=h.text.length)-b.length,r>1?(v=a.slice(0,E).split(n).length-1,m=b.split(n).length-1):v=m=0}if(A===o||A===c)if(s=(t=l).length,S=0,k=0,T=0,E!==x&&-1!==b.indexOf("\n"))if(w=0===E||"\n"===a.charAt(E-1)?E:a.lastIndexOf("\n",E-1)+1,x===a.length||"\n"===a.charAt(x)?L=x:"\n"===a.charAt(x-1)?L=x-1:-1===(L=a.indexOf("\n",x))&&(L=a.length),p(A,e))S=1,_.value=a.slice(0,w)+t+a.slice(w,L).replace(/\n/g,(function(){return S+=1,"\n"+t}))+a.slice(L),d?(d.collapse(),d.moveEnd(C,x+S*s-m-v),d.moveStart(C,E+s-v),d.select()):(_.selectionStart=E+s,_.selectionEnd=x+S*s,_.scrollTop=y);else{if(!g(A,e))return;0===a.slice(w).indexOf(t)&&(w===E?b=b.slice(s):T=s,k=s),_.value=a.slice(0,w)+a.slice(w+T,E)+b.replace(new RegExp("\n"+t,"g"),(function(){return S+=1,"\n"}))+a.slice(x),d?(d.collapse(),d.moveEnd(C,x-k-S*s-m-v),d.moveStart(C,E-T-v),d.select()):(_.selectionStart=E-T,_.selectionEnd=x-k-S*s)}else if(p(A,e))d?(d.text=t,d.select()):(_.value=a.slice(0,E)+t+a.slice(x),_.selectionEnd=_.selectionStart=E+s,_.scrollTop=y);else{if(!g(A,e))return;0===a.slice(E-s).indexOf(t)&&(_.value=a.slice(0,E-s)+a.slice(E),d?(d.move(C,E-s-v),d.select()):(_.selectionEnd=_.selectionStart=E-s,_.scrollTop=y))}else if(f){if(0===E||"\n"===a.charAt(E-1))return void(u=!0);if(w=a.lastIndexOf("\n",E-1)+1,-1===(L=a.indexOf("\n",E))&&(L=a.length),E<w+(K=(O=a.slice(w,L).match(/^[ \t]*/)[0]).length))return void(u=!0);d?(d.text="\n"+O,d.select()):(_.value=a.slice(0,E)+"\n"+O+a.slice(x),_.selectionEnd=_.selectionStart=E+r+K,_.scrollTop=y)}if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}function E(e){var t=(e=e||event).keyCode;if(p(t,e)||g(t,e)||13===t&&f&&!u){if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}function x(e,t){var n,r=h[e]||[],i=r.length;for(n=0;n<i;n+=1)r[n].apply(null,t)}function b(e){var t,n,r,l=e.length;function o(n){for(t=0;t<l;t+=1)n(e[t].type,e[t].handler)}return i.addEventListener?(n=function(e){o((function(t,n){e.removeEventListener(t,n,!1)}))},r=function(e){n(e),o((function(t,n){e.addEventListener(t,n,!1)}))}):i.attachEvent&&(n=function(e){o((function(t,n){e.detachEvent("on"+t,n)}))},r=function(e){n(e),o((function(t,n){e.attachEvent("on"+t,n)}))}),{add:r,remove:n}}function w(e){x("addListeners",[e]),t.add(e)}function L(e){x("removeListeners",[e]),t.remove(e)}t=b([{type:"keydown",handler:y},{type:"keypress",handler:E}]),d.value="\n",n=d.value,r=n.length,d=null,e.utils={executeExtensions:x,isValidModifierKeyCombo:v,createListeners:b,addListeners:w,removeListeners:L},e.handlers={keydown:y,keypress:E},e.addExtension=function(e,t){return e&&"string"==typeof e&&"function"==typeof t&&(h[e]||(h[e]=[]),h[e].push(t)),this},e.set=function(e,t){var n,r,i,l,o,c,s;if(e)for(n=arguments.length<2||t,"number"!=typeof(i=(r=e).length)&&(r=[r],i=1),n?(l=w,o="true"):(l=L,o=""),c=0;c<i;c+=1)(s=r[c])&&s.nodeName&&"textarea"===s.nodeName.toLowerCase()&&(x("set",[s,n]),s.setAttribute("data-taboverride-enabled",o),l(s));return this},e.tabSize=function(e){var t;if(arguments.length){if(e&&"number"==typeof e&&e>0)for(l="",t=0;t<e;t+=1)l+=" ";else l="\t";return this}return"\t"===l?0:l.length},e.autoIndent=function(e){return arguments.length?(f=!!e,this):f},e.tabKey=m((function(e){if(!arguments.length)return o;o=e}),s),e.untabKey=m((function(e){if(!arguments.length)return c;c=e}),a)})),this.__default_export=e}).__default_export;