{"version":3,"sources":["webpack:///./node_modules/diff-dom/src/TraceLogger.js","webpack:///./node_modules/diff-dom/src/diffDOM/dom/apply.js","webpack:///./node_modules/diff-dom/src/diffDOM/dom/fromVirtual.js","webpack:///./node_modules/diff-dom/src/diffDOM/dom/index.js","webpack:///./node_modules/diff-dom/src/diffDOM/dom/undo.js","webpack:///./node_modules/diff-dom/src/diffDOM/index.js","webpack:///./node_modules/diff-dom/src/diffDOM/virtual/apply.js","webpack:///./node_modules/diff-dom/src/diffDOM/virtual/diff.js","webpack:///./node_modules/diff-dom/src/diffDOM/virtual/fromDOM.js","webpack:///./node_modules/diff-dom/src/diffDOM/virtual/fromString.js","webpack:///./node_modules/diff-dom/src/diffDOM/virtual/helpers.js","webpack:///./node_modules/diff-dom/src/diffDOM/virtual/index.js","webpack:///./node_modules/diff-dom/src/index.js","webpack:///./node_modules/mustache/mustache.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,GAAG;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,EAAE;AACrB;AACA,wBAAwB,EAAE;AAC1B;AACA;AACA;AACA,kBAAkB,SAAS,IAAI,aAAa,EAAE,EAAE;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,gCAAgC;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yBAAyB,IAAI,WAAW;AAC1D;AACA;;;;;;;;;;;;;ACjGA;AAAA;AAAA;AAAA;AAAuC;;AAEvC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8DAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,8DAAS;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;AC3JA;AAAA;AAAO;AACP;AACA;AACA;;AAEA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA,SAAS;AACT;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAgC;AACF;;;;;;;;;;;;;ACD9B;AAAA;AAAA;AAAiC;;AAEjC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA,YAAY,wDAAS;AACrB;AACA;AACA;AACA;;AAEA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;ACxFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6C;AACH;AACY;;AAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,+BAA+B,KAAK,EAAE;AACtC,4BAA4B;AAC5B,6BAA6B;AAC7B,qBAAqB;AACrB,sBAAsB;AACtB;AACA;AACA;AACA;AACA;;;AAGO;AACP,4BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;;AAET;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA,0BAA0B,yDAAU;;AAEpC;;AAEA;AACA,eAAe,2DAAQ;AACvB;;AAEA;AACA,eAAe,0DAAO;AACtB;;AAEA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;AC1EA;AAAA;AAAA;AAAkC;;AAElC;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA,aAAa;AACb;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,yDAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA,qBAAqB;AACrB;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qBAAqB;AACrB;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,yDAAQ;AAC9B;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,qBAAqB;AACrB;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEO;AACP;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;ACjSA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAyH;AACrF;AACD;AACK;;AAExC;;AAEO;AACP;AACA;AACA,oDAAoD,0DAAS,wDAAwD,+DAAW;AAChI,oDAAoD,0DAAS,wDAAwD,+DAAW;AAChI;AACA;AACA;AACA,0BAA0B,0DAAS;AACnC,0BAA0B,0DAAS;AACnC;;AAEA,2BAA2B,oDAAW;AACtC;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,4BAA4B,MAAM,4BAA4B;AACvH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAqB,wDAAO;AAC5B;AACA;AACA,qBAAqB;AACrB;AACA,wBAAwB,2DAAU;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2DAAY;AAC5B;AACA,SAAS;;AAET;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,6CAAI;AAC5B;AACA,wDAAwD,yDAAQ;AAChE,wDAAwD,yDAAQ;AAChE;AACA;AACA;AACA;AACA,wBAAwB,6CAAI;AAC5B;AACA,wDAAwD,yDAAQ;AAChE,wDAAwD,yDAAQ;AAChE;AACA;AACA;;AAEA;AACA;AACA;AACA,4BAA4B,6CAAI;AAChC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,4BAA4B,6CAAI;AAChC;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA,+BAA+B,6CAAI;AACnC;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,mCAAmC,6CAAI;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB,gBAAgB;AACnC;AACA,2BAA2B,6CAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6GAA6G,6DAAY;;AAEzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;AAEA,uBAAuB,UAAU;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAAI;AAC3C;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,uCAAuC,6CAAI;AAC3C;AACA;AACA,mEAAmE,yDAAQ;AAC3E;AACA;AACA;;AAEA,iBAAiB;AACjB;AACA,uCAAuC,6CAAI;AAC3C;AACA;AACA;AACA;AACA,qBAAqB;AACrB,uCAAuC,6CAAI;AAC3C;AACA;AACA,mEAAmE,yDAAQ;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,WAAW,wDAAO;AACnC;AACA;AACA,gCAAgC,6CAAI;AACpC;AACA,uEAAuE,yDAAQ;AAC/E;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,gCAAgC,6CAAI;AACpC;AACA,uEAAuE,yDAAQ;AAC/E;AACA;AACA,oDAAoD;AACpD;AACA,qBAAqB;AACrB;AACA,gCAAgC,6CAAI;AACpC;AACA,wEAAwE,yDAAQ;AAChF,wEAAwE,yDAAQ;AAChF;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,kEAAiB;AAChD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA,wCAAwC,mBAAmB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,6CAAI;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB,uCAAuC,6CAAI;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,mCAAmC,6CAAI;AACvC;AACA;AACA,+DAA+D,yDAAQ;AACvE;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA,mCAAmC,6CAAI;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB,mCAAmC,6CAAI;AACvC;AACA;AACA,+DAA+D,yDAAQ;AACvE;AACA;AACA;AACA;AACA;;AAEA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,kBAAkB;AACrD,6BAA6B,6DAAY;AACzC;AACA;AACA;AACA;AACA,oCAAoC,6CAAI;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,6CAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA2B,6CAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,6CAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;ACxdA;AAAA;AAAO,sCAAsC;AAC7C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC9BA;AAAA;AAAA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA,+BAA+B,sBAAsB;AACrD,eAAe;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;;AAEA;;AAEA;AACA;AACA,aAAa;AACb;AACA;;AAEA;AACA;;AAEA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B,iBAAiB;AAC/C;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;AClMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO;AACP,4BAA4B;AAC5B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,YAAY,GAAG,0CAA0C;AACxF;AACA;AACA,+BAA+B,YAAY,GAAG,iBAAiB;AAC/D;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT,KAAK;;AAEL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;;AAGO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,aAAa;AACb,wCAAwC,YAAY,GAAG,iBAAiB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,uCAAuC,YAAY,GAAG,0CAA0C;AAChG;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;AAGO,wBAAwB;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,yBAAyB,oBAAoB;AAC7C;AACA,6BAA6B,oBAAoB;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,qCAAqC,YAAY;AACjD;AACA;AACA,qCAAqC,YAAY;AACjD;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO;AACP;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;ACxWA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAiC;AACE;AACK;;;;;;;;;;;;;ACFxC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA+D;AACtB;;;;;;;;;;;;ACDzC;AACA;AACA,EAAE,KAA4D;AAC9D,EAAE,SACsD;AACxD,CAAC,qBAAqB;;AAEtB;AACA,gCAAgC,UAAU;AAC1C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,oCAAoC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,eAAe;AACf,cAAc;AACd,cAAc;AACd,gBAAgB;AAChB,eAAe;AACf,gBAAgB;AAChB,gBAAgB;AAChB,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,sBAAsB;AACtB,2BAA2B;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,SAAS;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB,oBAAoB;AACpB,oBAAoB;AACpB,uBAAuB,oBAAoB,KAAK;AAChD,yBAAyB;AACzB,yBAAyB;AACzB,qBAAqB;;AAErB;AACA,wBAAwB,MAAM;AAC9B;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0DAA0D;AAC1D;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,mDAAmD,iBAAiB;AACpE;;AAEA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,qBAAqB;AAC5B;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;AACA,OAAO,wCAAwC;AAC/C;AACA,OAAO;AACP;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,eAAe;AAC7D;;AAEA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,eAAe;AAC7D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAkE,WAAW,UAAU,SAAS,KAAK,oBAAoB;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA8C,eAAe;AAC7D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,iDAAiD,iBAAiB;AAClE;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA,CAAC","file":"vendors~dynamic-render.bundle.js","sourcesContent":["/**\n * Use TraceLogger to figure out function calls inside\n * JS objects by wrapping an object with a TraceLogger\n * instance.\n *\n * Pretty-prints the call trace (using unicode box code)\n * when tracelogger.toString() is called.\n */\n\n/**\n * Wrap an object by calling new TraceLogger(obj)\n *\n * If you're familiar with Python decorators, this\n * does roughly the same thing, adding pre/post\n * call hook logging calls so that you can see\n * what's going on.\n */\nexport class TraceLogger {\n constructor(obj = {}) {\n this.pad = \"│ \"\n this.padding = \"\"\n this.tick = 1\n this.messages = []\n const wrapkey = (obj, key) => {\n // trace this function\n const oldfn = obj[key]\n obj[key] = (...args) => {\n this.fin(key, Array.prototype.slice.call(args))\n const result = oldfn.apply(obj, args)\n this.fout(key, result)\n return result\n }\n }\n // can't use Object.keys for prototype walking\n for (let key in obj) {\n if (typeof obj[key] === \"function\") {\n wrapkey(obj, key)\n }\n }\n this.log(\"┌ TRACELOG START\")\n }\n // called when entering a function\n fin(fn, args) {\n this.padding += this.pad\n this.log(`├─> entering ${fn}`, args)\n }\n // called when exiting a function\n fout(fn, result) {\n this.log(\"│<──┘ generated return value\", result)\n this.padding = this.padding.substring(0, this.padding.length - this.pad.length)\n }\n // log message formatting\n format(s, tick) {\n let nf = function(t) {\n t = `${t}`\n while (t.length < 4) {\n t = `0${t}`\n }\n return t\n }\n return `${nf(tick)}> ${this.padding}${s}`\n }\n // log a trace message\n log() {\n let s = Array.prototype.slice.call(arguments)\n const stringCollapse = function(v) {\n if (!v) {\n return \"\"\n }\n if (typeof v === \"string\") {\n return v\n }\n if (v instanceof HTMLElement) {\n return v.outerHTML || \"\"\n }\n if (v instanceof Array) {\n return `[${v.map(stringCollapse).join(\",\")}]`\n }\n return v.toString() || v.valueOf() || \"\"\n }\n s = s.map(stringCollapse).join(\", \")\n this.messages.push(this.format(s, this.tick++))\n }\n // turn the log into a structured string with\n // unicode box codes to make it a sensible trace.\n toString() {\n let cap = \"× \"\n let terminator = \"└───\"\n while (terminator.length <= this.padding.length + this.pad.length) {\n terminator += cap\n }\n let _ = this.padding\n this.padding = \"\"\n terminator = this.format(terminator, this.tick)\n this.padding = _\n return `${this.messages.join(\"\\n\")}\\n${terminator}`\n }\n}\n","import {objToNode} from \"./fromVirtual\"\n\n// ===== Apply a diff =====\n\nfunction getFromRoute(node, route) {\n route = route.slice()\n while (route.length > 0) {\n if (!node.childNodes) {\n return false\n }\n const c = route.splice(0, 1)[0]\n node = node.childNodes[c]\n }\n return node\n}\n\nexport function applyDiff(\n tree,\n diff,\n options // {preDiffApply, postDiffApply, textDiff, valueDiffing, _const}\n ) {\n let node = getFromRoute(tree, diff[options._const.route])\n let newNode\n let reference\n let route\n let nodeArray\n let c\n\n // pre-diff hook\n const info = {\n diff,\n node\n }\n\n if (options.preDiffApply(info)) {\n return true\n }\n\n switch (diff[options._const.action]) {\n case options._const.addAttribute:\n if (!node || !node.setAttribute) {\n return false\n }\n node.setAttribute(diff[options._const.name], diff[options._const.value])\n break\n case options._const.modifyAttribute:\n if (!node || !node.setAttribute) {\n return false\n }\n node.setAttribute(diff[options._const.name], diff[options._const.newValue])\n if (node.nodeName === 'INPUT' && diff[options._const.name] === 'value') {\n node.value = diff[options._const.newValue]\n }\n break\n case options._const.removeAttribute:\n if (!node || !node.removeAttribute) {\n return false\n }\n node.removeAttribute(diff[options._const.name])\n break\n case options._const.modifyTextElement:\n if (!node || node.nodeType !== 3) {\n return false\n }\n options.textDiff(node, node.data, diff[options._const.oldValue], diff[options._const.newValue])\n break\n case options._const.modifyValue:\n if (!node || typeof node.value === 'undefined') {\n return false\n }\n node.value = diff[options._const.newValue]\n break\n case options._const.modifyComment:\n if (!node || typeof node.data === 'undefined') {\n return false\n }\n options.textDiff(node, node.data, diff[options._const.oldValue], diff[options._const.newValue])\n break\n case options._const.modifyChecked:\n if (!node || typeof node.checked === 'undefined') {\n return false\n }\n node.checked = diff[options._const.newValue]\n break\n case options._const.modifySelected:\n if (!node || typeof node.selected === 'undefined') {\n return false\n }\n node.selected = diff[options._const.newValue]\n break\n case options._const.replaceElement:\n node.parentNode.replaceChild(\n objToNode(\n diff[options._const.newValue],\n node.namespaceURI === 'http://www.w3.org/2000/svg',\n options\n ),\n node\n )\n break\n case options._const.relocateGroup:\n nodeArray = Array(...new Array(diff.groupLength)).map(() => node.removeChild(node.childNodes[diff[options._const.from]]))\n nodeArray.forEach((childNode, index) => {\n if (index === 0) {\n reference = node.childNodes[diff[options._const.to]]\n }\n node.insertBefore(childNode, reference || null)\n })\n break\n case options._const.removeElement:\n node.parentNode.removeChild(node)\n break\n case options._const.addElement:\n route = diff[options._const.route].slice()\n c = route.splice(route.length - 1, 1)[0]\n node = getFromRoute(tree, route)\n node.insertBefore(\n objToNode(\n diff[options._const.element],\n node.namespaceURI === 'http://www.w3.org/2000/svg',\n options\n ),\n node.childNodes[c] || null\n )\n break\n case options._const.removeTextElement:\n if (!node || node.nodeType !== 3) {\n return false\n }\n node.parentNode.removeChild(node)\n break\n case options._const.addTextElement:\n route = diff[options._const.route].slice()\n c = route.splice(route.length - 1, 1)[0]\n newNode = options.document.createTextNode(diff[options._const.value])\n node = getFromRoute(tree, route)\n if (!node || !node.childNodes) {\n return false\n }\n node.insertBefore(newNode, node.childNodes[c] || null)\n break\n default:\n console.log('unknown action')\n }\n\n // if a new node was created, we might be interested in its\n // post diff hook\n info.newNode = newNode\n options.postDiffApply(info)\n\n return true\n}\n\nexport function applyDOM(tree, diffs, options) {\n return diffs.every(diff => applyDiff(tree, diff, options))\n}\n","export function objToNode(objNode, insideSvg, options) {\n let node\n if (objNode.nodeName === '#text') {\n node = options.document.createTextNode(objNode.data)\n\n } else if (objNode.nodeName === '#comment') {\n node = options.document.createComment(objNode.data)\n } else {\n if (insideSvg) {\n node = options.document.createElementNS('http://www.w3.org/2000/svg', objNode.nodeName)\n } else if (objNode.nodeName.toLowerCase() === 'svg') {\n node = options.document.createElementNS('http://www.w3.org/2000/svg', 'svg')\n insideSvg = true\n } else {\n node = options.document.createElement(objNode.nodeName)\n }\n if (objNode.attributes) {\n Object.entries(objNode.attributes).forEach(([key, value]) => node.setAttribute(key, value))\n }\n if (objNode.childNodes) {\n objNode.childNodes.forEach(childNode => node.appendChild(objToNode(childNode, insideSvg, options)))\n }\n if (options.valueDiffing) {\n if (objNode.value) {\n node.value = objNode.value\n }\n if (objNode.checked) {\n node.checked = objNode.checked\n }\n if (objNode.selected) {\n node.selected = objNode.selected\n }\n }\n }\n return node\n}\n","export {applyDOM} from \"./apply\"\nexport {undoDOM} from \"./undo\"\n","import {applyDiff} from \"./apply\"\n\n// ===== Undo a diff =====\n\nfunction swap(obj, p1, p2) {\n const tmp = obj[p1]\n obj[p1] = obj[p2]\n obj[p2] = tmp\n}\n\nfunction undoDiff(\n tree,\n diff,\n options // {preDiffApply, postDiffApply, textDiff, valueDiffing, _const}\n) {\n\n switch (diff[options._const.action]) {\n case options._const.addAttribute:\n diff[options._const.action] = options._const.removeAttribute\n applyDiff(tree, diff, options)\n break\n case options._const.modifyAttribute:\n swap(diff, options._const.oldValue, options._const.newValue)\n applyDiff(tree, diff, options)\n break\n case options._const.removeAttribute:\n diff[options._const.action] = options._const.addAttribute\n applyDiff(tree, diff, options)\n break\n case options._const.modifyTextElement:\n swap(diff, options._const.oldValue, options._const.newValue)\n applyDiff(tree, diff, options)\n break\n case options._const.modifyValue:\n swap(diff, options._const.oldValue, options._const.newValue)\n applyDiff(tree, diff, options)\n break\n case options._const.modifyComment:\n swap(diff, options._const.oldValue, options._const.newValue)\n applyDiff(tree, diff, options)\n break\n case options._const.modifyChecked:\n swap(diff, options._const.oldValue, options._const.newValue)\n applyDiff(tree, diff, options)\n break\n case options._const.modifySelected:\n swap(diff, options._const.oldValue, options._const.newValue)\n applyDiff(tree, diff, options)\n break\n case options._const.replaceElement:\n swap(diff, options._const.oldValue, options._const.newValue)\n applyDiff(tree, diff, options)\n break\n case options._const.relocateGroup:\n swap(diff, options._const.from, options._const.to)\n applyDiff(tree, diff, options)\n break\n case options._const.removeElement:\n diff[options._const.action] = options._const.addElement\n applyDiff(tree, diff, options)\n break\n case options._const.addElement:\n diff[options._const.action] = options._const.removeElement\n applyDiff(tree, diff, options)\n break\n case options._const.removeTextElement:\n diff[options._const.action] = options._const.addTextElement\n applyDiff(tree, diff, options)\n break\n case options._const.addTextElement:\n diff[options._const.action] = options._const.removeTextElement\n applyDiff(tree, diff, options)\n break\n default:\n console.log('unknown action')\n }\n\n}\n\nexport function undoDOM(tree, diffs, options) {\n if (!diffs.length) {\n diffs = [diffs]\n }\n diffs = diffs.slice()\n diffs.reverse()\n diffs.forEach(diff => {\n undoDiff(tree, diff, options)\n })\n}\n","import {applyDOM, undoDOM} from \"./dom/index\"\nimport {DiffFinder} from \"./virtual/index\"\nexport {nodeToObj, stringToObj} from \"./virtual/index\"\n\nconst DEFAULT_OPTIONS = {\n debug: false,\n diffcap: 10, // Limit for how many diffs are accepting when debugging. Inactive when debug is false.\n maxDepth: false, // False or a numeral. If set to a numeral, limits the level of depth that the the diff mechanism looks for differences. If false, goes through the entire tree.\n maxChildCount: 50, // False or a numeral. If set to a numeral, only does a simplified form of diffing of contents so that the number of diffs cannot be higher than the number of child nodes.\n valueDiffing: true, // Whether to take into consideration the values of forms that differ from auto assigned values (when a user fills out a form).\n // syntax: textDiff: function (node, currentValue, expectedValue, newValue)\n textDiff(node, currentValue, expectedValue, newValue) {\n node.data = newValue\n return\n },\n // empty functions were benchmarked as running faster than both\n // `f && f()` and `if (f) { f(); }`\n preVirtualDiffApply() {},\n postVirtualDiffApply() {},\n preDiffApply() {},\n postDiffApply() {},\n filterOuterDiff: null,\n compress: false, // Whether to work with compressed diffs\n _const: false, // object with strings for every change types to be used in diffs.\n document: window && window.document ? window.document : false\n}\n\n\nexport class DiffDOM {\n constructor(options = {}) {\n\n this.options = options\n // IE11 doesn't have Object.assign and buble doesn't translate object spreaders\n // by default, so this is the safest way of doing it currently.\n Object.entries(DEFAULT_OPTIONS).forEach(([key, value]) => {\n if (!Object.prototype.hasOwnProperty.call(this.options, key)) {\n this.options[key] = value\n }\n })\n\n if (!this.options._const) {\n const varNames = [\"addAttribute\", \"modifyAttribute\", \"removeAttribute\",\n \"modifyTextElement\", \"relocateGroup\", \"removeElement\", \"addElement\",\n \"removeTextElement\", \"addTextElement\", \"replaceElement\", \"modifyValue\",\n \"modifyChecked\", \"modifySelected\", \"modifyComment\", \"action\", \"route\",\n \"oldValue\", \"newValue\", \"element\", \"group\", \"from\", \"to\", \"name\",\n \"value\", \"data\", \"attributes\", \"nodeName\", \"childNodes\", \"checked\",\n \"selected\"\n ]\n this.options._const = {}\n if (this.options.compress) {\n varNames.forEach((varName, index) => this.options._const[varName] = index)\n } else {\n varNames.forEach(varName => this.options._const[varName] = varName)\n }\n }\n\n this.DiffFinder = DiffFinder\n\n }\n\n apply(tree, diffs) {\n return applyDOM(tree, diffs, this.options)\n }\n\n undo(tree, diffs) {\n return undoDOM(tree, diffs, this.options)\n }\n\n diff(t1Node, t2Node) {\n const finder = new this.DiffFinder(t1Node, t2Node, this.options)\n return finder.init()\n }\n\n}\n","import {cloneObj} from \"./helpers\"\n\n// ===== Apply a virtual diff =====\n\nfunction getFromVirtualRoute(tree, route) {\n let node = tree\n let parentNode\n let nodeIndex\n\n route = route.slice()\n while (route.length > 0) {\n if (!node.childNodes) {\n return false\n }\n nodeIndex = route.splice(0, 1)[0]\n parentNode = node\n node = node.childNodes[nodeIndex]\n }\n return {\n node,\n parentNode,\n nodeIndex\n }\n}\n\nfunction applyVirtualDiff(\n tree,\n diff,\n options // {preVirtualDiffApply, postVirtualDiffApply, _const}\n ) {\n const routeInfo = getFromVirtualRoute(tree, diff[options._const.route])\n let node = routeInfo.node\n const parentNode = routeInfo.parentNode\n const nodeIndex = routeInfo.nodeIndex\n const newSubsets = []\n\n // pre-diff hook\n const info = {\n diff,\n node\n }\n\n if (options.preVirtualDiffApply(info)) {\n return true\n }\n\n let newNode\n let nodeArray\n let route\n let c\n switch (diff[options._const.action]) {\n case options._const.addAttribute:\n if (!node.attributes) {\n node.attributes = {}\n }\n\n node.attributes[diff[options._const.name]] = diff[options._const.value]\n\n if (diff[options._const.name] === 'checked') {\n node.checked = true\n } else if (diff[options._const.name] === 'selected') {\n node.selected = true\n } else if (node.nodeName === 'INPUT' && diff[options._const.name] === 'value') {\n node.value = diff[options._const.value]\n }\n\n break\n case options._const.modifyAttribute:\n node.attributes[diff[options._const.name]] = diff[options._const.newValue]\n break\n case options._const.removeAttribute:\n\n delete node.attributes[diff[options._const.name]]\n\n if (Object.keys(node.attributes).length === 0) {\n delete node.attributes\n }\n\n if (diff[options._const.name] === 'checked') {\n node.checked = false\n } else if (diff[options._const.name] === 'selected') {\n delete node.selected\n } else if (node.nodeName === 'INPUT' && diff[options._const.name] === 'value') {\n delete node.value\n }\n\n break\n case options._const.modifyTextElement:\n node.data = diff[options._const.newValue]\n break\n case options._const.modifyValue:\n node.value = diff[options._const.newValue]\n break\n case options._const.modifyComment:\n node.data = diff[options._const.newValue]\n break\n case options._const.modifyChecked:\n node.checked = diff[options._const.newValue]\n break\n case options._const.modifySelected:\n node.selected = diff[options._const.newValue]\n break\n case options._const.replaceElement:\n newNode = cloneObj(diff[options._const.newValue])\n newNode.outerDone = true\n newNode.innerDone = true\n newNode.valueDone = true\n parentNode.childNodes[nodeIndex] = newNode\n break\n case options._const.relocateGroup:\n nodeArray = node.childNodes.splice(diff[options._const.from], diff.groupLength).reverse()\n nodeArray.forEach(movedNode => node.childNodes.splice(diff[options._const.to], 0, movedNode))\n if (node.subsets) {\n node.subsets.forEach(map => {\n if (diff[options._const.from] < diff[options._const.to] && map.oldValue <= diff[options._const.to] && map.oldValue > diff[options._const.from]) {\n map.oldValue -= diff.groupLength\n const splitLength = map.oldValue + map.length - diff[options._const.to]\n if (splitLength > 0) {\n // new insertion splits map.\n newSubsets.push({\n oldValue: diff[options._const.to] + diff.groupLength,\n newValue: map.newValue + map.length - splitLength,\n length: splitLength\n })\n map.length -= splitLength\n }\n } else if (diff[options._const.from] > diff[options._const.to] && map.oldValue > diff[options._const.to] && map.oldValue < diff[options._const.from]) {\n map.oldValue += diff.groupLength\n const splitLength = map.oldValue + map.length - diff[options._const.to]\n if (splitLength > 0) {\n // new insertion splits map.\n newSubsets.push({\n oldValue: diff[options._const.to] + diff.groupLength,\n newValue: map.newValue + map.length - splitLength,\n length: splitLength\n })\n map.length -= splitLength\n }\n } else if (map.oldValue === diff[options._const.from]) {\n map.oldValue = diff[options._const.to]\n }\n })\n }\n\n break\n case options._const.removeElement:\n parentNode.childNodes.splice(nodeIndex, 1)\n if (parentNode.subsets) {\n parentNode.subsets.forEach(map => {\n if (map.oldValue > nodeIndex) {\n map.oldValue -= 1\n } else if (map.oldValue === nodeIndex) {\n map.delete = true\n } else if (map.oldValue < nodeIndex && (map.oldValue + map.length) > nodeIndex) {\n if (map.oldValue + map.length - 1 === nodeIndex) {\n map.length--\n } else {\n newSubsets.push({\n newValue: map.newValue + nodeIndex - map.oldValue,\n oldValue: nodeIndex,\n length: map.length - nodeIndex + map.oldValue - 1\n })\n map.length = nodeIndex - map.oldValue\n }\n }\n })\n }\n node = parentNode\n break\n case options._const.addElement:\n route = diff[options._const.route].slice()\n c = route.splice(route.length - 1, 1)[0]\n node = getFromVirtualRoute(tree, route).node\n newNode = cloneObj(diff[options._const.element])\n newNode.outerDone = true\n newNode.innerDone = true\n newNode.valueDone = true\n\n if (!node.childNodes) {\n node.childNodes = []\n }\n\n if (c >= node.childNodes.length) {\n node.childNodes.push(newNode)\n } else {\n node.childNodes.splice(c, 0, newNode)\n }\n if (node.subsets) {\n node.subsets.forEach(map => {\n if (map.oldValue >= c) {\n map.oldValue += 1\n } else if (map.oldValue < c && (map.oldValue + map.length) > c) {\n const splitLength = map.oldValue + map.length - c\n newSubsets.push({\n newValue: map.newValue + map.length - splitLength,\n oldValue: c + 1,\n length: splitLength\n })\n map.length -= splitLength\n }\n })\n }\n break\n case options._const.removeTextElement:\n parentNode.childNodes.splice(nodeIndex, 1)\n if (parentNode.nodeName === 'TEXTAREA') {\n delete parentNode.value\n }\n if (parentNode.subsets) {\n parentNode.subsets.forEach(map => {\n if (map.oldValue > nodeIndex) {\n map.oldValue -= 1\n } else if (map.oldValue === nodeIndex) {\n map.delete = true\n } else if (map.oldValue < nodeIndex && (map.oldValue + map.length) > nodeIndex) {\n if (map.oldValue + map.length - 1 === nodeIndex) {\n map.length--\n } else {\n newSubsets.push({\n newValue: map.newValue + nodeIndex - map.oldValue,\n oldValue: nodeIndex,\n length: map.length - nodeIndex + map.oldValue - 1\n })\n map.length = nodeIndex - map.oldValue\n }\n }\n })\n }\n node = parentNode\n break\n case options._const.addTextElement:\n route = diff[options._const.route].slice()\n c = route.splice(route.length - 1, 1)[0]\n newNode = {}\n newNode.nodeName = '#text'\n newNode.data = diff[options._const.value]\n node = getFromVirtualRoute(tree, route).node\n if (!node.childNodes) {\n node.childNodes = []\n }\n\n if (c >= node.childNodes.length) {\n node.childNodes.push(newNode)\n } else {\n node.childNodes.splice(c, 0, newNode)\n }\n if (node.nodeName === 'TEXTAREA') {\n node.value = diff[options._const.newValue]\n }\n if (node.subsets) {\n node.subsets.forEach(map => {\n if (map.oldValue >= c) {\n map.oldValue += 1\n }\n if (map.oldValue < c && (map.oldValue + map.length) > c) {\n const splitLength = map.oldValue + map.length - c\n newSubsets.push({\n newValue: map.newValue + map.length - splitLength,\n oldValue: c + 1,\n length: splitLength\n })\n map.length -= splitLength\n }\n })\n }\n break\n default:\n console.log('unknown action')\n }\n\n if (node.subsets) {\n node.subsets = node.subsets.filter(map => !map.delete && map.oldValue !== map.newValue)\n if (newSubsets.length) {\n node.subsets = node.subsets.concat(newSubsets)\n }\n }\n\n // capture newNode for the callback\n info.newNode = newNode\n options.postVirtualDiffApply(info)\n\n return\n}\n\nexport function applyVirtual(tree, diffs, options) {\n diffs.forEach(diff => {\n applyVirtualDiff(tree, diff, options)\n })\n return true\n}\n","import {Diff, DiffTracker, cloneObj, getGapInformation, isEqual, markSubTrees, removeDone, roughlyEqual} from \"./helpers\"\nimport {applyVirtual} from \"./apply\"\nimport {nodeToObj} from \"./fromDOM\"\nimport {stringToObj} from \"./fromString\"\n\n// ===== Create a diff =====\n\nexport class DiffFinder {\n constructor(t1Node, t2Node, options) {\n this.options = options\n this.t1 = (t1Node instanceof HTMLElement) ? nodeToObj(t1Node, this.options) : (typeof t1Node === 'string') ? stringToObj(t1Node, this.options) : JSON.parse(JSON.stringify(t1Node))\n this.t2 = (t2Node instanceof HTMLElement) ? nodeToObj(t2Node, this.options) : (typeof t2Node === 'string') ? stringToObj(t2Node, this.options) : JSON.parse(JSON.stringify(t2Node))\n this.diffcount = 0\n this.foundAll = false\n if (this.debug) {\n this.t1Orig = nodeToObj(t1Node, this.options)\n this.t2Orig = nodeToObj(t2Node, this.options)\n }\n\n this.tracker = new DiffTracker()\n }\n\n init() {\n return this.findDiffs(this.t1, this.t2)\n }\n\n findDiffs(t1, t2) {\n let diffs\n do {\n if (this.options.debug) {\n this.diffcount += 1\n if (this.diffcount > this.options.diffcap) {\n window.diffError = [this.t1Orig, this.t2Orig]\n throw new Error(`surpassed diffcap:${JSON.stringify(this.t1Orig)} -> ${JSON.stringify(this.t2Orig)}`)\n }\n }\n diffs = this.findNextDiff(t1, t2, [])\n\n if (diffs.length === 0) {\n // Last check if the elements really are the same now.\n // If not, remove all info about being done and start over.\n // Sometimes a node can be marked as done, but the creation of subsequent diffs means that it has to be changed again.\n if (!isEqual(t1, t2)) {\n if (this.foundAll) {\n console.error('Could not find remaining diffs!')\n } else {\n this.foundAll = true\n removeDone(t1)\n diffs = this.findNextDiff(t1, t2, [])\n }\n }\n }\n if (diffs.length > 0) {\n this.foundAll = false\n this.tracker.add(diffs)\n applyVirtual(t1, diffs, this.options)\n }\n } while (diffs.length > 0)\n\n return this.tracker.list\n }\n\n findNextDiff(t1, t2, route) {\n let diffs\n let fdiffs\n\n if (this.options.maxDepth && route.length > this.options.maxDepth) {\n return []\n }\n // outer differences?\n if (!t1.outerDone) {\n diffs = this.findOuterDiff(t1, t2, route)\n if (this.options.filterOuterDiff) {\n fdiffs = this.options.filterOuterDiff(t1, t2, diffs)\n if (fdiffs) diffs = fdiffs\n }\n if (diffs.length > 0) {\n t1.outerDone = true\n return diffs\n } else {\n t1.outerDone = true\n }\n }\n // inner differences?\n if (!t1.innerDone) {\n diffs = this.findInnerDiff(t1, t2, route)\n if (diffs.length > 0) {\n return diffs\n } else {\n t1.innerDone = true\n }\n }\n\n if (this.options.valueDiffing && !t1.valueDone) {\n // value differences?\n diffs = this.findValueDiff(t1, t2, route)\n\n if (diffs.length > 0) {\n t1.valueDone = true\n return diffs\n } else {\n t1.valueDone = true\n }\n }\n\n // no differences\n return []\n }\n\n findOuterDiff(t1, t2, route) {\n const diffs = []\n let attr\n let attr1\n let attr2\n let attrLength\n let pos\n let i\n if (t1.nodeName !== t2.nodeName) {\n if (!route.length) {\n throw new Error('Top level nodes have to be of the same kind.')\n }\n return [new Diff()\n .setValue(this.options._const.action, this.options._const.replaceElement)\n .setValue(this.options._const.oldValue, cloneObj(t1))\n .setValue(this.options._const.newValue, cloneObj(t2))\n .setValue(this.options._const.route, route)\n ]\n }\n if (route.length && this.options.maxNodeDiffCount < Math.abs((t1.childNodes || []).length - (t2.childNodes || []).length)) {\n return [new Diff()\n .setValue(this.options._const.action, this.options._const.replaceElement)\n .setValue(this.options._const.oldValue, cloneObj(t1))\n .setValue(this.options._const.newValue, cloneObj(t2))\n .setValue(this.options._const.route, route)\n ]\n }\n\n if (t1.data !== t2.data) {\n // Comment or text node.\n if (t1.nodeName === '#text') {\n return [new Diff()\n .setValue(this.options._const.action, this.options._const.modifyTextElement)\n .setValue(this.options._const.route, route)\n .setValue(this.options._const.oldValue, t1.data)\n .setValue(this.options._const.newValue, t2.data)\n ]\n } else {\n return [new Diff()\n .setValue(this.options._const.action, this.options._const.modifyComment)\n .setValue(this.options._const.route, route)\n .setValue(this.options._const.oldValue, t1.data)\n .setValue(this.options._const.newValue, t2.data)\n ]\n }\n\n }\n\n attr1 = t1.attributes ? Object.keys(t1.attributes).sort() : []\n attr2 = t2.attributes ? Object.keys(t2.attributes).sort() : []\n\n attrLength = attr1.length\n for (i = 0; i < attrLength; i++) {\n attr = attr1[i]\n pos = attr2.indexOf(attr)\n if (pos === -1) {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.removeAttribute)\n .setValue(this.options._const.route, route)\n .setValue(this.options._const.name, attr)\n .setValue(this.options._const.value, t1.attributes[attr])\n )\n } else {\n attr2.splice(pos, 1)\n if (t1.attributes[attr] !== t2.attributes[attr]) {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.modifyAttribute)\n .setValue(this.options._const.route, route)\n .setValue(this.options._const.name, attr)\n .setValue(this.options._const.oldValue, t1.attributes[attr])\n .setValue(this.options._const.newValue, t2.attributes[attr])\n )\n }\n }\n }\n\n attrLength = attr2.length\n for (i = 0; i < attrLength; i++) {\n attr = attr2[i]\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.addAttribute)\n .setValue(this.options._const.route, route)\n .setValue(this.options._const.name, attr)\n .setValue(this.options._const.value, t2.attributes[attr])\n )\n }\n\n return diffs\n }\n\n findInnerDiff(t1, t2, route) {\n const t1ChildNodes = t1.childNodes ? t1.childNodes.slice() : []\n const t2ChildNodes = t2.childNodes ? t2.childNodes.slice() : []\n const last = Math.max(t1ChildNodes.length, t2ChildNodes.length)\n let childNodesLengthDifference = Math.abs(t1ChildNodes.length - t2ChildNodes.length)\n let diffs = []\n let index = 0\n if (!this.options.maxChildCount || last < this.options.maxChildCount) {\n const subtrees = t1.subsets && t1.subsetsAge-- ? t1.subsets : (t1.childNodes && t2.childNodes) ? markSubTrees(t1, t2) : []\n\n if (subtrees.length > 0) {\n /* One or more groups have been identified among the childnodes of t1\n * and t2.\n */\n diffs = this.attemptGroupRelocation(t1, t2, subtrees, route)\n if (diffs.length > 0) {\n return diffs\n }\n }\n }\n\n\n /* 0 or 1 groups of similar child nodes have been found\n * for t1 and t2. 1 If there is 1, it could be a sign that the\n * contents are the same. When the number of groups is below 2,\n * t1 and t2 are made to have the same length and each of the\n * pairs of child nodes are diffed.\n */\n\n for (let i = 0; i < last; i += 1) {\n const e1 = t1ChildNodes[i]\n const e2 = t2ChildNodes[i]\n\n if (childNodesLengthDifference) {\n /* t1 and t2 have different amounts of childNodes. Add\n * and remove as necessary to obtain the same length */\n if (e1 && !e2) {\n if (e1.nodeName === '#text') {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.removeTextElement)\n .setValue(this.options._const.route, route.concat(index))\n .setValue(this.options._const.value, e1.data)\n )\n index -= 1\n } else {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.removeElement)\n .setValue(this.options._const.route, route.concat(index))\n .setValue(this.options._const.element, cloneObj(e1))\n )\n index -= 1\n }\n\n } else if (e2 && !e1) {\n if (e2.nodeName === '#text') {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.addTextElement)\n .setValue(this.options._const.route, route.concat(index))\n .setValue(this.options._const.value, e2.data)\n )\n } else {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.addElement)\n .setValue(this.options._const.route, route.concat(index))\n .setValue(this.options._const.element, cloneObj(e2))\n )\n }\n }\n }\n /* We are now guaranteed that childNodes e1 and e2 exist,\n * and that they can be diffed.\n */\n /* Diffs in child nodes should not affect the parent node,\n * so we let these diffs be submitted together with other\n * diffs.\n */\n\n if (e1 && e2) {\n if (!this.options.maxChildCount || last < this.options.maxChildCount) {\n diffs = diffs.concat(this.findNextDiff(e1, e2, route.concat(index)))\n } else if (!isEqual(e1, e2)) {\n if (t1ChildNodes.length > t2ChildNodes.length) {\n diffs = diffs.concat([\n new Diff()\n .setValue(this.options._const.action, this.options._const.removeElement)\n .setValue(this.options._const.element, cloneObj(e1))\n .setValue(this.options._const.route, route.concat(index))\n ])\n t1ChildNodes.splice(i, 1)\n index -= 1\n childNodesLengthDifference -= 1\n } else if (t1ChildNodes.length < t2ChildNodes.length) {\n diffs = diffs.concat([\n new Diff()\n .setValue(this.options._const.action, this.options._const.addElement)\n .setValue(this.options._const.element, cloneObj(e2))\n .setValue(this.options._const.route, route.concat(index))\n ])\n t1ChildNodes.splice(i, 0, {})\n childNodesLengthDifference -= 1\n } else {\n diffs = diffs.concat([\n new Diff()\n .setValue(this.options._const.action, this.options._const.replaceElement)\n .setValue(this.options._const.oldValue, cloneObj(e1))\n .setValue(this.options._const.newValue, cloneObj(e2))\n .setValue(this.options._const.route, route.concat(index))\n ])\n }\n\n }\n\n }\n index += 1\n\n }\n t1.innerDone = true\n return diffs\n }\n\n attemptGroupRelocation(t1, t2, subtrees, route) {\n /* Either t1.childNodes and t2.childNodes have the same length, or\n * there are at least two groups of similar elements can be found.\n * attempts are made at equalizing t1 with t2. First all initial\n * elements with no group affiliation (gaps=true) are removed (if\n * only in t1) or added (if only in t2). Then the creation of a group\n * relocation diff is attempted.\n */\n const gapInformation = getGapInformation(t1, t2, subtrees)\n const gaps1 = gapInformation.gaps1\n const gaps2 = gapInformation.gaps2\n let shortest = Math.min(gaps1.length, gaps2.length)\n let destinationDifferent\n let toGroup\n let group\n let node\n let similarNode\n let testI\n const diffs = []\n\n\n for (let index2 = 0, index1 = 0; index2 < shortest; index1 += 1, index2 += 1) {\n if (gaps1[index2] === true) {\n node = t1.childNodes[index1]\n if (node.nodeName === '#text') {\n if (t2.childNodes[index2].nodeName === '#text') {\n if (node.data !== t2.childNodes[index2].data) {\n testI = index1\n while (t1.childNodes.length > testI + 1 && t1.childNodes[testI + 1].nodeName === '#text') {\n testI += 1\n if (t2.childNodes[index2].data === t1.childNodes[testI].data) {\n similarNode = true\n break\n }\n }\n if (!similarNode) {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.modifyTextElement)\n .setValue(this.options._const.route, route.concat(index2))\n .setValue(this.options._const.oldValue, node.data)\n .setValue(this.options._const.newValue, t2.childNodes[index2].data)\n )\n return diffs\n }\n }\n } else {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.removeTextElement)\n .setValue(this.options._const.route, route.concat(index2))\n .setValue(this.options._const.value, node.data)\n )\n gaps1.splice(index2, 1)\n shortest = Math.min(gaps1.length, gaps2.length)\n index2 -= 1\n }\n } else {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.removeElement)\n .setValue(this.options._const.route, route.concat(index2))\n .setValue(this.options._const.element, cloneObj(node))\n )\n gaps1.splice(index2, 1)\n shortest = Math.min(gaps1.length, gaps2.length)\n index2 -= 1\n }\n\n } else if (gaps2[index2] === true) {\n node = t2.childNodes[index2]\n if (node.nodeName === '#text') {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.addTextElement)\n .setValue(this.options._const.route, route.concat(index2))\n .setValue(this.options._const.value, node.data)\n )\n gaps1.splice(index2, 0, true)\n shortest = Math.min(gaps1.length, gaps2.length)\n index1 -= 1\n } else {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.addElement)\n .setValue(this.options._const.route, route.concat(index2))\n .setValue(this.options._const.element, cloneObj(node))\n )\n gaps1.splice(index2, 0, true)\n shortest = Math.min(gaps1.length, gaps2.length)\n index1 -= 1\n }\n\n } else if (gaps1[index2] !== gaps2[index2]) {\n if (diffs.length > 0) {\n return diffs\n }\n // group relocation\n group = subtrees[gaps1[index2]]\n toGroup = Math.min(group.newValue, (t1.childNodes.length - group.length))\n if (toGroup !== group.oldValue) {\n // Check whether destination nodes are different than originating ones.\n destinationDifferent = false\n for (let j = 0; j < group.length; j += 1) {\n if (!roughlyEqual(t1.childNodes[toGroup + j], t1.childNodes[group.oldValue + j], [], false, true)) {\n destinationDifferent = true\n }\n }\n if (destinationDifferent) {\n return [new Diff()\n .setValue(this.options._const.action, this.options._const.relocateGroup)\n .setValue('groupLength', group.length)\n .setValue(this.options._const.from, group.oldValue)\n .setValue(this.options._const.to, toGroup)\n .setValue(this.options._const.route, route)\n ]\n }\n }\n }\n }\n return diffs\n }\n\n findValueDiff(t1, t2, route) {\n // Differences of value. Only useful if the value/selection/checked value\n // differs from what is represented in the DOM. For example in the case\n // of filled out forms, etc.\n const diffs = []\n\n if (t1.selected !== t2.selected) {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.modifySelected)\n .setValue(this.options._const.oldValue, t1.selected)\n .setValue(this.options._const.newValue, t2.selected)\n .setValue(this.options._const.route, route)\n )\n }\n\n if ((t1.value || t2.value) && t1.value !== t2.value && t1.nodeName !== 'OPTION') {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.modifyValue)\n .setValue(this.options._const.oldValue, t1.value || \"\")\n .setValue(this.options._const.newValue, t2.value || \"\")\n .setValue(this.options._const.route, route)\n )\n }\n if (t1.checked !== t2.checked) {\n diffs.push(new Diff()\n .setValue(this.options._const.action, this.options._const.modifyChecked)\n .setValue(this.options._const.oldValue, t1.checked)\n .setValue(this.options._const.newValue, t2.checked)\n .setValue(this.options._const.route, route)\n )\n }\n\n return diffs\n }\n\n}\n","export function nodeToObj(aNode, options = {}) {\n const objNode = {}\n objNode.nodeName = aNode.nodeName\n if (objNode.nodeName === '#text' || objNode.nodeName === '#comment') {\n objNode.data = aNode.data\n } else {\n if (aNode.attributes && aNode.attributes.length > 0) {\n objNode.attributes = {}\n const nodeArray = Array.prototype.slice.call(aNode.attributes)\n nodeArray.forEach(attribute => objNode.attributes[attribute.name] = attribute.value)\n }\n if (objNode.nodeName === 'TEXTAREA') {\n objNode.value = aNode.value\n } else if (aNode.childNodes && aNode.childNodes.length > 0) {\n objNode.childNodes = []\n const nodeArray = Array.prototype.slice.call(aNode.childNodes)\n nodeArray.forEach(childNode => objNode.childNodes.push(nodeToObj(childNode, options)))\n }\n if (options.valueDiffing) {\n if (aNode.checked !== undefined && aNode.type && ['radio', 'checkbox'].includes(aNode.type.toLowerCase())) {\n objNode.checked = aNode.checked\n } else if (aNode.value !== undefined) {\n objNode.value = aNode.value\n }\n if (aNode.selected !== undefined) {\n objNode.selected = aNode.selected\n }\n }\n }\n return objNode\n}\n","// from html-parse-stringify (MIT)\n\nconst tagRE = /<(?:\"[^\"]*\"['\"]*|'[^']*'['\"]*|[^'\">])+>/g\n// re-used obj for quick lookups of components\nconst empty = Object.create ? Object.create(null) : {}\nconst attrRE = /\\s([^'\"/\\s><]+?)[\\s/>]|([^\\s=]+)=\\s?(\".*?\"|'.*?')/g\n\n\nfunction unescape(string) {\n return string.replace(/</g, '<').replace(/>/g, '>')\n.replace(/&/g, '&')\n}\n\n// create optimized lookup object for\n// void elements as listed here:\n// http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements\nconst lookup = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n keygen: true,\n link: true,\n menuItem: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true\n}\n\n\nfunction parseTag(tag) {\n const res = {\n nodeName: '',\n attributes: {}\n }\n\n let tagMatch = tag.match(/<\\/?([^\\s]+?)[/\\s>]/)\n if (tagMatch) {\n res.nodeName = tagMatch[1].toUpperCase()\n if (lookup[tagMatch[1].toLowerCase()] || tag.charAt(tag.length - 2) === '/') {\n res.voidElement = true\n }\n\n // handle comment tag\n if (res.nodeName.startsWith('!--')) {\n const endIndex = tag.indexOf('-->')\n return {\n type: 'comment',\n data: endIndex !== -1 ? tag.slice(4, endIndex) : ''\n }\n }\n }\n\n let reg = new RegExp(attrRE)\n let result = null\n let done = false\n while (!done) {\n result = reg.exec(tag)\n\n if (result === null) {\n done = true\n } else if (result[0].trim()) {\n if (result[1]) {\n let attr = result[1].trim()\n let arr = [attr, \"\"]\n\n if (attr.indexOf(\"=\") > -1) arr = attr.split(\"=\")\n\n res.attributes[arr[0]] = arr[1]\n reg.lastIndex--\n } else if (result[2]) res.attributes[result[2]] = result[3].trim().substring(1, result[3].length - 1)\n }\n }\n\n return res\n}\n\nfunction parse(\n html,\n options = {components: empty}\n) {\n const result = []\n let current\n let level = -1\n const arr = []\n let inComponent = false\n\n html.replace(tagRE, (tag, index) => {\n if (inComponent) {\n if (tag !== (``)) {\n return\n } else {\n inComponent = false\n }\n }\n const isOpen = tag.charAt(1) !== '/'\n const isComment = tag.startsWith('