-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathamd.loader.min.js
More file actions
1 lines (1 loc) · 2.99 KB
/
amd.loader.min.js
File metadata and controls
1 lines (1 loc) · 2.99 KB
1
(function(e,r){function n(e,n){function t(){y[e]=!0,b.debug||o.removeChild(i);var r=e.slice(0,-3),t=_.pop(),a=h[t];a&&r!==t&&(h[r]={alias:t}),i=null;var l=m[e]||[],u=null;if(l.length>0){for(;u=l.shift();)u&&u();m[e]=null}n&&n()}if(l(y,e))n&&n();else if(l(m,e))m[e]=m[e]||[],m[e].push(n);else{m[e]=[];var o=r.getElementsByTagName("head")[0],i=r.createElement("script");i.type="text/javascript",i.src=e,i.setAttribute("_md_","_anymoore_"+e),o.appendChild(i),u(n)&&(r.addEventListener?i.addEventListener("load",t,!1):i.onreadystatechange=function(){/loaded|complete/.test(i.readyState)&&(i.onreadystatechange=null,t())})}}function t(e,r){var t=i(e,"weak")||{};if(l(t,"exports"))return r(e),void 0;var o=null;if(e){var u=a(e);o=".js"!==u.slice(-3)?u+".js":u}o&&n(o,function(){r(e)})}function o(e){var r=[];if(e&&e.length>0)for(var n=0,t=e.length;t>n;n++)"require"!==e[n]&&"exports"!==e[n]&&"module"!==e[n]&&r.push(e[n]);return r}function i(e,r){var r=r||"strong";if(!e||!l(h,e))return"strong"!==r?{}:(c('%c_moduleMap中不存在该模块: "'+e+'"',"color:red"),!1);var n=h[e];return l(n,"alias")&&(n=h[n.alias]),n}function a(e){var r=[];if(-1!==e.indexOf("://"))return e;r=e.split("/"),e=[];for(var n=0,t=r.length;t>n;n++)"."!==r[n]&&(".."===r[n]?e.length>=2&&e.pop():e.length&&""===r[n]||e.push(r[n]));return e=e.join("/")}function l(e,r){return v.hasOwnProperty.call(e,r)}function u(e){return"[object Function]"===g.call(e)}function s(e){return"[object Array]"===g.call(e)}function f(e){return"[object Object]"===g.call(e)}function c(){if(b.debug){var r=Array.prototype.slice;e.console&&e.console.log.apply(console,r.call(arguments))}}var d,p,v=Object.prototype,g=v.toString,h={},y={},m={},_=[],x=0,b={debug:1,ts:0};(void 0===e._define_||void 0===e._require_)&&(p=function(e,r,n){if(!l(h,e)){if(u(e)||s(e)||f(e)){var t="_anonymous_mod_"+x++;1===arguments.length?(n=e,r=null):2===arguments.length&&(n=r,r=e),e=t}else u(r)&&2===arguments.length&&(n=r,r=null);h[e]={id:e,deps:r,factory:n},_.push(e)}},d=function(e,r){function n(e){var r=i(e)||{},n=[],u=0;if(l(r,"deps")&&r.deps&&(n=o(r.deps),u=n.length),u>0){f+=u-1;for(var s=0;u>s;s++){var c=n[s];t(c,arguments.callee)}}else 0>=--f&&a()}function a(){if(_.length>0)for(var n=null;n=_.shift();)n&&d.sync(n);for(var t=[],o=0;s>o;o++)t.push(d.sync(e[o]));r&&r.apply(void 0,t),t=null}if("string"==typeof e&&(e=[e]),1===e.length&&1===arguments.length)return d.sync(e.join(""));var u=o(e),s=u.length,f=s;if(s)for(var c=0;s>c;c++){var p=u[c];t(p,n)}else a()},d.sync=function(e){var r,n,t,o=[];if(!l(h,e))throw Error('Required unknown module, id: "'+e+'"');if(r=i(e)||{},l(r,"exports"))return r.exports;if(r.exports=n={},t=r.deps)for(var a=t.length,s=0;a>s;s++){var c=t[s];o.push("require"===c?d:"module"===c?r:"exports"===c?n:d.sync(c))}if(f(r.factory))r.exports=r.factory;else if(u(r.factory)){var p=r.factory.apply(void 0,o);void 0!==p&&p!==n&&(r.exports=p)}return r.exports},e._define_=p,e._require_=d,b.debug&&e.define===void 0&&(e.define=e._define_,e.require=e._require_),p.amd={},p.version="0.9.0")})(window,document);