diff --git a/elm/elm-runtime-0.3.0.js b/elm/elm-runtime-0.3.0.js index 19d70aa..988546a 100644 --- a/elm/elm-runtime-0.3.0.js +++ b/elm/elm-runtime-0.3.0.js @@ -2,52 +2,53 @@ var Guid=function(){var f=0;return{guid:function(){return f+=1}}}(),Value=functi h="string"===typeof a[1]?"":",",c=("string"===typeof a[1]?'"':"[")+b(a[1]),a=a[2];;)if("Cons"===a[0])c+=h+b(a[1]),a=a[2];else return c+g;else{if("Nil"===a[0])return"[]";c="";for(g=a.length;--g;)c=" "+b(a[g])+c;c=a[0]+c;return 1=e)return["Nil"];if("Nil"===a[0])return a;"Cons"!==a[0]&&i("take");var d=["Cons",a[1],["Nil"]],b=d,a=a[2];for(--e;"Cons"===a[0]&&0this.width/this.height?(j=this.width*d/a,g=(this.height-j)/2):(f=this.height*a/d,h=(this.width-f)/2);b.drawImage(i,h,g,f,j,0,0,c.width,c.height)}};i.src=Data.String.toText(b);return c}}},video:function(a){var a=Data.String.toText(a),d=f("video");d.controls="controls";var b=f("source");b.src=a;b.type="video/"+a.substring(a.length-3,a.length);d.appendChild(b);d.isElmLeaf=!0;return d},audio:function(a){var a=Data.String.toString(a),d=f("video"); -d.controls="controls";var b=f("source");b.src=a;b.type="audio/"+a.substring(a.length-3,a.length);d.appendChild(b);d.isElmLeaf=!0;return d},collage:function(a){return function(d){return function(b){var c=f("canvas");c.style.width=a+"px";c.style.height=d+"px";c.width=a;c.height=d;if(c.getContext){var i=c.getContext("2d");for(i.clearRect(0,0,c.width,c.height);"Cons"===b[0];)i=b[1](i),b=b[2];return c}c.innerHTML="Your browser does not support the canvas element.";c.isElmLeaf=!0;return c}}},flow:l,layers:l(2), -rectangle:function(a){return function(d){var b=f("div");b.isElmLeaf=!0;b.style.width=a+"px";b.style.height=d+"px";return b}},beside:function(a){return function(d){return l(4)(["Cons",a,["Cons",d,["Nil"]]])}},above:function(a){return function(d){return l(3)(["Cons",a,["Cons",d,["Nil"]]])}},below:function(a){return function(d){return l(0)(["Cons",a,["Cons",d,["Nil"]]])}},box:function(a){return function(d){d.style.position="absolute";d.style.margin="auto";var b=(a-1)%3,c=(a-1)/3;2>b&&(d.style.left=0); -0c&&(d.style.top=0);0=b&&(a.style.width=i.getPropertyValue("width"));a.style.height=i.getPropertyValue("height");document.body.removeChild(c)}}}(),Text=function(){var f=function(a){if("string"===typeof a)return a;for(var b=[];"Cons"===a[0];)b.push(a[1]),a=a[2];return Data.String.properEscape(b.join(""))},b=function(a){return function(b){return"<"+a+">"+b+""}},a=function(a, -b){return function(c){return""+c+""}},c=b("h1"),g=a("font-style","italic"),b=b("b"),h=a("text-decoration","underline"),k=a("text-decoration","overline"),n=a("text-decoration","line-through");return{fromString:f,toText:f,header:c,height:function(b){return a("font-size",b+"em")},italic:g,bold:b,underline:h,overline:k,strikeThrough:n,monospace:a("font-family","monospace"),color:function(b){return a("color",Color.Internal.extract(b))},link:function(a){return function(b){return""+b+""}}}}(),Shape=function(){var f=function(a,b,g,h){return{center:a,points:b,theta:g,scale:h}},b=function(a){return function(b){return function(g){return function(h){h.save();h.translate(g.center[0],g.center[1]);h.rotate(g.theta);h.scale(g.scale,g.scale);h.beginPath();var f=g.points;h.moveTo(f[0][0],f[0][1]);for(var n=f.length;n--;)h.lineTo(f[n][0],f[n][1]);h.closePath();a?(h.fillStyle=Color.Internal.extract(b),h.fill()):(h.strokeStyle=Color.Internal.extract(b),h.stroke());h.restore(); -return h}}}};return{polygon:function(a){return function(b){for(var g=[];"Cons"===a[0];)g.push([a[1][1],a[1][2]]),a=a[2];b=[b[1],b[2]];return f(b,g,0,1)}},ngon:function(a){return function(b){return function(g){for(var h=[],k=a;k--;)h.push([b*Math.cos(2*Math.PI*k/a),b*Math.sin(2*Math.PI*k/a)]);g=[g[1],g[2]];return f(g,h,0,1)}}},rect:function(a){return function(b){return function(g){var h=[[-a/2,-b/2],[a/2,-b/2],[a/2,b/2],[-a/2,b/2]],g=[g[1],g[2]];return f(g,h,0,1)}}},oval:function(a){return function(b){return function(g){for(var h= -[],k=2*Math.PI;0this.width/this.height?(k=this.width*d/a,f=(this.height-k)/2):(g=this.height*a/d,h=(this.width-g)/2);b.drawImage(i,h,f,g,k,0,0,c.width,c.height)}};i.src=Data.String.toText(b);return c}}},video:function(a){var a=Data.String.toText(a),d=f("video");d.controls="controls";var b=f("source");b.src=a;b.type="video/"+a.substring(a.length-3,a.length);d.appendChild(b);d.isElmLeaf= +!0;return d},audio:function(a){var a=Data.String.toString(a),d=f("video");d.controls="controls";var b=f("source");b.src=a;b.type="audio/"+a.substring(a.length-3,a.length);d.appendChild(b);d.isElmLeaf=!0;return d},collage:function(a){return function(d){return function(b){var c=f("canvas");c.style.width=a+"px";c.style.height=d+"px";c.width=a;c.height=d;if(c.getContext){var i=c.getContext("2d");for(i.clearRect(0,0,c.width,c.height);"Cons"===b[0];)i=b[1](i),b=b[2];return c}c.innerHTML="Your browser does not support the canvas element."; +c.isElmLeaf=!0;return c}}},flow:m,layers:m(2),rectangle:function(a){return function(d){var b=f("div");b.isElmLeaf=!0;b.style.width=a+"px";b.style.height=d+"px";return b}},beside:function(a){return function(d){return m(4)(["Cons",a,["Cons",d,["Nil"]]])}},above:function(a){return function(d){return m(3)(["Cons",a,["Cons",d,["Nil"]]])}},below:function(a){return function(d){return m(0)(["Cons",a,["Cons",d,["Nil"]]])}},box:function(a){return function(d){d.style.position="absolute";d.style.margin="auto"; +var b=(a-1)%3,c=(a-1)/3;2>b&&(d.style.left=0);0c&&(d.style.top=0);0=b&&(a.style.width=i.getPropertyValue("width"));a.style.height=i.getPropertyValue("height");document.body.removeChild(c)}}}(),Text=function(){var f=function(a){if("string"===typeof a)return a;for(var b=[];"Cons"===a[0];)b.push(a[1]),a=a[2];return Data.String.properEscape(b.join(""))},b=function(a){return function(b){return"<"+ +a+">"+b+""}},a=function(a,b){return function(c){return""+c+""}},c=b("h1"),g=a("font-style","italic"),b=b("b"),h=a("text-decoration","underline"),j=a("text-decoration","overline"),l=a("text-decoration","line-through");return{fromString:f,toText:f,header:c,height:function(b){return a("font-size",b+"em")},italic:g,bold:b,underline:h,overline:j,strikeThrough:l,monospace:a("font-family","monospace"),color:function(b){return a("color",Color.Internal.extract(b))}, +link:function(a){return function(b){return""+b+""}}}}(),Shape=function(){var f=function(a,b,f,h){return{center:a,points:b,theta:f,scale:h}},b=function(a){return function(b){return function(f){return function(h){h.save();h.translate(f.center[0],f.center[1]);h.rotate(f.theta);h.scale(f.scale,f.scale);h.beginPath();var j=f.points;h.moveTo(j[0][0],j[0][1]);for(var l=j.length;l--;)h.lineTo(j[l][0],j[l][1]);h.closePath();a?(h.fillStyle=Color.Internal.extract(b),h.fill()):(h.strokeStyle= +Color.Internal.extract(b),h.stroke());h.restore();return h}}}};return{polygon:function(a){return function(b){for(var g=[];"Cons"===a[0];)g.push([a[1][1],a[1][2]]),a=a[2];b=[b[1],b[2]];return f(b,g,0,1)}},ngon:function(a){return function(b){return function(g){for(var h=[],j=a;j--;)h.push([b*Math.cos(2*Math.PI*j/a),b*Math.sin(2*Math.PI*j/a)]);g=[g[1],g[2]];return f(g,h,0,1)}}},rect:function(a){return function(b){return function(g){var h=[[-a/2,-b/2],[a/2,-b/2],[a/2,b/2],[-a/2,b/2]],g=[g[1],g[2]];return f(g, +h,0,1)}}},oval:function(a){return function(b){return function(g){for(var h=[],j=2*Math.PI;0