CoreFiles by mySites.guru
lint.min.js1 lines, 4,799 bytes, from Joomla_4.0.0-rc4-Release_Candidate-Full_Package.zip
Raw History Compare with 4.0.0-rc3
md5
49691c6b3cb2c91c07f23dc9668c2992
sha1
74733d33360b114b9122f98d4ff64a73388e2cc9
sha256
94040e2c1556a3f7e1dda71ac92c9c7ec7854f188b0703208540f4a17ec026df
!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,r,i){var a=function(e,n,o){var r=document.createElement("div");function i(e){if(!r.parentNode)return t.off(document,"mousemove",i);r.style.top=Math.max(0,e.clientY-r.offsetHeight-5)+"px",r.style.left=e.clientX+5+"px"}return r.className="CodeMirror-lint-tooltip cm-s-"+e.options.theme,r.appendChild(o.cloneNode(!0)),e.state.lint.options.selfContain?e.getWrapperElement().appendChild(r):document.body.appendChild(r),t.on(document,"mousemove",i),i(n),null!=r.style.opacity&&(r.style.opacity=1),r}(e,o,r);function s(){var e;t.off(i,"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=i;;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(i,"mouseout",s)}function r(t,e,n){this.marked=[],this.options=e,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))return;for(var r=n.getBoundingClientRect(),i=(r.left+r.right)/2,a=(r.top+r.bottom)/2,s=t.findMarksAt(t.coordsChar({left:i,top:a},"client")),u=[],c=0;c<s.length;++c){var f=s[c].__annotation;f&&u.push(f)}u.length&&function(t,e,n){for(var r=n.target||n.srcElement,i=document.createDocumentFragment(),a=0;a<e.length;a++){var s=e[a];i.appendChild(l(s))}o(t,n,i,r)}(t,u,e)}(t,e)},this.waitingFor=0}function i(t){var n=t.state.lint;n.hasGutter&&t.clearGutter(e),a(n)&&function(t){t.eachLine((function(e){var n=e.wrapClass&&/\bCodeMirror-lint-line-\w+\b/.exec(e.wrapClass);n&&t.removeLineClass(e,"wrap",n[0])}))}(t);for(var o=0;o<n.marked.length;++o)n.marked[o].clear();n.marked.length=0}function a(t){return t.options.highlightLines}function s(e,n,r,i,a){var s=document.createElement("div"),l=s;return s.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+r,i&&((l=s.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),0!=a&&t.on(l,"mouseover",(function(t){o(e,t,n,l)})),s}function l(t){var e=t.severity;e||(e="error");var n=document.createElement("div");return n.className="CodeMirror-lint-message CodeMirror-lint-message-"+e,void 0!==t.messageHTML?n.innerHTML=t.messageHTML:n.appendChild(document.createTextNode(t.message)),n}function u(e){var n=e.state.lint;if(n){var o=n.options,r=o.options||o,i=o.getAnnotations||e.getHelper(t.Pos(0,0),"lint");if(i)if(o.async||i.async)!function(e,n,o){var r=e.state.lint,i=++r.waitingFor;function a(){i=-1,e.off("change",a)}e.on("change",a),n(e.getValue(),(function(n,o){e.off("change",a),r.waitingFor==i&&(o&&n instanceof t&&(n=o),e.operation((function(){c(e,n)})))}),o,e)}(e,i,r);else{var a=i(e.getValue(),r,e);if(!a)return;a.then?a.then((function(t){e.operation((function(){c(e,t)}))})):e.operation((function(){c(e,a)}))}}}function c(t,n){var o=t.state.lint;if(o){var r=o.options;i(t);for(var u,c,f=function(t){for(var e=[],n=0;n<t.length;++n){var o=t[n],r=o.from.line;(e[r]||(e[r]=[])).push(o)}return e}(n),m=0;m<f.length;++m){var d=f[m];if(d){var p=[];d=d.filter((function(t){return!(p.indexOf(t.message)>-1)&&p.push(t.message)}));for(var h=null,v=o.hasGutter&&document.createDocumentFragment(),g=0;g<d.length;++g){var C=d[g],M=C.severity;M||(M="error"),c=M,h="error"==(u=h)?u:c,r.formatAnnotation&&(C=r.formatAnnotation(C)),o.hasGutter&&v.appendChild(l(C)),C.to&&o.marked.push(t.markText(C.from,C.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+M,__annotation:C}))}o.hasGutter&&t.setGutterMarker(m,e,s(t,v,h,f[m].length>1,o.options.tooltips)),a(o)&&t.addLineClass(m,"wrap","CodeMirror-lint-line-"+h)}}r.onUpdateLinting&&r.onUpdateLinting(n,f,t)}}function f(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout((function(){u(t)}),e.options.delay||500))}t.defineOption("lint",!1,(function(n,o,a){if(a&&a!=t.Init&&(i(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;c<s.length;++c)s[c]==e&&(l=!0);var m=n.state.lint=new r(n,(d=o)instanceof Function?{getAnnotations:d}:(d&&!0!==d||(d={}),d),l);!1!==m.options.lintOnChange&&n.on("change",f),0!=m.options.tooltips&&"gutter"!=m.options.tooltips&&t.on(n.getWrapperElement(),"mouseover",m.onMouseOver),u(n)}var d})),t.defineExtension("performLint",(function(){u(this)}))}));

The same content is in 2 releases, Joomla 4.0.0-rc4 to 4.0.0-rc5. See them all, or every version of this file.