1 |
- let e={data:""},t=t=>{if("undefined"!=typeof window){let e=t?t.querySelector("#_goober"):window._goober;return e||(e=(t||document.head).appendChild(document.createElement("style")),e.innerHTML=" ",e.id="_goober"),e.firstChild}return t||e},r=/(?:([A-Z0-9-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(})/gi,o=/\/\*[\s\S]*?\*\/|\s{2,}|\n/gm,l=(e,t)=>{let r,o="",a="",s="";for(let n in e){let c=e[n];"object"==typeof c?(r=t?t.replace(/([^,])+/g,e=>n.replace(/([^,])+/g,t=>/&/g.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n,a+="@"==n[0]?"f"==n[1]?l(c,n):n+"{"+l(c,"k"==n[1]?"":t)+"}":l(c,r)):"@"==n[0]&&"i"==n[1]?o=n+" "+c+";":s+=l.p?l.p(n.replace(/[A-Z]/g,"-$&").toLowerCase(),c):n.replace(/[A-Z]/g,"-$&").toLowerCase()+":"+c+";"}return s[0]?(r=t?t+"{"+s+"}":s,o+r+a):o+a},a={},s=e=>{let t="";for(let r in e)t+=r+("object"==typeof e[r]?s(e[r]):e[r]);return t},n=(e,t,n,c,p)=>{let i="object"==typeof e?s(e):e,f=a[i]||(a[i]=(e=>{let t=0,r=e.length,o=11;for(;t<r;)o=101*o+e.charCodeAt(t++)>>>0;return"go"+o})(i));if(!a[f]){let t="object"==typeof e?e:(e=>{let t,l=[{}];for(;t=r.exec(e.replace(o,""));)t[4]&&l.shift(),t[3]?l.unshift(l[0][t[3]]=l[0][t[3]]||{}):t[4]||(l[0][t[1]]=t[2]);return l[0]})(e);a[f]=l(p?{["@keyframes "+f]:t}:t,n?"":"."+f)}return((e,t,r)=>{-1==t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e)})(a[f],t,c),f},c=(e,t,r)=>e.reduce((e,o,a)=>{let s=t[a];if(s&&s.call){let e=s(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;s=t?"."+t:e&&"object"==typeof e?e.props?"":l(e,""):e}return e+o+(null==s?"":s)},"");function p(e){let r=this||{},o=e.call?e(r.p):e;return n(o.unshift?o.raw?c(o,[].slice.call(arguments,1),r.p):o.reduce((e,t)=>t?Object.assign(e,t.call?t(r.p):t):e,{}):o,t(r.target),r.g,r.o,r.k)}let i,f,u,d=p.bind({g:1}),g=p.bind({k:1});exports.css=p,exports.extractCss=e=>{let r=t(e),o=r.data;return r.data="",o},exports.glob=d,exports.keyframes=g,exports.setup=function(e,t,r,o){l.p=t,i=e,f=r,u=o},exports.styled=function(e,t){let r=this||{};return function(){let o=arguments;function l(a,s){let n=Object.assign({},a),c=n.className||l.className;r.p=Object.assign({theme:f&&f()},n),r.o=/ *go\d+/g.test(c),n.className=p.apply(r,o)+(c?" "+c:""),t&&(n.ref=s);let d=n.as||e;return u&&d[0]&&u(n),i(d,n)}return t?t(l):l}};
|