/* esm.sh - @iconify/utils@3.1.7/lib/emoji/replace/replace */
import{getEmojiMatchesInText as m,sortEmojiMatchesInText as h}from"./find.mjs";function u(a,r,i){let c=m(a,r);if(!c.length)return null;let t=h(r,c),e="",o=!1;for(let n=0;n<t.length;n++){let l=t[n];e+=l.prev;let s=i({...l.match},e);s===void 0?e+=l.match.match:(e+=s,o=!0)}return e+=t[t.length-1].next,o?e:null}export{u as findAndReplaceEmojisInText};
//# sourceMappingURL=replace.mjs.map