.5*d+Math.PI)&&(c=l),this.position=c,Math.abs(f)>E.eps&&(this.position/=f)),i=u.Radius(),s=[u.center.X()+i*Math.cos(this.position*f+h),u.center.Y()+i*Math.sin(this.position*f+h)];else if(this.updateConstraint(),a)for(s=S.projectPointToCurve(this,p[p.length-1],this.board).usrCoords,n=p.length-2;0<=n;n--)s=new x(w.COORDS_BY_USER,E.matVecMult(p[n].transformMat,s),this.board).usrCoords;else s=S.projectPointToCurve(this,u,this.board).usrCoords}else O.isPoint(u)&&(s=S.projectPointToPoint(this,u,this.board).usrCoords);this.coords.setCoordinates(w.COORDS_BY_USER,s,!1)}else this.needsUpdateFromParent=!0},updateRendererGeneric:function(t){return this.needsUpdate&&(this.visPropCalc.visible&&(this.isReal=!isNaN(this.coords.usrCoords[1]+this.coords.usrCoords[2]),this.isReal=Math.abs(this.coords.usrCoords[0])>E.eps&&this.isReal,this.isReal||this.updateVisibility(!1)),this.visPropCalc.visible&&this.board.renderer[t](this),this.hasLabel&&this.visPropCalc.visible&&this.label&&this.label.visPropCalc.visible&&this.isReal&&(this.label.update(),this.board.renderer.updateText(this.label)),this.setDisplayRendNode(),this.needsUpdate=!1),this},X:function(){return this.coords.usrCoords[1]},Y:function(){return this.coords.usrCoords[2]},Z:function(){return this.coords.usrCoords[0]},XEval:function(){return this.coords.usrCoords[1]},YEval:function(){return this.coords.usrCoords[2]},ZEval:function(){return this.coords.usrCoords[0]},Dist:function(t){return this.isReal&&t.isReal?this.coords.distance(w.COORDS_BY_USER,t.coords):NaN},snapToGrid:function(t){return this.handleSnapToGrid(t)},handleSnapToPoints:function(t){var e,i,r,s,o,n,a,h=0,l=1/0,c=null,d=O.evaluate(this.visProp.ignoredsnaptopoints),u=!1,p=this.board.objectsList.length;if(d&&(n=d.length),O.evaluate(this.visProp.snaptopoints)||t){for(s=O.evaluate(this.visProp.attractorunit),o=O.evaluate(this.visProp.attractordistance),e=0;e"===i.effect?Math.pow(Math.sin(t/n*Math.PI/2),2):t/n}var s,o=this.board.attr.animationdelay,n=Math.ceil(e/o),a=[],h=this.coords.usrCoords[1],l=this.coords.usrCoords[2],c=t.usrCoords[1]-h,d=t.usrCoords[2]-l;if(!O.exists(e)||0===e||Math.abs(t.usrCoords[0]-this.coords.usrCoords[0])>E.eps)return this.setPosition(w.COORDS_BY_USER,t.usrCoords),this.board.update(this);if(!O.exists(i.callback)&&Math.abs(c)"===i.effect?Math.pow(Math.sin(e*Math.PI/2),2):e}var s,o,n,a=this.board.attr.animationdelay,h=[],l=this.coords.usrCoords[1],c=this.coords.usrCoords[2],d=t.usrCoords[1]-l,u=t.usrCoords[2]-c;for(O.isNumber(i)?i={repeat:i}:(i=i||{},O.exists(i.repeat)||(i.repeat=1)),n=Math.ceil(e/(a*i.repeat)),o=0;oe&&(this.intervalCount=0),this.slideObject.elementClass===w.OBJECT_CLASS_LINE?(h=this.slideObject.point1.coords.scrCoords,l=this.slideObject.point2.coords.scrCoords,i=Math.round((l[1]-h[1])*this.intervalCount/e),r=Math.round((l[2]-h[2])*this.intervalCount/e),0")).substr(i).indexOf("}"))&&(t=t.substr(0,e)+t.substr(e).replace(/\}/,"")),i=t.indexOf("_{");for(i=t.indexOf("_");0<=i;)i=(t=t.substr(0,i)+t.substr(i).replace(/_(.?)/,"$1")).indexOf("_");return t},replaceSup:function(t){if(!t.indexOf)return t;for(var e,i=t.indexOf("^{");0<=i;)0<=(e=(t=t.substr(0,i)+t.substr(i).replace(/\^\{/,"")).substr(i).indexOf("}"))&&(t=t.substr(0,e)+t.substr(e).replace(/\}/,"")),i=t.indexOf("^{");for(i=t.indexOf("^");0<=i;)i=(t=t.substr(0,i)+t.substr(i).replace(/\^(.?)/,"$1")).indexOf("^");return t},getSize:function(){return this.size},setCoords:function(t,e){var i,r,s;return y.isArray(t)&&1/g,"∠")).replace(/<arc\s*\/>/g,"∠")).replace(/<sqrt\s*\/>/g,"√")).replace(/<value>/g,"")).replace(/<\/value>/g,"")).indexOf(""),a=t.indexOf("");if(0<=n)for(;0<=n;)o+=' + "'+this.replaceSub(this.replaceSup(t.slice(0,n)))+'"',s=(s=t.slice(n+7,a)).replace(/\s+/g,""),!0===e&&(s=this.expandShortMath(s)),(r=(r=(r=i?s:h.geonext2JS(s,this.board)).replace(/\\"/g,"'")).replace(/\\'/g,"'")).indexOf("toFixed")<0&&y.isNumber(y.bind(this.board.jc.snippet(r,!0,"",!1),this)())?o+="+("+r+").toFixed("+y.evaluate(this.visProp.digits)+")":o+="+("+r+")",n=(t=t.slice(a+8)).indexOf(""),a=t.indexOf("");return o+=' + "'+this.replaceSub(this.replaceSup(t))+'"',(o=(o=this.convertGeonext2CSS(o)).replace(/&/g,"&")).replace(/"/g,"'")},convertGeonext2CSS:function(t){return y.isString(t)&&(t=(t=(t=(t=(t=(t=(t=(t=t.replace(//g,"")).replace(/<overline>/g,"")).replace(/<\/overline>/g,"")).replace(/<\/overline>/g,"")).replace(//g,"")).replace(/<arrow>/g,"")).replace(/<\/arrow>/g,"")).replace(/<\/arrow>/g,"")),t},notifyParents:function(t){var e,i=null;for(t=(t=t.replace(/<value>/g,"")).replace(/<\/value>/g,"");null!==(i=(e=/([\w\s\*\/\^\-\+\(\)\[\],<>=!]+)<\/value>/).exec(t))&&(h.findDependencies(this,i[1],this.board),t=(t=t.substr(i.index)).replace(e,"")),null!==i;);return this},getParents:function(){var t=void 0!==this.relativeCoords?[this.relativeCoords.usrCoords[1],this.relativeCoords.usrCoords[2],this.orgText]:[this.Z(),this.X(),this.Y(),this.orgText];return 0!==this.parents.length&&(t=this.parents),t},bounds:function(){var t=this.coords.usrCoords;return y.evaluate(this.visProp.islabel)||0===this.board.unitY||0===this.board.unitX?[0,0,0,0]:[t[1],t[2]+this.size[1]/this.board.unitY,t[1]+this.size[0]/this.board.unitX,t[2]]},getAnchorX:function(){var t=y.evaluate(this.visProp.anchorx);if("auto"==t)switch(this.visProp.position){case"top":case"bot":return"middle";case"rt":case"lrt":case"urt":return"left";case"lft":case"llft":case"ulft":default:return"right"}return t},getAnchorY:function(){var t=y.evaluate(this.visProp.anchory);if("auto"==t)switch(this.visProp.position){case"top":case"ulft":case"urt":return"bottom";case"bot":case"lrt":case"llft":return"top";case"rt":case"lft":default:return"middle"}return t},getNumberofConflicts:function(t,e,i,r){var s,o,n,a=0,h=this.board.options.precision.hasPoint;for(this.board.options.precision.hasPoint=.5*Math.max(i,r),s=0,n=this.board.objectsList.length;s'],(r=a.createText(t,s,o)).type=y.OBJECT_TYPE_HTMLSLIDER,r.rendNodeForm=r.rendNode.childNodes[0],r.rendNodeRange=r.rendNodeForm.childNodes[0],r.rendNodeRange.min=e[1][0],r.rendNodeRange.max=e[1][2],r.rendNodeRange.step=o.step,r.rendNodeRange.value=e[1][1],r.rendNodeLabel=r.rendNodeForm.childNodes[1],r.rendNodeLabel.id=r.rendNode.id+"_label",o.withlabel&&(r.rendNodeLabel.innerHTML=r.name+"="),r.rendNodeOut=r.rendNodeForm.childNodes[2],r.rendNodeOut.value=e[1][1];try{r.rendNodeForm.id=r.rendNode.id+"_form",r.rendNodeRange.id=r.rendNode.id+"_range",r.rendNodeOut.id=r.rendNode.id+"_out"}catch(t){a.debug(t)}return r.rendNodeRange.style.width=o.widthrange+"px",r.rendNodeRange.style.verticalAlign="middle",r.rendNodeOut.style.width=o.widthout+"px",r._val=e[1][1],a.supportsVML()?n.addEvent(r.rendNodeForm,"change",d,r):n.addEvent(r.rendNodeForm,"input",d,r),r.Value=function(){return this._val},r},a.registerElement("htmlslider",a.createHTMLSlider),{Text:a.Text,createText:a.createText,createHTMLSlider:a.createHTMLSlider}}),define("utils/uuid",["jxg"],function(t){"use strict";var s="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");return t.Util=t.Util||{},t.Util.genUUID=function(){for(var t,e=[],i=0,r=0;r<36;r++)8===r||13===r||18===r||23===r?e[r]="-":14===r?e[r]="4":(i<=2&&(i=33554432+16777216*Math.random()|0),t=15&i,i>>=4,e[r]=s[19===r?3&t|8:t]);return e.join("")},t.Util}),define("parser/jessiecode",["jxg","base/constants","base/text","math/math","math/geometry","math/statistics","utils/type","utils/uuid","utils/env"],function(JXG,Const,Text,Mat,Geometry,Statistics,Type,UUID,Env){Object.create||(Object.create=function(t,e){function i(){}if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object prototype may only be an Object: "+t);if(null===t)throw new Error("This browser's implementation of Object.create is a shim and doesn't support 'null' as the first argument.");if(void 0!==e)throw new Error("This browser's implementation of Object.create is a shim and doesn't support a second argument.");return i.prototype=t,new i});var priv={modules:{math:Mat,"math/geometry":Geometry,"math/statistics":Statistics,"math/numerics":Mat.Numerics}},_4;function $4(r){var t,s;return"function"==typeof _4[this.board.id+r]?t=_4[this.board.id+r]:(s=this,(t=function(t,e){var i=Type.exists(e)?e:{name:0!==s.lhs[s.scope]?s.lhs[s.scope]:""};return s.board.create(r,t,i)}).creator=!0,_4[this.board.id+r]=t),t}JXG.JessieCode=function(t,e){this.scope={id:0,hasChild:!0,args:[],locals:{},context:null,previous:null},this.scopes=[],this.scopes.push(this.scope),this.dpstack=[[]],this.pscope=0,this.propstack=[{}],this.propscope=0,this.lhs=[],this.isLHS=!1,this.warnLog="jcwarn",this.$log=[],this.builtIn=this.defineBuiltIn(),this.board=null,this.lineToElement={},this.parCurLine=1,this.parCurColumn=0,this.line=1,this.col=1,JXG.CA&&(this.CA=new JXG.CA(this.node,this.createNode,this)),this.code="","string"==typeof t&&this.parse(t,e)},JXG.extend(JXG.JessieCode.prototype,{node:function(t,e,i){return{type:t,value:e,children:i}},createNode:function(t,e,i){for(var r=this.node(t,e,[]),s=2;sthis.execute(t.children[1]);break;case"op_lot":d=this.execute(t.children[0])=this.execute(t.children[1]);break;case"op_loe":d=this.execute(t.children[0])<=this.execute(t.children[1]);break;case"op_or":d=this.execute(t.children[0])||this.execute(t.children[1]);break;case"op_and":d=this.execute(t.children[0])&&this.execute(t.children[1]);break;case"op_not":d=!this.execute(t.children[0]);break;case"op_add":d=this.add(this.execute(t.children[0]),this.execute(t.children[1]));break;case"op_sub":d=this.sub(this.execute(t.children[0]),this.execute(t.children[1]));break;case"op_div":d=this.div(this.execute(t.children[0]),this.execute(t.children[1]));break;case"op_mod":d=this.mod(this.execute(t.children[0]),this.execute(t.children[1]),!0);break;case"op_mul":d=this.mul(this.execute(t.children[0]),this.execute(t.children[1]));break;case"op_exp":d=this.pow(this.execute(t.children[0]),this.execute(t.children[1]));break;case"op_neg":d=this.neg(this.execute(t.children[0]))}break;case"node_var":d=this.getvar(t.value);break;case"node_const":d=Number(t.value);break;case"node_const_bool":d=t.value;break;case"node_str":d=t.value.replace(/\\(.)/,"$1")}return d},compile:function(t,e){var i,r,s,o="";if(Type.exists(e)||(e=!1),!t)return o;switch(t.type){case"node_op":switch(t.value){case"op_none":t.children[0]&&(o=this.compile(t.children[0],e)),t.children[1]&&(o+=this.compile(t.children[1],e));break;case"op_assign":o=e?(i=this.getLHSCompiler(t.children[0],e),Type.isArray(i)?"$jc$.setProp("+i[0]+", "+i[1]+", "+this.compile(t.children[1],e)+");\n":(this.isLocalVariable(i)!==this.scope&&(this.scope.locals[i]=!0),"$jc$.scopes["+this.scope.id+"].locals['"+i+"'] = "+this.compile(t.children[1],e)+";\n")):(i=this.compile(t.children[0]))+" = "+this.compile(t.children[1],e)+";\n";break;case"op_if":o=" if ("+this.compile(t.children[0],e)+") "+this.compile(t.children[1],e);break;case"op_if_else":o=" if ("+this.compile(t.children[0],e)+")"+this.compile(t.children[1],e),o+=" else "+this.compile(t.children[2],e);break;case"op_conditional":o="(("+this.compile(t.children[0],e)+")?("+this.compile(t.children[1],e),o+="):("+this.compile(t.children[2],e)+"))";break;case"op_while":o=" while ("+this.compile(t.children[0],e)+") {\n"+this.compile(t.children[1],e)+"}\n";break;case"op_do":o=" do {\n"+this.compile(t.children[0],e)+"} while ("+this.compile(t.children[1],e)+");\n";break;case"op_for":o=" for ("+this.compile(t.children[0],e)+"; "+this.compile(t.children[1],e)+"; "+this.compile(t.children[2],e)+") {\n"+this.compile(t.children[3],e)+"\n}\n";break;case"op_proplst":t.children[0]&&(o=this.compile(t.children[0],e)+", "),o+=this.compile(t.children[1],e);break;case"op_prop":o=t.children[0]+": "+this.compile(t.children[1],e);break;case"op_emptyobject":o=e?"{}":"<< >>";break;case"op_proplst_val":o=this.compile(t.children[0],e);break;case"op_array":for(s=[],r=0;r "+this.compile(t.children[1],e);break;case"op_function":s=t.children[0],this.pushScope(s),o=e?this.functionCodeJS(t):" function ("+s.join(", ")+") "+this.compile(t.children[1],e),this.popScope();break;case"op_execfunmath":console.log("TODO"),o="-1";break;case"op_execfun":if(t.children[2]){for(s=[],r=0;r "+this.compile(t.children[1],e)+")";break;case"op_lot":o="("+this.compile(t.children[0],e)+" < "+this.compile(t.children[1],e)+")";break;case"op_gre":o="("+this.compile(t.children[0],e)+" >= "+this.compile(t.children[1],e)+")";break;case"op_loe":o="("+this.compile(t.children[0],e)+" <= "+this.compile(t.children[1],e)+")";break;case"op_or":o="("+this.compile(t.children[0],e)+" || "+this.compile(t.children[1],e)+")";break;case"op_and":o="("+this.compile(t.children[0],e)+" && "+this.compile(t.children[1],e)+")";break;case"op_not":o="!("+this.compile(t.children[0],e)+")";break;case"op_add":o=e?"$jc$.add("+this.compile(t.children[0],e)+", "+this.compile(t.children[1],e)+")":"("+this.compile(t.children[0],e)+" + "+this.compile(t.children[1],e)+")";break;case"op_sub":o=e?"$jc$.sub("+this.compile(t.children[0],e)+", "+this.compile(t.children[1],e)+")":"("+this.compile(t.children[0],e)+" - "+this.compile(t.children[1],e)+")";break;case"op_div":o=e?"$jc$.div("+this.compile(t.children[0],e)+", "+this.compile(t.children[1],e)+")":"("+this.compile(t.children[0],e)+" / "+this.compile(t.children[1],e)+")";break;case"op_mod":o=e?"$jc$.mod("+this.compile(t.children[0],e)+", "+this.compile(t.children[1],e)+", true)":"("+this.compile(t.children[0],e)+" % "+this.compile(t.children[1],e)+")";break;case"op_mul":o=e?"$jc$.mul("+this.compile(t.children[0],e)+", "+this.compile(t.children[1],e)+")":"("+this.compile(t.children[0],e)+" * "+this.compile(t.children[1],e)+")";break;case"op_exp":o=e?"$jc$.pow("+this.compile(t.children[0],e)+", "+this.compile(t.children[1],e)+")":"("+this.compile(t.children[0],e)+"^"+this.compile(t.children[1],e)+")";break;case"op_neg":o=e?"$jc$.neg("+this.compile(t.children[0],e)+")":"(-"+this.compile(t.children[0],e)+")"}break;case"node_var":o=e?this.getvarJS(t.value,!1,t.withProps):t.value;break;case"node_const":case"node_const_bool":o=t.value;break;case"node_str":o="'"+t.value+"'"}return t.needsBrackets&&(o="{\n"+o+"}\n"),o},X:function(t){return t.X()},Y:function(t){return t.Y()},V:function(t){return t.Value()},L:function(t){return t.L()},dist:function(t,e){return Type.exists(t)&&Type.exists(t.Dist)||this._error("Error: Can't calculate distance."),t.Dist(e)},add:function(t,e){var i,r,s;if(t=Type.evalSlider(t),e=Type.evalSlider(e),Type.isArray(t)&&Type.isArray(e))for(r=Math.min(t.length,e.length),s=[],i=0;i")},_error:function(t){var e=new Error("Error("+this.line+"): "+t);throw e.line=this.line,e},_warn:function(t){"object"==typeof console?console.log("Warning("+this.line+"): "+t):Env.isBrowser&&document&&null!==document.getElementById(this.warnLog)&&(document.getElementById(this.warnLog).innerHTML+="Warning("+this.line+"): "+t+"
")},_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=(i8=[2,14],j8=[1,13],k8=[1,37],l8=[1,14],m8=[1,15],n8=[1,21],o8=[1,16],p8=[1,17],q8=[1,33],r8=[1,18],s8=[1,19],t8=[1,12],u8=[1,59],v8=[1,60],w8=[1,58],x8=[1,46],y8=[1,48],z8=[1,49],A8=[1,50],B8=[1,51],C8=[1,52],D8=[1,53],E8=[1,54],F8=[1,45],G8=[1,38],H8=[1,39],I8=[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],J8=[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],K8=[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],L8=[2,48],M8=[1,72],N8=[10,16,32,34,35,37,39,41,42,43,45,46,47,48,50,51,53,54,55,57,66,83,86],O8=[1,78],P8=[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],Q8=[1,82],R8=[8,10,16,32,34,35,37,39,45,46,47,48,50,51,53,54,55,57,64,65,66,83,86],S8=[1,83],T8=[1,84],U8=[1,85],V8=[8,10,16,32,34,35,37,39,41,42,43,50,51,53,54,55,57,64,65,66,83,86],W8=[1,89],X8=[1,90],Y8=[1,91],Z8=[1,92],$8=[1,97],_8=[8,10,16,32,34,35,37,39,41,42,43,45,46,47,48,53,54,55,57,64,65,66,83,86],a9=[1,103],b9=[1,104],c9=[8,10,16,32,34,35,37,39,41,42,43,45,46,47,48,50,51,57,64,65,66,83,86],d9=[1,105],e9=[1,106],f9=[1,107],g9=[1,126],h9=[1,139],i9=[83,86],j9=[1,149],k9=[10,66,86],l9=[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],m9=[1,166],n9=[10,86],o9={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.$=p9.createNode(q9(n[a-4]),"node_op","op_if",o[a-2],o[a]);break;case 3:this.$=p9.createNode(q9(n[a-6]),"node_op","op_if_else",o[a-4],o[a-2],o[a]);break;case 4:this.$=p9.createNode(q9(n[a-4]),"node_op","op_while",o[a-2],o[a]);break;case 5:this.$=p9.createNode(q9(n[a-8]),"node_op","op_for",o[a-6],o[a-4],o[a-2],o[a]);break;case 6:this.$=p9.createNode(q9(n[a-6]),"node_op","op_do",o[a-5],o[a-2]);break;case 7:this.$=p9.createNode(q9(n[a-1]),"node_op","op_use",o[a]);break;case 8:this.$=p9.createNode(q9(n[a-1]),"node_op","op_delete",o[a]);break;case 9:this.$=p9.createNode(q9(n[a-1]),"node_op","op_return",void 0);break;case 10:this.$=p9.createNode(q9(n[a-2]),"node_op","op_return",o[a-1]);break;case 11:case 14:this.$=p9.createNode(q9(n[a]),"node_op","op_none");break;case 12:this.$=o[a-1],this.$.needsBrackets=!0;break;case 13:this.$=p9.createNode(q9(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.$=p9.createNode(q9(n[a-2]),"node_op","op_assign",o[a-2],o[a]),this.$.isMath=!1;break;case 27:this.$=p9.createNode(q9(n[a-4]),"node_op","op_conditional",o[a-4],o[a-2],o[a]),this.$.isMath=!1;break;case 29:this.$=p9.createNode(q9(n[a-2]),"node_op","op_or",o[a-2],o[a]),this.$.isMath=!1;break;case 31:this.$=p9.createNode(q9(n[a-2]),"node_op","op_and",o[a-2],o[a]),this.$.isMath=!1;break;case 33:this.$=p9.createNode(q9(n[a-2]),"node_op","op_equ",o[a-2],o[a]),this.$.isMath=!1;break;case 34:this.$=p9.createNode(q9(n[a-2]),"node_op","op_neq",o[a-2],o[a]),this.$.isMath=!1;break;case 35:this.$=p9.createNode(q9(n[a-2]),"node_op","op_approx",o[a-2],o[a]),this.$.isMath=!1;break;case 37:this.$=p9.createNode(q9(n[a-2]),"node_op","op_lot",o[a-2],o[a]),this.$.isMath=!1;break;case 38:this.$=p9.createNode(q9(n[a-2]),"node_op","op_grt",o[a-2],o[a]),this.$.isMath=!1;break;case 39:this.$=p9.createNode(q9(n[a-2]),"node_op","op_loe",o[a-2],o[a]),this.$.isMath=!1;break;case 40:this.$=p9.createNode(q9(n[a-2]),"node_op","op_gre",o[a-2],o[a]),this.$.isMath=!1;break;case 42:this.$=p9.createNode(q9(n[a-2]),"node_op","op_add",o[a-2],o[a]),this.$.isMath=!0;break;case 43:this.$=p9.createNode(q9(n[a-2]),"node_op","op_sub",o[a-2],o[a]),this.$.isMath=!0;break;case 45:this.$=p9.createNode(q9(n[a-2]),"node_op","op_mul",o[a-2],o[a]),this.$.isMath=!0;break;case 46:this.$=p9.createNode(q9(n[a-2]),"node_op","op_div",o[a-2],o[a]),this.$.isMath=!0;break;case 47:this.$=p9.createNode(q9(n[a-2]),"node_op","op_mod",o[a-2],o[a]),this.$.isMath=!0;break;case 49:this.$=p9.createNode(q9(n[a-2]),"node_op","op_exp",o[a-2],o[a]),this.$.isMath=!0;break;case 51:this.$=p9.createNode(q9(n[a-1]),"node_op","op_not",o[a]),this.$.isMath=!1;break;case 53:this.$=p9.createNode(q9(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.$=p9.createNode(q9(n[a-2]),"node_op","op_property",o[a-2],o[a]),this.$.isMath=!0;break;case 60:case 90:this.$=p9.createNode(q9(n[a-3]),"node_op","op_extvalue",o[a-3],o[a-1]),this.$.isMath=!0;break;case 61:this.$=p9.createNode(q9(n[a]),"node_var",o[a]);break;case 69:this.$=o[a],this.$.isMath=!0;break;case 70:this.$=p9.createNode(q9(n[a]),"node_const",null);break;case 71:this.$=p9.createNode(q9(n[a]),"node_const_bool",!0);break;case 72:this.$=p9.createNode(q9(n[a]),"node_const_bool",!1);break;case 73:this.$=p9.createNode(q9(n[a]),"node_str",o[a].substring(1,o[a].length-1));break;case 74:this.$=p9.createNode(q9(n[a]),"node_const",parseFloat(o[a]));break;case 75:this.$=p9.createNode(q9(n[a]),"node_const",NaN);break;case 76:this.$=p9.createNode(q9(n[a]),"node_const",1/0);break;case 77:this.$=p9.createNode(q9(n[a-1]),"node_op","op_array",[]);break;case 78:this.$=p9.createNode(q9(n[a-2]),"node_op","op_array",o[a-1]);break;case 79:this.$=p9.createNode(q9(n[a-1]),"node_op","op_emptyobject",{});break;case 80:this.$=p9.createNode(q9(n[a-2]),"node_op","op_proplst_val",o[a-1]);break;case 82:this.$=p9.createNode(q9(n[a-2]),"node_op","op_proplst",o[a-2],o[a]);break;case 83:this.$=p9.createNode(q9(n[a-2]),"node_op","op_prop",o[a-2],o[a]);break;case 87:case 89:this.$=p9.createNode(q9(n[a-1]),"node_op","op_execfun",o[a-1],o[a]),this.$.isMath=!0;break;case 88:this.$=p9.createNode(q9(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.$=p9.createNode(q9(n[a]),"node_var",o[a]),this.$.isMath=!0;break;case 100:this.$=p9.createNode(q9(n[a-3]),"node_op","op_function",[],o[a]),this.$.isMath=!1;break;case 101:this.$=p9.createNode(q9(n[a-4]),"node_op","op_function",o[a-2],o[a]),this.$.isMath=!1;break;case 102:this.$=p9.createNode(q9(n[a-5]),"node_op","op_map",o[a-3],o[a])}},table:[h8([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],i8,{3:1,4:2}),{1:[3]},{5:[1,3],6:6,7:j8,8:k8,9:20,11:4,13:7,14:l8,15:m8,16:n8,17:o8,18:8,19:p8,20:q8,21:r8,22:9,23:s8,24:11,25:5,26:t8,28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{1:[2,1]},h8(I8,[2,13]),h8(J8,[2,15]),h8(J8,[2,16]),h8(J8,[2,17]),h8(J8,[2,18]),h8(J8,[2,19]),h8(J8,[2,20]),h8(J8,[2,21]),h8([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],i8,{4:61}),{8:[1,62]},{8:[1,63]},{8:[1,64]},{6:6,7:j8,8:k8,9:20,11:65,13:7,14:l8,15:m8,16:n8,17:o8,18:8,19:p8,20:q8,21:r8,22:9,23:s8,24:11,25:5,26:t8,28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{20:[1,66]},{20:[1,67]},{8:k8,9:69,16:[1,68],20:q8,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{16:[1,70]},h8(J8,[2,11]),h8(K8,[2,23]),h8(K8,[2,24]),h8([8,10,16,34,35,37,39,41,42,43,45,46,47,48,50,51,53,54,55,64,65,66,83,86],L8,{32:[1,71],57:M8}),h8([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]}),h8(N8,[2,54],{88:77,8:O8,64:[1,75],65:[1,76]}),h8(N8,[2,55],{88:79,8:O8,64:[1,81],65:[1,80]}),h8(P8,[2,28],{39:Q8}),h8(K8,[2,56]),h8(K8,[2,57]),h8(K8,[2,58]),h8(R8,[2,30],{41:S8,42:T8,43:U8}),h8(K8,[2,61]),h8(K8,[2,62]),h8(K8,[2,63]),h8(K8,[2,64]),{8:k8,9:86,20:q8,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:[1,87]},{8:[1,88]},h8(V8,[2,32],{45:W8,46:X8,47:Y8,48:Z8}),h8(K8,[2,66]),h8(K8,[2,67]),h8(K8,[2,68]),h8(K8,[2,69]),{20:$8,72:98,73:99,77:B8,78:C8,79:D8,80:E8,83:[1,93],84:94,85:95,87:96},{8:k8,20:q8,29:102,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,66:[1,100],67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,81:101,82:F8,91:G8,93:H8},h8(_8,[2,36],{50:a9,51:b9}),h8(K8,[2,70]),h8(K8,[2,71]),h8(K8,[2,72]),h8(K8,[2,73]),h8(K8,[2,74]),h8(K8,[2,75]),h8(K8,[2,76]),h8(c9,[2,41],{53:d9,54:e9,55:f9}),h8(K8,[2,44]),h8(K8,[2,50]),{8:k8,20:q8,31:109,50:u8,51:v8,52:108,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,50:u8,51:v8,52:110,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,50:u8,51:v8,52:111,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{6:6,7:j8,8:k8,9:20,11:4,13:7,14:l8,15:m8,16:n8,17:o8,18:8,19:p8,20:q8,21:r8,22:9,23:s8,24:11,25:5,26:t8,27:[1,112],28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,9:113,20:q8,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,9:114,20:q8,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,9:115,20:q8,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{14:[1,116]},h8(J8,[2,7]),h8(J8,[2,8]),h8(J8,[2,9]),{16:[1,117]},h8(J8,[2,22]),{8:k8,20:q8,29:118,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,50:u8,51:v8,52:119,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,29:120,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,36:121,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{20:[1,122]},{8:k8,9:123,20:q8,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},h8(K8,[2,87],{89:124,90:125,68:127,20:g9,82:F8}),{8:k8,10:[1,128],20:q8,29:102,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,81:129,82:F8,91:G8,93:H8},h8(K8,[2,89]),{8:k8,9:130,20:q8,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{20:[1,131]},{8:k8,20:q8,31:109,38:132,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,40:133,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,40:134,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,40:135,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{10:[1,136]},{10:[1,137],20:h9,92:138},{20:h9,92:140},{8:k8,20:q8,31:109,44:141,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,44:142,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,44:143,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,44:144,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},h8(K8,[2,79]),{83:[1,145],86:[1,146]},h8(i9,[2,81]),{35:[1,147]},{35:[2,84]},{35:[2,85]},{35:[2,86]},h8(K8,[2,77]),{66:[1,148],86:j9},h8(k9,[2,98]),{8:k8,20:q8,31:109,49:150,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,49:151,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,50:u8,51:v8,52:152,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,50:u8,51:v8,52:153,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,31:109,50:u8,51:v8,52:154,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},h8(K8,[2,51]),h8([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],L8,{57:M8}),h8(K8,[2,52]),h8(K8,[2,53]),h8([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]},h8(J8,[2,10]),h8(K8,[2,25]),h8(K8,[2,49]),{35:[1,159]},h8(P8,[2,29],{39:Q8}),h8(K8,[2,59]),{66:[1,160]},h8([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]}),h8(K8,[2,94]),h8(K8,[2,96]),h8(K8,[2,97]),h8(l9,[2,92]),{10:[1,162],86:j9},{66:[1,163]},h8(K8,[2,91]),h8(R8,[2,31],{41:S8,42:T8,43:U8}),h8(V8,[2,33],{45:W8,46:X8,47:Y8,48:Z8}),h8(V8,[2,34],{45:W8,46:X8,47:Y8,48:Z8}),h8(V8,[2,35],{45:W8,46:X8,47:Y8,48:Z8}),h8(K8,[2,65]),{25:164,26:t8},{10:[1,165],86:m9},h8(n9,[2,103]),{10:[1,167],86:m9},h8(_8,[2,37],{50:a9,51:b9}),h8(_8,[2,38],{50:a9,51:b9}),h8(_8,[2,39],{50:a9,51:b9}),h8(_8,[2,40],{50:a9,51:b9}),h8(K8,[2,80]),{20:$8,72:98,73:99,77:B8,78:C8,79:D8,80:E8,85:168,87:96},{8:k8,20:q8,29:169,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},h8(K8,[2,78]),{8:k8,20:q8,29:170,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},h8(c9,[2,42],{53:d9,54:e9,55:f9}),h8(c9,[2,43],{53:d9,54:e9,55:f9}),h8(K8,[2,45]),h8(K8,[2,46]),h8(K8,[2,47]),{6:6,7:j8,8:k8,9:20,11:171,13:7,14:l8,15:m8,16:n8,17:o8,18:8,19:p8,20:q8,21:r8,22:9,23:s8,24:11,25:5,26:t8,28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{6:6,7:j8,8:k8,9:20,11:172,13:7,14:l8,15:m8,16:n8,17:o8,18:8,19:p8,20:q8,21:r8,22:9,23:s8,24:11,25:5,26:t8,28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,9:173,20:q8,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,9:174,20:q8,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,20:q8,29:175,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},h8(K8,[2,60]),{20:g9,68:127,82:F8,90:176},h8(l9,[2,93]),h8(K8,[2,90]),h8(K8,[2,100]),{25:177,26:t8},{20:[1,178]},{94:[1,179]},h8(i9,[2,82]),h8(i9,[2,83]),h8(k9,[2,99]),h8(I8,[2,2],{12:[1,180]}),h8(J8,[2,4]),{16:[1,181]},{10:[1,182]},h8(K8,[2,27]),h8(K8,[2,95]),h8(K8,[2,101]),h8(n9,[2,104]),{8:k8,9:183,20:q8,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{6:6,7:j8,8:k8,9:20,11:184,13:7,14:l8,15:m8,16:n8,17:o8,18:8,19:p8,20:q8,21:r8,22:9,23:s8,24:11,25:5,26:t8,28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{8:k8,9:185,20:q8,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},{16:[1,186]},h8(K8,[2,102]),h8(J8,[2,3]),{10:[1,187]},h8(J8,[2,6]),{6:6,7:j8,8:k8,9:20,11:188,13:7,14:l8,15:m8,16:n8,17:o8,18:8,19:p8,20:q8,21:r8,22:9,23:s8,24:11,25:5,26:t8,28:10,29:22,30:23,31:24,33:25,36:28,38:32,40:40,44:47,49:55,50:u8,51:v8,52:56,56:57,58:w8,59:26,60:27,61:29,62:30,63:31,65:x8,67:34,68:35,69:36,70:41,71:42,72:43,73:44,74:y8,75:z8,76:A8,77:B8,78:C8,79:D8,80:E8,82:F8,91:G8,93:H8},h8(J8,[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 g,b,v,y,C,_,P,E,S,x={};;){if(v=i[i.length-1],void 0===(y=this.defaultActions[v]?this.defaultActions[v]:(null!=g||(S=void 0,"number"!=typeof(S=d.lex()||1)&&(S=e.symbols_[S]||S),g=S),o[v]&&o[v][g]))||!y.length||!y[0]){var w,O=[];for(_ in o[v])this.terminals_[_]&&2<_&&O.push("'"+this.terminals_[_]+"'");w=d.showPosition?"Parse error on line "+(a+1)+":\n"+d.showPosition()+"\nExpecting "+O.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(w,{text:d.match,token:this.terminals_[g]||g,line:d.yylineno,loc:f,expected:O})}if(y[0]instanceof Array&&1e[0].length)){if(e=i,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return 0)/,/^(?:<<)/,/^(?:>>)/,/^(?:\{)/,/^(?:\})/,/^(?:;)/,/^(?:#)/,/^(?:\?)/,/^(?::)/,/^(?:NaN\b)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:!)/,/^(?:\^)/,/^(?:\*)/,/^(?:\/)/,/^(?:%)/,/^(?:\+)/,/^(?:-)/,/^(?:<=)/,/^(?:<)/,/^(?:>=)/,/^(?:>)/,/^(?:==)/,/^(?:~=)/,/^(?:!=)/,/^(?:&&)/,/^(?:\|\|)/,/^(?:=)/,/^(?:,)/,/^(?:$)/,/^(?:[A-Za-z_\$][A-Za-z0-9_]*)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56],inclusive:!0}}},o9.lexer=r9,new((g8.prototype=o9).Parser=g8)),i8,j8,k8,l8,m8,n8,o8,p8,q8,r8,s8,t8,u8,v8,w8,x8,y8,z8,A8,B8,C8,D8,E8,F8,G8,H8,I8,J8,K8,L8,M8,N8,O8,P8,Q8,R8,S8,T8,U8,V8,W8,X8,Y8,Z8,$8,_8,a9,b9,c9,d9,e9,f9,g9,h9,i9,j9,k9,l9,m9,n9,o9,p9,q9,r9;function g8(){this.yy={}}function h8(t,e,i,r){for(i=i||{},r=t.length;r--;i[t[r]]=e);return i}return void 0!==require&&"undefined"!=typeof exports&&(exports.parser=parser,exports.Parser=parser.Parser,exports.parse=function(){return parser.parse.apply(parser,arguments)},exports.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var e=require("fs").readFileSync(require("path").normalize(t[1]),"utf8");return exports.parser.parse(e)},"undefined"!=typeof module&&require.main===module&&exports.main(process.argv.slice(1))),parser.yy.parseError=parser.parseError,JXG.JessieCode}),define("base/point",["jxg","options","math/math","math/geometry","math/numerics","base/coords","base/constants","base/element","parser/geonext","utils/type","base/transformation","base/coordselement"],function(c,e,a,d,t,i,u,r,s,p,o,n){"use strict";return c.Point=function(t,e,i){this.constructor(t,i,u.OBJECT_TYPE_POINT,u.OBJECT_CLASS_POINT),this.element=this.board.select(i.anchor),this.coordsConstructor(e),this.elType="point",this.id=this.board.setId(this,"P"),this.board.renderer.drawPoint(this),this.board.finalizeAdding(this),this.createLabel()},c.Point.prototype=new r,p.copyPrototypeMethods(c.Point,n,"coordsConstructor"),c.extend(c.Point.prototype,{hasPoint:function(t,e){var i=this.coords.scrCoords,r=p.evaluate(this.visProp.sizeunit),s=parseFloat(p.evaluate(this.visProp.size));return"user"===r&&(s*=Math.sqrt(this.board.unitX*this.board.unitY)),(s+=.5*parseFloat(p.evaluate(this.visProp.strokewidth)))a.eps||Math.abs(n.Y()-t.usrCoords[2])>a.eps||Math.abs(n.Z()-t.usrCoords[0])>a.eps?t:d.meet(s.stdform,o.stdform,1,s.board)}],i)).type=u.OBJECT_TYPE_INTERSECTION,r.elType="otherintersection",r.setParents([s.id,o.id,n]),s.addChild(r),o.addChild(r),r.generatePolynomial=function(){var t=s.generatePolynomial(r),e=o.generatePolynomial(r);return 0===t.length||0===e.length?[]:[t[0],e[0]]},r},c.createPolePoint=function(t,e,i){var r,s,o,n,a,h,l;if(1f.eps||r>f.eps||t!==e)&&(s=this.point1.isDraggable&&this.point1.type!==g.OBJECT_TYPE_GLIDER&&!v.evaluate(this.point1.visProp.fixed),o=this.point2.isDraggable&&this.point2.type!==g.OBJECT_TYPE_GLIDER&&!v.evaluate(this.point2.visProp.fixed),t>f.eps?r=f.eps*f.eps,this.isReal||this.updateVisibility(!1)),this.visPropCalc.visible&&this.board.renderer.updateLine(this),this.hasLabel&&this.visPropCalc.visible&&this.label&&this.label.visPropCalc.visible&&this.isReal&&(this.label.update(),this.board.renderer.updateText(this.label)),this.setDisplayRendNode(),this.needsUpdate=!1),this},generatePolynomial:function(t){var e=this.point1.symbolic.x,i=this.point1.symbolic.y,r=this.point2.symbolic.x,s=this.point2.symbolic.y,o=t.symbolic.x,n=t.symbolic.y;return[["(",i,")*(",o,")-(",i,")*(",r,")+(",n,")*(",r,")-(",e,")*(",n,")+(",e,")*(",s,")-(",o,")*(",s,")"].join("")]},getRise:function(){return Math.abs(this.stdform[2])>=f.eps?-this.stdform[0]/this.stdform[2]:1/0},getSlope:function(){return Math.abs(this.stdform[2])>=f.eps?-this.stdform[1]/this.stdform[2]:1/0},getAngle:function(){return Math.atan2(-this.stdform[1],this.stdform[2])},setStraight:function(t,e){return this.visProp.straightfirst=t,this.visProp.straightlast=e,this.board.renderer.updateLine(this),this},getTextAnchor:function(){return new b(g.COORDS_BY_USER,[.5*(this.point2.X()+this.point1.X()),.5*(this.point2.Y()+this.point1.Y())],this.board)},setLabelRelativeCoords:function(t){v.exists(this.label)&&(this.label.relativeCoords=new b(g.COORDS_BY_SCREEN,[t[0],-t[1]],this.board))},getLabelAnchor:function(){var t,e,i=0,r=new b(g.COORDS_BY_USER,this.point1.coords.usrCoords,this.board),s=new b(g.COORDS_BY_USER,this.point2.coords.usrCoords,this.board),o=v.evaluate(this.visProp.straightfirst),n=v.evaluate(this.visProp.straightlast);if((o||n)&&m.calcStraight(this,r,s,0),r=r.scrCoords,s=s.scrCoords,!v.exists(this.label))return new b(g.COORDS_BY_SCREEN,[NaN,NaN],this.board);switch(v.evaluate(this.label.visProp.position)){case"lft":case"llft":case"ulft":e=r[1]<=s[1]?(t=r[1],r[2]):(t=s[1],s[2]);break;case"rt":case"lrt":case"urt":e=r[1]>s[1]?(t=r[1],r[2]):(t=s[1],s[2]);break;default:t=.5*(r[1]+s[1]),e=.5*(r[2]+s[2])}return(o||n)&&(v.exists(this.label)&&(i=v.evaluate(this.label.visProp.fontsize)),Math.abs(t)t&&t>this.board.canvasWidth-i-f.eps&&(t=this.board.canvasWidth-i),f.eps+i>e&&e>-f.eps?e=i:this.board.canvasHeight+f.eps>e&&e>this.board.canvasHeight-i-f.eps&&(e=this.board.canvasHeight-i)),new b(g.COORDS_BY_SCREEN,[t,e],this.board)},cloneToBackground:function(){var t,e,i,r={};return r.id=this.id+"T"+this.numTraces,r.elementClass=g.OBJECT_CLASS_LINE,this.numTraces++,r.point1=this.point1,r.point2=this.point2,r.stdform=this.stdform,r.board=this.board,r.visProp=v.deepCopy(this.visProp,this.visProp.traceattributes,!0),r.visProp.layer=this.board.options.layer.trace,v.clearVisPropOld(r),r.visPropCalc={visible:v.evaluate(r.visProp.visible)},e=this.getSlope(),t=this.getRise(),r.getSlope=function(){return e},r.getRise=function(){return t},i=this.board.renderer.enhancedRendering,this.board.renderer.enhancedRendering=!0,this.board.renderer.drawLine(r),this.board.renderer.enhancedRendering=i,this.traces[r.id]=r.rendNode,this},addTransform:function(t){for(var e=v.isArray(t)?t:[t],i=e.length,r=0;rf.eps?this.point1.coords.usrCoords[1]:this.point2.coords.usrCoords[1];return t=2*(t-.5),(1-Math.abs(t))*i-t*e},Y:function(t){var e=this.stdform[1],i=Math.abs(this.point1.coords.usrCoords[0])>f.eps?this.point1.coords.usrCoords[2]:this.point2.coords.usrCoords[2];return t=2*(t-.5),(1-Math.abs(t))*i+t*e},Z:function(t){var e=Math.abs(this.point1.coords.usrCoords[0])>f.eps?this.point1.coords.usrCoords[0]:this.point2.coords.usrCoords[0];return t=2*(t-.5),(1-Math.abs(t))*e},L:function(){return this.point1.Dist(this.point2)},minX:function(){return 0},maxX:function(){return 1},bounds:function(){var t=this.point1.coords.usrCoords,e=this.point2.coords.usrCoords;return[Math.min(t[1],e[1]),Math.max(t[2],e[2]),Math.max(t[1],e[1]),Math.min(t[2],e[2])]},addTicks:function(t){return""!==t.id&&v.exists(t.id)||(t.id=this.id+"_ticks_"+(this.ticks.length+1)),this.board.renderer.drawTicks(t),this.ticks.push(t),t.id},remove:function(){this.removeAllTicks(),t.prototype.remove.call(this)},removeAllTicks:function(){for(var t=this.ticks.length;0L.eps){e=!0;break}this.isReal=e},updateParametricCurveNaive:function(t,e,i){for(var r,s=!1,o=(e-t)/i,n=0;n=L.eps&&0<(g=(v*C+y*_)/P)&&(g<=1?(v-=g*C,y-=g*_):(v-=C,y-=_)),b=v*v+y*y,Math.sqrt(b)<.015)&&--A,this.points[A]=new R(k.COORDS_BY_SCREEN,[s,o],this.board,!1),this.points[A]._t=r,A+=1,n=s,a=o,t0=r,s=O[--h][0],o=O[h][1],l=w[h]+1,i=2*x[h]}while(0this.board.canvasHeight&&r>this.board.canvasHeight||t<0&&i<0||t>this.board.canvasWidth&&i>this.board.canvasWidth},isDistOK:function(t,e,i,r){return Math.abs(t)e[1]&&(r=[-e[1],0,1],0!==(s=L.crossProduct(r,t))[0]?(o=s[1]/s[0],n=s[2]/s[0]):o=1/0),[1,o,n]},_borderCase:function(t,e,i,r,s,o,n){var a,h,l,c,d,u,p,f=null,m=!1;if(n<=1){h=new R(k.COORDS_BY_USER,[0,0],this.board,!1),c=0;do{if(isNaN(t[1]+t[2])&&!isNaN(i[1]+i[2]))d=r,u=o,p=s;else if(isNaN(e[1]+e[2])&&!isNaN(i[1]+i[2]))d=s,u=o,p=r;else if(isNaN(i[1]+i[2])&&!isNaN(e[1]+e[2]))p=(u=s)+(s-(d=o));else{if(!isNaN(i[1]+i[2])||isNaN(t[1]+t[2]))return!1;p=(u=r)-((d=o)-r)}a=.5*(d+u),h.setCoordinates(k.COORDS_BY_USER,[this.X(a,!0),this.Y(a,!0)],!1),l=h.usrCoords,(m=isNaN(l[1]+l[2]))?d=a:(p=u,u=a),++c}while(m&&c<30);if(c<30&&(f=l.slice(),i=l.slice(),u=a),this.X(u,!0),this.X(p,!0),this.Y(u,!0),this.Y(p,!0),null!==f)return this._insertPoint(new R(k.COORDS_BY_USER,f,this.board,!1)),!0}return!1},_triangleDists:function(t,e,i){var r=[t[0]*e[0],.5*(t[1]+e[1]),.5*(t[2]+e[2])];return[P.distance(t,e,3),P.distance(t,i,3),P.distance(i,e,3),P.distance(i,r,3)]},_isUndefined:function(t,e,i,r){var s,o,n;if(!isNaN(t[1]+t[2])||!isNaN(i[1]+i[2]))return!1;for(n=new R(k.COORDS_BY_USER,[0,0],this.board,!1),o=0;o<20;++o)if(s=e+Math.random()*(r-e),n.setCoordinates(k.COORDS_BY_USER,[this.X(s,!0),this.Y(s,!0)],!1),!isNaN(n.scrCoords[0]+n.scrCoords[1]+n.scrCoords[2]))return!1;return!0},_isOutside:function(t,e,i,r){var s=this.board.canvasWidth,o=this.board.canvasHeight;return!!(t[1]<-500&&i[1]<-500||t[2]<-500&&i[2]<-500||t[1]>s+500&&i[1]>s+500||t[2]>o+500&&i[2]>o+500)},_isOutsidePoint:function(t){var e=this.board.canvasWidth,i=this.board.canvasHeight;return!!(t[1]<-500||t[2]<-500||t[1]>e+500||t[2]>i+500)},_findStartPoint:function(t,e,i,r){var s,o,n,a,h,l,c,d,u,p,f,m,g=new R(k.COORDS_BY_USER,[0,0],this.board,!1),b=this.board.getBoundingBox();if(!this._isOutsidePoint(t))return[t,e];for(c=.3*(b[2]-b[0]),d=.3*(b[1]-b[3]),n=e+(o=(r-e)/40),l=!1,u=function(t){return this.X(t,!0)-(b[0]-c)},f=function(t){return this.X(t,!0)-(b[1]+d)},p=function(t){return this.X(t,!0)-(b[2]+c)},m=function(t){return this.X(t,!0)-(b[1]-d)},s=0;s<40;++s){if(h=b[0]-c,a=v.fzero(u,[n-o,n],this),Math.abs(this.X(a,!0)-h)<.01){l=!0;break}if(h=b[1]+d,a=v.fzero(f,[n-o,n],this),Math.abs(this.Y(a,!0)-h)<.01){l=!0;break}if(h=b[2]+c,a=v.fzero(p,[n-o,n],this),Math.abs(this.X(a,!0)-h)<.01){l=!0;break}if(h=b[3]-d,a=v.fzero(m,[n-o,n],this),Math.abs(this.Y(a,!0)-h)<.01){l=!0;break}n+=o}return l?(g.setCoordinates(k.COORDS_BY_USER,[this.X(a,!0),this.Y(a,!0)],!1),[g.scrCoords,a]):[t,e]},_plotRecursive:function(t,e,i,r,s,o){var n,a,h,l,c,d=0,u=new R(k.COORDS_BY_USER,[0,0],this.board,!1);if(!(65536.99*h[0]||h[1]>.99*h[0]||h[0]===1/0||h[1]===1/0||h[2]===1/0),sthis.points[t].usrCoords[1]&&(r=this.points[t].usrCoords[1]),sthis.points[t].usrCoords[2]&&(o=this.points[t].usrCoords[2]),ne!=this.vertices[r].coords.scrCoords[2]>e&&t<(this.vertices[r].coords.scrCoords[1]-this.vertices[i].coords.scrCoords[1])*(e-this.vertices[i].coords.scrCoords[2])/(this.vertices[r].coords.scrCoords[2]-this.vertices[i].coords.scrCoords[2])+this.vertices[i].coords.scrCoords[1]&&(o=!o);if(o)return!0}for(s=this.borders.length,i=0;ii&&(i=this.vertices[s].X()),this.vertices[s].Y()>e&&(e=this.vertices[s].Y()),this.vertices[s].Y()i[2]&&(i[2]=e),(e=this.vertices[t].Y())>i[1]?i[1]=e:ethis.vertices.length-2)return this;for(i=1;in[e-1]&&(a[a.length-1][1]=n[e],a.push([n[e-1]]));for(this.withLines&&(a[a.length-1][1]=n[0]),this.vertices=[],e=0;eo.length-1&&(i=o.length-1),this.board.removeObject(this.borders[i]),o[i]=-1;0!==a[e][1]&&a[e][0]!==s.length-1&&(o[a[e][0]-1]=this.board.create("segment",[s[Math.max(a[e][1]-1,0)],s[Math.min(a[e][0]+1,this.vertices.length-1)]],this.attr_line))}for(this.borders=[],e=0;e 2 as input.");if(n=u.isNumber(t.select(c))?(l--,!1):(c=l,!0),!1===(h=u.providePoints(t,e.slice(0,l),i,"regularpolygon",["vertices"])))throw new Error("JSXGraph: Can't create regular polygon with parent types other than 'point' and 'coordinate arrays' or a function returning an array of coordinates");for(a=u.copyAttributes(i,t.options,"regularpolygon","vertices"),s=2;s=c-2&&(a.id=a.ids[s-2]),h[s]=t.create("point",[h[s-2],o],a),h[s].type=d.OBJECT_TYPE_CAS,h[s].isDraggable=!0,h[s].visProp.fixed=!1);return a=u.copyAttributes(i,t.options,"regularpolygon"),(r=t.create("polygon",h,a)).elType="regularpolygon",r},f.createPolygonalChain=function(t,e,i){var r=u.copyAttributes(i,t.options,"polygonalchain"),s=t.create("polygon",e,r);return s.elType="polygonalchain",s.vertices.pop(),t.removeObject(s.borders[s.borders.length-1]),s.borders.pop(),s},f.registerElement("polygon",f.createPolygon),f.registerElement("regularpolygon",f.createRegularPolygon),f.registerElement("polygonalchain",f.createPolygonalChain),{Polygon:f.Polygon,createPolygon:f.createPolygon,createRegularPolygon:f.createRegularPolygon}}),define("element/arc",["jxg","math/geometry","math/math","base/coords","base/circle","utils/type","base/constants","base/curve","element/composition"],function(o,f,p,m,n,g,b,t,e){"use strict";return o.createArc=function(t,e,i){var r,s,c;if(!1===(c=g.providePoints(t,e,i,"arc",["center","radiuspoint","anglepoint"]))||c.length<3)throw new Error("JSXGraph: Can't create Arc with parent types '"+typeof e[0]+"' and '"+typeof e[1]+"' and '"+typeof e[2]+"'.\nPossible parent types: [point,point,point], [arc, transformation]");return s=g.copyAttributes(i,t.options,"arc"),(r=t.create("curve",[[0],[0]],s)).elType="arc",r.setParents(c),r.type=b.OBJECT_TYPE_ARC,r.center=c[0],r.radiuspoint=c[1],r.point2=r.radiuspoint,r.anglepoint=c[2],r.point3=r.anglepoint,r.center.addChild(r),r.radiuspoint.addChild(r),r.anglepoint.addChild(r),r.useDirection=s.usedirection,r.updateDataArray=function(){var t,e,i,r,s=1,o=this.radiuspoint,n=this.center,a=this.anglepoint,h=g.evaluate(this.visProp.selection),l=f.rad(o,n,a);("minor"===h&&l>Math.PI||"major"===h&&lMath.PI||"major"===u&&aMath.PI||"major"===h&&sMath.PI||"major"===u&&op.eps*p.eps&&(s[1]/=s[0],s[2]/=s[0],s[0]/=s[0]),t=this.direction1*this.Radius(),i=c.add(s,[0,t*o.stdform[2],-t*o.stdform[1]]),t=this.direction2*this.Radius(),r=c.add(s,[0,t*n.stdform[2],-t*n.stdform[1]]),this.point2.coords=new m(g.COORDS_BY_USER,i,a.board),this.point1.coords=new m(g.COORDS_BY_USER,s,a.board),this.point3.coords=new m(g.COORDS_BY_USER,r,a.board),Math.abs(i[0])Math.PI||"major"===l&&sMath.PI||"major"===h&&sMath.PI||"major"===h&&sMath.PI||"major"===u&&oMath.PI||"major"===a&&hMath.PI||"major"===h&&sMath.PI||"major"===c&&o=Math.PI?t:2*Math.PI-t},r},l.registerElement("reflexangle",l.createReflexAngle),{createSector:l.createSector,createCircumcircleSector:l.createCircumcircleSector,createMinorSector:l.createMinorSector,createMajorSector:l.createMajorSector,createAngle:l.createAngle,createReflexAngle:l.createReflexAngle,createNonreflexAngle:l.createNonreflexAngle}}),define("element/composition",["jxg","math/math","math/geometry","math/numerics","math/statistics","base/coords","utils/type","base/constants","base/point","base/line","base/circle","base/transformation","base/composition","base/curve","base/text","base/polygon","element/arc","element/sector"],function(v,u,p,y,t,C,_,P,f,m,g,b,l,E,e,S,i,r){"use strict";return v.createOrthogonalProjection=function(t,e,i){var h,l,c,r;if(e[0]=t.select(e[0]),e[1]=t.select(e[1]),_.isPointType(t,e[0])&&e[1].elementClass===P.OBJECT_CLASS_LINE)l=_.providePoints(t,[e[0]],i,"point")[0],h=e[1];else{if(!_.isPointType(t,e[1])||e[0].elementClass!==P.OBJECT_CLASS_LINE)throw new Error("JSXGraph: Can't create perpendicular point with parent types '"+typeof e[0]+"' and '"+typeof e[1]+"'.\nPossible parent types: [point,line]");l=_.providePoints(t,[e[1]],i,"point")[0],h=e[0]}return r=_.copyAttributes(i,t.options,"orthogonalprojection"),c=t.create("point",[function(){return p.projectPointToLine(l,h,t)}],r),l.addChild(c),h.addChild(c),c.elType="orthogonalprojection",c.setParents([l.id,c.id]),c.update(),c.generatePolynomial=function(){var t=h.point1.symbolic.x,e=h.point1.symbolic.y,i=h.point2.symbolic.x,r=h.point2.symbolic.y,s=l.symbolic.x,o=l.symbolic.y,n=c.symbolic.x,a=c.symbolic.y;return["("+e+")*("+n+")-("+e+")*("+i+")+("+a+")*("+i+")-("+t+")*("+a+")+("+t+")*("+r+")-("+n+")*("+r+")","("+o+")*("+e+")-("+o+")*("+r+")-("+a+")*("+e+")+("+a+")*("+r+")+("+s+")*("+t+")-("+s+")*("+i+")-("+n+")*("+t+")+("+n+")*("+i+")"]},c},v.createPerpendicular=function(t,e,i){var r,s,o,n;if(e[0]=t.select(e[0]),e[1]=t.select(e[1]),_.isPointType(t,e[0])&&e[1].elementClass===P.OBJECT_CLASS_LINE)s=e[1],r=_.providePoints(t,[e[0]],i,"point")[0];else{if(!_.isPointType(t,e[1])||e[0].elementClass!==P.OBJECT_CLASS_LINE)throw new Error("JSXGraph: Can't create perpendicular with parent types '"+typeof e[0]+"' and '"+typeof e[1]+"'.\nPossible parent types: [line,point]");s=e[0],r=_.providePoints(t,[e[1]],i,"point")[0]}return n=_.copyAttributes(i,t.options,"perpendicular"),(o=m.createLine(t,[function(){return s.stdform[2]*r.X()-s.stdform[1]*r.Y()},function(){return-s.stdform[2]*r.Z()},function(){return s.stdform[1]*r.Z()}],n)).elType="perpendicular",o.setParents([s.id,r.id]),o},v.createPerpendicularPoint=function(t,e,i){var h,l,c;if(e[0]=t.select(e[0]),e[1]=t.select(e[1]),_.isPointType(t,e[0])&&e[1].elementClass===P.OBJECT_CLASS_LINE)l=_.providePoints(t,[e[0]],i,"point")[0],h=e[1];else{if(!_.isPointType(t,e[1])||e[0].elementClass!==P.OBJECT_CLASS_LINE)throw new Error("JSXGraph: Can't create perpendicular point with parent types '"+typeof e[0]+"' and '"+typeof e[1]+"'.\nPossible parent types: [point,line]");l=_.providePoints(t,[e[1]],i,"point")[0],h=e[0]}return c=t.create("point",[function(){return p.perpendicular(h,l,t)[0]}],i),l.addChild(c),h.addChild(c),c.elType="perpendicularpoint",c.setParents([l.id,h.id]),c.update(),c.generatePolynomial=function(){var t=h.point1.symbolic.x,e=h.point1.symbolic.y,i=h.point2.symbolic.x,r=h.point2.symbolic.y,s=l.symbolic.x,o=l.symbolic.y,n=c.symbolic.x,a=c.symbolic.y;return["("+e+")*("+n+")-("+e+")*("+i+")+("+a+")*("+i+")-("+t+")*("+a+")+("+t+")*("+r+")-("+n+")*("+r+")","("+o+")*("+e+")-("+o+")*("+r+")-("+a+")*("+e+")+("+a+")*("+r+")+("+s+")*("+t+")-("+s+")*("+i+")-("+n+")*("+t+")+("+n+")*("+i+")"]},c},v.createPerpendicularSegment=function(t,e,i){var r,s,o,n,a;if(e[0]=t.select(e[0]),e[1]=t.select(e[1]),_.isPointType(t,e[0])&&e[1].elementClass===P.OBJECT_CLASS_LINE)s=e[1],r=_.providePoints(t,[e[0]],i,"point")[0];else{if(!_.isPointType(t,e[1])||e[0].elementClass!==P.OBJECT_CLASS_LINE)throw new Error("JSXGraph: Can't create perpendicular with parent types '"+typeof e[0]+"' and '"+typeof e[1]+"'.\nPossible parent types: [line,point]");s=e[0],r=_.providePoints(t,[e[1]],i,"point")[0]}return a=_.copyAttributes(i,t.options,"perpendicularsegment","point"),(n=v.createPerpendicularPoint(t,[s,r],a)).dump=!1,_.exists(i.layer)||(i.layer=t.options.layer.line),a=_.copyAttributes(i,t.options,"perpendicularsegment"),(o=m.createLine(t,[function(){return p.perpendicular(s,r,t)[1]?[n,r]:[r,n]}],a)).point=n,o.elType="perpendicularsegment",o.setParents([r.id,s.id]),o.subs={point:n},o.inherits.push(n),o},v.createMidpoint=function(t,e,i){for(var n,a,h,r,s=0;se[2]&&(r=e[2]-i),r+t.usrCoords[1]},function(){var t=new C(P.COORDS_BY_SCREEN,[0,_.evaluate(this.visProp.offset[1])+this.board.origin.scrCoords[2]],this.board,!1),e=this.board.getBoundingBox(),i=.1*(e[1]-e[3]),r=f.Y();return r>e[1]?r=e[1]-i:rn.usrCoords[1]&&(t=Math.floor(n.usrCoords[1]/r)*r,e=Math.ceil(o.usrCoords[1]/r)*r),i=t;i=u.eps?p.perpendicular(c[0],o,l)[0].usrCoords:o.coords.usrCoords)[1]+n[1]*s,o[2]-n[0]*s],e=[1,o[1]-a[1]*s,o[2]+a[0]*s],this.dataX=[t[1],t[1]+n[0]*h,e[1]+a[0]*h,e[1],t[1]],this.dataY=[t[2],t[2]+n[1]*h,e[2]+a[1]*h,e[2],t[2]]};else if(c[0].elementClass===P.OBJECT_CLASS_CURVE&&"functiongraph"===c[0].visProp.curvetype)(i=l.create("curve",[[],[]],d)).hasPoint=function(){return!1},i.updateDataArray=function(){var t,e,i,r,s=this.board.getBoundingBox(),o=c[0].points,n=1.5*(d.inverse?s[1]:s[3]);if(this.dataX=[],this.dataY=[],!((r=o.length)<=0)){for(i=0;il.visProp.layer||s.visProp.layer===l.visProp.layer&&s.lastDragTime.getTime()>=l.lastDragTime.getTime())&&(this.attr.ignorelabels&&A.exists(l.label)&&s===l.label||(l=s,n.push(l),A.exists(l.coords)?a.push(d.subtract(l.coords.scrCoords.slice(1),[t,e])):a.push([0,0])));return 0.2*Math.PI&&Math.abs(i)<1.8*Math.PI&&(p=!0),s=T.distance([t.touches[0].clientX,t.touches[0].clientY],[t.touches[1].clientX,t.touches[1].clientY],2),void 0===t.scale&&(t.scale=s/this.prevDist),"pan"===this.isPreviousGesture||p||(Math.abs(t.scale)<.77||1.3this.canvasWidth||i[1]<0||i[1]>this.canvasHeight)return;this.touches[e].targets[0].X=s[this.touches[e].targets[0].num].screenX,this.touches[e].targets[0].Y=s[this.touches[e].targets[0].num].screenY,this.moveObject(i[0],i[1],this.touches[e],t,"touch")}}else if(2===this.touches[e].targets.length&&-1this.canvasWidth||i[1]<0||i[1]>this.canvasHeight||r[0]<0||r[0]>this.canvasWidth||r[1]<0||r[1]>this.canvasHeight)return;this.touches[e].targets[0].X=s[this.touches[e].targets[0].num].screenX,this.touches[e].targets[0].Y=s[this.touches[e].targets[0].num].screenY,this.touches[e].targets[1].X=s[this.touches[e].targets[1].num].screenX,this.touches[e].targets[1].Y=s[this.touches[e].targets[1].num].screenY,this.twoFingerMove(i,r,this.touches[e],t)}}else 2==s.length&&this.gestureChangeListener(t),i=this.getMousePosition(t,0),this.highlightElements(i[0],i[1],t,-1);return this.mode!==this.BOARD_MODE_DRAG&&this.showInfobox(!1),this.triggerEventHandlers(["touchmove","move"],[t,this.mode]),this.options.precision.hasPoint=this.options.precision.mouse,this.updateQuality=this.BOARD_QUALITY_HIGH,this.mode===this.BOARD_MODE_NONE},touchEndListener:function(t){var e,i,r,s,o,n=this.options.precision.touch,a=[],h=t&&t[p.touchProperty];if(this.triggerEventHandlers(["touchend","up"],[t]),this.showInfobox(!1),this.selectingMode)this._stopSelecting(t),this.triggerEventHandlers(["touchstopselecting","stopselecting"],[t]);else if(h&&0this.maxboundingbox[1]||n[1]>this.maxboundingbox[2]||n[2]"),u=t.indexOf("");if(!(d<0)){for(;0<=d;){if(s=(r=t.slice(d+6,u)).indexOf("="),o=r.slice(0,s),n=r.slice(s+1),s=o.indexOf("."),a=o.slice(0,s),h=this.elementsByName[A.unescapeHTML(a)],l=o.slice(s+1).replace(/\s+/g,"").toLowerCase(),n=A.createFunction(n,this,"",!0),A.exists(this.elementsByName[a]))switch(h.id,l){case"x":c.push(e(this,h,n,2));break;case"y":c.push(e(this,h,n,1));break;case"visible":c.push(function(i,r,s){return function(){var t=i.select(r.id),e=s();t.setAttribute({visible:e})}}(this,h,n));break;case"position":c.push(function(t,e,i){return function(){t.select(e.id).position=i()}}(this,h,n));break;case"stroke":c.push(i(this,h,n,"stroke"));break;case"style":c.push(function(t,e,i){return function(){t.select(e.id).setStyle(i())}}(this,h,n));break;case"strokewidth":c.push(i(this,h,n,"strokewidth"));break;case"fill":c.push(i(this,h,n,"fill"));break;case"label":break;default:p.debug("property '"+l+"' in conditions not yet implemented:"+n)}else p.debug("debug conditions: |"+a+"| undefined");d=(t=t.slice(u+7)).indexOf(""),u=t.indexOf("")}this.updateConditions=function(){for(var t=0;tthis.attr.zoom.max&&1this.attr.zoom.max&&1s&&(s=i.coords.usrCoords[1]),i.coords.usrCoords[2]>n?n=i.coords.usrCoords[2]:i.coords.usrCoords[2]h[1]&&(h[1]=i[1]),i[2]>h[2]&&(h[2]=i[2]),i[3]\n";for(t in this.objects)if(this.objects.hasOwnProperty(t)){for(e in r=0,this.objects[t].childElements)this.objects[t].childElements.hasOwnProperty(e)&&(r+=1);for(e in 0<=r&&(s+=""+this.objects[t].id+": "),this.objects[t].childElements)this.objects[t].childElements.hasOwnProperty(e)&&(s+=this.objects[t].childElements[e].id+"("+this.objects[t].childElements[e].name+"), ");s+="\n"}return s+="
\n",(i=window.open()).document.open(),i.document.write(s),i.document.close(),this},showXML:function(){var t=window.open("");return t.document.open(),t.document.write(""+A.escapeHTML(this.xmlString)+"
"),t.document.close(),this},prepareUpdate:function(){for(var t,e=this.objectsList.length,i=0;ia&&o[r]this.maxboundingbox[1]||t[2]>this.maxboundingbox[2]||t[3]r&&r>s[3])},updateCSSTransforms:function(){var t=this.containerObj,e=t,i=t;for(this.cssTransMat=b.getCSSTransformMatrix(e),e=e.offsetParent;e;){for(this.cssTransMat=O.matMatMult(b.getCSSTransformMatrix(e),this.cssTransMat),i=i.parentNode;i!==e;)this.cssTransMat=O.matMatMult(b.getCSSTransformMatrix(e),this.cssTransMat),i=i.parentNode;e=e.offsetParent}return this.cssTransMat=O.inverse(this.cssTransMat),this},startSelectionMode:function(){this.selectingMode=!0,this.selectionPolygon.setAttribute({visible:!0}),this.selectingBox=[[0,0],[0,0]],this._setSelectionPolygonFromBox(),this.selectionPolygon.fullUpdate()},stopSelectionMode:function(){return this.selectingMode=!1,this.selectionPolygon.setAttribute({visible:!1}),[this.selectionPolygon.vertices[0].coords,this.selectionPolygon.vertices[2].coords]},_startSelecting:function(t){this.isSelecting=!0,this.selectingBox=[[t[0],t[1]],[t[0],t[1]]],this._setSelectionPolygonFromBox()},_moveSelecting:function(t){this.isSelecting&&(this.selectingBox[1]=[t[0],t[1]],this._setSelectionPolygonFromBox(),this.selectionPolygon.fullUpdate())},_stopSelecting:function(t){var e=this.getMousePosition(t);this.isSelecting=!1,this.selectingBox[1]=[e[0],e[1]],this._setSelectionPolygonFromBox()},_setSelectionPolygonFromBox:function(){var t=this.selectingBox[0],e=this.selectingBox[1];this.selectionPolygon.vertices[0].setPositionDirectly(p.COORDS_BY_SCREEN,[t[0],t[1]]),this.selectionPolygon.vertices[1].setPositionDirectly(p.COORDS_BY_SCREEN,[t[0],e[1]]),this.selectionPolygon.vertices[2].setPositionDirectly(p.COORDS_BY_SCREEN,[e[0],e[1]]),this.selectionPolygon.vertices[3].setPositionDirectly(p.COORDS_BY_SCREEN,[e[0],t[1]])},_testForSelection:function(t){this._isRequiredKeyPressed(t,"selection")&&(A.exists(this.selectionPolygon)||this._createSelectionPolygon(this.attr),this.startSelectionMode())},_createSelectionPolygon:function(t){var e;return A.exists(this.selectionPolygon)||!0===(e=A.copyAttributes(t,u,"board","selection")).enabled&&(this.selectionPolygon=this.create("polygon",[[0,0],[0,0],[0,0],[0,0]],e)),this},__evt__down:function(t){},__evt__mousedown:function(t){},__evt__pendown:function(t){},__evt__pointerdown:function(t){},__evt__touchstart:function(t){},__evt__up:function(t){},__evt__mouseup:function(t){},__evt__pointerup:function(t){},__evt__touchend:function(t){},__evt__move:function(t,e){},__evt__mousemove:function(t,e){},__evt__penmove:function(t,e){},__evt__pointermove:function(t,e){},__evt__touchmove:function(t,e){},__evt__hit:function(t,e,i){},__evt__mousehit:function(t,e,i){},__evt__update:function(){},__evt__boundingbox:function(){},__evt__startselecting:function(){},__evt__mousestartselecting:function(){},__evt__pointerstartselecting:function(){},__evt__touchstartselecting:function(){},__evt__stopselecting:function(){},__evt__mousestopselecting:function(){},__evt__pointerstopselecting:function(){},__evt__touchstopselecting:function(){},__evt__moveselecting:function(){},__evt__mousemoveselecting:function(){},__evt__pointermoveselecting:function(){},__evt__touchmoveselecting:function(){},__evt:function(){},toFullscreen:function(){var t,e=this.container,i="fullscreenwrap_"+e,r=document.createElement("div");return this.document.getElementById(i)||(r.classList.add("JXG_wrap_private"),r.setAttribute("id",i),(t=this.containerObj).parentNode.insertBefore(r,t),r.appendChild(t)),b.toFullscreen(i,e),this},fullscreenListener:function(t){this.updateCSSTransforms()},createRoulette:function(C,_,e,P,E,i,S){var x=this;return new function(){function o(t,e,i){var r=w.D(t.X)(e),s=w.D(t.Y)(e),o=w.D(t.X)(i),n=w.D(t.Y)(i),a=w.D(t.X)(.5*(e+i)),h=w.D(t.Y)(.5*(e+i)),l=Math.sqrt(r*r+s*s),c=Math.sqrt(o*o+n*n);return(l+4*Math.sqrt(a*a+h*h)+c)*(i-e)/6}function n(t){return a-o(_,u,t)}var a,h=0,l=0,c=0,d=e,u=w.root(function(t){var e=C.X(d),i=C.Y(d),r=_.X(t),s=_.Y(t);return(e-r)*(e-r)+(i-s)*(i-s)},[0,2*Math.PI]),p=0,f=0,m=x.create("transform",[function(){return h}],{type:"rotate"}),g=x.create("transform",[function(){return h},function(){return C.X(d)},function(){return C.Y(d)}],{type:"rotate"}),b=x.create("transform",[function(){return l},function(){return c}],{type:"translate"}),v=Math.PI/18,y=9*v,t=null;return this.rolling=function(){var t,e,i,r,s;a=o(C,d,p=d+E*P),f=w.root(n,u),t=new N(C.X(p),C.Y(p)),e=new N(_.X(f),_.Y(f)),i=new N(w.D(C.X)(p),w.D(C.Y)(p)),r=new N(w.D(_.X)(f),w.D(_.Y)(f)),s=N.C.div(i,r),h=Math.atan2(s.imaginary,s.real),s.div(N.C.abs(s)),s.mult(e),l=t.real-s.real,c=t.imaginary-s.imaginary,h<-v&&-y=r.layer.numlayers&&(e=r.layer.numlayers-1):e=0,this.layer[e].appendChild(t),t},createPrim:function(t,e){var i=this.container.ownerDocument.createElementNS(this.svgNamespace,t);return i.setAttributeNS(null,"id",this.container.id+"_"+e),i.style.position="absolute","path"===t&&(i.setAttributeNS(null,"stroke-linecap","round"),i.setAttributeNS(null,"stroke-linejoin","round")),i},remove:function(t){y.exists(t)&&y.exists(t.parentNode)&&t.parentNode.removeChild(t)},makeArrows:function(t){var e,i=y.evaluate(t.visProp.firstarrow),r=y.evaluate(t.visProp.lastarrow);t.visPropOld.firstarrow!==i||t.visPropOld.lastarrow!==r?(i?(e=t.rendNodeTriangleStart,y.exists(e)?this.defs.appendChild(e):(e=this._createArrowHead(t,"End"),this.defs.appendChild(e),t.rendNodeTriangleStart=e,t.rendNode.setAttributeNS(null,"marker-start","url(#"+this.container.id+"_"+t.id+"TriangleEnd)"))):(e=t.rendNodeTriangleStart,y.exists(e)&&this.remove(e)),r?(e=t.rendNodeTriangleEnd,y.exists(e)?this.defs.appendChild(e):(e=this._createArrowHead(t,"Start"),this.defs.appendChild(e),t.rendNodeTriangleEnd=e,t.rendNode.setAttributeNS(null,"marker-end","url(#"+this.container.id+"_"+t.id+"TriangleStart)"))):(e=t.rendNodeTriangleEnd,y.exists(e)&&this.remove(e)),t.visPropOld.firstarrow=i,t.visPropOld.lastarrow=r):this.isIE&&t.visPropCalc.visible&&(i||r)&&t.rendNode.parentNode.insertBefore(t.rendNode,t.rendNode)},updateEllipsePrim:function(t,e,i,r,s){e=Math.abs(e)<2e5?e:2e5*e/Math.abs(e),i=Math.abs(i)<2e5?i:2e5*i/Math.abs(i),r=Math.abs(r)<2e5?r:2e5*r/Math.abs(r),s=Math.abs(s)<2e5?s:2e5*s/Math.abs(s),t.setAttributeNS(null,"cx",e),t.setAttributeNS(null,"cy",i),t.setAttributeNS(null,"rx",Math.abs(r)),t.setAttributeNS(null,"ry",Math.abs(s))},updateLinePrim:function(t,e,i,r,s){isNaN(e+i+r+s)||(e=Math.abs(e)<2e5?e:2e5*e/Math.abs(e),i=Math.abs(i)<2e5?i:2e5*i/Math.abs(i),r=Math.abs(r)<2e5?r:2e5*r/Math.abs(r),s=Math.abs(s)<2e5?s:2e5*s/Math.abs(s),t.setAttributeNS(null,"x1",e),t.setAttributeNS(null,"y1",i),t.setAttributeNS(null,"x2",r),t.setAttributeNS(null,"y2",s))},updatePathPrim:function(t,e){""===e&&(e="M 0 0"),t.setAttributeNS(null,"d",e)},updatePathStringPoint:function(t,e,i){var r="",s=t.coords.scrCoords,o=e*Math.sqrt(3)*.5,n=.5*e;return"x"===i?r=" M "+(s[1]-e)+" "+(s[2]-e)+" L "+(s[1]+e)+" "+(s[2]+e)+" M "+(s[1]+e)+" "+(s[2]-e)+" L "+(s[1]-e)+" "+(s[2]+e):"+"===i?r=" M "+(s[1]-e)+" "+s[2]+" L "+(s[1]+e)+" "+s[2]+" M "+s[1]+" "+(s[2]-e)+" L "+s[1]+" "+(s[2]+e):"<>"===i?r=" M "+(s[1]-e)+" "+s[2]+" L "+s[1]+" "+(s[2]+e)+" L "+(s[1]+e)+" "+s[2]+" L "+s[1]+" "+(s[2]-e)+" Z ":"^"===i?r=" M "+s[1]+" "+(s[2]-e)+" L "+(s[1]-o)+" "+(s[2]+n)+" L "+(s[1]+o)+" "+(s[2]+n)+" Z ":"v"===i?r=" M "+s[1]+" "+(s[2]+e)+" L "+(s[1]-o)+" "+(s[2]-n)+" L "+(s[1]+o)+" "+(s[2]-n)+" Z ":">"===i?r=" M "+(s[1]+e)+" "+s[2]+" L "+(s[1]-n)+" "+(s[2]-o)+" L "+(s[1]-n)+" "+(s[2]+o)+" Z ":"<"===i&&(r=" M "+(s[1]-e)+" "+s[2]+" L "+(s[1]+n)+" "+(s[2]-o)+" L "+(s[1]+n)+" "+(s[2]+o)+" Z "),r},updatePathStringPrim:function(t){var e,i,r,s=" M ",o="";if(t.numberPoints<=0)return"";if(r=Math.min(t.points.length,t.numberPoints),1===t.bezierDegree)for(e=0;eMath.abs(s)?i/=Math.abs(r):i/=Math.abs(s),0<=r?(t.setAttributeNS(null,"x1",0),t.setAttributeNS(null,"x2",r*i)):(t.setAttributeNS(null,"x1",-r*i),t.setAttributeNS(null,"x2",0)),0<=s?(t.setAttributeNS(null,"y1",0),t.setAttributeNS(null,"y2",s*i)):(t.setAttributeNS(null,"y1",-s*i),t.setAttributeNS(null,"y2",0))},updateGradientCircle:function(t,e,i,r,s,o,n){t.setAttributeNS(null,"cx",100*e+"%"),t.setAttributeNS(null,"cy",100*i+"%"),t.setAttributeNS(null,"r",100*r+"%"),t.setAttributeNS(null,"fx",100*s+"%"),t.setAttributeNS(null,"fy",100*o+"%"),t.setAttributeNS(null,"fr",100*n+"%")},updateGradient:function(t){var e,i,r=t.gradNode1,s=t.gradNode2,o=y.evaluate(t.visProp.gradient);y.exists(r)&&y.exists(s)&&(i=0<(i=y.evaluate(t.visProp.fillopacity))?i:0,e=y.evaluate(t.visProp.fillcolor),r.setAttributeNS(null,"style","stop-color:"+e+";stop-opacity:"+i),s.setAttributeNS(null,"style","stop-color:"+y.evaluate(t.visProp.gradientsecondcolor)+";stop-opacity:"+y.evaluate(t.visProp.gradientsecondopacity)),r.setAttributeNS(null,"offset",100*y.evaluate(t.visProp.gradientstartoffset)+"%"),s.setAttributeNS(null,"offset",100*y.evaluate(t.visProp.gradientendoffset)+"%"),"linear"===o?this.updateGradientAngle(t.gradNode,y.evaluate(t.visProp.gradientangle)):"radial"===o&&this.updateGradientCircle(t.gradNode,y.evaluate(t.visProp.gradientcx),y.evaluate(t.visProp.gradientcy),y.evaluate(t.visProp.gradientr),y.evaluate(t.visProp.gradientfx),y.evaluate(t.visProp.gradientfy),y.evaluate(t.visProp.gradientfr)))},setObjectTransition:function(t,e){var i,r,s,o=["rendNode","rendNodeTriangleStart","rendNodeTriangleEnd"];if(void 0===e&&(e=y.evaluate(t.visProp.transitionduration)),e!==t.visPropOld.transitionduration){for(i=t.elementClass===l.OBJECT_CLASS_TEXT&&"html"===y.evaluate(t.visProp.display)?" color "+e+"ms, opacity "+e+"ms":" fill "+e+"ms, fill-opacity "+e+"ms, stroke "+e+"ms, stroke-opacity "+e+"ms",s=o.length,r=0;r')}}catch(t){this.createNode=function(t){return e.ownerDocument.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="jxgvml">')}}this.dashArray=["Solid","1 1","ShortDash","Dash","LongDash","ShortDashDot","LongDashDot"]},s.VMLRenderer.prototype=new t,s.extend(s.VMLRenderer.prototype,{_setAttr:function(t,e,i,r){try{8===this.container.ownerDocument.documentMode?t[e]=i:t.setAttribute(e,i,r)}catch(t){s.debug("_setAttr: "+e+" "+i+"
\n")}},updateTicks:function(t){for(var e,i,r,s=this.resolution,o=[],n=t.ticks.length,a=0;a"===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;e<',"/canvas>"].join(""),this.canvasRoot=this.container.ownerDocument.getElementById(this.canvasId),this.context=this.canvasRoot.getContext("2d")):i.isNode()&&(this.canvasId="object"==typeof module?module.require("canvas"):require("canvas"),this.canvasRoot=new this.canvasId(500,500),this.context=this.canvasRoot.getContext("2d")),this.dashArray=[[2,2],[5,5],[10,10],[20,20],[20,10,10,10],[20,5,10,5]]},e.CanvasRenderer.prototype=new t,e.extend(e.CanvasRenderer.prototype,{_drawFilledPolygon:function(t){var e,i=t.length,r=this.context;if(0Math.abs(g)?f/=Math.abs(m):f/=Math.abs(g),o=0<=m?(s=0,m*f):(s=-m*f,0),a=0<=g?(n=0,g*f):(n=-g*f,0),i=new v(S.COORDS_BY_USER,[b[0],b[1]],t.board),u=(r=new v(S.COORDS_BY_USER,[b[2],b[3]],t.board)).scrCoords[1]-i.scrCoords[1],p=r.scrCoords[2]-i.scrCoords[2],h=i.scrCoords[1]+u*s,c=i.scrCoords[2]+p*n,l=i.scrCoords[1]+u*o,d=i.scrCoords[2]+p*a,this.context.createLinearGradient(h,c,l,d)},updateGradientCircle:function(t,e,i,r,s,o,n){var a=t.getBoundingBox(),h=new v(S.COORDS_BY_USER,[a[0],a[1]],t.board),l=new v(S.COORDS_BY_USER,[a[2],a[3]],t.board),c=l.scrCoords[1]-h.scrCoords[1],d=h.scrCoords[2]-l.scrCoords[2],u=h.scrCoords[1]+c*e,p=l.scrCoords[2]+d*i,f=h.scrCoords[1]+c*s,m=l.scrCoords[2]+d*o,g=r*(c+d)*.5,b=n*(c+d)*.5;return this.context.createRadialGradient(f,m,b,u,p,g)},updateGradient:function(t){var e,i,r=x.evaluate(t.visProp.gradient);x.evaluate(t.visProp.fillopacity);return e=x.evaluate(t.visProp.fillcolor),"linear"===r?i=this.updateGradientAngle(t,x.evaluate(t.visProp.gradientangle)):"radial"===r&&(i=this.updateGradientCircle(t,x.evaluate(t.visProp.gradientcx),x.evaluate(t.visProp.gradientcy),x.evaluate(t.visProp.gradientr),x.evaluate(t.visProp.gradientfx),x.evaluate(t.visProp.gradientfy),x.evaluate(t.visProp.gradientfr))),i.addColorStop(x.evaluate(t.visProp.gradientstartoffset),e),i.addColorStop(x.evaluate(t.visProp.gradientendoffset),x.evaluate(t.visProp.gradientsecondcolor)),i},_setColor:function(t,e,i){var r,s,o,n,a,h,l,c,d=!0,u=t.visProp;return e=e||"stroke",i=i||e,r=this._getHighlighted(t),"linear"===(c=x.evaluate(t.visProp.gradient))||"radial"===c?this.context[i+"Style"]=this.updateGradient(t):("none"!==(o=x.evaluate(u[r+e+"color"]))&&!1!==o?(h=0<(h=x.evaluate(u[r+e+"opacity"]))?h:0,l=9!==o.length?(a=o,h):(a=(n=p.rgba2rgbo(o))[0],h*n[1]),this.context.globalAlpha=l,this.context[i+"Style"]=a):d=!1,s=parseFloat(x.evaluate(u[r+"strokewidth"])),"stroke"!==e||isNaN(s)||(0===s?this.context.globalAlpha=0:this.context.lineWidth=s),"stroke"===e&&void 0!==u.linecap&&""!==u.linecap&&(this.context.lineCap=u.linecap)),d},_stroke:function(t){var e=this.context,i=x.evaluate(t.visProp.dash);e.save(),0":a.beginPath(),a.moveTo(r[1]-i,r[2]),a.lineTo(r[1],r[2]+i),a.lineTo(r[1]+i,r[2]),a.lineTo(r[1],r[2]-i),a.closePath(),this._fill(t),this._stroke(t);break;case"triangleup":case"a":case"^":a.beginPath(),a.moveTo(r[1],r[2]-i),a.lineTo(r[1]-s,r[2]+o),a.lineTo(r[1]+s,r[2]+o),a.closePath(),this._fill(t),this._stroke(t);break;case"triangledown":case"v":a.beginPath(),a.moveTo(r[1],r[2]+i),a.lineTo(r[1]-s,r[2]-o),a.lineTo(r[1]+s,r[2]-o),a.closePath(),this._fill(t),this._stroke(t);break;case"triangleleft":case"<":a.beginPath(),a.moveTo(r[1]-i,r[2]),a.lineTo(r[1]+o,r[2]-s),a.lineTo(r[1]+o,r[2]+s),a.closePath(),this.fill(t),this._stroke(t);break;case"triangleright":case">":a.beginPath(),a.moveTo(r[1]+i,r[2]),a.lineTo(r[1]-o,r[2]-s),a.lineTo(r[1]-o,r[2]+s),a.closePath(),this._fill(t),this._stroke(t)}},updatePoint:function(t){this.drawPoint(t)},drawArrows:function(t,e,i,r){var s,o,n,a,h,l,c,d,u,p,f,m,g,b,v,y=this.context,C=3,_=1,P=x.evaluate(t.visProp.firstarrow),E=x.evaluate(t.visProp.lastarrow);if("none"!==x.evaluate(t.visProp.strokecolor)&&(P||E)){if(t.elementClass===S.OBJECT_CLASS_LINE)s=e.scrCoords[1],o=e.scrCoords[2],n=i.scrCoords[1],a=i.scrCoords[2],b=v=Math.atan2(a-o,n-s);else{if(s=t.points[0].scrCoords[1],o=t.points[0].scrCoords[2],(g=t.points.length-1)<1)return;n=t.points[t.points.length-1].scrCoords[1],a=t.points[t.points.length-1].scrCoords[2],u=t.points[1].scrCoords[1]-t.points[0].scrCoords[1],p=t.points[1].scrCoords[2]-t.points[0].scrCoords[2],f=t.points[g].scrCoords[1]-t.points[g-1].scrCoords[1],m=t.points[g].scrCoords[2]-t.points[g-1].scrCoords[2],P&&(b=Math.atan2(p,u)),E&&(v=Math.atan2(m,f))}h=x.evaluate(t.visProp[r+"strokewidth"]),P&&(C=3,x.exists(P.size)&&(C=x.evaluate(P.size)),""!==r&&x.exists(P[r+"size"])&&(C=x.evaluate(P[r+"size"])),l=h*C,x.exists(P.type)&&(_=x.evaluate(P.type)),d=2===_?[[l,.5*-l],[0,0],[l,.5*l],[.5*l,0]]:3===_?[[l/3,.5*-l],[0,.5*-l],[0,.5*l],[l/3,.5*l]]:[[l,.5*-l],[0,0],[l,.5*l]]),E&&(C=3,x.exists(E.size)&&(C=x.evaluate(E.size)),""!==r&&x.exists(E[r+"size"])&&(C=x.evaluate(E[r+"size"])),l=h*C,x.exists(E.type)&&(_=x.evaluate(E.type)),c=2===_?[[-l,.5*-l],[0,0],[-l,.5*l],[.5*-l,0]]:3===_?[[-l/3,.5*-l],[0,.5*-l],[0,.5*l],[-l/3,.5*l]]:[[-l,.5*-l],[0,0],[-l,.5*l]]),y.save(),this._setColor(t,"stroke","fill")&&(P&&this._drawFilledPolygon(this._translateShape(this._rotateShape(d,b),s,o)),E&&this._drawFilledPolygon(this._translateShape(this._rotateShape(c,v),n,a))),y.restore()}},drawLine:function(t){var e,i,r=new v(S.COORDS_BY_USER,t.point1.coords.usrCoords,t.board),s=new v(S.COORDS_BY_USER,t.point2.coords.usrCoords,t.board),o=null,n=x.evaluate(t.visProp.firstarrow),a=x.evaluate(t.visProp.lastarrow);t.visPropCalc.visible&&((n||a)&&(o=-4),h.calcStraight(t,r,s,o),i=this._getHighlighted(t),e=this.getPositionArrowHead(t,r,s,x.evaluate(t.visProp[i+"strokewidth"]),i),this.context.beginPath(),this.context.moveTo(e.c1.scrCoords[1]+e.d1x,e.c1.scrCoords[2]+e.d1y),this.context.lineTo(e.c2.scrCoords[1]-e.d2x,e.c2.scrCoords[2]-e.d2y),this._stroke(t),(n&&0=o.eps&&s.transform(i[1][1],i[2][1],i[1][2],i[2][2],i[1][0],i[2][0]))},updateImageURL:function(t){var e=x.evaluate(t.url);return t._src!==e&&(t.imgIsLoaded=!1,t.rendNode.src=e,t._src=e,!0)},remove:function(t){x.exists(t)&&x.exists(t.parentNode)&&t.parentNode.removeChild(t)},updatePathStringPrim:function(t){var e,i,r,s,o,n="M",a=this.context;if(!(t.numberPoints<=0)){if(o=Math.min(t.points.length,t.numberPoints),a.beginPath(),1===t.bezierDegree)for(e=0;ed.maxboundingbox[1]&&(c[1]=d.maxboundingbox[1]),c[2]>d.maxboundingbox[2]&&(c[2]=d.maxboundingbox[2]),c[3]/g,""),d[f].innerHTML=c,(r=u(c,t,a)).reload=p(r,c,t,a)):g.debug("JSXGraph: Apparently the div injection failed. Can't create a board, sorry.")}},window),g.JSXGraph}),define("base/group",["jxg","base/constants","math/math","math/geometry","utils/type"],function(o,l,d,u,p){"use strict";return o.Group=function(t,e,i,r,s){var o,n,a,h;for(this.board=t,this.objects={},o=this.board.numObjects,this.board.numObjects+=1,""!==e&&p.exists(e)?this.id=e:this.id=this.board.id+"Group"+o,(this.board.groups[this.id]=this).type=l.OBJECT_TYPE_POINT,this.elementClass=l.OBJECT_CLASS_POINT,""!==i&&p.exists(i)?this.name=i:this.name="group_"+this.board.generateName(this),delete this.type,this.coords={},this.needsRegularUpdate=s.needsregularupdate,this.rotationCenter="centroid",this.scaleCenter=null,this.rotationPoints=[],this.translationPoints=[],this.scalePoints=[],this.scaleDirections={},this.parents=[],n=p.isArray(r)?r:Array.prototype.slice.call(arguments,3),a=0;ad.eps&&s.push(e.id));return 0===s.length?{action:r,id:"",changed:s}:(i=s[0],e=this.objects[i].point,1g.eps?(r=n.usrCoords[1]/o.usrCoords[1],a[0]*=r,a[2]*=r,this.board.setBoundingBox(a,!1)):Math.abs(this.line.stdform[2])g.eps&&(s=n.usrCoords[2]/o.usrCoords[2],a[3]*=s,a[1]*=s,this.board.setBoundingBox(a,!1))),this},calculateTicksCoordinates:function(){var t,e,i,r;if(this.setTicksSizeVariables(),!(Math.abs(this.dx)=g.eps&&0<=l.scrCoords[1]&&l.scrCoords[1]<=this.board.canvasWidth&&0<=l.scrCoords[2]&&l.scrCoords[2]<=this.board.canvasHeight,u=Math.abs(c.usrCoords[0])>=g.eps&&0<=c.scrCoords[1]&&c.scrCoords[1]<=this.board.canvasWidth&&0<=c.scrCoords[2]&&c.scrCoords[2]<=this.board.canvasHeight,p=C.evaluate(this.line.visProp.straightfirst),f=C.evaluate(this.line.visProp.straightlast),m=C.evaluate(this.visProp.includeboundaries);return C.exists(e)||"tickdistance"===e?v.calcStraight(this.line,l,c,C.evaluate(this.line.visProp.margin)):v.calcLineDelimitingPoints(this.line,l,c),s=C.evaluate(this.line.visProp.firstarrow),o=C.evaluate(this.line.visProp.lastarrow),(s||o)&&(h=this.board.renderer.getPositionArrowHead(this.line,l,c,C.evaluate(this.line.visProp.strokewidth)),s&&l.setCoordinates(b.COORDS_BY_SCREEN,[l.scrCoords[1]-h.d1x,l.scrCoords[2]-h.d1y]),o&&c.setCoordinates(b.COORDS_BY_SCREEN,[c.scrCoords[1]-h.d2x,c.scrCoords[2]-h.d2y])),(n=this.getDistanceFromZero(t,l))<(a=this.getDistanceFromZero(t,c))?(i=n,p||!d||m||(i+=g.eps),r=a,f||!u||m||(r-=g.eps)):ag.eps?(o=this.adjustTickDistance(o,t,s),o/=a+1):n||(o/=a+1),!((this.ticksDelta=o)=e.lower-r&&this.processTickPosition(t,i,o,s),i+=o;for(i=-o;i>=e.lower-r;)i<=e.upper+r&&this.processTickPosition(t,i,o,s),i-=o}},adjustTickDistance:function(t,e,i){var r,s,o,n=1,a=C.evaluate(this.visProp.minorticks);if(this.getLowerAndUpperBounds(e,"ticksdistance"),r=e.usrCoords[1]+i.x*t,s=e.usrCoords[2]+i.y*t,o=e.distance(b.COORDS_BY_SCREEN,new y(b.COORDS_BY_USER,[r,s],this.board)),0==t)return 0;for(;o/(a+1)=e.lower-a&&this.fixedTicks[d]<=e.upper+a&&(this.ticks.push(s),c&&(h||C.exists(this.visProp.labels[d]))?(r=h?C.evaluate(this.visProp.labels[d]):this.fixedTicks[d],this.labelsData.push(this.generateLabelData(this.generateLabelText(i,t,r),i,d))):this.labelsData.push(null))},getXandYdeltas:function(){var t,e,i=this.line.point1.Dist(this.line.point2);return this.line.type===b.OBJECT_TYPE_AXIS?(t=this.line.point1.coords.usrCoords,e=this.line.point2.coords.usrCoords,(t[1]>e[1]||Math.abs(t[1]-e[1])e[2])&&(t=this.line.point2.coords.usrCoords,e=this.line.point1.coords.usrCoords)):(t=this.line.point1.coords.usrCoords,e=this.line.point2.coords.usrCoords),{x:(e[1]-t[1])/i,y:(e[2]-t[2])/i}},_isInsideCanvas:function(t,e,i){var r=this.board.canvasWidth,s=this.board.canvasHeight;return void 0===i&&(i=0),t[0]>=i&&t[0]<=r-i&&e[0]>=i&&e[0]<=s-i||t[1]>=i&&t[1]<=r-i&&e[1]>=i&&e[1]<=s-i},createTickPath:function(t,e){var i,r,s,o,n,a,h=[-2e6,-2e6],l=[-2e6,-2e6],c=t.scrCoords,d=e?(r=this.dxMaj,s=this.dyMaj,this.majStyle):(r=this.dxMin,s=this.dyMin,this.minStyle),u=[-s*c[1]-r*c[2],s,r];if(e&&"polar"==C.evaluate(this.visProp.type)){var p,f,m=this.board.getBoundingBox(),g=2*Math.PI,b=g/180;if(this.board.unitY,this.board.X,c=t.usrCoords,(f=Math.sqrt(c[1]*c[1]+c[2]*c[2]))"==C.evaluate(this.visProp.face)?Math.PI/4:"<"==C.evaluate(this.visProp.face)?-Math.PI/4:0,o=Math.cos(a)*r-Math.sin(a)*s,n=Math.sin(a)*r+Math.cos(a)*s,h[0]=c[1]+o*C.evaluate(this.visProp.tickendings[0]),l[0]=c[2]-n*C.evaluate(this.visProp.tickendings[0]),h[1]=c[1],l[1]=c[2],a=-a,o=Math.cos(a)*r-Math.sin(a)*s,n=Math.sin(a)*r+Math.cos(a)*s,h[2]=c[1]-o*C.evaluate(this.visProp.tickendings[1]),l[2]=c[2]+n*C.evaluate(this.visProp.tickendings[1])),this._isInsideCanvas(h,l))return[h,l,e];return[]},formatLabelText:function(t){var e=t.toString(),i=C.evaluate(this.visProp.scalesymbol);return C.isNumber(t)&&((e.length>C.evaluate(this.visProp.maxlabellength)||-1!==e.indexOf("e"))&&(e=t.toPrecision(C.evaluate(this.visProp.precision)).toString()),-1E.eps?this.position=(t-this._smin)/e:this.position=0,this.position=Math.max(0,Math.min(1,this.position)),this},m.setMin=function(t){return this._smin=t,this},C&&(v=w.copyAttributes(i,t.options,"slider","label"),b=t.create("text",[function(){return.05*(c.X()-l.X())+c.X()},function(){return.05*(c.Y()-l.Y())+c.Y()},function(){var t=w.evaluate(m.visProp.suffixlabel),e=w.evaluate(m.visProp.unitlabel),i=w.evaluate(m.visProp.postlabel),r=null!==t?t:m.name&&""!==m.name?m.name+" = ":"";return r+=w.toFixed(m.Value(),P),null!==e&&(r+=e),null!==i&&(r+=i),r}],v),m.label=b,m.visProp.withlabel=!0,m.hasLabel=!0),m.point1=l,m.point2=c,m.baseline=d,m.highline=g,y&&(v=w.copyAttributes(i,t.options,"slider","ticks"),w.exists(v.generatelabeltext)||(v.generateLabelText=function(t,e,i){var r=m.point1.Dist(m.point2),s=m._smin,o=m._smax,n=this.getDistanceFromZero(e,t)*(o-s)/r+s;return rt&&(i[e]=parseFloat(this.data[e][t]));return i},getRow:function(t){var e,i;if(h.isString(t))for(i=0;il[n]&&(l[n]=t[s][n]),t[s][n]> "}return"null";case"string":return"'"+t.replace(/(["'])/g,"\\$1")+"'";case"number":case"boolean":return t.toString();case"null":return"null"}},toJessie:function(t){var e,i,r=this.dump(t),s=[];for(r.methods=this.setBoundingBox(r.methods,t,"$board"),i=r.elements,e=0;e'],o=t.create("text",s,r);return o.type=h.OBJECT_TYPE_CHECKBOX,o.rendNodeCheckbox=o.rendNode.childNodes[0].childNodes[0],o.rendNodeLabel=o.rendNode.childNodes[0].childNodes[1],o.rendNodeTag=o.rendNodeCheckbox,o.rendNodeTag.disabled=!!r.disabled,o.rendNodeLabel.innerHTML=e[2],o.rendNodeCheckbox.id=o.rendNode.id+"_checkbox",o.rendNodeLabel.id=o.rendNode.id+"_label",o.rendNodeLabel.setAttribute("for",o.rendNodeCheckbox.id),o.visPropOld.fontsize="0px",t.renderer.updateTextStyle(o,!1),o.rendNodeCheckbox.checked=r.checked,o._value=r.checked,o.Value=function(){return this._value},o.update=function(){return this.needsUpdate&&(n.Text.prototype.update.call(this),this._value=this.rendNodeCheckbox.checked),this},a.addEvent(o.rendNodeCheckbox,"change",l,o),o},n.registerElement("checkbox",n.createCheckbox),{createCheckbox:n.createCheckbox}}),define("element/input",["jxg","utils/env","utils/type"],function(n,a,h){"use strict";var l=function(t){this._value=this.rendNodeInput.value,this.board.update()};return n.createInput=function(t,e,i){var r=h.copyAttributes(i,t.options,"input"),s=[e[0],e[1],''],o=t.create("text",s,r);return o.type=h.OBJECT_TYPE_INPUT,o.rendNodeLabel=o.rendNode.childNodes[0].childNodes[0],o.rendNodeInput=o.rendNode.childNodes[0].childNodes[1],o.rendNodeLabel.innerHTML=e[3],o.rendNodeInput.value=e[2],o.rendNodeTag=o.rendNodeInput,o.rendNodeTag.disabled=!!r.disabled,o.rendNodeLabel.id=o.rendNode.id+"_label",o.rendNodeInput.id=o.rendNode.id+"_input",o._value=e[2],o.update=function(){return this.needsUpdate&&(n.Text.prototype.update.call(this),this._value=this.rendNodeInput.value),this},o.Value=function(){return this._value},a.addEvent(o.rendNodeInput,"input",l,o),a.addEvent(o.rendNodeInput,"mousedown",function(t){h.exists(t.stopPropagation)&&t.stopPropagation()},o),a.addEvent(o.rendNodeInput,"touchstart",function(t){h.exists(t.stopPropagation)&&t.stopPropagation()},o),a.addEvent(o.rendNodeInput,"pointerdown",function(t){h.exists(t.stopPropagation)&&t.stopPropagation()},o),o.visPropOld.fontsize="0px",t.renderer.updateTextStyle(o,!1),o},n.registerElement("input",n.createInput),{createInput:n.createInput}}),define("element/button",["jxg","utils/env","utils/type"],function(n,a,h){"use strict";var l=function(){this._handler&&this._handler(),this.board.update()};return n.createButton=function(t,e,i){var r=h.copyAttributes(i,t.options,"button"),s=[e[0],e[1],''],o=t.create("text",s,r);return o.type=h.OBJECT_TYPE_BUTTON,o.rendNodeButton=o.rendNode.childNodes[0],o.rendNodeButton.id=o.rendNode.id+"_button",o.rendNodeButton.innerHTML=e[2],o.rendNodeTag=o.rendNodeButton,o.rendNodeTag.disabled=!!r.disabled,o.visPropOld.fontsize="0px",t.renderer.updateTextStyle(o,!1),e[3]&&(h.isString(e[3])?(o._jc=new n.JessieCode,o._jc.use(t),o._handler=function(){o._jc.parse(e[3])}):o._handler=e[3]),a.addEvent(o.rendNodeButton,"click",l,o),a.addEvent(o.rendNodeButton,"mousedown",function(t){h.exists(t.stopPropagation)&&t.stopPropagation()},o),a.addEvent(o.rendNodeButton,"touchstart",function(t){h.exists(t.stopPropagation)&&t.stopPropagation()},o),a.addEvent(o.rendNodeButton,"pointerdown",function(t){h.exists(t.stopPropagation)&&t.stopPropagation()},o),o},n.registerElement("button",n.createButton),{createButton:n.createButton}}),define("../build/core.deps.js",["jxg","utils/env","base/constants","utils/type","utils/xml","utils/event","utils/expect","math/math","math/qdt","math/numerics","math/statistics","math/symbolic","math/geometry","math/clip","math/poly","math/complex","renderer/abstract","reader/file","parser/geonext","base/board","options","jsxgraph","base/element","base/coords","base/coordselement","base/point","base/line","base/group","base/circle","element/conic","base/polygon","base/curve","element/arc","element/sector","base/composition","element/composition","element/locus","base/text","base/image","element/slider","element/measure","base/chart","base/transformation","base/turtle","utils/color","base/ticks","utils/zip","utils/base64","utils/uuid","utils/encoding","server/server","parser/datasource","parser/jessiecode","parser/ca","utils/dump","renderer/svg","renderer/vml","renderer/canvas","renderer/no","element/comb","element/slopetriangle","element/checkbox","element/input","element/button"],function(t,e){"use strict";return e.isBrowser?window.JXG=t:e.isNode()&&"object"==typeof module?module.exports=t:e.isWebWorker()&&(self.JXG=t),t}),require("../build/core.deps.js");function d(t,e){return v.call(t,e)}function e(e,i){var r,s,o,n,a,h,l,c,d,u,p,f=i&&i.split("/"),m=t.map,g=m&&m["*"]||{};if(e){for(a=(e=e.split("/")).length-1,t.nodeIdCompat&&x.test(e[a])&&(e[a]=e[a].replace(x,"")),"."===e[0].charAt(0)&&f&&(e=f.slice(0,f.length-1).concat(e)),d=0;d