Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

recompiled dist versions

  • Loading branch information...
commit 10b809e6061417082cd2bf060443320fc7b36762 1 parent 690284b
John Hann authored
View
36 dist/curl-for-dojo1.6/curl.js
@@ -1,20 +1,20 @@
/*
MIT License (c) copyright B Cavalier & J Hann */
-var t=!0,u=!1;
-(function(m){function o(){}function v(a,b){return 0==T.call(a).indexOf("[object "+b)}function g(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function z(a,b){var c,e,d;e=1;a=a.replace(U,function(a,b,c,h){c&&e++;d=t;return h||""});return d?(c=b.split("/"),c.splice(c.length-e,e),c.concat(a||[]).join("/")):a}function n(a){var b=a.indexOf("!");return{H:a.substr(b+1),j:0<=b&&a.substr(0,b)}}function E(){}function F(a){E.prototype=a;a=new E;E.prototype=M;return a}function w(){function a(a,b,
-c){e.push([a,b,c])}function b(a,b){for(var c,d=0;c=e[d++];)(c=c[a])&&c(b)}var c,e,d;c=this;e=[];d=function(c,i){a=c?function(a){a&&a(i)}:function(a,b){b&&b(i)};d=o;b(c?0:1,i);b=o;e=j};this.X=function(b,c,e){a(b,c,e)};this.h=function(a){c.ca=a;d(t,a)};this.e=function(a){c.ba=a;d(u,a)};this.p=function(a){b(2,a)}}function r(a,b,c,e){a instanceof w?a.X(b,c,e):b(a)}function A(a,b,c){var e;return function(){0<=--a&&b&&(e=b.apply(j,arguments));0==a&&c&&c(e);return e}}function x(){function a(b,e,d){var f;
-f=h.c(p,j,[].concat(b));this.then=b=function(a,b){r(f,function(b){a&&a.apply(j,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,c){return new a(b,c,f)};e&&b(e);r(d,function(){h.i(f)})}var b=[].slice.call(arguments);v(b[0],"Object")&&(p=h.b(b.shift()));return new a(b[0],b[1])}function G(a){var b=a.id;if(b==j)if(H!==j)H={w:"Multiple anonymous defines in url"};else if(!(b=h.S()))H=a;if(b!=j){var c=q[b];b in q||(c=h.l(b,p).b,c=q[b]=h.t(c,b));if(!(c instanceof w))throw Error("duplicate define: "+
-b);c.Z=u;h.u(c,a)}}var p=m.curl,C,I,y=m.document,k=y&&(y.head||y.getElementsByTagName("head")[0]),N={},O={},P={},J={},M={},T=M.toString,j,Q={loaded:1,interactive:P,complete:1},q={},K=u,H,V=/\?/,R=/^\/|^[^:]+:\/\//,U=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,W=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,X=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,L,h;h={c:function(a,b,c,e){function d(a){return z(a,i.f)}function f(b,c){var f,l,s,B;f=c&&function(a){c.apply(j,a)};if(v(b,"String")){l=d(b);s=q[l];
-B=s instanceof w&&s.a;if(!(l in q))throw Error("Module not resolved: "+l);if(f)throw Error("require(id, callback) not allowed");return B||s}r(h.i(h.c(a,i.f,b,e)),f)}var i;i=new w;i.f=i.id=b||"";i.T=e;i.v=c;i.k=f;f.toUrl=function(b){return h.l(d(b),a).url};i.Y=d;return i},t:function(a,b,c,e){var d,f,i;d=h.c(a,b,j,c);d.f=e==j?b:e;f=d.h;i=A(1,function(a){d.n=a;try{return h.L(d)}catch(b){d.e(b)}});d.h=function(a){r(c||K,function(){f(q[d.id]=i(a))})};d.z=function(a){r(c||K,function(){d.a&&(i(a),d.p(O))})};
-return d},K:function(a,b,c,e){a=h.c(a,b,j,c);a.f=e;return a},R:function(a){return a.k},A:function(a){return a.a||(a.a={})},Q:function(a){var b=a.o;b||(b=a.o={id:a.id,uri:h.B(a),exports:h.A(a)},b.a=b.exports);return b},B:function(a){return a.url||(a.url=h.s(a.k.toUrl(a.id)))},b:function(a){var b,c,e;(b=a)||(a={});c=a.apiName;if((e=a.apiContext)||c?e[c]:C&&b)throw Error((c||"curl")+" already exists");(e||m)[c||"curl"]=x;c=a.defineName;if((e=a.defineContext)||c?e[c]:I&&b)throw Error((c||"define")+" already exists");
-(e||m)[c||"define"]=c=function(){var a=h.P(arguments);G(a)};c.amd={plugins:t,jQuery:t,curl:"0.6.3"};b&&(h.b=h.D);return h.D(a)},D:function(a){function b(b,c){var d,f,l,s,B;for(B in b){l=b[B];l.name=l.id||l.name||B;s=a;f=n(g(l.name||B));d=f.H;if(f=f.j)s=e[f],s||(s=e[f]=F(a),s.g=F(a.g),s.d=[]),delete b[B];if(c){f=l;var D=void 0;f.path=g(f.path||f.location||"");D=g(f.main)||"main";"."!=D.charAt(0)&&(D="./"+D);f.C=z(D,f.name+"/");f.V=z(D,f.path+"/");f.b=f.config}else f={path:g(l)};f.I=d.split("/").length;
-d?(s.g[d]=f,s.d.push(d)):s.r=h.G(l,a)}}function c(a){var b=a.g;a.W=RegExp("^("+a.d.sort(function(a,c){return b[a].I<b[c].I}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete a.d}var e;a.r=a.baseUrl||"";a.F="pluginPath"in a?a.pluginPath:"curl/plugin";a.g={};e=a.plugins=a.plugins||{};a.d=[];b(a.paths,u);b(a.packages,t);for(var d in e){var f=e[d].d;f&&(e[d].d=f.concat(a.d),c(e[d]))}c(a);h.J(a);return a},J:function(a){var b;(b=a&&a.preloads)&&0<b.length&&r(K,function(){K=h.i(h.c(a,j,b,t))})},l:function(a,
-b,c){var e,d,f,i;e=b.g;c&&(b.F&&0>a.indexOf("/")&&!(a in e))&&(f=a=g(b.F)+"/"+a);c=R.test(a)?a:a.replace(b.W,function(b){d=e[b]||{};i=d.b;return d.C&&b==a?(f=d.C,d.V):d.path||""});return{f:f||a,b:i||p,url:h.G(c,b)}},G:function(a,b){var c=b.r;return c&&!R.test(a)?g(c)+"/"+a:a},s:function(a){return a+(V.test(a)?"":".js")},U:function(a,b,c){var e=y.createElement("script");e.onload=e.onreadystatechange=function(c){c=c||m.event;if("load"==c.type||Q[e.readyState])delete J[a.id],e.onload=e.onreadystatechange=
-e.onerror="",b()};e.onerror=function(){c(Error("Syntax or http error: "+a.url))};e.type=a.$||"text/javascript";e.charset="utf-8";e.async=!a.aa;e.src=a.url;J[a.id]=e;k.insertBefore(e,k.firstChild);return e},M:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(W,"").replace(X,function(a,d,f){f?c=c==f?j:c:c||b.push(d);return a});return b},P:function(a){var b,c,e,d,f,i;f=a.length;e=a[f-1];d=v(e,"Function")?e.length:-1;2==f?v(a[0],"Array")?c=a[0]:b=a[0]:3==f&&(b=
-a[0],c=a[1]);!c&&0<d&&(i=t,c=["require","exports","module"].slice(0,d).concat(h.M(e)));return{id:b,n:c||[],q:0<=d?e:function(){return e},m:i}},L:function(a){var b;b=a.q.apply(a.m?a.a:j,a.n);b===j&&a.a&&(b=a.o?a.a=a.o.a:a.a);return b},u:function(a,b){a.q=b.q;a.m=b.m;a.v=b.n;h.i(a)},i:function(a){function b(a,b,c){i[b]=a;c&&n(a,b)}function c(b,c){var e,d,f,i;e=A(1,function(a){d(a);l(a,c)});d=A(1,function(a){n(a,c)});f=h.N(b,a);(i=f instanceof w&&f.a)&&d(i);r(f,e,a.e,a.a&&function(a){f.a&&(a==N?d(f.a):
-a==O&&e(f.a))})}function e(){a.h(i)}var d,f,i,g,k,n,l;i=[];f=a.v;g=f.length;0==f.length&&e();n=A(g,b,function(){a.z&&a.z(i)});l=A(g,b,e);for(d=0;d<g;d++)k=f[d],k in L?(l(L[k](a),d,t),a.a&&a.p(N)):k?c(k,d):l(j,d,t);return a},O:function(a){h.B(a);h.U(a,function(){var b=H;H=j;a.Z!==u&&(!b||b.w?a.e(Error(b&&b.w||"define() missing or duplicated: "+a.url)):h.u(a,b))},a.e);return a},N:function(a,b){var c,e,d,f,i,k,g,j,l;c=b.Y;e=b.T;d=n(a);k=d.H;f=c(d.j||k);g=h.l(f,p,!!d.j);if(d.j)i=f;else if(i=g.b.moduleLoader)k=
-f,f=i,g=h.l(i,p);d=q[f];f in q||(d=q[f]=h.t(g.b,f,e,g.f),d.url=h.s(g.url),h.O(d));f==i&&(j=new w,l=p.plugins[i]||p,r(d,function(a){var b,d,f;f=a.dynamic;k="normalize"in a?a.normalize(k,c,l)||"":c(k);d=i+"!"+k;b=q[d];if(!(d in q)){b=h.K(l,d,e,k);f||(q[d]=b);var g=function(a){b.h(a);f||(q[d]=a)};g.resolve=g;g.reject=b.e;a.load(k,b.k,g,l)}j!=b&&r(b,j.h,j.e,j.p)},j.e));return j||d},S:function(){var a;if(!v(m.opera,"Opera"))for(var b in J)if(Q[J[b].readyState]==P){a=b;break}return a}};L={require:h.R,exports:h.A,
-module:h.Q};x.version="0.6.3";"function"==typeof define&&(I=define);"function"==typeof p&&(C=p,p=u);p=h.b(p);q.curl=x;q["curl/_privileged"]={core:h,cache:q,cfg:p,_define:G,_curl:x,Promise:w}})(this);
-(function(m,o){function v(){if(!o.body)return u;y||(y=o.createTextNode(""));try{return o.body.removeChild(o.body.appendChild(y)),y=I,t}catch(g){return u}}function g(){var g;g=E[o[n]]&&v();if(!r&&g){r=t;for(clearTimeout(C);G=p.pop();)G();w&&(o[n]="complete");for(var m;m=F.shift();)m()}return g}function z(){g();r||(C=setTimeout(z,A))}var n="readyState",E={loaded:1,interactive:1,complete:1},F=[],w=o&&"string"!=typeof o[n],r=u,A=10,x,G,p=[],C,I,y;x="addEventListener"in m?function(k,n){k.addEventListener(n,
-g,u);return function(){k.removeEventListener(n,g,u)}}:function(k,n){k.attachEvent("on"+n,g);return function(){k.detachEvent(n,g)}};o&&!g()&&(p=[x(m,"load"),x(o,"readystatechange"),x(m,"DOMContentLoaded")],C=setTimeout(z,A));define("curl/domReady",function(){function g(n){r?n():F.push(n)}g.then=g;g.amd=t;return g})})(this,this.document);var S;
-define("curl/shim/dojo16",["curl/_privileged","curl/domReady"],function(m,o){function v(g){g.ready||(g.ready=function(g){o(g)});g.nameToUrl||(g.nameToUrl=function(m,o){return g.toUrl(m+(o||""))});g.cache||(g.cache={})}var g=m._curl,z=m.core.c;v(g);"undefined"==typeof S&&(S=g);m.core.c=function(){var g=z.apply(this,arguments);v(g.k);return g};return t});define("domReady",["curl/domReady"],function(m){return{load:function(o,v,g){m(g)}}});
+var s=!0,u=!1;
+(function(g){function l(){}function v(a,b){return 0==T.call(a).indexOf("[object "+b)}function i(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function z(a,b){var c,e,d;e=1;a=a.replace(U,function(a,b,c,h){c&&e++;d=s;return h||""});return d?(c=b.split("/"),c.splice(c.length-e,e),c.concat(a||[]).join("/")):a}function t(a){var b=a.indexOf("!");return{H:a.substr(b+1),j:0<=b&&a.substr(0,b)}}function F(){}function G(a){F.prototype=a;a=new F;F.prototype=M;return a}function w(){function a(a,b,
+c){e.push([a,b,c])}function b(a,b){for(var c,d=0;c=e[d++];)(c=c[a])&&c(b)}var c,e,d;c=this;e=[];d=function(c,j){a=c?function(a){a&&a(j)}:function(a,b){b&&b(j)};d=l;b(c?0:1,j);b=l;e=m};this.X=function(b,c,e){a(b,c,e)};this.h=function(a){c.ca=a;d(s,a)};this.e=function(a){c.ba=a;d(u,a)};this.p=function(a){b(2,a)}}function p(a,b,c,e){a instanceof w?a.X(b,c,e):b(a)}function A(a,b,c){var e;return function(){0<=--a&&b&&(e=b.apply(m,arguments));0==a&&c&&c(e);return e}}function x(){function a(b,e,d){var f;
+f=h.c(n,m,[].concat(b));this.then=b=function(a,b){p(f,function(b){a&&a.apply(m,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,c){return new a(b,c,f)};e&&b(e);p(d,function(){h.i(f)})}var b=[].slice.call(arguments);v(b[0],"Object")&&(n=h.b(b.shift()));return new a(b[0],b[1])}function H(a){var b=a.id;if(b==m)if(I!==m)I={w:"Multiple anonymous defines in url"};else if(!(b=h.S()))I=a;if(b!=m){var c=o[b];b in o||(c=h.l(b,n).b,c=o[b]=h.t(c,b));if(!(c instanceof w))throw Error("duplicate define: "+
+b);c.Z=u;h.u(c,a)}}var n=g.curl,B,D,y=g.document,q=y&&(y.head||y.getElementsByTagName("head")[0]),N={},O={},P={},J={},M={},T=M.toString,m,Q={loaded:1,interactive:P,complete:1},o={},K=u,I,V=/\?/,R=/^\/|^[^:]+:\/\//,U=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,W=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,X=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,L,h;h={c:function(a,b,c,e){function d(a){return z(a,j.f)}function f(b,c){var f,k,r,C;f=c&&function(a){c.apply(m,a)};if(v(b,"String")){k=d(b);r=o[k];
+C=r instanceof w&&r.a;if(!(k in o))throw Error("Module not resolved: "+k);if(f)throw Error("require(id, callback) not allowed");return C||r}p(h.i(h.c(a,j.f,b,e)),f)}var j;j=new w;j.f=j.id=b||"";j.T=e;j.v=c;j.k=f;f.toUrl=function(b){return h.l(d(b),a).url};j.Y=d;return j},t:function(a,b,c,e){var d,f,j;d=h.c(a,b,m,c);d.f=e==m?b:e;f=d.h;j=A(1,function(a){d.n=a;try{return h.L(d)}catch(b){d.e(b)}});d.h=function(a){p(c||K,function(){f(o[d.id]=j(a))})};d.z=function(a){p(c||K,function(){d.a&&(j(a),d.p(O))})};
+return d},K:function(a,b,c,e){a=h.c(a,b,m,c);a.f=e;return a},R:function(a){return a.k},A:function(a){return a.a||(a.a={})},Q:function(a){var b=a.o;b||(b=a.o={id:a.id,uri:h.B(a),exports:h.A(a)},b.a=b.exports);return b},B:function(a){return a.url||(a.url=h.s(a.k.toUrl(a.id)))},b:function(a){var b,c,e;(b=a)||(a={});c=a.apiName;if((e=a.apiContext)||c?e[c]:B&&b)throw Error((c||"curl")+" already exists");(e||g)[c||"curl"]=x;B&&b&&(g.curl=B);c=a.defineName;if((e=a.defineContext)||c?e[c]:D&&b)throw Error((c||
+"define")+" already exists");(e||g)[c||"define"]=c=function(){var a=h.P(arguments);H(a)};D&&b&&(g.define=D);c.amd={plugins:s,jQuery:s,curl:"0.6.4"};b&&(h.b=h.D);return h.D(a)},D:function(a){function b(b,c){var d,f,k,r,C;for(C in b){k=b[C];k.name=k.id||k.name||C;r=a;f=t(i(k.name||C));d=f.H;if(f=f.j)r=e[f],r||(r=e[f]=G(a),r.g=G(a.g),r.d=[]),delete b[C];if(c){f=k;var E=void 0;f.path=i(f.path||f.location||"");E=i(f.main)||"main";"."!=E.charAt(0)&&(E="./"+E);f.C=z(E,f.name+"/");f.V=z(E,f.path+"/");f.b=
+f.config}else f={path:i(k)};f.I=d.split("/").length;d?(r.g[d]=f,r.d.push(d)):r.r=h.G(k,a)}}function c(a){var b=a.g;a.W=RegExp("^("+a.d.sort(function(a,c){return b[a].I<b[c].I}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete a.d}var e;a.r=a.baseUrl||"";a.F="pluginPath"in a?a.pluginPath:"curl/plugin";a.g={};e=a.plugins=a.plugins||{};a.d=[];b(a.paths,u);b(a.packages,s);for(var d in e){var f=e[d].d;f&&(e[d].d=f.concat(a.d),c(e[d]))}c(a);h.J(a);return a},J:function(a){var b;(b=a&&a.preloads)&&
+0<b.length&&p(K,function(){K=h.i(h.c(a,m,b,s))})},l:function(a,b,c){var e,d,f,j;e=b.g;c&&(b.F&&0>a.indexOf("/")&&!(a in e))&&(f=a=i(b.F)+"/"+a);c=R.test(a)?a:a.replace(b.W,function(b){d=e[b]||{};j=d.b;return d.C&&b==a?(f=d.C,d.V):d.path||""});return{f:f||a,b:j||n,url:h.G(c,b)}},G:function(a,b){var c=b.r;return c&&!R.test(a)?i(c)+"/"+a:a},s:function(a){return a+(V.test(a)?"":".js")},U:function(a,b,c){var e=y.createElement("script");e.onload=e.onreadystatechange=function(c){c=c||g.event;if("load"==
+c.type||Q[e.readyState])delete J[a.id],e.onload=e.onreadystatechange=e.onerror="",b()};e.onerror=function(){c(Error("Syntax or http error: "+a.url))};e.type=a.$||"text/javascript";e.charset="utf-8";e.async=!a.aa;e.src=a.url;J[a.id]=e;q.insertBefore(e,q.firstChild);return e},M:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(W,"").replace(X,function(a,d,f){f?c=c==f?m:c:c||b.push(d);return a});return b},P:function(a){var b,c,e,d,f,j;f=a.length;e=a[f-1];d=v(e,
+"Function")?e.length:-1;2==f?v(a[0],"Array")?c=a[0]:b=a[0]:3==f&&(b=a[0],c=a[1]);!c&&0<d&&(j=s,c=["require","exports","module"].slice(0,d).concat(h.M(e)));return{id:b,n:c||[],q:0<=d?e:function(){return e},m:j}},L:function(a){var b;b=a.q.apply(a.m?a.a:m,a.n);b===m&&a.a&&(b=a.o?a.a=a.o.a:a.a);return b},u:function(a,b){a.q=b.q;a.m=b.m;a.v=b.n;h.i(a)},i:function(a){function b(a,b,c){j[b]=a;c&&q(a,b)}function c(b,c){var e,d,f,j;e=A(1,function(a){d(a);k(a,c)});d=A(1,function(a){q(a,c)});f=h.N(b,a);(j=f instanceof
+w&&f.a)&&d(j);p(f,e,a.e,a.a&&function(a){f.a&&(a==N?d(f.a):a==O&&e(f.a))})}function e(){a.h(j)}var d,f,j,g,i,q,k;j=[];f=a.v;g=f.length;0==f.length&&e();q=A(g,b,function(){a.z&&a.z(j)});k=A(g,b,e);for(d=0;d<g;d++)i=f[d],i in L?(k(L[i](a),d,s),a.a&&a.p(N)):i?c(i,d):k(m,d,s);return a},O:function(a){h.B(a);h.U(a,function(){var b=I;I=m;a.Z!==u&&(!b||b.w?a.e(Error(b&&b.w||"define() missing or duplicated: "+a.url)):h.u(a,b))},a.e);return a},N:function(a,b){var c,e,d,f,j,i,g,q,k;c=b.Y;e=b.T;d=t(a);i=d.H;
+f=c(d.j||i);g=h.l(f,n,!!d.j);if(d.j)j=f;else if(j=g.b.moduleLoader)i=f,f=j,g=h.l(j,n);d=o[f];f in o||(d=o[f]=h.t(g.b,f,e,g.f),d.url=h.s(g.url),h.O(d));f==j&&(q=new w,k=n.plugins[j]||n,p(d,function(a){var b,d,f;f=a.dynamic;i="normalize"in a?a.normalize(i,c,k)||"":c(i);d=j+"!"+i;b=o[d];if(!(d in o)){b=h.K(k,d,e,i);f||(o[d]=b);var g=function(a){b.h(a);f||(o[d]=a)};g.resolve=g;g.reject=b.e;a.load(i,b.k,g,k)}q!=b&&p(b,q.h,q.e,q.p)},q.e));return q||d},S:function(){var a;if(!v(g.opera,"Opera"))for(var b in J)if(Q[J[b].readyState]==
+P){a=b;break}return a}};L={require:h.R,exports:h.A,module:h.Q};x.version="0.6.4";"function"==typeof define&&(D=define);"function"==typeof n&&(B=n,n=u);n=h.b(n);o.curl=x;o["curl/_privileged"]={core:h,cache:o,cfg:n,_define:H,_curl:x,Promise:w}})(this);
+(function(g,l){function v(){if(!l.body)return u;y||(y=l.createTextNode(""));try{return l.body.removeChild(l.body.appendChild(y)),y=D,s}catch(g){return u}}function i(){var g;g=F[l[t]]&&v();if(!p&&g){p=s;for(clearTimeout(B);H=n.pop();)H();w&&(l[t]="complete");for(var i;i=G.shift();)i()}return g}function z(){i();p||(B=setTimeout(z,A))}var t="readyState",F={loaded:1,interactive:1,complete:1},G=[],w=l&&"string"!=typeof l[t],p=u,A=10,x,H,n=[],B,D,y;x="addEventListener"in g?function(g,t){g.addEventListener(t,
+i,u);return function(){g.removeEventListener(t,i,u)}}:function(g,t){g.attachEvent("on"+t,i);return function(){g.detachEvent(t,i)}};l&&!i()&&(n=[x(g,"load"),x(l,"readystatechange"),x(g,"DOMContentLoaded")],B=setTimeout(z,A));define("curl/domReady",function(){function g(i){p?i():G.push(i)}g.then=g;g.amd=s;return g})})(this,this.document);var S;
+define("curl/shim/dojo16",["curl/_privileged","curl/domReady"],function(g,l){function v(g){g.ready||(g.ready=function(g){l(g)});g.nameToUrl||(g.nameToUrl=function(i,l){return g.toUrl(i+(l||""))});g.cache||(g.cache={})}var i=g._curl,z=g.core.c;v(i);"undefined"==typeof S&&(S=i);g.core.c=function(){var g=z.apply(this,arguments);v(g.k);return g};return s});define("domReady",["curl/domReady"],function(g){return{load:function(l,v,i){g(i)}}});
View
42 dist/curl-for-jQuery/curl.js
@@ -1,23 +1,23 @@
/*
MIT License (c) copyright B Cavalier & J Hann */
-var r=!0,y=!1;
-(function(l){function i(){}function s(a,b){return 0==O.call(a).indexOf("[object "+b)}function m(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function j(a,b){var c,f,e;f=1;a=a.replace(P,function(a,b,c,k){c&&f++;e=r;return k||""});return e?(c=b.split("/"),c.splice(c.length-f,f),c.concat(a||[]).join("/")):a}function B(a){var b=a.indexOf("!");return{K:a.substr(b+1),j:0<=b&&a.substr(0,b)}}function w(){}function p(a){w.prototype=a;a=new w;w.prototype=I;return a}function z(){function a(a,b,
-c){f.push([a,b,c])}function b(a,b){for(var c,e=0;c=f[e++];)(c=c[a])&&c(b)}var c,f,e;c=this;f=[];e=function(c,t){a=c?function(a){a&&a(t)}:function(a,b){b&&b(t)};e=i;b(c?0:1,t);b=i;f=u};this.$=function(b,c,f){a(b,c,f)};this.h=function(a){c.r=a;e(r,a)};this.d=function(a){c.da=a;e(y,a)};this.o=function(a){b(2,a)}}function o(a,b,c,f){a instanceof z?a.$(b,c,f):b(a)}function d(a,b,c){var f;return function(){0<=--a&&b&&(f=b.apply(u,arguments));0==a&&c&&c(f);return f}}function q(){function a(b,f,e){var g;
-g=k.f(h,u,[].concat(b));this.then=b=function(a,b){o(g,function(b){a&&a.apply(u,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,c){return new a(b,c,g)};f&&b(f);o(e,function(){k.i(g)})}var b=[].slice.call(arguments);s(b[0],"Object")&&(h=k.b(b.shift()));return new a(b[0],b[1])}function D(a){var b=a.id;if(b==u)if(E!==u)E={z:"Multiple anonymous defines in url"};else if(!(b=k.V()))E=a;if(b!=u){var c=v[b];b in v||(c=k.k(b,h).b,c=v[b]=k.u(c,b));if(!(c instanceof z))throw Error("duplicate define: "+
-b);c.ca=y;k.v(c,a)}}var h=l.curl,C,A,x=l.document,n=x&&(x.head||x.getElementsByTagName("head")[0]),J={},K={},L={},F={},I={},O=I.toString,u,M={loaded:1,interactive:L,complete:1},v={},G=y,E,Q=/\?/,N=/^\/|^[^:]+:\/\//,P=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,R=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,S=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,H,k;k={f:function(a,b,c,f){function e(a){return j(a,t.e)}function g(b,c){var g,d,h,i;g=c&&function(a){c.apply(u,a)};if(s(b,"String")){d=e(b);h=v[d];
-i=h instanceof z&&h.a;if(!(d in v))throw Error("Module not resolved: "+d);if(g)throw Error("require(id, callback) not allowed");return i||h}o(k.i(k.f(a,t.e,b,f)),g)}var t;t=new z;t.e=t.id=b||"";t.W=f;t.w=c;t.p=g;g.toUrl=function(b){return k.k(e(b),a).url};t.ba=e;return t},u:function(a,b,c,f){var e,g,t;e=k.f(a,b,u,c);e.e=f==u?b:f;g=e.h;t=d(1,function(a){e.m=a;try{return k.O(e)}catch(b){e.d(b)}});e.h=function(a){o(c||G,function(){g(v[e.id]=t(a))})};e.A=function(a){o(c||G,function(){e.a&&(t(a),e.o(K))})};
-return e},N:function(a,b,c,f){a=k.f(a,b,u,c);a.e=f;return a},U:function(a){return a.p},B:function(a){return a.a||(a.a={})},T:function(a){var b=a.n;b||(b=a.n={id:a.id,uri:k.C(a),exports:k.B(a)},b.a=b.exports);return b},C:function(a){return a.url||(a.url=k.t(a.p.toUrl(a.id)))},b:function(a){var b,c,f;(b=a)||(a={});c=a.apiName;if((f=a.apiContext)||c?f[c]:C&&b)throw Error((c||"curl")+" already exists");(f||l)[c||"curl"]=q;c=a.defineName;if((f=a.defineContext)||c?f[c]:A&&b)throw Error((c||"define")+" already exists");
-(f||l)[c||"define"]=c=function(){var a=k.S(arguments);D(a)};c.amd={plugins:r,jQuery:r,curl:"0.6.3"};b&&(k.b=k.H);return k.H(a)},H:function(a){function b(b,c){var e,g,d,h,i;for(i in b){d=b[i];d.name=d.id||d.name||i;h=a;g=B(m(d.name||i));e=g.K;if(g=g.j)h=f[g],h||(h=f[g]=p(a),h.g=p(a.g),h.c=[]),delete b[i];if(c){g=d;var n=void 0;g.path=m(g.path||g.location||"");n=m(g.main)||"main";"."!=n.charAt(0)&&(n="./"+n);g.F=j(n,g.name+"/");g.X=j(n,g.path+"/");g.b=g.config}else g={path:m(d)};g.L=e.split("/").length;
-e?(h.g[e]=g,h.c.push(e)):h.s=k.J(d,a)}}function c(a){var b=a.g;a.Z=RegExp("^("+a.c.sort(function(a,c){return b[a].L<b[c].L}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete a.c}var f;a.s=a.baseUrl||"";a.I="pluginPath"in a?a.pluginPath:"curl/plugin";a.g={};f=a.plugins=a.plugins||{};a.c=[];b(a.paths,y);b(a.packages,r);for(var e in f){var g=f[e].c;g&&(f[e].c=g.concat(a.c),c(f[e]))}c(a);k.M(a);return a},M:function(a){var b;(b=a&&a.preloads)&&0<b.length&&o(G,function(){G=k.i(k.f(a,u,b,r))})},k:function(a,
-b,c){var f,e,g,d;f=b.g;c&&(b.I&&0>a.indexOf("/")&&!(a in f))&&(g=a=m(b.I)+"/"+a);c=N.test(a)?a:a.replace(b.Z,function(b){e=f[b]||{};d=e.b;return e.F&&b==a?(g=e.F,e.X):e.path||""});return{e:g||a,b:d||h,url:k.J(c,b)}},J:function(a,b){var c=b.s;return c&&!N.test(a)?m(c)+"/"+a:a},t:function(a){return a+(Q.test(a)?"":".js")},D:function(a,b,c){var f=x.createElement("script");f.onload=f.onreadystatechange=function(c){c=c||l.event;if("load"==c.type||M[f.readyState])delete F[a.id],f.onload=f.onreadystatechange=
-f.onerror="",b()};f.onerror=function(){c(Error("Syntax or http error: "+a.url))};f.type=a.G||"text/javascript";f.charset="utf-8";f.async=!a.Y;f.src=a.url;F[a.id]=f;n.insertBefore(f,n.firstChild);return f},P:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(R,"").replace(S,function(a,e,g){g?c=c==g?u:c:c||b.push(e);return a});return b},S:function(a){var b,c,f,e,g,d;g=a.length;f=a[g-1];e=s(f,"Function")?f.length:-1;2==g?s(a[0],"Array")?c=a[0]:b=a[0]:3==g&&(b=
-a[0],c=a[1]);!c&&0<e&&(d=r,c=["require","exports","module"].slice(0,e).concat(k.P(f)));return{id:b,m:c||[],q:0<=e?f:function(){return f},l:d}},O:function(a){var b;b=a.q.apply(a.l?a.a:u,a.m);b===u&&a.a&&(b=a.n?a.a=a.n.a:a.a);return b},v:function(a,b){a.q=b.q;a.l=b.l;a.w=b.m;k.i(a)},i:function(a){function b(a,b,c){h[b]=a;c&&j(a,b)}function c(b,c){var f,e,g,h;f=d(1,function(a){e(a);q(a,c)});e=d(1,function(a){j(a,c)});g=k.Q(b,a);(h=g instanceof z&&g.a)&&e(h);o(g,f,a.d,a.a&&function(a){g.a&&(a==J?e(g.a):
-a==K&&f(g.a))})}function f(){a.h(h)}var e,g,h,i,n,j,q;h=[];g=a.w;i=g.length;0==g.length&&f();j=d(i,b,function(){a.A&&a.A(h)});q=d(i,b,f);for(e=0;e<i;e++)n=g[e],n in H?(q(H[n](a),e,r),a.a&&a.o(J)):n?c(n,e):q(u,e,r);return a},R:function(a){k.C(a);k.D(a,function(){var b=E;E=u;a.ca!==y&&(!b||b.z?a.d(Error(b&&b.z||"define() missing or duplicated: "+a.url)):k.v(a,b))},a.d);return a},Q:function(a,b){var c,f,e,g,d,i,n,j,q;c=b.ba;f=b.W;e=B(a);i=e.K;g=c(e.j||i);n=k.k(g,h,!!e.j);if(e.j)d=g;else if(d=n.b.moduleLoader)i=
-g,g=d,n=k.k(d,h);e=v[g];g in v||(e=v[g]=k.u(n.b,g,f,n.e),e.url=k.t(n.url),k.R(e));g==d&&(j=new z,q=h.plugins[d]||h,o(e,function(a){var b,e,g;g=a.dynamic;i="normalize"in a?a.normalize(i,c,q)||"":c(i);e=d+"!"+i;b=v[e];if(!(e in v)){b=k.N(q,e,f,i);g||(v[e]=b);var h=function(a){b.h(a);g||(v[e]=a)};h.resolve=h;h.reject=b.d;a.load(i,b.p,h,q)}j!=b&&o(b,j.h,j.d,j.o)},j.d));return j||e},V:function(){var a;if(!s(l.opera,"Opera"))for(var b in F)if(M[F[b].readyState]==L){a=b;break}return a}};H={require:k.U,exports:k.B,
-module:k.T};q.version="0.6.3";"function"==typeof define&&(A=define);"function"==typeof h&&(C=h,h=y);h=k.b(h);v.curl=q;v["curl/_privileged"]={core:k,cache:v,cfg:h,_define:D,_curl:q,Promise:z}})(this);
-(function(l,i){function s(){if(!i.body)return y;x||(x=i.createTextNode(""));try{return i.body.removeChild(i.body.appendChild(x)),x=A,r}catch(d){return y}}function m(){var d;d=w[i[B]]&&s();if(!o&&d){o=r;for(clearTimeout(C);D=h.pop();)D();z&&(i[B]="complete");for(var j;j=p.shift();)j()}return d}function j(){m();o||(C=setTimeout(j,d))}var B="readyState",w={loaded:1,interactive:1,complete:1},p=[],z=i&&"string"!=typeof i[B],o=y,d=10,q,D,h=[],C,A,x;q="addEventListener"in l?function(d,h){d.addEventListener(h,
-m,y);return function(){d.removeEventListener(h,m,y)}}:function(d,h){d.attachEvent("on"+h,m);return function(){d.detachEvent(h,m)}};i&&!m()&&(h=[q(l,"load"),q(i,"readystatechange"),q(l,"DOMContentLoaded")],C=setTimeout(j,d));define("curl/domReady",function(){function d(h){o?h():p.push(h)}d.then=d;d.amd=r;return d})})(this,this.document);
-(function(l,i,s){define("js",["curl/_privileged"],function(m){function j(d,i,j){function h(){o||(l<new Date?j():setTimeout(h,10))}var l,o,p;l=(new Date).valueOf()+(d.aa||3E5);j&&d.a&&setTimeout(h,10);p=m.core.D(d,function(){o=r;d.a&&(d.r=s(d.a));!d.a||d.r?i(p):j()},function(d){o=r;j(d)})}function l(d,i){j(d,function(){var j=p.shift();o=0<p.length;j&&l.apply(null,j);i.resolve(d.r||r)},function(d){i.reject(d)})}var w={},p=[],z=i&&i.createElement("script").async==r,o;return{dynamic:r,load:function(d,
-i,m,h){var s,A,x,n;s=0<d.indexOf("!order");A=d.indexOf("!exports=");x=0<A&&d.substr(A+9);n="prefetch"in h?h.prefetch:r;d=s||0<A?d.substr(0,d.indexOf("!")):d;d in w?m(w[d]):(w[d]=void 0,i={name:d,url:i.toUrl(d.lastIndexOf(".")<=d.lastIndexOf("/")?d+".js":d),Y:s,a:x,aa:h.timeout},h={resolve:function(h){w[d]=h;(m.resolve||m)(h)},reject:m.reject||function(d){throw d;}},s&&!z&&o?(p.push([i,h]),n&&(i.G="text/cache",j(i,function(d){d&&d.parentNode.removeChild(d)},function(){}),i.G="")):(o=o||s,l(i,h)))}}})})(this,
-this.document,function(l){try{return eval(l)}catch(i){}});(function(l){var i=l.document,s=/^\/\//,m;i&&(m=i.head||(i.head=i.getElementsByTagName("head")[0]));define("link",{load:function(j,l,w,p){j=l.toUrl(j.lastIndexOf(".")<=j.lastIndexOf("/")?j+".css":j);p=j=(p="fixSchemalessUrls"in p?p.fixSchemalessUrls:i.location.protocol)?j.replace(s,p+"//"):j;j=i.createElement("link");j.rel="stylesheet";j.type="text/css";j.href=p;m.appendChild(j);w(j.sheet||j.styleSheet)}})})(this);
-define("domReady",["curl/domReady"],function(l){return{load:function(i,s,m){l(m)}}});
+var r=!0,z=!1;
+(function(l){function i(){}function t(a,b){return 0==O.call(a).indexOf("[object "+b)}function m(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function j(a,b){var c,f,e;f=1;a=a.replace(P,function(a,b,c,k){c&&f++;e=r;return k||""});return e?(c=b.split("/"),c.splice(c.length-f,f),c.concat(a||[]).join("/")):a}function B(a){var b=a.indexOf("!");return{K:a.substr(b+1),j:0<=b&&a.substr(0,b)}}function x(){}function p(a){x.prototype=a;a=new x;x.prototype=I;return a}function A(){function a(a,b,
+c){f.push([a,b,c])}function b(a,b){for(var c,e=0;c=f[e++];)(c=c[a])&&c(b)}var c,f,e;c=this;f=[];e=function(c,s){a=c?function(a){a&&a(s)}:function(a,b){b&&b(s)};e=i;b(c?0:1,s);b=i;f=u};this.$=function(b,c,f){a(b,c,f)};this.h=function(a){c.r=a;e(r,a)};this.d=function(a){c.da=a;e(z,a)};this.o=function(a){b(2,a)}}function o(a,b,c,f){a instanceof A?a.$(b,c,f):b(a)}function d(a,b,c){var f;return function(){0<=--a&&b&&(f=b.apply(u,arguments));0==a&&c&&c(f);return f}}function q(){function a(b,f,e){var g;
+g=k.f(h,u,[].concat(b));this.then=b=function(a,b){o(g,function(b){a&&a.apply(u,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,c){return new a(b,c,g)};f&&b(f);o(e,function(){k.i(g)})}var b=[].slice.call(arguments);t(b[0],"Object")&&(h=k.b(b.shift()));return new a(b[0],b[1])}function D(a){var b=a.id;if(b==u)if(E!==u)E={z:"Multiple anonymous defines in url"};else if(!(b=k.V()))E=a;if(b!=u){var c=v[b];b in v||(c=k.k(b,h).b,c=v[b]=k.u(c,b));if(!(c instanceof A))throw Error("duplicate define: "+
+b);c.ca=z;k.v(c,a)}}var h=l.curl,w,C,y=l.document,n=y&&(y.head||y.getElementsByTagName("head")[0]),J={},K={},L={},F={},I={},O=I.toString,u,M={loaded:1,interactive:L,complete:1},v={},G=z,E,Q=/\?/,N=/^\/|^[^:]+:\/\//,P=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,R=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,S=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,H,k;k={f:function(a,b,c,f){function e(a){return j(a,s.e)}function g(b,c){var g,d,h,i;g=c&&function(a){c.apply(u,a)};if(t(b,"String")){d=e(b);h=v[d];
+i=h instanceof A&&h.a;if(!(d in v))throw Error("Module not resolved: "+d);if(g)throw Error("require(id, callback) not allowed");return i||h}o(k.i(k.f(a,s.e,b,f)),g)}var s;s=new A;s.e=s.id=b||"";s.W=f;s.w=c;s.p=g;g.toUrl=function(b){return k.k(e(b),a).url};s.ba=e;return s},u:function(a,b,c,f){var e,g,s;e=k.f(a,b,u,c);e.e=f==u?b:f;g=e.h;s=d(1,function(a){e.m=a;try{return k.O(e)}catch(b){e.d(b)}});e.h=function(a){o(c||G,function(){g(v[e.id]=s(a))})};e.A=function(a){o(c||G,function(){e.a&&(s(a),e.o(K))})};
+return e},N:function(a,b,c,f){a=k.f(a,b,u,c);a.e=f;return a},U:function(a){return a.p},B:function(a){return a.a||(a.a={})},T:function(a){var b=a.n;b||(b=a.n={id:a.id,uri:k.C(a),exports:k.B(a)},b.a=b.exports);return b},C:function(a){return a.url||(a.url=k.t(a.p.toUrl(a.id)))},b:function(a){var b,c,f;(b=a)||(a={});c=a.apiName;if((f=a.apiContext)||c?f[c]:w&&b)throw Error((c||"curl")+" already exists");(f||l)[c||"curl"]=q;w&&b&&(l.curl=w);c=a.defineName;if((f=a.defineContext)||c?f[c]:C&&b)throw Error((c||
+"define")+" already exists");(f||l)[c||"define"]=c=function(){var a=k.S(arguments);D(a)};C&&b&&(l.define=C);c.amd={plugins:r,jQuery:r,curl:"0.6.4"};b&&(k.b=k.H);return k.H(a)},H:function(a){function b(b,c){var e,g,d,h,i;for(i in b){d=b[i];d.name=d.id||d.name||i;h=a;g=B(m(d.name||i));e=g.K;if(g=g.j)h=f[g],h||(h=f[g]=p(a),h.g=p(a.g),h.c=[]),delete b[i];if(c){g=d;var n=void 0;g.path=m(g.path||g.location||"");n=m(g.main)||"main";"."!=n.charAt(0)&&(n="./"+n);g.F=j(n,g.name+"/");g.X=j(n,g.path+"/");g.b=
+g.config}else g={path:m(d)};g.L=e.split("/").length;e?(h.g[e]=g,h.c.push(e)):h.s=k.J(d,a)}}function c(a){var b=a.g;a.Z=RegExp("^("+a.c.sort(function(a,c){return b[a].L<b[c].L}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete a.c}var f;a.s=a.baseUrl||"";a.I="pluginPath"in a?a.pluginPath:"curl/plugin";a.g={};f=a.plugins=a.plugins||{};a.c=[];b(a.paths,z);b(a.packages,r);for(var e in f){var g=f[e].c;g&&(f[e].c=g.concat(a.c),c(f[e]))}c(a);k.M(a);return a},M:function(a){var b;(b=a&&a.preloads)&&
+0<b.length&&o(G,function(){G=k.i(k.f(a,u,b,r))})},k:function(a,b,c){var f,e,g,d;f=b.g;c&&(b.I&&0>a.indexOf("/")&&!(a in f))&&(g=a=m(b.I)+"/"+a);c=N.test(a)?a:a.replace(b.Z,function(b){e=f[b]||{};d=e.b;return e.F&&b==a?(g=e.F,e.X):e.path||""});return{e:g||a,b:d||h,url:k.J(c,b)}},J:function(a,b){var c=b.s;return c&&!N.test(a)?m(c)+"/"+a:a},t:function(a){return a+(Q.test(a)?"":".js")},D:function(a,b,c){var f=y.createElement("script");f.onload=f.onreadystatechange=function(c){c=c||l.event;if("load"==
+c.type||M[f.readyState])delete F[a.id],f.onload=f.onreadystatechange=f.onerror="",b()};f.onerror=function(){c(Error("Syntax or http error: "+a.url))};f.type=a.G||"text/javascript";f.charset="utf-8";f.async=!a.Y;f.src=a.url;F[a.id]=f;n.insertBefore(f,n.firstChild);return f},P:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(R,"").replace(S,function(a,e,g){g?c=c==g?u:c:c||b.push(e);return a});return b},S:function(a){var b,c,f,e,g,d;g=a.length;f=a[g-1];e=t(f,
+"Function")?f.length:-1;2==g?t(a[0],"Array")?c=a[0]:b=a[0]:3==g&&(b=a[0],c=a[1]);!c&&0<e&&(d=r,c=["require","exports","module"].slice(0,e).concat(k.P(f)));return{id:b,m:c||[],q:0<=e?f:function(){return f},l:d}},O:function(a){var b;b=a.q.apply(a.l?a.a:u,a.m);b===u&&a.a&&(b=a.n?a.a=a.n.a:a.a);return b},v:function(a,b){a.q=b.q;a.l=b.l;a.w=b.m;k.i(a)},i:function(a){function b(a,b,c){h[b]=a;c&&j(a,b)}function c(b,c){var f,e,g,h;f=d(1,function(a){e(a);q(a,c)});e=d(1,function(a){j(a,c)});g=k.Q(b,a);(h=g instanceof
+A&&g.a)&&e(h);o(g,f,a.d,a.a&&function(a){g.a&&(a==J?e(g.a):a==K&&f(g.a))})}function f(){a.h(h)}var e,g,h,i,n,j,q;h=[];g=a.w;i=g.length;0==g.length&&f();j=d(i,b,function(){a.A&&a.A(h)});q=d(i,b,f);for(e=0;e<i;e++)n=g[e],n in H?(q(H[n](a),e,r),a.a&&a.o(J)):n?c(n,e):q(u,e,r);return a},R:function(a){k.C(a);k.D(a,function(){var b=E;E=u;a.ca!==z&&(!b||b.z?a.d(Error(b&&b.z||"define() missing or duplicated: "+a.url)):k.v(a,b))},a.d);return a},Q:function(a,b){var c,f,e,g,d,i,n,j,q;c=b.ba;f=b.W;e=B(a);i=e.K;
+g=c(e.j||i);n=k.k(g,h,!!e.j);if(e.j)d=g;else if(d=n.b.moduleLoader)i=g,g=d,n=k.k(d,h);e=v[g];g in v||(e=v[g]=k.u(n.b,g,f,n.e),e.url=k.t(n.url),k.R(e));g==d&&(j=new A,q=h.plugins[d]||h,o(e,function(a){var b,e,g;g=a.dynamic;i="normalize"in a?a.normalize(i,c,q)||"":c(i);e=d+"!"+i;b=v[e];if(!(e in v)){b=k.N(q,e,f,i);g||(v[e]=b);var h=function(a){b.h(a);g||(v[e]=a)};h.resolve=h;h.reject=b.d;a.load(i,b.p,h,q)}j!=b&&o(b,j.h,j.d,j.o)},j.d));return j||e},V:function(){var a;if(!t(l.opera,"Opera"))for(var b in F)if(M[F[b].readyState]==
+L){a=b;break}return a}};H={require:k.U,exports:k.B,module:k.T};q.version="0.6.4";"function"==typeof define&&(C=define);"function"==typeof h&&(w=h,h=z);h=k.b(h);v.curl=q;v["curl/_privileged"]={core:k,cache:v,cfg:h,_define:D,_curl:q,Promise:A}})(this);
+(function(l,i){function t(){if(!i.body)return z;y||(y=i.createTextNode(""));try{return i.body.removeChild(i.body.appendChild(y)),y=C,r}catch(d){return z}}function m(){var d;d=x[i[B]]&&t();if(!o&&d){o=r;for(clearTimeout(w);D=h.pop();)D();A&&(i[B]="complete");for(var j;j=p.shift();)j()}return d}function j(){m();o||(w=setTimeout(j,d))}var B="readyState",x={loaded:1,interactive:1,complete:1},p=[],A=i&&"string"!=typeof i[B],o=z,d=10,q,D,h=[],w,C,y;q="addEventListener"in l?function(d,h){d.addEventListener(h,
+m,z);return function(){d.removeEventListener(h,m,z)}}:function(d,h){d.attachEvent("on"+h,m);return function(){d.detachEvent(h,m)}};i&&!m()&&(h=[q(l,"load"),q(i,"readystatechange"),q(l,"DOMContentLoaded")],w=setTimeout(j,d));define("curl/domReady",function(){function d(h){o?h():p.push(h)}d.then=d;d.amd=r;return d})})(this,this.document);
+(function(l,i,t){define("js",["curl/_privileged"],function(m){function j(d,i,j){function h(){o||(l<new Date?j():setTimeout(h,10))}var l,o,p;l=(new Date).valueOf()+(d.aa||3E5);j&&d.a&&setTimeout(h,10);p=m.core.D(d,function(){o=r;d.a&&(d.r=t(d.a));!d.a||d.r?i(p):j()},function(d){o=r;j(d)})}function l(d,i){j(d,function(){var j=p.shift();o=0<p.length;j&&l.apply(null,j);i.resolve(d.r||r)},function(d){i.reject(d)})}var x={},p=[],A=i&&i.createElement("script").async==r,o;return{dynamic:r,load:function(d,
+i,m,h){var w,t,y,n;w=0<d.indexOf("!order");t=d.indexOf("!exports=");y=0<t&&d.substr(t+9);n="prefetch"in h?h.prefetch:r;d=w||0<t?d.substr(0,d.indexOf("!")):d;d in x?m(x[d]):(x[d]=void 0,i={name:d,url:i.toUrl(d.lastIndexOf(".")<=d.lastIndexOf("/")?d+".js":d),Y:w,a:y,aa:h.timeout},h={resolve:function(h){x[d]=h;(m.resolve||m)(h)},reject:m.reject||function(d){throw d;}},w&&!A&&o?(p.push([i,h]),n&&(i.G="text/cache",j(i,function(d){d&&d.parentNode.removeChild(d)},function(){}),i.G="")):(o=o||w,l(i,h)))}}})})(this,
+this.document,function(l){try{return eval(l)}catch(i){}});(function(l){var i=l.document,t=/^\/\//,m;i&&(m=i.head||(i.head=i.getElementsByTagName("head")[0]));define("link",{load:function(j,l,x,p){j=l.toUrl(j.lastIndexOf(".")<=j.lastIndexOf("/")?j+".css":j);p=j=(p="fixSchemalessUrls"in p?p.fixSchemalessUrls:i.location.protocol)?j.replace(t,p+"//"):j;j=i.createElement("link");j.rel="stylesheet";j.type="text/css";j.href=p;m.appendChild(j);x(j.sheet||j.styleSheet)}})})(this);
+define("domReady",["curl/domReady"],function(l){return{load:function(i,t,m){l(m)}}});
View
9 dist/curl-for-ssjs/curl.js
@@ -9,12 +9,12 @@
* Licensed under the MIT License at:
* http://www.opensource.org/licenses/mit-license.php
*
- * @version 0.6.3
+ * @version 0.6.4
*/
(function (global) {
"use strict";
var
- version = '0.6.3',
+ version = '0.6.4',
userCfg = global['curl'],
prevCurl,
prevDefine,
@@ -371,7 +371,8 @@
throw new Error((apiName || 'curl') + ' already exists');
}
(apiObj || global)[apiName || 'curl'] = _curl;
-
+ // restore previous curl
+ if (prevCurl && hasCfg) global['curl'] = prevCurl;
// allow dev to rename/relocate define() to another object
defName = cfg['defineName'];
@@ -384,6 +385,8 @@
var args = core.fixArgs(arguments);
_define(args);
};
+ // restore previous define
+ if (prevDefine && hasCfg) global['define'] = prevDefine;
// indicate our capabilities:
define['amd'] = { 'plugins': true, 'jQuery': true, 'curl': version };
View
66 dist/curl-kitchen-sink/curl.js
@@ -1,36 +1,36 @@
/*
MIT License (c) copyright B Cavalier & J Hann */
var u=!0,A=!1;
-(function(f){function b(){}function q(a,d){return 0==F.call(a).indexOf("[object "+d)}function s(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function e(a,d){var h,m,g;m=1;a=a.replace(O,function(a,d,h,i){h&&m++;g=u;return i||""});return g?(h=d.split("/"),h.splice(h.length-m,m),h.concat(a||[]).join("/")):a}function c(a){var d=a.indexOf("!");return{O:a.substr(d+1),l:0<=d&&a.substr(0,d)}}function t(){}function o(a){t.prototype=a;a=new t;t.prototype=G;return a}function y(){function a(a,d,
-h){m.push([a,d,h])}function d(a,d){for(var h,g=0;h=m[g++];)(h=h[a])&&h(d)}var h,m,g;h=this;m=[];g=function(h,i){a=h?function(a){a&&a(i)}:function(a,d){d&&d(i)};g=b;d(h?0:1,i);d=b;m=w};this.w=function(d,m,g){a(d,m,g);return h};this.d=function(a){h.v=a;g(u,a)};this.b=function(a){h.na=a;g(A,a)};this.t=function(a){d(2,a)}}function n(a,d,h,m){a instanceof y?a.w(d,h,m):d(a)}function r(a,d,h){var m;return function(){0<=--a&&d&&(m=d.apply(w,arguments));0==a&&h&&h(m);return m}}function v(){function a(d,m,
-g){var i;i=k.e(j,w,[].concat(d));this.then=d=function(a,d){n(i,function(d){a&&a.apply(w,d)},function(a){if(d)d(a);else throw a;});return this};this.next=function(d,h){return new a(d,h,i)};m&&d(m);n(g,function(){k.k(i)})}var d=[].slice.call(arguments);q(d[0],"Object")&&(j=k.c(d.shift()));return new a(d[0],d[1])}function D(a){var d=a.id;if(d==w)if(H!==w)H={D:"Multiple anonymous defines in url"};else if(!(d=k.Z()))H=a;if(d!=w){var h=i[d];d in i||(h=k.n(d,j).c,h=i[d]=k.A(h,d));if(!(h instanceof y))throw Error("duplicate define: "+
-d);h.fa=A;k.B(h,a)}}var j=f.curl,C,x,z=f.document,l=z&&(z.head||z.getElementsByTagName("head")[0]),I={},J={},B={},E={},G={},F=G.toString,w,p={loaded:1,interactive:B,complete:1},i={},K=A,H,P=/\?/,N=/^\/|^[^:]+:\/\//,O=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,Q=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,R=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,L,k;k={e:function(a,d,h,m){function g(a){return e(a,c.g)}function p(d,h){var l,r,e,b;l=h&&function(a){h.apply(w,a)};if(q(d,"String")){r=g(d);e=i[r];
-b=e instanceof y&&e.a;if(!(r in i))throw Error("Module not resolved: "+r);if(l)throw Error("require(id, callback) not allowed");return b||e}n(k.k(k.e(a,c.g,d,m)),l)}var c;c=new y;c.g=c.id=d||"";c.$=m;c.C=h;c.m=p;p.toUrl=function(d){return k.n(g(d),a).url};c.ea=g;return c},A:function(a,d,h,m){var g,c,p;g=k.e(a,d,w,h);g.g=m==w?d:m;c=g.d;p=r(1,function(a){g.q=a;try{return k.T(g)}catch(d){g.b(d)}});g.d=function(a){n(h||K,function(){c(i[g.id]=p(a))})};g.F=function(a){n(h||K,function(){g.a&&(p(a),g.t(J))})};
-return g},R:function(a,d,h,m){a=k.e(a,d,w,h);a.g=m;return a},Y:function(a){return a.m},H:function(a){return a.a||(a.a={})},X:function(a){var d=a.s;d||(d=a.s={id:a.id,uri:k.I(a),exports:k.H(a)},d.a=d.exports);return d},I:function(a){return a.url||(a.url=k.z(a.m.toUrl(a.id)))},c:function(a){var d,h,m;(d=a)||(a={});h=a.apiName;if((m=a.apiContext)||h?m[h]:C&&d)throw Error((h||"curl")+" already exists");(m||f)[h||"curl"]=v;h=a.defineName;if((m=a.defineContext)||h?m[h]:x&&d)throw Error((h||"define")+" already exists");
-(m||f)[h||"define"]=h=function(){var a=k.W(arguments);D(a)};h.amd={plugins:u,jQuery:u,curl:"0.6.3"};d&&(k.c=k.L);return k.L(a)},L:function(a){function d(d,h){var i,g,p,l,r;for(r in d){p=d[r];p.name=p.id||p.name||r;l=a;g=c(s(p.name||r));i=g.O;if(g=g.l)l=m[g],l||(l=m[g]=o(a),l.h=o(a.h),l.f=[]),delete d[r];if(h){g=p;var b=void 0;g.path=s(g.path||g.location||"");b=s(g.main)||"main";"."!=b.charAt(0)&&(b="./"+b);g.J=e(b,g.name+"/");g.aa=e(b,g.path+"/");g.c=g.config}else g={path:s(p)};g.P=i.split("/").length;
-i?(l.h[i]=g,l.f.push(i)):l.o=k.N(p,a)}}function h(a){var d=a.h;a.ca=RegExp("^("+a.f.sort(function(a,h){return d[a].P<d[h].P}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete a.f}var m;a.o=a.baseUrl||"";a.M="pluginPath"in a?a.pluginPath:"curl/plugin";a.h={};m=a.plugins=a.plugins||{};a.f=[];d(a.paths,A);d(a.packages,u);for(var g in m){var i=m[g].f;i&&(m[g].f=i.concat(a.f),h(m[g]))}h(a);k.Q(a);return a},Q:function(a){var d;(d=a&&a.preloads)&&0<d.length&&n(K,function(){K=k.k(k.e(a,w,d,u))})},
-n:function(a,d,h){var m,g,i,p;m=d.h;h&&(d.M&&0>a.indexOf("/")&&!(a in m))&&(i=a=s(d.M)+"/"+a);h=N.test(a)?a:a.replace(d.ca,function(d){g=m[d]||{};p=g.c;return g.J&&d==a?(i=g.J,g.aa):g.path||""});return{g:i||a,c:p||j,url:k.N(h,d)}},N:function(a,d){var h=d.o;return h&&!N.test(a)?s(h)+"/"+a:a},z:function(a){return a+(P.test(a)?"":".js")},r:function(a,d,h){var i=z.createElement("script");i.onload=i.onreadystatechange=function(h){h=h||f.event;if("load"==h.type||p[i.readyState])delete E[a.id],i.onload=
-i.onreadystatechange=i.onerror="",d()};i.onerror=function(){h(Error("Syntax or http error: "+a.url))};i.type=a.K||"text/javascript";i.charset="utf-8";i.async=!a.ba;i.src=a.url;E[a.id]=i;l.insertBefore(i,l.firstChild);return i},G:function(a){var d=[],i;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(Q,"").replace(R,function(a,g,p){p?i=i==p?w:i:i||d.push(g);return a});return d},W:function(a){var d,i,p,g,c,l;c=a.length;p=a[c-1];g=q(p,"Function")?p.length:-1;2==c?q(a[0],"Array")?i=
-a[0]:d=a[0]:3==c&&(d=a[0],i=a[1]);!i&&0<g&&(l=u,i=["require","exports","module"].slice(0,g).concat(k.G(p)));return{id:d,q:i||[],u:0<=g?p:function(){return p},p:l}},T:function(a){var d;d=a.u.apply(a.p?a.a:w,a.q);d===w&&a.a&&(d=a.s?a.a=a.s.a:a.a);return d},B:function(a,d){a.u=d.u;a.p=d.p;a.C=d.q;k.k(a)},k:function(a){function d(a,d,i){l[d]=a;i&&f(a,d)}function i(d,p){var g,h,c,l;g=r(1,function(a){h(a);j(a,p)});h=r(1,function(a){f(a,p)});c=k.U(d,a);(l=c instanceof y&&c.a)&&h(l);n(c,g,a.b,a.a&&function(a){c.a&&
-(a==I?h(c.a):a==J&&g(c.a))})}function p(){a.d(l)}var g,c,l,b,e,f,j;l=[];c=a.C;b=c.length;0==c.length&&p();f=r(b,d,function(){a.F&&a.F(l)});j=r(b,d,p);for(g=0;g<b;g++)e=c[g],e in L?(j(L[e](a),g,u),a.a&&a.t(I)):e?i(e,g):j(w,g,u);return a},V:function(a){k.I(a);k.r(a,function(){var d=H;H=w;a.fa!==A&&(!d||d.D?a.b(Error(d&&d.D||"define() missing or duplicated: "+a.url)):k.B(a,d))},a.b);return a},U:function(a,d){var p,l,g,b,r,e,f,t,o;p=d.ea;l=d.$;g=c(a);e=g.O;b=p(g.l||e);f=k.n(b,j,!!g.l);if(g.l)r=b;else if(r=
-f.c.moduleLoader)e=b,b=r,f=k.n(r,j);g=i[b];b in i||(g=i[b]=k.A(f.c,b,l,f.g),g.url=k.z(f.url),k.V(g));b==r&&(t=new y,o=j.plugins[r]||j,n(g,function(a){var d,g,c;c=a.dynamic;e="normalize"in a?a.normalize(e,p,o)||"":p(e);g=r+"!"+e;d=i[g];if(!(g in i)){d=k.R(o,g,l,e);c||(i[g]=d);var b=function(a){d.d(a);c||(i[g]=a)};b.resolve=b;b.reject=d.b;a.load(e,d.m,b,o)}t!=d&&n(d,t.d,t.b,t.t)},t.b));return t||g},Z:function(){var a;if(!q(f.opera,"Opera"))for(var d in E)if(p[E[d].readyState]==B){a=d;break}return a}};
-L={require:k.Y,exports:k.H,module:k.X};v.version="0.6.3";"function"==typeof define&&(x=define);"function"==typeof j&&(C=j,j=A);j=k.c(j);i.curl=v;i["curl/_privileged"]={core:k,cache:i,cfg:j,_define:D,_curl:v,Promise:y}})(this);
-(function(f,b){function q(){if(!b.body)return A;z||(z=b.createTextNode(""));try{return b.body.removeChild(b.body.appendChild(z)),z=x,u}catch(c){return A}}function s(){var l;l=t[b[c]]&&q();if(!n&&l){n=u;for(clearTimeout(C);D=j.pop();)D();y&&(b[c]="complete");for(var e;e=o.shift();)e()}return l}function e(){s();n||(C=setTimeout(e,r))}var c="readyState",t={loaded:1,interactive:1,complete:1},o=[],y=b&&"string"!=typeof b[c],n=A,r=10,v,D,j=[],C,x,z;v="addEventListener"in f?function(c,b){c.addEventListener(b,
-s,A);return function(){c.removeEventListener(b,s,A)}}:function(c,b){c.attachEvent("on"+b,s);return function(){c.detachEvent(b,s)}};b&&!s()&&(j=[v(f,"load"),v(b,"readystatechange"),v(f,"DOMContentLoaded")],C=setTimeout(e,r));define("curl/domReady",function(){function c(b){n?b():o.push(b)}c.then=c;c.amd=u;return c})})(this,this.document);var M;
-define("curl/shim/dojo16",["curl/_privileged","curl/domReady"],function(f,b){function q(c){c.ready||(c.ready=function(c){b(c)});c.nameToUrl||(c.nameToUrl=function(b,e){return c.toUrl(b+(e||""))});c.cache||(c.cache={})}var s=f._curl,e=f.core.e;q(s);"undefined"==typeof M&&(M=s);f.core.e=function(){var c=e.apply(this,arguments);q(c.m);return c};return u});
-(function(f,b,q){define("js",["curl/_privileged"],function(f){function e(c,b,e){function j(){o||(t<new Date?e():setTimeout(j,10))}var t,o,n;t=(new Date).valueOf()+(c.da||3E5);e&&c.a&&setTimeout(j,10);n=f.core.r(c,function(){o=u;c.a&&(c.v=q(c.a));!c.a||c.v?b(n):e()},function(c){o=u;e(c)})}function c(b,f){e(b,function(){var e=o.shift();n=0<o.length;e&&c.apply(null,e);f.resolve(b.v||u)},function(c){f.reject(c)})}var t={},o=[],y=b&&b.createElement("script").async==u,n;return{dynamic:u,load:function(b,
-f,s,j){var q,x,z,l;q=0<b.indexOf("!order");x=b.indexOf("!exports=");z=0<x&&b.substr(x+9);l="prefetch"in j?j.prefetch:u;b=q||0<x?b.substr(0,b.indexOf("!")):b;b in t?s(t[b]):(t[b]=void 0,f={name:b,url:f.toUrl(b.lastIndexOf(".")<=b.lastIndexOf("/")?b+".js":b),ba:q,a:z,da:j.timeout},j={resolve:function(c){t[b]=c;(s.resolve||s)(c)},reject:s.reject||function(c){throw c;}},q&&!y&&n?(o.push([f,j]),l&&(f.K="text/cache",e(f,function(c){c&&c.parentNode.removeChild(c)},function(){}),f.K="")):(n=n||q,c(f,j)))}}})})(this,
-this.document,function(f){try{return eval(f)}catch(b){}});
-define("text",function(){function f(){if("undefined"!==typeof XMLHttpRequest)f=function(){return new XMLHttpRequest};else for(var b=f=function(){throw Error("getXhr(): XMLHttpRequest not available");};0<s.length&&f===b;)(function(c){try{new ActiveXObject(c),f=function(){return new ActiveXObject(c)}}catch(b){}})(s.shift());return f()}function b(b,c,t){var o=f();o.open("GET",b,u);o.onreadystatechange=function(){4===o.readyState&&(400>o.status?c(o.responseText):t(Error("fetchText() failed. status: "+
-o.statusText)))};o.send(null)}function q(b){throw b;}var s=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];return{load:function(e,c,f){var o=f.d||f,f=f.b||q;b(c.toUrl(e),o,f)},"plugin-builder":"./builder/text"}});define("async",function(){return{load:function(f,b,q){function s(c){"function"==typeof q.d?q.d(c):q(c)}function e(c){"function"==typeof q.b&&q.b(c)}b([f],function(c){"function"==typeof c.w?c.w(function(b){0==arguments.length&&(b=c);s(b)},e):s(c)})},analyze:function(f,b,q){q(f)}}});
-(function(f){function b(c,b){var e=c.link;e[v]=e[D]=function(){if(!e.readyState||"complete"==e.readyState)l["event-link-onload"]=u,o(c),b()}}function q(c){for(var c=c.split("!"),b,e=1;b=c[e++];)b=b.split("=",2),c[b[0]]=2==b.length?b[1]:u;return c}function s(c){if(document.createStyleSheet&&(G||(G=document.createStyleSheet()),30<=document.styleSheets.length)){var b,e,f,l=0;f=G;G=null;for(e=document.getElementsByTagName("link");b=e[l];)b.getAttribute("_curl_movable")?(f.addImport(b.href),b.parentNode&&
-b.parentNode.removeChild(b)):l++}c=c[j]("link");c.rel="stylesheet";c.type="text/css";c.setAttribute("_curl_movable",u);return c}function e(c){var b,e,f=A;try{if(b=c.sheet||c.styleSheet,(f=(e=b.cssRules||b.rules)?0<e.length:e!==x)&&"[object Chrome]"=={}.toString.call(window.ja))b.insertRule("#_cssx_load_test{margin-top:-5px;}",0),F||(F=B[j]("div"),F.id="_cssx_load_test",E.appendChild(F)),f="-5px"==B.defaultView.getComputedStyle(F,null).marginTop,b.deleteRule(0)}catch(l){f=1E3==l.code||l.message.match(/security|denied/i)}return f}
-function c(b,i){e(b.link)?(o(b),i()):C||setTimeout(function(){c(b,i)},b.ga)}function t(e,i){function f(){j||(j=u,i())}var j;b(e,f);l["event-link-onload"]||c(e,f)}function o(b){b=b.link;b[v]=b[D]=null}function y(b,c){return b.replace(J,function(b,e){var f=e;I.test(f)||(f=c+f);return'url("'+f+'")'})}function n(b){clearTimeout(n.S);n.i?n.i.push(b):(n.i=[b],w=B.createStyleSheet?B.createStyleSheet():E.appendChild(B.createElement("style")));n.S=setTimeout(function(){var b,c;b=w;w=x;c=n.i.join("\n");n.i=
-x;c=c.replace(/.+charset[^;]+;/g,"");"cssText"in b?b.cssText=c:b.appendChild(B.createTextNode(c))},0);return w}function r(b){return{cssRules:function(){return b.cssRules||b.rules},insertRule:b.insertRule||function(c,e){var f=c.split(/\{|\}/g);b.addRule(f[0],f[1],e);return e},deleteRule:b.deleteRule||function(c){b.removeRule(c);return c},sheet:function(){return b}}}var v="onreadystatechange",D="onload",j="createElement",C=A,x,z={},l={},I=/^\/|^[^:]*:\/\//,J=/url\s*\(['"]?([^'"\)]*)['"]?\)/g,B=f.document,
-E;B&&(E=B.head||(B.head=B.getElementsByTagName("head")[0]));var G,F,w;define("css",{normalize:function(b,c){var e,f;if(!b)return b;e=b.split(",");f=[];for(var l=0,j=e.length;l<j;l++)f.push(c(e[l]));return f.join(",")},load:function(b,c,e,f){function l(){--o==0&&setTimeout(function(){e(r(k.sheet||k.styleSheet))},0)}var j=(b||"").split(","),o=j.length;if(b)for(var w=j.length-1,x;w>=0;w--,x=u){var b=j[w],b=q(b),v=b.shift(),v=c.toUrl(v.lastIndexOf(".")<=v.lastIndexOf("/")?v+".css":v),k=s(B),a={link:k,
-url:v,ga:f.cssWatchPeriod||50};("nowait"in b?b.nowait!="false":f.cssDeferLoad)?e(r(k.sheet||k.styleSheet)):t(a,l);k.href=v;x?E.insertBefore(k,z[x].previousSibling):E.appendChild(k);z[v]=k}else e({translateUrls:function(a,b){var e;e=c.toUrl(b);e=e.substr(0,e.lastIndexOf("/")+1);return y(a,e)},injectStyle:function(a){return n(a)},proxySheet:function(a){if(a.sheet)a=a.sheet;return r(a)}})},"plugin-builder":"./builder/css"})})(this);
-(function(f){var b=f.document,q=/^\/\//,s;b&&(s=b.head||(b.head=b.getElementsByTagName("head")[0]));define("link",{load:function(e,c,f,o){e=c.toUrl(e.lastIndexOf(".")<=e.lastIndexOf("/")?e+".css":e);o=e=(o="fixSchemalessUrls"in o?o.fixSchemalessUrls:b.location.protocol)?e.replace(q,o+"//"):e;e=b.createElement("link");e.rel="stylesheet";e.type="text/css";e.href=o;s.appendChild(e);f(e.sheet||e.styleSheet)}})})(this);define("domReady",["curl/domReady"],function(f){return{load:function(b,q,s){f(s)}}});
-(function(f,b,q){define("curl/loader/cjsm11",function(){function f(c,e){f="text"in c?function(b,c){b.text=c}:function(c,e){c.appendChild(b.createTextNode(e))};f(c,e)}var e;e=b&&(b.head||b.getElementsByTagName("head")[0]);return{load:function(c,t,o,y){t(["text!"+c+".js","curl/_privileged"],function(n,r){var v;v=r.core.G(n);t(v,function(){var r=n,j=y.injectSourceUrl!==A&&t.pa(c),j=j?"////@ sourceURL="+j.replace(/\s/g,"%20")+".js":"";n="define('"+c+"',['require','exports','module'],function(require,exports,module){"+
-r+"\n});\n"+j+"\n";y.injectScript?(r=n,j=b.createElement("script"),f(j,r),j.charset="utf-8",e.insertBefore(j,e.firstChild)):q(n);o(t(c))})})}}})})(this,this.document,function(f){eval(f)});define.ha.oa=u;
-(function(f,b){define("curl/shim/ssjs",function(q){function s(c,e,f){try{b(c.url),e()}catch(j){f(j)}}function e(b,c,e){var j;try{j=b.url.replace(/\.js$/,""),f(j),c()}catch(n){e(n)}}function c(b,c,e){b=f("url").parse(b.url,A,u);c=j.get(b,c).ma("error",e);o(c)}function t(b){throw Error("ssjs: unable to load module in current environment: "+b.url);}function o(b){eval(b)}function y(b){return b&&b.replace(v,function(b,c){return c})}var n,r,v,D,j,C,x;if(!("object"==typeof window&&(window.ka||window.navigator))){q=
-q("curl/_privileged");n=q.ia;r=/^\w+:/;v=/(^\w+:)?.*$/;D=(n.j&&":"!=n.j[n.j.length-1]?n.j+":":n.j)||y(n.o)||"http:";if(b)C=x=s;else if(f){C=e;try{j=f("http"),x=c}catch(z){x=t}}else C=x=t;q.la.r=function(b,c,e){/^\/\//.test(b.url)&&(b.url=D+b.url);return r.test(b.url)?x(b,c,e):C(b,c,e)}}})})(M,load);
+(function(b){function e(){}function q(a,d){return 0==F.call(a).indexOf("[object "+d)}function t(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function g(a,d){var h,m,f;m=1;a=a.replace(O,function(a,d,h,i){h&&m++;f=u;return i||""});return f?(h=d.split("/"),h.splice(h.length-m,m),h.concat(a||[]).join("/")):a}function c(a){var d=a.indexOf("!");return{O:a.substr(d+1),l:0<=d&&a.substr(0,d)}}function s(){}function o(a){s.prototype=a;a=new s;s.prototype=G;return a}function y(){function a(a,d,
+h){m.push([a,d,h])}function d(a,d){for(var h,f=0;h=m[f++];)(h=h[a])&&h(d)}var h,m,f;h=this;m=[];f=function(h,i){a=h?function(a){a&&a(i)}:function(a,d){d&&d(i)};f=e;d(h?0:1,i);d=e;m=w};this.w=function(d,m,f){a(d,m,f);return h};this.d=function(a){h.v=a;f(u,a)};this.b=function(a){h.na=a;f(A,a)};this.t=function(a){d(2,a)}}function n(a,d,h,m){a instanceof y?a.w(d,h,m):d(a)}function r(a,d,h){var m;return function(){0<=--a&&d&&(m=d.apply(w,arguments));0==a&&h&&h(m);return m}}function v(){function a(d,m,
+f){var i;i=k.e(j,w,[].concat(d));this.then=d=function(a,d){n(i,function(d){a&&a.apply(w,d)},function(a){if(d)d(a);else throw a;});return this};this.next=function(d,h){return new a(d,h,i)};m&&d(m);n(f,function(){k.k(i)})}var d=[].slice.call(arguments);q(d[0],"Object")&&(j=k.c(d.shift()));return new a(d[0],d[1])}function D(a){var d=a.id;if(d==w)if(H!==w)H={D:"Multiple anonymous defines in url"};else if(!(d=k.Z()))H=a;if(d!=w){var h=i[d];d in i||(h=k.n(d,j).c,h=i[d]=k.A(h,d));if(!(h instanceof y))throw Error("duplicate define: "+
+d);h.fa=A;k.B(h,a)}}var j=b.curl,B,x,z=b.document,l=z&&(z.head||z.getElementsByTagName("head")[0]),I={},J={},C={},E={},G={},F=G.toString,w,p={loaded:1,interactive:C,complete:1},i={},K=A,H,P=/\?/,N=/^\/|^[^:]+:\/\//,O=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,Q=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,R=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,L,k;k={e:function(a,d,h,m){function f(a){return g(a,c.g)}function p(d,h){var l,r,g,b;l=h&&function(a){h.apply(w,a)};if(q(d,"String")){r=f(d);g=i[r];
+b=g instanceof y&&g.a;if(!(r in i))throw Error("Module not resolved: "+r);if(l)throw Error("require(id, callback) not allowed");return b||g}n(k.k(k.e(a,c.g,d,m)),l)}var c;c=new y;c.g=c.id=d||"";c.$=m;c.C=h;c.m=p;p.toUrl=function(d){return k.n(f(d),a).url};c.ea=f;return c},A:function(a,d,h,m){var f,c,p;f=k.e(a,d,w,h);f.g=m==w?d:m;c=f.d;p=r(1,function(a){f.q=a;try{return k.T(f)}catch(d){f.b(d)}});f.d=function(a){n(h||K,function(){c(i[f.id]=p(a))})};f.F=function(a){n(h||K,function(){f.a&&(p(a),f.t(J))})};
+return f},R:function(a,d,h,m){a=k.e(a,d,w,h);a.g=m;return a},Y:function(a){return a.m},H:function(a){return a.a||(a.a={})},X:function(a){var d=a.s;d||(d=a.s={id:a.id,uri:k.I(a),exports:k.H(a)},d.a=d.exports);return d},I:function(a){return a.url||(a.url=k.z(a.m.toUrl(a.id)))},c:function(a){var d,h,m;(d=a)||(a={});h=a.apiName;if((m=a.apiContext)||h?m[h]:B&&d)throw Error((h||"curl")+" already exists");(m||b)[h||"curl"]=v;B&&d&&(b.curl=B);h=a.defineName;if((m=a.defineContext)||h?m[h]:x&&d)throw Error((h||
+"define")+" already exists");(m||b)[h||"define"]=h=function(){var a=k.W(arguments);D(a)};x&&d&&(b.define=x);h.amd={plugins:u,jQuery:u,curl:"0.6.4"};d&&(k.c=k.L);return k.L(a)},L:function(a){function d(d,h){var i,f,p,l,r;for(r in d){p=d[r];p.name=p.id||p.name||r;l=a;f=c(t(p.name||r));i=f.O;if(f=f.l)l=m[f],l||(l=m[f]=o(a),l.h=o(a.h),l.f=[]),delete d[r];if(h){f=p;var b=void 0;f.path=t(f.path||f.location||"");b=t(f.main)||"main";"."!=b.charAt(0)&&(b="./"+b);f.J=g(b,f.name+"/");f.aa=g(b,f.path+"/");f.c=
+f.config}else f={path:t(p)};f.P=i.split("/").length;i?(l.h[i]=f,l.f.push(i)):l.o=k.N(p,a)}}function h(a){var d=a.h;a.ca=RegExp("^("+a.f.sort(function(a,h){return d[a].P<d[h].P}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete a.f}var m;a.o=a.baseUrl||"";a.M="pluginPath"in a?a.pluginPath:"curl/plugin";a.h={};m=a.plugins=a.plugins||{};a.f=[];d(a.paths,A);d(a.packages,u);for(var f in m){var i=m[f].f;i&&(m[f].f=i.concat(a.f),h(m[f]))}h(a);k.Q(a);return a},Q:function(a){var d;(d=a&&a.preloads)&&
+0<d.length&&n(K,function(){K=k.k(k.e(a,w,d,u))})},n:function(a,d,h){var m,f,i,p;m=d.h;h&&(d.M&&0>a.indexOf("/")&&!(a in m))&&(i=a=t(d.M)+"/"+a);h=N.test(a)?a:a.replace(d.ca,function(d){f=m[d]||{};p=f.c;return f.J&&d==a?(i=f.J,f.aa):f.path||""});return{g:i||a,c:p||j,url:k.N(h,d)}},N:function(a,d){var h=d.o;return h&&!N.test(a)?t(h)+"/"+a:a},z:function(a){return a+(P.test(a)?"":".js")},r:function(a,d,h){var i=z.createElement("script");i.onload=i.onreadystatechange=function(h){h=h||b.event;if("load"==
+h.type||p[i.readyState])delete E[a.id],i.onload=i.onreadystatechange=i.onerror="",d()};i.onerror=function(){h(Error("Syntax or http error: "+a.url))};i.type=a.K||"text/javascript";i.charset="utf-8";i.async=!a.ba;i.src=a.url;E[a.id]=i;l.insertBefore(i,l.firstChild);return i},G:function(a){var d=[],i;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(Q,"").replace(R,function(a,f,p){p?i=i==p?w:i:i||d.push(f);return a});return d},W:function(a){var d,i,p,f,c,l;c=a.length;p=a[c-1];f=q(p,
+"Function")?p.length:-1;2==c?q(a[0],"Array")?i=a[0]:d=a[0]:3==c&&(d=a[0],i=a[1]);!i&&0<f&&(l=u,i=["require","exports","module"].slice(0,f).concat(k.G(p)));return{id:d,q:i||[],u:0<=f?p:function(){return p},p:l}},T:function(a){var d;d=a.u.apply(a.p?a.a:w,a.q);d===w&&a.a&&(d=a.s?a.a=a.s.a:a.a);return d},B:function(a,d){a.u=d.u;a.p=d.p;a.C=d.q;k.k(a)},k:function(a){function d(a,d,i){l[d]=a;i&&e(a,d)}function i(d,p){var f,h,c,l;f=r(1,function(a){h(a);j(a,p)});h=r(1,function(a){e(a,p)});c=k.U(d,a);(l=c instanceof
+y&&c.a)&&h(l);n(c,f,a.b,a.a&&function(a){c.a&&(a==I?h(c.a):a==J&&f(c.a))})}function p(){a.d(l)}var f,c,l,b,g,e,j;l=[];c=a.C;b=c.length;0==c.length&&p();e=r(b,d,function(){a.F&&a.F(l)});j=r(b,d,p);for(f=0;f<b;f++)g=c[f],g in L?(j(L[g](a),f,u),a.a&&a.t(I)):g?i(g,f):j(w,f,u);return a},V:function(a){k.I(a);k.r(a,function(){var d=H;H=w;a.fa!==A&&(!d||d.D?a.b(Error(d&&d.D||"define() missing or duplicated: "+a.url)):k.B(a,d))},a.b);return a},U:function(a,d){var p,l,f,b,r,g,e,s,o;p=d.ea;l=d.$;f=c(a);g=f.O;
+b=p(f.l||g);e=k.n(b,j,!!f.l);if(f.l)r=b;else if(r=e.c.moduleLoader)g=b,b=r,e=k.n(r,j);f=i[b];b in i||(f=i[b]=k.A(e.c,b,l,e.g),f.url=k.z(e.url),k.V(f));b==r&&(s=new y,o=j.plugins[r]||j,n(f,function(a){var d,f,c;c=a.dynamic;g="normalize"in a?a.normalize(g,p,o)||"":p(g);f=r+"!"+g;d=i[f];if(!(f in i)){d=k.R(o,f,l,g);c||(i[f]=d);var b=function(a){d.d(a);c||(i[f]=a)};b.resolve=b;b.reject=d.b;a.load(g,d.m,b,o)}s!=d&&n(d,s.d,s.b,s.t)},s.b));return s||f},Z:function(){var a;if(!q(b.opera,"Opera"))for(var d in E)if(p[E[d].readyState]==
+C){a=d;break}return a}};L={require:k.Y,exports:k.H,module:k.X};v.version="0.6.4";"function"==typeof define&&(x=define);"function"==typeof j&&(B=j,j=A);j=k.c(j);i.curl=v;i["curl/_privileged"]={core:k,cache:i,cfg:j,_define:D,_curl:v,Promise:y}})(this);
+(function(b,e){function q(){if(!e.body)return A;z||(z=e.createTextNode(""));try{return e.body.removeChild(e.body.appendChild(z)),z=x,u}catch(c){return A}}function t(){var l;l=s[e[c]]&&q();if(!n&&l){n=u;for(clearTimeout(B);D=j.pop();)D();y&&(e[c]="complete");for(var b;b=o.shift();)b()}return l}function g(){t();n||(B=setTimeout(g,r))}var c="readyState",s={loaded:1,interactive:1,complete:1},o=[],y=e&&"string"!=typeof e[c],n=A,r=10,v,D,j=[],B,x,z;v="addEventListener"in b?function(c,b){c.addEventListener(b,
+t,A);return function(){c.removeEventListener(b,t,A)}}:function(c,b){c.attachEvent("on"+b,t);return function(){c.detachEvent(b,t)}};e&&!t()&&(j=[v(b,"load"),v(e,"readystatechange"),v(b,"DOMContentLoaded")],B=setTimeout(g,r));define("curl/domReady",function(){function c(b){n?b():o.push(b)}c.then=c;c.amd=u;return c})})(this,this.document);var M;
+define("curl/shim/dojo16",["curl/_privileged","curl/domReady"],function(b,e){function q(c){c.ready||(c.ready=function(c){e(c)});c.nameToUrl||(c.nameToUrl=function(b,g){return c.toUrl(b+(g||""))});c.cache||(c.cache={})}var t=b._curl,g=b.core.e;q(t);"undefined"==typeof M&&(M=t);b.core.e=function(){var c=g.apply(this,arguments);q(c.m);return c};return u});
+(function(b,e,q){define("js",["curl/_privileged"],function(b){function g(c,g,e){function j(){o||(s<new Date?e():setTimeout(j,10))}var s,o,n;s=(new Date).valueOf()+(c.da||3E5);e&&c.a&&setTimeout(j,10);n=b.core.r(c,function(){o=u;c.a&&(c.v=q(c.a));!c.a||c.v?g(n):e()},function(c){o=u;e(c)})}function c(b,e){g(b,function(){var g=o.shift();n=0<o.length;g&&c.apply(null,g);e.resolve(b.v||u)},function(c){e.reject(c)})}var s={},o=[],y=e&&e.createElement("script").async==u,n;return{dynamic:u,load:function(b,
+e,t,j){var q,x,z,l;q=0<b.indexOf("!order");x=b.indexOf("!exports=");z=0<x&&b.substr(x+9);l="prefetch"in j?j.prefetch:u;b=q||0<x?b.substr(0,b.indexOf("!")):b;b in s?t(s[b]):(s[b]=void 0,e={name:b,url:e.toUrl(b.lastIndexOf(".")<=b.lastIndexOf("/")?b+".js":b),ba:q,a:z,da:j.timeout},j={resolve:function(c){s[b]=c;(t.resolve||t)(c)},reject:t.reject||function(c){throw c;}},q&&!y&&n?(o.push([e,j]),l&&(e.K="text/cache",g(e,function(c){c&&c.parentNode.removeChild(c)},function(){}),e.K="")):(n=n||q,c(e,j)))}}})})(this,
+this.document,function(b){try{return eval(b)}catch(e){}});
+define("text",function(){function b(){if("undefined"!==typeof XMLHttpRequest)b=function(){return new XMLHttpRequest};else for(var g=b=function(){throw Error("getXhr(): XMLHttpRequest not available");};0<t.length&&b===g;)(function(c){try{new ActiveXObject(c),b=function(){return new ActiveXObject(c)}}catch(g){}})(t.shift());return b()}function e(g,c,e){var o=b();o.open("GET",g,u);o.onreadystatechange=function(){4===o.readyState&&(400>o.status?c(o.responseText):e(Error("fetchText() failed. status: "+
+o.statusText)))};o.send(null)}function q(b){throw b;}var t=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];return{load:function(b,c,s){var o=s.d||s,s=s.b||q;e(c.toUrl(b),o,s)},"plugin-builder":"./builder/text"}});define("async",function(){return{load:function(b,e,q){function t(c){"function"==typeof q.d?q.d(c):q(c)}function g(c){"function"==typeof q.b&&q.b(c)}e([b],function(c){"function"==typeof c.w?c.w(function(b){0==arguments.length&&(b=c);t(b)},g):t(c)})},analyze:function(b,e,q){q(b)}}});
+(function(b){function e(c,b){var e=c.link;e[v]=e[D]=function(){if(!e.readyState||"complete"==e.readyState)l["event-link-onload"]=u,o(c),b()}}function q(c){for(var c=c.split("!"),b,e=1;b=c[e++];)b=b.split("=",2),c[b[0]]=2==b.length?b[1]:u;return c}function t(c){if(document.createStyleSheet&&(G||(G=document.createStyleSheet()),30<=document.styleSheets.length)){var b,e,g,l=0;g=G;G=null;for(e=document.getElementsByTagName("link");b=e[l];)b.getAttribute("_curl_movable")?(g.addImport(b.href),b.parentNode&&
+b.parentNode.removeChild(b)):l++}c=c[j]("link");c.rel="stylesheet";c.type="text/css";c.setAttribute("_curl_movable",u);return c}function g(c){var b,e,g=A;try{if(b=c.sheet||c.styleSheet,(g=(e=b.cssRules||b.rules)?0<e.length:e!==x)&&"[object Chrome]"=={}.toString.call(window.ja))b.insertRule("#_cssx_load_test{margin-top:-5px;}",0),F||(F=C[j]("div"),F.id="_cssx_load_test",E.appendChild(F)),g="-5px"==C.defaultView.getComputedStyle(F,null).marginTop,b.deleteRule(0)}catch(l){g=1E3==l.code||l.message.match(/security|denied/i)}return g}
+function c(b,i){g(b.link)?(o(b),i()):B||setTimeout(function(){c(b,i)},b.ga)}function s(b,i){function g(){j||(j=u,i())}var j;e(b,g);l["event-link-onload"]||c(b,g)}function o(b){b=b.link;b[v]=b[D]=null}function y(b,c){return b.replace(J,function(b,e){var g=e;I.test(g)||(g=c+g);return'url("'+g+'")'})}function n(b){clearTimeout(n.S);n.i?n.i.push(b):(n.i=[b],w=C.createStyleSheet?C.createStyleSheet():E.appendChild(C.createElement("style")));n.S=setTimeout(function(){var b,c;b=w;w=x;c=n.i.join("\n");n.i=
+x;c=c.replace(/.+charset[^;]+;/g,"");"cssText"in b?b.cssText=c:b.appendChild(C.createTextNode(c))},0);return w}function r(b){return{cssRules:function(){return b.cssRules||b.rules},insertRule:b.insertRule||function(c,e){var g=c.split(/\{|\}/g);b.addRule(g[0],g[1],e);return e},deleteRule:b.deleteRule||function(c){b.removeRule(c);return c},sheet:function(){return b}}}var v="onreadystatechange",D="onload",j="createElement",B=A,x,z={},l={},I=/^\/|^[^:]*:\/\//,J=/url\s*\(['"]?([^'"\)]*)['"]?\)/g,C=b.document,
+E;C&&(E=C.head||(C.head=C.getElementsByTagName("head")[0]));var G,F,w;define("css",{normalize:function(b,c){var e,g;if(!b)return b;e=b.split(",");g=[];for(var l=0,j=e.length;l<j;l++)g.push(c(e[l]));return g.join(",")},load:function(b,c,e,g){function l(){--o==0&&setTimeout(function(){e(r(k.sheet||k.styleSheet))},0)}var j=(b||"").split(","),o=j.length;if(b)for(var w=j.length-1,x;w>=0;w--,x=u){var b=j[w],b=q(b),v=b.shift(),v=c.toUrl(v.lastIndexOf(".")<=v.lastIndexOf("/")?v+".css":v),k=t(C),a={link:k,
+url:v,ga:g.cssWatchPeriod||50};("nowait"in b?b.nowait!="false":g.cssDeferLoad)?e(r(k.sheet||k.styleSheet)):s(a,l);k.href=v;x?E.insertBefore(k,z[x].previousSibling):E.appendChild(k);z[v]=k}else e({translateUrls:function(a,b){var e;e=c.toUrl(b);e=e.substr(0,e.lastIndexOf("/")+1);return y(a,e)},injectStyle:function(a){return n(a)},proxySheet:function(a){if(a.sheet)a=a.sheet;return r(a)}})},"plugin-builder":"./builder/css"})})(this);
+(function(b){var e=b.document,q=/^\/\//,t;e&&(t=e.head||(e.head=e.getElementsByTagName("head")[0]));define("link",{load:function(b,c,s,o){b=c.toUrl(b.lastIndexOf(".")<=b.lastIndexOf("/")?b+".css":b);o=b=(o="fixSchemalessUrls"in o?o.fixSchemalessUrls:e.location.protocol)?b.replace(q,o+"//"):b;b=e.createElement("link");b.rel="stylesheet";b.type="text/css";b.href=o;t.appendChild(b);s(b.sheet||b.styleSheet)}})})(this);define("domReady",["curl/domReady"],function(b){return{load:function(e,q,t){b(t)}}});
+(function(b,e,q){define("curl/loader/cjsm11",function(){function b(c,g){b="text"in c?function(b,c){b.text=c}:function(b,c){b.appendChild(e.createTextNode(c))};b(c,g)}var g;g=e&&(e.head||e.getElementsByTagName("head")[0]);return{load:function(c,s,o,y){s(["text!"+c+".js","curl/_privileged"],function(n,r){var v;v=r.core.G(n);s(v,function(){var r=n,j=y.injectSourceUrl!==A&&s.pa(c),j=j?"////@ sourceURL="+j.replace(/\s/g,"%20")+".js":"";n="define('"+c+"',['require','exports','module'],function(require,exports,module){"+
+r+"\n});\n"+j+"\n";y.injectScript?(r=n,j=e.createElement("script"),b(j,r),j.charset="utf-8",g.insertBefore(j,g.firstChild)):q(n);o(s(c))})})}}})})(this,this.document,function(b){eval(b)});define.ha.oa=u;
+(function(b,e){define("curl/shim/ssjs",function(q){function t(b,c,g){try{e(b.url),c()}catch(j){g(j)}}function g(c,e,g){var j;try{j=c.url.replace(/\.js$/,""),b(j),e()}catch(n){g(n)}}function c(c,e,g){c=b("url").parse(c.url,A,u);e=j.get(c,e).ma("error",g);o(e)}function s(b){throw Error("ssjs: unable to load module in current environment: "+b.url);}function o(b){eval(b)}function y(b){return b&&b.replace(v,function(b,c){return c})}var n,r,v,D,j,B,x;if(!("object"==typeof window&&(window.ka||window.navigator))){q=
+q("curl/_privileged");n=q.ia;r=/^\w+:/;v=/(^\w+:)?.*$/;D=(n.j&&":"!=n.j[n.j.length-1]?n.j+":":n.j)||y(n.o)||"http:";if(e)B=x=t;else if(b){B=g;try{j=b("http"),x=c}catch(z){x=s}}else B=x=s;q.la.r=function(b,c,e){/^\/\//.test(b.url)&&(b.url=D+b.url);return r.test(b.url)?x(b,c,e):B(b,c,e)}}})})(M,load);
View
38 dist/curl-with-js-and-domReady/curl.js
@@ -1,22 +1,22 @@
/*
MIT License (c) copyright B Cavalier & J Hann */
var q=!0,w=!1;
-(function(r){function k(){}function y(a,b){return 0==O.call(a).indexOf("[object "+b)}function o(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function C(a,b){var c,f,e;f=1;a=a.replace(P,function(a,b,c,i){c&&f++;e=q;return i||""});return e?(c=b.split("/"),c.splice(c.length-f,f),c.concat(a||[]).join("/")):a}function A(a){var b=a.indexOf("!");return{K:a.substr(b+1),j:0<=b&&a.substr(0,b)}}function z(){}function B(a){z.prototype=a;a=new z;z.prototype=J;return a}function x(){function a(a,b,
-c){f.push([a,b,c])}function b(a,b){for(var c,e=0;c=f[e++];)(c=c[a])&&c(b)}var c,f,e;c=this;f=[];e=function(c,s){a=c?function(a){a&&a(s)}:function(a,b){b&&b(s)};e=k;b(c?0:1,s);b=k;f=t};this.$=function(b,c,f){a(b,c,f)};this.h=function(a){c.r=a;e(q,a)};this.d=function(a){c.da=a;e(w,a)};this.o=function(a){b(2,a)}}function n(a,b,c,f){a instanceof x?a.$(b,c,f):b(a)}function d(a,b,c){var f;return function(){0<=--a&&b&&(f=b.apply(t,arguments));0==a&&c&&c(f);return f}}function j(){function a(b,f,e){var g;
-g=i.f(h,t,[].concat(b));this.then=b=function(a,b){n(g,function(b){a&&a.apply(t,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,c){return new a(b,c,g)};f&&b(f);n(e,function(){i.i(g)})}var b=[].slice.call(arguments);y(b[0],"Object")&&(h=i.b(b.shift()));return new a(b[0],b[1])}function m(a){var b=a.id;if(b==t)if(E!==t)E={z:"Multiple anonymous defines in url"};else if(!(b=i.V()))E=a;if(b!=t){var c=u[b];b in u||(c=i.k(b,h).b,c=u[b]=i.u(c,b));if(!(c instanceof x))throw Error("duplicate define: "+
-b);c.ca=w;i.v(c,a)}}var h=r.curl,D,F,v=r.document,l=v&&(v.head||v.getElementsByTagName("head")[0]),p={},K={},L={},G={},J={},O=J.toString,t,M={loaded:1,interactive:L,complete:1},u={},H=w,E,Q=/\?/,N=/^\/|^[^:]+:\/\//,P=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,R=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,S=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,I,i;i={f:function(a,b,c,f){function e(a){return C(a,s.e)}function g(b,c){var g,d,h,l;g=c&&function(a){c.apply(t,a)};if(y(b,"String")){d=e(b);h=u[d];
-l=h instanceof x&&h.a;if(!(d in u))throw Error("Module not resolved: "+d);if(g)throw Error("require(id, callback) not allowed");return l||h}n(i.i(i.f(a,s.e,b,f)),g)}var s;s=new x;s.e=s.id=b||"";s.W=f;s.w=c;s.p=g;g.toUrl=function(b){return i.k(e(b),a).url};s.ba=e;return s},u:function(a,b,c,f){var e,g,s;e=i.f(a,b,t,c);e.e=f==t?b:f;g=e.h;s=d(1,function(a){e.m=a;try{return i.O(e)}catch(b){e.d(b)}});e.h=function(a){n(c||H,function(){g(u[e.id]=s(a))})};e.A=function(a){n(c||H,function(){e.a&&(s(a),e.o(K))})};
-return e},N:function(a,b,c,f){a=i.f(a,b,t,c);a.e=f;return a},U:function(a){return a.p},B:function(a){return a.a||(a.a={})},T:function(a){var b=a.n;b||(b=a.n={id:a.id,uri:i.C(a),exports:i.B(a)},b.a=b.exports);return b},C:function(a){return a.url||(a.url=i.t(a.p.toUrl(a.id)))},b:function(a){var b,c,f;(b=a)||(a={});c=a.apiName;if((f=a.apiContext)||c?f[c]:D&&b)throw Error((c||"curl")+" already exists");(f||r)[c||"curl"]=j;c=a.defineName;if((f=a.defineContext)||c?f[c]:F&&b)throw Error((c||"define")+" already exists");
-(f||r)[c||"define"]=c=function(){var a=i.S(arguments);m(a)};c.amd={plugins:q,jQuery:q,curl:"0.6.3"};b&&(i.b=i.H);return i.H(a)},H:function(a){function b(b,c){var e,g,d,h,l;for(l in b){d=b[l];d.name=d.id||d.name||l;h=a;g=A(o(d.name||l));e=g.K;if(g=g.j)h=f[g],h||(h=f[g]=B(a),h.g=B(a.g),h.c=[]),delete b[l];if(c){g=d;var p=void 0;g.path=o(g.path||g.location||"");p=o(g.main)||"main";"."!=p.charAt(0)&&(p="./"+p);g.F=C(p,g.name+"/");g.X=C(p,g.path+"/");g.b=g.config}else g={path:o(d)};g.L=e.split("/").length;
-e?(h.g[e]=g,h.c.push(e)):h.s=i.J(d,a)}}function c(a){var b=a.g;a.Z=RegExp("^("+a.c.sort(function(a,c){return b[a].L<b[c].L}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete a.c}var f;a.s=a.baseUrl||"";a.I="pluginPath"in a?a.pluginPath:"curl/plugin";a.g={};f=a.plugins=a.plugins||{};a.c=[];b(a.paths,w);b(a.packages,q);for(var e in f){var g=f[e].c;g&&(f[e].c=g.concat(a.c),c(f[e]))}c(a);i.M(a);return a},M:function(a){var b;(b=a&&a.preloads)&&0<b.length&&n(H,function(){H=i.i(i.f(a,t,b,q))})},k:function(a,
-b,c){var f,e,g,d;f=b.g;c&&(b.I&&0>a.indexOf("/")&&!(a in f))&&(g=a=o(b.I)+"/"+a);c=N.test(a)?a:a.replace(b.Z,function(b){e=f[b]||{};d=e.b;return e.F&&b==a?(g=e.F,e.X):e.path||""});return{e:g||a,b:d||h,url:i.J(c,b)}},J:function(a,b){var c=b.s;return c&&!N.test(a)?o(c)+"/"+a:a},t:function(a){return a+(Q.test(a)?"":".js")},D:function(a,b,c){var f=v.createElement("script");f.onload=f.onreadystatechange=function(c){c=c||r.event;if("load"==c.type||M[f.readyState])delete G[a.id],f.onload=f.onreadystatechange=
-f.onerror="",b()};f.onerror=function(){c(Error("Syntax or http error: "+a.url))};f.type=a.G||"text/javascript";f.charset="utf-8";f.async=!a.Y;f.src=a.url;G[a.id]=f;l.insertBefore(f,l.firstChild);return f},P:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(R,"").replace(S,function(a,e,g){g?c=c==g?t:c:c||b.push(e);return a});return b},S:function(a){var b,c,f,e,g,d;g=a.length;f=a[g-1];e=y(f,"Function")?f.length:-1;2==g?y(a[0],"Array")?c=a[0]:b=a[0]:3==g&&(b=
-a[0],c=a[1]);!c&&0<e&&(d=q,c=["require","exports","module"].slice(0,e).concat(i.P(f)));return{id:b,m:c||[],q:0<=e?f:function(){return f},l:d}},O:function(a){var b;b=a.q.apply(a.l?a.a:t,a.m);b===t&&a.a&&(b=a.n?a.a=a.n.a:a.a);return b},v:function(a,b){a.q=b.q;a.l=b.l;a.w=b.m;i.i(a)},i:function(a){function b(a,b,c){h[b]=a;c&&m(a,b)}function c(b,c){var f,e,g,h;f=d(1,function(a){e(a);k(a,c)});e=d(1,function(a){m(a,c)});g=i.Q(b,a);(h=g instanceof x&&g.a)&&e(h);n(g,f,a.d,a.a&&function(a){g.a&&(a==p?e(g.a):
-a==K&&f(g.a))})}function f(){a.h(h)}var e,g,h,l,j,m,k;h=[];g=a.w;l=g.length;0==g.length&&f();m=d(l,b,function(){a.A&&a.A(h)});k=d(l,b,f);for(e=0;e<l;e++)j=g[e],j in I?(k(I[j](a),e,q),a.a&&a.o(p)):j?c(j,e):k(t,e,q);return a},R:function(a){i.C(a);i.D(a,function(){var b=E;E=t;a.ca!==w&&(!b||b.z?a.d(Error(b&&b.z||"define() missing or duplicated: "+a.url)):i.v(a,b))},a.d);return a},Q:function(a,b){var c,f,e,g,d,l,p,j,m;c=b.ba;f=b.W;e=A(a);l=e.K;g=c(e.j||l);p=i.k(g,h,!!e.j);if(e.j)d=g;else if(d=p.b.moduleLoader)l=
-g,g=d,p=i.k(d,h);e=u[g];g in u||(e=u[g]=i.u(p.b,g,f,p.e),e.url=i.t(p.url),i.R(e));g==d&&(j=new x,m=h.plugins[d]||h,n(e,function(a){var b,e,g;g=a.dynamic;l="normalize"in a?a.normalize(l,c,m)||"":c(l);e=d+"!"+l;b=u[e];if(!(e in u)){b=i.N(m,e,f,l);g||(u[e]=b);var h=function(a){b.h(a);g||(u[e]=a)};h.resolve=h;h.reject=b.d;a.load(l,b.p,h,m)}j!=b&&n(b,j.h,j.d,j.o)},j.d));return j||e},V:function(){var a;if(!y(r.opera,"Opera"))for(var b in G)if(M[G[b].readyState]==L){a=b;break}return a}};I={require:i.U,exports:i.B,
-module:i.T};j.version="0.6.3";"function"==typeof define&&(F=define);"function"==typeof h&&(D=h,h=w);h=i.b(h);u.curl=j;u["curl/_privileged"]={core:i,cache:u,cfg:h,_define:m,_curl:j,Promise:x}})(this);
-(function(r,k){function y(){if(!k.body)return w;v||(v=k.createTextNode(""));try{return k.body.removeChild(k.body.appendChild(v)),v=F,q}catch(d){return w}}function o(){var d;d=z[k[A]]&&y();if(!n&&d){n=q;for(clearTimeout(D);m=h.pop();)m();x&&(k[A]="complete");for(var p;p=B.shift();)p()}return d}function C(){o();n||(D=setTimeout(C,d))}var A="readyState",z={loaded:1,interactive:1,complete:1},B=[],x=k&&"string"!=typeof k[A],n=w,d=10,j,m,h=[],D,F,v;j="addEventListener"in r?function(d,h){d.addEventListener(h,
-o,w);return function(){d.removeEventListener(h,o,w)}}:function(d,h){d.attachEvent("on"+h,o);return function(){d.detachEvent(h,o)}};k&&!o()&&(h=[j(r,"load"),j(k,"readystatechange"),j(r,"DOMContentLoaded")],D=setTimeout(C,d));define("curl/domReady",function(){function d(h){n?h():B.push(h)}d.then=d;d.amd=q;return d})})(this,this.document);
-(function(r,k,y){define("js",["curl/_privileged"],function(o){function r(d,j,m){function h(){n||(k<new Date?m():setTimeout(h,10))}var k,n,v;k=(new Date).valueOf()+(d.aa||3E5);m&&d.a&&setTimeout(h,10);v=o.core.D(d,function(){n=q;d.a&&(d.r=y(d.a));!d.a||d.r?j(v):m()},function(d){n=q;m(d)})}function A(d,j){r(d,function(){var m=B.shift();n=0<B.length;m&&A.apply(null,m);j.resolve(d.r||q)},function(d){j.reject(d)})}var z={},B=[],x=k&&k.createElement("script").async==q,n;return{dynamic:q,load:function(d,
-j,m,h){var k,o,v,l;k=0<d.indexOf("!order");o=d.indexOf("!exports=");v=0<o&&d.substr(o+9);l="prefetch"in h?h.prefetch:q;d=k||0<o?d.substr(0,d.indexOf("!")):d;d in z?m(z[d]):(z[d]=void 0,j={name:d,url:j.toUrl(d.lastIndexOf(".")<=d.lastIndexOf("/")?d+".js":d),Y:k,a:v,aa:h.timeout},h={resolve:function(h){z[d]=h;(m.resolve||m)(h)},reject:m.reject||function(d){throw d;}},k&&!x&&n?(B.push([j,h]),l&&(j.G="text/cache",r(j,function(d){d&&d.parentNode.removeChild(d)},function(){}),j.G="")):(n=n||k,A(j,h)))}}})})(this,
-this.document,function(r){try{return eval(r)}catch(k){}});define("domReady",["curl/domReady"],function(r){return{load:function(k,y,o){r(o)}}});
+(function(n){function k(){}function y(a,b){return 0==O.call(a).indexOf("[object "+b)}function r(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function A(a,b){var c,f,e;f=1;a=a.replace(P,function(a,b,c,i){c&&f++;e=q;return i||""});return e?(c=b.split("/"),c.splice(c.length-f,f),c.concat(a||[]).join("/")):a}function B(a){var b=a.indexOf("!");return{K:a.substr(b+1),j:0<=b&&a.substr(0,b)}}function z(){}function C(a){z.prototype=a;a=new z;z.prototype=J;return a}function x(){function a(a,b,
+c){f.push([a,b,c])}function b(a,b){for(var c,e=0;c=f[e++];)(c=c[a])&&c(b)}var c,f,e;c=this;f=[];e=function(c,s){a=c?function(a){a&&a(s)}:function(a,b){b&&b(s)};e=k;b(c?0:1,s);b=k;f=t};this.$=function(b,c,f){a(b,c,f)};this.h=function(a){c.r=a;e(q,a)};this.d=function(a){c.da=a;e(w,a)};this.o=function(a){b(2,a)}}function o(a,b,c,f){a instanceof x?a.$(b,c,f):b(a)}function d(a,b,c){var f;return function(){0<=--a&&b&&(f=b.apply(t,arguments));0==a&&c&&c(f);return f}}function j(){function a(b,f,e){var g;
+g=i.f(h,t,[].concat(b));this.then=b=function(a,b){o(g,function(b){a&&a.apply(t,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,c){return new a(b,c,g)};f&&b(f);o(e,function(){i.i(g)})}var b=[].slice.call(arguments);y(b[0],"Object")&&(h=i.b(b.shift()));return new a(b[0],b[1])}function m(a){var b=a.id;if(b==t)if(F!==t)F={z:"Multiple anonymous defines in url"};else if(!(b=i.V()))F=a;if(b!=t){var c=u[b];b in u||(c=i.k(b,h).b,c=u[b]=i.u(c,b));if(!(c instanceof x))throw Error("duplicate define: "+
+b);c.ca=w;i.v(c,a)}}var h=n.curl,D,E,v=n.document,l=v&&(v.head||v.getElementsByTagName("head")[0]),p={},K={},L={},G={},J={},O=J.toString,t,M={loaded:1,interactive:L,complete:1},u={},H=w,F,Q=/\?/,N=/^\/|^[^:]+:\/\//,P=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,R=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,S=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,I,i;i={f:function(a,b,c,f){function e(a){return A(a,s.e)}function g(b,c){var g,d,h,l;g=c&&function(a){c.apply(t,a)};if(y(b,"String")){d=e(b);h=u[d];
+l=h instanceof x&&h.a;if(!(d in u))throw Error("Module not resolved: "+d);if(g)throw Error("require(id, callback) not allowed");return l||h}o(i.i(i.f(a,s.e,b,f)),g)}var s;s=new x;s.e=s.id=b||"";s.W=f;s.w=c;s.p=g;g.toUrl=function(b){return i.k(e(b),a).url};s.ba=e;return s},u:function(a,b,c,f){var e,g,s;e=i.f(a,b,t,c);e.e=f==t?b:f;g=e.h;s=d(1,function(a){e.m=a;try{return i.O(e)}catch(b){e.d(b)}});e.h=function(a){o(c||H,function(){g(u[e.id]=s(a))})};e.A=function(a){o(c||H,function(){e.a&&(s(a),e.o(K))})};
+return e},N:function(a,b,c,f){a=i.f(a,b,t,c);a.e=f;return a},U:function(a){return a.p},B:function(a){return a.a||(a.a={})},T:function(a){var b=a.n;b||(b=a.n={id:a.id,uri:i.C(a),exports:i.B(a)},b.a=b.exports);return b},C:function(a){return a.url||(a.url=i.t(a.p.toUrl(a.id)))},b:function(a){var b,c,f;(b=a)||(a={});c=a.apiName;if((f=a.apiContext)||c?f[c]:D&&b)throw Error((c||"curl")+" already exists");(f||n)[c||"curl"]=j;D&&b&&(n.curl=D);c=a.defineName;if((f=a.defineContext)||c?f[c]:E&&b)throw Error((c||
+"define")+" already exists");(f||n)[c||"define"]=c=function(){var a=i.S(arguments);m(a)};E&&b&&(n.define=E);c.amd={plugins:q,jQuery:q,curl:"0.6.4"};b&&(i.b=i.H);return i.H(a)},H:function(a){function b(b,c){var e,g,d,h,l;for(l in b){d=b[l];d.name=d.id||d.name||l;h=a;g=B(r(d.name||l));e=g.K;if(g=g.j)h=f[g],h||(h=f[g]=C(a),h.g=C(a.g),h.c=[]),delete b[l];if(c){g=d;var p=void 0;g.path=r(g.path||g.location||"");p=r(g.main)||"main";"."!=p.charAt(0)&&(p="./"+p);g.F=A(p,g.name+"/");g.X=A(p,g.path+"/");g.b=
+g.config}else g={path:r(d)};g.L=e.split("/").length;e?(h.g[e]=g,h.c.push(e)):h.s=i.J(d,a)}}function c(a){var b=a.g;a.Z=RegExp("^("+a.c.sort(function(a,c){return b[a].L<b[c].L}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete a.c}var f;a.s=a.baseUrl||"";a.I="pluginPath"in a?a.pluginPath:"curl/plugin";a.g={};f=a.plugins=a.plugins||{};a.c=[];b(a.paths,w);b(a.packages,q);for(var e in f){var g=f[e].c;g&&(f[e].c=g.concat(a.c),c(f[e]))}c(a);i.M(a);return a},M:function(a){var b;(b=a&&a.preloads)&&
+0<b.length&&o(H,function(){H=i.i(i.f(a,t,b,q))})},k:function(a,b,c){var f,e,g,d;f=b.g;c&&(b.I&&0>a.indexOf("/")&&!(a in f))&&(g=a=r(b.I)+"/"+a);c=N.test(a)?a:a.replace(b.Z,function(b){e=f[b]||{};d=e.b;return e.F&&b==a?(g=e.F,e.X):e.path||""});return{e:g||a,b:d||h,url:i.J(c,b)}},J:function(a,b){var c=b.s;return c&&!N.test(a)?r(c)+"/"+a:a},t:function(a){return a+(Q.test(a)?"":".js")},D:function(a,b,c){var f=v.createElement("script");f.onload=f.onreadystatechange=function(c){c=c||n.event;if("load"==
+c.type||M[f.readyState])delete G[a.id],f.onload=f.onreadystatechange=f.onerror="",b()};f.onerror=function(){c(Error("Syntax or http error: "+a.url))};f.type=a.G||"text/javascript";f.charset="utf-8";f.async=!a.Y;f.src=a.url;G[a.id]=f;l.insertBefore(f,l.firstChild);return f},P:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(R,"").replace(S,function(a,e,g){g?c=c==g?t:c:c||b.push(e);return a});return b},S:function(a){var b,c,f,e,g,d;g=a.length;f=a[g-1];e=y(f,
+"Function")?f.length:-1;2==g?y(a[0],"Array")?c=a[0]:b=a[0]:3==g&&(b=a[0],c=a[1]);!c&&0<e&&(d=q,c=["require","exports","module"].slice(0,e).concat(i.P(f)));return{id:b,m:c||[],q:0<=e?f:function(){return f},l:d}},O:function(a){var b;b=a.q.apply(a.l?a.a:t,a.m);b===t&&a.a&&(b=a.n?a.a=a.n.a:a.a);return b},v:function(a,b){a.q=b.q;a.l=b.l;a.w=b.m;i.i(a)},i:function(a){function b(a,b,c){h[b]=a;c&&m(a,b)}function c(b,c){var f,e,g,h;f=d(1,function(a){e(a);k(a,c)});e=d(1,function(a){m(a,c)});g=i.Q(b,a);(h=g instanceof
+x&&g.a)&&e(h);o(g,f,a.d,a.a&&function(a){g.a&&(a==p?e(g.a):a==K&&f(g.a))})}function f(){a.h(h)}var e,g,h,l,j,m,k;h=[];g=a.w;l=g.length;0==g.length&&f();m=d(l,b,function(){a.A&&a.A(h)});k=d(l,b,f);for(e=0;e<l;e++)j=g[e],j in I?(k(I[j](a),e,q),a.a&&a.o(p)):j?c(j,e):k(t,e,q);return a},R:function(a){i.C(a);i.D(a,function(){var b=F;F=t;a.ca!==w&&(!b||b.z?a.d(Error(b&&b.z||"define() missing or duplicated: "+a.url)):i.v(a,b))},a.d);return a},Q:function(a,b){var c,f,e,g,d,l,p,j,m;c=b.ba;f=b.W;e=B(a);l=e.K;
+g=c(e.j||l);p=i.k(g,h,!!e.j);if(e.j)d=g;else if(d=p.b.moduleLoader)l=g,g=d,p=i.k(d,h);e=u[g];g in u||(e=u[g]=i.u(p.b,g,f,p.e),e.url=i.t(p.url),i.R(e));g==d&&(j=new x,m=h.plugins[d]||h,o(e,function(a){var b,e,g;g=a.dynamic;l="normalize"in a?a.normalize(l,c,m)||"":c(l);e=d+"!"+l;b=u[e];if(!(e in u)){b=i.N(m,e,f,l);g||(u[e]=b);var h=function(a){b.h(a);g||(u[e]=a)};h.resolve=h;h.reject=b.d;a.load(l,b.p,h,m)}j!=b&&o(b,j.h,j.d,j.o)},j.d));return j||e},V:function(){var a;if(!y(n.opera,"Opera"))for(var b in G)if(M[G[b].readyState]==
+L){a=b;break}return a}};I={require:i.U,exports:i.B,module:i.T};j.version="0.6.4";"function"==typeof define&&(E=define);"function"==typeof h&&(D=h,h=w);h=i.b(h);u.curl=j;u["curl/_privileged"]={core:i,cache:u,cfg:h,_define:m,_curl:j,Promise:x}})(this);
+(function(n,k){function y(){if(!k.body)return w;v||(v=k.createTextNode(""));try{return k.body.removeChild(k.body.appendChild(v)),v=E,q}catch(d){return w}}function r(){var d;d=z[k[B]]&&y();if(!o&&d){o=q;for(clearTimeout(D);m=h.pop();)m();x&&(k[B]="complete");for(var p;p=C.shift();)p()}return d}function A(){r();o||(D=setTimeout(A,d))}var B="readyState",z={loaded:1,interactive:1,complete:1},C=[],x=k&&"string"!=typeof k[B],o=w,d=10,j,m,h=[],D,E,v;j="addEventListener"in n?function(d,h){d.addEventListener(h,
+r,w);return function(){d.removeEventListener(h,r,w)}}:function(d,h){d.attachEvent("on"+h,r);return function(){d.detachEvent(h,r)}};k&&!r()&&(h=[j(n,"load"),j(k,"readystatechange"),j(n,"DOMContentLoaded")],D=setTimeout(A,d));define("curl/domReady",function(){function d(h){o?h():C.push(h)}d.then=d;d.amd=q;return d})})(this,this.document);
+(function(n,k,y){define("js",["curl/_privileged"],function(n){function A(d,j,m){function h(){o||(k<new Date?m():setTimeout(h,10))}var k,o,v;k=(new Date).valueOf()+(d.aa||3E5);m&&d.a&&setTimeout(h,10);v=n.core.D(d,function(){o=q;d.a&&(d.r=y(d.a));!d.a||d.r?j(v):m()},function(d){o=q;m(d)})}function B(d,j){A(d,function(){var m=C.shift();o=0<C.length;m&&B.apply(null,m);j.resolve(d.r||q)},function(d){j.reject(d)})}var z={},C=[],x=k&&k.createElement("script").async==q,o;return{dynamic:q,load:function(d,
+j,m,h){var k,n,r,l;k=0<d.indexOf("!order");n=d.indexOf("!exports=");r=0<n&&d.substr(n+9);l="prefetch"in h?h.prefetch:q;d=k||0<n?d.substr(0,d.indexOf("!")):d;d in z?m(z[d]):(z[d]=void 0,j={name:d,url:j.toUrl(d.lastIndexOf(".")<=d.lastIndexOf("/")?d+".js":d),Y:k,a:r,aa:h.timeout},h={resolve:function(h){z[d]=h;(m.resolve||m)(h)},reject:m.reject||function(d){throw d;}},k&&!x&&o?(C.push([j,h]),l&&(j.G="text/cache",A(j,function(d){d&&d.parentNode.removeChild(d)},function(){}),j.G="")):(o=o||k,B(j,h)))}}})})(this,
+this.document,function(n){try{return eval(n)}catch(k){}});define("domReady",["curl/domReady"],function(n){return{load:function(k,y,r){n(r)}}});
View
28 dist/curl/curl.js
@@ -1,17 +1,17 @@
/*
MIT License (c) copyright B Cavalier & J Hann */
var p=!0,t=!1;
-(function(n){function G(){}function w(a,b){return 0==T.call(a).indexOf("[object "+b)}function u(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function D(a,b){var c,e,d;e=1;a=a.replace(U,function(a,b,c,g){c&&e++;d=p;return g||""});return d?(c=b.split("/"),c.splice(c.length-e,e),c.concat(a||[]).join("/")):a}function H(a){var b=a.indexOf("!");return{H:a.substr(b+1),j:0<=b&&a.substr(0,b)}}function E(){}function I(a){E.prototype=a;a=new E;E.prototype=J;return a}function s(){function a(a,b,
-c){e.push([a,b,c])}function b(a,b){for(var c,d=0;c=e[d++];)(c=c[a])&&c(b)}var c,e,d;c=this;e=[];d=function(c,h){a=c?function(a){a&&a(h)}:function(a,b){b&&b(h)};d=G;b(c?0:1,h);b=G;e=i};this.X=function(b,c,e){a(b,c,e)};this.h=function(a){c.ca=a;d(p,a)};this.d=function(a){c.ba=a;d(t,a)};this.o=function(a){b(2,a)}}function q(a,b,c,e){a instanceof s?a.X(b,c,e):b(a)}function x(a,b,c){var e;return function(){0<=--a&&b&&(e=b.apply(i,arguments));0==a&&c&&c(e);return e}}function z(){function a(b,e,d){var f;
-f=g.f(j,i,[].concat(b));this.then=b=function(a,b){q(f,function(b){a&&a.apply(i,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,c){return new a(b,c,f)};e&&b(e);q(d,function(){g.i(f)})}var b=[].slice.call(arguments);w(b[0],"Object")&&(j=g.b(b.shift()));return new a(b[0],b[1])}function K(a){var b=a.id;if(b==i)if(y!==i)y={w:"Multiple anonymous defines in url"};else if(!(b=g.S()))y=a;if(b!=i){var c=l[b];b in l||(c=g.k(b,j).b,c=l[b]=g.t(c,b));if(!(c instanceof s))throw Error("duplicate define: "+
-b);c.Z=t;g.u(c,a)}}var j=n.curl,L,M,A=n.document,N=A&&(A.head||A.getElementsByTagName("head")[0]),O={},P={},Q={},B={},J={},T=J.toString,i,R={loaded:1,interactive:Q,complete:1},l={},C=t,y,V=/\?/,S=/^\/|^[^:]+:\/\//,U=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,W=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,X=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,F,g;g={f:function(a,b,c,e){function d(a){return D(a,h.e)}function f(b,c){var f,k,m,r;f=c&&function(a){c.apply(i,a)};if(w(b,"String")){k=d(b);m=l[k];
-r=m instanceof s&&m.a;if(!(k in l))throw Error("Module not resolved: "+k);if(f)throw Error("require(id, callback) not allowed");return r||m}q(g.i(g.f(a,h.e,b,e)),f)}var h;h=new s;h.e=h.id=b||"";h.T=e;h.v=c;h.p=f;f.toUrl=function(b){return g.k(d(b),a).url};h.Y=d;return h},t:function(a,b,c,e){var d,f,h;d=g.f(a,b,i,c);d.e=e==i?b:e;f=d.h;h=x(1,function(a){d.m=a;try{return g.L(d)}catch(b){d.d(b)}});d.h=function(a){q(c||C,function(){f(l[d.id]=h(a))})};d.z=function(a){q(c||C,function(){d.a&&(h(a),d.o(P))})};
-return d},K:function(a,b,c,e){a=g.f(a,b,i,c);a.e=e;return a},R:function(a){return a.p},A:function(a){return a.a||(a.a={})},Q:function(a){var b=a.n;b||(b=a.n={id:a.id,uri:g.B(a),exports:g.A(a)},b.a=b.exports);return b},B:function(a){return a.url||(a.url=g.s(a.p.toUrl(a.id)))},b:function(a){var b,c,e;(b=a)||(a={});c=a.apiName;if((e=a.apiContext)||c?e[c]:L&&b)throw Error((c||"curl")+" already exists");(e||n)[c||"curl"]=z;c=a.defineName;if((e=a.defineContext)||c?e[c]:M&&b)throw Error((c||"define")+" already exists");
-(e||n)[c||"define"]=c=function(){var a=g.P(arguments);K(a)};c.amd={plugins:p,jQuery:p,curl:"0.6.3"};b&&(g.b=g.D);return g.D(a)},D:function(a){function b(b,c){var d,f,k,m,r;for(r in b){k=b[r];k.name=k.id||k.name||r;m=a;f=H(u(k.name||r));d=f.H;if(f=f.j)m=e[f],m||(m=e[f]=I(a),m.g=I(a.g),m.c=[]),delete b[r];if(c){f=k;var v=void 0;f.path=u(f.path||f.location||"");v=u(f.main)||"main";"."!=v.charAt(0)&&(v="./"+v);f.C=D(v,f.name+"/");f.V=D(v,f.path+"/");f.b=f.config}else f={path:u(k)};f.I=d.split("/").length;
-d?(m.g[d]=f,m.c.push(d)):m.r=g.G(k,a)}}function c(a){var b=a.g;a.W=RegExp("^("+a.c.sort(function(a,c){return b[a].I<b[c].I}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete a.c}var e;a.r=a.baseUrl||"";a.F="pluginPath"in a?a.pluginPath:"curl/plugin";a.g={};e=a.plugins=a.plugins||{};a.c=[];b(a.paths,t);b(a.packages,p);for(var d in e){var f=e[d].c;f&&(e[d].c=f.concat(a.c),c(e[d]))}c(a);g.J(a);return a},J:function(a){var b;(b=a&&a.preloads)&&0<b.length&&q(C,function(){C=g.i(g.f(a,i,b,p))})},k:function(a,
-b,c){var e,d,f,h;e=b.g;c&&(b.F&&0>a.indexOf("/")&&!(a in e))&&(f=a=u(b.F)+"/"+a);c=S.test(a)?a:a.replace(b.W,function(b){d=e[b]||{};h=d.b;return d.C&&b==a?(f=d.C,d.V):d.path||""});return{e:f||a,b:h||j,url:g.G(c,b)}},G:function(a,b){var c=b.r;return c&&!S.test(a)?u(c)+"/"+a:a},s:function(a){return a+(V.test(a)?"":".js")},U:function(a,b,c){var e=A.createElement("script");e.onload=e.onreadystatechange=function(c){c=c||n.event;if("load"==c.type||R[e.readyState])delete B[a.id],e.onload=e.onreadystatechange=
-e.onerror="",b()};e.onerror=function(){c(Error("Syntax or http error: "+a.url))};e.type=a.$||"text/javascript";e.charset="utf-8";e.async=!a.aa;e.src=a.url;B[a.id]=e;N.insertBefore(e,N.firstChild);return e},M:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(W,"").replace(X,function(a,d,f){f?c=c==f?i:c:c||b.push(d);return a});return b},P:function(a){var b,c,e,d,f,h;f=a.length;e=a[f-1];d=w(e,"Function")?e.length:-1;2==f?w(a[0],"Array")?c=a[0]:b=a[0]:3==f&&(b=
-a[0],c=a[1]);!c&&0<d&&(h=p,c=["require","exports","module"].slice(0,d).concat(g.M(e)));return{id:b,m:c||[],q:0<=d?e:function(){return e},l:h}},L:function(a){var b;b=a.q.apply(a.l?a.a:i,a.m);b===i&&a.a&&(b=a.n?a.a=a.n.a:a.a);return b},u:function(a,b){a.q=b.q;a.l=b.l;a.v=b.m;g.i(a)},i:function(a){function b(a,b,c){h[b]=a;c&&o(a,b)}function c(b,c){var e,d,f,h;e=x(1,function(a){d(a);k(a,c)});d=x(1,function(a){o(a,c)});f=g.N(b,a);(h=f instanceof s&&f.a)&&d(h);q(f,e,a.d,a.a&&function(a){f.a&&(a==O?d(f.a):
-a==P&&e(f.a))})}function e(){a.h(h)}var d,f,h,l,j,o,k;h=[];f=a.v;l=f.length;0==f.length&&e();o=x(l,b,function(){a.z&&a.z(h)});k=x(l,b,e);for(d=0;d<l;d++)j=f[d],j in F?(k(F[j](a),d,p),a.a&&a.o(O)):j?c(j,d):k(i,d,p);return a},O:function(a){g.B(a);g.U(a,function(){var b=y;y=i;a.Z!==t&&(!b||b.w?a.d(Error(b&&b.w||"define() missing or duplicated: "+a.url)):g.u(a,b))},a.d);return a},N:function(a,b){var c,e,d,f,h,i,n,o,k;c=b.Y;e=b.T;d=H(a);i=d.H;f=c(d.j||i);n=g.k(f,j,!!d.j);if(d.j)h=f;else if(h=n.b.moduleLoader)i=
-f,f=h,n=g.k(h,j);d=l[f];f in l||(d=l[f]=g.t(n.b,f,e,n.e),d.url=g.s(n.url),g.O(d));f==h&&(o=new s,k=j.plugins[h]||j,q(d,function(a){var b,d,f;f=a.dynamic;i="normalize"in a?a.normalize(i,c,k)||"":c(i);d=h+"!"+i;b=l[d];if(!(d in l)){b=g.K(k,d,e,i);f||(l[d]=b);var j=function(a){b.h(a);f||(l[d]=a)};j.resolve=j;j.reject=b.d;a.load(i,b.p,j,k)}o!=b&&q(b,o.h,o.d,o.o)},o.d));return o||d},S:function(){var a;if(!w(n.opera,"Opera"))for(var b in B)if(R[B[b].readyState]==Q){a=b;break}return a}};F={require:g.R,exports:g.A,
-module:g.Q};z.version="0.6.3";"function"==typeof define&&(M=define);"function"==typeof j&&(L=j,j=t);j=g.b(j);l.curl=z;l["curl/_privileged"]={core:g,cache:l,cfg:j,_define:K,_curl:z,Promise:s}})(this);
+(function(m){function I(){}function w(a,b){return 0==T.call(a).indexOf("[object "+b)}function u(a){return a&&"/"==a.charAt(a.length-1)?a.substr(0,a.length-1):a}function F(a,b){var c,e,d;e=1;a=a.replace(U,function(a,b,c,g){c&&e++;d=p;return g||""});return d?(c=b.split("/"),c.splice(c.length-e,e),c.concat(a||[]).join("/")):a}function J(a){var b=a.indexOf("!");return{H:a.substr(b+1),j:0<=b&&a.substr(0,b)}}function G(){}function K(a){G.prototype=a;a=new G;G.prototype=L;return a}function s(){function a(a,b,
+c){e.push([a,b,c])}function b(a,b){for(var c,d=0;c=e[d++];)(c=c[a])&&c(b)}var c,e,d;c=this;e=[];d=function(c,h){a=c?function(a){a&&a(h)}:function(a,b){b&&b(h)};d=I;b(c?0:1,h);b=I;e=i};this.X=function(b,c,e){a(b,c,e)};this.h=function(a){c.ca=a;d(p,a)};this.d=function(a){c.ba=a;d(t,a)};this.o=function(a){b(2,a)}}function q(a,b,c,e){a instanceof s?a.X(b,c,e):b(a)}function x(a,b,c){var e;return function(){0<=--a&&b&&(e=b.apply(i,arguments));0==a&&c&&c(e);return e}}function z(){function a(b,e,d){var f;
+f=g.f(j,i,[].concat(b));this.then=b=function(a,b){q(f,function(b){a&&a.apply(i,b)},function(a){if(b)b(a);else throw a;});return this};this.next=function(b,c){return new a(b,c,f)};e&&b(e);q(d,function(){g.i(f)})}var b=[].slice.call(arguments);w(b[0],"Object")&&(j=g.b(b.shift()));return new a(b[0],b[1])}function M(a){var b=a.id;if(b==i)if(y!==i)y={w:"Multiple anonymous defines in url"};else if(!(b=g.S()))y=a;if(b!=i){var c=l[b];b in l||(c=g.k(b,j).b,c=l[b]=g.t(c,b));if(!(c instanceof s))throw Error("duplicate define: "+
+b);c.Z=t;g.u(c,a)}}var j=m.curl,A,B,C=m.document,N=C&&(C.head||C.getElementsByTagName("head")[0]),O={},P={},Q={},D={},L={},T=L.toString,i,R={loaded:1,interactive:Q,complete:1},l={},E=t,y,V=/\?/,S=/^\/|^[^:]+:\/\//,U=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,W=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,X=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,H,g;g={f:function(a,b,c,e){function d(a){return F(a,h.e)}function f(b,c){var f,k,n,r;f=c&&function(a){c.apply(i,a)};if(w(b,"String")){k=d(b);n=l[k];
+r=n instanceof s&&n.a;if(!(k in l))throw Error("Module not resolved: "+k);if(f)throw Error("require(id, callback) not allowed");return r||n}q(g.i(g.f(a,h.e,b,e)),f)}var h;h=new s;h.e=h.id=b||"";h.T=e;h.v=c;h.p=f;f.toUrl=function(b){return g.k(d(b),a).url};h.Y=d;return h},t:function(a,b,c,e){var d,f,h;d=g.f(a,b,i,c);d.e=e==i?b:e;f=d.h;h=x(1,function(a){d.m=a;try{return g.L(d)}catch(b){d.d(b)}});d.h=function(a){q(c||E,function(){f(l[d.id]=h(a))})};d.z=function(a){q(c||E,function(){d.a&&(h(a),d.o(P))})};
+return d},K:function(a,b,c,e){a=g.f(a,b,i,c);a.e=e;return a},R:function(a){return a.p},A:function(a){return a.a||(a.a={})},Q:function(a){var b=a.n;b||(b=a.n={id:a.id,uri:g.B(a),exports:g.A(a)},b.a=b.exports);return b},B:function(a){return a.url||(a.url=g.s(a.p.toUrl(a.id)))},b:function(a){var b,c,e;(b=a)||(a={});c=a.apiName;if((e=a.apiContext)||c?e[c]:A&&b)throw Error((c||"curl")+" already exists");(e||m)[c||"curl"]=z;A&&b&&(m.curl=A);c=a.defineName;if((e=a.defineContext)||c?e[c]:B&&b)throw Error((c||
+"define")+" already exists");(e||m)[c||"define"]=c=function(){var a=g.P(arguments);M(a)};B&&b&&(m.define=B);c.amd={plugins:p,jQuery:p,curl:"0.6.4"};b&&(g.b=g.D);return g.D(a)},D:function(a){function b(b,c){var d,f,k,n,r;for(r in b){k=b[r];k.name=k.id||k.name||r;n=a;f=J(u(k.name||r));d=f.H;if(f=f.j)n=e[f],n||(n=e[f]=K(a),n.g=K(a.g),n.c=[]),delete b[r];if(c){f=k;var v=void 0;f.path=u(f.path||f.location||"");v=u(f.main)||"main";"."!=v.charAt(0)&&(v="./"+v);f.C=F(v,f.name+"/");f.V=F(v,f.path+"/");f.b=
+f.config}else f={path:u(k)};f.I=d.split("/").length;d?(n.g[d]=f,n.c.push(d)):n.r=g.G(k,a)}}function c(a){var b=a.g;a.W=RegExp("^("+a.c.sort(function(a,c){return b[a].I<b[c].I}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete a.c}var e;a.r=a.baseUrl||"";a.F="pluginPath"in a?a.pluginPath:"curl/plugin";a.g={};e=a.plugins=a.plugins||{};a.c=[];b(a.paths,t);b(a.packages,p);for(var d in e){var f=e[d].c;f&&(e[d].c=f.concat(a.c),c(e[d]))}c(a);g.J(a);return a},J:function(a){var b;(b=a&&a.preloads)&&
+0<b.length&&q(E,function(){E=g.i(g.f(a,i,b,p))})},k:function(a,b,c){var e,d,f,h;e=b.g;c&&(b.F&&0>a.indexOf("/")&&!(a in e))&&(f=a=u(b.F)+"/"+a);c=S.test(a)?a:a.replace(b.W,function(b){d=e[b]||{};h=d.b;return d.C&&b==a?(f=d.C,d.V):d.path||""});return{e:f||a,b:h||j,url:g.G(c,b)}},G:function(a,b){var c=b.r;return c&&!S.test(a)?u(c)+"/"+a:a},s:function(a){return a+(V.test(a)?"":".js")},U:function(a,b,c){var e=C.createElement("script");e.onload=e.onreadystatechange=function(c){c=c||m.event;if("load"==
+c.type||R[e.readyState])delete D[a.id],e.onload=e.onreadystatechange=e.onerror="",b()};e.onerror=function(){c(Error("Syntax or http error: "+a.url))};e.type=a.$||"text/javascript";e.charset="utf-8";e.async=!a.aa;e.src=a.url;D[a.id]=e;N.insertBefore(e,N.firstChild);return e},M:function(a){var b=[],c;("string"==typeof a?a:a.toSource?a.toSource():a.toString()).replace(W,"").replace(X,function(a,d,f){f?c=c==f?i:c:c||b.push(d);return a});return b},P:function(a){var b,c,e,d,f,h;f=a.length;e=a[f-1];d=w(e,
+"Function")?e.length:-1;2==f?w(a[0],"Array")?c=a[0]:b=a[0]:3==f&&(b=a[0],c=a[1]);!c&&0<d&&(h=p,c=["require","exports","module"].slice(0,d).concat(g.M(e)));return{id:b,m:c||[],q:0<=d?e:function(){return e},l:h}},L:function(a){var b;b=a.q.apply(a.l?a.a:i,a.m);b===i&&a.a&&(b=a.n?a.a=a.n.a:a.a);return b},u:function(a,b){a.q=b.q;a.l=b.l;a.v=b.m;g.i(a)},i:function(a){function b(a,b,c){h[b]=a;c&&o(a,b)}function c(b,c){var e,d,f,h;e=x(1,function(a){d(a);k(a,c)});d=x(1,function(a){o(a,c)});f=g.N(b,a);(h=f instanceof
+s&&f.a)&&d(h);q(f,e,a.d,a.a&&function(a){f.a&&(a==O?d(f.a):a==P&&e(f.a))})}function e(){a.h(h)}var d,f,h,l,j,o,k;h=[];f=a.v;l=f.length;0==f.length&&e();o=x(l,b,function(){a.z&&a.z(h)});k=x(l,b,e);for(d=0;d<l;d++)j=f[d],j in H?(k(H[j](a),d,p),a.a&&a.o(O)):j?c(j,d):k(i,d,p);return a},O:function(a){g.B(a);g.U(a,function(){var b=y;y=i;a.Z!==t&&(!b||b.w?a.d(Error(b&&b.w||"define() missing or duplicated: "+a.url)):g.u(a,b))},a.d);return a},N:function(a,b){var c,e,d,f,h,i,m,o,k;c=b.Y;e=b.T;d=J(a);i=d.H;
+f=c(d.j||i);m=g.k(f,j,!!d.j);if(d.j)h=f;else if(h=m.b.moduleLoader)i=f,f=h,m=g.k(h,j);d=l[f];f in l||(d=l[f]=g.t(m.b,f,e,m.e),d.url=g.s(m.url),g.O(d));f==h&&(o=new s,k=j.plugins[h]||j,q(d,function(a){var b,d,f;f=a.dynamic;i="normalize"in a?a.normalize(i,c,k)||"":c(i);d=h+"!"+i;b=l[d];if(!(d in l)){b=g.K(k,d,e,i);f||(l[d]=b);var j=function(a){b.h(a);f||(l[d]=a)};j.resolve=j;j.reject=b.d;a.load(i,b.p,j,k)}o!=b&&q(b,o.h,o.d,o.o)},o.d));return o||d},S:function(){var a;if(!w(m.opera,"Opera"))for(var b in D)if(R[D[b].readyState]==
+Q){a=b;break}return a}};H={require:g.R,exports:g.A,module:g.Q};z.version="0.6.4";"function"==typeof define&&(B=define);"function"==typeof j&&(A=j,j=t);j=g.b(j);l.curl=z;l["curl/_privileged"]={core:g,cache:l,cfg:j,_define:M,_curl:z,Promise:s}})(this);
Please sign in to comment.
Something went wrong with that request. Please try again.