var e=/([\p{Ll}\d])(\p{Lu})/gu,t=/(\p{Lu})([\p{Lu}][\p{Ll}])/gu,n=/(\d)\p{Ll}|(\p{L})\d/u,r=/[^\p{L}\d]+/giu,i=`$1\0$2`,a=``;function o(n){let a=n.trim();a=a.replace(e,i).replace(t,i),a=a.replace(r,`\0`);let o=0,s=a.length;for(;a.charAt(o)===`\0`;)o++;if(o===s)return[];for(;a.charAt(s-1)===`\0`;)s--;return a.slice(o,s).split(/\0/g)}function s(e){let t=o(e);for(let e=0;e<t.length;e++){let r=t[e],i=n.exec(r);if(i){let n=i.index+(i[1]??i[2]).length;t.splice(e,1,r.slice(0,n),r.slice(n))}}return t}function c(e,t){let[n,r,i]=v(e,t);return n+r.map(m(t?.locale)).join(t?.delimiter??` `)+i}function l(e,t){let[n,r,i]=v(e,t),a=m(t?.locale),o=h(t?.locale),s=t?.mergeAmbiguousCharacters?g(a,o):_(a,o);return n+r.map(s).join(t?.delimiter??``)+i}function u(e,t){let[n,r,i]=v(e,t),a=m(t?.locale),o=h(t?.locale);return n+r.map(g(a,o)).join(t?.delimiter??` `)+i}function d(e,t){let[n,r,i]=v(e,t);return n+r.map(h(t?.locale)).join(t?.delimiter??`_`)+i}function f(e,t){let[n,r,i]=v(e,t),a=m(t?.locale),o=g(a,h(t?.locale));return n+r.map((e,t)=>t===0?o(e):a(e)).join(t?.delimiter??` `)+i}function p(e,t){return c(e,{delimiter:`_`,...t})}function m(e){return e===!1?e=>e.toLowerCase():t=>t.toLocaleLowerCase(e)}function h(e){return e===!1?e=>e.toUpperCase():t=>t.toLocaleUpperCase(e)}function g(e,t){return n=>`${t(n[0])}${e(n.slice(1))}`}function _(e,t){return(n,r)=>{let i=n[0];return(r>0&&i>=`0`&&i<=`9`?`_`+i:t(i))+e(n.slice(1))}}function v(e,t={}){let n=t.split??(t.separateNumbers?s:o),r=t.prefixCharacters??a,i=t.suffixCharacters??a,c=0,l=e.length;for(;c<e.length;){let t=e.charAt(c);if(!r.includes(t))break;c++}for(;l>c;){let t=l-1,n=e.charAt(t);if(!i.includes(n))break;l=t}return[e.slice(0,c),n(e.slice(c,l)),e.slice(l)]}export{p as a,f as i,d as n,l as r,u as t};
//# sourceMappingURL=dist-CTgmb7N2-B2RnidgM.js.map