"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class e{constructor(){this.map=[]}add(h,t,i){m(this,h,t,i)}consume(h){if(this.map.sort(function(l,n){return l[0]-n[0]}),this.map.length===0)return;let t=this.map.length;const i=[];for(;t>0;)t-=1,i.push(h.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),h.length=this.map[t][0];i.push(h.slice()),h.length=0;let s=i.pop();for(;s;){for(const l of s)h.push(l);s=i.pop()}this.map.length=0}}function m(p,h,t,i){let s=0;if(!(t===0&&i.length===0)){for(;s<p.map.length;){if(p.map[s][0]===h){p.map[s][1]+=t,p.map[s][2].push(...i);return}s+=1}p.map.push([h,t,i])}}exports.EditMap=e;
//# sourceMappingURL=edit-map.cjs.js.map
