function c(l) {
  const r = Array.from(l), s = [], o = new RegExp("(\\p{P}|\\p{S}|\\s)", "gu");
  let t = "";
  for (let e = 0; e < r.length; e++) {
    const n = r[e];
    if (n === " ")
      (r[e + 1] ?? "") !== " " ? (s.push(t), t = n) : t += n;
    else if (n.match(o)) {
      s.push(t);
      let h = n;
      for (; e + 1 < r.length && r[e + 1] === n; )
        h += r[e + 1], e++;
      s.push(h), t = "";
    } else
      t += n;
  }
  return t.length > 0 && s.push(t), s.filter((e) => e.length > 0);
}
export {
  c as default
};
