PageSourceSearch

https://www.flikflak.com/on/demandware.static/Sites-swarp-AM-Site/…/dynamic-render.d7198d.bundle.js

js flikflak.com collected 2026-09-24 20:06:57 UTC 25,847 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkapp_custom_swatch=globalThis.webpackChunkapp_custom_swatch||[]).push([[771],{82759:function(e,t,o){function n(e,t,o){let s;return"#text"===e.nodeName?s=o.document.createTextNode(e.data):"#comment"===e.nodeName?s=o.document.createComment(e.data):(t?s=o.document.createElementNS("http://www.w3.org/2000/svg",e.nodeName):"svg"===e.nodeName.toLowerCase()?(s=o.document.createElementNS("http://www.w3.org/2000/svg","svg"),t=!0):s=o.document.createElement(e.nodeName),e.attributes&&Object.entries(e.attributes).forEach((([e,t])=>s.setAttribute(e,t))),e.childNodes&&e.childNodes.forEach((e=>s.appendChild(n(e,t,o)))),o.valueDiffing&&(e.value&&(s.value=e.value),e.checked&&(s.checked=e.checked),e.selected&&(s.selected=e.selected))),s}function s(e,t){for(t=t.slice();t.length>0;){if(!e.childNodes)return!1;const o=t.splice(0,1)[0];e=e.childNodes[o]}return e}function i(e,t,o){let i,l,a,c,u,r=s(e,t[o._const.route]);const d={diff:t,node:r};if(o.preDiffApply(d))return!0;switch(t[o._const.action]){case o._const.addAttribute:if(!r||!r.setAttribute)return!1;r.setAttribute(t[o._const.name],t[o._const.value]);break;case o._const.modifyAttribute:if(!r||!r.setAttribute)return!1;r.setAttribute(t[o._const.name],t[o._const.newValue]),"INPUT"===r.nodeName&&"value"===t[o._const.name]&&(r.value=t[o._const.newValue]);break;case o._const.removeAttribute:if(!r||!r.removeAttribute)return!1;r.removeAttribute(t[o._const.name]);break;case o._const.modifyTextElement:if(!r||3!==r.nodeType)return!1;o.textDiff(r,r.data,t[o._const.oldValue],t[o._const.newValue]);break;case o._const.modifyValue:if(!r||void 0===r.value)return!1;r.value=t[o._const.newValue];break;case o._const.modifyComment:if(!r||void 0===r.data)return!1;o.textDiff(r,r.data,t[o._const.oldValue],t[o._const.newValue]);break;case o._const.modifyChecked:if(!r||void 0===r.checked)return!1;r.checked=t[o._const.newValue];break;case o._const.modifySelected:if(!r||void 0===r.selected)return!1;r.selected=t[o._const.newValue];break;case o._const.replaceElement:r.parentNode.replaceChild(n(t[o._const.newValue],"svg"===t[o._const.newValue].nodeName.toLowerCase(),o),r);break;case o._const.relocateGroup:c=Array(...new Array(t.groupLength)).map((()=>r.removeChild(r.childNodes[t[o._const.from]]))),c.forEach(((e,n)=>{0===n&&(l=r.childNodes[t[o._const.to]]),r.insertBefore(e,l||null)}));break;case o._const.removeElement:r.parentNode.removeChild(r);break;case o._const.addElement:a=t[o._const.route].slice(),u=a.splice(a.length-1,1)[0],r=s(e,a),r.insertBefore(n(t[o._const.element],"http://www.w3.org/2000/svg"===r.namespaceURI,o),r.childNodes[u]||null);break;case o._const.removeTextElement:if(!r||3!==r.nodeType)return!1;r.parentNode.removeChild(r);break;case o._const.addTextElement:if(a=t[o._const.route].slice(),u=a.splice(a.length-1,1)[0],i=o.document.createTextNode(t[o._const.value]),r=s(e,a),!r||!r.childNodes)return!1;r.insertBefore(i,r.childNodes[u]||null);break;default:console.log("unknown action")}return d.newNode=i,o.postDiffApply(d),!0}function l(e,t,o){const n=e[t];e[t]=e[o],e[o]=n}o.r(t),o.d(t,{DiffDOM:function(){return C},TraceLogger:function(){return S},nodeToObj:function(){return b},stringToObj:function(){return D}});class a{constructor(e={}){Object.entries(e).forEach((([e,t])=>this[e]=t))}toString(){return JSON.stringify(this)}setValue(e,t){return this[e]=t,this}}function c(e){const t=[];return t.push(e.nodeName),"#text"!==e.nodeName&&"#comment"!==e.nodeName&&e.attributes&&(e.attributes.class&&t.push(`${e.nodeName}.${e.attributes.class.replace(/ /g,".")}`),e.attributes.id&&t.push(`${e.nodeName}#${e.attributes.id}`)),t}function u(e){const t={},o={};return e.forEach((e=>{c(e).forEach((e=>{const n=e in t;n||e in o?n&&(delete t[e],o[e]=!0):t[e]=!0}))})),t}function r(e,t){const o=u(e),n=u(t),s={};return Object.keys(o).forEach((e=>{n[e]&&(s[e]=!0)})),s}function d(e){return delete e.outerDone,delete e.innerDone,delete e.valueDone,!e.childNodes||e.childNodes.every(d)}function h(e,t){if(!["nodeName","value","checked","selected","data"].every((o=>e[o]===t[o])))return!1;if(Boolean(e.attributes)!==Boolean(t.attributes))return!1;if(Boolean(e.childNodes)!==Boolean(t.childNodes))return!1;if(e.attributes){const o=Object.keys(e.attributes),n=Object.keys(t.attributes);if(o.length!==n.length)return!1;if(!o.every((o=>e.attributes[o]===t.attributes[o])))return!1}if(e.childNodes){if(e.childNodes.length!==t.childNodes.length)return!1;if(!e.childNodes.every(((e,o)=>h(e,t.childNodes[o]))))return!1}return!0}function p(e,t,o,n,s){if(!e||!t)return!1;if(e.nodeName!==t.nodeName)return!1;if("#text"===e.nodeName)return!!s||e.data===t.data;if(e.nodeName in o)return!0;
1if(e.attributes&&t.attributes){if(e.attributes.id){if(e.attributes.id!==t.attributes.id)return!1;if(`${e.nodeName}#${e.attributes.id}`in o)return!0}if(e.attributes.class&&e.attributes.class===t.attributes.class&&`${e.nodeName}.${e.attributes.class.replace(/ /g,".")}`in o)return!0}if(n)return!0;const i=e.childNodes?e.childNodes.slice().reverse():[],l=t.childNodes?t.childNodes.slice().reverse():[];if(i.length!==l.length)return!1;if(s)return i.every(((e,t)=>e.nodeName===l[t].nodeName));{const e=r(i,l);return i.every(((t,o)=>p(t,l[o],e,!0,!0)))}}function f(e){return JSON.parse(JSON.stringify(e))}function m(e,t,o,n){let s=0,i=[];const l=e.length,a=t.length,u=Array(...new Array(l+1)).map((()=>[])),d=r(e,t);let h=l===a;h&&e.some(((e,o)=>{const n=c(e),s=c(t[o]);return n.length!==s.length?(h=!1,!0):(n.some(((e,t)=>{if(e!==s[t])return h=!1,!0})),!h||void 0)}));for(let c=0;c<l;c++){const l=e[c];for(let e=0;e<a;e++){const a=t[e];o[c]||n[e]||!p(l,a,d,h)?u[c+1][e+1]=0:(u[c+1][e+1]=u[c][e]?u[c][e]+1:1,u[c+1][e+1]>=s&&(s=u[c+1][e+1],i=[c+1,e+1]))}}return 0!==s&&{oldValue:i[0]-s,newValue:i[1]-s,length:s}}function _(e,t){return Array(...new Array(e)).map((()=>t))}class V{constructor(){this.list=[]}add(e){this.list.push(...e)}forEach(e){this.list.forEach((t=>e(t)))}}function g(e,t){let o,n,s=e;for(t=t.slice();t.length>0;){if(!s.childNodes)return!1;n=t.splice(0,1)[0],o=s,s=s.childNodes[n]}return{node:s,parentNode:o,nodeIndex:n}}function N(e,t,o){return t.forEach((t=>{!function(e,t,o){const n=g(e,t[o._const.route]);let s=n.node;const i=n.parentNode,l=n.nodeIndex,a=[],c={diff:t,node:s};if(o.preVirtualDiffApply(c))return!0;let u,r,d,h;switch(t[o._const.action]){case o._const.addAttribute:s.attributes||(s.attributes={}),s.attributes[t[o._const.name]]=t[o._const.value],"checked"===t[o._const.name]?s.checked=!0:"selected"===t[o._const.name]?s.selected=!0:"INPUT"===s.nodeName&&"value"===t[o._const.name]&&(s.value=t[o._const.value]);break;case o._const.modifyAttribute:s.attributes[t[o._const.name]]=t[o._const.newValue];break;case o._const.removeAttribute:delete s.attributes[t[o._const.name]],0===Object.keys(s.attributes).length&&delete s.attributes,"checked"===t[o._const.name]?s.checked=!1:"selected"===t[o._const.name]?delete s.selected:"INPUT"===s.nodeName&&"value"===t[o._const.name]&&delete s.value;break;case o._const.modifyTextElement:s.data=t[o._const.newValue];break;case o._const.modifyValue:s.value=t[o._const.newValue];break;case o._const.modifyComment:s.data=t[o._const.newValue];break;case o._const.modifyChecked:s.checked=t[o._const.newValue];break;case o._const.modifySelected:s.selected=t[o._const.newValue];break;case o._const.replaceElement:u=f(t[o._const.newValue]),u.outerDone=!0,u.innerDone=!0,u.valueDone=!0,i.childNodes[l]=u;break;case o._const.relocateGroup:r=s.childNodes.splice(t[o._const.from],t.groupLength).reverse(),r.forEach((e=>s.childNodes.splice(t[o._const.to],0,e))),s.subsets&&s.subsets.forEach((e=>{if(t[o._const.from]<t[o._const.to]&&e.oldValue<=t[o._const.to]&&e.oldValue>t[o._const.from]){e.oldValue-=t.groupLength;const n=e.oldValue+e.length-t[o._const.to];n>0&&(a.push({oldValue:t[o._const.to]+t.groupLength,newValue:e.newValue+e.length-n,length:n}),e.length-=n)}else if(t[o._const.from]>t[o._const.to]&&e.oldValue>t[o._const.to]&&e.oldValue<t[o._const.from]){e.oldValue+=t.groupLength;const n=e.oldValue+e.length-t[o._const.to];n>0&&(a.push({oldValue:t[o._const.to]+t.groupLength,newValue:e.newValue+e.length-n,length:n}),e.length-=n)}else e.oldValue===t[o._const.from]&&(e.oldValue=t[o._const.to])}));break;case o._const.removeElement:i.childNodes.splice(l,1),i.subsets&&i.subsets.forEach((e=>{e.oldValue>l?e.oldValue-=1:e.oldValue===l?e.delete=!0:e.oldValue<l&&e.oldValue+e.length>l&&(e.oldValue+e.length-1===l?e.length--:(a.push({newValue:e.newValue+l-e.oldValue,oldValue:l,length:e.length-l+e.oldValue-1}),e.length=l-e.oldValue))})),s=i;break;case o._const.addElement:d=t[o._const.route].slice(),h=d.splice(d.length-1,1)[0],s=g(e,d).node,u=f(t[o._const.element]),u.outerDone=!0,u.innerDone=!0,u.valueDone=!0,s.childNodes||(s.childNodes=[]),h>
1=s.childNodes.length?s.childNodes.push(u):s.childNodes.splice(h,0,u),s.subsets&&s.subsets.forEach((e=>{if(e.oldValue>=h)e.oldValue+=1;else if(e.oldValue<h&&e.oldValue+e.length>h){const t=e.oldValue+e.length-h;a.push({newValue:e.newValue+e.length-t,oldValue:h+1,length:t}),e.length-=t}}));break;case o._const.removeTextElement:i.childNodes.splice(l,1),"TEXTAREA"===i.nodeName&&delete i.value,i.subsets&&i.subsets.forEach((e=>{e.oldValue>l?e.oldValue-=1:e.oldValue===l?e.delete=!0:e.oldValue<l&&e.oldValue+e.length>l&&(e.oldValue+e.length-1===l?e.length--:(a.push({newValue:e.newValue+l-e.oldValue,oldValue:l,length:e.length-l+e.oldValue-1}),e.length=l-e.oldValue))})),s=i;break;case o._const.addTextElement:d=t[o._const.route].slice(),h=d.splice(d.length-1,1)[0],u={},u.nodeName="#text",u.data=t[o._const.value],s=g(e,d).node,s.childNodes||(s.childNodes=[]),h>=s.childNodes.length?s.childNodes.push(u):s.childNodes.splice(h,0,u),"TEXTAREA"===s.nodeName&&(s.value=t[o._const.newValue]),s.subsets&&s.subsets.forEach((e=>{if(e.oldValue>=h&&(e.oldValue+=1),e.oldValue<h&&e.oldValue+e.length>h){const t=e.oldValue+e.length-h;a.push({newValue:e.newValue+e.length-t,oldValue:h+1,length:t}),e.length-=t}}));break;default:console.log("unknown action")}s.subsets&&(s.subsets=s.subsets.filter((e=>!e.delete&&e.oldValue!==e.newValue)),a.length&&(s.subsets=s.subsets.concat(a))),c.newNode=u,o.postVirtualDiffApply(c)}(e,t,o)})),!0}function b(e,t={}){const o={};return o.nodeName=e.nodeName,"#text"===o.nodeName||"#comment"===o.nodeName?o.data=e.data:(e.attributes&&e.attributes.length>0&&(o.attributes={},Array.prototype.slice.call(e.attributes).forEach((e=>o.attributes[e.name]=e.value))),"TEXTAREA"===o.nodeName?o.value=e.value:e.childNodes&&e.childNodes.length>0&&(o.childNodes=[],Array.prototype.slice.call(e.childNodes).forEach((e=>o.childNodes.push(b(e,t))))),t.valueDiffing&&(void 0!==e.checked&&e.type&&["radio","checkbox"].includes(e.type.toLowerCase())?o.checked=e.checked:void 0!==e.value&&(o.value=e.value),void 0!==e.selected&&(o.selected=e.selected))),o}const w=/<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>/g,v=Object.create?Object.create(null):{},y=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function E(e){return e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}const k={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuItem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};function x(e){const t={nodeName:"",attributes:{}};let o=e.match(/<\/?([^\s]+?)[/\s>]/);if(o&&(t.nodeName=o[1].toUpperCase(),(k[o[1]]||"/"===e.charAt(e.length-2))&&(t.voidElement=!0),t.nodeName.startsWith("!--"))){const t=e.indexOf("--\x3e");return{type:"comment",data:-1!==t?e.slice(4,t):""}}let n=new RegExp(y),s=null,i=!1;for(;!i;)if(s=n.exec(e),null===s)i=!0;else if(s[0].trim())if(s[1]){let e=s[1].trim(),o=[e,""];e.indexOf("=")>-1&&(o=e.split("=")),t.attributes[o[0]]=o[1],n.lastIndex--}else s[2]&&(t.attributes[s[2]]=s[3].trim().substring(1,s[3].length-1));return t}function A(e){return delete e.voidElement,e.childNodes&&e.childNodes.forEach((e=>A(e))),e}function D(e){return A(function(e,t={components:v}){const o=[];let n,s=-1;const i=[];let l=!1;if(0!==e.indexOf("<")){const t=e.indexOf("<");o.push({nodeName:"#text",data:-1===t?e:e.substring(0,t)})}return e.replace(w,((a,c)=>{if(l){if(a!==`</${n.nodeName}>`)return;l=!1}const u="/"!==a.charAt(1),r=a.startsWith("\x3c!--"),d=c+a.length,h=e.charAt(d);let p;if(r){const e=x(a);return s<0?(o.push(e),o):(p=i[s],p&&(p.childNodes||(p.childNodes=[]),p.childNodes.push(e)),o)}if(u&&(n=x(a),s++,"tag"===n.type&&t.components[n.nodeName]&&(n.type="component",l=!0),n.voidElement||l||!h||"<"===h||(n.childNodes||(n.childNodes=[]),n.childNodes.push({nodeName:"#text",data:E(e.slice(d,e.indexOf("<",d)))})),0===s&&o.push(n),p=i[s-1],p&&(p.childNodes||(p.childNodes=[]),p.childNodes.push(n)),i[s]=n),(!u||n.voidElement)&&(s>-1&&(n.voidElement||n.nodeName===a.slice(2,-1).toUpperCase())&&(s--,n=-1===s?o:i[s]),!l&&"<"!==h&&h)){p=-1===s?o:i[s].childNodes||[];const t=e.indexOf("<",d);let n=E(e.slice(d,-1===t?void 0:t));p.push({nodeName:"#text",data:n})}})),o[0]}(e))}class T{constructor(e,t,o){this.options=o,this.t1="undefined"!=typeof HTMLElement&&e instanceof HTMLElement?b(e,this.options):"string"==typeof e?D(e,this.options):JSON.parse(JSON.stringify(e)),this.t2="undefined"!=typeof HTMLElement&&t instanceof HTMLElement?b(t,this.options):"string"==typeof t?D(t,this.options):JSON.parse(JSON.stringify(t)),this.diffcount=0,this.foundAll=!1,this.debug&&(this.t1Orig=b(e,this.options),this.t2Orig=b(t,this.options)),this.tracker=new V}init(){return this.findDiffs(this.t1,this.t2)}findDiffs(e,t){let o;do{if(this.options.debug&&(this.diffcount+=1,this.diffcount>this.options.diffcap))throw new Error(`surpassed diffcap:${JSON.stringify(this.t1Orig)} -> ${JSON.stringify(this.t2Orig)}`);o=this.findNextDiff(e,t,[]),0===o.length&&(h(e,t)||(this.foundAll?console.error("Could not find remaining diffs!"):(this.foundAll=!0,d(e),o=this.findNextDiff(e,t,[])))),o.length>0&&(this.foundAll=!1,this.tracker.add(o),N(e,o,this.options))}while(o.length>0);return this.tracker.list}findNextDiff(e,t,o){let n,s;if(this.options.maxDepth&&o.length>this.options.maxDepth)return[];if(!e.outerDone){if(n=this.findOuterDiff(e,t,o),this.options.filterOuterDiff&&(s=this.options.filterOuterDiff(e,t,n),s&&(n=s)),n.length>0)return e.outerDone=!0,n;e.outerDone=!0}if(!e.innerDone){if(n=this.findInnerDiff(e,t,o),n.length>0)return n;e.innerDone=!0}if(this.options.valueDiffing&&!e.valueDone){if(n=this.findValueDiff(e,t,o),n.length>0)return e.valueDone=!0,n;e.valueDone=!0}return[]}findOuterDiff(e,t,o){const n=[];let s,i,l,c,u,r;if(e.nodeName!==t.nodeName){if(!o.length)throw new Error("Top level nodes have to be of the same kind.");return[(new a).setValue(this.options._const.action,this.options._const.replaceElement).setValue(this.options._const.oldValue,f(e)).setValue(this.options._const.newValue,f(t)).setValue(this.options._const.route,o)]}if(o.length&&this.options.maxNodeDiffCount<Math.abs((e.childNodes||[]).length-(t.childNodes||[]).length))return[(new a).setValue(this.options._const.action,this.options._const.replaceElement).setValue(this.options._const.oldValue,f(e)).setValue(this.options._const.newValue,f(t)).setValue(this.options._const.route,o)];if(e.data!==t.data)return"#text"===e.nodeName?[(new a).setValue(this.options._const.action,this.options._const.modifyTextElement).setValue(this.options._const.route,o).setValue(this.options._const.oldValue,e.data).setValue(this.options._const.newValue,t.data)]:[(new a).setValue(this.options._const.action,this.options._const.modifyComment).setValue(this.options._const.route,o).setValue(this.options._const.oldValue,e.data).setValue(this.options._const.newValue,t.data)];for(i=e.attributes?Object.keys(e.attributes).sort():[],l=t.attributes?Object.keys(t.attributes).sort():[],c=i.length,r=0;r<c;r++)s=i[r],u=l.indexOf(s),-1===u?n.push((new a).setValue(this.options._const.action,this.options._const.removeAttribute).setValue(this.options._const.route,o).setValue(this.options._const.name,s).setValue(this.options._const.value,e.attributes[s])):(l.splice(u,1),e.attributes[s]!==t.attributes[s]&&n.push((new a).setValue(this.options._const.action,this.options._const.modifyAttribute).setValue(this.options._const.route,o).setValue(this.options._const.name,s).setValue(this.options._const.oldValue,e.attributes[s]).setValue(this.options._const.newValue,t.attributes[s])));for(c=l.length,r=0;r<c;r++)s=l[r],n.push((new a).setValue(this.options._const.action,this.options._const.addAttribute).setValue(this.options._const.route,o).setValue(this.options._const.name,s).setValue(this.options._const.value,t.attributes[s]));return n}findInnerDiff(e,t,o){const n=e.childNodes?e.childNodes.slice():[],s=t.childNodes?t.childNodes.slice():[],i=Math.max(n.length,s.length);let l=Math.abs(n.length-s.length),c=[],u=0;if(!this.options.maxChildCount||i<this.options.maxChildCount){const n=e.subsets&&e.subsetsAge--,s=n?e.subsets:e.childNodes&&t.childNodes?function(e,t){const o=e.childNodes?e.childNodes:[],n=t.childNodes?t.childNodes:[],s=_(o.length,!1),i=_(n.length,!1),l=[];let a=!0;const c=function(){return arguments[1]};for(;a;)a=m(o,n,s,i),a&&(l.push(a),Array(...new Array(a.length)).map(c).forEac
1h((e=>{return t=e,s[a.oldValue+t]=!0,void(i[a.newValue+t]=!0);var t})));return e.subsets=l,e.subsetsAge=100,l}(e,t):[];if(s.length>0&&(c=this.attemptGroupRelocation(e,t,s,o,n),c.length>0))return c}for(let e=0;e<i;e+=1){const t=n[e],r=s[e];l&&(t&&!r?"#text"===t.nodeName?(c.push((new a).setValue(this.options._const.action,this.options._const.removeTextElement).setValue(this.options._const.route,o.concat(u)).setValue(this.options._const.value,t.data)),u-=1):(c.push((new a).setValue(this.options._const.action,this.options._const.removeElement).setValue(this.options._const.route,o.concat(u)).setValue(this.options._const.element,f(t))),u-=1):r&&!t&&("#text"===r.nodeName?c.push((new a).setValue(this.options._const.action,this.options._const.addTextElement).setValue(this.options._const.route,o.concat(u)).setValue(this.options._const.value,r.data)):c.push((new a).setValue(this.options._const.action,this.options._const.addElement).setValue(this.options._const.route,o.concat(u)).setValue(this.options._const.element,f(r))))),t&&r&&(!this.options.maxChildCount||i<this.options.maxChildCount?c=c.concat(this.findNextDiff(t,r,o.concat(u))):h(t,r)||(n.length>s.length?("#text"===t.nodeName?c.push((new a).setValue(this.options._const.action,this.options._const.removeTextElement).setValue(this.options._const.route,o.concat(u)).setValue(this.options._const.value,t.data)):c.push((new a).setValue(this.options._const.action,this.options._const.removeElement).setValue(this.options._const.element,f(t)).setValue(this.options._const.route,o.concat(u))),n.splice(e,1),e-=1,u-=1,l-=1):n.length<s.length?(c=c.concat([(new a).setValue(this.options._const.action,this.options._const.addElement).setValue(this.options._const.element,f(r)).setValue(this.options._const.route,o.concat(u))]),n.splice(e,0,{}),l-=1):c=c.concat([(new a).setValue(this.options._const.action,this.options._const.replaceElement).setValue(this.options._const.oldValue,f(t)).setValue(this.options._const.newValue,f(r)).setValue(this.options._const.route,o.concat(u))]))),u+=1}return e.innerDone=!0,c}attemptGroupRelocation(e,t,o,n,s){const i=function(e,t,o){const n=e.childNodes?_(e.childNodes.length,!0):[],s=t.childNodes?_(t.childNodes.length,!0):[];let i=0;return o.forEach((e=>{const t=e.oldValue+e.length,o=e.newValue+e.length;for(let o=e.oldValue;o<t;o+=1)n[o]=i;for(let t=e.newValue;t<o;t+=1)s[t]=i;i+=1})),{gaps1:n,gaps2:s}}(e,t,o),l=i.gaps1,c=i.gaps2;let u,r,d,h,m,V,g=Math.min(l.length,c.length);const N=[];for(let i=0,_=0;i<g;_+=1,i+=1)if(!s||!0!==l[i]&&!0!==c[i])if(!0===l[i])if(h=e.childNodes[_],"#text"===h.nodeName)if("#text"===t.childNodes[i].nodeName){if(h.data!==t.childNodes[i].data){for(V=_;e.childNodes.length>V+1&&"#text"===e.childNodes[V+1].nodeName;)if(V+=1,t.childNodes[i].data===e.childNodes[V].data){m=!0;break}if(!m)return N.push((new a).setValue(this.options._const.action,this.options._const.modifyTextElement).setValue(this.options._const.route,n.concat(i)).setValue(this.options._const.oldValue,h.data).setValue(this.options._const.newValue,t.childNodes[i].data)),N}}else N.push((new a).setValue(this.options._const.action,this.options._const.removeTextElement).setValue(this.options._const.route,n.concat(i)).setValue(this.options._const.value,h.data)),l.splice(i,1),g=Math.min(l.length,c.length),i-=1;else N.push((new a).setValue(this.options._const.action,this.options._const.removeElement).setValue(this.options._const.route,n.concat(i)).setValue(this.options._const.element,f(h))),l.splice(i,1),g=Math.min(l.length,c.length),i-=1;else if(!0===c[i])h=t.childNodes[i],"#text"===h.nodeName?(N.push((new a).setValue(this.options._const.action,this.options._const.addTextElement).setValue(this.options._const.route,n.concat(i)).setValue(this.options._const.value,h.data)),l.splice(i,0,!0),g=Math.min(l.length,c.length),_-=1):(N.push((new a).setValue(this.options._const.action,this.options._const.addElement).setValue(this.options._const.route,n.concat(i)).setValue(this.options._const.element,f(h))),l.splice(i,0,!0),g=Math.min(l.length,c.length),_-=1);else if(l[i]!==c[i]){if(N.length>0)return N;if(d=o[l[i]],r=Math.min(d.newValue,e.childNodes.length-d.length),r!==d.oldValue){u=!1;for(let t=0;t<d.length;t+=1)p(e.childNodes[r+t],e.childNodes[d.oldValue+t],[],!1,!0)||(u=!0);if(u)return[(new a).setValue(this.options._const.action,this.options._const.relocateGroup).setValue("groupLength",d.length).setValue(this.options._const.from,d.oldValue).setValue(this.options._const.to,r).setValue(this.options._const.route,n)]}}return N}findValueDiff(e,t,o){const n=[];return e.selected!==t.selected&&n.push((new a).setValue(this.options._const.action,this.options._const.modifySelected).setValue(this.options._const.oldValue,e.selected).setValue(this.options._const.newValue,t.selected).setValue(this.options._const.route,o)),(e.value||t.value)&&e.value!==t.value&&"OPTION"!==e.nodeName&&n.push((new a).setValue(this.options._const.action,this.options._const.modifyValue).setValue(this.options._const.oldValue,e.value||"").setValue(this.options._const.newValue,t.value||"").setValue(this.options._const.route,o)),e.checked!==t.checked&&n.push((new a).setValue(this.options._const.action,this.options._const.modifyChecked).setValue(this.options._const.oldValue,e.checked).setValue(this.options._const.newValue,t.checked).setValue(this.options._const.route,o)),n}}const O={debug:!1,diffcap:10,maxDepth:!1,maxChildCount:50,valueDiffing:!0,textDiff(e,t,o,n){e.data=n},preVirtualDiffApply(){},postVirtualDiffApply(){},preDiffApply(){},postDiffApply(){},filterOuterDiff:null,compress:!1,_const:!1,document:!("undefined"==typeof window||!window.document)&&window.document};class C{constructor(e={}){if(this.options=e,Object.entries(O).forEach((([e,t])=>{Object.prototype.hasOwnProperty.call(this.options,e)||(this.options[e]=t)})),!this.options._const){const e=["addAttribute","modifyAttribute","removeAttribute","modifyTextElement","relocateGroup","removeElement","addElement","removeTextElement","addTextElement","replaceElement","modifyValue","modifyChecked","modifySelected","modifyComment","action","route","oldValue","newValue","element","group","from","to","
1name","value","data","attributes","nodeName","childNodes","checked","selected"];this.options._const={},this.options.compress?e.forEach(((e,t)=>this.options._const[e]=t)):e.forEach((e=>this.options._const[e]=e))}this.DiffFinder=T}apply(e,t){return function(e,t,o){return t.every((t=>i(e,t,o)))}(e,t,this.options)}undo(e,t){return function(e,t,o){t.length||(t=[t]),(t=t.slice()).reverse(),t.forEach((t=>{!function(e,t,o){switch(t[o._const.action]){case o._const.addAttribute:t[o._const.action]=o._const.removeAttribute,i(e,t,o);break;case o._const.modifyAttribute:l(t,o._const.oldValue,o._const.newValue),i(e,t,o);break;case o._const.removeAttribute:t[o._const.action]=o._const.addAttribute,i(e,t,o);break;case o._const.modifyTextElement:case o._const.modifyValue:case o._const.modifyComment:case o._const.modifyChecked:case o._const.modifySelected:case o._const.replaceElement:l(t,o._const.oldValue,o._const.newValue),i(e,t,o);break;case o._const.relocateGroup:l(t,o._const.from,o._const.to),i(e,t,o);break;case o._const.removeElement:t[o._const.action]=o._const.addElement,i(e,t,o);break;case o._const.addElement:t[o._const.action]=o._const.removeElement,i(e,t,o);break;case o._const.removeTextElement:t[o._const.action]=o._const.addTextElement,i(e,t,o);break;case o._const.addTextElement:t[o._const.action]=o._const.removeTextElement,i(e,t,o);break;default:console.log("unknown action")}}(e,t,o)}))}(e,t,this.options)}diff(e,t){return new this.DiffFinder(e,t,this.options).init()}}class S{constructor(e={}){this.pad="│   ",this.padding="",this.tick=1,this.messages=[];const t=(e,t)=>{const o=e[t];e[t]=(...n)=>{this.fin(t,Array.prototype.slice.call(n));const s=o.apply(e,n);return this.fout(t,s),s}};for(let o in e)"function"==typeof e[o]&&t(e,o);this.log("┌ TRACELOG START")}fin(e,t){this.padding+=this.pad,this.log(`├─> entering ${e}`,t)}fout(e,t){this.log("│<──┘ generated return value",t),this.padding=this.padding.substring(0,this.padding.length-this.pad.length)}format(e,t){return`${function(e){for(e=`${e}`;e.length<4;)e=`0${e}`;return e}(t)}> ${this.padding}${e}`}log(){let e=Array.prototype.slice.call(arguments);const t=function(e){return e?"string"==typeof e?e:e instanceof HTMLElement?e.outerHTML||"<empty>":e instanceof Array?`[${e.map(t).join(",")}]`:e.toString()||e.valueOf()||"<unknown>":"<falsey>"};e=e.map(t).join(", "),this.messages.push(this.format(e,this.tick++))}toString(){let e="└───";for(;e.length<=this.padding.length+this.pad.length;)e+="×   ";let t=this.padding;return this.padding="",e=this.format(e,this.tick),this.padding=t,`${this.messages.join("\n")}\n${e}`}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.