UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 929 B
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";import{au as t}from"./control-ui-connection-Bfj9beF_.js";function n(e){return c.test(e)}function r(e){return!t(e)||Object.keys(e).length!==3?!1:(e.source===`env`||e.source===`file`||e.source===`exec`||e.source===`store`)&&typeof e.provider==`string`&&e.provider.trim().length>0&&typeof e.id==`string`&&e.id.trim().length>0}function i(e){return e===`value`?!0:e.startsWith(`/`)?e.slice(1).split(`/`).every(e=>l.test(e)):!1}function a(e){return u.test(e)}function o(e){if(!d.test(e))return!1;for(let t of e.split(`/`))if(t===`.`||t===`..`)return!1;return!0}function s(e){return!r(e)||!a(e.provider)?!1:e.source===`env`||e.source===`store`?n(e.id):e.source===`file`?i(e.id):o(e.id)}var c,l,u,d;function f(){return(f=e((()=>{c=/^[A-Z][A-Z0-9_]{0,127}$/,l=/^(?:[^~]|~0|~1)*$/,u=/^[a-z][a-z0-9_-]{0,63}$/,d=/^[A-Za-z0-9][A-Za-z0-9._:/#-]{0,255}$/})))()}export{s as i,f as n,r,c as t};