index.min.js
10 KB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.emotionCache=t()}(this,function(){"use strict";var n=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.maxLength=this.isSpeedy?65e3:1,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container}var t=e.prototype;return t.insert=function(e){if(this.ctr%this.maxLength==0){var t,r=(a=this,(c=document.createElement("style")).setAttribute("data-emotion",a.key),void 0!==a.nonce&&c.setAttribute("nonce",a.nonce),c.appendChild(document.createTextNode("")),c);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(r,t),this.tags.push(r)}var a,c,s=this.tags[this.tags.length-1];if(this.isSpeedy){var i=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(s);try{i.insertRule(e,i.cssRules.length)}catch(e){}}else s.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0},e}();function o(e){function z(e,t,r){var a=t.trim().split(f),c=(t=a).length,s=e.length;switch(s){case 0:case 1:var i=0;for(e=0===s?"":e[0]+" ";i<c;++i)t[i]=h(e,t[i],r).trim();break;default:var n=i=0;for(t=[];i<c;++i)for(var o=0;o<s;++o)t[n++]=h(e[o]+" ",a[i],r).trim()}return t}function h(e,t,r){var a=t.charCodeAt(0);switch(a<33&&(a=(t=t.trim()).charCodeAt(0)),a){case 38:return t.replace(c,"$1"+e.trim());case 58:return e.trim()+t.replace(c,"$1"+e.trim());default:if(0<1*r&&0<t.indexOf("\f"))return t.replace(c,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function E(e,t,r,a){var c=e+";",s=2*t+3*r+4*a;if(944===s){e=c.indexOf(":",9)+1;var i=c.substring(e,c.length-1).trim();return i=c.substring(0,e).trim()+i+";",1===I||2===I&&N(i,1)?"-webkit-"+i+i:i}if(0===I||2===I&&!N(c,1))return c;switch(s){case 1015:return 97===c.charCodeAt(10)?"-webkit-"+c+c:c;case 951:return 116===c.charCodeAt(3)?"-webkit-"+c+c:c;case 963:return 110===c.charCodeAt(5)?"-webkit-"+c+c:c;case 1009:if(100!==c.charCodeAt(4))break;case 969:case 942:return"-webkit-"+c+c;case 978:return"-webkit-"+c+"-moz-"+c+c;case 1019:case 983:return"-webkit-"+c+"-moz-"+c+"-ms-"+c+c;case 883:if(45===c.charCodeAt(8))return"-webkit-"+c+c;if(0<c.indexOf("image-set(",11))return c.replace(p,"$1-webkit-$2")+c;break;case 932:if(45===c.charCodeAt(4))switch(c.charCodeAt(5)){case 103:return"-webkit-box-"+c.replace("-grow","")+"-webkit-"+c+"-ms-"+c.replace("grow","positive")+c;case 115:return"-webkit-"+c+"-ms-"+c.replace("shrink","negative")+c;case 98:return"-webkit-"+c+"-ms-"+c.replace("basis","preferred-size")+c}return"-webkit-"+c+"-ms-"+c+c;case 964:return"-webkit-"+c+"-ms-flex-"+c+c;case 1023:if(99!==c.charCodeAt(8))break;return"-webkit-box-pack"+(i=c.substring(c.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+c+"-ms-flex-pack"+i+c;case 1005:return o.test(c)?c.replace(n,":-webkit-")+c.replace(n,":-moz-")+c:c;case 1e3:switch(t=(i=c.substring(13).trim()).indexOf("-")+1,i.charCodeAt(0)+i.charCodeAt(t)){case 226:i=c.replace(u,"tb");break;case 232:i=c.replace(u,"tb-rl");break;case 220:i=c.replace(u,"lr");break;default:return c}return"-webkit-"+c+"-ms-"+i+c;case 1017:if(-1===c.indexOf("sticky",9))break;case 975:switch(t=(c=e).length-10,s=(i=(33===c.charCodeAt(t)?c.substring(0,t):c).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|i.charCodeAt(7))){case 203:if(i.charCodeAt(8)<111)break;case 115:c=c.replace(i,"-webkit-"+i)+";"+c;break;case 207:case 102:c=c.replace(i,"-webkit-"+(102<s?"inline-":"")+"box")+";"+c.replace(i,"-webkit-"+i)+";"+c.replace(i,"-ms-"+i+"box")+";"+c}return c+";";case 938:if(45===c.charCodeAt(5))switch(c.charCodeAt(6)){case 105:return i=c.replace("-items",""),"-webkit-"+c+"-webkit-box-"+i+"-ms-flex-"+i+c;case 115:return"-webkit-"+c+"-ms-flex-item-"+c.replace(b,"")+c;default:return"-webkit-"+c+"-ms-flex-line-pack"+c.replace("align-content","").replace(b,"")+c}break;case 973:case 989:if(45!==c.charCodeAt(3)||122===c.charCodeAt(4))break;case 931:case 953:if(!0===k.test(e))return 115===(i=e.substring(e.indexOf(":")+1)).charCodeAt(0)?E(e.replace("stretch","fill-available"),t,r,a).replace(":fill-available",":stretch"):c.replace(i,"-webkit-"+i)+c.replace(i,"-moz-"+i.replace("fill-",""))+c;break;case 962:if(c="-webkit-"+c+(102===c.charCodeAt(5)?"-ms-"+c:"")+c,211===r+a&&105===c.charCodeAt(13)&&0<c.indexOf("transform",10))return c.substring(0,c.indexOf(";",27)+1).replace(l,"$1-webkit-$2")+c}return c}function N(e,t){var r=e.indexOf(1===t?":":"{"),a=e.substring(0,3!==t?r:10);return r=e.substring(r+1,e.length-1),i(2!==t?a:a.replace(s,"$1"),r,t)}function j(e,t){var r=E(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(a," or ($1)").substring(4):"("+t+")"}function B(e,t,r,a,c,s,i,n,o,h){for(var l,f=0,u=t;f<K;++f)switch(l=g[f].call(d,e,u,r,a,c,s,i,n,o,h)){case void 0:case!1:case!0:case null:break;default:u=l}if(u!==t)return u}function t(e){return void 0!==(e=e.prefix)&&(i=null,e?"function"!=typeof e?I=1:(I=2,i=e):I=0),t}function d(e,t){var r=e;if(r.charCodeAt(0)<33&&(r=r.trim()),r=[r],0<K){var a=B(-1,t,r,r,G,D,0,0,0,0);void 0!==a&&"string"==typeof a&&(t=a)}var c=function e(t,r,a,c,s){for(var i,n,o,h,l,f=0,u=0,d=0,b=0,k=0,p=0,g=o=i=0,w=0,m=0,A=0,C=0,v=a.length,x=v-1,y="",$="",O="",S="";w<v;){if(n=a.charCodeAt(w),w===x&&0!==u+b+d+f&&(0!==u&&(n=47===u?10:47),b=d=f=0,v++,x++),0===u+b+d+f){if(w===x&&(0<m&&(y=y.replace(R,"")),0<y.trim().length)){switch(n){case 32:case 9:case 59:case 13:case 10:break;default:y+=a.charAt(w)}n=59}switch(n){case 123:for(i=(y=y.trim()).charCodeAt(0),o=1,C=++w;w<v;){switch(n=a.charCodeAt(w)){case 123:o++;break;case 125:o--;break;case 47:switch(n=a.charCodeAt(w+1)){case 42:case 47:e:{for(g=w+1;g<x;++g)switch(a.charCodeAt(g)){case 47:if(42===n&&42===a.charCodeAt(g-1)&&w+2!==g){w=g+1;break e}break;case 10:if(47===n){w=g+1;break e}}w=g}}break;case 91:n++;case 40:n++;case 34:case 39:for(;w++<x&&a.charCodeAt(w)!==n;);}if(0===o)break;w++}switch(o=a.substring(C,w),0===i&&(i=(y=y.replace(L,"").trim()).charCodeAt(0)),i){case 64:switch(0<m&&(y=y.replace(R,"")),n=y.charCodeAt(1)){case 100:case 109:case 115:case 45:m=r;break;default:m=J}if(C=(o=e(r,m,o,n,s+1)).length,0<K&&(l=B(3,o,m=z(J,y,A),r,G,D,C,n,s,c),y=m.join(""),void 0!==l&&0===(C=(o=l.trim()).length)&&(n=0,o="")),0<C)switch(n){case 115:y=y.replace(P,j);case 100:case 109:case 45:o=y+"{"+o+"}";break;case 107:o=(y=y.replace(T,"$1 $2"))+"{"+o+"}",o=1===I||2===I&&N("@"+o,3)?"@-webkit-"+o+"@"+o:"@"+o;break;default:o=y+o,112===c&&($+=o,o="")}else o="";break;default:o=e(r,z(r,y,A),o,c,s+1)}O+=o,o=A=m=g=i=0,y="",n=a.charCodeAt(++w);break;case 125:case 59:if(1<(C=(y=(0<m?y.replace(R,""):y).trim()).length))switch(0===g&&(i=y.charCodeAt(0),45===i||96<i&&i<123)&&(C=(y=y.replace(" ",":")).length),0<K&&void 0!==(l=B(1,y,r,t,G,D,$.length,c,s,c))&&0===(C=(y=l.trim()).length)&&(y="\0\0"),i=y.charCodeAt(0),n=y.charCodeAt(1),i){case 0:break;case 64:if(105===n||99===n){S+=y+a.charAt(w);break}default:58!==y.charCodeAt(C-1)&&($+=E(y,i,n,y.charCodeAt(2)))}A=m=g=i=0,y="",n=a.charCodeAt(++w)}}switch(n){case 13:case 10:47===u?u=0:0===1+i&&107!==c&&0<y.length&&(m=1,y+="\0"),0<K*M&&B(0,y,r,t,G,D,$.length,c,s,c),D=1,G++;break;case 59:case 125:if(0===u+b+d+f){D++;break}default:switch(D++,h=a.charAt(w),n){case 9:case 32:if(0===b+f+u)switch(k){case 44:case 58:case 9:case 32:h="";break;default:32!==n&&(h=" ")}break;case 0:h="\\0";break;case 12:h="\\f";break;case 11:h="\\v";break;case 38:0===b+u+f&&(m=A=1,h="\f"+h);break;case 108:if(0===b+u+f+H&&0<g)switch(w-g){case 2:112===k&&58===a.charCodeAt(w-3)&&(H=k);case 8:111===p&&(H=p)}break;case 58:0===b+u+f&&(g=w);break;case 44:0===u+d+b+f&&(m=1,h+="\r");break;case 34:case 39:0===u&&(b=b===n?0:0===b?n:b);break;case 91:0===b+u+d&&f++;break;case 93:0===b+u+d&&f--;break;case 41:0===b+u+f&&d--;break;case 40:if(0===b+u+f){if(0===i)switch(2*k+3*p){case 533:break;default:i=1}d++}break;case 64:0===u+d+b+f+g+o&&(o=1);break;case 42:case 47:if(!(0<b+f+d))switch(u){case 0:switch(2*n+3*a.charCodeAt(w+1)){case 235:u=47;break;case 220:C=w,u=42}break;case 42:47===n&&42===k&&C+2!==w&&(33===a.charCodeAt(C+2)&&($+=a.substring(C,w+1)),h="",u=0)}}0===u&&(y+=h)}p=k,k=n,w++}if(0<(C=$.length)){if(m=r,0<K&&void 0!==(l=B(2,$,m,t,G,D,C,c,s,c))&&0===($=l).length)return S+$+O;if($=m.join(",")+"{"+$+"}",0!=I*H){switch(2!==I||N($,2)||(H=0),H){case 111:$=$.replace(F,":-moz-$1")+$;break;case 112:$=$.replace(q,"::-webkit-input-$1")+$.replace(q,"::-moz-$1")+$.replace(q,":-ms-input-$1")+$}H=0}}return S+$+O}(J,r,t,0,0);return 0<K&&(void 0!==(a=B(-2,c,r,r,G,D,c.length,0,0,0))&&(c=a)),"",H=0,D=G=1,c}var L=/^\0+/g,R=/[\0\r\f]/g,n=/: */g,o=/zoo|gra/,l=/([,: ])(transform)/g,f=/,\r+?/g,c=/([\t\r\n ])*\f?&/g,T=/@(k\w+)\s*(\S*)\s*/,q=/::(place)/g,F=/:(read-only)/g,u=/[svh]\w+-[tblr]{2}/,P=/\(\s*(.*)\s*\)/g,a=/([\s\S]*?);/g,b=/-self|flex-/g,s=/[^]*?(:[rp][el]a[\w-]+)[^]*/,k=/stretch|:\s*\w+\-(?:conte|avail)/,p=/([^-])(image-set\()/,D=1,G=1,H=0,I=1,J=[],g=[],K=0,i=null,M=0;return d.use=function e(t){switch(t){case void 0:case null:K=g.length=0;break;default:switch(t.constructor){case Array:for(var r=0,a=t.length;r<a;++r)e(t[r]);break;case Function:g[K++]=t;break;case Boolean:M=0|!!t}}return e},d.set=t,void 0!==e&&t(e),d}var h="/*|*/";function l(e){e&&f.push(e+"}")}var f,u=function(e,t,r,a,c,s,i,n,o){switch(e){case-1:f=[];break;case 2:if(0===n)return t+h;break;case 3:switch(n){case 102:case 112:return f.push(r[0]+t),"";default:return t+h}case-2:return t.split("/*|*/}").forEach(l),f}};return function(e){void 0===e&&(e={});var t,r=e.key||"css";void 0!==e.prefix&&(t={prefix:e.prefix});var a=new o(t);a.use(e.stylisPlugins)(u);var c,s={};c=e.container||document.head;var i=document.querySelectorAll("style[data-emotion-"+r+"]");return Array.prototype.forEach.call(i,function(e){e.getAttribute("data-emotion-"+r).split(" ").forEach(function(e){s[e]=!0}),e.parentNode!==c&&c.appendChild(e)}),{stylis:a,key:r,sheet:new n({key:r,container:c,nonce:e.nonce}),inserted:s,registered:{},theme:{}}}});
//# sourceMappingURL=index.min.js.map