mongoku
Version:
[](https://github.com/huggingface/Mongoku/actions/workflows/ci.yml)
2 lines (1 loc) • 1.48 kB
JavaScript
import{ab as d,ac as v,ad as h,ae as l,j as c,af as A,ag as f,ah as T,w as p,ai as E}from"./IwGwbOe7.js";import{b as S,r as g}from"./Dzt_TFtX.js";const m=Symbol("is custom element"),L=Symbol("is html"),R=f?"link":"LINK",I=f?"progress":"PROGRESS";function y(r){if(c){var e=!1,s=()=>{if(!e){if(e=!0,r.hasAttribute("value")){var o=r.value;n(r,"value",null),r.value=o}if(r.hasAttribute("checked")){var a=r.checked;n(r,"checked",null),r.checked=a}}};r[T]=s,p(s),E()}}function C(r,e){var s=_(r);s.value===(s.value=e??void 0)||r.value===e&&(e!==0||r.nodeName!==I)||(r.value=e??"")}function n(r,e,s,o){var a=_(r);c&&(a[e]=r.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&r.nodeName===R)||a[e]!==(a[e]=s)&&(e==="loading"&&(r[d]=s),s==null?r.removeAttribute(e):typeof s!="string"&&M(r).includes(e)?r[e]=s:r.setAttribute(e,s))}function _(r){return r[v]??={[m]:r.nodeName.includes("-"),[L]:r.namespaceURI===h}}var i=new Map;function M(r){var e=r.getAttribute("is")||r.nodeName,s=i.get(e);if(s)return s;i.set(e,s=[]);for(var o,a=r,u=Element.prototype;u!==a;){o=A(a);for(var t in o)o[t].set&&t!=="innerHTML"&&t!=="textContent"&&t!=="innerText"&&s.push(t);a=l(a)}return s}const N="";function H(...r){if(!r[0].startsWith("/"))throw new Error(`Cannot use \`resolve(...)\` with a non-absolute pathname or route ID (got "${r[0]}"). \`resolve\` is only for internal pathnames and route IDs; external URLs should be used directly.`);return S+N+g(r[0],r[1])}export{y as a,C as b,H as r,n as s};