agenda-libre-ruby/public/webshims/1.15.10/shims/FlashCanvasPro/flashcanvas.js

1 line
13 KiB
JavaScript
Raw Normal View History

window.FlashCanvasOptions=window.FlashCanvasOptions||{},webshims.$.extend(FlashCanvasOptions,{swfPath:webshims.cfg.basePath+"FlashCanvasPro/"}),window.ActiveXObject&&!window.CanvasRenderingContext2D&&function(l,k,q){function O(a){this.code=a,this.message=ga[a]}function w(a,b,c){if(!c)for(var c=[],d=0,e=a*b*4;e>d;++d)c[d]=0;this.width=a,this.height=b,this.data=c}function ha(a){this.width=a}function x(a){this.id=a.F++}function o(a){this.J=a,this.id=a.F++}function A(a,b){this.canvas=a,this.z=b,this.e=b.id.slice(8),this.G(),this.F=0,this.j=this.D="",this.d=0}function B(){if("complete"===k.readyState){k.detachEvent(P,B);for(var a=k.getElementsByTagName(r),b=0,c=a.length;c>b;++b)C.initElement(a[b])}}function Q(){var a=event.srcElement,b=a.parentNode;a.blur(),b.focus()}function D(){2&event.button&&event.srcElement.parentNode.setCapture()}function E(){2&event.button&&event.srcElement.parentNode.releaseCapture()}function R(){var a=event.propertyName;if("width"===a||"height"===a){var b=event.srcElement,c=b[a],d=parseInt(c,10);(isNaN(d)||0>d)&&(d="width"===a?300:150),c===d?(b.style[a]=d+"px",b.getContext("2d").K(b.width,b.height)):b[a]=d}}function S(){l.detachEvent(T,S);for(var a in m){var b,c=m[a],d=c.firstChild;for(b in d)"function"==typeof d[b]&&(d[b]=g);for(b in c)"function"==typeof c[b]&&(c[b]=g);d.detachEvent(U,Q),d.detachEvent(F,D),c.detachEvent(G,E),c.detachEvent(V,R)}l[W]=g,l[X]=g,l[Y]=g,l[H]=g,l[Z]=g}function ia(a){return a.toLowerCase()}function i(a){throw new O(a)}function $(a){var b=parseInt(a.width,10),c=parseInt(a.height,10);(isNaN(b)||0>b)&&(b=300),(isNaN(c)||0>c)&&(c=150),a.width=b,a.height=c}function I(a,b){for(var c in m){var d=m[c].getContext("2d");d.g.push(d.a.length+2),d.a.push(y,a,b)}}var g=null,r="canvas",W="CanvasRenderingContext2D",X="CanvasGradient",Y="CanvasPattern",H="FlashCanvas",Z="G_vmlCanvasManager",U="onfocus",F="onmousedown",G="onmouseup",V="onpropertychange",P="onreadystatechange",T="onunload",n;try{n=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").match(/[\d,]+/)[0].replace(/,/g,".")}catch(ka){n=0}var j=l[H+"Options"]||{},J=function(){var a=k.getElementsByTagName("script"),a=a[a.length-1];return k.documentMode>=8?a.src:a.getAttribute("src",4)}().replace(/[^\/]+$/,""),t=j.swfPath||J;t+=parseInt(n)>9?"flash10canvas.swf":"flash9canvas.swf";var y="4",s={},u={},aa={},K={},p={},ba={},v={},m={},z={},J="autoinit"in j?j.autoinit:1,L="turbo"in j?j.turbo:1,M=j.delay||0,ca=j.disableContextMenu||0,da=j.imageCacheSize||100,N=j.usePolicyFile||0,ea=j.proxy||"proxy.php",fa=j.save||"save.php";"10.1.53.64"===n&&(L=0,M=30),A.prototype={save:function(){this.h(15),this.I.push([this.m,this.n,this.w,this.l,this.q,this.o,this.p,this.r,this.u,this.v,this.s,this.t,this.j,this.A,this.B]),this.a.push("B")},restore:function(){var a=this.I;a.length&&(a=a.pop(),this.globalAlpha=a[0],this.globalCompositeOperation=a[1],this.strokeStyle=a[2],this.fillStyle=a[3],this.lineWidth=a[4],this.lineCap=a[5],this.lineJoin=a[6],this.miterLimit=a[7],this.shadowOffsetX=a[8],this.shadowOffsetY=a[9],this.shadowBlur=a[10],this.shadowColor=a[11],this.font=a[12],this.textAlign=a[13],this.textBaseline=a[14]),this.a.push("C")},scale:function(a,b){this.a.push("D",a,b)},rotate:function(a){this.a.push("E",a)},translate:function(a,b){this.a.push("F",a,b)},transform:function(a,b,c,d,e,f){this.a.push("G",a,b,c,d,e,f)},setTransform:function(a,b,c,d,e,f){this.a.push("H",a,b,c,d,e,f)},createLinearGradient:function(a,b,c,d){return!(isFinite(a)&&isFinite(b)&&isFinite(c)&&isFinite(d)||!i(9)),this.a.push("M",a,b,c,d),new o(this)},createRadialGradient:function(a,b,c,d,e,f){return!(isFinite(a)&&isFinite(b)&&isFinite(c)&&isFinite(d)&&isFinite(e)&&isFinite(f)||!i(9)),(0>c||0>f)&&i(1),this.a.push("N",a,b,c,d,e,f),new o(this)},createPattern:function(a,b){a||i(17);var c,d,e,f=a.tagName,h=this.e;if(f)if(f=f.toLowerCase(),"img"===f)c=a.getAttribute("src",2);else if(f===r)d=this.C(a),e=a!==this.canvas;else{if("video"===f)return;i(17)}else a.src?c=a.src:i(17);return"repeat"===b||"no-repeat"===b||"repeat-x"===b||"repeat-y"===b||""===b||b===g||i(1