Files
pymc_console-dist/frontend/dist/assets/chat-utils-mqGCinix.js
GitHub Actions Bot c8c3f164ee Sync build v0.9.286
Automated sync from private repository.
Commit: fad7f9633de61427bfc2c672b7ddecaa0952d717
2026-02-27 07:48:08 +00:00

2 lines
1.1 KiB
JavaScript

import{r as e}from"./vendor-react-alRNW2nb.js";import{bb as n}from"./index-CkRTgHHA.js";const t=[n.green,n.blue,n.amber,n.pink,n.purple,n.cyan,n.orange,n.teal];function r(e){let n=0;for(let t=0;t<e.length;t++)n=e.charCodeAt(t)+((n<<5)-n);return t[Math.abs(n)%t.length]}const o=new RegExp("(?:\\p{Emoji_Presentation}|\\p{Emoji}\\uFE0F)","gu");function a(e){const n=e.match(o);return n&&n.length>0?{emoji:n[0],cleanName:e.replace(o,"").trim()||e}:{emoji:null,cleanName:e}}function i(e){const{cleanName:n}=a(e),t=n.split(/[\s-_]+/).filter(Boolean);return t.length>=2?((Array.from(t[0])[0]||"")+(Array.from(t[1])[0]||"")).toUpperCase():Array.from(n).slice(0,2).join("").toUpperCase()}function l(e){return new Date(1e3*e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",hour12:!1})}function s(n){const t=/@\[([^\]]+)\]/g,r=[];let o,a=0;for(;null!==(o=t.exec(n));)o.index>a&&r.push(n.slice(a,o.index)),r.push(e.createElement("span",{key:o.index,className:"font-extrabold text-white"},o[1])),a=o.index+o[0].length;return a<n.length&&r.push(n.slice(a)),r.length>0?r:n}export{i as a,l as b,a as e,s as f,r as g};