(function(o,f){typeof exports=="object"&&typeof module<"u"?f(exports):typeof define=="function"&&define.amd?define(["exports"],f):(o=typeof globalThis<"u"?globalThis:o||self,f(o["cas-utils"]={}))})(this,function(o){"use strict";const f=["de","del","la","las","el","los","y","e","o","u","a","al","con","en","por","para","sin","sobre"],b=["a","an","and","as","at","but","by","for","from","in","into","of","on","or","the","to","with"];function h(e){return!e||typeof e!="string"?"":e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}function y(e,r={}){if(!e||typeof e!="string")return"";const{language:p="es",strict:m=!1,customExceptions:l=[]}=r,n=p==="en"?[...b,...l]:[...f,...l];return e.toLowerCase().split(/\s+/).map((i,u)=>u===0||m||!n.includes(i)?h(i):i).join(" ")}function W(e){return y(e,{strict:!0})}function L(e){if(!e||typeof e!="string")return"";const r=e.toLowerCase();return r.charAt(0).toUpperCase()+r.slice(1)}function A(e,r=300,p={}){if(typeof e!="function")throw new TypeError("Expected a function");const{leading:m=!1,trailing:l=!0}=p;let n,c,i,u,a;function E(t){const s=c,d=i;return c=i=void 0,u=e.apply(d,s),u}function w(t){return n=setTimeout(g,r),m?E():u}function I(t){const s=t-a;return r-s}function S(t){const s=t-a;return a===void 0||s>=r}function g(){const t=Date.now();if(S(t))return T();n=setTimeout(g,I(t))}function T(t){return n=void 0,l&&c?E():(c=i=void 0,u)}function C(...t){const s=Date.now(),d=S(s);return c=t,i=this,a=s,d&&n===void 0?w():(n===void 0&&(n=setTimeout(g,r)),u)}return C.cancel=function(){n!==void 0&&clearTimeout(n),a=n=c=i=void 0},C.flush=function(){return n===void 0?u:T()},C}o.capitalize=y,o.debounce=A,o.sentenceCase=L,o.titleCase=W,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
