"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../canUseDom.js"),y=require("../../StyleContext.js"),s="data-ant-cssinjs-cache-path",r="_FILE_STYLE__";function S(e){return Object.keys(e).map(t=>{const n=e[t];return`${t}:${n}`}).join(";")}let l,c=!0;function a(){if(!l&&(l={},o.default())){const e=document.createElement("div");e.className=s,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);let t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(i=>{const[d,u]=i.split(":");l[d]=u});const n=document.querySelector(`style[${s}]`);n&&(c=!1,n.parentNode?.removeChild(n)),document.body.removeChild(e)}}function f(e){return a(),!!l[e]}function p(e){const t=l[e];let n=null;if(t&&o.default())if(c)n=r;else{const i=document.querySelector(`style[${y.ATTR_MARK}="${l[e]}"]`);i?n=i.innerHTML:delete l[e]}return[n,t]}exports.ATTR_CACHE_MAP=s;exports.CSS_FILE_STYLE=r;exports.existPath=f;exports.getStyleAndHash=p;exports.prepare=a;exports.serialize=S;
