string-match-left-right 9.2.4 → 9.2.5

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/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 9.2.4 (2026-09-06)
7
+
8
+ ### Performance Improvements
9
+
10
+ - Recorded a 6.13% higher normalized benchmark score than v9.2.2 (3,289,440 → 3,491,053).
11
+
6
12
  ## 9.2.3 (2026-09-01)
7
13
 
8
14
  ### Bug Fixes
@@ -23,8 +29,15 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
23
29
 
24
30
  ### Performance Improvements
25
31
 
32
+ - Recorded a 600.65% higher normalized benchmark score than v9.2.1 (469,484 → 3,289,440).
26
33
  - optimise package hot paths and JSON editing ([f3112bd](https://github.com/codsen/codsen/commit/f3112bd7fc0d7c9bc09312d3744c950691d72ca5))
27
34
 
35
+ ## 9.2.1 (2026-08-19)
36
+
37
+ ### Performance Improvements
38
+
39
+ - Recorded a 2.74% higher normalized benchmark score than v9.1.3 (456,971 → 469,484).
40
+
28
41
  ## 9.2.0 (2026-08-19)
29
42
 
30
43
  ### Bug Fixes
@@ -40,10 +53,11 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
40
53
  - add codsen-glob and migrate glob consumers ([5595a2b](https://github.com/codsen/codsen/commit/5595a2b267eaa6cb60072d037aef00b7a28edd42))
41
54
  - refresh the tooling and generate with the latest dependencies ([781f802](https://github.com/codsen/codsen/commit/781f802911066a82a4533b0e5a3fcbd742d0dd83))
42
55
 
43
- ### Reverts
56
+ ## 9.1.3 (2026-01-15)
57
+
58
+ ### Performance Improvements
44
59
 
45
- - Revert "Merge pull request #128 from codsen/release/npm-32198404552-1" ([5baeeaa](https://github.com/codsen/codsen/commit/5baeeaaa677b86f1eaa6396cadf3aea32b06416e)), closes [#128](https://github.com/codsen/codsen/issues/128)
46
- - Revert "Merge pull request #127 from codsen/release/npm-32194020886-1" ([5f1e94d](https://github.com/codsen/codsen/commit/5f1e94deef910ce735266b16aeee08a76de7a862)), closes [#127](https://github.com/codsen/codsen/issues/127)
60
+ - Recorded a 4.22% higher normalized benchmark score than v9.0.33 (438,454 456,971).
47
61
 
48
62
  ## 9.0.19 (2024-03-30)
49
63
 
@@ -63,12 +77,42 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
63
77
 
64
78
  - export types ([11b5fb9](https://github.com/codsen/codsen/commit/11b5fb936ce20e0a77c3a09806773e1cd7695c50))
65
79
 
80
+ ## 8.1.4 (2022-07-05)
81
+
82
+ ### Performance Improvements
83
+
84
+ - Recorded a 13.39% higher normalized benchmark score than v8.1.3 (690,758 → 783,280).
85
+
86
+ ## 8.1.3 (2022-05-04)
87
+
88
+ ### Performance Improvements
89
+
90
+ - Recorded a 33.99% higher normalized benchmark score than v8.1.2 (515,526 → 690,758).
91
+
92
+ ## 8.1.2 (2022-04-18)
93
+
94
+ ### Performance Improvements
95
+
96
+ - Recorded a 3.33% higher normalized benchmark score than v8.1.1 (498,896 → 515,526).
97
+
66
98
  ## 8.1.0 (2022-04-10)
67
99
 
68
100
  ### Features
69
101
 
70
102
  - export defaults and version ([405add5](https://github.com/codsen/codsen/commit/405add56458853550a721691febcd1aeb36a2f43))
71
103
 
104
+ ## 8.0.12 (2022-01-22)
105
+
106
+ ### Performance Improvements
107
+
108
+ - Recorded a 46.81% higher normalized benchmark score than v8.0.11 (434,774 → 638,278).
109
+
110
+ ## 8.0.7 (2021-11-30)
111
+
112
+ ### Performance Improvements
113
+
114
+ - Recorded a 19.28% higher normalized benchmark score than v8.0.5 (813,577 → 970,426).
115
+
72
116
  ## 8.0.0 (2021-09-09)
73
117
 
74
118
  ### Features
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name string-match-left-right
3
3
  * @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
4
- * @version 9.2.4
4
+ * @version 9.2.5
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-match-left-right/}
8
8
  */
9
9
 
10
- import{arrayiffy as I}from"arrayiffy-if-string";import{formatDiagnosticValue as V,hasOwnProp as N,isPlainObject as O,isStr as p}from"codsen-utils";var w="9.2.4";var P=w,L={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},S=e=>e+1,A=e=>e-1;function x(e,s,o,r,u=()=>!1,n=!1,a=S){if(+s<0&&n&&o==="EOL")return o;if(s>=e.length&&!n)return!1;let l=n?1:o.length,E=0,D=!1,d=!1,M=!1,$=Math.min(r.maxMismatches,e.length+o.length),b=$,t=s,i=!1,m=!1,g=!1;function C(){return E===1&&b<$-1}for(;e[t];){let c=a(t);if(r.trimBeforeMatching&&e[t].trim()===""){if(!e[c]&&n&&o==="EOL")return!0;t=a(t);continue}if(u(e[t])){if(n&&o==="EOL"&&!e[c])return!0;t=a(t);continue}if(n)return!1;let h=c>t?o[o.length-l]:o[l-1];if(!r.i&&e[t]===h||r.i&&h!==void 0&&e[t].toLowerCase()===h.toLowerCase()){if(i||(i=!0),M||(M=!0),l===o.length){if(m=!0,b!==$)return!1}else l===1&&(g=!0);if(l-=1,E++,C())return!1;if(!l)return E!==o.length||b===$||!D?t:!1}else if(!D&&!E&&(D=!0),$&&b&&t){b-=1;for(let f=0;f<=b;f++){let T=c>t?o[o.length-l+1+f]:o[l-2-f],R=e[a(t)];if(T&&(!r.i&&e[t]===T||r.i&&e[t].toLowerCase()===T.toLowerCase())&&(!r.firstMustMatch||l!==o.length)){if(E++,C())return!1;l-=2,i=!0;break}else if(R&&T&&(!r.i&&R===T||r.i&&R.toLowerCase()===T.toLowerCase())&&(!r.firstMustMatch||l!==o.length)){if(!E&&!r.hungry)return!1;l-=1,i=!0;break}else if(T===void 0&&b>=0&&i&&(!r.firstMustMatch||m)&&(!r.lastMustMatch||g))return t}i||(d=t)}else return t===0&&l===1&&$>0&&b>0&&(!r.firstMustMatch||m)&&!r.lastMustMatch&&M?0:!1;if(d!==!1&&d!==t&&(d=!1),l<1)return t;t=a(t)}if(l>0)return n&&o==="EOL"?!0:r&&$>=l&&M?d||0:!1}function y(e,s,o,r,u){if(O(u)&&N(u,"trimBeforeMatching")&&u&&typeof u.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${e}(): [THROW_ID_01] opts.trimBeforeMatching should be boolean!${Array.isArray(u.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let n={...L,...u};if(n.maxMismatches=u?.maxMismatches??L.maxMismatches,B(n.maxMismatches,e),typeof n.trimCharsBeforeMatching=="string"&&(n.trimCharsBeforeMatching=I(n.trimCharsBeforeMatching)),n.trimCharsBeforeMatching=n.trimCharsBeforeMatching.map(t=>p(t)?t:String(t)),!p(s)||!s.length)return!1;if(!Number.isInteger(o)||o<0)throw new Error(`string-match-left-right/${e}(): [THROW_ID_02] the second argument should be a natural number. Currently it's of a type: ${typeof o}, equal to:
10
+ import{arrayiffy as I}from"arrayiffy-if-string";import{formatDiagnosticValue as V,hasOwnProp as N,isPlainObject as O,isStr as p}from"codsen-utils";var w="9.2.5";var P=w,L={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},S=e=>e+1,A=e=>e-1;function x(e,s,o,r,u=()=>!1,n=!1,a=S){if(+s<0&&n&&o==="EOL")return o;if(s>=e.length&&!n)return!1;let l=n?1:o.length,E=0,D=!1,d=!1,M=!1,$=Math.min(r.maxMismatches,e.length+o.length),b=$,t=s,i=!1,m=!1,g=!1;function C(){return E===1&&b<$-1}for(;e[t];){let c=a(t);if(r.trimBeforeMatching&&e[t].trim()===""){if(!e[c]&&n&&o==="EOL")return!0;t=a(t);continue}if(u(e[t])){if(n&&o==="EOL"&&!e[c])return!0;t=a(t);continue}if(n)return!1;let h=c>t?o[o.length-l]:o[l-1];if(!r.i&&e[t]===h||r.i&&h!==void 0&&e[t].toLowerCase()===h.toLowerCase()){if(i||(i=!0),M||(M=!0),l===o.length){if(m=!0,b!==$)return!1}else l===1&&(g=!0);if(l-=1,E++,C())return!1;if(!l)return E!==o.length||b===$||!D?t:!1}else if(!D&&!E&&(D=!0),$&&b&&t){b-=1;for(let f=0;f<=b;f++){let T=c>t?o[o.length-l+1+f]:o[l-2-f],R=e[a(t)];if(T&&(!r.i&&e[t]===T||r.i&&e[t].toLowerCase()===T.toLowerCase())&&(!r.firstMustMatch||l!==o.length)){if(E++,C())return!1;l-=2,i=!0;break}else if(R&&T&&(!r.i&&R===T||r.i&&R.toLowerCase()===T.toLowerCase())&&(!r.firstMustMatch||l!==o.length)){if(!E&&!r.hungry)return!1;l-=1,i=!0;break}else if(T===void 0&&b>=0&&i&&(!r.firstMustMatch||m)&&(!r.lastMustMatch||g))return t}i||(d=t)}else return t===0&&l===1&&$>0&&b>0&&(!r.firstMustMatch||m)&&!r.lastMustMatch&&M?0:!1;if(d!==!1&&d!==t&&(d=!1),l<1)return t;t=a(t)}if(l>0)return n&&o==="EOL"?!0:r&&$>=l&&M?d||0:!1}function y(e,s,o,r,u){if(O(u)&&N(u,"trimBeforeMatching")&&u&&typeof u.trimBeforeMatching!="boolean")throw new Error(`string-match-left-right/${e}(): [THROW_ID_01] opts.trimBeforeMatching should be boolean!${Array.isArray(u.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""}`);let n={...L,...u};if(n.maxMismatches=u?.maxMismatches??L.maxMismatches,B(n.maxMismatches,e),typeof n.trimCharsBeforeMatching=="string"&&(n.trimCharsBeforeMatching=I(n.trimCharsBeforeMatching)),n.trimCharsBeforeMatching=n.trimCharsBeforeMatching.map(t=>p(t)?t:String(t)),!p(s)||!s.length)return!1;if(!Number.isInteger(o)||o<0)throw new Error(`string-match-left-right/${e}(): [THROW_ID_02] the second argument should be a natural number. Currently it's of a type: ${typeof o}, equal to:
11
11
  ${V(o,4)}`);let a,l;if(p(r))a=[r];else if(Array.isArray(r))a=r;else if(!r)a=r;else if(typeof r=="function")a=[],a.push(r);else throw new Error(`string-match-left-right/${e}(): [THROW_ID_03] the third argument, whatToMatch, is neither string nor array of strings! It's ${typeof r}, equal to:
12
12
  ${V(r,4)}`);if(J(a,e),u&&!O(u))throw new Error(`string-match-left-right/${e}(): [THROW_ID_04] the fourth argument, options object, should be a plain object. Currently it's of a type "${typeof u}", and equal to:
13
13
  ${V(u,4)}`);let E=0,D="";if(n?.trimCharsBeforeMatching?.some((t,i)=>t.length>1?(E=i,D=t,!0):!1))throw new Error(`string-match-left-right/${e}(): [THROW_ID_05] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ${E} is longer than 1 character, ${D.length} (equals to ${D}). Please split it into separate characters and put into array as separate elements.`);if(o>=s.length)return!1;let d=n.i?n.trimCharsBeforeMatching.map(t=>t.toLowerCase()):n.trimCharsBeforeMatching,M=n.i?t=>d.includes(t.toLowerCase()):t=>d.includes(t);if(!a||!Array.isArray(a)||Array.isArray(a)&&!a.length||Array.isArray(a)&&a.length===1&&p(a[0])&&!a[0].trim()){if(typeof n.cb=="function"){let i,m=o;if((e==="matchLeftIncl"||e==="matchRight")&&(m+=1),e[5]==="L")for(let c=m;c--;){let h=s[c];if((!n.trimBeforeMatching||n.trimBeforeMatching&&h?.trim())&&(!n.trimCharsBeforeMatching?.length||h!==void 0&&!M(h))){i=c;break}}else if(e.startsWith("matchRight"))for(let c=m;c<s.length;c++){let h=s[c];if((!n.trimBeforeMatching||n.trimBeforeMatching&&h.trim())&&(!n.trimCharsBeforeMatching?.length||!M(h))){i=c;break}}if(i===void 0)return!1;let g=s[i],C=e[5]==="L"?s.slice(0,i+1):s.slice(i);return e[5]==="L",n.cb(g,C,i)}let t="";throw u||(t=" More so, the whole options object, the fourth input argument, is missing!"),new Error(`string-match-left-right/${e}(): [THROW_ID_06] 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}`)}if(!n.cb&&!n.i&&!n.trimBeforeMatching&&!n.trimCharsBeforeMatching.length&&n.maxMismatches===0&&!n.firstMustMatch&&!n.lastMustMatch&&!n.hungry&&a.every(p)){for(let t of a){if(!t.length)continue;let i=o;if(e==="matchRight"?i+=1:e==="matchLeft"?i-=t.length:e==="matchLeftIncl"&&(i-=t.length-1),i>=0&&s.startsWith(t,i))return t}return!1}let $=o;e==="matchRight"?$+=1:e==="matchLeft"&&($-=1);let b=e[5]==="L"?A:S;for(let t=0,i=a.length;t<i;t++){l=typeof a[t]=="function";let m=a[t],g=typeof m=="function"?m():m;if(l&&g!=="EOL")throw new Error(`string-match-left-right/${e}(): [THROW_ID_09] EOL marker functions must return "EOL". The function at index ${t} returned:
@@ -1,13 +1,13 @@
1
1
  /**
2
2
  * @name string-match-left-right
3
3
  * @fileoverview Match substrings on the left or right of a given index, ignoring whitespace
4
- * @version 9.2.4
4
+ * @version 9.2.5
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-match-left-right/}
8
8
  */
9
9
 
10
- "use strict";var stringMatchLeftRight=(()=>{var V=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames,L=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var I=(e,r,t)=>r in e?V(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,k=(e,r)=>{for(var t in r||(r={}))N.call(r,t)&&I(e,t,r[t]);if(L)for(var t of L(r))Z.call(r,t)&&I(e,t,r[t]);return e};var X=(e,r)=>{for(var t in r)V(e,t,{get:r[t],enumerable:!0})},ee=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of Y(r))!N.call(e,c)&&c!==t&&V(e,c,{get:()=>r[c],enumerable:!(n=Q(r,c))||n.enumerable});return e};var te=e=>ee(V({},"__esModule",{value:!0}),e);var de={};X(de,{defaultGetNextIdx:()=>j,defaults:()=>x,matchLeft:()=>pe,matchLeftIncl:()=>me,matchRight:()=>be,matchRightIncl:()=>$e,version:()=>ue});function B(e){return typeof e!="string"?e:e.length?[e]:[]}function re(){let e=[],r=0,t=!1;return{append(n){return t?!1:r+n.length>1999?(e.push("\u2026"),r+=1,t=!0,!1):(e.push(n),r+=n.length,!0)},result(){return e.join("")},stopped(){return t}}}function ne(e){return"\\u".concat(e.toString(16).padStart(4,"0"))}function A(e,r){if(e.append('"')){for(let t=0;t<r.length&&!e.stopped();t+=1){let n=r.charCodeAt(t);n===34?e.append('\\"'):n===92?e.append("\\\\"):n===8?e.append("\\b"):n===9?e.append("\\t"):n===10?e.append("\\n"):n===12?e.append("\\f"):n===13?e.append("\\r"):n<32||n===8232||n===8233||n>=55296&&n<=57343?e.append(ne(n)):e.append(r[t])}e.append('"')}}function _e(e){return e.get&&e.set?"[Getter/Setter]":e.get?"[Getter]":e.set?"[Setter]":"[Accessor]"}function W(e,r){e.append("Symbol(");let t=String(r);t.length>8&&A(e,t.slice(7,-1)),e.append(")")}function P(e,r){typeof r=="symbol"?W(e,r):A(e,String(r))}function w(e,r=0){let t=re(),n=r===4?4:0,c=new WeakSet,o=0;function a(_){n&&t.append(" ".repeat(_*n))}function u(_,l){_&&t.append(","),n&&(t.append("\n"),a(l+1))}function y(_,l,h){n&&l&&(t.append("\n"),a(h)),t.append(_)}function E(_,l){Object.prototype.hasOwnProperty.call(_,"value")?b(_.value,l):t.append(_e(_))}function D(_,l){let h;try{h=Reflect.getOwnPropertyDescriptor(_,"length")}catch(s){t.append("[Uninspectable]");return}let m=h==null?void 0:h.value;if(!Number.isSafeInteger(m)||m<0){t.append("[Uninspectable]");return}t.append("[");let i=!1;for(let s=0;s<m&&!t.stopped();s+=1){if(u(i,l),i=!0,o>=50){t.append("[MaxEntries]");break}o+=1;let g;try{g=Reflect.getOwnPropertyDescriptor(_,String(s))}catch(d){t.append("[Uninspectable]");continue}g!=null&&g.enumerable?E(g,l+1):t.append("[Empty]")}y("]",i,l)}function M(_,l){let h;try{h=Reflect.ownKeys(_)}catch(i){t.append("[Uninspectable]");return}t.append("{");let m=!1;for(let i of h){if(t.stopped())break;if(o>=50){u(m,l),m=!0,A(t,"\u2026"),t.append(n?": ":":"),t.append("[MaxEntries]");break}o+=1;let s;try{s=Reflect.getOwnPropertyDescriptor(_,i)}catch(g){u(m,l),m=!0,P(t,i),t.append(n?": ":":"),t.append("[Uninspectable]");continue}s!=null&&s.enumerable&&(u(m,l),m=!0,P(t,i),t.append(n?": ":":"),E(s,l+1))}y("}",m,l)}function $(_,l){if(c.has(_)){t.append("[Circular]");return}if(l>=5){t.append("[MaxDepth]");return}let h;try{h=Array.isArray(_)}catch(m){t.append("[Uninspectable]");return}c.add(_);try{h?D(_,l):M(_,l)}finally{c.delete(_)}}function b(_,l){_===null?t.append("null"):typeof _=="string"?A(t,_):typeof _=="number"?t.append(Object.is(_,-0)?"-0":String(_)):typeof _=="boolean"?t.append(_?"true":"false"):typeof _>"u"?t.append("undefined"):typeof _=="bigint"?t.append("".concat(_,"n")):typeof _=="symbol"?W(t,_):typeof _=="function"?t.append("[Function]"):$(_,l)}try{return b(e,0),t.result()}catch(_){return"[Uninspectable]"}}var oe=["_16_0_a_0_4_0_5_m_1_u_1_cp_4_b_e_4_7_0_1_0_3l_4_1_1_2_3_1_0_6_0_1_2_1_0_1_j_1_2a_1_3u_8_4l_1_11_2_0_","6_14_1z_q_4_3_19_16_z_1_1_2q_1_0_f_1_7_1_a_2_2_0_g_0_1_t_t_2g_b_0_o_w_9_1_4_0_5_l_4_0_9_0_3_0_n_o_7_","a_5_n_1_6_g_15_1m_1h_3_0_i_0_7_9_f_f_4_7_2_1_2_l_1_6_1_0_3_3_3_0_g_0_d_1_1_2_e_1_a_0_8_5_4_1_2_l_1_6","_1_1_1_1_1_1_v_3_1_0_j_2_g_8_1_2_1_l_1_6_1_1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0_18_5v_1r_w_o_2_o_18_22_5_0_1u_c_1s_1_1_0_e_1_c_5p1_15_v_","2p_36_6pp_3_1_6_1_1_1_82_f_0_t_2_2_0_e_3_8_az_1s4_2y_5_c_3_8_7_9_4me_2c_1_1y_1_1_2_0_2_1_2_3_1_b_1_0","_1_6_1_1s_1_3_2_7_1_6_1_r_1_3_1_4_1_0_3_6_1_9f_2_o_1_o_1_u_1_o_1_u_1_o_1_u_1_o_1_u_1_o_1_7_1f8_u_6_5","_79_1p_42_18_a_6_g_0_8x_t_i_17_dg_r_6c_t_2_0_5r_u_1_2_1_1_1_6_2_4_9_1_68_6_1_3_1_1_1_e_1_5g_1n_1v_7_","0_xg_3_1_q_1_1_1_0_2_0_1_9_1_3_1_0_1_0_6_0_4_0_1_0_1_0_1_2_1_1_1_0_2_0_1_0_1_0_1_0_1_0_1_1_1_0_2_3_1","_6_1_3_1_3_1_0_1_9_1_g_5_2_1_4_1_g_3es_wyn_w_3dp_2_4gd_2_5rk_f_h9_1wi_f1_15u_3t6_5_6jt"].join(""),R=oe.slice(1).split("_"),ie=[],F=127;for(let e=0;e<R.length;e+=2){let r=F+1+Number.parseInt(R[e],36),t=r+Number.parseInt(R[e+1],36);ie.push([r,t]),F=t}var we=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]),le=Object.prototype.hasOwnProperty,q=Function.prototype.toString,se=q.call(Object);var Oe=Map.prototype.entries,Te=Set.prototype.values;var U,Ve=(U=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength"))==null?void 0:U.get,J,Ae=(J=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags"))==null?void 0:J.get,H,ve=(H=Object.getOwnPropertyDescriptor(RegExp.prototype,"global"))==null?void 0:H.get,z,ke=(z=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))==null?void 0:z.get,Re=RegExp.prototype.test;function S(e){var n;if(e==null||typeof e!="object")return!1;let r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype)return!0;let t=Object.getOwnPropertyDescriptor(r,"constructor");return!t||!("value"in t)||typeof t.value!="function"?!1:((n=Object.getOwnPropertyDescriptor(t.value,"prototype"))==null?void 0:n.value)===r&&q.call(t.value)===se}function T(e){return typeof e=="string"}var Se=Date.prototype.getTime;function K(e,r){return e!=null&&le.call(e,r)}var G="9.2.4";var ue=G,x={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},j=e=>e+1,ce=e=>e-1;function fe(e,r,t,n,c=()=>!1,o=!1,a=j){if(+r<0&&o&&t==="EOL")return t;if(r>=e.length&&!o)return!1;let u=o?1:t.length,y=0,E=!1,D=!1,M=!1,$=Math.min(n.maxMismatches,e.length+t.length),b=$,_=r,l=!1,h=!1,m=!1;function i(){return y===1&&b<$-1}for(;e[_];){let g=a(_);if(n.trimBeforeMatching&&e[_].trim()===""){if(!e[g]&&o&&t==="EOL")return!0;_=a(_);continue}if(c(e[_])){if(o&&t==="EOL"&&!e[g])return!0;_=a(_);continue}if(o)return!1;let d=g>_?t[t.length-u]:t[u-1];if(!n.i&&e[_]===d||n.i&&d!==void 0&&e[_].toLowerCase()===d.toLowerCase()){if(l||(l=!0),M||(M=!0),u===t.length){if(h=!0,b!==$)return!1}else u===1&&(m=!0);if(u-=1,y++,i())return!1;if(!u)return y!==t.length||b===$||!E?_:!1}else if(!E&&!y&&(E=!0),$&&b&&_){b-=1;for(let C=0;C<=b;C++){let f=g>_?t[t.length-u+1+C]:t[u-2-C],p=e[a(_)];if(f&&(!n.i&&e[_]===f||n.i&&e[_].toLowerCase()===f.toLowerCase())&&(!n.firstMustMatch||u!==t.length)){if(y++,i())return!1;u-=2,l=!0;break}else if(p&&f&&(!n.i&&p===f||n.i&&p.toLowerCase()===f.toLowerCase())&&(!n.firstMustMatch||u!==t.length)){if(!y&&!n.hungry)return!1;u-=1,l=!0;break}else if(f===void 0&&b>=0&&l&&(!n.firstMustMatch||h)&&(!n.lastMustMatch||m))return _}l||(D=_)}else return _===0&&u===1&&$>0&&b>0&&(!n.firstMustMatch||h)&&!n.lastMustMatch&&M?0:!1;if(D!==!1&&D!==_&&(D=!1),u<1)return _;_=a(_)}if(u>0)return o&&t==="EOL"?!0:n&&$>=u&&M?D||0:!1}function v(e,r,t,n,c){var _,l,h,m;if(S(c)&&K(c,"trimBeforeMatching")&&c&&typeof c.trimBeforeMatching!="boolean")throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_01] opts.trimBeforeMatching should be boolean!").concat(Array.isArray(c.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""));let o=k(k({},x),c);if(o.maxMismatches=(_=c==null?void 0:c.maxMismatches)!=null?_:x.maxMismatches,he(o.maxMismatches,e),typeof o.trimCharsBeforeMatching=="string"&&(o.trimCharsBeforeMatching=B(o.trimCharsBeforeMatching)),o.trimCharsBeforeMatching=o.trimCharsBeforeMatching.map(i=>T(i)?i:String(i)),!T(r)||!r.length)return!1;if(!Number.isInteger(t)||t<0)throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_02] the second argument should be a natural number. Currently it's of a type: ").concat(typeof t,", equal to:\n").concat(w(t,4)));let a,u;if(T(n))a=[n];else if(Array.isArray(n))a=n;else if(!n)a=n;else if(typeof n=="function")a=[],a.push(n);else throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_03] the third argument, whatToMatch, is neither string nor array of strings! It's ").concat(typeof n,", equal to:\n").concat(w(n,4)));if(ge(a,e),c&&!S(c))throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_04] the fourth argument, options object, should be a plain object. Currently it's of a type \"").concat(typeof c,'", and equal to:\n').concat(w(c,4)));let y=0,E="";if((l=o==null?void 0:o.trimCharsBeforeMatching)!=null&&l.some((i,s)=>i.length>1?(y=s,E=i,!0):!1))throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_05] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ").concat(y," is longer than 1 character, ").concat(E.length," (equals to ").concat(E,"). Please split it into separate characters and put into array as separate elements."));if(t>=r.length)return!1;let D=o.i?o.trimCharsBeforeMatching.map(i=>i.toLowerCase()):o.trimCharsBeforeMatching,M=o.i?i=>D.includes(i.toLowerCase()):i=>D.includes(i);if(!a||!Array.isArray(a)||Array.isArray(a)&&!a.length||Array.isArray(a)&&a.length===1&&T(a[0])&&!a[0].trim()){if(typeof o.cb=="function"){let s,g=t;if((e==="matchLeftIncl"||e==="matchRight")&&(g+=1),e[5]==="L")for(let f=g;f--;){let p=r[f];if((!o.trimBeforeMatching||o.trimBeforeMatching&&(p!=null&&p.trim()))&&(!((h=o.trimCharsBeforeMatching)!=null&&h.length)||p!==void 0&&!M(p))){s=f;break}}else if(e.startsWith("matchRight"))for(let f=g;f<r.length;f++){let p=r[f];if((!o.trimBeforeMatching||o.trimBeforeMatching&&p.trim())&&(!((m=o.trimCharsBeforeMatching)!=null&&m.length)||!M(p))){s=f;break}}if(s===void 0)return!1;let d=r[s],C=e[5]==="L"?r.slice(0,s+1):r.slice(s);return e[5]==="L",o.cb(d,C,s)}let i="";throw c||(i=" More so, the whole options object, the fourth input argument, is missing!"),new Error("string-match-left-right/".concat(e,'(): [THROW_ID_06] 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!').concat(i))}if(!o.cb&&!o.i&&!o.trimBeforeMatching&&!o.trimCharsBeforeMatching.length&&o.maxMismatches===0&&!o.firstMustMatch&&!o.lastMustMatch&&!o.hungry&&a.every(T)){for(let i of a){if(!i.length)continue;let s=t;if(e==="matchRight"?s+=1:e==="matchLeft"?s-=i.length:e==="matchLeftIncl"&&(s-=i.length-1),s>=0&&r.startsWith(i,s))return i}return!1}let $=t;e==="matchRight"?$+=1:e==="matchLeft"&&($-=1);let b=e[5]==="L"?ce:j;for(let i=0,s=a.length;i<s;i++){u=typeof a[i]=="function";let g=a[i],d=typeof g=="function"?g():g;if(u&&d!=="EOL")throw new Error("string-match-left-right/".concat(e,'(): [THROW_ID_09] EOL marker functions must return "EOL". The function at index ').concat(i," returned:\n").concat(w(d,4)));if(u&&e.endsWith("Incl"))continue;let C,f,p="",O=fe(r,$,d,o,M,u,b);if(O&&u)return!o.cb||o.cb(C,p,f)?d:!1;if(Number.isInteger(O)&&(f=e.startsWith("matchLeft")?O-1:O+1,e[5]==="L"?p=r.slice(0,O):p=r.slice(f)),f<0&&(f=void 0),r[f]&&(C=r[f]),Number.isInteger(O)&&(!o.cb||o.cb(C,p,f)))return d}return!1}function he(e,r){if(!Number.isSafeInteger(e)||e<0)throw new Error("string-match-left-right/".concat(r,"(): [THROW_ID_07] opts.maxMismatches must be a non-negative safe integer. Currently it's of a type: ").concat(typeof e,", equal to:\n").concat(w(e,4)))}function ge(e,r){if(e)for(let t=0;t<e.length;t+=1){let n=e[t];if(typeof n!="string"&&typeof n!="function")throw new Error("string-match-left-right/".concat(r,"(): [THROW_ID_08] matcher alternatives must be strings or EOL marker functions. The value at index ").concat(t," is of a type: ").concat(typeof n,", equal to:\n").concat(w(n,4)))}}function me(e,r,t,n){return v("matchLeftIncl",e,r,t,n)}function pe(e,r,t,n){return v("matchLeft",e,r,t,n)}function $e(e,r,t,n){return v("matchRightIncl",e,r,t,n)}function be(e,r,t,n){return v("matchRight",e,r,t,n)}return te(de);})();
10
+ "use strict";var stringMatchLeftRight=(()=>{var V=Object.defineProperty;var Q=Object.getOwnPropertyDescriptor;var Y=Object.getOwnPropertyNames,L=Object.getOwnPropertySymbols;var N=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable;var I=(e,r,t)=>r in e?V(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,k=(e,r)=>{for(var t in r||(r={}))N.call(r,t)&&I(e,t,r[t]);if(L)for(var t of L(r))Z.call(r,t)&&I(e,t,r[t]);return e};var X=(e,r)=>{for(var t in r)V(e,t,{get:r[t],enumerable:!0})},ee=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let c of Y(r))!N.call(e,c)&&c!==t&&V(e,c,{get:()=>r[c],enumerable:!(n=Q(r,c))||n.enumerable});return e};var te=e=>ee(V({},"__esModule",{value:!0}),e);var de={};X(de,{defaultGetNextIdx:()=>j,defaults:()=>x,matchLeft:()=>pe,matchLeftIncl:()=>me,matchRight:()=>be,matchRightIncl:()=>$e,version:()=>ue});function B(e){return typeof e!="string"?e:e.length?[e]:[]}function re(){let e=[],r=0,t=!1;return{append(n){return t?!1:r+n.length>1999?(e.push("\u2026"),r+=1,t=!0,!1):(e.push(n),r+=n.length,!0)},result(){return e.join("")},stopped(){return t}}}function ne(e){return"\\u".concat(e.toString(16).padStart(4,"0"))}function A(e,r){if(e.append('"')){for(let t=0;t<r.length&&!e.stopped();t+=1){let n=r.charCodeAt(t);n===34?e.append('\\"'):n===92?e.append("\\\\"):n===8?e.append("\\b"):n===9?e.append("\\t"):n===10?e.append("\\n"):n===12?e.append("\\f"):n===13?e.append("\\r"):n<32||n===8232||n===8233||n>=55296&&n<=57343?e.append(ne(n)):e.append(r[t])}e.append('"')}}function _e(e){return e.get&&e.set?"[Getter/Setter]":e.get?"[Getter]":e.set?"[Setter]":"[Accessor]"}function W(e,r){e.append("Symbol(");let t=String(r);t.length>8&&A(e,t.slice(7,-1)),e.append(")")}function P(e,r){typeof r=="symbol"?W(e,r):A(e,String(r))}function w(e,r=0){let t=re(),n=r===4?4:0,c=new WeakSet,o=0;function a(_){n&&t.append(" ".repeat(_*n))}function u(_,l){_&&t.append(","),n&&(t.append("\n"),a(l+1))}function y(_,l,h){n&&l&&(t.append("\n"),a(h)),t.append(_)}function E(_,l){Object.prototype.hasOwnProperty.call(_,"value")?b(_.value,l):t.append(_e(_))}function D(_,l){let h;try{h=Reflect.getOwnPropertyDescriptor(_,"length")}catch(s){t.append("[Uninspectable]");return}let m=h==null?void 0:h.value;if(!Number.isSafeInteger(m)||m<0){t.append("[Uninspectable]");return}t.append("[");let i=!1;for(let s=0;s<m&&!t.stopped();s+=1){if(u(i,l),i=!0,o>=50){t.append("[MaxEntries]");break}o+=1;let g;try{g=Reflect.getOwnPropertyDescriptor(_,String(s))}catch(d){t.append("[Uninspectable]");continue}g!=null&&g.enumerable?E(g,l+1):t.append("[Empty]")}y("]",i,l)}function M(_,l){let h;try{h=Reflect.ownKeys(_)}catch(i){t.append("[Uninspectable]");return}t.append("{");let m=!1;for(let i of h){if(t.stopped())break;if(o>=50){u(m,l),m=!0,A(t,"\u2026"),t.append(n?": ":":"),t.append("[MaxEntries]");break}o+=1;let s;try{s=Reflect.getOwnPropertyDescriptor(_,i)}catch(g){u(m,l),m=!0,P(t,i),t.append(n?": ":":"),t.append("[Uninspectable]");continue}s!=null&&s.enumerable&&(u(m,l),m=!0,P(t,i),t.append(n?": ":":"),E(s,l+1))}y("}",m,l)}function $(_,l){if(c.has(_)){t.append("[Circular]");return}if(l>=5){t.append("[MaxDepth]");return}let h;try{h=Array.isArray(_)}catch(m){t.append("[Uninspectable]");return}c.add(_);try{h?D(_,l):M(_,l)}finally{c.delete(_)}}function b(_,l){_===null?t.append("null"):typeof _=="string"?A(t,_):typeof _=="number"?t.append(Object.is(_,-0)?"-0":String(_)):typeof _=="boolean"?t.append(_?"true":"false"):typeof _>"u"?t.append("undefined"):typeof _=="bigint"?t.append("".concat(_,"n")):typeof _=="symbol"?W(t,_):typeof _=="function"?t.append("[Function]"):$(_,l)}try{return b(e,0),t.result()}catch(_){return"[Uninspectable]"}}var oe=["_16_0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c_4_u_9_1_0_2_0","_1_11_1_0_p_0_1_0_18_1g_i_3_k_2_u_1b_k_1_1_0_54_1a_15_3_10_1b_k_0_1n_16_d_0_1z_q_11_6_55_17_38_1r_v_","7_2_0_2_7_1_1_1_n_f_0_1_0_2m_7_2_12_g_0_1_0_s_0_a_13_7_0_l_0_b_19_j_0_i_20_5j_w_v_8_1_10_h_0_1d_t_34","_6_1_1_1_11_l_0_p_5_1_1_1_v_e_0_n_17_78_i_f_0_1_c_1_x_3g_0_27_pl_6e_5f_218_2o_f_tr_h_5_p_32y_5_g6_5a","1_t_1cy_fs_7_u_h_26_h_t_i_1b_g_3_v_k_5_i_c0_18_5v_1r_w_o_2_o_18_22_5_0_1u_c_1s_1_1_0_e_1_c_5p1_15_v_","2p_36_6pp_3_1_6_1_1_1_82_f_0_t_2_2_0_e_3_8_az_1s4_2y_5_c_3_8_7_9_4me_2c_1_1y_1_1_2_0_2_1_2_3_1_b_1_0","_1_6_1_1s_1_3_2_7_1_6_1_r_1_3_1_4_1_0_3_6_1_9f_2_o_1_o_1_u_1_o_1_u_1_o_1_u_1_o_1_u_1_o_1_7_1f8_u_6_5","_79_1p_42_18_a_6_g_0_8x_t_i_17_dg_r_6c_t_2_0_5r_u_1_2_1_1_1_6_2_4_9_1_68_6_1_3_1_1_1_e_1_5g_1n_1v_7_","0_xg_3_1_q_1_1_1_0_2_0_1_9_1_3_1_0_1_0_6_0_4_0_1_0_1_0_1_2_1_1_1_0_2_0_1_0_1_0_1_0_1_0_1_1_1_0_2_3_1","_6_1_3_1_3_1_0_1_9_1_g_5_2_1_4_1_g_3es_wyn_w_3dp_2_4gd_2_5rk_f_h9_1wi_f1_15u_3t6_5_6jt"].join(""),R=oe.slice(1).split("_"),ie=[],F=127;for(let e=0;e<R.length;e+=2){let r=F+1+Number.parseInt(R[e],36),t=r+Number.parseInt(R[e+1],36);ie.push([r,t]),F=t}var we=new Set([..."\u060B$\u20BC\u17DB\xA5\u20A1\u20B1\xA3\u20AC\xA2\u20B9\uFDFC\u20AA\u20A9\u20AD\u20A8\u20AE\u20A6\u20BD\u20AB\u0E3F\u20A9\u20BA\u20B4","$U","$b","B/.","BZ$","Br","Bs","C$","CHF","Ft","Gs","J$","KM","K\u010D","L","MT","NT$","P","Q","R","R$","RD$","RM","Rp","S","S/.","TT$","Z$","kn","kr","lei","z\u0142","\u0192","\u0414\u0438\u043D.","\u0434\u0435\u043D","\u043B\u0432","\u062F.\u0625","Lek"]),le=Object.prototype.hasOwnProperty,q=Function.prototype.toString,se=q.call(Object);var Oe=Map.prototype.entries,Te=Set.prototype.values;var U,Ve=(U=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength"))==null?void 0:U.get,J,Ae=(J=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags"))==null?void 0:J.get,H,ve=(H=Object.getOwnPropertyDescriptor(RegExp.prototype,"global"))==null?void 0:H.get,z,ke=(z=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))==null?void 0:z.get,Re=RegExp.prototype.test;function S(e){var n;if(e==null||typeof e!="object")return!1;let r=Object.getPrototypeOf(e);if(r===null||r===Object.prototype)return!0;let t=Object.getOwnPropertyDescriptor(r,"constructor");return!t||!("value"in t)||typeof t.value!="function"?!1:((n=Object.getOwnPropertyDescriptor(t.value,"prototype"))==null?void 0:n.value)===r&&q.call(t.value)===se}function T(e){return typeof e=="string"}var Se=Date.prototype.getTime;function K(e,r){return e!=null&&le.call(e,r)}var G="9.2.5";var ue=G,x={cb:void 0,i:!1,trimBeforeMatching:!1,trimCharsBeforeMatching:[],maxMismatches:0,firstMustMatch:!1,lastMustMatch:!1,hungry:!1},j=e=>e+1,ce=e=>e-1;function fe(e,r,t,n,c=()=>!1,o=!1,a=j){if(+r<0&&o&&t==="EOL")return t;if(r>=e.length&&!o)return!1;let u=o?1:t.length,y=0,E=!1,D=!1,M=!1,$=Math.min(n.maxMismatches,e.length+t.length),b=$,_=r,l=!1,h=!1,m=!1;function i(){return y===1&&b<$-1}for(;e[_];){let g=a(_);if(n.trimBeforeMatching&&e[_].trim()===""){if(!e[g]&&o&&t==="EOL")return!0;_=a(_);continue}if(c(e[_])){if(o&&t==="EOL"&&!e[g])return!0;_=a(_);continue}if(o)return!1;let d=g>_?t[t.length-u]:t[u-1];if(!n.i&&e[_]===d||n.i&&d!==void 0&&e[_].toLowerCase()===d.toLowerCase()){if(l||(l=!0),M||(M=!0),u===t.length){if(h=!0,b!==$)return!1}else u===1&&(m=!0);if(u-=1,y++,i())return!1;if(!u)return y!==t.length||b===$||!E?_:!1}else if(!E&&!y&&(E=!0),$&&b&&_){b-=1;for(let C=0;C<=b;C++){let f=g>_?t[t.length-u+1+C]:t[u-2-C],p=e[a(_)];if(f&&(!n.i&&e[_]===f||n.i&&e[_].toLowerCase()===f.toLowerCase())&&(!n.firstMustMatch||u!==t.length)){if(y++,i())return!1;u-=2,l=!0;break}else if(p&&f&&(!n.i&&p===f||n.i&&p.toLowerCase()===f.toLowerCase())&&(!n.firstMustMatch||u!==t.length)){if(!y&&!n.hungry)return!1;u-=1,l=!0;break}else if(f===void 0&&b>=0&&l&&(!n.firstMustMatch||h)&&(!n.lastMustMatch||m))return _}l||(D=_)}else return _===0&&u===1&&$>0&&b>0&&(!n.firstMustMatch||h)&&!n.lastMustMatch&&M?0:!1;if(D!==!1&&D!==_&&(D=!1),u<1)return _;_=a(_)}if(u>0)return o&&t==="EOL"?!0:n&&$>=u&&M?D||0:!1}function v(e,r,t,n,c){var _,l,h,m;if(S(c)&&K(c,"trimBeforeMatching")&&c&&typeof c.trimBeforeMatching!="boolean")throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_01] opts.trimBeforeMatching should be boolean!").concat(Array.isArray(c.trimBeforeMatching)?" Did you mean to use opts.trimCharsBeforeMatching?":""));let o=k(k({},x),c);if(o.maxMismatches=(_=c==null?void 0:c.maxMismatches)!=null?_:x.maxMismatches,he(o.maxMismatches,e),typeof o.trimCharsBeforeMatching=="string"&&(o.trimCharsBeforeMatching=B(o.trimCharsBeforeMatching)),o.trimCharsBeforeMatching=o.trimCharsBeforeMatching.map(i=>T(i)?i:String(i)),!T(r)||!r.length)return!1;if(!Number.isInteger(t)||t<0)throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_02] the second argument should be a natural number. Currently it's of a type: ").concat(typeof t,", equal to:\n").concat(w(t,4)));let a,u;if(T(n))a=[n];else if(Array.isArray(n))a=n;else if(!n)a=n;else if(typeof n=="function")a=[],a.push(n);else throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_03] the third argument, whatToMatch, is neither string nor array of strings! It's ").concat(typeof n,", equal to:\n").concat(w(n,4)));if(ge(a,e),c&&!S(c))throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_04] the fourth argument, options object, should be a plain object. Currently it's of a type \"").concat(typeof c,'", and equal to:\n').concat(w(c,4)));let y=0,E="";if((l=o==null?void 0:o.trimCharsBeforeMatching)!=null&&l.some((i,s)=>i.length>1?(y=s,E=i,!0):!1))throw new Error("string-match-left-right/".concat(e,"(): [THROW_ID_05] the fourth argument, options object contains trimCharsBeforeMatching. It was meant to list the single characters but one of the entries at index ").concat(y," is longer than 1 character, ").concat(E.length," (equals to ").concat(E,"). Please split it into separate characters and put into array as separate elements."));if(t>=r.length)return!1;let D=o.i?o.trimCharsBeforeMatching.map(i=>i.toLowerCase()):o.trimCharsBeforeMatching,M=o.i?i=>D.includes(i.toLowerCase()):i=>D.includes(i);if(!a||!Array.isArray(a)||Array.isArray(a)&&!a.length||Array.isArray(a)&&a.length===1&&T(a[0])&&!a[0].trim()){if(typeof o.cb=="function"){let s,g=t;if((e==="matchLeftIncl"||e==="matchRight")&&(g+=1),e[5]==="L")for(let f=g;f--;){let p=r[f];if((!o.trimBeforeMatching||o.trimBeforeMatching&&(p!=null&&p.trim()))&&(!((h=o.trimCharsBeforeMatching)!=null&&h.length)||p!==void 0&&!M(p))){s=f;break}}else if(e.startsWith("matchRight"))for(let f=g;f<r.length;f++){let p=r[f];if((!o.trimBeforeMatching||o.trimBeforeMatching&&p.trim())&&(!((m=o.trimCharsBeforeMatching)!=null&&m.length)||!M(p))){s=f;break}}if(s===void 0)return!1;let d=r[s],C=e[5]==="L"?r.slice(0,s+1):r.slice(s);return e[5]==="L",o.cb(d,C,s)}let i="";throw c||(i=" More so, the whole options object, the fourth input argument, is missing!"),new Error("string-match-left-right/".concat(e,'(): [THROW_ID_06] 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!').concat(i))}if(!o.cb&&!o.i&&!o.trimBeforeMatching&&!o.trimCharsBeforeMatching.length&&o.maxMismatches===0&&!o.firstMustMatch&&!o.lastMustMatch&&!o.hungry&&a.every(T)){for(let i of a){if(!i.length)continue;let s=t;if(e==="matchRight"?s+=1:e==="matchLeft"?s-=i.length:e==="matchLeftIncl"&&(s-=i.length-1),s>=0&&r.startsWith(i,s))return i}return!1}let $=t;e==="matchRight"?$+=1:e==="matchLeft"&&($-=1);let b=e[5]==="L"?ce:j;for(let i=0,s=a.length;i<s;i++){u=typeof a[i]=="function";let g=a[i],d=typeof g=="function"?g():g;if(u&&d!=="EOL")throw new Error("string-match-left-right/".concat(e,'(): [THROW_ID_09] EOL marker functions must return "EOL". The function at index ').concat(i," returned:\n").concat(w(d,4)));if(u&&e.endsWith("Incl"))continue;let C,f,p="",O=fe(r,$,d,o,M,u,b);if(O&&u)return!o.cb||o.cb(C,p,f)?d:!1;if(Number.isInteger(O)&&(f=e.startsWith("matchLeft")?O-1:O+1,e[5]==="L"?p=r.slice(0,O):p=r.slice(f)),f<0&&(f=void 0),r[f]&&(C=r[f]),Number.isInteger(O)&&(!o.cb||o.cb(C,p,f)))return d}return!1}function he(e,r){if(!Number.isSafeInteger(e)||e<0)throw new Error("string-match-left-right/".concat(r,"(): [THROW_ID_07] opts.maxMismatches must be a non-negative safe integer. Currently it's of a type: ").concat(typeof e,", equal to:\n").concat(w(e,4)))}function ge(e,r){if(e)for(let t=0;t<e.length;t+=1){let n=e[t];if(typeof n!="string"&&typeof n!="function")throw new Error("string-match-left-right/".concat(r,"(): [THROW_ID_08] matcher alternatives must be strings or EOL marker functions. The value at index ").concat(t," is of a type: ").concat(typeof n,", equal to:\n").concat(w(n,4)))}}function me(e,r,t,n){return v("matchLeftIncl",e,r,t,n)}function pe(e,r,t,n){return v("matchLeft",e,r,t,n)}function $e(e,r,t,n){return v("matchRightIncl",e,r,t,n)}function be(e,r,t,n){return v("matchRight",e,r,t,n)}return te(de);})();
11
11
  /**
12
12
  * @name arrayiffy-if-string
13
13
  * @fileoverview Put non-empty strings into arrays, turn empty-ones into empty arrays. Bypass everything else.
@@ -27,7 +27,7 @@
27
27
  /**
28
28
  * @name codsen-utils
29
29
  * @fileoverview Various utility functions
30
- * @version 1.10.1
30
+ * @version 1.10.2
31
31
  * @author Roy Revelt
32
32
  * @license MIT
33
33
  * {@link https://codsen.com/os/codsen-utils/}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "string-match-left-right",
3
- "version": "9.2.4",
3
+ "version": "9.2.5",
4
4
  "description": "Match substrings on the left or right of a given index, ignoring whitespace",
5
5
  "keywords": [
6
6
  "left",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "dependencies": {
67
67
  "arrayiffy-if-string": "^5.2.3",
68
- "codsen-utils": "^1.10.1"
68
+ "codsen-utils": "^1.10.2"
69
69
  },
70
70
  "engines": {
71
71
  "node": ">=18.20.8"