string-convert-indexes 6.2.2 → 6.2.4

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
+ ## 6.2.3 (2026-09-01)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **ast-monkey:** preserve traversal data semantics ([861b9fc](https://github.com/codsen/codsen/commit/861b9fc242abb9e6a06c665a80e884970276b22d))
11
+
6
12
  ## 6.2.2 (2026-08-22)
7
13
 
8
14
  ### Performance Improvements
package/README.md CHANGED
@@ -21,6 +21,8 @@
21
21
  <img src="https://img.shields.io/badge/licence-MIT-brightgreen.svg?style=flat-square" alt="MIT Licence">
22
22
  </p>
23
23
 
24
+ **Powered by unicode-segmenter.** No other dependencies.
25
+
24
26
  ## Install
25
27
 
26
28
  This package is [pure ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). If you're not ready yet, install an older version of this program, 4.1.0 (`npm i string-convert-indexes@4.1.0`).
@@ -47,7 +49,7 @@ assert.equal(nativeToUnicode("\uD834\uDF06aa", "1"), "0");
47
49
 
48
50
  ## Documentation
49
51
 
50
- Please [visit codsen.com](https://codsen.com/os/string-convert-indexes/) for a full description of the API. If you’re looking for the **Changelog**, it’s [here](https://github.com/codsen/codsen/blob/main/packages/string-convert-indexes/CHANGELOG.md).
52
+ Please [visit codsen.com](https://codsen.com/os/string-convert-indexes/) for a full description of the API. For **Changelog**, see [raw md on GitHub](https://github.com/codsen/codsen/blob/main/packages/string-convert-indexes/CHANGELOG.md) or [the website](https://codsen.com/os/string-convert-indexes/changelog).
51
53
 
52
54
  ## Contributing
53
55
 
@@ -1,34 +1,11 @@
1
1
  /**
2
2
  * @name string-convert-indexes
3
3
  * @fileoverview Convert between native JS string character indexes and grapheme-count-based indexes
4
- * @version 6.2.2
4
+ * @version 6.2.4
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-convert-indexes/}
8
8
  */
9
9
 
10
- import{formatDiagnosticValue as m}from"codsen-utils";import{collectGraphemes as $}from"unicode-segmenter/grapheme";import{traverse as h}from"ast-monkey-traverse";var f="6.2.2";var k=f,v=typeof Intl.Segmenter=="function"?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function g(i){let r=typeof i;return r==="string"||r==="number"}function y(i,r,n){let c=i==="n"?"nativeToUnicode":"unicodeToNative";function d(e){return!(!g(e)||typeof e=="string"&&!/^\d*$/.test(e)||typeof e=="number"&&(!Number.isInteger(e)||e<0))}function a(e,o){let u=0,t=0;for(let p=0,b=e.length;p<b;p++){if(t+=e[p].length,o>=u&&o<t)return p;u+=e[p].length}throw new Error(`string-convert-indexes/${c}(): [THROW_ID_01] the "indexes" value, ${n}, is not covered by graphemes length!`)}function l(e,o){if(o>=e.length)throw new Error(`string-convert-indexes/${c}(): [THROW_ID_02] the index to convert, ${o}, is not covered by graphemes length!`);return e.slice(0,o).join("").length}if(typeof r!="string"||!r)throw new TypeError(`string-convert-indexes/${c}(): [THROW_ID_03] the first input argument, input string, must be a non-zero-length string! Currently it's: ${typeof r}, equal to:
11
- ${r}`);if(n===0)return 0;if(n==="0")return"0";let s=v?Array.from(v.segment(r),({segment:e})=>e):$(r);if(g(n)){if(d(n))return i==="u"?typeof n=="string"?String(l(s,+n)):l(s,+n):typeof n=="string"?String(a(s,+n)):a(s,+n);throw new Error(`string-convert-indexes/${c}(): [THROW_ID_04] the second input argument, "indexes" is not suitable to describe string index - it was given as ${m(n,4)} (${typeof n})`)}else{if(n&&typeof n=="object")return i==="u"?h(n,(e,o,u)=>{let t=o!==void 0?o:e;if(g(t)){if(d(t))return typeof t=="string"?String(l(s,+t)):l(s,+t);throw new Error(`string-convert-indexes/${c}(): [THROW_ID_05] bad value was encountered, ${m(t,4)}, its path is ${u.path}`)}return t}):h(n,(e,o,u)=>{let t=o!==void 0?o:e;if(g(t)){if(d(t))return typeof t=="string"?String(a(s,+t)):a(s,+t);throw new Error(`string-convert-indexes/${c}(): [THROW_ID_06] bad value was encountered, ${m(t,4)}, its path is ${u.path}`)}return t});throw new Error(`string-convert-indexes/${c}(): [THROW_ID_07] the first input argument, a source string should be a string but it was given as ${r}, type ${typeof r}`)}}function D(i,r){return y("n",i,r)}function E(i,r){return y("u",i,r)}export{D as nativeToUnicode,E as unicodeToNative,k as version};
12
- /*!
13
- * unicode-segmenter
14
- * MIT License
15
- * Copyright (c) 2024 Hyeseong Kim <hey@hyeseong.kim>
16
- *
17
- * Permission is hereby granted, free of charge, to any person obtaining a copy
18
- * of this software and associated documentation files (the "Software"), to deal
19
- * in the Software without restriction, including without limitation the rights
20
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
- * copies of the Software, and to permit persons to whom the Software is
22
- * furnished to do so, subject to the following conditions:
23
- *
24
- * The above copyright notice and this permission notice shall be included in
25
- * all copies or substantial portions of the Software.
26
- *
27
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
- * SOFTWARE.
34
- */
10
+ import{traverse as v}from"ast-monkey-traverse";import{formatDiagnosticValue as m}from"codsen-utils";import{collectGraphemes as $}from"unicode-segmenter/grapheme";var f="6.2.4";var k=f,h=typeof Intl.Segmenter=="function"?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function g(i){let r=typeof i;return r==="string"||r==="number"}function y(i,r,n){let u=i==="n"?"nativeToUnicode":"unicodeToNative";function d(e){return!(!g(e)||typeof e=="string"&&!/^\d*$/.test(e)||typeof e=="number"&&(!Number.isInteger(e)||e<0))}function a(e,o){let c=0,t=0;for(let p=0,b=e.length;p<b;p++){if(t+=e[p].length,o>=c&&o<t)return p;c+=e[p].length}throw new Error(`string-convert-indexes/${u}(): [THROW_ID_01] the "indexes" value, ${n}, is not covered by graphemes length!`)}function l(e,o){if(o>=e.length)throw new Error(`string-convert-indexes/${u}(): [THROW_ID_02] the index to convert, ${o}, is not covered by graphemes length!`);return e.slice(0,o).join("").length}if(typeof r!="string"||!r)throw new TypeError(`string-convert-indexes/${u}(): [THROW_ID_03] the first input argument, input string, must be a non-zero-length string! Currently it's: ${typeof r}, equal to:
11
+ ${r}`);if(n===0)return 0;if(n==="0")return"0";let s=h?Array.from(h.segment(r),({segment:e})=>e):$(r);if(g(n)){if(d(n))return i==="u"?typeof n=="string"?String(l(s,+n)):l(s,+n):typeof n=="string"?String(a(s,+n)):a(s,+n);throw new Error(`string-convert-indexes/${u}(): [THROW_ID_04] the second input argument, "indexes" is not suitable to describe string index - it was given as ${m(n,4)} (${typeof n})`)}else{if(n&&typeof n=="object")return i==="u"?v(n,(e,o,c)=>{let t=c.parentType==="object"?o:e;if(g(t)){if(d(t))return typeof t=="string"?String(l(s,+t)):l(s,+t);throw new Error(`string-convert-indexes/${u}(): [THROW_ID_05] bad value was encountered, ${m(t,4)}, its path is ${c.path}`)}return t}):v(n,(e,o,c)=>{let t=c.parentType==="object"?o:e;if(g(t)){if(d(t))return typeof t=="string"?String(a(s,+t)):a(s,+t);throw new Error(`string-convert-indexes/${u}(): [THROW_ID_06] bad value was encountered, ${m(t,4)}, its path is ${c.path}`)}return t});throw new Error(`string-convert-indexes/${u}(): [THROW_ID_07] the first input argument, a source string should be a string but it was given as ${r}, type ${typeof r}`)}}function D(i,r){return y("n",i,r)}function E(i,r){return y("u",i,r)}export{D as nativeToUnicode,E as unicodeToNative,k as version};
@@ -1,49 +1,34 @@
1
1
  /**
2
2
  * @name string-convert-indexes
3
3
  * @fileoverview Convert between native JS string character indexes and grapheme-count-based indexes
4
- * @version 6.2.2
4
+ * @version 6.2.4
5
5
  * @author Roy Revelt
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/string-convert-indexes/}
8
8
  */
9
9
 
10
- "use strict";var stringConvertIndexes=(()=>{var F=Object.defineProperty;var ie=Object.getOwnPropertyDescriptor;var oe=Object.getOwnPropertyNames,T=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,le=Object.prototype.propertyIsEnumerable;var $=(e,t,r)=>t in e?F(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,B=(e,t)=>{for(var r in t||(t={}))R.call(t,r)&&$(e,r,t[r]);if(T)for(var r of T(t))le.call(t,r)&&$(e,r,t[r]);return e};var se=(e,t)=>{for(var r in t)F(e,r,{get:t[r],enumerable:!0})},ue=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of oe(t))!R.call(e,o)&&o!==r&&F(e,o,{get:()=>t[o],enumerable:!(n=ie(t,o))||n.enumerable});return e};var ae=e=>ue(F({},"__esModule",{value:!0}),e);var j=(e,t,r)=>$(e,typeof t!="symbol"?t+"":t,r);var Ce={};se(Ce,{nativeToUnicode:()=>Ae,unicodeToNative:()=>we,version:()=>xe});function fe(){let e=[],t=0,r=!1;return{append(n){return r?!1:t+n.length>1999?(e.push("\u2026"),t+=1,r=!0,!1):(e.push(n),t+=n.length,!0)},result(){return e.join("")},stopped(){return r}}}function ce(e){return"\\u".concat(e.toString(16).padStart(4,"0"))}function D(e,t){if(e.append('"')){for(let r=0;r<t.length&&!e.stopped();r+=1){let n=t.charCodeAt(r);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(ce(n)):e.append(t[r])}e.append('"')}}function pe(e){return e.get&&e.set?"[Getter/Setter]":e.get?"[Getter]":e.set?"[Setter]":"[Accessor]"}function U(e,t){e.append("Symbol(");let r=String(t);r.length>8&&D(e,r.slice(7,-1)),e.append(")")}function W(e,t){typeof t=="symbol"?U(e,t):D(e,String(t))}function S(e,t=0){let r=fe(),n=t===4?4:0,o=new WeakSet,i=0;function u(s){n&&r.append(" ".repeat(s*n))}function p(s,c){s&&r.append(","),n&&(r.append("\n"),u(c+1))}function l(s,c,m){n&&c&&(r.append("\n"),u(m)),r.append(s)}function f(s,c){Object.prototype.hasOwnProperty.call(s,"value")?b(s.value,c):r.append(pe(s))}function h(s,c){let m;try{m=Reflect.getOwnPropertyDescriptor(s,"length")}catch(y){r.append("[Uninspectable]");return}let d=m==null?void 0:m.value;if(!Number.isSafeInteger(d)||d<0){r.append("[Uninspectable]");return}r.append("[");let v=!1;for(let y=0;y<d&&!r.stopped();y+=1){if(p(v,c),v=!0,i>=50){r.append("[MaxEntries]");break}i+=1;let x;try{x=Reflect.getOwnPropertyDescriptor(s,String(y))}catch(g){r.append("[Uninspectable]");continue}x!=null&&x.enumerable?f(x,c+1):r.append("[Empty]")}l("]",v,c)}function a(s,c){let m;try{m=Reflect.ownKeys(s)}catch(v){r.append("[Uninspectable]");return}r.append("{");let d=!1;for(let v of m){if(r.stopped())break;if(i>=50){p(d,c),d=!0,D(r,"\u2026"),r.append(n?": ":":"),r.append("[MaxEntries]");break}i+=1;let y;try{y=Reflect.getOwnPropertyDescriptor(s,v)}catch(x){p(d,c),d=!0,W(r,v),r.append(n?": ":":"),r.append("[Uninspectable]");continue}y!=null&&y.enumerable&&(p(d,c),d=!0,W(r,v),r.append(n?": ":":"),f(y,c+1))}l("}",d,c)}function A(s,c){if(o.has(s)){r.append("[Circular]");return}if(c>=5){r.append("[MaxDepth]");return}let m;try{m=Array.isArray(s)}catch(d){r.append("[Uninspectable]");return}o.add(s);try{m?h(s,c):a(s,c)}finally{o.delete(s)}}function b(s,c){s===null?r.append("null"):typeof s=="string"?D(r,s):typeof s=="number"?r.append(Object.is(s,-0)?"-0":String(s)):typeof s=="boolean"?r.append(s?"true":"false"):typeof s>"u"?r.append("undefined"):typeof s=="bigint"?r.append("".concat(s,"n")):typeof s=="symbol"?U(r,s):typeof s=="function"?r.append("[Function]"):A(s,c)}try{return b(e,0),r.result()}catch(s){return"[Uninspectable]"}}var je=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"]);var de=class{constructor(){j(this,"hasRepeatedReferences",!1);j(this,"clones",[]);j(this,"index");j(this,"sources",[])}get(e){if(this.index){let r=this.index.get(e);return r!==void 0&&(this.hasRepeatedReferences=!0),r}let t=this.sources.indexOf(e);if(t!==-1)return this.hasRepeatedReferences=!0,this.clones[t]}set(e,t){if(this.index){this.index.set(e,t);return}if(this.sources.push(e),this.clones.push(t),this.sources.length===32){this.index=new WeakMap;for(let r=0;r<this.sources.length;r++)this.index.set(this.sources[r],this.clones[r]);this.sources=[],this.clones=[]}}};function P(e,t){let r=t.get(e);if(r!==void 0)return r;let n=e.slice(0);return t.set(e,n),n}function he(e,t){if(typeof Buffer<"u"&&Buffer.isBuffer(e)){let i=Buffer.from(e);return t.set(e,i),i}let r=P(e.buffer,t);if(e instanceof DataView){let i=new DataView(r,e.byteOffset,e.byteLength);return t.set(e,i),i}let n=e.constructor,o=new n(r,e.byteOffset,e.length);return t.set(e,o),o}function E(e,t,r,n){for(let o of r){let i=t[o];e[o]=typeof i!="object"||i===null?i:k(i,n)}}function k(e,t){if(typeof e!="object"||e===null)return e;let r=t.get(e);if(r!==void 0)return r;if(Array.isArray(e)){let i=e.length,u=new Array(i);t.set(e,u);let p=e,l=Object.keys(e);if(l.length===i&&(i===0||l[i-1]==="".concat(i-1)))for(let f=0;f<i;f++){let h=p[f];u[f]=typeof h!="object"||h===null?h:k(h,t)}else E(u,p,l,t);return u}let n=Object.getPrototypeOf(e);if(n===Object.prototype||n===null){let i={};return t.set(e,i),E(i,e,Object.keys(e),t),i}if(e instanceof Date){let i=new Date(e.getTime());return t.set(e,i),i}if(ArrayBuffer.isView(e))return he(e,t);if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return P(e,t);if(e instanceof Map){let i=new Map;t.set(e,i);for(let[u,p]of e)i.set(k(u,t),k(p,t));return i}if(e instanceof Set){let i=new Set;t.set(e,i);for(let u of e)i.add(k(u,t));return i}let o={};return t.set(e,o),E(o,e,Object.keys(e),t),o}function w(e){return k(e,new de)}function L(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)}var _,Fe=(_=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))==null?void 0:_.get;var De=Date.prototype.getTime;function M(e,t,r){let n=e.length,o=0,i=0,u=-1,p=()=>{let l=0,f=0,h;do h=parseInt(e[o++],36),l+=(h&15)<<f,f+=4;while(h&16);return l};for(;o<n;){let l=u+1+p();r(l,u=l+p(),t?parseInt(t[i++],36):0)}}function N(e,t,r){let n=0,o=t.length-1;for(;n<=o;){let i=n+o>>>1,u=r[i];if(e<t[i])o=i-1;else if(e>u>>>5)n=i+1;else return u&31}return 0}var q="090001000h1v5g2903000hl2v6jh16ng1s210111110o35aa10u2k1g10l6600152113h2010u1q1r5aq3890o13181214r22k3158q2n1000v100h1k20000001207030001160721k171001h1j11610332010010321210090411021c1c02100o301201412230u1130b100h1j116111420120411001100k11l10051001h1j11611142011000321210072411021d0g10r3000000132120090o200200g1j11f2012031213711271t1001o301001000001121371b1f0c101h1l2011001031212000080a1t1001m40400102101600i11t301006c7i601008b6p41r10101041h3d0004115a1j290p3q223000511010100g1501010302003172030c0010016000e0i6v50n40n5tl12ir33s12t11u11cj30100060700010a90t220000l71i20m7203010241000502rd101004k300000006101027050920g3t22bk1300616g209030207u18c1000t10003010501b2o20000102000004g37070101o921c000640602001mcv3rg20000001o16d0c0m1fg6g2h30m10q55f1vm11c0ma0p1a42nc0ne1a090q3314902021204020112030318250105bb1201110i1021i15101131502141b15120511011k1155132040202510201010603060a1f02040104210b1g3290e0e0kn11vs12j11j3040pp12t80g6v1qi2500c0r51ktl7319g21g51gh103040n11010040j51i3f01q1h1d0m27p1a0000cs13200523j200010301010100v140018a4q2501010101c08000i1f12601011g3012215110u1a0001015000pcq181000100011000iji5fvc0u91g5bhg20ie0l94lo6002115303121s12240la1tj23h44tj11t45m4ah33q700000l3ep2021a200t220301012040a0i320j2040007f00100r20c100g3208000011531000s520201036020t900207l1101n311000000321210090a12634b910201l22001051020120011020000e1i520701020000n10h5001050000010000010001re0010323010001r11i520701000001q6000000107l600000230004gg12080001lc62027111n1000411230000000000t820321030030r10090n205001380800501020n2050c0001mc00002000000nc006150000i5l1100600010001q753011160000i441111000000rl11019100000c1h201043102n10ltk1f006eoss2b0202gs94r36si2033ku101m373h50b1rqs4113sli1t22m1uh2435070726u13k92rr7m34h380e0m141egl561g1261114k60ga6nn10t33sv13uf1jf0207150qt16t66pr60n23k6bf1f0e1l29g71c1e029j1n30p11ea0k1028139m16rb2v621122i52213040tf1u3b51n17127c0232041d120819052c28220104060306l5g3l4572g130152cqdl2c3o37a5o27u11c32d9m2cu2191obo57eh9gg1tv3",V="262122424333333393233393339333333333393393bf3b3b3b3b3f3f3bffff33b3bb33ff3f33b3b3333333bffff3b33bb33f33bffff33b3bb33ff3f33b3bbb333b3ff33b333f33b3b3b3b3333b3bf33b3bb39333b33b33b3b3b333b333333b3b33333f3b33b3ffb3f3fff3f3b33f35dc33333f3b3b3b33323333b3bb3b33b3fb3b3333b33333bff3b3f33bfb3b3ff3b3b3b3b3b333b333b3323e224423444444444444444444444444444444444444444444444444444444444444444444444444444444433334433333333b3b3bb33333b353bff3b3b3b3f3ff3b3b333bfff3f33333fb3bb3fb3b3bb33232333f333fff333333333b3b3333bb3b39393f3b3fbf33bb3b393b3b3b3333b33b33b3bbb33b33ffff3b3333bb3933b3b3b333b3b3b3b3b33b3b3b33b3b3b33b3b33b33b3b3b3fffff3bb39b9b3b33b3bf3f3b33f3b3f93b33b3b3bb33b33b3b3b3333393b3b3b33b39bffb3b332333b333dd3b3333233332333333333333333333333333333444444444444a4444444444444344444444444444444444444444444444444444444444",H="0001000000010010000000100000000000000000000000000001000000010018000100000001001000010101100101100000000000000000000100000001111000010000000110101001110111111111000100000021001000010000000100100001000000011010000100000001111000014000000100180001000000010010";var Q=new Uint8Array(12448),z=new Uint8Array(1440),Z=new Uint8Array(2816),J,Y;{let e=(o,i,u,p,l)=>{let f=p-i+1,h=o.length;f>0&&u-i<h&&o.fill(l,u>i?u-i:0,f>h?h:f)},t=new Uint32Array(320),r=new Uint32Array(320),n=0;M(q,V,(o,i,u)=>{e(Q,0,o,i,u),e(z,42592,o,i,u),e(Z,126976,o,i,u),i>=65040&&!(o>=126976&&i<=129791)&&(t[n]=o,r[n++]=i<<5|u)}),J=t.slice(0,n),Y=r.slice(0,n)}function G(e){return e<12448?Q[e]:e<42592?e===12951||e===12953?4:0:e<44032?z[e-42592]:e<55204?(e-44032)%28?8:7:e>=126976&&e<129792?Z[e-126976]:e>>>4===4064?3:ge(e)}function ge(e){return e<57344?e<=55238?e>=55216?13:0:e>=55243&&e<=55291?12:0:e<65024?e===64286?3:0:e>=917504?e>921599?0:e>=917536&&e<917632||e>=917760&&e<918e3?3:2:N(e,J,Y)}var be=Uint8Array.from(H);function me(e){return e===2381||e===2509||e===2765||e===2893||e===3149||e===3405||e===4153||e===6098||e===6752||e===6980||e===7083||e===43456||e===43766||e===68159||e===69939||e===70608||e===71998||e===72263||e===72345||e===73538}function ye(e,t){return t===8204?e&21:e&8||me(t)?e&21|40:e&21|32}function K(e,t,r){return t===3?e&32?ye(e,r):e&21:t===4?17:t===10?e&2^3:t===14?(e&16)>>2|e&41:t===15?33:1}function X(e){let t=[],r=e.length;if(r===0)return t;let n=e.codePointAt(0),o=n>65535?2:1,i=G(n),u=K(1,i,n),p=0;for(;o<r;){n=e.codePointAt(o);let l=G(n),f=!(u&be[i<<4|l]);u=K(u,l,n),f&&(t.push(e.slice(p,o)),p=o),o+=n>65535?2:1,i=l}return t.push(e.slice(p)),t}function ee(e){return typeof e=="object"&&e!==null?w(e):e}function I(e,t){if(typeof t!="function")throw new TypeError("ast-monkey-traverse/traverse(): [THROW_ID_01] The second argument must be a callback function. It was ".concat(typeof t,"."));let r={now:!1},n=0;function o(i,u,p,l,f,h){let a=i,A=l?l.slice(l.lastIndexOf(".")+1):null,b,s=-1,c,m=!1;if(Array.isArray(a))for(let d=0;d<a.length&&!h.now;d++){let v=a[d];if(v===void 0){a.splice(d,1),n+=1,c=void 0;continue}let y=l?"".concat(l,".").concat(d):"".concat(d);s!==n&&(c===void 0?b=w(a):(b=b.slice(),m?b.splice(c,1):b[c]=ee(a[c])),s=n),c=void 0;let x={depth:p,path:y,parent:b,parentType:"array",parentKey:A};f!==void 0&&(x.topmostKey=f);let g=u(v,void 0,x,h);typeof g=="object"&&g!==null&&(g!==v&&(g=w(g)),g=o(g,u,p+1,y,f,h));let C=!1;Number.isNaN(g)&&d<a.length?(a.splice(d,1),n+=1,C=!0):g!==v&&(a[d]=g,n+=1),s!==n&&(c=d,m=C),C&&(d-=1)}else if(L(a))for(let d in a){if(h.now)break;let v=l?"".concat(l,".").concat(d):d;p===0&&(f=d),s!==n&&(c===void 0?b=w(a):(b=B({},b),m?delete b[c]:b[c]=ee(a[c])),s=n),c=void 0;let y=a[d],x={depth:p,path:v,parent:b,parentType:"object",parentKey:A};f!==void 0&&(x.topmostKey=f);let g=u(d,y,x,h);typeof g=="object"&&g!==null&&(g!==y&&(g=w(g)),g=o(g,u,p+1,v,f,h));let C=!1;Number.isNaN(g)?(delete a[d],n+=1,C=!0):g!==y&&(a[d]=g,n+=1),s!==n&&(c=d,m=C)}return a}return o(w(e),t,0,"",void 0,r)}var te="6.2.2";var xe=te,re=typeof Intl.Segmenter=="function"?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function O(e){let t=typeof e;return t==="string"||t==="number"}function ne(e,t,r){let n=e==="n"?"nativeToUnicode":"unicodeToNative";function o(l){return!(!O(l)||typeof l=="string"&&!/^\d*$/.test(l)||typeof l=="number"&&(!Number.isInteger(l)||l<0))}function i(l,f){let h=0,a=0;for(let A=0,b=l.length;A<b;A++){if(a+=l[A].length,f>=h&&f<a)return A;h+=l[A].length}throw new Error("string-convert-indexes/".concat(n,'(): [THROW_ID_01] the "indexes" value, ').concat(r,", is not covered by graphemes length!"))}function u(l,f){if(f>=l.length)throw new Error("string-convert-indexes/".concat(n,"(): [THROW_ID_02] the index to convert, ").concat(f,", is not covered by graphemes length!"));return l.slice(0,f).join("").length}if(typeof t!="string"||!t)throw new TypeError("string-convert-indexes/".concat(n,"(): [THROW_ID_03] the first input argument, input string, must be a non-zero-length string! Currently it's: ").concat(typeof t,", equal to:\n").concat(t));if(r===0)return 0;if(r==="0")return"0";let p=re?Array.from(re.segment(t),({segment:l})=>l):X(t);if(O(r)){if(o(r))return e==="u"?typeof r=="string"?String(u(p,+r)):u(p,+r):typeof r=="string"?String(i(p,+r)):i(p,+r);throw new Error("string-convert-indexes/".concat(n,'(): [THROW_ID_04] the second input argument, "indexes" is not suitable to describe string index - it was given as ').concat(S(r,4)," (").concat(typeof r,")"))}else{if(r&&typeof r=="object")return e==="u"?I(r,(l,f,h)=>{let a=f!==void 0?f:l;if(O(a)){if(o(a))return typeof a=="string"?String(u(p,+a)):u(p,+a);throw new Error("string-convert-indexes/".concat(n,"(): [THROW_ID_05] bad value was encountered, ").concat(S(a,4),", its path is ").concat(h.path))}return a}):I(r,(l,f,h)=>{let a=f!==void 0?f:l;if(O(a)){if(o(a))return typeof a=="string"?String(i(p,+a)):i(p,+a);throw new Error("string-convert-indexes/".concat(n,"(): [THROW_ID_06] bad value was encountered, ").concat(S(a,4),", its path is ").concat(h.path))}return a});throw new Error("string-convert-indexes/".concat(n,"(): [THROW_ID_07] the first input argument, a source string should be a string but it was given as ").concat(t,", type ").concat(typeof t))}}function Ae(e,t){return ne("n",e,t)}function we(e,t){return ne("u",e,t)}return ae(Ce);})();
10
+ "use strict";var stringConvertIndexes=(()=>{var $=Object.defineProperty,ve=Object.defineProperties,xe=Object.getOwnPropertyDescriptor,we=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertyNames,N=Object.getOwnPropertySymbols;var q=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable;var L=(e,r,t)=>r in e?$(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,w=(e,r)=>{for(var t in r||(r={}))q.call(r,t)&&L(e,t,r[t]);if(N)for(var t of N(r))je.call(r,t)&&L(e,t,r[t]);return e},z=(e,r)=>ve(e,we(r));var ke=(e,r)=>{for(var t in r)$(e,t,{get:r[t],enumerable:!0})},Oe=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of Ae(r))!q.call(e,i)&&i!==t&&$(e,i,{get:()=>r[i],enumerable:!(n=xe(r,i))||n.enumerable});return e};var De=e=>Oe($({},"__esModule",{value:!0}),e);var Ke={};ke(Ke,{nativeToUnicode:()=>ze,unicodeToNative:()=>Ve,version:()=>qe});var V=Symbol.for("ast-monkey-traverse.delete"),Ce=Object.prototype.hasOwnProperty;function A(e){throw new TypeError("ast-monkey-traverse/traverse(): [THROW_ID_02] The first argument must be an acyclic, unaliased tree of arrays, plain objects, and supported primitive values; ".concat(e,"."))}function Se(e,r){let t=Number(e);return Number.isInteger(t)&&t>=0&&t<r&&"".concat(t)===e}function K(e){return Array.isArray(e)?new Array(e.length):{}}function T(e,r,t){r==="__proto__"?Object.defineProperty(e,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):e[r]=t}function B(e){return e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function H(e,r=!1){if(B(e))return e;typeof e!="object"&&A("encountered an unsupported ".concat(typeof e," value"));let t=e,n=K(t),i=[{source:t,target:n}],s=new WeakSet([t]);for(;i.length;){let _=i.pop(),{source:u,target:a}=_,l=Array.isArray(u);Object.getPrototypeOf(u)!==(l?Array.prototype:Object.prototype)&&A(l?"encountered an array with a custom prototype":"encountered a non-plain or custom-prototype object");for(let o of Reflect.ownKeys(u)){if(l&&o==="length")continue;typeof o!="string"&&A(l?"encountered a symbol-keyed array property":"encountered a symbol-keyed object property"),l&&!Se(o,u.length)&&A("encountered the non-index array property ".concat(JSON.stringify(o)));let f=Object.getOwnPropertyDescriptor(u,o);f.enumerable||A(l?"encountered a non-enumerable array index ".concat(o):"encountered a non-enumerable property ".concat(JSON.stringify(o))),!("value"in f)&&!r&&A(l?"encountered an accessor array index ".concat(o):"encountered an accessor property ".concat(JSON.stringify(o)));let p="value"in f?f.value:u[o];if(B(p))T(a,o,p);else if(typeof p=="object"){s.has(p)&&A("encountered a cycle or repeated object reference"),s.add(p);let y=K(p);T(a,o,y),i.push({source:p,target:y})}else A("encountered an unsupported ".concat(typeof p," value"))}}return n}var j=Symbol("deleted snapshot entry");function P(e){let r=w({array:Array.isArray(e),entries:new Map},Array.isArray(e)?{lengths:[{value:e.length,version:0}]}:{}),t=[{source:e,target:r}];for(;t.length;){let n=t.pop(),{source:i,target:s}=n;for(let _ of Object.keys(i)){let u=i[_];if(typeof u=="object"&&u!==null){let a=w({array:Array.isArray(u),entries:new Map},Array.isArray(u)?{lengths:[{value:u.length,version:0}]}:{});s.entries.set(_,[{value:a,version:0}]),t.push({source:u,target:a})}else s.entries.set(_,[{value:u,version:0}])}}return r}function Q(e,r){let t=0,n=e.length-1;for(;t<n;){let i=Math.ceil((t+n)/2);e[i].version<=r?t=i:n=i-1}return e[t]}function C(e,r,t){let n=e.entries.get(r);return n?Q(n,t).value:j}function W(e,r){return Q(e.lengths,r).value}function F(e,r,t,n){let i=e.entries.get(r);i?i.push({value:t,version:n}):e.entries.set(r,[{value:j,version:n-1},{value:t,version:n}])}function $e(e,r,t){let n=t-1,i=W(e,n);for(let s=r;s<i-1;s+=1)F(e,"".concat(s),C(e,"".concat(s+1),n),t);i&&F(e,"".concat(i-1),j,t),e.lengths.push({value:Math.max(0,i-1),version:t})}function G(e,r){let t=new WeakMap;function n(i){let s=t.get(i);if(s)return s;let _=i.array?new Array(W(i,r)):{},u={defineProperty:()=>!0,deleteProperty:()=>!0,get:(l,o,f)=>{if(i.array&&o==="length")return W(i,r);if(typeof o=="string"){let p=C(i,o,r);if(p!==j)return typeof p=="object"&&p!==null?n(p):p}return Reflect.get(l,o,f)},getOwnPropertyDescriptor:(l,o)=>{if(i.array&&o==="length")return Reflect.getOwnPropertyDescriptor(l,o);if(typeof o=="string"){let f=C(i,o,r);return f===j?void 0:{configurable:!0,enumerable:!0,value:typeof f=="object"&&f!==null?n(f):f,writable:!0}}},has:(l,o)=>typeof o=="string"&&C(i,o,r)!==j||Reflect.has(l,o),ownKeys:()=>{let l=[...i.entries].filter(([o])=>C(i,o,r)!==j).map(([o])=>o);return i.array?[...l,"length"]:l},set:()=>!0,setPrototypeOf:()=>!0},a=new Proxy(_,u);return t.set(i,a),a}return n(e)}function J(e){let r=[],t=e;for(;t;)r.push(t.segment),t=t.parent;return r.reverse()}function Fe(e){let r="";for(let t of e)r=r?"".concat(r,".").concat(t):t;return r}function U(e,r){if(typeof r!="function")throw new TypeError("ast-monkey-traverse/traverse(): [THROW_ID_01] The second argument must be a callback function. It was ".concat(typeof r,"."));let t=H(e);if(typeof t!="object"||t===null)return t;let n=0,i={now:!1},s=[{container:t,depth:0,index:0,keys:Array.isArray(t)?[]:Object.keys(t),parentKey:null}];for(;s.length&&!i.now;){let _=s[s.length-1],u=Array.isArray(_.container)?_.container:void 0,a=!!u,l;if(u){if(_.index>=u.length){s.pop();continue}if(!Ce.call(u,_.index)){_.index+=1;continue}l="".concat(_.index)}else{if(_.index>=_.keys.length){s.pop();continue}l=_.keys[_.index]}let o=_.container[l],f={parent:_.pathNode,segment:l},p=_.depth===0&&!a?l:_.topmostKey,y,c=n,g,d,b;if(_.depth<100)g=_.path?"".concat(_.path,".").concat(l):l,d=_.pathSegments?[..._.pathSegments,l]:[l],b=w({depth:_.depth,path:g,pathSegments:d,get parent(){return _.snapshot||(_.snapshot=P(_.container)),y||(y=G(_.snapshot,c)),y},parentType:a?"array":"object",parentKey:_.parentKey},p===void 0?{}:{topmostKey:p});else{let k,D;b=w({depth:_.depth,get path(){return k||(k=J(f)),D!=null||(D=Fe(k)),D},get pathSegments(){return k||(k=J(f)),k},get parent(){return _.snapshot||(_.snapshot=P(_.container)),y||(y=G(_.snapshot,c)),y},parentType:a?"array":"object",parentKey:_.parentKey},p===void 0?{}:{topmostKey:p})}let h=r(a?o:l,a?void 0:o,b,i),m=h===V,v=typeof h=="object"&&h!==null,I=v&&typeof o=="object"&&o!==null&&h===o&&!!_.snapshot,x=h===V?o:h,O;!m&&!v&&!B(h)&&A("encountered an unsupported ".concat(typeof h," value")),!m&&v&&(h!==o||I)&&(x=H(h,!0),_.snapshot&&(O=P(x))),m?u?(u.splice(_.index,1),n+=1,_.snapshot&&$e(_.snapshot,_.index,n)):(delete _.container[l],n+=1,_.snapshot&&F(_.snapshot,l,j,n),_.index+=1):((!Object.is(x,o)||I)&&(T(_.container,l,x),n+=1,_.snapshot&&F(_.snapshot,l,O===void 0?x:O,n)),_.index+=1,!i.now&&typeof x=="object"&&x!==null&&s.push(w(w(w(z(w({container:x,depth:_.depth+1,index:0,keys:Array.isArray(x)?[]:Object.keys(x),parentKey:l},g===void 0?{}:{path:g}),{pathNode:f}),d===void 0?{}:{pathSegments:d}),O?{snapshot:O}:{}),p===void 0?{}:{topmostKey:p})))}return t}function Ee(){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 Re(e){return"\\u".concat(e.toString(16).padStart(4,"0"))}function E(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(Re(n)):e.append(r[t])}e.append('"')}}function Ie(e){return e.get&&e.set?"[Getter/Setter]":e.get?"[Getter]":e.set?"[Setter]":"[Accessor]"}function Y(e,r){e.append("Symbol(");let t=String(r);t.length>8&&E(e,t.slice(7,-1)),e.append(")")}function Z(e,r){typeof r=="symbol"?Y(e,r):E(e,String(r))}function S(e,r=0){let t=Ee(),n=r===4?4:0,i=new WeakSet,s=0;function _(c){n&&t.append(" ".repeat(c*n))}function u(c,g){c&&t.append(","),n&&(t.append("\n"),_(g+1))}function a(c,g,d){n&&g&&(t.append("\n"),_(d)),t.append(c)}function l(c,g){Object.prototype.hasOwnProperty.call(c,"value")?y(c.value,g):t.append(Ie(c))}function o(c,g){let d;try{d=Reflect.getOwnPropertyDescriptor(c,"length")}catch(m){t.append("[Uninspectable]");return}let b=d==null?void 0:d.value;if(!Number.isSafeInteger(b)||b<0){t.append("[Uninspectable]");return}t.append("[");let h=!1;for(let m=0;m<b&&!t.stopped();m+=1){if(u(h,g),h=!0,s>=50){t.append("[MaxEntries]");break}s+=1;let v;try{v=Reflect.getOwnPropertyDescriptor(c,String(m))}catch(I){t.append("[Uninspectable]");continue}v!=null&&v.enumerable?l(v,g+1):t.append("[Empty]")}a("]",h,g)}function f(c,g){let d;try{d=Reflect.ownKeys(c)}catch(h){t.append("[Uninspectable]");return}t.append("{");let b=!1;for(let h of d){if(t.stopped())break;if(s>=50){u(b,g),b=!0,E(t,"\u2026"),t.append(n?": ":":"),t.append("[MaxEntries]");break}s+=1;let m;try{m=Reflect.getOwnPropertyDescriptor(c,h)}catch(v){u(b,g),b=!0,Z(t,h),t.append(n?": ":":"),t.append("[Uninspectable]");continue}m!=null&&m.enumerable&&(u(b,g),b=!0,Z(t,h),t.append(n?": ":":"),l(m,g+1))}a("}",b,g)}function p(c,g){if(i.has(c)){t.append("[Circular]");return}if(g>=5){t.append("[MaxDepth]");return}let d;try{d=Array.isArray(c)}catch(b){t.append("[Uninspectable]");return}i.add(c);try{d?o(c,g):f(c,g)}finally{i.delete(c)}}function y(c,g){c===null?t.append("null"):typeof c=="string"?E(t,c):typeof c=="number"?t.append(Object.is(c,-0)?"-0":String(c)):typeof c=="boolean"?t.append(c?"true":"false"):typeof c>"u"?t.append("undefined"):typeof c=="bigint"?t.append("".concat(c,"n")):typeof c=="symbol"?Y(t,c):typeof c=="function"?t.append("[Function]"):p(c,g)}try{return y(e,0),t.result()}catch(c){return"[Uninspectable]"}}var Pe=["_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_1_4_3_0_i_0_f_1_n_0_b_7_2_1_2_l_1_6_1_1_1_4_3_0_u_1_1_2","_f_0_h_0_1_5_3_2_1_3_3_1_1_0_1_1_3_1_3_2_3_b_m_0_1g_7_1_2_1_m_1_f_3_0_q_2_1_1_2_1_u_0_4_7_1_2_1_m_1_","9_1_4_3_0_u_2_1_1_f_1_h_8_1_2_1_14_2_0_g_0_5_2_8_2_o_5_5_h_3_n_1_8_1_0_2_6_1m_1b_1_1_c_6_1m_1_1_0_1_","4_1_n_1_0_1_9_1_1_9_0_2_4_1_0_l_3_w_0_1r_7_1_z_r_4_37_16_k_0_g_5_4_3_3_0_3_1_7_2_4_c_c_0_h_11_1_0_5_","0_2_16_1_98_1_3_2_6_1_0_1_3_2_14_1_3_2_w_1_3_2_6_1_0_1_3_2_e_1_1k_1_3_2_1u_11_f_g_2d_2_5_3_h7_2_g_1_","p_5_22_6_7_7_h_d_i_e_h_e_c_1_2_f_1f_z_0_4_0_1v_2g_7_4_2_x_1_0_5_1x_a_u_1d_t_2_4_b_17_4_p_1i_m_9_1g_2","a_0_2l_1a_h_7_1i_t_d_1_a_17_q_z_15_2_a_z_2_a_5_16_2_2_15_3_1_5_1_1_3_0_5_5b_1s_7p_2_5_2_11_2_5_2_7_1","_0_1_0_1_0_1_u_2_1g_1_6_1_0_3_2_1_6_3_3_2_5_4_c_5_2_1_6_38_0_d_0_g_c_2t_0_4_0_2_9_1_0_3_4_6_0_1_0_1_","0_1_3_1_a_2_3_5_4_4_0_1g_1_22j_6c_6_3_3_1_c_11_1_0_5_0_2_1j_7_0_g_m_9_6_1_6_1_6_1_6_1_6_1_6_1_6_1_6_","28_0_d1_1_16_4_5_1_4_2d_6_2_1_2h_1_3_5_16_1_2l_h_v_1c_f_e8_533_1s_h3g_1v_19_2_7g_3_f_a_1_k_1a_g_u_2_","1x_1d_8_2_2u_2_29_k_g_1_2_1_3_1_m_t_1f_e_1d_1q_5_3_0_1_1_b_r_a_m_p_s_7_1a_s_0_g_4_1_9_a_4_1_14_n_2_1","_7_k_m_3_0_3_1d_1_0_3_1_2_4_2_0_1_0_o_2_2_a_7_2_c_5_2_5_2_5_9_6_1_6_1_16_1_d_6_36_t_8mb_c_m_4_1c_6is","_a5_2_2x_12_6_c_4_5_0_1_9_1_c_1_4_1_0_1_1_1_1_1_2z_x_a2_i_1r_2_1h_14_b_38_4_1_3q_10_p_6_p_b_2g_3_5_2","_5_2_5_2_2_z_b_1_p_1_i_1_1_1_e_2_d_y_3e_at_s_3_1c_1b_v_d_j_1_7_6_11_a_t_2_z_4_7_1c_4d_i_z_4_z_4_13_8","_1f_c_a_1_e_1_6_1_1_1_a_1_e_1_6_1_1_3_1f_c_8m_9_l_a_7_o_5_1_15_1_8_1x_5_2_0_1_17_1_1_3_0_2_m_a_m_9_u","_1t_i_1_1_a_l_a_p_6_p_12_1j_6_1_1s_0_f_3_1_2_1_s_16_s_3_s_z_7_1_r_r_1h_a_l_a_i_d_h_32_20_1j_1e_d_1e_","d_z_12_r_9_m_6y_15_6_1_g_5_1k_s_a_0_8_l_16_h_1a_k_r_m_c_1g_1l_1_2_0_d_18_w_o_q_z_t_0_2_0_8_y_3_0_c_1","b_e_3_l_0_1_0_z_h_1_o_j_1_1r_6_1_0_1_3_1_e_1_9_7_1a_12_7_2_1_2_l_1_6_1_1_1_4_3_0_i_0_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(""),M=Pe.slice(1).split("_"),Te=[],X=127;for(let e=0;e<M.length;e+=2){let r=X+1+Number.parseInt(M[e],36),t=r+Number.parseInt(M[e+1],36);Te.push([r,t]),X=t}var Xe=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"]);var Be=Function.prototype.toString,et=Be.call(Object);var tt=Map.prototype.entries,rt=Set.prototype.values;var ee,nt=(ee=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength"))==null?void 0:ee.get,te,_t=(te=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags"))==null?void 0:te.get,re,it=(re=Object.getOwnPropertyDescriptor(RegExp.prototype,"global"))==null?void 0:re.get,ne,ot=(ne=Object.getOwnPropertyDescriptor(RegExp.prototype,"source"))==null?void 0:ne.get,lt=RegExp.prototype.test;var st=Date.prototype.getTime;function _e(e,r,t){let n=e.length,i=0,s=0,_=-1,u=()=>{let a=0,l=0,o;do o=parseInt(e[i++],36),a+=(o&15)<<l,l+=4;while(o&16);return a};for(;i<n;){let a=_+1+u();t(a,_=a+u(),r?parseInt(r[s++],36):0)}}function ie(e,r,t){let n=0,i=r.length-1;for(;n<=i;){let s=n+i>>>1,_=t[s];if(e<r[s])i=s-1;else if(e>_>>>5)n=s+1;else return _&31}return 0}var oe="090001000h1v5g2903000hl2v6jh16ng1s210111110o35aa10u2k1g10l6600152113h2010u1q1r5aq3890o13181214r22k3158q2n1000v100h1k20000001207030001160721k171001h1j11610332010010321210090411021c1c02100o301201412230u1130b100h1j116111420120411001100k11l10051001h1j11611142011000321210072411021d0g10r3000000132120090o200200g1j11f2012031213711271t1001o301001000001121371b1f0c101h1l2011001031212000080a1t1001m40400102101600i11t301006c7i601008b6p41r10101041h3d0004115a1j290p3q223000511010100g1501010302003172030c0010016000e0i6v50n40n5tl12ir33s12t11u11cj30100060700010a90t220000l71i20m7203010241000502rd101004k300000006101027050920g3t22bk1300616g209030207u18c1000t10003010501b2o20000102000004g37070101o921c000640602001mcv3rg20000001o16d0c0m1fg6g2h30m10q55f1vm11c0ma0p1a42nc0ne1a090q3314902021204020112030318250105bb1201110i1021i15101131502141b15120511011k1155132040202510201010603060a1f02040104210b1g3290e0e0kn11vs12j11j3040pp12t80g6v1qi2500c0r51ktl7319g21g51gh103040n11010040j51i3f01q1h1d0m27p1a0000cs13200523j200010301010100v140018a4q2501010101c08000i1f12601011g3012215110u1a0001015000pcq181000100011000iji5fvc0u91g5bhg20ie0l94lo6002115303121s12240la1tj23h44tj11t45m4ah33q700000l3ep2021a200t220301012040a0i320j2040007f00100r20c100g3208000011531000s520201036020t900207l1101n311000000321210090a12634b910201l22001051020120011020000e1i520701020000n10h5001050000010000010001re0010323010001r11i520701000001q6000000107l600000230004gg12080001lc62027111n1000411230000000000t820321030030r10090n205001380800501020n2050c0001mc00002000000nc006150000i5l1100600010001q753011160000i441111000000rl11019100000c1h201043102n10ltk1f006eoss2b0202gs94r36si2033ku101m373h50b1rqs4113sli1t22m1uh2435070726u13k92rr7m34h380e0m141egl561g1261114k60ga6nn10t33sv13uf1jf0207150qt16t66pr60n23k6bf1f0e1l29g71c1e029j1n30p11ea0k1028139m16rb2v621122i52213040tf1u3b51n17127c0232041d120819052c28220104060306l5g3l4572g130152cqdl2c3o37a5o27u11c32d9m2cu2191obo57eh9gg1tv3",le="262122424333333393233393339333333333393393bf3b3b3b3b3f3f3bffff33b3bb33ff3f33b3b3333333bffff3b33bb33f33bffff33b3bb33ff3f33b3bbb333b3ff33b333f33b3b3b3b3333b3bf33b3bb39333b33b33b3b3b333b333333b3b33333f3b33b3ffb3f3fff3f3b33f35dc33333f3b3b3b33323333b3bb3b33b3fb3b3333b33333bff3b3f33bfb3b3ff3b3b3b3b3b333b333b3323e224423444444444444444444444444444444444444444444444444444444444444444444444444444444433334433333333b3b3bb33333b353bff3b3b3b3f3ff3b3b333bfff3f33333fb3bb3fb3b3bb33232333f333fff333333333b3b3333bb3b39393f3b3fbf33bb3b393b3b3b3333b33b33b3bbb33b33ffff3b3333bb3933b3b3b333b3b3b3b3b33b3b3b33b3b3b33b3b33b33b3b3b3fffff3bb39b9b3b33b3bf3f3b33f3b3f93b33b3b3bb33b33b3b3b3333393b3b3b33b39bffb3b332333b333dd3b3333233332333333333333333333333333333444444444444a4444444444444344444444444444444444444444444444444444444444",se="0001000000010010000000100000000000000000000000000001000000010018000100000001001000010101100101100000000000000000000100000001111000010000000110101001110111111111000100000021001000010000000100100001000000011010000100000001111000014000000100180001000000010010";var ce=new Uint8Array(12448),fe=new Uint8Array(1440),pe=new Uint8Array(2816),ge,he;{let e=(i,s,_,u,a)=>{let l=u-s+1,o=i.length;l>0&&_-s<o&&i.fill(a,_>s?_-s:0,l>o?o:l)},r=new Uint32Array(320),t=new Uint32Array(320),n=0;_e(oe,le,(i,s,_)=>{e(ce,0,i,s,_),e(fe,42592,i,s,_),e(pe,126976,i,s,_),s>=65040&&!(i>=126976&&s<=129791)&&(r[n]=i,t[n++]=s<<5|_)}),ge=r.slice(0,n),he=t.slice(0,n)}function ae(e){return e<12448?ce[e]:e<42592?e===12951||e===12953?4:0:e<44032?fe[e-42592]:e<55204?(e-44032)%28?8:7:e>=126976&&e<129792?pe[e-126976]:e>>>4===4064?3:We(e)}function We(e){return e<57344?e<=55238?e>=55216?13:0:e>=55243&&e<=55291?12:0:e<65024?e===64286?3:0:e>=917504?e>921599?0:e>=917536&&e<917632||e>=917760&&e<918e3?3:2:ie(e,ge,he)}var Ue=Uint8Array.from(se);function Me(e){return e===2381||e===2509||e===2765||e===2893||e===3149||e===3405||e===4153||e===6098||e===6752||e===6980||e===7083||e===43456||e===43766||e===68159||e===69939||e===70608||e===71998||e===72263||e===72345||e===73538}function Ne(e,r){return r===8204?e&21:e&8||Me(r)?e&21|40:e&21|32}function ue(e,r,t){return r===3?e&32?Ne(e,t):e&21:r===4?17:r===10?e&2^3:r===14?(e&16)>>2|e&41:r===15?33:1}function de(e){let r=[],t=e.length;if(t===0)return r;let n=e.codePointAt(0),i=n>65535?2:1,s=ae(n),_=ue(1,s,n),u=0;for(;i<t;){n=e.codePointAt(i);let a=ae(n),l=!(_&Ue[s<<4|a]);_=ue(_,a,n),l&&(r.push(e.slice(u,i)),u=i),i+=n>65535?2:1,s=a}return r.push(e.slice(u)),r}var be="6.2.4";var qe=be,ye=typeof Intl.Segmenter=="function"?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function R(e){let r=typeof e;return r==="string"||r==="number"}function me(e,r,t){let n=e==="n"?"nativeToUnicode":"unicodeToNative";function i(a){return!(!R(a)||typeof a=="string"&&!/^\d*$/.test(a)||typeof a=="number"&&(!Number.isInteger(a)||a<0))}function s(a,l){let o=0,f=0;for(let p=0,y=a.length;p<y;p++){if(f+=a[p].length,l>=o&&l<f)return p;o+=a[p].length}throw new Error("string-convert-indexes/".concat(n,'(): [THROW_ID_01] the "indexes" value, ').concat(t,", is not covered by graphemes length!"))}function _(a,l){if(l>=a.length)throw new Error("string-convert-indexes/".concat(n,"(): [THROW_ID_02] the index to convert, ").concat(l,", is not covered by graphemes length!"));return a.slice(0,l).join("").length}if(typeof r!="string"||!r)throw new TypeError("string-convert-indexes/".concat(n,"(): [THROW_ID_03] the first input argument, input string, must be a non-zero-length string! Currently it's: ").concat(typeof r,", equal to:\n").concat(r));if(t===0)return 0;if(t==="0")return"0";let u=ye?Array.from(ye.segment(r),({segment:a})=>a):de(r);if(R(t)){if(i(t))return e==="u"?typeof t=="string"?String(_(u,+t)):_(u,+t):typeof t=="string"?String(s(u,+t)):s(u,+t);throw new Error("string-convert-indexes/".concat(n,'(): [THROW_ID_04] the second input argument, "indexes" is not suitable to describe string index - it was given as ').concat(S(t,4)," (").concat(typeof t,")"))}else{if(t&&typeof t=="object")return e==="u"?U(t,(a,l,o)=>{let f=o.parentType==="object"?l:a;if(R(f)){if(i(f))return typeof f=="string"?String(_(u,+f)):_(u,+f);throw new Error("string-convert-indexes/".concat(n,"(): [THROW_ID_05] bad value was encountered, ").concat(S(f,4),", its path is ").concat(o.path))}return f}):U(t,(a,l,o)=>{let f=o.parentType==="object"?l:a;if(R(f)){if(i(f))return typeof f=="string"?String(s(u,+f)):s(u,+f);throw new Error("string-convert-indexes/".concat(n,"(): [THROW_ID_06] bad value was encountered, ").concat(S(f,4),", its path is ").concat(o.path))}return f});throw new Error("string-convert-indexes/".concat(n,"(): [THROW_ID_07] the first input argument, a source string should be a string but it was given as ").concat(r,", type ").concat(typeof r))}}function ze(e,r){return me("n",e,r)}function Ve(e,r){return me("u",e,r)}return De(Ke);})();
11
11
  /**
12
- * @name codsen-utils
13
- * @fileoverview Various utility functions
14
- * @version 1.9.0
12
+ * @name ast-monkey-traverse
13
+ * @fileoverview Utility library to traverse AST
14
+ * @version 4.3.1
15
15
  * @author Roy Revelt
16
16
  * @license MIT
17
- * {@link https://codsen.com/os/codsen-utils/}
17
+ * {@link https://codsen.com/os/ast-monkey-traverse/}
18
18
  */
