/*! diff v3.3.0 Software License Agreement (BSD License) Copyright (c) 2009-2015, Kevin Decker 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(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?exports.JsDiff=b():a.JsDiff=b()}(this,function(){/******/ return function(a){/******/ // The require function /******/ function b(d){/******/ // Check if module is in cache /******/ if(c[d])/******/ return c[d].exports;/******/ // Create a new module (and put it into the cache) /******/ var e=c[d]={/******/ exports:{},/******/ id:d,/******/ loaded:!1};/******/ // Return the exports of the module /******/ /******/ // Execute the module function /******/ /******/ // Flag the module as loaded /******/ return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}// webpackBootstrap /******/ // The module cache /******/ var c={};/******/ // Load entry module and return exports /******/ /******/ // expose the modules object (__webpack_modules__) /******/ /******/ // expose the module cache /******/ /******/ // __webpack_public_path__ /******/ return b.m=a,b.c=c,b.p="",b(0)}([/* 0 */ /***/ function(a,b,c){/*istanbul ignore start*/ "use strict";/*istanbul ignore start*/ function d(a){return a&&a.__esModule?a:{"default":a}}b.__esModule=!0,b.canonicalize=b.convertChangesToXML=b.convertChangesToDMP=b.merge=b.parsePatch=b.applyPatches=b.applyPatch=b.createPatch=b.createTwoFilesPatch=b.structuredPatch=b.diffArrays=b.diffJson=b.diffCss=b.diffSentences=b.diffTrimmedLines=b.diffLines=b.diffWordsWithSpace=b.diffWords=b.diffChars=b.Diff=void 0;/*istanbul ignore end*/ var/*istanbul ignore start*/e=c(1),f=d(e),/*istanbul ignore start*/g=c(2),/*istanbul ignore start*/h=c(3),/*istanbul ignore start*/i=c(5),/*istanbul ignore start*/j=c(6),/*istanbul ignore start*/k=c(7),/*istanbul ignore start*/l=c(8),/*istanbul ignore start*/m=c(9),/*istanbul ignore start*/n=c(10),/*istanbul ignore start*/o=c(11),/*istanbul ignore start*/p=c(13),/*istanbul ignore start*/q=c(14),/*istanbul ignore start*/r=c(16),/*istanbul ignore start*/s=c(17);/* See LICENSE file for terms of use */ /* * Text diff implementation. * * This library supports the following APIS: * JsDiff.diffChars: Character by character diff * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace * JsDiff.diffLines: Line based diff * * JsDiff.diffCss: Diff targeted at CSS content * * These methods are based on the implementation proposed in * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986). * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927 */ b.Diff=f["default"],/*istanbul ignore start*/ b.diffChars=g.diffChars,/*istanbul ignore start*/ b.diffWords=h.diffWords,/*istanbul ignore start*/ b.diffWordsWithSpace=h.diffWordsWithSpace,/*istanbul ignore start*/ b.diffLines=i.diffLines,/*istanbul ignore start*/ b.diffTrimmedLines=i.diffTrimmedLines,/*istanbul ignore start*/ b.diffSentences=j.diffSentences,/*istanbul ignore start*/ b.diffCss=k.diffCss,/*istanbul ignore start*/ b.diffJson=l.diffJson,/*istanbul ignore start*/ b.diffArrays=m.diffArrays,/*istanbul ignore start*/ b.structuredPatch=q.structuredPatch,/*istanbul ignore start*/ b.createTwoFilesPatch=q.createTwoFilesPatch,/*istanbul ignore start*/ b.createPatch=q.createPatch,/*istanbul ignore start*/ b.applyPatch=n.applyPatch,/*istanbul ignore start*/ b.applyPatches=n.applyPatches,/*istanbul ignore start*/ b.parsePatch=o.parsePatch,/*istanbul ignore start*/ b.merge=p.merge,/*istanbul ignore start*/ b.convertChangesToDMP=r.convertChangesToDMP,/*istanbul ignore start*/ b.convertChangesToXML=s.convertChangesToXML,/*istanbul ignore start*/ b.canonicalize=l.canonicalize},/* 1 */ /***/ function(a,b){/*istanbul ignore start*/ "use strict";function c(){}function d(a,b,c,d,e){for(var f=0,g=b.length,h=0,i=0;fa.length?c:a}),j.value=a.join(l)}else j.value=a.join(c.slice(h,h+j.count));h+=j.count, // Common case j.added||(i+=j.count)}} // Special case handle for when one terminal is ignored. For this case we merge the // terminal into the prior string and drop the change. var m=b[g-1];return g>1&&(m.added||m.removed)&&a.equals("",m.value)&&(b[g-2].value+=m.value,b.pop()),b}function e(a){return{newPos:a.newPos,components:a.components.slice(0)}}b.__esModule=!0,b["default"]=/*istanbul ignore end*/c,c.prototype={/*istanbul ignore start*/ /*istanbul ignore end*/ diff:function(a,b){function c(a){return h?(setTimeout(function(){h(void 0,a)},0),!0):a} // Main worker method. checks all permutations of a given edit length for acceptance. function f(){for(var f=-1*l;f<=l;f+=2){var g=/*istanbul ignore start*/void 0,h=n[f-1],m=n[f+1],o=(m?m.newPos:0)-f;h&&( // No one else is going to attempt to use this value, clear it n[f-1]=void 0);var p=h&&h.newPos+1=j&&o+1>=k)return c(d(i,g.components,b,a,i.useLongestToken)); // Otherwise track this path as a potential candidate and continue. n[f]=g}else // If this path is a terminal then prune n[f]=void 0}l++}/*istanbul ignore start*/ var/*istanbul ignore end*/g=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],h=g.callback;"function"==typeof g&&(h=g,g={}),this.options=g;var i=this; // Allow subclasses to massage the input prior to running a=this.castInput(a),b=this.castInput(b),a=this.removeEmpty(this.tokenize(a)),b=this.removeEmpty(this.tokenize(b));var j=b.length,k=a.length,l=1,m=j+k,n=[{newPos:-1,components:[]}],o=this.extractCommon(n[0],b,a,0);if(n[0].newPos+1>=j&&o+1>=k) // Identity per the equality and tokenizer return c([{value:this.join(b),count:b.length}]); // Performs the length of edit iteration. Is a bit fugly as this has to support the // sync and async mode which is never fun. Loops over execEditLength until a value // is produced. if(h)!function q(){setTimeout(function(){ // This should not happen, but we want to be safe. /* istanbul ignore next */ // This should not happen, but we want to be safe. /* istanbul ignore next */ return l>m?h():void(f()||q())},0)}();else for(;l<=m;){var p=f();if(p)return p}},/*istanbul ignore start*/ /*istanbul ignore end*/ pushComponent:function(a,b,c){var d=a[a.length-1];d&&d.added===b&&d.removed===c? // We need to clone here as the component clone operation is just // as shallow array clone a[a.length-1]={count:d.count+1,added:b,removed:c}:a.push({count:1,added:b,removed:c})},/*istanbul ignore start*/ /*istanbul ignore end*/ extractCommon:function(a,b,c,d){for(var e=b.length,f=c.length,g=a.newPos,h=g-d,i=0;g+1l))return!1;b++}}return!0}/*istanbul ignore start*/ var/*istanbul ignore end*/d=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];if("string"==typeof b&&(b=/*istanbul ignore start*/(0,g.parsePatch)(b)),Array.isArray(b)){if(b.length>1)throw new Error("applyPatch only works with a single input.");b=b[0]} // Search best fit offsets for each hunk based on the previous ones for(var e=a.split(/\r\n|[\n\v\f\r\x85]/),f=a.match(/\r\n|[\n\v\f\r\x85]/g)||[],h=b.hunks,j=d.compareLine||function(a,b,c,d){/*istanbul ignore end*/ return b===d},k=0,l=d.fuzzFactor||0,m=0,n=0,o=/*istanbul ignore start*/void 0,p=/*istanbul ignore start*/void 0,q=0;q0?j(h.lines.slice(-i.context)):[],m-=o.length,n-=o.length)} // Output our changes /*istanbul ignore start*/ (g=/*istanbul ignore end*/o).push.apply(/*istanbul ignore start*/g,/*istanbul ignore start*/d(/*istanbul ignore end*/f.map(function(a){return(b.added?"+":"-")+a}))), // Track the updated file position b.added?q+=f.length:p+=f.length}else{ // Identical context lines. Track line changes if(m) // Close out any changes that have been output (or join overlapping) if(f.length<=2*i.context&&a=k.length-2&&f.length<=i.context){ // EOF is inside this hunk var v=/\n$/.test(c),w=/\n$/.test(e);0!=f.length||v?v&&w||o.push("\\ No newline at end of file"): // special case: old has no eol and no trailing context; no-nl can end up before adds o.splice(u.oldLines,0,"\\ No newline at end of file")}l.push(u),m=0,n=0,o=[]}p+=f.length,q+=f.length}},s=0;sa.length)return!1;for(var c=0;c"):e.removed&&b.push(""),b.push(d(e.value)),e.added?b.push(""):e.removed&&b.push("")}return b.join("")}function d(a){var b=a;return b=b.replace(/&/g,"&"),b=b.replace(//g,">"),b=b.replace(/"/g,""")}b.__esModule=!0,b.convertChangesToXML=c}])});