-
Notifications
You must be signed in to change notification settings - Fork 23
/
api
1 lines (1 loc) · 7.68 KB
/
api
1
(function(){var e,n,t,i,r,s,o,d,u,a,c,g,f,m,l,p,w,h,j=[].slice;if(u={widgets:{latest:"http://cdn.intermine.org/js/intermine/widgets/latest/intermine.widgets.js","1.0.0":"http://cdn.intermine.org/js/intermine/widgets/1.0.0/intermine.widgets.js","1.1.0":"http://cdn.intermine.org/js/intermine/widgets/1.1.0/intermine.widgets.js","1.1.7":"http://cdn.intermine.org/js/intermine/widgets/1.1.7/intermine.widgets.js","1.1.8":"http://cdn.intermine.org/js/intermine/widgets/1.1.8/intermine.widgets.js","1.1.9":"http://cdn.intermine.org/js/intermine/widgets/1.1.9/intermine.widgets.js","1.1.10":"http://cdn.intermine.org/js/intermine/widgets/1.1.10/intermine.widgets.js","1.2.0":"http://cdn.intermine.org/js/intermine/widgets/1.2.0/intermine.widgets.js","1.2.1":"http://cdn.intermine.org/js/intermine/widgets/1.2.1/intermine.widgets.js","1.3.0":"http://cdn.intermine.org/js/intermine/widgets/1.3.0/intermine.widgets.js","1.4.0":"http://cdn.intermine.org/js/intermine/widgets/1.4.0/intermine.widgets.js","1.4.1":"http://cdn.intermine.org/js/intermine/widgets/1.4.1/intermine.widgets.js","1.4.2":"http://cdn.intermine.org/js/intermine/widgets/1.4.2/intermine.widgets.js","1.6.7":"http://cdn.intermine.org/js/intermine/widgets/1.6.7/intermine.widgets.js","1.6.8":"http://cdn.intermine.org/js/intermine/widgets/1.6.8/intermine.widgets.js","1.7.0":"http://cdn.intermine.org/js/intermine/widgets/1.7.0/intermine.widgets.js","1.7.3":"http://cdn.intermine.org/js/intermine/widgets/1.7.3/intermine.widgets.js","1.8.0":"http://cdn.intermine.org/js/intermine/widgets/1.8.0/intermine.widgets.js","1.8.1":"http://cdn.intermine.org/js/intermine/widgets/1.8.1/intermine.widgets.js","1.8.2":"http://cdn.intermine.org/js/intermine/widgets/1.8.2/intermine.widgets.js","1.8.3":"http://cdn.intermine.org/js/intermine/widgets/1.8.3/intermine.widgets.js","1.9.1":"http://cdn.intermine.org/js/intermine/widgets/1.9.1/intermine.widgets.js","1.10.0":"http://cdn.intermine.org/js/intermine/widgets/1.10.0/intermine.widgets.js","1.11.2":"http://cdn.intermine.org/js/intermine/widgets/1.11.2/intermine.widgets.js"},"report-widgets":{latest:"http://cdn.intermine.org/js/intermine/report-widgets/latest/intermine.report-widgets.js","0.7.0":"http://cdn.intermine.org/js/intermine/report-widgets/0.7.0/intermine.report-widgets.js"}},a=this,a.intermine=i=a.intermine||{},a.window===void 0){if("undefined"==typeof global)throw"what kind of environment is this?";a.window=global}i.load||(i.loader=function(e,n,t){switch(null==n&&(n="js"),n){case"js":return m.script(e,t);case"css":return m.style(e,t);default:return t("Unrecognized type `"+n+"`")}},e=50,o={},r=0,s=function(n,t,s){var u,f,m,p,w,j,y,v,b,x,O,k,A,T;w=++r,d({job:w,message:"start"}),v=function(e){var n,t,i,r,s;if(~e.indexOf("?"))return!1;for(n=a.window,s=e.split("."),i=0,r=s.length;r>i;i++){if(t=s[i],null==n[t])return!1;n=n[t]}return!0},p=!1,m=function(e){return p=!0,s(e)},y={},O=function(r,s){var u,c,g,f,l,j;if(d({job:w,library:r,message:"start"}),!p){if(g=s.path,f=s.test,c=s.depends,!g)return m("Library `path` not provided for "+r);if(f&&"function"==typeof f&&f()||v(r))return d({job:w,library:r,message:"exists"}),y[r]=function(e){return e(null)};if(o[r])return d({job:w,library:r,message:"will wait"}),y[r]=function(e){return o[r].push(e)};if(o[r]=[],d({job:w,library:r,message:"will download"}),y[r]=function(n){return d({job:w,library:r,message:"downloading"}),i.loader(g,t,function(t){var i,s,u;return t?(delete o[r],m(t)):(d({job:w,library:r,message:"downloaded"}),s=function(){for(d({job:w,library:r,message:"ready"});0!==o[r].length;)o[r].pop()();return delete o[r],n(null)},u=a.window.setTimeout(s,e),(i=function(){return f&&"function"==typeof f&&f()||v(r)?(d({job:w,library:r,message:"exists"}),a.window.clearTimeout(u),s()):h(i)})())})},c&&c instanceof Array){for(l=0,j=c.length;j>l;l++)if(u=c[l],"string"!=typeof u||null==n[u])return delete o[r],m("Unrecognized dependency `"+u+"`");return y[r]=c.concat(y[r])}}};for(j in n)x=n[j],O(j,x);if(!p){f=[];for(j in y)x=y[j],x instanceof Array&&(b={},(u=function(e){var n,t,i,r,s;if("string"==typeof e)if(null!=b[e]){if(!g(f,e))return f.push(e)}else if(b[e]=!0,(t=y[e])instanceof Array){for(s=[],n=i=0,r=t.length-1;r>=0?r>i:i>r;n=r>=0?++i:--i)s.push(u(t[n]));return s}})(j));if(f.length){for(T=l(y),k=0,A=T.length;A>k;k++)j=T[k],delete o[j];return m("Circular dependencies detected for `"+f+"`")}return c(y,function(e){return e?s(e):s(null)})}},i.load=function(){var e,n,t,i,r,o,d,a,c,g,f,m,p,w,h;if(d=arguments[0],e=arguments.length>=2?j.call(arguments,1):[],n=1===arguments.length?d:e.pop(),p="latest","string"==typeof e[0]&&(p=e[0]),"function"!=typeof n&&(n=function(){}),"string"==typeof d)return u[d]?(g=u[d][p])?(c={},c["intermine."+d]={path:g},s(c,"js",n)):n("Unknown `"+d+"` version "+p):n("Unknown library `"+d+"`");if(d instanceof Array){c={js:{},css:{}};for(r in d){if(h=d[r],a=h.name,g=h.path,m=h.type,w=h.wait,!g&&!m)return n("Library `path` or `type` not provided");if("css"!==m&&"js"!==m)return n("Library type `"+m+"` not recognized");a||(a=g.split("/").pop()),d[r].name=a,c[m][a]={path:g},w&&parseInt(r)&&(c[m][a].depends=[d[r-1].name])}d=c}return"object"==typeof d?(r=l(d).length,t=!1,i=function(e){return t?void 0:e?(t=!0,n(e)):r--&&!r?n(null):void 0},function(){var e;e=[];for(o in d)f=d[o],e.push(s(f,o,i));return e}()):n("Unrecognized input")},i.log&&i.log instanceof Array||(i.log=[]),d=function(){var e;return i.log.push(["api-loader",(new Date).toLocaleString(),function(){var n,t,i;for(i=[],n=0,t=arguments.length;t>n;n++)e=arguments[n],i.push(JSON.stringify(e));return i}.apply(this,arguments).join(" ")])},h="undefined"!=typeof process&&process.nextTick?"undefined"!=typeof setImmediate?setImmediate:process.nextTick:"function"==typeof setImmediate?setImmediate:function(e){return setTimeout(e,0)},f=function(e,n){var t,i,r;if(e.forEach)return e.forEach(n);r=[];for(t in e)i=e[t],r.push(n(i,t,e));return r},p=function(e,n){var t;return e.map?e.map(n):(t=[],f(e,function(e,i,r){return t.push(n(e,i,r))}),t)},w=function(e,n,t){return e.reduce?e.reduce(n,t):(f(e,function(e,i,r){return t=n(t,e,i,r)}),t)},l=function(e){var n,t;if(Object.keys)return Object.keys(e);t=[];for(n in e)e.hasOwnProperty(n)&&t.push(n);return t},g=function(e,n){var t,i,r;if([].indexOf)return e.indexOf(n)>=0;for(i=0,r=e.length;r>i;i++)if(t=e[i],t===n)return!0;return!1},c=function(e,n){var t,i,r,s,o,d;return n=n||function(){},i=l(e),i.length?(o={},r=[],t=function(e){return r.unshift(e)},s=function(e){var n,t;for(n in r)if(t=r[n],t===e)return r.splice(n,1),void 0},d=function(){return f(r.slice(0),function(e){return e()})},t(function(){return l(o).length===i.length?(n(null,o),n=function(){}):void 0}),f(i,function(i){var r,u,a,c,g;return c=e[i]instanceof Function?[e[i]]:e[i],g=function(e){var t,r;return t=Array.prototype.slice.call(arguments,1),1>=t.length&&(t=t[0]),e?(r={},f(l(o),function(e){return r[e]=o[e]}),r[i]=t,n(e,r),n=function(){}):(o[i]=t,h(d))},a=c.slice(0,Math.abs(c.length-1))||[],u=function(){return w(a,function(e,n){return e&&o.hasOwnProperty(n)},!0)&&!o.hasOwnProperty(i)},u()?c[c.length-1](g,o):(r=function(){return u()?(s(r),c[c.length-1](g,o)):void 0},t(r))})):n(null)},n=a.window.document,n&&(t=n.head||n.getElementsByTagName("head")[0]),m={script:function(e,i){var r,s,o;return t?(r=function(){return o.onload=o.onreadystatechange=o.onerror=null,t.removeChild(o),i&&i.call(a.window,s?null:"`script.onerror` fired")},o=n.createElement("script"),s=!1,o.type="text/javascript",o.charset="utf-8",o.onload=o.onreadystatechange=function(){var e;return e=this.readyState,s||e&&"complete"!==e&&"loaded"!==e?void 0:(s=!0,h(r))},o.onerror=r,o.async=!0,o.src=e,t.appendChild(o)):i("`window.document` does not exist")},style:function(e,i){var r;return r=n.createElement("link"),r.rel="stylesheet",r.type="text/css",r.href=e,t.appendChild(r),h(i)}})}).call(this);