first commit

This commit is contained in:
teasiu
2025-11-03 15:27:16 +08:00
commit 125598252c
1115 changed files with 60648 additions and 0 deletions

View File

@@ -0,0 +1 @@
!function(b){b.matchMedia=b.matchMedia||function(h){var g,l=h.documentElement,k=l.firstElementChild||l.firstChild,j=h.createElement("body"),i=h.createElement("div");return i.id="mq-test-1",i.style.cssText="position:absolute;top:-100em",j.style.background="none",j.appendChild(i),function(c){return i.innerHTML='&shy;<style media="'+c+'"> #mq-test-1 { width: 42px; }</style>',l.insertBefore(j,k),g=42===i.offsetWidth,l.removeChild(j),{matches:g,media:c}}}(b.document)}(this),function(X){function W(){C(!0)}var V={};X.respond=V,V.update=function(){};var U=[],T=function(){var a=!1;try{a=new X.XMLHttpRequest}catch(d){a=new X.ActiveXObject("Microsoft.XMLHTTP")}return function(){return a}}(),S=function(e,d){var f=T();f&&(f.open("GET",e,!0),f.onreadystatechange=function(){4!==f.readyState||200!==f.status&&304!==f.status||d(f.responseText)},4!==f.readyState&&f.send(null))},R=function(b){return b.replace(V.regex.minmaxwh,"").match(V.regex.other)};if(V.ajax=S,V.queue=U,V.unsupportedmq=R,V.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},V.mediaQueriesSupported=X.matchMedia&&null!==X.matchMedia("only all")&&X.matchMedia("only all").matches,!V.mediaQueriesSupported){var Q,P,O,N=X.document,M=N.documentElement,L=[],K=[],J=[],I={},H=30,G=N.getElementsByTagName("head")[0]||M,F=N.getElementsByTagName("base")[0],E=G.getElementsByTagName("link"),D=function(){var h,g=N.createElement("div"),l=N.body,k=M.style.fontSize,j=l&&l.style.fontSize,i=!1;return g.style.cssText="position:absolute;font-size:1em;width:1em",l||(l=i=N.createElement("body"),l.style.background="none"),M.style.fontSize="100%",l.style.fontSize="100%",l.appendChild(g),i&&M.insertBefore(l,M.firstChild),h=g.offsetWidth,i?M.removeChild(l):l.removeChild(g),M.style.fontSize=k,j&&(l.style.fontSize=j),h=O=parseFloat(h)},C=function(ab){var aa="clientWidth",Z=M[aa],Y="CSS1Compat"===N.compatMode&&Z||N.body[aa]||Z,v={},u=E[E.length-1],t=(new Date).getTime();if(ab&&Q&&H>t-Q){return X.clearTimeout(P),P=X.setTimeout(C,H),void 0}Q=t;for(var m in L){if(L.hasOwnProperty(m)){var j=L[m],i=j.minw,h=j.maxw,a=null===i,r=null===h,q="em";i&&(i=parseFloat(i)*(i.indexOf(q)>-1?O||D():1)),h&&(h=parseFloat(h)*(h.indexOf(q)>-1?O||D():1)),j.hasquery&&(a&&r||!(a||Y>=i)||!(r||h>=Y))||(v[j.media]||(v[j.media]=[]),v[j.media].push(K[j.rules]))}}for(var o in J){J.hasOwnProperty(o)&&J[o]&&J[o].parentNode===G&&G.removeChild(J[o])}J.length=0;for(var n in v){if(v.hasOwnProperty(n)){var l=N.createElement("style"),k=v[n].join("\n");l.type="text/css",l.media=n,G.insertBefore(l,u.nextSibling),l.styleSheet?l.styleSheet.cssText=k:l.appendChild(N.createTextNode(k)),J.push(l)}}},B=function(Y,y,x){var w=Y.replace(V.regex.comments,"").replace(V.regex.keyframes,"").match(V.regex.media),v=w&&w.length||0;y=y.substring(0,y.lastIndexOf("/"));var u=function(b){return b.replace(V.regex.urls,"$1"+y+"$2$3")},t=!v&&x;y.length&&(y+="/"),t&&(v=1);for(var s=0;v>s;s++){var r,n,m,g;t?(r=x,K.push(u(Y))):(r=w[s].match(V.regex.findStyles)&&RegExp.$1,K.push(RegExp.$2&&u(RegExp.$2))),m=r.split(","),g=m.length;for(var c=0;g>c;c++){n=m[c],R(n)||L.push({media:n.split("(")[0].match(V.regex.only)&&RegExp.$2||"all",rules:K.length-1,hasquery:n.indexOf("(")>-1,minw:n.match(V.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:n.match(V.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}C()},A=function(){if(U.length){var a=U.shift();S(a.href,function(b){B(b,a.href,a.media),I[a.href]=!0,X.setTimeout(function(){A()},0)})}},z=function(){for(var a=0;a<E.length;a++){var j=E[a],i=j.href,h=j.media,d=j.rel&&"stylesheet"===j.rel.toLowerCase();i&&d&&!I[i]&&(j.styleSheet&&j.styleSheet.rawCssText?(B(j.styleSheet.rawCssText,i,h),I[i]=!0):(!/^([a-zA-Z:]*\/\/)/.test(i)&&!F||i.replace(RegExp.$1,"").split("/")[0]===X.location.host)&&("//"===i.substring(0,2)&&(i=X.location.protocol+i),U.push({href:i,media:h})))}A()};z(),V.update=z,V.getEmValue=D,X.addEventListener?X.addEventListener("resize",W,!1):X.attachEvent&&X.attachEvent("onresize",W)}}(this);