D7net Mini Sh3LL v1
Current File : /var/www/html/hpsc/../informatica/media/system/../com_akeeba/../jui/../editors/codemirror/addon/merge/merge.min.js |
!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("diff_match_patch")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","diff_match_patch"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b){this.mv=a,this.type=b,this.classes="left"==b?{chunk:"CodeMirror-merge-l-chunk",start:"CodeMirror-merge-l-chunk-start",end:"CodeMirror-merge-l-chunk-end",insert:"CodeMirror-merge-l-inserted",del:"CodeMirror-merge-l-deleted",connect:"CodeMirror-merge-l-connect"}:{chunk:"CodeMirror-merge-r-chunk",start:"CodeMirror-merge-r-chunk-start",end:"CodeMirror-merge-r-chunk-end",insert:"CodeMirror-merge-r-inserted",del:"CodeMirror-merge-r-deleted",connect:"CodeMirror-merge-r-connect"}}function c(b){b.diffOutOfDate&&(b.diff=v(b.orig.getValue(),b.edit.getValue()),b.chunks=w(b.diff),b.diffOutOfDate=!1,a.signal(b.edit,"updateDiff",b.diff))}function d(a){function b(b){R=!0,m=!1,"full"==b&&(a.svg&&F(a.svg),a.copyButtons&&F(a.copyButtons),i(a.edit,h.marked,a.classes),i(a.orig,k.marked,a.classes),h.from=h.to=k.from=k.to=0),c(a),a.showDifferences&&(j(a.edit,a.diff,h,DIFF_INSERT,a.classes),j(a.orig,a.diff,k,DIFF_DELETE,a.classes)),l(a),"align"==a.mv.options.connect&&o(a),R=!1}function d(b){R||(a.dealigned=!0,e(b))}function e(a){R||m||(clearTimeout(g),a===!0&&(m=!0),g=setTimeout(b,a===!0?20:250))}function f(b,c){a.diffOutOfDate||(a.diffOutOfDate=!0,h.from=h.to=k.from=k.to=0),d(c.text.length-1!=c.to.line-c.from.line)}var g,h={from:0,to:0,marked:[]},k={from:0,to:0,marked:[]},m=!1;return a.edit.on("change",f),a.orig.on("change",f),a.edit.on("markerAdded",d),a.edit.on("markerCleared",d),a.orig.on("markerAdded",d),a.orig.on("markerCleared",d),a.edit.on("viewportChange",function(){e(!1)}),a.orig.on("viewportChange",function(){e(!1)}),b(),b}function e(a){a.edit.on("scroll",function(){f(a,DIFF_INSERT)&&l(a)}),a.orig.on("scroll",function(){f(a,DIFF_DELETE)&&l(a)})}function f(a,b){if(a.diffOutOfDate)return!1;if(!a.lockScroll)return!0;var c,d,e=+new Date;if(b==DIFF_INSERT?(c=a.edit,d=a.orig):(c=a.orig,d=a.edit),c.state.scrollSetBy==a&&(c.state.scrollSetAt||0)+50>e)return!1;var f=c.getScrollInfo();if("align"==a.mv.options.connect)q=f.top;else{var h,i,j=.5*f.clientHeight,k=f.top+j,l=c.lineAtHeight(k,"local"),m=z(a.chunks,l,b==DIFF_INSERT),n=g(c,b==DIFF_INSERT?m.edit:m.orig),o=g(d,b==DIFF_INSERT?m.orig:m.edit),p=(k-n.top)/(n.bot-n.top),q=o.top-j+p*(o.bot-o.top);if(q>f.top&&(i=f.top/j)<1)q=q*i+f.top*(1-i);else if((h=f.height-f.clientHeight-f.top)<j){var r=d.getScrollInfo(),s=r.height-r.clientHeight-q;s>h&&(i=h/j)<1&&(q=q*i+(r.height-r.clientHeight-h)*(1-i))}}return d.scrollTo(f.left,q),d.state.scrollSetAt=e,d.state.scrollSetBy=a,!0}function g(a,b){var c=b.after;return null==c&&(c=a.lastLine()+1),{top:a.heightAtLine(b.before||0,"local"),bot:a.heightAtLine(c,"local")}}function h(a,b,c){a.lockScroll=b,b&&0!=c&&f(a,DIFF_INSERT)&&l(a),a.lockButton.innerHTML=b?"⇛⇚":"⇛ ⇚"}function i(b,c,d){for(var e=0;e<c.length;++e){var f=c[e];f instanceof a.TextMarker?f.clear():f.parent&&(b.removeLineClass(f,"background",d.chunk),b.removeLineClass(f,"background",d.start),b.removeLineClass(f,"background",d.end))}c.length=0}function j(a,b,c,d,e){var f=a.getViewport();a.operation(function(){c.from==c.to||f.from-c.to>20||c.from-f.to>20?(i(a,c.marked,e),k(a,b,d,c.marked,f.from,f.to,e),c.from=f.from,c.to=f.to):(f.from<c.from&&(k(a,b,d,c.marked,f.from,c.from,e),c.from=f.from),f.to>c.to&&(k(a,b,d,c.marked,c.to,f.to,e),c.to=f.to))})}function k(a,b,c,d,e,f,g){function h(b,c){for(var h=Math.max(e,b),i=Math.min(f,c),j=h;i>j;++j){var k=a.addLineClass(j,"background",g.chunk);j==b&&a.addLineClass(k,"background",g.start),j==c-1&&a.addLineClass(k,"background",g.end),d.push(k)}b==c&&h==c&&i==c&&(h?d.push(a.addLineClass(h-1,"background",g.end)):d.push(a.addLineClass(h,"background",g.start)))}for(var i=P(0,0),j=P(e,0),k=a.clipPos(P(f-1)),l=c==DIFF_DELETE?g.del:g.insert,m=0,n=0;n<b.length;++n){var o=b[n],p=o[0],q=o[1];if(p==DIFF_EQUAL){var r=i.line+(y(b,n)?0:1);I(i,q);var s=i.line+(x(b,n)?1:0);s>r&&(n&&h(m,r),m=s)}else if(p==c){var t=I(i,q,!0),u=K(j,i),v=J(k,t);L(u,v)||d.push(a.markText(u,v,{className:l})),i=t}}m<=i.line&&h(m,i.line+1)}function l(a){if(a.showDifferences){if(a.svg){F(a.svg);var b=a.gap.offsetWidth;G(a.svg,"width",b,"height",a.gap.offsetHeight)}a.copyButtons&&F(a.copyButtons);for(var c=a.edit.getViewport(),d=a.orig.getViewport(),e=a.edit.getScrollInfo().top,f=a.orig.getScrollInfo().top,g=0;g<a.chunks.length;g++){var h=a.chunks[g];h.editFrom<=c.to&&h.editTo>=c.from&&h.origFrom<=d.to&&h.origTo>=d.from&&r(a,h,f,e,b)}}}function m(a,b){for(var c=0,d=0,e=0;e<b.length;e++){var f=b[e];if(f.editTo>a&&f.editFrom<=a)return null;if(f.editFrom>a)break;c=f.editTo,d=f.origTo}return d+(a-c)}function n(a,b){for(var c=[],d=0;d<a.chunks.length;d++){var e=a.chunks[d];c.push([e.origTo,e.editTo,b?m(e.editTo,b.chunks):null])}if(b)for(var d=0;d<b.chunks.length;d++){for(var e=b.chunks[d],f=0;f<c.length;f++){var g=c[f];if(g[1]==e.editTo){f=-1;break}if(g[1]>e.editTo)break}f>-1&&c.splice(f-1,0,[m(e.editTo,a.chunks),e.editTo,e.origTo])}return c}function o(a,b){if(a.dealigned||b){if(!a.orig.curOp)return a.orig.operation(function(){o(a,b)});a.dealigned=!1;var d=a.mv.left==a?a.mv.right:a.mv.left;d&&(c(d),d.dealigned=!1);for(var e=n(a,d),f=a.mv.aligners,g=0;g<f.length;g++)f[g].clear();f.length=0;var h=[a.orig,a.edit],i=[];d&&h.push(d.orig);for(var g=0;g<h.length;g++)i.push(h[g].getScrollInfo().top);for(var j=0;j<e.length;j++)p(h,e[j],f);for(var g=0;g<h.length;g++)h[g].scrollTo(null,i[g])}}function p(a,b,c){for(var d=0,e=[],f=0;f<a.length;f++)if(null!=b[f]){var g=a[f].heightAtLine(b[f],"local");e[f]=g,d=Math.max(d,g)}for(var f=0;f<a.length;f++)if(null!=b[f]){var h=d-e[f];h>1&&c.push(q(a[f],b[f],h))}}function q(a,b,c){var d=!0;b>a.lastLine()&&(b--,d=!1);var e=document.createElement("div");return e.className="CodeMirror-merge-spacer",e.style.height=c+"px",e.style.minWidth="1px",a.addLineWidget(b,e,{height:c,above:d})}function r(a,b,c,d,e){var f="left"==a.type,g=a.orig.heightAtLine(b.origFrom,"local")-c;if(a.svg){var h=g,i=a.edit.heightAtLine(b.editFrom,"local")-d;if(f){var j=h;h=i,i=j}var k=a.orig.heightAtLine(b.origTo,"local")-c,l=a.edit.heightAtLine(b.editTo,"local")-d;if(f){var j=k;k=l,l=j}var m=" C "+e/2+" "+i+" "+e/2+" "+h+" "+(e+2)+" "+h,n=" C "+e/2+" "+k+" "+e/2+" "+l+" -1 "+l;G(a.svg.appendChild(document.createElementNS(Q,"path")),"d","M -1 "+i+m+" L "+(e+2)+" "+k+n+" z","class",a.classes.connect)}if(a.copyButtons){var o=a.copyButtons.appendChild(E("div","left"==a.type?"⇝":"⇜","CodeMirror-merge-copy")),p=a.mv.options.allowEditingOriginals;if(o.title=p?"Push to left":"Revert chunk",o.chunk=b,o.style.top=g+"px",p){var q=a.orig.heightAtLine(b.editFrom,"local")-d,r=a.copyButtons.appendChild(E("div","right"==a.type?"⇝":"⇜","CodeMirror-merge-copy-reverse"));r.title="Push to right",r.chunk={editFrom:b.origFrom,editTo:b.origTo,origFrom:b.editFrom,origTo:b.editTo},r.style.top=q+"px","right"==a.type?r.style.left="2px":r.style.right="2px"}}}function s(a,b,c,d){a.diffOutOfDate||b.replaceRange(c.getRange(P(d.origFrom,0),P(d.origTo,0)),P(d.editFrom,0),P(d.editTo,0))}function t(b){var c=b.lockButton=E("div",null,"CodeMirror-merge-scrolllock");c.title="Toggle locked scrolling";var d=E("div",[c],"CodeMirror-merge-scrolllock-wrap");a.on(c,"click",function(){h(b,!b.lockScroll)});var e=[d];if(b.mv.options.revertButtons!==!1&&(b.copyButtons=E("div",null,"CodeMirror-merge-copybuttons-"+b.type),a.on(b.copyButtons,"click",function(a){var c=a.target||a.srcElement;if(c.chunk)return"CodeMirror-merge-copy-reverse"==c.className?void s(b,b.orig,b.edit,c.chunk):void s(b,b.edit,b.orig,c.chunk)}),e.unshift(b.copyButtons)),"align"!=b.mv.options.connect){var f=document.createElementNS&&document.createElementNS(Q,"svg");f&&!f.createSVGRect&&(f=null),b.svg=f,f&&e.push(f)}return b.gap=E("div",e,"CodeMirror-merge-gap")}function u(a){return"string"==typeof a?a:a.getValue()}function v(a,b){var c=T.diff_main(a,b);T.diff_cleanupSemantic(c);for(var d=0;d<c.length;++d){var e=c[d];e[1]?d&&c[d-1][0]==e[0]&&(c.splice(d--,1),c[d][1]+=e[1]):c.splice(d--,1)}return c}function w(a){for(var b=[],c=0,d=0,e=P(0,0),f=P(0,0),g=0;g<a.length;++g){var h=a[g],i=h[0];if(i==DIFF_EQUAL){var j=y(a,g)?0:1,k=e.line+j,l=f.line+j;I(e,h[1],null,f);var m=x(a,g)?1:0,n=e.line+m,o=f.line+m;n>k&&(g&&b.push({origFrom:d,origTo:l,editFrom:c,editTo:k}),c=n,d=o)}else I(i==DIFF_INSERT?e:f,h[1])}return(c<=e.line||d<=f.line)&&b.push({origFrom:d,origTo:f.line+1,editFrom:c,editTo:e.line+1}),b}function x(a,b){if(b==a.length-1)return!0;var c=a[b+1][1];return 1==c.length||10!=c.charCodeAt(0)?!1:b==a.length-2?!0:(c=a[b+2][1],c.length>1&&10==c.charCodeAt(0))}function y(a,b){if(0==b)return!0;var c=a[b-1][1];return 10!=c.charCodeAt(c.length-1)?!1:1==b?!0:(c=a[b-2][1],10==c.charCodeAt(c.length-1))}function z(a,b,c){for(var d,e,f,g,h=0;h<a.length;h++){var i=a[h],j=c?i.editFrom:i.origFrom,k=c?i.editTo:i.origTo;null==e&&(j>b?(e=i.editFrom,g=i.origFrom):k>b&&(e=i.editTo,g=i.origTo)),b>=k?(d=i.editTo,f=i.origTo):b>=j&&(d=i.editFrom,f=i.origFrom)}return{edit:{before:d,after:e},orig:{before:f,after:g}}}function A(a,b,c){function d(){f.clear(),a.removeLineClass(b,"wrap","CodeMirror-merge-collapsed-line")}a.addLineClass(b,"wrap","CodeMirror-merge-collapsed-line");var e=document.createElement("span");e.className="CodeMirror-merge-collapsed-widget",e.title="Identical text collapsed. Click to expand.";var f=a.markText(P(b,0),P(c-1),{inclusiveLeft:!0,inclusiveRight:!0,replacedWith:e,clearOnEnter:!0});return e.addEventListener("click",d),{mark:f,clear:d}}function B(a,b){function c(){for(var a=0;a<d.length;a++)d[a].clear()}for(var d=[],e=0;e<b.length;e++){var f=b[e],g=A(f.cm,f.line,f.line+a);d.push(g),g.mark.on("clear",c)}return d[0].mark}function C(a,b,c,d){for(var e=0;e<a.chunks.length;e++)for(var f=a.chunks[e],g=f.editFrom-b;g<f.editTo+b;g++){var h=g+c;h>=0&&h<d.length&&(d[h]=!1)}}function D(a,b){"number"!=typeof b&&(b=2);for(var c=[],d=a.editor(),e=d.firstLine(),f=e,g=d.lastLine();g>=f;f++)c.push(!0);a.left&&C(a.left,b,e,c),a.right&&C(a.right,b,e,c);for(var h=0;h<c.length;h++)if(c[h]){for(var i=h+e,j=1;h<c.length-1&&c[h+1];h++,j++);if(j>b){var k=[{line:i,cm:d}];a.left&&k.push({line:m(i,a.left.chunks),cm:a.left.orig}),a.right&&k.push({line:m(i,a.right.chunks),cm:a.right.orig});var l=B(j,k);a.options.onCollapse&&a.options.onCollapse(a,i,j,l)}}}function E(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f<b.length;++f)e.appendChild(b[f]);return e}function F(a){for(var b=a.childNodes.length;b>0;--b)a.removeChild(a.firstChild)}function G(a){for(var b=1;b<arguments.length;b+=2)a.setAttribute(arguments[b],arguments[b+1])}function H(a,b){b||(b={});for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function I(a,b,c,d){for(var e=c?P(a.line,a.ch):a,f=0;;){var g=b.indexOf("\n",f);if(-1==g)break;++e.line,d&&++d.line,f=g+1}return e.ch=(f?0:e.ch)+(b.length-f),d&&(d.ch=(f?0:d.ch)+(b.length-f)),e}function J(a,b){return(a.line-b.line||a.ch-b.ch)<0?a:b}function K(a,b){return(a.line-b.line||a.ch-b.ch)>0?a:b}function L(a,b){return a.line==b.line&&a.ch==b.ch}function M(a,b,c){for(var d=a.length-1;d>=0;d--){var e=a[d],f=(c?e.origTo:e.editTo)-1;if(b>f)return f}}function N(a,b,c){for(var d=0;d<a.length;d++){var e=a[d],f=c?e.origFrom:e.editFrom;if(f>b)return f}}function O(b,d){var e=null,f=b.state.diffViews,g=b.getCursor().line;if(f)for(var h=0;h<f.length;h++){var i=f[h],j=b==i.orig;c(i);var k=0>d?M(i.chunks,g,j):N(i.chunks,g,j);null==k||null!=e&&!(0>d?k>e:e>k)||(e=k)}return null==e?a.Pass:void b.setCursor(e,0)}var P=a.Pos,Q="http://www.w3.org/2000/svg";b.prototype={constructor:b,init:function(b,c,f){this.edit=this.mv.edit,(this.edit.state.diffViews||(this.edit.state.diffViews=[])).push(this),this.orig=a(b,H({value:c,readOnly:!this.mv.options.allowEditingOriginals},H(f))),this.orig.state.diffViews=[this],this.diff=v(u(c),u(f.value)),this.chunks=w(this.diff),this.diffOutOfDate=this.dealigned=!1,this.showDifferences=f.showDifferences!==!1,this.forceUpdate=d(this),h(this,!0,!1),e(this)},setShowDifferences:function(a){a=a!==!1,a!=this.showDifferences&&(this.showDifferences=a,this.forceUpdate("full"))}};var R=!1,S=a.MergeView=function(c,d){if(!(this instanceof S))return new S(c,d);this.options=d;var e=d.origLeft,f=null==d.origRight?d.orig:d.origRight,g=null!=e,h=null!=f,i=1+(g?1:0)+(h?1:0),j=[],k=this.left=null,m=this.right=null,n=this;if(g){k=this.left=new b(this,"left");var p=E("div",null,"CodeMirror-merge-pane");j.push(p),j.push(t(k))}var q=E("div",null,"CodeMirror-merge-pane");if(j.push(q),h){m=this.right=new b(this,"right"),j.push(t(m));var r=E("div",null,"CodeMirror-merge-pane");j.push(r)}(h?r:q).className+=" CodeMirror-merge-pane-rightmost",j.push(E("div",null,null,"height: 0; clear: both;"));var s=this.wrap=c.appendChild(E("div",j,"CodeMirror-merge CodeMirror-merge-"+i+"pane"));this.edit=a(q,H(d)),k&&k.init(p,e,d),m&&m.init(r,f,d),d.collapseIdentical&&(R=!0,this.editor().operation(function(){D(n,d.collapseIdentical)}),R=!1),"align"==d.connect&&(this.aligners=[],o(this.left||this.right,!0));var u=function(){k&&l(k),m&&l(m)};a.on(window,"resize",u);var v=setInterval(function(){for(var b=s.parentNode;b&&b!=document.body;b=b.parentNode);b||(clearInterval(v),a.off(window,"resize",u))},5e3)};S.prototype={constuctor:S,editor:function(){return this.edit},rightOriginal:function(){return this.right&&this.right.orig},leftOriginal:function(){return this.left&&this.left.orig},setShowDifferences:function(a){this.right&&this.right.setShowDifferences(a),this.left&&this.left.setShowDifferences(a)},rightChunks:function(){return this.right?(c(this.right),this.right.chunks):void 0},leftChunks:function(){return this.left?(c(this.left),this.left.chunks):void 0}};var T=new diff_match_patch;a.commands.goNextDiff=function(a){return O(a,1)},a.commands.goPrevDiff=function(a){return O(a,-1)}});
AnonSec - 2021 | Recode By D7net