UNPKG

decocms

Version:

Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools

2 lines (1 loc) • 573 B
import"./index-ztdGKvBm.js";const i=/^mcp__[a-zA-Z0-9_-]+__/;function l(t){return t.replace(i,"")}function n(t){let r=2166136261;for(let e=0;e<t.length;e++)r=Math.imul(r^t.charCodeAt(e),16777619);return`a${(r>>>0).toString(36).padStart(6,"0").slice(-6)}`}function s(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function o(t,r){if(!r)return t;const e=`${n(r)}_`;return t.startsWith(e)?t.slice(e.length):t}function c(t,r){return o(t,r).replace(/[_-]/g," ").toLowerCase()}export{o as a,c as d,s as g,l as s};