string-left-right 5.0.11 → 5.0.12

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.
@@ -1,24 +1,24 @@
1
1
  /**
2
2
  * @name string-left-right
3
3
  * @fileoverview Looks up the first non-whitespace character to the left/right of a given index
4
- * @version 5.0.11
4
+ * @version 5.0.12
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-left-right/}
8
8
  */
9
9
 
10
- import c from"lodash.isplainobject";import f from"lodash.clonedeep";var S="5.0.11";var C=S,h="\xA0";function I(n){let e={value:n,hungry:!1,optional:!1};return(e.value.endsWith("?*")||e.value.endsWith("*?"))&&e.value.length>2?(e.value=e.value.slice(0,e.value.length-2),e.optional=!0,e.hungry=!0):e.value.endsWith("?")&&e.value.length>1?(e.value=e.value.slice(0,~-e.value.length),e.optional=!0):e.value.endsWith("*")&&e.value.length>1&&(e.value=e.value.slice(0,~-e.value.length),e.hungry=!0),e}function R(n){return typeof n=="number"}function p(n){return typeof n=="string"}function E({str:n,idx:e=0,stopAtNewlines:l=!1,stopAtRawNbsp:u=!1}){if(typeof n!="string"||!n.length||((!e||typeof e!="number")&&(e=0),!n[e+1]))return null;if(n[e+1]&&(n[e+1].trim()||l&&`
10
+ import c from"lodash.isplainobject";import f from"lodash.clonedeep";var S="5.0.12";var C=S,h="\xA0";function I(n){let e={value:n,hungry:!1,optional:!1};return(e.value.endsWith("?*")||e.value.endsWith("*?"))&&e.value.length>2?(e.value=e.value.slice(0,e.value.length-2),e.optional=!0,e.hungry=!0):e.value.endsWith("?")&&e.value.length>1?(e.value=e.value.slice(0,~-e.value.length),e.optional=!0):e.value.endsWith("*")&&e.value.length>1&&(e.value=e.value.slice(0,~-e.value.length),e.hungry=!0),e}function R(n){return typeof n=="number"}function p(n){return typeof n=="string"}function E({str:n,idx:e=0,stopAtNewlines:l=!1,stopAtRawNbsp:u=!1}){if(typeof n!="string"||!n.length||((!e||typeof e!="number")&&(e=0),!n[e+1]))return null;if(n[e+1]&&(n[e+1].trim()||l&&`
11
11
  \r`.includes(n[e+1])||u&&n[e+1]===h))return e+1;if(n[e+2]&&(n[e+2].trim()||l&&`
12
12
  \r`.includes(n[e+2])||u&&n[e+2]===h))return e+2;for(let t=e+1,m=n.length;t<m;t++)if(n[t].trim()||l&&`
13
13
  \r`.includes(n[t])||u&&n[t]===h)return t;return null}function y(n,e=0){return E({str:n,idx:e,stopAtNewlines:!1,stopAtRawNbsp:!1})}function j(n,e){return E({str:n,idx:e,stopAtNewlines:!0,stopAtRawNbsp:!1})}function k(n,e){return E({str:n,idx:e,stopAtNewlines:!1,stopAtRawNbsp:!0})}function D({str:n,idx:e,stopAtNewlines:l,stopAtRawNbsp:u}){if(typeof n!="string"||!n.length||((!e||typeof e!="number")&&(e=0),e<1))return null;if(n[~-e]&&(n[~-e].trim()||l&&`
14
14
  \r`.includes(n[~-e])||u&&n[~-e]===h))return~-e;if(n[e-2]&&(n[e-2].trim()||l&&`
15
15
  \r`.includes(n[e-2])||u&&n[e-2]===h))return e-2;for(let t=e;t--;)if(n[t]&&(n[t].trim()||l&&`
16
- \r`.includes(n[t])||u&&n[t]===h))return t;return null}function V(n,e=0){return D({str:n,idx:e,stopAtNewlines:!1,stopAtRawNbsp:!1})}function M(n,e){return D({str:n,idx:e,stopAtNewlines:!0,stopAtRawNbsp:!1})}function W(n,e){return D({str:n,idx:e,stopAtNewlines:!1,stopAtRawNbsp:!0})}function O(n,e,l,u,t){if(typeof e!="string"||!e.length||(typeof l!="number"&&(l=0),n==="right"&&!e[l+1]||n==="left"&&!e[~-l]))return null;let m=l,o=[],a,i,s,r=0;for(;r<t.length;){if(!p(t[r])||!t[r].length){r+=1;continue}let{value:$,optional:w,hungry:T}=I(t[r]),g=n==="right"?y(e,m):V(e,m);if(u.i&&e[g].toLowerCase()===$.toLowerCase()||!u.i&&e[g]===$){let N=n==="right"?y(e,g):V(e,g);T&&(u.i&&e[N].toLowerCase()===$.toLowerCase()||!u.i&&e[N]===$)?s=!0:r+=1,typeof g=="number"&&n==="right"&&g>m+1?o.push([m+1,g]):n==="left"&&typeof g=="number"&&g<~-m&&o.unshift([g+1,m]),m=g,n==="right"?(a===void 0&&(a=g),i=g):(i===void 0&&(i=g),a=g)}else if(w){r+=1;continue}else if(s){r+=1,s=void 0;continue}else return null}return a===void 0||i===void 0?null:{gaps:o,leftmostChar:a,rightmostChar:i}}var d={i:!1};function J(n,e,...l){if(!l||!l.length)throw new Error("string-left-right/leftSeq(): only two input arguments were passed! Did you intend to use left() method instead?");let u;return c(l[0])?u={...d,...l.shift()}:u=d,O("left",n,e,u,Array.from(l).reverse())}function L(n,e,...l){if(!l||!l.length)throw new Error("string-left-right/rightSeq(): only two input arguments were passed! Did you intend to use right() method instead?");let u;return c(l[0])?u={...d,...l.shift()}:u=d,O("right",n,e,u,l)}function b(n,e,l,u,t=[]){if(typeof e!="string"||!e.length||((!l||typeof l!="number")&&(l=0),n==="right"&&!e[l+1]||n==="left"&&+l==0))return null;let m=null,o=null;do m=n==="right"?L(e,typeof o=="number"?o:l,...t):J(e,typeof o=="number"?o:l,...t),m!==null&&(o=n==="right"?m.rightmostChar:m.leftmostChar);while(m);if(o!=null&&n==="right"&&(o+=1),o===null)return null;if(n==="right"){if(e[o]?.trim())return o;let i=y(e,o);if(!u||u.mode===0){if(i===o+1)return o;if(e.slice(o,i||e.length).trim()||e.slice(o,i||e.length).includes(`
17
- `)||e.slice(o,i||e.length).includes("\r")){for(let s=o,r=e.length;s<r;s++)if(`
18
- \r`.includes(e[s]))return s}else return i?~-i:e.length}else{if(u.mode===1)return o;if(u.mode===2){let s=e.slice(o);if(s.trim()||s.includes(`
19
- `)||s.includes("\r")){for(let r=o,$=e.length;r<$;r++)if(e[r].trim()||`
20
- \r`.includes(e[r]))return r}return e.length}}return i||e.length}if(e[o]&&e[~-o]&&e[~-o].trim())return o;let a=V(e,o);if(!u||u.mode===0){if(a===o-2)return o;if(e.slice(0,o).trim()||e.slice(0,o).includes(`
16
+ \r`.includes(n[t])||u&&n[t]===h))return t;return null}function V(n,e=0){return D({str:n,idx:e,stopAtNewlines:!1,stopAtRawNbsp:!1})}function M(n,e){return D({str:n,idx:e,stopAtNewlines:!0,stopAtRawNbsp:!1})}function W(n,e){return D({str:n,idx:e,stopAtNewlines:!1,stopAtRawNbsp:!0})}function O(n,e,l,u,t){if(typeof e!="string"||!e.length||(typeof l!="number"&&(l=0),n==="right"&&!e[l+1]||n==="left"&&!e[~-l]))return null;let m=l,o=[],a,i,r,s=0;for(;s<t.length;){if(!p(t[s])||!t[s].length){s+=1;continue}let{value:$,optional:w,hungry:T}=I(t[s]),g=n==="right"?y(e,m):V(e,m);if(u.i&&e[g].toLowerCase()===$.toLowerCase()||!u.i&&e[g]===$){let N=n==="right"?y(e,g):V(e,g);T&&(u.i&&e[N].toLowerCase()===$.toLowerCase()||!u.i&&e[N]===$)?r=!0:s+=1,typeof g=="number"&&n==="right"&&g>m+1?o.push([m+1,g]):n==="left"&&typeof g=="number"&&g<~-m&&o.unshift([g+1,m]),m=g,n==="right"?(a===void 0&&(a=g),i=g):(i===void 0&&(i=g),a=g)}else if(w){s+=1;continue}else if(r){s+=1,r=void 0;continue}else return null}return a===void 0||i===void 0?null:{gaps:o,leftmostChar:a,rightmostChar:i}}var d={i:!1};function J(n,e,...l){if(!l||!l.length)throw new Error("string-left-right/leftSeq(): only two input arguments were passed! Did you intend to use left() method instead?");let u;return c(l[0])?u={...d,...l.shift()}:u=d,O("left",n,e,u,Array.from(l).reverse())}function L(n,e,...l){if(!l||!l.length)throw new Error("string-left-right/rightSeq(): only two input arguments were passed! Did you intend to use right() method instead?");let u;return c(l[0])?u={...d,...l.shift()}:u=d,O("right",n,e,u,l)}function b(n,e,l,u,t=[]){if(typeof e!="string"||!e.length||((!l||typeof l!="number")&&(l=0),n==="right"&&!e[l+1]||n==="left"&&+l==0))return null;let m=null,o=null;do m=n==="right"?L(e,typeof o=="number"?o:l,...t):J(e,typeof o=="number"?o:l,...t),m!==null&&(o=n==="right"?m.rightmostChar:m.leftmostChar);while(m);if(o!=null&&n==="right"&&(o+=1),o===null)return null;if(n==="right"){if(e[o]?.trim())return o;let i=y(e,o);if(!u||u.mode===0){if(i===o+1)return o;if(e.slice(o,i||e.length).trim()||e.slice(o,i||e.length).includes(`
17
+ `)||e.slice(o,i||e.length).includes("\r")){for(let r=o,s=e.length;r<s;r++)if(`
18
+ \r`.includes(e[r]))return r}else return i?~-i:e.length}else{if(u.mode===1)return o;if(u.mode===2){let r=e.slice(o);if(r.trim()||r.includes(`
19
+ `)||r.includes("\r")){for(let s=o,$=e.length;s<$;s++)if(e[s].trim()||`
20
+ \r`.includes(e[s]))return s}return e.length}}return i||e.length}if(e[o]&&e[~-o]&&e[~-o].trim())return o;let a=V(e,o);if(!u||u.mode===0){if(a===o-2)return o;if(e.slice(0,o).trim()||e.slice(0,o).includes(`
21
21
  `)||e.slice(0,o).includes("\r")){for(let i=o;i--;)if(`
22
22
  \r`.includes(e[i])||e[i].trim())return i+1+(e[i].trim()?1:0)}return 0}if(u.mode===1)return o;if(u.mode===2){let i=e.slice(0,o);if(i.trim()||i.includes(`
23
- `)||i.includes("\r")){for(let s=o;s--;)if(e[s].trim()||`
24
- \r`.includes(e[s]))return s+1}return 0}return a!==null?a+1:0}function _(n,e,...l){if(!l.length||l.length===1&&c(l[0]))return null;let u={mode:0};if(c(l[0])){let t={...u,...f(l[0])};if(!t.mode)t.mode=0;else if(p(t.mode)&&"0123".includes(t.mode))t.mode=Number.parseInt(t.mode,10);else if(!R(t.mode))throw new Error(`string-left-right/chompLeft(): [THROW_ID_01] the opts.mode is wrong! It should be 0, 1, 2 or 3. It was given as ${t.mode} (type ${typeof t.mode})`);return b("left",n,e,t,f(l).slice(1))}return p(l[0])?b("left",n,e,u,f(l)):b("left",n,e,u,f(l).slice(1))}function H(n,e,...l){if(!l.length||l.length===1&&c(l[0]))return null;let u={mode:0};if(c(l[0])){let t={...u,...f(l[0])};if(!t.mode)t.mode=0;else if(p(t.mode)&&"0123".includes(t.mode))t.mode=Number.parseInt(t.mode,10);else if(!R(t.mode))throw new Error(`string-left-right/chompRight(): [THROW_ID_02] the opts.mode is wrong! It should be 0, 1, 2 or 3. It was given as ${t.mode} (type ${typeof t.mode})`);return b("right",n,e,t,f(l).slice(1))}return p(l[0])?b("right",n,e,u,f(l)):b("right",n,e,u,f(l).slice(1))}export{_ as chompLeft,H as chompRight,V as left,J as leftSeq,M as leftStopAtNewLines,W as leftStopAtRawNbsp,y as right,L as rightSeq,j as rightStopAtNewLines,k as rightStopAtRawNbsp,C as version};
23
+ `)||i.includes("\r")){for(let r=o;r--;)if(e[r].trim()||`
24
+ \r`.includes(e[r]))return r+1}return 0}return a!==null?a+1:0}function _(n,e,...l){if(!l.length||l.length===1&&c(l[0]))return null;let u={mode:0};if(c(l[0])){let t={...u,...f(l[0])};if(!t.mode)t.mode=0;else if(p(t.mode)&&"0123".includes(t.mode))t.mode=Number.parseInt(t.mode,10);else if(!R(t.mode))throw new Error(`string-left-right/chompLeft(): [THROW_ID_01] the opts.mode is wrong! It should be 0, 1, 2 or 3. It was given as ${t.mode} (type ${typeof t.mode})`);return b("left",n,e,t,f(l).slice(1))}return p(l[0])?b("left",n,e,u,f(l)):b("left",n,e,u,f(l).slice(1))}function H(n,e,...l){if(!l.length||l.length===1&&c(l[0]))return null;let u={mode:0};if(c(l[0])){let t={...u,...f(l[0])};if(!t.mode)t.mode=0;else if(p(t.mode)&&"0123".includes(t.mode))t.mode=Number.parseInt(t.mode,10);else if(!R(t.mode))throw new Error(`string-left-right/chompRight(): [THROW_ID_02] the opts.mode is wrong! It should be 0, 1, 2 or 3. It was given as ${t.mode} (type ${typeof t.mode})`);return b("right",n,e,t,f(l).slice(1))}return p(l[0])?b("right",n,e,u,f(l)):b("right",n,e,u,f(l).slice(1))}export{_ as chompLeft,H as chompRight,V as left,J as leftSeq,M as leftStopAtNewLines,W as leftStopAtRawNbsp,y as right,L as rightSeq,j as rightStopAtNewLines,k as rightStopAtRawNbsp,C as version};
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name string-left-right
3
3
  * @fileoverview Looks up the first non-whitespace character to the left/right of a given index
