-1&&e%1==0&&e<=gt}function Ae(e){var r=typeof e;return!!e&&(r=="object"||r=="function")}function Vo(e){return!!e&&typeof e=="object"}function ir(e){return Yt(e)?io(e):go(e)}function Lo(){return[]}function _o(){return!1}re.exports=xo});var Po={};cn(Po,{defaults:()=>ge,stripHtml:()=>rn,version:()=>Uo});var ce=M(Ne(),1),cr=M(Fr(),1),en=M(Yr(),1),gr=M(tt(),1);var ai={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function We(e,r){if(!Array.isArray(e)||!e.length)return e;let t=A(A({},ai),r),a,l;if(t.strictlyTwoElementsInRangeArrays&&!e.every((u,p)=>!Array.isArray(u)||u.length!==2?(a=p,l=u.length,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${a}th range (${JSON.stringify(e[a],null,4)}) has not two but ${l} elements!`);if(!e.every((u,p)=>!Array.isArray(u)||!Number.isInteger(u[0])||u[0]<0||!Number.isInteger(u[1])||u[1]<0?(a=p,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${a}th range (${JSON.stringify(e[a],null,4)}) does not consist of only natural numbers!`);let o=e.length**2,g=0;return Array.from(e).sort((u,p)=>(t.progressFn&&(g+=1,t.progressFn(Math.floor(g*100/o))),u[0]===p[0]?u[1]p[1]?1:0:u[0]
Array.isArray(s)).map(s=>[...s]).filter(s=>s[2]!==void 0||s[0]!==s[1]),o,g,u;a.progressFn?o=We(l,{progressFn:s=>{u=Math.floor(s/5),u!==g&&(g=u,a.progressFn(u))}}):o=We(l);let p=o.length-1;for(let s=p;s>0;s--)a.progressFn&&(u=Math.floor((1-s/p)*78)+21,u!==g&&u>g&&(g=u,a.progressFn(u))),(o[s][0]<=o[s-1][0]||!a.joinRangesThatTouchEdges&&o[s][0]=o[s][0]||o[s-1][1]<=o[s][1])&&o[s-1][2]!==null&&(o[s][2]===null&&o[s-1][2]!==null?o[s-1][2]=null:o[s-1][2]!=null?+a.mergeType==2&&o[s-1][0]===o[s][0]?o[s-1][2]=o[s][2]:o[s-1][2]+=o[s][2]:o[s-1][2]=o[s][2]),o.splice(s,1),s=o.length);return o.length?o:null}var ii=!0,Je="Invariant failed";function it(e,r){if(!e){if(ii)throw new Error(Je);var t=typeof r=="function"?r():r,a=t?Je+": "+t:Je;throw new Error(a)}}function ot(e,r,t){let a=0,l=0;if(arguments.length===0)throw new Error("ranges-apply: [THROW_ID_01] inputs missing!");if(typeof e!="string")throw new TypeError(`ranges-apply: [THROW_ID_02] first input argument must be a string! Currently it's: ${typeof e}, equal to: ${JSON.stringify(e,null,4)}`);if(r&&!Array.isArray(r))throw new TypeError(`ranges-apply: [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ${typeof r}, equal to: ${JSON.stringify(r,null,4)}`);if(t&&typeof t!="function")throw new TypeError(`ranges-apply: [THROW_ID_04] the third input argument must be a function (or falsey)! Currently it's: ${typeof t}, equal to: ${JSON.stringify(t,null,4)}`);if(!r||!r.filter(n=>n).length)return e;let o;Array.isArray(r)&&Number.isInteger(r[0])&&Number.isInteger(r[1])?o=[Array.from(r)]:o=Array.from(r);let g=o.length,u=0;o.filter(n=>n).forEach((n,b)=>{if(t&&(a=Math.floor(u/g*10),a!==l&&(l=a,t(a))),!Array.isArray(n))throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${b}th element not an array: ${JSON.stringify(n,null,4)}, which is ${typeof n}`);if(!Number.isInteger(n[0])){if(!Number.isInteger(+n[0])||+n[0]<0)throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${b}th element, array ${JSON.stringify(n,null,0)}. Its first element is not an integer, string index, but ${typeof n[0]}, equal to: ${JSON.stringify(n[0],null,4)}.`);o[b][0]=+o[b][0]}if(!Number.isInteger(n[1])){if(!Number.isInteger(+n[1])||+n[1]<0)throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${b}th element, array ${JSON.stringify(n,null,0)}. Its second element is not an integer, string index, but ${typeof n[1]}, equal to: ${JSON.stringify(n[1],null,4)}.`);o[b][1]=+o[b][1]}u+=1});let p=at(o,{progressFn:n=>{t&&(a=10+Math.floor(n/10),a!==l&&(l=a,t(a)))}});it(p);let s=p.length;if(s>0){let n=e.slice(p[s-1][1]);e=p.reduce((b,v,h,c)=>{t&&(a=20+Math.floor(h/s*80),a!==l&&(l=a,t(a)));let S=h===0?0:c[h-1][1],D=c[h][0];return`${b}${e.slice(S,D)}${c[h][2]||""}`},""),e+=n}return e}function be(e,r=1){let t="\xA0";function a(o){return Array.from(o).reverse().join("")}function l(o,g,u){let p=u?`
13 | `:"\r",s=u?"\r":`
14 | `;if(!o)return o;let n=0,b=0,v="";for(let h=0,c=o.length;h=0&&(o=+r);let g="",u="";if(!e.trim())g=e;else if(!e[0].trim()){for(let p=0,s=e.length;p!Array.isArray(u)||u.length!==2?(a=p,l=u.length,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_03] The first argument should be an array and must consist of arrays which are natural number indexes representing TWO string index ranges. However, ${a}th range (${JSON.stringify(e[a],null,4)}) has not two but ${l} elements!`);if(!e.every((u,p)=>!Array.isArray(u)||!Number.isInteger(u[0])||u[0]<0||!Number.isInteger(u[1])||u[1]<0?(a=p,!1):!0))throw new TypeError(`ranges-sort: [THROW_ID_04] The first argument should be an array and must consist of arrays which are natural number indexes representing string index ranges. However, ${a}th range (${JSON.stringify(e[a],null,4)}) does not consist of only natural numbers!`);let o=e.length**2,g=0;return Array.from(e).sort((u,p)=>(t.progressFn&&(g+=1,t.progressFn(Math.floor(g*100/o))),u[0]===p[0]?u[1]p[1]?1:0:u[0]
Array.isArray(s)).map(s=>[...s]).filter(s=>s[2]!==void 0||s[0]!==s[1]),o,g,u;a.progressFn?o=st(l,{progressFn:s=>{u=Math.floor(s/5),u!==g&&(g=u,a.progressFn(u))}}):o=st(l);let p=o.length-1;for(let s=p;s>0;s--)a.progressFn&&(u=Math.floor((1-s/p)*78)+21,u!==g&&u>g&&(g=u,a.progressFn(u))),(o[s][0]<=o[s-1][0]||!a.joinRangesThatTouchEdges&&o[s][0]=o[s][0]||o[s-1][1]<=o[s][1])&&o[s-1][2]!==null&&(o[s][2]===null&&o[s-1][2]!==null?o[s-1][2]=null:o[s-1][2]!=null?+a.mergeType==2&&o[s-1][0]===o[s][0]?o[s-1][2]=o[s][2]:o[s-1][2]+=o[s][2]:o[s-1][2]=o[s][2]),o.splice(s,1),s=o.length);return o.length?o:null}function B(e){return e!=null}function F(e){return Number.isInteger(e)&&e>=0}function oe(e){return typeof e=="string"}var li={limitToBeAddedWhitespace:!1,limitLinebreaksCount:1,mergeType:1},ut=class{constructor(e){ke(this,"ranges");ke(this,"opts");let r=A(A({},li),e);if(r.mergeType&&r.mergeType!==1&&r.mergeType!==2)if(oe(r.mergeType)&&r.mergeType.trim()==="1")r.mergeType=1;else if(oe(r.mergeType)&&r.mergeType.trim()==="2")r.mergeType=2;else throw new Error(`ranges-push: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof r.mergeType}", equal to ${JSON.stringify(r.mergeType,null,4)}`);this.opts=r,this.ranges=[]}add(e,r,t){if(e==null&&r==null)return;if(B(e)&&!B(r)){if(Array.isArray(e)){if(e.length){if(e.some(o=>Array.isArray(o))){e.forEach(o=>{Array.isArray(o)&&this.add(...o)});return}e.length&&F(+e[0])&&F(+e[1])&&this.add(...e)}return}throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_12] the first input argument, "from" is set (${JSON.stringify(e,null,0)}) but second-one, "to" is not (${JSON.stringify(r,null,0)})`)}else if(!B(e)&&B(r))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_13] the second input argument, "to" is set (${JSON.stringify(r,null,0)}) but first-one, "from" is not (${JSON.stringify(e,null,0)})`);let a=+e,l=+r;if(F(t)&&(t=String(t)),F(a)&&F(l)){if(B(t)&&!oe(t)&&!F(t))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_08] The third argument, the value to add, was given not as string but ${typeof t}, equal to:
17 | ${JSON.stringify(t,null,4)}`);if(B(this.ranges)&&Array.isArray(this.last())&&a===this.last()[1]){if(this.last()[1]=l,this.last()[2],this.last()[2]!==null&&B(t)){let o=this.last()[2]&&this.last()[2].length>0&&(!this.opts||!this.opts.mergeType||this.opts.mergeType===1)?`${this.last()[2]}${t}`:t;this.opts.limitToBeAddedWhitespace&&(o=be(o,this.opts.limitLinebreaksCount)),oe(o)&&!o.length||(this.last()[2]=o)}}else{this.ranges||(this.ranges=[]);let o=t!==void 0&&!(oe(t)&&!t.length)?[a,l,t&&this.opts.limitToBeAddedWhitespace?be(t,this.opts.limitLinebreaksCount):t]:[a,l];this.ranges.push(o)}}else throw F(a)&&a>=0?new TypeError(`ranges-push/Ranges/add(): [THROW_ID_10] "to" value, the second input argument, must be a natural number or zero! Currently it's of a type "${typeof l}" equal to: ${JSON.stringify(l,null,4)}`):new TypeError(`ranges-push/Ranges/add(): [THROW_ID_09] "from" value, the first input argument, must be a natural number or zero! Currently it's of a type "${typeof a}" equal to: ${JSON.stringify(a,null,4)}`)}push(e,r,t){this.add(e,r,t)}current(){return Array.isArray(this.ranges)&&this.ranges.length?(this.ranges=si(this.ranges,{mergeType:this.opts.mergeType}),this.ranges&&this.opts.limitToBeAddedWhitespace?this.ranges.map(e=>B(e[2])?[e[0],e[1],be(e[2],this.opts.limitLinebreaksCount)]:e):this.ranges):null}wipe(){this.ranges=[]}replace(e){if(Array.isArray(e)&&e.length)if(Array.isArray(e[0])&&F(e[0][0]))this.ranges=Array.from(e);else throw new Error(`ranges-push/Ranges/replace(): [THROW_ID_11] Single range was given but we expected array of arrays! The first element, ${JSON.stringify(e[0],null,4)} should be an array and its first element should be an integer, a string index.`);else this.ranges=[]}last(){return Array.isArray(this.ranges)&&this.ranges.length?this.ranges[this.ranges.length-1]:null}};var Io=M(Ne(),1),Bo=M(Kt(),1);var or="\xA0";function Fo({str:e,idx:r=0,stopAtNewlines:t=!1,stopAtRawNbsp:a=!1}){if(typeof e!="string"||!e.length||((!r||typeof r!="number")&&(r=0),!e[r+1]))return null;if(e[r+1]&&(e[r+1].trim()||t&&`
18 | \r`.includes(e[r+1])||a&&e[r+1]===or))return r+1;if(e[r+2]&&(e[r+2].trim()||t&&`
19 | \r`.includes(e[r+2])||a&&e[r+2]===or))return r+2;for(let l=r+1,o=e.length;ltypeof t=="string"&&t.trim());if(typeof e=="string")return e.trim()?[e]:[];throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_03] ${r} must be array containing zero or more strings or something falsey. Currently it's equal to: ${e}, that a type of ${typeof e}.`)}function jo(e,r,t,a){for(let l=r,o=e.length;l")}var Qt="9.1.6";var Uo=Qt,ge={ignoreTags:[],ignoreTagsWithTheirContents:[],onlyStripTags:[],stripTogetherWithTheirContents:["script","style","xml"],skipHtmlDecoding:!1,trimOnlySpaces:!1,stripRecognisedHTMLOnly:!1,dumpLinkHrefsNearby:{enabled:!1,putOnNewLine:!1,wrapHeads:"",wrapTails:""},cb:null};function rn(e,r){var fr,mr,dr,Jo;let t=Date.now(),a=new Set(["!doctype","abbr","address","area","article","aside","audio","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","doctype","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","param","picture","pre","progress","rb","rp","rt","rtc","ruby","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","ul","var","video","wbr","xml"]),l=new Set(["a","b","i","p","q","s","u"]),o=new Set([".",",","?",";",")","\u2026",'"',"\xBB"]),g=[],u=[],p=[],s=[],n={};function b(){n={attributes:[]}}b();let v=null,h=null,c={},S={tagName:"",hrefValue:"",openingTagEnds:void 0},D="",L=!1,N=null,x=!0;function tn(i){return i!=null}function nn(i){return typeof i=="string"}function pe(i,y,m){if(Array.isArray(y.stripTogetherWithTheirContents)&&(y.stripTogetherWithTheirContents.includes(n.name)||y.stripTogetherWithTheirContents.includes("*")))if(n.slashPresent&&Array.isArray(g)&&g.some(d=>d.name===n.name)){for(let d=g.length;d--;)if(g[d].name===n.name){s=s.filter(([E,w])=>(E=i+1)&&(w<=g[d].lastOpeningBracketAt||w>i+1));let $=i+1;n.lastClosingBracketAt&&($=n.lastClosingBracketAt+1),s.push([g[d].lastOpeningBracketAt,$]),o.has(e[i])&&y.cb?y.cb({tag:n,deleteFrom:g[d].lastOpeningBracketAt,deleteTo:i+1,insert:null,rangesArr:m,proposedReturn:[g[d].lastOpeningBracketAt,i,null]}):y.cb&&y.cb({tag:n,deleteFrom:g[d].lastOpeningBracketAt,deleteTo:i,insert:"",rangesArr:m,proposedReturn:[g[d].lastOpeningBracketAt,i,""]}),g.splice(d,1);break}}else n.slashPresent||g.push(n);else Array.isArray(y.ignoreTagsWithTheirContents)&&De(i,y,n)&&(x=!1)}function G(i,y,m,d,$,E){let w="";if(Number.isInteger(m)&&m<$&&(w+=i.slice(m,$)),Number.isInteger(d)&&d>E+1){let q=i.slice(E+1,d);q.includes(`
21 | `)&&R(d,i)?w+=" ":w+=q}if(!o.has(i[y])&&i[y]!=="!"){let q=w.match(/\n/g);return Array.isArray(q)&&q.length?q.length===1?`
22 | `:q.length===2?`
23 |
24 | `:`
25 |
26 |
27 | `:" "}return""}function Se(i){if(i.dumpLinkHrefsNearby.enabled&&S.tagName&&S.tagName===n.name&&n.lastOpeningBracketAt&&(S.openingTagEnds&&n.lastOpeningBracketAt>S.openingTagEnds||!S.openingTagEnds)&&(L=!0),L){let y=i.dumpLinkHrefsNearby.putOnNewLine?`
28 |
29 | `:"";D=`${y}${S.hrefValue}${y}`}}function R(i,y){return y?y[i]==="<"&&y[i+1]!=="%":e[i]==="<"&&e[i+1]!=="%"}function _(i){return e[i]===">"&&e[i-1]!=="%"}function De(i,y,m){if(y.ignoreTagsWithTheirContents.includes("*"))return!0;let d=e.indexOf(`<${m.name}`,i),$=e.indexOf(`${m.name}`,i);return!m.slashPresent&&$===-1||m.slashPresent&&!u.some(E=>E.name===m.name)||$>-1&&d>-1&&d<$?!1:y.ignoreTagsWithTheirContents.includes(m.name)}if(typeof e!="string")throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_01] Input must be string! Currently it's: ${(typeof e).toLowerCase()}, equal to:
30 | ${JSON.stringify(e,null,4)}`);if(r&&!(0,ce.default)(r))throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_02] Optional Options Object must be a plain object! Currently it's: ${(typeof r).toLowerCase()}, equal to:
31 | ${JSON.stringify(r,null,4)}`);function qe(){L&&(S={tagName:"",hrefValue:"",openingTagEnds:void 0},L=!1)}let f=A(A({},ge),r);if(Object.prototype.hasOwnProperty.call(f,"returnRangesOnly"))throw new TypeError("string-strip-html/stripHtml(): [THROW_ID_03] opts.returnRangesOnly has been removed from the API since v.5 release.");f.ignoreTags=lr(f.ignoreTags,"opts.ignoreTags"),f.onlyStripTags=lr(f.onlyStripTags,"opts.onlyStripTags");let pr=!!f.onlyStripTags.length;if(f.onlyStripTags.length&&f.ignoreTags.length&&(f.onlyStripTags=(0,en.default)(f.onlyStripTags,...f.ignoreTags)),(0,ce.default)(f.dumpLinkHrefsNearby)||(f.dumpLinkHrefsNearby=A({},ge.dumpLinkHrefsNearby)),f.dumpLinkHrefsNearby=ge.dumpLinkHrefsNearby,r&&Object.prototype.hasOwnProperty.call(r,"dumpLinkHrefsNearby")&&tn(r.dumpLinkHrefsNearby)){if((0,ce.default)(r.dumpLinkHrefsNearby))f.dumpLinkHrefsNearby=A(A({},ge.dumpLinkHrefsNearby),r.dumpLinkHrefsNearby);else if(r.dumpLinkHrefsNearby)throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_04] Optional Options Object's key dumpLinkHrefsNearby was set to ${typeof r.dumpLinkHrefsNearby}, equal to ${JSON.stringify(r.dumpLinkHrefsNearby,null,4)}. The only allowed value is a plain object. See the API reference.`)}f.stripTogetherWithTheirContents?typeof f.stripTogetherWithTheirContents=="string"&&f.stripTogetherWithTheirContents.length&&(f.stripTogetherWithTheirContents=[f.stripTogetherWithTheirContents]):f.stripTogetherWithTheirContents=[];let te={};if(f.stripTogetherWithTheirContents&&Array.isArray(f.stripTogetherWithTheirContents)&&f.stripTogetherWithTheirContents.length&&!f.stripTogetherWithTheirContents.every((i,y)=>typeof i!="string"?(te.el=i,te.i=y,!1):!0))throw new TypeError(`string-strip-html/stripHtml(): [THROW_ID_05] Optional Options Object's key stripTogetherWithTheirContents was set to contain not just string elements! For example, element at index ${te.i} has a value ${te.el} which is not string but ${(typeof te.el).toLowerCase()}.`);f.cb||(f.cb=({rangesArr:i,proposedReturn:y})=>{y&&i.push(...y)});let T=new ut({limitToBeAddedWhitespace:!0,limitLinebreaksCount:2});if(!f.skipHtmlDecoding)for(;e!==(0,gr.decode)(e,{scope:"strict"});)e=(0,gr.decode)(e,{scope:"strict"});for(let i=0,y=e.length;i1&&n.lastClosingBracketAt&&n.lastClosingBracketAt1){for(let m=i;m--;)if(e[m-1]===void 0||_(m)){let d=e[m-1]===void 0?m:m+1,$=e.slice(d,i+1);if(e!==`<${(0,cr.default)($.trim(),"/>")}>`&&[...a].some(E=>(0,cr.default)($.trim().split(/\s+/).filter(w=>w.trim()).filter((w,q)=>q===0),"/>").toLowerCase()===E)&&rn(`<${$.trim()}>`,f).result===""){(!p.length||p[p.length-1][0]!==n.lastOpeningBracketAt)&&p.push([d,i+1]),(!s.length||s[s.length-1][0]!==n.lastOpeningBracketAt)&&s.push([d,i+1]);let E=G(e,i,d,i+1,d,i+1),w=i+1;if(e[w]&&!e[w].trim()){for(let q=w;q{if(d.name&&d.name.toLowerCase()==="href")return m=`${f.dumpLinkHrefsNearby.wrapHeads||""}${d.value}${f.dumpLinkHrefsNearby.wrapTails||""}`,!0})&&(S={tagName:n.name,hrefValue:m,openingTagEnds:void 0})}else!n.quotes&&n.nameStarts&&(n.quotes={},n.quotes.value=e[i],n.quotes.start=i,c.nameStarts&&c.nameEnds&&c.nameEnds!(d===n.leftOuterWhitespace&&$===i))),f.cb({tag:n,deleteFrom:n.leftOuterWhitespace,deleteTo:i,insert:`${m}${D}${m}`,rangesArr:T,proposedReturn:[n.leftOuterWhitespace,i,`${m}${D}${m}`]}),qe(),pe(i,f,T)}}if(((mr=n.quotes)==null?void 0:mr.start)&&n.quotes.start/!".includes(e[i])&&!c.nameStarts&&!n.lastClosingBracketAt&&(c.nameStarts=i),n.lastOpeningBracketAt!==null&&n.lastOpeningBracketAtd!==m.lastOpeningBracketAt),s.push([m.lastOpeningBracketAt,i+1])):s.push([n.lastOpeningBracketAt,i+1])}else s.push([n.lastOpeningBracketAt,i+1])}}else if(i>n.lastClosingBracketAt&&e[i].trim()||e[i+1]===void 0){let m=n.lastClosingBracketAt===i?i+1:i;f.trimOnlySpaces&&m===y-1&&N!==null&&NE.equalsAt))){(!s.length||s[s.length-1][0]!==n.lastOpeningBracketAt)&&s.push([n.lastOpeningBracketAt,n.lastClosingBracketAt+1]);let E=G(e,i,n.leftOuterWhitespace,m,n.lastOpeningBracketAt,n.lastClosingBracketAt);D="",L=!1,Se(f);let w;nn(D)&&D.length?w=`${E}${D}${E===`
32 |
33 | `?`
34 | `:E}`:w=E,(n.leftOuterWhitespace===0||!sr(e,m-1))&&(w=""),f.cb({tag:n,deleteFrom:n.leftOuterWhitespace,deleteTo:m,insert:w,rangesArr:T,proposedReturn:[n.leftOuterWhitespace,m,w]}),qe(),pe(i,f,T)}else n={};_(i)||(n={})}}if(R(i)&&!R(i-1)&&!`'"`.includes(e[i+1])&&(!`'"`.includes(e[i+2])||/\w/.test(e[i+1]))&&!(e[i+1]==="c"&&e[i+2]===":")&&!(e[i+1]==="f"&&e[i+2]==="m"&&e[i+3]==="t"&&e[i+4]===":")&&!(e[i+1]==="s"&&e[i+2]==="q"&&e[i+3]==="l"&&e[i+4]===":")&&!(e[i+1]==="x"&&e[i+2]===":")&&!(e[i+1]==="f"&&e[i+2]==="n"&&e[i+3]===":")&&ur(n,e,i)){if(_(sr(e,i)))continue;if(n.nameEnds&&n.nameEnds"||!m&&`${e[$-2]}${e[$-1]}${e[$]}`=="-->")&&(d=$),d&&(d<$&&e[$].trim()||e[$+1]===void 0)){let E=$;(e[$+1]===void 0&&!e[$].trim()||e[$]===">")&&(E+=1),(!p.length||p[p.length-1][0]!==n.lastOpeningBracketAt)&&p.push([n.lastOpeningBracketAt,d+1]),(!s.length||s[s.length-1][0]!==n.lastOpeningBracketAt)&&s.push([n.lastOpeningBracketAt,d+1]);let w=G(e,$,n.leftOuterWhitespace,E,n.lastOpeningBracketAt,d);f.cb({tag:n,deleteFrom:n.leftOuterWhitespace,deleteTo:E,insert:w,rangesArr:T,proposedReturn:[n.leftOuterWhitespace,E,w]}),i=$-1,e[$]===">"&&(i=$),n={},c={};break}}}e[i].trim()?v!==null&&(!n.quotes&&c.equalsAt>v-1&&c.nameEnds&&c.equalsAt>c.nameEnds&&e[i]!=='"'&&e[i]!=="'"&&((0,ce.default)(c)&&n.attributes.push(c),c={},n.equalsSpottedAt=void 0),v=null):v===null&&(v=i,n.lastOpeningBracketAt!==void 0&&n.lastOpeningBracketAtm.name===n.name)&&(n.onlyPlausible=!0,n.name=void 0,n.nameStarts=void 0)),e[i]===" "?h===null&&(h=i):h!==null&&(h=null)}if(e&&(f.trimOnlySpaces&&e[0]===" "||!f.trimOnlySpaces&&!e[0].trim()))for(let i=0,y=e.length;i