diff --git a/packages/components/src/packages/org.standardnotes.code-editor/index.html b/packages/components/src/packages/org.standardnotes.code-editor/index.html index ba8ce0629..b043623f5 100644 --- a/packages/components/src/packages/org.standardnotes.code-editor/index.html +++ b/packages/components/src/packages/org.standardnotes.code-editor/index.html @@ -4,32 +4,32 @@ - + - + - - - - + + + + - + - - - - - - - - - + + + + + + + + + - + diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/comment/comment.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/comment/comment.js deleted file mode 100644 index ebf016ba2..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/comment/comment.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var n={},t=/[^\s\u00a0]/,i=e.Pos,l=e.cmpPos;function o(e){var n=e.search(t);return-1==n?0:n}function r(e,n){var t=e.getMode();return!1!==t.useInnerComments&&t.innerMode?e.getModeAt(n):t}e.commands.toggleComment=function(e){e.toggleComment()},e.defineExtension("toggleComment",(function(e){e||(e=n);for(var t=this,l=1/0,o=this.listSelections(),r=null,a=o.length-1;a>=0;a--){var m=o[a].from(),c=o[a].to();m.line>=l||(c.line>=l&&(c=i(l,0)),l=m.line,null==r?t.uncomment(m,c,e)?r="un":(t.lineComment(m,c,e),r="line"):"un"==r?t.uncomment(m,c,e):t.lineComment(m,c,e))}})),e.defineExtension("lineComment",(function(e,l,a){a||(a=n);var m=this,c=r(m,e),g=m.getLine(e.line);if(null!=g&&(f=e,s=g,!/\bstring\b/.test(m.getTokenTypeAt(i(f.line,0)))||/^[\'\"\`]/.test(s))){var f,s,d=a.lineComment||c.lineComment;if(d){var u=Math.min(0!=l.ch||l.line==e.line?l.line+1:l.line,m.lastLine()+1),h=null==a.padding?" ":a.padding,C=a.commentBlankLines||e.line==l.line;m.operation((function(){if(a.indent){for(var n=null,l=e.line;lr.length)&&(n=r)}for(l=e.line;ls||m.operation((function(){if(0!=a.fullLines){var n=t.test(m.getLine(s));m.replaceRange(d+f,i(s)),m.replaceRange(g+d,i(e.line,0));var r=a.blockCommentLead||c.blockCommentLead;if(null!=r)for(var u=e.line+1;u<=s;++u)(u!=s||n)&&m.replaceRange(r+d,i(u,0))}else{var h=0==l(m.getCursor("to"),o),C=!m.somethingSelected();m.replaceRange(f,o),h&&m.setSelection(C?o:m.getCursor("from"),o),m.replaceRange(g,e)}}))}}else(a.lineComment||c.lineComment)&&0!=a.fullLines&&m.lineComment(e,o,a)})),e.defineExtension("uncomment",(function(e,l,o){o||(o=n);var a,m=this,c=r(m,e),g=Math.min(0!=l.ch||l.line==e.line?l.line:l.line-1,m.lastLine()),f=Math.min(e.line,g),s=o.lineComment||c.lineComment,d=[],u=null==o.padding?" ":o.padding;e:if(s){for(var h=f;h<=g;++h){var C=m.getLine(h),p=C.indexOf(s);if(p>-1&&!/comment/.test(m.getTokenTypeAt(i(h,p+1)))&&(p=-1),-1==p&&t.test(C))break e;if(p>-1&&t.test(C.slice(0,p)))break e;d.push(C)}if(m.operation((function(){for(var e=f;e<=g;++e){var n=d[e-f],t=n.indexOf(s),l=t+s.length;t<0||(n.slice(l,l+u.length)==u&&(l+=u.length),a=!0,m.replaceRange("",i(e,t),i(e,l)))}})),a)return!0}var v=o.blockCommentStart||c.blockCommentStart,b=o.blockCommentEnd||c.blockCommentEnd;if(!v||!b)return!1;var k=o.blockCommentLead||c.blockCommentLead,L=m.getLine(f),x=L.indexOf(v);if(-1==x)return!1;var R=g==f?L:m.getLine(g),O=R.indexOf(b,g==f?x+v.length:0),T=i(f,x+1),S=i(g,O+1);if(-1==O||!/comment/.test(m.getTokenTypeAt(T))||!/comment/.test(m.getTokenTypeAt(S))||m.getRange(T,S,"\n").indexOf(b)>-1)return!1;var y=L.lastIndexOf(v,e.ch),E=-1==y?-1:L.slice(0,e.ch).indexOf(b,y+v.length);if(-1!=y&&-1!=E&&E+b.length!=e.ch)return!1;E=R.indexOf(b,l.ch);var M=R.slice(l.ch).lastIndexOf(v,E-l.ch);return y=-1==E||-1==M?-1:l.ch+M,(-1==E||-1==y||y==l.ch)&&(m.operation((function(){m.replaceRange("",i(g,O-(u&&R.slice(O-u.length,O)==u?u.length:0)),i(g,O+b.length));var e=x+v.length;if(u&&L.slice(e,e+u.length)==u&&(e+=u.length),m.replaceRange("",i(f,x),i(f,e)),k)for(var n=f+1;n<=g;++n){var l=m.getLine(n),o=l.indexOf(k);if(-1!=o&&!t.test(l.slice(0,o))){var r=o+k.length;u&&l.slice(r,r+u.length)==u&&(r+=u.length),m.replaceRange("",i(n,o),i(n,r))}}})),!0)}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/comment/continuecomment.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/comment/continuecomment.js deleted file mode 100644 index 2b739c3b0..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/comment/continuecomment.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){var n=/\S/g,t=String.prototype.repeat||function(e){return Array(e+1).join(this)};function o(n){if(n.getOption("disableInput"))return e.Pass;for(var o,r=n.listSelections(),c=[],f=0;f-1&&/\bcomment\b/.test(n.getTokenTypeAt({line:a.line,ch:u+1})));else if(a.ch>=p.length&&(u=s.lastIndexOf(p,a.ch-p.length))>-1&&u>b)if(i(0,s)>=u)d=s.slice(0,u);else{var g,C=n.options.tabSize;u=e.countColumn(s,u,C),d=n.options.indentWithTabs?t.call("\t",g=Math.floor(u/C))+t.call(" ",u-C*g):t.call(" ",u)}else(u=s.indexOf(o.blockCommentContinue))>-1&&u<=a.ch&&u<=i(0,s)&&(d=s.slice(0,u));null!=d&&(d+=o.blockCommentContinue)}if(null==d&&h&&l(n))if(null==s&&(s=n.getLine(a.line)),u=s.indexOf(h),a.ch||u){if(u>-1&&i(0,s)>=u){if(!(d=i(a.ch,s)>-1)){var v=n.getLine(a.line+1)||"",y=v.indexOf(h);d=y>-1&&i(0,v)>=y||null}d&&(d=s.slice(0,u)+h+s.slice(u+h.length).match(/^\s*/)[0])}}else d="";if(null==d)return e.Pass;c[f]="\n"+d}n.operation((function(){for(var e=r.length-1;e>=0;e--)n.replaceRange(c[e],r[e].from(),r[e].to(),"+insert")}))}function i(e,t){n.lastIndex=e;var o=n.exec(t);return o?o.index:-1}function l(e){var n=e.getOption("continueComments");return!n||"object"!=typeof n||!1!==n.continueLineComment}e.defineOption("continueComments",null,(function(n,t,i){if(i&&i!=e.Init&&n.removeKeyMap("continueComment"),t){var l="Enter";"string"==typeof t?l=t:"object"==typeof t&&t.key&&(l=t.key);var r={name:"continueComment"};r[l]=o,n.addKeyMap(r)}}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/dialog/dialog.css b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/dialog/dialog.css deleted file mode 100644 index 677c07838..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/dialog/dialog.css +++ /dev/null @@ -1,32 +0,0 @@ -.CodeMirror-dialog { - position: absolute; - left: 0; right: 0; - background: inherit; - z-index: 15; - padding: .1em .8em; - overflow: hidden; - color: inherit; -} - -.CodeMirror-dialog-top { - border-bottom: 1px solid #eee; - top: 0; -} - -.CodeMirror-dialog-bottom { - border-top: 1px solid #eee; - bottom: 0; -} - -.CodeMirror-dialog input { - border: none; - outline: none; - background: transparent; - width: 20em; - color: inherit; - font-family: monospace; -} - -.CodeMirror-dialog button { - font-size: 70%; -} diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/dialog/dialog.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/dialog/dialog.js deleted file mode 100644 index 626a9265f..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/dialog/dialog.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){function o(o,n,t){var i,r=o.getWrapperElement();return(i=r.appendChild(document.createElement("div"))).className=t?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(r,"dialog-opened"),i}function n(e,o){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=o}e.defineExtension("openDialog",(function(t,i,r){r||(r={}),n(this,null);var u=o(this,t,r.bottom),l=!1,a=this;function c(o){if("string"==typeof o)s.value=o;else{if(l)return;l=!0,e.rmClass(u.parentNode,"dialog-opened"),u.parentNode.removeChild(u),a.focus(),r.onClose&&r.onClose(u)}}var d,s=u.getElementsByTagName("input")[0];return s?(s.focus(),r.value&&(s.value=r.value,!1!==r.selectValueOnOpen&&s.select()),r.onInput&&e.on(s,"input",(function(e){r.onInput(e,s.value,c)})),r.onKeyUp&&e.on(s,"keyup",(function(e){r.onKeyUp(e,s.value,c)})),e.on(s,"keydown",(function(o){r&&r.onKeyDown&&r.onKeyDown(o,s.value,c)||((27==o.keyCode||!1!==r.closeOnEnter&&13==o.keyCode)&&(s.blur(),e.e_stop(o),c()),13==o.keyCode&&i(s.value,o))})),!1!==r.closeOnBlur&&e.on(u,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(d=u.getElementsByTagName("button")[0])&&(e.on(d,"click",(function(){c(),a.focus()})),!1!==r.closeOnBlur&&e.on(d,"blur",c),d.focus()),c})),e.defineExtension("openConfirm",(function(t,i,r){n(this,null);var u=o(this,t,r&&r.bottom),l=u.getElementsByTagName("button"),a=!1,c=this,d=1;function s(){a||(a=!0,e.rmClass(u.parentNode,"dialog-opened"),u.parentNode.removeChild(u),c.focus())}l[0].focus();for(var f=0;f",triples:"",explode:"[]{}"},t=e.Pos;function r(e,t){return"pairs"==t&&"string"==typeof e?e:"object"==typeof e&&null!=e[t]?e[t]:n[t]}e.defineOption("autoCloseBrackets",!1,(function(n,t,o){o&&o!=e.Init&&(n.removeKeyMap(i),n.state.closeBrackets=null),t&&(a(r(t,"pairs")),n.state.closeBrackets=t,n.addKeyMap(i))}));var i={Backspace:function(n){var i=s(n);if(!i||n.getOption("disableInput"))return e.Pass;for(var a=r(i,"pairs"),o=n.listSelections(),l=0;l=0;l--){var h=o[l].head;n.replaceRange("",t(h.line,h.ch-1),t(h.line,h.ch+1),"+delete")}},Enter:function(n){var t=s(n),i=t&&r(t,"explode");if(!i||n.getOption("disableInput"))return e.Pass;for(var a=n.listSelections(),o=0;o1&&d.indexOf(i)>=0&&n.getRange(t(k.line,k.ch-2),k)==i+i){if(k.ch>2&&/\bstring/.test(n.getTokenTypeAt(t(k.line,k.ch-2))))return e.Pass;P="addFour"}else if(p){var O=0==k.ch?" ":n.getRange(t(k.line,k.ch-1),k);if(e.isWordChar(y)||O==i||e.isWordChar(O))return e.Pass;P="both"}else{if(!v||!(0===y.length||/\s/.test(y)||u.indexOf(y)>-1))return e.Pass;P="both"}else P=p&&f(n,k)?"both":d.indexOf(i)>=0&&n.getRange(k,t(k.line,k.ch+3))==i+i+i?"skipThree":"skip";if(h){if(h!=P)return e.Pass}else h=P}var m=c%2?o.charAt(c-1):i,x=c%2?i:o.charAt(c+1);n.operation((function(){if("skip"==h)l(n,1);else if("skipThree"==h)l(n,3);else if("surround"==h){for(var r=n.getSelections(),i=0;i0,{anchor:new t(a.anchor.line,a.anchor.ch+(o?-1:1)),head:new t(a.head.line,a.head.ch+(o?1:-1))});n.setSelections(r)}else"both"==h?(n.replaceSelection(m+x,null),n.triggerElectric(m+x),l(n,-1)):"addFour"==h&&(n.replaceSelection(m+m+m+m,"before"),l(n,1));var a,o}))}(i,n)}}function s(e){var n=e.state.closeBrackets;return!n||n.override?n:e.getModeAt(e.getCursor()).closeBrackets||n}function l(e,n){for(var t=[],r=e.listSelections(),i=0,a=0;a0?{line:o.head.line,ch:o.head.ch+n}:{line:o.head.line-1};t.push({anchor:s,head:s})}e.setSelections(t,i)}function c(e,n){var r=e.getRange(t(n.line,n.ch-1),t(n.line,n.ch+1));return 2==r.length?r:null}function f(e,n){var r=e.getTokenAt(t(n.line,n.ch+1));return/\bstring/.test(r.type)&&r.start==n.ch&&(0==n.ch||!/\bstring/.test(e.getTokenTypeAt(n)))}a(n.pairs+"`")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/edit/closetag.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/edit/closetag.js deleted file mode 100644 index bdd93af0b..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/edit/closetag.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../fold/xml-fold")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../fold/xml-fold"],e):e(CodeMirror)}((function(e){e.defineOption("autoCloseTags",!1,(function(a,l,s){if(s!=e.Init&&s&&a.removeKeyMap("autoCloseTags"),l){var d={name:"autoCloseTags"};"object"==typeof l&&!1===l.whenClosing||(d["'/'"]=function(t){return function(t){return t.getOption("disableInput")?e.Pass:o(t,!0)}(t)}),"object"==typeof l&&!1===l.whenOpening||(d["'>'"]=function(o){return function(o){if(o.getOption("disableInput"))return e.Pass;for(var a=o.listSelections(),l=[],s=o.getOption("autoCloseTags"),d=0;dc.ch&&(h=h.slice(0,h.length-f.end+c.ch));var v=h.toLowerCase();if(!h||"string"==f.type&&(f.end!=c.ch||!/[\"\']/.test(f.string.charAt(f.string.length-1))||1==f.string.length)||"tag"==f.type&&m.close||f.string.indexOf("/")==c.ch-f.start-1||C&&r(C,v)>-1||i(o,g.mode.xmlCurrentContext&&g.mode.xmlCurrentContext(u)||[],h,c,!0))return e.Pass;var y="object"==typeof s&&s.emptyTags;if(y&&r(y,h)>-1)l[d]={text:"/>",newPos:e.Pos(c.line,c.ch+2)};else{var x=b&&r(b,v)>-1;l[d]={indent:x,text:">"+(x?"\n\n":"")+"",newPos:x?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}}var P="object"==typeof s&&s.dontIndentOnAutoClose;for(d=a.length-1;d>=0;d--){var T=l[d];o.replaceRange(T.text,a[d].head,a[d].anchor,"+insert");var j=o.listSelections().slice(0);j[d]={head:T.newPos,anchor:T.newPos},o.setSelections(j),!P&&T.indent&&(o.indentLine(T.newPos.line,null,!0),o.indentLine(T.newPos.line+1,null,!0))}}(o)}),a.addKeyMap(d)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function o(t,n){for(var o=t.listSelections(),r=[],a=n?"/":""!=t.getLine(c.line).charAt(f.end)&&(m+=">"),r[d]=m}if(t.replaceSelections(r),o=t.listSelections(),!s)for(d=0;d=0&&n[d]==o;d--)++s;for(r=l.to,d=1;d[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;function r(e,t){var i=t.line,r=0,o=0,l=n.exec(e.getLine(i)),s=l[1];do{var a=i+(r+=1),d=e.getLine(a),c=n.exec(d);if(c){var f=c[1],p=parseInt(l[3],10)+r-o,m=parseInt(c[3],10),u=m;if(s!==f||isNaN(m)){if(s.length>f.length)return;if(s.lengthm&&(u=p+1),e.replaceRange(d.replace(n,f+u+c[4]+c[5]),{line:a,ch:0},{line:a,ch:d.length})}}while(c)}e.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return e.Pass;for(var l=o.listSelections(),s=[],a=0;a\s*$/.test(u),x=!/>\s*$/.test(u);(v||x)&&o.replaceRange("",{line:d.line,ch:0},{line:d.line,ch:d.ch+1}),s[a]="\n"}else{var w=h[1],I=h[5],b=!(i.test(h[2])||h[2].indexOf(">")>=0),y=b?parseInt(h[3],10)+1+h[4]:h[2].replace("x"," ");s[a]="\n"+w+y+I,b&&r(o,d)}}o.replaceSelections(s)}})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/edit/matchbrackets.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/edit/matchbrackets.js deleted file mode 100644 index 06730cb6c..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/edit/matchbrackets.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){var e=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=t.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(t){return t&&t.bracketRegex||/[(){}[\]]/}function c(t,e,c){var o=t.getLineHandle(e.line),h=e.ch-1,l=c&&c.afterCursor;null==l&&(l=/(^| )cm-fat-cursor($| )/.test(t.getWrapperElement().className));var s=i(c),f=!l&&h>=0&&s.test(o.text.charAt(h))&&r[o.text.charAt(h)]||s.test(o.text.charAt(h+1))&&r[o.text.charAt(++h)];if(!f)return null;var u=">"==f.charAt(1)?1:-1;if(c&&c.strict&&u>0!=(h==e.ch))return null;var m=t.getTokenTypeAt(n(e.line,h+1)),g=a(t,n(e.line,h+(u>0?1:0)),u,m,c);return null==g?null:{from:n(e.line,h),to:g&&g.pos,match:g&&g.ch==f.charAt(0),forward:u>0}}function a(t,e,c,a,o){for(var h=o&&o.maxScanLineLength||1e4,l=o&&o.maxScanLines||1e3,s=[],f=i(o),u=c>0?Math.min(e.line+l,t.lastLine()+1):Math.max(t.firstLine()-1,e.line-l),m=e.line;m!=u;m+=c){var g=t.getLine(m);if(g){var d=c>0?0:g.length-1,k=c>0?g.length:-1;if(!(g.length>h))for(m==e.line&&(d=e.ch-(c<0?1:0));d!=k;d+=c){var p=g.charAt(d);if(f.test(p)&&(void 0===a||(t.getTokenTypeAt(n(m,d+1))||"")==(a||""))){var v=r[p];if(v&&">"==v.charAt(1)==c>0)s.push(p);else{if(!s.length)return{pos:n(m,d),ch:p};s.pop()}}}}}return m-c!=(c>0?t.lastLine():t.firstLine())&&null}function o(t,r,i){for(var a=t.state.matchBrackets.maxHighlightLineLength||1e3,o=i&&i.highlightNonMatching,h=[],l=t.listSelections(),s=0;se.pos?(e.pos=n,null):(e.pos=i,"trailingspace")},name:"trailingspace"})}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/fold/brace-fold.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/fold/brace-fold.js deleted file mode 100644 index bc215b370..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/fold/brace-fold.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function r(r){return function(n,t){var i=t.line,o=n.getLine(i);function l(r){for(var l,f=t.ch,u=0;;){var s=f<=0?-1:o.lastIndexOf(r[0],f-1);if(-1!=s){if(1==u&&sr.lastLine())return null;var t=r.getTokenAt(e.Pos(n,1));if(/\S/.test(t.string)||(t=r.getTokenAt(e.Pos(n,t.end+1))),"keyword"!=t.type||"import"!=t.string)return null;for(var i=n,o=Math.min(r.lastLine(),n+10);i<=o;++i){var l=r.getLine(i).indexOf(";");if(-1!=l)return{startCh:t.end,end:e.Pos(i,l)}}}var i,o=n.line,l=t(o);if(!l||t(o-1)||(i=t(o-2))&&i.end.line==o-1)return null;for(var f=l.end;;){var u=t(f.line+1);if(null==u)break;f=u.end}return{from:r.clipPos(e.Pos(o,l.startCh+1)),to:f}})),e.registerHelper("fold","include",(function(r,n){function t(n){if(nr.lastLine())return null;var t=r.getTokenAt(e.Pos(n,1));return/\S/.test(t.string)||(t=r.getTokenAt(e.Pos(n,t.end+1))),"meta"==t.type&&"#include"==t.string.slice(0,8)?t.start+8:void 0}var i=n.line,o=t(i);if(null==o||null!=t(i-1))return null;for(var l=i;null!=t(l+1);)++l;return{from:e.Pos(i,o+1),to:r.clipPos(e.Pos(l))}}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/fold/comment-fold.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/fold/comment-fold.js deleted file mode 100644 index 2419d6d2f..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/fold/comment-fold.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerGlobalHelper("fold","comment",(function(e){return e.blockCommentStart&&e.blockCommentEnd}),(function(t,n){var o=t.getModeAt(n),r=o.blockCommentStart,i=o.blockCommentEnd;if(r&&i){for(var f,l=n.line,c=t.getLine(l),m=n.ch,a=0;;){var d=m<=0?-1:c.lastIndexOf(r,m-1);if(-1!=d){if(1==a&&do.firstLine();)e=n.Pos(e.line-1,0),a=d(!1);if(a&&!a.cleared&&"unfold"!==i){var u=function(n,o,e){var t=r(n,o,"widget");if("function"==typeof t&&(t=t(e.from,e.to)),"string"==typeof t){var i=document.createTextNode(t);(t=document.createElement("span")).appendChild(i),t.className="CodeMirror-foldmarker"}else t&&(t=t.cloneNode(!0));return t}(o,t,a);n.on(u,"mousedown",(function(o){c.clear(),n.e_preventDefault(o)}));var c=o.markText(a.from,a.to,{replacedWith:u,clearOnEnter:r(o,t,"clearOnEnter"),__isFold:!0});c.on("clear",(function(e,r){n.signal(o,"unfold",o,e,r)})),n.signal(o,"fold",o,a.from,a.to)}}n.newFoldFunction=function(n,e){return function(r,t){o(r,t,{rangeFinder:n,widget:e})}},n.defineExtension("foldCode",(function(n,e,r){o(this,n,e,r)})),n.defineExtension("isFolded",(function(n){for(var o=this.findMarksAt(n),e=0;e=u){if(s&&f&&s.test(f.className))return;i=n(a.indicatorOpen)}}(i||f)&&t.setGutterMarker(e,a.gutter,i)}))}function f(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function a(t){var o=t.getViewport(),e=t.state.foldGutter;e&&(t.operation((function(){i(t,o.from,o.to)})),e.from=o.from,e.to=o.to)}function d(t,e,n){var i=t.state.foldGutter;if(i){var f=i.options;if(n==f.gutter){var a=r(t,e);a?a.clear():t.foldCode(o(e,0),f)}}}function u(t){var o=t.state.foldGutter;if(o){var e=o.options;o.from=o.to=0,clearTimeout(o.changeUpdate),o.changeUpdate=setTimeout((function(){a(t)}),e.foldOnChangeTimeSpan||600)}}function l(t){var o=t.state.foldGutter;if(o){var e=o.options;clearTimeout(o.changeUpdate),o.changeUpdate=setTimeout((function(){var e=t.getViewport();o.from==o.to||e.from-o.to>20||o.from-e.to>20?a(t):t.operation((function(){e.fromo.to&&(i(t,o.to,e.to),o.to=e.to)}))}),e.updateViewportTimeSpan||400)}}function c(t,o){var e=t.state.foldGutter;if(e){var r=o.line;r>=e.from&&ro))break;r=l}}return r?{from:e.Pos(i.line,t.getLine(i.line).length),to:e.Pos(r,t.getLine(r).length)}:void 0}}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/fold/markdown-fold.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/fold/markdown-fold.js deleted file mode 100644 index 21e0991e3..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/fold/markdown-fold.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerHelper("fold","markdown",(function(n,t){function r(t){var r=n.getTokenTypeAt(e.Pos(t,0));return r&&/\bheader\b/.test(r)}function i(e,n,t){var i=n&&n.match(/^#+/);return i&&r(e)?i[0].length:(i=t&&t.match(/^[=\-]+\s*$/))&&r(e+1)?"="==t[0]?1:2:100}var o=n.getLine(t.line),f=n.getLine(t.line+1),l=i(t.line,o,f);if(100!==l){for(var c=n.lastLine(),u=t.line,d=n.getLine(u+2);u=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function o(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function l(e){for(;;){var n=e.text.indexOf(">",e.ch);if(-1==n){if(f(e))continue;return}if(u(e,n+1)){var t=e.text.lastIndexOf("/",n),i=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,i?"selfClose":"regular"}e.ch=n+1}}function c(e){for(;;){var n=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==n){if(o(e))continue;return}if(u(e,n+1)){i.lastIndex=n,e.ch=n;var t=i.exec(e.text);if(t&&t.index==n)return t}else e.ch=n}}function a(e){for(;;){i.lastIndex=e.ch;var n=i.exec(e.text);if(!n){if(f(e))continue;return}if(u(e,n.index+1))return e.ch=n.index+n[0].length,n;e.ch=n.index+1}}function s(e){for(;;){var n=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==n){if(o(e))continue;return}if(u(e,n+1)){var t=e.text.lastIndexOf("/",n),i=t>-1&&!/\S/.test(e.text.slice(t+1,n));return e.ch=n+1,i?"selfClose":"regular"}e.ch=n}}function h(e,t){for(var i=[];;){var r,u=a(e),f=e.line,o=e.ch-(u?u[0].length:0);if(!u||!(r=l(e)))return;if("selfClose"!=r)if(u[1]){for(var c=i.length-1;c>=0;--c)if(i[c]==u[2]){i.length=c;break}if(c<0&&(!t||t==u[2]))return{tag:u[2],from:n(f,o),to:n(e.line,e.ch)}}else i.push(u[2])}}function F(e,t){for(var i=[];;){var r=s(e);if(!r)return;if("selfClose"!=r){var u=e.line,f=e.ch,o=c(e);if(!o)return;if(o[1])i.push(o[2]);else{for(var l=i.length-1;l>=0;--l)if(i[l]==o[2]){i.length=l;break}if(l<0&&(!t||t==o[2]))return{tag:o[2],from:n(e.line,e.ch),to:n(u,f)}}}else c(e)}}e.registerHelper("fold","xml",(function(e,i){for(var u=new r(e,i.line,0);;){var f=a(u);if(!f||u.line!=i.line)return;var o=l(u);if(!o)return;if(!f[1]&&"selfClose"!=o){var c=n(u.line,u.ch),s=h(u,f[2]);return s&&t(s.from,c)>0?{from:c,to:s.from}:null}}})),e.findMatchingTag=function(e,i,u){var f=new r(e,i.line,i.ch,u);if(-1!=f.text.indexOf(">")||-1!=f.text.indexOf("<")){var o=l(f),a=o&&n(f.line,f.ch),s=o&&c(f);if(o&&s&&!(t(f,i)>0)){var x={from:n(f.line,f.ch),to:a,tag:s[2]};return"selfClose"==o?{open:x,close:null,at:"open"}:s[1]?{open:F(f,s[2]),close:x,at:"close"}:{open:x,close:h(f=new r(e,a.line,a.ch,u),s[2]),at:"open"}}}},e.findEnclosingTag=function(e,n,t,i){for(var u=new r(e,n.line,n.ch,t);;){var f=F(u,i);if(!f)break;var o=h(new r(e,n.line,n.ch,t),f.tag);if(o)return{open:f,close:o}}},e.scanForClosingTag=function(e,n,t,i){return h(new r(e,n.line,n.ch,i?{from:0,to:i}:null),t)}})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/anyword-hint.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/anyword-hint.js deleted file mode 100644 index 9e7b75da4..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/anyword-hint.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var r=/[\w$]+/;e.registerHelper("hint","anyword",(function(t,o){for(var i=o&&o.word||r,n=o&&o.range||500,f=t.getCursor(),s=t.getLine(f.line),a=f.ch,c=a;c&&i.test(s.charAt(c-1));)--c;for(var l=c!=a&&s.slice(c,a),d=o&&o.list||[],u={},p=new RegExp(i.source,"g"),g=-1;g<=1;g+=2)for(var h=f.line,m=Math.min(Math.max(h+g*n,t.firstLine()),t.lastLine())+g;h!=m;h+=g)for(var y,b=t.getLine(h);y=p.exec(b);)h==f.line&&y[0]===l||l&&0!=y[0].lastIndexOf(l,0)||Object.prototype.hasOwnProperty.call(u,y[0])||(u[y[0]]=!0,d.push(y[0]));return{list:d,from:e.Pos(f.line,c),to:e.Pos(f.line,a)}}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/css-hint.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/css-hint.js deleted file mode 100644 index b086daeb1..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/css-hint.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../mode/css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/css/css"],e):e(CodeMirror)}((function(e){"use strict";var t={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};e.registerHelper("hint","css",(function(r){var o=r.getCursor(),i=r.getTokenAt(o),s=e.innerMode(r.getMode(),i.state);if("css"==s.mode.name){if("keyword"==i.type&&0=="!important".indexOf(i.string))return{list:["!important"],from:e.Pos(o.line,i.start),to:e.Pos(o.line,i.end)};var n=i.start,a=o.ch,d=i.string.slice(0,a-n);/[^\w$_-]/.test(d)&&(d="",n=a=o.ch);var l=e.resolveMode("text/css"),c=[],f=s.state.state;return"pseudo"==f||"variable-3"==i.type?p(t):"block"==f||"maybeprop"==f?p(l.propertyKeywords):"prop"==f||"parens"==f||"at"==f||"params"==f?(p(l.valueKeywords),p(l.colorKeywords)):"media"!=f&&"media_parens"!=f||(p(l.mediaTypes),p(l.mediaFeatures)),c.length?{list:c,from:e.Pos(o.line,n),to:e.Pos(o.line,a)}:void 0}function p(e){for(var t in e)d&&0!=t.lastIndexOf(d,0)||c.push(t)}}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/html-hint.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/html-hint.js deleted file mode 100644 index 4fbe6f328..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/html-hint.js +++ /dev/null @@ -1 +0,0 @@ -!function(l){"object"==typeof exports&&"object"==typeof module?l(require("../../lib/codemirror"),require("./xml-hint")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./xml-hint"],l):l(CodeMirror)}((function(l){"use strict";var t="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),e=["_blank","_self","_top","_parent"],a=["ascii","utf-8","utf-16","latin1","latin1"],n=["get","post","put","delete"],r=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],o=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],s={attrs:{}},u={a:{attrs:{href:null,ping:null,type:null,media:o,target:e,hreflang:t}},abbr:s,acronym:s,address:s,applet:s,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:o,hreflang:t,type:null,shape:["default","rect","circle","poly"]}},article:s,aside:s,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:s,base:{attrs:{href:null,target:e}},basefont:s,bdi:s,bdo:s,big:s,blockquote:{attrs:{cite:null}},body:s,br:s,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:r,formmethod:n,formnovalidate:["","novalidate"],formtarget:e,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:s,center:s,cite:s,code:s,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:s,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:s,dir:s,div:s,dialog:{attrs:{open:null}},dl:s,dt:s,em:s,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:s,figure:s,font:s,footer:s,form:{attrs:{action:null,name:null,"accept-charset":a,autocomplete:["on","off"],enctype:r,method:n,novalidate:["","novalidate"],target:e}},frame:s,frameset:s,h1:s,h2:s,h3:s,h4:s,h5:s,h6:s,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:s,hgroup:s,hr:s,html:{attrs:{manifest:null},children:["head","body"]},i:s,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:r,formmethod:n,formnovalidate:["","novalidate"],formtarget:e,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:s,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:s,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:t,media:o,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:s,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:a,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:s,noframes:s,noscript:s,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:s,param:{attrs:{name:null,value:null}},pre:s,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:s,rt:s,ruby:s,s,samp:s,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:a}},section:s,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:s,source:{attrs:{src:null,type:null,media:null}},span:s,strike:s,strong:s,style:{attrs:{type:["text/css"],media:o,scoped:null}},sub:s,summary:s,sup:s,table:s,tbody:s,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:s,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:s,time:{attrs:{datetime:null}},title:s,tr:s,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:t}},tt:s,u:s,ul:s,var:s,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:s},i={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],autocorrect:["true","false"],autocapitalize:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};function d(l){for(var t in i)i.hasOwnProperty(t)&&(l.attrs[t]=i[t])}for(var c in d(s),u)u.hasOwnProperty(c)&&u[c]!=s&&d(u[c]);l.htmlSchema=u,l.registerHelper("hint","html",(function(t,e){var a={schemaInfo:u};if(e)for(var n in e)a[n]=e[n];return l.hint.xml(t,a)}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/javascript-hint.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/javascript-hint.js deleted file mode 100644 index 26bbe37af..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/javascript-hint.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){var e=t.Pos;function r(t,e){for(var r=0,n=t.length;rs.ch&&(a.end=s.ch,a.string=a.string.slice(0,s.ch-a.start)):a={start:s.ch,end:s.ch,string:"",state:a.state,type:"."==a.string?"property":null};for(var f=a;"property"==f.type;){if("."!=(f=i(r,e(s.line,f.start))).string)return;if(f=i(r,e(s.line,f.start)),!p)var p=[];p.push(f)}return{list:c(a,p,n,o),from:e(s.line,a.start),to:e(s.line,a.end)}}}}function i(t,e){var r=t.getTokenAt(e);return e.ch==r.start+1&&"."==r.string.charAt(0)?(r.end=r.start,r.string=".",r.type="property"):/^\.[\w$_]*$/.test(r.string)&&(r.type="property",r.start++,r.string=r.string.replace(/\./,"")),r}t.registerHelper("hint","javascript",(function(t,e){return n(t,l,(function(t,e){return t.getTokenAt(e)}),e)})),t.registerHelper("hint","coffeescript",(function(t,e){return n(t,f,i,e)}));var o="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),s="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),a="prototype apply call bind".split(" "),l="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),f="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ");function c(t,e,n,i){var l=[],f=t.string,c=i&&i.globalScope||window;function p(t){0!=t.lastIndexOf(f,0)||function(t,e){if(!Array.prototype.indexOf){for(var r=t.length;r--;)if(t[r]===e)return!0;return!1}return-1!=t.indexOf(e)}(l,t)||l.push(t)}function u(t){"string"==typeof t?r(o,p):t instanceof Array?r(s,p):t instanceof Function&&r(a,p),function(t,e){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var r=t;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(e);else for(var n in t)e(n)}(t,p)}if(e&&e.length){var d,g=e.pop();for(g.type&&0===g.type.indexOf("variable")?(i&&i.additionalContext&&(d=i.additionalContext[g.string]),i&&!1===i.useGlobalScope||(d=d||c[g.string])):"string"==g.type?d="":"atom"==g.type?d=1:"function"==g.type&&(null==c.jQuery||"$"!=g.string&&"jQuery"!=g.string||"function"!=typeof c.jQuery?null!=c._&&"_"==g.string&&"function"==typeof c._&&(d=c._()):d=c.jQuery());null!=d&&e.length;)d=d[e.pop().string];null!=d&&u(d)}else{for(var y=t.state.localVars;y;y=y.next)p(y.name);for(var h=t.state.context;h;h=h.prev)for(y=h.vars;y;y=y.next)p(y.name);for(y=t.state.globalVars;y;y=y.next)p(y.name);if(i&&null!=i.additionalContext)for(var v in i.additionalContext)p(v);i&&!1===i.useGlobalScope||u(c),r(n,p)}return l}})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/show-hint.css b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/show-hint.css deleted file mode 100644 index 5617ccca2..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/show-hint.css +++ /dev/null @@ -1,36 +0,0 @@ -.CodeMirror-hints { - position: absolute; - z-index: 10; - overflow: hidden; - list-style: none; - - margin: 0; - padding: 2px; - - -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); - -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); - box-shadow: 2px 3px 5px rgba(0,0,0,.2); - border-radius: 3px; - border: 1px solid silver; - - background: white; - font-size: 90%; - font-family: monospace; - - max-height: 20em; - overflow-y: auto; -} - -.CodeMirror-hint { - margin: 0; - padding: 0 4px; - border-radius: 2px; - white-space: pre; - color: black; - cursor: pointer; -} - -li.CodeMirror-hint-active { - background: #08f; - color: white; -} diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/show-hint.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/show-hint.js deleted file mode 100644 index 05cec0d45..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/show-hint.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";function e(t,e){if(this.cm=t,this.options=e,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var i=this;t.on("cursorActivity",this.activityFunc=function(){i.cursorActivity()})}}t.showHint=function(t,e,i){if(!e)return t.showHint(i);i&&i.async&&(e.async=!0);var n={hint:e};if(i)for(var o in i)n[o]=i[o];return t.showHint(n)},t.defineExtension("showHint",(function(i){i=function(t,e,i){var n=t.options.hintOptions,o={};for(var s in l)o[s]=l[s];if(n)for(var s in n)void 0!==n[s]&&(o[s]=n[s]);if(i)for(var s in i)void 0!==i[s]&&(o[s]=i[s]);return o.hint.resolve&&(o.hint=o.hint.resolve(t,e)),o}(this,this.getCursor("start"),i);var n=this.listSelections();if(!(n.length>1)){if(this.somethingSelected()){if(!i.hint.supportsSelection)return;for(var o=0;oh.clientHeight+1;if(setTimeout((function(){T=c.getScrollInfo()})),F.bottom-M>0){var N=F.bottom-F.top;if(v.top-(v.bottom-F.top)-N>0)h.style.top=(b=v.top-N-H)+"px",w=!1;else if(N>M){h.style.height=M-5+"px",h.style.top=(b=v.bottom-F.top-H)+"px";var I=c.getCursor();i.from.ch!=I.ch&&(v=c.cursorCoords(I),h.style.left=(y=v.left-A)+"px",F=h.getBoundingClientRect())}}var P,E=F.right-S;if(O&&(E+=c.display.nativeBarWidth),E>0&&(F.right-F.left>S&&(h.style.width=S-5+"px",E-=F.right-F.left-S),h.style.left=(y=v.left-E-A)+"px"),O)for(var W=h.firstChild;W;W=W.nextSibling)W.style.paddingRight=c.display.nativeBarWidth+"px";c.addKeyMap(this.keyMap=function(t,e){var i={Up:function(){e.moveFocus(-1)},Down:function(){e.moveFocus(1)},PageUp:function(){e.moveFocus(1-e.menuSize(),!0)},PageDown:function(){e.moveFocus(e.menuSize()-1,!0)},Home:function(){e.setFocus(0)},End:function(){e.setFocus(e.length-1)},Enter:e.pick,Tab:e.pick,Esc:e.close};/Mac/.test(navigator.platform)&&(i["Ctrl-P"]=function(){e.moveFocus(-1)},i["Ctrl-N"]=function(){e.moveFocus(1)});var n=t.options.customKeys,o=n?{}:i;function s(t,n){var s;s="string"!=typeof n?function(t){return n(t,e)}:i.hasOwnProperty(n)?i[n]:n,o[t]=s}if(n)for(var c in n)n.hasOwnProperty(c)&&s(c,n[c]);var r=t.options.extraKeys;if(r)for(var c in r)r.hasOwnProperty(c)&&s(c,r[c]);return o}(e,{moveFocus:function(t,e){n.changeActive(n.selectedHint+t,e)},setFocus:function(t){n.changeActive(t)},menuSize:function(){return n.screenAmount()},length:u.length,close:function(){e.close()},pick:function(){n.pick()},data:i})),e.options.closeOnUnfocus&&(c.on("blur",this.onBlur=function(){P=setTimeout((function(){e.close()}),100)}),c.on("focus",this.onFocus=function(){clearTimeout(P)})),c.on("scroll",this.onScroll=function(){var t=c.getScrollInfo(),i=c.getWrapperElement().getBoundingClientRect();T||(T=c.getScrollInfo());var n=b+T.top-t.top,o=n-(l.pageYOffset||(r.documentElement||r.body).scrollTop);if(w||(o+=h.offsetHeight),o<=i.top||o>=i.bottom)return e.close();h.style.top=n+"px",h.style.left=y+T.left-t.left+"px"}),t.on(h,"dblclick",(function(t){var e=s(h,t.target||t.srcElement);e&&null!=e.hintId&&(n.changeActive(e.hintId),n.pick())})),t.on(h,"click",(function(t){var i=s(h,t.target||t.srcElement);i&&null!=i.hintId&&(n.changeActive(i.hintId),e.options.completeOnSingleClick&&n.pick())})),t.on(h,"mousedown",(function(){setTimeout((function(){c.focus()}),20)}));var R=this.getSelectedHintRange();return 0===R.from&&0===R.to||this.scrollToActive(),t.signal(i,"select",u[this.selectedHint],h.childNodes[this.selectedHint]),!0}function r(t,e,i,n){if(t.async)t(e,n,i);else{var o=t(e,i);o&&o.then?o.then(n):n(o)}}e.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&t.signal(this.data,"close"),this.widget&&this.widget.close(),t.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(e,i){var n=e.list[i],s=this;this.cm.operation((function(){n.hint?n.hint(s.cm,e,n):s.cm.replaceRange(o(n),n.from||e.from,n.to||e.to,"complete"),t.signal(e,"pick",n),s.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(n(this.debounce),this.debounce=0);var t=this.startPos;this.data&&(t=this.data.from);var e=this.cm.getCursor(),o=this.cm.getLine(e.line);if(e.line!=this.startPos.line||o.length-e.ch!=this.startLen-this.startPos.ch||e.ch=this.data.list.length?e=i?this.data.list.length-1:0:e<0&&(e=i?0:this.data.list.length-1),this.selectedHint!=e){var n=this.hints.childNodes[this.selectedHint];n&&(n.className=n.className.replace(" CodeMirror-hint-active",""),n.removeAttribute("aria-selected")),(n=this.hints.childNodes[this.selectedHint=e]).className+=" CodeMirror-hint-active",n.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",n.id),this.scrollToActive(),t.signal(this.data,"select",this.data.list[this.selectedHint],n)}},scrollToActive:function(){var t=this.getSelectedHintRange(),e=this.hints.childNodes[t.from],i=this.hints.childNodes[t.to],n=this.hints.firstChild;e.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=i.offsetTop+i.offsetHeight-this.hints.clientHeight+n.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var t=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-t),to:Math.min(this.data.list.length-1,this.selectedHint+t)}}},t.registerHelper("hint","auto",{resolve:function(e,i){var n,o=e.getHelpers(i,"hint");if(o.length){var s=function(t,e,i){var n=function(t,e){if(!t.somethingSelected())return e;for(var i=[],n=0;n0?e(t):o(s+1)}))}(0)};return s.async=!0,s.supportsSelection=!0,s}return(n=e.getHelper(e.getCursor(),"hintWords"))?function(e){return t.hint.fromList(e,{words:n})}:t.hint.anyword?function(e,i){return t.hint.anyword(e,i)}:function(){}}}),t.registerHelper("hint","fromList",(function(e,i){var n,o=e.getCursor(),s=e.getTokenAt(o),c=t.Pos(o.line,s.start),r=o;s.start,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};t.defineOption("hintOptions",null)})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/sql-hint.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/sql-hint.js deleted file mode 100644 index e2d664ef2..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/sql-hint.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../../mode/sql/sql")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/sql/sql"],t):t(CodeMirror)}((function(t){"use strict";var e,r,n,o,i=t.Pos,s=t.cmpPos;function a(t){return"[object Array]"==Object.prototype.toString.call(t)}function u(t){return"string"==typeof t?t:t.text}function l(t,e){return a(e)&&(e={columns:e}),e.text||(e.text=t),e}function f(t){return e[t.toUpperCase()]}function c(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function p(t,e){var r=t.length,n=u(e).substr(0,r);return t.toUpperCase()===n.toUpperCase()}function d(t,e,r,n){if(a(r))for(var o=0;o0)&&s(g,l[h])<=0){c={start:d,end:l[h]};break}d=l[h]}if(c.start){var x=r.getRange(c.start,c.end,!1);for(h=0;h=0;r--){var n=t[r];e[u(n).toUpperCase()]=l(u(n),n)}else if(t)for(var o in t)e[o.toUpperCase()]=l(o,t[o]);return e}(p&&p.tables);var v=p&&p.defaultTable,m=p&&p.disableKeywords;r=v&&f(v),n=function(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).keywords}(s),o=function(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).identifierQuote||"`"}(s),v&&!r&&(r=x(v,s)),(r=r||[]).columns&&(r=r.columns);var y,b,C,q=s.getCursor(),A=[],j=s.getTokenAt(q);if(j.end>q.ch&&(j.end=q.ch,j.string=j.string.slice(0,q.ch-j.start)),j.string.match(/^[.`"'\w@][\w$#]*$/g)?(C=j.string,y=j.start,b=j.end):(y=b=q.ch,C=""),"."==C.charAt(0)||C.charAt(0)==o)y=function(t,n,s,a){for(var u=!1,l=[],p=n.start,v=!0;v;)v="."==n.string.charAt(0),u=u||n.string.charAt(0)==o,p=n.start,l.unshift(g(n.string)),"."==(n=a.getTokenAt(i(t.line,n.start))).string&&(v=!0,n=a.getTokenAt(i(t.line,n.start)));var m=l.join(".");d(s,m,e,(function(t){return u?h(t):t})),d(s,m,r,(function(t){return u?h(t):t})),m=l.pop();var y=l.join("."),b=!1,C=y;if(!f(y)){var q=y;(y=x(y,a))!==q&&(b=!0)}var A=f(y);return A&&A.columns&&(A=A.columns),A&&d(s,m,A,(function(t){var e=y;return 1==b&&(e=C),"string"==typeof t?t=e+"."+t:(t=c(t)).text=e+"."+t.text,u?h(t):t})),p}(q,j,A,s);else{var w=function(t,e){return"object"==typeof t?t.className=e:t={text:t,className:e},t};d(A,C,r,(function(t){return w(t,"CodeMirror-hint-table CodeMirror-hint-default-table")})),d(A,C,e,(function(t){return w(t,"CodeMirror-hint-table")})),m||d(A,C,n,(function(t){return w(t.toUpperCase(),"CodeMirror-hint-keyword")}))}return{list:A,from:i(q.line,y),to:i(q.line,b)}}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/xml-hint.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/xml-hint.js deleted file mode 100644 index 74eb5fd33..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/hint/xml-hint.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";var e=t.Pos;function r(t,e,r){return r?t.indexOf(e)>=0:0==t.lastIndexOf(e,0)}t.registerHelper("hint","xml",(function(n,i){var s=i&&i.schemaInfo,a=i&&i.quoteChar||'"',o=i&&i.matchInMiddle;if(s){var l=n.getCursor(),f=n.getTokenAt(l);if(f.end>l.ch&&(f.end=l.ch,f.string=f.string.slice(0,l.ch-f.start)),(x=t.innerMode(n.getMode(),f.state)).mode.xmlCurrentTag){var g,c,h=[],u=!1,d=/\btag\b/.test(f.type)&&!/>$/.test(f.string),p=d&&/^\w/.test(f.string);if(p){var m=n.getLine(l.line).slice(Math.max(0,f.start-2),f.start),v=/<\/$/.test(m)?"close":/<$/.test(m)?"open":null;v&&(c=f.start-("close"==v?2:1))}else d&&"<"==f.string?v="open":d&&"")}else{var M=(b=y&&s[y.name])&&b.attrs,P=s["!attrs"];if(!M&&!P)return;if(M){if(P){var $={};for(var I in P)P.hasOwnProperty(I)&&($[I]=P[I]);for(var I in M)M.hasOwnProperty(I)&&($[I]=M[I]);M=$}}else M=P;if("string"==f.type||"="==f.string){var T,j=(m=n.getRange(e(l.line,Math.max(0,l.ch-60)),e(l.line,"string"==f.type?f.start:f.end))).match(/([^\s\u00a0=<>\"\']+)=$/);if(!j||!M.hasOwnProperty(j[1])||!(T=M[j[1]]))return;if("function"==typeof T&&(T=T.call(this,n)),"string"==f.type){g=f.string;var q=0;/['"]/.test(f.string.charAt(0))&&(a=f.string.charAt(0),g=f.string.slice(1),q++);var L=f.string.length;if(/['"]/.test(f.string.charAt(L-1))&&(a=f.string.charAt(L-1),g=f.string.substr(q,L-2)),q){var k=n.getLine(l.line);k.length>f.end&&k.charAt(f.end)==a&&f.end++}u=!0}var H=function(t){if(t)for(var e=0;e-1&&(a+=d)}var c={message:i.reason,severity:i.code&&i.code.startsWith("W")?"warning":"error",from:e.Pos(i.line-1,t),to:e.Pos(i.line-1,a)};n.push(c)}}}(o,i),i}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/lint/json-lint.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/lint/json-lint.js deleted file mode 100644 index 800c542e8..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/lint/json-lint.js +++ /dev/null @@ -1 +0,0 @@ -!function(o){"object"==typeof exports&&"object"==typeof module?o(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],o):o(CodeMirror)}((function(o){"use strict";o.registerHelper("lint","json",(function(n){var r=[];if(!window.jsonlint)return window.console&&window.console.error("Error: window.jsonlint not defined, CodeMirror JSON linting cannot run."),r;var e=window.jsonlint.parser||window.jsonlint;e.parseError=function(n,e){var i=e.loc;r.push({from:o.Pos(i.first_line-1,i.first_column),to:o.Pos(i.last_line-1,i.last_column),message:n})};try{e.parse(n)}catch(o){}return r}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/lint/lint.css b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/lint/lint.css deleted file mode 100644 index e1560db98..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/lint/lint.css +++ /dev/null @@ -1,79 +0,0 @@ -/* The lint marker gutter */ -.CodeMirror-lint-markers { - width: 16px; -} - -.CodeMirror-lint-tooltip { - background-color: #ffd; - border: 1px solid black; - border-radius: 4px 4px 4px 4px; - color: black; - font-family: monospace; - font-size: 10pt; - overflow: hidden; - padding: 2px 5px; - position: fixed; - white-space: pre; - white-space: pre-wrap; - z-index: 100; - max-width: 600px; - opacity: 0; - transition: opacity .4s; - -moz-transition: opacity .4s; - -webkit-transition: opacity .4s; - -o-transition: opacity .4s; - -ms-transition: opacity .4s; -} - -.CodeMirror-lint-mark { - background-position: left bottom; - background-repeat: repeat-x; -} - -.CodeMirror-lint-mark-warning { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="); -} - -.CodeMirror-lint-mark-error { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg=="); -} - -.CodeMirror-lint-marker { - background-position: center center; - background-repeat: no-repeat; - cursor: pointer; - display: inline-block; - height: 16px; - width: 16px; - vertical-align: middle; - position: relative; -} - -.CodeMirror-lint-message { - padding-left: 18px; - background-position: top left; - background-repeat: no-repeat; -} - -.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII="); -} - -.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII="); -} - -.CodeMirror-lint-marker-multiple { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC"); - background-repeat: no-repeat; - background-position: right bottom; - width: 100%; height: 100%; -} - -.CodeMirror-lint-line-error { - background-color: rgba(183, 76, 81, 0.08); -} - -.CodeMirror-lint-line-warning { - background-color: rgba(255, 211, 0, 0.1); -} diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/lint/lint.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/lint/lint.js deleted file mode 100644 index b2f0a363e..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/lint/lint.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";var e="CodeMirror-lint-markers";function n(t){t.parentNode&&t.parentNode.removeChild(t)}function o(e,o,i,r){var a=function(e,n,o){var i=document.createElement("div");function r(e){if(!i.parentNode)return t.off(document,"mousemove",r);i.style.top=Math.max(0,e.clientY-i.offsetHeight-5)+"px",i.style.left=e.clientX+5+"px"}return i.className="CodeMirror-lint-tooltip cm-s-"+e.options.theme,i.appendChild(o.cloneNode(!0)),e.state.lint.options.selfContain?e.getWrapperElement().appendChild(i):document.body.appendChild(i),t.on(document,"mousemove",r),r(n),null!=i.style.opacity&&(i.style.opacity=1),i}(e,o,i);function s(){var e;t.off(r,"mouseout",s),a&&((e=a).parentNode&&(null==e.style.opacity&&n(e),e.style.opacity=0,setTimeout((function(){n(e)}),600)),a=null)}var l=setInterval((function(){if(a)for(var t=r;;t=t.parentNode){if(t&&11==t.nodeType&&(t=t.host),t==document.body)return;if(!t){s();break}}if(!a)return clearInterval(l)}),400);t.on(r,"mouseout",s)}function i(t,e,n){for(var i in this.marked=[],e instanceof Function&&(e={getAnnotations:e}),e&&!0!==e||(e={}),this.options={},this.linterOptions=e.options||{},r)this.options[i]=r[i];for(var i in e)r.hasOwnProperty(i)?null!=e[i]&&(this.options[i]=e[i]):e.options||(this.linterOptions[i]=e[i]);this.timeout=null,this.hasGutter=n,this.onMouseOver=function(e){!function(t,e){var n=e.target||e.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var i=n.getBoundingClientRect(),r=(i.left+i.right)/2,a=(i.top+i.bottom)/2,s=t.findMarksAt(t.coordsChar({left:r,top:a},"client")),u=[],c=0;c-1)&&m.push(t.message)}));for(var p=null,d=o.hasGutter&&document.createDocumentFragment(),h=0;h1,i.tooltips)),i.highlightLines&&t.addLineClass(c,"wrap","CodeMirror-lint-line-"+p)}}i.onUpdateLinting&&i.onUpdateLinting(n,u,t)}}function f(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){u(t)}),e.options.delay))}t.defineOption("lint",!1,(function(n,o,r){if(r&&r!=t.Init&&(a(n),!1!==n.state.lint.options.lintOnChange&&n.off("change",f),t.off(n.getWrapperElement(),"mouseover",n.state.lint.onMouseOver),clearTimeout(n.state.lint.timeout),delete n.state.lint),o){for(var s=n.getOption("gutters"),l=!1,c=0;cn)return!1;var o=i.getScrollInfo();if("align"==e.mv.options.connect)v=o.top;else{var l,s,c=.5*o.clientHeight,h=o.top+c,f=i.lineAtHeight(h,"local"),g=function(e,t,i){for(var r,n,o,l,a=0;at?(n=s.editFrom,l=s.origFrom):h>t&&(n=s.editTo,l=s.origTo)),h<=t?(r=s.editTo,o=s.origTo):c<=t&&(r=s.editFrom,o=s.origFrom)}return{edit:{before:r,after:n},orig:{before:o,after:l}}}(e.chunks,f,t),u=a(i,t?g.edit:g.orig),d=a(r,t?g.orig:g.edit),m=(h-u.top)/(u.bot-u.top),v=d.top-c+m*(d.bot-d.top);if(v>o.top&&(s=o.top/c)<1)v=v*s+o.top*(1-s);else if((l=o.height-o.clientHeight-o.top)l&&(s=l/c)<1&&(v=v*s+(p.height-p.clientHeight-l)*(1-s))}}return r.scrollTo(o.left,v),r.state.scrollSetAt=n,r.state.scrollSetBy=e,!0}function a(e,t){var i=t.after;return null==i&&(i=e.lastLine()+1),{top:e.heightAtLine(t.before||0,"local"),bot:e.heightAtLine(i,"local")}}function s(t,i,r){t.lockScroll=i,i&&0!=r&&l(t,DIFF_INSERT)&&d(t),(i?e.addClass:e.rmClass)(t.lockButton,"CodeMirror-merge-scrolllock-enabled")}function c(e,t,i){for(var r=i.classLocation,n=0;n20||i.from-o.to>20?(h(e,i.marked,n),u(e,t,r,i.marked,o.from,o.to,n),i.from=o.from,i.to=o.to):(o.fromi.to&&(u(e,t,r,i.marked,i.to,o.to,n),i.to=o.to))}))}function g(e,t,i,r,n,o){for(var l=i.classLocation,a=e.getLineHandle(t),s=0;sC&&(m&&(u(d,C),m=!1),d=w)}else if(m=!0,k==r){var y=V(s,b,!0),T=P(c,s),F=H(h,y);j(T,F)||n.push(e.markText(T,F,{className:f})),s=y}}m&&u(d,s.line+1)}function d(e){if(e.showDifferences){if(e.svg){N(e.svg);var t=e.gap.offsetWidth;R(e.svg,"width",t,"height",e.gap.offsetHeight)}e.copyButtons&&N(e.copyButtons);for(var i=e.edit.getViewport(),r=e.orig.getViewport(),n=e.mv.wrap.getBoundingClientRect().top,o=n-e.edit.getScrollerElement().getBoundingClientRect().top+e.edit.getScrollInfo().top,l=n-e.orig.getScrollerElement().getBoundingClientRect().top+e.orig.getScrollInfo().top,a=0;a=i.from&&s.origFrom<=r.to&&s.origTo>=r.from&&w(e,s,l,o,t)}}}function m(e,t){for(var i=0,r=0,n=0;ne&&o.editFrom<=e)return null;if(o.editFrom>e)break;i=o.editTo,r=o.origTo}return r+(e-i)}function v(e,t,i){for(var r=e.state.trackAlignable,n=e.firstLine(),o=0,l=[],a=0;;a++){for(var s=t[a],c=s?i?s.origFrom:s.editFrom:1e9;of){o++,n--;continue e}if(g.editTo>h){if(g.editFrom<=h)continue e;break}a+=g.origTo-g.origFrom-(g.editTo-g.editFrom),l++}if(h==f-a)s[r]=f,o++;else if(h1&&r.push(C(e[l],i[l],s))}}function C(e,t,i){var r=!0;t>e.lastLine()&&(t--,r=!1);var n=document.createElement("div");return n.className="CodeMirror-merge-spacer",n.style.height=i+"px",n.style.minWidth="1px",e.addLineWidget(t,n,{height:i,above:r,mergeSpacer:!0,handleMouseEvents:!0})}function w(e,t,r,n,o){var l="left"==e.type,a=e.orig.heightAtLine(t.origFrom,"local",!0)-r;if(e.svg){var s=a,c=e.edit.heightAtLine(t.editFrom,"local",!0)-n;if(l){var h=s;s=c,c=h}var f=e.orig.heightAtLine(t.origTo,"local",!0)-r,g=e.edit.heightAtLine(t.editTo,"local",!0)-n;l&&(h=f,f=g,g=h);var u=" C "+o/2+" "+c+" "+o/2+" "+s+" "+(o+2)+" "+s,d=" C "+o/2+" "+f+" "+o/2+" "+g+" -1 "+g;R(e.svg.appendChild(document.createElementNS(i,"path")),"d","M -1 "+c+u+" L "+(o+2)+" "+f+d+" z","class",e.classes.connect)}if(e.copyButtons){var m=e.copyButtons.appendChild(I("div","left"==e.type?"⇝":"⇜","CodeMirror-merge-copy")),v=e.mv.options.allowEditingOriginals;if(m.title=e.edit.phrase(v?"Push to left":"Revert chunk"),m.chunk=t,m.style.top=(t.origTo>t.origFrom?a:e.edit.heightAtLine(t.editFrom,"local")-n)+"px",m.setAttribute("role","button"),m.setAttribute("tabindex","0"),m.setAttribute("aria-label",m.title),v){var p=e.edit.heightAtLine(t.editFrom,"local")-n,k=e.copyButtons.appendChild(I("div","right"==e.type?"⇝":"⇜","CodeMirror-merge-copy-reverse"));k.title="Push to right",k.chunk={editFrom:t.origFrom,editTo:t.origTo,origFrom:t.editFrom,origTo:t.editTo},k.style.top=p+"px","right"==e.type?k.style.left="2px":k.style.right="2px",k.setAttribute("role","button"),k.setAttribute("tabindex","0"),k.setAttribute("aria-label",k.title)}}}function y(e,i,r,n){if(!e.diffOutOfDate){var o=n.origTo>r.lastLine()?t(n.origFrom-1):t(n.origFrom,0),l=t(n.origTo,0),a=n.editTo>i.lastLine()?t(n.editFrom-1):t(n.editFrom,0),s=t(n.editTo,0),c=e.mv.options.revertChunk;c?c(e.mv,r,o,l,i,a,s):i.replaceRange(r.getRange(o,l),a,s)}}var T,F=e.MergeView=function(t,i){if(!(this instanceof F))return new F(t,i);this.options=i;var n=i.origLeft,o=null==i.origRight?i.orig:i.origRight,l=null!=n,a=null!=o,s=1+(l?1:0)+(a?1:0),c=[],h=this.left=null,f=this.right=null,g=this;if(l){h=this.left=new r(this,"left");var u=I("div",null,"CodeMirror-merge-pane CodeMirror-merge-left");c.push(u),c.push(S(h))}var v=I("div",null,"CodeMirror-merge-pane CodeMirror-merge-editor");if(c.push(v),a){f=this.right=new r(this,"right"),c.push(S(f));var p=I("div",null,"CodeMirror-merge-pane CodeMirror-merge-right");c.push(p)}(a?p:v).className+=" CodeMirror-merge-pane-rightmost",c.push(I("div",null,null,"height: 0; clear: both;"));var b=this.wrap=t.appendChild(I("div",c,"CodeMirror-merge CodeMirror-merge-"+s+"pane"));this.edit=e(v,W(i)),h&&h.init(u,n,i),f&&f.init(p,o,i),i.collapseIdentical&&this.editor().operation((function(){!function(e,t){"number"!=typeof t&&(t=2);for(var i=[],r=e.editor(),n=r.firstLine(),o=n,l=r.lastLine();o<=l;o++)i.push(!0);e.left&&x(e.left,t,n,i),e.right&&x(e.right,t,n,i);for(var a=0;at){var h=[{line:s,cm:r}];e.left&&h.push({line:m(s,e.left.chunks),cm:e.left.orig}),e.right&&h.push({line:m(s,e.right.chunks),cm:e.right.orig});var f=B(c,h);e.options.onCollapse&&e.options.onCollapse(e,s,c,f)}}}(g,i.collapseIdentical)})),"align"==i.connect&&(this.aligners=[],k(this.left||this.right,!0)),h&&h.registerEvents(f),f&&f.registerEvents(h);var C=function(){h&&d(h),f&&d(f)};e.on(window,"resize",C);var w=setInterval((function(){for(var t=b.parentNode;t&&t!=document.body;t=t.parentNode);t||(clearInterval(w),e.off(window,"resize",C))}),5e3)};function S(t){var r=t.lockButton=I("div",null,"CodeMirror-merge-scrolllock");r.setAttribute("role","button"),r.setAttribute("tabindex","0");var n=I("div",[r],"CodeMirror-merge-scrolllock-wrap");e.on(r,"click",(function(){s(t,!t.lockScroll)})),e.on(r,"keyup",(function(e){"Enter"===e.key&&s(t,!t.lockScroll)}));var o=[n];if(!1!==t.mv.options.revertButtons){function a(e){var i=e.target||e.srcElement;i.chunk&&("CodeMirror-merge-copy-reverse"!=i.className?y(t,t.edit,t.orig,i.chunk):y(t,t.orig,t.edit,i.chunk))}t.copyButtons=I("div",null,"CodeMirror-merge-copybuttons-"+t.type),e.on(t.copyButtons,"click",a),e.on(t.copyButtons,"keyup",(function(e){"Enter"===e.key&&a(e)})),o.unshift(t.copyButtons)}if("align"!=t.mv.options.connect){var l=document.createElementNS&&document.createElementNS(i,"svg");l&&!l.createSVGRect&&(l=null),t.svg=l,l&&o.push(l)}return t.gap=I("div",o,"CodeMirror-merge-gap")}function M(e){return"string"==typeof e?e:e.getValue()}function L(e,t,i){T||(T=new diff_match_patch);for(var r=T.diff_main(e,t),n=0;nf&&(a&&i.push({origFrom:n,origTo:g,editFrom:r,editTo:f}),r=d,n=m)}else V(c==DIFF_INSERT?o:l,s[1])}return(r<=o.line||n<=l.line)&&i.push({origFrom:n,origTo:l.line+1,editFrom:r,editTo:o.line+1}),i}function D(e,t){if(t==e.length-1)return!0;var i=e[t+1][1];return!(1==i.length&&t1||t==e.length-3)&&10==i.charCodeAt(0))}function E(e,t){if(0==t)return!0;var i=e[t-1][1];return 10==i.charCodeAt(i.length-1)&&(1==t||10==(i=e[t-2][1]).charCodeAt(i.length-1))}function O(i,r,n){i.addLineClass(r,"wrap","CodeMirror-merge-collapsed-line");var o=document.createElement("span");o.className="CodeMirror-merge-collapsed-widget",o.title=i.phrase("Identical text collapsed. Click to expand.");var l=i.markText(t(r,0),t(n-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:o,clearOnEnter:!0});function a(){l.clear(),i.removeLineClass(r,"wrap","CodeMirror-merge-collapsed-line")}return l.explicitlyCleared&&a(),e.on(o,"click",a),l.on("clear",a),e.on(o,"click",a),{mark:l,clear:a}}function B(e,t){var i=[];function r(){for(var e=0;e=0&&a0;--t)e.removeChild(e.firstChild)}function R(e){for(var t=1;t0?e:t}function j(e,t){return e.line==t.line&&e.ch==t.ch}function U(e,t,i){for(var r=e.length-1;r>=0;r--){var n=e[r],o=(i?n.origTo:n.editTo)-1;if(ot)return o}}function Q(t,i){var r=null,o=t.state.diffViews,l=t.getCursor().line;if(o)for(var a=0;ar:h0)break}this.signal(),this.alignable.splice(i,0,e,t)},find:function(e){for(var t=0;t-1){var c=this.alignable[o+1];2==c?this.alignable.splice(o,2):this.alignable[o+1]=-3&c}l>-1&&i&&this.set(e+i,2)}},e.commands.goNextDiff=function(e){return Q(e,1)},e.commands.goPrevDiff=function(e){return Q(e,-1)}})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/mode/loadmode.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/mode/loadmode.js deleted file mode 100644 index 11f58990b..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/mode/loadmode.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),"cjs"):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],(function(o){e(o,"amd")})):e(CodeMirror,"plain")}((function(e,o){e.modeURL||(e.modeURL="../mode/%N/%N.js");var r={};function n(o,r,n){var t=e.modes[o],i=t&&t.dependencies;if(!i)return r();for(var d=[],a=0;a-1?i+n.length:i}var o=n.exec(t?e.slice(t):e);return o?o.index+t+(r?o[0].length:0):-1}return{startState:function(){return{outer:e.startState(n),innerActive:null,inner:null,startingInner:!1}},copyState:function(t){return{outer:e.copyState(n,t.outer),innerActive:t.innerActive,inner:t.innerActive&&e.copyState(t.innerActive.mode,t.inner),startingInner:t.startingInner}},token:function(i,o){if(o.innerActive){var l=o.innerActive;if(a=i.string,!l.close&&i.sol())return o.innerActive=o.inner=null,this.token(i,o);if((v=l.close&&!o.startingInner?r(a,l.close,i.pos,l.parseDelimiters):-1)==i.pos&&!l.parseDelimiters)return i.match(l.close),o.innerActive=o.inner=null,l.delimStyle&&l.delimStyle+" "+l.delimStyle+"-close";v>-1&&(i.string=a.slice(0,v));var c=l.mode.token(i,o.inner);return v>-1?i.string=a:i.pos>i.start&&(o.startingInner=!1),v==i.pos&&l.parseDelimiters&&(o.innerActive=o.inner=null),l.innerStyle&&(c=c?c+" "+l.innerStyle:l.innerStyle),c}for(var s=1/0,a=i.string,u=0;u2&&c.token&&"string"!=typeof c.token){for(var f=2;f-1)return e.Pass;var i=a.indent.length-1,l=t[a.state];e:for(;;){for(var s=0;s=e)return s+(e-o);s+=a-o,s+=r-s%r,o=a+1}}function r(){}var n=function(t,e,r){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};n.prototype.eol=function(){return this.pos>=this.string.length},n.prototype.sol=function(){return this.pos==this.lineStart},n.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},n.prototype.next=function(){if(this.pose},n.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},n.prototype.skipToEnd=function(){this.pos=this.string.length},n.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},n.prototype.backUp=function(t){this.pos-=t},n.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==e&&(this.pos+=n[0].length),n)}var i=function(t){return r?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},n.prototype.current=function(){return this.string.slice(this.start,this.pos)},n.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},n.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},n.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var i={},o={};function s(e){if("string"==typeof e&&o.hasOwnProperty(e))e=o[e];else if(e&&"string"==typeof e.name&&o.hasOwnProperty(e.name)){var n=o[e.name];"string"==typeof n&&(n={name:n}),i=n,a=e,Object.create?p=Object.create(i):(r.prototype=i,p=new r),a&&t(a,p),(e=p).name=n.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return s("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return s("application/json")}var i,a,p;return"string"==typeof e?{name:e}:e||{name:"null"}}var a,p={},l={__proto__:null,modes:i,mimeModes:o,defineMode:function(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),i[t]=e},defineMIME:function(t,e){o[t]=e},resolveMode:s,getMode:function t(e,r){r=s(r);var n=i[r.name];if(!n)return t(e,"text/plain");var o=n(e,r);if(p.hasOwnProperty(r.name)){var a=p[r.name];for(var l in a)a.hasOwnProperty(l)&&(o.hasOwnProperty(l)&&(o["_"+l]=o[l]),o[l]=a[l])}if(o.name=r.name,r.helperType&&(o.helperType=r.helperType),r.modeProps)for(var u in r.modeProps)o[u]=r.modeProps[u];return o},modeExtensions:p,extendMode:function(e,r){t(r,p.hasOwnProperty(e)?p[e]:p[e]={})},copyState:function(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var r={};for(var n in e){var i=e[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r},innerMode:function(t,e){for(var r;t.innerMode&&(r=t.innerMode(e))&&r.mode!=t;)e=r.state,t=r.mode;return r||{mode:t,state:e}},startState:function(t,e,r){return!t.startState||t.startState(e,r)}},u="undefined"!=typeof globalThis?globalThis:window;for(var h in u.CodeMirror={},CodeMirror.StringStream=n,l)CodeMirror[h]=l[h];CodeMirror.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),CodeMirror.defineMIME("text/plain","null"),CodeMirror.registerHelper=CodeMirror.registerGlobalHelper=Math.min,CodeMirror.splitLines=function(t){return t.split(/\r?\n|\r/)},CodeMirror.countColumn=e,CodeMirror.defaults={indentUnit:2},a=function(t){t.runMode=function(e,r,n,i){var o=t.getMode(t.defaults,r),s=i&&i.tabSize||t.defaults.tabSize;if(n.appendChild){var a=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9),p=n,l=0;p.innerHTML="",n=function(t,e){if("\n"==t)return p.appendChild(document.createTextNode(a?"\r":t)),void(l=0);for(var r="",n=0;;){var i=t.indexOf("\t",n);if(-1==i){r+=t.slice(n),l+=t.length-n;break}l+=i-n,r+=t.slice(n,i);var o=s-l%s;l+=o;for(var u=0;u=e)return s+(e-i);s+=a-i,s+=n-s%n,i=a+1}}function nothing(){}function createObj(t,e){var n;return Object.create?n=Object.create(t):(nothing.prototype=t,n=new nothing),e&©Obj(e,n),n}var StringStream=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};StringStream.prototype.eol=function(){return this.pos>=this.string.length},StringStream.prototype.sol=function(){return this.pos==this.lineStart},StringStream.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},StringStream.prototype.next=function(){if(this.pose},StringStream.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},StringStream.prototype.skipToEnd=function(){this.pos=this.string.length},StringStream.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},StringStream.prototype.backUp=function(t){this.pos-=t},StringStream.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}var o=function(t){return n?t.toLowerCase():t};if(o(this.string.substr(this.pos,t.length))==o(t))return!1!==e&&(this.pos+=t.length),!0},StringStream.prototype.current=function(){return this.string.slice(this.start,this.pos)},StringStream.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},StringStream.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},StringStream.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var modes={},mimeModes={};function defineMode(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),modes[t]=e}function defineMIME(t,e){mimeModes[t]=e}function resolveMode(t){if("string"==typeof t&&mimeModes.hasOwnProperty(t))t=mimeModes[t];else if(t&&"string"==typeof t.name&&mimeModes.hasOwnProperty(t.name)){var e=mimeModes[t.name];"string"==typeof e&&(e={name:e}),(t=createObj(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return resolveMode("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return resolveMode("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function getMode(t,e){e=resolveMode(e);var n=modes[e.name];if(!n)return getMode(t,"text/plain");var r=n(t,e);if(modeExtensions.hasOwnProperty(e.name)){var o=modeExtensions[e.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var s in e.modeProps)r[s]=e.modeProps[s];return r}var modeExtensions={};function extendMode(t,e){copyObj(e,modeExtensions.hasOwnProperty(t)?modeExtensions[t]:modeExtensions[t]={})}function copyState(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var o=e[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function innerMode(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function startState(t,e,n){return!t.startState||t.startState(e,n)}var modeMethods={__proto__:null,modes,mimeModes,defineMode,defineMIME,resolveMode,getMode,modeExtensions,extendMode,copyState,innerMode,startState};for(var exported in exports.StringStream=StringStream,exports.countColumn=countColumn,modeMethods)exports[exported]=modeMethods[exported];require.cache[require.resolve("../../lib/codemirror")]=require.cache[require.resolve("./runmode.node")],require.cache[require.resolve("../../addon/runmode/runmode")]=require.cache[require.resolve("./runmode.node")],exports.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),exports.defineMIME("text/plain","null"),exports.registerHelper=exports.registerGlobalHelper=Math.min,exports.splitLines=function(t){return t.split(/\r?\n|\r/)},exports.defaults={indentUnit:2},function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){t.runMode=function(e,n,r,o){var i=t.getMode(t.defaults,n),s=o&&o.tabSize||t.defaults.tabSize;if(r.appendChild){var a=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<9),u=r,p=0;u.innerHTML="",r=function(t,e){if("\n"==t)return u.appendChild(document.createTextNode(a?"\r":t)),void(p=0);for(var n="",r=0;;){var o=t.indexOf("\t",r);if(-1==o){n+=t.slice(r),p+=t.length-r;break}p+=o-r,n+=t.slice(r,o);var i=s-p%s;p+=i;for(var l=0;la?e.charCoords(t,"local")[i?"top":"bottom"]:e.heightAtLine(h,"local")+(i?0:h.height)}var d=e.lastLine();if(e.display.barWidth)for(var c,p=0;pd)){for(var f=c||l(u.from,!0)*i,m=l(u.to,!1)*i;pd)&&!((c=l(o[p+1].from,!0)*i)>m+.9);)m=l((u=o[++p]).to,!1)*i;if(m!=f){var g=Math.max(m-f,3),H=n.appendChild(document.createElement("div"));H.style.cssText="position: absolute; right: 0px; width: "+Math.max(e.display.barWidth-1,2)+"px; top: "+(f+this.buttonHeight)+"px; height: "+g+"px",H.className=this.options.className,u.id&&H.setAttribute("annotation-id",u.id)}}}this.div.textContent="",this.div.appendChild(n)},e.prototype.clear=function(){this.cm.off("refresh",this.resizeHandler),this.cm.off("markerAdded",this.resizeHandler),this.cm.off("markerCleared",this.resizeHandler),this.changeHandler&&this.cm.off("changes",this.changeHandler),this.div.parentNode.removeChild(this.div)}})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/scroll/scrollpastend.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/scroll/scrollpastend.js deleted file mode 100644 index 6b9a6d010..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/scroll/scrollpastend.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function n(n,i){e.changeEnd(i).line==n.lastLine()&&t(n)}function t(e){var n="";e.lineCount()>1&&(n=e.display.scroller.clientHeight-30-e.getLineHandle(e.lastLine()).height+"px"),e.state.scrollPastEndPadding!=n&&(e.state.scrollPastEndPadding=n,e.display.lineSpace.parentNode.style.paddingBottom=n,e.off("refresh",t),e.setSize(),e.on("refresh",t))}e.defineOption("scrollPastEnd",!1,(function(i,o,d){d&&d!=e.Init&&(i.off("change",n),i.off("refresh",t),i.display.lineSpace.parentNode.style.paddingBottom="",i.state.scrollPastEndPadding=null),o&&(i.on("change",n),i.on("refresh",t),t(i))}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/scroll/simplescrollbars.css b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/scroll/simplescrollbars.css deleted file mode 100644 index 5eea7aa1b..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/scroll/simplescrollbars.css +++ /dev/null @@ -1,66 +0,0 @@ -.CodeMirror-simplescroll-horizontal div, .CodeMirror-simplescroll-vertical div { - position: absolute; - background: #ccc; - -moz-box-sizing: border-box; - box-sizing: border-box; - border: 1px solid #bbb; - border-radius: 2px; -} - -.CodeMirror-simplescroll-horizontal, .CodeMirror-simplescroll-vertical { - position: absolute; - z-index: 6; - background: #eee; -} - -.CodeMirror-simplescroll-horizontal { - bottom: 0; left: 0; - height: 8px; -} -.CodeMirror-simplescroll-horizontal div { - bottom: 0; - height: 100%; -} - -.CodeMirror-simplescroll-vertical { - right: 0; top: 0; - width: 8px; -} -.CodeMirror-simplescroll-vertical div { - right: 0; - width: 100%; -} - - -.CodeMirror-overlayscroll .CodeMirror-scrollbar-filler, .CodeMirror-overlayscroll .CodeMirror-gutter-filler { - display: none; -} - -.CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div { - position: absolute; - background: #bcd; - border-radius: 3px; -} - -.CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical { - position: absolute; - z-index: 6; -} - -.CodeMirror-overlayscroll-horizontal { - bottom: 0; left: 0; - height: 6px; -} -.CodeMirror-overlayscroll-horizontal div { - bottom: 0; - height: 100%; -} - -.CodeMirror-overlayscroll-vertical { - right: 0; top: 0; - width: 6px; -} -.CodeMirror-overlayscroll-vertical div { - right: 0; - width: 100%; -} diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/scroll/simplescrollbars.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/scroll/simplescrollbars.js deleted file mode 100644 index a723c8515..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/scroll/simplescrollbars.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";function e(e,o,i){this.orientation=o,this.scroll=i,this.screen=this.total=this.size=1,this.pos=0,this.node=document.createElement("div"),this.node.className=e+"-"+o,this.inner=this.node.appendChild(document.createElement("div"));var n=this;function s(e){var o=t.wheelEventPixels(e)["horizontal"==n.orientation?"x":"y"],i=n.pos;n.moveTo(n.pos+o),n.pos!=i&&t.e_preventDefault(e)}t.on(this.inner,"mousedown",(function(e){if(1==e.which){t.e_preventDefault(e);var o="horizontal"==n.orientation?"pageX":"pageY",i=e[o],s=n.pos;t.on(document,"mousemove",h),t.on(document,"mouseup",r)}function r(){t.off(document,"mousemove",h),t.off(document,"mouseup",r)}function h(t){if(1!=t.which)return r();n.moveTo(s+(t[o]-i)*(n.total/n.size))}})),t.on(this.node,"click",(function(e){t.e_preventDefault(e);var o,i=n.inner.getBoundingClientRect();o="horizontal"==n.orientation?e.clientXi.right?1:0:e.clientYi.bottom?1:0,n.moveTo(n.pos+o*n.screen)})),t.on(this.node,"mousewheel",s),t.on(this.node,"DOMMouseScroll",s)}function o(t,o,i){this.addClass=t,this.horiz=new e(t,"horizontal",i),o(this.horiz.node),this.vert=new e(t,"vertical",i),o(this.vert.node),this.width=null}e.prototype.setPos=function(t,e){return t<0&&(t=0),t>this.total-this.screen&&(t=this.total-this.screen),!(!e&&t==this.pos||(this.pos=t,this.inner.style["horizontal"==this.orientation?"left":"top"]=t*(this.size/this.total)+"px",0))},e.prototype.moveTo=function(t){this.setPos(t)&&this.scroll(t,this.orientation)},e.prototype.update=function(t,e,o){var i=this.screen!=e||this.total!=t||this.size!=o;i&&(this.screen=e,this.total=t,this.size=o);var n=this.screen*(this.size/this.total);n<10&&(this.size-=10-n,n=10),this.inner.style["horizontal"==this.orientation?"width":"height"]=n+"px",this.setPos(this.pos,i)},o.prototype.update=function(t){if(null==this.width){var e=window.getComputedStyle?window.getComputedStyle(this.horiz.node):this.horiz.node.currentStyle;e&&(this.width=parseInt(e.height))}var o=this.width||0,i=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1;return this.vert.node.style.display=n?"block":"none",this.horiz.node.style.display=i?"block":"none",n&&(this.vert.update(t.scrollHeight,t.clientHeight,t.viewHeight-(i?o:0)),this.vert.node.style.bottom=i?o+"px":"0"),i&&(this.horiz.update(t.scrollWidth,t.clientWidth,t.viewWidth-(n?o:0)-t.barLeft),this.horiz.node.style.right=n?o+"px":"0",this.horiz.node.style.left=t.barLeft+"px"),{right:n?o:0,bottom:i?o:0}},o.prototype.setScrollTop=function(t){this.vert.setPos(t)},o.prototype.setScrollLeft=function(t){this.horiz.setPos(t)},o.prototype.clear=function(){var t=this.horiz.node.parentNode;t.removeChild(this.horiz.node),t.removeChild(this.vert.node)},t.scrollbarModel.simple=function(t,e){return new o("CodeMirror-simplescroll",t,e)},t.scrollbarModel.overlay=function(t,e){return new o("CodeMirror-overlayscroll",t,e)}})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/search/jump-to-line.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/search/jump-to-line.js deleted file mode 100644 index 63da702c6..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/search/jump-to-line.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../dialog/dialog"],e):e(CodeMirror)}((function(e){"use strict";function o(e,o){var r=Number(o);return/^[-+]/.test(o)?e.getCursor().line+r:r-1}e.defineOption("search",{bottom:!1}),e.commands.jumpToLine=function(e){var r=e.getCursor();!function(e,o,r,t,i){e.openDialog?e.openDialog(o,i,{value:t,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(r,t))}(e,function(e){return e.phrase("Jump to line:")+' '+e.phrase("(Use line:column or scroll% syntax)")+""}(e),e.phrase("Jump to line:"),r.line+1+":"+r.ch,(function(t){var i;if(t)if(i=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(t))e.setCursor(o(e,i[1]),Number(i[2]));else if(i=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(t)){var n=Math.round(e.lineCount()*Number(i[1])/100);/^[-+]/.test(i[1])&&(n=r.line+n+1),e.setCursor(n-1,r.ch)}else(i=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(t))&&e.setCursor(o(e,i[1]),r.ch)}))},e.keyMap.default["Alt-G"]="jumpToLine"})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/search/match-highlighter.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/search/match-highlighter.js deleted file mode 100644 index 0f34d6cb9..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/search/match-highlighter.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("./matchesonscrollbar")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./matchesonscrollbar"],t):t(CodeMirror)}((function(t){"use strict";var e={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};function o(t){for(var o in this.options={},e)this.options[o]=(t&&t.hasOwnProperty(o)?t:e)[o];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}function n(t){var e=t.state.matchHighlighter;(e.active||t.hasFocus())&&r(t,e)}function i(t){var e=t.state.matchHighlighter;e.active||(e.active=!0,r(t,e))}function r(t,e){clearTimeout(e.timeout),e.timeout=setTimeout((function(){c(t)}),e.options.delay)}function a(t,e,o,n){var i=t.state.matchHighlighter;if(t.addOverlay(i.overlay=function(t,e,o){return{token:function(n){if(n.match(t)&&(!e||function(t,e){return!(t.start&&e.test(t.string.charAt(t.start-1))||t.pos!=t.string.length&&e.test(t.string.charAt(t.pos)))}(n,e)))return o;n.next(),n.skipTo(t.charAt(0))||n.skipToEnd()}}}(e,o,n)),i.options.annotateScrollbar&&t.showMatchesOnScrollbar){var r=o?new RegExp((/\w/.test(e.charAt(0))?"\\b":"")+e.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+(/\w/.test(e.charAt(e.length-1))?"\\b":"")):e;i.matchesonscroll=t.showMatchesOnScrollbar(r,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function s(t){var e=t.state.matchHighlighter;e.overlay&&(t.removeOverlay(e.overlay),e.overlay=null,e.matchesonscroll&&(e.matchesonscroll.clear(),e.matchesonscroll=null))}function c(t){t.operation((function(){var e=t.state.matchHighlighter;if(s(t),t.somethingSelected()||!e.options.showToken){var o=t.getCursor("from"),n=t.getCursor("to");if(o.line==n.line&&(!e.options.wordsOnly||function(t,e,o){if(null!==t.getRange(e,o).match(/^\w+$/)){if(e.ch>0){var n={line:e.line,ch:e.ch-1};if(null===t.getRange(n,e).match(/\W/))return!1}return!(o.ch=e.options.minChars&&a(t,i,!1,e.options.style)}}else{for(var r=!0===e.options.showToken?/[\w$]/:e.options.showToken,c=t.getCursor(),l=t.getLine(c.line),h=c.ch,u=h;h&&r.test(l.charAt(h-1));)--h;for(;u=this.gap.to);e++)a.to.line>=this.gap.from&&this.matches.splice(e--,1);for(var i=this.cm.getSearchCursor(this.query,t.Pos(this.gap.from,0),{caseFold:this.caseFold,multiline:this.options.multiline}),o=this.options&&this.options.maxMatches||1e3;i.findNext();){var a;if((a={from:i.from(),to:i.to()}).from.line>=this.gap.to)break;if(this.matches.splice(e++,0,a),this.matches.length>o)break}this.gap=null}},e.prototype.onChange=function(e){var o=e.from.line,a=t.changeEnd(e).line,n=a-e.to.line;if(this.gap?(this.gap.from=Math.min(i(this.gap.from,o,n),e.from.line),this.gap.to=Math.max(i(this.gap.to,o,n),e.from.line)):this.gap={from:e.from.line,to:a+1},n)for(var s=0;sr.cursorCoords(o,"window").top&&((p=n).style.opacity=.4)})))};!function(e,r,o,n,t){e.openDialog(r,n,{value:o,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){f(e)},onKeyDown:t,bottom:e.options.search.bottom})}(r,d(r),l,m,(function(n,t){var a=e.keyName(n),i=r.getOption("extraKeys"),s=i&&i[a]||e.keyMap[r.getOption("keyMap")][a];"findNext"==s||"findPrev"==s||"findPersistentNext"==s||"findPersistentPrev"==s?(e.e_stop(n),c(r,o(r),t),r.execCommand(s)):"find"!=s&&"findPersistent"!=s||(e.e_stop(n),m(t,n))})),i&&l&&(c(r,s,l),u(r,n))}else a(r,d(r),"Search for:",l,(function(e){e&&!s.query&&r.operation((function(){c(r,s,e),s.posFrom=s.posTo=r.getCursor(),u(r,n)}))}))}function u(r,n,a){r.operation((function(){var i=o(r),s=t(r,i.query,n?i.posFrom:i.posTo);(s.find(n)||(s=t(r,i.query,n?e.Pos(r.lastLine()):e.Pos(r.firstLine(),0))).find(n))&&(r.setSelection(s.from(),s.to()),r.scrollIntoView({from:s.from(),to:s.to()},20),i.posFrom=s.from(),i.posTo=s.to(),a&&a(s.from(),s.to()))}))}function f(e){e.operation((function(){var r=o(e);r.lastQuery=r.query,r.query&&(r.query=r.queryText=null,e.removeOverlay(r.overlay),r.annotate&&(r.annotate.clear(),r.annotate=null))}))}function p(e,r){var o=e?document.createElement(e):document.createDocumentFragment();for(var n in r)o[n]=r[n];for(var t=2;tf);a++){var u=t.getLine(s++);l=null==l?u:l+"\n"+u}c*=2,e.lastIndex=n.ch;var g=e.exec(l);if(g){var m=l.slice(0,g.index).split("\n"),v=g[0].split("\n"),d=n.line+m.length-1,p=m[m.length-1].length;return{from:r(d,p),to:r(d+v.length-1,1==v.length?p+v[0].length:v[v.length-1].length),match:g}}}}function c(t,e,n){for(var r,i=0;i<=t.length;){e.lastIndex=i;var o=e.exec(t);if(!o)break;var h=o.index+o[0].length;if(h>t.length-n)break;(!r||h>r.index+r[0].length)&&(r=o),i=o.index+1}return r}function s(t,e,n){e=i(e,"g");for(var o=n.line,h=n.ch,l=t.firstLine();o>=l;o--,h=-1){var s=t.getLine(o),f=c(s,e,h<0?0:s.length-h);if(f)return{from:r(o,f.index),to:r(o,f.index+f[0].length),match:f}}}function f(t,e,n){if(!o(e))return s(t,e,n);e=i(e,"gm");for(var h,l=1,f=t.getLine(n.line).length-n.ch,a=n.line,u=t.firstLine();a>=u;){for(var g=0;g=u;g++){var m=t.getLine(a--);h=null==h?m:m+"\n"+h}l*=2;var v=c(h,e,f);if(v){var d=h.slice(0,v.index).split("\n"),p=v[0].split("\n"),x=a+d.length,L=d[d.length-1].length;return{from:r(x,L),to:r(x+p.length-1,1==p.length?L+p[0].length:p[p.length-1].length),match:v}}}}function a(t,e,n,r){if(t.length==e.length)return n;for(var i=0,o=n+Math.max(0,t.length-e.length);;){if(i==o)return i;var h=i+o>>1,l=r(t.slice(0,h)).length;if(l==n)return h;l>n?o=h:i=h+1}}function u(t,i,o,h){if(!i.length)return null;var l=h?e:n,c=l(i).split(/\r|\n\r?/);t:for(var s=o.line,f=o.ch,u=t.lastLine()+1-c.length;s<=u;s++,f=0){var g=t.getLine(s).slice(f),m=l(g);if(1==c.length){var v=m.indexOf(c[0]);if(-1==v)continue t;return o=a(g,m,v,l)+f,{from:r(s,a(g,m,v,l)+f),to:r(s,a(g,m,v+c[0].length,l)+f)}}var d=m.length-c[0].length;if(m.slice(d)==c[0]){for(var p=1;p=u;s--,f=-1){var g=t.getLine(s);f>-1&&(g=g.slice(0,f));var m=l(g);if(1==c.length){var v=m.lastIndexOf(c[0]);if(-1==v)continue t;return{from:r(s,a(g,m,v,l)),to:r(s,a(g,m,v+c[0].length,l))}}var d=c[c.length-1];if(m.slice(0,d.length)==d){var p=1;for(o=s-c.length+1;p(this.doc.getLine(n.line)||"").length&&(n.ch=0,n.line++)),0!=t.cmpPos(n,this.doc.clipPos(n))))return this.atOccurrence=!1;var i=this.matches(e,n);if(this.afterEmptyMatch=i&&0==t.cmpPos(i.from,i.to),i)return this.pos=i,this.atOccurrence=!0,this.pos.match||!0;var o=r(e?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(e,n){if(this.atOccurrence){var i=t.splitLines(e);this.doc.replaceRange(i,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+i.length-1,i[i.length-1].length+(1==i.length?this.pos.from.ch:0))}}},t.defineExtension("getSearchCursor",(function(t,e,n){return new m(this.doc,t,e,n)})),t.defineDocExtension("getSearchCursor",(function(t,e,n){return new m(this,t,e,n)})),t.defineExtension("selectMatches",(function(e,n){for(var r=[],i=this.getSearchCursor(e,this.getCursor("from"),n);i.findNext()&&!(t.cmpPos(i.to(),this.getCursor("to"))>0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/selection/active-line.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/selection/active-line.js deleted file mode 100644 index 018364777..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/selection/active-line.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var t="CodeMirror-activeline",n="CodeMirror-activeline-background",i="CodeMirror-activeline-gutter";function r(e){for(var r=0;r1)return f(e);var t=e.getCursor("start"),n=e.getCursor("end"),o=e.state.markedSelection;if(!o.length)return i(e,t,n);var c=o[0].find(),a=o[o.length-1].find();if(!c||!a||n.line-t.line<=8||r(t,a.to)>=0||r(n,c.from)<=0)return f(e);for(;r(t,c.from)>0;)o.shift().clear(),c=o[0].find();for(r(t,c.from)<0&&(c.to.line-t.line<8?(o.shift().clear(),i(e,t,c.to,0)):i(e,t,c.from,0));r(n,a.to)<0;)o.pop().clear(),a=o[o.length-1].find();r(n,a.to)>0&&(n.line-a.from.line<8?(o.pop().clear(),i(e,a.from,n)):i(e,a.to,n))}(e)}))}function n(e){e.state.markedSelection&&e.state.markedSelection.length&&e.operation((function(){l(e)}))}e.defineOption("styleSelectedText",!1,(function(o,r,i){var c=i&&i!=e.Init;r&&!c?(o.state.markedSelection=[],o.state.markedSelectionStyle="string"==typeof r?r:"CodeMirror-selectedtext",f(o),o.on("cursorActivity",t),o.on("change",n)):!r&&c&&(o.off("cursorActivity",t),o.off("change",n),l(o),o.state.markedSelection=o.state.markedSelectionStyle=null)}));var o=e.Pos,r=e.cmpPos;function i(e,t,n,i){if(0!=r(t,n))for(var l=e.state.markedSelection,f=e.state.markedSelectionStyle,c=t.line;;){var a=c==t.line?t:o(c,0),s=c+8,d=s>=n.line,m=d?n:o(s,0),u=e.markText(a,m,{className:f});if(null==i?l.push(u):l.splice(i++,0,u),d)break;c=s}}function l(e){for(var t=e.state.markedSelection,n=0;n=t.mouseX&&l.top<=t.mouseY&&l.bottom>=t.mouseY&&(n=!0)}var s=n?t.value:"";e.display.lineDiv.style.cursor!=s&&(e.display.lineDiv.style.cursor=s)}}(e),e.state.selectionPointer.willUpdate=!1}),50))}e.defineOption("selectionPointer",!1,(function(n,i){var l=n.state.selectionPointer;l&&(e.off(n.getWrapperElement(),"mousemove",l.mousemove),e.off(n.getWrapperElement(),"mouseout",l.mouseout),e.off(window,"scroll",l.windowScroll),n.off("cursorActivity",t),n.off("scroll",t),n.state.selectionPointer=null,n.display.lineDiv.style.cursor=""),i&&(l=n.state.selectionPointer={value:"string"==typeof i?i:"default",mousemove:function(e){!function(e,t){var n=e.state.selectionPointer;(null==t.buttons?t.which:t.buttons)?n.mouseX=n.mouseY=null:(n.mouseX=t.clientX,n.mouseY=t.clientY),o(e)}(n,e)},mouseout:function(e){!function(e,t){if(!e.getWrapperElement().contains(t.relatedTarget)){var n=e.state.selectionPointer;n.mouseX=n.mouseY=null,o(e)}}(n,e)},windowScroll:function(){t(n)},rects:null,mouseX:null,mouseY:null,willUpdate:!1},e.on(n.getWrapperElement(),"mousemove",l.mousemove),e.on(n.getWrapperElement(),"mouseout",l.mouseout),e.on(window,"scroll",l.windowScroll),n.on("cursorActivity",t),n.on("scroll",t))}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/tern/tern.css b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/tern/tern.css deleted file mode 100644 index c4b8a2f77..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/tern/tern.css +++ /dev/null @@ -1,87 +0,0 @@ -.CodeMirror-Tern-completion { - padding-left: 22px; - position: relative; - line-height: 1.5; -} -.CodeMirror-Tern-completion:before { - position: absolute; - left: 2px; - bottom: 2px; - border-radius: 50%; - font-size: 12px; - font-weight: bold; - height: 15px; - width: 15px; - line-height: 16px; - text-align: center; - color: white; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -.CodeMirror-Tern-completion-unknown:before { - content: "?"; - background: #4bb; -} -.CodeMirror-Tern-completion-object:before { - content: "O"; - background: #77c; -} -.CodeMirror-Tern-completion-fn:before { - content: "F"; - background: #7c7; -} -.CodeMirror-Tern-completion-array:before { - content: "A"; - background: #c66; -} -.CodeMirror-Tern-completion-number:before { - content: "1"; - background: #999; -} -.CodeMirror-Tern-completion-string:before { - content: "S"; - background: #999; -} -.CodeMirror-Tern-completion-bool:before { - content: "B"; - background: #999; -} - -.CodeMirror-Tern-completion-guess { - color: #999; -} - -.CodeMirror-Tern-tooltip { - border: 1px solid silver; - border-radius: 3px; - color: #444; - padding: 2px 5px; - font-size: 90%; - font-family: monospace; - background-color: white; - white-space: pre-wrap; - - max-width: 40em; - position: absolute; - z-index: 10; - -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2); - -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2); - box-shadow: 2px 3px 5px rgba(0,0,0,.2); - - transition: opacity 1s; - -moz-transition: opacity 1s; - -webkit-transition: opacity 1s; - -o-transition: opacity 1s; - -ms-transition: opacity 1s; -} - -.CodeMirror-Tern-hint-doc { - max-width: 25em; - margin-top: -3px; -} - -.CodeMirror-Tern-fname { color: black; } -.CodeMirror-Tern-farg { color: #70a; } -.CodeMirror-Tern-farg-current { text-decoration: underline; } -.CodeMirror-Tern-type { color: #07c; } -.CodeMirror-Tern-fhint-guess { opacity: .7; } diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/tern/tern.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/tern/tern.js deleted file mode 100644 index d48518a2f..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/tern/tern.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";t.TernServer=function(r){var a=this;this.options=r||{};var c=this.options.plugins||(this.options.plugins={});c.doc_comment||(c.doc_comment=!0),this.docs=Object.create(null),this.options.useWorker?this.server=new T(this):this.server=new tern.Server({getFile:function(t,e){return o(a,t,e)},async:!0,defs:this.options.defs||[],plugins:c}),this.trackChange=function(t,e){!function(t,e,n){var o=i(t,e),r=t.cachedArgHints;r&&r.doc==e&&p(r.start,n.to)>=0&&(t.cachedArgHints=null);var a=o.changed;null==a&&(o.changed=a={from:n.from.line,to:n.from.line});var c=n.from.line+(n.text.length-1);n.from.line=a.to&&(a.to=c+1),a.from>n.from.line&&(a.from=n.from.line),e.lineCount()>250&&n.to-a.from>100&&setTimeout((function(){o.changed&&o.changed.to-o.changed.from>100&&s(t,o)}),200)}(a,t,e)},this.cachedArgHints=null,this.activeArgHints=null,this.jumpStack=[],this.getHint=function(o,i){return function(o,i,r){o.request(i,{type:"completions",types:!0,docs:!0,urls:!0},(function(s,a){if(s)return x(o,i,s);var c,l,u=[],f="",d=a.start,p=a.end;'["'==i.getRange(e(d.line,d.ch-2),d)&&'"]'!=i.getRange(p,e(p.line,p.ch+2))&&(f='"]');for(var h=0;h=h;--d){for(var m=o.getLine(d),v=0,y=0;;){var C=m.indexOf("\t",y);if(-1==C)break;v+=f-(C+v)%f-1,y=C+1}if(a=s.column-v,"("==m.charAt(a)){g=!0;break}}if(g){var x=e(d,a),b=n.cachedArgHints;if(b&&b.doc==o.getDoc()&&0==p(x,b.start))return c(n,o,u);n.request(o,{type:"type",preferFunction:!0,end:x},(function(t,e){!t&&e.type&&/^fn\(/.test(e.type)&&(n.cachedArgHints={start:x,type:l(e.type),name:e.exprName||e.name||"fn",guess:e.guess,doc:o.getDoc()},c(n,o,u))}))}}}}}(this,n)},jumpToDef:function(t){!function(t,n){function o(o){var r={type:"definition",variable:o||null},s=i(t,n.getDoc());t.server.request(d(t,s,r),(function(o,i){if(o)return x(t,n,o);if(i.file||!i.url){if(i.file){var r,a=t.docs[i.file];if(a&&(r=function(t,n){for(var o=n.context.slice(0,n.contextOffset).split("\n"),i=n.start.line-(o.length-1),r=e(i,(1==o.length?n.start.ch:t.getLine(i).length)-o[0].length),s=t.getLine(i).slice(r.ch),a=i+1;a=0&&p(a,l.end)<=0&&(s=r.length-1))}e.setSelections(r,s)}))}(this,t)},request:function(t,e,n,o){var r=this,s=i(this,t.getDoc()),a=d(this,s,e,o),c=a.query&&this.options.queryOptions&&this.options.queryOptions[a.query.type];if(c)for(var l in c)a.query[l]=c[l];this.server.request(a,(function(t,o){!t&&r.options.responseFilter&&(o=r.options.responseFilter(s,e,a,t,o)),n(t,o)}))},destroy:function(){w(this),this.worker&&(this.worker.terminate(),this.worker=null)}};var e=t.Pos,n="CodeMirror-Tern-";function o(t,e,n){var o=t.docs[e];o?n(b(t,o)):t.options.getFile?t.options.getFile(e,n):n(null)}function i(t,e,n){for(var o in t.docs){var i=t.docs[o];if(i.doc==e)return i}if(!n)for(var r=0;;++r)if(o="[doc"+(r||"")+"]",!t.docs[o]){n=o;break}return t.addDoc(n,e)}function r(e,n){return"string"==typeof n?e.docs[n]:(n instanceof t&&(n=n.getDoc()),n instanceof t.Doc?i(e,n):void 0)}function s(t,e){t.server.request({files:[{type:"full",name:e.name,text:b(t,e)}]},(function(t){t?window.console.error(t):e.changed=null}))}function a(t,e,n,o,i){t.request(e,o,(function(n,o){if(n)return x(t,e,n);if(t.options.typeTip)var r=t.options.typeTip(o);else if(r=h("span",null,h("strong",null,o.type||"not found")),o.doc&&r.appendChild(document.createTextNode(" — "+o.doc)),o.url){r.appendChild(document.createTextNode(" "));var s=r.appendChild(h("a",null,"[docs]"));s.href=o.url,s.target="_blank"}m(e,r,t),i&&i()}),n)}function c(t,e,o){w(t);for(var i=t.cachedArgHints,r=i.type,s=h("span",i.guess?n+"fhint-guess":null,h("span",n+"fname",i.name),"("),a=0;a ":")")),r.rettype&&s.appendChild(h("span",n+"type",r.rettype));var l=e.cursorCoords(null,"page"),u=t.activeArgHints=y(l.right+1,l.bottom,s,e);setTimeout((function(){u.clear=v(e,(function(){t.activeArgHints==u&&w(t)}))}),20)}function l(t){var e=[],n=3;function o(e){for(var o=0,i=n;;){var r=t.charAt(n);if(e.test(r)&&!o)return t.slice(i,n);/[{\[\(]/.test(r)?++o:/[}\]\)]/.test(r)&&--o,++n}}if(")"!=t.charAt(n))for(;;){var i=t.slice(n).match(/^([^, \(\[\{]+): /);if(i&&(n+=i[0].length,i=i[1]),e.push({name:i,type:o(/[\),]/)}),")"==t.charAt(n))break;n+=2}var r=t.slice(n).match(/^\) -> (.*)$/);return{args:e,rettype:r&&r[1]}}function u(t,e,n,o,i){n.doc.setSelection(o,i),e!=n&&t.options.switchToDoc&&(w(t),t.options.switchToDoc(n.name,n.doc))}var f=0;function d(n,o,i,r){var s=[],a=0,c=!i.fullDocs;c||delete i.fullDocs,"string"==typeof i&&(i={type:i}),i.lineCharPositions=!0,null==i.end&&(i.end=r||o.doc.getCursor("end"),o.doc.somethingSelected()&&(i.start=o.doc.getCursor("start")));var l=i.start||i.end;for(var u in o.changed?o.doc.lineCount()>250&&!1!==c&&o.changed.to-o.changed.from<100&&o.changed.from<=l.line&&o.changed.to>i.end.line?(s.push(function(n,o,i){for(var r,s=n.doc,a=null,c=null,l=o.line-1,u=Math.max(0,l-50);l>=u;--l){var f=s.getLine(l);if(!(f.search(/\bfunction\b/)<0)){var d=t.countColumn(f,null,4);null!=a&&a<=d||(a=d,c=l)}}null==c&&(c=u);var p=Math.min(s.lastLine(),i.line+20);if(null==a||a==t.countColumn(s.getLine(o.line),null,4))r=p;else for(r=i.line+1;r",n):n(prompt(e,""))}function m(e,n,o){e.state.ternTooltip&&C(e.state.ternTooltip);var i=e.cursorCoords(),r=e.state.ternTooltip=y(i.right+1,i.bottom,n,e);function s(){var t;e.state.ternTooltip=null,r.parentNode&&((t=r).style.opacity="0",setTimeout((function(){C(t)}),1100)),l()}var a=!1,c=!1;t.on(r,"mousemove",(function(){a=!0})),t.on(r,"mouseout",(function(e){var n=e.relatedTarget||e.toElement;n&&t.contains(r,n)||(c?s():a=!1)})),setTimeout((function(){c=!0,a||s()}),o.options.hintDelay?o.options.hintDelay:1700);var l=v(e,s)}function v(t,e){return t.on("cursorActivity",e),t.on("blur",e),t.on("scroll",e),t.on("setDoc",e),function(){t.off("cursorActivity",e),t.off("blur",e),t.off("scroll",e),t.off("setDoc",e)}}function y(t,e,o,i,r){var s=h("div",n+"tooltip "+(r||""),o);s.style.left=t+"px",s.style.top=e+"px",(((i.options||{}).hintOptions||{}).container||document.body).appendChild(s);var a=i.cursorCoords(),c=window.innerWidth,l=window.innerHeight,u=s.getBoundingClientRect(),f=document.querySelector(".CodeMirror-hints"),d=u.bottom-l,p=u.right-c;if(f&&p>0&&(s.style.left=0,u=s.getBoundingClientRect(),s.style.left=(t=t-f.offsetWidth-u.width)+"px",p=u.right-c),d>0){var g=u.bottom-u.top;a.top-(a.bottom-u.top)-g>0?s.style.top=a.top-g+"px":g>l&&(s.style.height=l-5+"px",s.style.top=a.bottom-u.top+"px")}return p>0&&(u.right-u.left>c&&(s.style.width=c-5+"px",p-=u.right-u.left-c),s.style.left=t-p+"px"),s}function C(t){var e=t&&t.parentNode;e&&e.removeChild(t)}function x(t,e,n){t.options.showError?t.options.showError(e,n):m(e,String(n),t)}function w(t){t.activeArgHints&&(t.activeArgHints.clear&&t.activeArgHints.clear(),C(t.activeArgHints),t.activeArgHints=null)}function b(t,e){var n=e.doc.getValue();return t.options.fileFilter&&(n=t.options.fileFilter(n,e.name,e.doc)),n}function T(t){var e=t.worker=new Worker(t.options.workerScript);e.postMessage({type:"init",defs:t.options.defs,plugins:t.options.plugins,scripts:t.options.workerDeps});var n=0,i={};function r(t,o){o&&(t.id=++n,i[n]=o),e.postMessage(t)}e.onmessage=function(e){var n=e.data;"getFile"==n.type?o(t,n.name,(function(t,e){r({type:"getFile",err:String(t),text:e,id:n.id})})):"debug"==n.type?window.console.log(n.message):n.id&&i[n.id]&&(i[n.id](n.err,n.body),delete i[n.id])},e.onerror=function(t){for(var e in i)i[e](t);i={}},this.addFile=function(t,e){r({type:"add",name:t,text:e})},this.delFile=function(t){r({type:"del",name:t})},this.request=function(t,e){r({type:"req",body:t},e)}}})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/tern/worker.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/tern/worker.js deleted file mode 100644 index 2217a360b..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/tern/worker.js +++ /dev/null @@ -1 +0,0 @@ -var server;this.onmessage=function(e){var t=e.data;switch(t.type){case"init":return startServer(t.defs,t.plugins,t.scripts);case"add":return server.addFile(t.name,t.text);case"del":return server.delFile(t.name);case"req":return server.request(t.body,(function(e,r){postMessage({id:t.id,body:r,err:e&&String(e)})}));case"getFile":var r=pending[t.id];return delete pending[t.id],r(t.err,t.text);default:throw new Error("Unknown message type: "+t.type)}};var nextId=0,pending={};function getFile(e,t){postMessage({type:"getFile",name:e,id:++nextId}),pending[nextId]=t}function startServer(e,t,r){r&&importScripts.apply(null,r),server=new tern.Server({getFile,async:!0,defs:e,plugins:t})}this.console={log:function(e){postMessage({type:"debug",message:e})}}; \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/wrap/hardwrap.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/wrap/hardwrap.js deleted file mode 100644 index 908e71e9d..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/addon/wrap/hardwrap.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";var r=t.Pos;function e(t,r,e){for(var n=e.paragraphStart||t.getHelper(r,"paragraphStart"),o=r.line,a=t.firstLine();o>a;--o){var i=t.getLine(o);if(n&&n.test(i))break;if(!/\S/.test(i)){++o;break}}for(var f=e.paragraphEnd||t.getHelper(r,"paragraphEnd"),l=r.line+1,h=t.lastLine();l<=h;++l){if(i=t.getLine(l),f&&f.test(i)){++l;break}if(!/\S/.test(i))break}return{from:o,to:l}}function n(t,r,e,n,o){for(var a=r;a0&&!e.test(t.slice(a-1,a+1));--a);if(!o&&a<=t.match(/^[ \t]*/)[0].length)for(a=r+1;a=f&&(f=u.length+1);for(var v=0;vf&&u==k&&n(g,f,l,s,h);S&&S.from==b&&S.to==b+x?(g=u+d,++p):c.push({text:[x?" ":""],from:r(p,b),to:r(p+1,k.length)})}for(;g.length>f;){var E=n(g,f,l,s,h);if(!(E.from!=E.to||h&&u!==g.slice(0,E.to)))break;c.push({text:["",u],from:r(p,E.from),to:r(p,E.to)}),g=u+g.slice(E.to),++p}}return c.length&&e.operation((function(){for(var r=0;r=0;i--){var f,l=n[i];if(l.empty()){var h=e(t,l.head,{});f={from:r(h.from,0),to:r(h.to-1)}}else f={from:l.from(),to:l.to()};f.to.line>=a||(a=f.from.line,o(t,f.from,f.to,{}))}}))},t.defineExtension("wrapRange",(function(t,r,e){return o(this,t,r,e||{})})),t.defineExtension("wrapParagraphsInRange",(function(t,n,a){a=a||{};for(var i=this,f=[],l=t.line;l<=n.line;){var h=e(i,r(l,0),a);f.push(h),l=h.to}var s=!1;return f.length&&i.operation((function(){for(var t=f.length-1;t>=0;--t)s=s||o(i,r(f[t].from,0),r(f[t].to-1),a)})),s}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/keymap/vim.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/keymap/vim.js deleted file mode 100644 index 99a9f49ef..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/keymap/vim.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror"),require("../addon/search/searchcursor"),require("../addon/dialog/dialog"),require("../addon/edit/matchbrackets.js")):"function"==typeof define&&define.amd?define(["../lib/codemirror","../addon/search/searchcursor","../addon/dialog/dialog","../addon/edit/matchbrackets"],e):e(CodeMirror)}((function(e){"use strict";var t=e.Pos;function r(e,r){var n=e.state.vim;if(!n||n.insertMode)return r.head;var o=n.sel.head;return o?n.visualBlock&&r.head.line!=o.line?void 0:r.from()!=r.anchor||r.empty()||r.head.line!=o.line||r.head.ch==o.ch?r.head:new t(r.head.line,r.head.ch-1):r.head}var n=[{keys:"",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"g",type:"keyToKey",toKeys:"gk"},{keys:"g",type:"keyToKey",toKeys:"gj"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",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:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"keyToKey",toKeys:"i",context:"normal"},{keys:"",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:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",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:"g$",type:"motion",motion:"moveToEndOfDisplayLine"},{keys:"g^",type:"motion",motion:"moveToStartOfDisplayLine"},{keys:"g0",type:"motion",motion:"moveToStartOfDisplayLine"},{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",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",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:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",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:"",type:"operatorMotion",operator:"delete",motion:"moveToStartOfLine",context:"insert"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",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:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",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",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",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:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',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",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:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",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"}],o=n.length,i=[{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"}];e.Vim=function(){function a(t,r){this==e.keyMap.vim&&(t.options.$customCursor=null,e.rmClass(t.getWrapperElement(),"cm-fat-cursor")),r&&r.attach==s||function(t){t.setOption("disableInput",!1),t.off("cursorActivity",Ge),e.off(t.getInputField(),"paste",h(t)),t.state.vim=null,_e&&clearTimeout(_e)}(t)}function s(t,n){this==e.keyMap.vim&&(t.curOp&&(t.curOp.selectionChanged=!0),t.options.$customCursor=r,e.addClass(t.getWrapperElement(),"cm-fat-cursor")),n&&n.attach==s||function(t){t.setOption("disableInput",!0),t.setOption("showCursorWhenSelecting",!1),e.signal(t,"vim-mode-change",{mode:"normal"}),t.on("cursorActivity",Ge),j(t),e.on(t.getInputField(),"paste",h(t))}(t)}function l(t,r){if(r){if(this[t])return this[t];var n=function(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),r=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==r.length)return!1;for(var n=!1,o=0;o")}(t);if(!n)return!1;var o=H.findKey(r,n);return"function"==typeof o&&e.signal(r,"vim-keypress",n),o}}e.defineOption("vimMode",!1,(function(t,r,n){r&&"vim"!=t.getOption("keyMap")?t.setOption("keyMap","vim"):!r&&n!=e.Init&&/^vim/.test(t.getOption("keyMap"))&&t.setOption("keyMap","default")}));var c={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},u={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function h(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(G(e.getCursor(),0,1)),z.enterInsertMode(e,{},t))}),t.onPasteFn}var p=/[\d]/,f=[e.isWordChar,function(t){return t&&!e.isWordChar(t)&&!/\s/.test(t)}],d=[function(e){return/\S/.test(e)}];function m(e,t){for(var r=[],n=e;n"]),w=[].concat(v,y,k,["-",'"',".",":","_","/"]);try{g=new RegExp("^[\\p{Lu}]$","u")}catch(e){g=/^[A-Z]$/}function x(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function M(e){return/^[a-z]$/.test(e)}function S(e){return g.test(e)}function A(e){return/^\s*$/.test(e)}function b(e){return-1!=".?!".indexOf(e)}function L(e,t){for(var r=0;rr?t=r:t0?1:-1,u=i.getCursor();do{if((s=o[(e+(t+=c))%e])&&(l=s.find())&&!re(u,l))break}while(tn)}return s}return{cachedCursor:void 0,add:function(i,a,s){var l=o[t%e];function c(r){var n=++t%e,a=o[n];a&&a.clear(),o[n]=i.setBookmark(r)}if(l){var u=l.find();u&&!re(u,a)&&c(a)}else c(a);c(s),r=t,(n=t-e+1)<0&&(n=0)},find:function(e,r){var n=t,o=i(e,r);return t=n,o&&o.find()},move:i}},N=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function P(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=N()}function j(e){return e.state.vim||(e.state.vim={inputState:new D,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function _(){for(var e in I={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:K(),macroModeState:new P,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new V({}),searchHistoryController:new $,exCommandHistoryController:new $},T){var t=T[e];t.value=t.defaultValue}}P.prototype={exitMacroRecordMode:function(){var e=I.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var r=I.registerController.getRegister(t);r&&(r.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog(document.createTextNode("(recording)["+t+"]"),null,{bottom:!0})),this.isRecording=!0)}};var H={buildKeyMap:function(){},getRegisterController:function(){return I.registerController},resetVimGlobalState_:_,getVimGlobalState_:function(){return I},maybeInitVimState_:j,suppressErrorLogging:!1,InsertModeKey:Ye,map:function(e,t,r){qe.map(e,t,r)},unmap:function(e,t){return qe.unmap(e,t)},noremap:function(e,t,r){function i(e){return e?[e]:["normal","insert","visual"]}for(var a=i(r),s=n.length,l=s-o;l=0;a--){var s=i[a];if(e!==s.context)if(s.context)this._mapCommand(s);else{var l=["normal","insert","visual"];for(var c in l)if(l[c]!==e){var u={};for(var h in s)u[h]=s[h];u.context=l[c],this._mapCommand(u)}}}},setOption:E,getOption:O,defineOption:R,defineEx:function(e,t,r){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;Je[e]=r,qe.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,r){var n=this.findKey(e,t,r);if("function"==typeof n)return n()},findKey:function(e,t,r){var o,i=j(e);function a(){if(""==t){if(i.visualMode)me(e);else{if(!i.insertMode)return;Qe(e)}return F(e),!0}}return!1===(o=i.insertMode?function(){if(a())return!0;for(var r=i.inputState.keyBuffer=i.inputState.keyBuffer+t,o=1==t.length,s=U.matchCommand(r,n,i.inputState,"insert");r.length>1&&"full"!=s.type;){r=i.inputState.keyBuffer=r.slice(1);var l=U.matchCommand(r,n,i.inputState,"insert");"none"!=l.type&&(s=l)}if("none"==s.type)return F(e),!1;if("partial"==s.type)return B&&window.clearTimeout(B),B=window.setTimeout((function(){i.insertMode&&i.inputState.keyBuffer&&F(e)}),O("insertModeEscKeysTimeout")),!o;if(B&&window.clearTimeout(B),o){for(var c=e.listSelections(),u=0;u|<\w+>|./.exec(r),t=n[0],r=r.substring(n.index+t.length),H.handleKey(e,t,"mapping")}(o.toKeys):U.processCommand(e,i,o)}catch(t){throw e.state.vim=void 0,j(e),H.suppressErrorLogging||console.log(t),t}return!0}))}},handleEx:function(e,t){qe.processCommand(e,t)},defineMotion:function(e,t){J[e]=t},defineAction:function(e,t){z[e]=t},defineOperator:function(e,t){Q[e]=t},mapCommand:function(e,t,r,n,o){var i={keys:e,type:t};for(var a in i[t]=r,i[t+"Args"]=n,o)i[a]=o[a];ze(i)},_mapCommand:ze,defineRegister:function(e,t){var r=I.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");if(r[e])throw Error("Register already defined "+e);r[e]=t,w.push(e)},exitVisualMode:me,exitInsertMode:Qe};function D(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function F(t,r){t.state.vim.inputState=new D,e.signal(t,"vim-command-done",r)}function W(e,t,r){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!r}function V(e){this.registers=e,this.unnamedRegister=e['"']=new W,e["."]=new W,e[":"]=new W,e["/"]=new W}function $(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}D.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},D.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},W.prototype={setText:function(e,t,r){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!r},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(N(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("")}},V.prototype={pushText:function(e,t,r,n,o){if("_"!==e){n&&"\n"!==r.charAt(r.length-1)&&(r+="\n");var i=this.isValidRegister(e)?this.getRegister(e):null;if(i)S(e)?i.pushText(r,n):i.setText(r,n,o),this.unnamedRegister.setText(i.toString(),n);else{switch(t){case"yank":this.registers[0]=new W(r,n,o);break;case"delete":case"change":-1==r.indexOf("\n")?this.registers["-"]=new W(r,n):(this.shiftNumericRegisters_(),this.registers[1]=new W(r,n))}this.unnamedRegister.setText(r,n,o)}}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new W),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&L(e,w)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},$.prototype={nextMatch:function(e,t){var r=this.historyBuffer,n=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var o=this.iterator+n;t?o>=0:o=r.length?(this.iterator=r.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 U={matchCommand:function(e,t,r,n){var o,i=function(e,t,r,n){for(var o,i=[],a=[],s=0;s"==o.keys.slice(-11)){var l=function(e){var t=/^.*(<[^>]+>)$/.exec(e),r=t?t[1]:e.slice(-1);if(r.length>1)switch(r){case"":r="\n";break;case"":r=" ";break;default:r=""}return r}(e);if(!l)return{type:"none"};r.selectedCharacter=l}return{type:"full",command:o}},processCommand:function(e,t,r){switch(t.inputState.repeatOverride=r.repeatOverride,r.type){case"motion":this.processMotion(e,t,r);break;case"operator":this.processOperator(e,t,r);break;case"operatorMotion":this.processOperatorMotion(e,t,r);break;case"action":this.processAction(e,t,r);break;case"search":this.processSearch(e,t,r);break;case"ex":case"keyToEx":this.processEx(e,t,r)}},processMotion:function(e,t,r){t.inputState.motion=r.motion,t.inputState.motionArgs=Z(r.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,r){var n=t.inputState;if(n.operator){if(n.operator==r.operator)return n.motion="expandToLine",n.motionArgs={linewise:!0},void this.evalInput(e,t);F(e)}n.operator=r.operator,n.operatorArgs=Z(r.operatorArgs),r.keys.length>1&&(n.operatorShortcut=r.keys),r.exitVisualBlock&&(t.visualBlock=!1,fe(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,r){var n=t.visualMode,o=Z(r.operatorMotionArgs);o&&n&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,r),n||this.processMotion(e,t,r)},processAction:function(e,t,r){var n=t.inputState,o=n.getRepeat(),i=!!o,a=Z(r.actionArgs)||{};n.selectedCharacter&&(a.selectedCharacter=n.selectedCharacter),r.operator&&this.processOperator(e,t,r),r.motion&&this.processMotion(e,t,r),(r.motion||r.operator)&&this.evalInput(e,t),a.repeat=o||1,a.repeatIsExplicit=i,a.registerName=n.registerName,F(e),t.lastMotion=null,r.isEdit&&this.recordLastEdit(t,n,r),z[r.action](e,a,t)},processSearch:function(t,r,n){if(t.getSearchCursor){var o=n.searchArgs.forward,i=n.searchArgs.wholeWordOnly;Re(t).setReversed(!o);var a=o?"/":"?",s=Re(t).getQuery(),l=t.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":var c=I.macroModeState;c.isPlaying?f(p=c.replaySearchQueries.shift(),!0,!1):Pe(t,{onClose:function(e){t.scrollTo(l.left,l.top),f(e,!0,!0);var r=I.macroModeState;r.isRecording&&function(e,t){if(!e.isPlaying){var r=e.latestRegister,n=I.registerController.getRegister(r);n&&n.pushSearchQuery&&n.pushSearchQuery(t)}}(r,e)},prefix:a,desc:"(JavaScript regexp)",onKeyUp:function(r,n,i){var a,s,c,u=e.keyName(r);"Up"==u||"Down"==u?(a="Up"==u,s=r.target?r.target.selectionEnd:0,i(n=I.searchHistoryController.nextMatch(n,a)||""),s&&r.target&&(r.target.selectionEnd=r.target.selectionStart=Math.min(s,r.target.value.length))):"Left"!=u&&"Right"!=u&&"Ctrl"!=u&&"Alt"!=u&&"Shift"!=u&&I.searchHistoryController.reset();try{c=je(t,n,!0,!0)}catch(r){}c?t.scrollIntoView(De(t,!o,c),30):(Fe(t),t.scrollTo(l.left,l.top))},onKeyDown:function(r,n,o){var i=e.keyName(r);"Esc"==i||"Ctrl-C"==i||"Ctrl-["==i||"Backspace"==i&&""==n?(I.searchHistoryController.pushInput(n),I.searchHistoryController.reset(),je(t,s),Fe(t),t.scrollTo(l.left,l.top),e.e_stop(r),F(t),o(),t.focus()):"Up"==i||"Down"==i?e.e_stop(r):"Ctrl-U"==i&&(e.e_stop(r),o(""))}});break;case"wordUnderCursor":var u=ve(t,!1,0,!1,!0),h=!0;if(u||(u=ve(t,!1,0,!1,!1),h=!1),!u)return;var p=t.getLine(u.start.line).substring(u.start.ch,u.end.ch);p=h&&i?"\\b"+p+"\\b":p.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),I.jumpList.cachedCursor=t.getCursor(),t.setCursor(u.start),f(p,!0,!1)}}function f(e,o,i){I.searchHistoryController.pushInput(e),I.searchHistoryController.reset();try{je(t,e,o,i)}catch(r){return Ne(t,"Invalid regex: "+e),void F(t)}U.processMotion(t,r,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}},processEx:function(t,r,n){function o(e){I.exCommandHistoryController.pushInput(e),I.exCommandHistoryController.reset(),qe.processCommand(t,e)}function i(r,n,o){var i,a,s=e.keyName(r);("Esc"==s||"Ctrl-C"==s||"Ctrl-["==s||"Backspace"==s&&""==n)&&(I.exCommandHistoryController.pushInput(n),I.exCommandHistoryController.reset(),e.e_stop(r),F(t),o(),t.focus()),"Up"==s||"Down"==s?(e.e_stop(r),i="Up"==s,a=r.target?r.target.selectionEnd:0,o(n=I.exCommandHistoryController.nextMatch(n,i)||""),a&&r.target&&(r.target.selectionEnd=r.target.selectionStart=Math.min(a,r.target.value.length))):"Ctrl-U"==s?(e.e_stop(r),o("")):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&I.exCommandHistoryController.reset()}"keyToEx"==n.type?qe.processCommand(t,n.exArgs.input):r.visualMode?Pe(t,{onClose:o,prefix:":",value:"'<,'>",onKeyDown:i,selectValueOnOpen:!1}):Pe(t,{onClose:o,prefix:":",onKeyDown:i})},evalInput:function(e,r){var n,o,i,a=r.inputState,s=a.motion,l=a.motionArgs||{},c=a.operator,u=a.operatorArgs||{},h=a.registerName,p=r.sel,f=te(r.visualMode?X(e,p.head):e.getCursor("head")),d=te(r.visualMode?X(e,p.anchor):e.getCursor("anchor")),m=te(f),g=te(d);if(c&&this.recordLastEdit(r,a),(i=void 0!==a.repeatOverride?a.repeatOverride:a.getRepeat())>0&&l.explicitRepeat?l.repeatIsExplicit=!0:(l.noRepeat||!l.explicitRepeat&&0===i)&&(i=1,l.repeatIsExplicit=!1),a.selectedCharacter&&(l.selectedCharacter=u.selectedCharacter=a.selectedCharacter),l.repeat=i,F(e),s){var v=J[s](e,f,l,r,a);if(r.lastMotion=J[s],!v)return;if(l.toJumplist){var y=I.jumpList,k=y.cachedCursor;k?(ye(e,k,v),delete y.cachedCursor):ye(e,f,v)}v instanceof Array?(o=v[0],n=v[1]):n=v,n||(n=te(f)),r.visualMode?(r.visualBlock&&n.ch===1/0||(n=X(e,n)),o&&(o=X(e,o)),o=o||g,p.anchor=o,p.head=n,fe(e),Ae(e,r,"<",ne(o,n)?o:n),Ae(e,r,">",ne(o,n)?n:o)):c||(n=X(e,n),e.setCursor(n.line,n.ch))}if(c){if(u.lastSel){o=g;var C=u.lastSel,w=Math.abs(C.head.line-C.anchor.line),x=Math.abs(C.head.ch-C.anchor.ch);n=C.visualLine?new t(g.line+w,g.ch):C.visualBlock?new t(g.line+w,g.ch+x):C.head.line==C.anchor.line?new t(g.line,g.ch+x):new t(g.line+w,g.ch),r.visualMode=!0,r.visualLine=C.visualLine,r.visualBlock=C.visualBlock,p=r.sel={anchor:o,head:n},fe(e)}else r.visualMode&&(u.lastSel={anchor:te(p.anchor),head:te(p.head),visualBlock:r.visualBlock,visualLine:r.visualLine});var M,S,b,L,T;if(r.visualMode){if(M=oe(p.head,p.anchor),S=ie(p.head,p.anchor),b=r.visualLine||u.linewise,T=de(e,{anchor:M,head:S},L=r.visualBlock?"block":b?"line":"char"),b){var R=T.ranges;if("block"==L)for(var E=0;E0&&i&&A(i);i=o.pop())r.line--,r.ch=0;i?(r.line--,r.ch=se(e,r.line)):r.ch=0}}(e,M,S),T=de(e,{anchor:M,head:S},L="char",!l.inclusive||b)}e.setSelections(T.ranges,T.primary),r.lastMotion=null,u.repeat=i,u.registerName=h,u.linewise=b;var B=Q[c](e,u,T.ranges,g,n);r.visualMode&&me(e,null!=B),B&&e.setCursor(B)}},recordLastEdit:function(e,t,r){var n=I.macroModeState;n.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=r,n.lastInsertModeChanges.changes=[],n.lastInsertModeChanges.expectCursorActivityForChange=!1,n.lastInsertModeChanges.visualBlock=e.visualBlock?e.sel.head.line-e.sel.anchor.line:0)}},J={moveToTopLine:function(e,r,n){var o=We(e).top+n.repeat-1;return new t(o,ge(e.getLine(o)))},moveToMiddleLine:function(e){var r=We(e),n=Math.floor(.5*(r.top+r.bottom));return new t(n,ge(e.getLine(n)))},moveToBottomLine:function(e,r,n){var o=We(e).bottom-n.repeat+1;return new t(o,ge(e.getLine(o)))},expandToLine:function(e,r,n){return new t(r.line+n.repeat-1,1/0)},findNext:function(e,t,r){var n=Re(e),o=n.getQuery();if(o){var i=!r.forward;return i=n.isReversed()?!i:i,He(e,o),De(e,i,o,r.repeat)}},findAndSelectNextInclusive:function(r,n,o,i,a){var s=Re(r),l=s.getQuery();if(l){var c=!o.forward,u=function(e,r,n,o,i){return void 0===o&&(o=1),e.operation((function(){var a=e.getCursor(),s=e.getSearchCursor(n,a),l=s.find(!r);!i.visualMode&&l&&re(s.from(),a)&&s.find(!r);for(var c=0;cl:h.lineu&&i.line==u?Me(e,r,n,o,!0):(n.toFirstChar&&(a=ge(e.getLine(l)),o.lastHPos=a),o.lastHSPos=e.charCoords(new t(l,a),"div").left,new t(l,a))},moveByDisplayLines:function(e,r,n,o){var i=r;switch(o.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:o.lastHSPos=e.charCoords(i,"div").left}var a=n.repeat;if((l=e.findPosV(i,n.forward?a:-a,"line",o.lastHSPos)).hitSide)if(n.forward)var s={top:e.charCoords(l,"div").top+8,left:o.lastHSPos},l=e.coordsChar(s,"div");else{var c=e.charCoords(new t(e.firstLine(),0),"div");c.left=o.lastHSPos,l=e.coordsChar(c,"div")}return o.lastHPos=l.ch,l},moveByPage:function(e,t,r){var n=t,o=r.repeat;return e.findPosV(n,r.forward?o:-o,"page")},moveByParagraph:function(e,t,r){var n=r.forward?1:-1;return Le(e,t,r.repeat,n)},moveBySentence:function(e,r,n){var o=n.forward?1:-1;return function(e,r,n,o){function i(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!x(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 a(e,t,r,n){var o=""===(c=e.getLine(t)),a={line:c,ln:t,pos:r,dir:n},s={ln:a.ln,pos:a.pos},l=""===a.line;for(i(e,a);null!==a.line;){if(s.ln=a.ln,s.pos=a.pos,""===a.line&&!l)return{ln:a.ln,pos:a.pos};if(o&&""!==a.line&&!A(a.line[a.pos]))return{ln:a.ln,pos:a.pos};!b(a.line[a.pos])||o||a.pos!==a.line.length-1&&!A(a.line[a.pos+1])||(o=!0),i(e,a)}var c=e.getLine(s.ln);s.pos=0;for(var u=c.length-1;u>=0;--u)if(!A(c[u])){s.pos=u;break}return s}function s(e,t,r,n){var o={line:e.getLine(t),ln:t,pos:r,dir:n},a={ln:o.ln,pos:null},s=""===o.line;for(i(e,o);null!==o.line;){if(""===o.line&&!s)return null!==a.pos?a:{ln:o.ln,pos:o.pos};if(b(o.line[o.pos])&&null!==a.pos&&(o.ln!==a.ln||o.pos+1!==a.pos))return a;""===o.line||A(o.line[o.pos])||(s=!1,a={ln:o.ln,pos:o.pos}),i(e,o)}var l=e.getLine(a.ln);a.pos=0;for(var c=0;c0;)l=o<0?s(e,l.ln,l.pos,o):a(e,l.ln,l.pos,o),n--;return new t(l.ln,l.pos)}(e,r,n.repeat,o)},moveByScroll:function(e,t,r,n){var o,i=e.getScrollInfo(),a=r.repeat;a||(a=i.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(r.repeat=a,!(o=J.moveByDisplayLines(e,t,r,n)))return null;var l=e.charCoords(o,"local");return e.scrollTo(null,i.top+l.top-s.top),o},moveByWords:function(e,r,n){return function(e,r,n,o,i,a){var s=te(r),l=[];(o&&!i||!o&&i)&&n++;for(var c=!(o&&i),u=0;u0)h.index=0;else{var m=h.lineText.length;h.index=m>0?m-1:0}h.nextCh=h.lineText.charAt(h.index)}d(h)&&(i.line=c,i.ch=h.index,r--)}return h.nextCh||h.curMoveThrough?new t(c,h.index):i}(e,n.repeat,n.forward,n.selectedCharacter)||r},moveToColumn:function(e,r,n,o){var i=n.repeat;return o.lastHPos=i-1,o.lastHSPos=e.charCoords(r,"div").left,function(e,r){var n=e.getCursor().line;return X(e,new t(n,r-1))}(e,i)},moveToEol:function(e,t,r,n){return Me(e,t,r,n,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,r){var n=r;return new t(n.line,ge(e.getLine(n.line)))},moveToMatchedSymbol:function(e,r){for(var n,o=r,i=o.line,a=o.ch,s=e.getLine(i);a"===a?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(new t(i,a),{bracketRegex:c}).to}return o},moveToStartOfLine:function(e,r){return new t(r.line,0)},moveToLineOrEdgeOfDocument:function(e,r,n){var o=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(o=n.repeat-e.getOption("firstLineNumber")),new t(o,ge(e.getLine(o)))},moveToStartOfDisplayLine:function(e){return e.execCommand("goLineLeft"),e.getCursor()},moveToEndOfDisplayLine:function(e){e.execCommand("goLineRight");var t=e.getCursor();return"before"==t.sticky&&t.ch--,t},textObjectManipulation:function(r,n,o,i){var a=o.selectedCharacter;"b"==a?a="(":"B"==a&&(a="{");var s,l=!o.textObjectInner;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"}[a])s=function(e,r,n,o){var i,a,s=r,l={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[n],c={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[n],u=e.getLine(s.line).charAt(s.ch)===c?1:0;if(i=e.scanForBracket(new t(s.line,s.ch+u),-1,void 0,{bracketRegex:l}),a=e.scanForBracket(new t(s.line,s.ch+u),1,void 0,{bracketRegex:l}),!i||!a)return{start:s,end:s};if(i=i.pos,a=a.pos,i.line==a.line&&i.ch>a.ch||i.line>a.line){var h=i;i=a,a=h}return o?a.ch+=1:i.ch+=1,{start:i,end:a}}(r,n,a,l);else if({"'":!0,'"':!0,"`":!0}[a])s=function(e,r,n,o){var i,a,s,l,c=te(r),u=e.getLine(c.line).split(""),h=u.indexOf(n);if(c.ch-1&&!i;s--)u[s]==n&&(i=s+1);else i=c.ch+1;if(i&&!a)for(s=i,l=u.length;sr.lastLine()&&n.linewise&&!d?r.replaceRange("",f,c):r.replaceRange("",l,c),n.linewise&&(d||(r.setCursor(f),e.commands.newlineAndIndent(r)),l.ch=Number.MAX_VALUE),i=l}I.registerController.pushText(n.registerName,"change",a,n.linewise,o.length>1),z.enterInsertMode(r,{head:i},r.state.vim)},delete:function(e,r,n){var o,i,a=e.state.vim;if(a.visualBlock){i=e.getSelection();var s=q("",n.length);e.replaceSelections(s),o=oe(n[0].head,n[0].anchor)}else{var l=n[0].anchor,c=n[0].head;r.linewise&&c.line!=e.firstLine()&&l.line==e.lastLine()&&l.line==c.line-1&&(l.line==e.firstLine()?l.ch=0:l=new t(l.line-1,se(e,l.line-1))),i=e.getRange(l,c),e.replaceRange("",l,c),o=l,r.linewise&&(o=J.moveToFirstNonWhiteSpaceCharacter(e,l))}return I.registerController.pushText(r.registerName,"delete",i,r.linewise,a.visualBlock),X(e,o)},indent:function(e,t,r){var n=e.state.vim,o=r[0].anchor.line,i=n.visualBlock?r[r.length-1].anchor.line:r[0].head.line,a=n.visualMode?t.repeat:1;t.linewise&&i--;for(var s=o;s<=i;s++)for(var l=0;lc.top?(l.line+=(s-c.top)/o,l.line=Math.ceil(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,s);else{var u=s+e.getScrollInfo().clientHeight;u=a.anchor.line?G(a.head,0,1):new t(a.anchor.line,0)}else if("inplace"==i){if(o.visualMode)return}else"lastEdit"==i&&(s=$e(r)||s);r.setOption("disableInput",!1),n&&n.replace?(r.toggleOverwrite(!0),r.setOption("keyMap","vim-replace"),e.signal(r,"vim-mode-change",{mode:"replace"})):(r.toggleOverwrite(!1),r.setOption("keyMap","vim-insert"),e.signal(r,"vim-mode-change",{mode:"insert"})),I.macroModeState.isPlaying||(r.on("change",Ze),e.on(r.getInputField(),"keydown",et)),o.visualMode&&me(r),he(r,s,l)}},toggleVisualMode:function(r,n,o){var i,a=n.repeat,s=r.getCursor();o.visualMode?o.visualLine^n.linewise||o.visualBlock^n.blockwise?(o.visualLine=!!n.linewise,o.visualBlock=!!n.blockwise,e.signal(r,"vim-mode-change",{mode:"visual",subMode:o.visualLine?"linewise":o.visualBlock?"blockwise":""}),fe(r)):me(r):(o.visualMode=!0,o.visualLine=!!n.linewise,o.visualBlock=!!n.blockwise,i=X(r,new t(s.line,s.ch+a-1)),o.sel={anchor:s,head:i},e.signal(r,"vim-mode-change",{mode:"visual",subMode:o.visualLine?"linewise":o.visualBlock?"blockwise":""}),fe(r),Ae(r,o,"<",oe(s,i)),Ae(r,o,">",ie(s,i)))},reselectLastSelection:function(t,r,n){var o=n.lastSelection;if(n.visualMode&&pe(t,n),o){var i=o.anchorMark.find(),a=o.headMark.find();if(!i||!a)return;n.sel={anchor:i,head:a},n.visualMode=!0,n.visualLine=o.visualLine,n.visualBlock=o.visualBlock,fe(t),Ae(t,n,"<",oe(i,a)),Ae(t,n,">",ie(i,a)),e.signal(t,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,r,n){var o,i;if(n.visualMode){if(o=e.getCursor("anchor"),ne(i=e.getCursor("head"),o)){var a=i;i=o,o=a}i.ch=se(e,i.line)-1}else{var s=Math.max(r.repeat,2);o=e.getCursor(),i=X(e,new t(o.line+s-1,1/0))}for(var l=0,c=o.line;c1&&(f=Array(r.repeat+1).join(f));var d,m,g=i.linewise,v=i.blockwise;if(v){f=f.split("\n"),g&&f.pop();for(var y=0;ye.lastLine()&&e.replaceRange("\n",new t(b,0)),se(e,b)u.length&&(i=u.length),a=new t(l.line,i)}if("\n"==s)o.visualMode||r.replaceRange("",l,a),(e.commands.newlineAndIndentContinueComment||e.commands.newlineAndIndent)(r);else{var h=r.getRange(l,a);if(h=h.replace(/[^\n]/g,s),o.visualBlock){var p=new Array(r.getOption("tabSize")+1).join(" ");h=(h=r.getSelection()).replace(/\t/g,p).replace(/[^\n]/g,s).split("\n"),r.replaceSelections(h)}else r.replaceRange(h,l,a);o.visualMode?(l=ne(c[0].anchor,c[0].head)?c[0].anchor:c[0].head,r.setCursor(l),me(r,!1)):r.setCursor(G(a,0,-1))}},incrementNumberToken:function(e,r){for(var n,o,i,a,s=e.getCursor(),l=e.getLine(s.line),c=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(n=c.exec(l))&&(i=(o=n.index)+n[0].length,!(s.ch"==t.slice(-11)){var r=t.length-11,n=e.slice(0,r),o=t.slice(0,r);return n==o&&e.length>r?"full":0==o.indexOf(n)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function ee(e,t,r){return function(){for(var n=0;n2&&(t=oe.apply(void 0,Array.prototype.slice.call(arguments,1))),ne(e,t)?e:t}function ie(e,t){return arguments.length>2&&(t=ie.apply(void 0,Array.prototype.slice.call(arguments,1))),ne(e,t)?t:e}function ae(e,t,r){var n=ne(e,t),o=ne(t,r);return n&&o}function se(e,t){return e.getLine(t).length}function le(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function ce(e,r,n){var o=se(e,r),i=new Array(n-o+1).join(" ");e.setCursor(new t(r,o)),e.replaceRange(i,e.getCursor())}function ue(e,r){var n=[],o=e.listSelections(),i=te(e.clipPos(r)),a=!re(r,i),s=function(e,t,r){for(var n=0;ns?c:0,h=o[u].anchor,p=Math.min(h.line,i.line),f=Math.max(h.line,i.line),d=h.ch,m=i.ch,g=o[u].head.ch-d,v=m-d;g>0&&v<=0?(d++,a||m--):g<0&&v>=0?(d--,l||m++):g<0&&-1==v&&(d--,m++);for(var y=p;y<=f;y++){var k={anchor:new t(y,d),head:new t(y,m)};n.push(k)}return e.setSelections(n),r.ch=m,h.ch=d,h}function he(e,t,r){for(var n=[],o=0;oc&&(i.line=c),i.ch=se(e,i.line)}return{ranges:[{anchor:a,head:i}],primary:0}}if("block"==n){var u=Math.min(a.line,i.line),h=a.ch,p=Math.max(a.line,i.line),f=i.ch;h=s.length)return null;o?c=d[0]:(c=f[0])(s.charAt(l))||(c=f[1]);for(var u=l,h=l;c(s.charAt(u))&&u=0;)h--;if(h++,r){for(var p=u;/\s/.test(s.charAt(u))&&u0;)h--;h||(h=m)}}return{start:new t(a.line,h),end:new t(a.line,u)}}function ye(e,t,r){re(t,r)||I.jumpList.add(e,t,r)}function ke(e,t){I.lastCharacterSearch.increment=e,I.lastCharacterSearch.forward=t.forward,I.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var Ce={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},we={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 xe(e,t,r,n,o){var i=t.line,a=t.ch,s=e.getLine(i),l=r?1:-1,c=n?d:f;if(o&&""==s){if(i+=l,s=e.getLine(i),!x(e,i))return null;a=r?0:s.length}for(;;){if(o&&""==s)return{from:0,to:0,line:i};for(var u=l>0?s.length:-1,h=u,p=u;a!=u;){for(var m=!1,g=0;g0?0:s.length}}function Me(e,r,n,o,i){var a=new t(r.line+n.repeat-1,1/0),s=e.clipPos(a);return s.ch--,i||(o.lastHPos=1/0,o.lastHSPos=e.charCoords(s,"div").left),a}function Se(e,r,n,o){for(var i,a=e.getCursor(),s=a.ch,l=0;l0;)p(u,o)&&n--,u+=o;return new t(u,0)}var f=e.state.vim;if(f.visualLine&&p(s,1,!0)){var d=f.sel.anchor;p(d.line,-1,!0)&&(i&&d.line==s||(s+=1))}var m=h(s);for(u=s;u<=c&&n;u++)p(u,1,!0)&&(i&&h(u)==m||n--);for(a=new t(u,0),u>c&&!m?m=!0:i=!1,u=s;u>l&&(i&&h(u)!=m&&u!=s||!p(u,-1,!0));u--);return{start:new t(u,0),end:a}}function Te(){}function Re(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new Te)}function Ee(e,t){var r=Oe(e,t)||[];if(!r.length)return[];var n=[];if(0===r[0]){for(var o=0;o@~])/);return r.commandName=n?n[1]:t.match(/.*/)[0],r},parseLineSpec_:function(e,t){var r=t.match(/^(\d+)/);if(r)return parseInt(r[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var n=t.next(),o=Ve(e,e.state.vim,n);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 r=e.match(/^([+-])?(\d+)/);if(r){var n=parseInt(r[2],10);"-"==r[1]?t-=n:t+=n}return t},parseCommandArgs_:function(e,t,r){if(!e.eol()){t.argString=e.match(/.*/)[0];var n=r.argDelimiter||/\s+/,o=le(t.argString).split(n);o.length&&o[0]&&(t.args=o)}},matchCommand_:function(e){for(var t=e.length;t>0;t--){var r=e.substring(0,t);if(this.commandMap_[r]){var n=this.commandMap_[r];if(0===n.name.indexOf(e))return n}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e1)return"Invalid arguments";s=(c?"decimal":u&&"hex")||h&&"octal"}r[2]&&(l=new RegExp(r[2].substr(1,r[2].length-2),i?"i":""))}}();if(c)Ne(r,c+": "+n.argString);else{var u=n.line||r.firstLine(),h=n.lineEnd||n.line||r.lastLine();if(u!=h){var p=new t(u,0),f=new t(h,se(r,h)),d=r.getRange(p,f).split("\n"),m=l||("decimal"==s?/(-?)([\d]+)/:"hex"==s?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==s?/([0-7]+)/:null),g="decimal"==s?10:"hex"==s?16:"octal"==s?8:null,v=[],y=[];if(s||l)for(var k=0;k=r&&e<=s:e==r);)if(n||a.from().line!=h||p)return t.scrollIntoView(a.from(),30),t.setSelection(a.from(),a.to()),u=a.from(),void(f=!1);var e,r,s,l,c;f=!0}function v(e){if(e&&e(),t.focus(),u){t.setCursor(u);var r=t.state.vim;r.exMode=!1,r.lastHPos=r.lastHSPos=u.ch}c&&c()}if(g(),!f)return r?void Pe(t,{prefix:Ke("span","replace with ",Ke("strong",l)," (y/n/a/q/l)"),onKeyDown:function(r,n,o){switch(e.e_stop(r),e.keyName(r)){case"Y":m(),g();break;case"N":g();break;case"A":var i=c;c=void 0,t.operation(d),c=i;break;case"L":m();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":v(o)}return f&&v(o),!0}}):(d(),void(c&&c()));Ne(t,"No matches for "+s.source)}(r,h,f,m,g,y,d,u,n.callback)}else Ne(r,"No previous substitute regular expression")},redo:e.commands.redo,undo:e.commands.undo,write:function(t){e.commands.save?e.commands.save(t):t.save&&t.save()},nohlsearch:function(e){Fe(e)},yank:function(e){var t=te(e.getCursor()).line,r=e.getLine(t);I.registerController.pushText("0","yank",r,!0,!0)},delmarks:function(t,r){if(r.argString&&le(r.argString))for(var n=t.state.vim,o=new e.StringStream(le(r.argString));!o.eol();){o.eatSpace();var i=o.pos;if(!o.match(/[a-zA-Z]/,!1))return void Ne(t,"Invalid argument: "+r.argString.substring(i));var a=o.next();if(o.match("-",!0)){if(!o.match(/[a-zA-Z]/,!1))return void Ne(t,"Invalid argument: "+r.argString.substring(i));var s=a,l=o.next();if(!(M(s)&&M(l)||S(s)&&S(l)))return void Ne(t,"Invalid argument: "+s+"-");var c=s.charCodeAt(0),u=l.charCodeAt(0);if(c>=u)return void Ne(t,"Invalid argument: "+r.argString.substring(i));for(var h=0;h<=u-c;h++){var p=String.fromCharCode(c+h);delete n.marks[p]}}else delete n.marks[a]}else Ne(t,"Argument required")}},qe=new Ue;function Qe(t){var r=t.state.vim,n=I.macroModeState,o=I.registerController.getRegister("."),i=n.isPlaying,a=n.lastInsertModeChanges;i||(t.off("change",Ze),e.off(t.getInputField(),"keydown",et)),!i&&r.insertModeRepeat>1&&(tt(t,r,r.insertModeRepeat-1,!0),r.lastEditInputState.repeatOverride=r.insertModeRepeat),delete r.insertModeRepeat,r.insertMode=!1,t.setCursor(t.getCursor().line,t.getCursor().ch-1),t.setOption("keyMap","vim"),t.setOption("disableInput",!0),t.toggleOverwrite(!1),o.setText(a.changes.join("")),e.signal(t,"vim-mode-change",{mode:"normal"}),n.isRecording&&function(e){if(!e.isPlaying){var t=e.latestRegister,r=I.registerController.getRegister(t);r&&r.pushInsertModeChanges&&r.pushInsertModeChanges(e.lastInsertModeChanges)}}(n)}function ze(e){n.unshift(e)}function Xe(e,t,r,n){var o=I.registerController.getRegister(n);if(":"==n)return o.keyBuffer[0]&&qe.processCommand(e,o.keyBuffer[0]),void(r.isPlaying=!1);var i=o.keyBuffer,a=0;r.isPlaying=!0,r.replaySearchQueries=o.searchQueries.slice(0);for(var s=0;s|<\w+>|./.exec(u))[0],u=u.substring(l.index+c.length),H.handleKey(e,c,"macro"),t.insertMode){var h=o.insertModeChanges[a++].changes;I.macroModeState.lastInsertModeChanges.changes=h,rt(e,h,1),Qe(e)}r.isPlaying=!1}function Ze(e,t){var r=I.macroModeState,n=r.lastInsertModeChanges;if(!r.isPlaying)for(;t;){if(n.expectCursorActivityForChange=!0,n.ignoreCount>1)n.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var o=e.listSelections().length;o>1&&(n.ignoreCount=o);var i=t.text.join("\n");n.maybeReset&&(n.changes=[],n.maybeReset=!1),i&&(e.state.overwrite&&!/\n/.test(i)?n.changes.push([i]):n.changes.push(i))}t=t.next}}function Ge(t){var r=t.state.vim;if(r.insertMode){var n=I.macroModeState;if(n.isPlaying)return;var o=n.lastInsertModeChanges;o.expectCursorActivityForChange?o.expectCursorActivityForChange=!1:o.maybeReset=!0}else t.curOp.isVimOp||function(t,r){var n=t.getCursor("anchor"),o=t.getCursor("head");if(r.visualMode&&!t.somethingSelected()?me(t,!1):r.visualMode||r.insertMode||!t.somethingSelected()||(r.visualMode=!0,r.visualLine=!1,e.signal(t,"vim-mode-change",{mode:"visual"})),r.visualMode){var i=ne(o,n)?0:-1,a=ne(o,n)?-1:0;o=G(o,0,i),n=G(n,0,a),r.sel={anchor:n,head:o},Ae(t,r,"<",oe(o,n)),Ae(t,r,">",ie(o,n))}else r.insertMode||(r.lastHPos=t.getCursor().ch)}(t,r)}function Ye(e){this.keyName=e}function et(t){var r=I.macroModeState.lastInsertModeChanges,n=e.keyName(t);n&&(-1==n.indexOf("Delete")&&-1==n.indexOf("Backspace")||e.lookupKey(n,"vim-insert",(function(){return r.maybeReset&&(r.changes=[],r.maybeReset=!1),r.changes.push(new Ye(n)),!0})))}function tt(e,t,r,n){var o=I.macroModeState;o.isPlaying=!0;var i=!!t.lastEditActionCommand,a=t.inputState;function s(){i?U.processAction(e,t,t.lastEditActionCommand):U.evalInput(e,t)}function l(r){if(o.lastInsertModeChanges.changes.length>0){r=t.lastEditActionCommand?r:1;var n=o.lastInsertModeChanges;rt(e,n.changes,r)}}if(t.inputState=t.lastEditInputState,i&&t.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c span::selection, -.cm-fat-cursor .CodeMirror-line > span > span::selection { background: transparent; } -.cm-fat-cursor .CodeMirror-line::-moz-selection, -.cm-fat-cursor .CodeMirror-line > span::-moz-selection, -.cm-fat-cursor .CodeMirror-line > span > span::-moz-selection { background: transparent; } -.cm-fat-cursor { caret-color: transparent; } -@-moz-keyframes blink { - 0% {} - 50% { background-color: transparent; } - 100% {} -} -@-webkit-keyframes blink { - 0% {} - 50% { background-color: transparent; } - 100% {} -} -@keyframes blink { - 0% {} - 50% { background-color: transparent; } - 100% {} -} - -/* Can style cursor different in overwrite (non-insert) mode */ -.CodeMirror-overwrite .CodeMirror-cursor {} - -.cm-tab { display: inline-block; text-decoration: inherit; } - -.CodeMirror-rulers { - position: absolute; - left: 0; right: 0; top: -50px; bottom: 0; - overflow: hidden; -} -.CodeMirror-ruler { - border-left: 1px solid #ccc; - top: 0; bottom: 0; - position: absolute; -} - -/* DEFAULT THEME */ - -.cm-s-default .cm-header {color: blue;} -.cm-s-default .cm-quote {color: #090;} -.cm-negative {color: #d44;} -.cm-positive {color: #292;} -.cm-header, .cm-strong {font-weight: bold;} -.cm-em {font-style: italic;} -.cm-link {text-decoration: underline;} -.cm-strikethrough {text-decoration: line-through;} - -.cm-s-default .cm-keyword {color: #708;} -.cm-s-default .cm-atom {color: #219;} -.cm-s-default .cm-number {color: #164;} -.cm-s-default .cm-def {color: #00f;} -.cm-s-default .cm-variable, -.cm-s-default .cm-punctuation, -.cm-s-default .cm-property, -.cm-s-default .cm-operator {} -.cm-s-default .cm-variable-2 {color: #05a;} -.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;} -.cm-s-default .cm-comment {color: #a50;} -.cm-s-default .cm-string {color: #a11;} -.cm-s-default .cm-string-2 {color: #f50;} -.cm-s-default .cm-meta {color: #555;} -.cm-s-default .cm-qualifier {color: #555;} -.cm-s-default .cm-builtin {color: #30a;} -.cm-s-default .cm-bracket {color: #997;} -.cm-s-default .cm-tag {color: #170;} -.cm-s-default .cm-attribute {color: #00c;} -.cm-s-default .cm-hr {color: #999;} -.cm-s-default .cm-link {color: #00c;} - -.cm-s-default .cm-error {color: #f00;} -.cm-invalidchar {color: #f00;} - -.CodeMirror-composing { border-bottom: 2px solid; } - -/* Default styles for common addons */ - -div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;} -div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;} -.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } -.CodeMirror-activeline-background {background: #e8f2ff;} - -/* STOP */ - -/* The rest of this file contains styles related to the mechanics of - the editor. You probably shouldn't touch them. */ - -.CodeMirror { - position: relative; - overflow: hidden; - background: white; -} - -.CodeMirror-scroll { - overflow: scroll !important; /* Things will break if this is overridden */ - /* 50px is the magic margin used to hide the element's real scrollbars */ - /* See overflow: hidden in .CodeMirror */ - margin-bottom: -50px; margin-right: -50px; - padding-bottom: 50px; - height: 100%; - outline: none; /* Prevent dragging from highlighting the element */ - position: relative; - z-index: 0; -} -.CodeMirror-sizer { - position: relative; - border-right: 50px solid transparent; -} - -/* The fake, visible scrollbars. Used to force redraw during scrolling - before actual scrolling happens, thus preventing shaking and - flickering artifacts. */ -.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { - position: absolute; - z-index: 6; - display: none; - outline: none; -} -.CodeMirror-vscrollbar { - right: 0; top: 0; - overflow-x: hidden; - overflow-y: scroll; -} -.CodeMirror-hscrollbar { - bottom: 0; left: 0; - overflow-y: hidden; - overflow-x: scroll; -} -.CodeMirror-scrollbar-filler { - right: 0; bottom: 0; -} -.CodeMirror-gutter-filler { - left: 0; bottom: 0; -} - -.CodeMirror-gutters { - position: absolute; left: 0; top: 0; - min-height: 100%; - z-index: 3; -} -.CodeMirror-gutter { - white-space: normal; - height: 100%; - display: inline-block; - vertical-align: top; - margin-bottom: -50px; -} -.CodeMirror-gutter-wrapper { - position: absolute; - z-index: 4; - background: none !important; - border: none !important; -} -.CodeMirror-gutter-background { - position: absolute; - top: 0; bottom: 0; - z-index: 4; -} -.CodeMirror-gutter-elt { - position: absolute; - cursor: default; - z-index: 4; -} -.CodeMirror-gutter-wrapper ::selection { background-color: transparent } -.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent } - -.CodeMirror-lines { - cursor: text; - min-height: 1px; /* prevents collapsing before first draw */ -} -.CodeMirror pre.CodeMirror-line, -.CodeMirror pre.CodeMirror-line-like { - /* Reset some styles that the rest of the page might have set */ - -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; - border-width: 0; - background: transparent; - font-family: inherit; - font-size: inherit; - margin: 0; - white-space: pre; - word-wrap: normal; - line-height: inherit; - color: inherit; - z-index: 2; - position: relative; - overflow: visible; - -webkit-tap-highlight-color: transparent; - -webkit-font-variant-ligatures: contextual; - font-variant-ligatures: contextual; -} -.CodeMirror-wrap pre.CodeMirror-line, -.CodeMirror-wrap pre.CodeMirror-line-like { - word-wrap: break-word; - white-space: pre-wrap; - word-break: normal; -} - -.CodeMirror-linebackground { - position: absolute; - left: 0; right: 0; top: 0; bottom: 0; - z-index: 0; -} - -.CodeMirror-linewidget { - position: relative; - z-index: 2; - padding: 0.1px; /* Force widget margins to stay inside of the container */ -} - -.CodeMirror-widget {} - -.CodeMirror-rtl pre { direction: rtl; } - -.CodeMirror-code { - outline: none; -} - -/* Force content-box sizing for the elements where we expect it */ -.CodeMirror-scroll, -.CodeMirror-sizer, -.CodeMirror-gutter, -.CodeMirror-gutters, -.CodeMirror-linenumber { - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -.CodeMirror-measure { - position: absolute; - width: 100%; - height: 0; - overflow: hidden; - visibility: hidden; -} - -.CodeMirror-cursor { - position: absolute; - pointer-events: none; -} -.CodeMirror-measure pre { position: static; } - -div.CodeMirror-cursors { - visibility: hidden; - position: relative; - z-index: 3; -} -div.CodeMirror-dragcursors { - visibility: visible; -} - -.CodeMirror-focused div.CodeMirror-cursors { - visibility: visible; -} - -.CodeMirror-selected { background: #d9d9d9; } -.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } -.CodeMirror-crosshair { cursor: crosshair; } -.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } -.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } - -.cm-searching { - background-color: #ffa; - background-color: rgba(255, 255, 0, .4); -} - -/* Used to force a border model for a node */ -.cm-force-border { padding-right: .1px; } - -@media print { - /* Hide the cursor when printing */ - .CodeMirror div.CodeMirror-cursors { - visibility: hidden; - } -} - -/* See issue #2901 */ -.cm-tab-wrap-hack:after { content: ''; } - -/* Help users use markselection to safely style text background */ -span.CodeMirror-selectedtext { background: none; } diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/lib/codemirror.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/lib/codemirror.js deleted file mode 100644 index ea498131d..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/lib/codemirror.js +++ /dev/null @@ -1 +0,0 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).CodeMirror=t()}(this,(function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,s=l&&(n?document.documentMode||6:+(o||i)[1]),a=!o&&/WebKit\//.test(e),u=a&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\/(\d+)/.exec(e),h=c&&+c[1],f=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),g=/PhantomJS/.test(e),v=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),m=/Android/.test(e),y=v||m||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),b=v||/Mac/.test(t),w=/\bCrOS\b/.test(e),x=/win/i.test(t),C=f&&e.match(/Version\/(\d*\.\d*)/);C&&(C=Number(C[1])),C&&C>=15&&(f=!1,a=!0);var S=b&&(u||f&&(null==C||C<12.11)),L=r||l&&s>=9;function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var T,M=function(e,t){var r=e.className,n=k(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function O(e,t){return N(e).appendChild(t)}function A(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}v?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(e){}});var B=function(){this.id=null,this.f=null,this.time=0,this.handler=I(this.onTimeout,this)};function G(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Y=[""];function $(e){for(;Y.length<=e;)Y.push(_(Y)+" ");return Y[e]}function _(e){return e[e.length-1]}function q(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}var se=null;function ae(e,t,r){var n;se=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:se=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:se=i)}return null!=n?n:se}var ue=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,r=/[LRr]/,n=/[Lb1n]/,i=/[1n]/;function o(e,t,r){this.level=e,this.from=t,this.to=r}return function(l,s){var a="ltr"==s?"L":"R";if(0==l.length||"ltr"==s&&!e.test(l))return!1;for(var u,c=l.length,h=[],f=0;f-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ge(e,t){var r=de(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function be(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){we(e),xe(e)}function Le(e){return e.target||e.srcElement}function ke(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),b&&e.ctrlKey&&1==t&&(t=3),t}var Te,Me,Ne=function(){if(l&&s<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Oe(e){if(null==Te){var t=A("span","​");O(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var r=Te?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ae(e){if(null!=Me)return Me;var t=O(e,document.createTextNode("AخA")),r=T(t,0,1).getBoundingClientRect(),n=T(t,1,2).getBoundingClientRect();return N(e),!(!r||r.left==r.right)&&(Me=n.right-r.right<3)}var De,We=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},He=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Fe="oncopy"in(De=A("div"))||(De.setAttribute("oncopy","return;"),"function"==typeof De.oncopy),Ee=null,Pe={},Ie={};function ze(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pe[e]=t}function Re(e){if("string"==typeof e&&Ie.hasOwnProperty(e))e=Ie[e];else if(e&&"string"==typeof e.name&&Ie.hasOwnProperty(e.name)){var t=Ie[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Re("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Re("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Be(e,t){t=Re(t);var r=Pe[t.name];if(!r)return Be(e,"text/plain");var n=r(e,t);if(Ge.hasOwnProperty(t.name)){var i=Ge[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Ge={};function Ue(e,t){z(t,Ge.hasOwnProperty(e)?Ge[e]:Ge[e]={})}function Ve(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Ke(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function je(e,t,r){return!e.startState||e.startState(t,r)}var Xe=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Ye(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?tt(r,Ye(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?tt(e.line,t):r<0?tt(e.line,0):e}(t,Ye(e,t.line).text.length)}function ut(e,t){for(var r=[],n=0;n=this.string.length},Xe.prototype.sol=function(){return this.pos==this.lineStart},Xe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Xe.prototype.next=function(){if(this.post},Xe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Xe.prototype.skipToEnd=function(){this.pos=this.string.length},Xe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Xe.prototype.backUp=function(e){this.pos-=e},Xe.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Xe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Xe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Xe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Xe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ht=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function ft(e,t,r,n){var i=[e.state.modeGen],o={};xt(e,t.text,e.doc.mode,r,(function(e,t){return i.push(e,t)}),o,n);for(var l=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],a=1,u=0;r.state=!0,xt(e,t.text,s.mode,r,(function(e,t){for(var r=a;ue&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;re.options.maxHighlightLength&&Ve(e.doc.mode,n.state),o=ft(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function pt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new ht(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=Ye(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof ct?u.lookAhead:0)<=o.modeFrontier))return s;var c=R(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}(e,t,r),l=o>n.first&&Ye(n,o-1).stateAfter,s=l?ht.fromSaved(n,l,o):new ht(n,je(n.mode),o);return n.iter(o,t,(function(r){gt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ht.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ht.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ht.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ht.fromSaved=function(e,t,r){return t instanceof ct?new ht(e,Ve(e.mode,t.state),r,t.lookAhead):new ht(e,Ve(e.mode,t),r)},ht.prototype.save=function(e){var t=!1!==e?Ve(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var yt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function bt(e,t,r,n){var i,o,l=e.doc,s=l.mode,a=Ye(l,(t=at(l,t)).line),u=pt(e,t.line,r),c=new Xe(a.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pose.options.maxHighlightLength?(s=!1,l&>(e,t,n,h.pos),h.pos=t.length,a=null):a=wt(mt(r,h,n.state,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u=t:o.to>t);(n||(n=[])).push(new Lt(l,o.from,s?null:o.to))}}return n}(r,i,l),a=function(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!r||Ht(r,o.marker)<0)&&(r=o.marker)}return r}function zt(e,t,r,n,i){var o=Ye(e,t),l=St&&o.markedSpans;if(l)for(var s=0;s=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?rt(u.to,r)>=0:rt(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?rt(u.from,n)<=0:rt(u.from,n)<0)))return!0}}}function Rt(e){for(var t;t=Et(e);)e=t.find(-1,!0).line;return e}function Bt(e,t){var r=Ye(e,t),n=Rt(r);return r==n?t:Ze(n)}function Gt(e,t){if(t>e.lastLine())return t;var r,n=Ye(e,t);if(!Ut(e,n))return t;for(;r=Pt(n);)n=r.find(1,!0).line;return Ze(n)+1}function Ut(e,t){var r=St&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)}))}var Yt=function(e,t,r){this.text=e,At(this,t),this.height=r?r(this):1};function $t(e){e.parent=null,Ot(e)}Yt.prototype.lineNo=function(){return Ze(this)},be(Yt);var _t={},qt={};function Zt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?qt:_t;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Qt(e,t){var r=D("span",null,null,a?"padding-right: .1px":null),n={pre:D("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;n.pos=0,n.addToken=er,Ae(e.display.measure)&&(l=ce(o,e.doc.direction))&&(n.addToken=tr(n.addToken,l)),n.map=[],nr(o,n,dt(e,o,t!=e.display.externalMeasured&&Ze(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=E(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=E(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Oe(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=E(n.pre.className,n.textClass||"")),n}function Jt(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function er(e,t,r,n,i,o,a){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&h.from<=u);f++);if(h.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,h.to-u),i,o,null,s,a),o=null,n=n.slice(h.to-u),u=h.to}}}function rr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=s="",f=null,h=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((f||(f={})).title=C.title),C.attributes)for(var S in C.attributes)(f||(f={}))[S]=C.attributes[S];C.collapsed&&(!h||Ht(h.marker,C)<0)&&(h=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var L=0;L=d)break;for(var T=Math.min(d,m);;){if(v){var M=p+v.length;if(!h){var N=M>T?v.slice(0,T-p):v;t.addToken(t,N,l?l+a:a,c,p+N.length==m?u:"",s,f)}if(M>=T){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=r[g++]),l=Zt(r[g++],t.cm.options)}}else for(var O=1;Or)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Ar(e,t,r,n){return Hr(e,Wr(e,t),r,n)}function Dr(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&t2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),o=function(e,t,r,n){var i,o=Pr(t.map,r,n),a=o.node,u=o.start,c=o.end,h=o.collapse;if(3==a.nodeType){for(var f=0;f<4;f++){for(;u&&ie(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var d;u>0&&(h=n="right"),i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+on(e.display),top:p.top,bottom:p.bottom}:Er}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function zr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=n.text.length?(a=n.text.length,u="before"):a<=0&&(a=0,u="after"),!s)return l("before"==u?a-1:a,"before"==u);function c(e,t,r){return l(r?e-1:e,1==s[t].level!=r)}var h=ae(s,a,u),f=se,d=c(a,h,"before"==u);return null!=f&&(d.other=c(a,f,"before"!=u)),d}function $r(e,t){var r=0;t=at(e.doc,t),e.options.lineWrapping||(r=on(e.display)*t.ch);var n=Ye(e.doc,t.line),i=Kt(n)+Sr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function _r(e,t,r,n,i){var o=tt(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function qr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return _r(n.first,0,null,-1,-1);var i=Qe(n,r),o=n.first+n.size-1;if(i>o)return _r(n.first+n.size-1,Ye(n,o).text.length,null,1,1);t<0&&(t=0);for(var l=Ye(n,i);;){var s=en(e,l,i,t,r),a=It(l,s.ch+(s.xRel>0||s.outside>0?1:0));if(!a)return s;var u=a.find(1);if(u.line==i)return u;l=Ye(n,i=u.line)}}function Zr(e,t,r,n){n-=Vr(t);var i=t.text.length,o=le((function(t){return Hr(e,r,t-1).bottom<=n}),i,0);return{begin:o,end:i=le((function(t){return Hr(e,r,t).top>n}),o,i)}}function Qr(e,t,r,n){return r||(r=Wr(e,t)),Zr(e,t,r,Kr(e,t,Hr(e,r,n),"line").top)}function Jr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function en(e,t,r,n,i){i-=Kt(t);var o=Wr(e,t),l=Vr(t),s=0,a=t.text.length,u=!0,c=ce(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?rn:tn)(e,t,r,o,c,n,i);s=(u=1!=h.level)?h.from:h.to-1,a=u?h.to:h.from-1}var f,d,p=null,g=null,v=le((function(t){var r=Hr(e,o,t);return r.top+=l,r.bottom+=l,!!Jr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)}),s,a),m=!1;if(g){var y=n-g.left=w.bottom?1:0}return _r(r,v=oe(t.text,v,1),d,m,n-f)}function tn(e,t,r,n,i,o,l){var s=le((function(s){var a=i[s],u=1!=a.level;return Jr(Yr(e,tt(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)}),0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=Yr(e,tt(r,u?a.from:a.to,u?"after":"before"),"line",t,n);Jr(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a}function rn(e,t,r,n,i,o,l){var s=Zr(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f=u||d.to<=a)){var p=Hr(e,n,1!=d.level?Math.min(u,d.to)-1:Math.max(a,d.from)).right,g=pg)&&(c=d,h=g)}}return c||(c=i[i.length-1]),c.fromu&&(c={from:c.from,to:u,level:c.level}),c}function nn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Fr){Fr=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Fr.appendChild(document.createTextNode("x")),Fr.appendChild(A("br"));Fr.appendChild(document.createTextNode("x"))}O(e.measure,Fr);var r=Fr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),N(e.measure),r||1}function on(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),r=A("pre",[t],"CodeMirror-line-like");O(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ln(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var s=e.display.gutterSpecs[l].className;r[s]=o.offsetLeft+o.clientLeft+i,n[s]=o.clientWidth}return{fixedPos:sn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function sn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function an(e){var t=nn(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/on(e.display)-3);return function(i){if(Ut(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(a=Ye(e.doc,u.line).text).length==u.ch){var c=R(a,a.length,e.options.tabSize)-a.length;u=tt(u.line,Math.max(0,Math.round((o-kr(e.display).left)/on(e.display))-c))}return u}function hn(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)St&&Bt(e.doc,t)i.viewFrom?pn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)pn(e);else if(t<=i.viewFrom){var o=gn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):pn(e)}else if(r>=i.viewTo){var l=gn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):pn(e)}else{var s=gn(e,t,t,-1),a=gn(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(or(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):pn(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[hn(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==G(l,r)&&l.push(r)}}}function pn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function gn(e,t,r,n){var i,o=hn(e,t),l=e.display.view;if(!St||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;Bt(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function vn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||a.to().line0?l:e.defaultCharWidth())+"px"}if(n.other){var s=r.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function wn(e,t){return e.top-t.top||e.left-t.left}function xn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),l=kr(e.display),s=l.left,a=Math.max(n.sizerWidth,Mr(e)-n.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?a-e:r)+"px;\n height: "+(n-t)+"px"))}function h(t,r,n){var o,l,h=Ye(i,t),f=h.text.length;function d(r,n){return Xr(e,tt(t,r),"div",h,n)}function p(t,r,n){var i=Qr(e,h,null,t),o="ltr"==r==("after"==n)?"left":"right";return d("after"==n?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1),o)[o]}var g=ce(h,i.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(g,r||0,null==n?f:n,(function(e,t,i,h){var v="ltr"==i,m=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==f,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var S=(u?w:b)&&C,L=(u?b:w)&&x?s:(v?m:y).left,k=S?a:(v?y:m).right;c(L,m.top,k-L,m.bottom)}else{var T,M,N,O;v?(T=u&&b&&x?s:m.left,M=u?a:p(e,i,"before"),N=u?s:p(t,i,"after"),O=u&&w&&C?a:y.right):(T=u?p(e,i,"before"):s,M=!u&&b&&x?a:m.right,N=!u&&w&&C?s:y.left,O=u?p(t,i,"after"):a),c(T,m.top,M-T,m.bottom),m.bottom0?t.blinker=setInterval((function(){e.hasFocus()||Tn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Sn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||kn(e))}function Ln(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Tn(e))}),100)}function kn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Cn(e))}function Tn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(e,"blur",e,t),e.state.focused=!1,M(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Mn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,a=0;a.005||g<-.005)&&(ie.display.sizerWidth){var m=Math.ceil(f/on(e.display));m>e.display.maxLineLength&&(e.display.maxLineLength=m,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Nn(e){if(e.widgets)for(var t=0;t=l&&(o=Qe(t,Kt(Ye(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function An(e,t){var r=e.display,n=nn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Nr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Lr(r),a=t.tops-n;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.options.fixedGutter?0:r.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-h,d=Mr(e)-r.gutters.offsetWidth,p=t.right-t.left>d;return p&&(t.right=t.left+d),t.left<10?l.scrollLeft=0:t.leftd+f-3&&(l.scrollLeft=t.right+(p?0:10)-d),l}function Dn(e,t){null!=t&&(Fn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Wn(e){Fn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Hn(e,t,r){null==t&&null==r||Fn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Fn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,En(e,$r(e,t.from),$r(e,t.to),t.margin))}function En(e,t,r,n){var i=An(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Hn(e,i.scrollLeft,i.scrollTop)}function Pn(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||ui(e,{top:t}),In(e,t,!0),r&&ui(e),ii(e,100))}function In(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function zn(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,fi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Rn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Lr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Tr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Bn=function(e,t,r){this.cm=r;var n=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),fe(n,"scroll",(function(){n.clientHeight&&t(n.scrollTop,"vertical")})),fe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,l&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Bn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Bn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Bn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Bn.prototype.zeroWidthHack=function(){var e=b&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new B,this.disableVert=new B},Bn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,(function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)}))},Bn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Gn=function(){};function Un(e,t){t||(t=Rn(e));var r=e.display.barWidth,n=e.display.barHeight;Vn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Mn(e),Vn(e,Rn(e)),r=e.display.barWidth,n=e.display.barHeight}function Vn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}Gn.prototype.update=function(){return{bottom:0,right:0}},Gn.prototype.setScrollLeft=function(){},Gn.prototype.setScrollTop=function(){},Gn.prototype.clear=function(){};var Kn={native:Bn,null:Gn};function jn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&M(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Kn[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,r){"horizontal"==r?zn(e,t):Pn(e,t)}),e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var Xn=0;function Yn(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Xn,markArrays:null},t=e.curOp,lr?lr.ops.push(t):t.ownsGroup=lr={ops:[t],delayedCallbacks:[]}}function $n(e){var t=e.curOp;t&&function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new li(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function qn(e){e.updatedDisplay=e.mustUpdate&&si(e.cm,e.update)}function Zn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Mn(t),e.barMeasure=Rn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ar(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Tr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Mr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function Qn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft1&&(l=!0)),null!=u.scrollLeft&&(zn(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}(t,at(n,e.scrollToPos.from),at(n,e.scrollToPos.to),e.scrollToPos.margin);!function(e,t){if(!ve(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!g){var o=A("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Sr(e.display))+"px;\n height: "+(t.bottom-t.top+Tr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,i)}var o=e.maybeHiddenMarkers,l=e.maybeUnhiddenMarkers;if(o)for(var s=0;s=e.display.viewTo)){var r=+new Date+e.options.workTime,n=pt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?Ve(t.mode,n.state):null,a=ft(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&fr)return ii(e,e.options.workDelay),!0})),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&ei(e,(function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==vn(e))return!1;di(e)&&(pn(e),t.dims=ln(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroml&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),St&&(o=Bt(e.doc,o),l=Gt(e.doc,l));var s=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=or(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=or(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,hn(e,r)))),n.viewTo=r}(e,o,l),r.viewOffset=Kt(Ye(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=vn(e);if(!s&&0==u&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=H();if(!t||!W(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&W(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return u>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function s(t){var r=t.nextSibling;return a&&b&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,h=0;h-1&&(d=!1),cr(e,f,c,r)),d&&(N(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(et(e.options,c)))),l=f.node.nextSibling}else{var p=mr(e,f,c,r);o.insertBefore(p,l)}c+=f.size}for(;l;)l=s(l)}(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=H()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&W(document.body,e.anchorNode)&&W(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(c),N(r.cursorDiv),N(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ii(e,400)),r.updateLineNumbers=null,!0}function ai(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Mr(e))n&&(t.visible=On(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Lr(e.display)-Nr(e),r.top)}),t.visible=On(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!si(e,t))break;Mn(e);var i=Rn(e);mn(e),Un(e,i),hi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ui(e,t){var r=new li(e,t);if(si(e,r)){Mn(e),ai(e,r);var n=Rn(e);mn(e),Un(e,n),hi(e,n),r.finish()}}function ci(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ar(e,"gutterChanged",e)}function hi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Tr(e)+"px"}function fi(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=sn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l=102&&(null==e.display.chromeScrollHack?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout((function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""}),100));var n=wi(t),i=n.x,o=n.y,l=bi;0===t.deltaMode&&(i=t.deltaX,o=t.deltaY,l=1);var s=e.display,u=s.scroller,d=u.scrollWidth>u.clientWidth,p=u.scrollHeight>u.clientHeight;if(i&&d||o&&p){if(o&&b&&a)e:for(var g=t.target,v=s.view;g!=u;g=g.parentNode)for(var m=0;m=0&&rt(e,n.to())<=0)return r}return-1};var Li=function(e,t){this.anchor=e,this.head=t};function ki(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort((function(e,t){return rt(e.from(),t.from())})),r=G(t,i);for(var o=1;o0:a>=0){var u=lt(s.from(),l.from()),c=ot(s.to(),l.to()),h=s.empty()?l.from()==l.head:s.from()==s.head;o<=r&&--r,t.splice(--o,2,new Li(h?c:u,h?u:c))}}return new Si(t,r)}function Ti(e,t){return new Si([new Li(e,t||e)],0)}function Mi(e){return e.text?tt(e.from.line+e.text.length-1,_(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ni(e,t){if(rt(e,t.from)<0)return e;if(rt(e,t.to)<=0)return Mi(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Mi(t).ch-t.to.ch),tt(r,n)}function Oi(e,t){for(var r=[],n=0;n1&&e.remove(s.line+1,p-1),e.insert(s.line+1,m)}ar(e,"change",e,t)}function Ei(e,t,r){!function e(n,i,o){if(n.linked)for(var l=0;ls-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Bi(e.done),_(e.done)):e.done.length&&!_(e.done).ranges?_(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),_(e.done)):void 0}(i,i.lastOp==n)))l=_(o.changes),0==rt(t.from,t.to)&&0==rt(t.from,l.to)?l.to=Mi(t):o.changes.push(Ri(e,t));else{var a=_(i.done);for(a&&a.ranges||Ui(e.sel,i.done),o={changes:[Ri(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||ge(e,"historyAdded")}function Ui(e,t){var r=_(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Vi(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),(function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o}))}function Ki(e){if(!e)return null;for(var t,r=0;r-1&&(_(s)[h]=u[h],delete u[h])}}}return n}function Yi(e,t,r,n){if(n){var i=e.anchor;if(r){var o=rt(t,i)<0;o!=rt(r,i)<0?(i=t,t=r):o!=rt(t,r)<0&&(t=r)}return new Li(i,t)}return new Li(r||t,t)}function $i(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Ji(e,new Si([Yi(e.sel.primary(),t,r,i)],0),n)}function _i(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(ge(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var h=a.find(n<0?1:-1),f=void 0;if((n<0?c:u)&&(h=lo(e,h,-n,h&&h.line==t.line?o:null)),h&&h.line==t.line&&(f=rt(h,r))&&(n<0?f<0:f>0))return io(e,h,t,n,i)}var d=a.find(n<0?-1:1);return(n<0?u:c)&&(d=lo(e,d,n,d.line==t.line?o:null)),d?io(e,d,t,n,i):null}}return t}function oo(e,t,r,n,i){var o=n||1;return io(e,t,r,o,i)||!i&&io(e,t,r,o,!0)||io(e,t,r,-o,i)||!i&&io(e,t,r,-o,!0)||(e.cantEdit=!0,tt(e.first,0))}function lo(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?at(e,tt(t.line-1)):null:r>0&&t.ch==(n||Ye(e,t.line)).text.length?t.line0)){var c=[a,1],h=rt(u.from,s.from),f=rt(u.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)co(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else co(e,t)}}function co(e,t){if(1!=t.text.length||""!=t.text[0]||0!=rt(t.from,t.to)){var r=Oi(e,t);Gi(e,t,r,e.cm?e.cm.curOp.id:NaN),po(e,t,r,Mt(e,t));var n=[];Ei(e,(function(e,r){r||-1!=G(n,e.history)||(yo(e.history,t),n.push(e.history)),po(e,t,null,Mt(e,t))}))}}function ho(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,l=e.sel,s="undo"==t?o.done:o.undone,a="undo"==t?o.undone:o.done,u=0;u=0;--d){var p=f(d);if(p)return p.v}}}}function fo(e,t){if(0!=t&&(e.first+=t,e.sel=new Si(q(e.sel.ranges,(function(e){return new Li(tt(e.anchor.line+t,e.anchor.ch),tt(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){fn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:tt(o,Ye(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=$e(e,t.from,t.to),r||(r=Oi(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=Ze(Rt(Ye(n,o.line))),n.iter(a,l.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),n.sel.contains(t.from,t.to)>-1&&me(e),Fi(n,t,r,an(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,(function(e){var t=jt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=Ye(e,n).stateAfter;if(i&&(!(i instanceof ct)||n+i.lookAhead1||!(this.children[0]instanceof wo))){var s=[];this.collapse(s),this.children=[new wo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,s=l;s10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=D("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(zt(e,t.line,t,r,o)||t.line!=r.line&&zt(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");St=!0}o.addToHistory&&Gi(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,a=t.line,u=e.cm;if(e.iter(a,r.line+1,(function(n){u&&o.collapsed&&!u.options.lineWrapping&&Rt(n)==u.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&qe(n,0),function(e,t,r){var n=r&&window.WeakSet&&(r.markedSpans||(r.markedSpans=new WeakSet));n&&e.markedSpans&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}(n,new Lt(o,a==t.line?t.ch:null,a==r.line?r.ch:null),e.cm&&e.cm.curOp),++a})),o.collapsed&&e.iter(t.line,r.line+1,(function(t){Ut(e,t)&&qe(t,0)})),o.clearOnEnter&&fe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Ct=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Lo,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)fn(u,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=r.line;c++)dn(u,c,"text");o.atomic&&ro(u.doc),ar(u,"markerAdded",u,o)}return o}ko.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Yn(e),ye(this,"clear")){var r=this.find();r&&ar(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&fn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ro(e.doc)),e&&ar(e,"markerCleared",e,this,n,i),t&&$n(e),this.parent&&this.parent.clear()}},ko.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;a--)uo(this,n[a]);s?Qi(this,s):this.cm&&Wn(this.cm)})),undo:ni((function(){ho(this,"undo")})),redo:ni((function(){ho(this,"redo")})),undoSelection:ni((function(){ho(this,"undo",!0)})),redoSelection:ni((function(){ho(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=at(this,e),t=at(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var l=o.markedSpans;if(l)for(var s=0;s=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i})),n},getAllMarks:function(){var e=[];return this.iter((function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r})),at(this,tt(r,t))},indexFromPos:function(e){var t=(e=at(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var h=e.dataTransfer.getData("Text");if(h){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),eo(t.doc,Ti(r,r)),f)for(var d=0;d=0;t--)go(e.doc,"",n[t].from,n[t].to,"+delete");Wn(e)}))}function Zo(e,t,r){var n=oe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Qo(e,t,r){var n=Zo(e,t.ch,r);return null==n?null:new tt(t.line,n,r<0?"after":"before")}function Jo(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ce(r,t.doc.direction);if(o){var l,s=i<0?_(o):o[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Wr(t,r);l=i<0?r.text.length-1:0;var c=Hr(t,u,l).top;l=le((function(e){return Hr(t,u,e).top==c}),i<0==(1==s.level)?s.from:s.to-1,l),"before"==a&&(l=Zo(r,l,1))}else l=i<0?s.to:s.from;return new tt(n,l,a)}}return new tt(n,i<0?r.text.length:0,i<0?"before":"after")}Uo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Uo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Uo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Uo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Uo.default=b?Uo.macDefault:Uo.pcDefault;var el={selectAll:so,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return qo(e,(function(t){if(t.empty()){var r=Ye(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new tt(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),tt(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Ye(e.doc,i.line-1).text;l&&(i=new tt(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),tt(i.line-1,l.length-1),i,"+transpose"))}r.push(new Li(i,i))}e.setSelections(r)}))},newlineAndIndent:function(e){return ei(e,(function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n-1&&(rt((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(rt(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){var i=e.display,o=!1,u=ti(e,(function(t){a&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Ln(e)),pe(i.wrapper.ownerDocument,"mouseup",u),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",h),pe(i.scroller,"drop",u),o||(we(t),n.addNew||$i(e.doc,r,null,null,n.extend),a&&!d||l&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};a&&(i.scroller.draggable=!0),e.state.draggingText=u,u.copy=!n.moveOnDrag,fe(i.wrapper.ownerDocument,"mouseup",u),fe(i.wrapper.ownerDocument,"mousemove",c),fe(i.scroller,"dragstart",h),fe(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(e,n,t,o):function(e,t,r,n){l&&Ln(e);var i=e.display,o=e.doc;we(t);var s,a,u=o.sel,c=u.ranges;if(n.addNew&&!n.extend?(a=o.sel.contains(r),s=a>-1?c[a]:new Li(r,r)):(s=o.sel.primary(),a=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(s=new Li(r,r)),r=cn(e,t,!0,!0),a=-1;else{var h=vl(e,r,n.unit);s=n.extend?Yi(s,h.anchor,h.head,n.extend):h}n.addNew?-1==a?(a=c.length,Ji(o,ki(e,c.concat([s]),a),{scroll:!1,origin:"*mouse"})):c.length>1&&c[a].empty()&&"char"==n.unit&&!n.extend?(Ji(o,ki(e,c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):qi(o,a,s,K):(a=0,Ji(o,new Si([s],0),K),u=o.sel);var f=r;var d=i.wrapper.getBoundingClientRect(),p=0;function g(t){var l=++p,c=cn(e,t,!0,"rectangle"==n.unit);if(c)if(0!=rt(c,f)){e.curOp.focus=H(),function(t){if(0!=rt(f,t))if(f=t,"rectangle"==n.unit){for(var i=[],l=e.options.tabSize,c=R(Ye(o,r.line).text,r.ch,l),h=R(Ye(o,t.line).text,t.ch,l),d=Math.min(c,h),p=Math.max(c,h),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=Ye(o,g).text,y=X(m,d,l);d==p?i.push(new Li(tt(g,y),tt(g,y))):m.length>y&&i.push(new Li(tt(g,y),tt(g,X(m,p,l))))}i.length||i.push(new Li(r,r)),Ji(o,ki(e,u.ranges.slice(0,a).concat(i),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=s,x=vl(e,t,n.unit),C=w.anchor;rt(x.anchor,C)>0?(b=x.head,C=lt(w.from(),x.anchor)):(b=x.anchor,C=ot(w.to(),x.head));var S=u.ranges.slice(0);S[a]=function(e,t){var r=t.anchor,n=t.head,i=Ye(e.doc,r.line);if(0==rt(r,n)&&r.sticky==n.sticky)return t;var o=ce(i);if(!o)return t;var l=ae(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a,u=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)a=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ae(o,n.ch,n.sticky),h=c-l||(n.ch-r.ch)*(1==s.level?-1:1);a=c==u-1||c==u?h<0:h>0}var f=o[u+(a?-1:0)],d=a==(1==f.level),p=d?f.from:f.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?t:new Li(new tt(r.line,p,g),n)}(e,new Li(at(o,C),b)),Ji(o,ki(e,S,a),K)}}(c);var h=On(i,o);(c.line>=h.to||c.lined.bottom?20:0;v&&setTimeout(ti(e,(function(){p==l&&(i.scroller.scrollTop+=v,g(t))})),50)}}function v(t){e.state.selectingText=!1,p=1/0,t&&(we(t),i.input.focus()),pe(i.wrapper.ownerDocument,"mousemove",m),pe(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var m=ti(e,(function(e){0!==e.buttons&&ke(e)?g(e):v(e)})),y=ti(e,v);e.state.selectingText=y,fe(i.wrapper.ownerDocument,"mousemove",m),fe(i.wrapper.ownerDocument,"mouseup",y)}(e,n,t,o)}(t,n,o,e):Le(e)==r.scroller&&we(e):2==i?(n&&$i(t.doc,n),setTimeout((function(){return r.input.focus()}),20)):3==i&&(L?t.display.input.onContextMenu(e):Ln(t)))}}function vl(e,t,r){if("char"==r)return new Li(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new Li(tt(t.line,0),at(e.doc,tt(t.line+1,0)));var n=r(e,t);return new Li(n.from,n.to)}function ml(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&we(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!ye(e,r))return Ce(t);o-=s.top-l.viewOffset;for(var a=0;a=i)return ge(e,r,e,Qe(e.doc,o),e.display.gutterSpecs[a].className,t),Ce(t)}}function yl(e,t){return ml(e,t,"gutterClick",!0)}function bl(e,t){Cr(e.display,t)||function(e,t){return!!ye(e,"gutterContextMenu")&&ml(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||L||e.display.input.onContextMenu(t)}function wl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Br(e)}pl.prototype.compare=function(e,t,r){return this.time+400>e&&0==rt(t,this.pos)&&r==this.button};var xl={toString:function(){return"CodeMirror.Init"}},Cl={},Sl={};function Ll(e,t,r){if(!t!=!(r&&r!=xl)){var n=e.display.dragFunctions,i=t?fe:pe;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function kl(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(M(e.display.wrapper,"CodeMirror-wrap"),Xt(e)),un(e),fn(e),Br(e),setTimeout((function(){return Un(e)}),100)}function Tl(e,t){var r=this;if(!(this instanceof Tl))return new Tl(e,t);this.options=t=t?z(t):{},z(Cl,t,!1);var n=t.value;"string"==typeof n?n=new Do(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Tl.inputStyles[t.inputStyle](this),o=this.display=new mi(e,n,i,t);for(var u in o.wrapper.CodeMirror=this,wl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),jn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new B,keySeq:null,specialChars:null},t.autofocus&&!y&&o.input.focus(),l&&s<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),function(e){var t=e.display;fe(t.scroller,"mousedown",ti(e,gl)),fe(t.scroller,"dblclick",l&&s<11?ti(e,(function(t){if(!ve(e,t)){var r=cn(e,t);if(r&&!yl(e,t)&&!Cr(e.display,t)){we(t);var n=e.findWordAt(r);$i(e.doc,n.anchor,n.head)}}})):function(t){return ve(e,t)||we(t)}),fe(t.scroller,"contextmenu",(function(t){return bl(e,t)})),fe(t.input.getField(),"contextmenu",(function(r){t.scroller.contains(r.target)||bl(e,r)}));var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout((function(){return t.activeTouch=null}),1e3),(n=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}fe(t.scroller,"touchstart",(function(i){if(!ve(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!yl(e,i)){t.input.ensurePolled(),clearTimeout(r);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),fe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),fe(t.scroller,"touchend",(function(r){var n=t.activeTouch;if(n&&!Cr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var l,s=e.coordsChar(t.activeTouch,"page");l=!n.prev||o(n,n.prev)?new Li(s,s):!n.prev.prev||o(n,n.prev.prev)?e.findWordAt(s):new Li(tt(s.line,0),at(e.doc,tt(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),we(r)}i()})),fe(t.scroller,"touchcancel",i),fe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Pn(e,t.scroller.scrollTop),zn(e,t.scroller.scrollLeft,!0),ge(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return Ci(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return Ci(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ve(e,t)||Se(t)},over:function(t){ve(e,t)||(function(e,t){var r=cn(e,t);if(r){var n=document.createDocumentFragment();bn(e,r,n),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),O(e.display.dragCursor,n)}}(e,t),Se(t))},start:function(t){return function(e,t){if(l&&(!e.state.draggingText||+new Date-Wo<100))Se(t);else if(!ve(e,t)&&!Cr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var r=A("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),f&&r.parentNode.removeChild(r)}}(e,t)},drop:ti(e,Ho),leave:function(t){ve(e,t)||Fo(e)}};var a=t.input.getField();fe(a,"keyup",(function(t){return cl.call(e,t)})),fe(a,"keydown",ti(e,ul)),fe(a,"keypress",ti(e,hl)),fe(a,"focus",(function(t){return kn(e,t)})),fe(a,"blur",(function(t){return Tn(e,t)}))}(this),function(){var e;Po||(fe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Eo(Io)}),100))})),fe(window,"blur",(function(){return Eo(Tn)})),Po=!0)}(),Yn(this),this.curOp.forceUpdate=!0,Pi(this,n),t.autofocus&&!y||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&kn(r)}),20):Tn(this),Sl)Sl.hasOwnProperty(u)&&Sl[u](this,t[u],xl);di(this),t.finishInit&&t.finishInit(this);for(var c=0;c150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?R(Ye(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(fl,a=We(t),u=null;if(s&&n.ranges.length>1)if(Ol&&Ol.text.join("\n")==t){if(n.ranges.length%Ol.text.length==0){u=[];for(var c=0;c=0;f--){var d=n.ranges[f],p=d.from(),g=d.to();d.empty()&&(r&&r>0?p=tt(p.line,p.ch-r):e.state.overwrite&&!s?g=tt(g.line,Math.min(Ye(o,g.line).text.length,g.ch+_(a).length)):s&&Ol&&Ol.lineWise&&Ol.text.join("\n")==a.join("\n")&&(p=g=tt(p.line,0)));var v={from:p,to:g,text:u?u[f%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming>l?"cut":"+input")};uo(e.doc,v),ar(e,"inputRead",e,v)}t&&!s&&Hl(e,t),Wn(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Wl(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||!t.hasFocus()||ei(t,(function(){return Dl(t,r,0,null,"paste")})),!0}function Hl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s-1){l=Nl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ye(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Nl(e,i.head.line,"smart"));l&&ar(e,"electricInput",e,i.head.line)}}}function Fl(e){for(var t=[],r=[],n=0;n0?0:-1));if(isNaN(c))l=null;else{var h=r>0?c>=55296&&c<56320:c>=56320&&c<57343;l=new tt(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(h?2:1))),-r)}}else l=i?function(e,t,r,n){var i=ce(t,e.doc.direction);if(!i)return Qo(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ae(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from=l.from&&f>=c.begin)){var d=h?"before":"after";return new tt(r.line,f,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new tt(r.line,a(e,1),"before"):new tt(r.line,e,"after")};e>=0&&e0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}(e.cm,s,t,r):Qo(s,t,r);if(null==l){if(o||(u=t.line+a)=e.first+e.size||(t=new tt(u,t.ch,t.sticky),!(s=Ye(e,u))))return!1;t=Jo(i,e.cm,s,t.line,a)}else t=l;return!0}if("char"==n||"codepoint"==n)u();else if("column"==n)u(!0);else if("word"==n||"group"==n)for(var c=null,h="group"==n,f=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(r<0)||u(!d);d=!1){var p=s.text.charAt(t.ch)||"\n",g=te(p,f)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||d||g||(g="s"),c&&c!=g){r<0&&(r=1,u(),t.sticky="after");break}if(g&&(c=g),r>0&&!u(!d))break}var v=oo(e,t,o,l,!0);return nt(o,v)&&(v.hitSide=!0),v}function zl(e,t,r,n){var i,o,l=e.doc,s=t.left;if("page"==n){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(a-.5*nn(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=qr(e,s,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var Rl=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new B,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Bl(e,t){var r=Dr(e,t.line);if(!r||r.hidden)return null;var n=Ye(e.doc,t.line),i=Or(r,n,t.line),o=ce(n,e.doc.direction),l="left";o&&(l=ae(o,t.ch)%2?"right":"left");var s=Pr(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function Gl(e,t){return t&&(e.bad=!0),e}function Ul(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Gl(e.clipPos(tt(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&Bl(t,i)||{node:a[0].measure.map[2],offset:0},c=o.linen.firstLine()&&(l=tt(l.line-1,Ye(n.doc,l.line-1).length)),s.ch==Ye(n.doc,s.line).text.length&&s.linei.viewTo-1)return!1;l.line==i.viewFrom||0==(e=hn(n,l.line))?(t=Ze(i.view[0].line),r=i.view[0].node):(t=Ze(i.view[e].line),r=i.view[e-1].node.nextSibling);var a,u,c=hn(n,s.line);if(c==i.view.length-1?(a=i.viewTo-1,u=i.lineDiv.lastChild):(a=Ze(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var h=n.doc.splitLines(function(e,t,r,n,i){var o="",l=!1,s=e.doc.lineSeparator(),a=!1;function u(){l&&(o+=s,a&&(o+=s),l=a=!1)}function c(e){e&&(u(),o+=e)}function h(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void c(r);var o,f=t.getAttribute("cm-marker");if(f){var d=e.findMarks(tt(n,0),tt(i+1,0),(v=+f,function(e){return e.id==v}));return void(d.length&&(o=d[0].find(0))&&c($e(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&u();for(var g=0;g1&&f.length>1;)if(_(h)==_(f))h.pop(),f.pop(),a--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}for(var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);dl.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=tt(t,d),C=tt(a,f.length?_(f).length-p:0);return h.length>1||h[0]||rt(x,C)?(go(n.doc,h,x,C,"+input"),!0):void 0},Rl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Rl.prototype.reset=function(){this.forceCompositionEnd()},Rl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Rl.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Rl.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||ei(this.cm,(function(){return fn(e.cm)}))},Rl.prototype.setUneditable=function(e){e.contentEditable="false"},Rl.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ti(this.cm,Dl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Rl.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Rl.prototype.onContextMenu=function(){},Rl.prototype.resetPosition=function(){},Rl.prototype.needsContentAttribute=!0;var Kl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new B,this.hasSelection=!1,this.composing=null};Kl.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ve(n,e)){if(n.somethingSelected())Al({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Fl(n);Al({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(i.style.width="0px"),fe(i,"input",(function(){l&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()})),fe(i,"paste",(function(e){ve(n,e)||Wl(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),fe(i,"cut",o),fe(i,"copy",o),fe(e.scroller,"paste",(function(t){if(!Cr(e,t)&&!ve(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),fe(e.lineSpace,"selectstart",(function(t){Cr(e,t)||we(t)})),fe(i,"compositionstart",(function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}})),fe(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},Kl.prototype.createField=function(e){this.wrapper=Pl(),this.textarea=this.wrapper.firstChild},Kl.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Kl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=yn(e);if(e.options.moveInputWithCursor){var i=Yr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},Kl.prototype.showSelection=function(e){var t=this.cm.display;O(t.cursorDiv,e.cursors),O(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Kl.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&P(this.textarea),l&&s>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&s>=9&&(this.hasSelection=null))}},Kl.prototype.getField=function(){return this.textarea},Kl.prototype.supportsTouch=function(){return!1},Kl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!y||H()!=this.textarea))try{this.textarea.focus()}catch(e){}},Kl.prototype.blur=function(){this.textarea.blur()},Kl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Kl.prototype.receivedFocus=function(){this.slowPoll()},Kl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Kl.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))}))},Kl.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||He(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,u=Math.min(n.length,i.length);a1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Kl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Kl.prototype.onKeyPress=function(){l&&s>=9&&(this.hasSelection=null),this.fastPoll()},Kl.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=cn(r,e),u=n.scroller.scrollTop;if(o&&!f){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&ti(r,Ji)(r.doc,Ti(o),V);var c,h=i.style.cssText,d=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",a&&(c=window.scrollY),n.input.focus(),a&&window.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=m,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&s>=9&&v(),L){Se(e);var g=function(){pe(window,"mouseup",g),setTimeout(m,20)};fe(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending==m&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=h,l&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&s<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ti(r,so)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},Kl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Kl.prototype.setUneditable=function(){},Kl.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=xl&&i(e,t,r)}:i)}e.defineOption=r,e.Init=xl,r("value","",(function(e,t){return e.setValue(t)}),!0),r("mode",null,(function(e,t){e.doc.modeOption=t,Di(e)}),!0),r("indentUnit",2,Di,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(e){Wi(e),Br(e),fn(e)}),!0),r("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(tt(n,o))}n++}));for(var i=r.length-1;i>=0;i--)go(e.doc,t,r[i],tt(r[i].line,r[i].ch+t.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=xl&&e.refresh()})),r("specialCharPlaceholder",Jt,(function(e){return e.refresh()}),!0),r("electricChars",!0),r("inputStyle",y?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),r("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),r("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),r("rtlMoveVisually",!x),r("wholeLineUpdateBefore",!0),r("theme","default",(function(e){wl(e),vi(e)}),!0),r("keyMap","default",(function(e,t,r){var n=_o(t),i=r!=xl&&_o(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,kl,!0),r("gutters",[],(function(e,t){e.display.gutterSpecs=pi(t,e.options.lineNumbers),vi(e)}),!0),r("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?sn(e.display)+"px":"0",e.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(e){return Un(e)}),!0),r("scrollbarStyle","native",(function(e){jn(e),Un(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=pi(e.options.gutters,t),vi(e)}),!0),r("firstLineNumber",1,vi,!0),r("lineNumberFormatter",(function(e){return e}),vi,!0),r("showCursorWhenSelecting",!1,mn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(e,t){"nocursor"==t&&(Tn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),r("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),r("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),r("dragDrop",!0,Ll),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,mn,!0),r("singleCursorHeightPerLine",!0,mn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Wi,!0),r("addModeClass",!1,Wi,!0),r("pollInterval",100),r("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),r("historyEventDelay",1250),r("viewportMargin",10,(function(e){return e.refresh()}),!0),r("maxHighlightLength",1e4,Wi,!0),r("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),r("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),r("autofocus",null),r("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),r("phrases",null)}(Tl),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&ti(this,t[e])(this,r,i),ge(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](_o(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;rr&&(Nl(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Wn(this));else{var o=i.from(),l=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;a0&&qi(this.doc,n,new Li(o,u[n].to()),V)}}})),getTokenAt:function(e,t){return bt(this,e,t)},getLineTokens:function(e,t){return bt(this,tt(e),t,!0)},getTokenTypeAt:function(e){e=at(this.doc,e);var t,r=dt(this,Ye(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]o&&(e=o,i=!0),n=Ye(this.doc,e)}else n=e;return Kr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-Kt(n):0)},defaultTextHeight:function(){return nn(this.display)},defaultCharWidth:function(){return on(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,l,s=this.display,a=(e=Yr(this,at(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),s.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var c=Math.max(s.wrapper.clientHeight,this.doc.height),h=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>c)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=c&&(a=e.bottom),u+t.offsetWidth>h&&(u=h-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(u=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),r&&(null!=(l=An(o=this,{left:u,top:a,right:u+t.offsetWidth,bottom:a+t.offsetHeight})).scrollTop&&Pn(o,l.scrollTop),null!=l.scrollLeft&&zn(o,l.scrollLeft))},triggerOnKeyDown:ri(ul),triggerOnKeyPress:ri(hl),triggerOnKeyUp:cl,triggerOnMouseDown:ri(gl),execCommand:function(e){if(el.hasOwnProperty(e))return el[e].call(null,this)},triggerElectric:ri((function(e){Hl(this,e)})),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=at(this.doc,e),l=0;l0&&l(t.charAt(r-1));)--r;for(;n.5||this.options.lineWrapping)&&un(this),ge(this,"refresh",this)})),swapDoc:ri((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Pi(this,e),Br(this),this.display.input.reset(),Hn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ar(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},be(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Tl);var jl="iter insert remove copy getEditor constructor".split(" ");for(var Xl in Do.prototype)Do.prototype.hasOwnProperty(Xl)&&G(jl,Xl)<0&&(Tl.prototype[Xl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Do.prototype[Xl]));return be(Do),Tl.inputStyles={textarea:Kl,contenteditable:Rl},Tl.defineMode=function(e){Tl.defaults.mode||"null"==e||(Tl.defaults.mode=e),ze.apply(this,arguments)},Tl.defineMIME=function(e,t){Ie[e]=t},Tl.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Tl.defineMIME("text/plain","null"),Tl.defineExtension=function(e,t){Tl.prototype[e]=t},Tl.defineDocExtension=function(e,t){Do.prototype[e]=t},Tl.fromTextArea=function(e,t){if((t=t?z(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=H();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(fe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Tl((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=pe,e.on=fe,e.wheelEventPixels=xi,e.Doc=Do,e.splitLines=We,e.countColumn=R,e.findColumn=X,e.isWordChar=ee,e.Pass=U,e.signal=ge,e.Line=Yt,e.changeEnd=Mi,e.scrollbarModel=Kn,e.Pos=tt,e.cmpPos=rt,e.modes=Pe,e.mimeModes=Ie,e.resolveMode=Re,e.getMode=Be,e.modeExtensions=Ge,e.extendMode=Ue,e.copyState=Ve,e.startState=je,e.innerMode=Ke,e.commands=el,e.keyMap=Uo,e.keyName=$o,e.isModifierKey=Xo,e.lookupKey=jo,e.normalizeKeyMap=Ko,e.StringStream=Xe,e.SharedTextMarker=Mo,e.TextMarker=ko,e.LineWidget=Co,e.e_preventDefault=we,e.e_stopPropagation=xe,e.e_stop=Se,e.addClass=F,e.contains=W,e.rmClass=M,e.keyNames=zo}(Tl),Tl.version="5.65.5",Tl})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/apl/apl.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/apl/apl.js deleted file mode 100644 index 682fac51a..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/apl/apl.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("apl",(function(){var e={".":"innerProduct","\\":"scan","/":"reduce","⌿":"reduce1Axis","⍀":"scan1Axis","¨":"each","⍣":"power"},n={"+":["conjugate","add"],"−":["negate","subtract"],"×":["signOf","multiply"],"÷":["reciprocal","divide"],"⌈":["ceiling","greaterOf"],"⌊":["floor","lesserOf"],"∣":["absolute","residue"],"⍳":["indexGenerate","indexOf"],"?":["roll","deal"],"⋆":["exponentiate","toThePowerOf"],"⍟":["naturalLog","logToTheBase"],"○":["piTimes","circularFuncs"],"!":["factorial","binomial"],"⌹":["matrixInverse","matrixDivide"],"<":[null,"lessThan"],"≤":[null,"lessThanOrEqual"],"=":[null,"equals"],">":[null,"greaterThan"],"≥":[null,"greaterThanOrEqual"],"≠":[null,"notEqual"],"≡":["depth","match"],"≢":[null,"notMatch"],"∈":["enlist","membership"],"⍷":[null,"find"],"∪":["unique","union"],"∩":[null,"intersection"],"∼":["not","without"],"∨":[null,"or"],"∧":[null,"and"],"⍱":[null,"nor"],"⍲":[null,"nand"],"⍴":["shapeOf","reshape"],",":["ravel","catenate"],"⍪":[null,"firstAxisCatenate"],"⌽":["reverse","rotate"],"⊖":["axis1Reverse","axis1Rotate"],"⍉":["transpose",null],"↑":["first","take"],"↓":[null,"drop"],"⊂":["enclose","partitionWithAxis"],"⊃":["diclose","pick"],"⌷":[null,"index"],"⍋":["gradeUp",null],"⍒":["gradeDown",null],"⊤":["encode",null],"⊥":["decode",null],"⍕":["format","formatByExample"],"⍎":["execute",null],"⊣":["stop","left"],"⊢":["pass","right"]},t=/[\.\/⌿⍀¨⍣]/,l=/⍬/,r=/[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/,a=/←/,i=/[⍝#].*$/;return{startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(o,u){var s,c,p,d;return o.eatSpace()?null:'"'===(s=o.next())||"'"===s?(o.eatWhile((p=s,d=!1,function(e){return d=e,e!==p||"\\"===d})),o.next(),u.prev=!0,"string"):/[\[{\(]/.test(s)?(u.prev=!1,null):/[\]}\)]/.test(s)?(u.prev=!0,null):l.test(s)?(u.prev=!1,"niladic"):/[¯\d]/.test(s)?(u.func?(u.func=!1,u.prev=!1):u.prev=!0,o.eatWhile(/[\w\.]/),"number"):t.test(s)?"operator apl-"+e[s]:a.test(s)?"apl-arrow":r.test(s)?(c="apl-",null!=n[s]&&(u.prev?c+=n[s][1]:c+=n[s][0]),u.func=!0,u.prev=!1,"function "+c):i.test(s)?(o.skipToEnd(),"comment"):"∘"===s&&"."===o.peek()?(o.next(),"function jot-dot"):(o.eatWhile(/[\w\$_]/),u.prev=!0,"keyword")}}})),e.defineMIME("text/apl","apl")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/asciiarmor/asciiarmor.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/asciiarmor/asciiarmor.js deleted file mode 100644 index 64c4e0777..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/asciiarmor/asciiarmor.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){var t=e.match(/^\s*\S/);return e.skipToEnd(),t?"error":null}e.defineMode("asciiarmor",(function(){return{token:function(e,r){var a;if("top"==r.state)return e.sol()&&(a=e.match(/^-----BEGIN (.*)?-----\s*$/))?(r.state="headers",r.type=a[1],"tag"):t(e);if("headers"==r.state){if(e.sol()&&e.match(/^\w+:/))return r.state="header","atom";var i=t(e);return i&&(r.state="body"),i}return"header"==r.state?(e.skipToEnd(),r.state="headers","string"):"body"==r.state?e.sol()&&(a=e.match(/^-----END (.*)?-----\s*$/))?a[1]!=r.type?"error":(r.state="end","tag"):e.eatWhile(/[A-Za-z0-9+\/=]/)?null:(e.next(),"error"):"end"==r.state?t(e):void 0},blankLine:function(e){"headers"==e.state&&(e.state="body")},startState:function(){return{state:"top",type:null}}}})),e.defineMIME("application/pgp","asciiarmor"),e.defineMIME("application/pgp-encrypted","asciiarmor"),e.defineMIME("application/pgp-keys","asciiarmor"),e.defineMIME("application/pgp-signature","asciiarmor")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/asn.1/asn.1.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/asn.1/asn.1.js deleted file mode 100644 index 6c85e4022..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/asn.1/asn.1.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){for(var t={},n=e.split(" "),r=0;r?$/.test(r)?(a.extenExten=!0,a.extenStart=!1,"strong"):(a.extenStart=!1,i.skipToEnd(),"error")):a.extenExten?(a.extenExten=!1,a.extenPriority=!0,i.eatWhile(/[^,]/),a.extenInclude&&(i.skipToEnd(),a.extenPriority=!1,a.extenInclude=!1),a.extenSame&&(a.extenPriority=!1,a.extenSame=!1,a.extenApplication=!0),"tag"):a.extenPriority?(a.extenPriority=!1,a.extenApplication=!0,i.next(),a.extenSame?null:(i.eatWhile(/[^,]/),"number")):a.extenApplication?(i.eatWhile(/,/),","===(r=i.current())?null:(i.eatWhile(/\w/),r=i.current().toLowerCase(),a.extenApplication=!1,-1!==n.indexOf(r)?"def strong":null)):function(n,i){var a="",r=n.next();if(i.blockComment)return"-"==r&&n.match("-;",!0)?i.blockComment=!1:n.skipTo("--;")?(n.next(),n.next(),n.next(),i.blockComment=!1):n.skipToEnd(),"comment";if(";"==r)return n.match("--",!0)&&!n.match("-",!1)?(i.blockComment=!0,"comment"):(n.skipToEnd(),"comment");if("["==r)return n.skipTo("]"),n.eat("]"),"header";if('"'==r)return n.skipTo('"'),"string";if("'"==r)return n.skipTo("'"),"string-2";if("#"==r&&(n.eatWhile(/\w/),a=n.current(),-1!==t.indexOf(a)))return n.skipToEnd(),"strong";if("$"==r&&"{"==n.peek())return n.skipTo("}"),n.eat("}"),"variable-3";if(n.eatWhile(/\w/),a=n.current(),-1!==e.indexOf(a)){switch(i.extenStart=!0,a){case"same":i.extenSame=!0;break;case"include":case"switch":case"ignorepat":i.extenInclude=!0}return"atom"}}(i,a)},blockCommentStart:";--",blockCommentEnd:"--;",lineComment:";"}})),e.defineMIME("text/x-asterisk","asterisk")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/brainfuck/brainfuck.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/brainfuck/brainfuck.js deleted file mode 100644 index 04695eb8f..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/brainfuck/brainfuck.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var n="><+-.,[]".split("");e.defineMode("brainfuck",(function(){return{startState:function(){return{commentLine:!1,left:0,right:0,commentLoop:!1}},token:function(e,t){if(e.eatSpace())return null;e.sol()&&(t.commentLine=!1);var o=e.next().toString();return-1===n.indexOf(o)?(t.commentLine=!0,e.eol()&&(t.commentLine=!1),"comment"):!0===t.commentLine?(e.eol()&&(t.commentLine=!1),"comment"):"]"===o||"["===o?("["===o?t.left++:t.right++,"bracket"):"+"===o||"-"===o?"keyword":"<"===o||">"===o?"atom":"."===o||","===o?"def":void(e.eol()&&(t.commentLine=!1))}}})),e.defineMIME("text/x-brainfuck","brainfuck")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/clike/clike.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/clike/clike.js deleted file mode 100644 index 36e0144b4..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/clike/clike.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e,t,n,r,o,a){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=o,this.prev=a}function n(e,n,r,o){var a=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(a=e.context.indented),e.context=new t(a,n,r,o,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function o(e,t,n){return"variable"==t.prevToken||"type"==t.prevToken||!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0}function a(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function i(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/,M=s.isIdentifierChar||/[\w\$_\xa1-\uffff]/,L=s.isReservedIdentifier||!1;function D(e,t){var n,r=e.next();if(x[r]){var o=x[r](e,t);if(!1!==o)return o}if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){for(var r,o=!1,a=!1;null!=(r=e.next());){if(r==n&&!o){a=!0;break}o=!o&&"\\"==r}return(a||!o&&!v)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(C.test(r)){if(e.backUp(1),e.match(I))return"number";e.next()}if(T.test(r))return c=r,null;if("/"==r){if(e.eat("*"))return t.tokenize=P,P(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(N.test(r)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(N););return"operator"}if(e.eatWhile(M),S)for(;e.match(S);)e.eatWhile(M);var a=e.current();return l(m,a)?(l(g,a)&&(c="newstatement"),l(k,a)&&(u=!0),"keyword"):l(h,a)?"type":l(y,a)||L&&L(a)?(l(g,a)&&(c="newstatement"),"builtin"):l(b,a)?"atom":"variable"}function P(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function E(e,t){s.typeFirstDefinitions&&e.eol()&&a(t.context)&&(t.typeAtEndOfLine=o(e,t,e.pos))}return{startState:function(e){return{tokenize:null,context:new t((e||0)-d,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var i=t.context;if(e.sol()&&(null==i.align&&(i.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return E(e,t),null;c=u=null;var l=(t.tokenize||D)(e,t);if("comment"==l||"meta"==l)return l;if(null==i.align&&(i.align=!0),";"==c||":"==c||","==c&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==c)n(t,e.column(),"}");else if("["==c)n(t,e.column(),"]");else if("("==c)n(t,e.column(),")");else if("}"==c){for(;"statement"==i.type;)i=r(t);for("}"==i.type&&(i=r(t));"statement"==i.type;)i=r(t)}else c==i.type?r(t):w&&(("}"==i.type||"top"==i.type)&&";"!=c||"statement"==i.type&&"newstatement"==c)&&n(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&o(e,t,e.start)&&a(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),x.token){var d=x.token(e,t,l);void 0!==d&&(l=d)}return"def"==l&&!1===s.styleDefs&&(l="variable"),t.startOfLine=!1,t.prevToken=u?"def":l||c,E(e,t),l},indent:function(t,n){if(t.tokenize!=D&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,o=n&&n.charAt(0),a=o==r.type;if("statement"==r.type&&"}"==o&&(r=r.prev),s.dontIndentStatements)for(;"statement"==r.type&&s.dontIndentStatements.test(r.info);)r=r.prev;if(x.indent){var i=x.indent(t,r,n,d);if("number"==typeof i)return i}var l=r.prev&&"switch"==r.prev.info;if(s.allmanIndentation&&/[{(]/.test(o)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==o?0:f):!r.align||p&&")"==r.type?")"!=r.type||a?r.indented+(a?0:d)+(a||!l||/^(?:case|default)\b/.test(n)?0:d):r.indented+f:r.column+(a?0:1)},electricInput:_?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}}));var s="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile inline restrict asm fortran",c="alignas alignof and and_eq audit axiom bitand bitor catch class compl concept constexpr const_cast decltype delete dynamic_cast explicit export final friend import module mutable namespace new noexcept not not_eq operator or or_eq override private protected public reinterpret_cast requires static_assert static_cast template this thread_local throw try typeid typename using virtual xor xor_eq",u="bycopy byref in inout oneway out self super atomic nonatomic retain copy readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd @interface @implementation @end @protocol @encode @property @synthesize @dynamic @class @public @package @private @protected @required @optional @try @catch @finally @import @selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available",d="FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT",f=i("int long char short double float unsigned signed void bool"),p=i("SEL instancetype id Class Protocol BOOL");function m(e){return l(f,e)||/.+_t$/.test(e)}function h(e){return m(e)||l(p,e)}var y="case do else for if switch while struct enum union",g="struct enum union";function k(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=k;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function b(e,t){return"type"==t.prevToken&&"type"}function x(e){return!(!e||e.length<2||"_"!=e[0]||"_"!=e[1]&&e[1]===e[1].toLowerCase())}function v(e){return e.eatWhile(/[\w\.']/),"number"}function w(e,t){if(e.backUp(1),e.match(/^(?:R|u8R|uR|UR|LR)/)){var n=e.match(/^"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=T,T(e,t))}return e.match(/^(?:u8|u|U|L)/)?!!e.match(/^["']/,!1)&&"string":(e.next(),!1)}function _(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]}function S(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function T(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function C(t,n){"string"==typeof t&&(t=[t]);var r=[];function o(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}o(n.keywords),o(n.types),o(n.builtin),o(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var a=0;a!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=I,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=N(1),t.tokenize(e,t))}},modeProps:{closeBrackets:{pairs:'()[]{}""',triples:'"'}}}),C("text/x-kotlin",{name:"clike",keywords:i("package as typealias class interface this super val operator var fun for is in This throw return annotation break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect setparam value"),types:i("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy LazyThreadSafetyMode LongArray Nothing ShortArray Unit"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:i("catch class do else finally for if where try while enum"),defKeywords:i("class val var object interface fun"),atoms:i("true false null this"),hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},"*":function(e,t){return"."==t.prevToken?"variable":"operator"},'"':function(e,t){var n;return t.tokenize=(n=e.match('""'),function(e,t){for(var r,o=!1,a=!1;!e.eol();){if(!n&&!o&&e.match('"')){a=!0;break}if(n&&e.match('"""')){a=!0;break}r=e.next(),!o&&"$"==r&&e.match("{")&&e.skipTo("}"),o=!o&&"\\"==r&&!n}return!a&&n||(t.tokenize=null),"string"}),t.tokenize(e,t)},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=N(1),t.tokenize(e,t))},indent:function(e,t,n,r){var o=n&&n.charAt(0);return"}"!=e.prevToken&&")"!=e.prevToken||""!=n?"operator"==e.prevToken&&"}"!=n&&"}"!=e.context.type||"variable"==e.prevToken&&"."==o||("}"==e.prevToken||")"==e.prevToken)&&"."==o?2*r+t.indented:t.align&&"}"==t.type?t.indented+(e.context.type==(n||"").charAt(0)?0:r):void 0:e.indented}},modeProps:{closeBrackets:{triples:'"'}}}),C(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:i("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:i("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:i("for while do if else struct"),builtin:i("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:i("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":k},modeProps:{fold:["brace","include"]}}),C("text/x-nesc",{name:"clike",keywords:i(s+" as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:m,blockKeywords:i(y),atoms:i("null true false"),hooks:{"#":k},modeProps:{fold:["brace","include"]}}),C("text/x-objectivec",{name:"clike",keywords:i(s+" "+u),types:h,builtin:i(d),blockKeywords:i(y+" @synthesize @try @catch @finally @autoreleasepool @synchronized"),defKeywords:i(g+" @interface @implementation @protocol @class"),dontIndentStatements:/^@.*$/,typeFirstDefinitions:!0,atoms:i("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:x,hooks:{"#":k,"*":b},modeProps:{fold:["brace","include"]}}),C("text/x-objectivec++",{name:"clike",keywords:i(s+" "+u+" "+c),types:h,builtin:i(d),blockKeywords:i(y+" @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"),defKeywords:i(g+" @interface @implementation @protocol @class class namespace"),dontIndentStatements:/^@.*$|^template$/,typeFirstDefinitions:!0,atoms:i("YES NO NULL Nil nil true false nullptr"),isReservedIdentifier:x,hooks:{"#":k,"*":b,u:w,U:w,L:w,R:w,0:v,1:v,2:v,3:v,4:v,5:v,6:v,7:v,8:v,9:v,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&_(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),C("text/x-squirrel",{name:"clike",keywords:i("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:m,blockKeywords:i("case catch class else for foreach if switch try while"),defKeywords:i("function local class"),typeFirstDefinitions:!0,atoms:i("true false null"),hooks:{"#":k},modeProps:{fold:["brace","include"]}});var M=null;function L(e){return function(t,n){for(var r,o=!1,a=!1;!t.eol();){if(!o&&t.match('"')&&("single"==e||t.match('""'))){a=!0;break}if(!o&&t.match("``")){M=L(e),a=!0;break}r=t.next(),o="single"==e&&!o&&"\\"==r}return a&&(n.tokenize=null),"string"}}C("text/x-ceylon",{name:"clike",keywords:i("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:i("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:i("class dynamic function interface module object package value"),builtin:i("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:i("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=L(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!M||!e.match("`"))&&(t.tokenize=M,M=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"type"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/clojure/clojure.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/clojure/clojure.js deleted file mode 100644 index c4e944a80..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/clojure/clojure.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("clojure",(function(t){var n=["false","nil","true"],r=[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],a=["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"];e.registerHelper("hintWords","clojure",[].concat(n,r,a));var o=y(n),s=y(r),i=y(a),c=y(["->","->>","as->","binding","bound-fn","case","catch","comment","cond","cond->","cond->>","condp","def","definterface","defmethod","defn","defmacro","defprotocol","defrecord","defstruct","deftype","do","doseq","dotimes","doto","extend","extend-protocol","extend-type","fn","for","future","if","if-let","if-not","if-some","let","letfn","locking","loop","ns","proxy","reify","struct-map","some->","some->>","try","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn"]),d=/^(?:[\\\[\]\s"(),;@^`{}~]|$)/,l=/^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,u=/^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,p=/^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/;function m(e,t){if(e.eatSpace()||e.eat(","))return["space",null];if(e.match(l))return[null,"number"];if(e.match(u))return[null,"string-2"];if(e.eat(/^"/))return(t.tokenize=f)(e,t);if(e.eat(/^[(\[{]/))return["open","bracket"];if(e.eat(/^[)\]}]/))return["close","bracket"];if(e.eat(/^;/))return e.skipToEnd(),["space","comment"];if(e.eat(/^[#'@^`~]/))return[null,"meta"];var n=e.match(p),r=n&&n[0];return r?"comment"===r&&"("===t.lastToken?(t.tokenize=h)(e,t):b(r,o)||":"===r.charAt(0)?["symbol","atom"]:b(r,s)||b(r,i)?["symbol","keyword"]:"("===t.lastToken?["symbol","builtin"]:["symbol","variable"]:(e.next(),e.eatWhile((function(e){return!b(e,d)})),[null,"error"])}function f(e,t){for(var n,r=!1;n=e.next();){if('"'===n&&!r){t.tokenize=m;break}r=!r&&"\\"===n}return[null,"string"]}function h(e,t){for(var n,r=1;n=e.next();)if(")"===n&&r--,"("===n&&r++,0===r){e.backUp(1),t.tokenize=m;break}return["space","comment"]}function y(e){for(var t={},n=0;n >= "),O={digit:/\d/,digit_or_colon:/[\d:]/,hex:/[0-9a-f]/i,sign:/[+-]/,exponent:/e/i,keyword_char:/[^\s\(\[\;\)\]]/,symbol:/[\w*+\-]/};return{startState:function(){return{indentStack:null,indentation:0,mode:!1}},token:function(I,C){if(null==C.indentStack&&I.sol()&&(C.indentation=6),I.eatSpace())return null;var L=null;if("string"===C.mode){for(var D=!1;null!=(D=I.next());)if(('"'==D||"'"==D)&&!I.match(/['"]/,!1)){C.mode=!1;break}L=E}else{var S=I.next(),U=I.column();if(U>=0&&U<=5)L="def";else if(U>=72&&U<=79)I.skipToEnd(),L="header";else if("*"==S&&6==U)I.skipToEnd(),L="comment";else if('"'==S||"'"==S)C.mode="string",L=E;else if("'"!=S||O.digit_or_colon.test(I.peek()))if("."==S)L="link";else if(function(E,T){return"0"===E&&T.eat(/x/i)?(T.eatWhile(O.hex),!0):("+"!=E&&"-"!=E||!O.digit.test(T.peek())||(T.eat(O.sign),E=T.next()),!!O.digit.test(E)&&(T.eat(E),T.eatWhile(O.digit),"."==T.peek()&&(T.eat("."),T.eatWhile(O.digit)),T.eat(O.exponent)&&(T.eat(O.sign),T.eatWhile(O.digit)),!0))}(S,I))L="number";else{if(I.current().match(O.symbol))for(;U<71&&void 0!==I.eat(O.symbol);)U++;L=R&&R.propertyIsEnumerable(I.current().toUpperCase())?"keyword":A&&A.propertyIsEnumerable(I.current().toUpperCase())?"builtin":N&&N.propertyIsEnumerable(I.current().toUpperCase())?T:null}else L=T}return L},indent:function(E){return null==E.indentStack?E.indentation:E.indentStack.indent}}})),E.defineMIME("text/x-cobol","cobol")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/coffeescript/coffeescript.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/coffeescript/coffeescript.js deleted file mode 100644 index 24f55dcd4..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/coffeescript/coffeescript.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("coffeescript",(function(e,t){var n="error";function r(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var o=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,i=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,c=/^[_A-Za-z$][_A-Za-z$0-9]*/,f=/^@[_A-Za-z$][_A-Za-z$0-9]*/,p=r(["and","or","not","is","isnt","in","instanceof","typeof"]),a=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],s=r(a.concat(["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"]));a=r(a);var u=/^('{3}|\"{3}|['\"])/,l=/^(\/{3}|\/)/,d=r(["Infinity","NaN","undefined","null","true","false","on","off","yes","no"]);function m(e,t){if(e.sol()){null===t.scope.align&&(t.scope.align=!1);var r=t.scope.offset;if(e.eatSpace()){var a=e.indentation();return a>r&&"coffee"==t.scope.type?"indent":a0&&y(e,t)}if(e.eatSpace())return null;var m=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return t.tokenize=v,t.tokenize(e,t);if("#"===m)return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var k=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(k=!0),e.match(/^-?\d+\.\d*/)&&(k=!0),e.match(/^-?\.\d+/)&&(k=!0),k)return"."==e.peek()&&e.backUp(1),"number";var g=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(g=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(g=!0),e.match(/^-?0(?![\dx])/i)&&(g=!0),g)return"number"}if(e.match(u))return t.tokenize=h(e.current(),!1,"string"),t.tokenize(e,t);if(e.match(l)){if("/"!=e.current()||e.match(/^.*\//,!1))return t.tokenize=h(e.current(),!0,"string-2"),t.tokenize(e,t);e.backUp(1)}return e.match(o)||e.match(p)?"operator":e.match(i)?"punctuation":e.match(d)?"atom":e.match(f)||t.prop&&e.match(c)?"property":e.match(s)?"keyword":e.match(c)?"variable":(e.next(),n)}function h(e,r,o){return function(i,c){for(;!i.eol();)if(i.eatWhile(/[^'"\/\\]/),i.eat("\\")){if(i.next(),r&&i.eol())return o}else{if(i.match(e))return c.tokenize=m,o;i.eat(/['"\/]/)}return r&&(t.singleLineStringErrors?o=n:c.tokenize=m),o}}function v(e,t){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match("###")){t.tokenize=m;break}e.eatWhile("#")}return"comment"}function k(t,n,r){r=r||"coffee";for(var o=0,i=!1,c=null,f=n.scope;f;f=f.prev)if("coffee"===f.type||"}"==f.type){o=f.offset+e.indentUnit;break}"coffee"!==r?(i=null,c=t.column()+t.current().length):n.scope.align&&(n.scope.align=!1),n.scope={offset:o,type:r,prev:n.scope,align:i,alignOffset:c}}function y(e,t){if(t.scope.prev){if("coffee"===t.scope.type){for(var n=e.indentation(),r=!1,o=t.scope;o;o=o.prev)if(n===o.offset){r=!0;break}if(!r)return!0;for(;t.scope.prev&&t.scope.offset!==n;)t.scope=t.scope.prev;return!1}return t.scope=t.scope.prev,!1}}return{startState:function(e){return{tokenize:m,scope:{offset:e||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(e,t){var r=null===t.scope.align&&t.scope;r&&e.sol()&&(r.align=!1);var o=function(e,t){var r=t.tokenize(e,t),o=e.current();"return"===o&&(t.dedent=!0),(("->"===o||"=>"===o)&&e.eol()||"indent"===r)&&k(e,t);var i="[({".indexOf(o);if(-1!==i&&k(e,t,"])}".slice(i,i+1)),a.exec(o)&&k(e,t),"then"==o&&y(e,t),"dedent"===r&&y(e,t))return n;if(-1!==(i="])}".indexOf(o))){for(;"coffee"==t.scope.type&&t.scope.prev;)t.scope=t.scope.prev;t.scope.type==o&&(t.scope=t.scope.prev)}return t.dedent&&e.eol()&&("coffee"==t.scope.type&&t.scope.prev&&(t.scope=t.scope.prev),t.dedent=!1),r}(e,t);return o&&"comment"!=o&&(r&&(r.align=!0),t.prop="punctuation"==o&&"."==e.current()),o},indent:function(e,t){if(e.tokenize!=m)return 0;var n=e.scope,r=t&&"])}".indexOf(t.charAt(0))>-1;if(r)for(;"coffee"==n.type&&n.prev;)n=n.prev;var o=r&&n.type===t.charAt(0);return n.align?n.alignOffset-(o?1:0):(o?n.prev:n).offset},lineComment:"#",fold:"indent"}})),e.defineMIME("application/vnd.coffeescript","coffeescript"),e.defineMIME("text/x-coffeescript","coffeescript"),e.defineMIME("text/coffeescript","coffeescript")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/commonlisp/commonlisp.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/commonlisp/commonlisp.js deleted file mode 100644 index 664c5fb0a..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/commonlisp/commonlisp.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";t.defineMode("commonlisp",(function(t){var e,n=/^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/,r=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/,o=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/,i=/[^\s'`,@()\[\]";]/;function c(t){for(var e;e=t.next();)if("\\"==e)t.next();else if(!i.test(e)){t.backUp(1);break}return t.current()}function l(t,i){if(t.eatSpace())return e="ws",null;if(t.match(o))return"number";var l;if("\\"==(l=t.next())&&(l=t.next()),'"'==l)return(i.tokenize=a)(t,i);if("("==l)return e="open","bracket";if(")"==l||"]"==l)return e="close","bracket";if(";"==l)return t.skipToEnd(),e="ws","comment";if(/['`,@]/.test(l))return null;if("|"==l)return t.skipTo("|")?(t.next(),"symbol"):(t.skipToEnd(),"error");if("#"==l)return"("==(l=t.next())?(e="open","bracket"):/[+\-=\.']/.test(l)||/\d/.test(l)&&t.match(/^\d*#/)?null:"|"==l?(i.tokenize=u)(t,i):":"==l?(c(t),"meta"):"\\"==l?(t.next(),c(t),"string-2"):"error";var s=c(t);return"."==s?null:(e="symbol","nil"==s||"t"==s||":"==s.charAt(0)?"atom":"open"==i.lastType&&(n.test(s)||r.test(s))?"keyword":"&"==s.charAt(0)?"variable-2":"variable")}function a(t,e){for(var n,r=!1;n=t.next();){if('"'==n&&!r){e.tokenize=l;break}r=!r&&"\\"==n}return"string"}function u(t,n){for(var r,o;r=t.next();){if("#"==r&&"|"==o){n.tokenize=l;break}o=r}return e="ws","comment"}return{startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastType:null,tokenize:l}},token:function(n,o){n.sol()&&"number"!=typeof o.ctx.indentTo&&(o.ctx.indentTo=o.ctx.start+1),e=null;var i=o.tokenize(n,o);return"ws"!=e&&(null==o.ctx.indentTo?"symbol"==e&&r.test(n.current())?o.ctx.indentTo=o.ctx.start+t.indentUnit:o.ctx.indentTo="next":"next"==o.ctx.indentTo&&(o.ctx.indentTo=n.column()),o.lastType=e),"open"==e?o.ctx={prev:o.ctx,start:n.column(),indentTo:null}:"close"==e&&(o.ctx=o.ctx.prev||o.ctx),i},indent:function(t,e){var n=t.ctx.indentTo;return"number"==typeof n?n:t.ctx.start+1},closeBrackets:{pairs:'()[]{}""'},lineComment:";;",fold:"brace-paren",blockCommentStart:"#|",blockCommentEnd:"|#"}})),t.defineMIME("text/x-common-lisp","commonlisp")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/crystal/crystal.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/crystal/crystal.js deleted file mode 100644 index 09b14849e..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/crystal/crystal.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("crystal",(function(e){function t(e,t){return new RegExp((t?"":"^")+"(?:"+e.join("|")+")"+(t?"$":"\\b"))}function n(e,t,n){return n.tokenize.push(e),e(t,n)}var r=/^(?:[-+/%|&^]|\*\*?|[<>]{2})/,a=/^(?:[=!]~|===|<=>|[<>=!]=?|[|&]{2}|~)/,u=/^(?:\[\][?=]?)/,i=/^(?:\.(?:\.{2})?|->|[?:])/,o=/^[a-z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,c=/^[A-Z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,s=t(["abstract","alias","as","asm","begin","break","case","class","def","do","else","elsif","end","ensure","enum","extend","for","fun","if","include","instance_sizeof","lib","macro","module","next","of","out","pointerof","private","protected","rescue","return","require","select","sizeof","struct","super","then","type","typeof","uninitialized","union","unless","until","when","while","with","yield","__DIR__","__END_LINE__","__FILE__","__LINE__"]),f=t(["true","false","nil","self"]),l=t(["def","fun","macro","class","module","struct","lib","enum","union","do","for"]),m=t(["if","unless","case","while","until","begin","then"]),h=["end","else","elsif","rescue","ensure"],p=t(h),d=["\\)","\\}","\\]"],k=new RegExp("^(?:"+d.join("|")+")$"),F={def:y,fun:y,macro:function(e,t){if(e.eatSpace())return null;var n;if(n=e.match(o)){if("def"==n)return"keyword";e.eat(/[?!]/)}return t.tokenize.pop(),"def"},class:g,module:g,struct:g,lib:g,enum:g,union:g},z={"[":"]","{":"}","(":")","<":">"};function _(e,t){if(e.eatSpace())return null;if("\\"!=t.lastToken&&e.match("{%",!1))return n(x("%","%"),e,t);if("\\"!=t.lastToken&&e.match("{{",!1))return n(x("{","}"),e,t);if("#"==e.peek())return e.skipToEnd(),"comment";var h;if(e.match(o))return e.eat(/[?!]/),h=e.current(),e.eat(":")?"atom":"."==t.lastToken?"property":s.test(h)?(l.test(h)?"fun"==h&&t.blocks.indexOf("lib")>=0||"def"==h&&"abstract"==t.lastToken||(t.blocks.push(h),t.currentIndent+=1):"operator"!=t.lastStyle&&t.lastStyle||!m.test(h)?"end"==h&&(t.blocks.pop(),t.currentIndent-=1):(t.blocks.push(h),t.currentIndent+=1),F.hasOwnProperty(h)&&t.tokenize.push(F[h]),"keyword"):f.test(h)?"atom":"variable";if(e.eat("@"))return"["==e.peek()?n(b("[","]","meta"),e,t):(e.eat("@"),e.match(o)||e.match(c),"variable-2");if(e.match(c))return"tag";if(e.eat(":"))return e.eat('"')?n(I('"',"atom",!1),e,t):e.match(o)||e.match(c)||e.match(r)||e.match(a)||e.match(u)?"atom":(e.eat(":"),"operator");if(e.eat('"'))return n(I('"',"string",!0),e,t);if("%"==e.peek()){var p,d="string",k=!0;if(e.match("%r"))d="string-2",p=e.next();else if(e.match("%w"))k=!1,p=e.next();else if(e.match("%q"))k=!1,p=e.next();else if(p=e.match(/^%([^\w\s=])/))p=p[1];else{if(e.match(/^%[a-zA-Z_\u009F-\uFFFF][\w\u009F-\uFFFF]*/))return"meta";if(e.eat("%"))return"operator"}return z.hasOwnProperty(p)&&(p=z[p]),n(I(p,d,k),e,t)}return(h=e.match(/^<<-('?)([A-Z]\w*)\1/))?n(function(e,t){return function(n,r){if(n.sol()&&(n.eatSpace(),n.match(e)))return r.tokenize.pop(),"string";for(var a=!1;n.peek();)if(a)n.next(),a=!1;else{if(n.match("{%",!1))return r.tokenize.push(x("%","%")),"string";if(n.match("{{",!1))return r.tokenize.push(x("{","}")),"string";if(t&&n.match("#{",!1))return r.tokenize.push(b("#{","}","meta")),"string";a=t&&"\\"==n.next()}return"string"}}(h[2],!h[1]),e,t):e.eat("'")?(e.match(/^(?:[^']|\\(?:[befnrtv0'"]|[0-7]{3}|u(?:[0-9a-fA-F]{4}|\{[0-9a-fA-F]{1,6}\})))/),e.eat("'"),"atom"):e.eat("0")?(e.eat("x")?e.match(/^[0-9a-fA-F_]+/):e.eat("o")?e.match(/^[0-7_]+/):e.eat("b")&&e.match(/^[01_]+/),"number"):e.eat(/^\d/)?(e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d+)?/),"number"):e.match(r)?(e.eat("="),"operator"):e.match(a)||e.match(i)?"operator":(h=e.match(/[({[]/,!1))?n(b(h=h[0],z[h],null),e,t):e.eat("\\")?(e.next(),"meta"):(e.next(),null)}function b(e,t,n,r){return function(a,u){if(!r&&a.match(e))return u.tokenize[u.tokenize.length-1]=b(e,t,n,!0),u.currentIndent+=1,n;var i=_(a,u);return a.current()===t&&(u.tokenize.pop(),u.currentIndent-=1,i=n),i}}function x(e,t,n){return function(r,a){return!n&&r.match("{"+e)?(a.currentIndent+=1,a.tokenize[a.tokenize.length-1]=x(e,t,!0),"meta"):r.match(t+"}")?(a.currentIndent-=1,a.tokenize.pop(),"meta"):_(r,a)}}function y(e,t){return e.eatSpace()?null:(e.match(o)?e.eat(/[!?]/):e.match(r)||e.match(a)||e.match(u),t.tokenize.pop(),"def")}function g(e,t){return e.eatSpace()?null:(e.match(c),t.tokenize.pop(),"def")}function I(e,t,n){return function(r,a){for(var u=!1;r.peek();)if(u)r.next(),u=!1;else{if(r.match("{%",!1))return a.tokenize.push(x("%","%")),t;if(r.match("{{",!1))return a.tokenize.push(x("{","}")),t;if(n&&r.match("#{",!1))return a.tokenize.push(b("#{","}","meta")),t;var i=r.next();if(i==e)return a.tokenize.pop(),t;u=n&&"\\"==i}return t}}return{startState:function(){return{tokenize:[_],currentIndent:0,lastToken:null,lastStyle:null,blocks:[]}},token:function(e,t){var n=t.tokenize[t.tokenize.length-1](e,t),r=e.current();return n&&"comment"!=n&&(t.lastToken=r,t.lastStyle=n),n},indent:function(t,n){return n=n.replace(/^\s*(?:\{%)?\s*|\s*(?:%\})?\s*$/g,""),p.test(n)||k.test(n)?e.indentUnit*(t.currentIndent-1):e.indentUnit*t.currentIndent},fold:"indent",electricInput:t(d.concat(h),!0),lineComment:"#"}})),e.defineMIME("text/x-crystal","crystal")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/css/css.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/css/css.js deleted file mode 100644 index 9cdf4cd11..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/css/css.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){for(var t={},r=0;r*\/]/.test(r)?x(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?x(null,r):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=P),x("variable callee","variable")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),x("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):e.match(/^\w+-/)?x("meta","meta"):void 0}function j(e){return function(t,r){for(var o,i=!1;null!=(o=t.next());){if(o==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==o}return(o==e||!i&&")"!=e)&&(r.tokenize=null),x("string","string")}}function P(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=j(")"),x(null,"(")}function q(e,t,r){this.type=e,this.indent=t,this.prev=r}function K(e,t,r,o){return e.context=new q(r,t.indentation()+(!1===o?0:n),e.context),r}function C(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function B(e,t,r){return O[r.context.type](e,t,r)}function _(e,t,r,o){for(var i=o||1;i>0;i--)r.context=r.context.prev;return B(e,t,r)}function T(e){var t=e.current().toLowerCase();a=f.hasOwnProperty(t)?"atom":h.hasOwnProperty(t)?"keyword":"variable"}var O={top:function(e,t,r){if("{"==e)return K(r,t,"block");if("}"==e&&r.context.prev)return C(r);if(w&&/@component/i.test(e))return K(r,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return K(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return K(r,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return K(r,t,"at");if("hash"==e)a="builtin";else if("word"==e)a="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return K(r,t,"interpolation");if(":"==e)return"pseudo";if(k&&"("==e)return K(r,t,"parens")}return r.context.type},block:function(e,t,r){if("word"==e){var o=t.current().toLowerCase();return u.hasOwnProperty(o)?(a="property","maybeprop"):m.hasOwnProperty(o)?(a=v?"string-2":"property","maybeprop"):k?(a=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(a+=" error","maybeprop")}return"meta"==e?"block":k||"hash"!=e&&"qualifier"!=e?O.top(e,t,r):(a="error","block")},maybeprop:function(e,t,r){return":"==e?K(r,t,"prop"):B(e,t,r)},prop:function(e,t,r){if(";"==e)return C(r);if("{"==e&&k)return K(r,t,"propBlock");if("}"==e||"{"==e)return _(e,t,r);if("("==e)return K(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)T(t);else if("interpolation"==e)return K(r,t,"interpolation")}else a+=" error";return"prop"},propBlock:function(e,t,r){return"}"==e?C(r):"word"==e?(a="property","maybeprop"):r.context.type},parens:function(e,t,r){return"{"==e||"}"==e?_(e,t,r):")"==e?C(r):"("==e?K(r,t,"parens"):"interpolation"==e?K(r,t,"interpolation"):("word"==e&&T(t),"parens")},pseudo:function(e,t,r){return"meta"==e?"pseudo":"word"==e?(a="variable-3",r.context.type):B(e,t,r)},documentTypes:function(e,t,r){return"word"==e&&s.hasOwnProperty(t.current())?(a="tag",r.context.type):O.atBlock(e,t,r)},atBlock:function(e,t,r){if("("==e)return K(r,t,"atBlock_parens");if("}"==e||";"==e)return _(e,t,r);if("{"==e)return C(r)&&K(r,t,k?"block":"top");if("interpolation"==e)return K(r,t,"interpolation");if("word"==e){var o=t.current().toLowerCase();a="only"==o||"not"==o||"and"==o||"or"==o?"keyword":c.hasOwnProperty(o)?"attribute":d.hasOwnProperty(o)?"property":p.hasOwnProperty(o)?"keyword":u.hasOwnProperty(o)?"property":m.hasOwnProperty(o)?v?"string-2":"property":f.hasOwnProperty(o)?"atom":h.hasOwnProperty(o)?"keyword":"error"}return r.context.type},atComponentBlock:function(e,t,r){return"}"==e?_(e,t,r):"{"==e?C(r)&&K(r,t,k?"block":"top",!1):("word"==e&&(a="error"),r.context.type)},atBlock_parens:function(e,t,r){return")"==e?C(r):"{"==e||"}"==e?_(e,t,r,2):O.atBlock(e,t,r)},restricted_atBlock_before:function(e,t,r){return"{"==e?K(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(a="variable","restricted_atBlock_before"):B(e,t,r)},restricted_atBlock:function(e,t,r){return"}"==e?(r.stateArg=null,C(r)):"word"==e?(a="@font-face"==r.stateArg&&!g.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!b.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,r){return"word"==e?(a="variable","keyframes"):"{"==e?K(r,t,"top"):B(e,t,r)},at:function(e,t,r){return";"==e?C(r):"{"==e||"}"==e?_(e,t,r):("word"==e?a="tag":"hash"==e&&(a="builtin"),"at")},interpolation:function(e,t,r){return"}"==e?C(r):"{"==e||";"==e?_(e,t,r):("word"==e?a="variable":"variable"!=e&&"("!=e&&")"!=e&&(a="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:o?"block":"top",stateArg:null,context:new q(o?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||z)(e,t);return r&&"object"==typeof r&&(i=r[1],r=r[0]),a=r,"comment"!=i&&(t.state=O[t.state](i,e,t)),a},indent:function(e,t){var r=e.context,o=t&&t.charAt(0),i=r.indent;return"prop"!=r.type||"}"!=o&&")"!=o||(r=r.prev),r.prev&&("}"!=o||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=o||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=o||"at"!=r.type&&"atBlock"!=r.type)||(i=Math.max(0,r.indent-n)):i=(r=r.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:y,fold:"brace"}}));var r=["domain","regexp","url","url-prefix"],o=t(r),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=t(i),n=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme","dynamic-range","video-dynamic-range"],l=t(n),s=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light","standard","high"],c=t(s),d=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],p=t(d),u=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],m=t(u),g=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),b=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),h=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],f=t(h),k=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],y=t(k),w=r.concat(i).concat(n).concat(s).concat(d).concat(u).concat(h).concat(k);function v(e,t){for(var r,o=!1;null!=(r=e.next());){if(o&&"/"==r){t.tokenize=null;break}o="*"==r}return["comment","comment"]}e.registerHelper("hintWords","css",w),e.defineMIME("text/css",{documentTypes:o,mediaTypes:a,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:m,fontProperties:g,counterDescriptors:b,colorKeywords:f,valueKeywords:y,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=v,v(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:a,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:m,colorKeywords:f,valueKeywords:y,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=v,v(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:a,mediaFeatures:l,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:m,colorKeywords:f,valueKeywords:y,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=v,v(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:a,mediaFeatures:l,propertyKeywords:p,nonStandardPropertyKeywords:m,fontProperties:g,counterDescriptors:b,colorKeywords:f,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=v,v(e,t))}},name:"css",helperType:"gss"})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/cypher/cypher.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/cypher/cypher.js deleted file mode 100644 index 930d11057..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/cypher/cypher.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var t=function(e){return new RegExp("^(?:"+e.join("|")+")$","i")};e.defineMode("cypher",(function(n){var r,i=function(e){r=null;var t=e.next();if('"'===t)return e.match(/^[^"]*"/),"string";if("'"===t)return e.match(/^[^']*'/),"string";if(/[{}\(\),\.;\[\]]/.test(t))return r=t,"node";if("/"===t&&e.eat("/"))return e.skipToEnd(),"comment";if(u.test(t))return e.eatWhile(u),null;if(e.eatWhile(/[_\w\d]/),e.eat(":"))return e.eatWhile(/[\w\d_\-]/),"atom";var n=e.current();return c.test(n)?"builtin":l.test(n)?"def":d.test(n)||p.test(n)?"keyword":"variable"},o=function(e,t,n){return e.context={prev:e.context,indent:e.indent,col:n,type:t}},a=function(e){return e.indent=e.context.indent,e.context=e.context.prev},s=n.indentUnit,c=t(["abs","acos","allShortestPaths","asin","atan","atan2","avg","ceil","coalesce","collect","cos","cot","count","degrees","e","endnode","exp","extract","filter","floor","haversin","head","id","keys","labels","last","left","length","log","log10","lower","ltrim","max","min","node","nodes","percentileCont","percentileDisc","pi","radians","rand","range","reduce","rel","relationship","relationships","replace","reverse","right","round","rtrim","shortestPath","sign","sin","size","split","sqrt","startnode","stdev","stdevp","str","substring","sum","tail","tan","timestamp","toFloat","toInt","toString","trim","type","upper"]),l=t(["all","and","any","contains","exists","has","in","none","not","or","single","xor"]),d=t(["as","asc","ascending","assert","by","case","commit","constraint","create","csv","cypher","delete","desc","descending","detach","distinct","drop","else","end","ends","explain","false","fieldterminator","foreach","from","headers","in","index","is","join","limit","load","match","merge","null","on","optional","order","periodic","profile","remove","return","scan","set","skip","start","starts","then","true","union","unique","unwind","using","when","where","with","call","yield"]),p=t(["access","active","assign","all","alter","as","catalog","change","copy","create","constraint","constraints","current","database","databases","dbms","default","deny","drop","element","elements","exists","from","grant","graph","graphs","if","index","indexes","label","labels","management","match","name","names","new","node","nodes","not","of","on","or","password","populated","privileges","property","read","relationship","relationships","remove","replace","required","revoke","role","roles","set","show","start","status","stop","suspended","to","traverse","type","types","user","users","with","write"]),u=/[*+\-<>=&|~%^]/;return{startState:function(){return{tokenize:i,context:null,indent:0,col:0}},token:function(e,t){if(e.sol()&&(t.context&&null==t.context.align&&(t.context.align=!1),t.indent=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);if("comment"!==n&&t.context&&null==t.context.align&&"pattern"!==t.context.type&&(t.context.align=!0),"("===r)o(t,")",e.column());else if("["===r)o(t,"]",e.column());else if("{"===r)o(t,"}",e.column());else if(/[\]\}\)]/.test(r)){for(;t.context&&"pattern"===t.context.type;)a(t);t.context&&r===t.context.type&&a(t)}else"."===r&&t.context&&"pattern"===t.context.type?a(t):/atom|string|variable/.test(n)&&t.context&&(/[\}\]]/.test(t.context.type)?o(t,"pattern",e.column()):"pattern"!==t.context.type||t.context.align||(t.context.align=!0,t.context.col=e.column()));return n},indent:function(t,n){var r=n&&n.charAt(0),i=t.context;if(/[\]\}]/.test(r))for(;i&&"pattern"===i.type;)i=i.prev;var o=i&&r===i.type;return i?"keywords"===i.type?e.commands.newlineAndIndent:i.align?i.col+(o?0:1):i.indent+(o?0:s):0}}})),e.modeExtensions.cypher={autoFormatLineBreaks:function(e){for(var t=e.split("\n"),n=/\s+\b(return|where|order by|match|with|skip|limit|create|delete|set)\b\s/g,r=0;r!?|\/]/;function m(e,t){var n,i=e.next();if(c[i]){var o=c[i](e,t);if(!1!==o)return o}if('"'==i||"'"==i||"`"==i)return t.tokenize=(n=i,function(e,t){for(var r,i=!1,o=!1;null!=(r=e.next());){if(r==n&&!i){o=!0;break}i=!i&&"\\"==r}return(o||!i&&!f)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(/[\[\]{}\(\),;\:\.]/.test(i))return r=i,null;if(/\d/.test(i))return e.eatWhile(/[\w\.]/),"number";if("/"==i){if(e.eat("+"))return t.tokenize=y,y(e,t);if(e.eat("*"))return t.tokenize=p,p(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(d.test(i))return e.eatWhile(d),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var m=e.current();return a.propertyIsEnumerable(m)?(u.propertyIsEnumerable(m)&&(r="newstatement"),"keyword"):l.propertyIsEnumerable(m)?(u.propertyIsEnumerable(m)&&(r="newstatement"),"builtin"):s.propertyIsEnumerable(m)?"atom":"variable"}function p(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function y(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="+"==n}return"comment"}function b(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function h(e,t,n){var r=e.indented;return e.context&&"statement"==e.context.type&&(r=e.context.indented),e.context=new b(r,t,n,null,e.context)}function k(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return{startState:function(e){return{tokenize:null,context:new b((e||0)-i,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;r=null;var i=(t.tokenize||m)(e,t);if("comment"==i||"meta"==i)return i;if(null==n.align&&(n.align=!0),";"!=r&&":"!=r&&","!=r||"statement"!=n.type)if("{"==r)h(t,e.column(),"}");else if("["==r)h(t,e.column(),"]");else if("("==r)h(t,e.column(),")");else if("}"==r){for(;"statement"==n.type;)n=k(t);for("}"==n.type&&(n=k(t));"statement"==n.type;)n=k(t)}else r==n.type?k(t):(("}"==n.type||"top"==n.type)&&";"!=r||"statement"==n.type&&"newstatement"==r)&&h(t,e.column(),"statement");else k(t);return t.startOfLine=!1,i},indent:function(t,n){if(t.tokenize!=m&&null!=t.tokenize)return e.Pass;var r=t.context,a=n&&n.charAt(0);"statement"==r.type&&"}"==a&&(r=r.prev);var l=a==r.type;return"statement"==r.type?r.indented+("{"==a?0:o):r.align?r.column+(l?0:1):r.indented+(l?0:i)},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}}));var n="body catch class do else enum for foreach foreach_reverse if in interface mixin out scope struct switch try union unittest version while with";e.defineMIME("text/x-d",{name:"d",keywords:t("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue debug default delegate delete deprecated export extern final finally function goto immutable import inout invariant is lazy macro module new nothrow override package pragma private protected public pure ref return shared short static super synchronized template this throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters "+n),blockKeywords:t(n),builtin:t("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte ucent uint ulong ushort wchar wstring void size_t sizediff_t"),atoms:t("exit failure success true false null"),hooks:{"@":function(e,t){return e.eatWhile(/[\w\$_]/),"meta"}}})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/dart/dart.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/dart/dart.js deleted file mode 100644 index f2f04cf2e..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/dart/dart.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../clike/clike"],e):e(CodeMirror)}((function(e){"use strict";var t="this super static final const abstract class extends external factory implements mixin get native set typedef with enum throw rethrow assert break case continue default in return new deferred async await covariant try catch finally do else for if switch while import library export part of show hide is as extension on yield late required".split(" "),n="try catch finally do else for if switch while".split(" "),i="true false null".split(" "),r="void bool num int double dynamic var String Null Never".split(" ");function o(e){for(var t={},n=0;n0&&(t.tokenize=l(t),null)},"/":function(e,t){return!!e.eat("*")&&(t.tokenize=s(1),t.tokenize(e,t))},token:function(e,t,n){if("variable"==n&&RegExp("^[_$]*[A-Z][a-zA-Z0-9_$]*$","g").test(e.current()))return"variable-2"}}}),e.registerHelper("hintWords","application/dart",t.concat(i).concat(r)),e.defineMode("dart",(function(t){return e.getMode(t,"application/dart")}),"clike")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/diff/diff.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/diff/diff.js deleted file mode 100644 index e67bd54fe..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/diff/diff.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("diff",(function(){var e={"+":"positive","-":"negative","@":"meta"};return{token:function(r){var i=r.string.search(/[\t ]+?$/);if(!r.sol()||0===i)return r.skipToEnd(),("error "+(e[r.string.charAt(0)]||"")).replace(/ $/,"");var o=e[r.peek()]||r.skipToEnd();return-1===i?r.skipToEnd():r.pos=i,o}}})),e.defineMIME("text/x-diff","diff")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/django/django.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/django/django.js deleted file mode 100644 index 3edc8eac2..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/django/django.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/overlay"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("django:inner",(function(){var e=["block","endblock","for","endfor","true","false","filter","endfilter","loop","none","self","super","if","elif","endif","as","else","import","with","endwith","without","context","ifequal","endifequal","ifnotequal","endifnotequal","extends","include","load","comment","endcomment","empty","url","static","trans","blocktrans","endblocktrans","now","regroup","lorem","ifchanged","endifchanged","firstof","debug","cycle","csrf_token","autoescape","endautoescape","spaceless","endspaceless","ssi","templatetag","verbatim","endverbatim","widthratio"],t=["add","addslashes","capfirst","center","cut","date","default","default_if_none","dictsort","dictsortreversed","divisibleby","escape","escapejs","filesizeformat","first","floatformat","force_escape","get_digit","iriencode","join","last","length","length_is","linebreaks","linebreaksbr","linenumbers","ljust","lower","make_list","phone2numeric","pluralize","pprint","random","removetags","rjust","safe","safeseq","slice","slugify","stringformat","striptags","time","timesince","timeuntil","title","truncatechars","truncatechars_html","truncatewords","truncatewords_html","unordered_list","upper","urlencode","urlize","urlizetrunc","wordcount","wordwrap","yesno"],r=["==","!=","<",">","<=",">="],i=["in","not","or","and"];function n(e,t){if(e.match("{{"))return t.tokenize=a,"tag";if(e.match("{%"))return t.tokenize=l,"tag";if(e.match("{#"))return t.tokenize=u,"comment";for(;null!=e.next()&&!e.match(/\{[{%#]/,!1););return null}function o(e,t){return function(r,i){return!i.escapeNext&&r.eat(e)?i.tokenize=t:(i.escapeNext&&(i.escapeNext=!1),"\\"==r.next()&&(i.escapeNext=!0)),"string"}}function a(e,r){if(r.waitDot){if(r.waitDot=!1,"."!=e.peek())return"null";if(e.match(/\.\W+/))return"error";if(e.eat("."))return r.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(r.waitPipe){if(r.waitPipe=!1,"|"!=e.peek())return"null";if(e.match(/\.\W+/))return"error";if(e.eat("|"))return r.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}return r.waitProperty&&(r.waitProperty=!1,e.match(/\b(\w+)\b/))?(r.waitDot=!0,r.waitPipe=!0,"property"):r.waitFilter&&(r.waitFilter=!1,e.match(t))?"variable-2":e.eatSpace()?(r.waitProperty=!1,"null"):e.match(/\b\d+(\.\d+)?\b/)?"number":e.match("'")?(r.tokenize=o("'",r.tokenize),"string"):e.match('"')?(r.tokenize=o('"',r.tokenize),"string"):e.match(/\b(\w+)\b/)&&!r.foundVariable?(r.waitDot=!0,r.waitPipe=!0,"variable"):e.match("}}")?(r.waitProperty=null,r.waitFilter=null,r.waitDot=null,r.waitPipe=null,r.tokenize=n,"tag"):(e.next(),"null")}function l(a,l){if(l.waitDot){if(l.waitDot=!1,"."!=a.peek())return"null";if(a.match(/\.\W+/))return"error";if(a.eat("."))return l.waitProperty=!0,"null";throw Error("Unexpected error while waiting for property.")}if(l.waitPipe){if(l.waitPipe=!1,"|"!=a.peek())return"null";if(a.match(/\.\W+/))return"error";if(a.eat("|"))return l.waitFilter=!0,"null";throw Error("Unexpected error while waiting for filter.")}if(l.waitProperty&&(l.waitProperty=!1,a.match(/\b(\w+)\b/)))return l.waitDot=!0,l.waitPipe=!0,"property";if(l.waitFilter&&(l.waitFilter=!1,a.match(t)))return"variable-2";if(a.eatSpace())return l.waitProperty=!1,"null";if(a.match(/\b\d+(\.\d+)?\b/))return"number";if(a.match("'"))return l.tokenize=o("'",l.tokenize),"string";if(a.match('"'))return l.tokenize=o('"',l.tokenize),"string";if(a.match(r))return"operator";if(a.match(i))return"keyword";var u=a.match(e);return u?("comment"==u[0]&&(l.blockCommentTag=!0),"keyword"):a.match(/\b(\w+)\b/)?(l.waitDot=!0,l.waitPipe=!0,"variable"):a.match("%}")?(l.waitProperty=null,l.waitFilter=null,l.waitDot=null,l.waitPipe=null,l.blockCommentTag?(l.blockCommentTag=!1,l.tokenize=c):l.tokenize=n,"tag"):(a.next(),"null")}function u(e,t){return e.match(/^.*?#\}/)?t.tokenize=n:e.skipToEnd(),"comment"}function c(e,t){return e.match(/\{%\s*endcomment\s*%\}/,!1)?(t.tokenize=l,e.match("{%"),"tag"):(e.next(),"comment")}return e=new RegExp("^\\b("+e.join("|")+")\\b"),t=new RegExp("^\\b("+t.join("|")+")\\b"),r=new RegExp("^\\b("+r.join("|")+")\\b"),i=new RegExp("^\\b("+i.join("|")+")\\b"),{startState:function(){return{tokenize:n}},token:function(e,t){return t.tokenize(e,t)},blockCommentStart:"{% comment %}",blockCommentEnd:"{% endcomment %}"}})),e.defineMode("django",(function(t){var r=e.getMode(t,"text/html"),i=e.getMode(t,"django:inner");return e.overlayMode(r,i)})),e.defineMIME("text/x-django","django")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/dockerfile/dockerfile.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/dockerfile/dockerfile.js deleted file mode 100644 index bf8a09c09..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/dockerfile/dockerfile.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],e):e(CodeMirror)}((function(e){"use strict";var n="from",t=new RegExp("^(\\s*)\\b("+n+")\\b","i"),r=["run","cmd","entrypoint","shell"],o=new RegExp("^(\\s*)("+r.join("|")+")(\\s+\\[)","i"),l="expose",s=new RegExp("^(\\s*)("+l+")(\\s+)","i"),x="("+[n,l].concat(r).concat(["arg","from","maintainer","label","env","add","copy","volume","user","workdir","onbuild","stopsignal","healthcheck","shell"]).join("|")+")",g=new RegExp("^(\\s*)"+x+"(\\s*)(#.*)?$","i"),i=new RegExp("^(\\s*)"+x+"(\\s+)","i");e.defineSimpleMode("dockerfile",{start:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:t,token:[null,"keyword"],sol:!0,next:"from"},{regex:g,token:[null,"keyword",null,"error"],sol:!0},{regex:o,token:[null,"keyword",null],sol:!0,next:"array"},{regex:s,token:[null,"keyword",null],sol:!0,next:"expose"},{regex:i,token:[null,"keyword",null],sol:!0,next:"arguments"},{regex:/./,token:null}],from:[{regex:/\s*$/,token:null,next:"start"},{regex:/(\s*)(#.*)$/,token:[null,"error"],next:"start"},{regex:/(\s*\S+\s+)(as)/i,token:[null,"keyword"],next:"start"},{token:null,next:"start"}],single:[{regex:/(?:[^\\']|\\.)/,token:"string"},{regex:/'/,token:"string",pop:!0}],double:[{regex:/(?:[^\\"]|\\.)/,token:"string"},{regex:/"/,token:"string",pop:!0}],array:[{regex:/\]/,token:null,next:"start"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"}],expose:[{regex:/\d+$/,token:"number",next:"start"},{regex:/[^\d]+$/,token:null,next:"start"},{regex:/\d+/,token:"number"},{regex:/[^\d]+/,token:null},{token:null,next:"start"}],arguments:[{regex:/^\s*#.*$/,sol:!0,token:"comment"},{regex:/"(?:[^\\"]|\\.)*"?$/,token:"string",next:"start"},{regex:/"/,token:"string",push:"double"},{regex:/'(?:[^\\']|\\.)*'?$/,token:"string",next:"start"},{regex:/'/,token:"string",push:"single"},{regex:/[^#"']+[\\`]$/,token:null},{regex:/[^#"']+$/,token:null,next:"start"},{regex:/[^#"']+/,token:null},{token:null,next:"start"}],meta:{lineComment:"#"}}),e.defineMIME("text/x-dockerfile","dockerfile")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/dtd/dtd.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/dtd/dtd.js deleted file mode 100644 index 98a45017f..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/dtd/dtd.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";t.defineMode("dtd",(function(t){var e,n=t.indentUnit;function r(t,n){return e=n,t}function a(t,e){var n,u=t.next();if("<"!=u||!t.eat("!")){if("<"==u&&t.eat("?"))return e.tokenize=("meta","?>",function(t,e){for(;!t.eol();){if(t.match("?>")){e.tokenize=a;break}t.next()}return"meta"}),r("meta",u);if("#"==u&&t.eatWhile(/[\w]/))return r("atom","tag");if("|"==u)return r("keyword","separator");if(u.match(/[\(\)\[\]\-\.,\+\?>]/))return r(null,u);if(u.match(/[\[\]]/))return r("rule",u);if('"'==u||"'"==u)return e.tokenize=(n=u,function(t,e){for(var i,u=!1;null!=(i=t.next());){if(i==n&&!u){e.tokenize=a;break}u=!u&&"\\"==i}return r("string","tag")}),e.tokenize(t,e);if(t.eatWhile(/[a-zA-Z\?\+\d]/)){var o=t.current();return null!==o.substr(o.length-1,o.length).match(/\?|\+/)&&t.backUp(1),r("tag","tag")}return"%"==u||"*"==u?r("number","number"):(t.eatWhile(/[\w\\\-_%.{,]/),r(null,null))}return t.eatWhile(/[\-]/)?(e.tokenize=i,i(t,e)):t.eatWhile(/[\w]/)?r("keyword","doindent"):void 0}function i(t,e){for(var n,i=0;null!=(n=t.next());){if(i>=2&&">"==n){e.tokenize=a;break}i="-"==n?i+1:0}return r("comment","comment")}return{startState:function(t){return{tokenize:a,baseIndent:t||0,stack:[]}},token:function(t,n){if(t.eatSpace())return null;var r=n.tokenize(t,n),a=n.stack[n.stack.length-1];return"["==t.current()||"doindent"===e||"["==e?n.stack.push("rule"):"endtag"===e?n.stack[n.stack.length-1]="endtag":"]"==t.current()||"]"==e||">"==e&&"rule"==a?n.stack.pop():"["==e&&n.stack.push("["),r},indent:function(t,r){var a=t.stack.length;return"]"===r.charAt(0)?a--:">"===r.substr(r.length-1,r.length)&&("<"===r.substr(0,1)||"doindent"==e&&r.length>1||("doindent"==e?a--:">"==e&&r.length>1||"tag"==e&&">"!==r||("tag"==e&&"rule"==t.stack[t.stack.length-1]?a--:"tag"==e?a++:">"===r&&"rule"==t.stack[t.stack.length-1]&&">"===e?a--:">"===r&&"rule"==t.stack[t.stack.length-1]||("<"!==r.substr(0,1)&&">"===r.substr(0,1)?a-=1:">"===r||(a-=1)))),null!=e&&"]"!=e||a--),t.baseIndent+a*n},electricChars:"]>"}})),t.defineMIME("application/xml-dtd","dtd")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/dylan/dylan.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/dylan/dylan.js deleted file mode 100644 index 1cc953866..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/dylan/dylan.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function n(e,n){for(var t=0;t",symbolGlobal:"\\*"+r+"\\*",symbolConstant:"\\$"+r},f={symbolKeyword:"atom",symbolClass:"tag",symbolGlobal:"variable-2",symbolConstant:"variable-3"};for(var l in a)a.hasOwnProperty(l)&&(a[l]=new RegExp("^"+a[l]));a.keyword=[/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];var c={keyword:"keyword",definition:"def",simpleDefinition:"def",signalingCalls:"builtin"},u={},s={};function m(e,n,t){return n.tokenize=t,t(e,n)}function d(e,n){var i=e.peek();if("'"==i||'"'==i)return e.next(),m(e,n,b(i,"string"));if("/"==i){if(e.next(),e.eat("*"))return m(e,n,p);if(e.eat("/"))return e.skipToEnd(),"comment";e.backUp(1)}else if(/[+\-\d\.]/.test(i)){if(e.match(/^[+-]?[0-9]*\.[0-9]*([esdx][+-]?[0-9]+)?/i)||e.match(/^[+-]?[0-9]+([esdx][+-]?[0-9]+)/i)||e.match(/^[+-]?\d+/))return"number"}else{if("#"==i)return e.next(),'"'==(i=e.peek())?(e.next(),m(e,n,b('"',"string"))):"b"==i?(e.next(),e.eatWhile(/[01]/),"number"):"x"==i?(e.next(),e.eatWhile(/[\da-f]/i),"number"):"o"==i?(e.next(),e.eatWhile(/[0-7]/),"number"):"#"==i?(e.next(),"punctuation"):"["==i||"("==i?(e.next(),"bracket"):e.match(/f|t|all-keys|include|key|next|rest/i)?"atom":(e.eatWhile(/[-a-zA-Z]/),"error");if("~"==i)return e.next(),"="==(i=e.peek())?(e.next(),"="==(i=e.peek())?(e.next(),"operator"):"operator"):"operator";if(":"==i){if(e.next(),"="==(i=e.peek()))return e.next(),"operator";if(":"==i)return e.next(),"punctuation"}else{if(-1!="[](){}".indexOf(i))return e.next(),"bracket";if(-1!=".,".indexOf(i))return e.next(),"punctuation";if(e.match("end"))return"keyword"}}for(var r in a)if(a.hasOwnProperty(r)){var l=a[r];if(l instanceof Array&&t(l,(function(n){return e.match(n)}))||e.match(l))return f[r]}return/[+\-*\/^=<>&|]/.test(i)?(e.next(),"operator"):e.match("define")?"def":(e.eatWhile(/[\w\-]/),u.hasOwnProperty(e.current())?s[e.current()]:e.current().match(o)?"variable":(e.next(),"variable-2"))}function p(e,n){for(var t,i=!1,r=!1,o=0;t=e.next();){if("/"==t&&i){if(!(o>0)){n.tokenize=d;break}o--}else"*"==t&&r&&o++;i="*"==t,r="/"==t}return"comment"}function b(e,n){return function(t,i){for(var r,o=!1,a=!1;null!=(r=t.next());){if(r==e&&!o){a=!0;break}o=!o&&"\\"==r}return!a&&o||(i.tokenize=d),n}}return n(["keyword","definition","simpleDefinition","signalingCalls"],(function(e){n(i[e],(function(n){u[n]=e,s[n]=c[e]}))})),{startState:function(){return{tokenize:d,currentIndent:0}},token:function(e,n){return e.eatSpace()?null:n.tokenize(e,n)},blockCommentStart:"/*",blockCommentEnd:"*/"}})),e.defineMIME("text/x-dylan","dylan")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ebnf/ebnf.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ebnf/ebnf.js deleted file mode 100644 index 3865fcfd4..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ebnf/ebnf.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("ebnf",(function(t){var a=null;return t.bracesMode&&(a=e.getMode(t,t.bracesMode)),{startState:function(){return{stringType:null,commentType:null,braced:0,lhs:!0,localState:null,stack:[],inDefinition:!1}},token:function(t,r){if(t){switch(0===r.stack.length&&('"'==t.peek()||"'"==t.peek()?(r.stringType=t.peek(),t.next(),r.stack.unshift(1)):t.match("/*")?(r.stack.unshift(0),r.commentType=0):t.match("(*")&&(r.stack.unshift(0),r.commentType=1)),r.stack[0]){case 1:for(;1===r.stack[0]&&!t.eol();)t.peek()===r.stringType?(t.next(),r.stack.shift()):"\\"===t.peek()?(t.next(),t.next()):t.match(/^.[^\\\"\']*/);return r.lhs?"property string":"string";case 0:for(;0===r.stack[0]&&!t.eol();)0===r.commentType&&t.match("*/")||1===r.commentType&&t.match("*)")?(r.stack.shift(),r.commentType=null):t.match(/^.[^\*]*/);return"comment";case 2:for(;2===r.stack[0]&&!t.eol();)t.match(/^[^\]\\]+/)||t.match(".")||r.stack.shift();return"operator"}var c=t.peek();if(null!==a&&(r.braced||"{"===c)){null===r.localState&&(r.localState=e.startState(a));var n=a.token(t,r.localState),i=t.current();if(!n)for(var o=0;o>/))return"builtin"}return t.match("//")?(t.skipToEnd(),"comment"):t.match("return")?"operator":t.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)?t.match(/(?=[\(.])/)?"variable":t.match(/(?=[\s\n]*[:=])/)?"def":"variable-2":-1!=["[","]","(",")"].indexOf(t.peek())?(t.next(),"bracket"):(t.eatSpace()||t.next(),null)}}}})),e.defineMIME("text/x-ebnf","ebnf")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ecl/ecl.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ecl/ecl.js deleted file mode 100644 index 3e7a3808f..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ecl/ecl.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("ecl",(function(e){function t(e){for(var t={},n=e.split(" "),r=0;r!?|\/]/;function f(e,t){var r,h=e.next();if(d[h]){var y=d[h](e,t);if(!1!==y)return y}if('"'==h||"'"==h)return t.tokenize=(r=h,function(e,t){for(var n,o=!1,i=!1;null!=(n=e.next());){if(n==r&&!o){i=!0;break}o=!o&&"\\"==n}return!i&&o||(t.tokenize=f),"string"}),t.tokenize(e,t);if(/[\[\]{}\(\),;\:\.]/.test(h))return n=h,null;if(/\d/.test(h))return e.eatWhile(/[\w\.]/),"number";if("/"==h){if(e.eat("*"))return t.tokenize=m,m(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(p.test(h))return e.eatWhile(p),"operator";e.eatWhile(/[\w\$_]/);var b=e.current().toLowerCase();if(o.propertyIsEnumerable(b))return c.propertyIsEnumerable(b)&&(n="newstatement"),"keyword";if(i.propertyIsEnumerable(b))return c.propertyIsEnumerable(b)&&(n="newstatement"),"variable";if(a.propertyIsEnumerable(b))return c.propertyIsEnumerable(b)&&(n="newstatement"),"variable-2";if(l.propertyIsEnumerable(b))return c.propertyIsEnumerable(b)&&(n="newstatement"),"variable-3";if(s.propertyIsEnumerable(b))return c.propertyIsEnumerable(b)&&(n="newstatement"),"builtin";for(var g=b.length-1;g>=0&&(!isNaN(b[g])||"_"==b[g]);)--g;if(g>0){var v=b.substr(0,g+1);if(l.propertyIsEnumerable(v))return c.propertyIsEnumerable(v)&&(n="newstatement"),"variable-3"}return u.propertyIsEnumerable(b)?"atom":null}function m(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=f;break}r="*"==n}return"comment"}function h(e,t,n,r,o){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=o}function y(e,t,n){return e.context=new h(e.indented,t,n,null,e.context)}function b(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return{startState:function(e){return{tokenize:null,context:new h((e||0)-r,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var r=t.context;if(e.sol()&&(null==r.align&&(r.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;n=null;var o=(t.tokenize||f)(e,t);if("comment"==o||"meta"==o)return o;if(null==r.align&&(r.align=!0),";"!=n&&":"!=n||"statement"!=r.type)if("{"==n)y(t,e.column(),"}");else if("["==n)y(t,e.column(),"]");else if("("==n)y(t,e.column(),")");else if("}"==n){for(;"statement"==r.type;)r=b(t);for("}"==r.type&&(r=b(t));"statement"==r.type;)r=b(t)}else n==r.type?b(t):("}"==r.type||"top"==r.type||"statement"==r.type&&"newstatement"==n)&&y(t,e.column(),"statement");else b(t);return t.startOfLine=!1,o},indent:function(e,t){if(e.tokenize!=f&&null!=e.tokenize)return 0;var n=e.context,o=t&&t.charAt(0);"statement"==n.type&&"}"==o&&(n=n.prev);var i=o==n.type;return"statement"==n.type?n.indented+("{"==o?0:r):n.align?n.column+(i?0:1):n.indented+(i?0:r)},electricChars:"{}"}})),e.defineMIME("text/x-ecl","ecl")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/eiffel/eiffel.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/eiffel/eiffel.js deleted file mode 100644 index ddd84d118..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/eiffel/eiffel.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("eiffel",(function(){function e(e){for(var t={},r=0,n=e.length;r>"]);function n(e,t){if(e.eatSpace())return null;var r,n=e.next();return'"'==n||"'"==n?function(e,t,r){return r.tokenize.push(e),e(t,r)}((r=n,"string",function(e,t){for(var n,i=!1;null!=(n=e.next());){if(n==r&&!i){t.tokenize.pop();break}i=!i&&"%"==n}return"string"}),e,t):"-"==n&&e.eat("-")?(e.skipToEnd(),"comment"):":"==n&&e.eat("=")?"operator":/[0-9]/.test(n)?(e.eatWhile(/[xXbBCc0-9\.]/),e.eat(/[\?\!]/),"ident"):/[a-zA-Z_0-9]/.test(n)?(e.eatWhile(/[a-zA-Z_0-9]/),e.eat(/[\?\!]/),"ident"):/[=+\-\/*^%<>~]/.test(n)?(e.eatWhile(/[=+\-\/*^%<>~]/),"operator"):null}return{startState:function(){return{tokenize:[n]}},token:function(e,n){var i=n.tokenize[n.tokenize.length-1](e,n);if("ident"==i){var o=e.current();i=t.propertyIsEnumerable(e.current())?"keyword":r.propertyIsEnumerable(e.current())?"operator":/^[A-Z][A-Z_0-9]*$/g.test(o)?"tag":/^0[bB][0-1]+$/g.test(o)||/^0[cC][0-7]+$/g.test(o)||/^0[xX][a-fA-F0-9]+$/g.test(o)||/^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(o)||/^[0-9]+$/g.test(o)?"number":"variable"}return i},lineComment:"--"}})),e.defineMIME("text/x-eiffel","eiffel")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/elm/elm.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/elm/elm.js deleted file mode 100644 index 0943ac075..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/elm/elm.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("elm",(function(){function e(e,t,r){return t(r),r(e,t)}var t=/[a-z]/,r=/[A-Z]/,n=/[a-zA-Z0-9_]/,i=/[0-9]/,o=/[0-9A-Fa-f]/,f=/[-&*+.\\/<>=?^|:]/,u=/[(),[\]{}]/,a=/[ \v\f]/;function s(){return function(s,x){if(s.eatWhile(a))return null;var h=s.next();if(u.test(h))return"{"===h&&s.eat("-")?e(s,x,l(1)):"["===h&&s.match("glsl|")?e(s,x,p):"builtin";if("'"===h)return e(s,x,m);if('"'===h)return s.eat('"')?s.eat('"')?e(s,x,c):"string":e(s,x,d);if(r.test(h))return s.eatWhile(n),"variable-2";if(t.test(h)){var k=1===s.pos;return s.eatWhile(n),k?"def":"variable"}if(i.test(h)){if("0"===h){if(s.eat(/[xX]/))return s.eatWhile(o),"number"}else s.eatWhile(i);return s.eat(".")&&s.eatWhile(i),s.eat(/[eE]/)&&(s.eat(/[-+]/),s.eatWhile(i)),"number"}return f.test(h)?"-"===h&&s.eat("-")?(s.skipToEnd(),"comment"):(s.eatWhile(f),"keyword"):"_"===h?"keyword":"error"}}function l(e){return 0==e?s():function(t,r){for(;!t.eol();){var n=t.next();if("{"==n&&t.eat("-"))++e;else if("-"==n&&t.eat("}")&&0==--e)return r(s()),"comment"}return r(l(e)),"comment"}}function c(e,t){for(;!e.eol();)if('"'===e.next()&&e.eat('"')&&e.eat('"'))return t(s()),"string";return"string"}function d(e,t){for(;e.skipTo('\\"');)e.next(),e.next();return e.skipTo('"')?(e.next(),t(s()),"string"):(e.skipToEnd(),t(s()),"error")}function m(e,t){for(;e.skipTo("\\'");)e.next(),e.next();return e.skipTo("'")?(e.next(),t(s()),"string"):(e.skipToEnd(),t(s()),"error")}function p(e,t){for(;!e.eol();)if("|"===e.next()&&e.eat("]"))return t(s()),"string";return"string"}var x={case:1,of:1,as:1,if:1,then:1,else:1,let:1,in:1,type:1,alias:1,module:1,where:1,import:1,exposing:1,port:1};return{startState:function(){return{f:s()}},copyState:function(e){return{f:e.f}},token:function(e,t){var r=t.f(e,(function(e){t.f=e})),n=e.current();return x.hasOwnProperty(n)?"keyword":r}}})),e.defineMIME("text/x-elm","elm")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/erlang/erlang.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/erlang/erlang.js deleted file mode 100644 index 39c656d55..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/erlang/erlang.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMIME("text/x-erlang","erlang"),e.defineMode("erlang",(function(t){var n=["-type","-spec","-export_type","-opaque"],r=["after","begin","catch","case","cond","end","fun","if","let","of","query","receive","try","when"],i=/[\->,;]/,o=["->",";",","],a=["and","andalso","band","bnot","bor","bsl","bsr","bxor","div","not","or","orelse","rem","xor"],c=/[\+\-\*\/<>=\|:!]/,s=["=","+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"],u=/[<\(\[\{]/,l=["<<","(","[","{"],_=/[>\)\]\}]/,f=["}","]",")",">>"],p=["is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_record","is_reference","is_tuple","atom","binary","bitstring","boolean","function","integer","list","number","pid","port","record","reference","tuple"],m=["abs","adler32","adler32_combine","alive","apply","atom_to_binary","atom_to_list","binary_to_atom","binary_to_existing_atom","binary_to_list","binary_to_term","bit_size","bitstring_to_list","byte_size","check_process_code","contact_binary","crc32","crc32_combine","date","decode_packet","delete_module","disconnect_node","element","erase","exit","float","float_to_list","garbage_collect","get","get_keys","group_leader","halt","hd","integer_to_list","internal_bif","iolist_size","iolist_to_binary","is_alive","is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_process_alive","is_record","is_reference","is_tuple","length","link","list_to_atom","list_to_binary","list_to_bitstring","list_to_existing_atom","list_to_float","list_to_integer","list_to_pid","list_to_tuple","load_module","make_ref","module_loaded","monitor_node","node","node_link","node_unlink","nodes","notalive","now","open_port","pid_to_list","port_close","port_command","port_connect","port_control","pre_loaded","process_flag","process_info","processes","purge_module","put","register","registered","round","self","setelement","size","spawn","spawn_link","spawn_monitor","spawn_opt","split_binary","statistics","term_to_binary","time","throw","tl","trunc","tuple_size","tuple_to_list","unlink","unregister","whereis"],d=/[\w@Ø-ÞÀ-Öß-öø-ÿ]/,b=/[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/;function g(e,t,n){if(1==e.current().length&&t.test(e.current())){for(e.backUp(1);t.test(e.peek());)if(e.next(),w(e.current(),n))return!0;e.backUp(e.current().length-1)}return!1}function k(e,t,n){if(1==e.current().length&&t.test(e.current())){for(;t.test(e.peek());)e.next();for(;01&&"fun"===e[t].type&&"fun"===e[t-1].token)return e.slice(0,t-1);switch(e[t].token){case"}":return U(e,{g:["{"]});case"]":return U(e,{i:["["]});case")":return U(e,{i:["("]});case">>":return U(e,{i:["<<"]});case"end":return U(e,{i:["begin","case","fun","if","receive","try"]});case",":return U(e,{e:["begin","try","when","->",",","(","[","{","<<"]});case"->":return U(e,{r:["when"],m:["try","if","case","receive"]});case";":return U(e,{E:["case","fun","if","receive","try","when"]});case"catch":return U(e,{e:["try"]});case"of":return U(e,{e:["case"]});case"after":return U(e,{e:["receive","try"]});default:return e}}(e.tokenStack))}(e,function(e,t){return S(t.current(),t.column(),t.indentation(),e)}(n,t)),n){case"atom":case"boolean":return"atom";case"attribute":return"attribute";case"builtin":return"builtin";case"close_paren":case"colon":case"dot":case"open_paren":case"separator":default:return null;case"comment":return"comment";case"error":return"error";case"fun":return"meta";case"function":return"tag";case"guard":return"property";case"keyword":return"keyword";case"macro":return"variable-2";case"number":return"number";case"operator":return"operator";case"record":return"bracket";case"string":return"string";case"type":return"def";case"variable":return"variable"}}function S(e,t,n,r){return{token:e,column:t,indent:n,type:r}}function z(e){return S(e,0,0,e)}function W(e,t){var n=e.tokenStack.length,r=t||1;return!(n>|\|+|\(/))&&0===o.index?o[0]:"",s=W(n,1),u=W(n,2);return n.in_string||n.in_atom?e.Pass:u?"when"==s.token?s.column+a:"when"===c&&"function"===u.type?u.indent+a:"("===c&&"fun"===s.token?s.column+3:"catch"===c&&(i=E(n,["try"]))?i.column:w(c,["end","after","of"])?(i=E(n,["begin","case","fun","if","receive","try"]))?i.column:e.Pass:w(c,f)?(i=E(n,l))?i.column:e.Pass:w(s.token,[",","|","||"])||w(c,[",","|","||"])?(i=function(e){var t=e.tokenStack.slice(0,-1),n=A(t,"type",["open_paren"]);return!!Z(t[n])&&t[n]}(n),i?i.column+i.token.length:a):"->"==s.token?w(u.token,["receive","case","if","try"])?u.column+a+a:u.column+a:w(s.token,l)?s.column+s.token.length:(i=function(e){var t=e.tokenStack,n=A(t,"type",["open_paren","separator","keyword"]),r=A(t,"type",["operator"]);return Z(n)&&Z(r)&&n|\.\*\?]+(?=\s|$)/,token:"builtin"},{regex:/[\)><]+\S+(?=\s|$)/,token:"builtin"},{regex:/(?:[\+\-\=\/\*<>])(?=\s|$)/,token:"keyword"},{regex:/\S+/,token:"variable"},{regex:/\s+|./,token:null}],vocabulary:[{regex:/;/,token:"keyword",next:"start"},{regex:/\S+/,token:"tag"},{regex:/\s+|./,token:null}],string:[{regex:/(?:[^\\]|\\.)*?"/,token:"string",next:"start"},{regex:/.*/,token:"string"}],string2:[{regex:/^;/,token:"keyword",next:"start"},{regex:/.*/,token:"string"}],string3:[{regex:/(?:[^\\]|\\.)*?"""/,token:"string",next:"start"},{regex:/.*/,token:"string"}],stack:[{regex:/\)/,token:"bracket",next:"start"},{regex:/--/,token:"bracket"},{regex:/\S+/,token:"meta"},{regex:/\s+|./,token:null}],meta:{dontIndentStates:["start","vocabulary","string","string3","stack"],lineComment:"!"}}),e.defineMIME("text/x-factor","factor")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/fcl/fcl.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/fcl/fcl.js deleted file mode 100644 index 508236de2..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/fcl/fcl.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("fcl",(function(e){var n=e.indentUnit,t={term:!0,method:!0,accu:!0,rule:!0,then:!0,is:!0,and:!0,or:!0,if:!0,default:!0},r={var_input:!0,var_output:!0,fuzzify:!0,defuzzify:!0,function_block:!0,ruleblock:!0},o={end_ruleblock:!0,end_defuzzify:!0,end_function_block:!0,end_fuzzify:!0,end_var:!0},i={true:!0,false:!0,nan:!0,real:!0,min:!0,max:!0,cog:!0,cogs:!0},u=/[+\-*&^%:=<>!|\/]/;function a(e,n){var a=e.next();if(/[\d\.]/.test(a))return"."==a?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"==a?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if("/"==a||"("==a){if(e.eat("*"))return n.tokenize=c,c(e,n);if(e.eat("/"))return e.skipToEnd(),"comment"}if(u.test(a))return e.eatWhile(u),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var f=e.current().toLowerCase();return t.propertyIsEnumerable(f)||r.propertyIsEnumerable(f)||o.propertyIsEnumerable(f)?"keyword":i.propertyIsEnumerable(f)?"atom":"variable"}function c(e,n){for(var t,r=!1;t=e.next();){if(("/"==t||")"==t)&&r){n.tokenize=a;break}r="*"==t}return"comment"}function f(e,n,t,r,o){this.indented=e,this.column=n,this.type=t,this.align=r,this.prev=o}return{startState:function(e){return{tokenize:null,context:new f((e||0)-n,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var t=n.context;if(e.sol()&&(null==t.align&&(t.align=!1),n.indented=e.indentation(),n.startOfLine=!0),e.eatSpace())return null;var i=(n.tokenize||a)(e,n);if("comment"==i)return i;null==t.align&&(t.align=!0);var u=e.current().toLowerCase();return r.propertyIsEnumerable(u)?function(e,n,t){e.context=new f(e.indented,n,"end_block",null,e.context)}(n,e.column()):o.propertyIsEnumerable(u)&&function(e){e.context.prev&&("end_block"==e.context.type&&(e.indented=e.context.indented),e.context=e.context.prev)}(n),n.startOfLine=!1,i},indent:function(e,t){if(e.tokenize!=a&&null!=e.tokenize)return 0;var r=e.context,i=o.propertyIsEnumerable(t);return r.align?r.column+(i?0:1):r.indented+(i?0:n)},electricChars:"ryk",fold:"brace",blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:"//"}})),e.defineMIME("text/x-fcl","fcl")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/forth/forth.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/forth/forth.js deleted file mode 100644 index a05ab3f71..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/forth/forth.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";function e(t){var e=[];return t.split(" ").forEach((function(t){e.push({name:t})})),e}var E=e("INVERT AND OR XOR 2* 2/ LSHIFT RSHIFT 0= = 0< < > U< MIN MAX 2DROP 2DUP 2OVER 2SWAP ?DUP DEPTH DROP DUP OVER ROT SWAP >R R> R@ + - 1+ 1- ABS NEGATE S>D * M* UM* FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2! ALIGN ALIGNED +! ALLOT CHAR [CHAR] [ ] BL FIND EXECUTE IMMEDIATE COUNT LITERAL STATE ; DOES> >BODY EVALUATE SOURCE >IN <# # #S #> HOLD SIGN BASE >NUMBER HEX DECIMAL FILL MOVE . CR EMIT SPACE SPACES TYPE U. .R U.R ACCEPT TRUE FALSE <> U> 0<> 0> NIP TUCK ROLL PICK 2>R 2R@ 2R> WITHIN UNUSED MARKER I J TO COMPILE, [COMPILE] SAVE-INPUT RESTORE-INPUT PAD ERASE 2LITERAL DNEGATE D- D+ D0< D0= D2* D2/ D< D= DMAX DMIN D>S DABS M+ M*/ D. D.R 2ROT DU< CATCH THROW FREE RESIZE ALLOCATE CS-PICK CS-ROLL GET-CURRENT SET-CURRENT FORTH-WORDLIST GET-ORDER SET-ORDER PREVIOUS SEARCH-WORDLIST WORDLIST FIND ALSO ONLY FORTH DEFINITIONS ORDER -TRAILING /STRING SEARCH COMPARE CMOVE CMOVE> BLANK SLITERAL"),i=e("IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE");t.defineMode("forth",(function(){function t(t,e){var E;for(E=t.length-1;E>=0;E--)if(t[E].name===e.toUpperCase())return t[E]}return{startState:function(){return{state:"",base:10,coreWordList:E,immediateWordList:i,wordList:[]}},token:function(e,E){var i;if(e.eatSpace())return null;if(""===E.state){if(e.match(/^(\]|:NONAME)(\s|$)/i))return E.state=" compilation","builtin compilation";if(i=e.match(/^(\:)\s+(\S+)(\s|$)+/))return E.wordList.push({name:i[2].toUpperCase()}),E.state=" compilation","def"+E.state;if(i=e.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\s+(\S+)(\s|$)+/i))return E.wordList.push({name:i[2].toUpperCase()}),"def"+E.state;if(i=e.match(/^(\'|\[\'\])\s+(\S+)(\s|$)+/))return"builtin"+E.state}else{if(e.match(/^(\;|\[)(\s)/))return E.state="",e.backUp(1),"builtin compilation";if(e.match(/^(\;|\[)($)/))return E.state="","builtin compilation";if(e.match(/^(POSTPONE)\s+\S+(\s|$)+/))return"builtin"}return(i=e.match(/^(\S+)(\s+|$)/))?void 0!==t(E.wordList,i[1])?"variable"+E.state:"\\"===i[1]?(e.skipToEnd(),"comment"+E.state):void 0!==t(E.coreWordList,i[1])?"builtin"+E.state:void 0!==t(E.immediateWordList,i[1])?"keyword"+E.state:"("===i[1]?(e.eatWhile((function(t){return")"!==t})),e.eat(")"),"comment"+E.state):".("===i[1]?(e.eatWhile((function(t){return")"!==t})),e.eat(")"),"string"+E.state):'S"'===i[1]||'."'===i[1]||'C"'===i[1]?(e.eatWhile((function(t){return'"'!==t})),e.eat('"'),"string"+E.state):i[1]-68719476735?"number"+E.state:"atom"+E.state:void 0}}})),t.defineMIME("text/x-forth","forth")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/fortran/fortran.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/fortran/fortran.js deleted file mode 100644 index aead7397c..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/fortran/fortran.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("fortran",(function(){function e(e){for(var t={},n=0;n\/\:]/,r=/^\.(and|or|eq|lt|le|gt|ge|ne|not|eqv|neqv)\./i;function o(e,o){if(e.match(r))return"operator";var c,l=e.next();if("!"==l)return e.skipToEnd(),"comment";if('"'==l||"'"==l)return o.tokenize=(c=l,function(e,t){for(var n,i=!1,a=!1;null!=(n=e.next());){if(n==c&&!i){a=!0;break}i=!i&&"\\"==n}return!a&&i||(t.tokenize=null),"string"}),o.tokenize(e,o);if(/[\[\]\(\),]/.test(l))return null;if(/\d/.test(l))return e.eatWhile(/[\w\.]/),"number";if(a.test(l))return e.eatWhile(a),"operator";e.eatWhile(/[\w\$_]/);var s=e.current().toLowerCase();return t.hasOwnProperty(s)?"keyword":n.hasOwnProperty(s)||i.hasOwnProperty(s)?"builtin":"variable"}return{startState:function(){return{tokenize:null}},token:function(e,t){return e.eatSpace()?null:(t.tokenize||o)(e,t)}}})),e.defineMIME("text/x-fortran","fortran")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/gas/gas.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/gas/gas.js deleted file mode 100644 index 584673d75..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/gas/gas.js +++ /dev/null @@ -1 +0,0 @@ -!function(i){"object"==typeof exports&&"object"==typeof module?i(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],i):i(CodeMirror)}((function(i){"use strict";i.defineMode("gas",(function(i,l){var t=[],e="",n={".abort":"builtin",".align":"builtin",".altmacro":"builtin",".ascii":"builtin",".asciz":"builtin",".balign":"builtin",".balignw":"builtin",".balignl":"builtin",".bundle_align_mode":"builtin",".bundle_lock":"builtin",".bundle_unlock":"builtin",".byte":"builtin",".cfi_startproc":"builtin",".comm":"builtin",".data":"builtin",".def":"builtin",".desc":"builtin",".dim":"builtin",".double":"builtin",".eject":"builtin",".else":"builtin",".elseif":"builtin",".end":"builtin",".endef":"builtin",".endfunc":"builtin",".endif":"builtin",".equ":"builtin",".equiv":"builtin",".eqv":"builtin",".err":"builtin",".error":"builtin",".exitm":"builtin",".extern":"builtin",".fail":"builtin",".file":"builtin",".fill":"builtin",".float":"builtin",".func":"builtin",".global":"builtin",".gnu_attribute":"builtin",".hidden":"builtin",".hword":"builtin",".ident":"builtin",".if":"builtin",".incbin":"builtin",".include":"builtin",".int":"builtin",".internal":"builtin",".irp":"builtin",".irpc":"builtin",".lcomm":"builtin",".lflags":"builtin",".line":"builtin",".linkonce":"builtin",".list":"builtin",".ln":"builtin",".loc":"builtin",".loc_mark_labels":"builtin",".local":"builtin",".long":"builtin",".macro":"builtin",".mri":"builtin",".noaltmacro":"builtin",".nolist":"builtin",".octa":"builtin",".offset":"builtin",".org":"builtin",".p2align":"builtin",".popsection":"builtin",".previous":"builtin",".print":"builtin",".protected":"builtin",".psize":"builtin",".purgem":"builtin",".pushsection":"builtin",".quad":"builtin",".reloc":"builtin",".rept":"builtin",".sbttl":"builtin",".scl":"builtin",".section":"builtin",".set":"builtin",".short":"builtin",".single":"builtin",".size":"builtin",".skip":"builtin",".sleb128":"builtin",".space":"builtin",".stab":"builtin",".string":"builtin",".struct":"builtin",".subsection":"builtin",".symver":"builtin",".tag":"builtin",".text":"builtin",".title":"builtin",".type":"builtin",".uleb128":"builtin",".val":"builtin",".version":"builtin",".vtable_entry":"builtin",".vtable_inherit":"builtin",".warning":"builtin",".weak":"builtin",".weakref":"builtin",".word":"builtin"},b={},r=(l.architecture||"x86").toLowerCase();function a(i,l){for(var t,e=!1;null!=(t=i.next());){if("/"===t&&e){l.tokenize=null;break}e="*"===t}return"comment"}return"x86"===r?(e="#",b.al="variable",b.ah="variable",b.ax="variable",b.eax="variable-2",b.rax="variable-3",b.bl="variable",b.bh="variable",b.bx="variable",b.ebx="variable-2",b.rbx="variable-3",b.cl="variable",b.ch="variable",b.cx="variable",b.ecx="variable-2",b.rcx="variable-3",b.dl="variable",b.dh="variable",b.dx="variable",b.edx="variable-2",b.rdx="variable-3",b.si="variable",b.esi="variable-2",b.rsi="variable-3",b.di="variable",b.edi="variable-2",b.rdi="variable-3",b.sp="variable",b.esp="variable-2",b.rsp="variable-3",b.bp="variable",b.ebp="variable-2",b.rbp="variable-3",b.ip="variable",b.eip="variable-2",b.rip="variable-3",b.cs="keyword",b.ds="keyword",b.ss="keyword",b.es="keyword",b.fs="keyword",b.gs="keyword"):"arm"!==r&&"armv6"!==r||(e="@",n.syntax="builtin",b.r0="variable",b.r1="variable",b.r2="variable",b.r3="variable",b.r4="variable",b.r5="variable",b.r6="variable",b.r7="variable",b.r8="variable",b.r9="variable",b.r10="variable",b.r11="variable",b.r12="variable",b.sp="variable-2",b.lr="variable-2",b.pc="variable-2",b.r13=b.sp,b.r14=b.lr,b.r15=b.pc,t.push((function(i,l){if("#"===i)return l.eatWhile(/\w/),"number"}))),{startState:function(){return{tokenize:null}},token:function(i,l){if(l.tokenize)return l.tokenize(i,l);if(i.eatSpace())return null;var r,u,o=i.next();if("/"===o&&i.eat("*"))return l.tokenize=a,a(i,l);if(o===e)return i.skipToEnd(),"comment";if('"'===o)return function(i,l){for(var t,e=!1;null!=(t=i.next());){if('"'===t&&!e)return!1;e=!e&&"\\"===t}}(i),"string";if("."===o)return i.eatWhile(/\w/),u=i.current().toLowerCase(),(r=n[u])||null;if("="===o)return i.eatWhile(/\w/),"tag";if("{"===o)return"bracket";if("}"===o)return"bracket";if(/\d/.test(o))return"0"===o&&i.eat("x")?(i.eatWhile(/[0-9a-fA-F]/),"number"):(i.eatWhile(/\d/),"number");if(/\w/.test(o))return i.eatWhile(/\w/),i.eat(":")?"tag":(u=i.current().toLowerCase(),(r=b[u])||null);for(var c=0;c]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode("gfm",(function(a,o){var n=0,i={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,a){if(a.combineTokens=null,a.codeBlock)return e.match(/^```+/)?(a.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(a.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),a.codeBlock=!0,null;if("`"===e.peek()){e.next();var i=e.pos;e.eatWhile("`");var r=1+e.pos-i;return a.code?r===n&&(a.code=!1):(n=r,a.code=!0),null}if(a.code)return e.next(),null;if(e.eatSpace())return a.ateSpace=!0,null;if((e.sol()||a.ateSpace)&&(a.ateSpace=!1,!1!==o.gitHubSpice)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return a.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return a.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(a.combineTokens=!0,"link"):(e.next(),null)},blankLine:function(e){return e.code=!1,null}},r={taskLists:!0,strikethrough:!0,emoji:!0};for(var s in o)r[s]=o[s];return r.name="markdown",e.overlayMode(e.getMode(a,r),i)}),"markdown"),e.defineMIME("text/x-gfm","gfm")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/gherkin/gherkin.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/gherkin/gherkin.js deleted file mode 100644 index 9d75533db..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/gherkin/gherkin.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("gherkin",(function(){return{startState:function(){return{lineNumber:0,tableHeaderLine:!1,allowFeature:!0,allowBackground:!1,allowScenario:!1,allowSteps:!1,allowPlaceholders:!1,allowMultilineArgument:!1,inMultilineString:!1,inMultilineTable:!1,inKeywordLine:!1}},token:function(e,a){if(e.sol()&&(a.lineNumber++,a.inKeywordLine=!1,a.inMultilineTable&&(a.tableHeaderLine=!1,e.match(/\s*\|/,!1)||(a.allowMultilineArgument=!1,a.inMultilineTable=!1))),e.eatSpace(),a.allowMultilineArgument){if(a.inMultilineString)return e.match('"""')?(a.inMultilineString=!1,a.allowMultilineArgument=!1):e.match(/.*/),"string";if(a.inMultilineTable)return e.match(/\|\s*/)?"bracket":(e.match(/[^\|]*/),a.tableHeaderLine?"header":"string");if(e.match('"""'))return a.inMultilineString=!0,"string";if(e.match("|"))return a.inMultilineTable=!0,a.tableHeaderLine=!0,"bracket"}return e.match(/#.*/)?"comment":!a.inKeywordLine&&e.match(/@\S+/)?"tag":!a.inKeywordLine&&a.allowFeature&&e.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)?(a.allowScenario=!0,a.allowBackground=!0,a.allowPlaceholders=!1,a.allowSteps=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowBackground&&e.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\-ho\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowScenario&&e.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)?(a.allowPlaceholders=!0,a.allowSteps=!0,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):a.allowScenario&&e.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!0,"keyword"):!a.inKeywordLine&&a.allowScenario&&e.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)?(a.allowPlaceholders=!1,a.allowSteps=!0,a.allowBackground=!1,a.allowMultilineArgument=!1,a.inKeywordLine=!0,"keyword"):!a.inKeywordLine&&a.allowSteps&&e.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\* )/)?(a.inStep=!0,a.allowPlaceholders=!0,a.allowMultilineArgument=!0,a.inKeywordLine=!0,"keyword"):e.match(/"[^"]*"?/)?"string":a.allowPlaceholders&&e.match(/<[^>]*>?/)?"variable":(e.next(),e.eatWhile(/[^@"<#]/),null)}}})),e.defineMIME("text/x-feature","gherkin")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/go/go.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/go/go.js deleted file mode 100644 index 774c6f149..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/go/go.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("go",(function(t){var n,r=t.indentUnit,i={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0},o={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},a=/[+\-*&^%:=<>!|\/]/;function c(e,t){var r,l=e.next();if('"'==l||"'"==l||"`"==l)return t.tokenize=(r=l,function(e,t){for(var n,i=!1,o=!1;null!=(n=e.next());){if(n==r&&!i){o=!0;break}i=!i&&"`"!=r&&"\\"==n}return(o||!i&&"`"!=r)&&(t.tokenize=c),"string"}),t.tokenize(e,t);if(/[\d\.]/.test(l))return"."==l?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"==l?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(l))return n=l,null;if("/"==l){if(e.eat("*"))return t.tokenize=u,u(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(a.test(l))return e.eatWhile(a),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var f=e.current();return i.propertyIsEnumerable(f)?("case"!=f&&"default"!=f||(n="case"),"keyword"):o.propertyIsEnumerable(f)?"atom":"variable"}function u(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=c;break}r="*"==n}return"comment"}function l(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function f(e,t,n){return e.context=new l(e.indented,t,n,null,e.context)}return{startState:function(e){return{tokenize:null,context:new l((e||0)-r,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var r=t.context;if(e.sol()&&(null==r.align&&(r.align=!1),t.indented=e.indentation(),t.startOfLine=!0,"case"==r.type&&(r.type="}")),e.eatSpace())return null;n=null;var i=(t.tokenize||c)(e,t);return"comment"==i||(null==r.align&&(r.align=!0),"{"==n?f(t,e.column(),"}"):"["==n?f(t,e.column(),"]"):"("==n?f(t,e.column(),")"):"case"==n?r.type="case":("}"==n&&"}"==r.type||n==r.type)&&function(e){if(e.context.prev){var t=e.context.type;")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}}(t),t.startOfLine=!1),i},indent:function(t,n){if(t.tokenize!=c&&null!=t.tokenize)return e.Pass;var i=t.context,o=n&&n.charAt(0);if("case"==i.type&&/^(?:case|default)\b/.test(n))return t.context.type="}",i.indented;var a=o==i.type;return i.align?i.column+(a?0:1):i.indented+(a?0:r)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}})),e.defineMIME("text/x-go","go")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/groovy/groovy.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/groovy/groovy.js deleted file mode 100644 index 44a335c1e..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/groovy/groovy.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("groovy",(function(t){function n(e){for(var t={},n=e.split(" "),r=0;r"))return r="->",null;if(/[+\-*&%=<>!?|\/~]/.test(n))return e.eatWhile(/[+\-*&%=<>|~]/),"operator";if(e.eatWhile(/[\w\$_]/),"@"==n)return e.eatWhile(/[\w\$_\.]/),"meta";if("."==t.lastToken)return"property";if(e.eat(":"))return r="proplabel","property";var s=e.current();return l.propertyIsEnumerable(s)?"atom":i.propertyIsEnumerable(s)?(o.propertyIsEnumerable(s)?r="newstatement":a.propertyIsEnumerable(s)&&(r="standalone"),"keyword"):"variable"}function u(e,t,n){var r=!1;if("/"!=e&&t.eat(e)){if(!t.eat(e))return"string";r=!0}function i(t,n){for(var i,o=!1,a=!r;null!=(i=t.next());){if(i==e&&!o){if(!r)break;if(t.match(e+e)){a=!0;break}}if('"'==e&&"$"==i&&!o){if(t.eat("{"))return n.tokenize.push(f()),"string";if(t.match(/^\w/,!1))return n.tokenize.push(c),"string"}o=!o&&"\\"==i}return a&&n.tokenize.pop(),"string"}return n.tokenize.push(i),i(t,n)}function f(){var e=1;function t(t,n){if("}"==t.peek()){if(0==--e)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)}else"{"==t.peek()&&e++;return s(t,n)}return t.isBase=!0,t}function c(e,t){var n=e.match(/^(\.|[\w\$_]+)/);return n?"."==n[0]?null:"variable":(t.tokenize.pop(),t.tokenize[t.tokenize.length-1](e,t))}function p(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize.pop();break}r="*"==n}return"comment"}function d(e,t){return!e||"operator"==e||"->"==e||/[\.\[\{\(,;:]/.test(e)||"newstatement"==e||"keyword"==e||"proplabel"==e||"standalone"==e&&!t}function m(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function k(e,t,n){return e.context=new m(e.indented,t,n,null,e.context)}function h(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return s.isBase=!0,{startState:function(e){return{tokenize:[s],context:new m((e||0)-t.indentUnit,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(e,t){var n=t.context;if(e.sol()&&(null==n.align&&(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0,"statement"!=n.type||d(t.lastToken,!0)||(h(t),n=t.context)),e.eatSpace())return null;r=null;var i=t.tokenize[t.tokenize.length-1](e,t);if("comment"==i)return i;if(null==n.align&&(n.align=!0),";"!=r&&":"!=r||"statement"!=n.type)if("->"==r&&"statement"==n.type&&"}"==n.prev.type)h(t),t.context.align=!1;else if("{"==r)k(t,e.column(),"}");else if("["==r)k(t,e.column(),"]");else if("("==r)k(t,e.column(),")");else if("}"==r){for(;"statement"==n.type;)n=h(t);for("}"==n.type&&(n=h(t));"statement"==n.type;)n=h(t)}else r==n.type?h(t):("}"==n.type||"top"==n.type||"statement"==n.type&&"newstatement"==r)&&k(t,e.column(),"statement");else h(t);return t.startOfLine=!1,t.lastToken=r||i,i},indent:function(n,r){if(!n.tokenize[n.tokenize.length-1].isBase)return e.Pass;var i=r&&r.charAt(0),o=n.context;"statement"!=o.type||d(n.lastToken,!0)||(o=o.prev);var a=i==o.type;return"statement"==o.type?o.indented+("{"==i?0:t.indentUnit):o.align?o.column+(a?0:1):o.indented+(a?0:t.indentUnit)},electricChars:"{}",closeBrackets:{triples:"'\""},fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}})),e.defineMIME("text/x-groovy","groovy")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/haml/haml.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/haml/haml.js deleted file mode 100644 index 901c79c6e..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/haml/haml.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../ruby/ruby")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("haml",(function(t){var n=e.getMode(t,{name:"htmlmixed"}),i=e.getMode(t,"ruby");function r(e){return function(t,n){return t.peek()==e&&1==n.rubyState.tokenize.length?(t.next(),n.tokenize=u,"closeAttributeTag"):o(t,n)}}function o(e,t){return e.match("-#")?(e.skipToEnd(),"comment"):i.token(e,t.rubyState)}function u(e,t){var i=e.peek();if("comment"==t.previousToken.style&&t.indented>t.previousToken.indented)return e.skipToEnd(),"commentLine";if(t.startOfLine){if("!"==i&&e.match("!!"))return e.skipToEnd(),"tag";if(e.match(/^%[\w:#\.]+=/))return t.tokenize=o,"hamlTag";if(e.match(/^%[\w:]+/))return"hamlTag";if("/"==i)return e.skipToEnd(),"comment"}if((t.startOfLine||"hamlTag"==t.previousToken.style)&&("#"==i||"."==i))return e.match(/[\w-#\.]*/),"hamlAttribute";if(t.startOfLine&&!e.match("--\x3e",!1)&&("="==i||"-"==i))return t.tokenize=o,t.tokenize(e,t);if("hamlTag"==t.previousToken.style||"closeAttributeTag"==t.previousToken.style||"hamlAttribute"==t.previousToken.style){if("("==i)return t.tokenize=r(")"),t.tokenize(e,t);if("{"==i&&!e.match(/^\{%.*/))return t.tokenize=r("}"),t.tokenize(e,t)}return n.token(e,t.htmlState)}return{startState:function(){return{htmlState:e.startState(n),rubyState:e.startState(i),indented:0,previousToken:{style:null,indented:0},tokenize:u}},copyState:function(t){return{htmlState:e.copyState(n,t.htmlState),rubyState:e.copyState(i,t.rubyState),indented:t.indented,previousToken:t.previousToken,tokenize:t.tokenize}},token:function(e,t){if(e.sol()&&(t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;var n=t.tokenize(e,t);if(t.startOfLine=!1,n&&"commentLine"!=n&&(t.previousToken={style:n,indented:t.indented}),e.eol()&&t.tokenize==o){e.backUp(1);var i=e.peek();e.next(),i&&","!=i&&(t.tokenize=u)}return"hamlTag"==n?n="tag":"commentLine"==n?n="comment":"hamlAttribute"==n?n="attribute":"closeAttributeTag"==n&&(n=null),n}}}),"htmlmixed","ruby"),e.defineMIME("text/x-haml","haml")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/handlebars/handlebars.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/handlebars/handlebars.js deleted file mode 100644 index 0a0325c0b..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/handlebars/handlebars.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple","../../addon/mode/multiplex"],e):e(CodeMirror)}((function(e){"use strict";e.defineSimpleMode("handlebars-tags",{start:[{regex:/\{\{\{/,push:"handlebars_raw",token:"tag"},{regex:/\{\{!--/,push:"dash_comment",token:"comment"},{regex:/\{\{!/,push:"comment",token:"comment"},{regex:/\{\{/,push:"handlebars",token:"tag"}],handlebars_raw:[{regex:/\}\}\}/,pop:!0,token:"tag"}],handlebars:[{regex:/\}\}/,pop:!0,token:"tag"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/>|[#\/]([A-Za-z_]\w*)/,token:"keyword"},{regex:/(?:else|this)\b/,token:"keyword"},{regex:/\d+/i,token:"number"},{regex:/=|~|@|true|false/,token:"atom"},{regex:/(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/,token:"variable-2"}],dash_comment:[{regex:/--\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],comment:[{regex:/\}\}/,pop:!0,token:"comment"},{regex:/./,token:"comment"}],meta:{blockCommentStart:"{{--",blockCommentEnd:"--}}"}}),e.defineMode("handlebars",(function(o,t){var n=e.getMode(o,"handlebars-tags");return t&&t.base?e.multiplexingMode(e.getMode(o,t.base),{open:"{{",close:/\}\}\}?/,mode:n,parseDelimiters:!0}):n})),e.defineMIME("text/x-handlebars-template","handlebars")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/haskell-literate/haskell-literate.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/haskell-literate/haskell-literate.js deleted file mode 100644 index 70e4d516d..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/haskell-literate/haskell-literate.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../haskell/haskell")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../haskell/haskell"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("haskell-literate",(function(t,n){var o=e.getMode(t,n&&n.base||"haskell");return{startState:function(){return{inCode:!1,baseState:e.startState(o)}},token:function(e,t){return e.sol()&&(t.inCode=e.eat(">"))?"meta":t.inCode?o.token(e,t.baseState):(e.skipToEnd(),"comment")},innerMode:function(e){return e.inCode?{state:e.baseState,mode:o}:null}}}),"haskell"),e.defineMIME("text/x-literate-haskell","haskell-literate")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/haskell/haskell.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/haskell/haskell.js deleted file mode 100644 index 1b3c64fa8..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/haskell/haskell.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("haskell",(function(e,t){function r(e,t,r){return t(r),r(e,t)}var n=/[a-z_]/,a=/[A-Z]/,i=/\d/,o=/[0-9A-Fa-f]/,l=/[0-7]/,u=/[a-z_A-Z0-9'\xa1-\uffff]/,f=/[-!#$%&*+.\/<=>?@\\^|~:]/,s=/[(),;[\]`{}]/,c=/[ \t\v\f]/;function d(e,t){if(e.eatWhile(c))return null;var d=e.next();if(s.test(d)){if("{"==d&&e.eat("-")){var p="comment";return e.eat("#")&&(p="meta"),r(e,t,m(p,1))}return null}if("'"==d)return e.eat("\\"),e.next(),e.eat("'")?"string":"string error";if('"'==d)return r(e,t,h);if(a.test(d))return e.eatWhile(u),e.eat(".")?"qualifier":"variable-2";if(n.test(d))return e.eatWhile(u),"variable";if(i.test(d)){if("0"==d){if(e.eat(/[xX]/))return e.eatWhile(o),"integer";if(e.eat(/[oO]/))return e.eatWhile(l),"number"}return e.eatWhile(i),p="number",e.match(/^\.\d+/)&&(p="number"),e.eat(/[eE]/)&&(p="number",e.eat(/[-+]/),e.eatWhile(i)),p}return"."==d&&e.eat(".")?"keyword":f.test(d)?"-"==d&&e.eat(/-/)&&(e.eatWhile(/-/),!e.eat(f))?(e.skipToEnd(),"comment"):(p="variable",":"==d&&(p="variable-2"),e.eatWhile(f),p):"error"}function m(e,t){return 0==t?d:function(r,n){for(var a=t;!r.eol();){var i=r.next();if("{"==i&&r.eat("-"))++a;else if("-"==i&&r.eat("}")&&0==--a)return n(d),e}return n(m(e,a)),e}}function h(e,t){for(;!e.eol();){var r=e.next();if('"'==r)return t(d),"string";if("\\"==r){if(e.eol()||e.eat(c))return t(p),"string";e.eat("&")||e.next()}}return t(d),"string error"}function p(e,t){return e.eat("\\")?r(e,t,h):(e.next(),t(d),"error")}var g=function(){var e={};function r(t){return function(){for(var r=0;r","@","~","=>"),r("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<*","<=","<$>","<*>","=<<","==",">",">=",">>",">>=","^","^^","||","*","*>","**"),r("builtin")("Applicative","Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),r("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","pure","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3");var n=t.overrideKeywords;if(n)for(var a in n)n.hasOwnProperty(a)&&(e[a]=n[a]);return e}();return{startState:function(){return{f:d}},copyState:function(e){return{f:e.f}},token:function(e,t){var r=t.f(e,(function(e){t.f=e})),n=e.current();return g.hasOwnProperty(n)?g[n]:r},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}})),e.defineMIME("text/x-haskell","haskell")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/haxe/haxe.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/haxe/haxe.js deleted file mode 100644 index 30028af9f..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/haxe/haxe.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("haxe",(function(e,t){var n=e.indentUnit;function r(e){return{type:e,style:"keyword"}}var a,i=r("keyword a"),o=r("keyword b"),l=r("keyword c"),u=r("operator"),c={type:"atom",style:"atom"},f={type:"attribute",style:"attribute"},s=r("typedef"),d={if:i,while:i,else:o,do:o,try:o,return:l,break:l,continue:l,new:l,throw:l,var:r("var"),inline:f,static:f,using:r("import"),public:f,private:f,cast:r("cast"),import:r("import"),macro:r("macro"),function:r("function"),catch:r("catch"),untyped:r("untyped"),callback:r("cb"),for:r("for"),switch:r("switch"),case:r("case"),default:r("default"),in:u,never:r("property_access"),trace:r("trace"),class:s,abstract:s,enum:s,interface:s,typedef:s,extends:s,implements:s,dynamic:s,true:c,false:c,null:c},p=/[+\-*&%=<>!?|]/;function m(e,t,n){return t.tokenize=n,n(e,t)}function v(e,t){for(var n,r=!1;null!=(n=e.next());){if(n==t&&!r)return!0;r=!r&&"\\"==n}}function b(e,t,n){return s=e,a=n,t}function y(e,t){var n=e.next();if('"'==n||"'"==n)return m(e,t,(r=n,function(e,t){return v(e,r)&&(t.tokenize=y),b("string","string")}));if(/[\[\]{}\(\),;\:\.]/.test(n))return b(n);if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),b("number","number");if(/\d/.test(n)||"-"==n&&e.eat(/\d/))return e.match(/^\d*(?:\.\d*(?!\.))?(?:[eE][+\-]?\d+)?/),b("number","number");if(t.reAllowed&&"~"==n&&e.eat(/\//))return v(e,"/"),e.eatWhile(/[gimsu]/),b("regexp","string-2");if("/"==n)return e.eat("*")?m(e,t,x):e.eat("/")?(e.skipToEnd(),b("comment","comment")):(e.eatWhile(p),b("operator",null,e.current()));if("#"==n)return e.skipToEnd(),b("conditional","meta");if("@"==n)return e.eat(/:/),e.eatWhile(/[\w_]/),b("metadata","meta");if(p.test(n))return e.eatWhile(p),b("operator",null,e.current());if(/[A-Z]/.test(n))return e.eatWhile(/[\w_<>]/),b("type","variable-3",a=e.current());e.eatWhile(/[\w_]/);var r,a=e.current(),i=d.propertyIsEnumerable(a)&&d[a];return i&&t.kwAllowed?b(i.type,i.style,a):b("variable","variable",a)}function x(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=y;break}r="*"==n}return b("comment","comment")}var h={atom:!0,number:!0,variable:!0,string:!0,regexp:!0};function k(e,t,n,r,a,i){this.indented=e,this.column=t,this.type=n,this.prev=a,this.info=i,null!=r&&(this.align=r)}function w(e,t){for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0}function g(e,t){if(/[a-z]/.test(t.charAt(0)))return!1;for(var n=e.importedtypes.length,r=0;r=0;e--)A.cc.push(arguments[e])}function E(){return S.apply(null,arguments),!0}function W(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function z(e){var t=A.state;if(t.context){if(A.marked="def",W(e,t.localVars))return;t.localVars={name:e,next:t.localVars}}else if(t.globalVars){if(W(e,t.globalVars))return;t.globalVars={name:e,next:t.globalVars}}}var M={name:"this",next:null};function C(){A.state.context||(A.state.localVars=M),A.state.context={prev:A.state.context,vars:A.state.localVars}}function T(){A.state.localVars=A.state.context.vars,A.state.context=A.state.context.prev}function Z(e,t){var n=function(){var n=A.state;n.lexical=new k(n.indented,A.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function I(){var e=A.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function O(e){return function t(n){return n==e?E():";"==e?S():E(t)}}function P(e){return"@"==e?E(B):"var"==e?E(Z("vardef"),N,O(";"),I):"keyword a"==e?E(Z("form"),_,P,I):"keyword b"==e?E(Z("form"),P,I):"{"==e?E(Z("}"),C,L,I,T):";"==e?E():"attribute"==e?E(q):"function"==e?E(Y):"for"==e?E(Z("form"),O("("),Z(")"),R,O(")"),I,P,I):"variable"==e?E(Z("stat"),G):"switch"==e?E(Z("form"),_,Z("}","switch"),O("{"),L,I,I):"case"==e?E(_,O(":")):"default"==e?E(O(":")):"catch"==e?E(Z("form"),C,O("("),re,O(")"),P,I,T):"import"==e?E(U,O(";")):"typedef"==e?E($):S(Z("stat"),_,O(";"),I)}function _(e){return h.hasOwnProperty(e)||"type"==e?E(D):"function"==e?E(Y):"keyword c"==e?E(j):"("==e?E(Z(")"),j,O(")"),I,D):"operator"==e?E(_):"["==e?E(Z("]"),K(j,"]"),I,D):"{"==e?E(Z("}"),K(J,"}"),I,D):E()}function j(e){return e.match(/[;\}\)\],]/)?S():S(_)}function D(e,t){return"operator"==e&&/\+\+|--/.test(t)?E(D):"operator"==e||":"==e?E(_):";"!=e?"("==e?E(Z(")"),K(_,")"),I,D):"."==e?E(H,D):"["==e?E(Z("]"),_,O("]"),I,D):void 0:void 0}function q(e){return"attribute"==e?E(q):"function"==e?E(Y):"var"==e?E(N):void 0}function B(e){return":"==e||"variable"==e?E(B):"("==e?E(Z(")"),K(F,")"),I,P):void 0}function F(e){if("variable"==e)return E()}function U(e,t){return"variable"==e&&/[A-Z]/.test(t.charAt(0))?(V(t),E()):"variable"==e||"property"==e||"."==e||"*"==t?E(U):void 0}function $(e,t){return"variable"==e&&/[A-Z]/.test(t.charAt(0))?(V(t),E()):"type"==e&&/[A-Z]/.test(t.charAt(0))?E():void 0}function G(e){return":"==e?E(I,P):S(D,O(";"),I)}function H(e){if("variable"==e)return A.marked="property",E()}function J(e){if("variable"==e&&(A.marked="property"),h.hasOwnProperty(e))return E(O(":"),_)}function K(e,t){function n(r){return","==r?E(e,n):r==t?E():E(O(t))}return function(r){return r==t?E():S(e,n)}}function L(e){return"}"==e?E():S(P,L)}function N(e,t){return"variable"==e?(z(t),E(ee,Q)):E()}function Q(e,t){return"="==t?E(_,Q):","==e?E(N):void 0}function R(e,t){return"variable"==e?(z(t),E(X,_)):S()}function X(e,t){if("in"==t)return E()}function Y(e,t){return"variable"==e||"type"==e?(z(t),E(Y)):"new"==t?E(Y):"("==e?E(Z(")"),C,K(re,")"),I,ee,P,T):void 0}function ee(e){if(":"==e)return E(te)}function te(e){return"type"==e||"variable"==e?E():"{"==e?E(Z("}"),K(ne,"}"),I):void 0}function ne(e){if("variable"==e)return E(ee)}function re(e,t){if("variable"==e)return z(t),E(ee)}return T.lex=!0,I.lex=!0,{startState:function(e){var r={tokenize:y,reAllowed:!0,kwAllowed:!0,cc:[],lexical:new k((e||0)-n,0,"block",!1),localVars:t.localVars,importedtypes:["Int","Float","String","Void","Std","Bool","Dynamic","Array"],context:t.localVars&&{vars:t.localVars},indented:0};return t.globalVars&&"object"==typeof t.globalVars&&(r.globalVars=t.globalVars),r},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation()),e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==s?n:(t.reAllowed=!("operator"!=s&&"keyword c"!=s&&!s.match(/^[\[{}\(,;:]$/)),t.kwAllowed="."!=s,function(e,t,n,r,a){var i=e.cc;for(A.state=e,A.stream=a,A.marked=null,A.cc=i,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():P)(n,r)){for(;i.length&&i[i.length-1].lex;)i.pop()();return A.marked?A.marked:"variable"==n&&w(e,r)?"variable-2":"variable"==n&&g(e,r)?"variable-3":t}}(t,n,s,a,e))},indent:function(e,t){if(e.tokenize!=y)return 0;var r=t&&t.charAt(0),a=e.lexical;"stat"==a.type&&"}"==r&&(a=a.prev);var i=a.type,o=r==i;return"vardef"==i?a.indented+4:"form"==i&&"{"==r?a.indented:"stat"==i||"form"==i?a.indented+n:"switch"!=a.info||o?a.align?a.column+(o?0:1):a.indented+(o?0:n):a.indented+(/^(?:case|default)\b/.test(t)?n:2*n)},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}})),e.defineMIME("text/x-haxe","haxe"),e.defineMode("hxml",(function(){return{startState:function(){return{define:!1,inString:!1}},token:function(e,t){var n=e.peek(),r=e.sol();if("#"==n)return e.skipToEnd(),"comment";if(r&&"-"==n){var a="variable-2";return e.eat(/-/),"-"==e.peek()&&(e.eat(/-/),a="keyword a"),"D"==e.peek()&&(e.eat(/[D]/),a="keyword c",t.define=!0),e.eatWhile(/[A-Z]/i),a}return n=e.peek(),0==t.inString&&"'"==n&&(t.inString=!0,e.next()),1==t.inString?(e.skipTo("'")||e.skipToEnd(),"'"==e.peek()&&(e.next(),t.inString=!1),"string"):(e.next(),null)},lineComment:"#"}})),e.defineMIME("text/x-hxml","hxml")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/htmlembedded/htmlembedded.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/htmlembedded/htmlembedded.js deleted file mode 100644 index 897a9e335..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/htmlembedded/htmlembedded.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/multiplex"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("htmlembedded",(function(i,t){var d=t.closeComment||"--%>";return e.multiplexingMode(e.getMode(i,"htmlmixed"),{open:t.openComment||"<%--",close:d,delimStyle:"comment",mode:{token:function(e){return e.skipTo(d)||e.skipToEnd(),"comment"}}},{open:t.open||t.scriptStartRegex||"<%",close:t.close||t.scriptEndRegex||"%>",mode:e.getMode(i,t.scriptingModeSpec)})}),"htmlmixed"),e.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),e.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),e.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),e.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/htmlmixed/htmlmixed.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/htmlmixed/htmlmixed.js deleted file mode 100644 index 454059549..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/htmlmixed/htmlmixed.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],t):t(CodeMirror)}((function(t){"use strict";var e={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},a={};function n(t,e){return new RegExp((e?"^":"")+"","i")}function l(t,e){for(var a in t)for(var n=e[a]||(e[a]=[]),l=t[a],o=l.length-1;o>=0;o--)n.unshift(l[o])}t.defineMode("htmlmixed",(function(o,r){var i=t.getMode(o,{name:"xml",htmlMode:!0,multilineTagIndentFactor:r.multilineTagIndentFactor,multilineTagIndentPastTag:r.multilineTagIndentPastTag,allowMissingTagName:r.allowMissingTagName}),c={},s=r&&r.tags,u=r&&r.scriptTypes;if(l(e,c),s&&l(s,c),u)for(var m=u.length-1;m>=0;m--)c.script.unshift(["type",u[m].matches,u[m].mode]);function d(e,l){var r,s=i.token(e,l.htmlState),u=/\btag\b/.test(s);if(u&&!/[<>\s\/]/.test(e.current())&&(r=l.htmlState.tagName&&l.htmlState.tagName.toLowerCase())&&c.hasOwnProperty(r))l.inTag=r+" ";else if(l.inTag&&u&&/>$/.test(e.current())){var m=/^([\S]+) (.*)/.exec(l.inTag);l.inTag=null;var g=">"==e.current()&&function(t,e){for(var n=0;n-1?t.backUp(n.length-l):n.match(/<\/?$/)&&(t.backUp(n.length),t.match(e,!1)||t.match(n)),a}(t,h,e.localMode.token(t,e.localState))},l.localMode=p,l.localState=t.startState(p,i.indent(l.htmlState,"",""))}else l.inTag&&(l.inTag+=e.current(),e.eol()&&(l.inTag+=" "));return s}return{startState:function(){return{token:d,inTag:null,localMode:null,localState:null,htmlState:t.startState(i)}},copyState:function(e){var a;return e.localState&&(a=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:a,htmlState:t.copyState(i,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,a,n){return!e.localMode||/^\s*<\//.test(a)?i.indent(e.htmlState,a,n):e.localMode.indent?e.localMode.indent(e.localState,a,n):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||i}}}}),"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/http/http.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/http/http.js deleted file mode 100644 index bb9730de3..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/http/http.js +++ /dev/null @@ -1 +0,0 @@ -!function(r){"object"==typeof exports&&"object"==typeof module?r(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)}((function(r){"use strict";r.defineMode("http",(function(){function r(r,e){return r.skipToEnd(),e.cur=u,"error"}function e(e,n){return e.match(/^HTTP\/\d\.\d/)?(n.cur=t,"keyword"):e.match(/^[A-Z]+/)&&/[ \t]/.test(e.peek())?(n.cur=o,"keyword"):r(e,n)}function t(e,t){var o=e.match(/^\d+/);if(!o)return r(e,t);t.cur=n;var i=Number(o[0]);return i>=100&&i<200?"positive informational":i>=200&&i<300?"positive success":i>=300&&i<400?"positive redirect":i>=400&&i<500?"negative client-error":i>=500&&i<600?"negative server-error":"error"}function n(r,e){return r.skipToEnd(),e.cur=u,null}function o(r,e){return r.eatWhile(/\S/),e.cur=i,"string-2"}function i(e,t){return e.match(/^HTTP\/\d\.\d$/)?(t.cur=u,"keyword"):r(e,t)}function u(r){return r.sol()&&!r.eat(/[ \t]/)?r.match(/^.*?:/)?"atom":(r.skipToEnd(),"error"):(r.skipToEnd(),"string")}function c(r){return r.skipToEnd(),null}return{token:function(r,e){var t=e.cur;return t!=u&&t!=c&&r.eatSpace()?null:t(r,e)},blankLine:function(r){r.cur=c},startState:function(){return{cur:e}}}})),r.defineMIME("message/http","http")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/idl/idl.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/idl/idl.js deleted file mode 100644 index 152176513..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/idl/idl.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var r=["a_correlate","abs","acos","adapt_hist_equal","alog","alog2","alog10","amoeba","annotate","app_user_dir","app_user_dir_query","arg_present","array_equal","array_indices","arrow","ascii_template","asin","assoc","atan","axis","axis","bandpass_filter","bandreject_filter","barplot","bar_plot","beseli","beselj","beselk","besely","beta","biginteger","bilinear","bin_date","binary_template","bindgen","binomial","bit_ffs","bit_population","blas_axpy","blk_con","boolarr","boolean","boxplot","box_cursor","breakpoint","broyden","bubbleplot","butterworth","bytarr","byte","byteorder","bytscl","c_correlate","calendar","caldat","call_external","call_function","call_method","call_procedure","canny","catch","cd","cdf","ceil","chebyshev","check_math","chisqr_cvf","chisqr_pdf","choldc","cholsol","cindgen","cir_3pnt","clipboard","close","clust_wts","cluster","cluster_tree","cmyk_convert","code_coverage","color_convert","color_exchange","color_quan","color_range_map","colorbar","colorize_sample","colormap_applicable","colormap_gradient","colormap_rotation","colortable","comfit","command_line_args","common","compile_opt","complex","complexarr","complexround","compute_mesh_normals","cond","congrid","conj","constrained_min","contour","contour","convert_coord","convol","convol_fft","coord2to3","copy_lun","correlate","cos","cosh","cpu","cramer","createboxplotdata","create_cursor","create_struct","create_view","crossp","crvlength","ct_luminance","cti_test","cursor","curvefit","cv_coord","cvttobm","cw_animate","cw_animate_getp","cw_animate_load","cw_animate_run","cw_arcball","cw_bgroup","cw_clr_index","cw_colorsel","cw_defroi","cw_field","cw_filesel","cw_form","cw_fslider","cw_light_editor","cw_light_editor_get","cw_light_editor_set","cw_orient","cw_palette_editor","cw_palette_editor_get","cw_palette_editor_set","cw_pdmenu","cw_rgbslider","cw_tmpl","cw_zoom","db_exists","dblarr","dcindgen","dcomplex","dcomplexarr","define_key","define_msgblk","define_msgblk_from_file","defroi","defsysv","delvar","dendro_plot","dendrogram","deriv","derivsig","determ","device","dfpmin","diag_matrix","dialog_dbconnect","dialog_message","dialog_pickfile","dialog_printersetup","dialog_printjob","dialog_read_image","dialog_write_image","dictionary","digital_filter","dilate","dindgen","dissolve","dist","distance_measure","dlm_load","dlm_register","doc_library","double","draw_roi","edge_dog","efont","eigenql","eigenvec","ellipse","elmhes","emboss","empty","enable_sysrtn","eof","eos","erase","erf","erfc","erfcx","erode","errorplot","errplot","estimator_filter","execute","exit","exp","expand","expand_path","expint","extract","extract_slice","f_cvf","f_pdf","factorial","fft","file_basename","file_chmod","file_copy","file_delete","file_dirname","file_expand_path","file_gunzip","file_gzip","file_info","file_lines","file_link","file_mkdir","file_move","file_poll_input","file_readlink","file_same","file_search","file_tar","file_test","file_untar","file_unzip","file_which","file_zip","filepath","findgen","finite","fix","flick","float","floor","flow3","fltarr","flush","format_axis_values","forward_function","free_lun","fstat","fulstr","funct","function","fv_test","fx_root","fz_roots","gamma","gamma_ct","gauss_cvf","gauss_pdf","gauss_smooth","gauss2dfit","gaussfit","gaussian_function","gaussint","get_drive_list","get_dxf_objects","get_kbrd","get_login_info","get_lun","get_screen_size","getenv","getwindows","greg2jul","grib","grid_input","grid_tps","grid3","griddata","gs_iter","h_eq_ct","h_eq_int","hanning","hash","hdf","hdf5","heap_free","heap_gc","heap_nosave","heap_refcount","heap_save","help","hilbert","hist_2d","hist_equal","histogram","hls","hough","hqr","hsv","i18n_multibytetoutf8","i18n_multibytetowidechar","i18n_utf8tomultibyte","i18n_widechartomultibyte","ibeta","icontour","iconvertcoord","idelete","identity","idl_base64","idl_container","idl_validname","idlexbr_assistant","idlitsys_createtool","idlunit","iellipse","igamma","igetcurrent","igetdata","igetid","igetproperty","iimage","image","image_cont","image_statistics","image_threshold","imaginary","imap","indgen","int_2d","int_3d","int_tabulated","intarr","interpol","interpolate","interval_volume","invert","ioctl","iopen","ir_filter","iplot","ipolygon","ipolyline","iputdata","iregister","ireset","iresolve","irotate","isa","isave","iscale","isetcurrent","isetproperty","ishft","isocontour","isosurface","isurface","itext","itranslate","ivector","ivolume","izoom","journal","json_parse","json_serialize","jul2greg","julday","keyword_set","krig2d","kurtosis","kw_test","l64indgen","la_choldc","la_cholmprove","la_cholsol","la_determ","la_eigenproblem","la_eigenql","la_eigenvec","la_elmhes","la_gm_linear_model","la_hqr","la_invert","la_least_square_equality","la_least_squares","la_linear_equation","la_ludc","la_lumprove","la_lusol","la_svd","la_tridc","la_trimprove","la_triql","la_trired","la_trisol","label_date","label_region","ladfit","laguerre","lambda","lambdap","lambertw","laplacian","least_squares_filter","leefilt","legend","legendre","linbcg","lindgen","linfit","linkimage","list","ll_arc_distance","lmfit","lmgr","lngamma","lnp_test","loadct","locale_get","logical_and","logical_or","logical_true","lon64arr","lonarr","long","long64","lsode","lu_complex","ludc","lumprove","lusol","m_correlate","machar","make_array","make_dll","make_rt","map","mapcontinents","mapgrid","map_2points","map_continents","map_grid","map_image","map_patch","map_proj_forward","map_proj_image","map_proj_info","map_proj_init","map_proj_inverse","map_set","matrix_multiply","matrix_power","max","md_test","mean","meanabsdev","mean_filter","median","memory","mesh_clip","mesh_decimate","mesh_issolid","mesh_merge","mesh_numtriangles","mesh_obj","mesh_smooth","mesh_surfacearea","mesh_validate","mesh_volume","message","min","min_curve_surf","mk_html_help","modifyct","moment","morph_close","morph_distance","morph_gradient","morph_hitormiss","morph_open","morph_thin","morph_tophat","multi","n_elements","n_params","n_tags","ncdf","newton","noise_hurl","noise_pick","noise_scatter","noise_slur","norm","obj_class","obj_destroy","obj_hasmethod","obj_isa","obj_new","obj_valid","objarr","on_error","on_ioerror","online_help","openr","openu","openw","oplot","oploterr","orderedhash","p_correlate","parse_url","particle_trace","path_cache","path_sep","pcomp","plot","plot3d","plot","plot_3dbox","plot_field","ploterr","plots","polar_contour","polar_surface","polyfill","polyshade","pnt_line","point_lun","polarplot","poly","poly_2d","poly_area","poly_fit","polyfillv","polygon","polyline","polywarp","popd","powell","pref_commit","pref_get","pref_set","prewitt","primes","print","printf","printd","pro","product","profile","profiler","profiles","project_vol","ps_show_fonts","psafm","pseudo","ptr_free","ptr_new","ptr_valid","ptrarr","pushd","qgrid3","qhull","qromb","qromo","qsimp","query_*","query_ascii","query_bmp","query_csv","query_dicom","query_gif","query_image","query_jpeg","query_jpeg2000","query_mrsid","query_pict","query_png","query_ppm","query_srf","query_tiff","query_video","query_wav","r_correlate","r_test","radon","randomn","randomu","ranks","rdpix","read","readf","read_ascii","read_binary","read_bmp","read_csv","read_dicom","read_gif","read_image","read_interfile","read_jpeg","read_jpeg2000","read_mrsid","read_pict","read_png","read_ppm","read_spr","read_srf","read_sylk","read_tiff","read_video","read_wav","read_wave","read_x11_bitmap","read_xwd","reads","readu","real_part","rebin","recall_commands","recon3","reduce_colors","reform","region_grow","register_cursor","regress","replicate","replicate_inplace","resolve_all","resolve_routine","restore","retall","return","reverse","rk4","roberts","rot","rotate","round","routine_filepath","routine_info","rs_test","s_test","save","savgol","scale3","scale3d","scatterplot","scatterplot3d","scope_level","scope_traceback","scope_varfetch","scope_varname","search2d","search3d","sem_create","sem_delete","sem_lock","sem_release","set_plot","set_shading","setenv","sfit","shade_surf","shade_surf_irr","shade_volume","shift","shift_diff","shmdebug","shmmap","shmunmap","shmvar","show3","showfont","signum","simplex","sin","sindgen","sinh","size","skewness","skip_lun","slicer3","slide_image","smooth","sobel","socket","sort","spawn","sph_4pnt","sph_scat","spher_harm","spl_init","spl_interp","spline","spline_p","sprsab","sprsax","sprsin","sprstp","sqrt","standardize","stddev","stop","strarr","strcmp","strcompress","streamline","streamline","stregex","stretch","string","strjoin","strlen","strlowcase","strmatch","strmessage","strmid","strpos","strput","strsplit","strtrim","struct_assign","struct_hide","strupcase","surface","surface","surfr","svdc","svdfit","svsol","swap_endian","swap_endian_inplace","symbol","systime","t_cvf","t_pdf","t3d","tag_names","tan","tanh","tek_color","temporary","terminal_size","tetra_clip","tetra_surface","tetra_volume","text","thin","thread","threed","tic","time_test2","timegen","timer","timestamp","timestamptovalues","tm_test","toc","total","trace","transpose","tri_surf","triangulate","trigrid","triql","trired","trisol","truncate_lun","ts_coef","ts_diff","ts_fcast","ts_smooth","tv","tvcrs","tvlct","tvrd","tvscl","typename","uindgen","uint","uintarr","ul64indgen","ulindgen","ulon64arr","ulonarr","ulong","ulong64","uniq","unsharp_mask","usersym","value_locate","variance","vector","vector_field","vel","velovect","vert_t3d","voigt","volume","voronoi","voxel_proj","wait","warp_tri","watershed","wdelete","wf_draw","where","widget_base","widget_button","widget_combobox","widget_control","widget_displaycontextmenu","widget_draw","widget_droplist","widget_event","widget_info","widget_label","widget_list","widget_propertysheet","widget_slider","widget_tab","widget_table","widget_text","widget_tree","widget_tree_move","widget_window","wiener_filter","window","window","write_bmp","write_csv","write_gif","write_image","write_jpeg","write_jpeg2000","write_nrif","write_pict","write_png","write_ppm","write_spr","write_srf","write_sylk","write_tiff","write_video","write_wav","write_wave","writeu","wset","wshow","wtn","wv_applet","wv_cwt","wv_cw_wavelet","wv_denoise","wv_dwt","wv_fn_coiflet","wv_fn_daubechies","wv_fn_gaussian","wv_fn_haar","wv_fn_morlet","wv_fn_paul","wv_fn_symlet","wv_import_data","wv_import_wavelet","wv_plot3d_wps","wv_plot_multires","wv_pwt","wv_tool_denoise","xbm_edit","xdisplayfile","xdxf","xfont","xinteranimate","xloadct","xmanager","xmng_tmpl","xmtool","xobjview","xobjview_rotate","xobjview_write_image","xpalette","xpcolor","xplot3d","xregistered","xroi","xsq_test","xsurface","xvaredit","xvolume","xvolume_rotate","xvolume_write_image","xyouts","zlib_compress","zlib_uncompress","zoom","zoom_24"],i=t(r),a=["begin","end","endcase","endfor","endwhile","endif","endrep","endforeach","break","case","continue","for","foreach","goto","if","then","else","repeat","until","switch","while","do","pro","function"],_=t(a);e.registerHelper("hintWords","idl",r.concat(a));var o=new RegExp("^[_a-z¡-￿][_a-z0-9¡-￿]*","i"),l=/[+\-*&=<>\/@#~$]/,s=new RegExp("(and|or|eq|lt|le|gt|ge|ne|not)","i");e.defineMode("idl",(function(){return{token:function(e){return function(e){if(e.eatSpace())return null;if(e.match(";"))return e.skipToEnd(),"comment";if(e.match(/^[0-9\.+-]/,!1)){if(e.match(/^[+-]?0x[0-9a-fA-F]+/))return"number";if(e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/))return"number";if(e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))return"number"}return e.match(/^"([^"]|(""))*"/)||e.match(/^'([^']|(''))*'/)?"string":e.match(_)?"keyword":e.match(i)?"builtin":e.match(o)?"variable":e.match(l)||e.match(s)?"operator":(e.next(),null)}(e)}}})),e.defineMIME("text/x-idl","idl")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/javascript/javascript.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/javascript/javascript.js deleted file mode 100644 index 9f59bc760..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/javascript/javascript.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("javascript",(function(t,r){var n,a,i=t.indentUnit,o=r.statementIndent,c=r.jsonld,s=r.json||c,u=!1!==r.trackScope,f=r.typescript,l=r.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),p=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function v(e,t,r){return n=e,a=r,t}function k(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,a=!1;if(c&&"@"==e.peek()&&e.match(m))return t.tokenize=k,v("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||a);)a=!a&&"\\"==n;return a||(t.tokenize=k),v("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==n&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return v(n);if("="==n&&e.eat(">"))return v("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==n)return e.eat("*")?(t.tokenize=y,y(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):Ze(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(e.eat("="),v("operator","operator",e.current()));if("`"==n)return t.tokenize=w,w(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),v("meta","meta");if("#"==n&&e.eatWhile(l))return v("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),v("comment","comment");if(p.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?v("."):v("operator","operator",e.current());if(l.test(n)){e.eatWhile(l);var a=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(a)){var i=d[a];return v(i.type,i.style,a)}if("async"==a&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",a)}return v("variable","variable",a)}}function y(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=k;break}n="*"==r}return v("comment","comment")}function w(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=k;break}n=!n&&"\\"==r}return v("quasi","string-2",e.current())}function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(f){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),s="([{}])".indexOf(c);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(l.test(c))i=!0;else if(/["'\/`]/.test(c))for(;;--o){if(0==o)return;if(e.string.charAt(o-1)==c&&"\\"!=e.string.charAt(o-2)){o--;break}}else if(i&&!a){++o;break}}i&&!a&&(t.fatArrowAt=o)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function h(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function g(e,t){if(!u)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function j(e,t,r,n,a){var i=e.cc;for(M.state=e,M.stream=a,M.marked=null,M.cc=i,M.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():s?F:W)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return M.marked?M.marked:"variable"==r&&g(e,n)?"variable-2":t}}var M={state:null,column:null,marked:null,cc:null};function A(){for(var e=arguments.length-1;e>=0;e--)M.cc.push(arguments[e])}function V(){return A.apply(null,arguments),!0}function E(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function z(e){var t=M.state;if(M.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=I(e,t.context);if(null!=n)return void(t.context=n)}else if(!E(e,t.localVars))return void(t.localVars=new q(e,t.localVars));r.globalVars&&!E(e,t.globalVars)&&(t.globalVars=new q(e,t.globalVars))}}function I(e,t){if(t){if(t.block){var r=I(e,t.prev);return r?r==t.prev?t:new $(r,t.vars,!0):null}return E(e,t.vars)?t:new $(t.prev,new q(e,t.vars),!1)}return null}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function $(e,t,r){this.prev=e,this.vars=t,this.block=r}function q(e,t){this.name=e,this.next=t}var C=new q("this",new q("arguments",null));function S(){M.state.context=new $(M.state.context,M.state.localVars,!1),M.state.localVars=C}function _(){M.state.context=new $(M.state.context,M.state.localVars,!0),M.state.localVars=null}function O(){M.state.localVars=M.state.context.vars,M.state.context=M.state.context.prev}function P(e,t){var r=function(){var r=M.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new h(n,M.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function N(){var e=M.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function U(e){return function t(r){return r==e?V():";"==e||"}"==r||")"==r||"]"==r?A():V(t)}}function W(e,t){return"var"==e?V(P("vardef",t),Me,U(";"),N):"keyword a"==e?V(P("form"),D,W,N):"keyword b"==e?V(P("form"),W,N):"keyword d"==e?M.stream.match(/^\s*$/,!1)?V():V(P("stat"),J,U(";"),N):"debugger"==e?V(U(";")):"{"==e?V(P("}"),_,se,N,O):";"==e?V():"if"==e?("else"==M.state.lexical.info&&M.state.cc[M.state.cc.length-1]==N&&M.state.cc.pop()(),V(P("form"),D,W,N,Te)):"function"==e?V(Se):"for"==e?V(P("form"),_,$e,W,O,N):"class"==e||f&&"interface"==t?(M.marked="keyword",V(P("form","class"==e?e:t),Ue,N)):"variable"==e?f&&"declare"==t?(M.marked="keyword",V(W)):f&&("module"==t||"enum"==t||"type"==t)&&M.stream.match(/^\s*\w/,!1)?(M.marked="keyword","enum"==t?V(Xe):"type"==t?V(Oe,U("operator"),pe,U(";")):V(P("form"),Ae,U("{"),P("}"),se,N,N)):f&&"namespace"==t?(M.marked="keyword",V(P("form"),F,W,N)):f&&"abstract"==t?(M.marked="keyword",V(W)):V(P("stat"),te):"switch"==e?V(P("form"),D,U("{"),P("}","switch"),_,se,N,N,O):"case"==e?V(F,U(":")):"default"==e?V(U(":")):"catch"==e?V(P("form"),S,B,W,N,O):"export"==e?V(P("stat"),He,N):"import"==e?V(P("stat"),Ge,N):"async"==e?V(W):"@"==t?V(F,W):A(P("stat"),F,U(";"),N)}function B(e){if("("==e)return V(Pe,U(")"))}function F(e,t){return G(e,t,!1)}function H(e,t){return G(e,t,!0)}function D(e){return"("!=e?A():V(P(")"),J,U(")"),N)}function G(e,t,r){if(M.state.fatArrowAt==M.stream.start){var n=r?Y:X;if("("==e)return V(S,P(")"),oe(Pe,")"),N,U("=>"),n,O);if("variable"==e)return A(S,Ae,U("=>"),n,O)}var a=r?L:K;return x.hasOwnProperty(e)?V(a):"function"==e?V(Se,a):"class"==e||f&&"interface"==t?(M.marked="keyword",V(P("form"),Ne,N)):"keyword c"==e||"async"==e?V(r?H:F):"("==e?V(P(")"),J,U(")"),N,a):"operator"==e||"spread"==e?V(r?H:F):"["==e?V(P("]"),Re,N,a):"{"==e?ce(ne,"}",null,a):"quasi"==e?A(Q,a):"new"==e?V(function(e){return function(t){return"."==t?V(e?ee:Z):"variable"==t&&f?V(he,e?L:K):A(e?H:F)}}(r)):V()}function J(e){return e.match(/[;\}\)\],]/)?A():A(F)}function K(e,t){return","==e?V(J):L(e,t,!1)}function L(e,t,r){var n=0==r?K:L,a=0==r?F:H;return"=>"==e?V(S,r?Y:X,O):"operator"==e?/\+\+|--/.test(t)||f&&"!"==t?V(n):f&&"<"==t&&M.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?V(P(">"),oe(pe,">"),N,n):"?"==t?V(F,U(":"),a):V(a):"quasi"==e?A(Q,n):";"!=e?"("==e?ce(H,")","call",n):"."==e?V(re,n):"["==e?V(P("]"),J,U("]"),N,n):f&&"as"==t?(M.marked="keyword",V(pe,n)):"regexp"==e?(M.state.lastType=M.marked="operator",M.stream.backUp(M.stream.pos-M.stream.start-1),V(a)):void 0:void 0}function Q(e,t){return"quasi"!=e?A():"${"!=t.slice(t.length-2)?V(Q):V(J,R)}function R(e){if("}"==e)return M.marked="string-2",M.state.tokenize=w,V(Q)}function X(e){return b(M.stream,M.state),A("{"==e?W:F)}function Y(e){return b(M.stream,M.state),A("{"==e?W:H)}function Z(e,t){if("target"==t)return M.marked="keyword",V(K)}function ee(e,t){if("target"==t)return M.marked="keyword",V(L)}function te(e){return":"==e?V(N,W):A(K,U(";"),N)}function re(e){if("variable"==e)return M.marked="property",V()}function ne(e,t){return"async"==e?(M.marked="property",V(ne)):"variable"==e||"keyword"==M.style?(M.marked="property","get"==t||"set"==t?V(ae):(f&&M.state.fatArrowAt==M.stream.start&&(r=M.stream.match(/^\s*:\s*/,!1))&&(M.state.fatArrowAt=M.stream.pos+r[0].length),V(ie))):"number"==e||"string"==e?(M.marked=c?"property":M.style+" property",V(ie)):"jsonld-keyword"==e?V(ie):f&&T(t)?(M.marked="keyword",V(ne)):"["==e?V(F,ue,U("]"),ie):"spread"==e?V(H,ie):"*"==t?(M.marked="keyword",V(ne)):":"==e?A(ie):void 0;var r}function ae(e){return"variable"!=e?A(ie):(M.marked="property",V(Se))}function ie(e){return":"==e?V(H):"("==e?A(Se):void 0}function oe(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=M.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),V((function(r,n){return r==t||n==t?A():A(e)}),n)}return a==t||i==t?V():r&&r.indexOf(";")>-1?A(e):V(U(t))}return function(r,a){return r==t||a==t?V():A(e,n)}}function ce(e,t,r){for(var n=3;n"),pe):"quasi"==e?A(ye,xe):void 0}function me(e){if("=>"==e)return V(pe)}function ve(e){return e.match(/[\}\)\]]/)?V():","==e||";"==e?V(ve):A(ke,ve)}function ke(e,t){return"variable"==e||"keyword"==M.style?(M.marked="property",V(ke)):"?"==t||"number"==e||"string"==e?V(ke):":"==e?V(pe):"["==e?V(U("variable"),fe,U("]"),ke):"("==e?A(_e,ke):e.match(/[;\}\)\],]/)?void 0:V()}function ye(e,t){return"quasi"!=e?A():"${"!=t.slice(t.length-2)?V(ye):V(pe,we)}function we(e){if("}"==e)return M.marked="string-2",M.state.tokenize=w,V(ye)}function be(e,t){return"variable"==e&&M.stream.match(/^\s*[?:]/,!1)||"?"==t?V(be):":"==e?V(pe):"spread"==e?V(be):A(pe)}function xe(e,t){return"<"==t?V(P(">"),oe(pe,">"),N,xe):"|"==t||"."==e||"&"==t?V(pe):"["==e?V(pe,U("]"),xe):"extends"==t||"implements"==t?(M.marked="keyword",V(pe)):"?"==t?V(pe,U(":"),pe):void 0}function he(e,t){if("<"==t)return V(P(">"),oe(pe,">"),N,xe)}function ge(){return A(pe,je)}function je(e,t){if("="==t)return V(pe)}function Me(e,t){return"enum"==t?(M.marked="keyword",V(Xe)):A(Ae,ue,ze,Ie)}function Ae(e,t){return f&&T(t)?(M.marked="keyword",V(Ae)):"variable"==e?(z(t),V()):"spread"==e?V(Ae):"["==e?ce(Ee,"]"):"{"==e?ce(Ve,"}"):void 0}function Ve(e,t){return"variable"!=e||M.stream.match(/^\s*:/,!1)?("variable"==e&&(M.marked="property"),"spread"==e?V(Ae):"}"==e?A():"["==e?V(F,U("]"),U(":"),Ve):V(U(":"),Ae,ze)):(z(t),V(ze))}function Ee(){return A(Ae,ze)}function ze(e,t){if("="==t)return V(H)}function Ie(e){if(","==e)return V(Me)}function Te(e,t){if("keyword b"==e&&"else"==t)return V(P("form","else"),W,N)}function $e(e,t){return"await"==t?V($e):"("==e?V(P(")"),qe,N):void 0}function qe(e){return"var"==e?V(Me,Ce):"variable"==e?V(Ce):A(Ce)}function Ce(e,t){return")"==e?V():";"==e?V(Ce):"in"==t||"of"==t?(M.marked="keyword",V(F,Ce)):A(F,Ce)}function Se(e,t){return"*"==t?(M.marked="keyword",V(Se)):"variable"==e?(z(t),V(Se)):"("==e?V(S,P(")"),oe(Pe,")"),N,le,W,O):f&&"<"==t?V(P(">"),oe(ge,">"),N,Se):void 0}function _e(e,t){return"*"==t?(M.marked="keyword",V(_e)):"variable"==e?(z(t),V(_e)):"("==e?V(S,P(")"),oe(Pe,")"),N,le,O):f&&"<"==t?V(P(">"),oe(ge,">"),N,_e):void 0}function Oe(e,t){return"keyword"==e||"variable"==e?(M.marked="type",V(Oe)):"<"==t?V(P(">"),oe(ge,">"),N):void 0}function Pe(e,t){return"@"==t&&V(F,Pe),"spread"==e?V(Pe):f&&T(t)?(M.marked="keyword",V(Pe)):f&&"this"==e?V(ue,ze):A(Ae,ue,ze)}function Ne(e,t){return"variable"==e?Ue(e,t):We(e,t)}function Ue(e,t){if("variable"==e)return z(t),V(We)}function We(e,t){return"<"==t?V(P(">"),oe(ge,">"),N,We):"extends"==t||"implements"==t||f&&","==e?("implements"==t&&(M.marked="keyword"),V(f?pe:F,We)):"{"==e?V(P("}"),Be,N):void 0}function Be(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||f&&T(t))&&M.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(M.marked="keyword",V(Be)):"variable"==e||"keyword"==M.style?(M.marked="property",V(Fe,Be)):"number"==e||"string"==e?V(Fe,Be):"["==e?V(F,ue,U("]"),Fe,Be):"*"==t?(M.marked="keyword",V(Be)):f&&"("==e?A(_e,Be):";"==e||","==e?V(Be):"}"==e?V():"@"==t?V(F,Be):void 0}function Fe(e,t){if("!"==t)return V(Fe);if("?"==t)return V(Fe);if(":"==e)return V(pe,ze);if("="==t)return V(H);var r=M.state.lexical.prev;return A(r&&"interface"==r.info?_e:Se)}function He(e,t){return"*"==t?(M.marked="keyword",V(Qe,U(";"))):"default"==t?(M.marked="keyword",V(F,U(";"))):"{"==e?V(oe(De,"}"),Qe,U(";")):A(W)}function De(e,t){return"as"==t?(M.marked="keyword",V(U("variable"))):"variable"==e?A(H,De):void 0}function Ge(e){return"string"==e?V():"("==e?A(F):"."==e?A(K):A(Je,Ke,Qe)}function Je(e,t){return"{"==e?ce(Je,"}"):("variable"==e&&z(t),"*"==t&&(M.marked="keyword"),V(Le))}function Ke(e){if(","==e)return V(Je,Ke)}function Le(e,t){if("as"==t)return M.marked="keyword",V(Je)}function Qe(e,t){if("from"==t)return M.marked="keyword",V(F)}function Re(e){return"]"==e?V():A(oe(H,"]"))}function Xe(){return A(P("form"),Ae,U("{"),P("}"),oe(Ye,"}"),N,N)}function Ye(){return A(Ae,ze)}function Ze(e,t,r){return t.tokenize==k&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return S.lex=_.lex=!0,O.lex=!0,N.lex=!0,{startState:function(e){var t={tokenize:k,lastType:"sof",cc:[],lexical:new h((e||0)-i,0,"block",!1),localVars:r.localVars,context:r.localVars&&new $(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=y&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=a&&"--"!=a?n:"incdec",j(t,r,n,a,e))},indent:function(t,n){if(t.tokenize==y||t.tokenize==w)return e.Pass;if(t.tokenize!=k)return 0;var a,c=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var f=t.cc[u];if(f==N)s=s.prev;else if(f!=Te&&f!=O)break}for(;("stat"==s.type||"form"==s.type)&&("}"==c||(a=t.cc[t.cc.length-1])&&(a==K||a==L)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;o&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var l=s.type,d=c==l;return"vardef"==l?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==l&&"{"==c?s.indented:"form"==l?s.indented+i:"stat"==l?s.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?o||i:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:i):s.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:c,jsonMode:s,expressionAllowed:Ze,skipExpression:function(t){j(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/jinja2/jinja2.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/jinja2/jinja2.js deleted file mode 100644 index 9a5ef4c1c..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/jinja2/jinja2.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("jinja2",(function(){var e=["and","as","block","endblock","by","cycle","debug","else","elif","extends","filter","endfilter","firstof","for","endfor","if","endif","ifchanged","endifchanged","ifequal","endifequal","ifnotequal","endifnotequal","in","include","load","not","now","or","parsed","regroup","reversed","spaceless","endspaceless","ssi","templatetag","openblock","closeblock","openvariable","closevariable","openbrace","closebrace","opencomment","closecomment","widthratio","url","with","endwith","get_current_language","trans","endtrans","noop","blocktrans","endblocktrans","get_available_languages","get_current_language_bidi","plural"],n=/^[+\-*&%=<>!?|~^]/,t=/^[:\[\(\{]/,i=["true","false"],r=/^(\d[+\-\*\/])?\d+(\.\d+)?/;function o(o,a){var c=o.peek();if(a.incomment)return o.skipTo("#}")?(o.eatWhile(/\#|}/),a.incomment=!1):o.skipToEnd(),"comment";if(a.intag){if(a.operator){if(a.operator=!1,o.match(i))return"atom";if(o.match(r))return"number"}if(a.sign){if(a.sign=!1,o.match(i))return"atom";if(o.match(r))return"number"}if(a.instring)return c==a.instring&&(a.instring=!1),o.next(),"string";if("'"==c||'"'==c)return a.instring=c,o.next(),"string";if(o.match(a.intag+"}")||o.eat("-")&&o.match(a.intag+"}"))return a.intag=!1,"tag";if(o.match(n))return a.operator=!0,"operator";if(o.match(t))a.sign=!0;else if(o.eat(" ")||o.sol()){if(o.match(e))return"keyword";if(o.match(i))return"atom";if(o.match(r))return"number";o.sol()&&o.next()}else o.next();return"variable"}if(o.eat("{")){if(o.eat("#"))return a.incomment=!0,o.skipTo("#}")?(o.eatWhile(/\#|}/),a.incomment=!1):o.skipToEnd(),"comment";if(c=o.eat(/\{|%/))return a.intag=c,"{"==c&&(a.intag="}"),o.eat("-"),"tag"}o.next()}return e=new RegExp("(("+e.join(")|(")+"))\\b"),i=new RegExp("(("+i.join(")|(")+"))\\b"),{startState:function(){return{tokenize:o}},token:function(e,n){return n.tokenize(e,n)},blockCommentStart:"{#",blockCommentEnd:"#}"}})),e.defineMIME("text/jinja2","jinja2")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/jsx/jsx.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/jsx/jsx.js deleted file mode 100644 index 8ae9b2263..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/jsx/jsx.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript"],t):t(CodeMirror)}((function(t){"use strict";function e(t,e,n,r){this.state=t,this.mode=e,this.depth=n,this.prev=r}function n(r){return new e(t.copyState(r.mode,r.state),r.mode,r.depth,r.prev&&n(r.prev))}t.defineMode("jsx",(function(r,i){var a=t.getMode(r,{name:"xml",allowMissing:!0,multilineTagIndentPastTag:!1,allowMissingTagName:!0}),o=t.getMode(r,i&&i.base||"javascript");function s(t){var e=t.tagName;t.tagName=null;var n=a.indent(t,"","");return t.tagName=e,n}return{startState:function(){return{context:new e(t.startState(o),o)}},copyState:function(t){return{context:n(t.context)}},token:function n(i,c){return c.context.mode==a?function(i,c,p){if(2==p.depth)return i.match(/^.*?\*\//)?p.depth=1:i.skipToEnd(),"comment";if("{"==i.peek()){a.skipAttribute(p.state);var d=s(p.state),u=p.state.context;if(u&&i.match(/^[^>]*>\s*$/,!1)){for(;u.prev&&!u.startOfLine;)u=u.prev;u.startOfLine?d-=r.indentUnit:p.prev.state.lexical&&(d=p.prev.state.lexical.indented)}else 1==p.depth&&(d+=r.indentUnit);return c.context=new e(t.startState(o,d),o,0,c.context),null}if(1==p.depth){if("<"==i.peek())return a.skipAttribute(p.state),c.context=new e(t.startState(a,s(p.state)),a,0,c.context),null;if(i.match("//"))return i.skipToEnd(),"comment";if(i.match("/*"))return p.depth=2,n(i,c)}var x,f=a.token(i,p.state),l=i.current();return/\btag\b/.test(f)?/>$/.test(l)?p.state.context?p.depth=0:c.context=c.context.prev:/^-1&&i.backUp(l.length-x),f}(i,c,c.context):function(n,r,i){if("<"==n.peek()&&o.expressionAllowed(n,i.state))return r.context=new e(t.startState(a,o.indent(i.state,"","")),a,0,r.context),o.skipExpression(i.state),null;var s=o.token(n,i.state);if(!s&&null!=i.depth){var c=n.current();"{"==c?i.depth++:"}"==c&&0==--i.depth&&(r.context=r.context.prev)}return s}(i,c,c.context)},indent:function(t,e,n){return t.context.mode.indent(t.context.state,e,n)},innerMode:function(t){return t.context}}}),"xml","javascript"),t.defineMIME("text/jsx","jsx"),t.defineMIME("text/typescript-jsx",{name:"jsx",base:{name:"javascript",typescript:!0}})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/julia/julia.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/julia/julia.js deleted file mode 100644 index 9db2f037f..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/julia/julia.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("julia",(function(t,n){function r(e,t,n){return void 0===n&&(n=""),void 0===t&&(t="\\b"),new RegExp("^"+n+"(("+e.join(")|(")+"))"+t)}var i=["[<>]:","[<>=]=","<<=?",">>>?=?","=>","--?>","<--[->]?","\\/\\/","\\.{2,3}","[\\.\\\\%*+\\-<>!\\/^|&]=?","\\?","\\$","~",":"],a=n.operators||r(["[<>]:","[<>=]=","[!=]==","<<=?",">>>?=?","=>?","--?>","<--[->]?","\\/\\/","[\\\\%*+\\-<>!\\/^|&\\u00F7\\u22BB]=?","\\?","\\$","~",":","\\u00D7","\\u2208","\\u2209","\\u220B","\\u220C","\\u2218","\\u221A","\\u221B","\\u2229","\\u222A","\\u2260","\\u2264","\\u2265","\\u2286","\\u2288","\\u228A","\\u22C5","\\b(in|isa)\\b(?!.?\\()"],""),o=n.delimiters||/^[;,()[\]{}]/,u=n.identifiers||/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,s=r(["\\\\[0-7]{1,3}","\\\\x[A-Fa-f0-9]{1,2}","\\\\[abefnrtv0%?'\"\\\\]","([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])"],"'"),c=["if","else","elseif","while","for","begin","let","end","do","try","catch","finally","return","break","continue","global","local","const","export","import","importall","using","function","where","macro","module","baremodule","struct","type","mutable","immutable","quote","typealias","abstract","primitive","bitstype"],l=["true","false","nothing","NaN","Inf"];e.registerHelper("hintWords","julia",c.concat(l));var m=r(["begin","function","type","struct","immutable","let","macro","for","while","quote","if","else","elseif","try","finally","catch","do"]),f=r(["end","else","elseif","catch","finally"]),d=r(c),p=r(l),h=/^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,F=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,b=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/,k=r(i,"","@"),v=r(i,"",":");function g(e){return e.nestedArrays>0}function x(e,t){return void 0===t&&(t=0),e.scopes.length<=t?null:e.scopes[e.scopes.length-(t+1)]}function y(e,t){if(e.match("#=",!1))return t.tokenize=z,t.tokenize(e,t);var n=t.leavingExpr;if(e.sol()&&(n=!1),t.leavingExpr=!1,n&&e.match(/^'+/))return"operator";if(e.match(/\.{4,}/))return"error";if(e.match(/\.{1,3}/))return"operator";if(e.eatSpace())return null;var r,i,s=e.peek();if("#"===s)return e.skipToEnd(),"comment";if("["===s&&(t.scopes.push("["),t.nestedArrays++),"("===s&&(t.scopes.push("("),t.nestedGenerators++),g(t)&&"]"===s){for(;t.scopes.length&&"["!==x(t);)t.scopes.pop();t.scopes.pop(),t.nestedArrays--,t.leavingExpr=!0}if(function(e){return e.nestedGenerators>0}(t)&&")"===s){for(;t.scopes.length&&"("!==x(t);)t.scopes.pop();t.scopes.pop(),t.nestedGenerators--,t.leavingExpr=!0}if(g(t)){if("end"==t.lastToken&&e.match(":"))return"operator";if(e.match("end"))return"number"}if((r=e.match(m,!1))&&t.scopes.push(r[0]),e.match(f,!1)&&t.scopes.pop(),e.match(/^::(?![:\$])/))return t.tokenize=A,t.tokenize(e,t);if(!n&&(e.match(F)||e.match(v)))return"builtin";if(e.match(a))return"operator";if(e.match(/^\.?\d/,!1)){var c=RegExp(/^im\b/),l=!1;if(e.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(l=!0),e.match(/^0x[0-9a-f_]+/i)&&(l=!0),e.match(/^0b[01_]+/i)&&(l=!0),e.match(/^0o[0-7_]+/i)&&(l=!0),e.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(l=!0),e.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(l=!0),l)return e.match(c),t.leavingExpr=!0,"number"}if(e.match("'"))return t.tokenize=E,t.tokenize(e,t);if(e.match(b))return t.tokenize=('"""'===(i=e.current()).substr(-3)?i='"""':'"'===i.substr(-1)&&(i='"'),function(e,t){if(e.eat("\\"))e.next();else{if(e.match(i))return t.tokenize=y,t.leavingExpr=!0,"string";e.eat(/[`"]/)}return e.eatWhile(/[^\\`"]/),"string"}),t.tokenize(e,t);if(e.match(h)||e.match(k))return"meta";if(e.match(o))return null;if(e.match(d))return"keyword";if(e.match(p))return"builtin";var _=t.isDefinition||"function"==t.lastToken||"macro"==t.lastToken||"type"==t.lastToken||"struct"==t.lastToken||"immutable"==t.lastToken;return e.match(u)?_?"."===e.peek()?(t.isDefinition=!0,"variable"):(t.isDefinition=!1,"def"):(t.leavingExpr=!0,"variable"):(e.next(),"error")}function A(e,t){return e.match(/.*?(?=[,;{}()=\s]|$)/),e.match("{")?t.nestedParameters++:e.match("}")&&t.nestedParameters>0&&t.nestedParameters--,t.nestedParameters>0?e.match(/.*?(?={|})/)||e.next():0==t.nestedParameters&&(t.tokenize=y),"builtin"}function z(e,t){return e.match("#=")&&t.nestedComments++,e.match(/.*?(?=(#=|=#))/)||e.skipToEnd(),e.match("=#")&&(t.nestedComments--,0==t.nestedComments&&(t.tokenize=y)),"comment"}function E(e,t){var n,r=!1;if(e.match(s))r=!0;else if(n=e.match(/\\u([a-f0-9]{1,4})(?=')/i))((i=parseInt(n[1],16))<=55295||i>=57344)&&(r=!0,e.next());else if(n=e.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var i;(i=parseInt(n[1],16))<=1114111&&(r=!0,e.next())}return r?(t.leavingExpr=!0,t.tokenize=y,"string"):(e.match(/^[^']+(?=')/)||e.skipToEnd(),e.match("'")&&(t.tokenize=y),"error")}return{startState:function(){return{tokenize:y,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,firstParenPos:-1}},token:function(e,t){var n=t.tokenize(e,t),r=e.current();return r&&n&&(t.lastToken=r),n},indent:function(e,n){var r=0;return("]"===n||")"===n||/^end\b/.test(n)||/^else/.test(n)||/^catch\b/.test(n)||/^elseif\b/.test(n)||/^finally/.test(n))&&(r=-1),(e.scopes.length+r)*t.indentUnit},electricInput:/\b(end|else|catch|finally)\b/,blockCommentStart:"#=",blockCommentEnd:"=#",lineComment:"#",closeBrackets:'()[]{}""',fold:"indent"}})),e.defineMIME("text/x-julia","julia")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/livescript/livescript.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/livescript/livescript.js deleted file mode 100644 index a43bed7e7..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/livescript/livescript.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("livescript",(function(){var e=function(e,t){var r=t.next||"start";if(r){t.next=t.next;var n=g[r];if(n.splice){for(var o=0;o|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*"+t+")?))\\s*$"),n="(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))",o={token:"string",regex:".+"},g={start:[{token:"comment.doc",regex:"/\\*",next:"comment"},{token:"comment",regex:"#.*"},{token:"keyword",regex:"(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)"+n},{token:"constant.language",regex:"(?:true|false|yes|no|on|off|null|void|undefined)"+n},{token:"invalid.illegal",regex:"(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)"+n},{token:"language.support.class",regex:"(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)"+n},{token:"language.support.function",regex:"(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)"+n},{token:"variable.language",regex:"(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)"+n},{token:"identifier",regex:t+"\\s*:(?![:=])"},{token:"variable",regex:t},{token:"keyword.operator",regex:"(?:\\.{3}|\\s+\\?)"},{token:"keyword.variable",regex:"(?:@+|::|\\.\\.)",next:"key"},{token:"keyword.operator",regex:"\\.\\s*",next:"key"},{token:"string",regex:"\\\\\\S[^\\s,;)}\\]]*"},{token:"string.doc",regex:"'''",next:"qdoc"},{token:"string.doc",regex:'"""',next:"qqdoc"},{token:"string",regex:"'",next:"qstring"},{token:"string",regex:'"',next:"qqstring"},{token:"string",regex:"`",next:"js"},{token:"string",regex:"<\\[",next:"words"},{token:"string.regex",regex:"//",next:"heregex"},{token:"string.regex",regex:"\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}",next:"key"},{token:"constant.numeric",regex:"(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)"},{token:"lparen",regex:"[({[]"},{token:"rparen",regex:"[)}\\]]",next:"key"},{token:"keyword.operator",regex:"\\S+"},{token:"text",regex:"\\s+"}],heregex:[{token:"string.regex",regex:".*?//[gimy$?]{0,4}",next:"start"},{token:"string.regex",regex:"\\s*#{"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",regex:"\\S+"}],key:[{token:"keyword.operator",regex:"[.?@!]+"},{token:"identifier",regex:t,next:"start"},{token:"text",regex:"",next:"start"}],comment:[{token:"comment.doc",regex:".*?\\*/",next:"start"},{token:"comment.doc",regex:".+"}],qdoc:[{token:"string",regex:".*?'''",next:"key"},o],qqdoc:[{token:"string",regex:'.*?"""',next:"key"},o],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"key"},o],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"key"},o],js:[{token:"string",regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"key"},o],words:[{token:"string",regex:".*?\\]>",next:"key"},o]};for(var x in g){var i=g[x];if(i.splice)for(var a=0,s=i.length;a` "'(~:]+/,d=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,f=/^\s*\[[^\]]+?\]:.*$/,c=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function k(t,e,i){return e.f=e.inline=i,i(t,e)}function F(t,e,i){return e.f=e.block=i,i(t,e)}function D(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==E){var i=u;if(!i){var r=t.innerMode(n,e.htmlState);i="xml"==r.mode.name&&null===r.state.tagStart&&!r.state.context&&r.state.tokenize.isInText}i&&(e.f=S,e.block=p,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function p(n,u){var a,m=n.column()===u.indentation,c=!(a=u.prevLine.stream)||!/\S/.test(a.string),F=u.indentedCode,D=u.prevLine.hr,p=!1!==u.list,E=(u.listStack[u.listStack.length-1]||0)+3;u.indentedCode=!1;var C=u.indentation;if(null===u.indentationDiff&&(u.indentationDiff=u.indentation,p)){for(u.list=null;C=4&&(F||u.prevLine.fencedCodeEnd||u.prevLine.header||c))return n.skipToEnd(),u.indentedCode=!0,r.code;if(n.eatSpace())return null;if(m&&u.indentation<=E&&(B=n.match(s))&&B[1].length<=6)return u.quote=0,u.header=B[1].length,u.thisLine.header=!0,i.highlightFormatting&&(u.formatting="header"),u.f=u.inline,A(u);if(u.indentation<=E&&n.eat(">"))return u.quote=m?1:u.quote+1,i.highlightFormatting&&(u.formatting="quote"),n.eatSpace(),A(u);if(!v&&!u.setext&&m&&u.indentation<=E&&(B=n.match(o))){var L=B[1]?"ol":"ul";return u.indentation=C+n.current().length,u.list=!0,u.quote=0,u.listStack.push(u.indentation),u.em=!1,u.strong=!1,u.code=!1,u.strikethrough=!1,i.taskLists&&n.match(h,!1)&&(u.taskList=!0),u.f=u.inline,i.highlightFormatting&&(u.formatting=["list","list-"+L]),A(u)}return m&&u.indentation<=E&&(B=n.match(d,!0))?(u.quote=0,u.fencedEndRE=new RegExp(B[1]+"+ *$"),u.localMode=i.fencedCodeBlockHighlighting&&function(i){if(t.findModeByName){var n=t.findModeByName(i);n&&(i=n.mime||n.mimes[0])}var u=t.getMode(e,i);return"null"==u.name?null:u}(B[2]||i.fencedCodeBlockDefaultMode),u.localMode&&(u.localState=t.startState(u.localMode)),u.f=u.block=x,i.highlightFormatting&&(u.formatting="code-block"),u.code=-1,A(u)):u.setext||!(S&&p||u.quote||!1!==u.list||u.code||v||f.test(n.string))&&(B=n.lookAhead(1))&&(B=B.match(g))?(u.setext?(u.header=u.setext,u.setext=0,n.skipToEnd(),i.highlightFormatting&&(u.formatting="header")):(u.header="="==B[0].charAt(0)?1:2,u.setext=u.header),u.thisLine.header=!0,u.f=u.inline,A(u)):v?(n.skipToEnd(),u.hr=!0,u.thisLine.hr=!0,r.hr):"["===n.peek()?k(n,u,T):k(n,u,u.inline)}function E(e,i){var r=n.token(e,i.htmlState);if(!u){var a=t.innerMode(n,i.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||i.md_inside&&e.current().indexOf(">")>-1)&&(i.f=S,i.block=p,i.htmlState=null)}return r}function x(t,e){var n,u=e.listStack[e.listStack.length-1]||0,a=e.indentation=t.quote?e.push(r.formatting+"-"+t.formatting[n]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(r.linkHref,"url"):(t.strong&&e.push(r.strong),t.em&&e.push(r.em),t.strikethrough&&e.push(r.strikethrough),t.emoji&&e.push(r.emoji),t.linkText&&e.push(r.linkText),t.code&&e.push(r.code),t.image&&e.push(r.image),t.imageAltText&&e.push(r.imageAltText,"link"),t.imageMarker&&e.push(r.imageMarker)),t.header&&e.push(r.header,r.header+"-"+t.header),t.quote&&(e.push(r.quote),!i.maxBlockquoteDepth||i.maxBlockquoteDepth>=t.quote?e.push(r.quote+"-"+t.quote):e.push(r.quote+"-"+i.maxBlockquoteDepth)),!1!==t.list){var u=(t.listStack.length-1)%3;u?1===u?e.push(r.list2):e.push(r.list3):e.push(r.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function C(t,e){if(t.match(m,!0))return A(e)}function S(e,u){var a=u.text(e,u);if(void 0!==a)return a;if(u.list)return u.list=null,A(u);if(u.taskList)return" "===e.match(h,!0)[1]?u.taskOpen=!0:u.taskClosed=!0,i.highlightFormatting&&(u.formatting="task"),u.taskList=!1,A(u);if(u.taskOpen=!1,u.taskClosed=!1,u.header&&e.match(/^#+$/,!0))return i.highlightFormatting&&(u.formatting="header"),A(u);var l=e.next();if(u.linkTitle){u.linkTitle=!1;var o=l;"("===l&&(o=")");var s="^\\s*(?:[^"+(o=(o+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+o;if(e.match(new RegExp(s),!0))return r.linkHref}if("`"===l){var g=u.formatting;i.highlightFormatting&&(u.formatting="code"),e.eatWhile("`");var m=e.current().length;if(0!=u.code||u.quote&&1!=m){if(m==u.code){var d=A(u);return u.code=0,d}return u.formatting=g,A(u)}return u.code=m,A(u)}if(u.code)return A(u);if("\\"===l&&(e.next(),i.highlightFormatting)){var f=A(u),k=r.formatting+"-escape";return f?f+" "+k:k}if("!"===l&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return u.imageMarker=!0,u.image=!0,i.highlightFormatting&&(u.formatting="image"),A(u);if("["===l&&u.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return u.imageMarker=!1,u.imageAltText=!0,i.highlightFormatting&&(u.formatting="image"),A(u);if("]"===l&&u.imageAltText){i.highlightFormatting&&(u.formatting="image");f=A(u);return u.imageAltText=!1,u.image=!1,u.inline=u.f=B,f}if("["===l&&!u.image)return u.linkText&&e.match(/^.*?\]/)||(u.linkText=!0,i.highlightFormatting&&(u.formatting="link")),A(u);if("]"===l&&u.linkText){i.highlightFormatting&&(u.formatting="link");f=A(u);return u.linkText=!1,u.inline=u.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?B:S,f}if("<"===l&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return u.f=u.inline=v,i.highlightFormatting&&(u.formatting="link"),(f=A(u))?f+=" ":f="",f+r.linkInline;if("<"===l&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return u.f=u.inline=v,i.highlightFormatting&&(u.formatting="link"),(f=A(u))?f+=" ":f="",f+r.linkEmail;if(i.xml&&"<"===l&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var D=e.string.indexOf(">",e.pos);if(-1!=D){var p=e.string.substring(e.start,D);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(p)&&(u.md_inside=!0)}return e.backUp(1),u.htmlState=t.startState(n),F(e,u,E)}if(i.xml&&"<"===l&&e.match(/^\/\w*?>/))return u.md_inside=!1,"tag";if("*"===l||"_"===l){for(var x=1,C=1==e.pos?" ":e.string.charAt(e.pos-2);x<3&&e.eat(l);)x++;var L=e.peek()||" ",T=!/\s/.test(L)&&(!c.test(L)||/\s/.test(C)||c.test(C)),M=!/\s/.test(C)&&(!c.test(C)||/\s/.test(L)||c.test(L)),q=null,b=null;if(x%2&&(u.em||!T||"*"!==l&&M&&!c.test(C)?u.em!=l||!M||"*"!==l&&T&&!c.test(L)||(q=!1):q=!0),x>1&&(u.strong||!T||"*"!==l&&M&&!c.test(C)?u.strong!=l||!M||"*"!==l&&T&&!c.test(L)||(b=!1):b=!0),null!=b||null!=q)return i.highlightFormatting&&(u.formatting=null==q?"strong":null==b?"em":"strong em"),!0===q&&(u.em=l),!0===b&&(u.strong=l),d=A(u),!1===q&&(u.em=!1),!1===b&&(u.strong=!1),d}else if(" "===l&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return A(u);e.backUp(1)}if(i.strikethrough)if("~"===l&&e.eatWhile(l)){if(u.strikethrough)return i.highlightFormatting&&(u.formatting="strikethrough"),d=A(u),u.strikethrough=!1,d;if(e.match(/^[^\s]/,!1))return u.strikethrough=!0,i.highlightFormatting&&(u.formatting="strikethrough"),A(u)}else if(" "===l&&e.match("~~",!0)){if(" "===e.peek())return A(u);e.backUp(2)}if(i.emoji&&":"===l&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){u.emoji=!0,i.highlightFormatting&&(u.formatting="emoji");var w=A(u);return u.emoji=!1,w}return" "===l&&(e.match(/^ +$/,!1)?u.trailingSpace++:u.trailingSpace&&(u.trailingSpaceNewLine=!0)),A(u)}function v(t,e){if(">"===t.next()){e.f=e.inline=S,i.highlightFormatting&&(e.formatting="link");var n=A(e);return n?n+=" ":n="",n+r.linkInline}return t.match(/^[^>]+/,!0),r.linkInline}function B(t,e){if(t.eatSpace())return null;var n,u=t.next();return"("===u||"["===u?(e.f=e.inline=(n="("===u?")":"]",function(t,e){if(t.next()===n){e.f=e.inline=S,i.highlightFormatting&&(e.formatting="link-string");var u=A(e);return e.linkHref=!1,u}return t.match(L[n]),e.linkHref=!0,A(e)}),i.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,A(e)):"error"}var L={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function T(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=M,t.next(),i.highlightFormatting&&(e.formatting="link"),e.linkText=!0,A(e)):k(t,e,S)}function M(t,e){if(t.match("]:",!0)){e.f=e.inline=q,i.highlightFormatting&&(e.formatting="link");var n=A(e);return e.linkText=!1,n}return t.match(/^([^\]\\]|\\.)+/,!0),r.linkText}function q(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),e.f=e.inline=S,r.linkHref+" url")}var b={startState:function(){return{f:p,prevLine:{stream:null},thisLine:{stream:null},block:p,htmlState:null,indentation:0,inline:S,text:C,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(n,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine.stream){if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0))return D(e),null;if(e.prevLine=e.thisLine,e.thisLine={stream:t},e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,!e.localState&&(e.f=e.block,e.f!=E)){var i=t.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(e.indentation=i,e.indentationDiff=null,i>0)return null}}return e.f(t,e)},innerMode:function(t){return t.block==E?{state:t.htmlState,mode:n}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:b}},indent:function(e,i,u){return e.block==E&&n.indent?n.indent(e.htmlState,i,u):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,i,u):t.Pass},blankLine:D,getType:A,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return b}),"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/mathematica/mathematica.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/mathematica/mathematica.js deleted file mode 100644 index 380fd9c28..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/mathematica/mathematica.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("mathematica",(function(e,t){var a="[a-zA-Z\\$][a-zA-Z0-9\\$]*",n="(?:\\.\\d+|\\d+\\.\\d*|\\d+)",o="(?:`(?:`?"+n+")?)",r=new RegExp("(?:(?:\\d+)(?:\\^\\^(?:\\.\\w+|\\w+\\.\\w*|\\w+)"+o+"?(?:\\*\\^[+-]?\\d+)?))"),m=new RegExp("(?:"+n+o+"?(?:\\*\\^[+-]?\\d+)?)"),c=new RegExp("(?:`?)(?:"+a+")(?:`(?:"+a+"))*(?:`?)");function i(e,t){var a;return'"'===(a=e.next())?(t.tokenize=z,t.tokenize(e,t)):"("===a&&e.eat("*")?(t.commentLevel++,t.tokenize=A,t.tokenize(e,t)):(e.backUp(1),e.match(r,!0,!1)||e.match(m,!0,!1)?"number":e.match(/(?:In|Out)\[[0-9]*\]/,!0,!1)?"atom":e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::usage)/,!0,!1)?"meta":e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/,!0,!1)?"string-2":e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/,!0,!1)||e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)||e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/,!0,!1)||e.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)?"variable-2":e.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/,!0,!1)?"variable-3":e.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?"bracket":e.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/,!0,!1)?"variable-2":e.match(c,!0,!1)?"keyword":e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/,!0,!1)?"operator":(e.next(),"error"))}function z(e,t){for(var a,n=!1,o=!1;null!=(a=e.next());){if('"'===a&&!o){n=!0;break}o=!o&&"\\"===a}return n&&!o&&(t.tokenize=i),"string"}function A(e,t){for(var a,n;t.commentLevel>0&&null!=(n=e.next());)"("===a&&"*"===n&&t.commentLevel++,"*"===a&&")"===n&&t.commentLevel--,a=n;return t.commentLevel<=0&&(t.tokenize=i),"comment"}return{startState:function(){return{tokenize:i,commentLevel:0}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},blockCommentStart:"(*",blockCommentEnd:"*)"}})),e.defineMIME("text/x-mathematica",{name:"mathematica"})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/mbox/mbox.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/mbox/mbox.js deleted file mode 100644 index e6ebbfbbc..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/mbox/mbox.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var r=["From","Sender","Reply-To","To","Cc","Bcc","Message-ID","In-Reply-To","References","Resent-From","Resent-Sender","Resent-To","Resent-Cc","Resent-Bcc","Resent-Message-ID","Return-Path","Received"],n=["Date","Subject","Comments","Keywords","Resent-Date"];e.registerHelper("hintWords","mbox",r.concat(n));var t=/^[ \t]/,i=/^From /,a=new RegExp("^("+r.join("|")+"): "),o=new RegExp("^("+n.join("|")+"): "),d=/^[^:]+:/,c=/^[^ ]+@[^ ]+/,m=/^.*?(?=[^ ]+?@[^ ]+)/,s=/^<.*?>/,u=/^.*?(?=<.*>)/;function f(e,r){if(e.sol()){if(r.inSeparator=!1,r.inHeader&&e.match(t))return null;if(r.inHeader=!1,r.header=null,e.match(i))return r.inHeaders=!0,r.inSeparator=!0,"atom";var n,f=!1;return(n=e.match(o))||(f=!0)&&(n=e.match(a))?(r.inHeaders=!0,r.inHeader=!0,r.emailPermitted=f,r.header=n[1],"atom"):r.inHeaders&&(n=e.match(d))?(r.inHeader=!0,r.emailPermitted=!0,r.header=n[1],"atom"):(r.inHeaders=!1,e.skipToEnd(),null)}if(r.inSeparator)return e.match(c)?"link":(e.match(m)||e.skipToEnd(),"atom");if(r.inHeader){var l=function(e){return"Subject"===e?"header":"string"}(r.header);if(r.emailPermitted){if(e.match(s))return l+" link";if(e.match(u))return l}return e.skipToEnd(),l}return e.skipToEnd(),null}e.defineMode("mbox",(function(){return{startState:function(){return{inSeparator:!1,inHeader:!1,emailPermitted:!1,header:null,inHeaders:!1}},token:f,blankLine:function(e){e.inHeaders=e.inSeparator=e.inHeader=!1}}})),e.defineMIME("application/mbox","mbox")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/meta.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/meta.js deleted file mode 100644 index 94f0dfe86..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/meta.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../lib/codemirror")):"function"==typeof define&&define.amd?define(["../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var m=0;m-1&&m.substring(i+1,m.length);if(x)return e.findModeByExtension(x)},e.findModeByName=function(m){m=m.toLowerCase();for(var t=0;t!?^\/\|]/;function o(e,i,$){return i.tokenize=$,$(e,i)}function n(e,n){var l=n.beforeParams;n.beforeParams=!1;var c=e.next();if(/[\[\]{}\(\),\.]/.test(c))return"("==c&&l?n.inParams=!0:")"==c&&(n.inParams=!1),null;if(/\d/.test(c))return e.eatWhile(/[\w\.]/),"number";if("\\"==c)return e.eat("\\"),e.eat(/./),"number";if("/"==c&&e.eat("*"))return o(e,n,a);if(";"==c&&e.match(/ *\( *\(/))return o(e,n,s);if(";"!=c||n.inParams){if('"'==c)return e.eat(/"/),"keyword";if("$"==c)return e.eatWhile(/[$_a-z0-9A-Z\.:]/),i&&i.propertyIsEnumerable(e.current().toLowerCase())?"keyword":(n.beforeParams=!0,"builtin");if("%"==c)return e.eatWhile(/[^,\s()]/),n.beforeParams=!0,"string";if(t.test(c))return e.eatWhile(t),"operator";e.eatWhile(/[\w\$_{}]/);var d=e.current().toLowerCase();return $&&$.propertyIsEnumerable(d)?"keyword":r&&r.propertyIsEnumerable(d)?(n.beforeParams=!0,"keyword"):null}return e.skipToEnd(),"comment"}function a(e,i){for(var $,r=!1;$=e.next();){if("/"==$&&r){i.tokenize=n;break}r="*"==$}return"comment"}function s(e,i){for(var $,r=0;$=e.next();){if(";"==$&&2==r){i.tokenize=n;break}")"==$?r++:" "!=$&&(r=0)}return"meta"}return{startState:function(){return{tokenize:n,beforeParams:!1,inParams:!1}},token:function(e,i){return e.eatSpace()?null:i.tokenize(e,i)}}}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/mllike/mllike.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/mllike/mllike.js deleted file mode 100644 index 87291d9df..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/mllike/mllike.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("mllike",(function(r,o){var t={as:"keyword",do:"keyword",else:"keyword",end:"keyword",exception:"keyword",fun:"keyword",functor:"keyword",if:"keyword",in:"keyword",include:"keyword",let:"keyword",of:"keyword",open:"keyword",rec:"keyword",struct:"keyword",then:"keyword",type:"keyword",val:"keyword",while:"keyword",with:"keyword"},i=o.extraWords||{};for(var n in i)i.hasOwnProperty(n)&&(t[n]=o.extraWords[n]);var d=[];for(var k in t)d.push(k);function y(e,r){var i=e.next();if('"'===i)return r.tokenize=l,r.tokenize(e,r);if("{"===i&&e.eat("|"))return r.longString=!0,r.tokenize=a,r.tokenize(e,r);if("("===i&&e.match(/^\*(?!\))/))return r.commentLevel++,r.tokenize=w,r.tokenize(e,r);if("~"===i||"?"===i)return e.eatWhile(/\w/),"variable-2";if("`"===i)return e.eatWhile(/\w/),"quote";if("/"===i&&o.slashComments&&e.eat("/"))return e.skipToEnd(),"comment";if(/\d/.test(i))return"0"===i&&e.eat(/[bB]/)&&e.eatWhile(/[01]/),"0"===i&&e.eat(/[xX]/)&&e.eatWhile(/[0-9a-fA-F]/),"0"===i&&e.eat(/[oO]/)?e.eatWhile(/[0-7]/):(e.eatWhile(/[\d_]/),e.eat(".")&&e.eatWhile(/[\d]/),e.eat(/[eE]/)&&e.eatWhile(/[\d\-+]/)),"number";if(/[+\-*&%=<>!?|@\.~:]/.test(i))return"operator";if(/[\w\xa1-\uffff]/.test(i)){e.eatWhile(/[\w\xa1-\uffff]/);var n=e.current();return t.hasOwnProperty(n)?t[n]:"variable"}return null}function l(e,r){for(var o,t=!1,i=!1;null!=(o=e.next());){if('"'===o&&!i){t=!0;break}i=!i&&"\\"===o}return t&&!i&&(r.tokenize=y),"string"}function w(e,r){for(var o,t;r.commentLevel>0&&null!=(t=e.next());)"("===o&&"*"===t&&r.commentLevel++,"*"===o&&")"===t&&r.commentLevel--,o=t;return r.commentLevel<=0&&(r.tokenize=y),"comment"}function a(e,r){for(var o,t;r.longString&&null!=(t=e.next());)"|"===o&&"}"===t&&(r.longString=!1),o=t;return r.longString||(r.tokenize=y),"string"}return e.registerHelper("hintWords","mllike",d),{startState:function(){return{tokenize:y,commentLevel:0,longString:!1}},token:function(e,r){return e.eatSpace()?null:r.tokenize(e,r)},blockCommentStart:"(*",blockCommentEnd:"*)",lineComment:o.slashComments?"//":null}})),e.defineMIME("text/x-ocaml",{name:"mllike",extraWords:{and:"keyword",assert:"keyword",begin:"keyword",class:"keyword",constraint:"keyword",done:"keyword",downto:"keyword",external:"keyword",function:"keyword",initializer:"keyword",lazy:"keyword",match:"keyword",method:"keyword",module:"keyword",mutable:"keyword",new:"keyword",nonrec:"keyword",object:"keyword",private:"keyword",sig:"keyword",to:"keyword",try:"keyword",value:"keyword",virtual:"keyword",when:"keyword",raise:"builtin",failwith:"builtin",true:"builtin",false:"builtin",asr:"builtin",land:"builtin",lor:"builtin",lsl:"builtin",lsr:"builtin",lxor:"builtin",mod:"builtin",or:"builtin",raise_notrace:"builtin",trace:"builtin",exit:"builtin",print_string:"builtin",print_endline:"builtin",int:"type",float:"type",bool:"type",char:"type",string:"type",unit:"type",List:"builtin"}}),e.defineMIME("text/x-fsharp",{name:"mllike",extraWords:{abstract:"keyword",assert:"keyword",base:"keyword",begin:"keyword",class:"keyword",default:"keyword",delegate:"keyword","do!":"keyword",done:"keyword",downcast:"keyword",downto:"keyword",elif:"keyword",extern:"keyword",finally:"keyword",for:"keyword",function:"keyword",global:"keyword",inherit:"keyword",inline:"keyword",interface:"keyword",internal:"keyword",lazy:"keyword","let!":"keyword",match:"keyword",member:"keyword",module:"keyword",mutable:"keyword",namespace:"keyword",new:"keyword",null:"keyword",override:"keyword",private:"keyword",public:"keyword","return!":"keyword",return:"keyword",select:"keyword",static:"keyword",to:"keyword",try:"keyword",upcast:"keyword","use!":"keyword",use:"keyword",void:"keyword",when:"keyword","yield!":"keyword",yield:"keyword",atomic:"keyword",break:"keyword",checked:"keyword",component:"keyword",const:"keyword",constraint:"keyword",constructor:"keyword",continue:"keyword",eager:"keyword",event:"keyword",external:"keyword",fixed:"keyword",method:"keyword",mixin:"keyword",object:"keyword",parallel:"keyword",process:"keyword",protected:"keyword",pure:"keyword",sealed:"keyword",tailcall:"keyword",trait:"keyword",virtual:"keyword",volatile:"keyword",List:"builtin",Seq:"builtin",Map:"builtin",Set:"builtin",Option:"builtin",int:"builtin",string:"builtin",not:"builtin",true:"builtin",false:"builtin",raise:"builtin",failwith:"builtin"},slashComments:!0}),e.defineMIME("text/x-sml",{name:"mllike",extraWords:{abstype:"keyword",and:"keyword",andalso:"keyword",case:"keyword",datatype:"keyword",fn:"keyword",handle:"keyword",infix:"keyword",infixr:"keyword",local:"keyword",nonfix:"keyword",op:"keyword",orelse:"keyword",raise:"keyword",withtype:"keyword",eqtype:"keyword",sharing:"keyword",sig:"keyword",signature:"keyword",structure:"keyword",where:"keyword",true:"keyword",false:"keyword",int:"builtin",real:"builtin",string:"builtin",char:"builtin",bool:"builtin"},slashComments:!0})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/modelica/modelica.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/modelica/modelica.js deleted file mode 100644 index fc6202f12..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/modelica/modelica.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){for(var t={},n=e.split(" "),r=0;r+\-\/^\[\]]/,u=/(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/,s=/[0-9]/,c=/[_a-zA-Z]/;function f(e,t){return e.skipToEnd(),t.tokenize=null,"comment"}function p(e,t){for(var n,r=!1;n=e.next();){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return"comment"}function d(e,t){for(var n,r=!1;null!=(n=e.next());){if('"'==n&&!r){t.tokenize=null,t.sol=!1;break}r=!r&&"\\"==n}return"string"}function m(e,t){for(e.eatWhile(s);e.eat(s)||e.eat(c););var n=e.current();return!t.sol||"package"!=n&&"model"!=n&&"when"!=n&&"connector"!=n?t.sol&&"end"==n&&t.level>0&&t.level--:t.level++,t.tokenize=null,t.sol=!1,o.propertyIsEnumerable(n)?"keyword":i.propertyIsEnumerable(n)?"builtin":l.propertyIsEnumerable(n)?"atom":"variable"}function k(e,t){for(;e.eat(/[^']/););return t.tokenize=null,t.sol=!1,e.eat("'")?"variable":"error"}function b(e,t){return e.eatWhile(s),e.eat(".")&&e.eatWhile(s),(e.eat("e")||e.eat("E"))&&(e.eat("-")||e.eat("+"),e.eatWhile(s)),t.tokenize=null,t.sol=!1,"number"}return{startState:function(){return{tokenize:null,level:0,sol:!0}},token:function(e,t){if(null!=t.tokenize)return t.tokenize(e,t);if(e.sol()&&(t.sol=!0),e.eatSpace())return t.tokenize=null,null;var n=e.next();if("/"==n&&e.eat("/"))t.tokenize=f;else if("/"==n&&e.eat("*"))t.tokenize=p;else{if(u.test(n+e.peek()))return e.next(),t.tokenize=null,"operator";if(a.test(n))return t.tokenize=null,"operator";if(c.test(n))t.tokenize=m;else if("'"==n&&e.peek()&&"'"!=e.peek())t.tokenize=k;else if('"'==n)t.tokenize=d;else{if(!s.test(n))return t.tokenize=null,"error";t.tokenize=b}}return t.tokenize(e,t)},indent:function(t,n){if(null!=t.tokenize)return e.Pass;var o=t.level;return/(algorithm)/.test(n)&&o--,/(equation)/.test(n)&&o--,/(initial algorithm)/.test(n)&&o--,/(initial equation)/.test(n)&&o--,/(end)/.test(n)&&o--,o>0?r*o:0},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}})),function(t,n){"string"==typeof t&&(t=[t]);var r=[];function o(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}o(n.keywords),o(n.builtin),o(n.atoms),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var i=0;i","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]},xu:{keywords:["msc","xu"],options:["hscale","width","arcgradient","wordwraparcs","wordwrapentities","watermark"],constants:["true","false","on","off","auto"],attributes:["label","idurl","id","url","linecolor","linecolour","textcolor","textcolour","textbgcolor","textbgcolour","arclinecolor","arclinecolour","arctextcolor","arctextcolour","arctextbgcolor","arctextbgcolour","arcskip","title","deactivate","activate","activation"],brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box","alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]},msgenny:{keywords:null,options:["hscale","width","arcgradient","wordwraparcs","wordwrapentities","watermark"],constants:["true","false","on","off","auto"],attributes:null,brackets:["\\{","\\}"],arcsWords:["note","abox","rbox","box","alt","else","opt","break","par","seq","strict","neg","critical","ignore","consider","assert","loop","ref","exc"],arcsOthers:["\\|\\|\\|","\\.\\.\\.","---","--","<->","==","<<=>>","<=>","\\.\\.","<<>>","::","<:>","->","=>>","=>",">>",":>","<-","<<=","<=","<<","<:","x-","-x"],singlecomment:["//","#"],operators:["="]}};function e(t){return new RegExp("^\\b(?:"+t.join("|")+")\\b","i")}function n(t){return new RegExp("^(?:"+t.join("|")+")","i")}function o(){return{inComment:!1,inString:!1,inAttributeList:!1,inScript:!1}}function i(t){return{inComment:t.inComment,inString:t.inString,inAttributeList:t.inAttributeList,inScript:t.inScript}}t.defineMode("mscgen",(function(t,c){var a,s=r[c&&c.language||"mscgen"];return{startState:o,copyState:i,token:(a=s,function(t,r){if(t.match(n(a.brackets),!0,!0))return"bracket";if(!r.inComment){if(t.match(/\/\*[^\*\/]*/,!0,!0))return r.inComment=!0,"comment";if(t.match(n(a.singlecomment),!0,!0))return t.skipToEnd(),"comment"}if(r.inComment)return t.match(/[^\*\/]*\*\//,!0,!0)?r.inComment=!1:t.skipToEnd(),"comment";if(!r.inString&&t.match(/\"(\\\"|[^\"])*/,!0,!0))return r.inString=!0,"string";if(r.inString)return t.match(/[^\"]*\"/,!0,!0)?r.inString=!1:t.skipToEnd(),"string";if(a.keywords&&t.match(e(a.keywords),!0,!0))return"keyword";if(t.match(e(a.options),!0,!0))return"keyword";if(t.match(e(a.arcsWords),!0,!0))return"keyword";if(t.match(n(a.arcsOthers),!0,!0))return"keyword";if(a.operators&&t.match(n(a.operators),!0,!0))return"operator";if(a.constants&&t.match(n(a.constants),!0,!0))return"variable";if(!a.inAttributeList&&a.attributes&&t.match("[",!0,!0))return a.inAttributeList=!0,"bracket";if(a.inAttributeList){if(null!==a.attributes&&t.match(e(a.attributes),!0,!0))return"attribute";if(t.match("]",!0,!0))return a.inAttributeList=!1,"bracket"}return t.next(),"base"}),lineComment:"#",blockCommentStart:"/*",blockCommentEnd:"*/"}})),t.defineMIME("text/x-mscgen","mscgen"),t.defineMIME("text/x-xu",{name:"mscgen",language:"xu"}),t.defineMIME("text/x-msgenny",{name:"mscgen",language:"msgenny"})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/mumps/mumps.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/mumps/mumps.js deleted file mode 100644 index 818b328af..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/mumps/mumps.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("mumps",(function(){function e(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var t=new RegExp("^[\\+\\-\\*/&#!_?\\\\<>=\\'\\[\\]]"),n=new RegExp("^(('=)|(<=)|(>=)|('>)|('<)|([[)|(]])|(^$))"),o=new RegExp("^[\\.,:]"),r=new RegExp("[()]"),$=new RegExp("^[%A-Za-z][A-Za-z0-9]*"),a=e(["\\$ascii","\\$char","\\$data","\\$ecode","\\$estack","\\$etrap","\\$extract","\\$find","\\$fnumber","\\$get","\\$horolog","\\$io","\\$increment","\\$job","\\$justify","\\$length","\\$name","\\$next","\\$order","\\$piece","\\$qlength","\\$qsubscript","\\$query","\\$quit","\\$random","\\$reverse","\\$select","\\$stack","\\$test","\\$text","\\$translate","\\$view","\\$x","\\$y","\\$a","\\$c","\\$d","\\$e","\\$ec","\\$es","\\$et","\\$f","\\$fn","\\$g","\\$h","\\$i","\\$j","\\$l","\\$n","\\$na","\\$o","\\$p","\\$q","\\$ql","\\$qs","\\$r","\\$re","\\$s","\\$st","\\$t","\\$tr","\\$v","\\$z"]),i=e(["break","close","do","else","for","goto","halt","hang","if","job","kill","lock","merge","new","open","quit","read","set","tcommit","trollback","tstart","use","view","write","xecute","b","c","d","e","f","g","h","i","j","k","l","m","n","o","q","r","s","tc","tro","ts","u","v","w","x"]);return{startState:function(){return{label:!1,commandMode:0}},token:function(e,c){var m=function(e,c){e.sol()&&(c.label=!0,c.commandMode=0);var m=e.peek();return" "==m||"\t"==m?(c.label=!1,0==c.commandMode?c.commandMode=1:(c.commandMode<0||2==c.commandMode)&&(c.commandMode=0)):"."!=m&&c.commandMode>0&&(c.commandMode=":"==m?-1:2),"("!==m&&"\t"!==m||(c.label=!1),";"===m?(e.skipToEnd(),"comment"):e.match(/^[-+]?\d+(\.\d+)?([eE][-+]?\d+)?/)?"number":'"'==m?e.skipTo('"')?(e.next(),"string"):(e.skipToEnd(),"error"):e.match(n)||e.match(t)?"operator":e.match(o)?null:r.test(m)?(e.next(),"bracket"):c.commandMode>0&&e.match(i)?"variable-2":e.match(a)?"builtin":e.match($)?"variable":"$"===m||"^"===m?(e.next(),"builtin"):"@"===m?(e.next(),"string-2"):/[\w%]/.test(m)?(e.eatWhile(/[\w%]/),"variable"):(e.next(),"error")}(e,c);return c.label?"tag":m}}})),e.defineMIME("text/x-mumps","mumps")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/nginx/nginx.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/nginx/nginx.js deleted file mode 100644 index c758e146e..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/nginx/nginx.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("nginx",(function(e){function _(e){for(var _={},t=e.split(" "),i=0;i*\/]/.test(p)?o(null,"select-op"):/[;{}:\[\]]/.test(p)?o(null,p):(e.eatWhile(/[\w\\\-]/),o("variable","variable")):o(null,"compare"):void o(null,"compare")}function c(e,_){for(var t,i=!1;null!=(t=e.next());){if(i&&"/"==t){_.tokenize=n;break}i="*"==t}return o("comment","comment")}function l(e,_){for(var t,i=0;null!=(t=e.next());){if(i>=2&&">"==t){_.tokenize=n;break}i="-"==t?i+1:0}return o("comment","comment")}return{startState:function(e){return{tokenize:n,baseIndent:e||0,stack:[]}},token:function(e,_){if(e.eatSpace())return null;t=null;var i=_.tokenize(e,_),r=_.stack[_.stack.length-1];return"hash"==t&&"rule"==r?i="atom":"variable"==i&&("rule"==r?i="number":r&&"@media{"!=r||(i="tag")),"rule"==r&&/^[\{\};]$/.test(t)&&_.stack.pop(),"{"==t?"@media"==r?_.stack[_.stack.length-1]="@media{":_.stack.push("{"):"}"==t?_.stack.pop():"@media"==t?_.stack.push("@media"):"{"==r&&"comment"!=t&&_.stack.push("rule"),i},indent:function(e,_){var t=e.stack.length;return/^\}/.test(_)&&(t-="rule"==e.stack[e.stack.length-1]?2:1),e.baseIndent+t*a},electricChars:"}"}})),e.defineMIME("text/x-nginx-conf","nginx")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/nsis/nsis.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/nsis/nsis.js deleted file mode 100644 index c81499c28..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/nsis/nsis.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/simple")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/simple"],e):e(CodeMirror)}((function(e){"use strict";e.defineSimpleMode("nsis",{start:[{regex:/(?:[+-]?)(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\d+.?\d*)/,token:"number"},{regex:/"(?:[^\\"]|\\.)*"?/,token:"string"},{regex:/'(?:[^\\']|\\.)*'?/,token:"string"},{regex:/`(?:[^\\`]|\\.)*`?/,token:"string"},{regex:/^\s*(?:\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|error|execute|finalize|getdllversion|gettlbversion|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|uninstfinalize|verbose|warning))\b/i,token:"keyword"},{regex:/^\s*(?:\!(if(?:n?def)?|ifmacron?def|macro))\b/i,token:"keyword",indent:!0},{regex:/^\s*(?:\!(else|endif|macroend))\b/i,token:"keyword",dedent:!0},{regex:/^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecShellWait|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetKnownFolderPath|GetLabelAddress|GetTempFileName|GetWinVer|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfRtlLanguage|IfShellVarContextAll|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|Int64Cmp|Int64CmpU|Int64Fmt|IntCmp|IntCmpU|IntFmt|IntOp|IntPtrCmp|IntPtrCmpU|IntPtrOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadAndSetImage|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestLongPathAware|ManifestMaxVersionTested|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|PEAddResource|PEDllCharacteristics|PERemoveResource|PESubsysVer|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegMultiStr|WriteRegNone|WriteRegStr|WriteUninstaller|XPStyle)\b/i,token:"keyword"},{regex:/^\s*(?:Function|PageEx|Section(?:Group)?)\b/i,token:"keyword",indent:!0},{regex:/^\s*(?:(Function|PageEx|Section(?:Group)?)End)\b/i,token:"keyword",dedent:!0},{regex:/\b(?:ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HIDDEN|HKCC|HKCR(32|64)?|HKCU(32|64)?|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM(32|64)?|HKPD|HKU|IDABORT|IDCANCEL|IDD_DIR|IDD_INST|IDD_INSTFILES|IDD_LICENSE|IDD_SELCOM|IDD_UNINST|IDD_VERIFY|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SW_HIDE|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWNORMAL|SYSTEM|TEMPORARY)\b/i,token:"atom"},{regex:/\b(?:admin|all|auto|both|bottom|bzip2|components|current|custom|directory|false|force|hide|highest|ifdiff|ifnewer|instfiles|lastused|leave|left|license|listonly|lzma|nevershow|none|normal|notset|off|on|right|show|silent|silentlog|textonly|top|true|try|un\.components|un\.custom|un\.directory|un\.instfiles|un\.license|uninstConfirm|user|Win10|Win7|Win8|WinVista|zlib)\b/i,token:"builtin"},{regex:/\$\{(?:And(?:If(?:Not)?|Unless)|Break|Case(?:Else)?|Continue|Default|Do(?:Until|While)?|Else(?:If(?:Not)?|Unless)?|End(?:If|Select|Switch)|Exit(?:Do|For|While)|For(?:Each)?|If(?:Cmd|Not(?:Then)?|Then)?|Loop(?:Until|While)?|Or(?:If(?:Not)?|Unless)|Select|Switch|Unless|While)\}/i,token:"variable-2",indent:!0},{regex:/\$\{(?:BannerTrimPath|DirState|DriveSpace|Get(BaseName|Drives|ExeName|ExePath|FileAttributes|FileExt|FileName|FileVersion|Options|OptionsS|Parameters|Parent|Root|Size|Time)|Locate|RefreshShellIcons)\}/i,token:"variable-2",dedent:!0},{regex:/\$\{(?:Memento(?:Section(?:Done|End|Restore|Save)?|UnselectedSection))\}/i,token:"variable-2",dedent:!0},{regex:/\$\{(?:Config(?:Read|ReadS|Write|WriteS)|File(?:Join|ReadFromEnd|Recode)|Line(?:Find|Read|Sum)|Text(?:Compare|CompareS)|TrimNewLines)\}/i,token:"variable-2",dedent:!0},{regex:/\$\{(?:(?:At(?:Least|Most)|Is)(?:ServicePack|Win(?:7|8|10|95|98|200(?:0|3|8(?:R2)?)|ME|NT4|Vista|XP))|Is(?:NT|Server))\}/i,token:"variable",dedent:!0},{regex:/\$\{(?:StrFilterS?|Version(?:Compare|Convert)|Word(?:AddS?|Find(?:(?:2|3)X)?S?|InsertS?|ReplaceS?))\}/i,token:"variable-2",dedent:!0},{regex:/\$\{(?:RunningX64)\}/i,token:"variable",dedent:!0},{regex:/\$\{(?:Disable|Enable)X64FSRedirection\}/i,token:"variable-2",dedent:!0},{regex:/(#|;).*/,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/\$\w[\w\.]*/,token:"variable"},{regex:/\${[\!\w\.:-]+}/,token:"variable-2"},{regex:/\$\([\!\w\.:-]+\)/,token:"variable-3"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{electricInput:/^\s*((Function|PageEx|Section|Section(Group)?)End|(\!(endif|macroend))|\$\{(End(If|Unless|While)|Loop(Until)|Next)\})$/i,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:["#",";"]}}),e.defineMIME("text/x-nsis","nsis")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ntriples/ntriples.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ntriples/ntriples.js deleted file mode 100644 index 55a0e05e9..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ntriples/ntriples.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("ntriples",(function(){function e(e,n){var t,r=e.location;t=0==r&&"<"==n?1:0==r&&"_"==n?2:3==r&&"<"==n?4:5==r&&"<"==n?6:5==r&&"_"==n?7:5==r&&'"'==n?8:1==r&&">"==n||2==r&&" "==n?3:4==r&&">"==n?5:6==r&&">"==n||7==r&&" "==n||8==r&&'"'==n||9==r&&" "==n||10==r&&">"==n?11:8==r&&"@"==n?9:8==r&&"^"==n?10:" "!=n||0!=r&&3!=r&&5!=r&&11!=r?11==r&&"."==n?0:12:r,e.location=t}return{startState:function(){return{location:0,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(n,t){var r=n.next();if("<"==r){e(t,r);var i="";return n.eatWhile((function(e){return"#"!=e&&">"!=e&&(i+=e,!0)})),t.uris.push(i),n.match("#",!1)||(n.next(),e(t,">")),"variable"}if("#"==r){var o="";return n.eatWhile((function(e){return">"!=e&&" "!=e&&(o+=e,!0)})),t.anchors.push(o),"variable-2"}if(">"==r)return e(t,">"),"variable";if("_"==r){e(t,r);var u="";return n.eatWhile((function(e){return" "!=e&&(u+=e,!0)})),t.bnodes.push(u),n.next(),e(t," "),"builtin"}if('"'==r)return e(t,r),n.eatWhile((function(e){return'"'!=e})),n.next(),"@"!=n.peek()&&"^"!=n.peek()&&e(t,'"'),"string";if("@"==r){e(t,"@");var a="";return n.eatWhile((function(e){return" "!=e&&(a+=e,!0)})),t.langs.push(a),n.next(),e(t," "),"string-2"}if("^"==r){n.next(),e(t,"^");var f="";return n.eatWhile((function(e){return">"!=e&&(f+=e,!0)})),t.types.push(f),n.next(),e(t,">"),"variable"}" "==r&&e(t,r),"."==r&&e(t,r)}}})),e.defineMIME("application/n-triples","ntriples"),e.defineMIME("application/n-quads","ntriples"),e.defineMIME("text/n-triples","ntriples")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/octave/octave.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/octave/octave.js deleted file mode 100644 index b5c1af138..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/octave/octave.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("octave",(function(){function e(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n=new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"),t=new RegExp("^[\\(\\[\\{\\},:=;\\.]"),r=new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"),i=new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"),o=new RegExp("^((>>=)|(<<=))"),a=new RegExp("^[\\]\\)]"),c=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*"),m=e(["error","eval","function","abs","acos","atan","asin","cos","cosh","exp","log","prod","sum","log10","max","min","sign","sin","sinh","sqrt","tan","reshape","break","zeros","default","margin","round","ones","rand","syn","ceil","floor","size","clear","zeros","eye","mean","std","cov","det","eig","inv","norm","rank","trace","expm","logm","sqrtm","linspace","plot","title","xlabel","ylabel","legend","text","grid","meshgrid","mesh","num2str","fft","ifft","arrayfun","cellfun","input","fliplr","flipud","ismember"]),f=e(["return","case","switch","else","elseif","end","endif","endfunction","if","otherwise","do","for","while","try","catch","classdef","properties","events","methods","global","persistent","endfor","endwhile","printf","sprintf","disp","until","continue","pkg"]);function u(e,n){return e.sol()||"'"!==e.peek()?(n.tokenize=l,l(e,n)):(e.next(),n.tokenize=l,"operator")}function s(e,n){return e.match(/^.*%}/)?(n.tokenize=l,"comment"):(e.skipToEnd(),"comment")}function l(d,p){if(d.eatSpace())return null;if(d.match("%{"))return p.tokenize=s,d.skipToEnd(),"comment";if(d.match(/^[%#]/))return d.skipToEnd(),"comment";if(d.match(/^[0-9\.+-]/,!1)){if(d.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/))return d.tokenize=l,"number";if(d.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/))return"number";if(d.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/))return"number"}if(d.match(e(["nan","NaN","inf","Inf"])))return"number";var h=d.match(/^"(?:[^"]|"")*("|$)/)||d.match(/^'(?:[^']|'')*('|$)/);return h?h[1]?"string":"string error":d.match(f)?"keyword":d.match(m)?"builtin":d.match(c)?"variable":d.match(n)||d.match(r)?"operator":d.match(t)||d.match(i)||d.match(o)?null:d.match(a)?(p.tokenize=u,null):(d.next(),"error")}return{startState:function(){return{tokenize:l}},token:function(e,n){var t=n.tokenize(e,n);return"number"!==t&&"variable"!==t||(n.tokenize=u),t},lineComment:"%",fold:"indent"}})),e.defineMIME("text/x-octave","octave")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/oz/oz.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/oz/oz.js deleted file mode 100644 index a3d4626d9..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/oz/oz.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("oz",(function(e){function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n,r=/[\^@!\|<>#~\.\*\-\+\\/,=]/,o=/(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/,a=/(:::)|(\.\.\.)|(=<:)|(>=:)/,i=["in","then","else","of","elseof","elsecase","elseif","catch","finally","with","require","prepare","import","export","define","do"],c=["end"],u=t(["true","false","nil","unit"]),f=t(["andthen","at","attr","declare","feat","from","lex","mod","div","mode","orelse","parser","prod","prop","scanner","self","syn","token"]),d=t(["local","proc","fun","case","class","if","cond","or","dis","choice","not","thread","try","raise","lock","for","suchthat","meth","functor"]),s=t(i),l=t(c);function m(e,t){if(e.eatSpace())return null;if(e.match(/[{}]/))return"bracket";if(e.match("[]"))return"keyword";if(e.match(a)||e.match(o))return"operator";if(e.match(u))return"atom";var n=e.match(d);if(n)return t.doInCurrentLine?t.doInCurrentLine=!1:t.currentIndent++,"proc"==n[0]||"fun"==n[0]?t.tokenize=p:"class"==n[0]?t.tokenize=h:"meth"==n[0]&&(t.tokenize=k),"keyword";if(e.match(s)||e.match(f))return"keyword";if(e.match(l))return t.currentIndent--,"keyword";var i,c=e.next();if('"'==c||"'"==c)return t.tokenize=(i=c,function(e,t){for(var n,r=!1,o=!1;null!=(n=e.next());){if(n==i&&!r){o=!0;break}r=!r&&"\\"==n}return!o&&r||(t.tokenize=m),"string"}),t.tokenize(e,t);if(/[~\d]/.test(c)){if("~"==c){if(!/^[0-9]/.test(e.peek()))return null;if("0"==e.next()&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/))return"number"}return"0"==c&&e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/)?"number":null}return"%"==c?(e.skipToEnd(),"comment"):"/"==c&&e.eat("*")?(t.tokenize=z,z(e,t)):r.test(c)?"operator":(e.eatWhile(/\w/),"variable")}function h(e,t){return e.eatSpace()?null:(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)/),t.tokenize=m,"variable-3")}function k(e,t){return e.eatSpace()?null:(e.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/),t.tokenize=m,"def")}function p(e,t){return e.eatSpace()?null:!t.hasPassedFirstStage&&e.eat("{")?(t.hasPassedFirstStage=!0,"bracket"):t.hasPassedFirstStage?(e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)|\$/),t.hasPassedFirstStage=!1,t.tokenize=m,"def"):(t.tokenize=m,null)}function z(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=m;break}r="*"==n}return"comment"}return{startState:function(){return{tokenize:m,currentIndent:0,doInCurrentLine:!1,hasPassedFirstStage:!1}},token:function(e,t){return e.sol()&&(t.doInCurrentLine=0),t.tokenize(e,t)},indent:function(t,n){var r=n.replace(/^\s+|\s+$/g,"");return r.match(l)||r.match(s)||r.match(/(\[])/)?e.indentUnit*(t.currentIndent-1):t.currentIndent<0?0:t.currentIndent*e.indentUnit},fold:"indent",electricInput:(n=i.concat(c),new RegExp("[\\[\\]]|("+n.join("|")+")$")),lineComment:"%",blockCommentStart:"/*",blockCommentEnd:"*/"}})),e.defineMIME("text/x-oz","oz")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/pascal/pascal.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/pascal/pascal.js deleted file mode 100644 index 9dca50b91..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/pascal/pascal.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("pascal",(function(){var e=function(e){for(var r={},t="absolute and array asm begin case const constructor destructor div do downto else end file for function goto if implementation in inherited inline interface label mod nil not object of operator or packed procedure program record reintroduce repeat self set shl shr string then to type unit until uses var while with xor as class dispinterface except exports finalization finally initialization inline is library on out packed property raise resourcestring threadvar try absolute abstract alias assembler bitpacked break cdecl continue cppdecl cvar default deprecated dynamic enumerator experimental export external far far16 forward generic helper implements index interrupt iocheck local message name near nodefault noreturn nostackframe oldfpccall otherwise overload override pascal platform private protected public published read register reintroduce result safecall saveregisters softfloat specialize static stdcall stored strict unaligned unimplemented varargs virtual write".split(" "),n=0;n!?|\/]/;function n(n,o){var l,c=n.next();if("#"==c&&o.startOfLine)return n.skipToEnd(),"meta";if('"'==c||"'"==c)return o.tokenize=(l=c,function(e,r){for(var t,n=!1,i=!1;null!=(t=e.next());){if(t==l&&!n){i=!0;break}n=!n&&"\\"==t}return!i&&n||(r.tokenize=null),"string"}),o.tokenize(n,o);if("("==c&&n.eat("*"))return o.tokenize=i,i(n,o);if("{"==c)return o.tokenize=a,a(n,o);if(/[\[\]\(\),;\:\.]/.test(c))return null;if(/\d/.test(c))return n.eatWhile(/[\w\.]/),"number";if("/"==c&&n.eat("/"))return n.skipToEnd(),"comment";if(t.test(c))return n.eatWhile(t),"operator";n.eatWhile(/[\w\$_]/);var u=n.current();return e.propertyIsEnumerable(u)?"keyword":r.propertyIsEnumerable(u)?"atom":"variable"}function i(e,r){for(var t,n=!1;t=e.next();){if(")"==t&&n){r.tokenize=null;break}n="*"==t}return"comment"}function a(e,r){for(var t;t=e.next();)if("}"==t){r.tokenize=null;break}return"comment"}return{startState:function(){return{tokenize:null}},token:function(e,r){return e.eatSpace()?null:(r.tokenize||n)(e,r)},electricChars:"{}"}})),e.defineMIME("text/x-pascal","pascal")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/pegjs/pegjs.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/pegjs/pegjs.js deleted file mode 100644 index 112671c83..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/pegjs/pegjs.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../javascript/javascript")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../javascript/javascript"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("pegjs",(function(t){var n=e.getMode(t,"javascript");return{startState:function(){return{inString:!1,stringType:null,inComment:!1,inCharacterClass:!1,braced:0,lhs:!0,localState:null}},token:function(t,r){if(t&&(r.inString||r.inComment||'"'!=t.peek()&&"'"!=t.peek()||(r.stringType=t.peek(),t.next(),r.inString=!0)),r.inString||r.inComment||!t.match("/*")||(r.inComment=!0),r.inString){for(;r.inString&&!t.eol();)t.peek()===r.stringType?(t.next(),r.inString=!1):"\\"===t.peek()?(t.next(),t.next()):t.match(/^.[^\\\"\']*/);return r.lhs?"property string":"string"}if(r.inComment){for(;r.inComment&&!t.eol();)t.match("*/")?r.inComment=!1:t.match(/^.[^\*]*/);return"comment"}if(r.inCharacterClass)for(;r.inCharacterClass&&!t.eol();)t.match(/^[^\]\\]+/)||t.match(/^\\./)||(r.inCharacterClass=!1);else{if("["===t.peek())return t.next(),r.inCharacterClass=!0,"bracket";if(t.match("//"))return t.skipToEnd(),"comment";if(r.braced||"{"===t.peek()){null===r.localState&&(r.localState=e.startState(n));var i=n.token(t,r.localState),a=t.current();if(!i)for(var o=0;o=0?r:0,t)}return e.string.substr(0,e.pos-1)}function n(e,t){var r=e.string.length,n=r-e.pos+1;return e.string.substr(e.pos,t&&t=(r=e.string.length-1)?e.pos=r:e.pos=n}e.defineMode("perl",(function(){var e={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,if:[1,1],elsif:[1,1],else:[1,1],while:[1,1],unless:[1,1],for:[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,break:1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,continue:[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,default:1,defined:1,delete:1,die:1,do:1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,goto:1,grep:1,hex:1,import:1,index:1,int:1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,new:1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,package:1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,return:1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},s="string-2",o=/[goseximacplud]/;function a(e,t,r,n,i){return t.chain=null,t.style=null,t.tail=null,t.tokenize=function(e,t){for(var s,o=!1,a=0;s=e.next();){if(s===r[a]&&!o)return void 0!==r[++a]?(t.chain=r[a],t.style=n,t.tail=i):i&&e.eatWhile(i),t.tokenize=$,n;o=!o&&"\\"==s}return n},t.tokenize(e,t)}function u(e,t,r){return t.tokenize=function(e,t){return e.string==r&&(t.tokenize=$),e.skipToEnd(),"string"},t.tokenize(e,t)}function $($,l){if($.eatSpace())return null;if(l.chain)return a($,l,l.chain,l.style,l.tail);if($.match(/^(\-?((\d[\d_]*)?\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F_]+|0b[01_]+|\d[\d_]*(e[+-]?\d+)?)/))return"number";if($.match(/^<<(?=[_a-zA-Z])/))return $.eatWhile(/\w/),u($,l,$.current().substr(2));if($.sol()&&$.match(/^\=item(?!\w)/))return u($,l,"=cut");var f=$.next();if('"'==f||"'"==f){if(r($,3)=="<<"+f){var E=$.pos;$.eatWhile(/\w/);var R=$.current().substr(1);if(R&&$.eat(f))return u($,l,R);$.pos=E}return a($,l,[f],"string")}if(!("q"!=f||(c=t($,-2))&&/\w/.test(c)))if("x"==(c=t($,0))){if("("==(c=t($,1)))return i($,2),a($,l,[")"],s,o);if("["==c)return i($,2),a($,l,["]"],s,o);if("{"==c)return i($,2),a($,l,["}"],s,o);if("<"==c)return i($,2),a($,l,[">"],s,o);if(/[\^'"!~\/]/.test(c))return i($,1),a($,l,[$.eat(c)],s,o)}else if("q"==c){if("("==(c=t($,1)))return i($,2),a($,l,[")"],"string");if("["==c)return i($,2),a($,l,["]"],"string");if("{"==c)return i($,2),a($,l,["}"],"string");if("<"==c)return i($,2),a($,l,[">"],"string");if(/[\^'"!~\/]/.test(c))return i($,1),a($,l,[$.eat(c)],"string")}else if("w"==c){if("("==(c=t($,1)))return i($,2),a($,l,[")"],"bracket");if("["==c)return i($,2),a($,l,["]"],"bracket");if("{"==c)return i($,2),a($,l,["}"],"bracket");if("<"==c)return i($,2),a($,l,[">"],"bracket");if(/[\^'"!~\/]/.test(c))return i($,1),a($,l,[$.eat(c)],"bracket")}else if("r"==c){if("("==(c=t($,1)))return i($,2),a($,l,[")"],s,o);if("["==c)return i($,2),a($,l,["]"],s,o);if("{"==c)return i($,2),a($,l,["}"],s,o);if("<"==c)return i($,2),a($,l,[">"],s,o);if(/[\^'"!~\/]/.test(c))return i($,1),a($,l,[$.eat(c)],s,o)}else if(/[\^'"!~\/(\[{<]/.test(c)){if("("==c)return i($,1),a($,l,[")"],"string");if("["==c)return i($,1),a($,l,["]"],"string");if("{"==c)return i($,1),a($,l,["}"],"string");if("<"==c)return i($,1),a($,l,[">"],"string");if(/[\^'"!~\/]/.test(c))return a($,l,[$.eat(c)],"string")}if("m"==f&&(!(c=t($,-2))||!/\w/.test(c))&&(c=$.eat(/[(\[{<\^'"!~\/]/))){if(/[\^'"!~\/]/.test(c))return a($,l,[c],s,o);if("("==c)return a($,l,[")"],s,o);if("["==c)return a($,l,["]"],s,o);if("{"==c)return a($,l,["}"],s,o);if("<"==c)return a($,l,[">"],s,o)}if("s"==f&&!(c=/[\/>\]})\w]/.test(t($,-2)))&&(c=$.eat(/[(\[{<\^'"!~\/]/)))return a($,l,"["==c?["]","]"]:"{"==c?["}","}"]:"<"==c?[">",">"]:"("==c?[")",")"]:[c,c],s,o);if("y"==f&&!(c=/[\/>\]})\w]/.test(t($,-2)))&&(c=$.eat(/[(\[{<\^'"!~\/]/)))return a($,l,"["==c?["]","]"]:"{"==c?["}","}"]:"<"==c?[">",">"]:"("==c?[")",")"]:[c,c],s,o);if("t"==f&&!(c=/[\/>\]})\w]/.test(t($,-2)))&&(c=$.eat("r"))&&(c=$.eat(/[(\[{<\^'"!~\/]/)))return a($,l,"["==c?["]","]"]:"{"==c?["}","}"]:"<"==c?[">",">"]:"("==c?[")",")"]:[c,c],s,o);if("`"==f)return a($,l,[f],"variable-2");if("/"==f)return/~\s*$/.test(r($))?a($,l,[f],s,o):"operator";if("$"==f){if(E=$.pos,$.eatWhile(/\d/)||$.eat("{")&&$.eatWhile(/\d/)&&$.eat("}"))return"variable-2";$.pos=E}if(/[$@%]/.test(f)){if(E=$.pos,$.eat("^")&&$.eat(/[A-Z]/)||!/[@$%&]/.test(t($,-2))&&$.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var c=$.current();if(e[c])return"variable-2"}$.pos=E}if(/[$@%&]/.test(f)&&($.eatWhile(/[\w$]/)||$.eat("{")&&$.eatWhile(/[\w$]/)&&$.eat("}")))return c=$.current(),e[c]?"variable-2":"variable";if("#"==f&&"$"!=t($,-2))return $.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(f)){if(E=$.pos,$.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),e[$.current()])return"operator";$.pos=E}if("_"==f&&1==$.pos){if("_END__"==n($,6))return a($,l,["\0"],"comment");if("_DATA__"==n($,7))return a($,l,["\0"],"variable-2");if("_C__"==n($,7))return a($,l,["\0"],"string")}if(/\w/.test(f)){if(E=$.pos,"{"==t($,-2)&&("}"==t($,0)||$.eatWhile(/\w/)&&"}"==t($,0)))return"string";$.pos=E}if(/[A-Z]/.test(f)){var p=t($,-2);if(E=$.pos,$.eatWhile(/[A-Z_]/),!/[\da-z]/.test(t($,0)))return(c=e[$.current()])?(c[1]&&(c=c[0]),":"!=p?1==c?"keyword":2==c?"def":3==c?"atom":4==c?"operator":5==c?"variable-2":"meta":"meta"):"meta";$.pos=E}return/[a-zA-Z_]/.test(f)?(p=t($,-2),$.eatWhile(/\w/),(c=e[$.current()])?(c[1]&&(c=c[0]),":"!=p?1==c?"keyword":2==c?"def":3==c?"atom":4==c?"operator":5==c?"variable-2":"meta":"meta"):"meta"):null}return{startState:function(){return{tokenize:$,chain:null,style:null,tail:null}},token:function(e,t){return(t.tokenize||$)(e,t)},lineComment:"#"}})),e.registerHelper("wordChars","perl",/[\w$]/),e.defineMIME("text/x-perl","perl")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/php/php.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/php/php.js deleted file mode 100644 index 4a2c7bf10..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/php/php.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],e):e(CodeMirror)}((function(e){"use strict";function t(e){for(var t={},_=e.split(" "),r=0;r<_.length;++r)t[_[r]]=!0;return t}function _(e,t,s){return 0==e.length?r(t):function(i,l){for(var n=e[0],a=0;a\w/,!1)&&(t.tokenize=_([[["->",null]],[[/[\w]+/,"variable"]]],r,s)),"variable-2";for(var i=!1;!e.eol()&&(i||!1===s||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!i&&e.match(r)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}i="\\"==e.next()&&!i}return"string"}(r,s,e,t)}}var s="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile enum extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally readonly match",i="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",l="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage memory_get_peak_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";e.registerHelper("hintWords","php",[s,i,l].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var n={name:"clike",helperType:"php",keywords:t(s),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class enum function interface namespace trait"),atoms:t(i),builtin:t(l),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var _;if(_=e.match(/^<<\s*/)){var s=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var i=e.current().slice(_[0].length+(s?2:1));if(s&&e.eat(s),i)return(t.tokStack||(t.tokStack=[])).push(i,0),t.tokenize=r(i,"'"!=s),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=r('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=r(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",(function(t,_){var r=e.getMode(t,_&&_.htmlMode||"text/html"),s=e.getMode(t,n);return{startState:function(){var t=e.startState(r),i=_.startOpen?e.startState(s):null;return{html:t,php:i,curMode:_.startOpen?s:r,curState:_.startOpen?i:t,pending:null}},copyState:function(t){var _,i=t.html,l=e.copyState(r,i),n=t.php,a=n&&e.copyState(s,n);return _=t.curMode==r?l:a,{html:l,php:a,curMode:t.curMode,curState:_,pending:t.pending}},token:function(t,_){var i=_.curMode==s;if(t.sol()&&_.pending&&'"'!=_.pending&&"'"!=_.pending&&(_.pending=null),i)return i&&null==_.php.tokenize&&t.match("?>")?(_.curMode=r,_.curState=_.html,_.php.context.prev||(_.php=null),"meta"):s.token(t,_.curState);if(t.match(/^<\?\w*/))return _.curMode=s,_.php||(_.php=e.startState(s,r.indent(_.html,"",""))),_.curState=_.php,"meta";if('"'==_.pending||"'"==_.pending){for(;!t.eol()&&t.next()!=_.pending;);var l="string"}else _.pending&&t.pos<_.pending.end?(t.pos=_.pending.end,l=_.pending.style):l=r.token(t,_.curState);_.pending&&(_.pending=null);var n,a=t.current(),o=a.search(/<\?/);return-1!=o&&("string"==l&&(n=a.match(/[\'\"]$/))&&!/\?>/.test(a)?_.pending=n[0]:_.pending={end:t.pos,style:l},t.backUp(a.length-o)),l},indent:function(e,t,_){return e.curMode!=s&&/^\s*<\//.test(t)||e.curMode==s&&/^\?>/.test(t)?r.indent(e.html,t,_):e.curMode.indent(e.curState,t,_)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}}),"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",n)})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/pig/pig.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/pig/pig.js deleted file mode 100644 index 828edf571..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/pig/pig.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("pig",(function(e,O){var T=O.keywords,E=O.builtins,I=O.types,t=O.multiLineStrings,N=/[*+\-%<>=&?:\/!|]/;function A(e,O,T){return O.tokenize=T,T(e,O)}function r(e,O){for(var T,E=!1;T=e.next();){if("/"==T&&E){O.tokenize=R;break}E="*"==T}return"comment"}function R(e,O){var S,n=e.next();return'"'==n||"'"==n?A(e,O,(S=n,function(e,O){for(var T,E=!1,I=!1;null!=(T=e.next());){if(T==S&&!E){I=!0;break}E=!E&&"\\"==T}return(I||!E&&!t)&&(O.tokenize=R),"error"})):/[\[\]{}\(\),;\.]/.test(n)?null:/\d/.test(n)?(e.eatWhile(/[\w\.]/),"number"):"/"==n?e.eat("*")?A(e,O,r):(e.eatWhile(N),"operator"):"-"==n?e.eat("-")?(e.skipToEnd(),"comment"):(e.eatWhile(N),"operator"):N.test(n)?(e.eatWhile(N),"operator"):(e.eatWhile(/[\w\$_]/),T&&T.propertyIsEnumerable(e.current().toUpperCase())&&!e.eat(")")&&!e.eat(".")?"keyword":E&&E.propertyIsEnumerable(e.current().toUpperCase())?"variable-2":I&&I.propertyIsEnumerable(e.current().toUpperCase())?"variable-3":"variable")}return{startState:function(){return{tokenize:R,startOfLine:!0}},token:function(e,O){return e.eatSpace()?null:O.tokenize(e,O)}}})),function(){function O(e){for(var O={},T=e.split(" "),E=0;E/],{suffix:""}),a=e([/Add-(Computer|Content|History|Member|PSSnapin|Type)/,/Checkpoint-Computer/,/Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,/Compare-Object/,/Complete-Transaction/,/Connect-PSSession/,/ConvertFrom-(Csv|Json|SecureString|StringData)/,/Convert-Path/,/ConvertTo-(Csv|Html|Json|SecureString|Xml)/,/Copy-Item(Property)?/,/Debug-Process/,/Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/Disconnect-PSSession/,/Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/(Enter|Exit)-PSSession/,/Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,/ForEach-Object/,/Format-(Custom|List|Table|Wide)/,new RegExp("Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)"),/Group-Object/,/Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,/ImportSystemModules/,/Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,/Join-Path/,/Limit-EventLog/,/Measure-(Command|Object)/,/Move-Item(Property)?/,new RegExp("New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)"),/Out-(Default|File|GridView|Host|Null|Printer|String)/,/Pause/,/(Pop|Push)-Location/,/Read-Host/,/Receive-(Job|PSSession)/,/Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,/Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,/Rename-(Computer|Item(Property)?)/,/Reset-ComputerMachinePassword/,/Resolve-Path/,/Restart-(Computer|Service)/,/Restore-Computer/,/Resume-(Job|Service)/,/Save-Help/,/Select-(Object|String|Xml)/,/Send-MailMessage/,new RegExp("Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)"),/Show-(Command|ControlPanelItem|EventLog)/,/Sort-Object/,/Split-Path/,/Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,/Stop-(Computer|Job|Process|Service|Transcript)/,/Suspend-(Job|Service)/,/TabExpansion2/,/Tee-Object/,/Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,/Trace-Command/,/Unblock-File/,/Undo-Transaction/,/Unregister-(Event|PSSessionConfiguration)/,/Update-(FormatData|Help|List|TypeData)/,/Use-Transaction/,/Wait-(Event|Job|Process)/,/Where-Object/,/Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,/cd|help|mkdir|more|oss|prompt/,/ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,/echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,/group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,/measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,/rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,/sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/],{prefix:"",suffix:""}),s=e([/[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,/FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,/MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,/PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,/PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,/WarningPreference|WhatIfPreference/,/Event|EventArgs|EventSubscriber|Sender/,/Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,/true|false|null/],{prefix:"\\$",suffix:""}),u={keyword:n,number:/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,operator:i,builtin:e([/[A-Z]:|%|\?/i,a,s],{suffix:t}),punctuation:/[\[\]{},;`\\\.]|@[({]/,identifier:/^[A-Za-z\_][A-Za-z\-\_\d]*\b/};function c(e,t){var n=t.returnStack[t.returnStack.length-1];if(n&&n.shouldReturnFrom(t))return t.tokenize=n.tokenize,t.returnStack.pop(),t.tokenize(e,t);if(e.eatSpace())return null;if(e.eat("("))return t.bracketNesting+=1,"punctuation";if(e.eat(")"))return t.bracketNesting-=1,"punctuation";for(var o in u)if(e.match(u[o]))return o;var i=e.next();if("'"===i)return function(e,t){for(var r;null!=(r=e.peek());)if(e.next(),"'"===r&&!e.eat("'"))return t.tokenize=c,"string";return"error"}(e,t);if("$"===i)return P(e,t);if('"'===i)return l(e,t);if("<"===i&&e.eat("#"))return t.tokenize=d,d(e,t);if("#"===i)return e.skipToEnd(),"comment";if("@"===i){var a=e.eat(/["']/);if(a&&e.eol())return t.tokenize=g,t.startQuote=a[0],g(e,t);if(e.eol())return"error";if(e.peek().match(/[({]/))return"punctuation";if(e.peek().match(r))return P(e,t)}return"error"}function l(e,t){for(var r;null!=(r=e.peek());){if("$"===r)return t.tokenize=p,"string";if(e.next(),"`"!==r){if('"'===r&&!e.eat('"'))return t.tokenize=c,"string"}else e.next()}return"error"}function p(e,t){return S(e,t,l)}function m(e,t){return t.tokenize=g,t.startQuote='"',g(e,t)}function f(e,t){return S(e,t,m)}function S(e,t,r){if(e.match("$(")){var n=t.bracketNesting;return t.returnStack.push({shouldReturnFrom:function(e){return e.bracketNesting===n},tokenize:r}),t.tokenize=c,t.bracketNesting+=1,"punctuation"}return e.next(),t.returnStack.push({shouldReturnFrom:function(){return!0},tokenize:r}),t.tokenize=P,t.tokenize(e,t)}function d(e,t){for(var r,n=!1;null!=(r=e.next());){if(n&&">"==r){t.tokenize=c;break}n="#"===r}return"comment"}function P(e,t){var n=e.peek();return e.eat("{")?(t.tokenize=b,b(e,t)):null!=n&&n.match(r)?(e.eatWhile(r),t.tokenize=c,"variable-2"):(t.tokenize=c,"error")}function b(e,t){for(var r;null!=(r=e.next());)if("}"===r){t.tokenize=c;break}return"variable-2"}function g(e,t){var r=t.startQuote;if(e.sol()&&e.match(new RegExp(r+"@")))t.tokenize=c;else if('"'===r)for(;!e.eol();){var n=e.peek();if("$"===n)return t.tokenize=f,"string";e.next(),"`"===n&&e.next()}else e.skipToEnd();return"string"}return{startState:function(){return{returnStack:[],bracketNesting:0,tokenize:c}},token:function(e,t){return t.tokenize(e,t)},blockCommentStart:"<#",blockCommentEnd:"#>",lineComment:"#",fold:"brace"}})),e.defineMIME("application/x-powershell","powershell")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/properties/properties.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/properties/properties.js deleted file mode 100644 index b257d4bd9..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/properties/properties.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("properties",(function(){return{token:function(e,i){var t=e.sol()||i.afterSection,n=e.eol();if(i.afterSection=!1,t&&(i.nextMultiline?(i.inMultiline=!0,i.nextMultiline=!1):i.position="def"),n&&!i.nextMultiline&&(i.inMultiline=!1,i.position="def"),t)for(;e.eatSpace(););var o=e.next();return!t||"#"!==o&&"!"!==o&&";"!==o?t&&"["===o?(i.afterSection=!0,e.skipTo("]"),e.eat("]"),"header"):"="===o||":"===o?(i.position="quote",null):("\\"===o&&"quote"===i.position&&e.eol()&&(i.nextMultiline=!0),i.position):(i.position="comment",e.skipToEnd(),"comment")},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}})),e.defineMIME("text/x-properties","properties"),e.defineMIME("text/x-ini","properties")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/protobuf/protobuf.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/protobuf/protobuf.js deleted file mode 100644 index c443dab0e..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/protobuf/protobuf.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";var t=["package","message","import","syntax","required","optional","repeated","reserved","default","extensions","packed","bool","bytes","double","enum","float","string","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","option","service","rpc","returns"],r=new RegExp("^(("+t.join(")|(")+"))\\b","i");e.registerHelper("hintWords","protobuf",t);var n=new RegExp("^[_A-Za-z¡-￿][_A-Za-z0-9¡-￿]*");function i(e){if(e.eatSpace())return null;if(e.match("//"))return e.skipToEnd(),"comment";if(e.match(/^[0-9\.+-]/,!1)){if(e.match(/^[+-]?0x[0-9a-fA-F]+/))return"number";if(e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/))return"number";if(e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))return"number"}return e.match(/^"([^"]|(""))*"/)||e.match(/^'([^']|(''))*'/)?"string":e.match(r)?"keyword":e.match(n)?"variable":(e.next(),null)}e.defineMode("protobuf",(function(){return{token:i,fold:"brace"}})),e.defineMIME("text/x-protobuf","protobuf")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/pug/pug.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/pug/pug.js deleted file mode 100644 index 67cc6a235..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/pug/pug.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../javascript/javascript"),require("../css/css"),require("../htmlmixed/htmlmixed")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../javascript/javascript","../css/css","../htmlmixed/htmlmixed"],t):t(CodeMirror)}((function(t){"use strict";t.defineMode("pug",(function(e){var n="keyword",i={"{":"}","(":")","[":"]"},r=t.getMode(e,"javascript");function a(){this.javaScriptLine=!1,this.javaScriptLineExcludesColon=!1,this.javaScriptArguments=!1,this.javaScriptArgumentsDepth=0,this.isInterpolating=!1,this.interpolationNesting=0,this.jsState=t.startState(r),this.restOfLine="",this.isIncludeFiltered=!1,this.isEach=!1,this.lastTag="",this.scriptType="",this.isAttrs=!1,this.attrsNest=[],this.inAttributeName=!0,this.attributeIsType=!1,this.attrValue="",this.indentOf=1/0,this.indentToken="",this.innerMode=null,this.innerState=null,this.innerModeForLine=!1}function s(t,e){if(t.match("#{"))return e.isInterpolating=!0,e.interpolationNesting=0,"punctuation"}function c(n,i){var r;if(n.match(/^:([\w\-]+)/))return e&&e.innerModes&&(r=e.innerModes(n.current().substring(1))),r||(r=n.current().substring(1)),"string"==typeof r&&(r=t.getMode(e,r)),o(n,i,r),"atom"}function u(e,n){if(n.isAttrs){if(i[e.peek()]&&n.attrsNest.push(i[e.peek()]),n.attrsNest[n.attrsNest.length-1]===e.peek())n.attrsNest.pop();else if(e.eat(")"))return n.isAttrs=!1,"punctuation";if(n.inAttributeName&&e.match(/^[^=,\)!]+/))return"="!==e.peek()&&"!"!==e.peek()||(n.inAttributeName=!1,n.jsState=t.startState(r),"script"===n.lastTag&&"type"===e.current().trim().toLowerCase()?n.attributeIsType=!0:n.attributeIsType=!1),"attribute";var a=r.token(e,n.jsState);if(n.attributeIsType&&"string"===a&&(n.scriptType=e.current().toString()),0===n.attrsNest.length&&("string"===a||"variable"===a||"keyword"===a))try{return Function("","var x "+n.attrValue.replace(/,\s*$/,"").replace(/^!/,"")),n.inAttributeName=!0,n.attrValue="",e.backUp(e.current().length),u(e,n)}catch(t){}return n.attrValue+=e.current(),a||!0}}function o(n,i,r){r=t.mimeModes[r]||r,r=e.innerModes&&e.innerModes(r)||r,r=t.mimeModes[r]||r,r=t.getMode(e,r),i.indentOf=n.indentation(),r&&"null"!==r.name?i.innerMode=r:i.indentToken="string"}function p(e,n,i){if(e.indentation()>n.indentOf||n.innerModeForLine&&!e.sol()||i)return n.innerMode?(n.innerState||(n.innerState=n.innerMode.startState?t.startState(n.innerMode,e.indentation()):{}),e.hideFirstChars(n.indentOf+2,(function(){return n.innerMode.token(e,n.innerState)||!0}))):(e.skipToEnd(),n.indentToken);e.sol()&&(n.indentOf=1/0,n.indentToken=null,n.innerMode=null,n.innerState=null)}return a.prototype.copy=function(){var e=new a;return e.javaScriptLine=this.javaScriptLine,e.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon,e.javaScriptArguments=this.javaScriptArguments,e.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth,e.isInterpolating=this.isInterpolating,e.interpolationNesting=this.interpolationNesting,e.jsState=t.copyState(r,this.jsState),e.innerMode=this.innerMode,this.innerMode&&this.innerState&&(e.innerState=t.copyState(this.innerMode,this.innerState)),e.restOfLine=this.restOfLine,e.isIncludeFiltered=this.isIncludeFiltered,e.isEach=this.isEach,e.lastTag=this.lastTag,e.scriptType=this.scriptType,e.isAttrs=this.isAttrs,e.attrsNest=this.attrsNest.slice(),e.inAttributeName=this.inAttributeName,e.attributeIsType=this.attributeIsType,e.attrValue=this.attrValue,e.indentOf=this.indentOf,e.indentToken=this.indentToken,e.innerModeForLine=this.innerModeForLine,e},{startState:function(){return new a},copyState:function(t){return t.copy()},token:function(t,e){var i=p(t,e)||function(t,e){if(t.sol()&&(e.restOfLine=""),e.restOfLine){t.skipToEnd();var n=e.restOfLine;return e.restOfLine="",n}}(t,e)||function(t,e){if(e.isInterpolating){if("}"===t.peek()){if(e.interpolationNesting--,e.interpolationNesting<0)return t.next(),e.isInterpolating=!1,"punctuation"}else"{"===t.peek()&&e.interpolationNesting++;return r.token(t,e.jsState)||!0}}(t,e)||function(t,e){if(e.isIncludeFiltered){var n=c(t,e);return e.isIncludeFiltered=!1,e.restOfLine="string",n}}(t,e)||function(t,e){if(e.isEach){if(t.match(/^ in\b/))return e.javaScriptLine=!0,e.isEach=!1,n;if(t.sol()||t.eol())e.isEach=!1;else if(t.next()){for(;!t.match(/^ in\b/,!1)&&t.next(););return"variable"}}}(t,e)||u(t,e)||function(t,e){if(t.sol()&&(e.javaScriptLine=!1,e.javaScriptLineExcludesColon=!1),e.javaScriptLine){if(e.javaScriptLineExcludesColon&&":"===t.peek())return e.javaScriptLine=!1,void(e.javaScriptLineExcludesColon=!1);var n=r.token(t,e.jsState);return t.eol()&&(e.javaScriptLine=!1),n||!0}}(t,e)||function(t,e){if(e.javaScriptArguments)return 0===e.javaScriptArgumentsDepth&&"("!==t.peek()?void(e.javaScriptArguments=!1):("("===t.peek()?e.javaScriptArgumentsDepth++:")"===t.peek()&&e.javaScriptArgumentsDepth--,0===e.javaScriptArgumentsDepth?void(e.javaScriptArguments=!1):r.token(t,e.jsState)||!0)}(t,e)||function(t,e){if(e.mixinCallAfter)return e.mixinCallAfter=!1,t.match(/^\( *[-\w]+ *=/,!1)||(e.javaScriptArguments=!0,e.javaScriptArgumentsDepth=0),!0}(t,e)||function(t){if(t.match(/^yield\b/))return"keyword"}(t)||function(t){if(t.match(/^(?:doctype) *([^\n]+)?/))return"meta"}(t)||s(t,e)||function(t,e){if(t.match(/^case\b/))return e.javaScriptLine=!0,n}(t,e)||function(t,e){if(t.match(/^when\b/))return e.javaScriptLine=!0,e.javaScriptLineExcludesColon=!0,n}(t,e)||function(t){if(t.match(/^default\b/))return n}(t)||function(t,e){if(t.match(/^extends?\b/))return e.restOfLine="string",n}(t,e)||function(t,e){if(t.match(/^append\b/))return e.restOfLine="variable",n}(t,e)||function(t,e){if(t.match(/^prepend\b/))return e.restOfLine="variable",n}(t,e)||function(t,e){if(t.match(/^block\b *(?:(prepend|append)\b)?/))return e.restOfLine="variable",n}(t,e)||function(t,e){if(t.match(/^include\b/))return e.restOfLine="string",n}(t,e)||function(t,e){if(t.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&t.match("include"))return e.isIncludeFiltered=!0,n}(t,e)||function(t,e){if(t.match(/^mixin\b/))return e.javaScriptLine=!0,n}(t,e)||function(t,e){return t.match(/^\+([-\w]+)/)?(t.match(/^\( *[-\w]+ *=/,!1)||(e.javaScriptArguments=!0,e.javaScriptArgumentsDepth=0),"variable"):t.match("+#{",!1)?(t.next(),e.mixinCallAfter=!0,s(t,e)):void 0}(t,e)||function(t,e){if(t.match(/^(if|unless|else if|else)\b/))return e.javaScriptLine=!0,n}(t,e)||function(t,e){if(t.match(/^(- *)?(each|for)\b/))return e.isEach=!0,n}(t,e)||function(t,e){if(t.match(/^while\b/))return e.javaScriptLine=!0,n}(t,e)||function(t,e){var n;if(n=t.match(/^(\w(?:[-:\w]*\w)?)\/?/))return e.lastTag=n[1].toLowerCase(),"script"===e.lastTag&&(e.scriptType="application/javascript"),"tag"}(t,e)||c(t,e)||function(t,e){if(t.match(/^(!?=|-)/))return e.javaScriptLine=!0,"punctuation"}(t,e)||function(t){if(t.match(/^#([\w-]+)/))return"builtin"}(t)||function(t){if(t.match(/^\.([\w-]+)/))return"qualifier"}(t)||function(t,e){if("("==t.peek())return t.next(),e.isAttrs=!0,e.attrsNest=[],e.inAttributeName=!0,e.attrValue="",e.attributeIsType=!1,"punctuation"}(t,e)||function(t,e){if(t.match(/^&attributes\b/))return e.javaScriptArguments=!0,e.javaScriptArgumentsDepth=0,"keyword"}(t,e)||function(t){if(t.sol()&&t.eatSpace())return"indent"}(t)||function(t,e){return t.match(/^(?:\| ?| )([^\n]+)/)?"string":t.match(/^(<[^\n]*)/,!1)?(o(t,e,"htmlmixed"),e.innerModeForLine=!0,p(t,e,!0)):void 0}(t,e)||function(t,e){if(t.match(/^ *\/\/(-)?([^\n]*)/))return e.indentOf=t.indentation(),e.indentToken="comment","comment"}(t,e)||function(t){if(t.match(/^: */))return"colon"}(t)||function(t,e){if(t.eat(".")){var n=null;return"script"===e.lastTag&&-1!=e.scriptType.toLowerCase().indexOf("javascript")?n=e.scriptType.toLowerCase().replace(/"|'/g,""):"style"===e.lastTag&&(n="css"),o(t,e,n),"dot"}}(t,e)||function(t){return t.next(),null}(t);return!0===i?null:i}}}),"javascript","css","htmlmixed"),t.defineMIME("text/x-pug","pug"),t.defineMIME("text/x-jade","pug")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/puppet/puppet.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/puppet/puppet.js deleted file mode 100644 index 72ea258f1..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/puppet/puppet.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("puppet",(function(){var e={},n=/({)?([a-z][a-z0-9_]*)?((::[a-z][a-z0-9_]*)*::)?[a-zA-Z0-9_]+(})?/;function t(n,t){for(var i=t.split(" "),o=0;o.*/,!1),s=t.match(/(\s+)?[\w:_]+(\s+)?{/,!1),c=t.match(/(\s+)?[@]{1,2}[\w:_]+(\s+)?{/,!1),u=t.next();if("$"===u)return t.match(n)?o.continueString?"variable-2":"variable":"error";if(o.continueString)return t.backUp(1),i(t,o);if(o.inDefinition){if(t.match(/(\s+)?[\w:_]+(\s+)?/))return"def";t.match(/\s+{/),o.inDefinition=!1}return o.inInclude?(t.match(/(\s+)?\S+(\s+)?/),o.inInclude=!1,"def"):t.match(/(\s+)?\w+\(/)?(t.backUp(1),"def"):r?(t.match(/(\s+)?\w+/),"tag"):a&&e.hasOwnProperty(a)?(t.backUp(1),t.match(/[\w]+/),t.match(/\s+\S+\s+{/,!1)&&(o.inDefinition=!0),"include"==a&&(o.inInclude=!0),e[a]):/(^|\s+)[A-Z][\w:_]+/.test(a)?(t.backUp(1),t.match(/(^|\s+)[A-Z][\w:_]+/),"def"):s?(t.match(/(\s+)?[\w:_]+/),"def"):c?(t.match(/(\s+)?[@]{1,2}/),"special"):"#"==u?(t.skipToEnd(),"comment"):"'"==u||'"'==u?(o.pending=u,i(t,o)):"{"==u||"}"==u?"bracket":"/"==u?(t.match(/^[^\/]*\//),"variable-3"):u.match(/[0-9]/)?(t.eatWhile(/[0-9]+/),"number"):"="==u?(">"==t.peek()&&t.next(),"operator"):(t.eatWhile(/[\w-]/),null)}(t,o)}}})),e.defineMIME("text/x-puppet","puppet")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/python/python.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/python/python.js deleted file mode 100644 index 64a39b227..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/python/python.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var n=t(["and","or","not","is"]),r=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],i=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];function o(e){return e.scopes[e.scopes.length-1]}e.registerHelper("hintWords","python",r.concat(i)),e.defineMode("python",(function(a,l){for(var c="error",s=l.delimiters||l.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.\\]/,u=[l.singleOperators,l.doubleOperators,l.doubleDelimiters,l.tripleDelimiters,l.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/],f=0;fr?_(t):i0&&z(e,t)&&(a+=" error"),a}return v(e,t)}function v(e,t,r){if(e.eatSpace())return null;if(!r&&e.match(/^#.*/))return"comment";if(e.match(/^[0-9\.]/,!1)){var i=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(i=!0),e.match(/^[\d_]+\.\d*/)&&(i=!0),e.match(/^\.\d+/)&&(i=!0),i)return e.eat(/J/i),"number";var o=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(o=!0),e.match(/^0b[01_]+/i)&&(o=!0),e.match(/^0o[0-7_]+/i)&&(o=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),o=!0),e.match(/^0(?![\dx])/i)&&(o=!0),o)return e.eat(/L/i),"number"}if(e.match(y))return-1!==e.current().toLowerCase().indexOf("f")?(t.tokenize=function(e,t){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,r="string";function i(e){return function(t,n){var r=v(t,n,!0);return"punctuation"==r&&("{"==t.current()?n.tokenize=i(e+1):"}"==t.current()&&(n.tokenize=e>1?i(e-1):o)),r}}function o(o,a){for(;!o.eol();)if(o.eatWhile(/[^'"\{\}\\]/),o.eat("\\")){if(o.next(),n&&o.eol())return r}else{if(o.match(e))return a.tokenize=t,r;if(o.match("{{"))return r;if(o.match("{",!1))return a.tokenize=i(0),o.current()?r:a.tokenize(o,a);if(o.match("}}"))return r;if(o.match("}"))return c;o.eat(/['"]/)}if(n){if(l.singleLineStringErrors)return c;a.tokenize=t}return r}return o.isString=!0,o}(e.current(),t.tokenize),t.tokenize(e,t)):(t.tokenize=function(e,t){for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,r="string";function i(i,o){for(;!i.eol();)if(i.eatWhile(/[^'"\\]/),i.eat("\\")){if(i.next(),n&&i.eol())return r}else{if(i.match(e))return o.tokenize=t,r;i.eat(/['"]/)}if(n){if(l.singleLineStringErrors)return c;o.tokenize=t}return r}return i.isString=!0,i}(e.current(),t.tokenize),t.tokenize(e,t));for(var a=0;a1&&o(t).offset>n;){if("py"!=o(t).type)return!0;t.scopes.pop()}return o(t).offset!=n}return{startState:function(e){return{tokenize:k,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=function(e,t){e.sol()&&(t.beginningOfLine=!0,t.dedent=!1);var n=t.tokenize(e,t),r=e.current();if(t.beginningOfLine&&"@"==r)return e.match(b,!1)?"meta":h?"operator":c;if(/\S/.test(r)&&(t.beginningOfLine=!1),"variable"!=n&&"builtin"!=n||"meta"!=t.lastToken||(n="meta"),"pass"!=r&&"return"!=r||(t.dedent=!0),"lambda"==r&&(t.lambda=!0),":"==r&&!t.lambda&&"py"==o(t).type&&e.match(/^\s*(?:#|$)/,!1)&&_(t),1==r.length&&!/string|comment/.test(n)){var i="[({".indexOf(r);if(-1!=i&&function(e,t,n){var r=e.match(/^[\s\[\{\(]*(?:#|$)/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+p,type:n,align:r})}(e,t,"])}".slice(i,i+1)),-1!=(i="])}".indexOf(r))){if(o(t).type!=r)return c;t.indent=t.scopes.pop().offset-p}}return t.dedent&&e.eol()&&"py"==o(t).type&&t.scopes.length>1&&t.scopes.pop(),n}(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+c:r},indent:function(t,n){if(t.tokenize!=k)return t.tokenize.isString?e.Pass:0;var r=o(t),i=r.type==n.charAt(0)||"py"==r.type&&!t.dedent&&/^(else:|elif |except |finally:)/.test(n);return null!=r.align?r.align-(i?1:0):r.offset-(i?p:0)},electricInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"}})),e.defineMIME("text/x-python","python"),e.defineMIME("text/x-cython",{name:"python",extra_keywords:("by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE","by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE".split(" "))})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/q/q.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/q/q.js deleted file mode 100644 index bd636849f..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/q/q.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("q",(function(e){var t,n=e.indentUnit,o=new RegExp("^("+["abs","acos","aj","aj0","all","and","any","asc","asin","asof","atan","attr","avg","avgs","bin","by","ceiling","cols","cor","cos","count","cov","cross","csv","cut","delete","deltas","desc","dev","differ","distinct","div","do","each","ej","enlist","eval","except","exec","exit","exp","fby","fills","first","fkeys","flip","floor","from","get","getenv","group","gtime","hclose","hcount","hdel","hopen","hsym","iasc","idesc","if","ij","in","insert","inter","inv","key","keys","last","like","list","lj","load","log","lower","lsq","ltime","ltrim","mavg","max","maxs","mcount","md5","mdev","med","meta","min","mins","mmax","mmin","mmu","mod","msum","neg","next","not","null","or","over","parse","peach","pj","plist","prd","prds","prev","prior","rand","rank","ratios","raze","read0","read1","reciprocal","reverse","rload","rotate","rsave","rtrim","save","scan","select","set","setenv","show","signum","sin","sqrt","ss","ssr","string","sublist","sum","sums","sv","system","tables","tan","til","trim","txf","type","uj","ungroup","union","update","upper","upsert","value","var","view","views","vs","wavg","where","where","while","within","wj","wj1","wsum","xasc","xbar","xcol","xcols","xdesc","xexp","xgroup","xkey","xlog","xprev","xrank"].join("|")+")$"),r=/[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/;function i(e,n){var s=e.sol(),d=e.next();if(t=null,s){if("/"==d)return(n.tokenize=c)(e,n);if("\\"==d)return e.eol()||/\s/.test(e.peek())?(e.skipToEnd(),/^\\\s*$/.test(e.current())?(n.tokenize=a)(e):n.tokenize=i,"comment"):(n.tokenize=i,"builtin")}if(/\s/.test(d))return"/"==e.peek()?(e.skipToEnd(),"comment"):"whitespace";if('"'==d)return(n.tokenize=l)(e,n);if("`"==d)return e.eatWhile(/[A-Za-z\d_:\/.]/),"symbol";if("."==d&&/\d/.test(e.peek())||/\d/.test(d)){var u=null;return e.backUp(1),e.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/)||e.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/)||e.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/)||e.match(/^\d+[ptuv]{1}/)?u="temporal":(e.match(/^0[NwW]{1}/)||e.match(/^0x[\da-fA-F]*/)||e.match(/^[01]+[b]{1}/)||e.match(/^\d+[chijn]{1}/)||e.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/))&&(u="number"),!u||(d=e.peek())&&!r.test(d)?(e.next(),"error"):u}return/[A-Za-z]|\./.test(d)?(e.eatWhile(/[A-Za-z._\d]/),o.test(e.current())?"keyword":"variable"):/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(d)||/[{}\(\[\]\)]/.test(d)?null:"error"}function c(e,t){return e.skipToEnd(),/\/\s*$/.test(e.current())?(t.tokenize=s)(e,t):t.tokenize=i,"comment"}function s(e,t){var n=e.sol()&&"\\"==e.peek();return e.skipToEnd(),n&&/^\\\s*$/.test(e.current())&&(t.tokenize=i),"comment"}function a(e){return e.skipToEnd(),"comment"}function l(e,t){for(var n,o=!1,r=!1;n=e.next();){if('"'==n&&!o){r=!0;break}o=!o&&"\\"==n}return r&&(t.tokenize=i),"string"}function d(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function u(e){e.indent=e.context.indent,e.context=e.context.prev}return{startState:function(){return{tokenize:i,context:null,indent:0,col:0}},token:function(e,n){e.sol()&&(n.context&&null==n.context.align&&(n.context.align=!1),n.indent=e.indentation());var o=n.tokenize(e,n);if("comment"!=o&&n.context&&null==n.context.align&&"pattern"!=n.context.type&&(n.context.align=!0),"("==t)d(n,")",e.column());else if("["==t)d(n,"]",e.column());else if("{"==t)d(n,"}",e.column());else if(/[\]\}\)]/.test(t)){for(;n.context&&"pattern"==n.context.type;)u(n);n.context&&t==n.context.type&&u(n)}else"."==t&&n.context&&"pattern"==n.context.type?u(n):/atom|string|variable/.test(o)&&n.context&&(/[\}\]]/.test(n.context.type)?d(n,"pattern",e.column()):"pattern"!=n.context.type||n.context.align||(n.context.align=!0,n.context.col=e.column()));return o},indent:function(e,t){var o=t&&t.charAt(0),r=e.context;if(/[\]\}]/.test(o))for(;r&&"pattern"==r.type;)r=r.prev;var i=r&&o==r.type;return r?"pattern"==r.type?r.col:r.align?r.col+(i?0:1):r.indent+(i?0:n):0}}})),e.defineMIME("text/x-q","q")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/r/r.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/r/r.js deleted file mode 100644 index 88ce59919..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/r/r.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.registerHelper("wordChars","r",/[\w.]/),e.defineMode("r",(function(t){function r(e){for(var t={},r=0;r=!&|~$:]/;function s(e,t){o=null;var r,n=e.next();if("#"==n)return e.skipToEnd(),"comment";if("0"==n&&e.eat("x"))return e.eatWhile(/[\da-f]/i),"number";if("."==n&&e.eat(/\d/))return e.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(n))return e.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if("'"==n||'"'==n)return t.tokenize=(r=n,function(e,t){if(e.eat("\\")){var n=e.next();return"x"==n?e.match(/^[a-f0-9]{2}/i):("u"==n||"U"==n)&&e.eat("{")&&e.skipTo("}")?e.next():"u"==n?e.match(/^[a-f0-9]{4}/i):"U"==n?e.match(/^[a-f0-9]{8}/i):/[0-7]/.test(n)&&e.match(/^[0-7]{1,2}/),"string-2"}for(var i;null!=(i=e.next());){if(i==r){t.tokenize=s;break}if("\\"==i){e.backUp(1);break}}return"string"}),"string";if("`"==n)return e.match(/[^`]+`/),"variable-3";if("."==n&&e.match(/.(?:[.]|\d+)/))return"keyword";if(/[a-zA-Z\.]/.test(n)){e.eatWhile(/[\w\.]/);var i=e.current();return c.propertyIsEnumerable(i)?"atom":f.propertyIsEnumerable(i)?(u.propertyIsEnumerable(i)&&!e.match(/\s*if(\s+|$)/,!1)&&(o="block"),"keyword"):l.propertyIsEnumerable(i)?"builtin":"variable"}return"%"==n?(e.skipTo("%")&&e.next(),"operator variable-2"):"<"==n&&e.eat("-")||"<"==n&&e.match("<-")||"-"==n&&e.match(/>>?/)?"operator arrow":"="==n&&t.ctx.argList?"arg-is":d.test(n)?"$"==n?"operator dollar":(e.eatWhile(d),"operator"):/[\(\){}\[\];]/.test(n)?(o=n,";"==n?"semi":null):null}function p(e,t,r){e.ctx={type:t,indent:e.indent,flags:0,column:r.column(),prev:e.ctx}}function m(e,t){var r=e.ctx;e.ctx={type:r.type,indent:r.indent,flags:r.flags|t,column:r.column,prev:r.prev}}function x(e){e.indent=e.ctx.indent,e.ctx=e.ctx.prev}return{startState:function(){return{tokenize:s,ctx:{type:"top",indent:-t.indentUnit,flags:2},indent:0,afterIdent:!1}},token:function(e,t){if(e.sol()&&(0==(3&t.ctx.flags)&&(t.ctx.flags|=2),4&t.ctx.flags&&x(t),t.indent=e.indentation()),e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"!=r&&0==(2&t.ctx.flags)&&m(t,1),";"!=o&&"{"!=o&&"}"!=o||"block"!=t.ctx.type||x(t),"{"==o?p(t,"}",e):"("==o?(p(t,")",e),t.afterIdent&&(t.ctx.argList=!0)):"["==o?p(t,"]",e):"block"==o?p(t,"block",e):o==t.ctx.type?x(t):"block"==t.ctx.type&&"comment"!=r&&m(t,4),t.afterIdent="variable"==r||"keyword"==r,r},indent:function(e,r){if(e.tokenize!=s)return 0;var n=r&&r.charAt(0),i=e.ctx,a=n==i.type;return 4&i.flags&&(i=i.prev),"block"==i.type?i.indent+("{"==n?0:t.indentUnit):1&i.flags?i.column+(a?0:1):i.indent+(a?0:t.indentUnit)},lineComment:"#"}})),e.defineMIME("text/x-rsrc","r")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/rpm/changes/index.html b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/rpm/changes/index.html deleted file mode 100644 index 9d244ecc8..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/rpm/changes/index.html +++ /dev/null @@ -1,66 +0,0 @@ - - -CodeMirror: RPM changes mode - - - - - - - - - - - -
-

RPM changes mode

- -
- - -

MIME types defined: text/x-rpm-changes.

-
diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/rpm/rpm.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/rpm/rpm.js deleted file mode 100644 index a806b504a..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/rpm/rpm.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("rpm-changes",(function(){var e=/^-+$/,r=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,t=/^[\w+.-]+@[\w.-]+/;return{token:function(n){if(n.sol()){if(n.match(e))return"tag";if(n.match(r))return"tag"}return n.match(t)?"string":(n.next(),null)}}})),e.defineMIME("text/x-rpm-changes","rpm-changes"),e.defineMode("rpm-spec",(function(){var e=/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,r=/^[a-zA-Z0-9()]+:/,t=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/,n=/^%(ifnarch|ifarch|if)/,o=/^%(else|endif)/,a=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;return{startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(i,c){if("#"==i.peek())return i.skipToEnd(),"comment";if(i.sol()){if(i.match(r))return"header";if(i.match(t))return"atom"}if(i.match(/^\$\w+/))return"def";if(i.match(/^\$\{\w+\}/))return"def";if(i.match(o))return"keyword";if(i.match(n))return c.controlFlow=!0,"keyword";if(c.controlFlow){if(i.match(a))return"operator";if(i.match(/^(\d+)/))return"number";i.eol()&&(c.controlFlow=!1)}if(i.match(e))return i.eol()&&(c.controlFlow=!1),"number";if(i.match(/^%[\w]+/))return i.match("(")&&(c.macroParameters=!0),"keyword";if(c.macroParameters){if(i.match(/^\d+/))return"number";if(i.match(")"))return c.macroParameters=!1,"keyword"}return i.match(/^%\{\??[\w \-\:\!]+\}/)?(i.eol()&&(c.controlFlow=!1),"def"):(i.next(),null)}}})),e.defineMIME("text/x-rpm-spec","rpm-spec")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/rst/rst.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/rst/rst.js deleted file mode 100644 index fd330453a..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/rst/rst.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../python/python"),require("../stex/stex"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../python/python","../stex/stex","../../addon/mode/overlay"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("rst",(function(t,a){var c=/^\*\*[^\*\s](?:[^\*]*[^\*\s])?\*\*/,n=/^\*[^\*\s](?:[^\*]*[^\*\s])?\*/,r=/^``[^`\s](?:[^`]*[^`\s])``/,m=/^(?:[\d]+(?:[\.,]\d+)*)/,o=/^(?:\s\+[\d]+(?:[\.,]\d+)*)/,s=/^(?:\s\-[\d]+(?:[\.,]\d+)*)/,h=new RegExp("^[Hh][Tt][Tt][Pp][Ss]?://(?:[\\d\\w.-]+)\\.(?:\\w{2,6})(?:/[\\d\\w\\#\\%\\&\\-\\.\\,\\/\\:\\=\\?\\~]+)*"),l={token:function(e){if(e.match(c)&&e.match(/\W+|$/,!1))return"strong";if(e.match(n)&&e.match(/\W+|$/,!1))return"em";if(e.match(r)&&e.match(/\W+|$/,!1))return"string-2";if(e.match(m))return"number";if(e.match(o))return"positive";if(e.match(s))return"negative";if(e.match(h))return"link";for(;!(null==e.next()||e.match(c,!1)||e.match(n,!1)||e.match(r,!1)||e.match(m,!1)||e.match(o,!1)||e.match(s,!1)||e.match(h,!1)););return null}},i=e.getMode(t,a.backdrop||"rst-base");return e.overlayMode(i,l,!0)}),"python","stex"),e.defineMode("rst-base",(function(t){function a(e){var t=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,(function(e,a){return void 0!==t[a]?t[a]:e}))}var c=e.getMode(t,"python"),n=e.getMode(t,"stex"),r="\\s+",m="(?:\\s*|\\W|$)",o=new RegExp(a("^{0}",m)),s="(?:[^\\W\\d_](?:[\\w!\"#$%&'()\\*\\+,\\-\\./:;<=>\\?]*[^\\W_])?)",h=new RegExp(a("^{0}",s)),l=a("(?:{0}|`{1}`)",s,"(?:[^\\W\\d_](?:[\\w\\s!\"#$%&'()\\*\\+,\\-\\./:;<=>\\?]*[^\\W_])?)"),i="(?:[^\\s\\|](?:[^\\|]*[^\\s\\|])?)",p="(?:[^\\`]+)",d=new RegExp(a("^{0}",p)),u=new RegExp("^([!'#$%&\"()*+,-./:;<=>?@\\[\\\\\\]^_`{|}~])\\1{3,}\\s*$"),x=new RegExp(a("^\\.\\.{0}",r)),f=new RegExp(a("^_{0}:{1}|^__:{1}",l,m)),k=new RegExp(a("^{0}::{1}",l,m)),w=new RegExp(a("^\\|{0}\\|{1}{2}::{3}",i,r,l,m)),b=new RegExp(a("^\\[(?:\\d+|#{0}?|\\*)]{1}",l,m)),g=new RegExp(a("^\\[{0}\\]{1}",l,m)),E=new RegExp(a("^\\|{0}\\|",i)),R=new RegExp(a("^\\[(?:\\d+|#{0}?|\\*)]_",l)),y=new RegExp(a("^\\[{0}\\]_",l)),_=new RegExp(a("^{0}__?",l)),v=new RegExp(a("^`{0}`_",p)),$=new RegExp(a("^:{0}:`{1}`{2}",s,p,m)),S=new RegExp(a("^`{1}`:{0}:{2}",s,p,m)),M=new RegExp(a("^:{0}:{1}",s,m)),W=new RegExp(a("^{0}",l)),q=new RegExp(a("^::{0}",m)),T=new RegExp(a("^\\|{0}\\|",i)),j=new RegExp(a("^{0}",r)),I=new RegExp(a("^{0}",l)),A=new RegExp(a("^::{0}",m)),C=new RegExp("^_"),H=new RegExp(a("^{0}|_",l)),P=new RegExp(a("^:{0}",m)),z=new RegExp("^::\\s*$"),B=new RegExp("^\\s+(?:>>>|In \\[\\d+\\]:)\\s");function D(t,a){var r=null;if(t.sol()&&t.match(B,!1))O(a,L,{mode:c,local:e.startState(c)});else if(t.sol()&&t.match(x))O(a,F),r="meta";else if(t.sol()&&t.match(u))O(a,D),r="header";else if(U(a)==$||t.match($,!1))switch(Q(a)){case 0:O(a,D,N($,1)),t.match(/^:/),r="meta";break;case 1:O(a,D,N($,2)),t.match(h),r="keyword",t.current().match(/^(?:math|latex)/)&&(a.tmp_stex=!0);break;case 2:O(a,D,N($,3)),t.match(/^:`/),r="meta";break;case 3:if(a.tmp_stex&&(a.tmp_stex=void 0,a.tmp={mode:n,local:e.startState(n)}),a.tmp){if("`"==t.peek()){O(a,D,N($,4)),a.tmp=void 0;break}r=a.tmp.mode.token(t,a.tmp.local);break}O(a,D,N($,4)),t.match(d),r="string";break;case 4:O(a,D,N($,5)),t.match(/^`/),r="meta";break;case 5:O(a,D,N($,6)),t.match(o);break;default:O(a,D)}else if(U(a)==S||t.match(S,!1))switch(Q(a)){case 0:O(a,D,N(S,1)),t.match(/^`/),r="meta";break;case 1:O(a,D,N(S,2)),t.match(d),r="string";break;case 2:O(a,D,N(S,3)),t.match(/^`:/),r="meta";break;case 3:O(a,D,N(S,4)),t.match(h),r="keyword";break;case 4:O(a,D,N(S,5)),t.match(/^:/),r="meta";break;case 5:O(a,D,N(S,6)),t.match(o);break;default:O(a,D)}else if(U(a)==M||t.match(M,!1))switch(Q(a)){case 0:O(a,D,N(M,1)),t.match(/^:/),r="meta";break;case 1:O(a,D,N(M,2)),t.match(h),r="keyword";break;case 2:O(a,D,N(M,3)),t.match(/^:/),r="meta";break;case 3:O(a,D,N(M,4)),t.match(o);break;default:O(a,D)}else if(U(a)==E||t.match(E,!1))switch(Q(a)){case 0:O(a,D,N(E,1)),t.match(T),r="variable-2";break;case 1:O(a,D,N(E,2)),t.match(/^_?_?/)&&(r="link");break;default:O(a,D)}else if(t.match(R))O(a,D),r="quote";else if(t.match(y))O(a,D),r="quote";else if(t.match(_))O(a,D),t.peek()&&!t.peek().match(/^\W$/)||(r="link");else if(U(a)==v||t.match(v,!1))switch(Q(a)){case 0:!t.peek()||t.peek().match(/^\W$/)?O(a,D,N(v,1)):t.match(v);break;case 1:O(a,D,N(v,2)),t.match(/^`/),r="link";break;case 2:O(a,D,N(v,3)),t.match(d);break;case 3:O(a,D,N(v,4)),t.match(/^`_/),r="link";break;default:O(a,D)}else t.match(z)?O(a,J):t.next()&&O(a,D);return r}function F(t,a){var r=null;if(U(a)==w||t.match(w,!1))switch(Q(a)){case 0:O(a,F,N(w,1)),t.match(T),r="variable-2";break;case 1:O(a,F,N(w,2)),t.match(j);break;case 2:O(a,F,N(w,3)),t.match(I),r="keyword";break;case 3:O(a,F,N(w,4)),t.match(A),r="meta";break;default:O(a,D)}else if(U(a)==k||t.match(k,!1))switch(Q(a)){case 0:O(a,F,N(k,1)),t.match(W),r="keyword",t.current().match(/^(?:math|latex)/)?a.tmp_stex=!0:t.current().match(/^python/)&&(a.tmp_py=!0);break;case 1:O(a,F,N(k,2)),t.match(q),r="meta",(t.match(/^latex\s*$/)||a.tmp_stex)&&(a.tmp_stex=void 0,O(a,L,{mode:n,local:e.startState(n)}));break;case 2:O(a,F,N(k,3)),(t.match(/^python\s*$/)||a.tmp_py)&&(a.tmp_py=void 0,O(a,L,{mode:c,local:e.startState(c)}));break;default:O(a,D)}else if(U(a)==f||t.match(f,!1))switch(Q(a)){case 0:O(a,F,N(f,1)),t.match(C),t.match(H),r="link";break;case 1:O(a,F,N(f,2)),t.match(P),r="meta";break;default:O(a,D)}else t.match(b)||t.match(g)?(O(a,D),r="quote"):(t.eatSpace(),t.eol()?O(a,D):(t.skipToEnd(),O(a,G),r="comment"));return r}function G(e,t){return K(e,t,"comment")}function J(e,t){return K(e,t,"meta")}function K(e,t,a){return e.eol()||e.eatSpace()?(e.skipToEnd(),a):(O(t,D),null)}function L(e,t){return t.ctx.mode&&t.ctx.local?e.sol()?(e.eatSpace()||O(t,D),null):t.ctx.mode.token(e,t.ctx.local):(O(t,D),null)}function N(e,t,a,c){return{phase:e,stage:t,mode:a,local:c}}function O(e,t,a){e.tok=t,e.ctx=a||{}}function Q(e){return e.ctx.stage||0}function U(e){return e.ctx.phase}return{startState:function(){return{tok:D,ctx:N(void 0,0)}},copyState:function(t){var a=t.ctx,c=t.tmp;return a.local&&(a={mode:a.mode,local:e.copyState(a.mode,a.local)}),c&&(c={mode:c.mode,local:e.copyState(c.mode,c.local)}),{tok:t.tok,ctx:a,tmp:c}},innerMode:function(e){return e.tmp?{state:e.tmp.local,mode:e.tmp.mode}:e.ctx.mode?{state:e.ctx.local,mode:e.ctx.mode}:null},token:function(e,t){return t.tok(e,t)}}}),"python","stex"),e.defineMIME("text/x-rst","rst")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ruby/ruby.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ruby/ruby.js deleted file mode 100644 index 4f70724b0..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ruby/ruby.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){for(var t={},n=0,r=e.length;n-1)r++;else if("]})".indexOf(t)>-1){if(--r<0)break}else if("/"==t&&0==r){i=!0;break}o="\\"==t}return e.backUp(e.pos-n),i}(e)?f(c(u,"string-2",!0),e,t):"operator";if("%"==u){var l="string",d=!0;e.eat("s")?l="atom":e.eat(/[WQ]/)?l="string":e.eat(/[r]/)?l="string-2":e.eat(/[wxq]/)&&(l="string",d=!1);var s=e.eat(/[^\w\s=]/);return s?(a.propertyIsEnumerable(s)&&(s=a[s]),f(c(s,l,d,!0),e,t)):"operator"}if("#"==u)return e.skipToEnd(),"comment";if("<"==u&&(r=e.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return f((i=r[2],o=r[1],function(e,t){return o&&e.eatSpace(),e.match(i)?t.tokenize.pop():e.skipToEnd(),"string"}),e,t);if("0"==u)return e.eat("x")?e.eatWhile(/[\da-fA-F]/):e.eat("b")?e.eatWhile(/[01]/):e.eatWhile(/[0-7]/),"number";if(/\d/.test(u))return e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if("?"==u){for(;e.match(/^\\[CM]-/););return e.eat("\\")?e.eatWhile(/\w/):e.next(),"string"}if(":"==u)return e.eat("'")?f(c("'","atom",!1),e,t):e.eat('"')?f(c('"',"atom",!0),e,t):e.eat(/[\<\>]/)?(e.eat(/[\<\>]/),"atom"):e.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":e.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(e.eatWhile(/[\w$\xa1-\uffff]/),e.eat(/[\?\!\=]/),"atom"):"operator";if("@"==u&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat("@"),e.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if("$"==u)return e.eat(/[a-zA-Z_]/)?e.eatWhile(/[\w]/):e.eat(/\d/)?e.eat(/\d/):e.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(u))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(":")?"atom":"ident";if("|"!=u||!t.varList&&"{"!=t.lastTok&&"do"!=t.lastTok){if(/[\(\)\[\]{}\\;]/.test(u))return n=u,null;if("-"==u&&e.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(u)){var k=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return"."!=u||k||(n="."),"operator"}return null}return n="|",null}function d(e){return e||(e=1),function(t,n){if("}"==t.peek()){if(1==e)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n);n.tokenize[n.tokenize.length-1]=d(e-1)}else"{"==t.peek()&&(n.tokenize[n.tokenize.length-1]=d(e+1));return l(t,n)}}function s(){var e=!1;return function(t,n){return e?(n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)):(e=!0,l(t,n))}}function c(e,t,n,r){return function(i,o){var a,u=!1;for("read-quoted-paused"===o.context.type&&(o.context=o.context.prev,i.eat("}"));null!=(a=i.next());){if(a==e&&(r||!u)){o.tokenize.pop();break}if(n&&"#"==a&&!u){if(i.eat("{")){"}"==e&&(o.context={prev:o.context,type:"read-quoted-paused"}),o.tokenize.push(d());break}if(/[@\$]/.test(i.peek())){o.tokenize.push(s());break}}u=!u&&"\\"==a}return t}}function p(e,t){return e.sol()&&e.match("=end")&&e.eol()&&t.tokenize.pop(),e.skipToEnd(),"comment"}return{startState:function(){return{tokenize:[l],indented:0,context:{type:"top",indented:-t.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,t){n=null,e.sol()&&(t.indented=e.indentation());var a,u=t.tokenize[t.tokenize.length-1](e,t),f=n;if("ident"==u){var l=e.current();"keyword"==(u="."==t.lastTok?"property":r.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(l)?"tag":"def"==t.lastTok||"class"==t.lastTok||t.varList?"def":"variable")&&(f=l,i.propertyIsEnumerable(l)?a="indent":o.propertyIsEnumerable(l)?a="dedent":"if"!=l&&"unless"!=l||e.column()!=e.indentation()?"do"==l&&t.context.indented!]+/,token:"operator"},{regex:/[a-zA-Z_]\w*!/,token:"variable-3"},{regex:/[a-zA-Z_]\w*/,token:"variable"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0}],string:[{regex:/"/,token:"string",next:"start"},{regex:/(?:[^\\"]|\\(?:.|$))*/,token:"string"}],string_raw:[{regex:/"/,token:"string",next:"start"},{regex:/[^"]*/,token:"string"}],string_raw_hash:[{regex:/"#+/,token:"string",next:"start"},{regex:/(?:[^"]|"(?!#))*/,token:"string"}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],electricInput:/^\s*\}$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),e.defineMIME("text/x-rustsrc","rust"),e.defineMIME("text/rust","rust")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/sas/sas.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/sas/sas.js deleted file mode 100644 index b69c5eb12..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/sas/sas.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("sas",(function(){var e={},t={eq:"operator",lt:"operator",le:"operator",gt:"operator",ge:"operator",in:"operator",ne:"operator",or:"operator"},n=/(<=|>=|!=|<>)/,r=/[=\(:\),{}.*<>+\-\/^\[\]]/;function o(t,n,r){if(r)for(var o=n.split(" "),s=0;s","<","==",">=","<=","\\+","-","\\!=","/","\\*","%","and","or","not",";","\\{","\\}",":"].join("|")),c=/^::?[a-zA-Z_][\w\-]*/;function p(e){return!e.peek()||e.match(/\s+$/,!1)}function l(e,r){var t=e.peek();return")"===t?(e.next(),r.tokenizer=x,"operator"):"("===t?(e.next(),e.eatSpace(),"operator"):"'"===t||'"'===t?(r.tokenizer=h(e.next()),"string"):(r.tokenizer=h(")",!1),"string")}function m(e,r){return function(t,n){return t.sol()&&t.indentation()<=e?(n.tokenizer=x,x(t,n)):(r&&t.skipTo("*/")?(t.next(),t.next(),n.tokenizer=x):t.skipToEnd(),"comment")}}function h(e,r){return null==r&&(r=!0),function t(n,o){var i=n.next(),a=n.peek(),u=n.string.charAt(n.pos-2);return"\\"!==i&&a===e||i===e&&"\\"!==u?(i!==e&&r&&n.next(),p(n)&&(o.cursorHalf=0),o.tokenizer=x,"string"):"#"===i&&"{"===a?(o.tokenizer=d(t),n.next(),"operator"):"string"}}function d(e){return function(r,t){return"}"===r.peek()?(r.next(),t.tokenizer=e,"operator"):x(r,t)}}function k(e){if(0==e.indentCount){e.indentCount++;var t=e.scopes[0].offset+r.indentUnit;e.scopes.unshift({offset:t})}}function w(e){1!=e.scopes.length&&e.scopes.shift()}function x(e,r){var n=e.peek();if(e.match("/*"))return r.tokenizer=m(e.indentation(),!0),r.tokenizer(e,r);if(e.match("//"))return r.tokenizer=m(e.indentation(),!1),r.tokenizer(e,r);if(e.match("#{"))return r.tokenizer=d(x),"operator";if('"'===n||"'"===n)return e.next(),r.tokenizer=h(n),"string";if(r.cursorHalf){if("#"===n&&(e.next(),e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)))return p(e)&&(r.cursorHalf=0),"number";if(e.match(/^-?[0-9\.]+/))return p(e)&&(r.cursorHalf=0),"number";if(e.match(/^(px|em|in)\b/))return p(e)&&(r.cursorHalf=0),"unit";if(e.match(s))return p(e)&&(r.cursorHalf=0),"keyword";if(e.match(/^url/)&&"("===e.peek())return r.tokenizer=l,p(e)&&(r.cursorHalf=0),"atom";if("$"===n)return e.next(),e.eatWhile(/[\w-]/),p(e)&&(r.cursorHalf=0),"variable-2";if("!"===n)return e.next(),r.cursorHalf=0,e.match(/^[\w]+/)?"keyword":"operator";if(e.match(f))return p(e)&&(r.cursorHalf=0),"operator";if(e.eatWhile(/[\w-]/))return p(e)&&(r.cursorHalf=0),t=e.current().toLowerCase(),a.hasOwnProperty(t)?"atom":i.hasOwnProperty(t)?"keyword":o.hasOwnProperty(t)?(r.prevProp=e.current().toLowerCase(),"property"):"tag";if(p(e))return r.cursorHalf=0,null}else{if("-"===n&&e.match(/^-\w+-/))return"meta";if("."===n){if(e.next(),e.match(/^[\w-]+/))return k(r),"qualifier";if("#"===e.peek())return k(r),"tag"}if("#"===n){if(e.next(),e.match(/^[\w-]+/))return k(r),"builtin";if("#"===e.peek())return k(r),"tag"}if("$"===n)return e.next(),e.eatWhile(/[\w-]/),"variable-2";if(e.match(/^-?[0-9\.]+/))return"number";if(e.match(/^(px|em|in)\b/))return"unit";if(e.match(s))return"keyword";if(e.match(/^url/)&&"("===e.peek())return r.tokenizer=l,"atom";if("="===n&&e.match(/^=[\w-]+/))return k(r),"meta";if("+"===n&&e.match(/^\+[\w-]+/))return"variable-3";if("@"===n&&e.match("@extend")&&(e.match(/\s*[\w]/)||w(r)),e.match(/^@(else if|if|media|else|for|each|while|mixin|function)/))return k(r),"def";if("@"===n)return e.next(),e.eatWhile(/[\w-]/),"def";if(e.eatWhile(/[\w-]/)){if(e.match(/ *: *[\w-\+\$#!\("']/,!1)){t=e.current().toLowerCase();var y=r.prevProp+"-"+t;return o.hasOwnProperty(y)?"property":o.hasOwnProperty(t)?(r.prevProp=t,"property"):u.hasOwnProperty(t)?"property":"tag"}return e.match(/ *:/,!1)?(k(r),r.cursorHalf=1,r.prevProp=e.current().toLowerCase(),"property"):(e.match(/ *,/,!1)||k(r),"tag")}if(":"===n)return e.match(c)?"variable-3":(e.next(),r.cursorHalf=1,"operator")}return e.match(f)?"operator":(e.next(),null)}return{startState:function(){return{tokenizer:x,scopes:[{offset:0,type:"sass"}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,t){var n=function(e,t){e.sol()&&(t.indentCount=0);var n=t.tokenizer(e,t),o=e.current();if("@return"!==o&&"}"!==o||w(t),null!==n){for(var i=e.pos-o.length+r.indentUnit*t.indentCount,a=[],u=0;uinteger char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"),s=c("define let letrec let* lambda define-macro defmacro let-syntax letrec-syntax let-values let*-values define-syntax syntax-rules define-values when unless");function l(e,t,n){this.indent=e,this.type=t,this.prev=n}function d(e,t,n){e.indentStack=new l(t,n,e.indentStack)}var u=new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i),m=new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i),p=new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i),f=new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);function h(e){return e.match(u)}function x(e){return e.match(m)}function g(e,t){return!0===t&&e.backUp(1),e.match(f)}function b(e){return e.match(p)}function v(e,t){for(var n,r=!1;null!=(n=e.next());){if(n==t.token&&!r){t.state.mode=!1;break}r=!r&&"\\"==n}}return{startState:function(){return{indentStack:null,indentation:0,mode:!1,sExprComment:!1,sExprQuote:!1}},token:function(c,l){if(null==l.indentStack&&c.sol()&&(l.indentation=c.indentation()),c.eatSpace())return null;var u=null;switch(l.mode){case"string":v(c,{token:'"',state:l}),u=t;break;case"symbol":v(c,{token:"|",state:l}),u=n;break;case"comment":for(var m,p=!1;null!=(m=c.next());){if("#"==m&&p){l.mode=!1;break}p="|"==m}u=e;break;case"s-expr-comment":if(l.mode=!1,"("!=c.peek()&&"["!=c.peek()){c.eatWhile(/[^\s\(\)\[\]]/),u=e;break}l.sExprComment=0;default:var f=c.next();if('"'==f)l.mode="string",u=t;else if("'"==f)"("==c.peek()||"["==c.peek()?("number"!=typeof l.sExprQuote&&(l.sExprQuote=0),u=r):(c.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),u=r);else if("|"==f)l.mode="symbol",u=n;else if("#"==f)if(c.eat("|"))l.mode="comment",u=e;else if(c.eat(/[tf]/i))u=r;else if(c.eat(";"))l.mode="s-expr-comment",u=e;else{var y=null,k=!1,w=!0;c.eat(/[ei]/i)?k=!0:c.backUp(1),c.match(/^#b/i)?y=h:c.match(/^#o/i)?y=x:c.match(/^#x/i)?y=b:c.match(/^#d/i)?y=g:c.match(/^[-+0-9.]/,!1)?(w=!1,y=g):k||c.eat("#"),null!=y&&(w&&!k&&c.match(/^#[ei]/i),y(c)&&(u=i))}else if(/^[-+0-9.]/.test(f)&&g(c,!0))u=i;else if(";"==f)c.skipToEnd(),u=e;else if("("==f||"["==f){for(var E,q="",S=c.column();null!=(E=c.eat(/[^\s\(\[\;\)\]]/));)q+=E;q.length>0&&s.propertyIsEnumerable(q)?d(l,S+2,f):(c.eatSpace(),c.eol()||";"==c.peek()?d(l,S+1,f):d(l,S+c.current().length,f)),c.backUp(c.current().length-1),"number"==typeof l.sExprComment&&l.sExprComment++,"number"==typeof l.sExprQuote&&l.sExprQuote++,u=a}else")"==f||"]"==f?(u=a,null!=l.indentStack&&l.indentStack.type==(")"==f?"(":"[")&&(function(e){e.indentStack=e.indentStack.prev}(l),"number"==typeof l.sExprComment&&0==--l.sExprComment&&(u=e,l.sExprComment=!1),"number"==typeof l.sExprQuote&&0==--l.sExprQuote&&(u=r,l.sExprQuote=!1))):(c.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/),u=o&&o.propertyIsEnumerable(c.current())?"builtin":"variable")}return"number"==typeof l.sExprComment?e:"number"==typeof l.sExprQuote?r:u},indent:function(e){return null==e.indentStack?e.indentation:e.indentStack.indent},fold:"brace-paren",closeBrackets:{pairs:'()[]{}""'},lineComment:";;"}})),e.defineMIME("text/x-scheme","scheme")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/shell/shell.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/shell/shell.js deleted file mode 100644 index dd3970082..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/shell/shell.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("shell",(function(){var t={};function n(e,n){for(var r=0;r1&&e.eat("$");var n=e.next();return/['"({]/.test(n)?(t.tokens[0]=u(n,"("==n?"quote":"{"==n?"def":"string"),c(e,t)):(/\d/.test(n)||e.eatWhile(/\w/),t.tokens.shift(),"def")};function c(e,t){return(t.tokens[0]||s)(e,t)}return{startState:function(){return{tokens:[]}},token:function(e,t){return c(e,t)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}})),e.defineMIME("text/x-sh","shell"),e.defineMIME("application/x-sh","shell")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/sieve/sieve.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/sieve/sieve.js deleted file mode 100644 index a4fdf5f32..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/sieve/sieve.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("sieve",(function(e){function n(e){for(var n={},t=e.split(" "),r=0;r-1&&(e.tokenize=function(t,e,n){var i=function(i,r){return r.tokenize=e,i.pos]?)/))return i.tokenize=function(t,e){return function(n,i){if(p(i),n.match(/^\\$/))return z(i,t),"lineContinuation";var r=e(n,i);return n.eol()&&n.current().match(/(?:^|[^\\])(?:\\\\)*\\$/)&&n.backUp(1),r}}(n.column(),(a=n.column(),c=y,function(t,e){p(e);var n=c(t,e);return t.eol()&&t.current().match(/,$/)&&z(e,a),n})),"slimSwitch";if(n.match(/^doctype\b/))return i.tokenize=L,"keyword";var s=n.match(u);return s?function(n,i){var u=function(n){return r.hasOwnProperty(n)?r[n]:r[n]=function(n){var i=o[n],r=t.mimeModes[i];if(r)return t.getMode(e,r);var u=t.modes[i];return u?u(e,{name:i}):t.getMode(e,"null")}(n)}(n),a=t.startState(u);return i.subMode=u,i.subState=a,i.stack={parent:i.stack,style:"sub",indented:i.indented+1,tokenize:i.line},i.line=i.tokenize=A,"slimSubmode"}(s[1],i):U(n,i)}function T(t,e){return e.startOfLine?$(t,e):U(t,e)}function U(t,e){return t.eat("*")?(e.tokenize=h(j),null):t.match(k)?(e.tokenize=j,"slimTag"):O(t,e)}function j(t,e){return t.match(/^(<>?|>e.indented&&"slimSubmode"!=e.last;)e.line=e.tokenize=e.stack.tokenize,e.stack=e.stack.parent,e.subMode=null,e.subState=null;if(t.eatSpace())return null;var n=e.tokenize(t,e);return e.startOfLine=!1,n&&(e.last=n),a.hasOwnProperty(n)?a[n]:n},blankLine:function(t){if(t.subMode&&t.subMode.blankLine)return t.subMode.blankLine(t.subState)},innerMode:function(t){return t.subMode?{state:t.subState,mode:t.subMode}:{state:t,mode:D}}};return D}),"htmlmixed","ruby"),t.defineMIME("text/x-slim","slim"),t.defineMIME("application/x-slim","slim")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/smalltalk/smalltalk.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/smalltalk/smalltalk.js deleted file mode 100644 index 245ccc168..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/smalltalk/smalltalk.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("smalltalk",(function(e){var t=/[+\-\/\\*~<>=@%|&?!.,:;^]/,n=/true|false|nil|self|super|thisContext/,i=function(e,t){this.next=e,this.parent=t},a=function(e,t,n){this.name=e,this.context=t,this.eos=n},r=function(){this.context=new i(o,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};r.prototype.userIndent=function(t){this.userIndentationDelta=t>0?t/e.indentUnit-this.indentation:0};var o=function(e,r,o){var d=new a(null,r,!1),f=e.next();return'"'===f?d=s(e,new i(s,r)):"'"===f?d=u(e,new i(u,r)):"#"===f?"'"===e.peek()?(e.next(),d=c(e,new i(c,r))):e.eatWhile(/[^\s.{}\[\]()]/)?d.name="string-2":d.name="meta":"$"===f?("<"===e.next()&&(e.eatWhile(/[^\s>]/),e.next()),d.name="string-2"):"|"===f&&o.expectVariable?d.context=new i(l,r):/[\[\]{}()]/.test(f)?(d.name="bracket",d.eos=/[\[{(]/.test(f),"["===f?o.indentation++:"]"===f&&(o.indentation=Math.max(0,o.indentation-1))):t.test(f)?(e.eatWhile(t),d.name="operator",d.eos=";"!==f):/\d/.test(f)?(e.eatWhile(/[\w\d]/),d.name="number"):/[\w_]/.test(f)?(e.eatWhile(/[\w\d_]/),d.name=o.expectVariable?n.test(e.current())?"keyword":"variable":null):d.eos=o.expectVariable,d},s=function(e,t){return e.eatWhile(/[^"]/),new a("comment",e.eat('"')?t.parent:t,!0)},u=function(e,t){return e.eatWhile(/[^']/),new a("string",e.eat("'")?t.parent:t,!1)},c=function(e,t){return e.eatWhile(/[^']/),new a("string-2",e.eat("'")?t.parent:t,!1)},l=function(e,t){var n=new a(null,t,!1);return"|"===e.next()?(n.context=t.parent,n.eos=!0):(e.eatWhile(/[^|]/),n.name="variable"),n};return{startState:function(){return new r},token:function(e,t){if(t.userIndent(e.indentation()),e.eatSpace())return null;var n=t.context.next(e,t.context,t);return t.context=n.context,t.expectVariable=n.eos,n.name},blankLine:function(e){e.userIndent(0)},indent:function(t,n){var i=t.context.next===o&&n&&"]"===n.charAt(0)?-1:t.userIndentationDelta;return(t.indentation+i)*e.indentUnit},electricChars:"]"}})),e.defineMIME("text/x-stsrc",{name:"smalltalk"})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/smarty/smarty.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/smarty/smarty.js deleted file mode 100644 index 4f967c01f..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/smarty/smarty.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("smarty",(function(t,r){var i,n=r.rightDelimiter||"}",a=r.leftDelimiter||"{",o=r.version||2,f=e.getMode(t,r.baseMode||"null"),l=["debug","extends","function","include","literal"],u={operatorChars:/[+\-*&%=<>!?]/,validIdentifier:/[a-zA-Z0-9_]/,stringChar:/['"]/};function s(e,t){return i=t,e}function d(e,t){return null==t&&(t=e.pos),3===o&&"{"==a&&(t==e.string.length||/\s/.test(e.string.charAt(t)))}function p(e,t){for(var r,o=e.string,l=e.pos;;){var u=o.indexOf(a,l);if(l=u+a.length,-1==u||!d(e,u+a.length))break}if(u==e.pos)return e.match(a),e.eat("*")?function(e,t,r){return t.tokenize=r,r(e,t)}(e,t,("comment",r="*"+n,function(e,t){for(;!e.eol();){if(e.match(r)){t.tokenize=p;break}e.next()}return"comment"})):(t.depth++,t.tokenize=c,i="startTag","tag");u>-1&&(e.string=o.slice(0,u));var s=f.token(e,t.base);return u>-1&&(e.string=o),s}function c(e,t){if(e.match(n,!0))return 3===o?(t.depth--,t.depth<=0&&(t.tokenize=p)):t.tokenize=p,s("tag",null);if(e.match(a,!0))return t.depth++,s("tag","startTag");var r=e.next();if("$"==r)return e.eatWhile(u.validIdentifier),s("variable-2","variable");if("|"==r)return s("operator","pipe");if("."==r)return s("operator","property");if(u.stringChar.test(r))return t.tokenize=(f=r,function(e,t){for(var r=null,i=null;!e.eol();){if(i=e.peek(),e.next()==f&&"\\"!==r){t.tokenize=c;break}r=i}return"string"}),s("string","string");if(u.operatorChars.test(r))return e.eatWhile(u.operatorChars),s("operator","operator");if("["==r||"]"==r)return s("bracket","bracket");if("("==r||")"==r)return s("bracket","operator");if(/\d/.test(r))return e.eatWhile(/\d/),s("number","number");if("variable"==t.last){if("@"==r)return e.eatWhile(u.validIdentifier),s("property","property");if("|"==r)return e.eatWhile(u.validIdentifier),s("qualifier","modifier")}else{if("pipe"==t.last)return e.eatWhile(u.validIdentifier),s("qualifier","modifier");if("whitespace"==t.last)return e.eatWhile(u.validIdentifier),s("attribute","modifier")}if("property"==t.last)return e.eatWhile(u.validIdentifier),s("property",null);if(/\s/.test(r))return i="whitespace",null;var f,d="";"/"!=r&&(d+=r);for(var h=null;h=e.eat(u.validIdentifier);)d+=h;for(var m=0,b=l.length;m]=?)/)?"operator":(a=t.match(/^\$([\w]+)/))?c(e.variables,a[1],!e.lookupVariables):(a=t.match(/^\w+/))?/^(?:as|and|or|not|in|if)$/.test(a[0])?"keyword":null:(t.next(),null)}return{startState:function(){return{soyState:[],variables:i(null,"ij"),scopes:null,indent:0,quoteKind:null,context:null,lookupVariables:!0,localStates:[{mode:o.html,state:t.startState(o.html)}]}},copyState:function(e){return{tag:e.tag,soyState:e.soyState.concat([]),variables:e.variables,context:e.context,indent:e.indent,quoteKind:e.quoteKind,lookupVariables:e.lookupVariables,localStates:e.localStates.map((function(e){return{mode:e.mode,state:t.copyState(e.mode,e.state)}}))}},token:function(r,d){switch(s(d.soyState)){case"comment":if(r.match(/^.*?\*\//)?d.soyState.pop():r.skipToEnd(),!d.context||!d.context.scope)for(var y=/@param\??\s+(\S+)/g,h=r.current();f=y.exec(h);)d.variables=i(d.variables,f[1]);return"comment";case"string":var f;return(f=r.match(/^.*?(["']|\\[\s\S])/))?f[1]==d.quoteKind&&(d.quoteKind=null,d.soyState.pop()):r.skipToEnd(),"string"}if(!d.soyState.length||"literal"!=s(d.soyState)){if(r.match(/^\/\*/))return d.soyState.push("comment"),"comment";if(r.match(r.sol()?/^\s*\/\/.*/:/^\s+\/\/.*/))return"comment"}switch(s(d.soyState)){case"templ-def":return(f=r.match(/^\.?([\w]+(?!\.[\w]+)*)/))?(d.soyState.pop(),"def"):(r.next(),null);case"templ-ref":return(f=r.match(/(\.?[a-zA-Z_][a-zA-Z_0-9]+)+/))?(d.soyState.pop(),"."==f[0][0]?"variable-2":"variable"):(f=r.match(/^\$([\w]+)/))?(d.soyState.pop(),c(d.variables,f[1],!d.lookupVariables)):(r.next(),null);case"namespace-def":return(f=r.match(/^\.?([\w\.]+)/))?(d.soyState.pop(),"variable"):(r.next(),null);case"param-def":return(f=r.match(/^\*/))?(d.soyState.pop(),d.soyState.push("param-type"),"type"):(f=r.match(/^\w+/))?(d.variables=i(d.variables,f[0]),d.soyState.pop(),d.soyState.push("param-type"),"def"):(r.next(),null);case"param-ref":return(f=r.match(/^\w+/))?(d.soyState.pop(),"property"):(r.next(),null);case"open-parentheses":return r.match(/[)]/)?(d.soyState.pop(),null):m(r,d);case"param-type":var S=r.peek();return-1!="}]=>,".indexOf(S)?(d.soyState.pop(),null):"["==S?(d.soyState.push("param-type-record"),null):"("==S?(d.soyState.push("param-type-template"),null):"<"==S?(d.soyState.push("param-type-parameter"),null):(f=r.match(/^([\w]+|[?])/))?"type":(r.next(),null);case"param-type-record":return"]"==(S=r.peek())?(d.soyState.pop(),null):r.match(/^\w+/)?(d.soyState.push("param-type"),"property"):(r.next(),null);case"param-type-parameter":return r.match(/^[>]/)?(d.soyState.pop(),null):r.match(/^[<,]/)?(d.soyState.push("param-type"),null):(r.next(),null);case"param-type-template":return r.match(/[>]/)?(d.soyState.pop(),d.soyState.push("param-type"),null):r.match(/^\w+/)?(d.soyState.push("param-type"),"def"):(r.next(),null);case"var-def":return(f=r.match(/^\$([\w]+)/))?(d.variables=i(d.variables,f[1]),d.soyState.pop(),"def"):(r.next(),null);case"for-loop":return r.match(/\bin\b/)?(d.soyState.pop(),"keyword"):"$"==r.peek()?(d.soyState.push("var-def"),null):(r.next(),null);case"record-literal":return r.match(/^[)]/)?(d.soyState.pop(),null):r.match(/[(,]/)?(d.soyState.push("map-value"),d.soyState.push("record-key"),null):(r.next(),null);case"map-literal":return r.match(/^[)]/)?(d.soyState.pop(),null):r.match(/[(,]/)?(d.soyState.push("map-value"),d.soyState.push("map-value"),null):(r.next(),null);case"list-literal":return r.match("]")?(d.soyState.pop(),d.lookupVariables=!0,p(d),null):r.match(/\bfor\b/)?(d.lookupVariables=!0,d.soyState.push("for-loop"),"keyword"):m(r,d);case"record-key":return r.match(/[\w]+/)?"property":r.match(/^[:]/)?(d.soyState.pop(),null):(r.next(),null);case"map-value":return")"==r.peek()||","==r.peek()||r.match(/^[:)]/)?(d.soyState.pop(),null):m(r,d);case"import":return r.eat(";")?(d.soyState.pop(),d.indent-=2*e.indentUnit,null):r.match(/\w+(?=\s+as\b)/)?"variable":(f=r.match(/\w+/))?/\b(from|as)\b/.test(f[0])?"keyword":"def":(f=r.match(/^["']/))?(d.soyState.push("string"),d.quoteKind=f[0],"string"):(r.next(),null);case"tag":void 0===d.tag?(k=!0,E=""):E=(k="/"==d.tag[0])?d.tag.substring(1):d.tag;var x=a[E];if(r.match(/^\/?}/)){var g="/}"==r.current();return g&&!k&&p(d),"/template"==d.tag||"/deltemplate"==d.tag?(d.variables=i(null,"ij"),d.indent=0):d.indent-=e.indentUnit*(g||-1==n.indexOf(d.tag)?2:1),d.soyState.pop(),"keyword"}if(r.match(/^([\w?]+)(?==)/)){if(d.context&&d.context.tag==E&&"kind"==r.current()&&(f=r.match(/^="([^"]+)/,!1))){var b=f[1];d.context.kind=b;var v=o[b]||o.html;(j=s(d.localStates)).mode.indent&&(d.indent+=j.mode.indent(j.state,"","")),d.localStates.push({mode:v,state:t.startState(v)})}return"attribute"}return m(r,d);case"template-call-expression":return r.match(/^([\w-?]+)(?==)/)?"attribute":r.eat(">")||r.eat("/>")?(d.soyState.pop(),"keyword"):m(r,d);case"literal":return r.match("{/literal}",!1)?(d.soyState.pop(),this.token(r,d)):l(r,d,/\{\/literal}/);case"export":if(f=r.match(/\w+/)){if(d.soyState.pop(),"const"==f)return d.soyState.push("const-def"),"keyword";if("extern"==f)return d.soyState.push("param-def"),"keyword"}else r.next();return null;case"const-def":return r.match(/^\w+/)?(d.soyState.pop(),"def"):(r.next(),null)}if(r.match("{literal}"))return d.indent+=e.indentUnit,d.soyState.push("literal"),d.context=new u(d.context,"literal",d.variables),"keyword";if(f=r.match(/^\{([/@\\]?\w+\??)(?=$|[\s}]|\/[/*])/)){var w=d.tag;d.tag=f[1];var k="/"==d.tag[0],T=!!a[d.tag],E=k?d.tag.substring(1):d.tag;x=a[E],"/switch"!=d.tag&&(d.indent+=((k||x&&x.reduceIndent)&&"switch"!=w?1:2)*e.indentUnit),d.soyState.push("tag");var I=!1;if(x)if(k||x.soyState&&d.soyState.push(x.soyState),x.noEndTag||!T&&k){if(k){var U="extern"==E&&d.context&&"export"==d.context.tag;if(!d.context||d.context.tag!=E&&!U)I=!0;else if(d.context){var j;d.context.kind&&(d.localStates.pop(),(j=s(d.localStates)).mode.indent&&(d.indent-=j.mode.indent(j.state,"",""))),p(d)}}}else d.context=new u(d.context,d.tag,x.variableScope?d.variables:null);else k&&(I=!0);return(I?"error ":"")+"keyword"}return r.eat("{")?(d.tag="print",d.indent+=2*e.indentUnit,d.soyState.push("tag"),"keyword"):!d.context&&r.sol()&&r.match(/import\b/)?(d.soyState.push("import"),d.indent+=2*e.indentUnit,"keyword"):(f=r.match("<{"))?(d.soyState.push("template-call-expression"),d.indent+=2*e.indentUnit,d.soyState.push("tag"),"keyword"):(f=r.match(""))?(d.indent-=1*e.indentUnit,"keyword"):l(r,d,/\{|\s+\/\/|\/\*/)},indent:function(a,n,r){var o=a.indent,l=s(a.soyState);if("comment"==l)return t.Pass;if("literal"==l)/^\{\/literal}/.test(n)&&(o-=e.indentUnit);else{if(/^\s*\{\/(template|deltemplate)\b/.test(n))return 0;/^\{(\/|(fallbackmsg|elseif|else|ifempty)\b)/.test(n)&&(o-=e.indentUnit),"switch"!=a.tag&&/^\{(case|default)\b/.test(n)&&(o-=e.indentUnit),/^\{\/switch\b/.test(n)&&(o-=e.indentUnit)}var i=s(a.localStates);return o&&i.mode.indent&&(o+=i.mode.indent(i.state,n,r)),o},innerMode:function(t){return t.soyState.length&&"literal"!=s(t.soyState)?null:s(t.localStates)},electricInput:/^\s*\{(\/|\/template|\/deltemplate|\/switch|fallbackmsg|elseif|else|case|default|ifempty|\/literal\})$/,lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",useInnerComments:!1,fold:"indent"}}),"htmlmixed"),t.registerHelper("wordChars","soy",/[\w$]/),t.registerHelper("hintWords","soy",Object.keys(a).concat(["css","debugger"])),t.defineMIME("text/x-soy","soy")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/sparql/sparql.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/sparql/sparql.js deleted file mode 100644 index 82cf6464a..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/sparql/sparql.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";t.defineMode("sparql",(function(t){var e,n=t.indentUnit;function r(t){return new RegExp("^(?:"+t.join("|")+")$","i")}var o=r(["str","lang","langmatches","datatype","bound","sameterm","isiri","isuri","iri","uri","bnode","count","sum","min","max","avg","sample","group_concat","rand","abs","ceil","floor","round","concat","substr","strlen","replace","ucase","lcase","encode_for_uri","contains","strstarts","strends","strbefore","strafter","year","month","day","hours","minutes","seconds","timezone","tz","now","uuid","struuid","md5","sha1","sha256","sha384","sha512","coalesce","if","strlang","strdt","isnumeric","regex","exists","isblank","isliteral","a","bind"]),i=r(["base","prefix","select","distinct","reduced","construct","describe","ask","from","named","where","order","limit","offset","filter","optional","graph","by","asc","desc","as","having","undef","values","group","minus","in","not","service","silent","using","insert","delete","union","true","false","with","data","copy","to","move","add","create","drop","clear","load"]),u=/[*+\-<>=&|\^\/!\?]/;function a(t,n){var r,s=t.next();if(e=null,"$"==s||"?"==s)return"?"==s&&t.match(/\s/,!1)?"operator":(t.match(/^[A-Za-z0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][A-Za-z0-9_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*/),"variable-2");if("<"!=s||t.match(/^[\s\u00a0=]/,!1)){if('"'==s||"'"==s)return n.tokenize=(r=s,function(t,e){for(var n,o=!1;null!=(n=t.next());){if(n==r&&!o){e.tokenize=a;break}o=!o&&"\\"==n}return"string"}),n.tokenize(t,n);if(/[{}\(\),\.;\[\]]/.test(s))return e=s,"bracket";if("#"==s)return t.skipToEnd(),"comment";if(u.test(s))return"operator";if(":"==s)return c(t),"atom";if("@"==s)return t.eatWhile(/[a-z\d\-]/i),"meta";if(t.eatWhile(/[_\w\d]/),t.eat(":"))return c(t),"atom";var l=t.current();return o.test(l)?"builtin":i.test(l)?"keyword":"variable"}return t.match(/^[^\s\u00a0>]*>?/),"atom"}function c(t){t.match(/(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/i)}function s(t,e,n){t.context={prev:t.context,indent:t.indent,col:n,type:e}}function l(t){t.indent=t.context.indent,t.context=t.context.prev}return{startState:function(){return{tokenize:a,context:null,indent:0,col:0}},token:function(t,n){if(t.sol()&&(n.context&&null==n.context.align&&(n.context.align=!1),n.indent=t.indentation()),t.eatSpace())return null;var r=n.tokenize(t,n);if("comment"!=r&&n.context&&null==n.context.align&&"pattern"!=n.context.type&&(n.context.align=!0),"("==e)s(n,")",t.column());else if("["==e)s(n,"]",t.column());else if("{"==e)s(n,"}",t.column());else if(/[\]\}\)]/.test(e)){for(;n.context&&"pattern"==n.context.type;)l(n);n.context&&e==n.context.type&&(l(n),"}"==e&&n.context&&"pattern"==n.context.type&&l(n))}else"."==e&&n.context&&"pattern"==n.context.type?l(n):/atom|string|variable/.test(r)&&n.context&&(/[\}\]]/.test(n.context.type)?s(n,"pattern",t.column()):"pattern"!=n.context.type||n.context.align||(n.context.align=!0,n.context.col=t.column()));return r},indent:function(t,e){var r=e&&e.charAt(0),o=t.context;if(/[\]\}]/.test(r))for(;o&&"pattern"==o.type;)o=o.prev;var i=o&&r==o.type;return o?"pattern"==o.type?o.col:o.align?o.col+(i?0:1):o.indent+(i?0:n):0},lineComment:"#"}})),t.defineMIME("application/sparql-query","sparql")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/spreadsheet/spreadsheet.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/spreadsheet/spreadsheet.js deleted file mode 100644 index f084cf45a..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/spreadsheet/spreadsheet.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("spreadsheet",(function(){return{startState:function(){return{stringType:null,stack:[]}},token:function(e,t){if(e){switch(0===t.stack.length&&('"'!=e.peek()&&"'"!=e.peek()||(t.stringType=e.peek(),e.next(),t.stack.unshift("string"))),t.stack[0]){case"string":for(;"string"===t.stack[0]&&!e.eol();)e.peek()===t.stringType?(e.next(),t.stack.shift()):"\\"===e.peek()?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return"string";case"characterClass":for(;"characterClass"===t.stack[0]&&!e.eol();)e.match(/^[^\]\\]+/)||e.match(/^\\./)||t.stack.shift();return"operator"}var r=e.peek();switch(r){case"[":return e.next(),t.stack.unshift("characterClass"),"bracket";case":":return e.next(),"operator";case"\\":return e.match(/\\[a-z]+/)?"string-2":(e.next(),"atom");case".":case",":case";":case"*":case"-":case"+":case"^":case"<":case"/":case"=":return e.next(),"atom";case"$":return e.next(),"builtin"}return e.match(/\d+/)?e.match(/^\w+/)?"error":"number":e.match(/^[a-zA-Z_]\w*/)?e.match(/(?=[\(.])/,!1)?"keyword":"variable-2":-1!=["[","]","(",")","{","}"].indexOf(r)?(e.next(),"bracket"):(e.eatSpace()||e.next(),null)}}}})),e.defineMIME("text/x-spreadsheet","spreadsheet")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/sql/sql.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/sql/sql.js deleted file mode 100644 index 44e4f6414..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/sql/sql.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){for(var t;null!=(t=e.next());)if("`"==t&&!e.eat("`"))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function r(e){return e.eat("@")&&(e.match("session."),e.match("local."),e.match("global.")),e.eat("'")?(e.match(/^.*'/),"variable-2"):e.eat('"')?(e.match(/^.*"/),"variable-2"):e.eat("`")?(e.match(/^.*`/),"variable-2"):e.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function a(e){return e.eat("N")?"atom":e.match(/^[a-zA-Z.#!?]/)?"variable-2":null}e.defineMode("sql",(function(t,r){var a=r.client||{},s=r.atoms||{false:!0,true:!0,null:!0},l=r.builtin||i(o),c=r.keywords||i(n),d=r.operatorChars||/^[*+\-%<>!=&|~^\/]/,u=r.support||{},m=r.hooks||{},p=r.dateSQL||{date:!0,time:!0,timestamp:!0},_=!1!==r.backslashStringEscapes,h=r.brackets||/^[\{}\(\)\[\]]/,g=r.punctuation||/^[;.,:]/;function b(e,t){var r=e.next();if(m[r]){var n=m[r](e,t);if(!1!==n)return n}if(u.hexNumber&&("0"==r&&e.match(/^[xX][0-9a-fA-F]+/)||("x"==r||"X"==r)&&e.match(/^'[0-9a-fA-F]+'/)))return"number";if(u.binaryNumber&&(("b"==r||"B"==r)&&e.match(/^'[01]+'/)||"0"==r&&e.match(/^b[01]+/)))return"number";if(r.charCodeAt(0)>47&&r.charCodeAt(0)<58)return e.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),u.decimallessFloat&&e.match(/^\.(?!\.)/),"number";if("?"==r&&(e.eatSpace()||e.eol()||e.eat(";")))return"variable-3";if("'"==r||'"'==r&&u.doubleQuote)return t.tokenize=f(r),t.tokenize(e,t);if((u.nCharCast&&("n"==r||"N"==r)||u.charsetCast&&"_"==r&&e.match(/[a-z][a-z0-9]*/i))&&("'"==e.peek()||'"'==e.peek()))return"keyword";if(u.escapeConstant&&("e"==r||"E"==r)&&("'"==e.peek()||'"'==e.peek()&&u.doubleQuote))return t.tokenize=function(e,t){return(t.tokenize=f(e.next(),!0))(e,t)},"keyword";if(u.commentSlashSlash&&"/"==r&&e.eat("/"))return e.skipToEnd(),"comment";if(u.commentHash&&"#"==r||"-"==r&&e.eat("-")&&(!u.commentSpaceRequired||e.eat(" ")))return e.skipToEnd(),"comment";if("/"==r&&e.eat("*"))return t.tokenize=y(1),t.tokenize(e,t);if("."!=r){if(d.test(r))return e.eatWhile(d),"operator";if(h.test(r))return"bracket";if(g.test(r))return e.eatWhile(g),"punctuation";if("{"==r&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";e.eatWhile(/^[_\w\d]/);var i=e.current().toLowerCase();return p.hasOwnProperty(i)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?"number":s.hasOwnProperty(i)?"atom":l.hasOwnProperty(i)?"type":c.hasOwnProperty(i)?"keyword":a.hasOwnProperty(i)?"builtin":null}return u.zerolessFloat&&e.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":e.match(/^\.+/)?null:u.ODBCdotTable&&e.match(/^[\w\d_$#]+/)?"variable-2":void 0}function f(e,t){return function(r,a){for(var n,i=!1;null!=(n=r.next());){if(n==e&&!i){a.tokenize=b;break}i=(_||t)&&!i&&"\\"==n}return"string"}}function y(e){return function(t,r){var a=t.match(/^.*?(\/\*|\*\/)/);return a?"/*"==a[1]?r.tokenize=y(e+1):r.tokenize=e>1?y(e-1):b:t.skipToEnd(),"comment"}}function v(e,t,r){t.context={prev:t.context,indent:e.indentation(),col:e.column(),type:r}}return{startState:function(){return{tokenize:b,context:null}},token:function(e,t){if(e.sol()&&t.context&&null==t.context.align&&(t.context.align=!1),t.tokenize==b&&e.eatSpace())return null;var r=t.tokenize(e,t);if("comment"==r)return r;t.context&&null==t.context.align&&(t.context.align=!0);var a=e.current();return"("==a?v(e,t,")"):"["==a?v(e,t,"]"):t.context&&t.context.type==a&&function(e){e.indent=e.context.indent,e.context=e.context.prev}(t),r},indent:function(r,a){var n=r.context;if(!n)return e.Pass;var i=a.charAt(0)==n.type;return n.align?n.col+(i?0:1):n.indent+(i?0:t.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:u.commentSlashSlash?"//":u.commentHash?"#":"--",closeBrackets:"()[]{}''\"\"``"}}));var n="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";function i(e){for(var t={},r=e.split(" "),a=0;a!=^\&|\/]/,brackets:/^[\{}\(\)]/,punctuation:/^[;.,:/]/,backslashStringEscapes:!1,dateSQL:i("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":r}}),e.defineMIME("text/x-mysql",{name:"sql",client:i("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:i(n+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:i("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":r,"`":t,"\\":a}}),e.defineMIME("text/x-mariadb",{name:"sql",client:i("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:i(n+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:i("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":r,"`":t,"\\":a}}),e.defineMIME("text/x-sqlite",{name:"sql",client:i("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:i(n+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:i("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:i("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:i("date time timestamp datetime"),support:i("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":r,":":r,"?":r,$:r,'"':function(e){for(var t;null!=(t=e.next());)if('"'==t&&!e.eat('"'))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null},"`":t}}),e.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:i("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:i("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:i("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:i("commentSlashSlash decimallessFloat"),hooks:{}}),e.defineMIME("text/x-plsql",{name:"sql",client:i("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:i("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:i("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*\/+\-%<>!=~]/,dateSQL:i("date time timestamp"),support:i("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-hive",{name:"sql",keywords:i("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"),builtin:i("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:i("date timestamp"),support:i("ODBCdotTable doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-pgsql",{name:"sql",client:i("source"),keywords:i(n+"a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"),builtin:i("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:i("false true null unknown"),operatorChars:/^[*\/+\-%<>!=&|^\/#@?~]/,backslashStringEscapes:!1,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant")}),e.defineMIME("text/x-gql",{name:"sql",keywords:i("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:i("false true"),builtin:i("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/}),e.defineMIME("text/x-gpsql",{name:"sql",client:i("source"),keywords:i("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),builtin:i("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),e.defineMIME("text/x-sparksql",{name:"sql",keywords:i("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),builtin:i("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"),atoms:i("false true null"),operatorChars:/^[*\/+\-%<>!=~&|^]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable doubleQuote zerolessFloat")}),e.defineMIME("text/x-esper",{name:"sql",client:i("source"),keywords:i("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),builtin:{},atoms:i("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:i("time"),support:i("decimallessFloat zerolessFloat binaryNumber hexNumber")})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/stex/stex.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/stex/stex.js deleted file mode 100644 index e84573605..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/stex/stex.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";t.defineMode("stex",(function(t,e){function n(t,e){t.cmdState.push(e)}function r(t){return t.cmdState.length>0?t.cmdState[t.cmdState.length-1]:null}function i(t,e,n){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var a={};function c(t,e){t.f=e}function o(t,e){var i;if(t.match(/^\\[a-zA-Z@]+/)){var o=t.current().slice(1);return n(e,i=new(i=a.hasOwnProperty(o)?a[o]:a.DEFAULT)),c(e,f),i.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return c(e,(function(t,e){return u(t,e,"\\]")})),"keyword";if(t.match("\\("))return c(e,(function(t,e){return u(t,e,"\\)")})),"keyword";if(t.match("$$"))return c(e,(function(t,e){return u(t,e,"$$")})),"keyword";if(t.match("$"))return c(e,(function(t,e){return u(t,e,"$")})),"keyword";var m=t.next();return"%"==m?(t.skipToEnd(),"comment"):"}"==m||"]"==m?(i=r(e))?(i.closeBracket(m),c(e,f),"bracket"):"error":"{"==m||"["==m?(n(e,i=new(i=a.DEFAULT)),"bracket"):/\d/.test(m)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),i=function(t){for(var e=t.cmdState,n=e.length-1;n>=0;n--){var r=e[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}(e),"begin"==i.name&&(i.argument=t.current()),i.styleIdentifier())}function u(t,e,n){if(t.eatSpace())return null;if(n&&t.match(n))return c(e,o),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/]/))return"tag";if(t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=t.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(t.skipToEnd(),"comment"):"error"}function f(t,e){var n=t.peek();return"{"==n||"["==n?(r(e).openBracket(n),t.eat(n),c(e,o),"bracket"):/[ \t\r]/.test(n)?(t.eat(n),null):(c(e,o),function(t){var e=t.cmdState.pop();e&&e.closeBracket()}(e),o(t,e))}return a.importmodule=i("importmodule","tag",["string","builtin"]),a.documentclass=i("documentclass","tag",["","atom"]),a.usepackage=i("usepackage","tag",["atom"]),a.begin=i("begin","tag",["atom"]),a.end=i("end","tag",["atom"]),a.label=i("label","tag",["atom"]),a.ref=i("ref","tag",["atom"]),a.eqref=i("eqref","tag",["atom"]),a.cite=i("cite","tag",["atom"]),a.bibitem=i("bibitem","tag",["atom"]),a.Bibitem=i("Bibitem","tag",["atom"]),a.RBibitem=i("RBibitem","tag",["atom"]),a.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:e.inMathMode?function(t,e){return u(t,e)}:o}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=o,t.cmdState.length=0},lineComment:"%"}})),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/stylus/stylus.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/stylus/stylus.js deleted file mode 100644 index c5b292618..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/stylus/stylus.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("stylus",(function(e){for(var p,g,f,k,w=e.indentUnit,y="",v=b(t),x=/^(a|b|i|s|col|em)$/i,z=b(o),q=b(n),j=b(c),$=b(s),C=b(r),B=h(r),L=b(a),P=b(i),E=b(l),_=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,N=h(d),W=b(u),S=new RegExp(/^\-(moz|ms|o|webkit)-/i),U=b(m),A="",M={};y.length|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/),t.context.line.firstWord=A?A[0].replace(/^\s*/,""):"",t.context.line.indent=e.indentation(),p=e.peek(),e.match("//"))return e.skipToEnd(),["comment","comment"];if(e.match("/*"))return t.tokenize=R,R(e,t);if('"'==p||"'"==p)return e.next(),t.tokenize=X(p),t.tokenize(e,t);if("@"==p)return e.next(),e.eatWhile(/[\w\\-]/),["def",e.current()];if("#"==p){if(e.next(),e.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i))return["atom","atom"];if(e.match(/^[a-z][\w-]*/i))return["builtin","hash"]}return e.match(S)?["meta","vendor-prefixes"]:e.match(/^-?[0-9]?\.?[0-9]/)?(e.eatWhile(/[a-z%]/i),["number","unit"]):"!"==p?(e.next(),[e.match(/^(important|optional)/i)?"keyword":"operator","important"]):"."==p&&e.match(/^\.[a-z][\w-]*/i)?["qualifier","qualifier"]:e.match(B)?("("==e.peek()&&(t.tokenize=Y),["property","word"]):e.match(/^[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","mixin"]):e.match(/^(\+|-)[a-z][\w-]*\(/i)?(e.backUp(1),["keyword","block-mixin"]):e.string.match(/^\s*&/)&&e.match(/^[-_]+[a-z][\w-]*/)?["qualifier","qualifier"]:e.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)?(e.backUp(1),["variable-3","reference"]):e.match(/^&{1}\s*$/)?["variable-3","reference"]:e.match(N)?["operator","operator"]:e.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)?e.match(/^(\.|\[)[\w-\'\"\]]+/i,!1)&&!T(e.current())?(e.match("."),["variable-2","variable-name"]):["variable-2","word"]:e.match(_)?["operator",e.current()]:/[:;,{}\[\]\(\)]/.test(p)?(e.next(),[null,p]):(e.next(),[null,null])}function R(e,t){for(var r,i=!1;null!=(r=e.next());){if(i&&"/"==r){t.tokenize=null;break}i="*"==r}return["comment","comment"]}function X(e){return function(t,r){for(var i,a=!1;null!=(i=t.next());){if(i==e&&!a){")"==e&&t.backUp(1);break}a=!a&&"\\"==i}return(i==e||!a&&")"!=e)&&(r.tokenize=null),["string","string"]}}function Y(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=X(")"),[null,"("]}function Z(e,t,r,i){this.type=e,this.indent=t,this.prev=r,this.line=i||{firstWord:"",indent:0}}function F(e,t,r,i){return i=i>=0?i:w,e.context=new Z(r,t.indentation()+i,e.context),r}function H(e,t){var r=e.context.indent-w;return t=t||!1,e.context=e.context.prev,t&&(e.context.indent=r),e.context.type}function I(e,t,r,i){for(var a=i||1;a>0;a--)r.context=r.context.prev;return function(e,t,r){return M[r.context.type](e,t,r)}(e,t,r)}function T(e){return e.toLowerCase()in v}function D(e){return(e=e.toLowerCase())in z||e in E}function G(e){return e.toLowerCase()in W}function J(e){return e.toLowerCase().match(S)}function K(e){var t=e.toLowerCase(),r="variable-2";return T(e)?r="tag":G(e)?r="block-keyword":D(e)?r="property":t in j||t in U?r="atom":"return"==t||t in $?r="keyword":e.match(/^[A-Z]/)&&(r="string"),r}function Q(e,t){return re(t)&&("{"==e||"]"==e||"hash"==e||"qualifier"==e)||"block-mixin"==e}function V(e,t){return"{"==e&&t.match(/^\s*\$?[\w-]+/i,!1)}function ee(e,t){return":"==e&&t.match(/^[a-z-]+/,!1)}function te(e){return e.sol()||e.string.match(new RegExp("^\\s*"+e.current().replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")))}function re(e){return e.eol()||e.match(/^\s*$/,!1)}function ie(e){var t=/^\s*[-_]*[a-z0-9]+[\w-]*/i,r="string"==typeof e?e.match(t):e.string.match(t);return r?r[0].replace(/^\s*/,""):""}return M.block=function(e,t,r){if("comment"==e&&te(t)||","==e&&re(t)||"mixin"==e)return F(r,t,"block",0);if(V(e,t))return F(r,t,"interpolation");if(re(t)&&"]"==e&&!/^\s*(\.|#|:|\[|\*|&)/.test(t.string)&&!T(ie(t)))return F(r,t,"block",0);if(Q(e,t))return F(r,t,"block");if("}"==e&&re(t))return F(r,t,"block",0);if("variable-name"==e)return t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)||G(ie(t))?F(r,t,"variableName"):F(r,t,"variableName",0);if("="==e)return re(t)||G(ie(t))?F(r,t,"block"):F(r,t,"block",0);if("*"==e&&(re(t)||t.match(/\s*(,|\.|#|\[|:|{)/,!1)))return k="tag",F(r,t,"block");if(ee(e,t))return F(r,t,"pseudo");if(/@(font-face|media|supports|(-moz-)?document)/.test(e))return F(r,t,re(t)?"block":"atBlock");if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return F(r,t,"keyframes");if(/@extends?/.test(e))return F(r,t,"extend",0);if(e&&"@"==e.charAt(0))return t.indentation()>0&&D(t.current().slice(1))?(k="variable-2","block"):/(@import|@require|@charset)/.test(e)?F(r,t,"block",0):F(r,t,"block");if("reference"==e&&re(t))return F(r,t,"block");if("("==e)return F(r,t,"parens");if("vendor-prefixes"==e)return F(r,t,"vendorPrefixes");if("word"==e){var i=t.current();if("property"==(k=K(i)))return te(t)?F(r,t,"block",0):(k="atom","block");if("tag"==k){if(/embed|menu|pre|progress|sub|table/.test(i)&&D(ie(t)))return k="atom","block";if(t.string.match(new RegExp("\\[\\s*"+i+"|"+i+"\\s*\\]")))return k="atom","block";if(x.test(i)&&(te(t)&&t.string.match(/=/)||!te(t)&&!t.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!T(ie(t))))return k="variable-2",G(ie(t))?"block":F(r,t,"block",0);if(re(t))return F(r,t,"block")}if("block-keyword"==k)return k="keyword",t.current(/(if|unless)/)&&!te(t)?"block":F(r,t,"block");if("return"==i)return F(r,t,"block",0);if("variable-2"==k&&t.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/))return F(r,t,"block")}return r.context.type},M.parens=function(e,t,r){if("("==e)return F(r,t,"parens");if(")"==e)return"parens"==r.context.prev.type?H(r):t.string.match(/^[a-z][\w-]*\(/i)&&re(t)||G(ie(t))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(ie(t))||!t.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/)&&T(ie(t))?F(r,t,"block"):t.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/)||t.string.match(/^\s*(\(|\)|[0-9])/)||t.string.match(/^\s+[a-z][\w-]*\(/i)||t.string.match(/^\s+[\$-]?[a-z]/i)?F(r,t,"block",0):re(t)?F(r,t,"block"):F(r,t,"block",0);if(e&&"@"==e.charAt(0)&&D(t.current().slice(1))&&(k="variable-2"),"word"==e){var i=t.current();"tag"==(k=K(i))&&x.test(i)&&(k="variable-2"),"property"!=k&&"to"!=i||(k="atom")}return"variable-name"==e?F(r,t,"variableName"):ee(e,t)?F(r,t,"pseudo"):r.context.type},M.vendorPrefixes=function(e,t,r){return"word"==e?(k="property",F(r,t,"block",0)):H(r)},M.pseudo=function(e,t,r){return D(ie(t.string))?I(e,t,r):(t.match(/^[a-z-]+/),k="variable-3",re(t)?F(r,t,"block"):H(r))},M.atBlock=function(e,t,r){if("("==e)return F(r,t,"atBlock_parens");if(Q(e,t))return F(r,t,"block");if(V(e,t))return F(r,t,"interpolation");if("word"==e){var i=t.current().toLowerCase();if("tag"==(k=/^(only|not|and|or)$/.test(i)?"keyword":C.hasOwnProperty(i)?"tag":P.hasOwnProperty(i)?"attribute":L.hasOwnProperty(i)?"property":q.hasOwnProperty(i)?"string-2":K(t.current()))&&re(t))return F(r,t,"block")}return"operator"==e&&/^(not|and|or)$/.test(t.current())&&(k="keyword"),r.context.type},M.atBlock_parens=function(e,t,r){if("{"==e||"}"==e)return r.context.type;if(")"==e)return re(t)?F(r,t,"block"):F(r,t,"atBlock");if("word"==e){var i=t.current().toLowerCase();return k=K(i),/^(max|min)/.test(i)&&(k="property"),"tag"==k&&(k=x.test(i)?"variable-2":"atom"),r.context.type}return M.atBlock(e,t,r)},M.keyframes=function(e,t,r){return"0"==t.indentation()&&("}"==e&&te(t)||"]"==e||"hash"==e||"qualifier"==e||T(t.current()))?I(e,t,r):"{"==e?F(r,t,"keyframes"):"}"==e?te(t)?H(r,!0):F(r,t,"keyframes"):"unit"==e&&/^[0-9]+\%$/.test(t.current())?F(r,t,"keyframes"):"word"==e&&"block-keyword"==(k=K(t.current()))?(k="keyword",F(r,t,"keyframes")):/@(font-face|media|supports|(-moz-)?document)/.test(e)?F(r,t,re(t)?"block":"atBlock"):"mixin"==e?F(r,t,"block",0):r.context.type},M.interpolation=function(e,t,r){return"{"==e&&H(r)&&F(r,t,"block"),"}"==e?t.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||t.string.match(/^\s*[a-z]/i)&&T(ie(t))?F(r,t,"block"):!t.string.match(/^(\{|\s*\&)/)||t.match(/\s*[\w-]/,!1)?F(r,t,"block",0):F(r,t,"block"):"variable-name"==e?F(r,t,"variableName",0):("word"==e&&"tag"==(k=K(t.current()))&&(k="atom"),r.context.type)},M.extend=function(e,t,r){return"["==e||"="==e?"extend":"]"==e?H(r):"word"==e?(k=K(t.current()),"extend"):H(r)},M.variableName=function(e,t,r){return"string"==e||"["==e||"]"==e||t.current().match(/^(\.|\$)/)?(t.current().match(/^\.[\w-]+/i)&&(k="variable-2"),"variableName"):I(e,t,r)},{startState:function(e){return{tokenize:null,state:"block",context:new Z("block",e||0,null)}},token:function(e,t){return!t.tokenize&&e.eatSpace()?null:((g=(t.tokenize||O)(e,t))&&"object"==typeof g&&(f=g[1],g=g[0]),k=g,t.state=M[t.state](f,e,t),k)},indent:function(e,t,r){var i=e.context,a=t&&t.charAt(0),o=i.indent,n=ie(t),l=r.match(/^\s*/)[0].replace(/\t/g,y).length,s=e.context.prev?e.context.prev.line.firstWord:"",c=e.context.prev?e.context.prev.line.indent:l;return i.prev&&("}"==a&&("block"==i.type||"atBlock"==i.type||"keyframes"==i.type)||")"==a&&("parens"==i.type||"atBlock_parens"==i.type)||"{"==a&&"at"==i.type)?o=i.indent-w:/(\})/.test(a)||(/@|\$|\d/.test(a)||/^\{/.test(t)||/^\s*\/(\/|\*)/.test(t)||/^\s*\/\*/.test(s)||/^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(t)||/^(\+|-)?[a-z][\w-]*\(/i.test(t)||/^return/.test(t)||G(n)?o=l:/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(a)||T(n)?o=/\,\s*$/.test(s)?c:/^\s+/.test(r)&&(/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(s)||T(s))?l<=c?c:c+w:l:/,\s*$/.test(r)||!J(n)&&!D(n)||(o=G(s)?l<=c?c:c+w:/^\{/.test(s)?l<=c?l:c+w:J(s)||D(s)?l>=c?c:l:/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(s)||/=\s*$/.test(s)||T(s)||/^\$[\w-\.\[\]\'\"]/.test(s)?c+w:l)),o},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"indent"}}));var t=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","bgsound","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","nobr","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video"],r=["domain","regexp","url-prefix","url"],i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","dynamic-range","video-dynamic-range"],o=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"],n=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],l=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],s=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],c=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","high","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","standard","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around","unset"],d=["in","and","or","not","is not","is a","is","isnt","defined","if unless"],u=["for","if","else","unless","from","to"],m=["null","true","false","href","title","type","not-allowed","readonly","disabled"],p=t.concat(r,i,a,o,n,s,c,l,d,u,m,["@font-face","@keyframes","@media","@viewport","@page","@host","@supports","@block","@css"]);function h(e){return e=e.sort((function(e,t){return t>e})),new RegExp("^(("+e.join(")|(")+"))\\b")}function b(e){for(var t={},r=0;r~^?!".indexOf(x)>-1)return e.next(),"operator";if(":;,.(){}[]".indexOf(x)>-1)return e.next(),e.match(".."),"punctuation";if(h=e.match(/("""|"|')/)){var k=v.bind(null,h[0]);return t.tokenize.push(k),k(e,t)}if(e.match(d)){var y=e.current();return o.hasOwnProperty(y)?"variable-2":i.hasOwnProperty(y)?"atom":n.hasOwnProperty(y)?(r.hasOwnProperty(y)&&(t.prev="define"),"keyword"):"define"==m?"def":"variable"}return e.next(),null}function h(){var e=0;return function(t,n,r){var i=m(t,n,r);if("punctuation"==i)if("("==t.current())++e;else if(")"==t.current()){if(0==e)return t.backUp(1),n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n);--e}return i}}function v(e,t,n){for(var r,i=1==e.length,o=!1;r=t.peek();)if(o){if(t.next(),"("==r)return n.tokenize.push(h()),"string";o=!1}else{if(t.match(e))return n.tokenize.pop(),"string";t.next(),o="\\"==r}return i&&n.tokenize.pop(),"string"}function _(e,t){for(var n;e.match(/^[^/*]+/,!0),n=e.next();)"/"===n&&e.eat("*")?t.tokenize.push(_):"*"===n&&e.eat("/")&&t.tokenize.pop();return"comment"}function x(e,t,n){this.prev=e,this.align=t,this.indented=n}function k(e,t){var n=t.match(/^\s*($|\/[\/\*])/,!1)?null:t.column()+1;e.context=new x(e.context,n,e.indented)}function y(e){e.context&&(e.indented=e.context.indented,e.context=e.context.prev)}e.defineMode("swift",(function(e){return{startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(e,t){var n=t.prev;t.prev=null;var r=(t.tokenize[t.tokenize.length-1]||m)(e,t,n);if(r&&"comment"!=r?t.prev||(t.prev=r):t.prev=n,"punctuation"==r){var i=/[\(\[\{]|([\]\)\}])/.exec(e.current());i&&(i[1]?y:k)(t,e)}return r},indent:function(t,n){var r=t.context;if(!r)return 0;var i=/^[\]\}\)]/.test(n);return null!=r.align?r.align-(i?1:0):r.indented+(i?0:e.indentUnit)},electricInput:/^\s*[\)\}\]]$/,lineComment:"//",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace",closeBrackets:"()[]{}''\"\"``"}})),e.defineMIME("text/x-swift","swift")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/tcl/tcl.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/tcl/tcl.js deleted file mode 100644 index 471473c0f..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/tcl/tcl.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("tcl",(function(){function e(e){for(var r={},t=e.split(" "),n=0;n!?^\/\|]/;function o(e,r,t){return r.tokenize=t,t(e,r)}function a(e,l){var c=l.beforeParams;l.beforeParams=!1;var u,s=e.next();if('"'!=s&&"'"!=s||!l.inParams){if(/[\[\]{}\(\),;\.]/.test(s))return"("==s&&c?l.inParams=!0:")"==s&&(l.inParams=!1),null;if(/\d/.test(s))return e.eatWhile(/[\w\.]/),"number";if("#"==s)return e.eat("*")?o(e,l,i):"#"==s&&e.match(/ *\[ *\[/)?o(e,l,f):(e.skipToEnd(),"comment");if('"'==s)return e.skipTo(/"/),"comment";if("$"==s)return e.eatWhile(/[$_a-z0-9A-Z\.{:]/),e.eatWhile(/}/),l.beforeParams=!0,"builtin";if(n.test(s))return e.eatWhile(n),"comment";e.eatWhile(/[\w\$_{}\xa1-\uffff]/);var d=e.current().toLowerCase();return r&&r.propertyIsEnumerable(d)?"keyword":t&&t.propertyIsEnumerable(d)?(l.beforeParams=!0,"keyword"):null}return o(e,l,(u=s,function(e,r){for(var t,n=!1,o=!1;null!=(t=e.next());){if(t==u&&!n){o=!0;break}n=!n&&"\\"==t}return o&&(r.tokenize=a),"string"}))}function i(e,r){for(var t,n=!1;t=e.next();){if("#"==t&&n){r.tokenize=a;break}n="*"==t}return"comment"}function f(e,r){for(var t,n=0;t=e.next();){if("#"==t&&2==n){r.tokenize=a;break}"]"==t?n++:" "!=t&&(n=0)}return"meta"}return{startState:function(){return{tokenize:a,beforeParams:!1,inParams:!1}},token:function(e,r){return e.eatSpace()?null:r.tokenize(e,r)},lineComment:"#"}})),e.defineMIME("text/x-tcl","tcl")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/textile/textile.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/textile/textile.js deleted file mode 100644 index 61ce6da5d..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/textile/textile.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";var e={addition:"positive",attributes:"attribute",bold:"strong",cite:"keyword",code:"atom",definitionList:"number",deletion:"negative",div:"punctuation",em:"em",footnote:"variable",footCite:"qualifier",header:"header",html:"comment",image:"string",italic:"em",link:"link",linkDefinition:"link",list1:"variable-2",list2:"variable-3",list3:"keyword",notextile:"string-2",pre:"operator",p:"property",quote:"bracket",span:"quote",specialChar:"tag",strong:"strong",sub:"builtin",sup:"builtin",table:"variable-3",tableHeading:"operator"};function n(t,n,r){if("_"===r)return t.eat("_")?i(t,n,"italic",/__/,2):i(t,n,"em",/_/,1);if("*"===r)return t.eat("*")?i(t,n,"bold",/\*\*/,2):i(t,n,"strong",/\*/,1);if("["===r)return t.match(/\d+\]/)&&(n.footCite=!0),a(n);if("("===r&&t.match(/^(r|tm|c)\)/))return l(n,e.specialChar);if("<"===r&&t.match(/(\w+)[^>]+>[^<]+<\/\1>/))return l(n,e.html);if("?"===r&&t.eat("?"))return i(t,n,"cite",/\?\?/,2);if("="===r&&t.eat("="))return i(t,n,"notextile",/==/,2);if("-"===r&&!t.eat("-"))return i(t,n,"deletion",/-/,1);if("+"===r)return i(t,n,"addition",/\+/,1);if("~"===r)return i(t,n,"sub",/~/,1);if("^"===r)return i(t,n,"sup",/\^/,1);if("%"===r)return i(t,n,"span",/%/,1);if("@"===r)return i(t,n,"code",/@/,1);if("!"===r){var o=i(t,n,"image",/(?:\([^\)]+\))?!/,1);return t.match(/^:\S+/),o}return a(n)}function i(t,e,n,i,r){var l=t.pos>r?t.string.charAt(t.pos-r-1):null,o=t.peek();if(e[n]){if((!o||/\W/.test(o))&&l&&/\S/.test(l)){var u=a(e);return e[n]=!1,u}}else(!l||/\W/.test(l))&&o&&/\S/.test(o)&&t.match(new RegExp("^.*\\S"+i.source+"(?:\\W|$)"),!1)&&(e[n]=!0,e.mode=c.attributes);return a(e)}function a(t){var n=r(t);if(n)return n;var i=[];return t.layoutType&&i.push(e[t.layoutType]),i=i.concat(function(t){for(var n=[],i=1;i]+)?>(?:[^<]+<\/\1>)?/,link:/[^"]+":\S/,linkDefinition:/\[[^\s\]]+\]\S+/,list:/(?:#+|\*+)/,notextile:"notextile",para:"p",pre:"pre",table:"table",tableCellAttributes:/[\/\\]\d+/,tableHeading:/\|_\./,tableText:/[^"_\*\[\(\?\+~\^%@|-]+/,text:/[^!"_=\*\[\(<\?\+~\^%@-]+/},attributes:{align:/(?:<>|<|>|=)/,selector:/\([^\(][^\)]+\)/,lang:/\[[^\[\]]+\]/,pad:/(?:\(+|\)+){1,2}/,css:/\{[^\}]+\}/},createRe:function(t){switch(t){case"drawTable":return u.makeRe("^",u.single.drawTable,"$");case"html":return u.makeRe("^",u.single.html,"(?:",u.single.html,")*","$");case"linkDefinition":return u.makeRe("^",u.single.linkDefinition,"$");case"listLayout":return u.makeRe("^",u.single.list,s("allAttributes"),"*\\s+");case"tableCellAttributes":return u.makeRe("^",u.choiceRe(u.single.tableCellAttributes,s("allAttributes")),"+\\.");case"type":return u.makeRe("^",s("allTypes"));case"typeLayout":return u.makeRe("^",s("allTypes"),s("allAttributes"),"*\\.\\.?","(\\s+|$)");case"attributes":return u.makeRe("^",s("allAttributes"),"+");case"allTypes":return u.choiceRe(u.single.div,u.single.foot,u.single.header,u.single.bc,u.single.bq,u.single.notextile,u.single.pre,u.single.table,u.single.para);case"allAttributes":return u.choiceRe(u.attributes.selector,u.attributes.css,u.attributes.lang,u.attributes.align,u.attributes.pad);default:return u.makeRe("^",u.single[t])}},makeRe:function(){for(var t="",e=0;e$/,l=/^$/,m=/^\{\{\{$/,k=/^\}\}\}$/,d=/.*?\}\}\}/;function h(e,t,r){return t.tokenize=r,r(e,t)}function s(t,k){var d=t.sol(),s=t.peek();if(k.block=!1,d&&/[<\/\*{}\-]/.test(s)){if(t.match(m))return k.block=!0,h(t,k,$);if(t.match(u))return"quote";if(t.match(i)||t.match(o))return"comment";if(t.match(a)||t.match(f)||t.match(c)||t.match(l))return"comment";if(t.match(n))return"hr"}if(t.next(),d&&/[\/\*!#;:>|]/.test(s)){if("!"==s)return t.skipToEnd(),"header";if("*"==s)return t.eatWhile("*"),"comment";if("#"==s)return t.eatWhile("#"),"comment";if(";"==s)return t.eatWhile(";"),"comment";if(":"==s)return t.eatWhile(":"),"comment";if(">"==s)return t.eatWhile(">"),"quote";if("|"==s)return"header"}if("{"==s&&t.match("{{"))return h(t,k,$);if(/[hf]/i.test(s)&&/[ti]/i.test(t.peek())&&t.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return"link";if('"'==s)return"string";if("~"==s)return"brace";if(/[\[\]]/.test(s)&&t.match(s))return"brace";if("@"==s)return t.eatWhile(r),"link";if(/\d/.test(s))return t.eatWhile(/\d/),"number";if("/"==s){if(t.eat("%"))return h(t,k,b);if(t.eat("/"))return h(t,k,v)}if("_"==s&&t.eat("_"))return h(t,k,w);if("-"==s&&t.eat("-")){if(" "!=t.peek())return h(t,k,x);if(" "==t.peek())return"brace"}return"'"==s&&t.eat("'")?h(t,k,p):"<"==s&&t.eat("<")?h(t,k,y):(t.eatWhile(/[\w\$_]/),e.propertyIsEnumerable(t.current())?"keyword":null)}function b(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=s;break}n="%"==r}return"comment"}function p(e,t){for(var r,n=!1;r=e.next();){if("'"==r&&n){t.tokenize=s;break}n="'"==r}return"strong"}function $(e,t){var r=t.block;return r&&e.current()?"comment":!r&&e.match(d)||r&&e.sol()&&e.match(k)?(t.tokenize=s,"comment"):(e.next(),"comment")}function v(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=s;break}n="/"==r}return"em"}function w(e,t){for(var r,n=!1;r=e.next();){if("_"==r&&n){t.tokenize=s;break}n="_"==r}return"underlined"}function x(e,t){for(var r,n=!1;r=e.next();){if("-"==r&&n){t.tokenize=s;break}n="-"==r}return"strikethrough"}function y(e,r){if("<<"==e.current())return"macro";var n=e.next();return n?">"==n&&">"==e.peek()?(e.next(),r.tokenize=s,"macro"):(e.eatWhile(/[\w\$_]/),t.propertyIsEnumerable(e.current())?"keyword":null):(r.tokenize=s,null)}return{startState:function(){return{tokenize:s}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}}})),e.defineMIME("text/x-tiddlywiki","tiddlywiki")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/tiki/tiki.css b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/tiki/tiki.css deleted file mode 100644 index 1d8704c78..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/tiki/tiki.css +++ /dev/null @@ -1,26 +0,0 @@ -.cm-tw-syntaxerror { - color: #FFF; - background-color: #900; -} - -.cm-tw-deleted { - text-decoration: line-through; -} - -.cm-tw-header5 { - font-weight: bold; -} -.cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/ - padding-left: 10px; -} - -.cm-tw-box { - border-top-width: 0px !important; - border-style: solid; - border-width: 1px; - border-color: inherit; -} - -.cm-tw-underline { - text-decoration: underline; -} \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/tiki/tiki.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/tiki/tiki.js deleted file mode 100644 index 013d4b3e0..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/tiki/tiki.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("tiki",(function(e){function t(e,t,n){return function(i,o){for(;!i.eol();){if(i.match(t)){o.tokenize=r;break}i.next()}return n&&(o.tokenize=n),e}}function n(e){return function(t,n){for(;!t.eol();)t.next();return n.tokenize=r,e}}function r(e,i){function o(t){return i.tokenize=t,t(e,i)}var a=e.sol(),u=e.next();switch(u){case"{":return e.eat("/"),e.eatSpace(),e.eatWhile(/[^\s\u00a0=\"\'\/?(}]/),i.tokenize=f,"tag";case"_":if(e.eat("_"))return o(t("strong","__",r));break;case"'":if(e.eat("'"))return o(t("em","''",r));break;case"(":if(e.eat("("))return o(t("variable-2","))",r));break;case"[":return o(t("variable-3","]",r));case"|":if(e.eat("|"))return o(t("comment","||"));break;case"-":if(e.eat("="))return o(t("header string","=-",r));if(e.eat("-"))return o(t("error tw-deleted","--",r));break;case"=":if(e.match("=="))return o(t("tw-underline","===",r));break;case":":if(e.eat(":"))return o(t("comment","::"));break;case"^":return o(t("tw-box","^"));case"~":if(e.match("np~"))return o(t("meta","~/np~"))}if(a)switch(u){case"!":return e.match("!!!!!")||e.match("!!!!")||e.match("!!!")||e.match("!!"),o(n("header string"));case"*":case"#":case"+":return o(n("tw-listitem bracket"))}return null}var i,o,a,u,c=e.indentUnit;function f(e,t){var n,i=e.next(),a=e.peek();return"}"==i?(t.tokenize=r,"tag"):"("==i||")"==i?"bracket":"="==i?(o="equals",">"==a&&(e.next(),a=e.peek()),/[\'\"]/.test(a)||(t.tokenize=function(e,t){for(;!e.eol();){var n=e.next(),r=e.peek();if(" "==n||","==n||/[ )}]/.test(r)){t.tokenize=f;break}}return"string"}),"operator"):/[\'\"]/.test(i)?(t.tokenize=(n=i,function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=f;break}return"string"}),t.tokenize(e,t)):(e.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")}function s(){for(var e=arguments.length-1;e>=0;e--)a.cc.push(arguments[e])}function l(){return s.apply(null,arguments),!0}function d(e,t){var n=a.context&&a.context.noIndent;a.context={prev:a.context,pluginName:e,indent:a.indented,startOfLine:t,noIndent:n}}function k(){a.context&&(a.context=a.context.prev)}function p(e){if("openPlugin"==e)return a.pluginName=i,l(m,(n=a.startOfLine,function(e){return"selfclosePlugin"==e||"endPlugin"==e?l():"endPlugin"==e?(d(a.pluginName,n),l()):l()}));if("closePlugin"==e){var t=!1;return a.context?(t=a.context.pluginName!=i,k()):t=!0,t&&(u="error"),l(function(e){return function(t){return e&&(u="error"),"endPlugin"==t?l():s()}}(t))}return"string"==e?(a.context&&"!cdata"==a.context.name||d("!cdata"),a.tokenize==r&&k(),l()):l();var n}function m(e){return"keyword"==e?(u="attribute",l(m)):"equals"==e?l(g,m):s()}function g(e){return"keyword"==e?(u="string",l()):"string"==e?l(x):s()}function x(e){return"string"==e?l(x):s()}return{startState:function(){return{tokenize:r,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(e,t){if(e.sol()&&(t.startOfLine=!0,t.indented=e.indentation()),e.eatSpace())return null;u=o=i=null;var n=t.tokenize(e,t);if((n||o)&&"comment"!=n)for(a=t;!(t.cc.pop()||p)(o||n););return t.startOfLine=!1,u||n},indent:function(e,t){var n=e.context;if(n&&n.noIndent)return 0;for(n&&/^{\//.test(t)&&(n=n.prev);n&&!n.startOfLine;)n=n.prev;return n?n.indent+c:0},electricChars:"/"}})),e.defineMIME("text/tiki","tiki")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/toml/toml.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/toml/toml.js deleted file mode 100644 index 84f1f3066..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/toml/toml.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("toml",(function(){return{startState:function(){return{inString:!1,stringType:"",lhs:!0,inArray:0}},token:function(e,t){if(t.inString||'"'!=e.peek()&&"'"!=e.peek()||(t.stringType=e.peek(),e.next(),t.inString=!0),e.sol()&&0===t.inArray&&(t.lhs=!0),t.inString){for(;t.inString&&!e.eol();)e.peek()===t.stringType?(e.next(),t.inString=!1):"\\"===e.peek()?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return t.lhs?"property string":"string"}return t.inArray&&"]"===e.peek()?(e.next(),t.inArray--,"bracket"):t.lhs&&"["===e.peek()&&e.skipTo("]")?(e.next(),"]"===e.peek()&&e.next(),"atom"):"#"===e.peek()?(e.skipToEnd(),"comment"):e.eatSpace()?null:t.lhs&&e.eatWhile((function(e){return"="!=e&&" "!=e}))?"property":t.lhs&&"="===e.peek()?(e.next(),t.lhs=!1,null):!t.lhs&&e.match(/^\d\d\d\d[\d\-\:\.T]*Z/)?"atom":t.lhs||!e.match("true")&&!e.match("false")?t.lhs||"["!==e.peek()?!t.lhs&&e.match(/^\-?\d+(?:\.\d+)?/)?"number":(e.eatSpace()||e.next(),null):(t.inArray++,e.next(),"bracket"):"atom"}}})),e.defineMIME("text/x-toml","toml")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/tornado/tornado.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/tornado/tornado.js deleted file mode 100644 index bdcd23076..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/tornado/tornado.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/overlay"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("tornado:inner",(function(){var e=["and","as","assert","autoescape","block","break","class","comment","context","continue","datetime","def","del","elif","else","end","escape","except","exec","extends","false","finally","for","from","global","if","import","in","include","is","json_encode","lambda","length","linkify","load","module","none","not","or","pass","print","put","raise","raw","return","self","set","squeeze","super","true","try","url_escape","while","with","without","xhtml_escape","yield"];function t(n,o){n.eatWhile(/[^\{]/);var r,i=n.next();if("{"==i&&(i=n.eat(/\{|%|#/)))return o.tokenize=("{"==(r=i)&&(r="}"),function(n,o){return n.next()==r&&n.eat("}")?(o.tokenize=t,"tag"):n.match(e)?"keyword":"#"==r?"comment":"string"}),"tag"}return e=new RegExp("^(("+e.join(")|(")+"))\\b"),{startState:function(){return{tokenize:t}},token:function(e,t){return t.tokenize(e,t)}}})),e.defineMode("tornado",(function(t){var n=e.getMode(t,"text/html"),o=e.getMode(t,"tornado:inner");return e.overlayMode(n,o)})),e.defineMIME("text/x-tornado","tornado")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/troff/troff.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/troff/troff.js deleted file mode 100644 index 50616c392..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/troff/troff.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";t.defineMode("troff",(function(){var t={};function e(e){if(e.eatSpace())return null;var r=e.sol(),n=e.next();if("\\"===n)return e.match("fB")||e.match("fR")||e.match("fI")||e.match("u")||e.match("d")||e.match("%")||e.match("&")?"string":e.match("m[")?(e.skipTo("]"),e.next(),"string"):e.match("s+")||e.match("s-")?(e.eatWhile(/[\d-]/),"string"):e.match("(")||e.match("*(")?(e.eatWhile(/[\w-]/),"string"):"string";if(r&&("."===n||"'"===n)&&e.eat("\\")&&e.eat('"'))return e.skipToEnd(),"comment";if(r&&"."===n){if(e.match("B ")||e.match("I ")||e.match("R "))return"attribute";if(e.match("TH ")||e.match("SH ")||e.match("SS ")||e.match("HP "))return e.skipToEnd(),"quote";if(e.match(/[A-Z]/)&&e.match(/[A-Z]/)||e.match(/[a-z]/)&&e.match(/[a-z]/))return"attribute"}e.eatWhile(/[\w-]/);var i=e.current();return t.hasOwnProperty(i)?t[i]:null}function r(t,r){return(r.tokens[0]||e)(t,r)}return{startState:function(){return{tokens:[]}},token:function(t,e){return r(t,e)}}})),t.defineMIME("text/troff","troff"),t.defineMIME("text/x-troff","troff"),t.defineMIME("application/x-troff","troff")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ttcn-cfg/ttcn-cfg.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ttcn-cfg/ttcn-cfg.js deleted file mode 100644 index 755408a87..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/ttcn-cfg/ttcn-cfg.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){for(var t={},T=e.split(" "),n=0;n!\/]/;function k(e,t){var r,x=e.next();if('"'==x||"'"==x)return t.tokenize=(r=x,function(e,t){for(var n,i=!1,o=!1;null!=(n=e.next());){if(n==r&&!i){var s=e.peek();s&&("b"!=(s=s.toLowerCase())&&"h"!=s&&"o"!=s||e.next()),o=!0;break}i=!i&&"\\"==n}return(o||!i&&!v)&&(t.tokenize=null),"string"}),t.tokenize(e,t);if(/[\[\]{}\(\),;\\:\?\.]/.test(x))return n=x,"punctuation";if("#"==x)return e.skipToEnd(),"atom preprocessor";if("%"==x)return e.eatWhile(/\b/),"atom ttcn3Macros";if(/\d/.test(x))return e.eatWhile(/[\w\.]/),"number";if("/"==x){if(e.eat("*"))return t.tokenize=O,O(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(g.test(x))return"@"==x&&(e.match("try")||e.match("catch")||e.match("lazy"))?"keyword":(e.eatWhile(g),"operator");e.eatWhile(/[\w\$_\xa1-\uffff]/);var k=e.current();return i.propertyIsEnumerable(k)?"keyword":o.propertyIsEnumerable(k)?"builtin":s.propertyIsEnumerable(k)?"def timerOps":l.propertyIsEnumerable(k)?"def configOps":c.propertyIsEnumerable(k)?"def verdictOps":a.propertyIsEnumerable(k)?"def portOps":p.propertyIsEnumerable(k)?"def sutOps":u.propertyIsEnumerable(k)?"def functionOps":f.propertyIsEnumerable(k)?"string verdictConsts":d.propertyIsEnumerable(k)?"string booleanConsts":m.propertyIsEnumerable(k)?"string otherConsts":b.propertyIsEnumerable(k)?"builtin types":h.propertyIsEnumerable(k)?"builtin visibilityModifiers":y.propertyIsEnumerable(k)?"atom templateMatch":"variable"}function O(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function E(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function w(e,t,n){var r=e.indented;return e.context&&"statement"==e.context.type&&(r=e.context.indented),e.context=new E(r,t,n,null,e.context)}function C(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}return{startState:function(e){return{tokenize:null,context:new E((e||0)-r,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var r=t.context;if(e.sol()&&(null==r.align&&(r.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return null;n=null;var i=(t.tokenize||k)(e,t);if("comment"==i)return i;if(null==r.align&&(r.align=!0),";"!=n&&":"!=n&&","!=n||"statement"!=r.type)if("{"==n)w(t,e.column(),"}");else if("["==n)w(t,e.column(),"]");else if("("==n)w(t,e.column(),")");else if("}"==n){for(;"statement"==r.type;)r=C(t);for("}"==r.type&&(r=C(t));"statement"==r.type;)r=C(t)}else n==r.type?C(t):x&&(("}"==r.type||"top"==r.type)&&";"!=n||"statement"==r.type&&"newstatement"==n)&&w(t,e.column(),"statement");else C(t);return t.startOfLine=!1,i},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}})),function(t,n){"string"==typeof t&&(t=[t]);var r=[];function i(e){if(e)for(var t in e)e.hasOwnProperty(t)&&r.push(t)}i(n.keywords),i(n.builtin),i(n.timerOps),i(n.portOps),r.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],r));for(var o=0;o=&|]/;function c(t,n){var o,l=t.next();if(e=null,"<"!=l||t.match(/^[\s\u00a0=]/,!1)){if('"'==l||"'"==l)return n.tokenize=(o=l,function(t,e){for(var n,r=!1;null!=(n=t.next());){if(n==o&&!r){e.tokenize=c;break}r=!r&&"\\"==n}return"string"}),n.tokenize(t,n);if(/[{}\(\),\.;\[\]]/.test(l))return e=l,null;if("#"==l)return t.skipToEnd(),"comment";if(i.test(l))return t.eatWhile(i),null;if(":"==l)return"operator";if(t.eatWhile(/[_\w\d]/),":"==t.peek())return"variable-3";var u=t.current();return r.test(u)?"meta":l>="A"&&l<="Z"?"comment":"keyword"}return t.match(/^[^\s\u00a0>]*>?/),"atom"}function l(t,e,n){t.context={prev:t.context,indent:t.indent,col:n,type:e}}function u(t){t.indent=t.context.indent,t.context=t.context.prev}return{startState:function(){return{tokenize:c,context:null,indent:0,col:0}},token:function(t,n){if(t.sol()&&(n.context&&null==n.context.align&&(n.context.align=!1),n.indent=t.indentation()),t.eatSpace())return null;var o=n.tokenize(t,n);if("comment"!=o&&n.context&&null==n.context.align&&"pattern"!=n.context.type&&(n.context.align=!0),"("==e)l(n,")",t.column());else if("["==e)l(n,"]",t.column());else if("{"==e)l(n,"}",t.column());else if(/[\]\}\)]/.test(e)){for(;n.context&&"pattern"==n.context.type;)u(n);n.context&&e==n.context.type&&u(n)}else"."==e&&n.context&&"pattern"==n.context.type?u(n):/atom|string|variable/.test(o)&&n.context&&(/[\}\]]/.test(n.context.type)?l(n,"pattern",t.column()):"pattern"!=n.context.type||n.context.align||(n.context.align=!0,n.context.col=t.column()));return o},indent:function(t,e){var o=e&&e.charAt(0),r=t.context;if(/[\]\}]/.test(o))for(;r&&"pattern"==r.type;)r=r.prev;var i=r&&o==r.type;return r?"pattern"==r.type?r.col:r.align?r.col+(i?0:1):r.indent+(i?0:n):0},lineComment:"#"}})),t.defineMIME("text/turtle","turtle")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/twig/twig.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/twig/twig.js deleted file mode 100644 index 6eaed98a8..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/twig/twig.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../../addon/mode/multiplex")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../addon/mode/multiplex"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("twig:inner",(function(){var e=["and","as","autoescape","endautoescape","block","do","endblock","else","elseif","extends","for","endfor","embed","endembed","filter","endfilter","flush","from","if","endif","in","is","include","import","not","or","set","spaceless","endspaceless","with","endwith","trans","endtrans","blocktrans","endblocktrans","macro","endmacro","use","verbatim","endverbatim"],t=/^[+\-*&%=<>!?|~^]/,n=/^[:\[\(\{]/,i=["true","false","null","empty","defined","divisibleby","divisible by","even","odd","iterable","sameas","same as"],r=/^(\d[+\-\*\/])?\d+(\.\d+)?/;return e=new RegExp("(("+e.join(")|(")+"))\\b"),i=new RegExp("(("+i.join(")|(")+"))\\b"),{startState:function(){return{}},token:function(o,a){return function(o,a){var d=o.peek();if(a.incomment)return o.skipTo("#}")?(o.eatWhile(/\#|}/),a.incomment=!1):o.skipToEnd(),"comment";if(a.intag){if(a.operator){if(a.operator=!1,o.match(i))return"atom";if(o.match(r))return"number"}if(a.sign){if(a.sign=!1,o.match(i))return"atom";if(o.match(r))return"number"}if(a.instring)return d==a.instring&&(a.instring=!1),o.next(),"string";if("'"==d||'"'==d)return a.instring=d,o.next(),"string";if(o.match(a.intag+"}")||o.eat("-")&&o.match(a.intag+"}"))return a.intag=!1,"tag";if(o.match(t))return a.operator=!0,"operator";if(o.match(n))a.sign=!0;else if(o.eat(" ")||o.sol()){if(o.match(e))return"keyword";if(o.match(i))return"atom";if(o.match(r))return"number";o.sol()&&o.next()}else o.next();return"variable"}if(o.eat("{")){if(o.eat("#"))return a.incomment=!0,o.skipTo("#}")?(o.eatWhile(/\#|}/),a.incomment=!1):o.skipToEnd(),"comment";if(d=o.eat(/\{|%/))return a.intag=d,"{"==d&&(a.intag="}"),o.eat("-"),"tag"}o.next()}(o,a)}}})),e.defineMode("twig",(function(t,n){var i=e.getMode(t,"twig:inner");return n&&n.base?e.multiplexingMode(e.getMode(t,n.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:i,parseDelimiters:!0}):i})),e.defineMIME("text/x-twig","twig")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/vb/vb.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/vb/vb.js deleted file mode 100644 index f4c1fcc1c..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/vb/vb.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("vb",(function(t,n){var r="error";function i(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var o=new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"),a=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),c=new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),d=new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),u=new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),s=new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),l=["class","module","sub","enum","select","while","if","function","get","set","property","try","structure","synclock","using","with"],m=["else","elseif","case","catch","finally"],f=["next","loop"],h=["and","andalso","or","orelse","xor","in","not","is","isnot","like"],p=i(h),b=["#const","#else","#elseif","#end","#if","#region","addhandler","addressof","alias","as","byref","byval","cbool","cbyte","cchar","cdate","cdbl","cdec","cint","clng","cobj","compare","const","continue","csbyte","cshort","csng","cstr","cuint","culng","cushort","declare","default","delegate","dim","directcast","each","erase","error","event","exit","explicit","false","for","friend","gettype","goto","handles","implements","imports","infer","inherits","interface","isfalse","istrue","lib","me","mod","mustinherit","mustoverride","my","mybase","myclass","namespace","narrowing","new","nothing","notinheritable","notoverridable","of","off","on","operator","option","optional","out","overloads","overridable","overrides","paramarray","partial","private","protected","public","raiseevent","readonly","redim","removehandler","resume","return","shadows","shared","static","step","stop","strict","then","throw","to","true","trycast","typeof","until","until","when","widening","withevents","writeonly"],g=["object","boolean","char","string","byte","sbyte","short","ushort","int16","uint16","integer","uinteger","int32","uint32","long","ulong","int64","uint64","decimal","single","double","float","date","datetime","intptr","uintptr"],y=i(b),v=i(g),w=i(l),x=i(m),k=i(f),I=i(["end"]),E=i(["do"]);function L(e,t){t.currentIndent++}function z(e,t){t.currentIndent--}function C(e,t){if(e.eatSpace())return null;var i,l,m;if("'"===e.peek())return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var f=!1;if((e.match(/^\d*\.\d+F?/i)||e.match(/^\d+\.\d*F?/)||e.match(/^\.\d+F?/))&&(f=!0),f)return e.eat(/J/i),"number";var h=!1;if(e.match(/^&H[0-9a-f]+/i)||e.match(/^&O[0-7]+/i)?h=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),h=!0):e.match(/^0(?![\dx])/i)&&(h=!0),h)return e.eat(/L/i),"number"}return e.match('"')?(t.tokenize=(i=e.current(),l=1==i.length,m="string",function(e,t){for(;!e.eol();){if(e.eatWhile(/[^'"]/),e.match(i))return t.tokenize=C,m;e.eat(/['"]/)}if(l){if(n.singleLineStringErrors)return r;t.tokenize=C}return m}),t.tokenize(e,t)):e.match(u)||e.match(d)?null:e.match(c)||e.match(o)||e.match(p)?"operator":e.match(a)?null:e.match(E)?(L(0,t),t.doInCurrentLine=!0,"keyword"):e.match(w)?(t.doInCurrentLine?t.doInCurrentLine=!1:L(0,t),"keyword"):e.match(x)?"keyword":e.match(I)?(z(0,t),z(0,t),"keyword"):e.match(k)?(z(0,t),"keyword"):e.match(v)||e.match(y)?"keyword":e.match(s)?"variable":(e.next(),r)}return e.registerHelper("hintWords","vb",l.concat(m).concat(f).concat(h).concat(b).concat(g)),{electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:C,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(e,t){e.sol()&&(t.currentIndent+=t.nextLineIndent,t.nextLineIndent=0,t.doInCurrentLine=0);var n=function(e,t){var n=t.tokenize(e,t),i=e.current();if("."===i)return"variable"===(n=t.tokenize(e,t))?"variable":r;var o="[({".indexOf(i);return-1!==o&&L(0,t),-1!==(o="])}".indexOf(i))&&z(0,t)?r:n}(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(e,n){var r=n.replace(/^\s+|\s+$/g,"");return r.match(k)||r.match(I)||r.match(x)?t.indentUnit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*t.indentUnit},lineComment:"'"}})),e.defineMIME("text/x-vb","vb")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/vbscript/vbscript.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/vbscript/vbscript.js deleted file mode 100644 index 26251a363..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/vbscript/vbscript.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("vbscript",(function(e,t){var r="error";function n(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")}var a=new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"),i=new RegExp("^((<>)|(<=)|(>=))"),o=new RegExp("^[\\.,]"),c=new RegExp("^[\\(\\)]"),b=new RegExp("^[A-Za-z][_A-Za-z0-9]*"),s=n(["and","or","not","xor","is","mod","eqv","imp"]),l=["WScript","err","debug","RegExp"],u=["clear","execute","raise","replace","test","write","writeline","close","open","state","eof","update","addnew","end","createobject","quit"].concat(["description","firstindex","global","helpcontext","helpfile","ignorecase","length","number","pattern","source","value","count"]);l=l.concat(["vbBlack","vbRed","vbGreen","vbYellow","vbBlue","vbMagenta","vbCyan","vbWhite","vbBinaryCompare","vbTextCompare","vbSunday","vbMonday","vbTuesday","vbWednesday","vbThursday","vbFriday","vbSaturday","vbUseSystemDayOfWeek","vbFirstJan1","vbFirstFourDays","vbFirstFullWeek","vbGeneralDate","vbLongDate","vbShortDate","vbLongTime","vbShortTime","vbObjectError","vbOKOnly","vbOKCancel","vbAbortRetryIgnore","vbYesNoCancel","vbYesNo","vbRetryCancel","vbCritical","vbQuestion","vbExclamation","vbInformation","vbDefaultButton1","vbDefaultButton2","vbDefaultButton3","vbDefaultButton4","vbApplicationModal","vbSystemModal","vbOK","vbCancel","vbAbort","vbRetry","vbIgnore","vbYes","vbNo","vbCr","VbCrLf","vbFormFeed","vbLf","vbNewLine","vbNullChar","vbNullString","vbTab","vbVerticalTab","vbUseDefault","vbTrue","vbFalse","vbEmpty","vbNull","vbInteger","vbLong","vbSingle","vbDouble","vbCurrency","vbDate","vbString","vbObject","vbError","vbBoolean","vbVariant","vbDataObject","vbDecimal","vbByte","vbArray"]),e.isASP&&(l=l.concat(["server","response","request","session","application"]),u=u.concat(["addheader","appendtolog","binarywrite","end","flush","redirect","binaryread","remove","removeall","lock","unlock","abandon","getlasterror","htmlencode","mappath","transfer","urlencode"],["buffer","cachecontrol","charset","contenttype","expires","expiresabsolute","isclientconnected","pics","status","clientcertificate","cookies","form","querystring","servervariables","totalbytes","contents","staticobjects","codepage","lcid","sessionid","timeout","scripttimeout"]));var d=n(["dim","redim","then","until","randomize","byval","byref","new","property","exit","in","const","private","public","get","set","let","stop","on error resume next","on error goto 0","option explicit","call","me"]),v=n(["true","false","nothing","empty","null"]),m=n(["abs","array","asc","atn","cbool","cbyte","ccur","cdate","cdbl","chr","cint","clng","cos","csng","cstr","date","dateadd","datediff","datepart","dateserial","datevalue","day","escape","eval","execute","exp","filter","formatcurrency","formatdatetime","formatnumber","formatpercent","getlocale","getobject","getref","hex","hour","inputbox","instr","instrrev","int","fix","isarray","isdate","isempty","isnull","isnumeric","isobject","join","lbound","lcase","left","len","loadpicture","log","ltrim","rtrim","trim","maths","mid","minute","month","monthname","msgbox","now","oct","replace","rgb","right","rnd","round","scriptengine","scriptenginebuildversion","scriptenginemajorversion","scriptengineminorversion","second","setlocale","sgn","sin","space","split","sqr","strcomp","string","strreverse","tan","time","timer","timeserial","timevalue","typename","ubound","ucase","unescape","vartype","weekday","weekdayname","year"]),p=n(l),f=n(u),h=n(["class","sub","select","while","if","function","property","with","for"]),y=n(["else","elseif","case"]),g=n(["next","loop","wend"]),x=n(["end"]),k=n(["do"]),w=n(["on error resume next","exit"]),I=n(["rem"]);function C(e,t){t.currentIndent++}function L(e,t){t.currentIndent--}function E(e,n){if(e.eatSpace())return"space";var l,u,D;if("'"===e.peek())return e.skipToEnd(),"comment";if(e.match(I))return e.skipToEnd(),"comment";if(e.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!e.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var S=!1;if((e.match(/^\d*\.\d+/i)||e.match(/^\d+\.\d*/)||e.match(/^\.\d+/))&&(S=!0),S)return e.eat(/J/i),"number";var T=!1;if(e.match(/^&H[0-9a-f]+/i)||e.match(/^&O[0-7]+/i)?T=!0:e.match(/^[1-9]\d*F?/)?(e.eat(/J/i),T=!0):e.match(/^0(?![\dx])/i)&&(T=!0),T)return e.eat(/L/i),"number"}return e.match('"')?(n.tokenize=(l=e.current(),u=1==l.length,D="string",function(e,n){for(;!e.eol();){if(e.eatWhile(/[^'"]/),e.match(l))return n.tokenize=E,D;e.eat(/['"]/)}if(u){if(t.singleLineStringErrors)return r;n.tokenize=E}return D}),n.tokenize(e,n)):e.match(i)||e.match(a)||e.match(s)?"operator":e.match(o)?null:e.match(c)?"bracket":e.match(w)?(n.doInCurrentLine=!0,"keyword"):e.match(k)?(C(0,n),n.doInCurrentLine=!0,"keyword"):e.match(h)?(n.doInCurrentLine?n.doInCurrentLine=!1:C(0,n),"keyword"):e.match(y)?"keyword":e.match(x)?(L(0,n),L(0,n),"keyword"):e.match(g)?(n.doInCurrentLine?n.doInCurrentLine=!1:L(0,n),"keyword"):e.match(d)?"keyword":e.match(v)?"atom":e.match(f)?"variable-2":e.match(m)?"builtin":e.match(p)?"variable-2":e.match(b)?"variable":(e.next(),r)}return{electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:E,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1,ignoreKeyword:!1}},token:function(e,t){e.sol()&&(t.currentIndent+=t.nextLineIndent,t.nextLineIndent=0,t.doInCurrentLine=0);var n=function(e,t){var n=t.tokenize(e,t),a=e.current();return"."===a?(n=t.tokenize(e,t),a=e.current(),!n||"variable"!==n.substr(0,8)&&"builtin"!==n&&"keyword"!==n?r:("builtin"!==n&&"keyword"!==n||(n="variable"),u.indexOf(a.substr(1))>-1&&(n="variable-2"),n)):n}(e,t);return t.lastToken={style:n,content:e.current()},"space"===n&&(n=null),n},indent:function(t,r){var n=r.replace(/^\s+|\s+$/g,"");return n.match(g)||n.match(x)||n.match(y)?e.indentUnit*(t.currentIndent-1):t.currentIndent<0?0:t.currentIndent*e.indentUnit}}})),e.defineMIME("text/vbscript","vbscript")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/velocity/velocity.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/velocity/velocity.js deleted file mode 100644 index a7f1bdecd..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/velocity/velocity.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("velocity",(function(){function e(e){for(var t={},n=e.split(" "),r=0;r!?:\/|]/;function a(e,t,n){return t.tokenize=n,n(e,t)}function o(e,o){var f=o.beforeParams;o.beforeParams=!1;var c=e.next();if("'"==c&&!o.inString&&o.inParams)return o.lastTokenWasBuiltin=!1,a(e,o,s(c));if('"'!=c){if(/[\[\]{}\(\),;\.]/.test(c))return"("==c&&f?o.inParams=!0:")"==c&&(o.inParams=!1,o.lastTokenWasBuiltin=!0),null;if(/\d/.test(c))return o.lastTokenWasBuiltin=!1,e.eatWhile(/[\w\.]/),"number";if("#"==c&&e.eat("*"))return o.lastTokenWasBuiltin=!1,a(e,o,l);if("#"==c&&e.match(/ *\[ *\[/))return o.lastTokenWasBuiltin=!1,a(e,o,u);if("#"==c&&e.eat("#"))return o.lastTokenWasBuiltin=!1,e.skipToEnd(),"comment";if("$"==c)return e.eat("!"),e.eatWhile(/[\w\d\$_\.{}-]/),r&&r.propertyIsEnumerable(e.current())?"keyword":(o.lastTokenWasBuiltin=!0,o.beforeParams=!0,"builtin");if(i.test(c))return o.lastTokenWasBuiltin=!1,e.eatWhile(i),"operator";e.eatWhile(/[\w\$_{}@]/);var k=e.current();return t&&t.propertyIsEnumerable(k)?"keyword":n&&n.propertyIsEnumerable(k)||e.current().match(/^#@?[a-z0-9_]+ *$/i)&&"("==e.peek()&&(!n||!n.propertyIsEnumerable(k.toLowerCase()))?(o.beforeParams=!0,o.lastTokenWasBuiltin=!1,"keyword"):o.inString?(o.lastTokenWasBuiltin=!1,"string"):e.pos>k.length&&"."==e.string.charAt(e.pos-k.length-1)&&o.lastTokenWasBuiltin?"builtin":(o.lastTokenWasBuiltin=!1,null)}return o.lastTokenWasBuiltin=!1,o.inString?(o.inString=!1,"string"):o.inParams?a(e,o,s(c)):void 0}function s(e){return function(t,n){for(var r,i=!1,a=!1;null!=(r=t.next());){if(r==e&&!i){a=!0;break}if('"'==e&&"$"==t.peek()&&!i){n.inString=!0,a=!0;break}i=!i&&"\\"==r}return a&&(n.tokenize=o),"string"}}function l(e,t){for(var n,r=!1;n=e.next();){if("#"==n&&r){t.tokenize=o;break}r="*"==n}return"comment"}function u(e,t){for(var n,r=0;n=e.next();){if("#"==n&&2==r){t.tokenize=o;break}"]"==n?r++:" "!=n&&(r=0)}return"meta"}return{startState:function(){return{tokenize:o,beforeParams:!1,inParams:!1,inString:!1,lastTokenWasBuiltin:!1}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},blockCommentStart:"#*",blockCommentEnd:"*#",lineComment:"##",fold:"velocity"}})),e.defineMIME("text/velocity","velocity")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/verilog/verilog.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/verilog/verilog.js deleted file mode 100644 index 356021fdb..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/verilog/verilog.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("verilog",(function(t,n){var i=t.indentUnit,r=n.statementIndentUnit||i,a=n.dontAlignCalls,o=n.compilerDirectivesUseRegularIndentation,l=n.noIndentKeywords||[],s=n.multiLineStrings,c=n.hooks||{};function d(e){for(var t={},n=e.split(" "),i=0;i]/,v=/[\[\]{}()]/,g=/\d[0-9_]*/,h=/\d*\s*'s?d\s*\d[0-9_]*/i,y=/\d*\s*'s?b\s*[xz01][xz01_]*/i,k=/\d*\s*'s?o\s*[xz0-7][xz0-7_]*/i,b=/\d*\s*'s?h\s*[0-9a-fxz?][0-9a-fxz?_]*/i,w=/(\d[\d_]*(\.\d[\d_]*)?E-?[\d_]+)|(\d[\d_]*\.\d[\d_]*)/i,_=/^((`?\w+)|[)}\]])/,x=/[)}\]]/,I=new RegExp("^(`(?:ifdef|ifndef|elsif|else|endif|undef|undefineall|define|include|begin_keywords|celldefine|default|nettype|end_keywords|endcelldefine|line|nounconnected_drive|pragma|resetall|timescale|unconnected_drive))\\b"),z=/^(`(?:ifdef|ifndef|elsif|else))\b/,C=/^(`(?:elsif|else|endif))\b/,S=d("case checker class clocking config function generate interface module package primitive program property specify sequence table task"),j={};for(var E in S)j[E]="end"+E;for(var M in j.begin="end",j.casex="endcase",j.casez="endcase",j.do="while",j.fork="join;join_any;join_none",j.covergroup="endgroup",j.macro_begin="macro_end",l)E=l[M],j[E]&&(j[E]=void 0);var $=d("always always_comb always_ff always_latch assert assign assume else export for foreach forever if import initial repeat while extern typedef");function q(e,t){var n,i,r=e.peek();if(c[r]&&0!=(n=c[r](e,t)))return n;if(c.tokenBase&&0!=(n=c.tokenBase(e,t)))return n;if(/[,;:\.]/.test(r))return f=e.next(),null;if(v.test(r))return f=e.next(),"bracket";if("`"==r){if(e.next(),e.eatWhile(/[\w\$_]/)){var a=e.current();if(u=a,a.startsWith("`uvm_")&&a.endsWith("_begin")){var o=u.substr(0,u.length-5)+"end";j[a]=o,f="newblock"}else{e.eatSpace(),"("==e.peek()&&(f="newmacro");var l=e.current();e.backUp(l.length-a.length)}return"def"}return null}if("$"==r)return e.next(),e.eatWhile(/[\w\$_]/)?"meta":null;if("#"==r)return e.next(),e.eatWhile(/[\d_.]/),"def";if("@"==r)return e.next(),e.eatWhile(/[@]/),"def";if('"'==r)return e.next(),t.tokenize=(i=r,function(e,t){for(var n,r=!1,a=!1;null!=(n=e.next());){if(n==i&&!r){a=!0;break}r=!r&&"\\"==n}return(a||!r&&!s)&&(t.tokenize=q),"string"}),t.tokenize(e,t);if("/"==r){if(e.next(),e.eat("*"))return t.tokenize=A,A(e,t);if(e.eat("/"))return e.skipToEnd(),"comment";e.backUp(1)}return e.match(w)||e.match(h)||e.match(y)||e.match(k)||e.match(b)||e.match(g)||e.match(w)?"number":e.eatWhile(p)?(f=e.current(),"meta"):e.eatWhile(/[\w\$_]/)?(a=e.current(),m[a]?(j[a]&&(f="newblock","fork"===a&&(e.eatSpace(),";"==e.peek()&&(f="newstatement"),e.backUp(e.current().length-a.length))),$[a]&&(f="newstatement"),u=a,"keyword"):"variable"):(e.next(),null)}function A(e,t){for(var n,i=!1;n=e.next();){if("/"==n&&i){t.tokenize=q;break}i="*"==n}return"comment"}function B(e,t,n,i,r,a){this.indented=e,this.column=t,this.type=n,this.scopekind=i,this.align=r,this.prev=a}function W(e,t,n,i){var r=new B(e.indented,t,n,i||"",null,e.context);return e.context=r}function U(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function D(e,t){if(e==t)return!0;var n=t.split(";");for(var i in n)if(e==n[i])return!0;return!1}function L(e,t){return null!=e&&(e.scopekind===t||L(e.prev,t))}return{electricInput:function(){var e=[];for(var t in j)if(j[t]){var n=j[t].split(";");for(var i in n)e.push(n[i])}return new RegExp("[{}()\\[\\]]|("+e.join("|")+")$")}(),startState:function(e){var t={tokenize:null,context:new B((e||0)-i,0,"top","top",!1),indented:0,compilerDirectiveIndented:0,startOfLine:!0};return c.startState&&c.startState(t),t},token:function(e,t){var n,i=t.context;if(e.sol()&&(null==i.align&&(i.align=!1),t.indented=e.indentation(),t.startOfLine=!0),c.token&&void 0!==(n=c.token(e,t)))return n;if(e.eatSpace())return null;if(f=null,u=null,"comment"==(n=(t.tokenize||q)(e,t))||"meta"==n||"variable"==n)return"="!==f&&"<="!==f||L(i,"assignment")||(W(t,e.column()+f.length,"assignment","assignment"),null==i.align&&(i.align=!0)),n;null==i.align&&(i.align=!0);var a="assignment"==i.type&&x.test(f)&&i.prev&&i.prev.type===f;if(f==i.type||a){if(a&&(i=U(t)),i=U(t),")"==f){if(i&&"macro"===i.type)for(i=U(t);i&&("statement"==i.type||"assignment"==i.type);)i=U(t)}else if("}"==f&&i&&"statement"===i.type)for(;i&&"statement"==i.type;)i=U(t)}else if((";"==f||","==f)&&("statement"==i.type||"assignment"==i.type)||i.type&&D(u,i.type))for(i=U(t);i&&("statement"==i.type||"assignment"==i.type);)i=U(t);else if("{"==f)W(t,e.column(),"}");else if("["==f)W(t,e.column(),"]");else if("("==f)W(t,e.column(),")");else if(i&&"endcase"==i.type&&":"==f)W(t,e.column(),"statement","case");else if("newstatement"==f)W(t,e.column(),"statement",u);else if("newblock"==f){if("function"!=u||!i||"statement"!=i.type&&"endgroup"!=i.type)if("task"==u&&i&&"statement"==i.type);else if("class"==u&&i&&"statement"==i.type);else{var o=j[u];W(t,e.column(),o,u)}}else("newmacro"==f||u&&u.match(I))&&("newmacro"==f&&W(t,e.column(),"macro","macro"),u.match(C)&&(t.compilerDirectiveIndented-=r),u.match(z)&&(t.compilerDirectiveIndented+=r));return t.startOfLine=!1,n},indent:function(t,n){if(t.tokenize!=q&&null!=t.tokenize)return e.Pass;if(c.indent){var l=c.indent(t);if(l>=0)return l}var s=t.context,d=n&&n.charAt(0);"statement"==s.type&&"}"==d&&(s=s.prev);var f=!1,u=n.match(_);return u&&(f=D(u[0],s.type)),!o&&n.match(I)?n.match(C)?t.compilerDirectiveIndented-r:t.compilerDirectiveIndented:"statement"==s.type?s.indented+("{"==d?0:r):!x.test(s.type)&&"assignment"!=s.type||!s.align||a?")"!=s.type||f?s.indented+(f?0:i):s.indented+r:s.column+(f?0:1)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"indent"}})),e.defineMIME("text/x-verilog",{name:"verilog"}),e.defineMIME("text/x-systemverilog",{name:"verilog"});var t={"|":"link",">":"property",$:"variable",$$:"variable","?$":"qualifier","?*":"qualifier","-":"hr","/":"property","/-":"property","@":"variable-3","@-":"variable-3","@++":"variable-3","@+=":"variable-3","@+=-":"variable-3","@--":"variable-3","@-=":"variable-3","%+":"tag","%-":"tag","%":"tag",">>":"tag","<<":"tag","<>":"tag","#":"tag","^":"attribute","^^":"attribute","^!":"attribute","*":"variable-2","**":"variable-2","\\":"keyword",'"':"comment"},n={"/":"beh-hier",">":"beh-hier","-":"phys-hier","|":"pipe","?":"when","@":"stage","\\":"keyword"},i=/^([~!@#\$%\^&\*-\+=\?\/\\\|'"<>]+)([\d\w_]*)/,r=/^[! ] /,a=/^[! ] */,o=/^\/[\/\*]/;function l(e,t,n){var i=t/3;return"tlv-"+e.tlvIndentationStyle[i]+"-"+n}e.defineMIME("text/x-tlv",{name:"verilog",hooks:{electricInput:!1,token:function(e,s){var c=void 0;if(e.sol()&&!s.tlvInBlockComment){"\\"==e.peek()&&(c="def",e.skipToEnd(),e.string.match(/\\SV/)?s.tlvCodeActive=!1:e.string.match(/\\TLV/)&&(s.tlvCodeActive=!0)),s.tlvCodeActive&&0==e.pos&&0==s.indented&&(g=e.match(a,!1))&&(s.indented=g[0].length);var d=s.indented,f=d/3;if(f<=s.tlvIndentationStyle.length){var u=e.string.length==d,m=3*f;if(m0||(s.tlvIndentationStyle[f]=n[v],f++))}if(!u)for(;s.tlvIndentationStyle.length>f;)s.tlvIndentationStyle.pop()}s.tlvNextIndent=d}if(s.tlvCodeActive){var g;if(void 0!==c)c+=" "+l(s,0,"scope-ident");else if(e.pos/30}(e)&&(c+=" "+l(s,e.pos,"before-scope-ident"));else if(s.tlvInBlockComment)e.match(/^.*?\*\//)?s.tlvInBlockComment=!1:e.skipToEnd(),c="comment";else if((g=e.match(o))&&!s.tlvInBlockComment)"//"==g[0]?e.skipToEnd():s.tlvInBlockComment=!0,c="comment";else if(g=e.match(i)){var h=g[1],y=g[2];t.hasOwnProperty(h)&&(y.length>0||e.eol())?(c=t[h],e.column()==s.indented&&(c+=" "+l(s,e.column(),"scope-ident"))):(e.backUp(e.current().length-1),c="tlv-default")}else e.match(/^\t+/)?c="tlv-tab":e.match(/^[\[\]{}\(\);\:]+/)?c="meta":(g=e.match(/^[mM]4([\+_])?[\w\d_]*/))?c="+"==g[1]?"tlv-m4-plus":"tlv-m4":e.match(/^ +/)?c=e.eol()?"error":"tlv-default":e.match(/^[\w\d_]+/)?c="number":(e.next(),c="tlv-default")}else e.match(/^[mM]4([\w\d_]*)/)&&(c="tlv-m4");return c},indent:function(e){return 1==e.tlvCodeActive?e.tlvNextIndent:-1},startState:function(e){e.tlvIndentationStyle=[],e.tlvCodeActive=!0,e.tlvNextIndent=-1,e.tlvInBlockComment=!1}}})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/vhdl/vhdl.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/vhdl/vhdl.js deleted file mode 100644 index 28e7aa461..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/vhdl/vhdl.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){for(var t={},n=e.split(","),r=0;r!\?@#$%&|:\.]+)/,token:"variable-2"},{regex:/"(?:[^"\\\x00-\x1f\x7f]|\\[nt\\'"]|\\[0-9a-fA-F][0-9a-fA-F])*"/,token:"string"},{regex:/\(;.*?/,token:"comment",next:"comment"},{regex:/;;.*$/,token:"comment"},{regex:/\(/,indent:!0},{regex:/\)/,dedent:!0}],comment:[{regex:/.*?;\)/,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"]}}),e.defineMIME("text/webassembly","wast")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/webidl/webidl.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/webidl/webidl.js deleted file mode 100644 index 4b896067f..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/webidl/webidl.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var r=["Clamp","Constructor","EnforceRange","Exposed","ImplicitThis","Global","PrimaryGlobal","LegacyArrayClass","LegacyUnenumerableNamedProperties","LenientThis","NamedConstructor","NewObject","NoInterfaceObject","OverrideBuiltins","PutForwards","Replaceable","SameObject","TreatNonObjectAsNull","TreatNullAs","EmptyString","Unforgeable","Unscopeable"],n=t(r),a=["unsigned","short","long","unrestricted","float","double","boolean","byte","octet","Promise","ArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","Float32Array","Float64Array","ByteString","DOMString","USVString","sequence","object","RegExp","Error","DOMException","FrozenArray","any","void"],i=t(a),o=["attribute","callback","const","deleter","dictionary","enum","getter","implements","inherit","interface","iterable","legacycaller","maplike","partial","required","serializer","setlike","setter","static","stringifier","typedef","optional","readonly","or"],c=t(o),l=["true","false","Infinity","NaN","null"],m=t(l);e.registerHelper("hintWords","webidl",r.concat(a).concat(o).concat(l));var f=t(["callback","dictionary","enum","interface"]),u=t(["typedef"]),s=/^[:<=>?]/,d=/^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/,b=/^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/,y=/^_?[A-Za-z][0-9A-Z_a-z-]*/,p=/^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/,h=/^"[^"]*"/,A=/^\/\*.*?\*\//,g=/^\/\*.*/,k=/^.*?\*\//;e.defineMode("webidl",(function(){return{startState:function(){return{inComment:!1,lastToken:"",startDef:!1,endDef:!1}},token:function(e,t){var r=function(e,t){if(e.eatSpace())return null;if(t.inComment)return e.match(k)?(t.inComment=!1,"comment"):(e.skipToEnd(),"comment");if(e.match("//"))return e.skipToEnd(),"comment";if(e.match(A))return"comment";if(e.match(g))return t.inComment=!0,"comment";if(e.match(/^-?[0-9\.]/,!1)&&(e.match(d)||e.match(b)))return"number";if(e.match(h))return"string";if(t.startDef&&e.match(y))return"def";if(t.endDef&&e.match(p))return t.endDef=!1,"def";if(e.match(c))return"keyword";if(e.match(i)){var r=t.lastToken,a=(e.match(/^\s*(.+?)\b/,!1)||[])[1];return":"===r||"implements"===r||"implements"===a||"="===a?"builtin":"variable-3"}return e.match(n)?"builtin":e.match(m)?"atom":e.match(y)?"variable":e.match(s)?"operator":(e.next(),null)}(e,t);if(r){var a=e.current();t.lastToken=a,"keyword"===r?(t.startDef=f.test(a),t.endDef=t.endDef||u.test(a)):t.startDef=!1}return r}}})),e.defineMIME("text/x-webidl","webidl")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/xml/xml.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/xml/xml.js deleted file mode 100644 index f2d0879ee..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/xml/xml.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}((function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(r,o){var a,i,l=r.indentUnit,u={},c=o.htmlMode?e:n;for(var d in c)u[d]=c[d];for(var d in o)u[d]=o[d];function s(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();return"<"==r?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(m("atom","]]>")):null:t.match("--")?n(m("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(g(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=m("meta","?>"),"meta"):(a=t.eat("/")?"closeTag":"openTag",e.tokenize=f,"tag bracket"):"&"==r?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function f(t,e){var n,r,o=t.next();if(">"==o||"/"==o&&t.eat(">"))return e.tokenize=s,a=">"==o?"endTag":"selfcloseTag","tag bracket";if("="==o)return a="equals",null;if("<"==o){e.tokenize=s,e.state=k,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(o)?(e.tokenize=(n=o,r=function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=f;break}return"string"},r.isInAttribute=!0,r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function m(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=s;break}n.next()}return t}}function g(t){return function(e,n){for(var r;null!=(r=e.next());){if("<"==r)return n.tokenize=g(t+1),n.tokenize(e,n);if(">"==r){if(1==t){n.tokenize=s;break}return n.tokenize=g(t-1),n.tokenize(e,n)}}return"meta"}}function p(t){return t&&t.toLowerCase()}function h(t,e,n){this.prev=t.context,this.tagName=e||"",this.indent=t.indented,this.startOfLine=n,(u.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function x(t){t.context&&(t.context=t.context.prev)}function b(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!u.contextGrabbers.hasOwnProperty(p(n))||!u.contextGrabbers[p(n)].hasOwnProperty(p(e)))return;x(t)}}function k(t,e,n){return"openTag"==t?(n.tagStart=e.column(),w):"closeTag"==t?v:k}function w(t,e,n){return"word"==t?(n.tagName=e.current(),i="tag",y):u.allowMissingTagName&&"endTag"==t?(i="tag bracket",y(t,0,n)):(i="error",w)}function v(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&u.implicitlyClosed.hasOwnProperty(p(n.context.tagName))&&x(n),n.context&&n.context.tagName==r||!1===u.matchClosing?(i="tag",T):(i="tag error",N)}return u.allowMissingTagName&&"endTag"==t?(i="tag bracket",T(t,0,n)):(i="error",N)}function T(t,e,n){return"endTag"!=t?(i="error",T):(x(n),k)}function N(t,e,n){return i="error",T(t,0,n)}function y(t,e,n){if("word"==t)return i="attribute",C;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||u.autoSelfClosers.hasOwnProperty(p(r))?b(n,r):(b(n,r),n.context=new h(n,r,o==n.indented)),k}return i="error",y}function C(t,e,n){return"equals"==t?z:(u.allowMissing||(i="error"),y(t,0,n))}function z(t,e,n){return"string"==t?M:"word"==t&&u.allowUnquoted?(i="string",y):(i="error",y(t,0,n))}function M(t,e,n){return"string"==t?M:y(t,0,n)}return s.isInText=!0,{startState:function(t){var e={tokenize:s,state:k,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;a=null;var n=e.tokenize(t,e);return(n||a)&&"comment"!=n&&(i=null,e.state=e.state(a||n,t,e),i&&(n="error"==i?n+" error":i)),n},indent:function(e,n,r){var o=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+l;if(o&&o.noIndent)return t.Pass;if(e.tokenize!=f&&e.tokenize!=s)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==u.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+l*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:u.htmlMode?"html":"xml",helperType:u.htmlMode?"html":"xml",skipAttribute:function(t){t.state==z&&(t.state=y)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)e.push(n.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/xquery/xquery.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/xquery/xquery.js deleted file mode 100644 index 99a20e970..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/xquery/xquery.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("xquery",(function(){var e=function(){function e(e){return{type:e,style:"keyword"}}for(var t=e("operator"),n={type:"atom",style:"atom"},r={type:"axis_specifier",style:"qualifier"},i={",":{type:"punctuation",style:null}},a=["after","all","allowing","ancestor","ancestor-or-self","any","array","as","ascending","at","attribute","base-uri","before","boundary-space","by","case","cast","castable","catch","child","collation","comment","construction","contains","content","context","copy","copy-namespaces","count","decimal-format","declare","default","delete","descendant","descendant-or-self","descending","diacritics","different","distance","document","document-node","element","else","empty","empty-sequence","encoding","end","entire","every","exactly","except","external","first","following","following-sibling","for","from","ftand","ftnot","ft-option","ftor","function","fuzzy","greatest","group","if","import","in","inherit","insensitive","insert","instance","intersect","into","invoke","is","item","language","last","lax","least","let","levels","lowercase","map","modify","module","most","namespace","next","no","node","nodes","no-inherit","no-preserve","not","occurs","of","only","option","order","ordered","ordering","paragraph","paragraphs","parent","phrase","preceding","preceding-sibling","preserve","previous","processing-instruction","relationship","rename","replace","return","revalidation","same","satisfies","schema","schema-attribute","schema-element","score","self","sensitive","sentence","sentences","sequence","skip","sliding","some","stable","start","stemming","stop","strict","strip","switch","text","then","thesaurus","times","to","transform","treat","try","tumbling","type","typeswitch","union","unordered","update","updating","uppercase","using","validate","value","variable","version","weight","when","where","wildcards","window","with","without","word","words","xquery"],o=0,s=a.length;o",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"];for(o=0,s=u.length;o\"\'\/?]/);)b+=k;return t(f,x,function(e,t){return function(r,i){return r.eatSpace(),t&&r.eat(">")?(p(i),i.tokenize=n,"tag"):(r.eat("/")||d(i,{type:"tag",name:e,tokenize:n}),r.eat(">")?(i.tokenize=n,"tag"):(i.tokenize=o,"tag"))}}(b,v))}if("{"==g)return d(x,{type:"codeblock"}),null;if("}"==g)return p(x),null;if(l(x))return">"==g?"tag":"/"==g&&f.eat(">")?(p(x),"tag"):"variable";if(/\d/.test(g))return f.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),"atom";if("("===g&&f.eat(":"))return d(x,{type:"comment"}),t(f,x,r);if(h||'"'!==g&&"'"!==g){if("$"===g)return t(f,x,a);if(":"===g&&f.eat("="))return"keyword";if("("===g)return d(x,{type:"paren"}),null;if(")"===g)return p(x),null;if("["===g)return d(x,{type:"bracket"}),null;if("]"===g)return p(x),null;var z=e.propertyIsEnumerable(g)&&e[g];if(h&&'"'===g)for(;'"'!==f.next(););if(h&&"'"===g)for(;"'"!==f.next(););z||f.eatWhile(/[\w\$_-]/);var w=f.eat(":");!f.eat(":")&&w&&f.eatWhile(/[\w\$_-]/),f.match(/^[ \t]*\(/,!1)&&(y=!0);var I=f.current();return z=e.propertyIsEnumerable(I)&&e[I],y&&!z&&(z={type:"function_call",style:"variable def"}),function(e){return m(e,"xmlconstructor")}(x)?(p(x),"variable"):("element"!=I&&"attribute"!=I&&"axis_specifier"!=z.type||d(x,{type:"xmlconstructor"}),z?z.style:"variable")}return t(f,x,i(g))}function r(e,t){for(var n,r=!1,i=!1,a=0;n=e.next();){if(")"==n&&r){if(!(a>0)){p(t);break}a--}else":"==n&&i&&a++;r=":"==n,i="("==n}return"comment"}function i(e,t){return function(r,a){var o;if(function(e){return m(e,"string")}(a)&&r.current()==e)return p(a),t&&(a.tokenize=t),"string";if(d(a,{type:"string",name:e,tokenize:i(e,t)}),r.match("{",!1)&&f(a))return a.tokenize=n,"string";for(;o=r.next();){if(o==e){p(a),t&&(a.tokenize=t);break}if(r.match("{",!1)&&f(a))return a.tokenize=n,"string"}return"string"}}function a(e,t){var r=/[\w\$_-]/;if(e.eat('"')){for(;'"'!==e.next(););e.eat(":")}else e.eatWhile(r),e.match(":=",!1)||e.eat(":");return e.eatWhile(r),t.tokenize=n,"variable"}function o(e,r){var a=e.next();return"/"==a&&e.eat(">")?(f(r)&&p(r),l(r)&&p(r),"tag"):">"==a?(f(r)&&p(r),"tag"):"="==a?null:'"'==a||"'"==a?t(e,r,i(a,o)):(f(r)||d(r,{type:"attribute",tokenize:o}),e.eat(/[a-zA-Z_:]/),e.eatWhile(/[-a-zA-Z0-9_:.]/),e.eatSpace(),(e.match(">",!1)||e.match("/",!1))&&(p(r),r.tokenize=n),"attribute")}function s(e,t){for(var r;r=e.next();)if("-"==r&&e.match("->",!0))return t.tokenize=n,"comment"}function c(e,t){for(var r;r=e.next();)if("]"==r&&e.match("]",!0))return t.tokenize=n,"comment"}function u(e,t){for(var r;r=e.next();)if("?"==r&&e.match(">",!0))return t.tokenize=n,"comment meta"}function l(e){return m(e,"tag")}function f(e){return m(e,"attribute")}function m(e,t){return e.stack.length&&e.stack[e.stack.length-1].type==t}function d(e,t){e.stack.push(t)}function p(e){e.stack.pop();var t=e.stack.length&&e.stack[e.stack.length-1].tokenize;e.tokenize=t||n}return{startState:function(){return{tokenize:n,cc:[],stack:[]}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},blockCommentStart:"(:",blockCommentEnd:":)"}})),e.defineMIME("application/xquery","xquery")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/yacas/yacas.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/yacas/yacas.js deleted file mode 100644 index 91ad6ce8c..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/yacas/yacas.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("yacas",(function(t,n){var r=function(e){for(var t={},n="Assert BackQuote D Defun Deriv For ForEach FromFile FromString Function Integrate InverseTaylor Limit LocalSymbols Macro MacroRule MacroRulePattern NIntegrate Rule RulePattern Subst TD TExplicitSum TSum Taylor Taylor1 Taylor2 Taylor3 ToFile ToStdout ToString TraceRule Until While".split(" "),r=0;r|<|&|\||_|`|'|\^|\?|!|%|#)/,!0,!1)?"operator":"error"}function s(e,t){for(var n,r=!1,o=!1;null!=(n=e.next());){if('"'===n&&!o){r=!0;break}o=!o&&"\\"===n}return r&&!o&&(t.tokenize=l),"string"}function f(e,t){for(var n,r;null!=(r=e.next());){if("*"===n&&"/"===r){t.tokenize=l;break}n=r}return"comment"}function p(e){var t=null;return e.scopes.length>0&&(t=e.scopes[e.scopes.length-1]),t}return{startState:function(){return{tokenize:l,scopes:[]}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},indent:function(n,r){if(n.tokenize!==l&&null!==n.tokenize)return e.Pass;var o=0;return"]"!==r&&"];"!==r&&"}"!==r&&"};"!==r&&");"!==r||(o=-1),(n.scopes.length+o)*t.indentUnit},electricChars:"{}[]();",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}})),e.defineMIME("text/x-yacas",{name:"yacas"})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/yaml-frontmatter/yaml-frontmatter.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/yaml-frontmatter/yaml-frontmatter.js deleted file mode 100644 index 0a24f437d..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/yaml-frontmatter/yaml-frontmatter.js +++ /dev/null @@ -1 +0,0 @@ -!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../yaml/yaml")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../yaml/yaml"],t):t(CodeMirror)}((function(t){t.defineMode("yaml-frontmatter",(function(e,n){var a=t.getMode(e,"yaml"),r=t.getMode(e,n&&n.base||"gfm");function o(t){return 1==t.state?{mode:a,state:t.yaml}:{mode:r,state:t.inner}}return{startState:function(){return{state:0,yaml:null,inner:t.startState(r)}},copyState:function(e){return{state:e.state,yaml:e.yaml&&t.copyState(a,e.yaml),inner:t.copyState(r,e.inner)}},token:function(e,n){if(0==n.state)return e.match("---",!1)?(n.state=1,n.yaml=t.startState(a),a.token(e,n.yaml)):(n.state=2,r.token(e,n.inner));if(1==n.state){var o=e.sol()&&e.match(/(---|\.\.\.)/,!1),i=a.token(e,n.yaml);return o&&(n.state=2,n.yaml=null),i}return r.token(e,n.inner)},innerMode:o,indent:function(e,n,a){var r=o(e);return r.mode.indent?r.mode.indent(r.state,n,a):t.Pass},blankLine:function(t){var e=o(t);if(e.mode.blankLine)return e.mode.blankLine(e.state)}}}))})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/yaml/yaml.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/yaml/yaml.js deleted file mode 100644 index 13b2b55aa..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/yaml/yaml.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("yaml",(function(){var e=new RegExp("\\b(("+["true","false","on","off","yes","no"].join(")|(")+"))$","i");return{token:function(i,t){var r=i.peek(),n=t.escaped;if(t.escaped=!1,"#"==r&&(0==i.pos||/\s/.test(i.string.charAt(i.pos-1))))return i.skipToEnd(),"comment";if(i.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(t.literal&&i.indentation()>t.keyCol)return i.skipToEnd(),"string";if(t.literal&&(t.literal=!1),i.sol()){if(t.keyCol=0,t.pair=!1,t.pairStart=!1,i.match("---"))return"def";if(i.match("..."))return"def";if(i.match(/\s*-\s+/))return"meta"}if(i.match(/^(\{|\}|\[|\])/))return"{"==r?t.inlinePairs++:"}"==r?t.inlinePairs--:"["==r?t.inlineList++:t.inlineList--,"meta";if(t.inlineList>0&&!n&&","==r)return i.next(),"meta";if(t.inlinePairs>0&&!n&&","==r)return t.keyCol=0,t.pair=!1,t.pairStart=!1,i.next(),"meta";if(t.pairStart){if(i.match(/^\s*(\||\>)\s*/))return t.literal=!0,"meta";if(i.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==t.inlinePairs&&i.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(t.inlinePairs>0&&i.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(i.match(e))return"keyword"}return!t.pair&&i.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(t.pair=!0,t.keyCol=i.indentation(),"atom"):t.pair&&i.match(/^:\s*/)?(t.pairStart=!0,"meta"):(t.pairStart=!1,t.escaped="\\"==r,i.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},lineComment:"#",fold:"indent"}})),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/z80/z80.js b/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/z80/z80.js deleted file mode 100644 index 6c3aac4a2..000000000 --- a/packages/components/src/packages/org.standardnotes.code-editor/vendor/codemirror/mode/z80/z80.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}((function(e){"use strict";e.defineMode("z80",(function(e,t){var r,i,n=t.ez80;n?(r=/^(exx?|(ld|cp)([di]r?)?|[lp]ea|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|[de]i|halt|im|in([di]mr?|ir?|irx|2r?)|ot(dmr?|[id]rx|imr?)|out(0?|[di]r?|[di]2r?)|tst(io)?|slp)(\.([sl]?i)?[sl])?\b/i,i=/^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i):(r=/^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i,i=/^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i);var l=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,o=/^(n?[zc]|p[oe]?|m)\b/i,c=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,a=/^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i;return{startState:function(){return{context:0}},token:function(e,t){if(e.column()||(t.context=0),e.eatSpace())return null;var d;if(e.eatWhile(/\w/)){if(n&&e.eat(".")&&e.eatWhile(/\w/),d=e.current(),!e.indentation())return e.match(a)?"number":null;if((1==t.context||4==t.context)&&l.test(d))return t.context=4,"var2";if(2==t.context&&o.test(d))return t.context=4,"var3";if(r.test(d))return t.context=1,"keyword";if(i.test(d))return t.context=2,"keyword";if(4==t.context&&a.test(d))return"number";if(c.test(d))return"error"}else{if(e.eat(";"))return e.skipToEnd(),"comment";if(e.eat('"')){for(;(d=e.next())&&'"'!=d;)"\\"==d&&e.next();return"string"}if(e.eat("'")){if(e.match(/\\?.'/))return"number"}else if(e.eat(".")||e.sol()&&e.eat("#")){if(t.context=5,e.eatWhile(/\w/))return"def"}else if(e.eat("$")){if(e.eatWhile(/[\da-f]/i))return"number"}else if(e.eat("%")){if(e.eatWhile(/[01]/))return"number"}else e.next()}return null}}})),e.defineMIME("text/x-z80","z80"),e.defineMIME("text/x-ez80",{name:"z80",ez80:!0})})); \ No newline at end of file diff --git a/packages/components/src/packages/org.standardnotes.code-editor/webpack.config.js b/packages/components/src/packages/org.standardnotes.code-editor/webpack.config.js index ac92eb9eb..cea894926 100644 --- a/packages/components/src/packages/org.standardnotes.code-editor/webpack.config.js +++ b/packages/components/src/packages/org.standardnotes.code-editor/webpack.config.js @@ -30,15 +30,21 @@ module.exports = { plugins: [ new CopyPlugin({ patterns: [ - { from: '../../../../../node_modules/codemirror/lib', to: path.resolve(__dirname, 'vendor/codemirror/lib') }, - { from: '../../../../../node_modules/codemirror/mode', to: path.resolve(__dirname, 'vendor/codemirror/mode') }, { - from: '../../../../../node_modules/codemirror/addon', - to: path.resolve(__dirname, 'vendor/codemirror/addon'), + from: path.resolve(__dirname, 'node_modules/codemirror/lib'), + to: path.resolve(__dirname, 'dist/codemirror/lib'), }, { - from: '../../../../../node_modules/codemirror/keymap/vim.js', - to: path.resolve(__dirname, 'vendor/codemirror/keymap'), + from: path.resolve(__dirname, 'node_modules/codemirror/mode'), + to: path.resolve(__dirname, 'dist/codemirror/mode'), + }, + { + from: path.resolve(__dirname, 'node_modules/codemirror/addon'), + to: path.resolve(__dirname, 'dist/codemirror/addon'), + }, + { + from: path.resolve(__dirname, 'node_modules/codemirror/keymap/vim.js'), + to: path.resolve(__dirname, 'dist/codemirror/keymap'), }, { from: require.resolve('@standardnotes/component-relay/dist/dist.js'),