4
- * @version 5.0.11
4
+ * @version 5.0.12
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-left-right/}
8
8
  */
9
9
 
10
- var stringLeftRight=(()=>{var pt=Object.create;var A=Object.defineProperty;var mt=Object.getOwnPropertyDescriptor;var bt=Object.getOwnPropertyNames,ce=Object.getOwnPropertySymbols,$t=Object.getPrototypeOf,fe=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable;var ge=(e,t,n)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p=(e,t)=>{for(var n in t||(t={}))fe.call(t,n)&&ge(e,n,t[n]);if(ce)for(var n of ce(t))dt.call(t,n)&&ge(e,n,t[n]);return e};var he=e=>A(e,"__esModule",{value:!0});var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yt=(e,t)=>{for(var n in t)A(e,n,{get:t[n],enumerable:!0})},me=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of bt(t))!fe.call(e,o)&&(n||o!=="default")&&A(e,o,{get:()=>t[o],enumerable:!(r=mt(t,o))||r.enumerable});return e},be=(e,t)=>me(he(A(e!=null?pt($t(e)):{},"default",!t&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),Et=(e=>(t,n)=>e&&e.get(t)||(n=me(he({}),t,1),e&&e.set(t,n),n))(typeof WeakMap!="undefined"?new WeakMap:0);var Ee=pe((br,ye)=>{var St="[object Object]";function Ot(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(n){}return t}function _t(e,t){return function(n){return e(t(n))}}var wt=Function.prototype,$e=Object.prototype,de=wt.toString,Tt=$e.hasOwnProperty,Dt=de.call(Object),vt=$e.toString,Vt=_t(Object.getPrototypeOf,Object);function Nt(e){return!!e&&typeof e=="object"}function Rt(e){if(!Nt(e)||vt.call(e)!=St||Ot(e))return!1;var t=Vt(e);if(t===null)return!0;var n=Tt.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&de.call(n)==Dt}ye.exports=Rt});var st=pe((j,v)=>{var At=200,Se="__lodash_hash_undefined__",Oe=9007199254740991,K="[object Arguments]",Ct="[object Array]",_e="[object Boolean]",we="[object Date]",It="[object Error]",k="[object Function]",Te="[object GeneratorFunction]",F="[object Map]",De="[object Number]",Y="[object Object]",ve="[object Promise]",Ve="[object RegExp]",U="[object Set]",Ne="[object String]",Re="[object Symbol]",X="[object WeakMap]",Ae="[object ArrayBuffer]",J="[object DataView]",Ce="[object Float32Array]",Ie="[object Float64Array]",je="[object Int8Array]",Le="[object Int16Array]",Fe="[object Int32Array]",Ue="[object Uint8Array]",Je="[object Uint8ClampedArray]",Pe="[object Uint16Array]",Me="[object Uint32Array]",jt=/[\\^$.*+?()[\]{}|]/g,Lt=/\w*$/,Ft=/^\[object .+?Constructor\]$/,Ut=/^(?:0|[1-9]\d*)$/,s={};s[K]=s[Ct]=s[Ae]=s[J]=s[_e]=s[we]=s[Ce]=s[Ie]=s[je]=s[Le]=s[Fe]=s[F]=s[De]=s[Y]=s[Ve]=s[U]=s[Ne]=s[Re]=s[Ue]=s[Je]=s[Pe]=s[Me]=!0;s[It]=s[k]=s[X]=!1;var Jt=typeof global=="object"&&global&&global.Object===Object&&global,Pt=typeof self=="object"&&self&&self.Object===Object&&self,m=Jt||Pt||Function("return this")(),qe=typeof j=="object"&&j&&!j.nodeType&&j,xe=qe&&typeof v=="object"&&v&&!v.nodeType&&v,Mt=xe&&xe.exports===qe;function qt(e,t){return e.set(t[0],t[1]),e}function xt(e,t){return e.add(t),e}function Ht(e,t){for(var n=-1,r=e?e.length:0;++n<r&&t(e[n],n,e)!==!1;);return e}function Bt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function He(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Gt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Wt(e,t){return e==null?void 0:e[t]}function Be(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(n){}return t}function Ge(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Z(e,t){return function(n){return e(t(n))}}function We(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Kt=Array.prototype,kt=Function.prototype,P=Object.prototype,Q=m["__core-js_shared__"],Ke=function(){var e=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ke=kt.toString,d=P.hasOwnProperty,M=P.toString,Yt=RegExp("^"+ke.call(d).replace(jt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ye=Mt?m.Buffer:void 0,Xe=m.Symbol,Ze=m.Uint8Array,Xt=Z(Object.getPrototypeOf,Object),Zt=Object.create,Qt=P.propertyIsEnumerable,zt=Kt.splice,Qe=Object.getOwnPropertySymbols,en=Ye?Ye.isBuffer:void 0,tn=Z(Object.keys,Object),z=D(m,"DataView"),C=D(m,"Map"),ee=D(m,"Promise"),te=D(m,"Set"),ne=D(m,"WeakMap"),I=D(Object,"create"),nn=S(z),rn=S(C),on=S(ee),ln=S(te),un=S(ne),ze=Xe?Xe.prototype:void 0,et=ze?ze.valueOf:void 0;function y(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function sn(){this.__data__=I?I(null):{}}function an(e){return this.has(e)&&delete this.__data__[e]}function cn(e){var t=this.__data__;if(I){var n=t[e];return n===Se?void 0:n}return d.call(t,e)?t[e]:void 0}function fn(e){var t=this.__data__;return I?t[e]!==void 0:d.call(t,e)}function gn(e,t){var n=this.__data__;return n[e]=I&&t===void 0?Se:t,this}y.prototype.clear=sn;y.prototype.delete=an;y.prototype.get=cn;y.prototype.has=fn;y.prototype.set=gn;function b(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function hn(){this.__data__=[]}function pn(e){var t=this.__data__,n=q(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():zt.call(t,n,1),!0}function mn(e){var t=this.__data__,n=q(t,e);return n<0?void 0:t[n][1]}function bn(e){return q(this.__data__,e)>-1}function $n(e,t){var n=this.__data__,r=q(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}b.prototype.clear=hn;b.prototype.delete=pn;b.prototype.get=mn;b.prototype.has=bn;b.prototype.set=$n;function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function dn(){this.__data__={hash:new y,map:new(C||b),string:new y}}function yn(e){return x(this,e).delete(e)}function En(e){return x(this,e).get(e)}function Sn(e){return x(this,e).has(e)}function On(e,t){return x(this,e).set(e,t),this}w.prototype.clear=dn;w.prototype.delete=yn;w.prototype.get=En;w.prototype.has=Sn;w.prototype.set=On;function T(e){this.__data__=new b(e)}function _n(){this.__data__=new b}function wn(e){return this.__data__.delete(e)}function Tn(e){return this.__data__.get(e)}function Dn(e){return this.__data__.has(e)}function vn(e,t){var n=this.__data__;if(n instanceof b){var r=n.__data__;if(!C||r.length<At-1)return r.push([e,t]),this;n=this.__data__=new w(r)}return n.set(e,t),this}T.prototype.clear=_n;T.prototype.delete=wn;T.prototype.get=Tn;T.prototype.has=Dn;T.prototype.set=vn;function Vn(e,t){var n=le(e)||Qn(e)?Gt(e.length,String):[],r=n.length,o=!!r;for(var i in e)(t||d.call(e,i))&&!(o&&(i=="length"||kn(i,r)))&&n.push(i);return n}function tt(e,t,n){var r=e[t];(!(d.call(e,t)&&lt(r,n))||n===void 0&&!(t in e))&&(e[t]=n)}function q(e,t){for(var n=e.length;n--;)if(lt(e[n][0],t))return n;return-1}function Nn(e,t){return e&&nt(t,ie(t),e)}function re(e,t,n,r,o,i,l){var c;if(r&&(c=i?r(e,o,i,l):r(e)),c!==void 0)return c;if(!H(e))return e;var h=le(e);if(h){if(c=Gn(e),!t)return xn(e,c)}else{var u=E(e),a=u==k||u==Te;if(er(e))return Ln(e,t);if(u==Y||u==K||a&&!i){if(Be(e))return i?e:{};if(c=Wn(a?{}:e),!t)return Hn(e,Nn(c,e))}else{if(!s[u])return i?e:{};c=Kn(e,u,re,t)}}l||(l=new T);var g=l.get(e);if(g)return g;if(l.set(e,c),!h)var _=n?Bn(e):ie(e);return Ht(_||e,function(R,f){_&&(f=R,R=e[f]),tt(c,f,re(R,t,n,r,f,e,l))}),c}function Rn(e){return H(e)?Zt(e):{}}function An(e,t,n){var r=t(e);return le(e)?r:Bt(r,n(e))}function Cn(e){return M.call(e)}function In(e){if(!H(e)||Xn(e))return!1;var t=ut(e)||Be(e)?Yt:Ft;return t.test(S(e))}function jn(e){if(!ot(e))return tn(e);var t=[];for(var n in Object(e))d.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ln(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}function oe(e){var t=new e.constructor(e.byteLength);return new Ze(t).set(new Ze(e)),t}function Fn(e,t){var n=t?oe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Un(e,t,n){var r=t?n(Ge(e),!0):Ge(e);return He(r,qt,new e.constructor)}function Jn(e){var t=new e.constructor(e.source,Lt.exec(e));return t.lastIndex=e.lastIndex,t}function Pn(e,t,n){var r=t?n(We(e),!0):We(e);return He(r,xt,new e.constructor)}function Mn(e){return et?Object(et.call(e)):{}}function qn(e,t){var n=t?oe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xn(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function nt(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var l=t[o],c=r?r(n[l],e[l],l,n,e):void 0;tt(n,l,c===void 0?e[l]:c)}return n}function Hn(e,t){return nt(e,rt(e),t)}function Bn(e){return An(e,ie,rt)}function x(e,t){var n=e.__data__;return Yn(t)?n[typeof t=="string"?"string":"hash"]:n.map}function D(e,t){var n=Wt(e,t);return In(n)?n:void 0}var rt=Qe?Z(Qe,Object):rr,E=Cn;(z&&E(new z(new ArrayBuffer(1)))!=J||C&&E(new C)!=F||ee&&E(ee.resolve())!=ve||te&&E(new te)!=U||ne&&E(new ne)!=X)&&(E=function(e){var t=M.call(e),n=t==Y?e.constructor:void 0,r=n?S(n):void 0;if(r)switch(r){case nn:return J;case rn:return F;case on:return ve;case ln:return U;case un:return X}return t});function Gn(e){var t=e.length,n=e.constructor(t);return t&&typeof e[0]=="string"&&d.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Wn(e){return typeof e.constructor=="function"&&!ot(e)?Rn(Xt(e)):{}}function Kn(e,t,n,r){var o=e.constructor;switch(t){case Ae:return oe(e);case _e:case we:return new o(+e);case J:return Fn(e,r);case Ce:case Ie:case je:case Le:case Fe:case Ue:case Je:case Pe:case Me:return qn(e,r);case F:return Un(e,r,n);case De:case Ne:return new o(e);case Ve:return Jn(e);case U:return Pn(e,r,n);case Re:return Mn(e)}}function kn(e,t){return t=t==null?Oe:t,!!t&&(typeof e=="number"||Ut.test(e))&&e>-1&&e%1==0&&e<t}function Yn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Xn(e){return!!Ke&&Ke in e}function ot(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||P;return e===n}function S(e){if(e!=null){try{return ke.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Zn(e){return re(e,!0,!0)}function lt(e,t){return e===t||e!==e&&t!==t}function Qn(e){return zn(e)&&d.call(e,"callee")&&(!Qt.call(e,"callee")||M.call(e)==K)}var le=Array.isArray;function it(e){return e!=null&&tr(e.length)&&!ut(e)}function zn(e){return nr(e)&&it(e)}var er=en||or;function ut(e){var t=H(e)?M.call(e):"";return t==k||t==Te}function tr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Oe}function H(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function nr(e){return!!e&&typeof e=="object"}function ie(e){return it(e)?Vn(e):jn(e)}function rr(){return[]}function or(){return!1}v.exports=Zn});var pr={};yt(pr,{chompLeft:()=>gr,chompRight:()=>hr,left:()=>G,leftSeq:()=>gt,leftStopAtNewLines:()=>cr,leftStopAtRawNbsp:()=>fr,right:()=>B,rightSeq:()=>ht,rightStopAtNewLines:()=>sr,rightStopAtRawNbsp:()=>ar,version:()=>ir});var O=be(Ee(),1),$=be(st(),1);var at="5.0.11";var ir=at,V="\xA0";function ur(e){let t={value:e,hungry:!1,optional:!1};return(t.value.endsWith("?*")||t.value.endsWith("*?"))&&t.value.length>2?(t.value=t.value.slice(0,t.value.length-2),t.optional=!0,t.hungry=!0):t.value.endsWith("?")&&t.value.length>1?(t.value=t.value.slice(0,~-t.value.length),t.optional=!0):t.value.endsWith("*")&&t.value.length>1&&(t.value=t.value.slice(0,~-t.value.length),t.hungry=!0),t}function ct(e){return typeof e=="number"}function L(e){return typeof e=="string"}function ue({str:e,idx:t=0,stopAtNewlines:n=!1,stopAtRawNbsp:r=!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()||n&&`
10
+ var stringLeftRight=(()=>{var pt=Object.create;var A=Object.defineProperty;var mt=Object.getOwnPropertyDescriptor;var bt=Object.getOwnPropertyNames,ce=Object.getOwnPropertySymbols,dt=Object.getPrototypeOf,fe=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable;var ge=(e,t,n)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,p=(e,t)=>{for(var n in t||(t={}))fe.call(t,n)&&ge(e,n,t[n]);if(ce)for(var n of ce(t))$t.call(t,n)&&ge(e,n,t[n]);return e};var he=e=>A(e,"__esModule",{value:!0});var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yt=(e,t)=>{for(var n in t)A(e,n,{get:t[n],enumerable:!0})},me=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of bt(t))!fe.call(e,o)&&(n||o!=="default")&&A(e,o,{get:()=>t[o],enumerable:!(r=mt(t,o))||r.enumerable});return e},be=(e,t)=>me(he(A(e!=null?pt(dt(e)):{},"default",!t&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),Et=(e=>(t,n)=>e&&e.get(t)||(n=me(he({}),t,1),e&&e.set(t,n),n))(typeof WeakMap!="undefined"?new WeakMap:0);var Ee=pe((br,ye)=>{var St="[object Object]";function Ot(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(n){}return t}function _t(e,t){return function(n){return e(t(n))}}var wt=Function.prototype,de=Object.prototype,$e=wt.toString,Tt=de.hasOwnProperty,Dt=$e.call(Object),vt=de.toString,Vt=_t(Object.getPrototypeOf,Object);function Nt(e){return!!e&&typeof e=="object"}function Rt(e){if(!Nt(e)||vt.call(e)!=St||Ot(e))return!1;var t=Vt(e);if(t===null)return!0;var n=Tt.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&$e.call(n)==Dt}ye.exports=Rt});var st=pe((j,v)=>{var At=200,Se="__lodash_hash_undefined__",Oe=9007199254740991,K="[object Arguments]",Ct="[object Array]",_e="[object Boolean]",we="[object Date]",It="[object Error]",k="[object Function]",Te="[object GeneratorFunction]",F="[object Map]",De="[object Number]",Y="[object Object]",ve="[object Promise]",Ve="[object RegExp]",U="[object Set]",Ne="[object String]",Re="[object Symbol]",X="[object WeakMap]",Ae="[object ArrayBuffer]",J="[object DataView]",Ce="[object Float32Array]",Ie="[object Float64Array]",je="[object Int8Array]",Le="[object Int16Array]",Fe="[object Int32Array]",Ue="[object Uint8Array]",Je="[object Uint8ClampedArray]",Pe="[object Uint16Array]",Me="[object Uint32Array]",jt=/[\\^$.*+?()[\]{}|]/g,Lt=/\w*$/,Ft=/^\[object .+?Constructor\]$/,Ut=/^(?:0|[1-9]\d*)$/,s={};s[K]=s[Ct]=s[Ae]=s[J]=s[_e]=s[we]=s[Ce]=s[Ie]=s[je]=s[Le]=s[Fe]=s[F]=s[De]=s[Y]=s[Ve]=s[U]=s[Ne]=s[Re]=s[Ue]=s[Je]=s[Pe]=s[Me]=!0;s[It]=s[k]=s[X]=!1;var Jt=typeof global=="object"&&global&&global.Object===Object&&global,Pt=typeof self=="object"&&self&&self.Object===Object&&self,m=Jt||Pt||Function("return this")(),qe=typeof j=="object"&&j&&!j.nodeType&&j,xe=qe&&typeof v=="object"&&v&&!v.nodeType&&v,Mt=xe&&xe.exports===qe;function qt(e,t){return e.set(t[0],t[1]),e}function xt(e,t){return e.add(t),e}function Ht(e,t){for(var n=-1,r=e?e.length:0;++n<r&&t(e[n],n,e)!==!1;);return e}function Bt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function He(e,t,n,r){var o=-1,i=e?e.length:0;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function Gt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Wt(e,t){return e==null?void 0:e[t]}function Be(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch(n){}return t}function Ge(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Z(e,t){return function(n){return e(t(n))}}function We(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Kt=Array.prototype,kt=Function.prototype,P=Object.prototype,Q=m["__core-js_shared__"],Ke=function(){var e=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ke=kt.toString,$=P.hasOwnProperty,M=P.toString,Yt=RegExp("^"+ke.call($).replace(jt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ye=Mt?m.Buffer:void 0,Xe=m.Symbol,Ze=m.Uint8Array,Xt=Z(Object.getPrototypeOf,Object),Zt=Object.create,Qt=P.propertyIsEnumerable,zt=Kt.splice,Qe=Object.getOwnPropertySymbols,en=Ye?Ye.isBuffer:void 0,tn=Z(Object.keys,Object),z=D(m,"DataView"),C=D(m,"Map"),ee=D(m,"Promise"),te=D(m,"Set"),ne=D(m,"WeakMap"),I=D(Object,"create"),nn=S(z),rn=S(C),on=S(ee),ln=S(te),un=S(ne),ze=Xe?Xe.prototype:void 0,et=ze?ze.valueOf:void 0;function y(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function sn(){this.__data__=I?I(null):{}}function an(e){return this.has(e)&&delete this.__data__[e]}function cn(e){var t=this.__data__;if(I){var n=t[e];return n===Se?void 0:n}return $.call(t,e)?t[e]:void 0}function fn(e){var t=this.__data__;return I?t[e]!==void 0:$.call(t,e)}function gn(e,t){var n=this.__data__;return n[e]=I&&t===void 0?Se:t,this}y.prototype.clear=sn;y.prototype.delete=an;y.prototype.get=cn;y.prototype.has=fn;y.prototype.set=gn;function b(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function hn(){this.__data__=[]}function pn(e){var t=this.__data__,n=q(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():zt.call(t,n,1),!0}function mn(e){var t=this.__data__,n=q(t,e);return n<0?void 0:t[n][1]}function bn(e){return q(this.__data__,e)>-1}function dn(e,t){var n=this.__data__,r=q(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}b.prototype.clear=hn;b.prototype.delete=pn;b.prototype.get=mn;b.prototype.has=bn;b.prototype.set=dn;function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(){this.__data__={hash:new y,map:new(C||b),string:new y}}function yn(e){return x(this,e).delete(e)}function En(e){return x(this,e).get(e)}function Sn(e){return x(this,e).has(e)}function On(e,t){return x(this,e).set(e,t),this}w.prototype.clear=$n;w.prototype.delete=yn;w.prototype.get=En;w.prototype.has=Sn;w.prototype.set=On;function T(e){this.__data__=new b(e)}function _n(){this.__data__=new b}function wn(e){return this.__data__.delete(e)}function Tn(e){return this.__data__.get(e)}function Dn(e){return this.__data__.has(e)}function vn(e,t){var n=this.__data__;if(n instanceof b){var r=n.__data__;if(!C||r.length<At-1)return r.push([e,t]),this;n=this.__data__=new w(r)}return n.set(e,t),this}T.prototype.clear=_n;T.prototype.delete=wn;T.prototype.get=Tn;T.prototype.has=Dn;T.prototype.set=vn;function Vn(e,t){var n=le(e)||Qn(e)?Gt(e.length,String):[],r=n.length,o=!!r;for(var i in e)(t||$.call(e,i))&&!(o&&(i=="length"||kn(i,r)))&&n.push(i);return n}function tt(e,t,n){var r=e[t];(!($.call(e,t)&&lt(r,n))||n===void 0&&!(t in e))&&(e[t]=n)}function q(e,t){for(var n=e.length;n--;)if(lt(e[n][0],t))return n;return-1}function Nn(e,t){return e&&nt(t,ie(t),e)}function re(e,t,n,r,o,i,l){var c;if(r&&(c=i?r(e,o,i,l):r(e)),c!==void 0)return c;if(!H(e))return e;var h=le(e);if(h){if(c=Gn(e),!t)return xn(e,c)}else{var u=E(e),a=u==k||u==Te;if(er(e))return Ln(e,t);if(u==Y||u==K||a&&!i){if(Be(e))return i?e:{};if(c=Wn(a?{}:e),!t)return Hn(e,Nn(c,e))}else{if(!s[u])return i?e:{};c=Kn(e,u,re,t)}}l||(l=new T);var g=l.get(e);if(g)return g;if(l.set(e,c),!h)var _=n?Bn(e):ie(e);return Ht(_||e,function(R,f){_&&(f=R,R=e[f]),tt(c,f,re(R,t,n,r,f,e,l))}),c}function Rn(e){return H(e)?Zt(e):{}}function An(e,t,n){var r=t(e);return le(e)?r:Bt(r,n(e))}function Cn(e){return M.call(e)}function In(e){if(!H(e)||Xn(e))return!1;var t=ut(e)||Be(e)?Yt:Ft;return t.test(S(e))}function jn(e){if(!ot(e))return tn(e);var t=[];for(var n in Object(e))$.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ln(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}function oe(e){var t=new e.constructor(e.byteLength);return new Ze(t).set(new Ze(e)),t}function Fn(e,t){var n=t?oe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function Un(e,t,n){var r=t?n(Ge(e),!0):Ge(e);return He(r,qt,new e.constructor)}function Jn(e){var t=new e.constructor(e.source,Lt.exec(e));return t.lastIndex=e.lastIndex,t}function Pn(e,t,n){var r=t?n(We(e),!0):We(e);return He(r,xt,new e.constructor)}function Mn(e){return et?Object(et.call(e)):{}}function qn(e,t){var n=t?oe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xn(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function nt(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var l=t[o],c=r?r(n[l],e[l],l,n,e):void 0;tt(n,l,c===void 0?e[l]:c)}return n}function Hn(e,t){return nt(e,rt(e),t)}function Bn(e){return An(e,ie,rt)}function x(e,t){var n=e.__data__;return Yn(t)?n[typeof t=="string"?"string":"hash"]:n.map}function D(e,t){var n=Wt(e,t);return In(n)?n:void 0}var rt=Qe?Z(Qe,Object):rr,E=Cn;(z&&E(new z(new ArrayBuffer(1)))!=J||C&&E(new C)!=F||ee&&E(ee.resolve())!=ve||te&&E(new te)!=U||ne&&E(new ne)!=X)&&(E=function(e){var t=M.call(e),n=t==Y?e.constructor:void 0,r=n?S(n):void 0;if(r)switch(r){case nn:return J;case rn:return F;case on:return ve;case ln:return U;case un:return X}return t});function Gn(e){var t=e.length,n=e.constructor(t);return t&&typeof e[0]=="string"&&$.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Wn(e){return typeof e.constructor=="function"&&!ot(e)?Rn(Xt(e)):{}}function Kn(e,t,n,r){var o=e.constructor;switch(t){case Ae:return oe(e);case _e:case we:return new o(+e);case J:return Fn(e,r);case Ce:case Ie:case je:case Le:case Fe:case Ue:case Je:case Pe:case Me:return qn(e,r);case F:return Un(e,r,n);case De:case Ne:return new o(e);case Ve:return Jn(e);case U:return Pn(e,r,n);case Re:return Mn(e)}}function kn(e,t){return t=t==null?Oe:t,!!t&&(typeof e=="number"||Ut.test(e))&&e>-1&&e%1==0&&e<t}function Yn(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Xn(e){return!!Ke&&Ke in e}function ot(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||P;return e===n}function S(e){if(e!=null){try{return ke.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Zn(e){return re(e,!0,!0)}function lt(e,t){return e===t||e!==e&&t!==t}function Qn(e){return zn(e)&&$.call(e,"callee")&&(!Qt.call(e,"callee")||M.call(e)==K)}var le=Array.isArray;function it(e){return e!=null&&tr(e.length)&&!ut(e)}function zn(e){return nr(e)&&it(e)}var er=en||or;function ut(e){var t=H(e)?M.call(e):"";return t==k||t==Te}function tr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Oe}function H(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function nr(e){return!!e&&typeof e=="object"}function ie(e){return it(e)?Vn(e):jn(e)}function rr(){return[]}function or(){return!1}v.exports=Zn});var pr={};yt(pr,{chompLeft:()=>gr,chompRight:()=>hr,left:()=>G,leftSeq:()=>gt,leftStopAtNewLines:()=>cr,leftStopAtRawNbsp:()=>fr,right:()=>B,rightSeq:()=>ht,rightStopAtNewLines:()=>sr,rightStopAtRawNbsp:()=>ar,version:()=>ir});var O=be(Ee(),1),d=be(st(),1);var at="5.0.12";var ir=at,V="\xA0";function ur(e){let t={value:e,hungry:!1,optional:!1};return(t.value.endsWith("?*")||t.value.endsWith("*?"))&&t.value.length>2?(t.value=t.value.slice(0,t.value.length-2),t.optional=!0,t.hungry=!0):t.value.endsWith("?")&&t.value.length>1?(t.value=t.value.slice(0,~-t.value.length),t.optional=!0):t.value.endsWith("*")&&t.value.length>1&&(t.value=t.value.slice(0,~-t.value.length),t.hungry=!0),t}function ct(e){return typeof e=="number"}function L(e){return typeof e=="string"}function ue({str:e,idx:t=0,stopAtNewlines:n=!1,stopAtRawNbsp:r=!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()||n&&`
11
11
  \r`.includes(e[t+1])||r&&e[t+1]===V))return t+1;if(e[t+2]&&(e[t+2].trim()||n&&`
12
12
  \r`.includes(e[t+2])||r&&e[t+2]===V))return t+2;for(let o=t+1,i=e.length;o<i;o++)if(e[o].trim()||n&&`
13
13
  \r`.includes(e[o])||r&&e[o]===V)return o;return null}function B(e,t=0){return ue({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!1})}function sr(e,t){return ue({str:e,idx:t,stopAtNewlines:!0,stopAtRawNbsp:!1})}function ar(e,t){return ue({str:e,idx:t,stopAtNewlines:!1,stopAtRawNbsp:!0})}function se({str:e,idx:t,stopAtNewlines:n,stopAtRawNbsp:r}){if(typeof e!="string"||!e.length||((!t||typeof t!="number")&&(t=0),t<1))return null;if(e[~-t]&&(e[~-t].trim()||n&&`
@@ -21,4 +21,4 @@ var stringLeftRight=(()=>{var pt=Object.create;var A=Object.defineProperty;var m
21
21
  `)||t.slice(0,l).includes("\r")){for(let u=l;u--;)if(`
22
22
  \r`.includes(t[u])||t[u].trim())return u+1+(t[u].trim()?1:0)}return 0}if(r.mode===1)return l;if(r.mode===2){let u=t.slice(0,l);if(u.trim()||u.includes(`
23
23
  `)||u.includes("\r")){for(let a=l;a--;)if(t[a].trim()||`
24
- \r`.includes(t[a]))return a+1}return 0}return c!==null?c+1:0}function gr(e,t,...n){if(!n.length||n.length===1&&(0,O.default)(n[0]))return null;let r={mode:0};if((0,O.default)(n[0])){let o=p(p({},r),(0,$.default)(n[0]));if(!o.mode)o.mode=0;else if(L(o.mode)&&"0123".includes(o.mode))o.mode=Number.parseInt(o.mode,10);else if(!ct(o.mode))throw new Error(`string-left-right/chompLeft(): [THROW_ID_01] the opts.mode is wrong! It should be 0, 1, 2 or 3. It was given as ${o.mode} (type ${typeof o.mode})`);return N("left",e,t,o,(0,$.default)(n).slice(1))}return L(n[0])?N("left",e,t,r,(0,$.default)(n)):N("left",e,t,r,(0,$.default)(n).slice(1))}function hr(e,t,...n){if(!n.length||n.length===1&&(0,O.default)(n[0]))return null;let r={mode:0};if((0,O.default)(n[0])){let o=p(p({},r),(0,$.default)(n[0]));if(!o.mode)o.mode=0;else if(L(o.mode)&&"0123".includes(o.mode))o.mode=Number.parseInt(o.mode,10);else if(!ct(o.mode))throw new Error(`string-left-right/chompRight(): [THROW_ID_02] the opts.mode is wrong! It should be 0, 1, 2 or 3. It was given as ${o.mode} (type ${typeof o.mode})`);return N("right",e,t,o,(0,$.default)(n).slice(1))}return L(n[0])?N("right",e,t,r,(0,$.default)(n)):N("right",e,t,r,(0,$.default)(n).slice(1))}return Et(pr);})();
24
+ \r`.includes(t[a]))return a+1}return 0}return c!==null?c+1:0}function gr(e,t,...n){if(!n.length||n.length===1&&(0,O.default)(n[0]))return null;let r={mode:0};if((0,O.default)(n[0])){let o=p(p({},r),(0,d.default)(n[0]));if(!o.mode)o.mode=0;else if(L(o.mode)&&"0123".includes(o.mode))o.mode=Number.parseInt(o.mode,10);else if(!ct(o.mode))throw new Error(`string-left-right/chompLeft(): [THROW_ID_01] the opts.mode is wrong! It should be 0, 1, 2 or 3. It was given as ${o.mode} (type ${typeof o.mode})`);return N("left",e,t,o,(0,d.default)(n).slice(1))}return L(n[0])?N("left",e,t,r,(0,d.default)(n)):N("left",e,t,r,(0,d.default)(n).slice(1))}function hr(e,t,...n){if(!n.length||n.length===1&&(0,O.default)(n[0]))return null;let r={mode:0};if((0,O.default)(n[0])){let o=p(p({},r),(0,d.default)(n[0]));if(!o.mode)o.mode=0;else if(L(o.mode)&&"0123".includes(o.mode))o.mode=Number.parseInt(o.mode,10);else if(!ct(o.mode))throw new Error(`string-left-right/chompRight(): [THROW_ID_02] the opts.mode is wrong! It should be 0, 1, 2 or 3. It was given as ${o.mode} (type ${typeof o.mode})`);return N("right",e,t,o,(0,d.default)(n).slice(1))}return L(n[0])?N("right",e,t,r,(0,d.default)(n)):N("right",e,t,r,(0,d.default)(n).slice(1))}return Et(pr);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "string-left-right",
3
- "version": "5.0.11",
3
+ "version": "5.0.12",
4
4
  "description": "Looks up the first non-whitespace character to the left/right of a given index",
5
5
  "keywords": [
6
6
  "check",
@@ -38,9 +38,10 @@
38
38
  "scripts": {
39
39
  "build": "node '../../ops/scripts/esbuild.js' && yarn run dts",
40
40
  "dev": "DEV=true node '../../ops/scripts/esbuild.js' && yarn run dts",
41
+ "devtest": "c8 yarn run unit && yarn run examples && yarn run lint",
41
42
  "dts": "rollup -c && yarn run prettier 'types/index.d.ts' --write",
42
43
  "examples": "node '../../ops/scripts/run-examples.js'",
43
- "lect": "node '../../ops/lect/lect.js'",
44
+ "lect": "node '../../ops/lect/lect.js' && yarn run prettier 'README.md' '.all-contributorsrc' 'rollup.config.js' --write",
44
45
  "letspublish": "yarn publish || :",
45
46
  "lint": "eslint . --fix",
46
47
  "perf": "node perf/check.js",
@@ -48,7 +49,7 @@
48
49
  "prettier": "prettier",
49
50
  "prettier:format": "prettier --write '**/*.{ts,tsx,md}' --no-error-on-unmatched-pattern",
50
51
  "pretest": "yarn run lect && yarn run build",
51
- "test": "c8 yarn run unit && yarn run examples && yarn run lint",
52
+ "test": "yarn run devtest",
52
53
  "unit": "uvu test"
53
54
  },
54
55
  "engines": {