import{R as s}from"./vendor-ClLR6ncd.js";import"./lodash-ZyeDnt0e.js";import{j as o,i as u,f as i}from"./index-OtVJl4GC.js";function h(a){return a.flatMap(t=>[`sh:${t}`,`<http://www.w3.org/ns/shacl#${t}>`])}function r(a,t){return o(["shacl-shape",t],async e=>await u({url:i(e,"shacl-shapes"),headers:{Accept:"application/ld+json"},params:{...t?{shape:t}:void 0}}))}function c(a){return a["@graph"][0]["@id"]}function l(a){const t=c(a);if(a["@context"]){for(const[e,n]of Object.entries(a["@context"]))if(t.startsWith(`${e}:`))return`<${n}${t.substring(e.length+1)}>`}return`<${t}>`}function m(a,t){const e=r(a,t);return{...e,data:s.useMemo(()=>{var n;return(n=e.data)==null?void 0:n[0]},[e.data])}}function g(a){return r()}export{l as a,h as b,m as c,c as g,g as u};
