UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 2.1 kB
import{n as e}from"./rolldown-runtime-8BhlS34s.js";import{K as t,W as n}from"./lit-runtime-IOnANfcZ.js";import{C as r,_ as i,d as a,g as o,h as s,m as c,p as l,x as u}from"./control-ui-boot-new-CkyIHJ_L.js";async function d(e){let n=o.find(t=>t.id===e);if(!n||!u().has(e))return null;let r=document.createElement(`div`);try{let i=a(n);r.className=`lobster-pet lobster-pet--palette-`+n.id,r.setAttribute(`aria-hidden`,`true`),r.style.cssText=c(i)+`;position:fixed;left:-10000px;top:0;bottom:auto;width:120px;height:105px;opacity:0;pointer-events:none;transform:none`,document.body.append(r),t(s(i,{standalone:!0}),r);let o=r.querySelector(`svg`);if(!o)return null;for(let e of[o,...o.querySelectorAll(`*`)])e.style.setProperty(`animation`,`none`,`important`),e.style.setProperty(`transition`,`none`,`important`);let l=o.cloneNode(!0),d=[o,...o.querySelectorAll(`*`)],p=[l,...l.querySelectorAll(`*`)];for(let[e,t]of d.entries()){let n=p[e];if(!n)continue;let r=getComputedStyle(t);n.removeAttribute(`class`),n.removeAttribute(`style`);for(let e of f){let t=r.getPropertyValue(e).replace(/url\(["']?[^)"']*#([^)"']+)["']?\)/g,`url("#$1")`);n.style.setProperty(e,t)}}let m=o.getBBox(),h=o.viewBox.baseVal,g=Math.min(h.x,m.x)-4,_=Math.min(h.y,m.y)-4,v=Math.max(h.x+h.width,m.x+m.width)-g+4,y=Math.max(h.y+h.height,m.y+m.height)-_+4;l.setAttribute(`viewBox`,[g,_,v,y].join(` `)),l.setAttribute(`width`,String(v)),l.setAttribute(`height`,String(y));let b=new Image;return b.src=`data:image/svg+xml;charset=utf-8,`+encodeURIComponent(new XMLSerializer().serializeToString(l)),await b.decode(),u().has(e)?b:null}catch{return null}finally{r.remove()}}var f;function p(){return(p=e((()=>{n(),r(),l(),i(),f=`color.fill.fill-opacity.fill-rule.stroke.stroke-width.stroke-opacity.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-dasharray.stroke-dashoffset.opacity.filter.clip-path.mask.display.visibility.transform.transform-origin.transform-box.shape-rendering.paint-order.font-family.font-size.font-weight.font-style.text-anchor.white-space`.split(`.`)})))()}p();export{d as loadUnlockedLobsterFavicon};