function n(){return Math.random().toString(16).slice(-4)}function t(t=""){return t+"-"+n()+n()+"-"+n()+"-"+n()+n()+n()}function e(n){if(void 0===n)return!0;if(null==n)return!0;if(0===(null==n?void 0:n.length))return!0;if((null==n?void 0:n.length)>0)return!1;for(const t in n)if(n.hasOwnProperty(t))return!1;return JSON.stringify(n)===JSON.stringify({})}const r=n=>e(n)?null:`${n}`.replace(/\[([^\]]+)\]/g,".$1");function o(n){return function(n){return(n||"").replace(/(\:).+?(\:)/g,(n=>`<i class="${n.replaceAll(":","")}"></i>`))}(function(n){return(n||"").replace(/(\*).+?(\*)/g,(n=>`<strong>${n.replaceAll("*","")}</strong>`))}(function(n){return(n||"").replace(/(\_).+?(\_)/g,(n=>`<em>${n.replaceAll("_","")}</em>`))}(function(n){return(n||"").replace(/(\`).+?(\`)/g,(n=>`<code>${n.replaceAll("`","")}</code>`))}(n))))}function u(){const n=document.querySelector("html").getAttribute("lang")||"es";return["en","es"].includes(n)?n:"es"}function i(n){switch(n){case 400:return"error";case 401:case 403:return"forbidden";case 402:return"payment";case 404:case 405:return"unknown";case 406:return"no-result";case 412:case 418:return"invalid";case 422:return"missing";case 500:return"exception";default:return"failure"}}function c(...n){return n.reduce(((n,t)=>("object"==typeof t&&"string"!=typeof t&&(n=n.concat(Object.keys(t).filter((n=>t[n])))),"object"!=typeof t&&"string"==typeof t&&n.push(t),n)),[]).join(" ")}function a(){if(document.querySelector("body > x-overlay-container"))return document.querySelector("body > x-overlay-container");{const n=document.createElement("x-overlay-container");return document.querySelector("body").appendChild(n),n}}function s(){if(a().querySelector("x-tooltip-overlay"))return a().querySelector("x-tooltip-overlay");{const n=document.createElement("x-tooltip-overlay"),t=document.createElement("span"),e=document.createElement("div");return n.setAttribute("role","tooltip"),e.classList.add("tooltip-arrow"),n.appendChild(t),n.appendChild(e),a().appendChild(n),n}}function f(n="top"){if(a().querySelector(`x-notification-${n}`))return a().querySelector(`x-notification-${n}`);{const t=document.createElement(`x-notification-${n}`);return a().appendChild(t),t}}export{u as a,i as b,c,a as d,t as e,s as f,f as g,r as h,e as i,o as t}