From 20f9b9ed36e265af588781a9c39eb7301e63b75d Mon Sep 17 00:00:00 2001 From: kangax Date: Mon, 10 Sep 2012 19:47:12 -0400 Subject: [PATCH] Build distribution. Version 0.9.8. --- HEADER.js | 2 +- dist/all.js | 23 +++++++++-------------- dist/all.min.js | 4 ++-- dist/all.min.js.gz | Bin 42437 -> 42431 bytes package.json | 2 +- 5 files changed, 13 insertions(+), 18 deletions(-) diff --git a/HEADER.js b/HEADER.js index 86558d13..844453a3 100644 --- a/HEADER.js +++ b/HEADER.js @@ -1,6 +1,6 @@ /*! Fabric.js Copyright 2008-2012, Printio (Juriy Zaytsev, Maxim Chernyak) */ -var fabric = fabric || { version: "0.9.7" }; +var fabric = fabric || { version: "0.9.8" }; if (typeof exports != 'undefined') { exports.fabric = fabric; diff --git a/dist/all.js b/dist/all.js index 0c555fcd..04e825f4 100644 --- a/dist/all.js +++ b/dist/all.js @@ -1,7 +1,7 @@ /* build: `node build.js modules=ALL` */ /*! Fabric.js Copyright 2008-2012, Printio (Juriy Zaytsev, Maxim Chernyak) */ -var fabric = fabric || { version: "0.9.7" }; +var fabric = fabric || { version: "0.9.8" }; if (typeof exports != 'undefined') { exports.fabric = fabric; @@ -11196,24 +11196,21 @@ fabric.util.object.extend(fabric.StaticCanvas.prototype, { /** * Sets certain property to a certain value - * @method set + * @method _set * @param {String} prop * @param {Any} value * @return {fabric.PathGroup} thisArg */ - set: function(prop, value) { - if ((prop === 'fill' || prop === 'overlayFill') && this.isSameColor()) { - this[prop] = value; + _set: function(prop, value) { + + if ((prop === 'fill' || prop === 'overlayFill') && value && this.isSameColor()) { var i = this.paths.length; while (i--) { - this.paths[i].set(prop, value); + this.paths[i]._set(prop, value); } } - else { - // skipping parent "class" - fabric.Path - parentSet.call(this, prop, value); - } - return this; + + return this.callSuper('_set', prop, value); }, /** @@ -13637,9 +13634,7 @@ fabric.Image.filters.Tint.fromObject = function(object) { if (name === 'fontFamily' && this.path) { this.path = this.path.replace(/(.*?)([^\/]*)(\.font\.js)/, '$1' + value + '$3'); } - else { - this.callSuper('_set', name, value); - } + this.callSuper('_set', name, value); } }); diff --git a/dist/all.min.js b/dist/all.min.js index 4f5aeb3e..60d0327f 100644 --- a/dist/all.min.js +++ b/dist/all.min.js @@ -1,7 +1,7 @@ /* Fabric.js Copyright 2008-2012, Printio (Juriy Zaytsev, Maxim Chernyak) */ -var fabric=fabric||{version:"0.9.7"};if(typeof exports!="undefined"){exports.fabric=fabric}if(typeof document!="undefined"&&typeof window!="undefined"){fabric.document=document;fabric.window=window}else{fabric.document=require("jsdom").jsdom("");fabric.window=fabric.document.createWindow()}fabric.isTouchSupported="ontouchstart" in fabric.document.documentElement;fabric.isLikelyNode=typeof Buffer!=="undefined"&&typeof window==="undefined"; +var fabric=fabric||{version:"0.9.8"};if(typeof exports!="undefined"){exports.fabric=fabric}if(typeof document!="undefined"&&typeof window!="undefined"){fabric.document=document;fabric.window=window}else{fabric.document=require("jsdom").jsdom("");fabric.window=fabric.document.createWindow()}fabric.isTouchSupported="ontouchstart" in fabric.document.documentElement;fabric.isLikelyNode=typeof Buffer!=="undefined"&&typeof window==="undefined"; /* * Copyright (c) 2009 Simo Kinnunen. * Licensed under the MIT license. */ -var Cufon=(function(){var k=function(){return k.replace.apply(null,arguments)};var u=k.DOM={ready:(function(){var z=false,B={loaded:1,complete:1};var y=[],A=function(){if(z){return}z=true;for(var C;C=y.shift();C()){}};if(fabric.document.addEventListener){fabric.document.addEventListener("DOMContentLoaded",A,false);fabric.window.addEventListener("pageshow",A,false)}if(!fabric.window.opera&&fabric.document.readyState){(function(){B[fabric.document.readyState]?A():setTimeout(arguments.callee,10)})()}if(fabric.document.readyState&&fabric.document.createStyleSheet){(function(){try{fabric.document.body.doScroll("left");A()}catch(C){setTimeout(arguments.callee,1)}})()}o(fabric.window,"load",A);return function(C){if(!arguments.length){A()}else{z?C():y.push(C)}}})()};var l=k.CSS={Size:function(z,y){this.value=parseFloat(z);this.unit=String(z).match(/[a-z%]*$/)[0]||"px";this.convert=function(A){return A/y*this.value};this.convertFrom=function(A){return A/this.value*y};this.toString=function(){return this.value+this.unit}},getStyle:function(y){return new a(y.style)},quotedList:i(function(B){var A=[],z=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,y;while(y=z.exec(B)){A.push(y[3]||y[1])}return A}),ready:(function(){var A=false;var z=[],B=function(){A=true;for(var D;D=z.shift();D()){}};var y=Object.prototype.propertyIsEnumerable?f("style"):{length:0};var C=f("link");u.ready(function(){var G=0,F;for(var E=0,D=C.length;F=C[E],E=y.length+G){B()}else{setTimeout(arguments.callee,10)}});return function(D){if(A){D()}else{z.push(D)}}})(),supports:function(A,z){var y=fabric.document.createElement("span").style;if(y[A]===undefined){return false}y[A]=z;return y[A]===z},textAlign:function(B,A,y,z){if(A.get("textAlign")=="right"){if(y>0){B=" "+B}}else{if(y400}if(F==500){F=400}for(var G in D){G=parseInt(G,10);if(!C||GA){A=G}H.push(G)}if(FA){F=A}H.sort(function(J,I){return(B?(J>F&&I>F)?JI:(JI:Jz){z=e}L.push(e);e=0;continue}var B=ab.glyphs[ag[aa]]||ab.missingGlyph;if(!B){continue}e+=D=Number(B.w||ab.w)+U}L.push(e);e=Math.max(z,e);var m=[];for(var aa=L.length;aa--;){m[aa]=e-L[aa]}if(D===null){return null}V+=(H.width-D);C+=H.minX;var v,p;if(n){v=J;p=J.firstChild}else{v=fabric.document.createElement("span");v.className="cufon cufon-canvas";v.alt=E;p=fabric.document.createElement("canvas");v.appendChild(p);if(A.printable){var Y=fabric.document.createElement("span");Y.className="cufon-alt";Y.appendChild(fabric.document.createTextNode(E));v.appendChild(Y)}}var ah=v.style;var O=p.style||{};var k=o.convert(H.height-I+T);var af=Math.ceil(k);var S=af/k;p.width=Math.ceil(o.convert(e+V-C)*S);p.height=af;I+=H.minY;O.top=Math.round(o.convert(I-ab.ascent))+"px";O.left=Math.round(o.convert(C))+"px";var j=Math.ceil(o.convert(e*S));var t=j+"px";var s=o.convert(ab.height);var F=(A.lineHeight-1)*o.convert(-ab.ascent/5)*(M-1);Cufon.textOptions.width=j;Cufon.textOptions.height=(s*M)+F;Cufon.textOptions.lines=M;Cufon.textOptions.totalLineHeight=F;if(a){ah.width=t;ah.height=s+"px"}else{ah.paddingLeft=t;ah.paddingBottom=(s-1)+"px"}var ad=Cufon.textOptions.context||p.getContext("2d"),K=af/H.height;Cufon.textOptions.fontAscent=ab.ascent*K;Cufon.textOptions.boundaries=null;for(var w=Cufon.textOptions.shadowOffsets,aa=R.length;aa--;){w[aa]=[R[aa][0]*K,R[aa][1]*K]}ad.save();ad.scale(K,K);ad.translate(-C-((1/K*p.width)/2)+(Cufon.fonts[ab.family].offsetLeft||0),-I-((Cufon.textOptions.height/K)/2)+(Cufon.fonts[ab.family].offsetTop||0));ad.lineWidth=ab.face["underline-thickness"];ad.save();function q(l,i){ad.strokeStyle=i;ad.beginPath();ad.moveTo(0,l);ad.lineTo(e,l);ad.stroke()}var r=Cufon.getTextDecoration(A),u=A.fontStyle==="italic";function ae(){ad.save();ad.fillStyle=A.backgroundColor;var aj=0,an=0,y=[{left:0}];if(A.textAlign==="right"){ad.translate(m[an],0);y[0].left=m[an]*K}else{if(A.textAlign==="center"){ad.translate(m[an]/2,0);y[0].left=m[an]/2*K}}for(var al=0,ak=ag.length;al.cufon-vml-canvas{text-indent:0}@media screen{cvml\\:shape,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute}.cufon-vml-canvas{position:absolute;text-align:left}.cufon-vml{display:inline-block;position:relative;vertical-align:middle}.cufon-vml .cufon-alt{position:absolute;left:-10000in;font-size:1px}a .cufon-vml{cursor:pointer}}@media print{.cufon-vml *{display:none}.cufon-vml .cufon-alt{display:inline}}');function c(e,f){return a(e,/(?:em|ex|%)$/i.test(f)?"1em":f)}function a(h,i){if(/px$/i.test(i)){return parseFloat(i)}var g=h.style.left,f=h.runtimeStyle.left;h.runtimeStyle.left=h.currentStyle.left;h.style.left=i;var e=h.style.pixelLeft;h.style.left=g;h.runtimeStyle.left=f;return e}return function(T,z,O,w,D,U,M){var h=(z===null);if(h){z=D.alt}var B=T.viewBox;var j=O.computedFontSize||(O.computedFontSize=new Cufon.CSS.Size(c(U,O.get("fontSize"))+"px",T.baseSize));var L=O.computedLSpacing;if(L==undefined){L=O.get("letterSpacing");O.computedLSpacing=L=(L=="normal")?0:~~j.convertFrom(a(U,L))}var t,m;if(h){t=D;m=D.firstChild}else{t=fabric.document.createElement("span");t.className="cufon cufon-vml";t.alt=z;m=fabric.document.createElement("span");m.className="cufon-vml-canvas";t.appendChild(m);if(w.printable){var R=fabric.document.createElement("span");R.className="cufon-alt";R.appendChild(fabric.document.createTextNode(z));t.appendChild(R)}if(!M){t.appendChild(fabric.document.createElement("cvml:shape"))}}var Z=t.style;var G=m.style;var f=j.convert(B.height),W=Math.ceil(f);var K=W/f;var J=B.minX,I=B.minY;G.height=W;G.top=Math.round(j.convert(I-T.ascent));G.left=Math.round(j.convert(J));Z.height=j.convert(T.height)+"px";var p=Cufon.getTextDecoration(w);var y=O.get("color");var X=Cufon.CSS.textTransform(z,O).split("");var e=0,H=0,q=null;var x,r,A=w.textShadow;for(var S=0,Q=0,P=X.length;Sw?p:(o-n);s(t(currentTime,m,byValue,p));if(o>w||q()){x.onComplete&&x.onComplete();return}k(r)})()}var f=fabric.window.requestAnimationFrame||fabric.window.webkitRequestAnimationFrame||fabric.window.mozRequestAnimationFrame||fabric.window.oRequestAnimationFrame||fabric.window.msRequestAnimationFrame||function(n,m){fabric.window.setTimeout(n,1000/60)};var k=function(){return f.apply(fabric.window,arguments)};function b(n,p,o){if(n){var m=new Image();m.onload=function(){p&&p.call(o,m);m=m.onload=null};m.src=n}else{p&&p.call(o,n)}}function i(p,s){function o(t){return fabric[fabric.util.string.camelize(fabric.util.string.capitalize(t))]}function n(){if(++r===m){if(s){s(q)}}}var q=[],r=0,m=p.length;p.forEach(function(v,u){if(!v.type){return}var t=o(v.type);if(t.async){t.fromObject(v,function(w){q[u]=w;n()})}else{q[u]=t.fromObject(v);n()}})}function a(o,n,p){var m=o.length>1?new fabric.PathGroup(o,n):o[0];if(typeof p!=="undefined"){m.setSourcePath(p)}return m}fabric.util.removeFromArray=j;fabric.util.degreesToRadians=c;fabric.util.toFixed=e;fabric.util.getRandomInt=g;fabric.util.falseFunction=l;fabric.util.animate=d;fabric.util.requestAnimFrame=k;fabric.util.loadImage=b;fabric.util.enlivenObjects=i;fabric.util.groupSVGElements=a})();(function(){var d=Array.prototype.slice;if(!Array.prototype.indexOf){Array.prototype.indexOf=function(g){if(this===void 0||this===null){throw new TypeError()}var h=Object(this),e=h.length>>>0;if(e===0){return -1}var i=0;if(arguments.length>0){i=Number(arguments[1]);if(i!==i){i=0}else{if(i!==0&&i!==(1/0)&&i!==-(1/0)){i=(i>0||-1)*Math.floor(Math.abs(i))}}}if(i>=e){return -1}var f=i>=0?i:Math.max(e-Math.abs(i),0);for(;f>>0;f>>0;g>>0;f>>0;f>>0;g>>0,f=0,h;if(arguments.length>1){h=arguments[1]}else{do{if(f in this){h=this[f++];break}if(++f>=e){throw new TypeError()}}while(true)}for(;f=e){e=h[f][g]}}}else{while(f--){if(h[f]>=e){e=h[f]}}}return e}function c(h,g){if(!h||h.length===0){return undefined}var f=h.length-1,e=g?h[f][g]:h[f];if(g){while(f--){if(h[f][g]/g,">")}fabric.util.string={camelize:b,capitalize:c,escapeXml:a}}());(function(){var c=Array.prototype.slice,a=Function.prototype.apply,b=function(){};if(!Function.prototype.bind){Function.prototype.bind=function(d){var g=this,e=c.call(arguments,1),f;if(e.length){f=function(){return a.call(g,this instanceof b?this:d,e.concat(c.call(arguments)))}}else{f=function(){return a.call(g,this instanceof b?this:d,arguments)}}b.prototype=this.prototype;f.prototype=new b;return f}}})();(function(){var f=Array.prototype.slice,e=function(){};var c=(function(){for(var g in {toString:1}){if(g==="toString"){return false}}return true})();var b=function(g,j,h){for(var i in j){if(i in g.prototype&&typeof g.prototype[i]=="function"){g.prototype[i]=(function(k){return function(){var m=this.constructor.superclass;this.constructor.superclass=h;var l=j[k].apply(this,arguments);this.constructor.superclass=m;if(k!=="initialize"){return l}}})(i)}else{g.prototype[i]=j[i]}if(c){if(j.toString!==Object.prototype.toString){g.prototype.toString=j.toString}if(j.valueOf!==Object.prototype.valueOf){g.prototype.valueOf=j.valueOf}}}};function a(){}function d(){var k=null,j=f.call(arguments,0);if(typeof j[0]==="function"){k=j.shift()}function g(){this.initialize.apply(this,arguments)}g.superclass=k;g.subclasses=[];if(k){a.prototype=k.prototype;g.prototype=new a;k.subclasses.push(g)}for(var h=0,l=j.length;h-1?c(j,l.match(/opacity:\s*(\d?\.?\d*)/)[1]):j}for(var m in l){if(m==="opacity"){c(j,l[m])}else{var k=(m==="float"||m==="cssFloat")?(typeof n.styleFloat==="undefined"?"cssFloat":"styleFloat"):m;n[k]=l[m]}}return j}var h=fabric.document.createElement("div"),g=typeof h.style.opacity==="string",b=typeof h.style.filter==="string",a=fabric.document.defaultView,f=a&&typeof a.getComputedStyle!=="undefined",d=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,c=function(i){return i};if(g){c=function(i,j){i.style.opacity=j;return i}}else{if(b){c=function(i,j){var k=i.style;if(i.currentStyle&&!i.currentStyle.hasLayout){k.zoom=1}if(d.test(k.filter)){j=j>=0.9999?"":("alpha(opacity="+(j*100)+")");k.filter=k.filter.replace(d,j)}else{k.filter+=" alpha(opacity="+(j*100)+")"}return i}}}fabric.util.setStyle=e})();(function(){var h=Array.prototype.slice;function g(j){return typeof j==="string"?fabric.document.getElementById(j):j}function b(j){return h.call(j,0)}try{var i=b(fabric.document.childNodes) instanceof Array}catch(a){}if(!i){b=function(k){var j=new Array(k.length),l=k.length;while(l--){j[l]=k[l]}return j}}function c(k,j){var l=fabric.document.createElement(k);for(var m in j){if(m==="class"){l.className=j[m]}else{if(m==="for"){l.htmlFor=j[m]}else{l.setAttribute(m,j[m])}}}return l}function f(j,k){if((" "+j.className+" ").indexOf(" "+k+" ")===-1){j.className+=(j.className?" ":"")+k}}function e(k,l,j){if(typeof l==="string"){l=c(l,j)}if(k.parentNode){k.parentNode.replaceChild(l,k)}l.appendChild(k);return l}function d(k){var j=0,l=0;do{j+=k.offsetTop||0;l+=k.offsetLeft||0;k=k.offsetParent}while(k);return({left:l,top:j})}(function(){var k=fabric.document.documentElement.style;var l="userSelect" in k?"userSelect":"MozUserSelect" in k?"MozUserSelect":"WebkitUserSelect" in k?"WebkitUserSelect":"KhtmlUserSelect" in k?"KhtmlUserSelect":"";function m(n){if(typeof n.onselectstart!=="undefined"){n.onselectstart=fabric.util.falseFunction}if(l){n.style[l]="none"}else{if(typeof n.unselectable=="string"){n.unselectable="on"}}return n}function j(n){if(typeof n.onselectstart!=="undefined"){n.onselectstart=null}if(l){n.style[l]=""}else{if(typeof n.unselectable=="string"){n.unselectable=""}}return n}fabric.util.makeElementUnselectable=m;fabric.util.makeElementSelectable=j})();(function(){function j(k,o){var m=fabric.document.getElementsByTagName("head")[0],l=fabric.document.createElement("script"),n=true;l.type="text/javascript";l.setAttribute("runat","server");l.onload=l.onreadystatechange=function(p){if(n){if(typeof this.readyState=="string"&&this.readyState!=="loaded"&&this.readyState!=="complete"){return}n=false;o(p||fabric.window.event);l=l.onload=l.onreadystatechange=null}};l.src=k;m.appendChild(l)}fabric.util.getScript=j})();fabric.util.getById=g;fabric.util.toArray=b;fabric.util.makeElement=c;fabric.util.addClass=f;fabric.util.wrapElement=e;fabric.util.getElementOffset=d})();(function(){function d(e,f){return e+(/\?/.test(e)?"&":"?")+f}var c=(function(){var h=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP.3.0")},function(){return new XMLHttpRequest()}];for(var e=h.length;e--;){try{var g=h[e]();if(g){return h[e]}}catch(f){}}})();function a(){}function b(g,f){f||(f={});var j=f.method?f.method.toUpperCase():"GET",i=f.onComplete||function(){},h=c(),e;h.onreadystatechange=function(){if(h.readyState===4){i(h);h.onreadystatechange=a}};if(j==="GET"){e=null;if(typeof f.parameters=="string"){g=d(g,f.parameters)}}h.open(j,g,true);if(j==="POST"||j==="PUT"){h.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}h.send(e);return h}fabric.util.request=b})();(function(){function d(F,E,H,G){return H*(F/=G)*F+E}function l(F,E,H,G){return -H*(F/=G)*(F-2)+E}function r(F,E,H,G){if((F/=G/2)<1){return H/2*F*F+E}return -H/2*((--F)*(F-2)-1)+E}function B(F,E,H,G){return H*(F/=G)*F*F+E}function q(F,E,H,G){return H*((F=F/G-1)*F*F+1)+E}function u(F,E,H,G){if((F/=G/2)<1){return H/2*F*F*F+E}return H/2*((F-=2)*F*F+2)+E}function t(F,E,H,G){return H*(F/=G)*F*F*F+E}function g(F,E,H,G){return -H*((F=F/G-1)*F*F*F-1)+E}function k(F,E,H,G){if((F/=G/2)<1){return H/2*F*F*F*F+E}return -H/2*((F-=2)*F*F*F-2)+E}function y(F,E,H,G){return H*(F/=G)*F*F*F*F+E}function j(F,E,H,G){return H*((F=F/G-1)*F*F*F*F+1)+E}function n(F,E,H,G){if((F/=G/2)<1){return H/2*F*F*F*F*F+E}return H/2*((F-=2)*F*F*F*F+2)+E}function f(F,E,H,G){return -H*Math.cos(F/G*(Math.PI/2))+H+E}function o(F,E,H,G){return H*Math.sin(F/G*(Math.PI/2))+E}function v(F,E,H,G){return -H/2*(Math.cos(Math.PI*F/G)-1)+E}function D(F,E,H,G){return(F==0)?E:H*Math.pow(2,10*(F/G-1))+E}function c(F,E,H,G){return(F==G)?E+H:H*(-Math.pow(2,-10*F/G)+1)+E}function i(F,E,H,G){if(F==0){return E}if(F==G){return E+H}if((F/=G/2)<1){return H/2*Math.pow(2,10*(F-1))+E}return H/2*(-Math.pow(2,-10*--F)+2)+E}function h(F,E,H,G){return -H*(Math.sqrt(1-(F/=G)*F)-1)+E}function p(F,E,H,G){return H*Math.sqrt(1-(F=F/G-1)*F)+E}function x(F,E,H,G){if((F/=G/2)<1){return -H/2*(Math.sqrt(1-F*F)-1)+E}return H/2*(Math.sqrt(1-(F-=2)*F)+1)+E}function s(G,E,K,J){var H=1.70158;var I=0;var F=K;if(G==0){return E}if((G/=J)==1){return E+K}if(!I){I=J*0.3}if(F-1;w=w.split(/\s+/);var u=[];if(y){for(var v=0,t=w.length;v/i,""))}if(!x.documentElement){return}h.parseSVGDocument(x.documentElement,function(A,z){k.set(u,{objects:h.util.array.invoke(A,"toObject"),options:z});w(A,z)},t)}}function b(v){var u=v.objects,t=v.options;u=u.map(function(w){return h[f(w.type)].fromObject(w)});return({objects:u,options:t})}function n(u,x,t){u=u.trim();var v;if(typeof DOMParser!=="undefined"){var w=new DOMParser();if(w&&w.parseFromString){v=w.parseFromString(u,"text/xml")}}else{if(h.window.ActiveXObject){var v=new ActiveXObject("Microsoft.XMLDOM");v.async="false";v.loadXML(u.replace(//i,""))}}h.parseSVGDocument(v.documentElement,function(z,y){x(z,y)},t)}function m(w){var u="";for(var v=0,t=w.length;v",'",""].join("")}return u}p(h,{parseAttributes:e,parseElements:g,parseStyleAttribute:i,parsePointsAttribute:s,getCSSRules:d,loadSVGFromURL:c,loadSVGFromString:n,createSVGFontFacesMarkup:m})})(typeof exports!="undefined"?exports:this);(function(){function c(h){var g=h.getAttribute("style");if(g){var k=g.split(/\s*;\s*/);if(k[k.length-1]===""){k.pop()}for(var f=k.length;f--;){var e=k[f].split(/\s*:\s*/),d=e[0].trim(),j=e[1].trim();if(d==="stop-color"){return j}}}}fabric.Gradient=fabric.util.createClass({initialize:function(d){d||(d={});this.x1=d.x1||0;this.y1=d.y1||0;this.x2=d.x2||0;this.y2=d.y2||0;this.colorStops=d.colorStops},toObject:function(){return{x1:this.x1,x2:this.x2,y1:this.y1,y2:this.y2,colorStops:this.colorStops}},toLiveGradient:function(e){var g=e.createLinearGradient(this.x1,this.y1,this.x2||e.canvas.width,this.y2);for(var d in this.colorStops){var f=this.colorStops[d];g.addColorStop(parseFloat(d),f)}return g}});fabric.util.object.extend(fabric.Gradient,{fromElement:function(h,e){var l=h.getElementsByTagName("stop"),h,k,f={},d,j={x1:h.getAttribute("x1")||0,y1:h.getAttribute("y1")||0,x2:h.getAttribute("x2")||"100%",y2:h.getAttribute("y2")||0};for(var g=l.length;g--;){h=l[g];k=h.getAttribute("offset");k=parseFloat(k)/(/%$/.test(k)?100:1);f[k]=c(h)||h.getAttribute("stop-color")}a(e,j);return new fabric.Gradient({x1:j.x1,y1:j.y1,x2:j.x2,y2:j.y2,colorStops:f})},forObject:function(e,d){d||(d={});a(e,d);return new fabric.Gradient(d)}});function a(f,e){for(var g in e){if(typeof e[g]==="string"&&/^\d+%$/.test(e[g])){var d=parseFloat(e[g],10);if(g==="x1"||g==="x2"){e[g]=f.width*d/100}else{if(g==="y1"||g==="y2"){e[g]=f.height*d/100}}}if(g==="x1"||g==="x2"){e[g]-=f.width/2}else{if(g==="y1"||g==="y2"){e[g]-=f.height/2}}}}function b(j){var f=j.getElementsByTagName("linearGradient"),d=j.getElementsByTagName("radialGradient"),g,h={};for(var e=f.length;e--;){g=f[e];h[g.getAttribute("id")]=g}for(var e=d.length;e--;){g=d[e];h[g.getAttribute("id")]=g}return h}fabric.getGradientDefs=b})();(function(b){var c=b.fabric||(b.fabric={});if(c.Point){c.warn("fabric.Point is already defined");return}c.Point=a;function a(d,e){if(arguments.length>0){this.init(d,e)}}a.prototype={constructor:a,init:function(d,e){this.x=d;this.y=e},add:function(d){return new a(this.x+d.x,this.y+d.y)},addEquals:function(d){this.x+=d.x;this.y+=d.y;return this},scalarAdd:function(d){return new a(this.x+d,this.y+d)},scalarAddEquals:function(d){this.x+=d;this.y+=d;return this},subtract:function(d){return new a(this.x-d.x,this.y-d.y)},subtractEquals:function(d){this.x-=d.x;this.y-=d.y;return this},scalarSubtract:function(d){return new a(this.x-d,this.y-d)},scalarSubtractEquals:function(d){this.x-=d;this.y-=d;return this},multiply:function(d){return new a(this.x*d,this.y*d)},multiplyEquals:function(d){this.x*=d;this.y*=d;return this},divide:function(d){return new a(this.x/d,this.y/d)},divideEquals:function(d){this.x/=d;this.y/=d;return this},eq:function(d){return(this.x==d.x&&this.y==d.y)},lt:function(d){return(this.xd.x&&this.y>d.y)},gte:function(d){return(this.x>=d.x&&this.y>=d.y)},lerp:function(e,d){return new a(this.x+(e.x-this.x)*d,this.y+(e.y-this.y)*d)},distanceFrom:function(f){var e=this.x-f.x,d=this.y-f.y;return Math.sqrt(e*e+d*d)},min:function(d){return new a(Math.min(this.x,d.x),Math.min(this.y,d.y))},max:function(d){return new a(Math.max(this.x,d.x),Math.max(this.y,d.y))},toString:function(){return this.x+","+this.y},setXY:function(d,e){this.x=d;this.y=e},setFromPoint:function(d){this.x=d.x;this.y=d.y},swap:function(e){var d=this.x,f=this.y;this.x=e.x;this.y=e.y;e.x=d;e.y=f}}})(typeof exports!="undefined"?exports:this);(function(a){var b=a.fabric||(a.fabric={});if(b.Intersection){b.warn("fabric.Intersection is already defined");return}function c(d){if(arguments.length>0){this.init(d)}}b.Intersection=c;b.Intersection.prototype={init:function(d){this.status=d;this.points=[]},appendPoint:function(d){this.points.push(d)},appendPoints:function(d){this.points=this.points.concat(d)}};b.Intersection.intersectLineLine=function(h,f,l,k){var m,i=(k.x-l.x)*(h.y-l.y)-(k.y-l.y)*(h.x-l.x),j=(f.x-h.x)*(h.y-l.y)-(f.y-h.y)*(h.x-l.x),g=(k.y-l.y)*(f.x-h.x)-(k.x-l.x)*(f.y-h.y);if(g!=0){var e=i/g,d=j/g;if(0<=e&&e<=1&&0<=d&&d<=1){m=new c("Intersection");m.points.push(new b.Point(h.x+e*(f.x-h.x),h.y+e*(f.y-h.y)))}else{m=new c("No Intersection")}}else{if(i==0||j==0){m=new c("Coincident")}else{m=new c("Parallel")}}return m};b.Intersection.intersectLinePolygon=function(e,d,l){var m=new c("No Intersection"),f=l.length;for(var h=0;h0){m.status="Intersection"}return m};b.Intersection.intersectPolygonPolygon=function(j,h){var f=new c("No Intersection"),l=j.length;for(var k=0;k0){f.status="Intersection"}return f};b.Intersection.intersectPolygonRectangle=function(n,e,d){var g=e.min(d),m=e.max(d),f=new b.Point(m.x,g.y),l=new b.Point(g.x,m.y),k=c.intersectLinePolygon(g,f,n),j=c.intersectLinePolygon(f,m,n),i=c.intersectLinePolygon(m,l,n),h=c.intersectLinePolygon(l,g,n),o=new c("No Intersection");o.appendPoints(k.points);o.appendPoints(j.points);o.appendPoints(i.points);o.appendPoints(h.points);if(o.points.length>0){o.status="Intersection"}return o}})(typeof exports!="undefined"?exports:this);(function(a){var b=a.fabric||(a.fabric={});if(b.Color){b.warn("fabric.Color is already defined.");return}function c(d){if(!d){this.setSource([0,0,0,1])}else{this._tryParsingColor(d)}}b.Color=c;b.Color.prototype={_tryParsingColor:function(d){var e=c.sourceFromHex(d);if(!e){e=c.sourceFromRgb(d)}if(e){this.setSource(e)}},getSource:function(){return this._source},setSource:function(d){this._source=d},toRgb:function(){var d=this.getSource();return"rgb("+d[0]+","+d[1]+","+d[2]+")"},toRgba:function(){var d=this.getSource();return"rgba("+d[0]+","+d[1]+","+d[2]+","+d[3]+")"},toHex:function(){var h=this.getSource();var f=h[0].toString(16);f=(f.length==1)?("0"+f):f;var e=h[1].toString(16);e=(e.length==1)?("0"+e):e;var d=h[2].toString(16);d=(d.length==1)?("0"+d):d;return f.toUpperCase()+e.toUpperCase()+d.toUpperCase()},getAlpha:function(){return this.getSource()[3]},setAlpha:function(e){var d=this.getSource();d[3]=e;this.setSource(d);return this},toGrayscale:function(){var f=this.getSource(),e=parseInt((f[0]*0.3+f[1]*0.59+f[2]*0.11).toFixed(0),10),d=f[3];this.setSource([e,e,e,d]);return this},toBlackWhite:function(d){var g=this.getSource(),f=(g[0]*0.3+g[1]*0.59+g[2]*0.11).toFixed(0),e=g[3],d=d||127;f=(Number(f)','',"',"Created with Fabric.js ",fabric.version,"",fabric.createSVGFontFacesMarkup(this.getObjects())];if(this.backgroundImage){h.push('')}for(var j=0,k=this.getObjects(),g=k.length;j");return h.join("")},isEmpty:function(){return this._objects.length===0},remove:function(g){e(this._objects,g);if(this.getActiveObject()===g){this.fire("before:selection:cleared",{target:g});this.discardActiveObject();this.fire("selection:cleared")}this.renderAll();return g},sendToBack:function(g){e(this._objects,g);this._objects.unshift(g);return this.renderAll()},bringToFront:function(g){e(this._objects,g);this._objects.push(g);return this.renderAll()},sendBackwards:function(j){var h=this._objects.indexOf(j),g=h;if(h!==0){for(var k=h-1;k>=0;--k){if(j.intersectsWithObject(this._objects[k])||j.isContainedWithinObject(this._objects[k])){g=k;break}}e(this._objects,j);this._objects.splice(g,0,j)}return this.renderAll()},bringForward:function(k){var n=this.getObjects(),h=n.indexOf(k),g=h;if(h!==n.length-1){for(var m=h+1,j=this._objects.length;m"};f(fabric.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',toGrayscale:function(l){var k=l.getContext("2d"),g=k.getImageData(0,0,l.width,l.height),p=g.data,m=g.width,r=g.height,q,h,o,n;for(o=0;o0)?0:-v),r.ey-((u>0)?0:-u),t,s);this.contextTop.lineWidth=this.selectionLineWidth;this.contextTop.strokeStyle=this.selectionBorderColor;this.contextTop.strokeRect(r.ex+a-((v>0)?0:t),r.ey+a-((u>0)?0:s),t,s)},_findSelectedObjects:function(x){var y,t,D=[],s=this._groupSelector.ex,C=this._groupSelector.ey,r=s+this._groupSelector.left,A=C+this._groupSelector.top,z,w=new fabric.Point(f(s,r),f(C,A)),B=new fabric.Point(l(s,r),l(C,A));for(var u=0,v=this._objects.length;u1){var D=new fabric.Group(D);this.setActiveGroup(D);D.saveCoords();this.fire("selection:created",{target:D})}}this.renderAll()},findTarget:function(v,s){var u,w=this.getPointer(v);var t=this.getActiveGroup();if(t&&!s&&this.containsPoint(v,t)){u=t;return u}for(var r=this._objects.length;r--;){if(this._objects[r]&&this.containsPoint(v,this._objects[r])){u=this._objects[r];this.relatedTarget=u;break}}if(u&&u.selectable){return u}},getPointer:function(r){var s=q(r);return{x:s.x-this._offset.left,y:s.y-this._offset.top}},_createUpperCanvas:function(){this.upperCanvasEl=this._createCanvasElement();this.upperCanvasEl.className="upper-canvas";this.wrapperEl.appendChild(this.upperCanvasEl);this._applyCanvasStyle(this.upperCanvasEl);this.contextTop=this.upperCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=fabric.util.wrapElement(this.lowerCanvasEl,"div",{"class":this.containerClass});fabric.util.setStyle(this.wrapperEl,{width:this.getWidth()+"px",height:this.getHeight()+"px",position:"relative"});fabric.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(s){var t=this.getWidth()||s.width,r=this.getHeight()||s.height;fabric.util.setStyle(s,{position:"absolute",width:t+"px",height:r+"px",left:0,top:0});s.width=t;s.height=r;fabric.util.makeElementUnselectable(s)},getSelectionContext:function(){return this.contextTop},getSelectionElement:function(){return this.upperCanvasEl},setActiveObject:function(r,s){if(this._activeObject){this._activeObject.setActive(false)}this._activeObject=r;r.setActive(true);this.renderAll();this.fire("object:selected",{target:r,e:s});r.fire("selected",{e:s});return this},getActiveObject:function(){return this._activeObject},discardActiveObject:function(){if(this._activeObject){this._activeObject.setActive(false)}this._activeObject=null;return this},setActiveGroup:function(r){this._activeGroup=r;r&&r.setActive(true);return this},getActiveGroup:function(){return this._activeGroup},discardActiveGroup:function(){var r=this.getActiveGroup();if(r){r.destroy()}return this.setActiveGroup(null)},deactivateAll:function(){var s=this.getObjects(),t=0,r=s.length;for(;t1)?q.apply(this,o.call(arguments,1)):q.call(this)},initialize:function(i){if(i){this.setOptions(i);this._initGradient(i)}},_initGradient:function(i){if(i.fill&&typeof i.fill=="object"&&!(i.fill instanceof d.Gradient)){this.set("fill",new d.Gradient(i.fill))}},setOptions:function(q){var r=this.stateProperties.length,s;while(r--){s=this.stateProperties[r];if(s in q){this.set(s,q[s])}}},transform:function(i){i.globalAlpha=this.opacity;i.translate(this.left,this.top);i.rotate(this._theta);i.scale(this.scaleX*(this.flipX?-1:1),this.scaleY*(this.flipY?-1:1))},toObject:function(){var q=d.Object.NUM_FRACTION_DIGITS;var i={type:this.type,left:c(this.left,q),top:c(this.top,q),width:c(this.width,q),height:c(this.height,q),fill:(this.fill&&this.fill.toObject)?this.fill.toObject():this.fill,overlayFill:this.overlayFill,stroke:this.stroke,strokeWidth:this.strokeWidth,strokeDashArray:this.strokeDashArray,scaleX:c(this.scaleX,q),scaleY:c(this.scaleY,q),angle:c(this.getAngle(),q),flipX:this.flipX,flipY:this.flipY,opacity:c(this.opacity,q),selectable:this.selectable,hasControls:this.hasControls,hasBorders:this.hasBorders,hasRotatingPoint:this.hasRotatingPoint};if(!this.includeDefaultValues){i=this._removeDefaultValues(i)}return i},toDatalessObject:function(){return this.toObject()},getSvgStyles:function(){return["stroke: ",(this.stroke?this.stroke:"none"),"; ","stroke-width: ",(this.strokeWidth?this.strokeWidth:"0"),"; ","stroke-dasharray: ",(this.strokeDashArray?this.strokeDashArray.join(" "):"; "),"fill: ",(this.fill?this.fill:"none"),"; ","opacity: ",(this.opacity?this.opacity:"1"),";"].join("")},getSvgTransform:function(){var i=this.getAngle();return["translate(",c(this.left,2)," ",c(this.top,2),")",i!==0?(" rotate("+c(i,2)+")"):"",(this.scaleX===1&&this.scaleY===1)?"":(" scale("+c(this.scaleX,2)+" "+c(this.scaleY,2)+")")].join("")},_removeDefaultValues:function(q){var i=d.Object.prototype.options;if(i){this.stateProperties.forEach(function(r){if(q[r]===i[r]){delete q[r]}})}return q},isActive:function(){return !!this.active},setActive:function(i){this.active=!!i;return this},toString:function(){return"#"},set:function(i,q){if(typeof i==="object"){for(var r in i){this._set(r,i[r])}}else{if(typeof q==="function"){this._set(i,q(this.get(i)))}else{this._set(i,q)}}return this},_set:function(i,q){var r=(i==="scaleX"||i==="scaleY")&&q1?this.strokeWidth:0,B=this.padding;this.currentWidth=(this.width+z)*this.scaleX+B*2;this.currentHeight=(this.height+z)*this.scaleY+B*2;this._hypotenuse=Math.sqrt(Math.pow(this.currentWidth/2,2)+Math.pow(this.currentHeight/2,2));this._angle=Math.atan(this.currentHeight/this.currentWidth);var w=Math.cos(this._angle+this._theta)*this._hypotenuse,v=Math.sin(this._angle+this._theta)*this._hypotenuse,r=this._theta,A=Math.sin(r),y=Math.cos(r);var E={x:this.left-w,y:this.top-v};var x={x:E.x+(this.currentWidth*y),y:E.y+(this.currentWidth*A)};var D={x:x.x-(this.currentHeight*A),y:x.y+(this.currentHeight*y)};var s={x:E.x-(this.currentHeight*A),y:E.y+(this.currentHeight*y)};var u={x:E.x-(this.currentHeight/2*A),y:E.y+(this.currentHeight/2*y)};var i={x:E.x+(this.currentWidth/2*y),y:E.y+(this.currentWidth/2*A)};var q={x:x.x-(this.currentHeight/2*A),y:x.y+(this.currentHeight/2*y)};var C={x:s.x+(this.currentWidth/2*y),y:s.y+(this.currentWidth/2*A)};var t={x:E.x+(this.currentWidth/2*y),y:E.y+(this.currentWidth/2*A)};this.oCoords={tl:E,tr:x,br:D,bl:s,ml:u,mt:i,mr:q,mb:C,mtr:t};this._setCornerCoords();return this},getBoundingRectWidth:function(){var q=[this.oCoords.tl.x,this.oCoords.tr.x,this.oCoords.br.x,this.oCoords.bl.x];var i=d.util.array.min(q);var r=d.util.array.max(q);return Math.abs(i-r)},getBoundingRectHeight:function(){var i=[this.oCoords.tl.y,this.oCoords.tr.y,this.oCoords.br.y,this.oCoords.bl.y];var r=d.util.array.min(i);var q=d.util.array.max(i);return Math.abs(r-q)},drawBorders:function(A){if(!this.hasBorders){return}var t=d.Object.MIN_SCALE_LIMIT,v=this.padding,i=v*2,u=this.strokeWidth>1?this.strokeWidth:0;A.save();A.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1;A.strokeStyle=this.borderColor;var z=1/(this.scaleXi){var C=x-i}if(E){z+=(D*E)-(C*E||0)}else{v+=(D*y)-(C*y||0)}B[1&s?"moveTo":"lineTo"](z,v);if(s>=u){s=0}}}q(1,0);q(0,1);q(-1,0);q(0,-1);B.stroke();B.closePath();B.restore()},drawCorners:function(A){if(!this.hasControls){return}var w=this.cornersize,r=w/2,i=this.strokeWidth/2,q=-(this.width/2),u=-(this.height/2),G,B,y=w/this.scaleX,v=w/this.scaleY,D=this.padding/this.scaleX,C=this.padding/this.scaleY,E=r/this.scaleY,F=r/this.scaleX,t=(r-w)/this.scaleX,s=(r-w)/this.scaleY,x=this.height,z=this.width;A.save();A.lineWidth=1/Math.max(this.scaleX,this.scaleY);A.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1;A.strokeStyle=A.fillStyle=this.cornerColor;G=q-F-i-D;B=u-E-i-C;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);G=q+z-F+i+D;B=u-E-i-C;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);G=q-F-i-D;B=u+x+s+i+C;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);G=q+z+t+i+D;B=u+x+s+i+C;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);if(!this.lockUniScaling){G=q+z/2-F;B=u-E-i-C;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);G=q+z/2-F;B=u+x+s+i+C;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);G=q+z+t+i+D;B=u+x/2-E;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);G=q-F-i-D;B=u+x/2-E;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v)}if(this.hasRotatingPoint){G=q+z/2-F;B=this.flipY?(u+x+(this.rotatingPointOffset/this.scaleY)-v/2+i+C):(u-(this.rotatingPointOffset/this.scaleY)-v/2-i-C);A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v)}A.restore();return this},clone:function(i){if(this.constructor.fromObject){return this.constructor.fromObject(this.toObject(),i)}return new d.Object(this.toObject())},cloneAsImage:function(s){if(d.Image){var q=new Image();q.onload=function(){if(s){s(new d.Image(q),r)}q=q.onload=null};var r={angle:this.get("angle"),flipX:this.get("flipX"),flipY:this.get("flipY")};this.set("angle",0).set("flipX",false).set("flipY",false);this.toDataURL(function(i){q.src=i})}return this},toDataURL:function(s){var q=d.document.createElement("canvas");if(!q.getContext&&typeof G_vmlCanvasManager!="undefined"){G_vmlCanvasManager.initElement(q)}this.setCoords();q.width=this.getBoundingRectWidth();q.height=this.getBoundingRectHeight();d.util.wrapElement(q,"div");var i=new d.Canvas(q);i.backgroundColor="transparent";i.renderAll();if(this.constructor.async){this.clone(r)}else{r(this.clone())}function r(u){u.left=q.width/2;u.top=q.height/2;u.setActive(false);i.add(u);var t=i.toDataURL("png");i.dispose();i=u=null;s&&s(t)}},hasStateChanged:function(){return this.stateProperties.some(function(i){return this[i]!==this.originalState[i]},this)},saveState:function(){this.stateProperties.forEach(function(i){this.originalState[i]=this.get(i)},this);return this},setupState:function(){this.originalState={};this.saveState()},intersectsWithRect:function(r,t){var w=this.oCoords,i=new d.Point(w.tl.x,w.tl.y),s=new d.Point(w.tr.x,w.tr.y),v=new d.Point(w.bl.x,w.bl.y),q=new d.Point(w.br.x,w.br.y);var u=d.Intersection.intersectPolygonRectangle([i,s,q,v],r,t);return(u.status==="Intersection")},intersectsWithObject:function(i){function q(u){return{tl:new d.Point(u.tl.x,u.tl.y),tr:new d.Point(u.tr.x,u.tr.y),bl:new d.Point(u.bl.x,u.bl.y),br:new d.Point(u.br.x,u.br.y)}}var r=q(this.oCoords),t=q(i.oCoords);var s=d.Intersection.intersectPolygonPolygon([r.tl,r.tr,r.br,r.bl],[t.tl,t.tr,t.br,t.bl]);return(s.status==="Intersection")},isContainedWithinObject:function(i){return this.isContainedWithinRect(i.oCoords.tl,i.oCoords.br)},isContainedWithinRect:function(r,t){var v=this.oCoords,i=new d.Point(v.tl.x,v.tl.y),s=new d.Point(v.tr.x,v.tr.y),u=new d.Point(v.bl.x,v.bl.y),q=new d.Point(v.br.x,v.br.y);return i.x>r.x&&s.xr.y&&u.y=v)&&(s.d.y>=v)){continue}if((s.o.x==s.d.x)&&(s.o.x>=w)){x=s.o.x;u=v}else{z=0;y=(s.d.y-s.o.y)/(s.d.x-s.o.x);r=v-z*w;q=s.o.y-y*s.o.x;x=-(r-q)/(z-y);u=r+z*x}if(x>=w){t+=1}if(t==2){break}}return t},_getImageLines:function(r,q){return{topline:{o:r.tl,d:r.tr},rightline:{o:r.tr,d:r.br},bottomline:{o:r.br,d:r.bl},leftline:{o:r.bl,d:r.tl}}},_setCornerCoords:function(){var u=this.oCoords,q=b(45-this.getAngle()),s=Math.sqrt(2*Math.pow(this.cornersize,2))/2,i=s*Math.cos(q),r=s*Math.sin(q),v=Math.sin(this._theta),t=Math.cos(this._theta);u.tl.corner={tl:{x:u.tl.x-r,y:u.tl.y-i},tr:{x:u.tl.x+i,y:u.tl.y-r},bl:{x:u.tl.x-i,y:u.tl.y+r},br:{x:u.tl.x+r,y:u.tl.y+i}};u.tr.corner={tl:{x:u.tr.x-r,y:u.tr.y-i},tr:{x:u.tr.x+i,y:u.tr.y-r},br:{x:u.tr.x+r,y:u.tr.y+i},bl:{x:u.tr.x-i,y:u.tr.y+r}};u.bl.corner={tl:{x:u.bl.x-r,y:u.bl.y-i},bl:{x:u.bl.x-i,y:u.bl.y+r},br:{x:u.bl.x+r,y:u.bl.y+i},tr:{x:u.bl.x+i,y:u.bl.y-r}};u.br.corner={tr:{x:u.br.x+i,y:u.br.y-r},bl:{x:u.br.x-i,y:u.br.y+r},br:{x:u.br.x+r,y:u.br.y+i},tl:{x:u.br.x-r,y:u.br.y-i}};u.ml.corner={tl:{x:u.ml.x-r,y:u.ml.y-i},tr:{x:u.ml.x+i,y:u.ml.y-r},bl:{x:u.ml.x-i,y:u.ml.y+r},br:{x:u.ml.x+r,y:u.ml.y+i}};u.mt.corner={tl:{x:u.mt.x-r,y:u.mt.y-i},tr:{x:u.mt.x+i,y:u.mt.y-r},bl:{x:u.mt.x-i,y:u.mt.y+r},br:{x:u.mt.x+r,y:u.mt.y+i}};u.mr.corner={tl:{x:u.mr.x-r,y:u.mr.y-i},tr:{x:u.mr.x+i,y:u.mr.y-r},bl:{x:u.mr.x-i,y:u.mr.y+r},br:{x:u.mr.x+r,y:u.mr.y+i}};u.mb.corner={tl:{x:u.mb.x-r,y:u.mb.y-i},tr:{x:u.mb.x+i,y:u.mb.y-r},bl:{x:u.mb.x-i,y:u.mb.y+r},br:{x:u.mb.x+r,y:u.mb.y+i}};u.mtr.corner={tl:{x:u.mtr.x-r+(v*this.rotatingPointOffset),y:u.mtr.y-i-(t*this.rotatingPointOffset)},tr:{x:u.mtr.x+i+(v*this.rotatingPointOffset),y:u.mtr.y-r-(t*this.rotatingPointOffset)},bl:{x:u.mtr.x-i+(v*this.rotatingPointOffset),y:u.mtr.y+r-(t*this.rotatingPointOffset)},br:{x:u.mtr.x+r+(v*this.rotatingPointOffset),y:u.mtr.y+i-(t*this.rotatingPointOffset)}}},toGrayscale:function(){var i=this.get("fill");if(i){this.set("overlayFill",new d.Color(i).toGrayscale().toRgb())}return this},complexity:function(){return 0},toJSON:function(){return this.toObject()},setGradientFill:function(i){this.set("fill",d.Gradient.forObject(this,i))},animate:function(q,s,i){var r=this;i||(i={});if(!("from" in i)){i.from=this.get(q)}if(/[+-]/.test((s+"").charAt(0))){s=this.get(q)+parseFloat(s)}d.util.animate({startValue:i.from,endValue:s,byValue:i.by,easing:i.easing,duration:i.duration,onChange:function(t){r.set(q,t);i.onChange&&i.onChange()},onComplete:function(){r.setCoords();i.onComplete&&i.onComplete()}})},centerH:function(){this.canvas.centerObjectH(this);return this},centerV:function(){this.canvas.centerObjectV(this);return this},center:function(){return this.centerH().centerV()},remove:function(){return this.canvas.remove(this)},sendToBack:function(){this.canvas.sendToBack(this);return this},bringToFront:function(){this.canvas.bringToFront(this);return this},sendBackwards:function(){this.canvas.sendBackwards(this);return this},bringForward:function(){this.canvas.bringForward(this);return this}});d.Object.prototype.rotate=d.Object.prototype.setAngle;var j=d.Object.prototype;for(var g=j.stateProperties.length;g--;){var h=j.stateProperties[g],e=h.charAt(0).toUpperCase()+h.slice(1),f="set"+e,n="get"+e;if(!j[n]){j[n]=(function(i){return new Function('return this.get("'+i+'")')})(h)}if(!j[f]){j[f]=(function(i){return new Function("value",'return this.set("'+i+'", value)')})(h)}}l(d.Object.prototype,d.Observable);l(d.Object,{NUM_FRACTION_DIGITS:2,MIN_SCALE_LIMIT:0.1})})(typeof exports!="undefined"?exports:this);(function(b){var c=b.fabric||(b.fabric={}),e=c.util.object.extend,d=c.Object.prototype.set,a={x1:1,x2:1,y1:1,y2:1};if(c.Line){c.warn("fabric.Line is already defined");return}c.Line=c.util.createClass(c.Object,{type:"line",initialize:function(g,f){if(!g){g=[0,0,0,0]}this.callSuper("initialize",f);this.set("x1",g[0]);this.set("y1",g[1]);this.set("x2",g[2]);this.set("y2",g[3]);this._setWidthHeight(f)},_setWidthHeight:function(f){f||(f={});this.set("width",(this.x2-this.x1)||1);this.set("height",(this.y2-this.y1)||1);this.set("left","left" in f?f.left:(this.x1+this.width/2));this.set("top","top" in f?f.top:(this.y1+this.height/2))},_set:function(f,g){this[f]=g;if(f in a){this._setWidthHeight()}return this},_render:function(f){f.beginPath();if(this.group){f.translate(-this.group.width/2+this.left,-this.group.height/2+this.top)}f.moveTo(this.width===1?0:(-this.width/2),this.height===1?0:(-this.height/2));f.lineTo(this.width===1?0:(this.width/2),this.height===1?0:(this.height/2));f.lineWidth=this.strokeWidth;var g=f.strokeStyle;f.strokeStyle=f.fillStyle;f.stroke();f.strokeStyle=g},complexity:function(){return 1},toObject:function(){return e(this.callSuper("toObject"),{x1:this.get("x1"),y1:this.get("y1"),x2:this.get("x2"),y2:this.get("y2")})},toSVG:function(){return[""].join("")}});c.Line.ATTRIBUTE_NAMES="x1 y1 x2 y2 stroke stroke-width transform".split(" ");c.Line.fromElement=function(g,f){var i=c.parseAttributes(g,c.Line.ATTRIBUTE_NAMES);var h=[i.x1||0,i.y1||0,i.x2||0,i.y2||0];return new c.Line(h,e(i,f))};c.Line.fromObject=function(f){var g=[f.x1,f.y1,f.x2,f.y2];return new c.Line(g,f)}})(typeof exports!="undefined"?exports:this);(function(a){var b=a.fabric||(a.fabric={}),d=Math.PI*2,e=b.util.object.extend;if(b.Circle){b.warn("fabric.Circle is already defined.");return}b.Circle=b.util.createClass(b.Object,{type:"circle",initialize:function(f){f=f||{};this.set("radius",f.radius||0);this.callSuper("initialize",f);var g=this.get("radius")*2;this.set("width",g).set("height",g)},toObject:function(){return e(this.callSuper("toObject"),{radius:this.get("radius")})},toSVG:function(){return('')},_render:function(f,g){f.beginPath();f.globalAlpha*=this.opacity;f.arc(g?this.left:0,g?this.top:0,this.radius,0,d,false);f.closePath();if(this.fill){f.fill()}if(this.stroke){f.stroke()}},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(f){this.radius=f;this.set("width",f*2).set("height",f*2)},complexity:function(){return 1}});b.Circle.ATTRIBUTE_NAMES="cx cy r fill fill-opacity opacity stroke stroke-width transform".split(" ");b.Circle.fromElement=function(g,f){f||(f={});var h=b.parseAttributes(g,b.Circle.ATTRIBUTE_NAMES);if(!c(h)){throw Error("value of `r` attribute is required and can not be negative")}if("left" in h){h.left-=(f.width/2)||0}if("top" in h){h.top-=(f.height/2)||0}return new b.Circle(e(h,f))};function c(f){return(("radius" in f)&&(f.radius>0))}b.Circle.fromObject=function(f){return new b.Circle(f)}})(typeof exports!="undefined"?exports:this);(function(a){var b=a.fabric||(a.fabric={});if(b.Triangle){b.warn("fabric.Triangle is already defined");return}b.Triangle=b.util.createClass(b.Object,{type:"triangle",initialize:function(c){c=c||{};this.callSuper("initialize",c);this.set("width",c.width||100).set("height",c.height||100)},_render:function(c){var d=this.width/2,e=this.height/2;c.beginPath();c.moveTo(-d,e);c.lineTo(0,-e);c.lineTo(d,e);c.closePath();if(this.fill){c.fill()}if(this.stroke){c.stroke()}},complexity:function(){return 1},toSVG:function(){var c=this.width/2,d=this.height/2;var e=[-c+" "+d,"0 "+-d,c+" "+d].join(",");return''}});b.Triangle.fromObject=function(c){return new b.Triangle(c)}})(typeof exports!="undefined"?exports:this);(function(a){var b=a.fabric||(a.fabric={}),c=Math.PI*2,d=b.util.object.extend;if(b.Ellipse){b.warn("fabric.Ellipse is already defined.");return}b.Ellipse=b.util.createClass(b.Object,{type:"ellipse",initialize:function(e){e=e||{};this.callSuper("initialize",e);this.set("rx",e.rx||0);this.set("ry",e.ry||0);this.set("width",this.get("rx")*2);this.set("height",this.get("ry")*2)},toObject:function(){return d(this.callSuper("toObject"),{rx:this.get("rx"),ry:this.get("ry")})},toSVG:function(){return[""].join("")},render:function(e,f){if(this.rx===0||this.ry===0){return}return this.callSuper("render",e,f)},_render:function(e,f){e.beginPath();e.save();e.globalAlpha*=this.opacity;if(this.transformMatrix&&this.group){e.translate(this.cx,this.cy)}e.transform(1,0,0,this.ry/this.rx,0,0);e.arc(f?this.left:0,f?this.top:0,this.rx,0,c,false);if(this.stroke){e.stroke()}if(this.fill){e.fill()}e.restore()},complexity:function(){return 1}});b.Ellipse.ATTRIBUTE_NAMES="cx cy rx ry fill fill-opacity opacity stroke stroke-width transform".split(" ");b.Ellipse.fromElement=function(g,f){f||(f={});var i=b.parseAttributes(g,b.Ellipse.ATTRIBUTE_NAMES);var e=i.left;var j=i.top;if("left" in i){i.left-=(f.width/2)||0}if("top" in i){i.top-=(f.height/2)||0}var h=new b.Ellipse(d(i,f));h.cx=e||0;h.cy=j||0;return h};b.Ellipse.fromObject=function(e){return new b.Ellipse(e)}})(typeof exports!="undefined"?exports:this);(function(b){var c=b.fabric||(b.fabric={});if(c.Rect){console.warn("fabric.Rect is already defined");return}c.Rect=c.util.createClass(c.Object,{type:"rect",rx:0,ry:0,initialize:function(d){this._initStateProperties();this.callSuper("initialize",d);this._initRxRy()},_initStateProperties:function(){this.stateProperties=this.stateProperties.concat(["rx","ry"])},_initRxRy:function(){if(this.rx&&!this.ry){this.ry=this.rx}else{if(this.ry&&!this.rx){this.rx=this.ry}}},_render:function(f){var j=this.rx||0,i=this.ry||0,d=-this.width/2,k=-this.height/2,e=this.width,g=this.height;f.beginPath();f.globalAlpha*=this.opacity;if(this.transformMatrix&&this.group){f.translate(this.width/2+this.x,this.height/2+this.y)}if(!this.transformMatrix&&this.group){f.translate(-this.group.width/2+this.width/2+this.x,-this.group.height/2+this.height/2+this.y)}f.moveTo(d+j,k);f.lineTo(d+e-j,k);f.quadraticCurveTo(d+e,k,d+e,k+i,d+e,k+i);f.lineTo(d+e,k+g-i);f.quadraticCurveTo(d+e,k+g,d+e-j,k+g,d+e-j,k+g);f.lineTo(d+j,k+g);f.quadraticCurveTo(d,k+g,d,k+g-i,d,k+g-i);f.lineTo(d,k+i);f.quadraticCurveTo(d,k,d+j,k,d+j,k);f.closePath();if(this.fill){f.fill()}if(this.strokeDashArray){this._renderDashedStroke(f)}else{if(this.stroke){f.stroke()}}},_normalizeLeftTopProperties:function(d){if(d.left){this.set("left",d.left+this.getWidth()/2)}this.set("x",d.left||0);if(d.top){this.set("top",d.top+this.getHeight()/2)}this.set("y",d.top||0);return this},complexity:function(){return 1},toObject:function(){return c.util.object.extend(this.callSuper("toObject"),{rx:this.get("rx")||0,ry:this.get("ry")||0})},toSVG:function(){return''}});c.Rect.ATTRIBUTE_NAMES="x y width height rx ry fill fill-opacity opacity stroke stroke-width transform".split(" ");function a(d){d.left=d.left||0;d.top=d.top||0;return d}c.Rect.fromElement=function(e,d){if(!e){return null}var g=c.parseAttributes(e,c.Rect.ATTRIBUTE_NAMES);g=a(g);var f=new c.Rect(c.util.object.extend((d?c.util.object.clone(d):{}),g));f._normalizeLeftTopProperties(g);return f};c.Rect.fromObject=function(d){return new c.Rect(d)}})(typeof exports!="undefined"?exports:this);(function(b){var c=b.fabric||(b.fabric={}),a=c.util.toFixed;if(c.Polyline){c.warn("fabric.Polyline is already defined");return}c.Polyline=c.util.createClass(c.Object,{type:"polyline",initialize:function(e,d){d=d||{};this.set("points",e);this.callSuper("initialize",d);this._calcDimensions()},_calcDimensions:function(){return c.Polygon.prototype._calcDimensions.call(this)},toObject:function(){return c.Polygon.prototype.toObject.call(this)},toSVG:function(){var f=[];for(var e=0,d=this.points.length;e"].join("")},_render:function(f){var e;f.beginPath();f.moveTo(this.points[0].x,this.points[0].y);for(var g=0,d=this.points.length;g"].join("")},_render:function(l){var k;l.beginPath();l.moveTo(this.points[0].x,this.points[0].y);for(var m=0,j=this.points.length;m1){E=Math.sqrt(E);O*=E;N*=E}var R=aa/O;var Q=W/O;var D=(-W)/N;var C=(aa)/N;var H=R*M+Q*L;var q=D*M+C*L;var F=R*T+Q*S;var ab=D*T+C*S;var Z=(F-H)*(F-H)+(ab-q)*(ab-q);var U=1/Z-0.25;if(U<0){U=0}var w=Math.sqrt(U);if(P==J){w=-w}var V=0.5*(H+F)-w*(ab-q);var K=0.5*(q+ab)+w*(F-H);var v=Math.atan2(q-K,H-V);var u=Math.atan2(ab-K,F-V);var Y=u-v;if(Y<0&&P==1){Y+=2*Math.PI}else{if(Y>0&&P==0){Y-=2*Math.PI}}var B=Math.ceil(Math.abs(Y/(Math.PI*0.5+0.001)));var I=[];for(var X=0;X"},toObject:function(){var q=g(this.callSuper("toObject"),{path:this.path});if(this.sourcePath){q.sourcePath=this.sourcePath}if(this.transformMatrix){q.transformMatrix=this.transformMatrix}return q},toDatalessObject:function(){var q=this.toObject();if(this.sourcePath){q.path=this.sourcePath}delete q.sourcePath;return q},toSVG:function(){var t=[];for(var r=0,q=this.path.length;r',"',""].join("")},complexity:function(){return this.path.length},_parsePath:function(){var C=[],z,v,y;for(var u=0,t,q,w=this.path.length;uB){for(var r=1,x=q.length;r"];for(var l=0,j=m.length;l");return k.join("")},toString:function(){return"#"},isSameColor:function(){var j=this.getObjects()[0].get("fill");return this.getObjects().every(function(k){return k.get("fill")===j})},complexity:function(){return this.paths.reduce(function(j,k){return j+((k&&k.complexity)?k.complexity():0)},0)},toGrayscale:function(){var j=this.paths.length;while(j--){this.paths[j].toGrayscale()}return this},getObjects:function(){return this.paths}});function c(m){for(var l=0,j=m.length;l"},getObjects:function(){return this.objects},addWithUpdate:function(h){this._restoreObjectsState();this.objects.push(h);this._calcBounds();this._updateObjectsCoords();return this},removeWithUpdate:function(h){this._restoreObjectsState();f(this.objects,h);h.setActive(false);this._calcBounds();this._updateObjectsCoords();return this},add:function(h){this.objects.push(h);return this},remove:function(h){f(this.objects,h);return this},size:function(){return this.getObjects().length},_set:function(j,k){if(j==="fill"||j==="opacity"){var h=this.objects.length;this[j]=k;while(h--){this.objects[h].set(j,k)}}else{this[j]=k}},contains:function(h){return this.objects.indexOf(h)>-1},toObject:function(){return g(this.callSuper("toObject"),{objects:b(this.objects,"clone")})},render:function(j,o){j.save();this.transform(j);var n=Math.max(this.scaleX,this.scaleY);for(var l=0,h=this.objects.length,k;k=this.objects[l];l++){var m=k.borderScaleFactor;k.borderScaleFactor=n;k.render(j);k.borderScaleFactor=m}if(!o&&this.active){this.drawBorders(j);this.hideCorners||this.drawCorners(j)}j.restore();this.setCoords()},item:function(h){return this.getObjects()[h]},complexity:function(){return this.getObjects().reduce(function(i,h){i+=(typeof h.complexity=="function")?h.complexity():0;return i},0)},_restoreObjectsState:function(){this.objects.forEach(this._restoreObjectState,this);return this},_restoreObjectState:function(j){var l=this.get("left"),m=this.get("top"),h=this.getAngle()*(Math.PI/180),k=j.get("originalLeft"),n=j.get("originalTop"),i=Math.cos(h)*j.get("top")+Math.sin(h)*j.get("left"),o=-Math.sin(h)*j.get("top")+Math.cos(h)*j.get("left");j.setAngle(j.getAngle()+this.getAngle());j.set("left",l+o*this.get("scaleX"));j.set("top",m+i*this.get("scaleY"));j.set("scaleX",j.get("scaleX")*this.get("scaleX"));j.set("scaleY",j.get("scaleY")*this.get("scaleY"));j.setCoords();j.hideCorners=false;j.setActive(false);j.setCoords();return this},destroy:function(){return this._restoreObjectsState()},saveCoords:function(){this._originalLeft=this.get("left");this._originalTop=this.get("top");return this},hasMoved:function(){return this._originalLeft!==this.get("left")||this._originalTop!==this.get("top")},setObjectsCoords:function(){this.forEachObject(function(h){h.setCoords()});return this},activateAllObjects:function(){this.forEachObject(function(h){h.setActive()});return this},forEachObject:e.StaticCanvas.prototype.forEachObject,_setOpacityIfSame:function(){var j=this.getObjects(),i=j[0]?j[0].get("opacity"):1;var h=j.every(function(k){return k.get("opacity")===i});if(h){this.opacity=i}},_calcBounds:function(){var s=[],q=[],p,n,k,h,m,l,u,r=0,t=this.objects.length;for(;ri.x&&j-hi.y},toGrayscale:function(){var h=this.objects.length;while(h--){this.objects[h].toGrayscale()}},toSVG:function(){var k=[];for(var j=0,h=this.objects.length;j'+k.join("")+"")}});e.Group.fromObject=function(h,i){e.util.enlivenObjects(h.objects,function(j){delete h.objects;i&&i(new e.Group(j,h))})};e.Group.async=true})(typeof exports!="undefined"?exports:this);(function(a){var b=fabric.util.object.extend;if(!a.fabric){a.fabric={}}if(a.fabric.Image){fabric.warn("fabric.Image is already defined.");return}if(!fabric.Object){fabric.warn("fabric.Object is required for fabric.Image initialization");return}fabric.Image=fabric.util.createClass(fabric.Object,{active:false,bordervisibility:false,cornervisibility:false,type:"image",initialize:function(d,c){c||(c={});this.callSuper("initialize",c);this._initElement(d);this._originalImage=this.getElement();this._initConfig(c);this.filters=[];if(c.filters){this.filters=c.filters;this.applyFilters()}},getElement:function(){return this._element},setElement:function(c){this._element=c;this._initConfig();return this},getOriginalSize:function(){var c=this.getElement();return{width:c.width,height:c.height}},setBorderVisibility:function(c){this._resetWidthHeight();this._adjustWidthHeightToBorders(showBorder);this.setCoords()},setCornersVisibility:function(c){this.cornervisibility=!!c},render:function(d,e){d.save();var c=this.transformMatrix;this._resetWidthHeight();if(this.group){d.translate(-this.group.width/2+this.width/2,-this.group.height/2+this.height/2)}if(c){d.transform(c[0],c[1],c[2],c[3],c[4],c[5])}if(!e){this.transform(d)}this._render(d);if(this.active&&!e){this.drawBorders(d);this.hideCorners||this.drawCorners(d)}d.restore()},toObject:function(){return b(this.callSuper("toObject"),{src:this._originalImage.src||this._originalImage._src,filters:this.filters.concat()})},toSVG:function(){return''},getSrc:function(){return this.getElement().src||this.getElement()._src},toString:function(){return'#'},clone:function(c){this.constructor.fromObject(this.toObject(),c)},applyFilters:function(i){if(this.filters.length===0){this.setElement(this._originalImage);i&&i();return}var c=typeof Buffer!=="undefined"&&typeof window==="undefined",g=this._originalImage,e=fabric.document.createElement("canvas"),f=c?new (require("canvas").Image):fabric.document.createElement("img"),h=this;if(!e.getContext&&typeof G_vmlCanvasManager!="undefined"){G_vmlCanvasManager.initElement(e)}e.width=g.width;e.height=g.height;e.getContext("2d").drawImage(g,0,0,g.width,g.height);this.filters.forEach(function(j){j&&j.applyTo(e)});f.onload=function(){h._element=f;i&&i();f.onload=e=g=null};f.width=g.width;f.height=g.height;if(c){var d=e.toDataURL("image/png").replace(/data:image\/png;base64,/,"");f.src=new Buffer(d,"base64");h._element=f;i&&i()}else{f.src=e.toDataURL("image/png")}return this},_render:function(c){c.drawImage(this.getElement(),-this.width/2,-this.height/2,this.width,this.height)},_adjustWidthHeightToBorders:function(c){if(c){this.currentBorder=this.borderwidth;this.width+=(2*this.currentBorder);this.height+=(2*this.currentBorder)}else{this.currentBorder=0}},_resetWidthHeight:function(){var c=this.getElement();this.set("width",c.width);this.set("height",c.height)},_initElement:function(c){this.setElement(fabric.util.getById(c));fabric.util.addClass(this.getElement(),fabric.Image.CSS_CANVAS)},_initConfig:function(c){c||(c={});this.setOptions(c);this._setBorder();this._setWidthHeight(c)},_initFilters:function(c){if(c.filters&&c.filters.length){this.filters=c.filters.map(function(d){return d&&fabric.Image.filters[d.type].fromObject(d)})}},_setBorder:function(){if(this.bordervisibility){this.currentBorder=this.borderwidth}else{this.currentBorder=0}},_setWidthHeight:function(c){var d=2*this.currentBorder;this.width="width" in c?c.width:((this.getElement().width||0)+d);this.height="height" in c?c.height:((this.getElement().height||0)+d)},complexity:function(){return 1}});fabric.Image.CSS_CANVAS="canvas-img";fabric.Image.prototype.getSvgSrc=fabric.Image.prototype.getSrc;fabric.Image.fromObject=function(d,f){var c=fabric.document.createElement("img"),e=d.src;if(d.width){c.width=d.width}if(d.height){c.height=d.height}c.onload=function(){fabric.Image.prototype._initFilters.call(d,d);var g=new fabric.Image(c,d);f&&f(g);c=c.onload=null};c.src=e};fabric.Image.fromURL=function(d,f,e){var c=fabric.document.createElement("img");c.onload=function(){if(f){f(new fabric.Image(c,e))}c=c.onload=null};c.src=d};fabric.Image.ATTRIBUTE_NAMES="x y width height fill fill-opacity opacity stroke stroke-width transform xlink:href".split(" ");fabric.Image.fromElement=function(d,f,c){c||(c={});var e=fabric.parseAttributes(d,fabric.Image.ATTRIBUTE_NAMES);fabric.Image.fromURL(e["xlink:href"],f,b(e,c))};fabric.Image.async=true})(typeof exports!="undefined"?exports:this);fabric.util.object.extend(fabric.Object.prototype,{_getAngleValueForStraighten:function(){var a=this.get("angle");if(a>-225&&a<=-135){return -180}else{if(a>-135&&a<=-45){return -90}else{if(a>-45&&a<=45){return 0}else{if(a>45&&a<=135){return 90}else{if(a>135&&a<=225){return 180}else{if(a>225&&a<=315){return 270}else{if(a>315){return 360}}}}}}}return 0},straighten:function(){var a=this._getAngleValueForStraighten();this.setAngle(a);return this},fxStraighten:function(b){b=b||{};var c=function(){},d=b.onComplete||c,a=b.onChange||c,e=this;fabric.util.animate({startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(f){e.setAngle(f);a()},onComplete:function(){e.setCoords();d()},onStart:function(){e.setActive(false)}});return this}});fabric.util.object.extend(fabric.StaticCanvas.prototype,{straightenObject:function(a){a.straighten();this.renderAll();return this},fxStraightenObject:function(a){a.fxStraighten({onChange:this.renderAll.bind(this)});return this}});fabric.Image.filters={};fabric.Image.filters.Grayscale=fabric.util.createClass({type:"Grayscale",applyTo:function(d){var c=d.getContext("2d"),a=c.getImageData(0,0,d.width,d.height),h=a.data,e=a.width,l=a.height,k,b,g,f;for(g=0;gh&&m>h&&o>h&&p(a-m)0){l[m]=o;l[m+1]=e;l[m+2]=k}}f.putImageData(c,0,0)},toJSON:function(){return{type:this.type,color:this.color}}});fabric.Image.filters.Tint.fromObject=function(a){return new fabric.Image.filters.Tint(a)};(function(b){var c=b.fabric||(b.fabric={}),e=c.util.object.extend,d=c.util.object.clone,a=c.util.toFixed;if(c.Text){c.warn("fabric.Text is already defined");return}if(!c.Object){c.warn("fabric.Text requires fabric.Object");return}c.Text=c.util.createClass(c.Object,{fontSize:40,fontWeight:100,fontFamily:"Times New Roman",textDecoration:"",textShadow:"",textAlign:"left",fontStyle:"",lineHeight:1.3,strokeStyle:"",strokeWidth:1,backgroundColor:"",path:null,type:"text",useNative:true,initialize:function(g,f){this._initStateProperties();this.text=g;this.setOptions(f||{});this._theta=this.angle*Math.PI/180;this._initDimensions();this.setCoords()},_initDimensions:function(){var f=c.document.createElement("canvas");if(!f.getContext&&typeof G_vmlCanvasManager!="undefined"){G_vmlCanvasManager.initElement(f)}this._render(f.getContext("2d"))},_initStateProperties:function(){this.stateProperties=this.stateProperties.concat();this.stateProperties.push("fontFamily","fontWeight","fontSize","path","text","textDecoration","textShadow","textAlign","fontStyle","lineHeight","strokeStyle","strokeWidth","backgroundColor","useNative");c.util.removeFromArray(this.stateProperties,"width")},toString:function(){return"#'},_render:function(f){if(typeof Cufon==="undefined"||this.useNative===true){this._renderViaNative(f)}else{this._renderViaCufon(f)}},_renderViaCufon:function(f){var h=Cufon.textOptions||(Cufon.textOptions={});h.left=this.left;h.top=this.top;h.context=f;h.color=this.fill;var g=this._initDummyElementForCufon();this.transform(f);Cufon.replaceElement(g,{engine:"canvas",separate:"none",fontFamily:this.fontFamily,fontWeight:this.fontWeight,textDecoration:this.textDecoration,textShadow:this.textShadow,textAlign:this.textAlign,fontStyle:this.fontStyle,lineHeight:this.lineHeight,strokeStyle:this.strokeStyle,strokeWidth:this.strokeWidth,backgroundColor:this.backgroundColor});this.width=h.width;this.height=h.height;this._totalLineHeight=h.totalLineHeight;this._fontAscent=h.fontAscent;this._boundaries=h.boundaries;this._shadowOffsets=h.shadowOffsets;this._shadows=h.shadows||[];g=null;this.setCoords()},_renderViaNative:function(f){this.transform(f);this._setTextStyles(f);var g=this.text.split(/\r?\n/);this.width=this._getTextWidth(f,g);this.height=this._getTextHeight(f,g);this._renderTextBackground(f,g);if(this.textAlign!=="left"){f.save();f.translate(this.textAlign==="center"?(this.width/2):this.width,0)}this._setTextShadow(f);this._renderTextFill(f,g);this.textShadow&&f.restore();this._renderTextStroke(f,g);if(this.textAlign!=="left"){f.restore()}this._renderTextDecoration(f,g);this._setBoundaries(f,g);this._totalLineHeight=0;this.setCoords()},_setBoundaries:function(h,k){this._boundaries=[];for(var j=0,g=k.length;jk){k=l}}return k},_setTextShadow:function(f){if(this.textShadow){var j=/\s+(-?\d+)(?:px)?\s+(-?\d+)(?:px)?\s+(\d+)(?:px)?\s*/;var g=this.textShadow;var i=j.exec(this.textShadow);var h=g.replace(j,"");f.save();f.shadowColor=h;f.shadowOffsetX=parseInt(i[1],10);f.shadowOffsetY=parseInt(i[2],10);f.shadowBlur=parseInt(i[3],10);this._shadows=[{blur:f.shadowBlur,color:f.shadowColor,offX:f.shadowOffsetX,offY:f.shadowOffsetY}];this._shadowOffsets=[[parseInt(f.shadowOffsetX,10),parseInt(f.shadowOffsetY,10)]]}},_renderTextFill:function(g,j){this._boundaries=[];for(var h=0,f=j.length;h-1){f.call(this,this.fontSize)}if(this.textDecoration.indexOf("line-through")>-1){f.call(this,this.fontSize/2)}if(this.textDecoration.indexOf("overline")>-1){f.call(this,0)}},_getFontDeclaration:function(){return[this.fontStyle,this.fontWeight,this.fontSize+"px",(c.isLikelyNode?('"'+this.fontFamily+'"'):this.fontFamily)].join(" ")},_initDummyElementForCufon:function(){var g=c.document.createElement("pre"),f=c.document.createElement("div");f.appendChild(g);if(typeof G_vmlCanvasManager=="undefined"){g.innerHTML=this.text}else{g.innerText=this.text.replace(/\r?\n/gi,"\r")}g.style.fontSize=this.fontSize+"px";g.style.letterSpacing="normal";return g},render:function(f,g){f.save();this._render(f);if(!g&&this.active){this.drawBorders(f);this.hideCorners||this.drawCorners(f)}f.restore()},toObject:function(){return e(this.callSuper("toObject"),{text:this.text,fontSize:this.fontSize,fontWeight:this.fontWeight,fontFamily:this.fontFamily,fontStyle:this.fontStyle,lineHeight:this.lineHeight,textDecoration:this.textDecoration,textShadow:this.textShadow,textAlign:this.textAlign,path:this.path,strokeStyle:this.strokeStyle,strokeWidth:this.strokeWidth,backgroundColor:this.backgroundColor,useNative:this.useNative})},toSVG:function(){var i=this.text.split(/\r?\n/),j=this.useNative?this.fontSize*this.lineHeight:(-this._fontAscent-((this._fontAscent/5)*this.lineHeight)),g=-(this.width/2),f=this.useNative?this.fontSize-1:(this.height/2)-(i.length*this.fontSize)-this._totalLineHeight,h=this._getSVGTextAndBg(j,g,i),k=this._getSVGShadows(j,i);f+=(this._fontAscent?((this._fontAscent/5)*this.lineHeight):0);return['',h.textBgRects.join(""),"',k.join(""),h.textSpans.join(""),"",""].join("")},_getSVGShadows:function(h,n){var o=[],k,l,p,g,f=1;if(!this._shadows||!this._boundaries){return o}for(k=0,p=this._shadows.length;k",c.util.string.escapeXml(n[l]),"");f=1}else{f++}}}return o},_getSVGTextAndBg:function(j,h,n){var g=[],k=[],l,m,o,f=1;for(l=0,o=n.length;l",c.util.string.escapeXml(n[l]),"");f=1}else{f++}if(!this.backgroundColor||!this._boundaries){continue}k.push("')}return{textSpans:g,textBgRects:k}},_getFillAttributes:function(f){var g=f?new c.Color(f):"";if(!g||!g.getSource()||g.getAlpha()===1){return'fill="'+f+'"'}return'opacity="'+g.getAlpha()+'" fill="'+g.setAlpha(1).toRgb()+'"'},setColor:function(f){this.set("fill",f);return this},setFontsize:function(f){this.set("fontSize",f);this._initDimensions();this.setCoords();return this},getText:function(){return this.text},setText:function(f){this.set("text",f);this._initDimensions();this.setCoords();return this},_set:function(f,g){if(f==="fontFamily"&&this.path){this.path=this.path.replace(/(.*?)([^\/]*)(\.font\.js)/,"$1"+g+"$3")}else{this.callSuper("_set",f,g)}}});c.Text.ATTRIBUTE_NAMES=("x y fill fill-opacity opacity stroke stroke-width transform font-family font-style font-weight font-size text-decoration").split(" ");c.Text.fromObject=function(f){return new c.Text(f.text,d(f))};c.Text.fromElement=function(g,f){if(!g){return null}var h=c.parseAttributes(g,c.Text.ATTRIBUTE_NAMES);var f=c.util.object.extend((f?c.util.object.clone(f):{}),h);var i=new c.Text(g.textContent,f);return i}})(typeof exports!="undefined"?exports:this);(function(){if(typeof document!="undefined"&&typeof window!="undefined"){return}var DOMParser=new require("xmldom").DOMParser,URL=require("url"),HTTP=require("http"),Canvas=require("canvas"),Image=require("canvas").Image;function request(url,encoding,callback){var oURL=URL.parse(url),client=HTTP.createClient(oURL.port,oURL.hostname),request=client.request("GET",oURL.pathname,{host:oURL.hostname});client.addListener("error",function(err){if(err.errno===process.ECONNREFUSED){fabric.log("ECONNREFUSED: connection refused to "+client.host+":"+client.port)}else{fabric.log(err.message)}});request.end();request.on("response",function(response){var body="";if(encoding){response.setEncoding(encoding)}response.on("end",function(){callback(body)});response.on("data",function(chunk){if(response.statusCode==200){body+=chunk}})})}fabric.util.loadImage=function(url,callback){request(url,"binary",function(body){var img=new Image();img.src=new Buffer(body,"binary");img._src=url;callback(img)})};fabric.loadSVGFromURL=function(url,callback){url=url.replace(/^\n\s*/,"").replace(/\?.*$/,"").trim();request(url,"",function(body){fabric.loadSVGFromString(body,callback)})};fabric.loadSVGFromString=function(string,callback){var doc=new DOMParser().parseFromString(string);fabric.parseSVGDocument(doc.documentElement,function(results,options){callback(results,options)})};fabric.util.getScript=function(url,callback){request(url,"",function(body){eval(body);callback&&callback()})};fabric.Image.fromObject=function(object,callback){fabric.util.loadImage(object.src,function(img){var oImg=new fabric.Image(img);oImg._initConfig(object);oImg._initFilters(object);callback(oImg)})};fabric.createCanvasForNode=function(width,height){var canvasEl=fabric.document.createElement("canvas"),nodeCanvas=new Canvas(width||600,height||600);canvasEl.style={};canvasEl.width=nodeCanvas.width;canvasEl.height=nodeCanvas.height;var canvas=fabric.Canvas||fabric.StaticCanvas;var fabricCanvas=new canvas(canvasEl);fabricCanvas.contextContainer=nodeCanvas.getContext("2d");fabricCanvas.nodeCanvas=nodeCanvas;return fabricCanvas};fabric.StaticCanvas.prototype.createPNGStream=function(){return this.nodeCanvas.createPNGStream()};if(fabric.Canvas){fabric.Canvas.prototype.createPNGStream}var origSetWidth=fabric.StaticCanvas.prototype.setWidth;fabric.StaticCanvas.prototype.setWidth=function(width){origSetWidth.call(this);this.nodeCanvas.width=width;return this};if(fabric.Canvas){fabric.Canvas.prototype.setWidth=fabric.StaticCanvas.prototype.setWidth}var origSetHeight=fabric.StaticCanvas.prototype.setHeight;fabric.StaticCanvas.prototype.setHeight=function(height){origSetHeight.call(this);this.nodeCanvas.height=height;return this};if(fabric.Canvas){fabric.Canvas.prototype.setHeight=fabric.StaticCanvas.prototype.setHeight}})(); \ No newline at end of file +var Cufon=(function(){var k=function(){return k.replace.apply(null,arguments)};var u=k.DOM={ready:(function(){var z=false,B={loaded:1,complete:1};var y=[],A=function(){if(z){return}z=true;for(var C;C=y.shift();C()){}};if(fabric.document.addEventListener){fabric.document.addEventListener("DOMContentLoaded",A,false);fabric.window.addEventListener("pageshow",A,false)}if(!fabric.window.opera&&fabric.document.readyState){(function(){B[fabric.document.readyState]?A():setTimeout(arguments.callee,10)})()}if(fabric.document.readyState&&fabric.document.createStyleSheet){(function(){try{fabric.document.body.doScroll("left");A()}catch(C){setTimeout(arguments.callee,1)}})()}o(fabric.window,"load",A);return function(C){if(!arguments.length){A()}else{z?C():y.push(C)}}})()};var l=k.CSS={Size:function(z,y){this.value=parseFloat(z);this.unit=String(z).match(/[a-z%]*$/)[0]||"px";this.convert=function(A){return A/y*this.value};this.convertFrom=function(A){return A/this.value*y};this.toString=function(){return this.value+this.unit}},getStyle:function(y){return new a(y.style)},quotedList:i(function(B){var A=[],z=/\s*((["'])([\s\S]*?[^\\])\2|[^,]+)\s*/g,y;while(y=z.exec(B)){A.push(y[3]||y[1])}return A}),ready:(function(){var A=false;var z=[],B=function(){A=true;for(var D;D=z.shift();D()){}};var y=Object.prototype.propertyIsEnumerable?f("style"):{length:0};var C=f("link");u.ready(function(){var G=0,F;for(var E=0,D=C.length;F=C[E],E=y.length+G){B()}else{setTimeout(arguments.callee,10)}});return function(D){if(A){D()}else{z.push(D)}}})(),supports:function(A,z){var y=fabric.document.createElement("span").style;if(y[A]===undefined){return false}y[A]=z;return y[A]===z},textAlign:function(B,A,y,z){if(A.get("textAlign")=="right"){if(y>0){B=" "+B}}else{if(y400}if(F==500){F=400}for(var G in D){G=parseInt(G,10);if(!C||GA){A=G}H.push(G)}if(FA){F=A}H.sort(function(J,I){return(B?(J>F&&I>F)?JI:(JI:Jz){z=e}L.push(e);e=0;continue}var B=ab.glyphs[ag[aa]]||ab.missingGlyph;if(!B){continue}e+=D=Number(B.w||ab.w)+U}L.push(e);e=Math.max(z,e);var m=[];for(var aa=L.length;aa--;){m[aa]=e-L[aa]}if(D===null){return null}V+=(H.width-D);C+=H.minX;var v,p;if(n){v=J;p=J.firstChild}else{v=fabric.document.createElement("span");v.className="cufon cufon-canvas";v.alt=E;p=fabric.document.createElement("canvas");v.appendChild(p);if(A.printable){var Y=fabric.document.createElement("span");Y.className="cufon-alt";Y.appendChild(fabric.document.createTextNode(E));v.appendChild(Y)}}var ah=v.style;var O=p.style||{};var k=o.convert(H.height-I+T);var af=Math.ceil(k);var S=af/k;p.width=Math.ceil(o.convert(e+V-C)*S);p.height=af;I+=H.minY;O.top=Math.round(o.convert(I-ab.ascent))+"px";O.left=Math.round(o.convert(C))+"px";var j=Math.ceil(o.convert(e*S));var t=j+"px";var s=o.convert(ab.height);var F=(A.lineHeight-1)*o.convert(-ab.ascent/5)*(M-1);Cufon.textOptions.width=j;Cufon.textOptions.height=(s*M)+F;Cufon.textOptions.lines=M;Cufon.textOptions.totalLineHeight=F;if(a){ah.width=t;ah.height=s+"px"}else{ah.paddingLeft=t;ah.paddingBottom=(s-1)+"px"}var ad=Cufon.textOptions.context||p.getContext("2d"),K=af/H.height;Cufon.textOptions.fontAscent=ab.ascent*K;Cufon.textOptions.boundaries=null;for(var w=Cufon.textOptions.shadowOffsets,aa=R.length;aa--;){w[aa]=[R[aa][0]*K,R[aa][1]*K]}ad.save();ad.scale(K,K);ad.translate(-C-((1/K*p.width)/2)+(Cufon.fonts[ab.family].offsetLeft||0),-I-((Cufon.textOptions.height/K)/2)+(Cufon.fonts[ab.family].offsetTop||0));ad.lineWidth=ab.face["underline-thickness"];ad.save();function q(l,i){ad.strokeStyle=i;ad.beginPath();ad.moveTo(0,l);ad.lineTo(e,l);ad.stroke()}var r=Cufon.getTextDecoration(A),u=A.fontStyle==="italic";function ae(){ad.save();ad.fillStyle=A.backgroundColor;var aj=0,an=0,y=[{left:0}];if(A.textAlign==="right"){ad.translate(m[an],0);y[0].left=m[an]*K}else{if(A.textAlign==="center"){ad.translate(m[an]/2,0);y[0].left=m[an]/2*K}}for(var al=0,ak=ag.length;al.cufon-vml-canvas{text-indent:0}@media screen{cvml\\:shape,cvml\\:shadow{behavior:url(#default#VML);display:block;antialias:true;position:absolute}.cufon-vml-canvas{position:absolute;text-align:left}.cufon-vml{display:inline-block;position:relative;vertical-align:middle}.cufon-vml .cufon-alt{position:absolute;left:-10000in;font-size:1px}a .cufon-vml{cursor:pointer}}@media print{.cufon-vml *{display:none}.cufon-vml .cufon-alt{display:inline}}');function c(e,f){return a(e,/(?:em|ex|%)$/i.test(f)?"1em":f)}function a(h,i){if(/px$/i.test(i)){return parseFloat(i)}var g=h.style.left,f=h.runtimeStyle.left;h.runtimeStyle.left=h.currentStyle.left;h.style.left=i;var e=h.style.pixelLeft;h.style.left=g;h.runtimeStyle.left=f;return e}return function(T,z,O,w,D,U,M){var h=(z===null);if(h){z=D.alt}var B=T.viewBox;var j=O.computedFontSize||(O.computedFontSize=new Cufon.CSS.Size(c(U,O.get("fontSize"))+"px",T.baseSize));var L=O.computedLSpacing;if(L==undefined){L=O.get("letterSpacing");O.computedLSpacing=L=(L=="normal")?0:~~j.convertFrom(a(U,L))}var t,m;if(h){t=D;m=D.firstChild}else{t=fabric.document.createElement("span");t.className="cufon cufon-vml";t.alt=z;m=fabric.document.createElement("span");m.className="cufon-vml-canvas";t.appendChild(m);if(w.printable){var R=fabric.document.createElement("span");R.className="cufon-alt";R.appendChild(fabric.document.createTextNode(z));t.appendChild(R)}if(!M){t.appendChild(fabric.document.createElement("cvml:shape"))}}var Z=t.style;var G=m.style;var f=j.convert(B.height),W=Math.ceil(f);var K=W/f;var J=B.minX,I=B.minY;G.height=W;G.top=Math.round(j.convert(I-T.ascent));G.left=Math.round(j.convert(J));Z.height=j.convert(T.height)+"px";var p=Cufon.getTextDecoration(w);var y=O.get("color");var X=Cufon.CSS.textTransform(z,O).split("");var e=0,H=0,q=null;var x,r,A=w.textShadow;for(var S=0,Q=0,P=X.length;Sw?p:(o-n);s(t(currentTime,m,byValue,p));if(o>w||q()){x.onComplete&&x.onComplete();return}k(r)})()}var f=fabric.window.requestAnimationFrame||fabric.window.webkitRequestAnimationFrame||fabric.window.mozRequestAnimationFrame||fabric.window.oRequestAnimationFrame||fabric.window.msRequestAnimationFrame||function(n,m){fabric.window.setTimeout(n,1000/60)};var k=function(){return f.apply(fabric.window,arguments)};function b(n,p,o){if(n){var m=new Image();m.onload=function(){p&&p.call(o,m);m=m.onload=null};m.src=n}else{p&&p.call(o,n)}}function i(p,s){function o(t){return fabric[fabric.util.string.camelize(fabric.util.string.capitalize(t))]}function n(){if(++r===m){if(s){s(q)}}}var q=[],r=0,m=p.length;p.forEach(function(v,u){if(!v.type){return}var t=o(v.type);if(t.async){t.fromObject(v,function(w){q[u]=w;n()})}else{q[u]=t.fromObject(v);n()}})}function a(o,n,p){var m=o.length>1?new fabric.PathGroup(o,n):o[0];if(typeof p!=="undefined"){m.setSourcePath(p)}return m}fabric.util.removeFromArray=j;fabric.util.degreesToRadians=c;fabric.util.toFixed=e;fabric.util.getRandomInt=g;fabric.util.falseFunction=l;fabric.util.animate=d;fabric.util.requestAnimFrame=k;fabric.util.loadImage=b;fabric.util.enlivenObjects=i;fabric.util.groupSVGElements=a})();(function(){var d=Array.prototype.slice;if(!Array.prototype.indexOf){Array.prototype.indexOf=function(g){if(this===void 0||this===null){throw new TypeError()}var h=Object(this),e=h.length>>>0;if(e===0){return -1}var i=0;if(arguments.length>0){i=Number(arguments[1]);if(i!==i){i=0}else{if(i!==0&&i!==(1/0)&&i!==-(1/0)){i=(i>0||-1)*Math.floor(Math.abs(i))}}}if(i>=e){return -1}var f=i>=0?i:Math.max(e-Math.abs(i),0);for(;f>>0;f>>0;g>>0;f>>0;f>>0;g>>0,f=0,h;if(arguments.length>1){h=arguments[1]}else{do{if(f in this){h=this[f++];break}if(++f>=e){throw new TypeError()}}while(true)}for(;f=e){e=h[f][g]}}}else{while(f--){if(h[f]>=e){e=h[f]}}}return e}function c(h,g){if(!h||h.length===0){return undefined}var f=h.length-1,e=g?h[f][g]:h[f];if(g){while(f--){if(h[f][g]/g,">")}fabric.util.string={camelize:b,capitalize:c,escapeXml:a}}());(function(){var c=Array.prototype.slice,a=Function.prototype.apply,b=function(){};if(!Function.prototype.bind){Function.prototype.bind=function(d){var g=this,e=c.call(arguments,1),f;if(e.length){f=function(){return a.call(g,this instanceof b?this:d,e.concat(c.call(arguments)))}}else{f=function(){return a.call(g,this instanceof b?this:d,arguments)}}b.prototype=this.prototype;f.prototype=new b;return f}}})();(function(){var f=Array.prototype.slice,e=function(){};var c=(function(){for(var g in {toString:1}){if(g==="toString"){return false}}return true})();var b=function(g,j,h){for(var i in j){if(i in g.prototype&&typeof g.prototype[i]=="function"){g.prototype[i]=(function(k){return function(){var m=this.constructor.superclass;this.constructor.superclass=h;var l=j[k].apply(this,arguments);this.constructor.superclass=m;if(k!=="initialize"){return l}}})(i)}else{g.prototype[i]=j[i]}if(c){if(j.toString!==Object.prototype.toString){g.prototype.toString=j.toString}if(j.valueOf!==Object.prototype.valueOf){g.prototype.valueOf=j.valueOf}}}};function a(){}function d(){var k=null,j=f.call(arguments,0);if(typeof j[0]==="function"){k=j.shift()}function g(){this.initialize.apply(this,arguments)}g.superclass=k;g.subclasses=[];if(k){a.prototype=k.prototype;g.prototype=new a;k.subclasses.push(g)}for(var h=0,l=j.length;h-1?c(j,l.match(/opacity:\s*(\d?\.?\d*)/)[1]):j}for(var m in l){if(m==="opacity"){c(j,l[m])}else{var k=(m==="float"||m==="cssFloat")?(typeof n.styleFloat==="undefined"?"cssFloat":"styleFloat"):m;n[k]=l[m]}}return j}var h=fabric.document.createElement("div"),g=typeof h.style.opacity==="string",b=typeof h.style.filter==="string",a=fabric.document.defaultView,f=a&&typeof a.getComputedStyle!=="undefined",d=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,c=function(i){return i};if(g){c=function(i,j){i.style.opacity=j;return i}}else{if(b){c=function(i,j){var k=i.style;if(i.currentStyle&&!i.currentStyle.hasLayout){k.zoom=1}if(d.test(k.filter)){j=j>=0.9999?"":("alpha(opacity="+(j*100)+")");k.filter=k.filter.replace(d,j)}else{k.filter+=" alpha(opacity="+(j*100)+")"}return i}}}fabric.util.setStyle=e})();(function(){var h=Array.prototype.slice;function g(j){return typeof j==="string"?fabric.document.getElementById(j):j}function b(j){return h.call(j,0)}try{var i=b(fabric.document.childNodes) instanceof Array}catch(a){}if(!i){b=function(k){var j=new Array(k.length),l=k.length;while(l--){j[l]=k[l]}return j}}function c(k,j){var l=fabric.document.createElement(k);for(var m in j){if(m==="class"){l.className=j[m]}else{if(m==="for"){l.htmlFor=j[m]}else{l.setAttribute(m,j[m])}}}return l}function f(j,k){if((" "+j.className+" ").indexOf(" "+k+" ")===-1){j.className+=(j.className?" ":"")+k}}function e(k,l,j){if(typeof l==="string"){l=c(l,j)}if(k.parentNode){k.parentNode.replaceChild(l,k)}l.appendChild(k);return l}function d(k){var j=0,l=0;do{j+=k.offsetTop||0;l+=k.offsetLeft||0;k=k.offsetParent}while(k);return({left:l,top:j})}(function(){var k=fabric.document.documentElement.style;var l="userSelect" in k?"userSelect":"MozUserSelect" in k?"MozUserSelect":"WebkitUserSelect" in k?"WebkitUserSelect":"KhtmlUserSelect" in k?"KhtmlUserSelect":"";function m(n){if(typeof n.onselectstart!=="undefined"){n.onselectstart=fabric.util.falseFunction}if(l){n.style[l]="none"}else{if(typeof n.unselectable=="string"){n.unselectable="on"}}return n}function j(n){if(typeof n.onselectstart!=="undefined"){n.onselectstart=null}if(l){n.style[l]=""}else{if(typeof n.unselectable=="string"){n.unselectable=""}}return n}fabric.util.makeElementUnselectable=m;fabric.util.makeElementSelectable=j})();(function(){function j(k,o){var m=fabric.document.getElementsByTagName("head")[0],l=fabric.document.createElement("script"),n=true;l.type="text/javascript";l.setAttribute("runat","server");l.onload=l.onreadystatechange=function(p){if(n){if(typeof this.readyState=="string"&&this.readyState!=="loaded"&&this.readyState!=="complete"){return}n=false;o(p||fabric.window.event);l=l.onload=l.onreadystatechange=null}};l.src=k;m.appendChild(l)}fabric.util.getScript=j})();fabric.util.getById=g;fabric.util.toArray=b;fabric.util.makeElement=c;fabric.util.addClass=f;fabric.util.wrapElement=e;fabric.util.getElementOffset=d})();(function(){function d(e,f){return e+(/\?/.test(e)?"&":"?")+f}var c=(function(){var h=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP.3.0")},function(){return new XMLHttpRequest()}];for(var e=h.length;e--;){try{var g=h[e]();if(g){return h[e]}}catch(f){}}})();function a(){}function b(g,f){f||(f={});var j=f.method?f.method.toUpperCase():"GET",i=f.onComplete||function(){},h=c(),e;h.onreadystatechange=function(){if(h.readyState===4){i(h);h.onreadystatechange=a}};if(j==="GET"){e=null;if(typeof f.parameters=="string"){g=d(g,f.parameters)}}h.open(j,g,true);if(j==="POST"||j==="PUT"){h.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}h.send(e);return h}fabric.util.request=b})();(function(){function d(F,E,H,G){return H*(F/=G)*F+E}function l(F,E,H,G){return -H*(F/=G)*(F-2)+E}function r(F,E,H,G){if((F/=G/2)<1){return H/2*F*F+E}return -H/2*((--F)*(F-2)-1)+E}function B(F,E,H,G){return H*(F/=G)*F*F+E}function q(F,E,H,G){return H*((F=F/G-1)*F*F+1)+E}function u(F,E,H,G){if((F/=G/2)<1){return H/2*F*F*F+E}return H/2*((F-=2)*F*F+2)+E}function t(F,E,H,G){return H*(F/=G)*F*F*F+E}function g(F,E,H,G){return -H*((F=F/G-1)*F*F*F-1)+E}function k(F,E,H,G){if((F/=G/2)<1){return H/2*F*F*F*F+E}return -H/2*((F-=2)*F*F*F-2)+E}function y(F,E,H,G){return H*(F/=G)*F*F*F*F+E}function j(F,E,H,G){return H*((F=F/G-1)*F*F*F*F+1)+E}function n(F,E,H,G){if((F/=G/2)<1){return H/2*F*F*F*F*F+E}return H/2*((F-=2)*F*F*F*F+2)+E}function f(F,E,H,G){return -H*Math.cos(F/G*(Math.PI/2))+H+E}function o(F,E,H,G){return H*Math.sin(F/G*(Math.PI/2))+E}function v(F,E,H,G){return -H/2*(Math.cos(Math.PI*F/G)-1)+E}function D(F,E,H,G){return(F==0)?E:H*Math.pow(2,10*(F/G-1))+E}function c(F,E,H,G){return(F==G)?E+H:H*(-Math.pow(2,-10*F/G)+1)+E}function i(F,E,H,G){if(F==0){return E}if(F==G){return E+H}if((F/=G/2)<1){return H/2*Math.pow(2,10*(F-1))+E}return H/2*(-Math.pow(2,-10*--F)+2)+E}function h(F,E,H,G){return -H*(Math.sqrt(1-(F/=G)*F)-1)+E}function p(F,E,H,G){return H*Math.sqrt(1-(F=F/G-1)*F)+E}function x(F,E,H,G){if((F/=G/2)<1){return -H/2*(Math.sqrt(1-F*F)-1)+E}return H/2*(Math.sqrt(1-(F-=2)*F)+1)+E}function s(G,E,K,J){var H=1.70158;var I=0;var F=K;if(G==0){return E}if((G/=J)==1){return E+K}if(!I){I=J*0.3}if(F-1;w=w.split(/\s+/);var u=[];if(y){for(var v=0,t=w.length;v/i,""))}if(!x.documentElement){return}h.parseSVGDocument(x.documentElement,function(A,z){k.set(u,{objects:h.util.array.invoke(A,"toObject"),options:z});w(A,z)},t)}}function b(v){var u=v.objects,t=v.options;u=u.map(function(w){return h[f(w.type)].fromObject(w)});return({objects:u,options:t})}function n(u,x,t){u=u.trim();var v;if(typeof DOMParser!=="undefined"){var w=new DOMParser();if(w&&w.parseFromString){v=w.parseFromString(u,"text/xml")}}else{if(h.window.ActiveXObject){var v=new ActiveXObject("Microsoft.XMLDOM");v.async="false";v.loadXML(u.replace(//i,""))}}h.parseSVGDocument(v.documentElement,function(z,y){x(z,y)},t)}function m(w){var u="";for(var v=0,t=w.length;v",'",""].join("")}return u}p(h,{parseAttributes:e,parseElements:g,parseStyleAttribute:i,parsePointsAttribute:s,getCSSRules:d,loadSVGFromURL:c,loadSVGFromString:n,createSVGFontFacesMarkup:m})})(typeof exports!="undefined"?exports:this);(function(){function c(h){var g=h.getAttribute("style");if(g){var k=g.split(/\s*;\s*/);if(k[k.length-1]===""){k.pop()}for(var f=k.length;f--;){var e=k[f].split(/\s*:\s*/),d=e[0].trim(),j=e[1].trim();if(d==="stop-color"){return j}}}}fabric.Gradient=fabric.util.createClass({initialize:function(d){d||(d={});this.x1=d.x1||0;this.y1=d.y1||0;this.x2=d.x2||0;this.y2=d.y2||0;this.colorStops=d.colorStops},toObject:function(){return{x1:this.x1,x2:this.x2,y1:this.y1,y2:this.y2,colorStops:this.colorStops}},toLiveGradient:function(e){var g=e.createLinearGradient(this.x1,this.y1,this.x2||e.canvas.width,this.y2);for(var d in this.colorStops){var f=this.colorStops[d];g.addColorStop(parseFloat(d),f)}return g}});fabric.util.object.extend(fabric.Gradient,{fromElement:function(h,e){var l=h.getElementsByTagName("stop"),h,k,f={},d,j={x1:h.getAttribute("x1")||0,y1:h.getAttribute("y1")||0,x2:h.getAttribute("x2")||"100%",y2:h.getAttribute("y2")||0};for(var g=l.length;g--;){h=l[g];k=h.getAttribute("offset");k=parseFloat(k)/(/%$/.test(k)?100:1);f[k]=c(h)||h.getAttribute("stop-color")}a(e,j);return new fabric.Gradient({x1:j.x1,y1:j.y1,x2:j.x2,y2:j.y2,colorStops:f})},forObject:function(e,d){d||(d={});a(e,d);return new fabric.Gradient(d)}});function a(f,e){for(var g in e){if(typeof e[g]==="string"&&/^\d+%$/.test(e[g])){var d=parseFloat(e[g],10);if(g==="x1"||g==="x2"){e[g]=f.width*d/100}else{if(g==="y1"||g==="y2"){e[g]=f.height*d/100}}}if(g==="x1"||g==="x2"){e[g]-=f.width/2}else{if(g==="y1"||g==="y2"){e[g]-=f.height/2}}}}function b(j){var f=j.getElementsByTagName("linearGradient"),d=j.getElementsByTagName("radialGradient"),g,h={};for(var e=f.length;e--;){g=f[e];h[g.getAttribute("id")]=g}for(var e=d.length;e--;){g=d[e];h[g.getAttribute("id")]=g}return h}fabric.getGradientDefs=b})();(function(b){var c=b.fabric||(b.fabric={});if(c.Point){c.warn("fabric.Point is already defined");return}c.Point=a;function a(d,e){if(arguments.length>0){this.init(d,e)}}a.prototype={constructor:a,init:function(d,e){this.x=d;this.y=e},add:function(d){return new a(this.x+d.x,this.y+d.y)},addEquals:function(d){this.x+=d.x;this.y+=d.y;return this},scalarAdd:function(d){return new a(this.x+d,this.y+d)},scalarAddEquals:function(d){this.x+=d;this.y+=d;return this},subtract:function(d){return new a(this.x-d.x,this.y-d.y)},subtractEquals:function(d){this.x-=d.x;this.y-=d.y;return this},scalarSubtract:function(d){return new a(this.x-d,this.y-d)},scalarSubtractEquals:function(d){this.x-=d;this.y-=d;return this},multiply:function(d){return new a(this.x*d,this.y*d)},multiplyEquals:function(d){this.x*=d;this.y*=d;return this},divide:function(d){return new a(this.x/d,this.y/d)},divideEquals:function(d){this.x/=d;this.y/=d;return this},eq:function(d){return(this.x==d.x&&this.y==d.y)},lt:function(d){return(this.xd.x&&this.y>d.y)},gte:function(d){return(this.x>=d.x&&this.y>=d.y)},lerp:function(e,d){return new a(this.x+(e.x-this.x)*d,this.y+(e.y-this.y)*d)},distanceFrom:function(f){var e=this.x-f.x,d=this.y-f.y;return Math.sqrt(e*e+d*d)},min:function(d){return new a(Math.min(this.x,d.x),Math.min(this.y,d.y))},max:function(d){return new a(Math.max(this.x,d.x),Math.max(this.y,d.y))},toString:function(){return this.x+","+this.y},setXY:function(d,e){this.x=d;this.y=e},setFromPoint:function(d){this.x=d.x;this.y=d.y},swap:function(e){var d=this.x,f=this.y;this.x=e.x;this.y=e.y;e.x=d;e.y=f}}})(typeof exports!="undefined"?exports:this);(function(a){var b=a.fabric||(a.fabric={});if(b.Intersection){b.warn("fabric.Intersection is already defined");return}function c(d){if(arguments.length>0){this.init(d)}}b.Intersection=c;b.Intersection.prototype={init:function(d){this.status=d;this.points=[]},appendPoint:function(d){this.points.push(d)},appendPoints:function(d){this.points=this.points.concat(d)}};b.Intersection.intersectLineLine=function(h,f,l,k){var m,i=(k.x-l.x)*(h.y-l.y)-(k.y-l.y)*(h.x-l.x),j=(f.x-h.x)*(h.y-l.y)-(f.y-h.y)*(h.x-l.x),g=(k.y-l.y)*(f.x-h.x)-(k.x-l.x)*(f.y-h.y);if(g!=0){var e=i/g,d=j/g;if(0<=e&&e<=1&&0<=d&&d<=1){m=new c("Intersection");m.points.push(new b.Point(h.x+e*(f.x-h.x),h.y+e*(f.y-h.y)))}else{m=new c("No Intersection")}}else{if(i==0||j==0){m=new c("Coincident")}else{m=new c("Parallel")}}return m};b.Intersection.intersectLinePolygon=function(e,d,l){var m=new c("No Intersection"),f=l.length;for(var h=0;h0){m.status="Intersection"}return m};b.Intersection.intersectPolygonPolygon=function(j,h){var f=new c("No Intersection"),l=j.length;for(var k=0;k0){f.status="Intersection"}return f};b.Intersection.intersectPolygonRectangle=function(n,e,d){var g=e.min(d),m=e.max(d),f=new b.Point(m.x,g.y),l=new b.Point(g.x,m.y),k=c.intersectLinePolygon(g,f,n),j=c.intersectLinePolygon(f,m,n),i=c.intersectLinePolygon(m,l,n),h=c.intersectLinePolygon(l,g,n),o=new c("No Intersection");o.appendPoints(k.points);o.appendPoints(j.points);o.appendPoints(i.points);o.appendPoints(h.points);if(o.points.length>0){o.status="Intersection"}return o}})(typeof exports!="undefined"?exports:this);(function(a){var b=a.fabric||(a.fabric={});if(b.Color){b.warn("fabric.Color is already defined.");return}function c(d){if(!d){this.setSource([0,0,0,1])}else{this._tryParsingColor(d)}}b.Color=c;b.Color.prototype={_tryParsingColor:function(d){var e=c.sourceFromHex(d);if(!e){e=c.sourceFromRgb(d)}if(e){this.setSource(e)}},getSource:function(){return this._source},setSource:function(d){this._source=d},toRgb:function(){var d=this.getSource();return"rgb("+d[0]+","+d[1]+","+d[2]+")"},toRgba:function(){var d=this.getSource();return"rgba("+d[0]+","+d[1]+","+d[2]+","+d[3]+")"},toHex:function(){var h=this.getSource();var f=h[0].toString(16);f=(f.length==1)?("0"+f):f;var e=h[1].toString(16);e=(e.length==1)?("0"+e):e;var d=h[2].toString(16);d=(d.length==1)?("0"+d):d;return f.toUpperCase()+e.toUpperCase()+d.toUpperCase()},getAlpha:function(){return this.getSource()[3]},setAlpha:function(e){var d=this.getSource();d[3]=e;this.setSource(d);return this},toGrayscale:function(){var f=this.getSource(),e=parseInt((f[0]*0.3+f[1]*0.59+f[2]*0.11).toFixed(0),10),d=f[3];this.setSource([e,e,e,d]);return this},toBlackWhite:function(d){var g=this.getSource(),f=(g[0]*0.3+g[1]*0.59+g[2]*0.11).toFixed(0),e=g[3],d=d||127;f=(Number(f)','',"',"Created with Fabric.js ",fabric.version,"",fabric.createSVGFontFacesMarkup(this.getObjects())];if(this.backgroundImage){h.push('')}for(var j=0,k=this.getObjects(),g=k.length;j");return h.join("")},isEmpty:function(){return this._objects.length===0},remove:function(g){e(this._objects,g);if(this.getActiveObject()===g){this.fire("before:selection:cleared",{target:g});this.discardActiveObject();this.fire("selection:cleared")}this.renderAll();return g},sendToBack:function(g){e(this._objects,g);this._objects.unshift(g);return this.renderAll()},bringToFront:function(g){e(this._objects,g);this._objects.push(g);return this.renderAll()},sendBackwards:function(j){var h=this._objects.indexOf(j),g=h;if(h!==0){for(var k=h-1;k>=0;--k){if(j.intersectsWithObject(this._objects[k])||j.isContainedWithinObject(this._objects[k])){g=k;break}}e(this._objects,j);this._objects.splice(g,0,j)}return this.renderAll()},bringForward:function(k){var n=this.getObjects(),h=n.indexOf(k),g=h;if(h!==n.length-1){for(var m=h+1,j=this._objects.length;m"};f(fabric.StaticCanvas,{EMPTY_JSON:'{"objects": [], "background": "white"}',toGrayscale:function(l){var k=l.getContext("2d"),g=k.getImageData(0,0,l.width,l.height),p=g.data,m=g.width,r=g.height,q,h,o,n;for(o=0;o0)?0:-v),r.ey-((u>0)?0:-u),t,s);this.contextTop.lineWidth=this.selectionLineWidth;this.contextTop.strokeStyle=this.selectionBorderColor;this.contextTop.strokeRect(r.ex+a-((v>0)?0:t),r.ey+a-((u>0)?0:s),t,s)},_findSelectedObjects:function(x){var y,t,D=[],s=this._groupSelector.ex,C=this._groupSelector.ey,r=s+this._groupSelector.left,A=C+this._groupSelector.top,z,w=new fabric.Point(f(s,r),f(C,A)),B=new fabric.Point(l(s,r),l(C,A));for(var u=0,v=this._objects.length;u1){var D=new fabric.Group(D);this.setActiveGroup(D);D.saveCoords();this.fire("selection:created",{target:D})}}this.renderAll()},findTarget:function(v,s){var u,w=this.getPointer(v);var t=this.getActiveGroup();if(t&&!s&&this.containsPoint(v,t)){u=t;return u}for(var r=this._objects.length;r--;){if(this._objects[r]&&this.containsPoint(v,this._objects[r])){u=this._objects[r];this.relatedTarget=u;break}}if(u&&u.selectable){return u}},getPointer:function(r){var s=q(r);return{x:s.x-this._offset.left,y:s.y-this._offset.top}},_createUpperCanvas:function(){this.upperCanvasEl=this._createCanvasElement();this.upperCanvasEl.className="upper-canvas";this.wrapperEl.appendChild(this.upperCanvasEl);this._applyCanvasStyle(this.upperCanvasEl);this.contextTop=this.upperCanvasEl.getContext("2d")},_initWrapperElement:function(){this.wrapperEl=fabric.util.wrapElement(this.lowerCanvasEl,"div",{"class":this.containerClass});fabric.util.setStyle(this.wrapperEl,{width:this.getWidth()+"px",height:this.getHeight()+"px",position:"relative"});fabric.util.makeElementUnselectable(this.wrapperEl)},_applyCanvasStyle:function(s){var t=this.getWidth()||s.width,r=this.getHeight()||s.height;fabric.util.setStyle(s,{position:"absolute",width:t+"px",height:r+"px",left:0,top:0});s.width=t;s.height=r;fabric.util.makeElementUnselectable(s)},getSelectionContext:function(){return this.contextTop},getSelectionElement:function(){return this.upperCanvasEl},setActiveObject:function(r,s){if(this._activeObject){this._activeObject.setActive(false)}this._activeObject=r;r.setActive(true);this.renderAll();this.fire("object:selected",{target:r,e:s});r.fire("selected",{e:s});return this},getActiveObject:function(){return this._activeObject},discardActiveObject:function(){if(this._activeObject){this._activeObject.setActive(false)}this._activeObject=null;return this},setActiveGroup:function(r){this._activeGroup=r;r&&r.setActive(true);return this},getActiveGroup:function(){return this._activeGroup},discardActiveGroup:function(){var r=this.getActiveGroup();if(r){r.destroy()}return this.setActiveGroup(null)},deactivateAll:function(){var s=this.getObjects(),t=0,r=s.length;for(;t1)?q.apply(this,o.call(arguments,1)):q.call(this)},initialize:function(i){if(i){this.setOptions(i);this._initGradient(i)}},_initGradient:function(i){if(i.fill&&typeof i.fill=="object"&&!(i.fill instanceof d.Gradient)){this.set("fill",new d.Gradient(i.fill))}},setOptions:function(q){var r=this.stateProperties.length,s;while(r--){s=this.stateProperties[r];if(s in q){this.set(s,q[s])}}},transform:function(i){i.globalAlpha=this.opacity;i.translate(this.left,this.top);i.rotate(this._theta);i.scale(this.scaleX*(this.flipX?-1:1),this.scaleY*(this.flipY?-1:1))},toObject:function(){var q=d.Object.NUM_FRACTION_DIGITS;var i={type:this.type,left:c(this.left,q),top:c(this.top,q),width:c(this.width,q),height:c(this.height,q),fill:(this.fill&&this.fill.toObject)?this.fill.toObject():this.fill,overlayFill:this.overlayFill,stroke:this.stroke,strokeWidth:this.strokeWidth,strokeDashArray:this.strokeDashArray,scaleX:c(this.scaleX,q),scaleY:c(this.scaleY,q),angle:c(this.getAngle(),q),flipX:this.flipX,flipY:this.flipY,opacity:c(this.opacity,q),selectable:this.selectable,hasControls:this.hasControls,hasBorders:this.hasBorders,hasRotatingPoint:this.hasRotatingPoint};if(!this.includeDefaultValues){i=this._removeDefaultValues(i)}return i},toDatalessObject:function(){return this.toObject()},getSvgStyles:function(){return["stroke: ",(this.stroke?this.stroke:"none"),"; ","stroke-width: ",(this.strokeWidth?this.strokeWidth:"0"),"; ","stroke-dasharray: ",(this.strokeDashArray?this.strokeDashArray.join(" "):"; "),"fill: ",(this.fill?this.fill:"none"),"; ","opacity: ",(this.opacity?this.opacity:"1"),";"].join("")},getSvgTransform:function(){var i=this.getAngle();return["translate(",c(this.left,2)," ",c(this.top,2),")",i!==0?(" rotate("+c(i,2)+")"):"",(this.scaleX===1&&this.scaleY===1)?"":(" scale("+c(this.scaleX,2)+" "+c(this.scaleY,2)+")")].join("")},_removeDefaultValues:function(q){var i=d.Object.prototype.options;if(i){this.stateProperties.forEach(function(r){if(q[r]===i[r]){delete q[r]}})}return q},isActive:function(){return !!this.active},setActive:function(i){this.active=!!i;return this},toString:function(){return"#"},set:function(i,q){if(typeof i==="object"){for(var r in i){this._set(r,i[r])}}else{if(typeof q==="function"){this._set(i,q(this.get(i)))}else{this._set(i,q)}}return this},_set:function(i,q){var r=(i==="scaleX"||i==="scaleY")&&q1?this.strokeWidth:0,B=this.padding;this.currentWidth=(this.width+z)*this.scaleX+B*2;this.currentHeight=(this.height+z)*this.scaleY+B*2;this._hypotenuse=Math.sqrt(Math.pow(this.currentWidth/2,2)+Math.pow(this.currentHeight/2,2));this._angle=Math.atan(this.currentHeight/this.currentWidth);var w=Math.cos(this._angle+this._theta)*this._hypotenuse,v=Math.sin(this._angle+this._theta)*this._hypotenuse,r=this._theta,A=Math.sin(r),y=Math.cos(r);var E={x:this.left-w,y:this.top-v};var x={x:E.x+(this.currentWidth*y),y:E.y+(this.currentWidth*A)};var D={x:x.x-(this.currentHeight*A),y:x.y+(this.currentHeight*y)};var s={x:E.x-(this.currentHeight*A),y:E.y+(this.currentHeight*y)};var u={x:E.x-(this.currentHeight/2*A),y:E.y+(this.currentHeight/2*y)};var i={x:E.x+(this.currentWidth/2*y),y:E.y+(this.currentWidth/2*A)};var q={x:x.x-(this.currentHeight/2*A),y:x.y+(this.currentHeight/2*y)};var C={x:s.x+(this.currentWidth/2*y),y:s.y+(this.currentWidth/2*A)};var t={x:E.x+(this.currentWidth/2*y),y:E.y+(this.currentWidth/2*A)};this.oCoords={tl:E,tr:x,br:D,bl:s,ml:u,mt:i,mr:q,mb:C,mtr:t};this._setCornerCoords();return this},getBoundingRectWidth:function(){var q=[this.oCoords.tl.x,this.oCoords.tr.x,this.oCoords.br.x,this.oCoords.bl.x];var i=d.util.array.min(q);var r=d.util.array.max(q);return Math.abs(i-r)},getBoundingRectHeight:function(){var i=[this.oCoords.tl.y,this.oCoords.tr.y,this.oCoords.br.y,this.oCoords.bl.y];var r=d.util.array.min(i);var q=d.util.array.max(i);return Math.abs(r-q)},drawBorders:function(A){if(!this.hasBorders){return}var t=d.Object.MIN_SCALE_LIMIT,v=this.padding,i=v*2,u=this.strokeWidth>1?this.strokeWidth:0;A.save();A.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1;A.strokeStyle=this.borderColor;var z=1/(this.scaleXi){var C=x-i}if(E){z+=(D*E)-(C*E||0)}else{v+=(D*y)-(C*y||0)}B[1&s?"moveTo":"lineTo"](z,v);if(s>=u){s=0}}}q(1,0);q(0,1);q(-1,0);q(0,-1);B.stroke();B.closePath();B.restore()},drawCorners:function(A){if(!this.hasControls){return}var w=this.cornersize,r=w/2,i=this.strokeWidth/2,q=-(this.width/2),u=-(this.height/2),G,B,y=w/this.scaleX,v=w/this.scaleY,D=this.padding/this.scaleX,C=this.padding/this.scaleY,E=r/this.scaleY,F=r/this.scaleX,t=(r-w)/this.scaleX,s=(r-w)/this.scaleY,x=this.height,z=this.width;A.save();A.lineWidth=1/Math.max(this.scaleX,this.scaleY);A.globalAlpha=this.isMoving?this.borderOpacityWhenMoving:1;A.strokeStyle=A.fillStyle=this.cornerColor;G=q-F-i-D;B=u-E-i-C;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);G=q+z-F+i+D;B=u-E-i-C;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);G=q-F-i-D;B=u+x+s+i+C;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);G=q+z+t+i+D;B=u+x+s+i+C;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);if(!this.lockUniScaling){G=q+z/2-F;B=u-E-i-C;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);G=q+z/2-F;B=u+x+s+i+C;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);G=q+z+t+i+D;B=u+x/2-E;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v);G=q-F-i-D;B=u+x/2-E;A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v)}if(this.hasRotatingPoint){G=q+z/2-F;B=this.flipY?(u+x+(this.rotatingPointOffset/this.scaleY)-v/2+i+C):(u-(this.rotatingPointOffset/this.scaleY)-v/2-i-C);A.clearRect(G,B,y,v);A.strokeRect(G,B,y,v)}A.restore();return this},clone:function(i){if(this.constructor.fromObject){return this.constructor.fromObject(this.toObject(),i)}return new d.Object(this.toObject())},cloneAsImage:function(s){if(d.Image){var q=new Image();q.onload=function(){if(s){s(new d.Image(q),r)}q=q.onload=null};var r={angle:this.get("angle"),flipX:this.get("flipX"),flipY:this.get("flipY")};this.set("angle",0).set("flipX",false).set("flipY",false);this.toDataURL(function(i){q.src=i})}return this},toDataURL:function(s){var q=d.document.createElement("canvas");if(!q.getContext&&typeof G_vmlCanvasManager!="undefined"){G_vmlCanvasManager.initElement(q)}this.setCoords();q.width=this.getBoundingRectWidth();q.height=this.getBoundingRectHeight();d.util.wrapElement(q,"div");var i=new d.Canvas(q);i.backgroundColor="transparent";i.renderAll();if(this.constructor.async){this.clone(r)}else{r(this.clone())}function r(u){u.left=q.width/2;u.top=q.height/2;u.setActive(false);i.add(u);var t=i.toDataURL("png");i.dispose();i=u=null;s&&s(t)}},hasStateChanged:function(){return this.stateProperties.some(function(i){return this[i]!==this.originalState[i]},this)},saveState:function(){this.stateProperties.forEach(function(i){this.originalState[i]=this.get(i)},this);return this},setupState:function(){this.originalState={};this.saveState()},intersectsWithRect:function(r,t){var w=this.oCoords,i=new d.Point(w.tl.x,w.tl.y),s=new d.Point(w.tr.x,w.tr.y),v=new d.Point(w.bl.x,w.bl.y),q=new d.Point(w.br.x,w.br.y);var u=d.Intersection.intersectPolygonRectangle([i,s,q,v],r,t);return(u.status==="Intersection")},intersectsWithObject:function(i){function q(u){return{tl:new d.Point(u.tl.x,u.tl.y),tr:new d.Point(u.tr.x,u.tr.y),bl:new d.Point(u.bl.x,u.bl.y),br:new d.Point(u.br.x,u.br.y)}}var r=q(this.oCoords),t=q(i.oCoords);var s=d.Intersection.intersectPolygonPolygon([r.tl,r.tr,r.br,r.bl],[t.tl,t.tr,t.br,t.bl]);return(s.status==="Intersection")},isContainedWithinObject:function(i){return this.isContainedWithinRect(i.oCoords.tl,i.oCoords.br)},isContainedWithinRect:function(r,t){var v=this.oCoords,i=new d.Point(v.tl.x,v.tl.y),s=new d.Point(v.tr.x,v.tr.y),u=new d.Point(v.bl.x,v.bl.y),q=new d.Point(v.br.x,v.br.y);return i.x>r.x&&s.xr.y&&u.y=v)&&(s.d.y>=v)){continue}if((s.o.x==s.d.x)&&(s.o.x>=w)){x=s.o.x;u=v}else{z=0;y=(s.d.y-s.o.y)/(s.d.x-s.o.x);r=v-z*w;q=s.o.y-y*s.o.x;x=-(r-q)/(z-y);u=r+z*x}if(x>=w){t+=1}if(t==2){break}}return t},_getImageLines:function(r,q){return{topline:{o:r.tl,d:r.tr},rightline:{o:r.tr,d:r.br},bottomline:{o:r.br,d:r.bl},leftline:{o:r.bl,d:r.tl}}},_setCornerCoords:function(){var u=this.oCoords,q=b(45-this.getAngle()),s=Math.sqrt(2*Math.pow(this.cornersize,2))/2,i=s*Math.cos(q),r=s*Math.sin(q),v=Math.sin(this._theta),t=Math.cos(this._theta);u.tl.corner={tl:{x:u.tl.x-r,y:u.tl.y-i},tr:{x:u.tl.x+i,y:u.tl.y-r},bl:{x:u.tl.x-i,y:u.tl.y+r},br:{x:u.tl.x+r,y:u.tl.y+i}};u.tr.corner={tl:{x:u.tr.x-r,y:u.tr.y-i},tr:{x:u.tr.x+i,y:u.tr.y-r},br:{x:u.tr.x+r,y:u.tr.y+i},bl:{x:u.tr.x-i,y:u.tr.y+r}};u.bl.corner={tl:{x:u.bl.x-r,y:u.bl.y-i},bl:{x:u.bl.x-i,y:u.bl.y+r},br:{x:u.bl.x+r,y:u.bl.y+i},tr:{x:u.bl.x+i,y:u.bl.y-r}};u.br.corner={tr:{x:u.br.x+i,y:u.br.y-r},bl:{x:u.br.x-i,y:u.br.y+r},br:{x:u.br.x+r,y:u.br.y+i},tl:{x:u.br.x-r,y:u.br.y-i}};u.ml.corner={tl:{x:u.ml.x-r,y:u.ml.y-i},tr:{x:u.ml.x+i,y:u.ml.y-r},bl:{x:u.ml.x-i,y:u.ml.y+r},br:{x:u.ml.x+r,y:u.ml.y+i}};u.mt.corner={tl:{x:u.mt.x-r,y:u.mt.y-i},tr:{x:u.mt.x+i,y:u.mt.y-r},bl:{x:u.mt.x-i,y:u.mt.y+r},br:{x:u.mt.x+r,y:u.mt.y+i}};u.mr.corner={tl:{x:u.mr.x-r,y:u.mr.y-i},tr:{x:u.mr.x+i,y:u.mr.y-r},bl:{x:u.mr.x-i,y:u.mr.y+r},br:{x:u.mr.x+r,y:u.mr.y+i}};u.mb.corner={tl:{x:u.mb.x-r,y:u.mb.y-i},tr:{x:u.mb.x+i,y:u.mb.y-r},bl:{x:u.mb.x-i,y:u.mb.y+r},br:{x:u.mb.x+r,y:u.mb.y+i}};u.mtr.corner={tl:{x:u.mtr.x-r+(v*this.rotatingPointOffset),y:u.mtr.y-i-(t*this.rotatingPointOffset)},tr:{x:u.mtr.x+i+(v*this.rotatingPointOffset),y:u.mtr.y-r-(t*this.rotatingPointOffset)},bl:{x:u.mtr.x-i+(v*this.rotatingPointOffset),y:u.mtr.y+r-(t*this.rotatingPointOffset)},br:{x:u.mtr.x+r+(v*this.rotatingPointOffset),y:u.mtr.y+i-(t*this.rotatingPointOffset)}}},toGrayscale:function(){var i=this.get("fill");if(i){this.set("overlayFill",new d.Color(i).toGrayscale().toRgb())}return this},complexity:function(){return 0},toJSON:function(){return this.toObject()},setGradientFill:function(i){this.set("fill",d.Gradient.forObject(this,i))},animate:function(q,s,i){var r=this;i||(i={});if(!("from" in i)){i.from=this.get(q)}if(/[+-]/.test((s+"").charAt(0))){s=this.get(q)+parseFloat(s)}d.util.animate({startValue:i.from,endValue:s,byValue:i.by,easing:i.easing,duration:i.duration,onChange:function(t){r.set(q,t);i.onChange&&i.onChange()},onComplete:function(){r.setCoords();i.onComplete&&i.onComplete()}})},centerH:function(){this.canvas.centerObjectH(this);return this},centerV:function(){this.canvas.centerObjectV(this);return this},center:function(){return this.centerH().centerV()},remove:function(){return this.canvas.remove(this)},sendToBack:function(){this.canvas.sendToBack(this);return this},bringToFront:function(){this.canvas.bringToFront(this);return this},sendBackwards:function(){this.canvas.sendBackwards(this);return this},bringForward:function(){this.canvas.bringForward(this);return this}});d.Object.prototype.rotate=d.Object.prototype.setAngle;var j=d.Object.prototype;for(var g=j.stateProperties.length;g--;){var h=j.stateProperties[g],e=h.charAt(0).toUpperCase()+h.slice(1),f="set"+e,n="get"+e;if(!j[n]){j[n]=(function(i){return new Function('return this.get("'+i+'")')})(h)}if(!j[f]){j[f]=(function(i){return new Function("value",'return this.set("'+i+'", value)')})(h)}}l(d.Object.prototype,d.Observable);l(d.Object,{NUM_FRACTION_DIGITS:2,MIN_SCALE_LIMIT:0.1})})(typeof exports!="undefined"?exports:this);(function(b){var c=b.fabric||(b.fabric={}),e=c.util.object.extend,d=c.Object.prototype.set,a={x1:1,x2:1,y1:1,y2:1};if(c.Line){c.warn("fabric.Line is already defined");return}c.Line=c.util.createClass(c.Object,{type:"line",initialize:function(g,f){if(!g){g=[0,0,0,0]}this.callSuper("initialize",f);this.set("x1",g[0]);this.set("y1",g[1]);this.set("x2",g[2]);this.set("y2",g[3]);this._setWidthHeight(f)},_setWidthHeight:function(f){f||(f={});this.set("width",(this.x2-this.x1)||1);this.set("height",(this.y2-this.y1)||1);this.set("left","left" in f?f.left:(this.x1+this.width/2));this.set("top","top" in f?f.top:(this.y1+this.height/2))},_set:function(f,g){this[f]=g;if(f in a){this._setWidthHeight()}return this},_render:function(f){f.beginPath();if(this.group){f.translate(-this.group.width/2+this.left,-this.group.height/2+this.top)}f.moveTo(this.width===1?0:(-this.width/2),this.height===1?0:(-this.height/2));f.lineTo(this.width===1?0:(this.width/2),this.height===1?0:(this.height/2));f.lineWidth=this.strokeWidth;var g=f.strokeStyle;f.strokeStyle=f.fillStyle;f.stroke();f.strokeStyle=g},complexity:function(){return 1},toObject:function(){return e(this.callSuper("toObject"),{x1:this.get("x1"),y1:this.get("y1"),x2:this.get("x2"),y2:this.get("y2")})},toSVG:function(){return[""].join("")}});c.Line.ATTRIBUTE_NAMES="x1 y1 x2 y2 stroke stroke-width transform".split(" ");c.Line.fromElement=function(g,f){var i=c.parseAttributes(g,c.Line.ATTRIBUTE_NAMES);var h=[i.x1||0,i.y1||0,i.x2||0,i.y2||0];return new c.Line(h,e(i,f))};c.Line.fromObject=function(f){var g=[f.x1,f.y1,f.x2,f.y2];return new c.Line(g,f)}})(typeof exports!="undefined"?exports:this);(function(a){var b=a.fabric||(a.fabric={}),d=Math.PI*2,e=b.util.object.extend;if(b.Circle){b.warn("fabric.Circle is already defined.");return}b.Circle=b.util.createClass(b.Object,{type:"circle",initialize:function(f){f=f||{};this.set("radius",f.radius||0);this.callSuper("initialize",f);var g=this.get("radius")*2;this.set("width",g).set("height",g)},toObject:function(){return e(this.callSuper("toObject"),{radius:this.get("radius")})},toSVG:function(){return('')},_render:function(f,g){f.beginPath();f.globalAlpha*=this.opacity;f.arc(g?this.left:0,g?this.top:0,this.radius,0,d,false);f.closePath();if(this.fill){f.fill()}if(this.stroke){f.stroke()}},getRadiusX:function(){return this.get("radius")*this.get("scaleX")},getRadiusY:function(){return this.get("radius")*this.get("scaleY")},setRadius:function(f){this.radius=f;this.set("width",f*2).set("height",f*2)},complexity:function(){return 1}});b.Circle.ATTRIBUTE_NAMES="cx cy r fill fill-opacity opacity stroke stroke-width transform".split(" ");b.Circle.fromElement=function(g,f){f||(f={});var h=b.parseAttributes(g,b.Circle.ATTRIBUTE_NAMES);if(!c(h)){throw Error("value of `r` attribute is required and can not be negative")}if("left" in h){h.left-=(f.width/2)||0}if("top" in h){h.top-=(f.height/2)||0}return new b.Circle(e(h,f))};function c(f){return(("radius" in f)&&(f.radius>0))}b.Circle.fromObject=function(f){return new b.Circle(f)}})(typeof exports!="undefined"?exports:this);(function(a){var b=a.fabric||(a.fabric={});if(b.Triangle){b.warn("fabric.Triangle is already defined");return}b.Triangle=b.util.createClass(b.Object,{type:"triangle",initialize:function(c){c=c||{};this.callSuper("initialize",c);this.set("width",c.width||100).set("height",c.height||100)},_render:function(c){var d=this.width/2,e=this.height/2;c.beginPath();c.moveTo(-d,e);c.lineTo(0,-e);c.lineTo(d,e);c.closePath();if(this.fill){c.fill()}if(this.stroke){c.stroke()}},complexity:function(){return 1},toSVG:function(){var c=this.width/2,d=this.height/2;var e=[-c+" "+d,"0 "+-d,c+" "+d].join(",");return''}});b.Triangle.fromObject=function(c){return new b.Triangle(c)}})(typeof exports!="undefined"?exports:this);(function(a){var b=a.fabric||(a.fabric={}),c=Math.PI*2,d=b.util.object.extend;if(b.Ellipse){b.warn("fabric.Ellipse is already defined.");return}b.Ellipse=b.util.createClass(b.Object,{type:"ellipse",initialize:function(e){e=e||{};this.callSuper("initialize",e);this.set("rx",e.rx||0);this.set("ry",e.ry||0);this.set("width",this.get("rx")*2);this.set("height",this.get("ry")*2)},toObject:function(){return d(this.callSuper("toObject"),{rx:this.get("rx"),ry:this.get("ry")})},toSVG:function(){return[""].join("")},render:function(e,f){if(this.rx===0||this.ry===0){return}return this.callSuper("render",e,f)},_render:function(e,f){e.beginPath();e.save();e.globalAlpha*=this.opacity;if(this.transformMatrix&&this.group){e.translate(this.cx,this.cy)}e.transform(1,0,0,this.ry/this.rx,0,0);e.arc(f?this.left:0,f?this.top:0,this.rx,0,c,false);if(this.stroke){e.stroke()}if(this.fill){e.fill()}e.restore()},complexity:function(){return 1}});b.Ellipse.ATTRIBUTE_NAMES="cx cy rx ry fill fill-opacity opacity stroke stroke-width transform".split(" ");b.Ellipse.fromElement=function(g,f){f||(f={});var i=b.parseAttributes(g,b.Ellipse.ATTRIBUTE_NAMES);var e=i.left;var j=i.top;if("left" in i){i.left-=(f.width/2)||0}if("top" in i){i.top-=(f.height/2)||0}var h=new b.Ellipse(d(i,f));h.cx=e||0;h.cy=j||0;return h};b.Ellipse.fromObject=function(e){return new b.Ellipse(e)}})(typeof exports!="undefined"?exports:this);(function(b){var c=b.fabric||(b.fabric={});if(c.Rect){console.warn("fabric.Rect is already defined");return}c.Rect=c.util.createClass(c.Object,{type:"rect",rx:0,ry:0,initialize:function(d){this._initStateProperties();this.callSuper("initialize",d);this._initRxRy()},_initStateProperties:function(){this.stateProperties=this.stateProperties.concat(["rx","ry"])},_initRxRy:function(){if(this.rx&&!this.ry){this.ry=this.rx}else{if(this.ry&&!this.rx){this.rx=this.ry}}},_render:function(f){var j=this.rx||0,i=this.ry||0,d=-this.width/2,k=-this.height/2,e=this.width,g=this.height;f.beginPath();f.globalAlpha*=this.opacity;if(this.transformMatrix&&this.group){f.translate(this.width/2+this.x,this.height/2+this.y)}if(!this.transformMatrix&&this.group){f.translate(-this.group.width/2+this.width/2+this.x,-this.group.height/2+this.height/2+this.y)}f.moveTo(d+j,k);f.lineTo(d+e-j,k);f.quadraticCurveTo(d+e,k,d+e,k+i,d+e,k+i);f.lineTo(d+e,k+g-i);f.quadraticCurveTo(d+e,k+g,d+e-j,k+g,d+e-j,k+g);f.lineTo(d+j,k+g);f.quadraticCurveTo(d,k+g,d,k+g-i,d,k+g-i);f.lineTo(d,k+i);f.quadraticCurveTo(d,k,d+j,k,d+j,k);f.closePath();if(this.fill){f.fill()}if(this.strokeDashArray){this._renderDashedStroke(f)}else{if(this.stroke){f.stroke()}}},_normalizeLeftTopProperties:function(d){if(d.left){this.set("left",d.left+this.getWidth()/2)}this.set("x",d.left||0);if(d.top){this.set("top",d.top+this.getHeight()/2)}this.set("y",d.top||0);return this},complexity:function(){return 1},toObject:function(){return c.util.object.extend(this.callSuper("toObject"),{rx:this.get("rx")||0,ry:this.get("ry")||0})},toSVG:function(){return''}});c.Rect.ATTRIBUTE_NAMES="x y width height rx ry fill fill-opacity opacity stroke stroke-width transform".split(" ");function a(d){d.left=d.left||0;d.top=d.top||0;return d}c.Rect.fromElement=function(e,d){if(!e){return null}var g=c.parseAttributes(e,c.Rect.ATTRIBUTE_NAMES);g=a(g);var f=new c.Rect(c.util.object.extend((d?c.util.object.clone(d):{}),g));f._normalizeLeftTopProperties(g);return f};c.Rect.fromObject=function(d){return new c.Rect(d)}})(typeof exports!="undefined"?exports:this);(function(b){var c=b.fabric||(b.fabric={}),a=c.util.toFixed;if(c.Polyline){c.warn("fabric.Polyline is already defined");return}c.Polyline=c.util.createClass(c.Object,{type:"polyline",initialize:function(e,d){d=d||{};this.set("points",e);this.callSuper("initialize",d);this._calcDimensions()},_calcDimensions:function(){return c.Polygon.prototype._calcDimensions.call(this)},toObject:function(){return c.Polygon.prototype.toObject.call(this)},toSVG:function(){var f=[];for(var e=0,d=this.points.length;e"].join("")},_render:function(f){var e;f.beginPath();f.moveTo(this.points[0].x,this.points[0].y);for(var g=0,d=this.points.length;g"].join("")},_render:function(l){var k;l.beginPath();l.moveTo(this.points[0].x,this.points[0].y);for(var m=0,j=this.points.length;m1){E=Math.sqrt(E);O*=E;N*=E}var R=aa/O;var Q=W/O;var D=(-W)/N;var C=(aa)/N;var H=R*M+Q*L;var q=D*M+C*L;var F=R*T+Q*S;var ab=D*T+C*S;var Z=(F-H)*(F-H)+(ab-q)*(ab-q);var U=1/Z-0.25;if(U<0){U=0}var w=Math.sqrt(U);if(P==J){w=-w}var V=0.5*(H+F)-w*(ab-q);var K=0.5*(q+ab)+w*(F-H);var v=Math.atan2(q-K,H-V);var u=Math.atan2(ab-K,F-V);var Y=u-v;if(Y<0&&P==1){Y+=2*Math.PI}else{if(Y>0&&P==0){Y-=2*Math.PI}}var B=Math.ceil(Math.abs(Y/(Math.PI*0.5+0.001)));var I=[];for(var X=0;X"},toObject:function(){var q=g(this.callSuper("toObject"),{path:this.path});if(this.sourcePath){q.sourcePath=this.sourcePath}if(this.transformMatrix){q.transformMatrix=this.transformMatrix}return q},toDatalessObject:function(){var q=this.toObject();if(this.sourcePath){q.path=this.sourcePath}delete q.sourcePath;return q},toSVG:function(){var t=[];for(var r=0,q=this.path.length;r',"',""].join("")},complexity:function(){return this.path.length},_parsePath:function(){var C=[],z,v,y;for(var u=0,t,q,w=this.path.length;uB){for(var r=1,x=q.length;r"];for(var l=0,j=m.length;l");return k.join("")},toString:function(){return"#"},isSameColor:function(){var j=this.getObjects()[0].get("fill");return this.getObjects().every(function(k){return k.get("fill")===j})},complexity:function(){return this.paths.reduce(function(j,k){return j+((k&&k.complexity)?k.complexity():0)},0)},toGrayscale:function(){var j=this.paths.length;while(j--){this.paths[j].toGrayscale()}return this},getObjects:function(){return this.paths}});function c(m){for(var l=0,j=m.length;l"},getObjects:function(){return this.objects},addWithUpdate:function(h){this._restoreObjectsState();this.objects.push(h);this._calcBounds();this._updateObjectsCoords();return this},removeWithUpdate:function(h){this._restoreObjectsState();f(this.objects,h);h.setActive(false);this._calcBounds();this._updateObjectsCoords();return this},add:function(h){this.objects.push(h);return this},remove:function(h){f(this.objects,h);return this},size:function(){return this.getObjects().length},_set:function(j,k){if(j==="fill"||j==="opacity"){var h=this.objects.length;this[j]=k;while(h--){this.objects[h].set(j,k)}}else{this[j]=k}},contains:function(h){return this.objects.indexOf(h)>-1},toObject:function(){return g(this.callSuper("toObject"),{objects:b(this.objects,"clone")})},render:function(j,o){j.save();this.transform(j);var n=Math.max(this.scaleX,this.scaleY);for(var l=0,h=this.objects.length,k;k=this.objects[l];l++){var m=k.borderScaleFactor;k.borderScaleFactor=n;k.render(j);k.borderScaleFactor=m}if(!o&&this.active){this.drawBorders(j);this.hideCorners||this.drawCorners(j)}j.restore();this.setCoords()},item:function(h){return this.getObjects()[h]},complexity:function(){return this.getObjects().reduce(function(i,h){i+=(typeof h.complexity=="function")?h.complexity():0;return i},0)},_restoreObjectsState:function(){this.objects.forEach(this._restoreObjectState,this);return this},_restoreObjectState:function(j){var l=this.get("left"),m=this.get("top"),h=this.getAngle()*(Math.PI/180),k=j.get("originalLeft"),n=j.get("originalTop"),i=Math.cos(h)*j.get("top")+Math.sin(h)*j.get("left"),o=-Math.sin(h)*j.get("top")+Math.cos(h)*j.get("left");j.setAngle(j.getAngle()+this.getAngle());j.set("left",l+o*this.get("scaleX"));j.set("top",m+i*this.get("scaleY"));j.set("scaleX",j.get("scaleX")*this.get("scaleX"));j.set("scaleY",j.get("scaleY")*this.get("scaleY"));j.setCoords();j.hideCorners=false;j.setActive(false);j.setCoords();return this},destroy:function(){return this._restoreObjectsState()},saveCoords:function(){this._originalLeft=this.get("left");this._originalTop=this.get("top");return this},hasMoved:function(){return this._originalLeft!==this.get("left")||this._originalTop!==this.get("top")},setObjectsCoords:function(){this.forEachObject(function(h){h.setCoords()});return this},activateAllObjects:function(){this.forEachObject(function(h){h.setActive()});return this},forEachObject:e.StaticCanvas.prototype.forEachObject,_setOpacityIfSame:function(){var j=this.getObjects(),i=j[0]?j[0].get("opacity"):1;var h=j.every(function(k){return k.get("opacity")===i});if(h){this.opacity=i}},_calcBounds:function(){var s=[],q=[],p,n,k,h,m,l,u,r=0,t=this.objects.length;for(;ri.x&&j-hi.y},toGrayscale:function(){var h=this.objects.length;while(h--){this.objects[h].toGrayscale()}},toSVG:function(){var k=[];for(var j=0,h=this.objects.length;j'+k.join("")+"")}});e.Group.fromObject=function(h,i){e.util.enlivenObjects(h.objects,function(j){delete h.objects;i&&i(new e.Group(j,h))})};e.Group.async=true})(typeof exports!="undefined"?exports:this);(function(a){var b=fabric.util.object.extend;if(!a.fabric){a.fabric={}}if(a.fabric.Image){fabric.warn("fabric.Image is already defined.");return}if(!fabric.Object){fabric.warn("fabric.Object is required for fabric.Image initialization");return}fabric.Image=fabric.util.createClass(fabric.Object,{active:false,bordervisibility:false,cornervisibility:false,type:"image",initialize:function(d,c){c||(c={});this.callSuper("initialize",c);this._initElement(d);this._originalImage=this.getElement();this._initConfig(c);this.filters=[];if(c.filters){this.filters=c.filters;this.applyFilters()}},getElement:function(){return this._element},setElement:function(c){this._element=c;this._initConfig();return this},getOriginalSize:function(){var c=this.getElement();return{width:c.width,height:c.height}},setBorderVisibility:function(c){this._resetWidthHeight();this._adjustWidthHeightToBorders(showBorder);this.setCoords()},setCornersVisibility:function(c){this.cornervisibility=!!c},render:function(d,e){d.save();var c=this.transformMatrix;this._resetWidthHeight();if(this.group){d.translate(-this.group.width/2+this.width/2,-this.group.height/2+this.height/2)}if(c){d.transform(c[0],c[1],c[2],c[3],c[4],c[5])}if(!e){this.transform(d)}this._render(d);if(this.active&&!e){this.drawBorders(d);this.hideCorners||this.drawCorners(d)}d.restore()},toObject:function(){return b(this.callSuper("toObject"),{src:this._originalImage.src||this._originalImage._src,filters:this.filters.concat()})},toSVG:function(){return''},getSrc:function(){return this.getElement().src||this.getElement()._src},toString:function(){return'#'},clone:function(c){this.constructor.fromObject(this.toObject(),c)},applyFilters:function(i){if(this.filters.length===0){this.setElement(this._originalImage);i&&i();return}var c=typeof Buffer!=="undefined"&&typeof window==="undefined",g=this._originalImage,e=fabric.document.createElement("canvas"),f=c?new (require("canvas").Image):fabric.document.createElement("img"),h=this;if(!e.getContext&&typeof G_vmlCanvasManager!="undefined"){G_vmlCanvasManager.initElement(e)}e.width=g.width;e.height=g.height;e.getContext("2d").drawImage(g,0,0,g.width,g.height);this.filters.forEach(function(j){j&&j.applyTo(e)});f.onload=function(){h._element=f;i&&i();f.onload=e=g=null};f.width=g.width;f.height=g.height;if(c){var d=e.toDataURL("image/png").replace(/data:image\/png;base64,/,"");f.src=new Buffer(d,"base64");h._element=f;i&&i()}else{f.src=e.toDataURL("image/png")}return this},_render:function(c){c.drawImage(this.getElement(),-this.width/2,-this.height/2,this.width,this.height)},_adjustWidthHeightToBorders:function(c){if(c){this.currentBorder=this.borderwidth;this.width+=(2*this.currentBorder);this.height+=(2*this.currentBorder)}else{this.currentBorder=0}},_resetWidthHeight:function(){var c=this.getElement();this.set("width",c.width);this.set("height",c.height)},_initElement:function(c){this.setElement(fabric.util.getById(c));fabric.util.addClass(this.getElement(),fabric.Image.CSS_CANVAS)},_initConfig:function(c){c||(c={});this.setOptions(c);this._setBorder();this._setWidthHeight(c)},_initFilters:function(c){if(c.filters&&c.filters.length){this.filters=c.filters.map(function(d){return d&&fabric.Image.filters[d.type].fromObject(d)})}},_setBorder:function(){if(this.bordervisibility){this.currentBorder=this.borderwidth}else{this.currentBorder=0}},_setWidthHeight:function(c){var d=2*this.currentBorder;this.width="width" in c?c.width:((this.getElement().width||0)+d);this.height="height" in c?c.height:((this.getElement().height||0)+d)},complexity:function(){return 1}});fabric.Image.CSS_CANVAS="canvas-img";fabric.Image.prototype.getSvgSrc=fabric.Image.prototype.getSrc;fabric.Image.fromObject=function(d,f){var c=fabric.document.createElement("img"),e=d.src;if(d.width){c.width=d.width}if(d.height){c.height=d.height}c.onload=function(){fabric.Image.prototype._initFilters.call(d,d);var g=new fabric.Image(c,d);f&&f(g);c=c.onload=null};c.src=e};fabric.Image.fromURL=function(d,f,e){var c=fabric.document.createElement("img");c.onload=function(){if(f){f(new fabric.Image(c,e))}c=c.onload=null};c.src=d};fabric.Image.ATTRIBUTE_NAMES="x y width height fill fill-opacity opacity stroke stroke-width transform xlink:href".split(" ");fabric.Image.fromElement=function(d,f,c){c||(c={});var e=fabric.parseAttributes(d,fabric.Image.ATTRIBUTE_NAMES);fabric.Image.fromURL(e["xlink:href"],f,b(e,c))};fabric.Image.async=true})(typeof exports!="undefined"?exports:this);fabric.util.object.extend(fabric.Object.prototype,{_getAngleValueForStraighten:function(){var a=this.get("angle");if(a>-225&&a<=-135){return -180}else{if(a>-135&&a<=-45){return -90}else{if(a>-45&&a<=45){return 0}else{if(a>45&&a<=135){return 90}else{if(a>135&&a<=225){return 180}else{if(a>225&&a<=315){return 270}else{if(a>315){return 360}}}}}}}return 0},straighten:function(){var a=this._getAngleValueForStraighten();this.setAngle(a);return this},fxStraighten:function(b){b=b||{};var c=function(){},d=b.onComplete||c,a=b.onChange||c,e=this;fabric.util.animate({startValue:this.get("angle"),endValue:this._getAngleValueForStraighten(),duration:this.FX_DURATION,onChange:function(f){e.setAngle(f);a()},onComplete:function(){e.setCoords();d()},onStart:function(){e.setActive(false)}});return this}});fabric.util.object.extend(fabric.StaticCanvas.prototype,{straightenObject:function(a){a.straighten();this.renderAll();return this},fxStraightenObject:function(a){a.fxStraighten({onChange:this.renderAll.bind(this)});return this}});fabric.Image.filters={};fabric.Image.filters.Grayscale=fabric.util.createClass({type:"Grayscale",applyTo:function(d){var c=d.getContext("2d"),a=c.getImageData(0,0,d.width,d.height),h=a.data,e=a.width,l=a.height,k,b,g,f;for(g=0;gh&&m>h&&o>h&&p(a-m)0){l[m]=o;l[m+1]=e;l[m+2]=k}}f.putImageData(c,0,0)},toJSON:function(){return{type:this.type,color:this.color}}});fabric.Image.filters.Tint.fromObject=function(a){return new fabric.Image.filters.Tint(a)};(function(b){var c=b.fabric||(b.fabric={}),e=c.util.object.extend,d=c.util.object.clone,a=c.util.toFixed;if(c.Text){c.warn("fabric.Text is already defined");return}if(!c.Object){c.warn("fabric.Text requires fabric.Object");return}c.Text=c.util.createClass(c.Object,{fontSize:40,fontWeight:100,fontFamily:"Times New Roman",textDecoration:"",textShadow:"",textAlign:"left",fontStyle:"",lineHeight:1.3,strokeStyle:"",strokeWidth:1,backgroundColor:"",path:null,type:"text",useNative:true,initialize:function(g,f){this._initStateProperties();this.text=g;this.setOptions(f||{});this._theta=this.angle*Math.PI/180;this._initDimensions();this.setCoords()},_initDimensions:function(){var f=c.document.createElement("canvas");if(!f.getContext&&typeof G_vmlCanvasManager!="undefined"){G_vmlCanvasManager.initElement(f)}this._render(f.getContext("2d"))},_initStateProperties:function(){this.stateProperties=this.stateProperties.concat();this.stateProperties.push("fontFamily","fontWeight","fontSize","path","text","textDecoration","textShadow","textAlign","fontStyle","lineHeight","strokeStyle","strokeWidth","backgroundColor","useNative");c.util.removeFromArray(this.stateProperties,"width")},toString:function(){return"#'},_render:function(f){if(typeof Cufon==="undefined"||this.useNative===true){this._renderViaNative(f)}else{this._renderViaCufon(f)}},_renderViaCufon:function(f){var h=Cufon.textOptions||(Cufon.textOptions={});h.left=this.left;h.top=this.top;h.context=f;h.color=this.fill;var g=this._initDummyElementForCufon();this.transform(f);Cufon.replaceElement(g,{engine:"canvas",separate:"none",fontFamily:this.fontFamily,fontWeight:this.fontWeight,textDecoration:this.textDecoration,textShadow:this.textShadow,textAlign:this.textAlign,fontStyle:this.fontStyle,lineHeight:this.lineHeight,strokeStyle:this.strokeStyle,strokeWidth:this.strokeWidth,backgroundColor:this.backgroundColor});this.width=h.width;this.height=h.height;this._totalLineHeight=h.totalLineHeight;this._fontAscent=h.fontAscent;this._boundaries=h.boundaries;this._shadowOffsets=h.shadowOffsets;this._shadows=h.shadows||[];g=null;this.setCoords()},_renderViaNative:function(f){this.transform(f);this._setTextStyles(f);var g=this.text.split(/\r?\n/);this.width=this._getTextWidth(f,g);this.height=this._getTextHeight(f,g);this._renderTextBackground(f,g);if(this.textAlign!=="left"){f.save();f.translate(this.textAlign==="center"?(this.width/2):this.width,0)}this._setTextShadow(f);this._renderTextFill(f,g);this.textShadow&&f.restore();this._renderTextStroke(f,g);if(this.textAlign!=="left"){f.restore()}this._renderTextDecoration(f,g);this._setBoundaries(f,g);this._totalLineHeight=0;this.setCoords()},_setBoundaries:function(h,k){this._boundaries=[];for(var j=0,g=k.length;jk){k=l}}return k},_setTextShadow:function(f){if(this.textShadow){var j=/\s+(-?\d+)(?:px)?\s+(-?\d+)(?:px)?\s+(\d+)(?:px)?\s*/;var g=this.textShadow;var i=j.exec(this.textShadow);var h=g.replace(j,"");f.save();f.shadowColor=h;f.shadowOffsetX=parseInt(i[1],10);f.shadowOffsetY=parseInt(i[2],10);f.shadowBlur=parseInt(i[3],10);this._shadows=[{blur:f.shadowBlur,color:f.shadowColor,offX:f.shadowOffsetX,offY:f.shadowOffsetY}];this._shadowOffsets=[[parseInt(f.shadowOffsetX,10),parseInt(f.shadowOffsetY,10)]]}},_renderTextFill:function(g,j){this._boundaries=[];for(var h=0,f=j.length;h-1){f.call(this,this.fontSize)}if(this.textDecoration.indexOf("line-through")>-1){f.call(this,this.fontSize/2)}if(this.textDecoration.indexOf("overline")>-1){f.call(this,0)}},_getFontDeclaration:function(){return[this.fontStyle,this.fontWeight,this.fontSize+"px",(c.isLikelyNode?('"'+this.fontFamily+'"'):this.fontFamily)].join(" ")},_initDummyElementForCufon:function(){var g=c.document.createElement("pre"),f=c.document.createElement("div");f.appendChild(g);if(typeof G_vmlCanvasManager=="undefined"){g.innerHTML=this.text}else{g.innerText=this.text.replace(/\r?\n/gi,"\r")}g.style.fontSize=this.fontSize+"px";g.style.letterSpacing="normal";return g},render:function(f,g){f.save();this._render(f);if(!g&&this.active){this.drawBorders(f);this.hideCorners||this.drawCorners(f)}f.restore()},toObject:function(){return e(this.callSuper("toObject"),{text:this.text,fontSize:this.fontSize,fontWeight:this.fontWeight,fontFamily:this.fontFamily,fontStyle:this.fontStyle,lineHeight:this.lineHeight,textDecoration:this.textDecoration,textShadow:this.textShadow,textAlign:this.textAlign,path:this.path,strokeStyle:this.strokeStyle,strokeWidth:this.strokeWidth,backgroundColor:this.backgroundColor,useNative:this.useNative})},toSVG:function(){var i=this.text.split(/\r?\n/),j=this.useNative?this.fontSize*this.lineHeight:(-this._fontAscent-((this._fontAscent/5)*this.lineHeight)),g=-(this.width/2),f=this.useNative?this.fontSize-1:(this.height/2)-(i.length*this.fontSize)-this._totalLineHeight,h=this._getSVGTextAndBg(j,g,i),k=this._getSVGShadows(j,i);f+=(this._fontAscent?((this._fontAscent/5)*this.lineHeight):0);return['',h.textBgRects.join(""),"',k.join(""),h.textSpans.join(""),"",""].join("")},_getSVGShadows:function(h,n){var o=[],k,l,p,g,f=1;if(!this._shadows||!this._boundaries){return o}for(k=0,p=this._shadows.length;k",c.util.string.escapeXml(n[l]),"");f=1}else{f++}}}return o},_getSVGTextAndBg:function(j,h,n){var g=[],k=[],l,m,o,f=1;for(l=0,o=n.length;l",c.util.string.escapeXml(n[l]),"");f=1}else{f++}if(!this.backgroundColor||!this._boundaries){continue}k.push("')}return{textSpans:g,textBgRects:k}},_getFillAttributes:function(f){var g=f?new c.Color(f):"";if(!g||!g.getSource()||g.getAlpha()===1){return'fill="'+f+'"'}return'opacity="'+g.getAlpha()+'" fill="'+g.setAlpha(1).toRgb()+'"'},setColor:function(f){this.set("fill",f);return this},setFontsize:function(f){this.set("fontSize",f);this._initDimensions();this.setCoords();return this},getText:function(){return this.text},setText:function(f){this.set("text",f);this._initDimensions();this.setCoords();return this},_set:function(f,g){if(f==="fontFamily"&&this.path){this.path=this.path.replace(/(.*?)([^\/]*)(\.font\.js)/,"$1"+g+"$3")}this.callSuper("_set",f,g)}});c.Text.ATTRIBUTE_NAMES=("x y fill fill-opacity opacity stroke stroke-width transform font-family font-style font-weight font-size text-decoration").split(" ");c.Text.fromObject=function(f){return new c.Text(f.text,d(f))};c.Text.fromElement=function(g,f){if(!g){return null}var h=c.parseAttributes(g,c.Text.ATTRIBUTE_NAMES);var f=c.util.object.extend((f?c.util.object.clone(f):{}),h);var i=new c.Text(g.textContent,f);return i}})(typeof exports!="undefined"?exports:this);(function(){if(typeof document!="undefined"&&typeof window!="undefined"){return}var DOMParser=new require("xmldom").DOMParser,URL=require("url"),HTTP=require("http"),Canvas=require("canvas"),Image=require("canvas").Image;function request(url,encoding,callback){var oURL=URL.parse(url),client=HTTP.createClient(oURL.port,oURL.hostname),request=client.request("GET",oURL.pathname,{host:oURL.hostname});client.addListener("error",function(err){if(err.errno===process.ECONNREFUSED){fabric.log("ECONNREFUSED: connection refused to "+client.host+":"+client.port)}else{fabric.log(err.message)}});request.end();request.on("response",function(response){var body="";if(encoding){response.setEncoding(encoding)}response.on("end",function(){callback(body)});response.on("data",function(chunk){if(response.statusCode==200){body+=chunk}})})}fabric.util.loadImage=function(url,callback){request(url,"binary",function(body){var img=new Image();img.src=new Buffer(body,"binary");img._src=url;callback(img)})};fabric.loadSVGFromURL=function(url,callback){url=url.replace(/^\n\s*/,"").replace(/\?.*$/,"").trim();request(url,"",function(body){fabric.loadSVGFromString(body,callback)})};fabric.loadSVGFromString=function(string,callback){var doc=new DOMParser().parseFromString(string);fabric.parseSVGDocument(doc.documentElement,function(results,options){callback(results,options)})};fabric.util.getScript=function(url,callback){request(url,"",function(body){eval(body);callback&&callback()})};fabric.Image.fromObject=function(object,callback){fabric.util.loadImage(object.src,function(img){var oImg=new fabric.Image(img);oImg._initConfig(object);oImg._initFilters(object);callback(oImg)})};fabric.createCanvasForNode=function(width,height){var canvasEl=fabric.document.createElement("canvas"),nodeCanvas=new Canvas(width||600,height||600);canvasEl.style={};canvasEl.width=nodeCanvas.width;canvasEl.height=nodeCanvas.height;var canvas=fabric.Canvas||fabric.StaticCanvas;var fabricCanvas=new canvas(canvasEl);fabricCanvas.contextContainer=nodeCanvas.getContext("2d");fabricCanvas.nodeCanvas=nodeCanvas;return fabricCanvas};fabric.StaticCanvas.prototype.createPNGStream=function(){return this.nodeCanvas.createPNGStream()};if(fabric.Canvas){fabric.Canvas.prototype.createPNGStream}var origSetWidth=fabric.StaticCanvas.prototype.setWidth;fabric.StaticCanvas.prototype.setWidth=function(width){origSetWidth.call(this);this.nodeCanvas.width=width;return this};if(fabric.Canvas){fabric.Canvas.prototype.setWidth=fabric.StaticCanvas.prototype.setWidth}var origSetHeight=fabric.StaticCanvas.prototype.setHeight;fabric.StaticCanvas.prototype.setHeight=function(height){origSetHeight.call(this);this.nodeCanvas.height=height;return this};if(fabric.Canvas){fabric.Canvas.prototype.setHeight=fabric.StaticCanvas.prototype.setHeight}})(); \ No newline at end of file diff --git a/dist/all.min.js.gz b/dist/all.min.js.gz index 351e3899bbd977576409a7cb67082fb3c3239a4d..c96532173cb22d53f1245804f1a54edbaad6d2de 100644 GIT binary patch delta 9201 zcmVTGDjRK)K!y0;n#f-UO0qyu$zFpbw&|B@06f}$klOzwO ze19R3i1>+_6RkQ*m`*UbXl5&Gw0p8{Lkp{-Fa2~ z^u1vO1Np-N6m4heo#l*y&uGZL@RzC<%hz`B;4KD|`^6kZ#D+xi+z@Aikouugvfa`y zq2%GxVfh`~!Fzkkoalo$WJHRtxfqR@e}6>2BUe&*Y5r0@`K5G{QyX=lq3XOX-P<#- zbZfir!ey?3K=17Va|1RkA--PwWc5=)A|h5#Z{!&OWn3q0#A_1z3ucZyU*-IpEfN{Q#2$sJX0}vK z+r(VycTa{6hnGuucy9+GbD6)Vrh5>o0y}BJk>ecaR?!mqdhsI<-zEF;CqgvDh?ZkV1U40JfPuVqPDcnclp#} z&ZnmqgrzH}F(6LOlnR-$(c&s{lu>e+I}Rt>2G`{7WqkpfQICxIBEa=yv3~+rHwQGf zb$?Gb_x76AQ<`f%g56E*z*tge!N{EY0qXz@A?TvXUo2cZB=;fs>oLq3Grqa1MJwxn z^iJMXHLKR!Zk73qBEScp3(h&r6uXg{R-+o7WNXC*_>S+*4&!7PCy~SnJ;Bcb^Ua{k zDfe-#k6FmiHrsiWqPT2TqJJt_7XoOp{%zrb7epPe+nEwHg=sg?Y}cgv6r8B4rTp5{ zRO=~ty6>G_SYMx>dfL<3*7~aV${Ija$9iP0Cbq-Wh^!6v!UjMG4osX-Wc>!Bi>%Y0 z7AM<{HT|$pX$YTU3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