react-diff-view
Advanced tools
Comparing version 1.3.1 to 1.3.2
44
index.js
@@ -1,44 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.reactDiffView=t(require("react"),require("prop-types")):e.reactDiffView=t(e.React,e.propTypes)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},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,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){var r,o;/*! | ||
Copyright (c) 2016 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/ | ||
!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===o)for(var i in r)a.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}var a={}.hasOwnProperty;void 0!==e&&e.exports?e.exports=n:(r=[],void 0!==(o=function(){return n}.apply(t,r))&&(e.exports=o))}()},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"parseDiff",function(){return f}),n.d(t,"addStubHunk",function(){return d});var o=n(4),a=n.n(o),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(e){var t=e.reduce(function(e,t,n){var r=u(e,3),o=r[0],a=r[1],i=r[2];return a?t.isInsert&&i>=0?(o.splice(i+1,0,t),[o,t,i+2]):(o.push(t),[o,t,t.isDelete&&a.isDelete?i:n]):(o.push(t),[o,t,t.isDelete?n:-1])},[[],null,-1]);return u(t,1)[0]},c=function(e,t){var n="zip"===t.nearbySequences?s(e.changes):e.changes;return i({},e,{changes:n})},l=function(e,t){var n=e.hunks.map(function(e){return c(e,t)});return i({},e,{hunks:t.stubHunk?d(n):n})},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a.a.parse(e).map(function(e){return l(e,t)})},d=function(e){if(!e||!e.length)return e;var t=e[e.length-1],n={oldStart:t.oldStart+t.oldLines,oldLines:0,newStart:t.newStart+t.newLines,newLines:0,content:"STUB",changes:[]};return[].concat(r(e),[n])}},function(e,t,n){!function(n){var r={parse:function(e){for(var t,n,r,o,a=[],i=2,u=e.split("\n"),s=u.length,c=0;c<s;){var l=u[c];if(0===l.indexOf("diff --git")){var f=l.split(" ");t={oldPath:f[2].slice(2),newPath:f[3].slice(2),hunks:[]},a.push(t);var d=null,h=u[c+1];0===h.indexOf("old")&&(t.oldMode=h.slice(9,16),t.newMode=u[c+2].slice(9,16),h=u[(c+=2)+1]),0===h.indexOf("similarity")&&(t.similarity=parseInt(h.split(" ")[2],10),c+=1);var p;e:for(;p=u[++c];){switch((f=p.split(" "))[0]){case"diff":c--;break e;case"index":var v=f[1].split("..");t.oldRevision=v[0],t.newRevision=v[1],f[2]&&(t.oldMode=t.newMode=f[2]),i=5;var m=u[c+1];if(0===m.indexOf("---")){var y=u[c+2];/\s\/dev\/null$/.test(m)?(t.oldPath="/dev/null",d="add"):/\s\/dev\/null$/.test(y)&&(t.newPath="/dev/null",d="delete"),c+=2}break e}d||(d=f[0])}t.type=d||"modify"}else if(0===l.indexOf("Binary"))t.isBinary=!0,i=2,t=null;else if(5===i)if(0===l.indexOf("@@")){var g=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(l);n={content:l,oldStart:g[1]-0,newStart:g[4]-0,oldLines:g[3]-0||0,newLines:g[6]-0||0,changes:[]},t.hunks.push(n),r=n.oldStart,o=n.newStart}else{var b=l.slice(0,1),w={content:l.slice(1)};switch(b){case"+":w.type="insert",w.isInsert=!0,w.lineNumber=o,o++;break;case"-":w.type="delete",w.isDelete=!0,w.lineNumber=r,r++;break;case" ":w.type="normal",w.isNormal=!0,w.oldLineNumber=r,w.newLineNumber=o,r++,o++}w.type&&n.changes.push(w)}c++}return a}};t=e.exports=r}()},function(e,t,n){(function(e,n){function r(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function i(e,t){return null==e?void 0:e[t]}function u(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function s(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function c(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function l(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function f(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function d(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function h(e){var t=-1,n=e?e.length:0;for(this.__data__=new d;++t<n;)this.add(e[t])}function p(e){this.__data__=new f(e)}function v(e,t){var n=Ct(e)||X(e)?a(e.length,String):[],r=n.length,o=!!r;for(var i in e)!t&&!tt.call(e,i)||o&&("length"==i||R(i,r))||n.push(i);return n}function m(e,t){for(var n=e.length;n--;)if(V(e[n][0],t))return n;return-1}function y(e,t){return e&&Nt(e,t,ie)}function g(e,t){for(var n=0,r=(t=F(t,e)?[t]:P(t)).length;null!=e&&n<r;)e=e[U(t[n++])];return n&&n==r?e:void 0}function b(e,t){return null!=e&&t in Object(e)}function w(e,t,n,r,o){return e===t||(null==e||null==t||!ee(e)&&!te(t)?e!==e&&t!==t:_(e,t,w,n,r,o))}function _(e,t,n,r,o,a){var i=Ct(e),s=Ct(t),c=ye,l=ye;i||(c=(c=Ot(e))==me?je:c),s||(l=(l=Ot(t))==me?je:l);var f=c==je&&!u(e),d=l==je&&!u(t),h=c==l;if(h&&!f)return a||(a=new p),i||kt(e)?L(e,t,n,r,o,a):A(e,t,c,n,r,o,a);if(!(o&he)){var v=f&&tt.call(e,"__wrapped__"),m=d&&tt.call(t,"__wrapped__");if(v||m){var y=v?e.value():e,g=m?t.value():t;return a||(a=new p),n(y,g,r,o,a)}}return!!h&&(a||(a=new p),T(e,t,n,r,o,a))}function E(e,t,n,r){var o=n.length,a=o,i=!r;if(null==e)return!a;for(e=Object(e);o--;){var u=n[o];if(i&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var s=(u=n[o])[0],c=e[s],l=u[1];if(i&&u[2]){if(void 0===c&&!(s in e))return!1}else{var f=new p;if(r)var d=r(c,l,s,e,t,f);if(!(void 0===d?w(l,c,r,de|he,f):d))return!1}}return!0}function N(e){return!(!ee(e)||W(e))&&(Q(e)||u(e)?rt:Re).test(J(e))}function O(e){return"function"==typeof e?e:null==e?ue:"object"==typeof e?Ct(e)?k(e[0],e[1]):C(e):se(e)}function j(e){if(!G(e))return st(e);var t=[];for(var n in Object(e))tt.call(e,n)&&"constructor"!=n&&t.push(n);return t}function C(e){var t=D(e);return 1==t.length&&t[0][2]?$(t[0][0],t[0][1]):function(n){return n===e||E(n,e,t)}}function k(e,t){return F(e)&&z(t)?$(U(e),t):function(n){var r=oe(n,e);return void 0===r&&r===t?ae(n,e):w(t,r,void 0,de|he)}}function x(e){return function(t){return g(t,e)}}function S(e){if("string"==typeof e)return e;if(ne(e))return Et?Et.call(e):"";var t=e+"";return"0"==t&&1/e==-pe?"-0":t}function P(e){return Ct(e)?e:jt(e)}function L(e,t,n,o,a,i){var u=a&he,s=e.length,c=t.length;if(s!=c&&!(u&&c>s))return!1;var l=i.get(e);if(l&&i.get(t))return l==t;var f=-1,d=!0,p=a&de?new h:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var v=e[f],m=t[f];if(o)var y=u?o(m,v,f,t,e,i):o(v,m,f,e,t,i);if(void 0!==y){if(y)continue;d=!1;break}if(p){if(!r(t,function(e,t){if(!p.has(t)&&(v===e||n(v,e,o,a,i)))return p.add(t)})){d=!1;break}}else if(v!==m&&!n(v,m,o,a,i)){d=!1;break}}return i.delete(e),i.delete(t),d}function A(e,t,n,r,o,a,i){switch(n){case Le:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Pe:return!(e.byteLength!=t.byteLength||!r(new at(e),new at(t)));case ge:case be:case Oe:return V(+e,+t);case we:return e.name==t.name&&e.message==t.message;case Ce:case xe:return e==t+"";case Ne:var u=s;case ke:var l=a&he;if(u||(u=c),e.size!=t.size&&!l)return!1;var f=i.get(e);if(f)return f==t;a|=de,i.set(e,t);var d=L(u(e),u(t),r,o,a,i);return i.delete(e),d;case Se:if(_t)return _t.call(e)==_t.call(t)}return!1}function T(e,t,n,r,o,a){var i=o&he,u=ie(e),s=u.length;if(s!=ie(t).length&&!i)return!1;for(var c=s;c--;){var l=u[c];if(!(i?l in t:tt.call(t,l)))return!1}var f=a.get(e);if(f&&a.get(t))return f==t;var d=!0;a.set(e,t),a.set(t,e);for(var h=i;++c<s;){var p=e[l=u[c]],v=t[l];if(r)var m=i?r(v,p,l,t,e,a):r(p,v,l,e,t,a);if(!(void 0===m?p===v||n(p,v,r,o,a):m)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var y=e.constructor,g=t.constructor;y!=g&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof g&&g instanceof g)&&(d=!1)}return a.delete(e),a.delete(t),d}function M(e,t){var n=e.__data__;return q(t)?n["string"==typeof t?"string":"hash"]:n.map}function D(e){for(var t=ie(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,z(o)]}return t}function H(e,t){var n=i(e,t);return N(n)?n:void 0}function I(e,t,n){for(var r,o=-1,a=(t=F(t,e)?[t]:P(t)).length;++o<a;){var i=U(t[o]);if(!(r=null!=e&&n(e,i)))break;e=e[i]}return r||!!(a=e?e.length:0)&&Y(a)&&R(i,a)&&(Ct(e)||X(e))}function R(e,t){return!!(t=null==t?ve:t)&&("number"==typeof e||Fe.test(e))&&e>-1&&e%1==0&&e<t}function F(e,t){if(Ct(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ne(e))||(Te.test(e)||!Ae.test(e)||null!=t&&e in Object(t))}function q(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function W(e){return!!Ye&&Ye in e}function G(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ze)}function z(e){return e===e&&!ee(e)}function $(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function U(e){if("string"==typeof e||ne(e))return e;var t=e+"";return"0"==t&&1/e==-pe?"-0":t}function J(e){if(null!=e){try{return et.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function B(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(le);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i),i};return n.cache=new(B.Cache||d),n}function V(e,t){return e===t||e!==e&&t!==t}function X(e){return Z(e)&&tt.call(e,"callee")&&(!it.call(e,"callee")||nt.call(e)==me)}function K(e){return null!=e&&Y(e.length)&&!Q(e)}function Z(e){return te(e)&&K(e)}function Q(e){var t=ee(e)?nt.call(e):"";return t==_e||t==Ee}function Y(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=ve}function ee(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function te(e){return!!e&&"object"==typeof e}function ne(e){return"symbol"==typeof e||te(e)&&nt.call(e)==Se}function re(e){return null==e?"":S(e)}function oe(e,t,n){var r=null==e?void 0:g(e,t);return void 0===r?n:r}function ae(e,t){return null!=e&&I(e,t,b)}function ie(e){return K(e)?v(e):j(e)}function ue(e){return e}function se(e){return F(e)?o(U(e)):x(e)}var ce=200,le="Expected a function",fe="__lodash_hash_undefined__",de=1,he=2,pe=1/0,ve=9007199254740991,me="[object Arguments]",ye="[object Array]",ge="[object Boolean]",be="[object Date]",we="[object Error]",_e="[object Function]",Ee="[object GeneratorFunction]",Ne="[object Map]",Oe="[object Number]",je="[object Object]",Ce="[object RegExp]",ke="[object Set]",xe="[object String]",Se="[object Symbol]",Pe="[object ArrayBuffer]",Le="[object DataView]",Ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Te=/^\w*$/,Me=/^\./,De=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,He=/[\\^$.*+?()[\]{}|]/g,Ie=/\\(\\)?/g,Re=/^\[object .+?Constructor\]$/,Fe=/^(?:0|[1-9]\d*)$/,qe={};qe["[object Float32Array]"]=qe["[object Float64Array]"]=qe["[object Int8Array]"]=qe["[object Int16Array]"]=qe["[object Int32Array]"]=qe["[object Uint8Array]"]=qe["[object Uint8ClampedArray]"]=qe["[object Uint16Array]"]=qe["[object Uint32Array]"]=!0,qe[me]=qe[ye]=qe[Pe]=qe[ge]=qe[Le]=qe[be]=qe[we]=qe[_e]=qe[Ne]=qe[Oe]=qe[je]=qe[Ce]=qe[ke]=qe[xe]=qe["[object WeakMap]"]=!1;var We="object"==typeof e&&e&&e.Object===Object&&e,Ge="object"==typeof self&&self&&self.Object===Object&&self,ze=We||Ge||Function("return this")(),$e="object"==typeof t&&t&&!t.nodeType&&t,Ue=$e&&"object"==typeof n&&n&&!n.nodeType&&n,Je=Ue&&Ue.exports===$e&&We.process,Be=function(){try{return Je&&Je.binding("util")}catch(e){}}(),Ve=Be&&Be.isTypedArray,Xe=Array.prototype,Ke=Function.prototype,Ze=Object.prototype,Qe=ze["__core-js_shared__"],Ye=function(){var e=/[^.]+$/.exec(Qe&&Qe.keys&&Qe.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),et=Ke.toString,tt=Ze.hasOwnProperty,nt=Ze.toString,rt=RegExp("^"+et.call(tt).replace(He,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ot=ze.Symbol,at=ze.Uint8Array,it=Ze.propertyIsEnumerable,ut=Xe.splice,st=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ct=H(ze,"DataView"),lt=H(ze,"Map"),ft=H(ze,"Promise"),dt=H(ze,"Set"),ht=H(ze,"WeakMap"),pt=H(Object,"create"),vt=J(ct),mt=J(lt),yt=J(ft),gt=J(dt),bt=J(ht),wt=ot?ot.prototype:void 0,_t=wt?wt.valueOf:void 0,Et=wt?wt.toString:void 0;l.prototype.clear=function(){this.__data__=pt?pt(null):{}},l.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},l.prototype.get=function(e){var t=this.__data__;if(pt){var n=t[e];return n===fe?void 0:n}return tt.call(t,e)?t[e]:void 0},l.prototype.has=function(e){var t=this.__data__;return pt?void 0!==t[e]:tt.call(t,e)},l.prototype.set=function(e,t){return this.__data__[e]=pt&&void 0===t?fe:t,this},f.prototype.clear=function(){this.__data__=[]},f.prototype.delete=function(e){var t=this.__data__,n=m(t,e);return!(n<0||(n==t.length-1?t.pop():ut.call(t,n,1),0))},f.prototype.get=function(e){var t=this.__data__,n=m(t,e);return n<0?void 0:t[n][1]},f.prototype.has=function(e){return m(this.__data__,e)>-1},f.prototype.set=function(e,t){var n=this.__data__,r=m(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},d.prototype.clear=function(){this.__data__={hash:new l,map:new(lt||f),string:new l}},d.prototype.delete=function(e){return M(this,e).delete(e)},d.prototype.get=function(e){return M(this,e).get(e)},d.prototype.has=function(e){return M(this,e).has(e)},d.prototype.set=function(e,t){return M(this,e).set(e,t),this},h.prototype.add=h.prototype.push=function(e){return this.__data__.set(e,fe),this},h.prototype.has=function(e){return this.__data__.has(e)},p.prototype.clear=function(){this.__data__=new f},p.prototype.delete=function(e){return this.__data__.delete(e)},p.prototype.get=function(e){return this.__data__.get(e)},p.prototype.has=function(e){return this.__data__.has(e)},p.prototype.set=function(e,t){var n=this.__data__;if(n instanceof f){var r=n.__data__;if(!lt||r.length<ce-1)return r.push([e,t]),this;n=this.__data__=new d(r)}return n.set(e,t),this};var Nt=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}(),Ot=function(e){return nt.call(e)};(ct&&Ot(new ct(new ArrayBuffer(1)))!=Le||lt&&Ot(new lt)!=Ne||ft&&"[object Promise]"!=Ot(ft.resolve())||dt&&Ot(new dt)!=ke||ht&&"[object WeakMap]"!=Ot(new ht))&&(Ot=function(e){var t=nt.call(e),n=t==je?e.constructor:void 0,r=n?J(n):void 0;if(r)switch(r){case vt:return Le;case mt:return Ne;case yt:return"[object Promise]";case gt:return ke;case bt:return"[object WeakMap]"}return t});var jt=B(function(e){e=re(e);var t=[];return Me.test(e)&&t.push(""),e.replace(De,function(e,n,r,o){t.push(r?o.replace(Ie,"$1"):n||e)}),t});B.Cache=d;var Ct=Array.isArray,kt=Ve?function(e){return function(t){return e(t)}}(Ve):function(e){return te(e)&&Y(e.length)&&!!qe[nt.call(e)]};n.exports=function(e,t){var n={};return t=O(t,3),y(e,function(e,r,o){n[r]=t(e,r,o)}),n}}).call(t,n(6),n(12)(e))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function d(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function b(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function w(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function N(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function O(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var j,C,k=n(0),x=n.n(k),S=n(1),P=n.n(S),L=n(2),A=n.n(L),T=n(10),M=n.n(T),D=n(11),H=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I=function(e){var t=e.isNormal,n=e.isInsert,r=e.lineNumber,o=e.oldLineNumber;return n?-1:t?o:r},R=function(e){var t=e.isNormal,n=e.isDelete,r=e.lineNumber,o=e.newLineNumber;return n?-1:t?o:r},F=function(e){return e[e.length-1]},q=function(e,t,n){var r=e.reduce(function(e,r,o){var a={type:"normal",isNormal:!0,oldLineNumber:t+o,newLineNumber:n+o,content:""+r};return e.push(a),e},[]),o=r.length;return{content:"@@ -"+t+","+o+" +"+n+","+o,oldStart:t,oldLines:o,newStart:n,newLines:o,changes:r}},W=function(e,t){var n=F(e);if(!n)return[t];var o=F(n.changes),a=t.changes[0];if(!o||!a)return e.concat(t);if(I(o)+1!==I(a))return e.concat(t);var i=H({},n,{oldLines:n.oldLines+t.oldLines,newLines:n.newLines+t.newLines,changes:[].concat(r(n.changes),r(t.changes))});return[].concat(r(e.slice(0,-1)),[i])},G=function(e,t){var n=I(t.changes[0]),o=e.findIndex(function(e){return I(e.changes[0])>=n});return(-1===o?e.concat(t):[].concat(r(e.slice(0,o)),[t],r(e.slice(o)))).reduce(W,[])},z=function(e){var t=e.isNormal,n=e.isInsert,r=e.lineNumber,o=e.oldLineNumber;return t?"N"+o:(n?"I":"D")+r},$=[[],[]],U=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.threshold,r=void 0===n?1/0:n,o=t.markLongDistanceDiff,a=void 0!==o&&o;return function(t,n){if(!t||!n)return $;var o=t.content,i=n.content;if(r!==1/0&&M()(o,i)>r)return a?[[[0,o.length]],[[0,i.length]]]:$;var u=e(o,i).reduce(function(e,t){var n=t.added,r=t.removed,o=t.value;return n||r?n?(e.bEdits.push([e.bIndex,o.length]),e.bIndex+=o.length,e):(e.aEdits.push([e.aIndex,o.length]),e.aIndex+=o.length,e):(e.aIndex+=o.length,e.bIndex+=o.length,e)},{aEdits:[],bEdits:[],aIndex:0,bIndex:0});return[u.aEdits,u.bEdits]}}},J=U(D.diffWordsWithSpace),B=U(D.diffChars),V=P.a.oneOf(["unified","split"]),X={type:P.a.oneOf(["delete","insert","normal"]).isRequired,content:P.a.string.isRequired,isNormal:P.a.bool,isInsert:P.a.bool,isDelete:P.a.bool,lineNumber:P.a.number,oldLineNumber:P.a.number,newLineNumber:P.a.number},K=P.a.shape(X),Z={oldStart:P.a.number.isRequired,oldLines:P.a.number.isRequired,newStart:P.a.number.isRequired,newLines:P.a.number.isRequired,content:P.a.string.isRequired,changes:P.a.arrayOf(K).isRequired},Q=P.a.shape(Z),Y={gutterHeader:P.a.object,codeHeader:P.a.object,gutter:P.a.object,code:P.a.object},ee=P.a.shape(Y),te={hunk:P.a.string,hunkHeader:P.a.string,gutterHeader:P.a.string,codeHeader:P.a.string,line:P.a.string,gutter:P.a.string,code:P.a.string},ne=P.a.shape(te),re=n(5),oe=n.n(re),ae=function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0},ie=function(e){var t=null,n=null;return function(){for(var r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];return t&&ae(t,o)||(n=e.apply(void 0,o),t=o),n}},ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{headerGutterEvents:e.gutterHeader,headerContentEvents:e.codeHeader,otherEvents:o(e,["gutterHeader","codeHeader"])}},se=function(){return ie(ue)},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{hunkClassName:e.hunk,headerClassName:e.hunkHeader,headerGutterClassName:e.gutterHeader,headerContentClassName:e.codeHeader,otherClassNames:o(e,["hunk","hunkHeader","gutterHeader","codeHeader"])}},le=function(){return ie(ce)},fe=function(e,t){return oe()(e,function(e){return function(){return e(t)}})},de=function(){return ie(fe)},he=(n(7),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),pe=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ve=(C=j=function(e){function t(){var e,n,r,o;a(this,t);for(var u=arguments.length,s=Array(u),c=0;c<u;c++)s[c]=arguments[c];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(s))),r.bindGutterEvents=de(),r.bindCodeEvents=de(),o=n,i(r,o)}return u(t,k["PureComponent"]),pe(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.change;(0,e.onRenderCode)(this.container.querySelector(".diff-code"),t)}},{key:"componentDidUpdate",value:function(){}},{key:"render",value:function(){var e=this,t=this.props,n=t.change,r=t.selected,o=t.customClassNames,a=t.customEvents,i=t.gutterAnchor,u=t.generateAnchorID,s=n.type,c=n.content,l=I(n),f=-1===l?void 0:l,d=R(n),h=-1===d?void 0:d,p=this.bindGutterEvents(a.gutter,n),v=this.bindCodeEvents(a.code,n),m=u(n),y=A()("diff-gutter","diff-gutter-"+s,o.gutter,{"diff-gutter-selected":r}),g=A()("diff-code","diff-code-"+s,o.code,{"diff-code-selected":r});return x.a.createElement("tr",{id:m,className:A()("diff-line",o.line),ref:function(t){return e.container=t}},x.a.createElement("td",he({className:y,"data-line-number":f},p),i?x.a.createElement("a",{href:"#"+m,"data-line-number":f}):null),x.a.createElement("td",he({className:y,"data-line-number":h},p),i?x.a.createElement("a",{href:"#"+m,"data-line-number":h}):null),x.a.createElement("td",he({className:g},v),c))}}]),t}(),j.propTypes={change:K.isRequired,selected:P.a.bool.isRequired,customEvents:ee,customClassNames:ne,onRenderCode:P.a.func},j.defaultProps={customEvents:{},onRenderCode:function(){}},C);ve.displayName="UnifiedChange";n(8);var me=function(e){var t=e.element;return x.a.createElement("tr",{className:"diff-widget"},x.a.createElement("td",{colSpan:3,className:"diff-widget-content"},t))};me.displayName="UnifiedWidget";var ye=me,ge=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),be=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},we=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_e=function(e,t){return e.reduce(function(e,n){var r=z(n);e.push(["change",r,n]);var o=t[r];return o&&e.push(["widget",r,o]),e},[])},Ee=function(e,t,n,r){var o=we(e,3),a=o[0],i=o[1],u=o[2];return"change"===a?x.a.createElement(ve,be({key:"change"+i,change:u,selected:n.includes(i)},r)):"widget"===a?x.a.createElement(ye,{key:"widget"+i,element:u}):null},Ne=function(e){function t(){var e,n,r,o;c(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=l(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.bindGutterEvents=de(),r.bindContentEvents=de(),o=n,l(r,o)}return f(t,k["PureComponent"]),ge(t,[{key:"render",value:function(){var e=this.props,t=e.hunk,n=e.elements,r=e.gutterEvents,o=e.contentEvents,a=e.className,i=e.gutterClassName,u=e.contentClassName,s=this.bindGutterEvents(r,t),c=this.bindGutterEvents(o,t),l=A()("diff-hunk-header",a),f=A()("diff-hunk-header-gutter",i),d=A()("diff-hunk-header-content",u);if(void 0===n)return x.a.createElement("tr",{className:l},x.a.createElement("td",be({colSpan:2,className:f},s)),x.a.createElement("td",be({className:d},c),t.content));if(null===n)return null;if(Array.isArray(n)){var h=we(n,2),p=h[0],v=h[1];return x.a.createElement("tr",{className:l},x.a.createElement("td",be({colSpan:2,className:f},s),p),x.a.createElement("td",be({className:d},c),v))}return x.a.createElement("tr",{className:l},x.a.createElement("td",be({colSpan:3,className:d},c),n))}}]),t}();Ne.displayName="HunkHeader";var Oe=function(e){var t=e.hunk,n=e.widgets,r=e.selectedChanges,o=e.header,a=e.headerGutterEvents,i=e.headerContentEvents,u=e.className,c=e.headerClassName,l=e.headerGutterClassName,f=e.headerContentClassName,d=s(e,["hunk","widgets","selectedChanges","header","headerGutterEvents","headerContentEvents","className","headerClassName","headerGutterClassName","headerContentClassName"]),h=_e(t.changes,n);return x.a.createElement("tbody",{className:A()("diff-hunk",u)},x.a.createElement(Ne,{hunk:t,elements:o,gutterEvents:a,contentEvents:i,className:c,gutterClassName:l,contentClassName:f}),h.map(function(e,t){return Ee(e,0,r,d)}))};Oe.displayName="UnifiedHunk";var je,Ce,ke=Oe,xe=n(13),Se=n.n(xe),Pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Le=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Ae=(Ce=je=function(e){function t(){var e,n,r,o;h(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=p(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.cell=null,o=n,p(r,o)}return v(t,k["PureComponent"]),Le(t,[{key:"componentDidMount",value:function(){this.notifyRender()}},{key:"componentDidUpdate",value:function(e){e.text===this.props.text&&e.html===this.props.html||this.notifyRender()}},{key:"notifyRender",value:function(){this.props.onRender(this.cell)}},{key:"render",value:function(){var e=this,t=this.props,n=t.text,r=t.html,o=(t.onRender,d(t,["text","html","onRender"])),a=function(t){return e.cell=t};return r?x.a.createElement("td",Pe({ref:a},o,{dangerouslySetInnerHTML:{__html:r}})):x.a.createElement("td",Pe({ref:a},o),n)}}]),t}(),je.defaultProps={onRender:function(){}},Ce);Ae.displayName="CodeCell";var Te,Me,De=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),He=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Ie=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Re=[[],[]],Fe=function(e){var t=e.change,n=e.side,r=e.edits,o=e.selected,a=e.customClassNames,i=e.customEvents,u=e.onRenderCode,s=e.bindGutterEvents,c=e.bindCodeEvents,l=e.anchorID,f=e.gutterAnchor,d=e.gutterAnchorTarget;if(!t)return[x.a.createElement("td",{key:"gutter",className:A()("diff-gutter","diff-gutter-omit",a.gutter)}),x.a.createElement("td",{key:"code",className:A()("diff-code","diff-code-omit",a.code)})];var h=t.type,p=t.content,v=0===n?I(t):R(t),m=s(i.gutter,t),y=A()("diff-gutter","diff-gutter-"+h,a.gutter,{"diff-gutter-selected":o}),g=Ie({key:"gutter",id:l,className:y,"data-line-number":v,children:f?x.a.createElement("a",{href:"#"+d,"data-line-number":v}):null},m),b=c(i.code,t),w=A()("diff-code","diff-code-"+h,a.code,{"diff-code-selected":o}),_=Ie({key:"code",className:w,onRender:u},b);if(!r.length)return[x.a.createElement("td",g),x.a.createElement(Ae,Ie({},_,{text:p}))];var E=r.reduce(function(e,t){var n=He(t,2),r=n[0],o=n[1],a=p.slice(e.lastIndex,r),i=p.substr(r,o);return e.html+=Se()(a)+'<mark class="diff-code-edit">'+Se()(i)+"</mark>",e.lastIndex=r+o,e},{html:"",lastIndex:0}),N=E.html,O=E.lastIndex,j=Se()(p.substring(O));return[x.a.createElement("td",g),x.a.createElement(Ae,Ie({},_,{html:N+j}))]},qe=(Me=Te=function(e){function t(){var e,n,r,o;m(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=y(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.bindOldGutterEvents=de(),r.bindNewGutterEvents=de(),r.bindOldCodeEvents=de(),r.bindNewCodeEvents=de(),o=n,y(r,o)}return g(t,k["PureComponent"]),De(t,[{key:"render",value:function(){var e=this.props,t=e.oldChange,n=e.newChange,r=e.oldSelected,o=e.newSelected,a=e.monotonous,i=e.markEdits,u=e.customClassNames,s=e.customEvents,c=e.onRenderCode,l=e.generateAnchorID,f=e.gutterAnchor,d=i(t,n),h=He(d,2),p=h[0],v=h[1],m={monotonous:a,customClassNames:u,customEvents:s,onRenderCode:c},y=t&&l(t),g=Ie({},m,{change:t,side:0,edits:p,selected:r,bindGutterEvents:this.bindOldGutterEvents,bindCodeEvents:this.bindOldCodeEvents,anchorID:y,gutterAnchor:f,gutterAnchorTarget:y}),b=n&&l(n),w=Ie({},m,{change:n,side:1,edits:v,selected:o,bindGutterEvents:this.bindNewGutterEvents,bindCodeEvents:this.bindNewCodeEvents,anchorID:t===n?void 0:b,gutterAnchor:f,gutterAnchorTarget:t===n?y:b});if(a)return x.a.createElement("tr",{className:A()("diff-line",u.line)},Fe(t?g:w));var _=function(e,t){return e&&!t?"diff-line-old-only":!e&&t?"diff-line-new-only":e===t?"diff-line-normal":"diff-line-compare"}(t,n);return x.a.createElement("tr",{className:A()("diff-line",u.line,_)},Fe(g),Fe(w))}}]),t}(),Te.propTypes={monotonous:P.a.bool.isRequired,oldChange:K,newChange:K,oldSelected:P.a.bool.isRequired,newSelected:P.a.bool.isRequired,markEdits:P.a.func,customEvents:ee,customClassNames:ne,onRenderCode:P.a.func},Te.defaultProps={customEvents:{},markEdits:function(){return Re},onRenderCode:function(){}},Me);qe.displayName="SplitChange";var We=function(e){var t=e.oldElement,n=e.newElement;return e.monotonous?x.a.createElement("tr",{className:"diff-widget"},x.a.createElement("td",{colSpan:2,className:"diff-widget-content"},t||n)):t===n?x.a.createElement("tr",{className:"diff-widget"},x.a.createElement("td",{colSpan:4,className:"diff-widget-content"},t)):x.a.createElement("tr",{className:"diff-widget"},x.a.createElement("td",{colSpan:2,className:"diff-widget-gutter"},t),x.a.createElement("td",{colSpan:2,className:"diff-widget-content"},n))};We.displayName="SplitWidget";var Ge=We,ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$e=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Ue=function(e,t){return(e?z(e):"00")+(t?z(t):"00")},Je=function(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r];if(o.isNormal)n.push(["change",Ue(o,o),o,o]);else if(o.isDelete){var a=e[r+1];a&&a.isInsert?(r+=1,n.push(["change",Ue(o,a),o,a])):n.push(["change",Ue(o,null),o,null])}else n.push(["change",Ue(null,o),null,o]);var i=n[n.length-1],u=i.slice(2).map(function(e){if(!e)return null;var n=z(e);return t[n]||null}),s=$e(u,2),c=s[0],l=s[1];if(c||l){var f=i[1];n.push(["widget",f,c,l])}}return n},Be=function(e,t,n,r,o){var a=$e(e,4),i=a[0],u=a[1],s=a[2],c=a[3];if("change"===i){var l=!!s&&n.includes(z(s)),f=!!c&&n.includes(z(c));return x.a.createElement(qe,ze({key:"change"+u,oldChange:s,newChange:c,monotonous:r,oldSelected:l,newSelected:f},o))}return"widget"===i?x.a.createElement(Ge,{key:"widget"+u,monotonous:r,oldElement:s,newElement:c}):null},Ve=function(e){var t=e.hunk,n=e.monotonous,r=e.elements,o=e.gutterEvents,a=e.contentEvents,i=e.className,u=e.gutterClassName,s=e.contentClassName,c=function(e){return function(){return e(t)}},l=oe()(o,c),f=oe()(a,c),d=A()("diff-hunk-header",i),h=A()("diff-hunk-header-gutter",u),p=A()("diff-hunk-header-content",s);if(void 0===r)return x.a.createElement("tr",{className:d},x.a.createElement("td",ze({className:h},l)),x.a.createElement("td",ze({colSpan:n?1:3,className:p},f),t.content));if(null===r)return null;if(Array.isArray(r)){var v=$e(r,2),m=v[0],y=v[1];return x.a.createElement("tr",{className:d},x.a.createElement("td",ze({className:h},l),m),x.a.createElement("td",ze({colSpan:n?1:3,className:p},f),y))}return x.a.createElement("tr",{className:d},x.a.createElement("td",ze({colSpan:n?2:4,className:p},f),r))};Ve.displayName="HunkHeader";var Xe=function(e){var t=e.hunk,n=e.monotonous,r=e.widgets,o=e.selectedChanges,a=e.header,i=e.headerGutterEvents,u=e.headerContentEvents,s=e.className,c=e.headerClassName,l=e.headerGutterClassName,f=e.headerContentClassName,d=b(e,["hunk","monotonous","widgets","selectedChanges","header","headerGutterEvents","headerContentEvents","className","headerClassName","headerGutterClassName","headerContentClassName"]),h=Je(t.changes,r);return x.a.createElement("tbody",{className:A()("diff-hunk",s)},x.a.createElement(Ve,{hunk:t,monotonous:n,elements:a,gutterEvents:i,contentEvents:u,className:c,gutterClassName:l,contentClassName:f}),h.map(function(e,t){return Be(e,0,o,n,d)}))};Xe.displayName="SplitHunk";var Ke,Ze,Qe=Xe,Ye=(n(14),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),et=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),tt=(Ze=Ke=function(e){function t(){var e,n,r,o;_(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=E(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.selectEvents=se(),r.selectClassNames=le(),o=n,E(r,o)}return N(t,k["PureComponent"]),et(t,[{key:"render",value:function(){var e=this.props,t=e.viewType,n=e.customEvents,r=e.customClassNames,o=w(e,["viewType","customEvents","customClassNames"]),a="unified"===t?ke:Qe,i=this.selectEvents(n),u=i.headerGutterEvents,s=i.headerContentEvents,c=i.otherEvents,l=this.selectClassNames(r),f=l.hunkClassName,d=l.headerClassName,h=l.headerGutterClassName,p=l.headerContentClassName,v=l.otherClassNames;return x.a.createElement(a,Ye({},o,{headerGutterEvents:u,headerContentEvents:s,className:f,headerClassName:d,headerGutterClassName:h,headerContentClassName:p,customEvents:c,customClassNames:v}))}}]),t}(),Ke.propTypes={viewType:V,hunk:Q.isRequired,header:P.a.oneOfType([P.a.node,P.a.shape([P.a.node,P.a.node])]),widgets:P.a.objectOf(P.a.element),selectedChanges:P.a.arrayOf(P.a.string),customEvents:ee},Ke.defaultProps={viewType:"split",widgets:{},selectedChanges:[],customEvents:{}},Ze);tt.displayName="Hunk";n(15);var nt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rt=function(e){var t=e.diffType,n=e.hunks,r=e.children,o=e.className,a=O(e,["diffType","hunks","children","className"]),i="add"===t||"delete"===t,u=function(e,t){return"unified"===a.viewType?x.a.createElement("colgroup",null,x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",null)):t?x.a.createElement("colgroup",null,x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",null)):x.a.createElement("colgroup",null,x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",null),x.a.createElement("col",{className:"diff-gutter-col"}),x.a.createElement("col",null))}(0,i),s=r?k.Children.map(r,function(e){return Object(k.cloneElement)(e,nt({},a,{monotonous:i}))}):n.map(function(e){return x.a.createElement(tt,nt({key:e.content,hunk:e,monotonous:i},a))});return x.a.createElement("table",{className:A()("diff",o)},u,s)};rt.displayName="Diff",rt.propTypes={diffType:P.a.oneOf(["add","delete","modify","rename","copy"]),viewType:V.isRequired,hunks:P.a.arrayOf(Q),gutterAnchor:P.a.bool,generateAnchorID:P.a.func,children:P.a.oneOfType([P.a.element,P.a.arrayOf(P.a.element)])},rt.defaultProps={generateAnchorID:function(){}};var ot=rt,at=n(3);n.d(t,"Diff",function(){return ot}),n.d(t,"Hunk",function(){return tt}),n.d(t,"parseDiff",function(){return at.parseDiff}),n.d(t,"addStubHunk",function(){return at.addStubHunk}),n.d(t,"computeOldLineNumber",function(){return I}),n.d(t,"computeNewLineNumber",function(){return R}),n.d(t,"textLinesToHunk",function(){return q}),n.d(t,"insertHunk",function(){return G}),n.d(t,"getChangeKey",function(){return z}),n.d(t,"markWordEdits",function(){return J}),n.d(t,"markCharacterEdits",function(){return B})},function(e,t,n){"use strict";var r=[],o=[];e.exports=function(e,t){if(e===t)return 0;var n=e;e.length>t.length&&(e=t,t=n);var a=e.length,i=t.length;if(0===a)return i;if(0===i)return a;for(;a>0&&e.charCodeAt(~-a)===t.charCodeAt(~-i);)a--,i--;if(0===a)return i;for(var u=0;u<a&&e.charCodeAt(u)===t.charCodeAt(u);)u++;if(a-=u,i-=u,0===a)return i;for(var s,c,l,f,d=0,h=0;d<a;)o[u+d]=e.charCodeAt(u+d),r[d]=++d;for(;h<i;)for(s=t.charCodeAt(u+h),l=h++,c=h,d=0;d<a;d++)f=s===o[u+d]?l:l+1,l=r[d],c=r[d]=l>c?f>c?c+1:f:f>l?l+1:f;return c}},function(e,t,n){/*! | ||
diff v3.3.1 | ||
Software License Agreement (BSD License) | ||
Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com> | ||
All rights reserved. | ||
Redistribution and use of this software in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above | ||
copyright notice, this list of conditions and the | ||
following disclaimer. | ||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the | ||
following disclaimer in the documentation and/or other | ||
materials provided with the distribution. | ||
* Neither the name of Kevin Decker nor the names of its | ||
contributors may be used to endorse or promote products | ||
derived from this software without specific prior | ||
written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR | ||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | ||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | ||
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | ||
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
@license | ||
*/ | ||
!function(t,n){e.exports=n()}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";t.__esModule=!0,t.canonicalize=t.convertChangesToXML=t.convertChangesToDMP=t.merge=t.parsePatch=t.applyPatches=t.applyPatch=t.createPatch=t.createTwoFilesPatch=t.structuredPatch=t.diffArrays=t.diffJson=t.diffCss=t.diffSentences=t.diffTrimmedLines=t.diffLines=t.diffWordsWithSpace=t.diffWords=t.diffChars=t.Diff=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=n(2),a=n(3),i=n(5),u=n(6),s=n(7),c=n(8),l=n(9),f=n(10),d=n(11),h=n(13),p=n(14),v=n(16),m=n(17);t.Diff=r.default,t.diffChars=o.diffChars,t.diffWords=a.diffWords,t.diffWordsWithSpace=a.diffWordsWithSpace,t.diffLines=i.diffLines,t.diffTrimmedLines=i.diffTrimmedLines,t.diffSentences=u.diffSentences,t.diffCss=s.diffCss,t.diffJson=c.diffJson,t.diffArrays=l.diffArrays,t.structuredPatch=p.structuredPatch,t.createTwoFilesPatch=p.createTwoFilesPatch,t.createPatch=p.createPatch,t.applyPatch=f.applyPatch,t.applyPatches=f.applyPatches,t.parsePatch=d.parsePatch,t.merge=h.merge,t.convertChangesToDMP=v.convertChangesToDMP,t.convertChangesToXML=m.convertChangesToXML,t.canonicalize=c.canonicalize},function(e,t){"use strict";function n(){}function r(e,t,n,r,o){for(var a=0,i=t.length,u=0,s=0;a<i;a++){var c=t[a];if(c.removed){if(c.value=e.join(r.slice(s,s+c.count)),s+=c.count,a&&t[a-1].added){var l=t[a-1];t[a-1]=t[a],t[a]=l}}else{if(!c.added&&o){var f=n.slice(u,u+c.count);f=f.map(function(e,t){var n=r[s+t];return n.length>e.length?n:e}),c.value=e.join(f)}else c.value=e.join(n.slice(u,u+c.count));u+=c.count,c.added||(s+=c.count)}}var d=t[i-1];return i>1&&(d.added||d.removed)&&e.equals("",d.value)&&(t[i-2].value+=d.value,t.pop()),t}function o(e){return{newPos:e.newPos,components:e.components.slice(0)}}t.__esModule=!0,t.default=n,n.prototype={diff:function(e,t){function n(e){return u?(setTimeout(function(){u(void 0,e)},0),!0):e}function a(){for(var a=-1*f;a<=f;a+=2){var i=void 0,u=h[a-1],d=h[a+1],p=(d?d.newPos:0)-a;u&&(h[a-1]=void 0);var v=u&&u.newPos+1<c,m=d&&0<=p&&p<l;if(v||m){if(!v||m&&u.newPos<d.newPos?(i=o(d),s.pushComponent(i.components,void 0,!0)):((i=u).newPos++,s.pushComponent(i.components,!0,void 0)),p=s.extractCommon(i,t,e,a),i.newPos+1>=c&&p+1>=l)return n(r(s,i.components,t,e,s.useLongestToken));h[a]=i}else h[a]=void 0}f++}var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=i.callback;"function"==typeof i&&(u=i,i={}),this.options=i;var s=this;e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var c=(t=this.removeEmpty(this.tokenize(t))).length,l=e.length,f=1,d=c+l,h=[{newPos:-1,components:[]}],p=this.extractCommon(h[0],t,e,0);if(h[0].newPos+1>=c&&p+1>=l)return n([{value:this.join(t),count:t.length}]);if(u)!function e(){setTimeout(function(){if(f>d)return u();a()||e()},0)}();else for(;f<=d;){var v=a();if(v)return v}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,a=n.length,i=e.newPos,u=i-r,s=0;i+1<o&&u+1<a&&this.equals(t[i+1],n[u+1]);)i++,u++,s++;return s&&e.components.push({count:s}),e.newPos=i,u},equals:function(e,t){return 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("")}}},function(e,t,n){"use strict";t.__esModule=!0,t.characterDiff=void 0,t.diffChars=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=t.characterDiff=new r.default},function(e,t,n){"use strict";t.__esModule=!0,t.wordDiff=void 0,t.diffWords=function(e,t,n){return n=(0,o.generateOptions)(n,{ignoreWhitespace:!0}),u.diff(e,t,n)},t.diffWordsWithSpace=function(e,t,n){return u.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=n(4),a=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,i=/\S/,u=t.wordDiff=new r.default;u.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!i.test(e)&&!i.test(t)},u.tokenize=function(e){for(var t=e.split(/(\s+|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&a.test(t[n])&&a.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t}},function(e,t){"use strict";t.__esModule=!0,t.generateOptions=function(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}},function(e,t,n){"use strict";t.__esModule=!0,t.lineDiff=void 0,t.diffLines=function(e,t,n){return a.diff(e,t,n)},t.diffTrimmedLines=function(e,t,n){var r=(0,o.generateOptions)(n,{ignoreWhitespace:!0});return a.diff(e,t,r)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=n(4),a=t.lineDiff=new r.default;a.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t}},function(e,t,n){"use strict";t.__esModule=!0,t.sentenceDiff=void 0,t.diffSentences=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=t.sentenceDiff=new r.default;o.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)}},function(e,t,n){"use strict";t.__esModule=!0,t.cssDiff=void 0,t.diffCss=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=t.cssDiff=new r.default;o.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)}},function(e,t,n){"use strict";function r(e,t,n){t=t||[],n=n||[];var a=void 0;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];var i=void 0;if("[object Array]"===u.call(e)){for(t.push(e),i=new Array(e.length),n.push(i),a=0;a<e.length;a+=1)i[a]=r(e[a],t,n);return t.pop(),n.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),"object"===(void 0===e?"undefined":o(e))&&null!==e){t.push(e),i={},n.push(i);var s=[],c=void 0;for(c in e)e.hasOwnProperty(c)&&s.push(c);for(s.sort(),a=0;a<s.length;a+=1)i[c=s[a]]=r(e[c],t,n);t.pop(),n.pop()}else i=e;return i}t.__esModule=!0,t.jsonDiff=void 0;var o="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};t.diffJson=function(e,t,n){return s.diff(e,t,n)},t.canonicalize=r;var a=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),i=n(5),u=Object.prototype.toString,s=t.jsonDiff=new a.default;s.useLongestToken=!0,s.tokenize=i.lineDiff.tokenize,s.castInput=function(e){var t=this.options.undefinedReplacement;return"string"==typeof e?e:JSON.stringify(r(e),function(e,n){return void 0===n?t:n}," ")},s.equals=function(e,t){return a.default.prototype.equals.call(s,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))}},function(e,t,n){"use strict";t.__esModule=!0,t.arrayDiff=void 0,t.diffArrays=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=t.arrayDiff=new r.default;o.tokenize=o.join=function(e){return e.slice()}},function(e,t,n){"use strict";function r(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=(0,o.parsePatch)(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}for(var r=e.split(/\r\n|[\n\v\f\r\x85]/),i=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],u=t.hunks,s=n.compareLine||function(e,t,n,r){return t===r},c=0,l=n.fuzzFactor||0,f=0,d=0,h=void 0,p=void 0,v=0;v<u.length;v++){for(var m=u[v],y=r.length-m.oldLines,g=0,b=d+m.oldStart-1,w=(0,a.default)(b,f,y);void 0!==g;g=w())if(function(e,t){for(var n=0;n<e.lines.length;n++){var o=e.lines[n],a=o[0],i=o.substr(1);if(" "===a||"-"===a){if(!s(t+1,r[t],a,i)&&++c>l)return!1;t++}}return!0}(m,b+g)){m.offset=d+=g;break}if(void 0===g)return!1;f=m.offset+m.oldStart+m.oldLines}for(var _=0,E=0;E<u.length;E++){var N=u[E],O=N.oldStart+N.offset+_-1;_+=N.newLines-N.oldLines,O<0&&(O=0);for(var j=0;j<N.lines.length;j++){var C=N.lines[j],k=C[0],x=C.substr(1),S=N.linedelimiters[j];if(" "===k)O++;else if("-"===k)r.splice(O,1),i.splice(O,1);else if("+"===k)r.splice(O,0,x),i.splice(O,0,S),O++;else if("\\"===k){var P=N.lines[j-1]?N.lines[j-1][0]:null;"+"===P?h=!0:"-"===P&&(p=!0)}}}if(h)for(;!r[r.length-1];)r.pop(),i.pop();else p&&(r.push(""),i.push("\n"));for(var L=0;L<r.length-1;L++)r[L]=r[L]+i[L];return r.join("")}t.__esModule=!0,t.applyPatch=r,t.applyPatches=function(e,t){function n(){var o=e[a++];if(!o)return t.complete();t.loadFile(o,function(e,a){if(e)return t.complete(e);var i=r(a,o,t);t.patched(o,i,function(e){if(e)return t.complete(e);n()})})}"string"==typeof e&&(e=(0,o.parsePatch)(e));var a=0;n()};var o=n(11),a=function(e){return e&&e.__esModule?e:{default:e}}(n(12))},function(e,t){"use strict";t.__esModule=!0,t.parsePatch=function(e){function t(e){var t=/^(---|\+\+\+)\s+([\S ]*)(?:\t(.*?)\s*)?$/.exec(o[u]);if(t){var n="---"===t[1]?"old":"new",r=t[2].replace(/\\\\/g,"\\");/^".*"$/.test(r)&&(r=r.substr(1,r.length-2)),e[n+"FileName"]=r,e[n+"Header"]=t[3],u++}}function n(){for(var e=u,t=o[u++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),n={oldStart:+t[1],oldLines:+t[2]||1,newStart:+t[3],newLines:+t[4]||1,lines:[],linedelimiters:[]},i=0,s=0;u<o.length&&!(0===o[u].indexOf("--- ")&&u+2<o.length&&0===o[u+1].indexOf("+++ ")&&0===o[u+2].indexOf("@@"));u++){var c=o[u][0];if("+"!==c&&"-"!==c&&" "!==c&&"\\"!==c)break;n.lines.push(o[u]),n.linedelimiters.push(a[u]||"\n"),"+"===c?i++:"-"===c?s++:" "===c&&(i++,s++)}if(i||1!==n.newLines||(n.newLines=0),s||1!==n.oldLines||(n.oldLines=0),r.strict){if(i!==n.newLines)throw new Error("Added line count did not match for hunk at line "+(e+1));if(s!==n.oldLines)throw new Error("Removed line count did not match for hunk at line "+(e+1))}return n}for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.split(/\r\n|[\n\v\f\r\x85]/),a=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],u=0;u<o.length;)!function(){var e={};for(i.push(e);u<o.length;){var a=o[u];if(/^(\-\-\-|\+\+\+|@@)\s/.test(a))break;var s=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(a);s&&(e.index=s[1]),u++}for(t(e),t(e),e.hunks=[];u<o.length;){var c=o[u];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(c))break;if(/^@@/.test(c))e.hunks.push(n());else{if(c&&r.strict)throw new Error("Unknown line "+(u+1)+" "+JSON.stringify(c));u++}}}();return i}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t,n){var r=!0,o=!1,a=!1,i=1;return function u(){if(r&&!a){if(o?i++:r=!1,e+i<=n)return i;a=!0}if(!o)return a||(r=!0),t<=e-i?-i++:(o=!0,u())}}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e){var t=!1;e.oldLines=0,e.newLines=0,e.lines.forEach(function(n){"string"==typeof n?("+"!==n[0]&&" "!==n[0]||e.newLines++,"-"!==n[0]&&" "!==n[0]||e.oldLines++):t=!0}),t&&(delete e.oldLines,delete e.newLines)}function a(e,t){if("string"==typeof e){if(/^@@/m.test(e)||/^Index:/m.test(e))return(0,_.parsePatch)(e)[0];if(!t)throw new Error("Must provide a base reference or pass in a patch");return(0,w.structuredPatch)(void 0,void 0,t,e)}return e}function i(e){return e.newFileName&&e.newFileName!==e.oldFileName}function u(e,t,n){return t===n?t:(e.conflict=!0,{mine:t,theirs:n})}function s(e,t){return e.oldStart<t.oldStart&&e.oldStart+e.oldLines<t.oldStart}function c(e,t){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+t,newLines:e.newLines,lines:e.lines}}function l(e,t,n,a,i){var u={offset:t,lines:n,index:0},s={offset:a,lines:i,index:0};for(p(e,u,s),p(e,s,u);u.index<u.lines.length&&s.index<s.lines.length;){var c=u.lines[u.index],l=s.lines[s.index];if("-"!==c[0]&&"+"!==c[0]||"-"!==l[0]&&"+"!==l[0])if("+"===c[0]&&" "===l[0]){var y;(y=e.lines).push.apply(y,r(m(u)))}else if("+"===l[0]&&" "===c[0]){var g;(g=e.lines).push.apply(g,r(m(s)))}else"-"===c[0]&&" "===l[0]?d(e,u,s):"-"===l[0]&&" "===c[0]?d(e,s,u,!0):c===l?(e.lines.push(c),u.index++,s.index++):h(e,m(u),m(s));else f(e,u,s)}v(e,u),v(e,s),o(e)}function f(e,t,n){var o=m(t),a=m(n);if(g(o)&&g(a)){if((0,E.arrayStartsWith)(o,a)&&b(n,o,o.length-a.length)){var i;return void(i=e.lines).push.apply(i,r(o))}if((0,E.arrayStartsWith)(a,o)&&b(t,a,a.length-o.length)){var u;return void(u=e.lines).push.apply(u,r(a))}}else if((0,E.arrayEqual)(o,a)){var s;return void(s=e.lines).push.apply(s,r(o))}h(e,o,a)}function d(e,t,n,o){var a=m(t),i=y(n,a);if(i.merged){var u;(u=e.lines).push.apply(u,r(i.merged))}else h(e,o?i:a,o?a:i)}function h(e,t,n){e.conflict=!0,e.lines.push({conflict:!0,mine:t,theirs:n})}function p(e,t,n){for(;t.offset<n.offset&&t.index<t.lines.length;){var r=t.lines[t.index++];e.lines.push(r),t.offset++}}function v(e,t){for(;t.index<t.lines.length;){var n=t.lines[t.index++];e.lines.push(n)}}function m(e){for(var t=[],n=e.lines[e.index][0];e.index<e.lines.length;){var r=e.lines[e.index];if("-"===n&&"+"===r[0]&&(n="+"),n!==r[0])break;t.push(r),e.index++}return t}function y(e,t){for(var n=[],r=[],o=0,a=!1,i=!1;o<t.length&&e.index<e.lines.length;){var u=e.lines[e.index],s=t[o];if("+"===s[0])break;if(a=a||" "!==u[0],r.push(s),o++,"+"===u[0])for(i=!0;"+"===u[0];)n.push(u),u=e.lines[++e.index];s.substr(1)===u.substr(1)?(n.push(u),e.index++):i=!0}if("+"===(t[o]||"")[0]&&a&&(i=!0),i)return n;for(;o<t.length;)r.push(t[o++]);return{merged:r,changes:n}}function g(e){return e.reduce(function(e,t){return e&&"-"===t[0]},!0)}function b(e,t,n){for(var r=0;r<n;r++){var o=t[t.length-n+r].substr(1);if(e.lines[e.index+r]!==" "+o)return!1}return e.index+=n,!0}t.__esModule=!0,t.calcLineCount=o,t.merge=function(e,t,n){e=a(e,n),t=a(t,n);var r={};(e.index||t.index)&&(r.index=e.index||t.index),(e.newFileName||t.newFileName)&&(i(e)?i(t)?(r.oldFileName=u(r,e.oldFileName,t.oldFileName),r.newFileName=u(r,e.newFileName,t.newFileName),r.oldHeader=u(r,e.oldHeader,t.oldHeader),r.newHeader=u(r,e.newHeader,t.newHeader)):(r.oldFileName=e.oldFileName,r.newFileName=e.newFileName,r.oldHeader=e.oldHeader,r.newHeader=e.newHeader):(r.oldFileName=t.oldFileName||e.oldFileName,r.newFileName=t.newFileName||e.newFileName,r.oldHeader=t.oldHeader||e.oldHeader,r.newHeader=t.newHeader||e.newHeader)),r.hunks=[];for(var o=0,f=0,d=0,h=0;o<e.hunks.length||f<t.hunks.length;){var p=e.hunks[o]||{oldStart:1/0},v=t.hunks[f]||{oldStart:1/0};if(s(p,v))r.hunks.push(c(p,d)),o++,h+=p.newLines-p.oldLines;else if(s(v,p))r.hunks.push(c(v,h)),f++,d+=v.newLines-v.oldLines;else{var m={oldStart:Math.min(p.oldStart,v.oldStart),oldLines:0,newStart:Math.min(p.newStart+d,v.oldStart+h),newLines:0,lines:[]};l(m,p.oldStart,p.lines,v.oldStart,v.lines),f++,o++,r.hunks.push(m)}}return r};var w=n(14),_=n(11),E=n(15)},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t,n,o,a,u,s){function c(e){return e.map(function(e){return" "+e})}s||(s={}),void 0===s.context&&(s.context=4);var l=(0,i.diffLines)(n,o,s);l.push({value:"",lines:[]});for(var f=[],d=0,h=0,p=[],v=1,m=1,y=0;y<l.length;y++)!function(e){var t=l[e],a=t.lines||t.value.replace(/\n$/,"").split("\n");if(t.lines=a,t.added||t.removed){var i;if(!d){var u=l[e-1];d=v,h=m,u&&(p=s.context>0?c(u.lines.slice(-s.context)):[],d-=p.length,h-=p.length)}(i=p).push.apply(i,r(a.map(function(e){return(t.added?"+":"-")+e}))),t.added?m+=a.length:v+=a.length}else{if(d)if(a.length<=2*s.context&&e<l.length-2){var y;(y=p).push.apply(y,r(c(a)))}else{var g,b=Math.min(a.length,s.context);(g=p).push.apply(g,r(c(a.slice(0,b))));var w={oldStart:d,oldLines:v-d+b,newStart:h,newLines:m-h+b,lines:p};if(e>=l.length-2&&a.length<=s.context){var _=/\n$/.test(n),E=/\n$/.test(o);0!=a.length||_?_&&E||p.push("\\ No newline at end of file"):p.splice(w.oldLines,0,"\\ No newline at end of file")}f.push(w),d=0,h=0,p=[]}v+=a.length,m+=a.length}}(y);return{oldFileName:e,newFileName:t,oldHeader:a,newHeader:u,hunks:f}}function a(e,t,n,r,a,i,u){var s=o(e,t,n,r,a,i,u),c=[];e==t&&c.push("Index: "+e),c.push("==================================================================="),c.push("--- "+s.oldFileName+(void 0===s.oldHeader?"":"\t"+s.oldHeader)),c.push("+++ "+s.newFileName+(void 0===s.newHeader?"":"\t"+s.newHeader));for(var l=0;l<s.hunks.length;l++){var f=s.hunks[l];c.push("@@ -"+f.oldStart+","+f.oldLines+" +"+f.newStart+","+f.newLines+" @@"),c.push.apply(c,f.lines)}return c.join("\n")+"\n"}t.__esModule=!0,t.structuredPatch=o,t.createTwoFilesPatch=a,t.createPatch=function(e,t,n,r,o,i){return a(e,e,t,n,r,o,i)};var i=n(5)},function(e,t){"use strict";function n(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}t.__esModule=!0,t.arrayEqual=function(e,t){return e.length===t.length&&n(e,t)},t.arrayStartsWith=n},function(e,t){"use strict";t.__esModule=!0,t.convertChangesToDMP=function(e){for(var t=[],n=void 0,r=void 0,o=0;o<e.length;o++)r=(n=e[o]).added?1:n.removed?-1:0,t.push([r,n.value]);return t}},function(e,t){"use strict";function n(e){var t=e;return t=t.replace(/&/g,"&"),t=t.replace(/</g,"<"),t=t.replace(/>/g,">"),t=t.replace(/"/g,""")}t.__esModule=!0,t.convertChangesToXML=function(e){for(var t=[],r=0;r<e.length;r++){var o=e[r];o.added?t.push("<ins>"):o.removed&&t.push("<del>"),t.push(n(o.value)),o.added?t.push("</ins>"):o.removed&&t.push("</del>")}return t.join("")}}])})},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){(function(t){function n(e){if("string"==typeof e)return e;if(o(e))return g?g.call(e):"";var t=e+"";return"0"==t&&1/e==-i?"-0":t}function r(e){return!!e&&"object"==typeof e}function o(e){return"symbol"==typeof e||r(e)&&v.call(e)==u}function a(e){return null==e?"":n(e)}var i=1/0,u="[object Symbol]",s=/[&<>"'`]/g,c=RegExp(s.source),l={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},f="object"==typeof t&&t&&t.Object===Object&&t,d="object"==typeof self&&self&&self.Object===Object&&self,h=f||d||Function("return this")(),p=function(e){return function(t){return null==e?void 0:e[t]}}(l),v=Object.prototype.toString,m=h.Symbol,y=m?m.prototype:void 0,g=y?y.toString:void 0;e.exports=function(e){return(e=a(e))&&c.test(e)?e.replace(s,p):e}}).call(t,n(6))},function(e,t){},function(e,t){}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["react","prop-types"],t):"object"==typeof exports?exports.reactDiffView=t(require("react"),require("prop-types")):e.reactDiffView=t(e.React,e.propTypes)}("undefined"!=typeof self?self:this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},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,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t,n){var r,o;!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===o)for(var i in r)a.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}var a={}.hasOwnProperty;void 0!==e&&e.exports?e.exports=n:void 0===(o=function(){return n}.apply(t,r=[]))||(e.exports=o)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"parseDiff",function(){return s}),n.d(t,"addStubHunk",function(){return c});var r=n(4),o=n.n(r),a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(e,t){var n="zip"===t.nearbySequences?function(e){var t=e.reduce(function(e,t,n){var r=i(e,3),o=r[0],a=r[1],u=r[2];return a?t.isInsert&&u>=0?(o.splice(u+1,0,t),[o,t,u+2]):(o.push(t),[o,t,t.isDelete&&a.isDelete?u:n]):(o.push(t),[o,t,t.isDelete?n:-1])},[[],null,-1]);return i(t,1)[0]}(e.changes):e.changes;return a({},e,{changes:n})},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.a.parse(e).map(function(e){return function(e,t){var n=e.hunks.map(function(e){return u(e,t)});return a({},e,{hunks:t.stubHunk?c(n):n})}(e,t)})},c=function(e){if(!e||!e.length)return e;var t=e[e.length-1],n={oldStart:t.oldStart+t.oldLines,oldLines:0,newStart:t.newStart+t.newLines,newLines:0,content:"STUB",changes:[]};return[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(e),[n])}},function(e,t,n){!function(n){var r={parse:function(e){for(var t,n,r,o,a=[],i=2,u=e.split("\n"),s=u.length,c=0;c<s;){var l=u[c];if(0===l.indexOf("diff --git")){var f=l.slice(11),d=null,h=null;switch(f.indexOf('"')){case-1:d=(b=f.split(" "))[0].slice(2),h=b[1].slice(2);break;case 0:var p=f.indexOf('"',2);d=f.slice(3,p);var v=f.indexOf('"',p+1);h=v<0?f.slice(p+4):f.slice(v+3,-1);break;default:d=(b=f.split(" "))[0].slice(2),h=b[1].slice(3,-1)}t={oldPath:d,newPath:h,hunks:[]},a.push(t);var m=null,y=u[c+1];0===y.indexOf("old")&&(t.oldMode=y.slice(9,16),t.newMode=u[c+2].slice(9,16),y=u[(c+=2)+1]),0===y.indexOf("similarity")&&(t.similarity=parseInt(y.split(" ")[2],10),c+=1);var g;e:for(;g=u[++c];){var b;switch((b=g.split(" "))[0]){case"diff":c--;break e;case"index":var w=b[1].split("..");t.oldRevision=w[0],t.newRevision=w[1],b[2]&&(t.oldMode=t.newMode=b[2]),i=5;var _=u[c+1];if(0===_.indexOf("---")){var E=u[c+2];/\s\/dev\/null$/.test(_)?(t.oldPath="/dev/null",m="add"):/\s\/dev\/null$/.test(E)&&(t.newPath="/dev/null",m="delete"),c+=2}break e}m||(m=b[0])}t.type=m||"modify"}else if(0===l.indexOf("Binary"))t.isBinary=!0,i=2,t=null;else if(5===i)if(0===l.indexOf("@@")){var N=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(l);n={content:l,oldStart:N[1]-0,newStart:N[4]-0,oldLines:N[3]-0||0,newLines:N[6]-0||0,changes:[]},t.hunks.push(n),r=n.oldStart,o=n.newStart}else{var O=l.slice(0,1),j={content:l.slice(1)};switch(O){case"+":j.type="insert",j.isInsert=!0,j.lineNumber=o,o++;break;case"-":j.type="delete",j.isDelete=!0,j.lineNumber=r,r++;break;case" ":j.type="normal",j.isNormal=!0,j.oldLineNumber=r,j.newLineNumber=o,r++,o++}j.type&&n.changes.push(j)}c++}return a}};t=e.exports=r}()},function(e,t,n){(function(e,n){function r(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function o(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function a(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function i(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function u(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function s(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function c(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function l(e){var t=-1,n=e?e.length:0;for(this.__data__=new c;++t<n;)this.add(e[t])}function f(e){this.__data__=new s(e)}function d(e,t){var n=it(e)||A(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,o=!!r;for(var a in e)!t&&!He.call(e,a)||o&&("length"==a||O(a,r))||n.push(a);return n}function h(e,t){for(var n=e.length;n--;)if(L(e[n][0],t))return n;return-1}function p(e,t){for(var n=0,r=(t=j(t,e)?[t]:w(t)).length;null!=e&&n<r;)e=e[x(t[n++])];return n&&n==r?e:void 0}function v(e,t){return null!=e&&t in Object(e)}function m(e,t,n,r,u){return e===t||(null==e||null==t||!M(e)&&!I(t)?e!=e&&t!=t:function(e,t,n,r,u,s){var c=it(e),l=it(t),d=K,h=K;c||(d=(d=ot(e))==X?oe:d);l||(h=(h=ot(t))==X?oe:h);var p=d==oe&&!o(e),v=h==oe&&!o(t),m=d==h;if(m&&!p)return s||(s=new f),c||ut(e)?_(e,t,n,r,u,s):function(e,t,n,r,o,u,s){switch(n){case de:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case fe:return!(e.byteLength!=t.byteLength||!r(new Fe(e),new Fe(t)));case Z:case Q:case re:return L(+e,+t);case Y:return e.name==t.name&&e.message==t.message;case ie:case se:return e==t+"";case ne:var c=a;case ue:var l=u&J;if(c||(c=i),e.size!=t.size&&!l)return!1;var f=s.get(e);if(f)return f==t;u|=U,s.set(e,t);var d=_(c(e),c(t),r,o,u,s);return s.delete(e),d;case ce:if(tt)return tt.call(e)==tt.call(t)}return!1}(e,t,d,n,r,u,s);if(!(u&J)){var y=p&&He.call(e,"__wrapped__"),g=v&&He.call(t,"__wrapped__");if(y||g){var b=y?e.value():e,w=g?t.value():t;return s||(s=new f),n(b,w,r,u,s)}}if(!m)return!1;return s||(s=new f),function(e,t,n,r,o,a){var i=o&J,u=q(e),s=u.length,c=q(t).length;if(s!=c&&!i)return!1;for(var l=s;l--;){var f=u[l];if(!(i?f in t:He.call(t,f)))return!1}var d=a.get(e);if(d&&a.get(t))return d==t;var h=!0;a.set(e,t),a.set(t,e);for(var p=i;++l<s;){f=u[l];var v=e[f],m=t[f];if(r)var y=i?r(m,v,f,t,e,a):r(v,m,f,e,t,a);if(!(void 0===y?v===m||n(v,m,r,o,a):y)){h=!1;break}p||(p="constructor"==f)}if(h&&!p){var g=e.constructor,b=t.constructor;g!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b)&&(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,r,u,s)}(e,t,m,n,r,u))}function y(e){if(!M(e)||function(e){return!!Te&&Te in e}(e))return!1;return(D(e)||o(e)?Ie:ge).test(S(e))}function g(e){return"function"==typeof e?e:null==e?G:"object"==typeof e?it(e)?function(e,t){if(j(e)&&C(t))return k(x(e),t);return function(n){var r=function(e,t,n){var r=null==e?void 0:p(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){var r,o=-1,a=(t=j(t,e)?[t]:w(t)).length;for(;++o<a;){var i=x(t[o]);if(!(r=null!=e&&n(e,i)))break;e=e[i]}if(r)return r;return!!(a=e?e.length:0)&&H(a)&&O(i,a)&&(it(e)||A(e))}(e,t,v)}(n,e):m(t,r,void 0,U|J)}}(e[0],e[1]):function(e){var t=function(e){var t=q(e),n=t.length;for(;n--;){var r=t[n],o=e[r];t[n]=[r,o,C(o)]}return t}(e);if(1==t.length&&t[0][2])return k(t[0][0],t[0][1]);return function(n){return n===e||function(e,t,n,r){var o=n.length,a=o,i=!r;if(null==e)return!a;for(e=Object(e);o--;){var u=n[o];if(i&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var s=(u=n[o])[0],c=e[s],l=u[1];if(i&&u[2]){if(void 0===c&&!(s in e))return!1}else{var d=new f;if(r)var h=r(c,l,s,e,t,d);if(!(void 0===h?m(l,c,r,U|J,d):h))return!1}}return!0}(n,e,t)}}(e):function(e){return j(e)?function(e){return function(t){return null==t?void 0:t[e]}}(x(e)):function(e){return function(t){return p(t,e)}}(e)}(e)}function b(e){if(!function(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||Le;return e===n}(e))return We(e);var t=[];for(var n in Object(e))He.call(e,n)&&"constructor"!=n&&t.push(n);return t}function w(e){return it(e)?e:at(e)}function _(e,t,n,o,a,i){var u=a&J,s=e.length,c=t.length;if(s!=c&&!(u&&c>s))return!1;var f=i.get(e);if(f&&i.get(t))return f==t;var d=-1,h=!0,p=a&U?new l:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var v=e[d],m=t[d];if(o)var y=u?o(m,v,d,t,e,i):o(v,m,d,e,t,i);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!r(t,function(e,t){if(!p.has(t)&&(v===e||n(v,e,o,a,i)))return p.add(t)})){h=!1;break}}else if(v!==m&&!n(v,m,o,a,i)){h=!1;break}}return i.delete(e),i.delete(t),h}function E(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function N(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return y(n)?n:void 0}function O(e,t){return!!(t=null==t?V:t)&&("number"==typeof e||be.test(e))&&e>-1&&e%1==0&&e<t}function j(e,t){if(it(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!R(e))||(pe.test(e)||!he.test(e)||null!=t&&e in Object(t))}function C(e){return e==e&&!M(e)}function k(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}function x(e){if("string"==typeof e||R(e))return e;var t=e+"";return"0"==t&&1/e==-B?"-0":t}function S(e){if(null!=e){try{return De.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function P(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError(z);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i),i};return n.cache=new(P.Cache||c),n}function L(e,t){return e===t||e!=e&&t!=t}function A(e){return function(e){return I(e)&&T(e)}(e)&&He.call(e,"callee")&&(!qe.call(e,"callee")||Me.call(e)==X)}function T(e){return null!=e&&H(e.length)&&!D(e)}function D(e){var t=M(e)?Me.call(e):"";return t==ee||t==te}function H(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=V}function M(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function I(e){return!!e&&"object"==typeof e}function R(e){return"symbol"==typeof e||I(e)&&Me.call(e)==ce}function F(e){return null==e?"":function(e){if("string"==typeof e)return e;if(R(e))return nt?nt.call(e):"";var t=e+"";return"0"==t&&1/e==-B?"-0":t}(e)}function q(e){return T(e)?d(e):b(e)}function G(e){return e}var W=200,z="Expected a function",$="__lodash_hash_undefined__",U=1,J=2,B=1/0,V=9007199254740991,X="[object Arguments]",K="[object Array]",Z="[object Boolean]",Q="[object Date]",Y="[object Error]",ee="[object Function]",te="[object GeneratorFunction]",ne="[object Map]",re="[object Number]",oe="[object Object]",ae="[object Promise]",ie="[object RegExp]",ue="[object Set]",se="[object String]",ce="[object Symbol]",le="[object WeakMap]",fe="[object ArrayBuffer]",de="[object DataView]",he=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pe=/^\w*$/,ve=/^\./,me=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ye=/\\(\\)?/g,ge=/^\[object .+?Constructor\]$/,be=/^(?:0|[1-9]\d*)$/,we={};we["[object Float32Array]"]=we["[object Float64Array]"]=we["[object Int8Array]"]=we["[object Int16Array]"]=we["[object Int32Array]"]=we["[object Uint8Array]"]=we["[object Uint8ClampedArray]"]=we["[object Uint16Array]"]=we["[object Uint32Array]"]=!0,we[X]=we[K]=we[fe]=we[Z]=we[de]=we[Q]=we[Y]=we[ee]=we[ne]=we[re]=we[oe]=we[ie]=we[ue]=we[se]=we[le]=!1;var _e="object"==typeof e&&e&&e.Object===Object&&e,Ee="object"==typeof self&&self&&self.Object===Object&&self,Ne=_e||Ee||Function("return this")(),Oe="object"==typeof t&&t&&!t.nodeType&&t,je=Oe&&"object"==typeof n&&n&&!n.nodeType&&n,Ce=je&&je.exports===Oe&&_e.process,ke=function(){try{return Ce&&Ce.binding("util")}catch(e){}}(),xe=ke&&ke.isTypedArray,Se=Array.prototype,Pe=Function.prototype,Le=Object.prototype,Ae=Ne["__core-js_shared__"],Te=function(){var e=/[^.]+$/.exec(Ae&&Ae.keys&&Ae.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),De=Pe.toString,He=Le.hasOwnProperty,Me=Le.toString,Ie=RegExp("^"+De.call(He).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Re=Ne.Symbol,Fe=Ne.Uint8Array,qe=Le.propertyIsEnumerable,Ge=Se.splice,We=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),ze=N(Ne,"DataView"),$e=N(Ne,"Map"),Ue=N(Ne,"Promise"),Je=N(Ne,"Set"),Be=N(Ne,"WeakMap"),Ve=N(Object,"create"),Xe=S(ze),Ke=S($e),Ze=S(Ue),Qe=S(Je),Ye=S(Be),et=Re?Re.prototype:void 0,tt=et?et.valueOf:void 0,nt=et?et.toString:void 0;u.prototype.clear=function(){this.__data__=Ve?Ve(null):{}},u.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},u.prototype.get=function(e){var t=this.__data__;if(Ve){var n=t[e];return n===$?void 0:n}return He.call(t,e)?t[e]:void 0},u.prototype.has=function(e){var t=this.__data__;return Ve?void 0!==t[e]:He.call(t,e)},u.prototype.set=function(e,t){return this.__data__[e]=Ve&&void 0===t?$:t,this},s.prototype.clear=function(){this.__data__=[]},s.prototype.delete=function(e){var t=this.__data__,n=h(t,e);return!(n<0||(n==t.length-1?t.pop():Ge.call(t,n,1),0))},s.prototype.get=function(e){var t=this.__data__,n=h(t,e);return n<0?void 0:t[n][1]},s.prototype.has=function(e){return h(this.__data__,e)>-1},s.prototype.set=function(e,t){var n=this.__data__,r=h(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},c.prototype.clear=function(){this.__data__={hash:new u,map:new($e||s),string:new u}},c.prototype.delete=function(e){return E(this,e).delete(e)},c.prototype.get=function(e){return E(this,e).get(e)},c.prototype.has=function(e){return E(this,e).has(e)},c.prototype.set=function(e,t){return E(this,e).set(e,t),this},l.prototype.add=l.prototype.push=function(e){return this.__data__.set(e,$),this},l.prototype.has=function(e){return this.__data__.has(e)},f.prototype.clear=function(){this.__data__=new s},f.prototype.delete=function(e){return this.__data__.delete(e)},f.prototype.get=function(e){return this.__data__.get(e)},f.prototype.has=function(e){return this.__data__.has(e)},f.prototype.set=function(e,t){var n=this.__data__;if(n instanceof s){var r=n.__data__;if(!$e||r.length<W-1)return r.push([e,t]),this;n=this.__data__=new c(r)}return n.set(e,t),this};var rt=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),u=i.length;u--;){var s=i[e?u:++o];if(!1===n(a[s],s,a))break}return t}}(),ot=function(e){return Me.call(e)};(ze&&ot(new ze(new ArrayBuffer(1)))!=de||$e&&ot(new $e)!=ne||Ue&&ot(Ue.resolve())!=ae||Je&&ot(new Je)!=ue||Be&&ot(new Be)!=le)&&(ot=function(e){var t=Me.call(e),n=t==oe?e.constructor:void 0,r=n?S(n):void 0;if(r)switch(r){case Xe:return de;case Ke:return ne;case Ze:return ae;case Qe:return ue;case Ye:return le}return t});var at=P(function(e){e=F(e);var t=[];return ve.test(e)&&t.push(""),e.replace(me,function(e,n,r,o){t.push(r?o.replace(ye,"$1"):n||e)}),t});P.Cache=c;var it=Array.isArray,ut=xe?function(e){return function(t){return e(t)}}(xe):function(e){return I(e)&&H(e.length)&&!!we[Me.call(e)]};n.exports=function(e,t){var n={};return t=g(t),function(e,t){e&&rt(e,t,q)}(e,function(e,r,o){n[r]=t(e,r,o)}),n}}).call(t,n(6),n(12)(e))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){},function(e,t){},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var l,f,d=n(0),h=n.n(d),p=n(1),v=n.n(p),m=n(2),y=n.n(m),g=n(10),b=n.n(g),w=n(11),_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E=function(e){var t=e.isNormal,n=e.isInsert,r=e.lineNumber,o=e.oldLineNumber;return n?-1:t?o:r},N=function(e){var t=e.isNormal,n=e.isDelete,r=e.lineNumber,o=e.newLineNumber;return n?-1:t?o:r},O=function(e){return e[e.length-1]},j=function(e,t,n){var r=e.reduce(function(e,r,o){var a={type:"normal",isNormal:!0,oldLineNumber:t+o,newLineNumber:n+o,content:""+r};return e.push(a),e},[]),o=r.length;return{content:"@@ -"+t+","+o+" +"+n+","+o,oldStart:t,oldLines:o,newStart:n,newLines:o,changes:r}},C=function(e,t){var n=O(e);if(!n)return[t];var o=O(n.changes),a=t.changes[0];if(!o||!a)return e.concat(t);if(E(o)+1!==E(a))return e.concat(t);var i=_({},n,{oldLines:n.oldLines+t.oldLines,newLines:n.newLines+t.newLines,changes:[].concat(r(n.changes),r(t.changes))});return[].concat(r(e.slice(0,-1)),[i])},k=function(e,t){var n=E(t.changes[0]),o=e.findIndex(function(e){return E(e.changes[0])>=n});return(-1===o?e.concat(t):[].concat(r(e.slice(0,o)),[t],r(e.slice(o)))).reduce(C,[])},x=function(e){var t=e.isNormal,n=e.isInsert,r=e.lineNumber,o=e.oldLineNumber;if(t)return"N"+o;return(n?"I":"D")+r},S=[[],[]],P=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.threshold,r=void 0===n?1/0:n,o=t.markLongDistanceDiff,a=void 0!==o&&o;return function(t,n){if(!t||!n)return S;var o=t.content,i=n.content;if(r!==1/0&&b()(o,i)>r)return a?[[[0,o.length]],[[0,i.length]]]:S;var u=e(o,i).reduce(function(e,t){var n=t.added,r=t.removed,o=t.value;return n||r?n?(e.bEdits.push([e.bIndex,o.length]),e.bIndex+=o.length,e):(e.aEdits.push([e.aIndex,o.length]),e.aIndex+=o.length,e):(e.aIndex+=o.length,e.bIndex+=o.length,e)},{aEdits:[],bEdits:[],aIndex:0,bIndex:0});return[u.aEdits,u.bEdits]}}},L=P(w.diffWordsWithSpace),A=P(w.diffChars),T=v.a.oneOf(["unified","split"]),D={type:v.a.oneOf(["delete","insert","normal"]).isRequired,content:v.a.string.isRequired,isNormal:v.a.bool,isInsert:v.a.bool,isDelete:v.a.bool,lineNumber:v.a.number,oldLineNumber:v.a.number,newLineNumber:v.a.number},H=v.a.shape(D),M={oldStart:v.a.number.isRequired,oldLines:v.a.number.isRequired,newStart:v.a.number.isRequired,newLines:v.a.number.isRequired,content:v.a.string.isRequired,changes:v.a.arrayOf(H).isRequired},I=v.a.shape(M),R={gutterHeader:v.a.object,codeHeader:v.a.object,gutter:v.a.object,code:v.a.object},F=v.a.shape(R),q={hunk:v.a.string,hunkHeader:v.a.string,gutterHeader:v.a.string,codeHeader:v.a.string,line:v.a.string,gutter:v.a.string,code:v.a.string},G=v.a.shape(q),W=n(5),z=n.n(W),$=function(e){var t=null,n=null;return function(){for(var r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];return t&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,o)||(n=e.apply(void 0,o),t=o),n}},U=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{headerGutterEvents:e.gutterHeader,headerContentEvents:e.codeHeader,otherEvents:o(e,["gutterHeader","codeHeader"])}},J=function(){return $(U)},B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{hunkClassName:e.hunk,headerClassName:e.hunkHeader,headerGutterClassName:e.gutterHeader,headerContentClassName:e.codeHeader,otherClassNames:o(e,["hunk","hunkHeader","gutterHeader","codeHeader"])}},V=function(){return $(B)},X=function(e,t){return z()(e,function(e){return function(){return e(t)}})},K=function(){return $(X)},Z=(n(7),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),Q=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Y=(f=l=function(e){function t(){var e,n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,u=Array(i),s=0;s<i;s++)u[s]=arguments[s];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.bindGutterEvents=K(),r.bindCodeEvents=K(),o=n,a(r,o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,d["PureComponent"]),Q(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.change;(0,e.onRenderCode)(this.container.querySelector(".diff-code"),t)}},{key:"componentDidUpdate",value:function(){}},{key:"render",value:function(){var e=this,t=this.props,n=t.change,r=t.selected,o=t.customClassNames,a=t.customEvents,i=t.gutterAnchor,u=t.generateAnchorID,s=n.type,c=n.content,l=E(n),f=-1===l?void 0:l,d=N(n),p=-1===d?void 0:d,v=this.bindGutterEvents(a.gutter,n),m=this.bindCodeEvents(a.code,n),g=u(n),b=y()("diff-gutter","diff-gutter-"+s,o.gutter,{"diff-gutter-selected":r}),w=y()("diff-code","diff-code-"+s,o.code,{"diff-code-selected":r});return h.a.createElement("tr",{id:g,className:y()("diff-line",o.line),ref:function(t){return e.container=t}},h.a.createElement("td",Z({className:b,"data-line-number":f},v),i?h.a.createElement("a",{href:"#"+g,"data-line-number":f}):null),h.a.createElement("td",Z({className:b,"data-line-number":p},v),i?h.a.createElement("a",{href:"#"+g,"data-line-number":p}):null),h.a.createElement("td",Z({className:w},m),c))}}]),t}(),l.propTypes={change:H.isRequired,selected:v.a.bool.isRequired,customEvents:F,customClassNames:G,onRenderCode:v.a.func},l.defaultProps={customEvents:{},onRenderCode:function(){}},f);Y.displayName="UnifiedChange";n(8);var ee=function(e){var t=e.element;return h.a.createElement("tr",{className:"diff-widget"},h.a.createElement("td",{colSpan:3,className:"diff-widget-content"},t))};ee.displayName="UnifiedWidget";var te=ee,ne=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),re=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oe=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),ae=function(e){function t(){var e,n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var a=arguments.length,u=Array(a),s=0;s<a;s++)u[s]=arguments[s];return n=r=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.bindGutterEvents=K(),r.bindContentEvents=K(),o=n,i(r,o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,d["PureComponent"]),ne(t,[{key:"render",value:function(){var e=this.props,t=e.hunk,n=e.elements,r=e.gutterEvents,o=e.contentEvents,a=e.className,i=e.gutterClassName,u=e.contentClassName,s=this.bindGutterEvents(r,t),c=this.bindGutterEvents(o,t),l=y()("diff-hunk-header",a),f=y()("diff-hunk-header-gutter",i),d=y()("diff-hunk-header-content",u);if(void 0===n)return h.a.createElement("tr",{className:l},h.a.createElement("td",re({colSpan:2,className:f},s)),h.a.createElement("td",re({className:d},c),t.content));if(null===n)return null;if(Array.isArray(n)){var p=oe(n,2),v=p[0],m=p[1];return h.a.createElement("tr",{className:l},h.a.createElement("td",re({colSpan:2,className:f},s),v),h.a.createElement("td",re({className:d},c),m))}return h.a.createElement("tr",{className:l},h.a.createElement("td",re({colSpan:3,className:d},c),n))}}]),t}();ae.displayName="HunkHeader";var ie=function(e){var t=e.hunk,n=e.widgets,r=e.selectedChanges,o=e.header,a=e.headerGutterEvents,i=e.headerContentEvents,u=e.className,s=e.headerClassName,c=e.headerGutterClassName,l=e.headerContentClassName,f=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["hunk","widgets","selectedChanges","header","headerGutterEvents","headerContentEvents","className","headerClassName","headerGutterClassName","headerContentClassName"]),d=function(e,t){return e.reduce(function(e,n){var r=x(n);e.push(["change",r,n]);var o=t[r];return o&&e.push(["widget",r,o]),e},[])}(t.changes,n);return h.a.createElement("tbody",{className:y()("diff-hunk",u)},h.a.createElement(ae,{hunk:t,elements:o,gutterEvents:a,contentEvents:i,className:s,gutterClassName:c,contentClassName:l}),d.map(function(e,t){return function(e,t,n,r){var o=oe(e,3),a=o[0],i=o[1],u=o[2];return"change"===a?h.a.createElement(Y,re({key:"change"+i,change:u,selected:n.includes(i)},r)):"widget"===a?h.a.createElement(te,{key:"widget"+i,element:u}):null}(e,0,r,f)}))};ie.displayName="UnifiedHunk";var ue,se,ce=ie,le=n(13),fe=n.n(le),de=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},he=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),pe=(se=ue=function(e){function t(){var e,n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var a=arguments.length,i=Array(a),s=0;s<a;s++)i[s]=arguments[s];return n=r=u(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.cell=null,o=n,u(r,o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,d["PureComponent"]),he(t,[{key:"componentDidMount",value:function(){this.notifyRender()}},{key:"componentDidUpdate",value:function(e){e.text===this.props.text&&e.html===this.props.html||this.notifyRender()}},{key:"notifyRender",value:function(){this.props.onRender(this.cell)}},{key:"render",value:function(){var e=this,t=this.props,n=t.text,r=t.html,o=(t.onRender,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["text","html","onRender"])),a=function(t){return e.cell=t};return r?h.a.createElement("td",de({ref:a},o,{dangerouslySetInnerHTML:{__html:r}})):h.a.createElement("td",de({ref:a},o),n)}}]),t}(),ue.defaultProps={onRender:function(){}},se);pe.displayName="CodeCell";var ve,me,ye=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ge=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),be=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},we=[[],[]],_e=function(e){var t=e.change,n=e.side,r=e.edits,o=e.selected,a=e.customClassNames,i=e.customEvents,u=e.onRenderCode,s=e.bindGutterEvents,c=e.bindCodeEvents,l=e.anchorID,f=e.gutterAnchor,d=e.gutterAnchorTarget;if(!t)return[h.a.createElement("td",{key:"gutter",className:y()("diff-gutter","diff-gutter-omit",a.gutter)}),h.a.createElement("td",{key:"code",className:y()("diff-code","diff-code-omit",a.code)})];var p=t.type,v=t.content,m=0===n?E(t):N(t),g=s(i.gutter,t),b=y()("diff-gutter","diff-gutter-"+p,a.gutter,{"diff-gutter-selected":o}),w=be({key:"gutter",id:l,className:b,"data-line-number":m,children:f?h.a.createElement("a",{href:"#"+d,"data-line-number":m}):null},g),_=c(i.code,t),O=y()("diff-code","diff-code-"+p,a.code,{"diff-code-selected":o}),j=be({key:"code",className:O,onRender:u},_);if(!r.length)return[h.a.createElement("td",w),h.a.createElement(pe,be({},j,{text:v}))];var C=r.reduce(function(e,t){var n=ge(t,2),r=n[0],o=n[1],a=v.slice(e.lastIndex,r),i=v.substr(r,o);return e.html+=fe()(a)+'<mark class="diff-code-edit">'+fe()(i)+"</mark>",e.lastIndex=r+o,e},{html:"",lastIndex:0}),k=C.html,x=C.lastIndex,S=fe()(v.substring(x));return[h.a.createElement("td",w),h.a.createElement(pe,be({},j,{html:k+S}))]},Ee=(me=ve=function(e){function t(){var e,n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=s(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.bindOldGutterEvents=K(),r.bindNewGutterEvents=K(),r.bindOldCodeEvents=K(),r.bindNewCodeEvents=K(),o=n,s(r,o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,d["PureComponent"]),ye(t,[{key:"render",value:function(){var e=this.props,t=e.oldChange,n=e.newChange,r=e.oldSelected,o=e.newSelected,a=e.monotonous,i=e.markEdits,u=e.customClassNames,s=e.customEvents,c=e.onRenderCode,l=e.generateAnchorID,f=e.gutterAnchor,d=i(t,n),p=ge(d,2),v=p[0],m=p[1],g={monotonous:a,customClassNames:u,customEvents:s,onRenderCode:c},b=t&&l(t),w=be({},g,{change:t,side:0,edits:v,selected:r,bindGutterEvents:this.bindOldGutterEvents,bindCodeEvents:this.bindOldCodeEvents,anchorID:b,gutterAnchor:f,gutterAnchorTarget:b}),_=n&&l(n),E=be({},g,{change:n,side:1,edits:m,selected:o,bindGutterEvents:this.bindNewGutterEvents,bindCodeEvents:this.bindNewCodeEvents,anchorID:t===n?void 0:_,gutterAnchor:f,gutterAnchorTarget:t===n?b:_});if(a)return h.a.createElement("tr",{className:y()("diff-line",u.line)},_e(t?w:E));var N=t&&!n?"diff-line-old-only":!t&&n?"diff-line-new-only":t===n?"diff-line-normal":"diff-line-compare";return h.a.createElement("tr",{className:y()("diff-line",u.line,N)},_e(w),_e(E))}}]),t}(),ve.propTypes={monotonous:v.a.bool.isRequired,oldChange:H,newChange:H,oldSelected:v.a.bool.isRequired,newSelected:v.a.bool.isRequired,markEdits:v.a.func,customEvents:F,customClassNames:G,onRenderCode:v.a.func},ve.defaultProps={customEvents:{},markEdits:function(){return we},onRenderCode:function(){}},me);Ee.displayName="SplitChange";var Ne=function(e){var t=e.oldElement,n=e.newElement;return e.monotonous?h.a.createElement("tr",{className:"diff-widget"},h.a.createElement("td",{colSpan:2,className:"diff-widget-content"},t||n)):t===n?h.a.createElement("tr",{className:"diff-widget"},h.a.createElement("td",{colSpan:4,className:"diff-widget-content"},t)):h.a.createElement("tr",{className:"diff-widget"},h.a.createElement("td",{colSpan:2,className:"diff-widget-gutter"},t),h.a.createElement("td",{colSpan:2,className:"diff-widget-content"},n))};Ne.displayName="SplitWidget";var Oe=Ne,je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ce=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(r=(i=u.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),ke=function(e,t){return(e?x(e):"00")+(t?x(t):"00")},xe=function(e){var t=e.hunk,n=e.monotonous,r=e.elements,o=e.gutterEvents,a=e.contentEvents,i=e.className,u=e.gutterClassName,s=e.contentClassName,c=function(e){return function(){return e(t)}},l=z()(o,c),f=z()(a,c),d=y()("diff-hunk-header",i),p=y()("diff-hunk-header-gutter",u),v=y()("diff-hunk-header-content",s);if(void 0===r)return h.a.createElement("tr",{className:d},h.a.createElement("td",je({className:p},l)),h.a.createElement("td",je({colSpan:n?1:3,className:v},f),t.content));if(null===r)return null;if(Array.isArray(r)){var m=Ce(r,2),g=m[0],b=m[1];return h.a.createElement("tr",{className:d},h.a.createElement("td",je({className:p},l),g),h.a.createElement("td",je({colSpan:n?1:3,className:v},f),b))}return h.a.createElement("tr",{className:d},h.a.createElement("td",je({colSpan:n?2:4,className:v},f),r))};xe.displayName="HunkHeader";var Se=function(e){var t=e.hunk,n=e.monotonous,r=e.widgets,o=e.selectedChanges,a=e.header,i=e.headerGutterEvents,u=e.headerContentEvents,s=e.className,c=e.headerClassName,l=e.headerGutterClassName,f=e.headerContentClassName,d=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["hunk","monotonous","widgets","selectedChanges","header","headerGutterEvents","headerContentEvents","className","headerClassName","headerGutterClassName","headerContentClassName"]),p=function(e,t){for(var n=function(e){if(!e)return null;var n=x(e);return t[n]||null},r=[],o=0;o<e.length;o++){var a=e[o];if(a.isNormal)r.push(["change",ke(a,a),a,a]);else if(a.isDelete){var i=e[o+1];i&&i.isInsert?(o+=1,r.push(["change",ke(a,i),a,i])):r.push(["change",ke(a,null),a,null])}else r.push(["change",ke(null,a),null,a]);var u=r[r.length-1],s=u.slice(2).map(n),c=Ce(s,2),l=c[0],f=c[1];if(l||f){var d=u[1];r.push(["widget",d,l,f])}}return r}(t.changes,r);return h.a.createElement("tbody",{className:y()("diff-hunk",s)},h.a.createElement(xe,{hunk:t,monotonous:n,elements:a,gutterEvents:i,contentEvents:u,className:c,gutterClassName:l,contentClassName:f}),p.map(function(e,t){return function(e,t,n,r,o){var a=Ce(e,4),i=a[0],u=a[1],s=a[2],c=a[3];if("change"===i){var l=!!s&&n.includes(x(s)),f=!!c&&n.includes(x(c));return h.a.createElement(Ee,je({key:"change"+u,oldChange:s,newChange:c,monotonous:r,oldSelected:l,newSelected:f},o))}return"widget"===i?h.a.createElement(Oe,{key:"widget"+u,monotonous:r,oldElement:s,newElement:c}):null}(e,0,o,n,d)}))};Se.displayName="SplitHunk";var Pe,Le,Ae=Se,Te=(n(14),Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),De=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),He=(Le=Pe=function(e){function t(){var e,n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var a=arguments.length,i=Array(a),u=0;u<a;u++)i[u]=arguments[u];return n=r=c(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.selectEvents=J(),r.selectClassNames=V(),o=n,c(r,o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,d["PureComponent"]),De(t,[{key:"render",value:function(){var e=this.props,t=e.viewType,n=e.customEvents,r=e.customClassNames,o=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["viewType","customEvents","customClassNames"]),a="unified"===t?ce:Ae,i=this.selectEvents(n),u=i.headerGutterEvents,s=i.headerContentEvents,c=i.otherEvents,l=this.selectClassNames(r),f=l.hunkClassName,d=l.headerClassName,p=l.headerGutterClassName,v=l.headerContentClassName,m=l.otherClassNames;return h.a.createElement(a,Te({},o,{headerGutterEvents:u,headerContentEvents:s,className:f,headerClassName:d,headerGutterClassName:p,headerContentClassName:v,customEvents:c,customClassNames:m}))}}]),t}(),Pe.propTypes={viewType:T,hunk:I.isRequired,header:v.a.oneOfType([v.a.node,v.a.shape([v.a.node,v.a.node])]),widgets:v.a.objectOf(v.a.element),selectedChanges:v.a.arrayOf(v.a.string),customEvents:F},Pe.defaultProps={viewType:"split",widgets:{},selectedChanges:[],customEvents:{}},Le);He.displayName="Hunk";n(15);var Me=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ie=function(e){var t=e.diffType,n=e.hunks,r=e.children,o=e.className,a=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["diffType","hunks","children","className"]),i="add"===t||"delete"===t,u=function(e,t){return"unified"===e?h.a.createElement("colgroup",null,h.a.createElement("col",{className:"diff-gutter-col"}),h.a.createElement("col",{className:"diff-gutter-col"}),h.a.createElement("col",null)):t?h.a.createElement("colgroup",null,h.a.createElement("col",{className:"diff-gutter-col"}),h.a.createElement("col",null)):h.a.createElement("colgroup",null,h.a.createElement("col",{className:"diff-gutter-col"}),h.a.createElement("col",null),h.a.createElement("col",{className:"diff-gutter-col"}),h.a.createElement("col",null))}(a.viewType,i),s=r?d.Children.map(r,function(e){return Object(d.cloneElement)(e,Me({},a,{monotonous:i}))}):n.map(function(e){return h.a.createElement(He,Me({key:e.content,hunk:e,monotonous:i},a))});return h.a.createElement("table",{className:y()("diff",o)},u,s)};Ie.displayName="Diff",Ie.propTypes={diffType:v.a.oneOf(["add","delete","modify","rename","copy"]),viewType:T.isRequired,hunks:v.a.arrayOf(I),gutterAnchor:v.a.bool,generateAnchorID:v.a.func,children:v.a.oneOfType([v.a.element,v.a.arrayOf(v.a.element)])},Ie.defaultProps={generateAnchorID:function(){}};var Re=Ie,Fe=n(3);n.d(t,"Diff",function(){return Re}),n.d(t,"Hunk",function(){return He}),n.d(t,"parseDiff",function(){return Fe.parseDiff}),n.d(t,"addStubHunk",function(){return Fe.addStubHunk}),n.d(t,"computeOldLineNumber",function(){return E}),n.d(t,"computeNewLineNumber",function(){return N}),n.d(t,"textLinesToHunk",function(){return j}),n.d(t,"insertHunk",function(){return k}),n.d(t,"getChangeKey",function(){return x}),n.d(t,"markWordEdits",function(){return L}),n.d(t,"markCharacterEdits",function(){return A})},function(e,t,n){"use strict";var r=[],o=[];e.exports=function(e,t){if(e===t)return 0;var n=e;e.length>t.length&&(e=t,t=n);var a=e.length,i=t.length;if(0===a)return i;if(0===i)return a;for(;a>0&&e.charCodeAt(~-a)===t.charCodeAt(~-i);)a--,i--;if(0===a)return i;for(var u=0;u<a&&e.charCodeAt(u)===t.charCodeAt(u);)u++;if(a-=u,i-=u,0===a)return i;for(var s,c,l,f,d=0,h=0;d<a;)o[u+d]=e.charCodeAt(u+d),r[d]=++d;for(;h<i;)for(s=t.charCodeAt(u+h),l=h++,c=h,d=0;d<a;d++)f=s===o[u+d]?l:l+1,l=r[d],c=r[d]=l>c?f>c?c+1:f:f>l?l+1:f;return c}},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";t.__esModule=!0,t.canonicalize=t.convertChangesToXML=t.convertChangesToDMP=t.merge=t.parsePatch=t.applyPatches=t.applyPatch=t.createPatch=t.createTwoFilesPatch=t.structuredPatch=t.diffArrays=t.diffJson=t.diffCss=t.diffSentences=t.diffTrimmedLines=t.diffLines=t.diffWordsWithSpace=t.diffWords=t.diffChars=t.Diff=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=n(2),a=n(3),i=n(5),u=n(6),s=n(7),c=n(8),l=n(9),f=n(10),d=n(11),h=n(13),p=n(14),v=n(16),m=n(17);t.Diff=r.default,t.diffChars=o.diffChars,t.diffWords=a.diffWords,t.diffWordsWithSpace=a.diffWordsWithSpace,t.diffLines=i.diffLines,t.diffTrimmedLines=i.diffTrimmedLines,t.diffSentences=u.diffSentences,t.diffCss=s.diffCss,t.diffJson=c.diffJson,t.diffArrays=l.diffArrays,t.structuredPatch=p.structuredPatch,t.createTwoFilesPatch=p.createTwoFilesPatch,t.createPatch=p.createPatch,t.applyPatch=f.applyPatch,t.applyPatches=f.applyPatches,t.parsePatch=d.parsePatch,t.merge=h.merge,t.convertChangesToDMP=v.convertChangesToDMP,t.convertChangesToXML=m.convertChangesToXML,t.canonicalize=c.canonicalize},function(e,t){"use strict";function n(){}t.__esModule=!0,t.default=n,n.prototype={diff:function(e,t){function n(e){return a?(setTimeout(function(){a(void 0,e)},0),!0):e}function r(){for(var r=-1*c;r<=c;r+=2){var o=void 0,a=f[r-1],l=f[r+1],d=(l?l.newPos:0)-r;a&&(f[r-1]=void 0);var h=a&&a.newPos+1<u,p=l&&0<=d&&d<s;if(h||p){if(!h||p&&a.newPos<l.newPos?(o=function(e){return{newPos:e.newPos,components:e.components.slice(0)}}(l),i.pushComponent(o.components,void 0,!0)):((o=a).newPos++,i.pushComponent(o.components,!0,void 0)),d=i.extractCommon(o,t,e,r),o.newPos+1>=u&&d+1>=s)return n(function(e,t,n,r,o){for(var a=0,i=t.length,u=0,s=0;a<i;a++){var c=t[a];if(c.removed){if(c.value=e.join(r.slice(s,s+c.count)),s+=c.count,a&&t[a-1].added){var l=t[a-1];t[a-1]=t[a],t[a]=l}}else{if(!c.added&&o){var f=n.slice(u,u+c.count);f=f.map(function(e,t){var n=r[s+t];return n.length>e.length?n:e}),c.value=e.join(f)}else c.value=e.join(n.slice(u,u+c.count));u+=c.count,c.added||(s+=c.count)}}var d=t[i-1];return i>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(t[i-2].value+=d.value,t.pop()),t}(i,o.components,t,e,i.useLongestToken));f[r]=o}else f[r]=void 0}c++}var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.callback;"function"==typeof o&&(a=o,o={}),this.options=o;var i=this;e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var u=(t=this.removeEmpty(this.tokenize(t))).length,s=e.length,c=1,l=u+s,f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],t,e,0);if(f[0].newPos+1>=u&&d+1>=s)return n([{value:this.join(t),count:t.length}]);if(a)!function e(){setTimeout(function(){if(c>l)return a();r()||e()},0)}();else for(;c<=l;){var h=r();if(h)return h}},pushComponent:function(e,t,n){var r=e[e.length-1];r&&r.added===t&&r.removed===n?e[e.length-1]={count:r.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,r){for(var o=t.length,a=n.length,i=e.newPos,u=i-r,s=0;i+1<o&&u+1<a&&this.equals(t[i+1],n[u+1]);)i++,u++,s++;return s&&e.components.push({count:s}),e.newPos=i,u},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("")}}},function(e,t,n){"use strict";t.__esModule=!0,t.characterDiff=void 0,t.diffChars=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=t.characterDiff=new r.default},function(e,t,n){"use strict";t.__esModule=!0,t.wordDiff=void 0,t.diffWords=function(e,t,n){return n=(0,o.generateOptions)(n,{ignoreWhitespace:!0}),u.diff(e,t,n)},t.diffWordsWithSpace=function(e,t,n){return u.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=n(4),a=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,i=/\S/,u=t.wordDiff=new r.default;u.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!i.test(e)&&!i.test(t)},u.tokenize=function(e){for(var t=e.split(/(\s+|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&a.test(t[n])&&a.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t}},function(e,t){"use strict";t.__esModule=!0,t.generateOptions=function(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}},function(e,t,n){"use strict";t.__esModule=!0,t.lineDiff=void 0,t.diffLines=function(e,t,n){return a.diff(e,t,n)},t.diffTrimmedLines=function(e,t,n){var r=(0,o.generateOptions)(n,{ignoreWhitespace:!0});return a.diff(e,t,r)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=n(4),a=t.lineDiff=new r.default;a.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t}},function(e,t,n){"use strict";t.__esModule=!0,t.sentenceDiff=void 0,t.diffSentences=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=t.sentenceDiff=new r.default;o.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)}},function(e,t,n){"use strict";t.__esModule=!0,t.cssDiff=void 0,t.diffCss=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=t.cssDiff=new r.default;o.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)}},function(e,t,n){"use strict";function r(e,t,n){t=t||[],n=n||[];var a=void 0;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];var i=void 0;if("[object Array]"===u.call(e)){for(t.push(e),i=new Array(e.length),n.push(i),a=0;a<e.length;a+=1)i[a]=r(e[a],t,n);return t.pop(),n.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),"object"===(void 0===e?"undefined":o(e))&&null!==e){t.push(e),i={},n.push(i);var s=[],c=void 0;for(c in e)e.hasOwnProperty(c)&&s.push(c);for(s.sort(),a=0;a<s.length;a+=1)i[c=s[a]]=r(e[c],t,n);t.pop(),n.pop()}else i=e;return i}t.__esModule=!0,t.jsonDiff=void 0;var o="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};t.diffJson=function(e,t,n){return s.diff(e,t,n)},t.canonicalize=r;var a=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),i=n(5),u=Object.prototype.toString,s=t.jsonDiff=new a.default;s.useLongestToken=!0,s.tokenize=i.lineDiff.tokenize,s.castInput=function(e){var t=this.options.undefinedReplacement;return"string"==typeof e?e:JSON.stringify(r(e),function(e,n){return void 0===n?t:n}," ")},s.equals=function(e,t){return a.default.prototype.equals.call(s,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))}},function(e,t,n){"use strict";t.__esModule=!0,t.arrayDiff=void 0,t.diffArrays=function(e,t,n){return o.diff(e,t,n)};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(1)),o=t.arrayDiff=new r.default;o.tokenize=o.join=function(e){return e.slice()},o.removeEmpty=function(e){return e}},function(e,t,n){"use strict";function r(e,t){function n(e,t){for(var n=0;n<e.lines.length;n++){var r=e.lines[n],o=r[0],a=r.substr(1);if(" "===o||"-"===o){if(!c(t+1,i[t],o,a)&&++l>f)return!1;t++}}return!0}var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t&&(t=(0,o.parsePatch)(t)),Array.isArray(t)){if(t.length>1)throw new Error("applyPatch only works with a single input.");t=t[0]}for(var i=e.split(/\r\n|[\n\v\f\r\x85]/),u=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],s=t.hunks,c=r.compareLine||function(e,t,n,r){return t===r},l=0,f=r.fuzzFactor||0,d=0,h=0,p=void 0,v=void 0,m=0;m<s.length;m++){for(var y=s[m],g=i.length-y.oldLines,b=0,w=h+y.oldStart-1,_=(0,a.default)(w,d,g);void 0!==b;b=_())if(n(y,w+b)){y.offset=h+=b;break}if(void 0===b)return!1;d=y.offset+y.oldStart+y.oldLines}for(var E=0,N=0;N<s.length;N++){var O=s[N],j=O.oldStart+O.offset+E-1;E+=O.newLines-O.oldLines,j<0&&(j=0);for(var C=0;C<O.lines.length;C++){var k=O.lines[C],x=k[0],S=k.substr(1),P=O.linedelimiters[C];if(" "===x)j++;else if("-"===x)i.splice(j,1),u.splice(j,1);else if("+"===x)i.splice(j,0,S),u.splice(j,0,P),j++;else if("\\"===x){var L=O.lines[C-1]?O.lines[C-1][0]:null;"+"===L?p=!0:"-"===L&&(v=!0)}}}if(p)for(;!i[i.length-1];)i.pop(),u.pop();else v&&(i.push(""),u.push("\n"));for(var A=0;A<i.length-1;A++)i[A]=i[A]+u[A];return i.join("")}t.__esModule=!0,t.applyPatch=r,t.applyPatches=function(e,t){function n(){var o=e[a++];if(!o)return t.complete();t.loadFile(o,function(e,a){if(e)return t.complete(e);var i=r(a,o,t);t.patched(o,i,function(e){if(e)return t.complete(e);n()})})}"string"==typeof e&&(e=(0,o.parsePatch)(e));var a=0;n()};var o=n(11),a=function(e){return e&&e.__esModule?e:{default:e}}(n(12))},function(e,t){"use strict";t.__esModule=!0,t.parsePatch=function(e){function t(){var e={};for(i.push(e);u<o.length;){var t=o[u];if(/^(\-\-\-|\+\+\+|@@)\s/.test(t))break;var s=/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(t);s&&(e.index=s[1]),u++}for(n(e),n(e),e.hunks=[];u<o.length;){var c=o[u];if(/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(c))break;if(/^@@/.test(c))e.hunks.push(function(){for(var e=u,t=o[u++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),n={oldStart:+t[1],oldLines:+t[2]||1,newStart:+t[3],newLines:+t[4]||1,lines:[],linedelimiters:[]},i=0,s=0;u<o.length&&!(0===o[u].indexOf("--- ")&&u+2<o.length&&0===o[u+1].indexOf("+++ ")&&0===o[u+2].indexOf("@@"));u++){var c=o[u][0];if("+"!==c&&"-"!==c&&" "!==c&&"\\"!==c)break;n.lines.push(o[u]),n.linedelimiters.push(a[u]||"\n"),"+"===c?i++:"-"===c?s++:" "===c&&(i++,s++)}if(i||1!==n.newLines||(n.newLines=0),s||1!==n.oldLines||(n.oldLines=0),r.strict){if(i!==n.newLines)throw new Error("Added line count did not match for hunk at line "+(e+1));if(s!==n.oldLines)throw new Error("Removed line count did not match for hunk at line "+(e+1))}return n}());else{if(c&&r.strict)throw new Error("Unknown line "+(u+1)+" "+JSON.stringify(c));u++}}}function n(e){var t=/^(---|\+\+\+)\s+([\S ]*)(?:\t(.*?)\s*)?$/.exec(o[u]);if(t){var n="---"===t[1]?"old":"new",r=t[2].replace(/\\\\/g,"\\");/^".*"$/.test(r)&&(r=r.substr(1,r.length-2)),e[n+"FileName"]=r,e[n+"Header"]=t[3],u++}}for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.split(/\r\n|[\n\v\f\r\x85]/),a=e.match(/\r\n|[\n\v\f\r\x85]/g)||[],i=[],u=0;u<o.length;)t();return i}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t,n){var r=!0,o=!1,a=!1,i=1;return function u(){if(r&&!a){if(o?i++:r=!1,e+i<=n)return i;a=!0}if(!o)return a||(r=!0),t<=e-i?-i++:(o=!0,u())}}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e){var t=y(e.lines),n=t.oldLines,r=t.newLines;void 0!==n?e.oldLines=n:delete e.oldLines,void 0!==r?e.newLines=r:delete e.newLines}function a(e,t){if("string"==typeof e){if(/^@@/m.test(e)||/^Index:/m.test(e))return(0,b.parsePatch)(e)[0];if(!t)throw new Error("Must provide a base reference or pass in a patch");return(0,g.structuredPatch)(void 0,void 0,t,e)}return e}function i(e){return e.newFileName&&e.newFileName!==e.oldFileName}function u(e,t,n){return t===n?t:(e.conflict=!0,{mine:t,theirs:n})}function s(e,t){return e.oldStart<t.oldStart&&e.oldStart+e.oldLines<t.oldStart}function c(e,t){return{oldStart:e.oldStart,oldLines:e.oldLines,newStart:e.newStart+t,newLines:e.newLines,lines:e.lines}}function l(e,t,n,o){var a=p(t),i=function(e,t){var n=[],r=[],o=0,a=!1,i=!1;for(;o<t.length&&e.index<e.lines.length;){var u=e.lines[e.index],s=t[o];if("+"===s[0])break;if(a=a||" "!==u[0],r.push(s),o++,"+"===u[0])for(i=!0;"+"===u[0];)n.push(u),u=e.lines[++e.index];s.substr(1)===u.substr(1)?(n.push(u),e.index++):i=!0}"+"===(t[o]||"")[0]&&a&&(i=!0);if(i)return n;for(;o<t.length;)r.push(t[o++]);return{merged:r,changes:n}}(n,a);if(i.merged){var u;(u=e.lines).push.apply(u,r(i.merged))}else f(e,o?i:a,o?a:i)}function f(e,t,n){e.conflict=!0,e.lines.push({conflict:!0,mine:t,theirs:n})}function d(e,t,n){for(;t.offset<n.offset&&t.index<t.lines.length;){var r=t.lines[t.index++];e.lines.push(r),t.offset++}}function h(e,t){for(;t.index<t.lines.length;){var n=t.lines[t.index++];e.lines.push(n)}}function p(e){for(var t=[],n=e.lines[e.index][0];e.index<e.lines.length;){var r=e.lines[e.index];if("-"===n&&"+"===r[0]&&(n="+"),n!==r[0])break;t.push(r),e.index++}return t}function v(e){return e.reduce(function(e,t){return e&&"-"===t[0]},!0)}function m(e,t,n){for(var r=0;r<n;r++){var o=t[t.length-n+r].substr(1);if(e.lines[e.index+r]!==" "+o)return!1}return e.index+=n,!0}function y(e){var t=0,n=0;return e.forEach(function(e){if("string"!=typeof e){var r=y(e.mine),o=y(e.theirs);void 0!==t&&(r.oldLines===o.oldLines?t+=r.oldLines:t=void 0),void 0!==n&&(r.newLines===o.newLines?n+=r.newLines:n=void 0)}else void 0===n||"+"!==e[0]&&" "!==e[0]||n++,void 0===t||"-"!==e[0]&&" "!==e[0]||t++}),{oldLines:t,newLines:n}}t.__esModule=!0,t.calcLineCount=o,t.merge=function(e,t,n){e=a(e,n),t=a(t,n);var y={};(e.index||t.index)&&(y.index=e.index||t.index),(e.newFileName||t.newFileName)&&(i(e)?i(t)?(y.oldFileName=u(y,e.oldFileName,t.oldFileName),y.newFileName=u(y,e.newFileName,t.newFileName),y.oldHeader=u(y,e.oldHeader,t.oldHeader),y.newHeader=u(y,e.newHeader,t.newHeader)):(y.oldFileName=e.oldFileName,y.newFileName=e.newFileName,y.oldHeader=e.oldHeader,y.newHeader=e.newHeader):(y.oldFileName=t.oldFileName||e.oldFileName,y.newFileName=t.newFileName||e.newFileName,y.oldHeader=t.oldHeader||e.oldHeader,y.newHeader=t.newHeader||e.newHeader)),y.hunks=[];for(var g=0,b=0,_=0,E=0;g<e.hunks.length||b<t.hunks.length;){var N=e.hunks[g]||{oldStart:1/0},O=t.hunks[b]||{oldStart:1/0};if(s(N,O))y.hunks.push(c(N,_)),g++,E+=N.newLines-N.oldLines;else if(s(O,N))y.hunks.push(c(O,E)),b++,_+=O.newLines-O.oldLines;else{var j={oldStart:Math.min(N.oldStart,O.oldStart),oldLines:0,newStart:Math.min(N.newStart+_,O.oldStart+E),newLines:0,lines:[]};!function(e,t,n,a,i){var u={offset:t,lines:n,index:0},s={offset:a,lines:i,index:0};for(d(e,u,s),d(e,s,u);u.index<u.lines.length&&s.index<s.lines.length;){var c=u.lines[u.index],y=s.lines[s.index];if("-"!==c[0]&&"+"!==c[0]||"-"!==y[0]&&"+"!==y[0])if("+"===c[0]&&" "===y[0]){var g;(g=e.lines).push.apply(g,r(p(u)))}else if("+"===y[0]&&" "===c[0]){var b;(b=e.lines).push.apply(b,r(p(s)))}else"-"===c[0]&&" "===y[0]?l(e,u,s):"-"===y[0]&&" "===c[0]?l(e,s,u,!0):c===y?(e.lines.push(c),u.index++,s.index++):f(e,p(u),p(s));else!function(e,t,n){var o=p(t),a=p(n);if(v(o)&&v(a)){if((0,w.arrayStartsWith)(o,a)&&m(n,o,o.length-a.length)){var i;return void(i=e.lines).push.apply(i,r(o))}if((0,w.arrayStartsWith)(a,o)&&m(t,a,a.length-o.length)){var u;return void(u=e.lines).push.apply(u,r(a))}}else if((0,w.arrayEqual)(o,a)){var s;return void(s=e.lines).push.apply(s,r(o))}f(e,o,a)}(e,u,s)}h(e,u),h(e,s),o(e)}(j,N.oldStart,N.lines,O.oldStart,O.lines),b++,g++,y.hunks.push(j)}}return y};var g=n(14),b=n(11),w=n(15)},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function o(e,t,n,o,a,u,s){function c(e){return e.map(function(e){return" "+e})}s||(s={}),void 0===s.context&&(s.context=4);var l=(0,i.diffLines)(n,o,s);l.push({value:"",lines:[]});for(var f=[],d=0,h=0,p=[],v=1,m=1,y=function(e){var t=l[e],a=t.lines||t.value.replace(/\n$/,"").split("\n");if(t.lines=a,t.added||t.removed){var i;if(!d){var u=l[e-1];d=v,h=m,u&&(p=s.context>0?c(u.lines.slice(-s.context)):[],d-=p.length,h-=p.length)}(i=p).push.apply(i,r(a.map(function(e){return(t.added?"+":"-")+e}))),t.added?m+=a.length:v+=a.length}else{if(d)if(a.length<=2*s.context&&e<l.length-2){var y;(y=p).push.apply(y,r(c(a)))}else{var g,b=Math.min(a.length,s.context);(g=p).push.apply(g,r(c(a.slice(0,b))));var w={oldStart:d,oldLines:v-d+b,newStart:h,newLines:m-h+b,lines:p};if(e>=l.length-2&&a.length<=s.context){var _=/\n$/.test(n),E=/\n$/.test(o);0!=a.length||_?_&&E||p.push("\\ No newline at end of file"):p.splice(w.oldLines,0,"\\ No newline at end of file")}f.push(w),d=0,h=0,p=[]}v+=a.length,m+=a.length}},g=0;g<l.length;g++)y(g);return{oldFileName:e,newFileName:t,oldHeader:a,newHeader:u,hunks:f}}function a(e,t,n,r,a,i,u){var s=o(e,t,n,r,a,i,u),c=[];e==t&&c.push("Index: "+e),c.push("==================================================================="),c.push("--- "+s.oldFileName+(void 0===s.oldHeader?"":"\t"+s.oldHeader)),c.push("+++ "+s.newFileName+(void 0===s.newHeader?"":"\t"+s.newHeader));for(var l=0;l<s.hunks.length;l++){var f=s.hunks[l];c.push("@@ -"+f.oldStart+","+f.oldLines+" +"+f.newStart+","+f.newLines+" @@"),c.push.apply(c,f.lines)}return c.join("\n")+"\n"}t.__esModule=!0,t.structuredPatch=o,t.createTwoFilesPatch=a,t.createPatch=function(e,t,n,r,o,i){return a(e,e,t,n,r,o,i)};var i=n(5)},function(e,t){"use strict";function n(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}t.__esModule=!0,t.arrayEqual=function(e,t){return e.length===t.length&&n(e,t)},t.arrayStartsWith=n},function(e,t){"use strict";t.__esModule=!0,t.convertChangesToDMP=function(e){for(var t=[],n=void 0,r=void 0,o=0;o<e.length;o++)r=(n=e[o]).added?1:n.removed?-1:0,t.push([r,n.value]);return t}},function(e,t){"use strict";t.__esModule=!0,t.convertChangesToXML=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];r.added?t.push("<ins>"):r.removed&&t.push("<del>"),t.push(function(e){var t=e;return t=t.replace(/&/g,"&"),t=t.replace(/</g,"<"),t=t.replace(/>/g,">"),t=t.replace(/"/g,""")}(r.value)),r.added?t.push("</ins>"):r.removed&&t.push("</del>")}return t.join("")}}])})},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){(function(t){function n(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&f.call(e)==o}(e))return p?p.call(e):"";var t=e+"";return"0"==t&&1/e==-r?"-0":t}var r=1/0,o="[object Symbol]",a=/[&<>"'`]/g,i=RegExp(a.source),u="object"==typeof t&&t&&t.Object===Object&&t,s="object"==typeof self&&self&&self.Object===Object&&self,c=u||s||Function("return this")(),l=function(e){return function(t){return null==e?void 0:e[t]}}({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"}),f=Object.prototype.toString,d=c.Symbol,h=d?d.prototype:void 0,p=h?h.toString:void 0;e.exports=function(e){return(e=function(e){return null==e?"":n(e)}(e))&&i.test(e)?e.replace(a,l):e}}).call(t,n(6))},function(e,t){},function(e,t){}])}); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "react-diff-view", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "A git diff component to consume the git unified diff output.", | ||
@@ -16,4 +16,4 @@ "main": "index.js", | ||
"classnames": "^2.2.5", | ||
"diff": "^3.3.1", | ||
"gitdiff-parser": "0.0.5", | ||
"diff": "^3.4.0", | ||
"gitdiff-parser": "0.0.7", | ||
"leven": "^2.1.0", | ||
@@ -24,3 +24,3 @@ "lodash.escape": "^4.0.1", | ||
"devDependencies": { | ||
"antd": "^2.13.0", | ||
"antd": "^2.13.11", | ||
"babel-core": "^6.26.0", | ||
@@ -37,19 +37,19 @@ "babel-eslint": "^7.2.3", | ||
"case-sensitive-paths-webpack-plugin": "^2.1.1", | ||
"copy-webpack-plugin": "^4.0.1", | ||
"copy-webpack-plugin": "^4.2.3", | ||
"css-loader": "^0.28.5", | ||
"eslint": "^4.7.2", | ||
"eslint-plugin-react": "^7.3.0", | ||
"extract-text-webpack-plugin": "^3.0.0", | ||
"eslint": "^4.12.1", | ||
"eslint-plugin-react": "^7.5.1", | ||
"extract-text-webpack-plugin": "^3.0.2", | ||
"html-webpack-plugin": "^2.30.1", | ||
"lang-map": "^0.4.0", | ||
"lodash": "^4.17.4", | ||
"lodash-decorators": "^4.4.1", | ||
"lodash-decorators": "^4.5.0", | ||
"path-parse": "^1.0.5", | ||
"prismjs": "^1.6.0", | ||
"prismjs": "^1.9.0", | ||
"raw-loader": "^0.5.1", | ||
"react": "^16.0.0-rc.3", | ||
"react": "^16.2.0", | ||
"react-addons-perf": "^15.4.2", | ||
"react-dom": "^16.0.0-rc.3", | ||
"react-infinite-scroller": "^1.0.15", | ||
"react-markdown": "^2.5.0", | ||
"react-dom": "^16.2.0", | ||
"react-infinite-scroller": "^1.1.1", | ||
"react-markdown": "^2.5.1", | ||
"react-timeago": "^3.4.3", | ||
@@ -62,5 +62,5 @@ "react-whether": "^1.0.1", | ||
"svg-react-loader": "^0.4.5", | ||
"uglifyjs-webpack-plugin": "^1.0.0-beta.2", | ||
"webpack": "^3.5.5", | ||
"webpack-dev-server": "^2.7.1", | ||
"uglifyjs-webpack-plugin": "^1.1.2", | ||
"webpack": "^3.10.0", | ||
"webpack-dev-server": "^2.9.7", | ||
"worker-loader": "^0.8.1" | ||
@@ -67,0 +67,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.reactDiffView=n():e.reactDiffView=n()}(this,function(){return function(e){function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var t={};return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},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,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=3)}([,,,function(e,n,t){"use strict";function r(e){if(Array.isArray(e)){for(var n=0,t=Array(e.length);n<e.length;n++)t[n]=e[n];return t}return Array.from(e)}Object.defineProperty(n,"__esModule",{value:!0}),t.d(n,"parseDiff",function(){return f}),t.d(n,"addStubHunk",function(){return d});var i=t(4),o=t.n(i),a=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},u=function(){function e(e,n){var t=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(t.push(a.value),!n||t.length!==n);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return t}return function(n,t){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return e(n,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(e){var n=e.reduce(function(e,n,t){var r=u(e,3),i=r[0],o=r[1],a=r[2];return o?n.isInsert&&a>=0?(i.splice(a+1,0,n),[i,n,a+2]):(i.push(n),[i,n,n.isDelete&&o.isDelete?a:t]):(i.push(n),[i,n,n.isDelete?t:-1])},[[],null,-1]);return u(n,1)[0]},l=function(e,n){var t="zip"===n.nearbySequences?s(e.changes):e.changes;return a({},e,{changes:t})},c=function(e,n){var t=e.hunks.map(function(e){return l(e,n)});return a({},e,{hunks:n.stubHunk?d(t):t})},f=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.a.parse(e).map(function(e){return c(e,n)})},d=function(e){if(!e||!e.length)return e;var n=e[e.length-1],t={oldStart:n.oldStart+n.oldLines,oldLines:0,newStart:n.newStart+n.newLines,newLines:0,content:"STUB",changes:[]};return[].concat(r(e),[t])}},function(e,n,t){!function(t){var r={parse:function(e){for(var n,t,r,i,o=[],a=2,u=e.split("\n"),s=u.length,l=0;l<s;){var c=u[l];if(0===c.indexOf("diff --git")){var f=c.split(" ");n={oldPath:f[2].slice(2),newPath:f[3].slice(2),hunks:[]},o.push(n);var d=null,p=u[l+1];0===p.indexOf("old")&&(n.oldMode=p.slice(9,16),n.newMode=u[l+2].slice(9,16),p=u[(l+=2)+1]),0===p.indexOf("similarity")&&(n.similarity=parseInt(p.split(" ")[2],10),l+=1);var v;e:for(;v=u[++l];){switch((f=v.split(" "))[0]){case"diff":l--;break e;case"index":var h=f[1].split("..");n.oldRevision=h[0],n.newRevision=h[1],f[2]&&(n.oldMode=n.newMode=f[2]),a=5;var y=u[l+1];if(0===y.indexOf("---")){var b=u[l+2];/\s\/dev\/null$/.test(y)?(n.oldPath="/dev/null",d="add"):/\s\/dev\/null$/.test(b)&&(n.newPath="/dev/null",d="delete"),l+=2}break e}d||(d=f[0])}n.type=d||"modify"}else if(0===c.indexOf("Binary"))n.isBinary=!0,a=2,n=null;else if(5===a)if(0===c.indexOf("@@")){var w=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(c);t={content:c,oldStart:w[1]-0,newStart:w[4]-0,oldLines:w[3]-0||0,newLines:w[6]-0||0,changes:[]},n.hunks.push(t),r=t.oldStart,i=t.newStart}else{var m=c.slice(0,1),x={content:c.slice(1)};switch(m){case"+":x.type="insert",x.isInsert=!0,x.lineNumber=i,i++;break;case"-":x.type="delete",x.isDelete=!0,x.lineNumber=r,r++;break;case" ":x.type="normal",x.isNormal=!0,x.oldLineNumber=r,x.newLineNumber=i,r++,i++}x.type&&t.changes.push(x)}l++}return o}};n=e.exports=r}()}])}); | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.reactDiffView=n():e.reactDiffView=n()}("undefined"!=typeof self?self:this,function(){return function(e){function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var t={};return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},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,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=3)}([,,,function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),t.d(n,"parseDiff",function(){return l}),t.d(n,"addStubHunk",function(){return u});var r=t(4),i=t.n(r),a=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},o=function(){return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,n){var t=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(t.push(o.value),!n||t.length!==n);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return t}(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(e,n){var t="zip"===n.nearbySequences?function(e){var n=e.reduce(function(e,n,t){var r=o(e,3),i=r[0],a=r[1],s=r[2];return a?n.isInsert&&s>=0?(i.splice(s+1,0,n),[i,n,s+2]):(i.push(n),[i,n,n.isDelete&&a.isDelete?s:t]):(i.push(n),[i,n,n.isDelete?t:-1])},[[],null,-1]);return o(n,1)[0]}(e.changes):e.changes;return a({},e,{changes:t})},l=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i.a.parse(e).map(function(e){return function(e,n){var t=e.hunks.map(function(e){return s(e,n)});return a({},e,{hunks:n.stubHunk?u(t):t})}(e,n)})},u=function(e){if(!e||!e.length)return e;var n=e[e.length-1],t={oldStart:n.oldStart+n.oldLines,oldLines:0,newStart:n.newStart+n.newLines,newLines:0,content:"STUB",changes:[]};return[].concat(function(e){if(Array.isArray(e)){for(var n=0,t=Array(e.length);n<e.length;n++)t[n]=e[n];return t}return Array.from(e)}(e),[t])}},function(e,n,t){!function(t){var r={parse:function(e){for(var n,t,r,i,a=[],o=2,s=e.split("\n"),l=s.length,u=0;u<l;){var c=s[u];if(0===c.indexOf("diff --git")){var f=c.slice(11),d=null,p=null;switch(f.indexOf('"')){case-1:d=(x=f.split(" "))[0].slice(2),p=x[1].slice(2);break;case 0:var v=f.indexOf('"',2);d=f.slice(3,v);var h=f.indexOf('"',v+1);p=h<0?f.slice(v+4):f.slice(h+3,-1);break;default:d=(x=f.split(" "))[0].slice(2),p=x[1].slice(3,-1)}n={oldPath:d,newPath:p,hunks:[]},a.push(n);var y=null,b=s[u+1];0===b.indexOf("old")&&(n.oldMode=b.slice(9,16),n.newMode=s[u+2].slice(9,16),b=s[(u+=2)+1]),0===b.indexOf("similarity")&&(n.similarity=parseInt(b.split(" ")[2],10),u+=1);var w;e:for(;w=s[++u];){var x;switch((x=w.split(" "))[0]){case"diff":u--;break e;case"index":var m=x[1].split("..");n.oldRevision=m[0],n.newRevision=m[1],x[2]&&(n.oldMode=n.newMode=x[2]),o=5;var g=s[u+1];if(0===g.indexOf("---")){var O=s[u+2];/\s\/dev\/null$/.test(g)?(n.oldPath="/dev/null",y="add"):/\s\/dev\/null$/.test(O)&&(n.newPath="/dev/null",y="delete"),u+=2}break e}y||(y=x[0])}n.type=y||"modify"}else if(0===c.indexOf("Binary"))n.isBinary=!0,o=2,n=null;else if(5===o)if(0===c.indexOf("@@")){var S=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(c);t={content:c,oldStart:S[1]-0,newStart:S[4]-0,oldLines:S[3]-0||0,newLines:S[6]-0||0,changes:[]},n.hunks.push(t),r=t.oldStart,i=t.newStart}else{var k=c.slice(0,1),j={content:c.slice(1)};switch(k){case"+":j.type="insert",j.isInsert=!0,j.lineNumber=i,i++;break;case"-":j.type="delete",j.isDelete=!0,j.lineNumber=r,r++;break;case" ":j.type="normal",j.isNormal=!0,j.oldLineNumber=r,j.newLineNumber=i,r++,i++}j.type&&t.changes.push(j)}u++}return a}};n=e.exports=r}()}])}); | ||
//# sourceMappingURL=parse.js.map |
@@ -441,1 +441,5 @@ # react-diff-view | ||
- Fix an issue where `textLinesToHunk` mistakenly adds an heading whitespace to each line of code. | ||
### 1.3.2 | ||
- Update `gitdiff-parser` to fix an issue with whitespace in filename. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
534010
445
1314
+ Addedgitdiff-parser@0.0.7(transitive)
- Removedgitdiff-parser@0.0.5(transitive)
Updateddiff@^3.4.0
Updatedgitdiff-parser@0.0.7