functiondiff_match_patch(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32}window.rangy=function(){functiont(t,e){varn=typeoft[e];returnn==h||!(n!=u||!t[e])||"unknown"==n}functione(t,e){return!(typeoft[e]!=u||!t[e])}functionn(t,e){returntypeoft[e]!=f}functionr(t){returnfunction(e,n){for(varr=n.length;r--;)if(!t(e,n[r]))return!1;return!0}}functioni(t){returnt&&v(t,m)&&x(t,g)}functiona(t){window.alert("Rangy not supported in your browser. Reason: "+t),b.initialized=!0,b.supported=!1}functiono(t){vare="Rangy warning: "+t;b.config.alertOnWarn?window.alert(e):typeofwindow.console!=f&&typeofwindow.console.log!=f&&window.console.log(e)}functions(){if(!b.initialized){varn,r=!1,o=!1;t(document,"createRange")&&(n=document.createRange(),v(n,p)&&x(n,d)&&(r=!0),n.detach());vars=e(document,"body")?document.body:document.getElementsByTagName("body")[0];s&&t(s,"createTextRange")&&(n=s.createTextRange(),i(n)&&(o=!0)),r||o||a("Neither Range nor TextRange are implemented"),b.initialized=!0,b.features={implementsDomRange:r,implementsTextRange:o};for(varl=w.concat(_),c=0,u=l.length;u>c;++c)try{l[c](b)}catch(h){e(window,"console")&&t(window.console,"log")&&window.console.log("Init listener threw an exception. Continuing.",h)}}}functionl(t){t=t||window,s();for(vare=0,n=C.length;n>e;++e)C[e](t)}functionc(t){this.name=t,this.initialized=!1,this.supported=!1}varu="object",h="function",f="undefined",d=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer","START_TO_START","START_TO_END","END_TO_START","END_TO_END"],p=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],g=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],m=["collapse","compareEndPoints","duplicate","getBookmark","moveToBookmark","moveToElementText","parentElement","pasteHTML","select","setEndPoint","getBoundingClientRect"],v=r(t),y=r(e),x=r(n),b={version:"1.2.3",initialized:!1,supported:!0,util:{isHostMethod:t,isHostObject:e,isHostProperty:n,areHostMethods:v,areHostObjects:y,areHostProperties:x,isTextRange:i},features:{},modules:{},config:{alertOnWarn:!1,preferTextRange:!1}};b.fail=a,b.warn=o,{}.hasOwnProperty?b.util.extend=function(t,e){for(varnine)e.hasOwnProperty(n)&&(t[n]=e[n])}:a("hasOwnProperty not supported");var_=[],w=[];b.init=s,b.addInitListener=function(t){b.initialized?t(b):_.push(t)};varC=[];b.addCreateMissingNativeApiListener=function(t){C.push(t)},b.createMissingNativeApi=l,c.prototype.fail=function(t){throwthis.initialized=!0,this.supported=!1,newError("Module '"+this.name+"' failed to load: "+t)},c.prototype.warn=function(t){b.warn("Module "+this.name+": "+t)},c.prototype.createError=function(t){returnnewError("Error in Rangy "+this.name+" module: "+t)},b.createModule=function(t,e){varn=newc(t);b.modules[t]=n,w.push(function(t){e(t,n),n.initialized=!0,n.supported=!0})},b.requireModules=function(t){for(vare,n,r=0,i=t.length;i>r;++r){if(n=t[r],e=b.modules[n],!(e&&einstanceofc))thrownewError("Module '"+n+"' not found");if(!e.supported)thrownewError("Module '"+n+"' not supported")}};varE=!1,S=function(){E||(E=!0,b.initialized||s())};returntypeofwindow==f?voida("No window found"):typeofdocument==f?voida("No document found"):(t(document,"addEventListener")&&document.addEventListener("DOMContentLoaded",S,!1),t(window,"addEventListener")?window.addEventListener("load",S,!1):t(window,"attachEvent")?window.attachEvent("onload",S):a("Window does not have required addEventListener or attachEvent method"),b)}(),rangy.createModule("DomUtil",function(t,e){functionn(t){vare;returntypeoft.namespaceURI==S||null===(e=t.namespaceURI)||"http://www.w3.org/1999/xhtml"==e}functionr(t){vare=t.parentNode;return1==e.nodeType?e:null}funct
else{varn=e.docSelection.createRange();if(u(n))h(e,n);else{e.rangeCount=n.length;for(varr,a=w.getDocument(n.item(0)),s=0;s<e.rangeCount;++s)r=t.createRange(a),r.selectNode(n.item(s)),e._ranges.push(r);e.isCollapsed=1==e.rangeCount&&e._ranges[0].collapsed,i(e,e._ranges[e.rangeCount-1],!1)}}}functiond(t,e){for(varn=t.docSelection.createRange(),r=c(e),i=w.getDocument(n.item(0)),a=w.getBody(i).createControlRange(),o=0,s=n.length;s>o;++o)a.add(n.item(o));try{a.add(r)}catch(l){thrownewError("addRange(): Element within the specified Range could not be added to control selection (does it have layout?)")}a.select(),f(t)}functionp(t,e,n){this.nativeSelection=t,this.docSelection=e,this._ranges=[],this.win=n,this.refresh()}functiong(t,e){for(varn,r=w.getDocument(e[0].startContainer),i=w.getBody(r).createControlRange(),a=0;rangeCount>a;++a){n=c(e[a]);try{i.add(n)}catch(o){thrownewError("setRanges(): Element within the one of the specified Ranges could not be added to control selection (does it have layout?)")}}i.select(),f(t)}functionm(t,e){if(t.anchorNode&&w.getDocument(t.anchorNode)!==w.getDocument(e))thrownewk("WRONG_DOCUMENT_ERR")}functionv(t){vare=[],n=newT(t.anchorNode,t.anchorOffset),r=newT(t.focusNode,t.focusOffset),i="function"==typeoft.getName?t.getName():"Selection";if("undefined"!=typeoft.rangeCount)for(vara=0,o=t.rangeCount;o>a;++a)e[a]=E.inspect(t.getRangeAt(a));return"["+i+"(Ranges: "+e.join(", ")+")(anchor: "+n.inspect()+", focus: "+r.inspect()+"]"}t.requireModules(["DomUtil","DomRange","WrappedRange"]),t.config.checkSelectionRanges=!0;vary,x,b="boolean",_="_rangySelection",w=t.dom,C=t.util,E=t.DomRange,S=t.WrappedRange,k=t.DOMException,T=w.DomPosition,I="Control",N=t.util.isHostMethod(window,"getSelection"),R=t.util.isHostObject(document,"selection"),M=R&&(!N||t.config.preferTextRange);M?(y=r,t.isSelectionValid=function(t){vare=(t||window).document,n=e.selection;return"None"!=n.type||w.getDocument(n.createRange().parentElement())==e}):N?(y=n,t.isSelectionValid=function(){return!0}):e.fail("Neither document.selection or window.getSelection() detected."),t.getNativeSelection=y;varA=y(),D=t.createNativeRange(document),O=w.getBody(document),L=C.areHostObjects(A,["anchorNode","focusNode"]&&C.areHostProperties(A,["anchorOffset","focusOffset"]));t.features.selectionHasAnchorAndFocus=L;varB=C.isHostMethod(A,"extend");t.features.selectionHasExtend=B;varF="number"==typeofA.rangeCount;t.features.selectionHasRangeCount=F;varP=!1,$=!0;C.areHostMethods(A,["addRange","getRangeAt","removeAllRanges"])&&"number"==typeofA.rangeCount&&t.features.implementsDomRange&&!function(){vart=document.createElement("iframe");t.frameBorder=0,t.style.position="absolute",t.style.left="-10000px",O.appendChild(t);vare=w.getIframeDocument(t);e.open(),e.write("<html><head></head><body>12</body></html>"),e.close();varn=w.getIframeWindow(t).getSelection(),r=e.documentElement,i=r.lastChild,a=i.firstChild,o=e.createRange();o.setStart(a,1),o.collapse(!0),n.addRange(o),$=1==n.rangeCount,n.removeAllRanges();vars=o.cloneRange();o.setStart(a,0),s.setEnd(a,2),n.addRange(o),n.addRange(s),P=2==n.rangeCount,o.detach(),s.detach(),O.removeChild(t)}(),t.features.selectionSupportsMultipleRanges=P,t.features.collapsedNonEditableSelectionsSupported=$;varj,H=!1;O&&C.isHostMethod(O,"createControlRange")&&(j=O.createControlRange(),C.areHostProperties(j,["item","add"])&&(H=!0)),t.features.implementsControlRange=H,x=L?function(t){returnt.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset}:function(t){returnt.rangeCount?t.getRangeAt(t.rangeCount-1).collapsed:!1};varz;C.isHostMethod(A,"getRangeAt")?z=function(t,e){try{returnt.getRangeAt(e)}catch(n){returnnull}}:L&&(z=function(e){varn=w.getDocument(e.anchorNode),r=t.createRange(n);returnr.setStart(e.anchorNode,e.anchorOffset),r.setEnd(e.focusNode,e.focusOffset),r.collapsed!==this.isCollapsed&&(r.setStart(e.focusNode,e.focusOffset),r.setEnd(e.anchorNode,e.anchorOffset)),r}),t.getSelection=function(t){t=t||window;vare=t[_],n=y(t),i=R?r(t):null;returne?(e.nativeSelection=n,e.docSelect
}elset=newRegExp(t);return_.exec.call(t,g(this))},_.replace=function(e,n){varr,i,a,l=m.isRegExp(e);returnl?(e[y]&&(i=e[y].captureNames),r=e.lastIndex):e+="",a=s(n,"Function")?b.replace.call(String(this),e,function(){varr,a=arguments;if(i)for(a[0]=newString(a[0]),r=0;r<i.length;++r)i[r]&&(a[0][i[r]]=a[r+1]);returnl&&e.global&&(e.lastIndex=a[a.length-2]+a[0].length),n.apply(t,a)}):b.replace.call(null==this?this:String(this),e,function(){vart=arguments;returnb.replace.call(String(n),I,function(e,n,r){vara;if(n){if(a=+n,a<=t.length-3)returnt[a]||"";if(a=i?o(i,n):-1,0>a)thrownewSyntaxError("Backreference to undefined group "+e);returnt[a+1]||""}if("$"===r)return"$";if("&"===r||0===+r)returnt[0];if("`"===r)returnt[t.length-1].slice(0,t[t.length-2]);if("'"===r)returnt[t.length-1].slice(t[t.length-2]+t[0].length);if(r=+r,!isNaN(r)){if(r>t.length-3)thrownewSyntaxError("Backreference to undefined group "+e);returnt[r]||""}thrownewSyntaxError("Invalid token "+e)})}),l&&(e.lastIndex=e.global?0:r),a},_.split=function(e,n){if(!m.isRegExp(e))returnb.split.apply(this,arguments);varr,i=String(this),a=[],o=e.lastIndex,s=0;returnn=(n===t?-1:n)>>>0,m.forEach(i,e,function(t){t.index+t[0].length>s&&(a.push(i.slice(s,t.index)),t.length>1&&t.index<i.length&&Array.prototype.push.apply(a,t.slice(1)),r=t[0].length,s=t.index+r)}),s===i.length?(!b.test.call(e,"")||r)&&a.push(""):a.push(i.slice(s)),e.lastIndex=o,a.length>n?a.slice(0,n):a},v=m.addToken,v(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/,function(t,e){if("B"===t[1]&&e===S)returnt[0];thrownewSyntaxError("Invalid escape "+t[0])},{scope:"all"}),v(/\[(\^?)]/,function(t){returnt[1]?"[\\s\\S]":"\\b\\B"}),v(/\(\?#[^)]*\)/,function(t,e,n){returnl(t.input,t.index+t[0].length,n)?"":"(?:)"}),v(/\s+|#.*/,function(t,e,n){returnl(t.input,t.index+t[0].length,n)?"":"(?:)"},{flag:"x"}),v(/\./,function(){return"[\\s\\S]"},{flag:"s"}),v(/\\k<([\w$]+)>/,function(t){vare=isNaN(t[1])?o(this.captureNames,t[1])+1:+t[1],n=t.index+t[0].length;if(!e||e>this.captureNames.length)thrownewSyntaxError("Backreference to undefined group "+t[0]);return"\\"+e+(n===t.input.length||isNaN(t.input.charAt(n))?"":"(?:)")}),v(/\\(\d+)/,function(t,e){if(!(e===S&&/^[1-9]/.test(t[1])&&+t[1]<=this.captureNames.length)&&"0"!==t[1])thrownewSyntaxError("Cannot use octal escape or backreference to undefined group "+t[0]);returnt[0]},{scope:"all"}),v(/\(\?P?<([\w$]+)>/,function(t){if(!isNaN(t[1]))thrownewSyntaxError("Cannot use integer as capture name "+t[0]);if("length"===t[1]||"__proto__"===t[1])thrownewSyntaxError("Cannot use reserved word as capture name "+t[0]);if(o(this.captureNames,t[1])>-1)thrownewSyntaxError("Cannot use same name for multiple groups "+t[0]);returnthis.captureNames.push(t[1]),this.hasNamedCapture=!0,"("}),v(/\((?!\?)/,function(t,e,n){returnn.indexOf("n")>-1?"(?:":(this.captureNames.push(null),"(")},{optionalFlags:"n"}),m}();returnfunction(t){functione(t){vare=/^\^/,n=/\$$/;returne.test(t)&&n.test(t.replace(/\\[\s\S]/g,""))?t.replace(e,"").replace(n,""):t}functionn(e){returnt.isRegExp(e)?e[r]&&e[r].captureNames?e:t(e.source):t(e)}varr="xregexp",i=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g,a=t.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,i],"g");t.build=function(o,s,l){varc,u,h,f,d=/^\(\?([\w$]+)\)/.exec(o),p={},g=0,m=0,v=[0];d&&(l=l||"",d[1].replace(/./g,function(t){l+=l.indexOf(t)>-1?"":t}));for(fins)s.hasOwnProperty(f)&&(h=n(s[f]),p[f]={pattern:e(h.source),names:h[r].captureNames||[]});returno=n(o),u=o[r].captureNames||[],o=o.source.replace(a,function(t,e,n,r,a){varo,s,l=e||n;if(l){if(!p.hasOwnProperty(l))thrownewReferenceError("Undefined property "+t);returne?(o=u[m],v[++m]=++g,s="(?<"+(o||l)+">"):s="(?:",c=g,s+p[l].pattern.replace(i,function(t,e,n){if(e){if(o=p[l].names[g-c],++g,o)return"(?<"+o+">"}elseif(n)return"\\"+(+n+c);returnt})+")"}if(r){if(o=u[m],v[++m]=++g,o)return"(?<"+o+">"}elseif(a)return"\\"+v[+a];returnt}),t(o,l)}}(t),function(t){functione(t,e,n,r){return{name:t,value:e,start:n,end:r}}
returnt=n.lexer.lex()||f,"number"!=typeoft&&(t=n.symbols_[t]||t),t}varn=this,r=[0],i=[null],a=[],o=this.table,s="",l=0,c=0,u=0,h=2,f=1;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeofthis.lexer.yylloc&&(this.lexer.yylloc={});vard=this.lexer.yylloc;a.push(d);varp=this.lexer.options&&this.lexer.options.ranges;this.parseError="function"==typeofthis.yy.parseError?this.yy.parseError:Object.getPrototypeOf(this).parseError;for(varg,m,v,y,x,b,_,w,C,E={};;){if(v=r[r.length-1],this.defaultActions[v]?y=this.defaultActions[v]:((null===g||"undefined"==typeofg)&&(g=e()),y=o[v]&&o[v][g]),"undefined"==typeofy||!y.length||!y[0]){varS="";C=[];for(bino[v])this.terminals_[b]&&b>h&&C.push("'"+this.terminals_[b]+"'");S=this.lexer.showPosition?"Parse error on line "+(l+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(l+1)+": Unexpected "+(g==f?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(S,{text:this.lexer.match,token:this.terminals_[g]||g,line:this.lexer.yylineno,loc:d,expected:C})}if(y[0]instanceofArray&&y.length>1)thrownewError("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(y[0]){case1:r.push(g),i.push(this.lexer.yytext),a.push(this.lexer.yylloc),r.push(y[1]),g=null,m?(g=m,m=null):(c=this.lexer.yyleng,s=this.lexer.yytext,l=this.lexer.yylineno,d=this.lexer.yylloc,u>0&&u--);break;case2:if(_=this.productions_[y[1]][1],E.$=i[i.length-_],E._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},p&&(E._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),x=this.performAction.call(E,s,c,l,this.yy,y[1],i,a),"undefined"!=typeofx)returnx;_&&(r=r.slice(0,-1*_*2),i=i.slice(0,-1*_),a=a.slice(0,-1*_)),r.push(this.productions_[y[1]][0]),i.push(E.$),a.push(E._$),w=o[r[r.length-2]][r[r.length-1]],r.push(w);break;case3:return!0}}return!0}},r=function(){vart={EOF:1,parseError:function(t,e){if(!this.yy.parser)thrownewError(t);this.yy.parser.parseError(t,e)},setInput:function(t){returnthis._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){vart=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;vare=t.match(/(?:\r\n?|\n).*/g);returne?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){vare=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;varr=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);vari=this.yylloc.range;returnthis.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){returnthis._more=!0,this},reject:function(){returnthis.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){vart=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upc