d&&b<2e3);return[m,f]},NewtonCotes:function(t,i,r){var s,o,n,a=0,h=r&&e.isNumber(r.number_of_nodes)?r.number_of_nodes:28,l={trapez:!0,simpson:!0,milne:!0},c=r&&r.integration_type&&l.hasOwnProperty(r.integration_type)&&l[r.integration_type]?r.integration_type:"milne",d=(t[1]-t[0])/h;switch(c){case"trapez":for(a=.5*(i(t[0])+i(t[1])),s=t[0],o=0;o i[u-1])return NaN;for(n=1;n=0;s--)o=o.concat(["(",t[s].toPrecision(r),")"]),s>1?o=o.concat(["*",i,"",s,"<","/sup> + "]):1===s&&(o=o.concat(["*",i," + "]));return o.join("")},lagrangePolynomial:function(t){var e=[],i=function(i,r){var s,o,n,a,h=t.length,l=0,c=0;if(!r)for(s=0;s a.maxX()?NaN:(i=t-a.X(e),s=r-a.Y(e),i*i+s*s)},x=P(n),w=50,O=(a.maxX()-a.minX())/w,E=a.minX(),d=0;d =0&&_[1]<=1&&(t-_[0][1])*(t-_[0][1])*v+(r-_[0][2])*(r-_[0][2])*y<=S)return!0;return!1}return x \n"}return e+="s&&(s=o);o=e(t+r),o>s&&(s=o)}else s="random"===i?e(t+r*Math.random()):"simpson"===i?(e(t)+4*e(t+.5*r)+e(t+r))/6:e(t);return s},riemann:function(t,i,r,s,o){var n,a,h,l,c,d,u,p=[],f=[],m=0,b=s,g=0;if(e.isArray(t)?(c=t[0],l=t[1]):l=t,(i=Math.floor(i))<=0)return[p,f,g];for(a=(o-s)/i,n=0;n0)return e.isArray(r)?this.fminbr(t,[o,n],s):this.Newton(t,o,s);for(a=o,c=h;w=m&&(y=(a-l)*(c-d),v=(a-h)*(c-u),g=(a-h)*v-(a-l)*y,v=2*(v-y),v>0?g=-g:v=-v,Math.abs(g)0?this.mean(this.multiply(t,e)):0},max:function(t){return Math.max.apply(this,t)},min:function(t){return Math.min.apply(this,t)},range:function(t){return[this.min(t),this.max(t)]},abs:function(t){var e,r,s;if(i.isArray(t))for(r=t.length,s=[],e=0;eT)return p(),1;for(_=g?P[g-1]:0;C--;)P[g++]=_}else{if(C=17===C?3+u(3):11+u(7),g+C>T)return p(),1;for(;C--;)P[g++]=0}for(S=D.length,g=0;g=256){if(0===(C-=256))break;for(C-=1,S=u(r[C])+i[C],C=y(I),o[C]>8?(O=u(8),O|=u(o[C]-8)<<8):O=u(o[C]),O+=s[C];S--;)h=M[k-O&32767],f(h)}else f(C)}}while(!a);return p(),c(),0}function _(){var t,e,i,r,s,o,n,h,c=[];try{if(T=[],R=!1,c[0]=l(),c[1]=l(),120===c[0]&&218===c[1]&&(C(),A[N]=[T.join(""),"geonext.gxt"],N++),31===c[0]&&139===c[1]&&(w(),A[N]=[T.join(""),"file"],N++),80===c[0]&&75===c[1]&&(R=!0,c[2]=l(),c[3]=l(),3===c[2]&&4===c[3])){for(c[0]=l(),c[1]=l(),P=l(),P|=l()<<8,h=l(),h|=l()<<8,l(),l(),l(),l(),n=l(),n|=l()<<8,n|=l()<<16,n|=l()<<24,o=l(),o|=l()<<8,o|=l()<<16,o|=l()<<24,s=l(),s|=l()<<8,s|=l()<<16,s|=l()<<24,r=l(),r|=l()<<8,i=l(),i|=l()<<8,t=0,U=[];r--;)e=l(),"/"===e|":"===e?t=0:t0&&(s=s[0][0]),r.exists(s))if(n=window.JSON&&window.JSON.parse?window.JSON.parse(s):new Function("return "+s)(),"error"===n.type)this.handleError(n);else if("response"===n.type){for(c=n.id,d=0;d
")},_log:function(t){"object"!=typeof window&&"object"==typeof self&&self.postMessage?self.postMessage({type:"log",msg:"Log: "+t.toString()}):console.log("Log: ",arguments)}});var parser=function(){function t(){this.yy={}}var e=function(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i},i=[2,14],r=[1,13],s=[1,37],o=[1,14],n=[1,15],a=[1,21],h=[1,16],l=[1,17],c=[1,33],d=[1,18],u=[1,19],p=[1,12],f=[1,59],m=[1,60],b=[1,58],g=[1,46],v=[1,48],y=[1,49],C=[1,50],_=[1,51],P=[1,52],E=[1,53],S=[1,54],x=[1,45],O=[1,38],w=[1,39],T=[5,7,8,14,15,16,17,19,20,21,23,26,27,50,51,58,65,74,75,76,77,78,79,80,82,91,93],N=[5,7,8,12,14,15,16,17,19,20,21,23,26,27,50,51,58,65,74,75,76,77,78,79,80,82,91,93],A=[8,10,16,32,34,35,37,39,41,42,43,45,46,47,48,50,51,53,54,55,57,64,65,66,83,86],M=[2,48],k=[1,72],R=[10,16,32,34,35,37,39,41,42,43,45,46,47,48,50,51,53,54,55,57,66,83,86],L=[1,78],B=[8,10,16,32,34,35,37,41,42,43,45,46,47,48,50,51,53,54,55,57,64,65,66,83,86],Y=[1,82],j=[8,10,16,32,34,35,37,39,45,46,47,48,50,51,53,54,55,57,64,65,66,83,86],D=[1,83],I=[1,84],X=[1,85],G=[8,10,16,32,34,35,37,39,41,42,43,50,51,53,54,55,57,64,65,66,83,86],J=[1,89],F=[1,90],U=[1,91],z=[1,92],H=[1,97],V=[8,10,16,32,34,35,37,39,41,42,43,45,46,47,48,53,54,55,57,64,65,66,83,86],$=[1,103],q=[1,104],W=[8,10,16,32,34,35,37,39,41,42,43,45,46,47,48,50,51,57,64,65,66,83,86],Z=[1,105],Q=[1,106],K=[1,107],tt=[1,126],et=[1,139],it=[83,86],rt=[1,149],st=[10,66,86],ot=[8,10,16,20,32,34,35,37,39,41,42,43,45,46,47,48,50,51,53,54,55,57,64,65,66,82,83,86],nt=[1,166],at=[10,86],ht={trace:function(){},yy:{},symbols_:{error:2,Program:3,StatementList:4,EOF:5,IfStatement:6,IF:7,"(":8,Expression:9,")":10,Statement:11,ELSE:12,LoopStatement:13,WHILE:14,FOR:15,";":16,DO:17,UnaryStatement:18,USE:19,IDENTIFIER:20,DELETE:21,ReturnStatement:22,RETURN:23,EmptyStatement:24,StatementBlock:25,"{":26,"}":27,ExpressionStatement:28,AssignmentExpression:29,ConditionalExpression:30,LeftHandSideExpression:31,"=":32,LogicalORExpression:33,"?":34,":":35,LogicalANDExpression:36,"||":37,EqualityExpression:38,"&&":39,RelationalExpression:40,"==":41,"!=":42,"~=":43,AdditiveExpression:44,"<":45,">":46,"<=":47,">=":48,MultiplicativeExpression:49,"+":50,"-":51,UnaryExpression:52,"*":53,"/":54,"%":55,ExponentExpression:56,"^":57,"!":58,MemberExpression:59,CallExpression:60,PrimaryExpression:61,FunctionExpression:62,MapExpression:63,".":64,"[":65,"]":66,BasicLiteral:67,ObjectLiteral:68,ArrayLiteral:69,NullLiteral:70,BooleanLiteral:71,StringLiteral:72,NumberLiteral:73,NULL:74,TRUE:75,FALSE:76,STRING:77,NUMBER:78,NAN:79,INFINITY:80,ElementList:81,"<<":82,">>":83,PropertyList:84,Property:85,",":86,PropertyName:87,Arguments:88,AttributeList:89,Attribute:90,FUNCTION:91,ParameterDefinitionList:92,MAP:93,"->":94,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",7:"IF",8:"(",10:")",12:"ELSE",14:"WHILE",15:"FOR",16:";",17:"DO",19:"USE",20:"IDENTIFIER",21:"DELETE",23:"RETURN",26:"{",27:"}",32:"=",34:"?",35:":",37:"||",39:"&&",41:"==",42:"!=",43:"~=",45:"<",46:">",47:"<=",48:">=",50:"+",51:"-",53:"*",54:"/",55:"%",57:"^",58:"!",64:".",65:"[",66:"]",74:"NULL",75:"TRUE",76:"FALSE",77:"STRING",78:"NUMBER",79:"NAN",80:"INFINITY",82:"<<",83:">>",86:",",91:"FUNCTION",93:"MAP",94:"->"},productions_:[0,[3,2],[6,5],[6,7],[13,5],[13,9],[13,7],[18,2],[18,2],[22,2],[22,3],[24,1],[25,3],[4,2],[4,0],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[28,2],[9,1],[29,1],[29,3],[30,1],[30,5],[33,1],[33,3],[36,1],[36,3],[38,1],[38,3],[38,3],[38,3],[40,1],[40,3],[40,3],[40,3],[40,3],[44,1],[44,3],[44,3],[49,1],[49,3],[49,3],[49,3],[56,1],[56,3],[52,1],[52,2],[52,2],[52,2],[31,1],[31,1],[59,1],[59,1],[59,1],[59,3],[59,4],[61,1],[61,1],[61,1],[61,1],[61,3],[67,1],[67,1],[67,1],[67,1],[70,1],[71,1],[71,1],[72,1],[73,1],[73,1],[73,1],[69,2],[69,3],[68,2],[68,3],[84,1],[84,3],[85,3],[87,1],[87,1],[87,1],[60,2],[60,3],[60,2],[60,4],[60,3],[88,2],[88,3],[89,1],[89,3],[90,1],[90,1],[81,1],[81,3],[62,4],[62,5],[63,6],[92,1],[92,3]],performAction:function(t,e,i,r,s,o,n){var a=o.length-1;switch(s){case 1:return o[a-1];case 2:this.$=lt.createNode(ct(n[a-4]),"node_op","op_if",o[a-2],o[a]);break;case 3:this.$=lt.createNode(ct(n[a-6]),"node_op","op_if_else",o[a-4],o[a-2],o[a]);break;case 4:this.$=lt.createNode(ct(n[a-4]),"node_op","op_while",o[a-2],o[a]);break;case 5:this.$=lt.createNode(ct(n[a-8]),"node_op","op_for",o[a-6],o[a-4],o[a-2],o[a]);break;case 6:this.$=lt.createNode(ct(n[a-6]),"node_op","op_do",o[a-5],o[a-2]);break;case 7:this.$=lt.createNode(ct(n[a-1]),"node_op","op_use",o[a]);break;case 8:this.$=lt.createNode(ct(n[a-1]),"node_op","op_delete",o[a]);break;case 9:this.$=lt.createNode(ct(n[a-1]),"node_op","op_return",void 0);break;case 10:this.$=lt.createNode(ct(n[a-2]),"node_op","op_return",o[a-1]);break;case 11:case 14:this.$=lt.createNode(ct(n[a]),"node_op","op_none");break;case 12:this.$=o[a-1],this.$.needsBrackets=!0;break;case 13:this.$=lt.createNode(ct(n[a-1]),"node_op","op_none",o[a-1],o[a]);break;case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 23:case 24:case 26:case 28:case 30:case 32:case 36:case 41:case 44:case 48:case 50:case 52:case 54:case 55:case 56:case 58:case 62:case 81:case 84:case 85:case 86:this.$=o[a];break;case 22:case 65:case 93:this.$=o[a-1];break;case 25:this.$=lt.createNode(ct(n[a-2]),"node_op","op_assign",o[a-2],o[a]),this.$.isMath=!1;break;case 27:this.$=lt.createNode(ct(n[a-4]),"node_op","op_conditional",o[a-4],o[a-2],o[a]),this.$.isMath=!1;break;case 29:this.$=lt.createNode(ct(n[a-2]),"node_op","op_or",o[a-2],o[a]),this.$.isMath=!1;break;case 31:this.$=lt.createNode(ct(n[a-2]),"node_op","op_and",o[a-2],o[a]),this.$.isMath=!1;break;case 33:this.$=lt.createNode(ct(n[a-2]),"node_op","op_equ",o[a-2],o[a]),this.$.isMath=!1;break;case 34:this.$=lt.createNode(ct(n[a-2]),"node_op","op_neq",o[a-2],o[a]),this.$.isMath=!1;break;case 35:this.$=lt.createNode(ct(n[a-2]),"node_op","op_approx",o[a-2],o[a]),this.$.isMath=!1;break;case 37:this.$=lt.createNode(ct(n[a-2]),"node_op","op_lot",o[a-2],o[a]),this.$.isMath=!1;break;case 38:this.$=lt.createNode(ct(n[a-2]),"node_op","op_grt",o[a-2],o[a]),this.$.isMath=!1;break;case 39:this.$=lt.createNode(ct(n[a-2]),"node_op","op_loe",o[a-2],o[a]),this.$.isMath=!1;break;case 40:this.$=lt.createNode(ct(n[a-2]),"node_op","op_gre",o[a-2],o[a]),this.$.isMath=!1;break;case 42:this.$=lt.createNode(ct(n[a-2]),"node_op","op_add",o[a-2],o[a]),this.$.isMath=!0;break;case 43:this.$=lt.createNode(ct(n[a-2]),"node_op","op_sub",o[a-2],o[a]),this.$.isMath=!0;break;case 45:this.$=lt.createNode(ct(n[a-2]),"node_op","op_mul",o[a-2],o[a]),this.$.isMath=!0;break;case 46:this.$=lt.createNode(ct(n[a-2]),"node_op","op_div",o[a-2],o[a]),this.$.isMath=!0;break;case 47:this.$=lt.createNode(ct(n[a-2]),"node_op","op_mod",o[a-2],o[a]),this.$.isMath=!0;break;case 49:this.$=lt.createNode(ct(n[a-2]),"node_op","op_exp",o[a-2],o[a]),this.$.isMath=!0;break;case 51:this.$=lt.createNode(ct(n[a-1]),"node_op","op_not",o[a]),this.$.isMath=!1;break;case 53:this.$=lt.createNode(ct(n[a-1]),"node_op","op_neg",o[a]),this.$.isMath=!0;break;case 57:case 63:case 64:case 66:case 67:case 68:case 97:this.$=o[a],this.$.isMath=!1;break;case 59:case 91:this.$=lt.createNode(ct(n[a-2]),"node_op","op_property",o[a-2],o[a]),this.$.isMath=!0;break;case 60:case 90:this.$=lt.createNode(ct(n[a-3]),"node_op","op_extvalue",o[a-3],o[a-1]),this.$.isMath=!0;break;case 61:this.$=lt.createNode(ct(n[a]),"node_var",o[a]);break;case 69:this.$=o[a],this.$.isMath=!0;break;case 70:this.$=lt.createNode(ct(n[a]),"node_const",null);break;case 71:this.$=lt.createNode(ct(n[a]),"node_const_bool",!0);break;case 72:this.$=lt.createNode(ct(n[a]),"node_const_bool",!1);break;case 73:this.$=lt.createNode(ct(n[a]),"node_str",o[a].substring(1,o[a].length-1));break;case 74:this.$=lt.createNode(ct(n[a]),"node_const",parseFloat(o[a]));break;case 75:this.$=lt.createNode(ct(n[a]),"node_const",NaN);break;case 76:this.$=lt.createNode(ct(n[a]),"node_const",1/0);break;case 77:this.$=lt.createNode(ct(n[a-1]),"node_op","op_array",[]);break;case 78:this.$=lt.createNode(ct(n[a-2]),"node_op","op_array",o[a-1]);break;case 79:this.$=lt.createNode(ct(n[a-1]),"node_op","op_emptyobject",{});break;case 80:this.$=lt.createNode(ct(n[a-2]),"node_op","op_proplst_val",o[a-1]);break;case 82:this.$=lt.createNode(ct(n[a-2]),"node_op","op_proplst",o[a-2],o[a]);break;case 83:this.$=lt.createNode(ct(n[a-2]),"node_op","op_prop",o[a-2],o[a]);break;case 87:case 89:this.$=lt.createNode(ct(n[a-1]),"node_op","op_execfun",o[a-1],o[a]),this.$.isMath=!0;break;case 88:this.$=lt.createNode(ct(n[a-2]),"node_op","op_execfun",o[a-2],o[a-1],o[a],!0),this.$.isMath=!1;break;case 92:this.$=[];break;case 94:case 98:case 103:this.$=[o[a]];break;case 95:case 99:case 104:this.$=o[a-2].concat(o[a]);break;case 96:this.$=lt.createNode(ct(n[a]),"node_var",o[a]),this.$.isMath=!0;break;case 100:this.$=lt.createNode(ct(n[a-3]),"node_op","op_function",[],o[a]),this.$.isMath=!1;break;case 101:this.$=lt.createNode(ct(n[a-4]),"node_op","op_function",o[a-2],o[a]),this.$.isMath=!1;break;case 102:this.$=lt.createNode(ct(n[a-5]),"node_op","op_map",o[a-3],o[a])}},table:[e([5,7,8,14,15,16,17,19,20,21,23,26,50,51,58,65,74,75,76,77,78,79,80,82,91,93],i,{3:1,4:2}),{1:[3]},{5:[1,3],6:6,7:r,8:s,9:20,11:4,13:7,14:o,15:n,16:a,17:h,18:8,19:l,20:c,21:d,22:9,23:u,24:11,25:5,26:p,28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{1:[2,1]},e(T,[2,13]),e(N,[2,15]),e(N,[2,16]),e(N,[2,17]),e(N,[2,18]),e(N,[2,19]),e(N,[2,20]),e(N,[2,21]),e([7,8,14,15,16,17,19,20,21,23,26,27,50,51,58,65,74,75,76,77,78,79,80,82,91,93],i,{4:61}),{8:[1,62]},{8:[1,63]},{8:[1,64]},{6:6,7:r,8:s,9:20,11:65,13:7,14:o,15:n,16:a,17:h,18:8,19:l,20:c,21:d,22:9,23:u,24:11,25:5,26:p,28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{20:[1,66]},{20:[1,67]},{8:s,9:69,16:[1,68],20:c,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{16:[1,70]},e(N,[2,11]),e(A,[2,23]),e(A,[2,24]),e([8,10,16,34,35,37,39,41,42,43,45,46,47,48,50,51,53,54,55,64,65,66,83,86],M,{32:[1,71],57:k}),e([8,10,16,32,35,39,41,42,43,45,46,47,48,50,51,53,54,55,57,64,65,66,83,86],[2,26],{34:[1,73],37:[1,74]}),e(R,[2,54],{88:77,8:L,64:[1,75],65:[1,76]}),e(R,[2,55],{88:79,8:L,64:[1,81],65:[1,80]}),e(B,[2,28],{39:Y}),e(A,[2,56]),e(A,[2,57]),e(A,[2,58]),e(j,[2,30],{41:D,42:I,43:X}),e(A,[2,61]),e(A,[2,62]),e(A,[2,63]),e(A,[2,64]),{8:s,9:86,20:c,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:[1,87]},{8:[1,88]},e(G,[2,32],{45:J,46:F,47:U,48:z}),e(A,[2,66]),e(A,[2,67]),e(A,[2,68]),e(A,[2,69]),{20:H,72:98,73:99,77:_,78:P,79:E,80:S,83:[1,93],84:94,85:95,87:96},{8:s,20:c,29:102,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,66:[1,100],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,81:101,82:x,91:O,93:w},e(V,[2,36],{50:$,51:q}),e(A,[2,70]),e(A,[2,71]),e(A,[2,72]),e(A,[2,73]),e(A,[2,74]),e(A,[2,75]),e(A,[2,76]),e(W,[2,41],{53:Z,54:Q,55:K}),e(A,[2,44]),e(A,[2,50]),{8:s,20:c,31:109,50:f,51:m,52:108,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,50:f,51:m,52:110,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,50:f,51:m,52:111,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{6:6,7:r,8:s,9:20,11:4,13:7,14:o,15:n,16:a,17:h,18:8,19:l,20:c,21:d,22:9,23:u,24:11,25:5,26:p,27:[1,112],28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,9:113,20:c,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,9:114,20:c,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,9:115,20:c,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{14:[1,116]},e(N,[2,7]),e(N,[2,8]),e(N,[2,9]),{16:[1,117]},e(N,[2,22]),{8:s,20:c,29:118,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,50:f,51:m,52:119,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,29:120,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,36:121,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{20:[1,122]},{8:s,9:123,20:c,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},e(A,[2,87],{89:124,90:125,68:127,20:tt,82:x}),{8:s,10:[1,128],20:c,29:102,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,81:129,82:x,91:O,93:w},e(A,[2,89]),{8:s,9:130,20:c,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{20:[1,131]},{8:s,20:c,31:109,38:132,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,40:133,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,40:134,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,40:135,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{10:[1,136]},{10:[1,137],20:et,92:138},{20:et,92:140},{8:s,20:c,31:109,44:141,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,44:142,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,44:143,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,44:144,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},e(A,[2,79]),{83:[1,145],86:[1,146]},e(it,[2,81]),{35:[1,147]},{35:[2,84]},{35:[2,85]},{35:[2,86]},e(A,[2,77]),{66:[1,148],86:rt},e(st,[2,98]),{8:s,20:c,31:109,49:150,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,49:151,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,50:f,51:m,52:152,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,50:f,51:m,52:153,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,31:109,50:f,51:m,52:154,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},e(A,[2,51]),e([8,10,16,32,34,35,37,39,41,42,43,45,46,47,48,50,51,53,54,55,64,65,66,83,86],M,{57:k}),e(A,[2,52]),e(A,[2,53]),e([5,7,8,10,12,14,15,16,17,19,20,21,23,26,27,32,34,35,37,39,41,42,43,45,46,47,48,50,51,53,54,55,57,58,64,65,66,74,75,76,77,78,79,80,82,83,86,91,93],[2,12]),{10:[1,155]},{10:[1,156]},{16:[1,157]},{8:[1,158]},e(N,[2,10]),e(A,[2,25]),e(A,[2,49]),{35:[1,159]},e(B,[2,29],{39:Y}),e(A,[2,59]),{66:[1,160]},e([8,10,16,32,34,35,37,39,41,42,43,45,46,47,48,50,51,53,54,55,57,64,65,66,83],[2,88],{86:[1,161]}),e(A,[2,94]),e(A,[2,96]),e(A,[2,97]),e(ot,[2,92]),{10:[1,162],86:rt},{66:[1,163]},e(A,[2,91]),e(j,[2,31],{41:D,42:I,43:X}),e(G,[2,33],{45:J,46:F,47:U,48:z}),e(G,[2,34],{45:J,46:F,47:U,48:z}),e(G,[2,35],{45:J,46:F,47:U,48:z}),e(A,[2,65]),{25:164,26:p},{10:[1,165],86:nt},e(at,[2,103]),{10:[1,167],86:nt},e(V,[2,37],{50:$,51:q}),e(V,[2,38],{50:$,51:q}),e(V,[2,39],{50:$,51:q}),e(V,[2,40],{50:$,51:q}),e(A,[2,80]),{20:H,72:98,73:99,77:_,78:P,79:E,80:S,85:168,87:96},{8:s,20:c,29:169,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},e(A,[2,78]),{8:s,20:c,29:170,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},e(W,[2,42],{53:Z,54:Q,55:K}),e(W,[2,43],{53:Z,54:Q,55:K}),e(A,[2,45]),e(A,[2,46]),e(A,[2,47]),{6:6,7:r,8:s,9:20,11:171,13:7,14:o,15:n,16:a,17:h,18:8,19:l,20:c,21:d,22:9,23:u,24:11,25:5,26:p,28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{6:6,7:r,8:s,9:20,11:172,13:7,14:o,15:n,16:a,17:h,18:8,19:l,20:c,21:d,22:9,23:u,24:11,25:5,26:p,28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,9:173,20:c,
29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,9:174,20:c,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,20:c,29:175,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},e(A,[2,60]),{20:tt,68:127,82:x,90:176},e(ot,[2,93]),e(A,[2,90]),e(A,[2,100]),{25:177,26:p},{20:[1,178]},{94:[1,179]},e(it,[2,82]),e(it,[2,83]),e(st,[2,99]),e(T,[2,2],{12:[1,180]}),e(N,[2,4]),{16:[1,181]},{10:[1,182]},e(A,[2,27]),e(A,[2,95]),e(A,[2,101]),e(at,[2,104]),{8:s,9:183,20:c,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{6:6,7:r,8:s,9:20,11:184,13:7,14:o,15:n,16:a,17:h,18:8,19:l,20:c,21:d,22:9,23:u,24:11,25:5,26:p,28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{8:s,9:185,20:c,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},{16:[1,186]},e(A,[2,102]),e(N,[2,3]),{10:[1,187]},e(N,[2,6]),{6:6,7:r,8:s,9:20,11:188,13:7,14:o,15:n,16:a,17:h,18:8,19:l,20:c,21:d,22:9,23:u,24:11,25:5,26:p,28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:f,51:m,52:56,56:57,58:b,59:26,60:27,61:29,62:30,63:31,65:g,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:v,75:y,76:C,77:_,78:P,79:E,80:S,82:x,91:O,93:w},e(N,[2,5])],defaultActions:{3:[2,1],97:[2,84],98:[2,85],99:[2,86]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=this,i=[0],r=[null],s=[],o=this.table,n="",a=0,h=0,l=0,c=s.slice.call(arguments,1),d=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);d.setInput(t,u.yy),u.yy.lexer=d,u.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;s.push(f);var m=d.options&&d.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var b,g,v,y,C,_,P,E,S,x=function(){var t;return t=d.lex()||1,"number"!=typeof t&&(t=e.symbols_[t]||t),t},O={};;){if(v=i[i.length-1],this.defaultActions[v]?y=this.defaultActions[v]:(null!==b&&void 0!==b||(b=x()),y=o[v]&&o[v][b]),void 0===y||!y.length||!y[0]){var w="";S=[];for(_ in o[v])this.terminals_[_]&&_>2&&S.push("'"+this.terminals_[_]+"'");w=d.showPosition?"Parse error on line "+(a+1)+":\n"+d.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(w,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:f,expected:S})}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+b);switch(y[0]){case 1:i.push(b),r.push(d.yytext),s.push(d.yylloc),i.push(y[1]),b=null,g?(b=g,g=null):(h=d.yyleng,n=d.yytext,a=d.yylineno,f=d.yylloc,l>0&&l--);break;case 2:if(P=this.productions_[y[1]][1],O.$=r[r.length-P],O._$={first_line:s[s.length-(P||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(P||1)].first_column,last_column:s[s.length-1].last_column},m&&(O._$.range=[s[s.length-(P||1)].range[0],s[s.length-1].range[1]]),void 0!==(C=this.performAction.apply(O,[n,h,a,u.yy,y[1],r,s].concat(c))))return C;P&&(i=i.slice(0,-1*P*2),r=r.slice(0,-1*P),s=s.slice(0,-1*P)),i.push(this.productions_[y[1]][0]),r.push(O.$),s.push(O._$),E=o[i[i.length-2]][i[i.length-1]],i.push(E);break;case 3:return!0}}return!0}},lt={node:function(t,e,i){return{type:t,value:e,children:i}},createNode:function(t,e,i,r){var s,o=this.node(e,i,[]);for(s=3;s0&&(this.points[a].prev=this.points[a-1]),a.7||Math.abs(t.scrCoords[2]-this._lastCrds[2])>.7))&&(t._t=e,this.points.push(t),this._lastCrds=t.copy("scrCoords"))},_intersectWithBorder:function(t,e,i){var r,o,n,a;return i<=0?(r=[-e[0],1,0],o=s.crossProduct(r,t),0!==o[0]?(n=o[1]/o[0],a=o[2]/o[0]):a=1/0,as&&(s=this.vertices[n].X()),this.vertices[n].Y()>r&&(r=this.vertices[n].Y()),this.vertices[n].Y()0&&(this.mode===this.BOARD_MODE_DRAG||this.mode===this.BOARD_MODE_MOVE_ORIGIN||(new Date).getTime()-this.positionAccessLast<1e3))return this.cPos;if(this.positionAccessLast=(new Date).getTime(),a.getBoundingClientRect){for(i=a.getBoundingClientRect(),r=1,s=a;s&&u.exists(s.parentNode);)u.exists(s.style)&&u.exists(s.style.zoom)&&""!==s.style.zoom&&(r*=parseFloat(s.style.zoom)),s=s.parentNode;return t=[i.left*r,i.top*r],t[0]+=f.getProp(a,"border-left-width"),t[1]+=f.getProp(a,"border-top-width"),"vml"!==this.renderer.type&&(t[0]+=f.getProp(a,"padding-left"),t[1]+=f.getProp(a,"padding-top")),this.cPos=t.slice(),this.cPos}return t=f.getOffset(a),e=this.document.documentElement.ownerDocument,!this.containerObj.currentStyle&&e.defaultView&&(t[0]+=f.getProp(o,"margin-left"),t[1]+=f.getProp(o,"margin-top"),t[0]+=f.getProp(o,"border-left-width"),t[1]+=f.getProp(o,"border-top-width"),t[0]+=f.getProp(o,"padding-left"),t[1]+=f.getProp(o,"padding-top")),n&&(t[0]+=f.getProp(n,"left"),t[1]+=f.getProp(n,"top")),"object"==typeof google&&google.translate&&(t[0]+=10,t[1]+=25),t[0]+=f.getProp(a,"border-left-width"),t[1]+=f.getProp(a,"border-top-width"),"vml"!==this.renderer.type&&(t[0]+=f.getProp(a,"padding-left"),t[1]+=f.getProp(a,"padding-top")),t[0]+=this.attr.offsetx,t[1]+=this.attr.offsety,this.cPos=t.slice(),this.cPos},getMousePosition:function(t,e){var i,r,s=this.getCoordsTopLeftCorner();return i=f.getPosition(t,e,this.document),u.exists(this.cssTransMat)||this.updateCSSTransforms(),r=[1,i[0]-s[0],i[1]-s[1]],r=o.matVecMult(this.cssTransMat,r),r[1]/=r[0],r[2]/=r[0],[r[1],r[2]]},initMoveOrigin:function(t,e){this.drag_dx=t-this.origin.scrCoords[1],this.drag_dy=e-this.origin.scrCoords[2],this.mode=this.BOARD_MODE_MOVE_ORIGIN,this.updateQuality=this.BOARD_QUALITY_LOW},initMoveObject:function(t,i,r,s){var o,n,a,l=[],c=[],d=this.objectsList.length,p={visProp:{layer:-1e4}};for(n=0;n"+u.escapeHTML(this.xmlString)+"
"),t.document.close(),this},prepareUpdate:function(){var t,e,i=this.objectsList.length;for(t=0;th&&n[s]0&&(x=window.setInterval(this.rolling,n)),this},this.stop=function(){return window.clearInterval(x),this},this}}}),t.Board}),define("renderer/svg",["jxg","options","renderer/abstract","base/constants","utils/type","utils/env","utils/color","utils/base64","math/numerics"],function(t,e,i,r,s,o,n,a,h){"use strict";return t.SVGRenderer=function(t,i){var r;for(this.type="svg",this.isIE=-1!==navigator.appVersion.indexOf("MSIE")||navigator.userAgent.match(/Trident\//),this.svgRoot=null,this.svgNamespace="http://www.w3.org/2000/svg",this.xlinkNamespace="http://www.w3.org/1999/xlink",this.container=t,this.container.style.MozUserSelect="none",this.container.style.userSelect="none",this.container.style.overflow="hidden",""===this.container.style.position&&(this.container.style.position="relative"),this.svgRoot=this.container.ownerDocument.createElementNS(this.svgNamespace,"svg"),this.svgRoot.style.overflow="hidden",this.resize(i.width,i.height),this.container.appendChild(this.svgRoot),this.defs=this.container.ownerDocument.createElementNS(this.svgNamespace,"defs"),this.svgRoot.appendChild(this.defs),this.filter=this.container.ownerDocument.createElementNS(this.svgNamespace,"filter"),this.filter.setAttributeNS(null,"id",this.container.id+"_f1"),this.filter.setAttributeNS(null,"width","300%"),this.filter.setAttributeNS(null,"height","300%"),this.filter.setAttributeNS(null,"filterUnits","userSpaceOnUse"),this.feOffset=this.container.ownerDocument.createElementNS(this.svgNamespace,"feOffset"),this.feOffset.setAttributeNS(null,"result","offOut"),this.feOffset.setAttributeNS(null,"in","SourceAlpha"),this.feOffset.setAttributeNS(null,"dx","5"),this.feOffset.setAttributeNS(null,"dy","5"),this.filter.appendChild(this.feOffset),this.feGaussianBlur=this.container.ownerDocument.createElementNS(this.svgNamespace,"feGaussianBlur"),this.feGaussianBlur.setAttributeNS(null,"result","blurOut"),this.feGaussianBlur.setAttributeNS(null,"in","offOut"),this.feGaussianBlur.setAttributeNS(null,"stdDeviation","3"),this.filter.appendChild(this.feGaussianBlur),this.feBlend=this.container.ownerDocument.createElementNS(this.svgNamespace,"feBlend"),this.feBlend.setAttributeNS(null,"in","SourceGraphic"),this.feBlend.setAttributeNS(null,"in2","blurOut"),this.feBlend.setAttributeNS(null,"mode","normal"),this.filter.appendChild(this.feBlend),this.defs.appendChild(this.filter),this.layer=[],r=0;r
\n")}},updateTicks:function(t){var e,i,s,o,n,a=this.resolution,h=[];for(i=t.ticks.length,e=0;e0){for(i=this.joinTransforms(t,e),c[0]=o.matVecMult(i,t.coords.scrCoords),c[0][1]/=c[0][0],c[0][2]/=c[0][0],c[1]=o.matVecMult(i,[1,t.coords.scrCoords[1]+t.size[0],t.coords.scrCoords[2]]),c[1][1]/=c[1][0],c[1][2]/=c[1][0],c[2]=o.matVecMult(i,[1,t.coords.scrCoords[1]+t.size[0],t.coords.scrCoords[2]-t.size[1]]),c[2][1]/=c[2][0],c[2][2]/=c[2][0],c[3]=o.matVecMult(i,[1,t.coords.scrCoords[1],t.coords.scrCoords[2]-t.size[1]]),c[3][1]/=c[3][0],c[3][2]/=c[3][0],r=c[0][1],n=c[0][1],s=c[0][2],a=c[0][2],h=1;h<4;h++)r=Math.max(r,c[h][1]),n=Math.min(n,c[h][1]),s=Math.max(s,c[h][2]),a=Math.min(a,c[h][2]);l.style.left=Math.floor(n)+"px",l.style.top=Math.floor(a)+"px",l.filters.item(0).M11=i[1][1],l.filters.item(0).M12=i[1][2],l.filters.item(0).M21=i[2][1],l.filters.item(0).M22=i[2][2],l.filters.item(0).enabled=!0}},updateImageURL:function(t){var e=r.evaluate(t.url);this._setAttr(t.rendNode,"src",e)},appendChildPrim:function(t,e){return r.exists(e)||(e=0),t.style.zIndex=e,this.container.appendChild(t),t},appendNodesToElement:function(t,e){"shape"!==e&&"path"!==e&&"polygon"!==e||(t.rendNodePath=this.getElementById(t.id+"_path")),t.rendNodeFill=this.getElementById(t.id+"_fill"),t.rendNodeStroke=this.getElementById(t.id+"_stroke"),t.rendNodeShadow=this.getElementById(t.id+"_shadow"),t.rendNode=this.getElementById(t.id)},createPrim:function(t,e){var i,r,s=this.createNode("fill"),o=this.createNode("stroke"),n=this.createNode("shadow");return this._setAttr(s,"id",this.container.id+"_"+e+"_fill"),this._setAttr(o,"id",this.container.id+"_"+e+"_stroke"),this._setAttr(n,"id",this.container.id+"_"+e+"_shadow"),"circle"===t||"ellipse"===t?(i=this.createNode("oval"),i.appendChild(s),i.appendChild(o),i.appendChild(n)):"polygon"===t||"path"===t||"shape"===t||"line"===t?(i=this.createNode("shape"),i.appendChild(s),i.appendChild(o),i.appendChild(n),r=this.createNode("path"),this._setAttr(r,"id",this.container.id+"_"+e+"_path"),i.appendChild(r)):(i=this.createNode(t),i.appendChild(s),i.appendChild(o),i.appendChild(n)),i.style.position="absolute",i.style.left="0px",i.style.top="0px",this._setAttr(i,"id",this.container.id+"_"+e),i},remove:function(t){r.exists(t)&&t.removeNode(!0)},makeArrows:function(t){var e,i=r.evaluate(t.visProp.firstarrow),s=r.evaluate(t.visProp.lastarrow);t.visPropOld.firstarrow===i&&t.visPropOld.lastarrow===s||(i?(e=t.rendNodeStroke,this._setAttr(e,"startarrow","block"),this._setAttr(e,"startarrowlength","long")):(e=t.rendNodeStroke,r.exists(e)&&this._setAttr(e,"startarrow","none")),s?(e=t.rendNodeStroke,this._setAttr(e,"id",this.container.id+"_"+t.id+"stroke"),this._setAttr(e,"endarrow","block"),this._setAttr(e,"endarrowlength","long")):(e=t.rendNodeStroke,r.exists(e)&&this._setAttr(e,"endarrow","none")),t.visPropOld.firstarrow=i,t.visPropOld.lastarrow=s)},updateEllipsePrim:function(t,e,i,r,s){t.style.left=Math.floor(e-r)+"px",t.style.top=Math.floor(i-s)+"px",t.style.width=Math.floor(2*Math.abs(r))+"px",t.style.height=Math.floor(2*Math.abs(s))+"px"},updateLinePrim:function(t,e,i,r,s,o){var n,a=this.resolution;isNaN(e+i+r+s)||(n=["m ",Math.floor(a*e),", ",Math.floor(a*i)," l ",Math.floor(a*r),", ",Math.floor(a*s)],this.updatePathPrim(t,n,o))},updatePathPrim:function(t,e,i){var r=i.canvasWidth,s=i.canvasHeight;e.length<=0&&(e=["m 0,0"]),t.style.width=r,t.style.height=s,this._setAttr(t,"coordsize",[Math.floor(this.resolution*r),Math.floor(this.resolution*s)].join(",")),this._setAttr(t,"path",e.join(""))},updatePathStringPoint:function(t,e,i){var r=[],s=Math.round,o=t.coords.scrCoords,n=e*Math.sqrt(3)*.5,a=.5*e,h=this.resolution;return"x"===i?r.push([" m ",s(h*(o[1]-e)),", ",s(h*(o[2]-e))," l ",s(h*(o[1]+e)),", ",s(h*(o[2]+e))," m ",s(h*(o[1]+e)),", ",s(h*(o[2]-e))," l ",s(h*(o[1]-e)),", ",s(h*(o[2]+e))].join("")):"+"===i?r.push([" m ",s(h*(o[1]-e)),", ",s(h*o[2])," l ",s(h*(o[1]+e)),", ",s(h*o[2])," m ",s(h*o[1]),", ",s(h*(o[2]-e))," l ",s(h*o[1]),", ",s(h*(o[2]+e))].join("")):"<>"===i?r.push([" m ",s(h*(o[1]-e)),", ",s(h*o[2])," l ",s(h*o[1]),", ",s(h*(o[2]+e))," l ",s(h*(o[1]+e)),", ",s(h*o[2])," l ",s(h*o[1]),", ",s(h*(o[2]-e))," x e "].join("")):"^"===i?r.push([" m ",s(h*o[1]),", ",s(h*(o[2]-e))," l ",s(h*(o[1]-n)),", ",s(h*(o[2]+a))," l ",s(h*(o[1]+n)),", ",s(h*(o[2]+a))," x e "].join("")):"v"===i?r.push([" m ",s(h*o[1]),", ",s(h*(o[2]+e))," l ",s(h*(o[1]-n)),", ",s(h*(o[2]-a))," l ",s(h*(o[1]+n)),", ",s(h*(o[2]-a))," x e "].join("")):">"===i?r.push([" m ",s(h*(o[1]+e)),", ",s(h*o[2])," l ",s(h*(o[1]-a)),", ",s(h*(o[2]-n))," l ",s(h*(o[1]-a)),", ",s(h*(o[2]+n))," l ",s(h*(o[1]+e)),", ",s(h*o[2])].join("")):"<"===i&&r.push([" m ",s(h*(o[1]-e)),", ",s(h*o[2])," l ",s(h*(o[1]+a)),", ",s(h*(o[2]-n))," l ",s(h*(o[1]+a)),", ",s(h*(o[2]+n))," x e "].join("")),r},updatePathStringPrim:function(t){var e,i,r=[],s=this.resolution,o=Math.round,n=" m ",a=Math.min(t.numberPoints,8192);if(t.numberPoints<=0)return"";if(a=Math.min(a,t.points.length),1===t.bezierDegree)for(e=0;e2e4?i[1]=2e4:i[1]<-2e4&&(i[1]=-2e4),i[2]>2e4?i[2]=2e4:i[2]<-2e4&&(i[2]=-2e4),r.push([n,o(s*i[1]),", ",o(s*i[2])].join("")),n=" l ");else if(3===t.bezierDegree)for(e=0;e2e4?o[1]=2e4:o[1]<-2e4&&(o[1]=-2e4),o[2]>2e4?o[2]=2e4:o[2]<-2e4&&(o[2]=-2e4)," m "===p?l.push([p,u(d*o[1])," ",u(d*o[2])].join("")):(s=2*i,l.push([p,u(d*(a+.333*(o[1]-a)+c*(s*Math.random()-i)))," ",u(d*(h+.333*(o[2]-h)+c*(s*Math.random()-i)))," ",u(d*(a+.666*(o[1]-a)+c*(s*Math.random()-i)))," ",u(d*(h+.666*(o[2]-h)+c*(s*Math.random()-i)))," ",u(d*o[1])," ",u(d*o[2])].join(""))),p=" c ",a=o[1],h=o[2]);return l.push(" e"),l},updatePolygonPrim:function(t,e){var i,r,s=e.vertices.length,o=this.resolution,n=[];if(this._setAttr(t,"stroked","false"),r=e.vertices[0].coords.scrCoords,!isNaN(r[1]+r[2])){for(n.push(["m ",Math.floor(o*r[1]),",",Math.floor(o*r[2])," l "].join("")),i=1;i