diff2html 3.1.9 → 3.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/js/diff2html-ui-base.min.js +2 -2
- package/bundles/js/diff2html-ui-slim.min.js +2 -2
- package/bundles/js/diff2html-ui.min.js +2 -2
- package/bundles/js/diff2html.min.js +2 -2
- package/lib/diff-parser.js +1 -0
- package/lib/diff-parser.js.map +1 -1
- package/lib/diff2html-templates.js +15 -2
- package/lib/diff2html-templates.js.map +1 -1
- package/lib/diff2html.js +15 -2
- package/lib/diff2html.js.map +1 -1
- package/lib/file-list-renderer.js +15 -2
- package/lib/file-list-renderer.js.map +1 -1
- package/lib/hoganjs-utils.js +14 -2
- package/lib/hoganjs-utils.js.map +1 -1
- package/lib/line-by-line-renderer.d.ts +5 -1
- package/lib/line-by-line-renderer.d.ts.map +1 -1
- package/lib/line-by-line-renderer.js +15 -2
- package/lib/line-by-line-renderer.js.map +1 -1
- package/lib/rematch.js +1 -0
- package/lib/rematch.js.map +1 -1
- package/lib/render-utils.js +17 -4
- package/lib/render-utils.js.map +1 -1
- package/lib/side-by-side-renderer.d.ts +5 -1
- package/lib/side-by-side-renderer.d.ts.map +1 -1
- package/lib/side-by-side-renderer.js +15 -2
- package/lib/side-by-side-renderer.js.map +1 -1
- package/lib/types.js +1 -0
- package/lib/types.js.map +1 -1
- package/lib/ui/js/diff2html-ui-base.d.ts +1 -2
- package/lib/ui/js/diff2html-ui-base.d.ts.map +1 -1
- package/lib/ui/js/diff2html-ui-base.js +6 -3
- package/lib/ui/js/diff2html-ui-base.js.map +1 -1
- package/lib/ui/js/diff2html-ui-slim.js +3 -2
- package/lib/ui/js/diff2html-ui-slim.js.map +1 -1
- package/lib/ui/js/diff2html-ui.js +3 -2
- package/lib/ui/js/diff2html-ui.js.map +1 -1
- package/lib/ui/js/highlight.js-helpers.js +1 -0
- package/lib/ui/js/highlight.js-helpers.js.map +1 -1
- package/lib/ui/js/highlight.js-slim.d.ts +1 -3
- package/lib/ui/js/highlight.js-slim.d.ts.map +1 -1
- package/lib/ui/js/highlight.js-slim.js +1 -0
- package/lib/ui/js/highlight.js-slim.js.map +1 -1
- package/lib/utils.js +1 -0
- package/lib/utils.js.map +1 -1
- package/lib-esm/diff-parser.js.map +1 -1
- package/lib-esm/hoganjs-utils.js.map +1 -1
- package/lib-esm/line-by-line-renderer.d.ts +5 -1
- package/lib-esm/line-by-line-renderer.d.ts.map +1 -1
- package/lib-esm/line-by-line-renderer.js.map +1 -1
- package/lib-esm/render-utils.js +2 -2
- package/lib-esm/render-utils.js.map +1 -1
- package/lib-esm/side-by-side-renderer.d.ts +5 -1
- package/lib-esm/side-by-side-renderer.d.ts.map +1 -1
- package/lib-esm/side-by-side-renderer.js.map +1 -1
- package/lib-esm/ui/js/diff2html-ui-base.d.ts +1 -2
- package/lib-esm/ui/js/diff2html-ui-base.d.ts.map +1 -1
- package/lib-esm/ui/js/diff2html-ui-base.js +5 -3
- package/lib-esm/ui/js/diff2html-ui-base.js.map +1 -1
- package/lib-esm/ui/js/diff2html-ui-slim.js +1 -1
- package/lib-esm/ui/js/diff2html-ui.js +1 -1
- package/lib-esm/ui/js/highlight.js-slim.d.ts +1 -3
- package/lib-esm/ui/js/highlight.js-slim.d.ts.map +1 -1
- package/package.json +40 -40
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t=n();for(var i in t)("object"==typeof exports?exports:e)[i]=t[i]}}(this,(function(){return function(e){var n={};function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:i})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(i,r,function(n){return e[n]}.bind(null,r));return i},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=5)}([function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"}(n.LineType||(n.LineType={})),n.OutputFormatType={LINE_BY_LINE:"line-by-line",SIDE_BY_SIDE:"side-by-side"},n.LineMatchingType={LINES:"lines",WORDS:"words",NONE:"none"},n.DiffStyleType={WORD:"word",CHAR:"char"}},function(e,n,t){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n};Object.defineProperty(n,"__esModule",{value:!0});var l=r(t(10)),o=t(3),s=r(t(2)),a=t(0);n.CSSLineClass={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},n.defaultRenderConfig={matching:a.LineMatchingType.NONE,matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:a.DiffStyleType.WORD};var f=s.newDistanceFn((function(e){return e.value})),u=s.newMatcherFn(f);function d(e){return-1!==e.indexOf("dev/null")}function c(e){return e.replace(/(<del[^>]*>((.|\n)*?)<\/del>)/g,"")}function h(e){return e.slice(0).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function p(e,n,t){void 0===t&&(t=!0);var i=function(e){return e?2:1}(n);return{prefix:e.substring(0,i),content:t?h(e.substring(i)):e.substring(i)}}function g(e){var n=o.unifyPath(e.oldName),t=o.unifyPath(e.newName);if(n===t||d(n)||d(t))return d(t)?n:t;for(var i=[],r=[],l=n.split("/"),s=t.split("/"),a=0,f=l.length-1,u=s.length-1;a<f&&a<u&&l[a]===s[a];)i.push(s[a]),a+=1;for(;f>a&&u>a&&l[f]===s[u];)r.unshift(s[u]),f-=1,u-=1;var c=i.join("/"),h=r.join("/"),p=l.slice(a,f+1).join("/"),g=s.slice(a,u+1).join("/");return c.length&&h.length?c+"/{"+p+" → "+g+"}/"+h:c.length?c+"/{"+p+" → "+g+"}":h.length?"{"+p+" → "+g+"}/"+h:n+" → "+t}n.toCSSClass=function(e){switch(e){case a.LineType.CONTEXT:return n.CSSLineClass.CONTEXT;case a.LineType.INSERT:return n.CSSLineClass.INSERTS;case a.LineType.DELETE:return n.CSSLineClass.DELETES}},n.escapeForHtml=h,n.deconstructLine=p,n.filenameDiff=g,n.getHtmlId=function(e){return"d2h-"+o.hashCode(g(e)).toString().slice(-6)},n.getFileIcon=function(e){var n="file-changed";return e.isRename||e.isCopy?n="file-renamed":e.isNew?n="file-added":e.isDeleted?n="file-deleted":e.newName!==e.oldName&&(n="file-renamed"),n},n.diffHighlight=function(e,t,r,o){void 0===o&&(o={});var s=i(i({},n.defaultRenderConfig),o),a=s.matching,d=s.maxLineLengthHighlight,g=s.matchWordsThreshold,v=s.diffStyle,b=p(e,r,!1),m=p(t,r,!1);if(b.content.length>d||m.content.length>d)return{oldLine:{prefix:b.prefix,content:b.content},newLine:{prefix:m.prefix,content:m.content}};var y="char"===v?l.diffChars(b.content,m.content):l.diffWordsWithSpace(b.content,m.content),w=[];if("word"===v&&"words"===a){var L=y.filter((function(e){return e.removed})),S=y.filter((function(e){return e.added}));u(S,L).forEach((function(e){1===e[0].length&&1===e[1].length&&(f(e[0][0],e[1][0])<g&&(w.push(e[0][0]),w.push(e[1][0])))}))}var x,C=y.reduce((function(e,n){var t=n.added?"ins":n.removed?"del":null,i=w.indexOf(n)>-1?' class="d2h-change"':"",r=h(n.value);return null!==t?e+"<"+t+i+">"+r+"</"+t+">":""+e+r}),"");return{oldLine:{prefix:b.prefix,content:(x=C,x.replace(/(<ins[^>]*>((.|\n)*?)<\/ins>)/g,""))},newLine:{prefix:m.prefix,content:c(C)}}}},function(e,n,t){"use strict";function i(e,n){if(0===e.length)return n.length;if(0===n.length)return e.length;var t,i,r=[];for(t=0;t<=n.length;t++)r[t]=[t];for(i=0;i<=e.length;i++)r[0][i]=i;for(t=1;t<=n.length;t++)for(i=1;i<=e.length;i++)n.charAt(t-1)===e.charAt(i-1)?r[t][i]=r[t-1][i-1]:r[t][i]=Math.min(r[t-1][i-1]+1,Math.min(r[t][i-1]+1,r[t-1][i]+1));return r[n.length][e.length]}Object.defineProperty(n,"__esModule",{value:!0}),n.levenshtein=i,n.newDistanceFn=function(e){return function(n,t){var r=e(n).trim(),l=e(t).trim();return i(r,l)/(r.length+l.length)}},n.newMatcherFn=function(e){return function n(t,i,r,l){void 0===r&&(r=0),void 0===l&&(l=new Map);var o=function(n,t,i){void 0===i&&(i=new Map);for(var r,l=1/0,o=0;o<n.length;++o)for(var s=0;s<t.length;++s){var a=JSON.stringify([n[o],t[s]]),f=void 0;i.has(a)&&(f=i.get(a))||(f=e(n[o],t[s]),i.set(a,f)),f<l&&(r={indexA:o,indexB:s,score:l=f})}return r}(t,i,l);if(!o||t.length+i.length<3)return[[t,i]];var s=t.slice(0,o.indexA),a=i.slice(0,o.indexB),f=[t[o.indexA]],u=[i[o.indexB]],d=o.indexA+1,c=o.indexB+1,h=t.slice(d),p=i.slice(c),g=n(s,a,r+1,l),v=n(f,u,r+1,l),b=n(h,p,r+1,l),m=v;return(o.indexA>0||o.indexB>0)&&(m=g.concat(m)),(t.length>d||i.length>c)&&(m=m.concat(b)),m}}},function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i=RegExp("["+["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"].join("\\")+"]","g");n.escapeForRegExp=function(e){return e.replace(i,"\\$&")},n.unifyPath=function(e){return e?e.replace(/\\/g,"/"):e},n.hashCode=function(e){var n,t,i=0;for(n=0,t=e.length;n<t;n++)i=(i<<5)-i+e.charCodeAt(n),i|=0;return i}},function(e,n,t){var i=t(14);i.Template=t(15).Template,i.template=i.Template,e.exports=i},function(e,n,t){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)};Object.defineProperty(n,"__esModule",{value:!0});var r=t(6),l=t(7);n.defaultDiff2HtmlUIConfig=i(i({},l.defaultDiff2HtmlConfig),{synchronisedScroll:!0,highlight:!0,fileListToggle:!0,fileListStartVisible:!1,smartSelection:!0});var o=function(){function e(e,t,r,o){void 0===r&&(r={}),this.hljs=null,this.currentSelectionColumnId=-1,this.config=i(i({},n.defaultDiff2HtmlUIConfig),r),this.diffHtml=void 0!==t?l.html(t,this.config):e.innerHTML,this.targetElement=e,void 0!==o&&(this.hljs=o)}return e.prototype.draw=function(){this.targetElement.innerHTML=this.diffHtml,this.config.synchronisedScroll&&this.synchronisedScroll(),this.config.highlight&&this.highlightCode(),this.config.fileListToggle&&this.fileListToggle(this.config.fileListStartVisible)},e.prototype.synchronisedScroll=function(){this.targetElement.querySelectorAll(".d2h-file-wrapper").forEach((function(e){var n=Array().slice.call(e.querySelectorAll(".d2h-file-side-diff")),t=n[0],i=n[1];if(void 0!==t&&void 0!==i){var r=function(e){null!==e&&null!==e.target&&(e.target===t?(i.scrollTop=t.scrollTop,i.scrollLeft=t.scrollLeft):(t.scrollTop=i.scrollTop,t.scrollLeft=i.scrollLeft))};t.addEventListener("scroll",r),i.addEventListener("scroll",r)}}))},e.prototype.fileListToggle=function(e){var n=this.targetElement.querySelector(".d2h-show"),t=this.targetElement.querySelector(".d2h-hide"),i=this.targetElement.querySelector(".d2h-file-list");if(null!==n&&null!==t&&null!==i){var r=function(){n.style.display="none",t.style.display="inline",i.style.display="block"},l=function(){n.style.display="inline",t.style.display="none",i.style.display="none"};n.addEventListener("click",(function(){return r()})),t.addEventListener("click",(function(){return l()}));var o=this.getHashTag();"files-summary-show"===o?r():"files-summary-hide"===o?l():e?r():l()}},e.prototype.highlightCode=function(){var e=this;if(null===this.hljs)throw new Error("Missing a `highlight.js` implementation. Please provide one when instantiating Diff2HtmlUI.");this.targetElement.querySelectorAll(".d2h-file-wrapper").forEach((function(n){var t,i;n.querySelectorAll(".d2h-code-line-ctn").forEach((function(l){if(null!==e.hljs){var o=l.textContent,s=l.parentNode;if(null!==o&&null!==s&&e.isElement(s)){var a=s.classList.contains("d2h-del")?t:i,f=n.getAttribute("data-lang"),u=f&&e.hljs.getLanguage(f)?e.hljs.highlight(f,o,!0,a):e.hljs.highlightAuto(o);e.instanceOfIHighlightResult(u)&&(s.classList.contains("d2h-del")?t=u.top:(s.classList.contains("d2h-ins")||(t=u.top),i=u.top));var d=r.nodeStream(l);if(d.length){var c=document.createElementNS("http://www.w3.org/1999/xhtml","div");c.innerHTML=u.value,u.value=r.mergeStreams(d,r.nodeStream(c),o)}l.classList.add("hljs"),l.classList.add(u.language),l.innerHTML=u.value}}}))}))},e.prototype.smartSelection=function(){console.warn("Smart selection is now enabled by default with CSS. No need to call this method anymore.")},e.prototype.instanceOfIHighlightResult=function(e){return"top"in e},e.prototype.getHashTag=function(){var e=document.URL,n=e.indexOf("#"),t=null;return-1!==n&&(t=e.substr(n+1)),t},e.prototype.isElement=function(e){var n;return null!==e&&void 0!==(null===(n=e)||void 0===n?void 0:n.classList)},e}();n.Diff2HtmlUI=o},function(e,n,t){"use strict";function i(e){return e.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function r(e){return e.nodeName.toLowerCase()}Object.defineProperty(n,"__esModule",{value:!0}),n.nodeStream=function(e){var n=[],t=function(e,i){for(var l=e.firstChild;l;l=l.nextSibling)3===l.nodeType&&null!==l.nodeValue?i+=l.nodeValue.length:1===l.nodeType&&(n.push({event:"start",offset:i,node:l}),i=t(l,i),r(l).match(/br|hr|img|input/)||n.push({event:"stop",offset:i,node:l}));return i};return t(e,0),n},n.mergeStreams=function(e,n,t){var l=0,o="",s=[];function a(){return e.length&&n.length?e[0].offset!==n[0].offset?e[0].offset<n[0].offset?e:n:"start"===n[0].event?e:n:e.length?e:n}function f(e){if(null===(n=e)||void 0===(null===(t=n)||void 0===t?void 0:t.attributes))throw new Error("Node is not an Element");var n,t;o+="<"+r(e)+" "+Array().map.call(e.attributes,(function(e){return e.nodeName+'="'+i(e.value).replace(/"/g,""")+'"'})).join(" ")+">"}function u(e){o+="</"+r(e)+">"}function d(e){("start"===e.event?f:u)(e.node)}for(;e.length||n.length;){var c=a();if(o+=i(t.substring(l,c[0].offset)),l=c[0].offset,c===e){s.reverse().forEach(u);do{d(c.splice(0,1)[0]),c=a()}while(c===e&&c.length&&c[0].offset===l);s.reverse().forEach(f)}else"start"===c[0].event?s.push(c[0].node):s.pop(),d(c.splice(0,1)[0])}return o+i(t.substr(l))}},function(e,n,t){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0});var o=r(t(8)),s=r(t(9)),a=r(t(11)),f=r(t(12)),u=t(0),d=l(t(13));n.defaultDiff2HtmlConfig=i(i(i({},a.defaultLineByLineRendererConfig),f.defaultSideBySideRendererConfig),{outputFormat:u.OutputFormatType.LINE_BY_LINE,drawFileList:!0}),n.parse=function(e,t){return void 0===t&&(t={}),o.parse(e,i(i({},n.defaultDiff2HtmlConfig),t))},n.html=function(e,t){void 0===t&&(t={});var r=i(i({},n.defaultDiff2HtmlConfig),t),l="string"==typeof e?o.parse(e,r):e,u=new d.default(r);return(r.drawFileList?s.render(l,u):"")+("side-by-side"===r.outputFormat?new f.default(u,r).render(l):new a.default(u,r).render(l))}},function(e,n,t){"use strict";var i=this&&this.__spreadArrays||function(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var i=Array(e),r=0;for(n=0;n<t;n++)for(var l=arguments[n],o=0,s=l.length;o<s;o++,r++)i[r]=l[o];return i};Object.defineProperty(n,"__esModule",{value:!0});var r=t(0),l=t(3);function o(e,n){var t=e.split(".");return t.length>1?t[t.length-1]:n}function s(e,n){return n.reduce((function(n,t){return n||e.startsWith(t)}),!1)}var a=["a/","b/","i/","w/","c/","o/"];function f(e,n,t){var r=void 0!==t?i(a,[t]):a,o=((n?new RegExp("^"+l.escapeForRegExp(n)+' "?(.+?)"?$'):new RegExp('^"?(.+?)"?$')).exec(e)||[])[1],s=void 0===o?"":o,f=r.find((function(e){return 0===s.indexOf(e)}));return(f?s.slice(f.length):s).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}n.parse=function(e,n){void 0===n&&(n={});var t=[],i=null,l=null,a=null,u=null,d=null,c=null,h=null,p=/^old mode (\d{6})/,g=/^new mode (\d{6})/,v=/^deleted file mode (\d{6})/,b=/^new file mode (\d{6})/,m=/^copy from "?(.+)"?/,y=/^copy to "?(.+)"?/,w=/^rename from "?(.+)"?/,L=/^rename to "?(.+)"?/,S=/^similarity index (\d+)%/,x=/^dissimilarity index (\d+)%/,C=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,T=/^Binary files (.*) and (.*) differ/,N=/^GIT binary patch/,E=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,H=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,O=/^new file mode (\d{6})/,k=/^deleted file mode (\d{6}),(\d{6})/,_=e.replace(/\/g,"").replace(/\r\n?/g,"\n").split("\n");function j(){null!==l&&null!==i&&(i.blocks.push(l),l=null)}function F(){null!==i&&(i.oldName||null===c||(i.oldName=c),i.newName||null===h||(i.newName=h),i.newName&&(t.push(i),i=null)),c=null,h=null}function I(){j(),F(),i={blocks:[],deletedLines:0,addedLines:0}}function M(e){var n;j(),null!==i&&((n=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(e))?(i.isCombined=!1,a=parseInt(n[1],10),d=parseInt(n[2],10)):(n=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(e))?(i.isCombined=!0,a=parseInt(n[1],10),u=parseInt(n[2],10),d=parseInt(n[3],10)):(e.startsWith("@@")&&console.error("Failed to parse lines, starting in 0!"),a=0,d=0,i.isCombined=!1)),l={lines:[],oldStartLine:a,oldStartLine2:u,newStartLine:d,header:e}}return _.forEach((function(e,t){if(e&&!e.startsWith("*")){var u,j=_[t-1],F=_[t+1],P=_[t+2];if(e.startsWith("diff")){I();if((u=/^diff --git "?(.+)"? "?(.+)"?/.exec(e))&&(c=f(u[1],void 0,n.dstPrefix),h=f(u[2],void 0,n.srcPrefix)),null===i)throw new Error("Where is my file !!!");i.isGitDiff=!0}else{if((!i||!i.isGitDiff&&i&&e.startsWith("--- ")&&F.startsWith("+++ ")&&P.startsWith("@@"))&&I(),e.startsWith("--- ")&&F.startsWith("+++ ")||e.startsWith("+++ ")&&j.startsWith("--- ")){if(i&&!i.oldName&&e.startsWith("--- ")&&(u=function(e,n){return f(e,"---",n)}(e,n.srcPrefix)))return i.oldName=u,void(i.language=o(i.oldName,i.language));if(i&&!i.newName&&e.startsWith("+++ ")&&(u=function(e,n){return f(e,"+++",n)}(e,n.dstPrefix)))return i.newName=u,void(i.language=o(i.newName,i.language))}if(i&&(e.startsWith("@@")||i.isGitDiff&&i.oldName&&i.newName&&!l))M(e);else if(l&&(e.startsWith("+")||e.startsWith("-")||e.startsWith(" ")))!function(e){if(null!==i&&null!==l&&null!==a&&null!==d){var n={content:e},t=i.isCombined?["+ "," +","++"]:["+"],o=i.isCombined?["- "," -","--"]:["-"];s(e,t)?(i.addedLines++,n.type=r.LineType.INSERT,n.oldNumber=void 0,n.newNumber=d++):s(e,o)?(i.deletedLines++,n.type=r.LineType.DELETE,n.oldNumber=a++,n.newNumber=void 0):(n.type=r.LineType.CONTEXT,n.oldNumber=a++,n.newNumber=d++),l.lines.push(n)}}(e);else{var D=!function(e,n){for(var t=n;t<_.length-3;){if(e.startsWith("diff"))return!1;if(_[t].startsWith("--- ")&&_[t+1].startsWith("+++ ")&&_[t+2].startsWith("@@"))return!0;t++}return!1}(e,t);if(null===i)throw new Error("Where is my file !!!");(u=p.exec(e))?i.oldMode=u[1]:(u=g.exec(e))?i.newMode=u[1]:(u=v.exec(e))?(i.deletedFileMode=u[1],i.isDeleted=!0):(u=b.exec(e))?(i.newFileMode=u[1],i.isNew=!0):(u=m.exec(e))?(D&&(i.oldName=u[1]),i.isCopy=!0):(u=y.exec(e))?(D&&(i.newName=u[1]),i.isCopy=!0):(u=w.exec(e))?(D&&(i.oldName=u[1]),i.isRename=!0):(u=L.exec(e))?(D&&(i.newName=u[1]),i.isRename=!0):(u=T.exec(e))?(i.isBinary=!0,i.oldName=f(u[1],void 0,n.srcPrefix),i.newName=f(u[2],void 0,n.dstPrefix),M("Binary file")):N.test(e)?(i.isBinary=!0,M(e)):(u=S.exec(e))?i.unchangedPercentage=parseInt(u[1],10):(u=x.exec(e))?i.changedPercentage=parseInt(u[1],10):(u=C.exec(e))?(i.checksumBefore=u[1],i.checksumAfter=u[2],u[3]&&(i.mode=u[3])):(u=E.exec(e))?(i.checksumBefore=[u[2],u[3]],i.checksumAfter=u[1]):(u=H.exec(e))?(i.oldMode=[u[2],u[3]],i.newMode=u[1]):(u=O.exec(e))?(i.newFileMode=u[1],i.isNew=!0):(u=k.exec(e))&&(i.deletedFileMode=u[1],i.isDeleted=!0)}}}})),j(),F(),t}},function(e,n,t){"use strict";var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n};Object.defineProperty(n,"__esModule",{value:!0});var r=i(t(1));n.render=function(e,n){var t=e.map((function(e){return n.render("file-summary","line",{fileHtmlId:r.getHtmlId(e),oldName:e.oldName,newName:e.newName,fileName:r.filenameDiff(e),deletedLines:"-"+e.deletedLines,addedLines:"+"+e.addedLines},{fileIcon:n.template("icon",r.getFileIcon(e))})})).join("\n");return n.render("file-summary","wrapper",{filesNumber:e.length,files:t})}},function(e,n,t){
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(this,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiffStyleType=t.LineMatchingType=t.OutputFormatType=t.LineType=void 0,function(e){e.INSERT="insert",e.DELETE="delete",e.CONTEXT="context"}(t.LineType||(t.LineType={})),t.OutputFormatType={LINE_BY_LINE:"line-by-line",SIDE_BY_SIDE:"side-by-side"},t.LineMatchingType={LINES:"lines",WORDS:"words",NONE:"none"},t.DiffStyleType={WORD:"word",CHAR:"char"}},function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.diffHighlight=t.getFileIcon=t.getHtmlId=t.filenameDiff=t.deconstructLine=t.escapeForHtml=t.toCSSClass=t.defaultRenderConfig=t.CSSLineClass=void 0;var a=l(n(10)),s=n(3),f=l(n(2)),u=n(0);t.CSSLineClass={INSERTS:"d2h-ins",DELETES:"d2h-del",CONTEXT:"d2h-cntx",INFO:"d2h-info",INSERT_CHANGES:"d2h-ins d2h-change",DELETE_CHANGES:"d2h-del d2h-change"},t.defaultRenderConfig={matching:u.LineMatchingType.NONE,matchWordsThreshold:.25,maxLineLengthHighlight:1e4,diffStyle:u.DiffStyleType.WORD};var c=f.newDistanceFn((function(e){return e.value})),d=f.newMatcherFn(c);function h(e){return-1!==e.indexOf("dev/null")}function p(e){return e.replace(/(<del[^>]*>((.|\n)*?)<\/del>)/g,"")}function g(e){return e.slice(0).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/")}function b(e,t,n){void 0===n&&(n=!0);var i=function(e){return e?2:1}(t);return{prefix:e.substring(0,i),content:n?g(e.substring(i)):e.substring(i)}}function v(e){var t=s.unifyPath(e.oldName),n=s.unifyPath(e.newName);if(t===n||h(t)||h(n))return h(n)?t:n;for(var i=[],r=[],o=t.split("/"),l=n.split("/"),a=0,f=o.length-1,u=l.length-1;a<f&&a<u&&o[a]===l[a];)i.push(l[a]),a+=1;for(;f>a&&u>a&&o[f]===l[u];)r.unshift(l[u]),f-=1,u-=1;var c=i.join("/"),d=r.join("/"),p=o.slice(a,f+1).join("/"),g=l.slice(a,u+1).join("/");return c.length&&d.length?c+"/{"+p+" → "+g+"}/"+d:c.length?c+"/{"+p+" → "+g+"}":d.length?"{"+p+" → "+g+"}/"+d:t+" → "+n}t.toCSSClass=function(e){switch(e){case u.LineType.CONTEXT:return t.CSSLineClass.CONTEXT;case u.LineType.INSERT:return t.CSSLineClass.INSERTS;case u.LineType.DELETE:return t.CSSLineClass.DELETES}},t.escapeForHtml=g,t.deconstructLine=b,t.filenameDiff=v,t.getHtmlId=function(e){return"d2h-"+s.hashCode(v(e)).toString().slice(-6)},t.getFileIcon=function(e){var t="file-changed";return e.isRename||e.isCopy?t="file-renamed":e.isNew?t="file-added":e.isDeleted?t="file-deleted":e.newName!==e.oldName&&(t="file-renamed"),t},t.diffHighlight=function(e,n,r,o){void 0===o&&(o={});var l=i(i({},t.defaultRenderConfig),o),s=l.matching,f=l.maxLineLengthHighlight,u=l.matchWordsThreshold,h=l.diffStyle,v=b(e,r,!1),m=b(n,r,!1);if(v.content.length>f||m.content.length>f)return{oldLine:{prefix:v.prefix,content:g(v.content)},newLine:{prefix:m.prefix,content:g(m.content)}};var y="char"===h?a.diffChars(v.content,m.content):a.diffWordsWithSpace(v.content,m.content),w=[];if("word"===h&&"words"===s){var S=y.filter((function(e){return e.removed})),L=y.filter((function(e){return e.added}));d(L,S).forEach((function(e){1===e[0].length&&1===e[1].length&&(c(e[0][0],e[1][0])<u&&(w.push(e[0][0]),w.push(e[1][0])))}))}var x,C=y.reduce((function(e,t){var n=t.added?"ins":t.removed?"del":null,i=w.indexOf(t)>-1?' class="d2h-change"':"",r=g(t.value);return null!==n?e+"<"+n+i+">"+r+"</"+n+">":""+e+r}),"");return{oldLine:{prefix:v.prefix,content:(x=C,x.replace(/(<ins[^>]*>((.|\n)*?)<\/ins>)/g,""))},newLine:{prefix:m.prefix,content:p(C)}}}},function(e,t,n){"use strict";function i(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;var n,i,r=[];for(n=0;n<=t.length;n++)r[n]=[n];for(i=0;i<=e.length;i++)r[0][i]=i;for(n=1;n<=t.length;n++)for(i=1;i<=e.length;i++)t.charAt(n-1)===e.charAt(i-1)?r[n][i]=r[n-1][i-1]:r[n][i]=Math.min(r[n-1][i-1]+1,Math.min(r[n][i-1]+1,r[n-1][i]+1));return r[t.length][e.length]}Object.defineProperty(t,"__esModule",{value:!0}),t.newMatcherFn=t.newDistanceFn=t.levenshtein=void 0,t.levenshtein=i,t.newDistanceFn=function(e){return function(t,n){var r=e(t).trim(),o=e(n).trim();return i(r,o)/(r.length+o.length)}},t.newMatcherFn=function(e){return function t(n,i,r,o){void 0===r&&(r=0),void 0===o&&(o=new Map);var l=function(t,n,i){void 0===i&&(i=new Map);for(var r,o=1/0,l=0;l<t.length;++l)for(var a=0;a<n.length;++a){var s=JSON.stringify([t[l],n[a]]),f=void 0;i.has(s)&&(f=i.get(s))||(f=e(t[l],n[a]),i.set(s,f)),f<o&&(r={indexA:l,indexB:a,score:o=f})}return r}(n,i,o);if(!l||n.length+i.length<3)return[[n,i]];var a=n.slice(0,l.indexA),s=i.slice(0,l.indexB),f=[n[l.indexA]],u=[i[l.indexB]],c=l.indexA+1,d=l.indexB+1,h=n.slice(c),p=i.slice(d),g=t(a,s,r+1,o),b=t(f,u,r+1,o),v=t(h,p,r+1,o),m=b;return(l.indexA>0||l.indexB>0)&&(m=g.concat(m)),(n.length>c||i.length>d)&&(m=m.concat(v)),m}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashCode=t.unifyPath=t.escapeForRegExp=void 0;var i=RegExp("["+["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"].join("\\")+"]","g");t.escapeForRegExp=function(e){return e.replace(i,"\\$&")},t.unifyPath=function(e){return e?e.replace(/\\/g,"/"):e},t.hashCode=function(e){var t,n,i=0;for(t=0,n=e.length;t<n;t++)i=(i<<5)-i+e.charCodeAt(t),i|=0;return i}},function(e,t,n){var i=n(14);i.Template=n(15).Template,i.template=i.Template,e.exports=i},function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Diff2HtmlUI=t.defaultDiff2HtmlUIConfig=void 0;var r=n(6),o=n(7);t.defaultDiff2HtmlUIConfig=i(i({},o.defaultDiff2HtmlConfig),{synchronisedScroll:!0,highlight:!0,fileListToggle:!0,fileListStartVisible:!1,smartSelection:!0});var l=function(){function e(e,n,r,l){void 0===r&&(r={}),this.hljs=null,this.currentSelectionColumnId=-1,this.config=i(i({},t.defaultDiff2HtmlUIConfig),r),this.diffHtml=void 0!==n?o.html(n,this.config):e.innerHTML,this.targetElement=e,void 0!==l&&(this.hljs=l)}return e.prototype.draw=function(){this.targetElement.innerHTML=this.diffHtml,this.config.synchronisedScroll&&this.synchronisedScroll(),this.config.highlight&&this.highlightCode(),this.config.fileListToggle&&this.fileListToggle(this.config.fileListStartVisible)},e.prototype.synchronisedScroll=function(){this.targetElement.querySelectorAll(".d2h-file-wrapper").forEach((function(e){var t=Array().slice.call(e.querySelectorAll(".d2h-file-side-diff")),n=t[0],i=t[1];if(void 0!==n&&void 0!==i){var r=function(e){null!==e&&null!==e.target&&(e.target===n?(i.scrollTop=n.scrollTop,i.scrollLeft=n.scrollLeft):(n.scrollTop=i.scrollTop,n.scrollLeft=i.scrollLeft))};n.addEventListener("scroll",r),i.addEventListener("scroll",r)}}))},e.prototype.fileListToggle=function(e){var t=this.targetElement.querySelector(".d2h-show"),n=this.targetElement.querySelector(".d2h-hide"),i=this.targetElement.querySelector(".d2h-file-list");if(null!==t&&null!==n&&null!==i){var r=function(){t.style.display="none",n.style.display="inline",i.style.display="block"},o=function(){t.style.display="inline",n.style.display="none",i.style.display="none"};t.addEventListener("click",(function(){return r()})),n.addEventListener("click",(function(){return o()}));var l=this.getHashTag();"files-summary-show"===l?r():"files-summary-hide"===l?o():e?r():o()}},e.prototype.highlightCode=function(){var e=this;if(null===this.hljs)throw new Error("Missing a `highlight.js` implementation. Please provide one when instantiating Diff2HtmlUI.");this.targetElement.querySelectorAll(".d2h-file-wrapper").forEach((function(t){var n,i;t.querySelectorAll(".d2h-code-line-ctn").forEach((function(o){if(null!==e.hljs){var l=o.textContent,a=o.parentNode;if(null!==l&&null!==a&&e.isElement(a)){var s=a.classList.contains("d2h-del")?n:i,f=t.getAttribute("data-lang"),u=f&&e.hljs.getLanguage(f)?e.hljs.highlight(f,l,!0,s):e.hljs.highlightAuto(l);e.instanceOfHighlightResult(u)&&(a.classList.contains("d2h-del")?n=u.top:(a.classList.contains("d2h-ins")||(n=u.top),i=u.top));var c=r.nodeStream(o);if(c.length){var d=document.createElementNS("http://www.w3.org/1999/xhtml","div");d.innerHTML=u.value,u.value=r.mergeStreams(c,r.nodeStream(d),l)}o.classList.add("hljs"),u.language&&o.classList.add(u.language),o.innerHTML=u.value}}}))}))},e.prototype.smartSelection=function(){console.warn("Smart selection is now enabled by default with CSS. No need to call this method anymore.")},e.prototype.instanceOfHighlightResult=function(e){return"top"in e},e.prototype.getHashTag=function(){var e=document.URL,t=e.indexOf("#"),n=null;return-1!==t&&(n=e.substr(t+1)),n},e.prototype.isElement=function(e){var t;return null!==e&&void 0!==(null===(t=e)||void 0===t?void 0:t.classList)},e}();t.Diff2HtmlUI=l},function(e,t,n){"use strict";function i(e){return e.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function r(e){return e.nodeName.toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0}),t.mergeStreams=t.nodeStream=void 0,t.nodeStream=function(e){var t=[],n=function(e,i){for(var o=e.firstChild;o;o=o.nextSibling)3===o.nodeType&&null!==o.nodeValue?i+=o.nodeValue.length:1===o.nodeType&&(t.push({event:"start",offset:i,node:o}),i=n(o,i),r(o).match(/br|hr|img|input/)||t.push({event:"stop",offset:i,node:o}));return i};return n(e,0),t},t.mergeStreams=function(e,t,n){var o=0,l="",a=[];function s(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:"start"===t[0].event?e:t:e.length?e:t}function f(e){if(null===(t=e)||void 0===(null===(n=t)||void 0===n?void 0:n.attributes))throw new Error("Node is not an Element");var t,n;l+="<"+r(e)+" "+Array().map.call(e.attributes,(function(e){return e.nodeName+'="'+i(e.value).replace(/"/g,""")+'"'})).join(" ")+">"}function u(e){l+="</"+r(e)+">"}function c(e){("start"===e.event?f:u)(e.node)}for(;e.length||t.length;){var d=s();if(l+=i(n.substring(o,d[0].offset)),o=d[0].offset,d===e){a.reverse().forEach(u);do{c(d.splice(0,1)[0]),d=s()}while(d===e&&d.length&&d[0].offset===o);a.reverse().forEach(f)}else"start"===d[0].event?a.push(d[0].node):a.pop(),c(d.splice(0,1)[0])}return l+i(n.substr(o))}},function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.html=t.parse=t.defaultDiff2HtmlConfig=void 0;var s=l(n(8)),f=l(n(9)),u=l(n(11)),c=l(n(12)),d=n(0),h=a(n(13));t.defaultDiff2HtmlConfig=i(i(i({},u.defaultLineByLineRendererConfig),c.defaultSideBySideRendererConfig),{outputFormat:d.OutputFormatType.LINE_BY_LINE,drawFileList:!0}),t.parse=function(e,n){return void 0===n&&(n={}),s.parse(e,i(i({},t.defaultDiff2HtmlConfig),n))},t.html=function(e,n){void 0===n&&(n={});var r=i(i({},t.defaultDiff2HtmlConfig),n),o="string"==typeof e?s.parse(e,r):e,l=new h.default(r);return(r.drawFileList?f.render(o,l):"")+("side-by-side"===r.outputFormat?new c.default(l,r).render(o):new u.default(l,r).render(o))}},function(e,t,n){"use strict";var i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var o=arguments[t],l=0,a=o.length;l<a;l++,r++)i[r]=o[l];return i};Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;var r=n(0),o=n(3);function l(e,t){var n=e.split(".");return n.length>1?n[n.length-1]:t}function a(e,t){return t.reduce((function(t,n){return t||e.startsWith(n)}),!1)}var s=["a/","b/","i/","w/","c/","o/"];function f(e,t,n){var r=void 0!==n?i(s,[n]):s,l=((t?new RegExp("^"+o.escapeForRegExp(t)+' "?(.+?)"?$'):new RegExp('^"?(.+?)"?$')).exec(e)||[])[1],a=void 0===l?"":l,f=r.find((function(e){return 0===a.indexOf(e)}));return(f?a.slice(f.length):a).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}t.parse=function(e,t){void 0===t&&(t={});var n=[],i=null,o=null,s=null,u=null,c=null,d=null,h=null,p=/^old mode (\d{6})/,g=/^new mode (\d{6})/,b=/^deleted file mode (\d{6})/,v=/^new file mode (\d{6})/,m=/^copy from "?(.+)"?/,y=/^copy to "?(.+)"?/,w=/^rename from "?(.+)"?/,S=/^rename to "?(.+)"?/,L=/^similarity index (\d+)%/,x=/^dissimilarity index (\d+)%/,C=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,T=/^Binary files (.*) and (.*) differ/,N=/^GIT binary patch/,E=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,O=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,_=/^new file mode (\d{6})/,H=/^deleted file mode (\d{6}),(\d{6})/,j=e.replace(/\/g,"").replace(/\r\n?/g,"\n").split("\n");function k(){null!==o&&null!==i&&(i.blocks.push(o),o=null)}function P(){null!==i&&(i.oldName||null===d||(i.oldName=d),i.newName||null===h||(i.newName=h),i.newName&&(n.push(i),i=null)),d=null,h=null}function F(){k(),P(),i={blocks:[],deletedLines:0,addedLines:0}}function M(e){var t;k(),null!==i&&((t=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(e))?(i.isCombined=!1,s=parseInt(t[1],10),c=parseInt(t[2],10)):(t=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(e))?(i.isCombined=!0,s=parseInt(t[1],10),u=parseInt(t[2],10),c=parseInt(t[3],10)):(e.startsWith("@@")&&console.error("Failed to parse lines, starting in 0!"),s=0,c=0,i.isCombined=!1)),o={lines:[],oldStartLine:s,oldStartLine2:u,newStartLine:c,header:e}}return j.forEach((function(e,n){if(e&&!e.startsWith("*")){var u,k=j[n-1],P=j[n+1],I=j[n+2];if(e.startsWith("diff")){F();if((u=/^diff --git "?(.+)"? "?(.+)"?/.exec(e))&&(d=f(u[1],void 0,t.dstPrefix),h=f(u[2],void 0,t.srcPrefix)),null===i)throw new Error("Where is my file !!!");i.isGitDiff=!0}else{if((!i||!i.isGitDiff&&i&&e.startsWith("--- ")&&P.startsWith("+++ ")&&I.startsWith("@@"))&&F(),e.startsWith("--- ")&&P.startsWith("+++ ")||e.startsWith("+++ ")&&k.startsWith("--- ")){if(i&&!i.oldName&&e.startsWith("--- ")&&(u=function(e,t){return f(e,"---",t)}(e,t.srcPrefix)))return i.oldName=u,void(i.language=l(i.oldName,i.language));if(i&&!i.newName&&e.startsWith("+++ ")&&(u=function(e,t){return f(e,"+++",t)}(e,t.dstPrefix)))return i.newName=u,void(i.language=l(i.newName,i.language))}if(i&&(e.startsWith("@@")||i.isGitDiff&&i.oldName&&i.newName&&!o))M(e);else if(o&&(e.startsWith("+")||e.startsWith("-")||e.startsWith(" ")))!function(e){if(null!==i&&null!==o&&null!==s&&null!==c){var t={content:e},n=i.isCombined?["+ "," +","++"]:["+"],l=i.isCombined?["- "," -","--"]:["-"];a(e,n)?(i.addedLines++,t.type=r.LineType.INSERT,t.oldNumber=void 0,t.newNumber=c++):a(e,l)?(i.deletedLines++,t.type=r.LineType.DELETE,t.oldNumber=s++,t.newNumber=void 0):(t.type=r.LineType.CONTEXT,t.oldNumber=s++,t.newNumber=c++),o.lines.push(t)}}(e);else{var D=!function(e,t){for(var n=t;n<j.length-3;){if(e.startsWith("diff"))return!1;if(j[n].startsWith("--- ")&&j[n+1].startsWith("+++ ")&&j[n+2].startsWith("@@"))return!0;n++}return!1}(e,n);if(null===i)throw new Error("Where is my file !!!");(u=p.exec(e))?i.oldMode=u[1]:(u=g.exec(e))?i.newMode=u[1]:(u=b.exec(e))?(i.deletedFileMode=u[1],i.isDeleted=!0):(u=v.exec(e))?(i.newFileMode=u[1],i.isNew=!0):(u=m.exec(e))?(D&&(i.oldName=u[1]),i.isCopy=!0):(u=y.exec(e))?(D&&(i.newName=u[1]),i.isCopy=!0):(u=w.exec(e))?(D&&(i.oldName=u[1]),i.isRename=!0):(u=S.exec(e))?(D&&(i.newName=u[1]),i.isRename=!0):(u=T.exec(e))?(i.isBinary=!0,i.oldName=f(u[1],void 0,t.srcPrefix),i.newName=f(u[2],void 0,t.dstPrefix),M("Binary file")):N.test(e)?(i.isBinary=!0,M(e)):(u=L.exec(e))?i.unchangedPercentage=parseInt(u[1],10):(u=x.exec(e))?i.changedPercentage=parseInt(u[1],10):(u=C.exec(e))?(i.checksumBefore=u[1],i.checksumAfter=u[2],u[3]&&(i.mode=u[3])):(u=E.exec(e))?(i.checksumBefore=[u[2],u[3]],i.checksumAfter=u[1]):(u=O.exec(e))?(i.oldMode=[u[2],u[3]],i.newMode=u[1]):(u=_.exec(e))?(i.newFileMode=u[1],i.isNew=!0):(u=H.exec(e))&&(i.deletedFileMode=u[1],i.isDeleted=!0)}}}})),k(),P(),n}},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.render=void 0;var l=o(n(1));t.render=function(e,t){var n=e.map((function(e){return t.render("file-summary","line",{fileHtmlId:l.getHtmlId(e),oldName:e.oldName,newName:e.newName,fileName:l.filenameDiff(e),deletedLines:"-"+e.deletedLines,addedLines:"+"+e.addedLines},{fileIcon:t.template("icon",l.getFileIcon(e))})})).join("\n");return t.render("file-summary","wrapper",{filesNumber:e.length,files:n})}},function(e,t,n){
|
|
2
2
|
/*!
|
|
3
3
|
|
|
4
4
|
diff v4.0.1
|
|
@@ -36,4 +36,4 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI
|
|
|
36
36
|
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
37
37
|
@license
|
|
38
38
|
*/
|
|
39
|
-
!function(e){"use strict";function n(){}function t(e,n,t,i,r){for(var l=0,o=n.length,s=0,a=0;l<o;l++){var f=n[l];if(f.removed){if(f.value=e.join(i.slice(a,a+f.count)),a+=f.count,l&&n[l-1].added){var u=n[l-1];n[l-1]=n[l],n[l]=u}}else{if(!f.added&&r){var d=t.slice(s,s+f.count);d=d.map((function(e,n){var t=i[a+n];return t.length>e.length?t:e})),f.value=e.join(d)}else f.value=e.join(t.slice(s,s+f.count));s+=f.count,f.added||(a+=f.count)}}var c=n[o-1];return o>1&&"string"==typeof c.value&&(c.added||c.removed)&&e.equals("",c.value)&&(n[o-2].value+=c.value,n.pop()),n}function i(e){return{newPos:e.newPos,components:e.components.slice(0)}}n.prototype={diff:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=r.callback;"function"==typeof r&&(l=r,r={}),this.options=r;var o=this;function s(e){return l?(setTimeout((function(){l(void 0,e)}),0),!0):e}e=this.castInput(e),n=this.castInput(n),e=this.removeEmpty(this.tokenize(e));var a=(n=this.removeEmpty(this.tokenize(n))).length,f=e.length,u=1,d=a+f,c=[{newPos:-1,components:[]}],h=this.extractCommon(c[0],n,e,0);if(c[0].newPos+1>=a&&h+1>=f)return s([{value:this.join(n),count:n.length}]);function p(){for(var r=-1*u;r<=u;r+=2){var l=void 0,d=c[r-1],h=c[r+1],p=(h?h.newPos:0)-r;d&&(c[r-1]=void 0);var g=d&&d.newPos+1<a,v=h&&0<=p&&p<f;if(g||v){if(!g||v&&d.newPos<h.newPos?(l=i(h),o.pushComponent(l.components,void 0,!0)):((l=d).newPos++,o.pushComponent(l.components,!0,void 0)),p=o.extractCommon(l,n,e,r),l.newPos+1>=a&&p+1>=f)return s(t(o,l.components,n,e,o.useLongestToken));c[r]=l}else c[r]=void 0}u++}if(l)!function e(){setTimeout((function(){if(u>d)return l();p()||e()}),0)}();else for(;u<=d;){var g=p();if(g)return g}},pushComponent:function(e,n,t){var i=e[e.length-1];i&&i.added===n&&i.removed===t?e[e.length-1]={count:i.count+1,added:n,removed:t}:e.push({count:1,added:n,removed:t})},extractCommon:function(e,n,t,i){for(var r=n.length,l=t.length,o=e.newPos,s=o-i,a=0;o+1<r&&s+1<l&&this.equals(n[o+1],t[s+1]);)o++,s++,a++;return a&&e.components.push({count:a}),e.newPos=o,s},equals:function(e,n){return this.options.comparator?this.options.comparator(e,n):e===n||this.options.ignoreCase&&e.toLowerCase()===n.toLowerCase()},removeEmpty:function(e){for(var n=[],t=0;t<e.length;t++)e[t]&&n.push(e[t]);return n},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};var r=new n;function l(e,n){if("function"==typeof e)n.callback=e;else if(e)for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);return n}var o=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,s=/\S/,a=new n;a.equals=function(e,n){return this.options.ignoreCase&&(e=e.toLowerCase(),n=n.toLowerCase()),e===n||this.options.ignoreWhitespace&&!s.test(e)&&!s.test(n)},a.tokenize=function(e){for(var n=e.split(/(\s+|[()[\]{}'"]|\b)/),t=0;t<n.length-1;t++)!n[t+1]&&n[t+2]&&o.test(n[t])&&o.test(n[t+2])&&(n[t]+=n[t+2],n.splice(t+1,2),t--);return n};var f=new n;function u(e,n,t){return f.diff(e,n,t)}f.tokenize=function(e){var n=[],t=e.split(/(\n|\r\n)/);t[t.length-1]||t.pop();for(var i=0;i<t.length;i++){var r=t[i];i%2&&!this.options.newlineIsToken?n[n.length-1]+=r:(this.options.ignoreWhitespace&&(r=r.trim()),n.push(r))}return n};var d=new n;d.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var c=new n;function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e){return function(e){if(Array.isArray(e)){for(var n=0,t=new Array(e.length);n<e.length;n++)t[n]=e[n];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}c.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var g=Object.prototype.toString,v=new n;function b(e,n,t,i,r){var l,o;for(n=n||[],t=t||[],i&&(e=i(r,e)),l=0;l<n.length;l+=1)if(n[l]===e)return t[l];if("[object Array]"===g.call(e)){for(n.push(e),o=new Array(e.length),t.push(o),l=0;l<e.length;l+=1)o[l]=b(e[l],n,t,i,r);return n.pop(),t.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),"object"===h(e)&&null!==e){n.push(e),o={},t.push(o);var s,a=[];for(s in e)e.hasOwnProperty(s)&&a.push(s);for(a.sort(),l=0;l<a.length;l+=1)o[s=a[l]]=b(e[s],n,t,i,s);n.pop(),t.pop()}else o=e;return o}v.useLongestToken=!0,v.tokenize=f.tokenize,v.castInput=function(e){var n=this.options,t=n.undefinedReplacement,i=n.stringifyReplacer,r=void 0===i?function(e,n){return void 0===n?t:n}:i;return"string"==typeof e?e:JSON.stringify(b(e,null,null,r),r," ")},v.equals=function(e,t){return n.prototype.equals.call(v,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};var m=new n;function y(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e.split(/\r\n|[\n\v\f\r\x85]/),i=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],r=[],l=0;function o(){var e={};for(r.push(e);l<t.length;){var i=t[l];if(/^(\-\-\-|\+\+\+|@@)\s/.test(i))break;var o=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(i);o&&(e.index=o[1]),l++}for(s(e),s(e),e.hunks=[];l<t.length;){var f=t[l];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(f))break;if(/^@@/.test(f))e.hunks.push(a());else{if(f&&n.strict)throw new Error("Unknown line "+(l+1)+" "+JSON.stringify(f));l++}}}function s(e){var n=/^(---|\+\+\+)\s+(.*)$/.exec(t[l]);if(n){var i="---"===n[1]?"old":"new",r=n[2].split("\t",2),o=r[0].replace(/\\\\/g,"\\");/^".*"$/.test(o)&&(o=o.substr(1,o.length-2)),e[i+"FileName"]=o,e[i+"Header"]=(r[1]||"").trim(),l++}}function a(){for(var e=l,r=t[l++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),o={oldStart:+r[1],oldLines:+r[2]||1,newStart:+r[3],newLines:+r[4]||1,lines:[],linedelimiters:[]},s=0,a=0;l<t.length&&!(0===t[l].indexOf("--- ")&&l+2<t.length&&0===t[l+1].indexOf("+++ ")&&0===t[l+2].indexOf("@@"));l++){var f=0==t[l].length&&l!=t.length-1?" ":t[l][0];if("+"!==f&&"-"!==f&&" "!==f&&"\\"!==f)break;o.lines.push(t[l]),o.linedelimiters.push(i[l]||"\n"),"+"===f?s++:"-"===f?a++:" "===f&&(s++,a++)}if(s||1!==o.newLines||(o.newLines=0),a||1!==o.oldLines||(o.oldLines=0),n.strict){if(s!==o.newLines)throw new Error("Added line count did not match for hunk at line "+(e+1));if(a!==o.oldLines)throw new Error("Removed line count did not match for hunk at line "+(e+1))}return o}for(;l<t.length;)o();return r}function w(e,n,t){var i=!0,r=!1,l=!1,o=1;return function s(){if(i&&!l){if(r?o++:i=!1,e+o<=t)return o;l=!0}if(!r)return l||(i=!0),n<=e-o?-o++:(r=!0,s())}}function L(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n&&(n=y(n)),Array.isArray(n)){if(n.length>1)throw new Error("applyPatch only works with a single input.");n=n[0]}var i,r,l=e.split(/\r\n|[\n\v\f\r\x85]/),o=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],s=n.hunks,a=t.compareLine||function(e,n,t,i){return n===i},f=0,u=t.fuzzFactor||0,d=0,c=0;function h(e,n){for(var t=0;t<e.lines.length;t++){var i=e.lines[t],r=i.length>0?i[0]:" ",o=i.length>0?i.substr(1):i;if(" "===r||"-"===r){if(!a(n+1,l[n],r,o)&&++f>u)return!1;n++}}return!0}for(var p=0;p<s.length;p++){for(var g=s[p],v=l.length-g.oldLines,b=0,m=c+g.oldStart-1,L=w(m,d,v);void 0!==b;b=L())if(h(g,m+b)){g.offset=c+=b;break}if(void 0===b)return!1;d=g.offset+g.oldStart+g.oldLines}for(var S=0,x=0;x<s.length;x++){var C=s[x],T=C.oldStart+C.offset+S-1;S+=C.newLines-C.oldLines,T<0&&(T=0);for(var N=0;N<C.lines.length;N++){var E=C.lines[N],H=E.length>0?E[0]:" ",O=E.length>0?E.substr(1):E,k=C.linedelimiters[N];if(" "===H)T++;else if("-"===H)l.splice(T,1),o.splice(T,1);else if("+"===H)l.splice(T,0,O),o.splice(T,0,k),T++;else if("\\"===H){var _=C.lines[N-1]?C.lines[N-1][0]:null;"+"===_?i=!0:"-"===_&&(r=!0)}}}if(i)for(;!l[l.length-1];)l.pop(),o.pop();else r&&(l.push(""),o.push("\n"));for(var j=0;j<l.length-1;j++)l[j]=l[j]+o[j];return l.join("")}function S(e,n,t,i,r,l,o){o||(o={}),void 0===o.context&&(o.context=4);var s=u(t,i,o);function a(e){return e.map((function(e){return" "+e}))}s.push({value:"",lines:[]});for(var f=[],d=0,c=0,h=[],g=1,v=1,b=function(e){var n=s[e],r=n.lines||n.value.replace(/\n$/,"").split("\n");if(n.lines=r,n.added||n.removed){var l;if(!d){var u=s[e-1];d=g,c=v,u&&(h=o.context>0?a(u.lines.slice(-o.context)):[],d-=h.length,c-=h.length)}(l=h).push.apply(l,p(r.map((function(e){return(n.added?"+":"-")+e})))),n.added?v+=r.length:g+=r.length}else{if(d)if(r.length<=2*o.context&&e<s.length-2){var b;(b=h).push.apply(b,p(a(r)))}else{var m,y=Math.min(r.length,o.context);(m=h).push.apply(m,p(a(r.slice(0,y))));var w={oldStart:d,oldLines:g-d+y,newStart:c,newLines:v-c+y,lines:h};if(e>=s.length-2&&r.length<=o.context){var L=/\n$/.test(t),S=/\n$/.test(i),x=0==r.length&&h.length>w.oldLines;!L&&x&&h.splice(w.oldLines,0,"\"),(L||x)&&S||h.push("\")}f.push(w),d=0,c=0,h=[]}g+=r.length,v+=r.length}},m=0;m<s.length;m++)b(m);return{oldFileName:e,newFileName:n,oldHeader:r,newHeader:l,hunks:f}}function x(e,n,t,i,r,l,o){var s=S(e,n,t,i,r,l,o),a=[];e==n&&a.push("Index: "+e),a.push("==================================================================="),a.push("--- "+s.oldFileName+(void 0===s.oldHeader?"":"\t"+s.oldHeader)),a.push("+++ "+s.newFileName+(void 0===s.newHeader?"":"\t"+s.newHeader));for(var f=0;f<s.hunks.length;f++){var u=s.hunks[f];a.push("@@ -"+u.oldStart+","+u.oldLines+" +"+u.newStart+","+u.newLines+" @@"),a.push.apply(a,u.lines)}return a.join("\n")+"\n"}function C(e,n){if(n.length>e.length)return!1;for(var t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function T(e){var n=function e(n){var t=0,i=0;return n.forEach((function(n){if("string"!=typeof n){var r=e(n.mine),l=e(n.theirs);void 0!==t&&(r.oldLines===l.oldLines?t+=r.oldLines:t=void 0),void 0!==i&&(r.newLines===l.newLines?i+=r.newLines:i=void 0)}else void 0===i||"+"!==n[0]&&" "!==n[0]||i++,void 0===t||"-"!==n[0]&&" "!==n[0]||t++})),{oldLines:t,newLines:i}}(e.lines),t=n.oldLines,i=n.newLines;void 0!==t?e.oldLines=t:delete e.oldLines,void 0!==i?e.newLines=i:delete e.newLines}function N(e,n){if("string"==typeof e){if(/^@@/m.test(e)||/^Index:/m.test(e))return y(e)[0];if(!n)throw new Error("Must provide a base reference or pass in a patch");return S(void 0,void 0,n,e)}return e}function E(e){return e.newFileName&&e.newFileName!==e.oldFileName}function H(e,n,t){return n===t?n:(e.conflict=!0,{mine:n,theirs:t})}function O(e,n){return e.oldStart<n.oldStart&&e.oldStart+e.oldLines<n.oldStart}function k(e,n){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+n,newLines:e.newLines,lines:e.lines}}function _(e,n,t,i,r){var l={offset:n,lines:t,index:0},o={offset:i,lines:r,index:0};for(M(e,l,o),M(e,o,l);l.index<l.lines.length&&o.index<o.lines.length;){var s=l.lines[l.index],a=o.lines[o.index];if("-"!==s[0]&&"+"!==s[0]||"-"!==a[0]&&"+"!==a[0])if("+"===s[0]&&" "===a[0]){var f;(f=e.lines).push.apply(f,p(D(l)))}else if("+"===a[0]&&" "===s[0]){var u;(u=e.lines).push.apply(u,p(D(o)))}else"-"===s[0]&&" "===a[0]?F(e,l,o):"-"===a[0]&&" "===s[0]?F(e,o,l,!0):s===a?(e.lines.push(s),l.index++,o.index++):I(e,D(l),D(o));else j(e,l,o)}P(e,l),P(e,o),T(e)}function j(e,n,t){var i,r,l=D(n),o=D(t);if(A(l)&&A(o)){var s,a;if(C(l,o)&&R(t,l,l.length-o.length))return void(s=e.lines).push.apply(s,p(l));if(C(o,l)&&R(n,o,o.length-l.length))return void(a=e.lines).push.apply(a,p(o))}else if(r=o,(i=l).length===r.length&&C(i,r)){var f;return void(f=e.lines).push.apply(f,p(l))}I(e,l,o)}function F(e,n,t,i){var r,l=D(n),o=function(e,n){for(var t=[],i=[],r=0,l=!1,o=!1;r<n.length&&e.index<e.lines.length;){var s=e.lines[e.index],a=n[r];if("+"===a[0])break;if(l=l||" "!==s[0],i.push(a),r++,"+"===s[0])for(o=!0;"+"===s[0];)t.push(s),s=e.lines[++e.index];a.substr(1)===s.substr(1)?(t.push(s),e.index++):o=!0}if("+"===(n[r]||"")[0]&&l&&(o=!0),o)return t;for(;r<n.length;)i.push(n[r++]);return{merged:i,changes:t}}(t,l);o.merged?(r=e.lines).push.apply(r,p(o.merged)):I(e,i?o:l,i?l:o)}function I(e,n,t){e.conflict=!0,e.lines.push({conflict:!0,mine:n,theirs:t})}function M(e,n,t){for(;n.offset<t.offset&&n.index<n.lines.length;){var i=n.lines[n.index++];e.lines.push(i),n.offset++}}function P(e,n){for(;n.index<n.lines.length;){var t=n.lines[n.index++];e.lines.push(t)}}function D(e){for(var n=[],t=e.lines[e.index][0];e.index<e.lines.length;){var i=e.lines[e.index];if("-"===t&&"+"===i[0]&&(t="+"),t!==i[0])break;n.push(i),e.index++}return n}function A(e){return e.reduce((function(e,n){return e&&"-"===n[0]}),!0)}function R(e,n,t){for(var i=0;i<t;i++){var r=n[n.length-t+i].substr(1);if(e.lines[e.index+i]!==" "+r)return!1}return e.index+=t,!0}m.tokenize=function(e){return e.slice()},m.join=m.removeEmpty=function(e){return e},e.Diff=n,e.diffChars=function(e,n,t){return r.diff(e,n,t)},e.diffWords=function(e,n,t){return t=l(t,{ignoreWhitespace:!0}),a.diff(e,n,t)},e.diffWordsWithSpace=function(e,n,t){return a.diff(e,n,t)},e.diffLines=u,e.diffTrimmedLines=function(e,n,t){var i=l(t,{ignoreWhitespace:!0});return f.diff(e,n,i)},e.diffSentences=function(e,n,t){return d.diff(e,n,t)},e.diffCss=function(e,n,t){return c.diff(e,n,t)},e.diffJson=function(e,n,t){return v.diff(e,n,t)},e.diffArrays=function(e,n,t){return m.diff(e,n,t)},e.structuredPatch=S,e.createTwoFilesPatch=x,e.createPatch=function(e,n,t,i,r,l){return x(e,e,n,t,i,r,l)},e.applyPatch=L,e.applyPatches=function(e,n){"string"==typeof e&&(e=y(e));var t=0;!function i(){var r=e[t++];if(!r)return n.complete();n.loadFile(r,(function(e,t){if(e)return n.complete(e);var l=L(t,r,n);n.patched(r,l,(function(e){if(e)return n.complete(e);i()}))}))}()},e.parsePatch=y,e.merge=function(e,n,t){e=N(e,t),n=N(n,t);var i={};(e.index||n.index)&&(i.index=e.index||n.index),(e.newFileName||n.newFileName)&&(E(e)?E(n)?(i.oldFileName=H(i,e.oldFileName,n.oldFileName),i.newFileName=H(i,e.newFileName,n.newFileName),i.oldHeader=H(i,e.oldHeader,n.oldHeader),i.newHeader=H(i,e.newHeader,n.newHeader)):(i.oldFileName=e.oldFileName,i.newFileName=e.newFileName,i.oldHeader=e.oldHeader,i.newHeader=e.newHeader):(i.oldFileName=n.oldFileName||e.oldFileName,i.newFileName=n.newFileName||e.newFileName,i.oldHeader=n.oldHeader||e.oldHeader,i.newHeader=n.newHeader||e.newHeader)),i.hunks=[];for(var r=0,l=0,o=0,s=0;r<e.hunks.length||l<n.hunks.length;){var a=e.hunks[r]||{oldStart:1/0},f=n.hunks[l]||{oldStart:1/0};if(O(a,f))i.hunks.push(k(a,o)),r++,s+=a.newLines-a.oldLines;else if(O(f,a))i.hunks.push(k(f,s)),l++,o+=f.newLines-f.oldLines;else{var u={oldStart:Math.min(a.oldStart,f.oldStart),oldLines:0,newStart:Math.min(a.newStart+o,f.oldStart+s),newLines:0,lines:[]};_(u,a.oldStart,a.lines,f.oldStart,f.lines),l++,r++,i.hunks.push(u)}}return i},e.convertChangesToDMP=function(e){for(var n,t,i=[],r=0;r<e.length;r++)t=(n=e[r]).added?1:n.removed?-1:0,i.push([t,n.value]);return i},e.convertChangesToXML=function(e){for(var n=[],t=0;t<e.length;t++){var i=e[t];i.added?n.push("<ins>"):i.removed&&n.push("<del>"),n.push((r=i.value,void 0,r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""))),i.added?n.push("</ins>"):i.removed&&n.push("</del>")}var r;return n.join("")},e.canonicalize=b,Object.defineProperty(e,"__esModule",{value:!0})}(n)},function(e,n,t){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n};Object.defineProperty(n,"__esModule",{value:!0});var l=r(t(2)),o=r(t(1)),s=t(0);n.defaultLineByLineRendererConfig=i(i({},o.defaultRenderConfig),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200});var a=function(){function e(e,t){void 0===t&&(t={}),this.hoganUtils=e,this.config=i(i({},n.defaultLineByLineRendererConfig),t)}return e.prototype.render=function(e){var n=this,t=e.map((function(e){var t;return t=e.blocks.length?n.generateFileHtml(e):n.generateEmptyDiff(),n.makeFileDiffHtml(e,t)})).join("\n");return this.hoganUtils.render("generic","wrapper",{content:t})},e.prototype.makeFileDiffHtml=function(e,n){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";var t=this.hoganUtils.template("line-by-line","file-diff"),i=this.hoganUtils.template("generic","file-path"),r=this.hoganUtils.template("icon","file"),l=this.hoganUtils.template("tag",o.getFileIcon(e));return t.render({file:e,fileHtmlId:o.getHtmlId(e),diffs:n,filePath:i.render({fileDiffName:o.filenameDiff(e)},{fileIcon:r,fileTag:l})})},e.prototype.generateEmptyDiff=function(){return this.hoganUtils.render("generic","empty-diff",{contentClass:"d2h-code-line",CSSLineClass:o.CSSLineClass})},e.prototype.generateFileHtml=function(e){var n=this,t=l.newMatcherFn(l.newDistanceFn((function(n){return o.deconstructLine(n.content,e.isCombined).content})));return e.blocks.map((function(i){var r=n.hoganUtils.render("generic","block-header",{CSSLineClass:o.CSSLineClass,blockHeader:o.escapeForHtml(i.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return n.applyLineGroupping(i).forEach((function(i){var l=i[0],s=i[1],a=i[2];if(s.length&&a.length&&!l.length)n.applyRematchMatching(s,a,t).map((function(t){var i=t[0],l=t[1],o=n.processChangedLines(e.isCombined,i,l),s=o.left,a=o.right;r+=s,r+=a}));else if(l.length)l.forEach((function(t){var i=o.deconstructLine(t.content,e.isCombined),l=i.prefix,s=i.content;r+=n.generateSingleLineHtml({type:o.CSSLineClass.CONTEXT,prefix:l,content:s,oldNumber:t.oldNumber,newNumber:t.newNumber})}));else if(s.length||a.length){var f=n.processChangedLines(e.isCombined,s,a),u=f.left,d=f.right;r+=u,r+=d}else console.error("Unknown state reached while processing groups of lines",l,s,a)})),r})).join("\n")},e.prototype.applyLineGroupping=function(e){for(var n=[],t=[],i=[],r=0;r<e.lines.length;r++){var l=e.lines[r];(l.type!==s.LineType.INSERT&&i.length||l.type===s.LineType.CONTEXT&&t.length>0)&&(n.push([[],t,i]),t=[],i=[]),l.type===s.LineType.CONTEXT?n.push([[l],[],[]]):l.type===s.LineType.INSERT&&0===t.length?n.push([[],[],[l]]):l.type===s.LineType.INSERT&&t.length>0?i.push(l):l.type===s.LineType.DELETE&&t.push(l)}return(t.length||i.length)&&(n.push([[],t,i]),t=[],i=[]),n},e.prototype.applyRematchMatching=function(e,n,t){var i=e.length*n.length,r=Math.max.apply(null,[0].concat(e.concat(n).map((function(e){return e.content.length}))));return i<this.config.matchingMaxComparisons&&r<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?t(e,n):[[e,n]]},e.prototype.processChangedLines=function(e,n,t){for(var r={right:"",left:""},l=Math.max(n.length,t.length),s=0;s<l;s++){var a=n[s],f=t[s],u=void 0!==a&&void 0!==f?o.diffHighlight(a.content,f.content,e,this.config):void 0,d=void 0!==a&&void 0!==a.oldNumber?i(i({},void 0!==u?{prefix:u.oldLine.prefix,content:u.oldLine.content,type:o.CSSLineClass.DELETE_CHANGES}:i(i({},o.deconstructLine(a.content,e)),{type:o.toCSSClass(a.type)})),{oldNumber:a.oldNumber,newNumber:a.newNumber}):void 0,c=void 0!==f&&void 0!==f.newNumber?i(i({},void 0!==u?{prefix:u.newLine.prefix,content:u.newLine.content,type:o.CSSLineClass.INSERT_CHANGES}:i(i({},o.deconstructLine(f.content,e)),{type:o.toCSSClass(f.type)})),{oldNumber:f.oldNumber,newNumber:f.newNumber}):void 0,h=this.generateLineHtml(d,c),p=h.left,g=h.right;r.left+=p,r.right+=g}return r},e.prototype.generateLineHtml=function(e,n){return{left:this.generateSingleLineHtml(e),right:this.generateSingleLineHtml(n)}},e.prototype.generateSingleLineHtml=function(e){if(void 0===e)return"";var n=this.hoganUtils.render("line-by-line","numbers",{oldNumber:e.oldNumber||"",newNumber:e.newNumber||""});return this.hoganUtils.render("generic","line",{type:e.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:" "===e.prefix?" ":e.prefix,content:e.content,lineNumber:n})},e}();n.default=a},function(e,n,t){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n};Object.defineProperty(n,"__esModule",{value:!0});var l=r(t(2)),o=r(t(1)),s=t(0);n.defaultSideBySideRendererConfig=i(i({},o.defaultRenderConfig),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200});var a=function(){function e(e,t){void 0===t&&(t={}),this.hoganUtils=e,this.config=i(i({},n.defaultSideBySideRendererConfig),t)}return e.prototype.render=function(e){var n=this,t=e.map((function(e){var t;return t=e.blocks.length?n.generateFileHtml(e):n.generateEmptyDiff(),n.makeFileDiffHtml(e,t)})).join("\n");return this.hoganUtils.render("generic","wrapper",{content:t})},e.prototype.makeFileDiffHtml=function(e,n){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";var t=this.hoganUtils.template("side-by-side","file-diff"),i=this.hoganUtils.template("generic","file-path"),r=this.hoganUtils.template("icon","file"),l=this.hoganUtils.template("tag",o.getFileIcon(e));return t.render({file:e,fileHtmlId:o.getHtmlId(e),diffs:n,filePath:i.render({fileDiffName:o.filenameDiff(e)},{fileIcon:r,fileTag:l})})},e.prototype.generateEmptyDiff=function(){return{right:"",left:this.hoganUtils.render("generic","empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:o.CSSLineClass})}},e.prototype.generateFileHtml=function(e){var n=this,t=l.newMatcherFn(l.newDistanceFn((function(n){return o.deconstructLine(n.content,e.isCombined).content})));return e.blocks.map((function(i){var r={left:n.makeHeaderHtml(i.header),right:n.makeHeaderHtml("")};return n.applyLineGroupping(i).forEach((function(i){var l=i[0],s=i[1],a=i[2];if(s.length&&a.length&&!l.length)n.applyRematchMatching(s,a,t).map((function(t){var i=t[0],l=t[1],o=n.processChangedLines(e.isCombined,i,l),s=o.left,a=o.right;r.left+=s,r.right+=a}));else if(l.length)l.forEach((function(t){var i=o.deconstructLine(t.content,e.isCombined),l=i.prefix,s=i.content,a=n.generateLineHtml({type:o.CSSLineClass.CONTEXT,prefix:l,content:s,number:t.oldNumber},{type:o.CSSLineClass.CONTEXT,prefix:l,content:s,number:t.newNumber}),f=a.left,u=a.right;r.left+=f,r.right+=u}));else if(s.length||a.length){var f=n.processChangedLines(e.isCombined,s,a),u=f.left,d=f.right;r.left+=u,r.right+=d}else console.error("Unknown state reached while processing groups of lines",l,s,a)})),r})).reduce((function(e,n){return{left:e.left+n.left,right:e.right+n.right}}),{left:"",right:""})},e.prototype.applyLineGroupping=function(e){for(var n=[],t=[],i=[],r=0;r<e.lines.length;r++){var l=e.lines[r];(l.type!==s.LineType.INSERT&&i.length||l.type===s.LineType.CONTEXT&&t.length>0)&&(n.push([[],t,i]),t=[],i=[]),l.type===s.LineType.CONTEXT?n.push([[l],[],[]]):l.type===s.LineType.INSERT&&0===t.length?n.push([[],[],[l]]):l.type===s.LineType.INSERT&&t.length>0?i.push(l):l.type===s.LineType.DELETE&&t.push(l)}return(t.length||i.length)&&(n.push([[],t,i]),t=[],i=[]),n},e.prototype.applyRematchMatching=function(e,n,t){var i=e.length*n.length,r=Math.max.apply(null,[0].concat(e.concat(n).map((function(e){return e.content.length}))));return i<this.config.matchingMaxComparisons&&r<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?t(e,n):[[e,n]]},e.prototype.makeHeaderHtml=function(e){return this.hoganUtils.render("generic","block-header",{CSSLineClass:o.CSSLineClass,blockHeader:o.escapeForHtml(e),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})},e.prototype.processChangedLines=function(e,n,t){for(var r={right:"",left:""},l=Math.max(n.length,t.length),s=0;s<l;s++){var a=n[s],f=t[s],u=void 0!==a&&void 0!==f?o.diffHighlight(a.content,f.content,e,this.config):void 0,d=void 0!==a&&void 0!==a.oldNumber?i(i({},void 0!==u?{prefix:u.oldLine.prefix,content:u.oldLine.content,type:o.CSSLineClass.DELETE_CHANGES}:i(i({},o.deconstructLine(a.content,e)),{type:o.toCSSClass(a.type)})),{number:a.oldNumber}):void 0,c=void 0!==f&&void 0!==f.newNumber?i(i({},void 0!==u?{prefix:u.newLine.prefix,content:u.newLine.content,type:o.CSSLineClass.INSERT_CHANGES}:i(i({},o.deconstructLine(f.content,e)),{type:o.toCSSClass(f.type)})),{number:f.newNumber}):void 0,h=this.generateLineHtml(d,c),p=h.left,g=h.right;r.left+=p,r.right+=g}return r},e.prototype.generateLineHtml=function(e,n){return{left:this.generateSingleHtml(e),right:this.generateSingleHtml(n)}},e.prototype.generateSingleHtml=function(e){return this.hoganUtils.render("generic","line",{type:(null==e?void 0:e.type)||o.CSSLineClass.CONTEXT+" d2h-emptyplaceholder",lineClass:void 0!==e?"d2h-code-side-linenumber":"d2h-code-side-linenumber d2h-code-side-emptyplaceholder",contentClass:void 0!==e?"d2h-code-side-line":"d2h-code-side-line d2h-code-side-emptyplaceholder",prefix:" "===(null==e?void 0:e.prefix)?" ":null==e?void 0:e.prefix,content:null==e?void 0:e.content,lineNumber:null==e?void 0:e.number})},e}();n.default=a},function(e,n,t){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)},r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n};Object.defineProperty(n,"__esModule",{value:!0});var l=r(t(4)),o=t(16),s=function(){function e(e){var n=e.compiledTemplates,t=void 0===n?{}:n,r=e.rawTemplates,s=void 0===r?{}:r,a=Object.entries(s).reduce((function(e,n){var t,r=n[0],o=n[1],s=l.compile(o,{asString:!1});return i(i({},e),((t={})[r]=s,t))}),{});this.preCompiledTemplates=i(i(i({},o.defaultTemplates),t),a)}return e.compile=function(e){return l.compile(e,{asString:!1})},e.prototype.render=function(e,n,t,i,r){var l=this.templateKey(e,n);try{return this.preCompiledTemplates[l].render(t,i,r)}catch(e){throw new Error("Could not find template to render '"+l+"'")}},e.prototype.template=function(e,n){return this.preCompiledTemplates[this.templateKey(e,n)]},e.prototype.templateKey=function(e,n){return e+"-"+n},e}();n.default=s},function(e,n,t){!function(e){var n=/\S/,t=/\"/g,i=/\n/g,r=/\r/g,l=/\\/g,o=/\u2028/,s=/\u2029/;function a(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function f(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function u(e,n,t){if(n.charAt(t)!=e.charAt(0))return!1;for(var i=1,r=e.length;i<r;i++)if(n.charAt(t+i)!=e.charAt(i))return!1;return!0}e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(t,i){var r=t.length,l=0,o=null,s=null,d="",c=[],h=!1,p=0,g=0,v="{{",b="}}";function m(){d.length>0&&(c.push({tag:"_t",text:new String(d)}),d="")}function y(t,i){if(m(),t&&function(){for(var t=!0,i=g;i<c.length;i++)if(!(t=e.tags[c[i].tag]<e.tags._v||"_t"==c[i].tag&&null===c[i].text.match(n)))return!1;return t}())for(var r,l=g;l<c.length;l++)c[l].text&&((r=c[l+1])&&">"==r.tag&&(r.indent=c[l].text.toString()),c.splice(l,1));else i||c.push({tag:"\n"});h=!1,g=c.length}function w(e,n){var t="="+b,i=e.indexOf(t,n),r=f(e.substring(e.indexOf("=",n)+1,i)).split(" ");return v=r[0],b=r[r.length-1],i+t.length-1}for(i&&(i=i.split(" "),v=i[0],b=i[1]),p=0;p<r;p++)0==l?u(v,t,p)?(--p,m(),l=1):"\n"==t.charAt(p)?y(h):d+=t.charAt(p):1==l?(p+=v.length-1,"="==(o=(s=e.tags[t.charAt(p+1)])?t.charAt(p+1):"_v")?(p=w(t,p),l=0):(s&&p++,l=2),h=p):u(b,t,p)?(c.push({tag:o,n:f(d),otag:v,ctag:b,i:"/"==o?h-v.length:p+b.length}),d="",p+=b.length-1,l=0,"{"==o&&("}}"==b?p++:a(c[c.length-1]))):d+=t.charAt(p);return y(h,!0),c};var d={_t:!0,"\n":!0,$:!0,"/":!0};function c(e,n){for(var t=0,i=n.length;t<i;t++)if(n[t].o==e.n)return e.tag="#",!0}function h(e,n,t){for(var i=0,r=t.length;i<r;i++)if(t[i].c==e&&t[i].o==n)return!0}function p(e){var n=[];for(var t in e.partials)n.push('"'+v(t)+'":{name:"'+v(e.partials[t].name)+'", '+p(e.partials[t])+"}");return"partials: {"+n.join(",")+"}, subs: "+function(e){var n=[];for(var t in e)n.push('"'+v(t)+'": function(c,p,t,i) {'+e[t]+"}");return"{ "+n.join(",")+" }"}(e.subs)}e.stringify=function(n,t,i){return"{code: function (c,p,i) { "+e.wrapMain(n.code)+" },"+p(n)+"}"};var g=0;function v(e){return e.replace(l,"\\\\").replace(t,'\\"').replace(i,"\\n").replace(r,"\\r").replace(o,"\\u2028").replace(s,"\\u2029")}function b(e){return~e.indexOf(".")?"d":"f"}function m(e,n){var t="<"+(n.prefix||"")+e.n+g++;return n.partials[t]={name:e.n,partials:{}},n.code+='t.b(t.rp("'+v(t)+'",c,p,"'+(e.indent||"")+'"));',t}function y(e,n){n.code+="t.b(t.t(t."+b(e.n)+'("'+v(e.n)+'",c,p,0)));'}function w(e){return"t.b("+e+");"}e.generate=function(n,t,i){g=0;var r={code:"",subs:{},partials:{}};return e.walk(n,r),i.asString?this.stringify(r,t,i):this.makeTemplate(r,t,i)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,n,t){var i=this.makePartials(e);return i.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(i,n,this,t)},e.makePartials=function(e){var n,t={subs:{},partials:e.partials,name:e.name};for(n in t.partials)t.partials[n]=this.makePartials(t.partials[n]);for(n in e.subs)t.subs[n]=new Function("c","p","t","i",e.subs[n]);return t},e.codegen={"#":function(n,t){t.code+="if(t.s(t."+b(n.n)+'("'+v(n.n)+'",c,p,1),c,p,0,'+n.i+","+n.end+',"'+n.otag+" "+n.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(n.nodes,t),t.code+="});c.pop();}"},"^":function(n,t){t.code+="if(!t.s(t."+b(n.n)+'("'+v(n.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(n.nodes,t),t.code+="};"},">":m,"<":function(n,t){var i={partials:{},code:"",subs:{},inPartial:!0};e.walk(n.nodes,i);var r=t.partials[m(n,t)];r.subs=i.subs,r.partials=i.partials},$:function(n,t){var i={subs:{},code:"",partials:t.partials,prefix:n.n};e.walk(n.nodes,i),t.subs[n.n]=i.code,t.inPartial||(t.code+='t.sub("'+v(n.n)+'",c,p,i);')},"\n":function(e,n){n.code+=w('"\\n"'+(e.last?"":" + i"))},_v:function(e,n){n.code+="t.b(t.v(t."+b(e.n)+'("'+v(e.n)+'",c,p,0)));'},_t:function(e,n){n.code+=w('"'+v(e.text)+'"')},"{":y,"&":y},e.walk=function(n,t){for(var i,r=0,l=n.length;r<l;r++)(i=e.codegen[n[r].tag])&&i(n[r],t);return t},e.parse=function(n,t,i){return function n(t,i,r,l){var o,s=[],a=null,f=null;for(o=r[r.length-1];t.length>0;){if(f=t.shift(),o&&"<"==o.tag&&!(f.tag in d))throw new Error("Illegal content in < super tag.");if(e.tags[f.tag]<=e.tags.$||c(f,l))r.push(f),f.nodes=n(t,f.tag,r,l);else{if("/"==f.tag){if(0===r.length)throw new Error("Closing tag without opener: /"+f.n);if(a=r.pop(),f.n!=a.n&&!h(f.n,a.n,l))throw new Error("Nesting error: "+a.n+" vs. "+f.n);return a.end=f.i,s}"\n"==f.tag&&(f.last=0==t.length||"\n"==t[0].tag)}s.push(f)}if(r.length>0)throw new Error("missing closing tag: "+r.pop().n);return s}(n,0,[],(i=i||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,n){return[e,!!n.asString,!!n.disableLambda,n.delimiters,!!n.modelGet].join("||")},e.compile=function(n,t){t=t||{};var i=e.cacheKey(n,t),r=this.cache[i];if(r){var l=r.partials;for(var o in l)delete l[o].instance;return r}return r=this.generate(this.parse(this.scan(n,t.delimiters),n,t),n,t),this.cache[i]=r}}(n)},function(e,n,t){!function(e){function n(e,n,t){var i;return n&&"object"==typeof n&&(void 0!==n[e]?i=n[e]:t&&n.get&&"function"==typeof n.get&&(i=n.get(e))),i}e.Template=function(e,n,t,i){e=e||{},this.r=e.code||this.r,this.c=t,this.options=i||{},this.text=n||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,n,t){return""},v:function(e){return e=a(e),s.test(e)?e.replace(t,"&").replace(i,"<").replace(r,">").replace(l,"'").replace(o,"""):e},t:a,render:function(e,n,t){return this.ri([e],n||{},t)},ri:function(e,n,t){return this.r(e,n,t)},ep:function(e,n){var t=this.partials[e],i=n[t.name];if(t.instance&&t.base==i)return t.instance;if("string"==typeof i){if(!this.c)throw new Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[e].base=i,t.subs){for(key in n.stackText||(n.stackText={}),t.subs)n.stackText[key]||(n.stackText[key]=void 0!==this.activeSub&&n.stackText[this.activeSub]?n.stackText[this.activeSub]:this.text);i=function(e,n,t,i,r,l){function o(){}function s(){}var a;o.prototype=e,s.prototype=e.subs;var f=new o;for(a in f.subs=new s,f.subsText={},f.buf="",i=i||{},f.stackSubs=i,f.subsText=l,n)i[a]||(i[a]=n[a]);for(a in i)f.subs[a]=i[a];for(a in r=r||{},f.stackPartials=r,t)r[a]||(r[a]=t[a]);for(a in r)f.partials[a]=r[a];return f}(i,t.subs,t.partials,this.stackSubs,this.stackPartials,n.stackText)}return this.partials[e].instance=i,i},rp:function(e,n,t,i){var r=this.ep(e,t);return r?r.ri(n,t,i):""},rs:function(e,n,t){var i=e[e.length-1];if(f(i))for(var r=0;r<i.length;r++)e.push(i[r]),t(e,n,this),e.pop();else t(e,n,this)},s:function(e,n,t,i,r,l,o){var s;return(!f(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,n,t,i,r,l,o)),s=!!e,!i&&s&&n&&n.push("object"==typeof e?e:n[n.length-1]),s)},d:function(e,t,i,r){var l,o=e.split("."),s=this.f(o[0],t,i,r),a=this.options.modelGet,u=null;if("."===e&&f(t[t.length-2]))s=t[t.length-1];else for(var d=1;d<o.length;d++)void 0!==(l=n(o[d],s,a))?(u=s,s=l):s="";return!(r&&!s)&&(r||"function"!=typeof s||(t.push(u),s=this.mv(s,t,i),t.pop()),s)},f:function(e,t,i,r){for(var l=!1,o=!1,s=this.options.modelGet,a=t.length-1;a>=0;a--)if(void 0!==(l=n(e,t[a],s))){o=!0;break}return o?(r||"function"!=typeof l||(l=this.mv(l,t,i)),l):!r&&""},ls:function(e,n,t,i,r){var l=this.options.delimiters;return this.options.delimiters=r,this.b(this.ct(a(e.call(n,i)),n,t)),this.options.delimiters=l,!1},ct:function(e,n,t){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(n,t)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,n,t,i,r,l,o){var s,a=n[n.length-1],f=e.call(a);return"function"==typeof f?!!i||(s=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(f,a,t,s.substring(r,l),o)):f},mv:function(e,n,t){var i=n[n.length-1],r=e.call(i);return"function"==typeof r?this.ct(a(r.call(i)),i,t):r},sub:function(e,n,t,i){var r=this.subs[e];r&&(this.activeSub=e,r(n,t,this,i),this.activeSub=!1)}};var t=/&/g,i=/</g,r=/>/g,l=/\'/g,o=/\"/g,s=/[&<>\"\']/;function a(e){return String(null==e?"":e)}var f=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(n)},function(e,n,t){"use strict";var i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var t in e)Object.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n.default=e,n};Object.defineProperty(n,"__esModule",{value:!0});var r=i(t(4));n.defaultTemplates={},n.defaultTemplates["file-summary-line"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<li class="d2h-file-list-line">'),i.b("\n"+t),i.b(' <span class="d2h-file-name-wrapper">'),i.b("\n"+t),i.b(i.rp("<fileIcon0",e,n," ")),i.b(' <a href="#'),i.b(i.v(i.f("fileHtmlId",e,n,0))),i.b('" class="d2h-file-name">'),i.b(i.v(i.f("fileName",e,n,0))),i.b("</a>"),i.b("\n"+t),i.b(' <span class="d2h-file-stats">'),i.b("\n"+t),i.b(' <span class="d2h-lines-added">'),i.b(i.v(i.f("addedLines",e,n,0))),i.b("</span>"),i.b("\n"+t),i.b(' <span class="d2h-lines-deleted">'),i.b(i.v(i.f("deletedLines",e,n,0))),i.b("</span>"),i.b("\n"+t),i.b(" </span>"),i.b("\n"+t),i.b(" </span>"),i.b("\n"+t),i.b("</li>"),i.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}}),n.defaultTemplates["file-summary-wrapper"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div class="d2h-file-list-wrapper">'),i.b("\n"+t),i.b(' <div class="d2h-file-list-header">'),i.b("\n"+t),i.b(' <span class="d2h-file-list-title">Files changed ('),i.b(i.v(i.f("filesNumber",e,n,0))),i.b(")</span>"),i.b("\n"+t),i.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),i.b("\n"+t),i.b(' <a class="d2h-file-switch d2h-show">show</a>'),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(' <ol class="d2h-file-list">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("files",e,n,0))),i.b("\n"+t),i.b(" </ol>"),i.b("\n"+t),i.b("</div>"),i.fl()},partials:{},subs:{}}),n.defaultTemplates["generic-block-header"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b("<tr>"),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.f("lineClass",e,n,0))),i.b(" "),i.b(i.v(i.d("CSSLineClass.INFO",e,n,0))),i.b('"></td>'),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.d("CSSLineClass.INFO",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,n,0))),i.b(" "),i.b(i.v(i.d("CSSLineClass.INFO",e,n,0))),i.b('">'),i.b(i.t(i.f("blockHeader",e,n,0))),i.b("</div>"),i.b("\n"+t),i.b(" </td>"),i.b("\n"+t),i.b("</tr>"),i.fl()},partials:{},subs:{}}),n.defaultTemplates["generic-empty-diff"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b("<tr>"),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.d("CSSLineClass.INFO",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,n,0))),i.b(" "),i.b(i.v(i.d("CSSLineClass.INFO",e,n,0))),i.b('">'),i.b("\n"+t),i.b(" File without changes"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </td>"),i.b("\n"+t),i.b("</tr>"),i.fl()},partials:{},subs:{}}),n.defaultTemplates["generic-file-path"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-file-name-wrapper">'),i.b("\n"+t),i.b(i.rp("<fileIcon0",e,n," ")),i.b(' <span class="d2h-file-name">'),i.b(i.v(i.f("fileDiffName",e,n,0))),i.b("</span>"),i.b("\n"+t),i.b(i.rp("<fileTag1",e,n," ")),i.b("</span>"),i.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}}),n.defaultTemplates["generic-line"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b("<tr>"),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.f("lineClass",e,n,0))),i.b(" "),i.b(i.v(i.f("type",e,n,0))),i.b('">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("lineNumber",e,n,0))),i.b("\n"+t),i.b(" </td>"),i.b("\n"+t),i.b(' <td class="'),i.b(i.v(i.f("type",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,n,0))),i.b(" "),i.b(i.v(i.f("type",e,n,0))),i.b('">'),i.b("\n"+t),i.s(i.f("prefix",e,n,1),e,n,0,171,247,"{{ }}")&&(i.rs(e,n,(function(e,n,i){i.b(' <span class="d2h-code-line-prefix">'),i.b(i.t(i.f("prefix",e,n,0))),i.b("</span>"),i.b("\n"+t)})),e.pop()),i.s(i.f("prefix",e,n,1),e,n,1,0,0,"")||(i.b(' <span class="d2h-code-line-prefix"> </span>'),i.b("\n"+t)),i.s(i.f("content",e,n,1),e,n,0,380,454,"{{ }}")&&(i.rs(e,n,(function(e,n,i){i.b(' <span class="d2h-code-line-ctn">'),i.b(i.t(i.f("content",e,n,0))),i.b("</span>"),i.b("\n"+t)})),e.pop()),i.s(i.f("content",e,n,1),e,n,1,0,0,"")||(i.b(' <span class="d2h-code-line-ctn"><br></span>'),i.b("\n"+t)),i.b(" </div>"),i.b("\n"+t),i.b(" </td>"),i.b("\n"+t),i.b("</tr>"),i.fl()},partials:{},subs:{}}),n.defaultTemplates["generic-wrapper"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div class="d2h-wrapper">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("content",e,n,0))),i.b("\n"+t),i.b("</div>"),i.fl()},partials:{},subs:{}}),n.defaultTemplates["icon-file-added"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),i.b("\n"+t),i.b(' width="14">'),i.b("\n"+t),i.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),n.defaultTemplates["icon-file-changed"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),i.b("\n"+t),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+t),i.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),n.defaultTemplates["icon-file-deleted"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),i.b("\n"+t),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+t),i.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),n.defaultTemplates["icon-file-renamed"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),i.b("\n"+t),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+t),i.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),n.defaultTemplates["icon-file"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),i.b("\n"+t),i.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),i.b("\n"+t),i.b("</svg>"),i.fl()},partials:{},subs:{}}),n.defaultTemplates["line-by-line-file-diff"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div id="'),i.b(i.v(i.f("fileHtmlId",e,n,0))),i.b('" class="d2h-file-wrapper" data-lang="'),i.b(i.v(i.d("file.language",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="d2h-file-header">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("filePath",e,n,0))),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(' <div class="d2h-file-diff">'),i.b("\n"+t),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+t),i.b(' <table class="d2h-diff-table">'),i.b("\n"+t),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("diffs",e,n,0))),i.b("\n"+t),i.b(" </tbody>"),i.b("\n"+t),i.b(" </table>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b("</div>"),i.fl()},partials:{},subs:{}}),n.defaultTemplates["line-by-line-numbers"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div class="line-num1">'),i.b(i.v(i.f("oldNumber",e,n,0))),i.b("</div>"),i.b("\n"+t),i.b('<div class="line-num2">'),i.b(i.v(i.f("newNumber",e,n,0))),i.b("</div>"),i.fl()},partials:{},subs:{}}),n.defaultTemplates["side-by-side-file-diff"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<div id="'),i.b(i.v(i.f("fileHtmlId",e,n,0))),i.b('" class="d2h-file-wrapper" data-lang="'),i.b(i.v(i.d("file.language",e,n,0))),i.b('">'),i.b("\n"+t),i.b(' <div class="d2h-file-header">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.f("filePath",e,n,0))),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(' <div class="d2h-files-diff">'),i.b("\n"+t),i.b(' <div class="d2h-file-side-diff">'),i.b("\n"+t),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+t),i.b(' <table class="d2h-diff-table">'),i.b("\n"+t),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.d("diffs.left",e,n,0))),i.b("\n"+t),i.b(" </tbody>"),i.b("\n"+t),i.b(" </table>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(' <div class="d2h-file-side-diff">'),i.b("\n"+t),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+t),i.b(' <table class="d2h-diff-table">'),i.b("\n"+t),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+t),i.b(" "),i.b(i.t(i.d("diffs.right",e,n,0))),i.b("\n"+t),i.b(" </tbody>"),i.b("\n"+t),i.b(" </table>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b(" </div>"),i.b("\n"+t),i.b("</div>"),i.fl()},partials:{},subs:{}}),n.defaultTemplates["tag-file-added"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),i.fl()},partials:{},subs:{}}),n.defaultTemplates["tag-file-changed"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),i.fl()},partials:{},subs:{}}),n.defaultTemplates["tag-file-deleted"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),i.fl()},partials:{},subs:{}}),n.defaultTemplates["tag-file-renamed"]=new r.Template({code:function(e,n,t){var i=this;return i.b(t=t||""),i.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),i.fl()},partials:{},subs:{}})}])}));
|
|
39
|
+
!function(e){"use strict";function t(){}function n(e,t,n,i,r){for(var o=0,l=t.length,a=0,s=0;o<l;o++){var f=t[o];if(f.removed){if(f.value=e.join(i.slice(s,s+f.count)),s+=f.count,o&&t[o-1].added){var u=t[o-1];t[o-1]=t[o],t[o]=u}}else{if(!f.added&&r){var c=n.slice(a,a+f.count);c=c.map((function(e,t){var n=i[s+t];return n.length>e.length?n:e})),f.value=e.join(c)}else f.value=e.join(n.slice(a,a+f.count));a+=f.count,f.added||(s+=f.count)}}var d=t[l-1];return l>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(t[l-2].value+=d.value,t.pop()),t}function i(e){return{newPos:e.newPos,components:e.components.slice(0)}}t.prototype={diff:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.callback;"function"==typeof r&&(o=r,r={}),this.options=r;var l=this;function a(e){return o?(setTimeout((function(){o(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var s=(t=this.removeEmpty(this.tokenize(t))).length,f=e.length,u=1,c=s+f,d=[{newPos:-1,components:[]}],h=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=s&&h+1>=f)return a([{value:this.join(t),count:t.length}]);function p(){for(var r=-1*u;r<=u;r+=2){var o=void 0,c=d[r-1],h=d[r+1],p=(h?h.newPos:0)-r;c&&(d[r-1]=void 0);var g=c&&c.newPos+1<s,b=h&&0<=p&&p<f;if(g||b){if(!g||b&&c.newPos<h.newPos?(o=i(h),l.pushComponent(o.components,void 0,!0)):((o=c).newPos++,l.pushComponent(o.components,!0,void 0)),p=l.extractCommon(o,t,e,r),o.newPos+1>=s&&p+1>=f)return a(n(l,o.components,t,e,l.useLongestToken));d[r]=o}else d[r]=void 0}u++}if(o)!function e(){setTimeout((function(){if(u>c)return o();p()||e()}),0)}();else for(;u<=c;){var g=p();if(g)return g}},pushComponent:function(e,t,n){var i=e[e.length-1];i&&i.added===t&&i.removed===n?e[e.length-1]={count:i.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,i){for(var r=t.length,o=n.length,l=e.newPos,a=l-i,s=0;l+1<r&&a+1<o&&this.equals(t[l+1],n[a+1]);)l++,a++,s++;return s&&e.components.push({count:s}),e.newPos=l,a},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};var r=new t;function o(e,t){if("function"==typeof e)t.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var l=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,a=/\S/,s=new t;s.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!a.test(e)&&!a.test(t)},s.tokenize=function(e){for(var t=e.split(/(\s+|[()[\]{}'"]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&l.test(t[n])&&l.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var f=new t;function u(e,t,n){return f.diff(e,t,n)}f.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var r=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=r:(this.options.ignoreWhitespace&&(r=r.trim()),t.push(r))}return t};var c=new t;c.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var d=new t;function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}d.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};var g=Object.prototype.toString,b=new t;function v(e,t,n,i,r){var o,l;for(t=t||[],n=n||[],i&&(e=i(r,e)),o=0;o<t.length;o+=1)if(t[o]===e)return n[o];if("[object Array]"===g.call(e)){for(t.push(e),l=new Array(e.length),n.push(l),o=0;o<e.length;o+=1)l[o]=v(e[o],t,n,i,r);return t.pop(),n.pop(),l}if(e&&e.toJSON&&(e=e.toJSON()),"object"===h(e)&&null!==e){t.push(e),l={},n.push(l);var a,s=[];for(a in e)e.hasOwnProperty(a)&&s.push(a);for(s.sort(),o=0;o<s.length;o+=1)l[a=s[o]]=v(e[a],t,n,i,a);t.pop(),n.pop()}else l=e;return l}b.useLongestToken=!0,b.tokenize=f.tokenize,b.castInput=function(e){var t=this.options,n=t.undefinedReplacement,i=t.stringifyReplacer,r=void 0===i?function(e,t){return void 0===t?n:t}:i;return"string"==typeof e?e:JSON.stringify(v(e,null,null,r),r," ")},b.equals=function(e,n){return t.prototype.equals.call(b,e.replace(/,([\r\n])/g,"$1"),n.replace(/,([\r\n])/g,"$1"))};var m=new t;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.split(/\r\n|[\n\v\f\r\x85]/),i=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],r=[],o=0;function l(){var e={};for(r.push(e);o<n.length;){var i=n[o];if(/^(\-\-\-|\+\+\+|@@)\s/.test(i))break;var l=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(i);l&&(e.index=l[1]),o++}for(a(e),a(e),e.hunks=[];o<n.length;){var f=n[o];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(f))break;if(/^@@/.test(f))e.hunks.push(s());else{if(f&&t.strict)throw new Error("Unknown line "+(o+1)+" "+JSON.stringify(f));o++}}}function a(e){var t=/^(---|\+\+\+)\s+(.*)$/.exec(n[o]);if(t){var i="---"===t[1]?"old":"new",r=t[2].split("\t",2),l=r[0].replace(/\\\\/g,"\\");/^".*"$/.test(l)&&(l=l.substr(1,l.length-2)),e[i+"FileName"]=l,e[i+"Header"]=(r[1]||"").trim(),o++}}function s(){for(var e=o,r=n[o++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),l={oldStart:+r[1],oldLines:+r[2]||1,newStart:+r[3],newLines:+r[4]||1,lines:[],linedelimiters:[]},a=0,s=0;o<n.length&&!(0===n[o].indexOf("--- ")&&o+2<n.length&&0===n[o+1].indexOf("+++ ")&&0===n[o+2].indexOf("@@"));o++){var f=0==n[o].length&&o!=n.length-1?" ":n[o][0];if("+"!==f&&"-"!==f&&" "!==f&&"\\"!==f)break;l.lines.push(n[o]),l.linedelimiters.push(i[o]||"\n"),"+"===f?a++:"-"===f?s++:" "===f&&(a++,s++)}if(a||1!==l.newLines||(l.newLines=0),s||1!==l.oldLines||(l.oldLines=0),t.strict){if(a!==l.newLines)throw new Error("Added line count did not match for hunk at line "+(e+1));if(s!==l.oldLines)throw new Error("Removed line count did not match for hunk at line "+(e+1))}return l}for(;o<n.length;)l();return r}function w(e,t,n){var i=!0,r=!1,o=!1,l=1;return function a(){if(i&&!o){if(r?l++:i=!1,e+l<=n)return l;o=!0}if(!r)return o||(i=!0),t<=e-l?-l++:(r=!0,a())}}function S(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=y(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}var i,r,o=e.split(/\r\n|[\n\v\f\r\x85]/),l=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],a=t.hunks,s=n.compareLine||function(e,t,n,i){return t===i},f=0,u=n.fuzzFactor||0,c=0,d=0;function h(e,t){for(var n=0;n<e.lines.length;n++){var i=e.lines[n],r=i.length>0?i[0]:" ",l=i.length>0?i.substr(1):i;if(" "===r||"-"===r){if(!s(t+1,o[t],r,l)&&++f>u)return!1;t++}}return!0}for(var p=0;p<a.length;p++){for(var g=a[p],b=o.length-g.oldLines,v=0,m=d+g.oldStart-1,S=w(m,c,b);void 0!==v;v=S())if(h(g,m+v)){g.offset=d+=v;break}if(void 0===v)return!1;c=g.offset+g.oldStart+g.oldLines}for(var L=0,x=0;x<a.length;x++){var C=a[x],T=C.oldStart+C.offset+L-1;L+=C.newLines-C.oldLines,T<0&&(T=0);for(var N=0;N<C.lines.length;N++){var E=C.lines[N],O=E.length>0?E[0]:" ",_=E.length>0?E.substr(1):E,H=C.linedelimiters[N];if(" "===O)T++;else if("-"===O)o.splice(T,1),l.splice(T,1);else if("+"===O)o.splice(T,0,_),l.splice(T,0,H),T++;else if("\\"===O){var j=C.lines[N-1]?C.lines[N-1][0]:null;"+"===j?i=!0:"-"===j&&(r=!0)}}}if(i)for(;!o[o.length-1];)o.pop(),l.pop();else r&&(o.push(""),l.push("\n"));for(var k=0;k<o.length-1;k++)o[k]=o[k]+l[k];return o.join("")}function L(e,t,n,i,r,o,l){l||(l={}),void 0===l.context&&(l.context=4);var a=u(n,i,l);function s(e){return e.map((function(e){return" "+e}))}a.push({value:"",lines:[]});for(var f=[],c=0,d=0,h=[],g=1,b=1,v=function(e){var t=a[e],r=t.lines||t.value.replace(/\n$/,"").split("\n");if(t.lines=r,t.added||t.removed){var o;if(!c){var u=a[e-1];c=g,d=b,u&&(h=l.context>0?s(u.lines.slice(-l.context)):[],c-=h.length,d-=h.length)}(o=h).push.apply(o,p(r.map((function(e){return(t.added?"+":"-")+e})))),t.added?b+=r.length:g+=r.length}else{if(c)if(r.length<=2*l.context&&e<a.length-2){var v;(v=h).push.apply(v,p(s(r)))}else{var m,y=Math.min(r.length,l.context);(m=h).push.apply(m,p(s(r.slice(0,y))));var w={oldStart:c,oldLines:g-c+y,newStart:d,newLines:b-d+y,lines:h};if(e>=a.length-2&&r.length<=l.context){var S=/\n$/.test(n),L=/\n$/.test(i),x=0==r.length&&h.length>w.oldLines;!S&&x&&h.splice(w.oldLines,0,"\"),(S||x)&&L||h.push("\")}f.push(w),c=0,d=0,h=[]}g+=r.length,b+=r.length}},m=0;m<a.length;m++)v(m);return{oldFileName:e,newFileName:t,oldHeader:r,newHeader:o,hunks:f}}function x(e,t,n,i,r,o,l){var a=L(e,t,n,i,r,o,l),s=[];e==t&&s.push("Index: "+e),s.push("==================================================================="),s.push("--- "+a.oldFileName+(void 0===a.oldHeader?"":"\t"+a.oldHeader)),s.push("+++ "+a.newFileName+(void 0===a.newHeader?"":"\t"+a.newHeader));for(var f=0;f<a.hunks.length;f++){var u=a.hunks[f];s.push("@@ -"+u.oldStart+","+u.oldLines+" +"+u.newStart+","+u.newLines+" @@"),s.push.apply(s,u.lines)}return s.join("\n")+"\n"}function C(e,t){if(t.length>e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function T(e){var t=function e(t){var n=0,i=0;return t.forEach((function(t){if("string"!=typeof t){var r=e(t.mine),o=e(t.theirs);void 0!==n&&(r.oldLines===o.oldLines?n+=r.oldLines:n=void 0),void 0!==i&&(r.newLines===o.newLines?i+=r.newLines:i=void 0)}else void 0===i||"+"!==t[0]&&" "!==t[0]||i++,void 0===n||"-"!==t[0]&&" "!==t[0]||n++})),{oldLines:n,newLines:i}}(e.lines),n=t.oldLines,i=t.newLines;void 0!==n?e.oldLines=n:delete e.oldLines,void 0!==i?e.newLines=i:delete e.newLines}function N(e,t){if("string"==typeof e){if(/^@@/m.test(e)||/^Index:/m.test(e))return y(e)[0];if(!t)throw new Error("Must provide a base reference or pass in a patch");return L(void 0,void 0,t,e)}return e}function E(e){return e.newFileName&&e.newFileName!==e.oldFileName}function O(e,t,n){return t===n?t:(e.conflict=!0,{mine:t,theirs:n})}function _(e,t){return e.oldStart<t.oldStart&&e.oldStart+e.oldLines<t.oldStart}function H(e,t){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+t,newLines:e.newLines,lines:e.lines}}function j(e,t,n,i,r){var o={offset:t,lines:n,index:0},l={offset:i,lines:r,index:0};for(M(e,o,l),M(e,l,o);o.index<o.lines.length&&l.index<l.lines.length;){var a=o.lines[o.index],s=l.lines[l.index];if("-"!==a[0]&&"+"!==a[0]||"-"!==s[0]&&"+"!==s[0])if("+"===a[0]&&" "===s[0]){var f;(f=e.lines).push.apply(f,p(D(o)))}else if("+"===s[0]&&" "===a[0]){var u;(u=e.lines).push.apply(u,p(D(l)))}else"-"===a[0]&&" "===s[0]?P(e,o,l):"-"===s[0]&&" "===a[0]?P(e,l,o,!0):a===s?(e.lines.push(a),o.index++,l.index++):F(e,D(o),D(l));else k(e,o,l)}I(e,o),I(e,l),T(e)}function k(e,t,n){var i,r,o=D(t),l=D(n);if(A(o)&&A(l)){var a,s;if(C(o,l)&&R(n,o,o.length-l.length))return void(a=e.lines).push.apply(a,p(o));if(C(l,o)&&R(t,l,l.length-o.length))return void(s=e.lines).push.apply(s,p(l))}else if(r=l,(i=o).length===r.length&&C(i,r)){var f;return void(f=e.lines).push.apply(f,p(o))}F(e,o,l)}function P(e,t,n,i){var r,o=D(t),l=function(e,t){for(var n=[],i=[],r=0,o=!1,l=!1;r<t.length&&e.index<e.lines.length;){var a=e.lines[e.index],s=t[r];if("+"===s[0])break;if(o=o||" "!==a[0],i.push(s),r++,"+"===a[0])for(l=!0;"+"===a[0];)n.push(a),a=e.lines[++e.index];s.substr(1)===a.substr(1)?(n.push(a),e.index++):l=!0}if("+"===(t[r]||"")[0]&&o&&(l=!0),l)return n;for(;r<t.length;)i.push(t[r++]);return{merged:i,changes:n}}(n,o);l.merged?(r=e.lines).push.apply(r,p(l.merged)):F(e,i?l:o,i?o:l)}function F(e,t,n){e.conflict=!0,e.lines.push({conflict:!0,mine:t,theirs:n})}function M(e,t,n){for(;t.offset<n.offset&&t.index<t.lines.length;){var i=t.lines[t.index++];e.lines.push(i),t.offset++}}function I(e,t){for(;t.index<t.lines.length;){var n=t.lines[t.index++];e.lines.push(n)}}function D(e){for(var t=[],n=e.lines[e.index][0];e.index<e.lines.length;){var i=e.lines[e.index];if("-"===n&&"+"===i[0]&&(n="+"),n!==i[0])break;t.push(i),e.index++}return t}function A(e){return e.reduce((function(e,t){return e&&"-"===t[0]}),!0)}function R(e,t,n){for(var i=0;i<n;i++){var r=t[t.length-n+i].substr(1);if(e.lines[e.index+i]!==" "+r)return!1}return e.index+=n,!0}m.tokenize=function(e){return e.slice()},m.join=m.removeEmpty=function(e){return e},e.Diff=t,e.diffChars=function(e,t,n){return r.diff(e,t,n)},e.diffWords=function(e,t,n){return n=o(n,{ignoreWhitespace:!0}),s.diff(e,t,n)},e.diffWordsWithSpace=function(e,t,n){return s.diff(e,t,n)},e.diffLines=u,e.diffTrimmedLines=function(e,t,n){var i=o(n,{ignoreWhitespace:!0});return f.diff(e,t,i)},e.diffSentences=function(e,t,n){return c.diff(e,t,n)},e.diffCss=function(e,t,n){return d.diff(e,t,n)},e.diffJson=function(e,t,n){return b.diff(e,t,n)},e.diffArrays=function(e,t,n){return m.diff(e,t,n)},e.structuredPatch=L,e.createTwoFilesPatch=x,e.createPatch=function(e,t,n,i,r,o){return x(e,e,t,n,i,r,o)},e.applyPatch=S,e.applyPatches=function(e,t){"string"==typeof e&&(e=y(e));var n=0;!function i(){var r=e[n++];if(!r)return t.complete();t.loadFile(r,(function(e,n){if(e)return t.complete(e);var o=S(n,r,t);t.patched(r,o,(function(e){if(e)return t.complete(e);i()}))}))}()},e.parsePatch=y,e.merge=function(e,t,n){e=N(e,n),t=N(t,n);var i={};(e.index||t.index)&&(i.index=e.index||t.index),(e.newFileName||t.newFileName)&&(E(e)?E(t)?(i.oldFileName=O(i,e.oldFileName,t.oldFileName),i.newFileName=O(i,e.newFileName,t.newFileName),i.oldHeader=O(i,e.oldHeader,t.oldHeader),i.newHeader=O(i,e.newHeader,t.newHeader)):(i.oldFileName=e.oldFileName,i.newFileName=e.newFileName,i.oldHeader=e.oldHeader,i.newHeader=e.newHeader):(i.oldFileName=t.oldFileName||e.oldFileName,i.newFileName=t.newFileName||e.newFileName,i.oldHeader=t.oldHeader||e.oldHeader,i.newHeader=t.newHeader||e.newHeader)),i.hunks=[];for(var r=0,o=0,l=0,a=0;r<e.hunks.length||o<t.hunks.length;){var s=e.hunks[r]||{oldStart:1/0},f=t.hunks[o]||{oldStart:1/0};if(_(s,f))i.hunks.push(H(s,l)),r++,a+=s.newLines-s.oldLines;else if(_(f,s))i.hunks.push(H(f,a)),o++,l+=f.newLines-f.oldLines;else{var u={oldStart:Math.min(s.oldStart,f.oldStart),oldLines:0,newStart:Math.min(s.newStart+l,f.oldStart+a),newLines:0,lines:[]};j(u,s.oldStart,s.lines,f.oldStart,f.lines),o++,r++,i.hunks.push(u)}}return i},e.convertChangesToDMP=function(e){for(var t,n,i=[],r=0;r<e.length;r++)n=(t=e[r]).added?1:t.removed?-1:0,i.push([n,t.value]);return i},e.convertChangesToXML=function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];i.added?t.push("<ins>"):i.removed&&t.push("<del>"),t.push((r=i.value,void 0,r.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""))),i.added?t.push("</ins>"):i.removed&&t.push("</del>")}var r;return t.join("")},e.canonicalize=v,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultLineByLineRendererConfig=void 0;var a=l(n(2)),s=l(n(1)),f=n(0);t.defaultLineByLineRendererConfig=i(i({},s.defaultRenderConfig),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200});var u=function(){function e(e,n){void 0===n&&(n={}),this.hoganUtils=e,this.config=i(i({},t.defaultLineByLineRendererConfig),n)}return e.prototype.render=function(e){var t=this,n=e.map((function(e){var n;return n=e.blocks.length?t.generateFileHtml(e):t.generateEmptyDiff(),t.makeFileDiffHtml(e,n)})).join("\n");return this.hoganUtils.render("generic","wrapper",{content:n})},e.prototype.makeFileDiffHtml=function(e,t){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";var n=this.hoganUtils.template("line-by-line","file-diff"),i=this.hoganUtils.template("generic","file-path"),r=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",s.getFileIcon(e));return n.render({file:e,fileHtmlId:s.getHtmlId(e),diffs:t,filePath:i.render({fileDiffName:s.filenameDiff(e)},{fileIcon:r,fileTag:o})})},e.prototype.generateEmptyDiff=function(){return this.hoganUtils.render("generic","empty-diff",{contentClass:"d2h-code-line",CSSLineClass:s.CSSLineClass})},e.prototype.generateFileHtml=function(e){var t=this,n=a.newMatcherFn(a.newDistanceFn((function(t){return s.deconstructLine(t.content,e.isCombined).content})));return e.blocks.map((function(i){var r=t.hoganUtils.render("generic","block-header",{CSSLineClass:s.CSSLineClass,blockHeader:s.escapeForHtml(i.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return t.applyLineGroupping(i).forEach((function(i){var o=i[0],l=i[1],a=i[2];if(l.length&&a.length&&!o.length)t.applyRematchMatching(l,a,n).map((function(n){var i=n[0],o=n[1],l=t.processChangedLines(e.isCombined,i,o),a=l.left,s=l.right;r+=a,r+=s}));else if(o.length)o.forEach((function(n){var i=s.deconstructLine(n.content,e.isCombined),o=i.prefix,l=i.content;r+=t.generateSingleLineHtml({type:s.CSSLineClass.CONTEXT,prefix:o,content:l,oldNumber:n.oldNumber,newNumber:n.newNumber})}));else if(l.length||a.length){var f=t.processChangedLines(e.isCombined,l,a),u=f.left,c=f.right;r+=u,r+=c}else console.error("Unknown state reached while processing groups of lines",o,l,a)})),r})).join("\n")},e.prototype.applyLineGroupping=function(e){for(var t=[],n=[],i=[],r=0;r<e.lines.length;r++){var o=e.lines[r];(o.type!==f.LineType.INSERT&&i.length||o.type===f.LineType.CONTEXT&&n.length>0)&&(t.push([[],n,i]),n=[],i=[]),o.type===f.LineType.CONTEXT?t.push([[o],[],[]]):o.type===f.LineType.INSERT&&0===n.length?t.push([[],[],[o]]):o.type===f.LineType.INSERT&&n.length>0?i.push(o):o.type===f.LineType.DELETE&&n.push(o)}return(n.length||i.length)&&(t.push([[],n,i]),n=[],i=[]),t},e.prototype.applyRematchMatching=function(e,t,n){var i=e.length*t.length,r=Math.max.apply(null,[0].concat(e.concat(t).map((function(e){return e.content.length}))));return i<this.config.matchingMaxComparisons&&r<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?n(e,t):[[e,t]]},e.prototype.processChangedLines=function(e,t,n){for(var r={right:"",left:""},o=Math.max(t.length,n.length),l=0;l<o;l++){var a=t[l],f=n[l],u=void 0!==a&&void 0!==f?s.diffHighlight(a.content,f.content,e,this.config):void 0,c=void 0!==a&&void 0!==a.oldNumber?i(i({},void 0!==u?{prefix:u.oldLine.prefix,content:u.oldLine.content,type:s.CSSLineClass.DELETE_CHANGES}:i(i({},s.deconstructLine(a.content,e)),{type:s.toCSSClass(a.type)})),{oldNumber:a.oldNumber,newNumber:a.newNumber}):void 0,d=void 0!==f&&void 0!==f.newNumber?i(i({},void 0!==u?{prefix:u.newLine.prefix,content:u.newLine.content,type:s.CSSLineClass.INSERT_CHANGES}:i(i({},s.deconstructLine(f.content,e)),{type:s.toCSSClass(f.type)})),{oldNumber:f.oldNumber,newNumber:f.newNumber}):void 0,h=this.generateLineHtml(c,d),p=h.left,g=h.right;r.left+=p,r.right+=g}return r},e.prototype.generateLineHtml=function(e,t){return{left:this.generateSingleLineHtml(e),right:this.generateSingleLineHtml(t)}},e.prototype.generateSingleLineHtml=function(e){if(void 0===e)return"";var t=this.hoganUtils.render("line-by-line","numbers",{oldNumber:e.oldNumber||"",newNumber:e.newNumber||""});return this.hoganUtils.render("generic","line",{type:e.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:" "===e.prefix?" ":e.prefix,content:e.content,lineNumber:t})},e}();t.default=u},function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultSideBySideRendererConfig=void 0;var a=l(n(2)),s=l(n(1)),f=n(0);t.defaultSideBySideRendererConfig=i(i({},s.defaultRenderConfig),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200});var u=function(){function e(e,n){void 0===n&&(n={}),this.hoganUtils=e,this.config=i(i({},t.defaultSideBySideRendererConfig),n)}return e.prototype.render=function(e){var t=this,n=e.map((function(e){var n;return n=e.blocks.length?t.generateFileHtml(e):t.generateEmptyDiff(),t.makeFileDiffHtml(e,n)})).join("\n");return this.hoganUtils.render("generic","wrapper",{content:n})},e.prototype.makeFileDiffHtml=function(e,t){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&0===e.blocks.length)return"";var n=this.hoganUtils.template("side-by-side","file-diff"),i=this.hoganUtils.template("generic","file-path"),r=this.hoganUtils.template("icon","file"),o=this.hoganUtils.template("tag",s.getFileIcon(e));return n.render({file:e,fileHtmlId:s.getHtmlId(e),diffs:t,filePath:i.render({fileDiffName:s.filenameDiff(e)},{fileIcon:r,fileTag:o})})},e.prototype.generateEmptyDiff=function(){return{right:"",left:this.hoganUtils.render("generic","empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:s.CSSLineClass})}},e.prototype.generateFileHtml=function(e){var t=this,n=a.newMatcherFn(a.newDistanceFn((function(t){return s.deconstructLine(t.content,e.isCombined).content})));return e.blocks.map((function(i){var r={left:t.makeHeaderHtml(i.header),right:t.makeHeaderHtml("")};return t.applyLineGroupping(i).forEach((function(i){var o=i[0],l=i[1],a=i[2];if(l.length&&a.length&&!o.length)t.applyRematchMatching(l,a,n).map((function(n){var i=n[0],o=n[1],l=t.processChangedLines(e.isCombined,i,o),a=l.left,s=l.right;r.left+=a,r.right+=s}));else if(o.length)o.forEach((function(n){var i=s.deconstructLine(n.content,e.isCombined),o=i.prefix,l=i.content,a=t.generateLineHtml({type:s.CSSLineClass.CONTEXT,prefix:o,content:l,number:n.oldNumber},{type:s.CSSLineClass.CONTEXT,prefix:o,content:l,number:n.newNumber}),f=a.left,u=a.right;r.left+=f,r.right+=u}));else if(l.length||a.length){var f=t.processChangedLines(e.isCombined,l,a),u=f.left,c=f.right;r.left+=u,r.right+=c}else console.error("Unknown state reached while processing groups of lines",o,l,a)})),r})).reduce((function(e,t){return{left:e.left+t.left,right:e.right+t.right}}),{left:"",right:""})},e.prototype.applyLineGroupping=function(e){for(var t=[],n=[],i=[],r=0;r<e.lines.length;r++){var o=e.lines[r];(o.type!==f.LineType.INSERT&&i.length||o.type===f.LineType.CONTEXT&&n.length>0)&&(t.push([[],n,i]),n=[],i=[]),o.type===f.LineType.CONTEXT?t.push([[o],[],[]]):o.type===f.LineType.INSERT&&0===n.length?t.push([[],[],[o]]):o.type===f.LineType.INSERT&&n.length>0?i.push(o):o.type===f.LineType.DELETE&&n.push(o)}return(n.length||i.length)&&(t.push([[],n,i]),n=[],i=[]),t},e.prototype.applyRematchMatching=function(e,t,n){var i=e.length*t.length,r=Math.max.apply(null,[0].concat(e.concat(t).map((function(e){return e.content.length}))));return i<this.config.matchingMaxComparisons&&r<this.config.maxLineSizeInBlockForComparison&&("lines"===this.config.matching||"words"===this.config.matching)?n(e,t):[[e,t]]},e.prototype.makeHeaderHtml=function(e){return this.hoganUtils.render("generic","block-header",{CSSLineClass:s.CSSLineClass,blockHeader:s.escapeForHtml(e),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})},e.prototype.processChangedLines=function(e,t,n){for(var r={right:"",left:""},o=Math.max(t.length,n.length),l=0;l<o;l++){var a=t[l],f=n[l],u=void 0!==a&&void 0!==f?s.diffHighlight(a.content,f.content,e,this.config):void 0,c=void 0!==a&&void 0!==a.oldNumber?i(i({},void 0!==u?{prefix:u.oldLine.prefix,content:u.oldLine.content,type:s.CSSLineClass.DELETE_CHANGES}:i(i({},s.deconstructLine(a.content,e)),{type:s.toCSSClass(a.type)})),{number:a.oldNumber}):void 0,d=void 0!==f&&void 0!==f.newNumber?i(i({},void 0!==u?{prefix:u.newLine.prefix,content:u.newLine.content,type:s.CSSLineClass.INSERT_CHANGES}:i(i({},s.deconstructLine(f.content,e)),{type:s.toCSSClass(f.type)})),{number:f.newNumber}):void 0,h=this.generateLineHtml(c,d),p=h.left,g=h.right;r.left+=p,r.right+=g}return r},e.prototype.generateLineHtml=function(e,t){return{left:this.generateSingleHtml(e),right:this.generateSingleHtml(t)}},e.prototype.generateSingleHtml=function(e){return this.hoganUtils.render("generic","line",{type:(null==e?void 0:e.type)||s.CSSLineClass.CONTEXT+" d2h-emptyplaceholder",lineClass:void 0!==e?"d2h-code-side-linenumber":"d2h-code-side-linenumber d2h-code-side-emptyplaceholder",contentClass:void 0!==e?"d2h-code-side-line":"d2h-code-side-line d2h-code-side-emptyplaceholder",prefix:" "===(null==e?void 0:e.prefix)?" ":null==e?void 0:e.prefix,content:null==e?void 0:e.content,lineNumber:null==e?void 0:e.number})},e}();t.default=u},function(e,t,n){"use strict";var i=this&&this.__assign||function(){return(i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},r=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var a=l(n(4)),s=n(16),f=function(){function e(e){var t=e.compiledTemplates,n=void 0===t?{}:t,r=e.rawTemplates,o=void 0===r?{}:r,l=Object.entries(o).reduce((function(e,t){var n,r=t[0],o=t[1],l=a.compile(o,{asString:!1});return i(i({},e),((n={})[r]=l,n))}),{});this.preCompiledTemplates=i(i(i({},s.defaultTemplates),n),l)}return e.compile=function(e){return a.compile(e,{asString:!1})},e.prototype.render=function(e,t,n,i,r){var o=this.templateKey(e,t);try{return this.preCompiledTemplates[o].render(n,i,r)}catch(e){throw new Error("Could not find template to render '"+o+"'")}},e.prototype.template=function(e,t){return this.preCompiledTemplates[this.templateKey(e,t)]},e.prototype.templateKey=function(e,t){return e+"-"+t},e}();t.default=f},function(e,t,n){!function(e){var t=/\S/,n=/\"/g,i=/\n/g,r=/\r/g,o=/\\/g,l=/\u2028/,a=/\u2029/;function s(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function f(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function u(e,t,n){if(t.charAt(n)!=e.charAt(0))return!1;for(var i=1,r=e.length;i<r;i++)if(t.charAt(n+i)!=e.charAt(i))return!1;return!0}e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(n,i){var r=n.length,o=0,l=null,a=null,c="",d=[],h=!1,p=0,g=0,b="{{",v="}}";function m(){c.length>0&&(d.push({tag:"_t",text:new String(c)}),c="")}function y(n,i){if(m(),n&&function(){for(var n=!0,i=g;i<d.length;i++)if(!(n=e.tags[d[i].tag]<e.tags._v||"_t"==d[i].tag&&null===d[i].text.match(t)))return!1;return n}())for(var r,o=g;o<d.length;o++)d[o].text&&((r=d[o+1])&&">"==r.tag&&(r.indent=d[o].text.toString()),d.splice(o,1));else i||d.push({tag:"\n"});h=!1,g=d.length}function w(e,t){var n="="+v,i=e.indexOf(n,t),r=f(e.substring(e.indexOf("=",t)+1,i)).split(" ");return b=r[0],v=r[r.length-1],i+n.length-1}for(i&&(i=i.split(" "),b=i[0],v=i[1]),p=0;p<r;p++)0==o?u(b,n,p)?(--p,m(),o=1):"\n"==n.charAt(p)?y(h):c+=n.charAt(p):1==o?(p+=b.length-1,"="==(l=(a=e.tags[n.charAt(p+1)])?n.charAt(p+1):"_v")?(p=w(n,p),o=0):(a&&p++,o=2),h=p):u(v,n,p)?(d.push({tag:l,n:f(c),otag:b,ctag:v,i:"/"==l?h-b.length:p+v.length}),c="",p+=v.length-1,o=0,"{"==l&&("}}"==v?p++:s(d[d.length-1]))):c+=n.charAt(p);return y(h,!0),d};var c={_t:!0,"\n":!0,$:!0,"/":!0};function d(e,t){for(var n=0,i=t.length;n<i;n++)if(t[n].o==e.n)return e.tag="#",!0}function h(e,t,n){for(var i=0,r=n.length;i<r;i++)if(n[i].c==e&&n[i].o==t)return!0}function p(e){var t=[];for(var n in e.partials)t.push('"'+b(n)+'":{name:"'+b(e.partials[n].name)+'", '+p(e.partials[n])+"}");return"partials: {"+t.join(",")+"}, subs: "+function(e){var t=[];for(var n in e)t.push('"'+b(n)+'": function(c,p,t,i) {'+e[n]+"}");return"{ "+t.join(",")+" }"}(e.subs)}e.stringify=function(t,n,i){return"{code: function (c,p,i) { "+e.wrapMain(t.code)+" },"+p(t)+"}"};var g=0;function b(e){return e.replace(o,"\\\\").replace(n,'\\"').replace(i,"\\n").replace(r,"\\r").replace(l,"\\u2028").replace(a,"\\u2029")}function v(e){return~e.indexOf(".")?"d":"f"}function m(e,t){var n="<"+(t.prefix||"")+e.n+g++;return t.partials[n]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+b(n)+'",c,p,"'+(e.indent||"")+'"));',n}function y(e,t){t.code+="t.b(t.t(t."+v(e.n)+'("'+b(e.n)+'",c,p,0)));'}function w(e){return"t.b("+e+");"}e.generate=function(t,n,i){g=0;var r={code:"",subs:{},partials:{}};return e.walk(t,r),i.asString?this.stringify(r,n,i):this.makeTemplate(r,n,i)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,t,n){var i=this.makePartials(e);return i.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(i,t,this,n)},e.makePartials=function(e){var t,n={subs:{},partials:e.partials,name:e.name};for(t in n.partials)n.partials[t]=this.makePartials(n.partials[t]);for(t in e.subs)n.subs[t]=new Function("c","p","t","i",e.subs[t]);return n},e.codegen={"#":function(t,n){n.code+="if(t.s(t."+v(t.n)+'("'+b(t.n)+'",c,p,1),c,p,0,'+t.i+","+t.end+',"'+t.otag+" "+t.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(t.nodes,n),n.code+="});c.pop();}"},"^":function(t,n){n.code+="if(!t.s(t."+v(t.n)+'("'+b(t.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(t.nodes,n),n.code+="};"},">":m,"<":function(t,n){var i={partials:{},code:"",subs:{},inPartial:!0};e.walk(t.nodes,i);var r=n.partials[m(t,n)];r.subs=i.subs,r.partials=i.partials},$:function(t,n){var i={subs:{},code:"",partials:n.partials,prefix:t.n};e.walk(t.nodes,i),n.subs[t.n]=i.code,n.inPartial||(n.code+='t.sub("'+b(t.n)+'",c,p,i);')},"\n":function(e,t){t.code+=w('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+v(e.n)+'("'+b(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=w('"'+b(e.text)+'"')},"{":y,"&":y},e.walk=function(t,n){for(var i,r=0,o=t.length;r<o;r++)(i=e.codegen[t[r].tag])&&i(t[r],n);return n},e.parse=function(t,n,i){return function t(n,i,r,o){var l,a=[],s=null,f=null;for(l=r[r.length-1];n.length>0;){if(f=n.shift(),l&&"<"==l.tag&&!(f.tag in c))throw new Error("Illegal content in < super tag.");if(e.tags[f.tag]<=e.tags.$||d(f,o))r.push(f),f.nodes=t(n,f.tag,r,o);else{if("/"==f.tag){if(0===r.length)throw new Error("Closing tag without opener: /"+f.n);if(s=r.pop(),f.n!=s.n&&!h(f.n,s.n,o))throw new Error("Nesting error: "+s.n+" vs. "+f.n);return s.end=f.i,a}"\n"==f.tag&&(f.last=0==n.length||"\n"==n[0].tag)}a.push(f)}if(r.length>0)throw new Error("missing closing tag: "+r.pop().n);return a}(t,0,[],(i=i||{}).sectionTags||[])},e.cache={},e.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},e.compile=function(t,n){n=n||{};var i=e.cacheKey(t,n),r=this.cache[i];if(r){var o=r.partials;for(var l in o)delete o[l].instance;return r}return r=this.generate(this.parse(this.scan(t,n.delimiters),t,n),t,n),this.cache[i]=r}}(t)},function(e,t,n){!function(e){function t(e,t,n){var i;return t&&"object"==typeof t&&(void 0!==t[e]?i=t[e]:n&&t.get&&"function"==typeof t.get&&(i=t.get(e))),i}e.Template=function(e,t,n,i){e=e||{},this.r=e.code||this.r,this.c=n,this.options=i||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,t,n){return""},v:function(e){return e=s(e),a.test(e)?e.replace(n,"&").replace(i,"<").replace(r,">").replace(o,"'").replace(l,"""):e},t:s,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},ep:function(e,t){var n=this.partials[e],i=t[n.name];if(n.instance&&n.base==i)return n.instance;if("string"==typeof i){if(!this.c)throw new Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[e].base=i,n.subs){for(key in t.stackText||(t.stackText={}),n.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);i=function(e,t,n,i,r,o){function l(){}function a(){}var s;l.prototype=e,a.prototype=e.subs;var f=new l;for(s in f.subs=new a,f.subsText={},f.buf="",i=i||{},f.stackSubs=i,f.subsText=o,t)i[s]||(i[s]=t[s]);for(s in i)f.subs[s]=i[s];for(s in r=r||{},f.stackPartials=r,n)r[s]||(r[s]=n[s]);for(s in r)f.partials[s]=r[s];return f}(i,n.subs,n.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=i,i},rp:function(e,t,n,i){var r=this.ep(e,n);return r?r.ri(t,n,i):""},rs:function(e,t,n){var i=e[e.length-1];if(f(i))for(var r=0;r<i.length;r++)e.push(i[r]),n(e,t,this),e.pop();else n(e,t,this)},s:function(e,t,n,i,r,o,l){var a;return(!f(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,t,n,i,r,o,l)),a=!!e,!i&&a&&t&&t.push("object"==typeof e?e:t[t.length-1]),a)},d:function(e,n,i,r){var o,l=e.split("."),a=this.f(l[0],n,i,r),s=this.options.modelGet,u=null;if("."===e&&f(n[n.length-2]))a=n[n.length-1];else for(var c=1;c<l.length;c++)void 0!==(o=t(l[c],a,s))?(u=a,a=o):a="";return!(r&&!a)&&(r||"function"!=typeof a||(n.push(u),a=this.mv(a,n,i),n.pop()),a)},f:function(e,n,i,r){for(var o=!1,l=!1,a=this.options.modelGet,s=n.length-1;s>=0;s--)if(void 0!==(o=t(e,n[s],a))){l=!0;break}return l?(r||"function"!=typeof o||(o=this.mv(o,n,i)),o):!r&&""},ls:function(e,t,n,i,r){var o=this.options.delimiters;return this.options.delimiters=r,this.b(this.ct(s(e.call(t,i)),t,n)),this.options.delimiters=o,!1},ct:function(e,t,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,n)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,n,i,r,o,l){var a,s=t[t.length-1],f=e.call(s);return"function"==typeof f?!!i||(a=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(f,s,n,a.substring(r,o),l)):f},mv:function(e,t,n){var i=t[t.length-1],r=e.call(i);return"function"==typeof r?this.ct(s(r.call(i)),i,n):r},sub:function(e,t,n,i){var r=this.subs[e];r&&(this.activeSub=e,r(t,n,this,i),this.activeSub=!1)}};var n=/&/g,i=/</g,r=/>/g,o=/\'/g,l=/\"/g,a=/[&<>\"\']/;function s(e){return String(null==e?"":e)}var f=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(t)},function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTemplates=void 0;var l=o(n(4));t.defaultTemplates={},t.defaultTemplates["file-summary-line"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<li class="d2h-file-list-line">'),i.b("\n"+n),i.b(' <span class="d2h-file-name-wrapper">'),i.b("\n"+n),i.b(i.rp("<fileIcon0",e,t," ")),i.b(' <a href="#'),i.b(i.v(i.f("fileHtmlId",e,t,0))),i.b('" class="d2h-file-name">'),i.b(i.v(i.f("fileName",e,t,0))),i.b("</a>"),i.b("\n"+n),i.b(' <span class="d2h-file-stats">'),i.b("\n"+n),i.b(' <span class="d2h-lines-added">'),i.b(i.v(i.f("addedLines",e,t,0))),i.b("</span>"),i.b("\n"+n),i.b(' <span class="d2h-lines-deleted">'),i.b(i.v(i.f("deletedLines",e,t,0))),i.b("</span>"),i.b("\n"+n),i.b(" </span>"),i.b("\n"+n),i.b(" </span>"),i.b("\n"+n),i.b("</li>"),i.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}}),t.defaultTemplates["file-summary-wrapper"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<div class="d2h-file-list-wrapper">'),i.b("\n"+n),i.b(' <div class="d2h-file-list-header">'),i.b("\n"+n),i.b(' <span class="d2h-file-list-title">Files changed ('),i.b(i.v(i.f("filesNumber",e,t,0))),i.b(")</span>"),i.b("\n"+n),i.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),i.b("\n"+n),i.b(' <a class="d2h-file-switch d2h-show">show</a>'),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(' <ol class="d2h-file-list">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.f("files",e,t,0))),i.b("\n"+n),i.b(" </ol>"),i.b("\n"+n),i.b("</div>"),i.fl()},partials:{},subs:{}}),t.defaultTemplates["generic-block-header"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b("<tr>"),i.b("\n"+n),i.b(' <td class="'),i.b(i.v(i.f("lineClass",e,t,0))),i.b(" "),i.b(i.v(i.d("CSSLineClass.INFO",e,t,0))),i.b('"></td>'),i.b("\n"+n),i.b(' <td class="'),i.b(i.v(i.d("CSSLineClass.INFO",e,t,0))),i.b('">'),i.b("\n"+n),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,t,0))),i.b(" "),i.b(i.v(i.d("CSSLineClass.INFO",e,t,0))),i.b('">'),i.b(i.t(i.f("blockHeader",e,t,0))),i.b("</div>"),i.b("\n"+n),i.b(" </td>"),i.b("\n"+n),i.b("</tr>"),i.fl()},partials:{},subs:{}}),t.defaultTemplates["generic-empty-diff"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b("<tr>"),i.b("\n"+n),i.b(' <td class="'),i.b(i.v(i.d("CSSLineClass.INFO",e,t,0))),i.b('">'),i.b("\n"+n),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,t,0))),i.b(" "),i.b(i.v(i.d("CSSLineClass.INFO",e,t,0))),i.b('">'),i.b("\n"+n),i.b(" File without changes"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(" </td>"),i.b("\n"+n),i.b("</tr>"),i.fl()},partials:{},subs:{}}),t.defaultTemplates["generic-file-path"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<span class="d2h-file-name-wrapper">'),i.b("\n"+n),i.b(i.rp("<fileIcon0",e,t," ")),i.b(' <span class="d2h-file-name">'),i.b(i.v(i.f("fileDiffName",e,t,0))),i.b("</span>"),i.b("\n"+n),i.b(i.rp("<fileTag1",e,t," ")),i.b("</span>"),i.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}}),t.defaultTemplates["generic-line"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b("<tr>"),i.b("\n"+n),i.b(' <td class="'),i.b(i.v(i.f("lineClass",e,t,0))),i.b(" "),i.b(i.v(i.f("type",e,t,0))),i.b('">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.f("lineNumber",e,t,0))),i.b("\n"+n),i.b(" </td>"),i.b("\n"+n),i.b(' <td class="'),i.b(i.v(i.f("type",e,t,0))),i.b('">'),i.b("\n"+n),i.b(' <div class="'),i.b(i.v(i.f("contentClass",e,t,0))),i.b(" "),i.b(i.v(i.f("type",e,t,0))),i.b('">'),i.b("\n"+n),i.s(i.f("prefix",e,t,1),e,t,0,171,247,"{{ }}")&&(i.rs(e,t,(function(e,t,i){i.b(' <span class="d2h-code-line-prefix">'),i.b(i.t(i.f("prefix",e,t,0))),i.b("</span>"),i.b("\n"+n)})),e.pop()),i.s(i.f("prefix",e,t,1),e,t,1,0,0,"")||(i.b(' <span class="d2h-code-line-prefix"> </span>'),i.b("\n"+n)),i.s(i.f("content",e,t,1),e,t,0,380,454,"{{ }}")&&(i.rs(e,t,(function(e,t,i){i.b(' <span class="d2h-code-line-ctn">'),i.b(i.t(i.f("content",e,t,0))),i.b("</span>"),i.b("\n"+n)})),e.pop()),i.s(i.f("content",e,t,1),e,t,1,0,0,"")||(i.b(' <span class="d2h-code-line-ctn"><br></span>'),i.b("\n"+n)),i.b(" </div>"),i.b("\n"+n),i.b(" </td>"),i.b("\n"+n),i.b("</tr>"),i.fl()},partials:{},subs:{}}),t.defaultTemplates["generic-wrapper"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<div class="d2h-wrapper">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.f("content",e,t,0))),i.b("\n"+n),i.b("</div>"),i.fl()},partials:{},subs:{}}),t.defaultTemplates["icon-file-added"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),i.b("\n"+n),i.b(' width="14">'),i.b("\n"+n),i.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path>'),i.b("\n"+n),i.b("</svg>"),i.fl()},partials:{},subs:{}}),t.defaultTemplates["icon-file-changed"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),i.b("\n"+n),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+n),i.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>'),i.b("\n"+n),i.b("</svg>"),i.fl()},partials:{},subs:{}}),t.defaultTemplates["icon-file-deleted"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),i.b("\n"+n),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+n),i.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path>'),i.b("\n"+n),i.b("</svg>"),i.fl()},partials:{},subs:{}}),t.defaultTemplates["icon-file-renamed"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),i.b("\n"+n),i.b(' viewBox="0 0 14 16" width="14">'),i.b("\n"+n),i.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),i.b("\n"+n),i.b("</svg>"),i.fl()},partials:{},subs:{}}),t.defaultTemplates["icon-file"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),i.b("\n"+n),i.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),i.b("\n"+n),i.b("</svg>"),i.fl()},partials:{},subs:{}}),t.defaultTemplates["line-by-line-file-diff"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<div id="'),i.b(i.v(i.f("fileHtmlId",e,t,0))),i.b('" class="d2h-file-wrapper" data-lang="'),i.b(i.v(i.d("file.language",e,t,0))),i.b('">'),i.b("\n"+n),i.b(' <div class="d2h-file-header">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.f("filePath",e,t,0))),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(' <div class="d2h-file-diff">'),i.b("\n"+n),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+n),i.b(' <table class="d2h-diff-table">'),i.b("\n"+n),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.f("diffs",e,t,0))),i.b("\n"+n),i.b(" </tbody>"),i.b("\n"+n),i.b(" </table>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b("</div>"),i.fl()},partials:{},subs:{}}),t.defaultTemplates["line-by-line-numbers"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<div class="line-num1">'),i.b(i.v(i.f("oldNumber",e,t,0))),i.b("</div>"),i.b("\n"+n),i.b('<div class="line-num2">'),i.b(i.v(i.f("newNumber",e,t,0))),i.b("</div>"),i.fl()},partials:{},subs:{}}),t.defaultTemplates["side-by-side-file-diff"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<div id="'),i.b(i.v(i.f("fileHtmlId",e,t,0))),i.b('" class="d2h-file-wrapper" data-lang="'),i.b(i.v(i.d("file.language",e,t,0))),i.b('">'),i.b("\n"+n),i.b(' <div class="d2h-file-header">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.f("filePath",e,t,0))),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(' <div class="d2h-files-diff">'),i.b("\n"+n),i.b(' <div class="d2h-file-side-diff">'),i.b("\n"+n),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+n),i.b(' <table class="d2h-diff-table">'),i.b("\n"+n),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.d("diffs.left",e,t,0))),i.b("\n"+n),i.b(" </tbody>"),i.b("\n"+n),i.b(" </table>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(' <div class="d2h-file-side-diff">'),i.b("\n"+n),i.b(' <div class="d2h-code-wrapper">'),i.b("\n"+n),i.b(' <table class="d2h-diff-table">'),i.b("\n"+n),i.b(' <tbody class="d2h-diff-tbody">'),i.b("\n"+n),i.b(" "),i.b(i.t(i.d("diffs.right",e,t,0))),i.b("\n"+n),i.b(" </tbody>"),i.b("\n"+n),i.b(" </table>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b(" </div>"),i.b("\n"+n),i.b("</div>"),i.fl()},partials:{},subs:{}}),t.defaultTemplates["tag-file-added"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),i.fl()},partials:{},subs:{}}),t.defaultTemplates["tag-file-changed"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),i.fl()},partials:{},subs:{}}),t.defaultTemplates["tag-file-deleted"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),i.fl()},partials:{},subs:{}}),t.defaultTemplates["tag-file-renamed"]=new l.Template({code:function(e,t,n){var i=this;return i.b(n=n||""),i.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),i.fl()},partials:{},subs:{}})}])}));
|