html-crush 6.0.10 → 6.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/html-crush.esm.js +2 -2
- package/dist/html-crush.umd.js +21 -21
- package/package.json +8 -8
package/dist/html-crush.esm.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name html-crush
|
|
3
3
|
* @fileoverview Minify email templates
|
|
4
|
-
* @version 6.0.
|
|
4
|
+
* @version 6.0.11
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/html-crush/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import{rApply as ne}from"ranges-apply";import{Ranges as le}from"ranges-push";import{matchLeft as oe,matchRight as F,matchRightIncl as X}from"string-match-left-right";import{expander as _}from"string-range-expander";import{left as G,right as a}from"string-left-right";import{isStr as A,isLetter as y,isPlainObject as te}from"codsen-utils";var Y="6.0.
|
|
10
|
+
import{rApply as ne}from"ranges-apply";import{Ranges as le}from"ranges-push";import{matchLeft as oe,matchRight as F,matchRightIncl as X}from"string-match-left-right";import{expander as _}from"string-range-expander";import{left as G,right as a}from"string-left-right";import{isStr as A,isLetter as y,isPlainObject as te}from"codsen-utils";var Y="6.0.11";var be=Y,$=new le({limitToBeAddedWhitespace:!0}),ie={lineLengthLimit:500,removeIndentations:!0,removeLineBreaks:!1,removeHTMLComments:!1,removeCSSComments:!0,reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,breakToTheLeftOf:["</td","<html","</html","<head","</head","<meta","<link","<table","<script","</script","<!DOCTYPE","<style","</style","<title","<body","@media","</body","<!--[if","<!--<![endif","<![endif]"],mindTheInlineTags:["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]};function he(n,E){let x=Date.now();if(!A(n))throw n===void 0?new Error("html-crush: [THROW_ID_01] the first input argument is completely missing! It should be given as string."):new Error(`html-crush: [THROW_ID_02] the first input argument must be string! It was given as "${typeof n}", equal to:
|
|
11
11
|
${JSON.stringify(n,null,4)}`);if(E&&!te(E))throw new Error(`html-crush: [THROW_ID_03] the second input argument, options object, should be a plain object but it was given as type ${typeof E}, equal to ${JSON.stringify(E,null,4)}`);if(E&&Array.isArray(E.breakToTheLeftOf)&&E.breakToTheLeftOf.length){for(let e=0,w=E.breakToTheLeftOf.length;e<w;e++)if(!A(E.breakToTheLeftOf[e]))throw new TypeError(`html-crush: [THROW_ID_05] the resolvedOpts.breakToTheLeftOf array contains non-string elements! For example, element at index ${e} is of a type "${typeof E.breakToTheLeftOf[e]}" and is equal to:
|
|
12
12
|
${JSON.stringify(E.breakToTheLeftOf[e],null,4)}`)}let l={...ie,...E};typeof l.removeHTMLComments=="boolean"&&(l.removeHTMLComments=l.removeHTMLComments?1:0);let v="";Array.isArray(l.breakToTheLeftOf)&&l.breakToTheLeftOf.length&&(v=[...new Set(l.breakToTheLeftOf.map(e=>e[0]))].join(""));let L={removeHTMLComments:!1,removeCSSComments:!1},p=null,i=null,S=!1,m=0,H=0,g=!1,O=!1,c=null,f=null,V=null,U=null,u,t=null,s=null,r=null,T=null,D=null,M=null,P=">};",I="<",K="!",q=">",z="<",W="{},:;<>~+",k=W,J=W,C=!0,h=n.length,Q=Math.floor(h/2),B=.01,j;l.reportProgressFunc&&(j=Math.floor(l.reportProgressFuncTo-(l.reportProgressFuncTo-l.reportProgressFuncFrom)*B-l.reportProgressFuncFrom));let d,R=0,b=`
|
|
13
13
|
`;if(n.includes(`\r
|
package/dist/html-crush.umd.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @name html-crush
|
|
3
3
|
* @fileoverview Minify email templates
|
|
4
|
-
* @version 6.0.
|
|
4
|
+
* @version 6.0.11
|
|
5
5
|
* @author Roy Revelt, Codsen Ltd
|
|
6
6
|
* @license MIT
|
|
7
7
|
* {@link https://codsen.com/os/html-crush/}
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
"use strict";var htmlCrush=(()=>{var Qt=Object.create;var ne=Object.defineProperty;var Xt=Object.getOwnPropertyDescriptor;var zt=Object.getOwnPropertyNames,Je=Object.getOwnPropertySymbols,Zt=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable;var ye=(e,t,r)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t||(t={}))ke.call(t,r)&&ye(e,r,t[r]);if(Je)for(var r of Je(t))en.call(t,r)&&ye(e,r,t[r]);return e};var tn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),nn=(e,t)=>{for(var r in t)ne(e,r,{get:t[r],enumerable:!0})},je=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of zt(t))!ke.call(e,a)&&a!==r&&ne(e,a,{get:()=>t[a],enumerable:!(n=Xt(t,a))||n.enumerable});return e};var rn=(e,t,r)=>(r=e!=null?Qt(Zt(e)):{},je(t||!e||!e.__esModule?ne(r,"default",{value:e,enumerable:!0}):r,e)),on=e=>je(ne({},"__esModule",{value:!0}),e);var Ee=(e,t,r)=>(ye(e,typeof t!="symbol"?t+"":t,r),r);var Jt=tn((re,K)=>{var hn=200,mt="__lodash_hash_undefined__",ht=9007199254740991,_e="[object Arguments]",fn="[object Array]",ft="[object Boolean]",$t="[object Date]",$n="[object Error]",Ve="[object Function]",pt="[object GeneratorFunction]",ue="[object Map]",dt="[object Number]",Re="[object Object]",tt="[object Promise]",bt="[object RegExp]",ge="[object Set]",Tt="[object String]",yt="[object Symbol]",De="[object WeakMap]",Et="[object ArrayBuffer]",ce="[object DataView]",St="[object Float32Array]",Ot="[object Float64Array]",wt="[object Int8Array]",Lt="[object Int16Array]",Dt="[object Int32Array]",Ct="[object Uint8Array]",At="[object Uint8ClampedArray]",It="[object Uint16Array]",vt="[object Uint32Array]",pn=/[\\^$.*+?()[\]{}|]/g,dn=/\w*$/,bn=/^\[object .+?Constructor\]$/,Tn=/^(?:0|[1-9]\d*)$/,O={};O[_e]=O[fn]=O[Et]=O[ce]=O[ft]=O[$t]=O[St]=O[Ot]=O[wt]=O[Lt]=O[Dt]=O[ue]=O[dt]=O[Re]=O[bt]=O[ge]=O[Tt]=O[yt]=O[Ct]=O[At]=O[It]=O[vt]=!0;O[$n]=O[Ve]=O[De]=!1;var yn=typeof global=="object"&&global&&global.Object===Object&&global,En=typeof self=="object"&&self&&self.Object===Object&&self,M=yn||En||Function("return this")(),Nt=typeof re=="object"&&re&&!re.nodeType&&re,nt=Nt&&typeof K=="object"&&K&&!K.nodeType&&K,Sn=nt&&nt.exports===Nt;function On(e,t){return e.set(t[0],t[1]),e}function wn(e,t){return e.add(t),e}function Ln(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Dn(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function _t(e,t,r,n){var a=-1,o=e?e.length:0;for(n&&o&&(r=e[++a]);++a<o;)r=t(r,e[a],a,e);return r}function Cn(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function An(e,t){return e==null?void 0:e[t]}function Vt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function rt(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function Me(e,t){return function(r){return e(t(r))}}function it(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var In=Array.prototype,vn=Function.prototype,me=Object.prototype,Le=M["__core-js_shared__"],ot=function(){var e=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Rt=vn.toString,H=me.hasOwnProperty,he=me.toString,Nn=RegExp("^"+Rt.call(H).replace(pn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),st=Sn?M.Buffer:void 0,lt=M.Symbol,at=M.Uint8Array,_n=Me(Object.getPrototypeOf,Object),Vn=Object.create,Rn=me.propertyIsEnumerable,Mn=In.splice,ut=Object.getOwnPropertySymbols,Pn=st?st.isBuffer:void 0,xn=Me(Object.keys,Object),Ce=X(M,"DataView"),ie=X(M,"Map"),Ae=X(M,"Promise"),Ie=X(M,"Set"),ve=X(M,"WeakMap"),oe=X(Object,"create"),Fn=k(Ce),Hn=k(ie),Wn=k(Ae),Bn=k(Ie),Jn=k(ve),gt=lt?lt.prototype:void 0,ct=gt?gt.valueOf:void 0;function J(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function kn(){this.__data__=oe?oe(null):{}}function jn(e){return this.has(e)&&delete this.__data__[e]}function Un(e){var t=this.__data__;if(oe){var r=t[e];return r===mt?void 0:r}return H.call(t,e)?t[e]:void 0}function Gn(e){var t=this.__data__;return oe?t[e]!==void 0:H.call(t,e)}function qn(e,t){var r=this.__data__;return r[e]=oe&&t===void 0?mt:t,this}J.prototype.clear=kn;J.prototype.delete=jn;J.prototype.get=Un;J.prototype.has=Gn;J.prototype.set=qn;function P(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Kn(){this.__data__=[]}function Yn(e){var t=this.__data__,r=fe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Mn.call(t,r,1),!0}function Qn(e){var t=this.__data__,r=fe(t,e);return r<0?void 0:t[r][1]}function Xn(e){return fe(this.__data__,e)>-1}function zn(e,t){var r=this.__data__,n=fe(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}P.prototype.clear=Kn;P.prototype.delete=Yn;P.prototype.get=Qn;P.prototype.has=Xn;P.prototype.set=zn;function Y(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Zn(){this.__data__={hash:new J,map:new(ie||P),string:new J}}function er(e){return $e(this,e).delete(e)}function tr(e){return $e(this,e).get(e)}function nr(e){return $e(this,e).has(e)}function rr(e,t){return $e(this,e).set(e,t),this}Y.prototype.clear=Zn;Y.prototype.delete=er;Y.prototype.get=tr;Y.prototype.has=nr;Y.prototype.set=rr;function Q(e){this.__data__=new P(e)}function ir(){this.__data__=new P}function or(e){return this.__data__.delete(e)}function sr(e){return this.__data__.get(e)}function lr(e){return this.__data__.has(e)}function ar(e,t){var r=this.__data__;if(r instanceof P){var n=r.__data__;if(!ie||n.length<hn-1)return n.push([e,t]),this;r=this.__data__=new Y(n)}return r.set(e,t),this}Q.prototype.clear=ir;Q.prototype.delete=or;Q.prototype.get=sr;Q.prototype.has=lr;Q.prototype.set=ar;function ur(e,t){var r=xe(e)||Vr(e)?Cn(e.length,String):[],n=r.length,a=!!n;for(var o in e)(t||H.call(e,o))&&!(a&&(o=="length"||Ir(o,n)))&&r.push(o);return r}function Mt(e,t,r){var n=e[t];(!(H.call(e,t)&&Ht(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function fe(e,t){for(var r=e.length;r--;)if(Ht(e[r][0],t))return r;return-1}function gr(e,t){return e&&Pt(t,Fe(t),e)}function Ne(e,t,r,n,a,o,u){var l;if(n&&(l=o?n(e,a,o,u):n(e)),l!==void 0)return l;if(!pe(e))return e;var g=xe(e);if(g){if(l=Dr(e),!t)return Or(e,l)}else{var s=B(e),d=s==Ve||s==pt;if(Mr(e))return pr(e,t);if(s==Re||s==_e||d&&!o){if(Vt(e))return o?e:{};if(l=Cr(d?{}:e),!t)return wr(e,gr(l,e))}else{if(!O[s])return o?e:{};l=Ar(e,s,Ne,t)}}u||(u=new Q);var p=u.get(e);if(p)return p;if(u.set(e,l),!g)var T=r?Lr(e):Fe(e);return Ln(T||e,function(m,h){T&&(h=m,m=e[h]),Mt(l,h,Ne(m,t,r,n,h,e,u))}),l}function cr(e){return pe(e)?Vn(e):{}}function mr(e,t,r){var n=t(e);return xe(e)?n:Dn(n,r(e))}function hr(e){return he.call(e)}function fr(e){if(!pe(e)||Nr(e))return!1;var t=Bt(e)||Vt(e)?Nn:bn;return t.test(k(e))}function $r(e){if(!Ft(e))return xn(e);var t=[];for(var r in Object(e))H.call(e,r)&&r!="constructor"&&t.push(r);return t}function pr(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function Pe(e){var t=new e.constructor(e.byteLength);return new at(t).set(new at(e)),t}function dr(e,t){var r=t?Pe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function br(e,t,r){var n=t?r(rt(e),!0):rt(e);return _t(n,On,new e.constructor)}function Tr(e){var t=new e.constructor(e.source,dn.exec(e));return t.lastIndex=e.lastIndex,t}function yr(e,t,r){var n=t?r(it(e),!0):it(e);return _t(n,wn,new e.constructor)}function Er(e){return ct?Object(ct.call(e)):{}}function Sr(e,t){var r=t?Pe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Or(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Pt(e,t,r,n){r||(r={});for(var a=-1,o=t.length;++a<o;){var u=t[a],l=n?n(r[u],e[u],u,r,e):void 0;Mt(r,u,l===void 0?e[u]:l)}return r}function wr(e,t){return Pt(e,xt(e),t)}function Lr(e){return mr(e,Fe,xt)}function $e(e,t){var r=e.__data__;return vr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function X(e,t){var r=An(e,t);return fr(r)?r:void 0}var xt=ut?Me(ut,Object):Fr,B=hr;(Ce&&B(new Ce(new ArrayBuffer(1)))!=ce||ie&&B(new ie)!=ue||Ae&&B(Ae.resolve())!=tt||Ie&&B(new Ie)!=ge||ve&&B(new ve)!=De)&&(B=function(e){var t=he.call(e),r=t==Re?e.constructor:void 0,n=r?k(r):void 0;if(n)switch(n){case Fn:return ce;case Hn:return ue;case Wn:return tt;case Bn:return ge;case Jn:return De}return t});function Dr(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&H.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function Cr(e){return typeof e.constructor=="function"&&!Ft(e)?cr(_n(e)):{}}function Ar(e,t,r,n){var a=e.constructor;switch(t){case Et:return Pe(e);case ft:case $t:return new a(+e);case ce:return dr(e,n);case St:case Ot:case wt:case Lt:case Dt:case Ct:case At:case It:case vt:return Sr(e,n);case ue:return br(e,n,r);case dt:case Tt:return new a(e);case bt:return Tr(e);case ge:return yr(e,n,r);case yt:return Er(e)}}function Ir(e,t){return t=t==null?ht:t,!!t&&(typeof e=="number"||Tn.test(e))&&e>-1&&e%1==0&&e<t}function vr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Nr(e){return!!ot&&ot in e}function Ft(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||me;return e===r}function k(e){if(e!=null){try{return Rt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function _r(e){return Ne(e,!0,!0)}function Ht(e,t){return e===t||e!==e&&t!==t}function Vr(e){return Rr(e)&&H.call(e,"callee")&&(!Rn.call(e,"callee")||he.call(e)==_e)}var xe=Array.isArray;function Wt(e){return e!=null&&Pr(e.length)&&!Bt(e)}function Rr(e){return xr(e)&&Wt(e)}var Mr=Pn||Hr;function Bt(e){var t=pe(e)?he.call(e):"";return t==Ve||t==pt}function Pr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ht}function pe(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function xr(e){return!!e&&typeof e=="object"}function Fe(e){return Wt(e)?ur(e):$r(e)}function Fr(){return[]}function Hr(){return!1}K.exports=_r});var Gr={};nn(Gr,{crush:()=>Ur,defaults:()=>jt,version:()=>jr});var sn={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function G(e,t){if(!Array.isArray(e)||!e.length)return e;let r=w(w({},sn),t),n,a;if(r.strictlyTwoElementsInRangeArrays&&!e.every((l,g)=>!Array.isArray(l)||l.length!==2?(n=g,a=l.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, ${n}th range (${JSON.stringify(e[n],null,4)}) has not two but ${a} elements!`);if(!e.every((l,g)=>!Array.isArray(l)||!Number.isInteger(l[0])||l[0]<0||!Number.isInteger(l[1])||l[1]<0?(n=g,!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, ${n}th range (${JSON.stringify(e[n],null,4)}) does not consist of only natural numbers!`);let o=e.length**2,u=0;return Array.from(e).sort((l,g)=>(r.progressFn&&(u+=1,r.progressFn(Math.floor(u*100/o))),l[0]===g[0]?l[1]<g[1]?-1:l[1]>g[1]?1:0:l[0]<g[0]?-1:1))}var Ue={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function Ge(e,t){function r(s){return!!s&&typeof s=="object"&&!Array.isArray(s)}if(!Array.isArray(e)||!e.length)return null;let n;if(t)if(r(t)){if(n=w(w({},Ue),t),n.progressFn&&r(n.progressFn)&&!Object.keys(n.progressFn).length)n.progressFn=null;else if(n.progressFn&&typeof n.progressFn!="function")throw new Error(`ranges-merge: [THROW_ID_01] opts.progressFn must be a function! It was given of a type: "${typeof n.progressFn}", equal to ${JSON.stringify(n.progressFn,null,4)}`);if(![1,2,"1","2"].includes(n.mergeType))throw new Error(`ranges-merge: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof n.mergeType}", equal to ${JSON.stringify(n.mergeType,null,4)}`);if(typeof n.joinRangesThatTouchEdges!="boolean")throw new Error(`ranges-merge: [THROW_ID_04] opts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof n.joinRangesThatTouchEdges}", equal to ${JSON.stringify(n.joinRangesThatTouchEdges,null,4)}`)}else throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:
|
|
11
|
-
${JSON.stringify(t,null,4)} (type ${typeof t})`);else n=w({},Ue);let a=e.filter(s=>Array.isArray(s)).map(s=>[...s]).filter(s=>s[2]!==void 0||s[0]!==s[1]),o,u,l;n.progressFn?o=G(a,{progressFn:s=>{l=Math.floor(s/5),l!==u&&(u=l,n.progressFn(l))}}):o=G(a);let g=o.length-1;for(let s=g;s>0;s--)n.progressFn&&(l=Math.floor((1-s/g)*78)+21,l!==u&&l>u&&(u=l,n.progressFn(l))),(o[s][0]<=o[s-1][0]||!n.joinRangesThatTouchEdges&&o[s][0]<o[s-1][1]||n.joinRangesThatTouchEdges&&o[s][0]<=o[s-1][1])&&(o[s-1][0]=Math.min(o[s][0],o[s-1][0]),o[s-1][1]=Math.max(o[s][1],o[s-1][1]),o[s][2]!==void 0&&(o[s-1][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?+n.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 ln=!0,Se="Invariant failed";function qe(e,t){if(!e){if(ln)throw new Error(Se);var r=typeof t=="function"?t():t,n=r?"".concat(Se,": ").concat(r):Se;throw new Error(n)}}function Ke(e,t,r){let n=0,a=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(t&&!Array.isArray(t))throw new TypeError(`ranges-apply: [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ${typeof t}, equal to: ${JSON.stringify(t,null,4)}`);if(r&&typeof r!="function")throw new TypeError(`ranges-apply: [THROW_ID_04] the third input argument must be a function (or falsey)! Currently it's: ${typeof r}, equal to: ${JSON.stringify(r,null,4)}`);if(!t||!t.filter(d=>d).length)return e;let o;Array.isArray(t)&&Number.isInteger(t[0])&&Number.isInteger(t[1])?o=[Array.from(t)]:o=Array.from(t);let u=o.length,l=0;o.filter(d=>d).forEach((d,p)=>{if(r&&(n=Math.floor(l/u*10),n!==a&&(a=n,r(n))),!Array.isArray(d))throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${p}th element not an array: ${JSON.stringify(d,null,4)}, which is ${typeof d}`);if(!Number.isInteger(d[0])){if(!Number.isInteger(+d[0])||+d[0]<0)throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${p}th element, array ${JSON.stringify(d,null,0)}. Its first element is not an integer, string index, but ${typeof d[0]}, equal to: ${JSON.stringify(d[0],null,4)}.`);o[p][0]=+o[p][0]}if(!Number.isInteger(d[1])){if(!Number.isInteger(+d[1])||+d[1]<0)throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${p}th element, array ${JSON.stringify(d,null,0)}. Its second element is not an integer, string index, but ${typeof d[1]}, equal to: ${JSON.stringify(d[1],null,4)}.`);o[p][1]=+o[p][1]}l+=1});let g=Ge(o,{progressFn:d=>{r&&(n=10+Math.floor(d/10),n!==a&&(a=n,r(n)))}});qe(g);let s=g.length;if(s>0){let d=e.slice(g[s-1][1]);e=g.reduce((p,T,m,
|
|
10
|
+
"use strict";var htmlCrush=(()=>{var Xt=Object.create;var ne=Object.defineProperty;var Qt=Object.getOwnPropertyDescriptor;var zt=Object.getOwnPropertyNames,Je=Object.getOwnPropertySymbols,Zt=Object.getPrototypeOf,ke=Object.prototype.hasOwnProperty,en=Object.prototype.propertyIsEnumerable;var ye=(e,t,r)=>t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t||(t={}))ke.call(t,r)&&ye(e,r,t[r]);if(Je)for(var r of Je(t))en.call(t,r)&&ye(e,r,t[r]);return e};var tn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),nn=(e,t)=>{for(var r in t)ne(e,r,{get:t[r],enumerable:!0})},je=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of zt(t))!ke.call(e,a)&&a!==r&&ne(e,a,{get:()=>t[a],enumerable:!(n=Qt(t,a))||n.enumerable});return e};var rn=(e,t,r)=>(r=e!=null?Xt(Zt(e)):{},je(t||!e||!e.__esModule?ne(r,"default",{value:e,enumerable:!0}):r,e)),on=e=>je(ne({},"__esModule",{value:!0}),e);var Ee=(e,t,r)=>(ye(e,typeof t!="symbol"?t+"":t,r),r);var Jt=tn((re,K)=>{var fn=200,mt="__lodash_hash_undefined__",ft=9007199254740991,_e="[object Arguments]",hn="[object Array]",ht="[object Boolean]",$t="[object Date]",$n="[object Error]",Ve="[object Function]",pt="[object GeneratorFunction]",ue="[object Map]",dt="[object Number]",Re="[object Object]",tt="[object Promise]",bt="[object RegExp]",ge="[object Set]",Tt="[object String]",yt="[object Symbol]",De="[object WeakMap]",Et="[object ArrayBuffer]",ce="[object DataView]",St="[object Float32Array]",Ot="[object Float64Array]",wt="[object Int8Array]",Lt="[object Int16Array]",Dt="[object Int32Array]",Ct="[object Uint8Array]",At="[object Uint8ClampedArray]",It="[object Uint16Array]",vt="[object Uint32Array]",pn=/[\\^$.*+?()[\]{}|]/g,dn=/\w*$/,bn=/^\[object .+?Constructor\]$/,Tn=/^(?:0|[1-9]\d*)$/,O={};O[_e]=O[hn]=O[Et]=O[ce]=O[ht]=O[$t]=O[St]=O[Ot]=O[wt]=O[Lt]=O[Dt]=O[ue]=O[dt]=O[Re]=O[bt]=O[ge]=O[Tt]=O[yt]=O[Ct]=O[At]=O[It]=O[vt]=!0;O[$n]=O[Ve]=O[De]=!1;var yn=typeof global=="object"&&global&&global.Object===Object&&global,En=typeof self=="object"&&self&&self.Object===Object&&self,M=yn||En||Function("return this")(),Nt=typeof re=="object"&&re&&!re.nodeType&&re,nt=Nt&&typeof K=="object"&&K&&!K.nodeType&&K,Sn=nt&&nt.exports===Nt;function On(e,t){return e.set(t[0],t[1]),e}function wn(e,t){return e.add(t),e}function Ln(e,t){for(var r=-1,n=e?e.length:0;++r<n&&t(e[r],r,e)!==!1;);return e}function Dn(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}function _t(e,t,r,n){var a=-1,o=e?e.length:0;for(n&&o&&(r=e[++a]);++a<o;)r=t(r,e[a],a,e);return r}function Cn(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function An(e,t){return e==null?void 0:e[t]}function Vt(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(r){}return t}function rt(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}function Me(e,t){return function(r){return e(t(r))}}function it(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var In=Array.prototype,vn=Function.prototype,me=Object.prototype,Le=M["__core-js_shared__"],ot=function(){var e=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Rt=vn.toString,H=me.hasOwnProperty,fe=me.toString,Nn=RegExp("^"+Rt.call(H).replace(pn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),st=Sn?M.Buffer:void 0,lt=M.Symbol,at=M.Uint8Array,_n=Me(Object.getPrototypeOf,Object),Vn=Object.create,Rn=me.propertyIsEnumerable,Mn=In.splice,ut=Object.getOwnPropertySymbols,Pn=st?st.isBuffer:void 0,xn=Me(Object.keys,Object),Ce=Q(M,"DataView"),ie=Q(M,"Map"),Ae=Q(M,"Promise"),Ie=Q(M,"Set"),ve=Q(M,"WeakMap"),oe=Q(Object,"create"),Fn=k(Ce),Hn=k(ie),Wn=k(Ae),Bn=k(Ie),Jn=k(ve),gt=lt?lt.prototype:void 0,ct=gt?gt.valueOf:void 0;function J(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function kn(){this.__data__=oe?oe(null):{}}function jn(e){return this.has(e)&&delete this.__data__[e]}function Un(e){var t=this.__data__;if(oe){var r=t[e];return r===mt?void 0:r}return H.call(t,e)?t[e]:void 0}function Gn(e){var t=this.__data__;return oe?t[e]!==void 0:H.call(t,e)}function qn(e,t){var r=this.__data__;return r[e]=oe&&t===void 0?mt:t,this}J.prototype.clear=kn;J.prototype.delete=jn;J.prototype.get=Un;J.prototype.has=Gn;J.prototype.set=qn;function P(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Kn(){this.__data__=[]}function Yn(e){var t=this.__data__,r=he(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Mn.call(t,r,1),!0}function Xn(e){var t=this.__data__,r=he(t,e);return r<0?void 0:t[r][1]}function Qn(e){return he(this.__data__,e)>-1}function zn(e,t){var r=this.__data__,n=he(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}P.prototype.clear=Kn;P.prototype.delete=Yn;P.prototype.get=Xn;P.prototype.has=Qn;P.prototype.set=zn;function Y(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Zn(){this.__data__={hash:new J,map:new(ie||P),string:new J}}function er(e){return $e(this,e).delete(e)}function tr(e){return $e(this,e).get(e)}function nr(e){return $e(this,e).has(e)}function rr(e,t){return $e(this,e).set(e,t),this}Y.prototype.clear=Zn;Y.prototype.delete=er;Y.prototype.get=tr;Y.prototype.has=nr;Y.prototype.set=rr;function X(e){this.__data__=new P(e)}function ir(){this.__data__=new P}function or(e){return this.__data__.delete(e)}function sr(e){return this.__data__.get(e)}function lr(e){return this.__data__.has(e)}function ar(e,t){var r=this.__data__;if(r instanceof P){var n=r.__data__;if(!ie||n.length<fn-1)return n.push([e,t]),this;r=this.__data__=new Y(n)}return r.set(e,t),this}X.prototype.clear=ir;X.prototype.delete=or;X.prototype.get=sr;X.prototype.has=lr;X.prototype.set=ar;function ur(e,t){var r=xe(e)||Vr(e)?Cn(e.length,String):[],n=r.length,a=!!n;for(var o in e)(t||H.call(e,o))&&!(a&&(o=="length"||Ir(o,n)))&&r.push(o);return r}function Mt(e,t,r){var n=e[t];(!(H.call(e,t)&&Ht(n,r))||r===void 0&&!(t in e))&&(e[t]=r)}function he(e,t){for(var r=e.length;r--;)if(Ht(e[r][0],t))return r;return-1}function gr(e,t){return e&&Pt(t,Fe(t),e)}function Ne(e,t,r,n,a,o,u){var l;if(n&&(l=o?n(e,a,o,u):n(e)),l!==void 0)return l;if(!pe(e))return e;var g=xe(e);if(g){if(l=Dr(e),!t)return Or(e,l)}else{var s=B(e),d=s==Ve||s==pt;if(Mr(e))return pr(e,t);if(s==Re||s==_e||d&&!o){if(Vt(e))return o?e:{};if(l=Cr(d?{}:e),!t)return wr(e,gr(l,e))}else{if(!O[s])return o?e:{};l=Ar(e,s,Ne,t)}}u||(u=new X);var p=u.get(e);if(p)return p;if(u.set(e,l),!g)var T=r?Lr(e):Fe(e);return Ln(T||e,function(m,f){T&&(f=m,m=e[f]),Mt(l,f,Ne(m,t,r,n,f,e,u))}),l}function cr(e){return pe(e)?Vn(e):{}}function mr(e,t,r){var n=t(e);return xe(e)?n:Dn(n,r(e))}function fr(e){return fe.call(e)}function hr(e){if(!pe(e)||Nr(e))return!1;var t=Bt(e)||Vt(e)?Nn:bn;return t.test(k(e))}function $r(e){if(!Ft(e))return xn(e);var t=[];for(var r in Object(e))H.call(e,r)&&r!="constructor"&&t.push(r);return t}function pr(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}function Pe(e){var t=new e.constructor(e.byteLength);return new at(t).set(new at(e)),t}function dr(e,t){var r=t?Pe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}function br(e,t,r){var n=t?r(rt(e),!0):rt(e);return _t(n,On,new e.constructor)}function Tr(e){var t=new e.constructor(e.source,dn.exec(e));return t.lastIndex=e.lastIndex,t}function yr(e,t,r){var n=t?r(it(e),!0):it(e);return _t(n,wn,new e.constructor)}function Er(e){return ct?Object(ct.call(e)):{}}function Sr(e,t){var r=t?Pe(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Or(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Pt(e,t,r,n){r||(r={});for(var a=-1,o=t.length;++a<o;){var u=t[a],l=n?n(r[u],e[u],u,r,e):void 0;Mt(r,u,l===void 0?e[u]:l)}return r}function wr(e,t){return Pt(e,xt(e),t)}function Lr(e){return mr(e,Fe,xt)}function $e(e,t){var r=e.__data__;return vr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Q(e,t){var r=An(e,t);return hr(r)?r:void 0}var xt=ut?Me(ut,Object):Fr,B=fr;(Ce&&B(new Ce(new ArrayBuffer(1)))!=ce||ie&&B(new ie)!=ue||Ae&&B(Ae.resolve())!=tt||Ie&&B(new Ie)!=ge||ve&&B(new ve)!=De)&&(B=function(e){var t=fe.call(e),r=t==Re?e.constructor:void 0,n=r?k(r):void 0;if(n)switch(n){case Fn:return ce;case Hn:return ue;case Wn:return tt;case Bn:return ge;case Jn:return De}return t});function Dr(e){var t=e.length,r=e.constructor(t);return t&&typeof e[0]=="string"&&H.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function Cr(e){return typeof e.constructor=="function"&&!Ft(e)?cr(_n(e)):{}}function Ar(e,t,r,n){var a=e.constructor;switch(t){case Et:return Pe(e);case ht:case $t:return new a(+e);case ce:return dr(e,n);case St:case Ot:case wt:case Lt:case Dt:case Ct:case At:case It:case vt:return Sr(e,n);case ue:return br(e,n,r);case dt:case Tt:return new a(e);case bt:return Tr(e);case ge:return yr(e,n,r);case yt:return Er(e)}}function Ir(e,t){return t=t==null?ft:t,!!t&&(typeof e=="number"||Tn.test(e))&&e>-1&&e%1==0&&e<t}function vr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Nr(e){return!!ot&&ot in e}function Ft(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||me;return e===r}function k(e){if(e!=null){try{return Rt.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function _r(e){return Ne(e,!0,!0)}function Ht(e,t){return e===t||e!==e&&t!==t}function Vr(e){return Rr(e)&&H.call(e,"callee")&&(!Rn.call(e,"callee")||fe.call(e)==_e)}var xe=Array.isArray;function Wt(e){return e!=null&&Pr(e.length)&&!Bt(e)}function Rr(e){return xr(e)&&Wt(e)}var Mr=Pn||Hr;function Bt(e){var t=pe(e)?fe.call(e):"";return t==Ve||t==pt}function Pr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ft}function pe(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function xr(e){return!!e&&typeof e=="object"}function Fe(e){return Wt(e)?ur(e):$r(e)}function Fr(){return[]}function Hr(){return!1}K.exports=_r});var Gr={};nn(Gr,{crush:()=>Ur,defaults:()=>jt,version:()=>jr});var sn={strictlyTwoElementsInRangeArrays:!1,progressFn:null};function G(e,t){if(!Array.isArray(e)||!e.length)return e;let r=w(w({},sn),t),n,a;if(r.strictlyTwoElementsInRangeArrays&&!e.every((l,g)=>!Array.isArray(l)||l.length!==2?(n=g,a=l.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, ${n}th range (${JSON.stringify(e[n],null,4)}) has not two but ${a} elements!`);if(!e.every((l,g)=>!Array.isArray(l)||!Number.isInteger(l[0])||l[0]<0||!Number.isInteger(l[1])||l[1]<0?(n=g,!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, ${n}th range (${JSON.stringify(e[n],null,4)}) does not consist of only natural numbers!`);let o=e.length**2,u=0;return Array.from(e).sort((l,g)=>(r.progressFn&&(u+=1,r.progressFn(Math.floor(u*100/o))),l[0]===g[0]?l[1]<g[1]?-1:l[1]>g[1]?1:0:l[0]<g[0]?-1:1))}var Ue={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function Ge(e,t){function r(s){return!!s&&typeof s=="object"&&!Array.isArray(s)}if(!Array.isArray(e)||!e.length)return null;let n;if(t)if(r(t)){if(n=w(w({},Ue),t),n.progressFn&&r(n.progressFn)&&!Object.keys(n.progressFn).length)n.progressFn=null;else if(n.progressFn&&typeof n.progressFn!="function")throw new Error(`ranges-merge: [THROW_ID_01] opts.progressFn must be a function! It was given of a type: "${typeof n.progressFn}", equal to ${JSON.stringify(n.progressFn,null,4)}`);if(![1,2,"1","2"].includes(n.mergeType))throw new Error(`ranges-merge: [THROW_ID_02] opts.mergeType was customised to a wrong thing! It was given of a type: "${typeof n.mergeType}", equal to ${JSON.stringify(n.mergeType,null,4)}`);if(typeof n.joinRangesThatTouchEdges!="boolean")throw new Error(`ranges-merge: [THROW_ID_04] opts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof n.joinRangesThatTouchEdges}", equal to ${JSON.stringify(n.joinRangesThatTouchEdges,null,4)}`)}else throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:
|
|
11
|
+
${JSON.stringify(t,null,4)} (type ${typeof t})`);else n=w({},Ue);let a=e.filter(s=>Array.isArray(s)).map(s=>[...s]).filter(s=>s[2]!==void 0||s[0]!==s[1]),o,u,l;n.progressFn?o=G(a,{progressFn:s=>{l=Math.floor(s/5),l!==u&&(u=l,n.progressFn(l))}}):o=G(a);let g=o.length-1;for(let s=g;s>0;s--)n.progressFn&&(l=Math.floor((1-s/g)*78)+21,l!==u&&l>u&&(u=l,n.progressFn(l))),(o[s][0]<=o[s-1][0]||!n.joinRangesThatTouchEdges&&o[s][0]<o[s-1][1]||n.joinRangesThatTouchEdges&&o[s][0]<=o[s-1][1])&&(o[s-1][0]=Math.min(o[s][0],o[s-1][0]),o[s-1][1]=Math.max(o[s][1],o[s-1][1]),o[s][2]!==void 0&&(o[s-1][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?+n.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 ln=!0,Se="Invariant failed";function qe(e,t){if(!e){if(ln)throw new Error(Se);var r=typeof t=="function"?t():t,n=r?"".concat(Se,": ").concat(r):Se;throw new Error(n)}}function Ke(e,t,r){let n=0,a=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(t&&!Array.isArray(t))throw new TypeError(`ranges-apply: [THROW_ID_03] second input argument must be an array (or null)! Currently it's: ${typeof t}, equal to: ${JSON.stringify(t,null,4)}`);if(r&&typeof r!="function")throw new TypeError(`ranges-apply: [THROW_ID_04] the third input argument must be a function (or falsey)! Currently it's: ${typeof r}, equal to: ${JSON.stringify(r,null,4)}`);if(!t||!t.filter(d=>d).length)return e;let o;Array.isArray(t)&&Number.isInteger(t[0])&&Number.isInteger(t[1])?o=[Array.from(t)]:o=Array.from(t);let u=o.length,l=0;o.filter(d=>d).forEach((d,p)=>{if(r&&(n=Math.floor(l/u*10),n!==a&&(a=n,r(n))),!Array.isArray(d))throw new TypeError(`ranges-apply: [THROW_ID_05] ranges array, second input arg., has ${p}th element not an array: ${JSON.stringify(d,null,4)}, which is ${typeof d}`);if(!Number.isInteger(d[0])){if(!Number.isInteger(+d[0])||+d[0]<0)throw new TypeError(`ranges-apply: [THROW_ID_06] ranges array, second input arg. has ${p}th element, array ${JSON.stringify(d,null,0)}. Its first element is not an integer, string index, but ${typeof d[0]}, equal to: ${JSON.stringify(d[0],null,4)}.`);o[p][0]=+o[p][0]}if(!Number.isInteger(d[1])){if(!Number.isInteger(+d[1])||+d[1]<0)throw new TypeError(`ranges-apply: [THROW_ID_07] ranges array, second input arg. has ${p}th element, array ${JSON.stringify(d,null,0)}. Its second element is not an integer, string index, but ${typeof d[1]}, equal to: ${JSON.stringify(d[1],null,4)}.`);o[p][1]=+o[p][1]}l+=1});let g=Ge(o,{progressFn:d=>{r&&(n=10+Math.floor(d/10),n!==a&&(a=n,r(n)))}});qe(g);let s=g.length;if(s>0){let d=e.slice(g[s-1][1]);e=g.reduce((p,T,m,f)=>{r&&(n=20+Math.floor(m/s*80),n!==a&&(a=n,r(n)));let L=m===0?0:f[m-1][1],D=f[m][0];return`${p}${e.slice(L,D)}${f[m][2]||""}`},""),e+=d}return e}function le(e,t=1){let r="\xA0";function n(o){return Array.from(o).reverse().join("")}function a(o,u,l){let g=l?`
|
|
12
12
|
`:"\r",s=l?"\r":`
|
|
13
|
-
`;if(!o)return o;let d=0,p=0,T="";for(let m=0,
|
|
14
|
-
`.includes(o[m])||o[m]===r?(d=0,o[m]===r?T+=o[m]:o[m]===g?p<=u&&(T+=o[m],o[m+1]===s&&(T+=o[m+1],m++)):o[m]===s&&(o==null?void 0:o[m-1])!==g&&p<=u&&(T+=o[m])):(d++,!o[m+1]&&!p&&(T+=" "));return T}if(typeof e=="string"&&e.length){let o=1;typeof+t=="number"&&Number.isInteger(+t)&&+t>=0&&(o=+t);let u="",l="";if(!e.trim())u=e;else if(!e[0].trim()){for(let g=0,s=e.length;g<s;g++)if(e[g].trim()){u=e.slice(0,g);break}}if(e.trim()&&(e.slice(-1).trim()===""||e.slice(-1)===r)){for(let g=e.length;g--;)if(e[g].trim()){l=e.slice(g+1);break}}return`${a(u,o,!1)}${e.trim()}${n(a(n(l),o,!0))}`}return e}function W(e){return S(e)&&e.length===1&&e.toUpperCase()!==e.toLowerCase()}function V(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function S(e){return typeof e=="string"}function _(e){return Number.isSafeInteger(e)&&e>=0}function R(e){return e!=null}function Ye(e,t){return V(e)&&S(t)&&Object.prototype.hasOwnProperty.call(e,t)}var
|
|
15
|
-
${JSON.stringify(t,null,4)} (type ${typeof t})`);else n=w({},
|
|
16
|
-
${JSON.stringify(r,null,4)}`);if(R(this.ranges)&&Array.isArray(this.last())&&n===this.last()[1]){if(this.last()[1]=a,this.last()[2],this.last()[2]!==null&&R(r)){let u=this.last()[2]&&this.last()[2].length&&(!((o=this.opts)!=null&&o.mergeType)||this.opts.mergeType===1)?`${this.last()[2]}${r}`:r;this.opts.limitToBeAddedWhitespace&&(u=le(u,this.opts.limitLinebreaksCount)),S(u)&&!u.length||(this.last()[2]=u)}}else{this.ranges||(this.ranges=[]);let u=r!==void 0&&!(S(r)&&!r.length)?[n,a,r&&this.opts.limitToBeAddedWhitespace?le(r,this.opts.limitLinebreaksCount):r]:[n,a];this.ranges.push(u)}}else throw _(n)&&n>=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 a}" equal to: ${JSON.stringify(a,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 n}" equal to: ${JSON.stringify(n,null,4)}`)}push(e,t,r){this.add(e,t,r)}current(){return Array.isArray(this.ranges)&&this.ranges.length?(this.ranges=an(this.ranges,{mergeType:this.opts.mergeType}),this.ranges&&this.opts.limitToBeAddedWhitespace?this.ranges.map(e=>R(e[2])?[e[0],e[1],le(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])&&_(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}};function ze(e){return typeof e!="string"?e:e.length?[e]:[]}var Ze={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},gn=e=>e+1;function cn(e,t,r,n,a=!1,o=gn){let u=typeof r=="function"?r():r;if(+t<0&&a&&u==="EOL")return u;let l=w(w({},Ze),n);if(t>=e.length&&!a)return!1;let g=a?1:r.length,s=0,d=!1,p=!1,T=!1,m=l.maxMismatches,
|
|
13
|
+
`;if(!o)return o;let d=0,p=0,T="";for(let m=0,f=o.length;m<f;m++)(o[m]===g||o[m]===s&&o[m-1]!==g)&&p++,`\r
|
|
14
|
+
`.includes(o[m])||o[m]===r?(d=0,o[m]===r?T+=o[m]:o[m]===g?p<=u&&(T+=o[m],o[m+1]===s&&(T+=o[m+1],m++)):o[m]===s&&(o==null?void 0:o[m-1])!==g&&p<=u&&(T+=o[m])):(d++,!o[m+1]&&!p&&(T+=" "));return T}if(typeof e=="string"&&e.length){let o=1;typeof+t=="number"&&Number.isInteger(+t)&&+t>=0&&(o=+t);let u="",l="";if(!e.trim())u=e;else if(!e[0].trim()){for(let g=0,s=e.length;g<s;g++)if(e[g].trim()){u=e.slice(0,g);break}}if(e.trim()&&(e.slice(-1).trim()===""||e.slice(-1)===r)){for(let g=e.length;g--;)if(e[g].trim()){l=e.slice(g+1);break}}return`${a(u,o,!1)}${e.trim()}${n(a(n(l),o,!0))}`}return e}function W(e){return S(e)&&e.length===1&&e.toUpperCase()!==e.toLowerCase()}function V(e){if(e==null||typeof e!="object")return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null?!1:!(Symbol.iterator in e)&&!(Symbol.toStringTag in e)}function S(e){return typeof e=="string"}function _(e){return Number.isSafeInteger(e)&&e>=0}function R(e){return e!=null}function Ye(e,t){return V(e)&&S(t)&&Object.prototype.hasOwnProperty.call(e,t)}var Xe={mergeType:1,progressFn:null,joinRangesThatTouchEdges:!0};function an(e,t){function r(s){return!!s&&typeof s=="object"&&!Array.isArray(s)}if(!Array.isArray(e)||!e.length)return null;let n;if(t)if(r(t)){if(n=w(w({},Xe),t),n.progressFn&&r(n.progressFn)&&!Object.keys(n.progressFn).length)n.progressFn=null;else if(n.progressFn&&typeof n.progressFn!="function")throw new Error(`ranges-merge: [THROW_ID_01] resolvedOpts.progressFn must be a function! It was given of a type: "${typeof n.progressFn}", equal to ${JSON.stringify(n.progressFn,null,4)}`);if(![1,2,"1","2"].includes(n.mergeType))throw new Error(`ranges-merge: [THROW_ID_02] resolvedOpts.mergeType was customised to a wrong thing! It was given of a type: "${typeof n.mergeType}", equal to ${JSON.stringify(n.mergeType,null,4)}`);if(typeof n.joinRangesThatTouchEdges!="boolean")throw new Error(`ranges-merge: [THROW_ID_04] resolvedOpts.joinRangesThatTouchEdges was customised to a wrong thing! It was given of a type: "${typeof n.joinRangesThatTouchEdges}", equal to ${JSON.stringify(n.joinRangesThatTouchEdges,null,4)}`)}else throw new Error(`emlint: [THROW_ID_03] the second input argument must be a plain object. It was given as:
|
|
15
|
+
${JSON.stringify(t,null,4)} (type ${typeof t})`);else n=w({},Xe);let a=e.filter(s=>Array.isArray(s)).map(s=>[...s]).filter(s=>s[2]!==void 0||s[0]!==s[1]),o,u,l;n.progressFn?o=G(a,{progressFn:s=>{l=Math.floor(s/5),l!==u&&(u=l,n.progressFn(l))}}):o=G(a);let g=o.length-1;for(let s=g;s>0;s--)n.progressFn&&(l=Math.floor((1-s/g)*78)+21,l!==u&&l>u&&(u=l,n.progressFn(l))),(o[s][0]<=o[s-1][0]||!n.joinRangesThatTouchEdges&&o[s][0]<o[s-1][1]||n.joinRangesThatTouchEdges&&o[s][0]<=o[s-1][1])&&(o[s-1][0]=Math.min(o[s][0],o[s-1][0]),o[s-1][1]=Math.max(o[s][1],o[s-1][1]),o[s][2]!==void 0&&(o[s-1][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?+n.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 un={limitToBeAddedWhitespace:!1,limitLinebreaksCount:1,mergeType:1},Qe=class{constructor(e){Ee(this,"ranges");Ee(this,"opts");let t=w(w({},un),e);if(t.mergeType&&t.mergeType!==1&&t.mergeType!==2)if(S(t.mergeType)&&t.mergeType.trim()==="1")t.mergeType=1;else if(S(t.mergeType)&&t.mergeType.trim()==="2")t.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 t.mergeType}", equal to ${JSON.stringify(t.mergeType,null,4)}`);this.opts=t,this.ranges=[]}add(e,t,r){var o;if(e==null&&t==null)return;if(R(e)&&!R(t)){if(Array.isArray(e)){if(e.length){if(e.some(u=>Array.isArray(u))){e.forEach(u=>{Array.isArray(u)&&this.add(...u)});return}e.length&&_(+e[0])&&_(+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(t,null,0)})`)}else if(!R(e)&&R(t))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_13] the second input argument, "to" is set (${JSON.stringify(t,null,0)}) but first-one, "from" is not (${JSON.stringify(e,null,0)})`);let n=+e,a=+t;if(_(r)&&(r=String(r)),_(n)&&_(a)){if(R(r)&&!S(r)&&!_(r))throw new TypeError(`ranges-push/Ranges/add(): [THROW_ID_08] The third argument, the value to add, was given not as string but ${typeof r}, equal to:
|
|
16
|
+
${JSON.stringify(r,null,4)}`);if(R(this.ranges)&&Array.isArray(this.last())&&n===this.last()[1]){if(this.last()[1]=a,this.last()[2],this.last()[2]!==null&&R(r)){let u=this.last()[2]&&this.last()[2].length&&(!((o=this.opts)!=null&&o.mergeType)||this.opts.mergeType===1)?`${this.last()[2]}${r}`:r;this.opts.limitToBeAddedWhitespace&&(u=le(u,this.opts.limitLinebreaksCount)),S(u)&&!u.length||(this.last()[2]=u)}}else{this.ranges||(this.ranges=[]);let u=r!==void 0&&!(S(r)&&!r.length)?[n,a,r&&this.opts.limitToBeAddedWhitespace?le(r,this.opts.limitLinebreaksCount):r]:[n,a];this.ranges.push(u)}}else throw _(n)&&n>=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 a}" equal to: ${JSON.stringify(a,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 n}" equal to: ${JSON.stringify(n,null,4)}`)}push(e,t,r){this.add(e,t,r)}current(){return Array.isArray(this.ranges)&&this.ranges.length?(this.ranges=an(this.ranges,{mergeType:this.opts.mergeType}),this.ranges&&this.opts.limitToBeAddedWhitespace?this.ranges.map(e=>R(e[2])?[e[0],e[1],le(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])&&_(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}};function ze(e){return typeof e!="string"?e:e.length?[e]:[]}var Ze={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},gn=e=>e+1;function cn(e,t,r,n,a=!1,o=gn){let u=typeof r=="function"?r():r;if(+t<0&&a&&u==="EOL")return u;let l=w(w({},Ze),n);if(t>=e.length&&!a)return!1;let g=a?1:r.length,s=0,d=!1,p=!1,T=!1,m=l.maxMismatches,f=t,L=!1,D=!1,b=!1;function h(){return s===1&&m<l.maxMismatches-1}for(;e[f];){let $=o(f);if(l.trimBeforeMatching&&e[f].trim()===""){if(!e[$]&&a&&r==="EOL")return!0;f=o(f);continue}if(l&&!l.i&&l.trimCharsBeforeMatching&&l.trimCharsBeforeMatching.includes(e[f])||l!=null&&l.i&&l.trimCharsBeforeMatching&&l.trimCharsBeforeMatching.map(A=>A.toLowerCase()).includes(e[f].toLowerCase())){if(a&&r==="EOL"&&!e[$])return!0;f=o(f);continue}let y=$>f?r[r.length-g]:r[g-1];if(!l.i&&e[f]===y||l.i&&e[f].toLowerCase()===y.toLowerCase()){if(L||(L=!0),T||(T=!0),g===r.length){if(D=!0,m!==l.maxMismatches)return!1}else g===1&&(b=!0);if(g-=1,s++,h())return!1;if(!g)return s!==r.length||m===l.maxMismatches||!d?f:!1}else if(!d&&!s&&(d=!0),l.maxMismatches&&m&&f){m-=1;for(let A=0;A<=m;A++){let v=$>f?r[r.length-g+1+A]:r[g-2-A],x=e[o(f)];if(v&&(!l.i&&e[f]===v||l.i&&e[f].toLowerCase()===v.toLowerCase())&&(!l.firstMustMatch||g!==r.length)){if(s++,h())return!1;g-=2,L=!0;break}else if(x&&v&&(!l.i&&x===v||l.i&&x.toLowerCase()===v.toLowerCase())&&(!l.firstMustMatch||g!==r.length)){if(!s&&!l.hungry)return!1;g-=1,L=!0;break}else if(v===void 0&&m>=0&&L&&(!l.firstMustMatch||D)&&(!l.lastMustMatch||b))return f}L||(p=f)}else return f===0&&g===1&&!l.lastMustMatch&&T?0:!1;if(p!==!1&&p!==f&&(p=!1),g<1)return f;f=o(f)}if(g>0)return a&&u==="EOL"?!0:l&&l.maxMismatches>=g&&T?p||0:!1}function Oe(e,t,r,n,a){var d,p;if(V(a)&&Ye(a,"trimBeforeMatching")&&a&&typeof a.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${e}(): [THROW_ID_09] opts.trimBeforeMatching should be boolean!${Array.isArray(a.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let o=w(w({},Ze),a);if(typeof o.trimCharsBeforeMatching=="string"&&(o.trimCharsBeforeMatching=ze(o.trimCharsBeforeMatching)),o.trimCharsBeforeMatching=o.trimCharsBeforeMatching.map(T=>S(T)?T:String(T)),!S(t)||!t.length)return!1;if(!Number.isInteger(r)||r<0)throw new Error(`string-match-left-right/${e}(): [THROW_ID_03] the second argument should be a natural number. Currently it's of a type: ${typeof r}, equal to:
|
|
17
17
|
${JSON.stringify(r,null,4)}`);let u,l;if(S(n))u=[n];else if(Array.isArray(n))u=n;else if(!n)u=n;else if(typeof n=="function")u=[],u.push(n);else throw new Error(`string-match-left-right/${e}(): [THROW_ID_05] the third argument, whatToMatch, is neither string nor array of strings! It's ${typeof n}, equal to:
|
|
18
18
|
${JSON.stringify(n,null,4)}`);if(a&&!V(a))throw new Error(`string-match-left-right/${e}(): [THROW_ID_06] the fourth argument, options object, should be a plain object. Currently it's of a type "${typeof a}", and equal to:
|
|
19
|
-
${JSON.stringify(a,null,4)}`);let g=0,s="";if(o!=null&&o.trimCharsBeforeMatching&&o.trimCharsBeforeMatching.some((T,m)=>T.length>1?(g=m,s=T,!0):!1))throw new Error(`string-match-left-right/${e}(): [THROW_ID_07] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ${g} is longer than 1 character, ${s.length} (equals to ${s}). Please split it into separate characters and put into array as separate elements.`);if(!u||!Array.isArray(u)||Array.isArray(u)&&!u.length||Array.isArray(u)&&u.length===1&&S(u[0])&&!u[0].trim()){if(typeof o.cb=="function"){let m,
|
|
19
|
+
${JSON.stringify(a,null,4)}`);let g=0,s="";if(o!=null&&o.trimCharsBeforeMatching&&o.trimCharsBeforeMatching.some((T,m)=>T.length>1?(g=m,s=T,!0):!1))throw new Error(`string-match-left-right/${e}(): [THROW_ID_07] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ${g} is longer than 1 character, ${s.length} (equals to ${s}). Please split it into separate characters and put into array as separate elements.`);if(!u||!Array.isArray(u)||Array.isArray(u)&&!u.length||Array.isArray(u)&&u.length===1&&S(u[0])&&!u[0].trim()){if(typeof o.cb=="function"){let m,f=r;if((e==="matchLeftIncl"||e==="matchRight")&&(f+=1),e[5]==="L")for(let h=f;h--;){let $=t[h];if((!o.trimBeforeMatching||o.trimBeforeMatching&&$!==void 0&&$.trim())&&(!((d=o.trimCharsBeforeMatching)!=null&&d.length)||$!==void 0&&!o.trimCharsBeforeMatching.includes($))){m=h;break}}else if(e.startsWith("matchRight"))for(let h=f;h<t.length;h++){let $=t[h];if((!o.trimBeforeMatching||o.trimBeforeMatching&&$.trim())&&(!((p=o.trimCharsBeforeMatching)!=null&&p.length)||!o.trimCharsBeforeMatching.includes($))){m=h;break}}if(m===void 0)return!1;let L=t[m],D=m+1,b="";return D&&D>0&&(b=t.slice(0,D)),e[5]==="L"||m&&m>0&&(b=t.slice(m)),o.cb(L,b,m)}let T="";throw a||(T=" More so, the whole options object, the fourth input argument, is missing!"),new Error(`string-match-left-right/${e}(): [THROW_ID_08] the third argument, "whatToMatch", was given as an empty string. This means, you intend to match purely by a callback. The callback was not set though, the opts key "cb" is not set!${T}`)}for(let T=0,m=u.length;T<m;T++){l=typeof u[T]=="function";let f=u[T],L,D,b="",h=r;e==="matchRight"?h+=1:e==="matchLeft"&&(h-=1);let $=cn(t,h,f,o,l,y=>e[5]==="L"?y-1:y+1);if($&&l&&typeof f=="function"&&f()==="EOL")return f()&&(!o.cb||o.cb(L,b,D))?f():!1;if(Number.isInteger($)&&(D=e.startsWith("matchLeft")?$-1:$+1,e[5]==="L"?b=t.slice(0,$):b=t.slice(D)),D<0&&(D=void 0),t[D]&&(L=t[D]),Number.isInteger($)&&(!o.cb||o.cb(L,b,D)))return f}return!1}function et(e,t,r,n){return Oe("matchLeft",e,t,r,n)}function we(e,t,r,n){return Oe("matchRightIncl",e,t,r,n)}function q(e,t,r,n){return Oe("matchRight",e,t,r,n)}var mn={str:"",from:0,to:0,ifLeftSideIncludesThisThenCropTightly:"",ifLeftSideIncludesThisCropItToo:"",ifRightSideIncludesThisThenCropTightly:"",ifRightSideIncludesThisCropItToo:"",extendToOneSide:!1,wipeAllWhitespaceOnLeft:!1,wipeAllWhitespaceOnRight:!1,addSingleSpaceToPreventAccidentalConcatenation:!1};function ae(e){var l;let t=/^[0-9a-zA-Z]+$/;function r(g){return S(g)&&!g.trim()}if(V(e)){if(!Object.keys(e).length)throw new Error("string-range-expander: [THROW_ID_02] Input must be a plain object but it was given as a plain object without any keys.")}else{let g;throw e===void 0?g="but it is missing completely.":e===null?g="but it was given as null.":g=`but it was given as ${typeof e}, equal to:
|
|
20
20
|
${JSON.stringify(e,null,4)}.`,new Error(`string-range-expander: [THROW_ID_01] Input must be a plain object ${g}`)}if(!_(e.from))throw new Error(`string-range-expander: [THROW_ID_03] The input's "from" value resolvedOpts.from, is not a number! Currently it's given as ${typeof e.from}, equal to ${JSON.stringify(e.from,null,0)}`);if(!_(e.to))throw new Error(`string-range-expander: [THROW_ID_04] The input's "to" value resolvedOpts.to, is not a number! Currently it's given as ${typeof e.to}, equal to ${JSON.stringify(e.to,null,0)}`);if(e!=null&&e.str&&!e.str[e.from]&&e.from!==e.to)throw new Error(`string-range-expander: [THROW_ID_05] The given input string resolvedOpts.str ("${e.str}") must contain the character at index "from" ("${e.from}")`);if(e!=null&&e.str&&!e.str[e.to-1])throw new Error(`string-range-expander: [THROW_ID_06] The given input string, resolvedOpts.str ("${e.str}") must contain the character at index before "to" ("${e.to-1}")`);if(e.from>e.to)throw new Error(`string-range-expander: [THROW_ID_07] The given "from" index, "${e.from}" is greater than "to" index, "${e.to}". That's wrong!`);if(e.extendToOneSide===null||S(e.extendToOneSide)&&e.extendToOneSide!=="left"&&e.extendToOneSide!=="right"||!S(e.extendToOneSide)&&e.extendToOneSide!==void 0&&e.extendToOneSide)throw new Error(`string-range-expander: [THROW_ID_08] The resolvedOpts.extendToOneSide value is not recognisable! It's set to: "${e.extendToOneSide}" (${typeof e.extendToOneSide}). It has to be either Boolean "false" or strings "left" or "right"`);let n=w(w({},mn),e);if(Array.isArray(n.ifLeftSideIncludesThisThenCropTightly)){let g,s;if(n.ifLeftSideIncludesThisThenCropTightly.every((d,p)=>S(d)?!0:(g=p,s=d,!1)))n.ifLeftSideIncludesThisThenCropTightly=n.ifLeftSideIncludesThisThenCropTightly.join("");else throw new Error(`string-range-expander: [THROW_ID_09] The resolvedOpts.ifLeftSideIncludesThisThenCropTightly was set to an array:
|
|
21
21
|
${JSON.stringify(n.ifLeftSideIncludesThisThenCropTightly,null,4)}. Now, that array contains not only string elements. For example, an element at index ${g} is of a type ${typeof s} (equal to ${JSON.stringify(s,null,0)}).`)}let a=n.str,o=n.from,u=n.to;if(n.extendToOneSide!=="right"&&(r(a[o-1])&&(r(a[o-2])||n.ifLeftSideIncludesThisCropItToo.includes(a[o-2]))||a[o-1]&&n.ifLeftSideIncludesThisCropItToo.includes(a[o-1])||n.wipeAllWhitespaceOnLeft&&r(a[o-1]))){for(let g=o;g--;)if(!n.ifLeftSideIncludesThisCropItToo.includes(a[g])){if(a[g].trim()){n.wipeAllWhitespaceOnLeft||n.ifLeftSideIncludesThisCropItToo.includes(a[g+1])?o=g+1:o=g+2;break}else if(g===0){n.wipeAllWhitespaceOnLeft?o=0:o=1;break}}}if(n.extendToOneSide!=="left"&&(r(a[u])&&(n.wipeAllWhitespaceOnRight||r(a[u+1]))||n.ifRightSideIncludesThisCropItToo.includes(a[u]))){for(let g=u,s=a.length;g<s;g++)if(!n.ifRightSideIncludesThisCropItToo.includes(a[g])&&((l=a[g])!=null&&l.trim())){n.wipeAllWhitespaceOnRight||n.ifRightSideIncludesThisCropItToo.includes(a[g-1])?u=g:u=g-1;break}}return(n.extendToOneSide!=="right"&&S(n.ifLeftSideIncludesThisThenCropTightly)&&n.ifLeftSideIncludesThisThenCropTightly&&(a[o-2]&&n.ifLeftSideIncludesThisThenCropTightly.includes(a[o-2])||a[o-1]&&n.ifLeftSideIncludesThisThenCropTightly.includes(a[o-1]))||n.extendToOneSide!=="left"&&S(n.ifRightSideIncludesThisThenCropTightly)&&n.ifRightSideIncludesThisThenCropTightly&&(a[u+1]&&n.ifRightSideIncludesThisThenCropTightly.includes(a[u+1])||a[u]&&n.ifRightSideIncludesThisThenCropTightly.includes(a[u])))&&(n.extendToOneSide!=="right"&&r(a[o-1])&&!n.wipeAllWhitespaceOnLeft&&(o-=1),n.extendToOneSide!=="left"&&r(a[u])&&!n.wipeAllWhitespaceOnRight&&(u+=1)),n.addSingleSpaceToPreventAccidentalConcatenation&&a[o-1]&&a[o-1].trim()&&a[u]&&a[u].trim()&&(!n.ifLeftSideIncludesThisThenCropTightly&&!n.ifRightSideIncludesThisThenCropTightly||!((!n.ifLeftSideIncludesThisThenCropTightly||n.ifLeftSideIncludesThisThenCropTightly.includes(a[o-1]))&&(!n.ifRightSideIncludesThisThenCropTightly||a[u]&&n.ifRightSideIncludesThisThenCropTightly.includes(a[u]))))&&(t.test(a[o-1])||t.test(a[u]))?[o,u," "]:[o,u]}var Wr=rn(Jt(),1);var z="\xA0";function Br({str:e,idx:t=0,stopAtNewlines:r=!1,stopAtRawNbsp:n=!1}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),!e[t+1]))return null;if(e[t+1]&&(e[t+1].trim()||r&&`
|
|
22
22
|
\r`.includes(e[t+1])||n&&e[t+1]===z))return t+1;if(e[t+2]&&(e[t+2].trim()||r&&`
|
|
@@ -24,18 +24,18 @@ ${JSON.stringify(n.ifLeftSideIncludesThisThenCropTightly,null,4)}. Now, that arr
|
|
|
24
24
|
\r`.includes(e[a])||n&&e[a]===z)return a;return null}function C(e,t=0){return Br({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}function Jr({str:e,idx:t,stopAtNewlines:r,stopAtRawNbsp:n}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),t<1))return null;if(e[~-t]&&(e[~-t].trim()||r&&`
|
|
25
25
|
\r`.includes(e[~-t])||n&&e[~-t]===z))return~-t;if(e[t-2]&&(e[t-2].trim()||r&&`
|
|
26
26
|
\r`.includes(e[t-2])||n&&e[t-2]===z))return t-2;for(let a=t;a--;)if(e[a]&&(e[a].trim()||r&&`
|
|
27
|
-
\r`.includes(e[a])||n&&e[a]===z))return a;return null}function de(e,t=0){return Jr({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}var kt="6.0.
|
|
27
|
+
\r`.includes(e[a])||n&&e[a]===z))return a;return null}function de(e,t=0){return Jr({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}var kt="6.0.11";var jr=kt,E=new Qe({limitToBeAddedWhitespace:!0}),jt={lineLengthLimit:500,removeIndentations:!0,removeLineBreaks:!1,removeHTMLComments:!1,removeCSSComments:!0,reportProgressFunc:null,reportProgressFuncFrom:0,reportProgressFuncTo:100,breakToTheLeftOf:["</td","<html","</html","<head","</head","<meta","<link","<table","<script","<\/script","<!DOCTYPE","<style","</style","<title","<body","@media","</body","<!--[if","<!--<![endif","<![endif]"],mindTheInlineTags:["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"]};function Ur(e,t){let r=Date.now();if(!S(e))throw e===void 0?new Error("html-crush: [THROW_ID_01] the first input argument is completely missing! It should be given as string."):new Error(`html-crush: [THROW_ID_02] the first input argument must be string! It was given as "${typeof e}", equal to:
|
|
28
28
|
${JSON.stringify(e,null,4)}`);if(t&&!V(t))throw new Error(`html-crush: [THROW_ID_03] the second input argument, options object, should be a plain object but it was given as type ${typeof t}, equal to ${JSON.stringify(t,null,4)}`);if(t&&Array.isArray(t.breakToTheLeftOf)&&t.breakToTheLeftOf.length){for(let i=0,te=t.breakToTheLeftOf.length;i<te;i++)if(!S(t.breakToTheLeftOf[i]))throw new TypeError(`html-crush: [THROW_ID_05] the resolvedOpts.breakToTheLeftOf array contains non-string elements! For example, element at index ${i} is of a type "${typeof t.breakToTheLeftOf[i]}" and is equal to:
|
|
29
|
-
${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=w(w({},jt),t);typeof n.removeHTMLComments=="boolean"&&(n.removeHTMLComments=n.removeHTMLComments?1:0);let a="";Array.isArray(n.breakToTheLeftOf)&&n.breakToTheLeftOf.length&&(a=[...new Set(n.breakToTheLeftOf.map(i=>i[0]))].join(""));let o={removeHTMLComments:!1,removeCSSComments:!1},u=null,l=null,g=!1,s=0,d=0,p=!1,T=!1,m=null,
|
|
29
|
+
${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=w(w({},jt),t);typeof n.removeHTMLComments=="boolean"&&(n.removeHTMLComments=n.removeHTMLComments?1:0);let a="";Array.isArray(n.breakToTheLeftOf)&&n.breakToTheLeftOf.length&&(a=[...new Set(n.breakToTheLeftOf.map(i=>i[0]))].join(""));let o={removeHTMLComments:!1,removeCSSComments:!1},u=null,l=null,g=!1,s=0,d=0,p=!1,T=!1,m=null,f=null,L=null,D=null,b,h=null,$=null,y=null,A=null,v=null,x=null,Z=">};",ee="<",Ut="!",Gt=">",qt="<",He="{},:;<>~+",be=He,Te=He,j=!0,N=e.length,Kt=Math.floor(N/2),We=.01,Be;n.reportProgressFunc&&(Be=Math.floor(n.reportProgressFuncTo-(n.reportProgressFuncTo-n.reportProgressFuncFrom)*We-n.reportProgressFuncFrom));let F,se=0,I=`
|
|
30
30
|
`;if(e.includes(`\r
|
|
31
31
|
`)?I=`\r
|
|
32
|
-
`:e.includes("\r")&&(I="\r"),N){for(let i=0;i<N;i++){if(n.reportProgressFunc&&(N>1e3&&N<2e3?i===Kt&&n.reportProgressFunc(Math.floor((n.reportProgressFuncTo-n.reportProgressFuncFrom)/2)):N>=2e3&&(F=n.reportProgressFuncFrom+Math.floor(i/N*(Be||1)),F!==se&&(se=F,n.reportProgressFunc(F)))),d++,!b&&p&&e[i]==="}"&&e[i-1]==="}"&&(s+1>=n.lineLengthLimit?(E.push(i,i,I),s=0):(
|
|
33
|
-
`||e[c]==="\r"||e[c].trim()){c+1<i&&E.push(c+1,i);break}}D=null,b=!1,i+=8;continue}if(!b&&!p&&e.startsWith("<script",i)&&!W(e[i+7])){D=i,b=!0;let c="";(n.removeLineBreaks||n.removeIndentations)&&l!==null&&(l>0&&(c=I),E.push(l,i,c)),l=null,u=null}if(v!==null&&A===null&&!/\w/.test(e[i])){A=e.slice(v,i);let c=C(e,~-i);typeof c=="number"&&e[c]===">"&&!e[i].trim()&&C(e,i)?E.push(i,C(e,i)):c&&e[c]==="/"&&e[C(e,c)]===">"&&(!e[i].trim()&&C(e,i)&&E.push(i,C(e,i)),e[c+1]!==">"&&C(e,c+1)&&E.push(c+1,C(e,c+1)))}if(!b&&!p&&!m&&e[~-i]==="<"&&v===null&&(/\w/.test(e[i])?v=i:e[C(e,~-i)]==="/"&&/\w/.test(e[C(e,C(e,~-i))]||"")&&(v=C(e,C(e,~-i)))),!b&&(p||m)&&
|
|
32
|
+
`:e.includes("\r")&&(I="\r"),N){for(let i=0;i<N;i++){if(n.reportProgressFunc&&(N>1e3&&N<2e3?i===Kt&&n.reportProgressFunc(Math.floor((n.reportProgressFuncTo-n.reportProgressFuncFrom)/2)):N>=2e3&&(F=n.reportProgressFuncFrom+Math.floor(i/N*(Be||1)),F!==se&&(se=F,n.reportProgressFunc(F)))),d++,!b&&p&&e[i]==="}"&&e[i-1]==="}"&&(s+1>=n.lineLengthLimit?(E.push(i,i,I),s=0):(h=i,$=i,y=" ")),b&&typeof b=="number"&&i>=b&&(b=void 0),D!==null&&e.startsWith("<\/script",i)&&!W(e[i+8])){if((n.removeIndentations||n.removeLineBreaks)&&i>0&&e[~-i]&&!e[~-i].trim()){for(let c=i;c--;)if(e[c]===`
|
|
33
|
+
`||e[c]==="\r"||e[c].trim()){c+1<i&&E.push(c+1,i);break}}D=null,b=!1,i+=8;continue}if(!b&&!p&&e.startsWith("<script",i)&&!W(e[i+7])){D=i,b=!0;let c="";(n.removeLineBreaks||n.removeIndentations)&&l!==null&&(l>0&&(c=I),E.push(l,i,c)),l=null,u=null}if(v!==null&&A===null&&!/\w/.test(e[i])){A=e.slice(v,i);let c=C(e,~-i);typeof c=="number"&&e[c]===">"&&!e[i].trim()&&C(e,i)?E.push(i,C(e,i)):c&&e[c]==="/"&&e[C(e,c)]===">"&&(!e[i].trim()&&C(e,i)&&E.push(i,C(e,i)),e[c+1]!==">"&&C(e,c+1)&&E.push(c+1,C(e,c+1)))}if(!b&&!p&&!m&&e[~-i]==="<"&&v===null&&(/\w/.test(e[i])?v=i:e[C(e,~-i)]==="/"&&/\w/.test(e[C(e,C(e,~-i))]||"")&&(v=C(e,C(e,~-i)))),!b&&(p||m)&&f!==null&&e[i]==="*"&&e[i+1]==="/"&&([h,$]=ae({str:e,from:f,to:i+2,ifLeftSideIncludesThisThenCropTightly:be||"",ifRightSideIncludesThisThenCropTightly:Te||""}),f=null,h!=null?E.push(h,$):(s+=1,i+=1),b=i+2),!b&&(p||m)&&f===null&&e[i]==="/"&&e[i+1]==="*"&&(o.removeCSSComments||(o.removeCSSComments=!0),n.removeCSSComments&&(f=i)),T&&e.startsWith("![endif",i+1)&&(T=!1),!b&&!p&&!m&&L!==null){let c;e.startsWith("-->",i)?c=3:e[i]===">"&&e[i-1]==="]"&&(c=1),c&&([h,$]=ae({str:e,from:L,to:i+c}),L=null,h!=null?n.lineLengthLimit&&d-($-h)>=n.lineLengthLimit?(E.push(h,$,I),d=-c):(E.push(h,$),d-=$-h):(s+=c-1,i+=c-1),b=i+c)}if(!b&&!p&&!m&&(e.startsWith("<!--",i)||n.removeHTMLComments===2&&e.startsWith("<![endif",i))&&L===null&&(e.startsWith("[if",i+4)?(T||(T=!0),n.removeHTMLComments===2&&(L=i)):n.removeHTMLComments&&(!T||n.removeHTMLComments===2)&&(L=i),o.removeHTMLComments||(o.removeHTMLComments=!0)),!b&&p&&f===null&&e.startsWith("</style",i)&&!W(e[i+7])?p=!1:!b&&!p&&f===null&&e.startsWith("<style",i)&&!W(e[i+6])&&(p=!0,(n.removeLineBreaks||n.removeIndentations)&&n.breakToTheLeftOf.includes("<style")&&e.startsWith(' type="text/css">',i+6)&&e[i+24]&&E.push(i+23,i+23,I)),!b&&!m&&`"'`.includes(e[i])&&e.endsWith("style=",i)&&(m=i),!b&&!e[i].trim())l===null&&(l=i);else if(!b&&!((p||m)&&f!==null)){if(l!==null){if(n.removeLineBreaks&&(s+=1),j)j=!1,(n.removeIndentations||n.removeLineBreaks)&&E.push(0,i);else if(n.removeIndentations&&!n.removeLineBreaks&&(!g&&u!==null&&i>u?E.push(u+1,i):l+1<i&&(e.endsWith("]>",l)||e.endsWith("-->",l)||e.startsWith("<![",i)||e.startsWith("<!--<![",i)?E.push(l,i):e[l]===" "?E.push(l+1,i):e[~-i]===" "?E.push(l,~-i):E.push(l,i," "))),n.removeLineBreaks||m){if(a.includes(e[i])&&we(e,i,n.breakToTheLeftOf)){!(`\r
|
|
34
34
|
`.includes(e[~-i])&&l===~-i)&&!(e[~-i]===`
|
|
35
|
-
`&&e[i-2]==="\r"&&l===i-2)&&E.push(l,i,I),
|
|
35
|
+
`&&e[i-2]==="\r"&&l===i-2)&&E.push(l,i,I),h=null,$=null,y=null,l=null,s=1;continue}let c=" ";e[i]==="<"&&q(e,i,n.mindTheInlineTags,{cb:U=>!U||!/\w/.test(U)})||(e[~-l]&&Gt.includes(e[~-l])&&qt.includes(e[i])||(p||m)&&f===null&&(be.includes(e[~-l])||Te.includes(e[i]))||e.startsWith("!important",i)&&!T||m&&(e[~-l]==="'"||e[~-l]==='"')||e[~-l]==="}"&&e.startsWith("</style",i)||e[i]===">"&&(`'"`.includes(e[de(e,i)])||e[C(e,i)]==="<")||e[i]==="/"&&e[C(e,i)]===">")&&(c="",e[i]==="/"&&e[i+1]===">"&&C(e,i)&&C(e,i)>i+1&&(E.push(i+1,C(e,i)),s-=C(e,i)-i+1)),p&&e[i]==="}"&&l&&e[l-1]==="}"&&(c=" "),c!=null&&c.length&&(s+=1),n.lineLengthLimit?s>=n.lineLengthLimit||!e[i+1]||e[i]===">"||e[i]==="/"&&e[i+1]===">"?((s>n.lineLengthLimit||s===n.lineLengthLimit&&e[i+1]&&e[i+1].trim()&&!Z.includes(e[i])&&!ee.includes(e[i+1]))&&(c=I,s=1),(s>n.lineLengthLimit||!(c===" "&&i===l+1))&&(E.push(l,i,c),u=null),h=null,$=null,y=null):(h===null||l<h)&&(h=l,$=i,y=c):i===l+1&&c===" "||E.push(l,i,c)}l=null,g||(g=!0)}else j&&(j=!1),n.removeLineBreaks&&(s+=1);g||(g=!0)}if(!b&&!j&&i!==0&&n.removeLineBreaks&&(n.lineLengthLimit||a)&&!e.startsWith("</a",i)){if(a&&we(e,i,n.breakToTheLeftOf)&&e.slice(0,i).trim()&&(!e.startsWith("<![endif]",i)||!et(e,i,"<!--"))){E.push(i,i,I),h=null,$=null,y=null,s=1;continue}else if(n.lineLengthLimit&&s<=n.lineLengthLimit){if(!e[i+1]||ee.includes(e[i])&&!Ut.includes(e[i])||Z.includes(e[i])||!e[i].trim()){if(h!==null&&$!==null&&(h!==$||y!=null&&y.length)){let c=y;e[i].trim()&&e[i+1]&&e[i+1].trim()&&s+(y?y.length:0)>n.lineLengthLimit&&(c=I),(s+(c?c.length:0)>n.lineLengthLimit||!(c===" "&&$===h+1&&e[h]===" "))&&(e[~-h]==="}"&&e[$]==="{"||(E.push(h,$,c),u=null))}e[i].trim()&&(ee.includes(e[i])||e[~-i]&&Z.includes(e[~-i]))&&S(x)&&(!A||!n.mindTheInlineTags.includes(A))&&!(e[i]==="<"&&q(e,i,n.mindTheInlineTags,{cb:c=>!c||!/\w/.test(c)}))&&!(e[i]==="<"&&q(e,i,n.mindTheInlineTags,{trimCharsBeforeMatching:"/",cb:c=>!c||!/\w/.test(c)}))?(h=i,$=i,y=null):f===null&&h!==null&&(m||!n.mindTheInlineTags||!Array.isArray(n.mindTheInlineTags)||Array.isArray(n.mindTheInlineTags.length)&&!n.mindTheInlineTags.length||!S(A)||Array.isArray(n.mindTheInlineTags)&&n.mindTheInlineTags.length&&S(A)&&!n.mindTheInlineTags.includes(A))&&!(e[i]==="<"&&q(e,i,n.mindTheInlineTags,{trimCharsBeforeMatching:"/",cb:c=>!c||!/\w/.test(c)}))&&(h=null,$=null,y=null)}}else if(n.lineLengthLimit)if(ee.includes(e[i])&&!(e[i]==="<"&&q(e,i,n.mindTheInlineTags,{trimCharsBeforeMatching:"/",cb:c=>!c||!/\w/.test(c)})))if(h!==null&&$!==null&&(h!==$||y!=null&&y.length)){let c=y!=null&&y.length?y.length:0;s-($-h-c)-1>n.lineLengthLimit||(E.push(h,$,y),s-($-h-c)-1===n.lineLengthLimit&&(E.push(i,i,I),s=0),h=null,$=null,y=null)}else E.push(i,i,I),s=0;else e[i+1]&&Z.includes(e[i])&&S(A)&&Array.isArray(n.mindTheInlineTags)&&n.mindTheInlineTags.length&&!n.mindTheInlineTags.includes(A)?h!==null&&$!==null&&(h!==$||y!=null&&y.length)||(E.push(i+1,i+1,I),s=0):e[i].trim()&&(e[i+1]||h!==null&&$!==null&&(h!==$||y!=null&&y.length)&&E.push(h,$,I))}if(!b&&!j&&n.removeLineBreaks&&n.lineLengthLimit&&s>=n.lineLengthLimit&&h!==null&&$!==null&&!Z.includes(e[i])&&!ee.includes(e[i])&&!"/".includes(e[i])&&!(s===n.lineLengthLimit&&e[i+1]&&!e[i+1].trim())){let c=I;e[i+1]&&!e[i+1].trim()&&s===n.lineLengthLimit&&(c=y),c===I&&!e[~-h].trim()&&de(e,h)&&(h=de(e,h)+1),E.push(h,$,c),s=i-$,e[i].length&&(s+=1),h=null,$=null,y=null}if((!b&&e[i]===`
|
|
36
36
|
`||e[i]==="\r"&&(!e[i+1]||e[i+1]&&e[i+1]!==`
|
|
37
37
|
`))&&(u=i,g&&(g=!1),!n.removeLineBreaks&&l!==null&&l<i&&e[i+1]&&e[i+1]!=="\r"&&e[i+1]!==`
|
|
38
|
-
`&&E.push(l,i)),e[i+1]||(p&&
|
|
38
|
+
`&&E.push(l,i)),e[i+1]||(p&&f!==null?E.push(...ae({str:e,from:f,to:i,ifLeftSideIncludesThisThenCropTightly:be||"",ifRightSideIncludesThisThenCropTightly:Te||""})):l&&e[i]!==`
|
|
39
39
|
`&&e[i]!=="\r"?E.push(l,i+1):l&&(e[i]==="\r"&&e[i+1]===`
|
|
40
40
|
`||e[i]===`
|
|
41
41
|
`&&e[i-1]!=="\r")&&E.push(l,i)),!b&&m&&m<i&&e[m]===e[i]&&(m=null),!b&&!p&&e.startsWith("<pre",i)&&!W(e[i+4])){let c=e.indexOf("</pre",i+5);c>0&&(b=c)}if(!b&&!p&&e.startsWith("<code",i)&&!W(e[i+5])){let c=e.indexOf("</code",i+5);c>0&&(b=c)}if(!b&&e.startsWith("<![CDATA[",i)){let c=e.indexOf("]]>",i+9);c>0&&(b=c)}!b&&!p&&!m&&v!==null&&e[i]===">"&&(e[C(e,i)]==="<"&&(x=A),v=null,A=null),e[i]==="<"&&x!==null&&(x=null),p&&e[i]==="{"&&e[i+1]==="{"&&e.indexOf("}}")!==-1&&(b=e.indexOf("}}")+2);let te=!0}if(E.current()){let i=E.current();E.wipe();let te=n.reportProgressFuncTo-(n.reportProgressFuncTo-n.reportProgressFuncFrom)*We,c=Ke(e,i,Yt=>{n.reportProgressFunc&&N>=2e3&&(F=Math.floor(te+(n.reportProgressFuncTo-te)*(Yt/100)),F!==se&&(se=F,n.reportProgressFunc(F)))}),U=c.length;return{log:{timeTakenInMilliseconds:Date.now()-r,originalLength:N,cleanedLength:U,bytesSaved:Math.max(N-U,0),percentageReducedOfOriginal:N?Math.round(Math.max(N-U,0)*100/N):0},ranges:i,applicableOpts:o,result:c}}}return{log:{timeTakenInMilliseconds:Date.now()-r,originalLength:N,cleanedLength:N,bytesSaved:0,percentageReducedOfOriginal:0},applicableOpts:o,ranges:null,result:e}}return on(Gr);})();
|
|
@@ -50,7 +50,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=w(w({},jt),t);typeof n.r
|
|
|
50
50
|
/**
|
|
51
51
|
* @name ranges-merge
|
|
52
52
|
* @fileoverview Merge and sort string index ranges
|
|
53
|
-
* @version 9.0.
|
|
53
|
+
* @version 9.0.8
|
|
54
54
|
* @author Roy Revelt, Codsen Ltd
|
|
55
55
|
* @license MIT
|
|
56
56
|
* {@link https://codsen.com/os/ranges-merge/}
|
|
@@ -58,7 +58,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=w(w({},jt),t);typeof n.r
|
|
|
58
58
|
/**
|
|
59
59
|
* @name ranges-apply
|
|
60
60
|
* @fileoverview Take an array of string index ranges, delete/replace the string according to them
|
|
61
|
-
* @version 7.0.
|
|
61
|
+
* @version 7.0.8
|
|
62
62
|
* @author Roy Revelt, Codsen Ltd
|
|
63
63
|
* @license MIT
|
|
64
64
|
* {@link https://codsen.com/os/ranges-apply/}
|
|
@@ -74,7 +74,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=w(w({},jt),t);typeof n.r
|
|
|
74
74
|
/**
|
|
75
75
|
* @name codsen-utils
|
|
76
76
|
* @fileoverview Various utility functions
|
|
77
|
-
* @version 1.
|
|
77
|
+
* @version 1.4.0
|
|
78
78
|
* @author Roy Revelt, Codsen Ltd
|
|
79
79
|
* @license MIT
|
|
80
80
|
* {@link https://codsen.com/os/codsen-utils/}
|
|
@@ -82,7 +82,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=w(w({},jt),t);typeof n.r
|
|
|
82
82
|
/**
|
|
83
83
|
* @name ranges-push
|
|
84
84
|
* @fileoverview Gather string index ranges
|
|
85
|
-
* @version 7.0.
|
|
85
|
+
* @version 7.0.8
|
|
86
86
|
* @author Roy Revelt, Codsen Ltd
|
|
87
87
|
* @license MIT
|
|
88
88
|
* {@link https://codsen.com/os/ranges-push/}
|
|
@@ -98,7 +98,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=w(w({},jt),t);typeof n.r
|
|
|
98
98
|
/**
|
|
99
99
|
* @name string-match-left-right
|
|
100
100
|
* @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
|
|
101
|
-
* @version 9.0.
|
|
101
|
+
* @version 9.0.11
|
|
102
102
|
* @author Roy Revelt, Codsen Ltd
|
|
103
103
|
* @license MIT
|
|
104
104
|
* {@link https://codsen.com/os/string-match-left-right/}
|
|
@@ -106,7 +106,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=w(w({},jt),t);typeof n.r
|
|
|
106
106
|
/**
|
|
107
107
|
* @name string-range-expander
|
|
108
108
|
* @fileoverview Expands string index ranges within whitespace boundaries until letters are met
|
|
109
|
-
* @version 4.0.
|
|
109
|
+
* @version 4.0.8
|
|
110
110
|
* @author Roy Revelt, Codsen Ltd
|
|
111
111
|
* @license MIT
|
|
112
112
|
* {@link https://codsen.com/os/string-range-expander/}
|
|
@@ -114,7 +114,7 @@ ${JSON.stringify(t.breakToTheLeftOf[i],null,4)}`)}let n=w(w({},jt),t);typeof n.r
|
|
|
114
114
|
/**
|
|
115
115
|
* @name string-left-right
|
|
116
116
|
* @fileoverview Looks up the first non-whitespace character to the left/right of a given index
|
|
117
|
-
* @version 6.0.
|
|
117
|
+
* @version 6.0.11
|
|
118
118
|
* @author Roy Revelt, Codsen Ltd
|
|
119
119
|
* @license MIT
|
|
120
120
|
* {@link https://codsen.com/os/string-left-right/}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-crush",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.11",
|
|
4
4
|
"description": "Minify email templates",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"breaks",
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"codsen-utils": "^1.
|
|
84
|
-
"ranges-apply": "^7.0.
|
|
85
|
-
"ranges-push": "^7.0.
|
|
86
|
-
"string-left-right": "^6.0.
|
|
87
|
-
"string-match-left-right": "^9.0.
|
|
88
|
-
"string-range-expander": "^4.0.
|
|
89
|
-
"test-mixer": "^4.1.
|
|
83
|
+
"codsen-utils": "^1.4.0",
|
|
84
|
+
"ranges-apply": "^7.0.8",
|
|
85
|
+
"ranges-push": "^7.0.8",
|
|
86
|
+
"string-left-right": "^6.0.11",
|
|
87
|
+
"string-match-left-right": "^9.0.11",
|
|
88
|
+
"string-range-expander": "^4.0.8",
|
|
89
|
+
"test-mixer": "^4.1.8"
|
|
90
90
|
}
|
|
91
91
|
}
|