UNPKG

@larva.io/webcomponents

Version:

Fentrica SmartUnits WebComponents package

5 lines 1.09 kB
/*! * (C) Fentrica http://fentrica.com - Seee LICENSE.md */ function n(n){return!!n.shadowRoot&&!!n.attachShadow}function t(n){return n.timeStamp||Date.now()}const i=(n,t,i)=>Math.max(n,Math.min(t,i));function o(t,i,o,r){if(n(t)){let n=t.querySelector("input.aux-input");if(!n){n=t.ownerDocument.createElement("input");n.type="hidden";n.classList.add("aux-input");t.appendChild(n)}n.disabled=r;n.name=i;n.value=o||""}}function r(n){return n.replace(/[A-Z]/g,(n=>"-"+n.toLowerCase()))}async function s(n,t,i){if(typeof t!=="string"&&!(t instanceof HTMLElement)){throw new Error("component is missing")}if(!n){throw new Error("container is missing")}const o=typeof t==="string"?n.ownerDocument&&n.ownerDocument.createElement(t):t;if(i){e(o,i)}n.appendChild(o);if(o.componentOnReady){await o.componentOnReady()}return o}function e(n,t){if(t){Object.assign(n,t)}for(const i of Object.keys(t)){if(i.match(/^on[A-Z][a-zA-Z0-9]*$/g)){const o=i.replace("on","").toLowerCase();n.addEventListener(o,t[i])}}}export{e as a,s as b,r as c,i as d,t as n,o as r}; //# sourceMappingURL=p-ue25B_tw.js.map