19
19
  /**
20
- * @name ast-monkey-traverse
21
- * @fileoverview Utility library to traverse AST
22
- * @version 4.2.2
20
+ * @name codsen-format-diagnostic-value
21
+ * @fileoverview Safely format untrusted JavaScript values for diagnostics
22
+ * @version 1.1.1
23
23
  * @author Roy Revelt
24
24
  * @license MIT
25
- * {@link https://codsen.com/os/ast-monkey-traverse/}
25
+ * {@link https://codsen.com/os/codsen-format-diagnostic-value/}
26
26
  */
27
- /*!
28
- * unicode-segmenter
29
- * MIT License
30
- * Copyright (c) 2024 Hyeseong Kim <hey@hyeseong.kim>
31
- *
32
- * Permission is hereby granted, free of charge, to any person obtaining a copy
33
- * of this software and associated documentation files (the "Software"), to deal
34
- * in the Software without restriction, including without limitation the rights
35
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36
- * copies of the Software, and to permit persons to whom the Software is
37
- * furnished to do so, subject to the following conditions:
38
- *
39
- * The above copyright notice and this permission notice shall be included in
40
- * all copies or substantial portions of the Software.
41
- *
42
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
48
- * SOFTWARE.
27
+ /**
28
+ * @name codsen-utils
29
+ * @fileoverview Various utility functions
30
+ * @version 1.10.1
31
+ * @author Roy Revelt
32
+ * @license MIT
33
+ * {@link https://codsen.com/os/codsen-utils/}
49
34
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "string-convert-indexes",
3
- "version": "6.2.2",
3
+ "version": "6.2.4",
4
4
  "description": "Convert between native JS string character indexes and grapheme-count-based indexes",
5
5
  "keywords": [
6
6
  "astral",
@@ -66,8 +66,8 @@
66
66
  "various": {}
67
67
  },
68
68
  "dependencies": {
69
- "ast-monkey-traverse": "^4.2.2",
70
- "codsen-utils": "^1.9.0",
69
+ "ast-monkey-traverse": "^4.3.1",
70
+ "codsen-utils": "^1.10.1",
71
71
  "unicode-segmenter": "^0.17.3"
72
72
  },
73
73
  "engines": {