-
Notifications
You must be signed in to change notification settings - Fork 4
/
src
2 lines (2 loc) · 4.89 KB
/
src
1
2
/*! By da宗熊 2016-01-31 v1.1.0 https://github.com/linfenpan/projectM.git */
!function(a){function b(){}function c(a){return j.call(a).split(" ")[1].toLowerCase().slice(0,-1)}function d(a){return"function"===c(a)}function e(a,b){for(var c in a)a.hasOwnProperty(c)&&b&&b(a[c],c,a)}function f(a,b){return a.replace(/\{([^}]*)}/g,function(a,c){return b[c]})}function g(){var a=arguments,b=a[0];return a=k.call(a,0),e(a,function(a){e(a,function(a,d){var e=c(a);switch(e){case"object":b[d]={},g(b[d],a);break;case"array":b[d]=[],g(b[d],a);break;default:b[d]=a}})}),b}var h=a.document,i=h.head||h.getElementsByTagName("head")[0],j=Object.prototype.toString,k=[].slice,l={};l.normal=function(a){return a.replace(/\/\.\//g,"//").replace(/([^:])\/{2,}/g,"$1/").replace(/[^\/]+\/\.\.\/([^\/]*)/g,"$1")},l.isAbsolute=function(a){return/:\/\//.test(a)},l.join=function(){var a=[].join.call(arguments,"/");return this.normal(a)},l.dir=function(a){return a.replace(/(\?|#).*$/,"").replace(/(.*\/).*$/,"$1")},l.ext=function(a){return a.replace(/.*\.(.*)$/,"$1")};var m=null,n=null;!function(a){function b(a,b){return j[a]?void j[a].push(b):(j[a]=[b],void c(a))}function c(a){var b=h.createElement("script");b.async=!0,"onload"in b?(b.onload=function(){d.call(this,!1)},b.onerror=function(){d.call(this,!0)}):b.onreadystatechange=function(){/loaded|complete/.test(this.readyState)&&d.call(this)},b.src=a,i.appendChild(b),b=null}function d(a){this.onload=this.onerror=this.onreadystatechange=null;var b=this.getAttribute("src");e(j[b],function(c,d){c(a,b)}),i.removeChild(this),j[b]=null}function f(){if(g&&"interactive"===g.readyState)return g.getAttribute("src");for(var a=i.getElementsByTagName("script"),b=a.length-1;b>=0;b--){var c=a[b];if("interactive"===c.readyState)return g=c,g.getAttribute("src")}}var g,j={};m=b,n=f}(a);var o;!function(a){function c(a,b){var c=[];return e(b,function(a,b){c.push(b+"="+a)}),c=c.join("&"),c&&(c=(a.indexOf("?")>-1?"&":"?")+c),a+c}var f;f=a.XMLHttpRequest?function(){return new XMLHttpRequest}:function(){return new ActiveXObject("Microsoft.XMLHTTP")},o=function(a,e,g){var h=f();d(e)?(g=e,e={}):(e=e||{},g=g||b),h.onreadystatechange=function(){4==h.readyState&&(h.onreadystatechange=null,200==h.status||302==h.status?g(!1,this.responseText,this,a):g(!0))};var i=(e.method||"GET").toUpperCase(),j=e.sync===!0?!1:!0,k=e.data||{};"GET"===i?(h.open(i,c(a,k),j),h.send(null)):(h.open(i,a,j),h.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),h.send(k))}}(a);var p,q=/\/\*(.|\n|\s)*?\*\/|\/\/[^\n\r]*/g,r=/[^.]require\(["']([^'"]+)["']\)/g,s={},t=null,u={},v={},w=1,x=0,y=null,z=!!h.attachEvent;!function(a){function b(a){a=a||{},g(s,a.template||{}),g(v,a.alias||{}),c(a)}function c(b){var c=a.location.href,d=b.basePath;if(d||!t)if(t=l.dir(c),d)t=l.isAbsolute(d)?d:l.join(l.dir(c),d);else{var e=h.getElementById("seedNode");if(e){var f=l.dir(node.hasAttribute?e.src:e.getAttribute("src",4));t=l.dir(f)}e=null}}p=b}(a);var A;!function(a){function b(a,b){arguments.length<=1?(b=a,a=null,d(b)):c(a,b)}function c(a,b){var c=C(a);c.state=w,c.exports=b}function d(a){if(y=null,z){var b=n(),c=C(b);c.exports=a}else y=a}A=b}(a);var B,C;!function(a){function c(a){if(!u[a]){var b;b=v[a]?{url:a,state:w,exports:v[a]}:{url:a,state:x,exports:null},u[a]=b}return u[a]}function j(a){return c(a)}function n(a,b){return a=f(a,s),l.isAbsolute(a)?a:l.join(b||t,a)}function p(a,b){var c=f(a,s);return v[c]||u[c]||(a=n(a,b)),a}function A(){var a=arguments,c=a[a.length-1],e=k.call(a,0);d(c)?e.pop():c=b,D(t,e,c)}function D(c,d,f){function g(){0>=i&&(f.apply(a,h),g=b)}var h=[],i=d.length;e(d,function(a,b){var d=p(a,c);E(d,function(a,c){h[b]=a,i--,g()})}),g()}function E(a,b){var d;if(v[a])return d=c(a),b(d.exports,d);a=p(a),d=c(a);var e=d.state;if(e==w)return b(d.exports,d);var f=l.ext(a).toLowerCase(),g=L[f]||L._;g(a,function(c){function e(a){d.state=w,d.exports=a,b(d.exports,d)}switch(f){case"js":d.state!==w?F(a,e):e(d.exports);break;default:e(c)}})}function F(a,b){var c=j(a);z?y=c.exports:c.exports=y,G(c,function(a){b(a)}),y=null}function G(a,b){var c=a.exports,e=a.url;a.state===w?b(c):d(c)?H(e,c,function(c){a.state=w,b(c)}):(a.state=w,b(c))}function H(a,b,c){var d=b.toString();d=d.replace(q,"").replace(/\s*/g,"");for(var e,f=[];e=r.exec(d);)f.push(e[1]);var g=l.dir(a);D(g,f,function(){var d={exports:{},url:a};b(I(g),d.exports,d),c(d.exports)})}function I(b){function c(c,f){if(!f)return u[p(c,b)].exports;var g=k.call(arguments,0);e(g,function(a,c){g[c]=d(a)?a:p(a,b)}),A.apply(a,g)}return J(c,b),c}function J(a,b){g(a,{loader:L,url:function(a){return n(a,b)},css:function(a){K(this.url(a))}})}function K(a){if(!M[a]){var b=h.createElement("link");b.rel="stylesheet",b.href=a,i.appendChild(b)}}var L={js:function(a,b){m(a,function(c){if(c)throw"load `"+a+"` fail!";b()})},_:function(a,b){o(a,function(c,d){if(c)throw"load `"+a+"` fail!";b(d)})},add:function(a,b){this[a]=b}},M={};J(A,t),C=j,B=A}(a),g(B,{config:p,ajax:o,loadScript:m}),a.require=B,a.define=A,p()}(window);