diff --git a/CHANGELOG b/CHANGELOG index 1de9e4a..39640c8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,11 @@ +# v1.3.4 + +- configure custom course info via `INFO` + +# v1.3.3 + +- fixed a bug, where no title for a question is given + # v1.3.2 - removed left and right borders in question box on mobile devices diff --git a/README.md b/README.md index 366ea41..93a9f09 100644 --- a/README.md +++ b/README.md @@ -186,12 +186,12 @@ z = x * y Calculate $x \cdot y =$ %z ``` +![](https://raw.githubusercontent.com/andreas-schwenk/pysell/refs/heads/main/img/example2.jpg) + ## Syntax This section describes the syntax of `pySELL`. Many aspects are self-explanatory and can be understood from the [example file](https://github.com/andreas-schwenk/pysell/blob/main/examples/ex1.txt). -![](https://raw.githubusercontent.com/andreas-schwenk/pysell/refs/heads/main/img/example2.jpg) - ### Global - `LANG` defines the natural language used in the few built-in output strings. Currently supported languages are `en`, `de`, `es`, `it`, and `fr`. @@ -200,7 +200,7 @@ This section describes the syntax of `pySELL`. Many aspects are self-explanatory - `AUTHOR` defines the author or institution of the quizzes. You may include HTML code, but everything must be written on the same line where the author keyword starts. -- `QUESTION` marks the beginning of a new question. The title of the question should be written on the same line. +- `QUESTION` indicates the start of a new question, with its title specified on the same line. By default, each correctly answered question earns the student one point. To specify a different point value, include the desired points in parentheses, such as `(X pts)`, where `X` is the number of points. For example: `QUESTION Turing Machine (3 pts)` - `TIMER` restricts the time students have to complete the quiz page. The time, specified in seconds, is written after a space. diff --git a/build.sh b/build.sh index 5c36dac..59d9b97 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,8 @@ #!/bin/bash +# DEPENDENCIES +# pip install hatchling twine + # update pySELL itself python3 build-pysell.py @@ -7,4 +10,4 @@ python3 build-pysell.py rm dist/*.whl rm dist/*.tar.gz python3 -m build -echo "upload to pypi.org via: twine upload dist/*" +echo "upload to pypi.org via: twine upload dist/*" diff --git a/docs/ex1.html b/docs/ex1.html index fde0025..0c889ab 100644 --- a/docs/ex1.html +++ b/docs/ex1.html @@ -1,4 +1,4 @@ - pySELL Quiz
02:34

DEBUG VERSION







99:99

DEBUG VERSION







\ No newline at end of file + `.includes(i)==!1&&(this.token+=i),this.pos++}}isNum(e){return e.charCodeAt(0)>=48&&e.charCodeAt(0)<=57}isAlpha(e){return e.charCodeAt(0)>=65&&e.charCodeAt(0)<=90||e.charCodeAt(0)>=97&&e.charCodeAt(0)<=122||e==="_"}toString(){return this.root==null?"":this.root.toString()}toTexString(){return this.root==null?"":this.root.toTexString()}},a=class r{static{f(this,"TermNode")}constructor(e,t,s=0,i=0){this.op=e,this.c=t,this.re=s,this.im=i,this.explicitParentheses=!1}clone(){let e=new r(this.op,this.c.map(t=>t.clone()),this.re,this.im);return e.explicitParentheses=this.explicitParentheses,e}static const(e=0,t=0){return new r("const",[],e,t)}compare(e,t=0,s=1e-9){let i=this.re-e,l=this.im-t;return Math.sqrt(i*i+l*l)1e-14,s=Math.abs(this.im)>1e-14;t&&s&&this.im>=0?e="("+this.re+"+"+this.im+"i)":t&&s&&this.im<0?e="("+this.re+"-"+-this.im+"i)":t&&this.re>0?e=""+this.re:t&&this.re<0?e="("+this.re+")":s?e="("+this.im+"i)":e="0"}else this.op.startsWith("var")?e=this.op.split(":")[1]:this.c.length==1?e=(this.op===".-"?"-":this.op)+"("+this.c.toString()+")":e="("+this.c.map(t=>t.toString()).join(this.op)+")";return e}toTexString(e=!1){let s="";switch(this.op){case"const":{let i=Math.abs(this.re)>1e-9,l=Math.abs(this.im)>1e-9,o=i?""+this.re:"",c=l?""+this.im+"i":"";c==="1i"?c="i":c==="-1i"&&(c="-i"),!i&&!l?s="0":(l&&this.im>=0&&i&&(c="+"+c),s=o+c);break}case".-":s="-"+this.c[0].toTexString();break;case"+":case"-":case"*":case"^":{let i=this.c[0].toTexString(),l=this.c[1].toTexString(),o=this.op==="*"?"\\cdot ":this.op;s="{"+i+"}"+o+"{"+l+"}";break}case"/":{let i=this.c[0].toTexString(!0),l=this.c[1].toTexString(!0);s="\\frac{"+i+"}{"+l+"}";break}case"floor":{let i=this.c[0].toTexString(!0);s+="\\"+this.op+"\\left\\lfloor"+i+"\\right\\rfloor";break}case"ceil":{let i=this.c[0].toTexString(!0);s+="\\"+this.op+"\\left\\lceil"+i+"\\right\\rceil";break}case"round":{let i=this.c[0].toTexString(!0);s+="\\"+this.op+"\\left["+i+"\\right]";break}case"acos":case"acosh":case"asin":case"asinh":case"atan":case"atanh":case"cos":case"cosh":case"cot":case"exp":case"ln":case"log":case"log10":case"log2":case"sin":case"sinc":case"sinh":case"tan":case"tanh":{let i=this.c[0].toTexString(!0);s+="\\"+this.op+"\\left("+i+"\\right)";break}case"sqrt":{let i=this.c[0].toTexString(!0);s+="\\"+this.op+"{"+i+"}";break}case"abs":{let i=this.c[0].toTexString(!0);s+="\\left|"+i+"\\right|";break}default:if(this.op.startsWith("var:")){let i=this.op.substring(4);switch(i){case"pi":i="\\pi";break}s=" "+i+" "}else{let i="warning: Node.toString(..):";i+=" unimplemented operator '"+this.op+"'",console.log(i),s=this.op,this.c.length>0&&(s+="\\left({"+this.c.map(l=>l.toTexString(!0)).join(",")+"}\\right)")}}return!e&&this.explicitParentheses&&(s="\\left({"+s+"}\\right)"),s}};function ce(r,e){let t=1e-9;if(b.compare(r,e))return!0;r=r.clone(),e=e.clone(),_(r.root),_(e.root);let s=new Set;r.getVars(s),e.getVars(s);let i=[],l=[];for(let n of s.keys())n.startsWith("C")?i.push(n):l.push(n);let o=i.length;for(let n=0;no&&(o=m.length)}let c=k("");e.appendChild(c);let n=Math.max(o*15,24),h=W(n);if(t.gapInputs[this.inputId]=h,h.addEventListener("keyup",()=>{t.editingEnabled!=!1&&(this.question.editedQuestion(),h.value=h.value.toUpperCase(),this.question.student[this.inputId]=h.value.trim())}),c.appendChild(h),this.question.showSolution&&(this.question.student[this.inputId]=h.value=l[0],l.length>1)){let p=k("["+l.join("|")+"]");p.style.fontSize="small",p.style.textDecoration="underline",c.appendChild(p)}}},I=class{static{f(this,"TermInput")}constructor(e,t,s,i,l,o,c=!1){s in t.student||(t.student[s]=""),this.question=t,this.inputId=s,this.outerSpan=k(""),this.outerSpan.style.position="relative",e.appendChild(this.outerSpan),this.inputElement=W(Math.max(i*12,48)),this.outerSpan.appendChild(this.inputElement),this.equationPreviewDiv=w(),this.equationPreviewDiv.classList.add("equationPreview"),this.equationPreviewDiv.style.display="none",this.outerSpan.appendChild(this.equationPreviewDiv),this.inputElement.addEventListener("click",()=>{t.editingEnabled!=!1&&(this.question.editedQuestion(),this.edited())}),this.inputElement.addEventListener("keyup",()=>{t.editingEnabled!=!1&&(this.question.editedQuestion(),this.edited())}),this.inputElement.addEventListener("focus",()=>{t.editingEnabled!=!1}),this.inputElement.addEventListener("focusout",()=>{this.equationPreviewDiv.innerHTML="",this.equationPreviewDiv.style.display="none"}),this.inputElement.addEventListener("keydown",n=>{if(t.editingEnabled==!1){n.preventDefault();return}let h="abcdefghijklmnopqrstuvwxyz";h+="ABCDEFGHIJKLMNOPQRSTUVWXYZ",h+="0123456789",h+="+-*/^(). <>=|",o&&(h="-0123456789"),n.key.length<3&&h.includes(n.key)==!1&&n.preventDefault();let p=this.inputElement.value.length*12;this.inputElement.offsetWidth0&&!s?"block":"none",this.question.student[this.inputId]=e}},H=class{static{f(this,"MatrixInput")}constructor(e,t,s,i){this.parent=e,this.question=t,this.inputId=s,this.matExpected=new E(0,0),this.matExpected.fromString(i),this.matStudent=new E(this.matExpected.m==1?1:3,this.matExpected.n==1?1:3),t.showSolution&&this.matStudent.fromMatrix(this.matExpected),this.genMatrixDom(!0)}genMatrixDom(e){let t=w();this.parent.innerHTML="",this.parent.appendChild(t),t.style.position="relative",t.style.display="inline-block";let s=document.createElement("table");t.appendChild(s);let i=this.matExpected.getMaxCellStrlen();for(let u=0;u=10,this.matStudent.n<=1,this.matStudent.m>=10,this.matStudent.m<=1];for(let u=0;u<4;u++){if(m[u]==!1)continue;let g=k(l[u]);n[u]!=888&&(g.style.top=""+n[u]+"px"),h[u]!=888&&(g.style.bottom=""+h[u]+"px"),p[u]!=888&&(g.style.right=""+p[u]+"px"),g.classList.add("matrixResizeButton"),t.appendChild(g),d[u]?g.style.opacity="0.5":g.addEventListener("click",()=>{for(let v=0;v=5&&(this.feedbackSpan.innerHTML="  "+this.numCorrect+" / "+this.numChecked);break}this.questionDiv.style.backgroundColor=t,this.questionDiv.style.borderColor=e}populateDom(e=!1){if(this.parentDiv.innerHTML="",this.questionDiv=w(),this.parentDiv.appendChild(this.questionDiv),this.questionDiv.classList.add("question"),this.feedbackPopupDiv=w(),this.feedbackPopupDiv.classList.add("questionFeedback"),this.questionDiv.appendChild(this.feedbackPopupDiv),this.feedbackPopupDiv.innerHTML="awesome",this.debug&&"src_line"in this.src){let i=w();i.classList.add("debugInfo"),i.innerHTML="Source code: lines "+this.src.src_line+"..",this.questionDiv.appendChild(i)}if(this.titleDiv=w(),this.questionDiv.appendChild(this.titleDiv),this.titleDiv.classList.add("questionTitle"),this.titleDiv.innerHTML=this.src.title,this.src.error.length>0){let i=k(this.src.error);this.questionDiv.appendChild(i),i.style.color="red";return}let t=this.getCurrentInstance();if(t!=null&&"__svg_image"in t){let i=t.__svg_image.v,l=w();this.questionDiv.appendChild(l);let o=document.createElement("img");l.appendChild(o),o.classList.add("img"),o.src="data:image/svg+xml;base64,"+i}for(let i of this.src.text.c)this.questionDiv.appendChild(this.generateText(i));let s=w();if(s.innerHTML="",s.classList.add("button-group"),this.questionDiv.appendChild(s),this.hasCheckButton=Object.keys(this.expected).length>0,this.hasCheckButton&&(this.checkAndRepeatBtn=F(),s.appendChild(this.checkAndRepeatBtn),this.checkAndRepeatBtn.innerHTML=P,this.checkAndRepeatBtn.style.backgroundColor="black",e&&(this.checkAndRepeatBtn.style.height="0",this.checkAndRepeatBtn.style.visibility="hidden")),this.feedbackSpan=k(""),this.feedbackSpan.style.userSelect="none",s.appendChild(this.feedbackSpan),this.debug){if(this.src.variables.length>0){let o=w();o.classList.add("debugInfo"),o.innerHTML="Variables generated by Python Code",this.questionDiv.appendChild(o);let c=w();c.classList.add("debugCode"),this.questionDiv.appendChild(c);let n=this.getCurrentInstance(),h="",p=[...this.src.variables];p.sort();for(let m of p){let d=n[m].t,u=n[m].v;switch(d){case"vector":u="["+u+"]";break;case"set":u="{"+u+"}";break}h+=d+" "+m+" = "+u+"
"}c.innerHTML=h}let i=["python_src_html","text_src_html"],l=["Python Source Code","Text Source Code"];for(let o=0;o0){let n=w();n.classList.add("debugInfo"),n.innerHTML=l[o],this.questionDiv.appendChild(n);let h=w();h.classList.add("debugCode"),this.questionDiv.append(h),h.innerHTML=this.src[c]}}}this.hasCheckButton&&this.checkAndRepeatBtn.addEventListener("click",()=>{this.state==x.passed?(this.state=x.init,this.editingEnabled=!0,this.reset(),this.populateDom()):R(this)})}generateMathString(e){let t="";switch(e.t){case"math":case"display-math":for(let s of e.c){let i=this.generateMathString(s);s.t==="var"&&t.includes("!PM")&&(i.startsWith("{-")?(i="{"+i.substring(2),t=t.replaceAll("!PM","-")):t=t.replaceAll("!PM","+")),t+=i}break;case"text":return e.d;case"plus_minus":{t+=" !PM ";break}case"var":{let s=this.getCurrentInstance(),i=s[e.d].t,l=s[e.d].v;switch(i){case"vector":return"\\left["+l+"\\right]";case"set":return"\\left\\{"+l+"\\right\\}";case"complex":{let o=l.split(","),c=parseFloat(o[0]),n=parseFloat(o[1]);return a.const(c,n).toTexString()}case"matrix":{let o=new E(0,0);return o.fromString(l),t=o.toTeXString(e.d.includes("augmented"),this.language!="de"),t}case"term":{try{t=b.parse(l).toTexString()}catch{}break}default:t=l}}}return e.t==="plus_minus"?t:"{"+t+"}"}generateText(e,t=!1){switch(e.t){case"paragraph":case"span":{let s=document.createElement(e.t=="span"||t?"span":"p");for(let i of e.c)s.appendChild(this.generateText(i));return s.style.userSelect="none",s}case"text":return k(e.d);case"code":{let s=k(e.d);return s.classList.add("code"),s}case"italic":case"bold":{let s=k("");return s.append(...e.c.map(i=>this.generateText(i))),e.t==="bold"?s.style.fontWeight="bold":s.style.fontStyle="italic",s}case"math":case"display-math":{let s=this.generateMathString(e);return L(s,e.t==="display-math")}case"string_var":{let s=k(""),i=this.getCurrentInstance(),l=i[e.d].t,o=i[e.d].v;return l==="string"?s.innerHTML=o:(s.innerHTML="EXPECTED VARIABLE OF TYPE STRING",s.style.color="red"),s}case"gap":{let s=k("");return new B(s,this,"",e.d),s}case"input":case"input2":{let s=e.t==="input2",i=k("");i.style.verticalAlign="text-bottom";let l=e.d,o=this.getCurrentInstance()[l];if(this.expected[l]=o.v,this.types[l]=o.t,!s)switch(o.t){case"set":i.append(L("\\{"),k(" "));break;case"vector":i.append(L("["),k(" "));break}if(o.t==="string")new B(i,this,l,this.expected[l]);else if(o.t==="vector"||o.t==="set"){let c=o.v.split(","),n=c.length;for(let h=0;h0&&i.appendChild(k(" , "));let p=l+"-"+h;new I(i,this,p,c[h].length,c[h],!1)}}else if(o.t==="matrix"){let c=w();i.appendChild(c),new H(c,this,l,o.v)}else if(o.t==="complex"){let c=o.v.split(",");new I(i,this,l+"-0",c[0].length,c[0],!1),i.append(k(" "),L("+"),k(" ")),new I(i,this,l+"-1",c[1].length,c[1],!1),i.append(k(" "),L("i"))}else{let c=o.t==="int";new I(i,this,l,o.v.length,o.v,c)}if(!s)switch(o.t){case"set":i.append(k(" "),L("\\}"));break;case"vector":i.append(k(" "),L("]"));break}return i}case"itemize":return j(e.c.map(s=>O(this.generateText(s))));case"single-choice":case"multi-choice":{let s=e.t=="multi-choice";s||(this.includesSingleChoice=!0);let i=document.createElement("table"),l=e.c.length,o=this.debug==!1,c=z(l,o),n=s?X:G,h=s?Z:Y,p=[],m=[];for(let d=0;d{this.editingEnabled!=!1&&(this.editedQuestion(),this.student[v]=this.student[v]==="true"?"false":"true",this.student[v]==="true"?T.innerHTML=n:T.innerHTML=h)}):C.addEventListener("click",()=>{if(this.editingEnabled!=!1){this.editedQuestion();for(let D of m)this.student[D]="false";this.student[v]="true";for(let D=0;D{r.feedbackPopupDiv.style.display="none"},1e3),r.editingEnabled=!0,r.state===x.passed?(r.editingEnabled=!1,r.src.instances.length>1?r.checkAndRepeatBtn.innerHTML=J:r.checkAndRepeatBtn.style.visibility="hidden"):r.checkAndRepeatBtn!=null&&(r.checkAndRepeatBtn.innerHTML=P)}f(R,"evalQuestion");function be(r,e){new q(r,e)}f(be,"init");var q=class{static{f(this,"Quiz")}constructor(e,t){this.quizSrc=e,["en","de","es","it","fr"].includes(this.quizSrc.lang)==!1&&(this.quizSrc.lang="en"),this.debug=t,this.debug&&(document.getElementById("debug").style.display="block"),this.questions=[],this.timeLeft=e.timer,this.timeLimited=e.timer>0,this.fillPageMetadata(),this.timeLimited?(document.getElementById("timer-info").style.display="block",document.getElementById("timer-info-text").innerHTML=oe[this.quizSrc.lang],document.getElementById("start-btn").addEventListener("click",()=>{document.getElementById("timer-info").style.display="none",this.generateQuestions(),this.runTimer()})):this.generateQuestions()}fillPageMetadata(){if(document.getElementById("date").innerHTML=this.quizSrc.date,document.getElementById("title").innerHTML=this.quizSrc.title,document.getElementById("author").innerHTML=this.quizSrc.author,this.quizSrc.info.length>0)document.getElementById("courseInfo1").innerHTML=this.quizSrc.info;else{document.getElementById("courseInfo1").innerHTML=$[this.quizSrc.lang];let e=''+te[this.quizSrc.lang]+"";document.getElementById("courseInfo2").innerHTML=ee[this.quizSrc.lang].replace("*",e)}document.getElementById("data-policy").innerHTML=le[this.quizSrc.lang]}generateQuestions(){let e=document.getElementById("questions"),t=1;for(let s of this.quizSrc.questions){s.title=""+t+". "+s.title;let i=w();e.appendChild(i);let l=new V(i,s,this.quizSrc.lang,this.debug);l.showSolution=this.debug,this.questions.push(l),l.populateDom(this.timeLimited),this.debug&&s.error.length==0&&l.hasCheckButton&&l.checkAndRepeatBtn.click(),t++}}runTimer(){document.getElementById("stop-now").style.display="block",document.getElementById("stop-now-btn").innerHTML=ae[this.quizSrc.lang],document.getElementById("stop-now-btn").addEventListener("click",()=>{this.timeLeft=1});let e=document.getElementById("timer");e.style.display="block",e.innerHTML=he(this.timeLeft);let t=setInterval(()=>{this.timeLeft--,e.innerHTML=he(this.timeLeft),this.timeLeft<=0&&this.stopTimer(t)},1e3)}stopTimer(e){document.getElementById("stop-now").style.display="none",clearInterval(e);let t=0,s=0;for(let l of this.questions){let o=l.src.points;s+=o,R(l),l.state===x.passed&&(t+=o),l.editingEnabled=!1}document.getElementById("questions-eval").style.display="block";let i=document.getElementById("questions-eval-percentage");i.innerHTML=s==0?"":""+t+" / "+s+" "+re[this.quizSrc.lang]+"

"+Math.round(t/s*100)+" %"}};function he(r){let e=Math.floor(r/60),t=r%60;return e+":"+(""+t).padStart(2,"0")}f(he,"formatTime");return ge(ke);})();pysell.init(quizSrc,debug); \ No newline at end of file diff --git a/examples/ex2.txt b/examples/ex2.txt index b1223fd..6a6972e 100644 --- a/examples/ex2.txt +++ b/examples/ex2.txt @@ -1,6 +1,7 @@ LANG en TITLE pySELL demo with time limit AUTHOR Andreas Schwenk +INFO My custom information, displayed at the top of the page. TIMER 30 # all questions will be evaluated when the timer runs out. diff --git a/pyproject.toml b/pyproject.toml index ace1acb..da04dce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,10 @@ -# DEPENDENCIES -# pip install hatchling twine - [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [project] name = "pysell" -version = "1.3.2" +version = "1.3.4" description = "A Python-based Simple E-Learning Language for the Rapid Creation of Interactive and Mobile-Friendly STEM Courses" readme = "README.md" requires-python = ">=3.8" diff --git a/requirements.txt b/requirements.txt index 2f259b7..e69de29 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +0,0 @@ -s \ No newline at end of file diff --git a/sell.py b/sell.py index d56a7ad..49dd455 100755 --- a/sell.py +++ b/sell.py @@ -876,6 +876,7 @@ def compile_input_file(input_dirname: str, src: str) -> dict: pattern = r"(?P.+?)(?:\s\((?P<num>\d+)\spts\))?$" match = re.match(pattern, line[8:].strip()) title = "" + num = None if match: title = match.group("title").strip() num = match.group("num") # This will be None if not present @@ -1019,7 +1020,7 @@ def compile_input_file(input_dirname: str, src: str) -> dict: HTML += b'enter; background-color: black; color: white; padding: 20px ' HTML += b'10px; user-select: none; } @media (min-width: 800px) { .time' HTML += b'rInfo { border-radius: 6px; } } </style> </head> <body> <div' -HTML += b' id="timer" class="timer">02:34</div> <h1 id="title"></h1> <' +HTML += b' id="timer" class="timer">99:99</div> <h1 id="title"></h1> <' HTML += b'div style="margin-top: 15px"></div> <div class="author" id="' HTML += b'author"></div> <p id="courseInfo1" class="courseInfo"></p> <' HTML += b'p id="courseInfo2" class="courseInfo"></p> <h1 id="debug" cl' @@ -1031,775 +1032,776 @@ def compile_input_file(input_dirname: str, src: str) -> dict: HTML += b'art </button> </div> <div id="questions"></div> <div id="s' HTML += b'top-now" class="evalBtn" style="display: none"> <button id="' HTML += b'stop-now-btn" class="button" style="background-color: var(--' -HTML += b'green)" > jetzt auswerten (TODO: translate) </button> </div>' -HTML += b' <br /> <div id="questions-eval" class="eval" style="display' -HTML += b': none"> <h1 id="questions-eval-percentage">0 %</h1> </div> ' -HTML += b'</div> <br /><br /><br /><br /> <div class="footer"> <div ' -HTML += b'class="contents"> <span id="date"></span> — This quiz ' -HTML += b'was developed using pySELL, a Python-based Simple E-Learning' -HTML += b' Language — <a href="https://pysell.org" style="color:' -HTML += b' var(--grey)" >https://pysell.org</a > <br /> <span style="w' -HTML += b'idth: 64px"> <img style="max-width: 48px; padding: 16px 0px"' -HTML += b' src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBl' -HTML += b'bmNvZGluZz0iVVRGLTgiPz4KPCEtLSBDcmVhdGVkIHdpdGggSW5rc2NhcGUg' -HTML += b'KGh0dHA6Ly93d3cuaW5rc2NhcGUub3JnLykgLS0+Cjxzdmcgd2lkdGg9IjEw' -HTML += b'MG1tIiBoZWlnaHQ9IjEwMG1tIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAg' -HTML += b'MCAxMDAgMTAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmci' -HTML += b'IHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4K' -HTML += b'IDxkZWZzPgogIDxsaW5lYXJHcmFkaWVudCBpZD0ibGluZWFyR3JhZGllbnQz' -HTML += b'NjU4IiB4MT0iMjguNTI3IiB4Mj0iMTI4LjUzIiB5MT0iNzkuNjQ4IiB5Mj0i' -HTML += b'NzkuNjQ4IiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDEuMDE2MSAwIDAg' -HTML += b'MS4wMTYxIC0yOS43OSAtMzAuOTI4KSIgZ3JhZGllbnRVbml0cz0idXNlclNw' -HTML += b'YWNlT25Vc2UiPgogICA8c3RvcCBzdG9wLWNvbG9yPSIjNTkwMDVlIiBvZmZz' -HTML += b'ZXQ9IjAiLz4KICAgPHN0b3Agc3RvcC1jb2xvcj0iI2FkMDA3ZiIgb2Zmc2V0' -HTML += b'PSIxIi8+CiAgPC9saW5lYXJHcmFkaWVudD4KIDwvZGVmcz4KIDxyZWN0IHdp' -HTML += b'ZHRoPSIxMDAiIGhlaWdodD0iMTAwIiByeT0iMCIgZmlsbD0idXJsKCNsaW5l' -HTML += b'YXJHcmFkaWVudDM2NTgpIi8+CiA8ZyBmaWxsPSIjZmZmIj4KICA8ZyB0cmFu' -HTML += b'c2Zvcm09Im1hdHJpeCguNDA3NDMgMCAwIC40MDc0MyAtNDIuODQyIC0zNi4x' -HTML += b'MzYpIiBzdHJva2Utd2lkdGg9IjMuNzc5NSIgc3R5bGU9InNoYXBlLWluc2lk' -HTML += b'ZTp1cmwoI3JlY3Q5NTItNyk7c2hhcGUtcGFkZGluZzo2LjUzMTQ0O3doaXRl' -HTML += b'LXNwYWNlOnByZSIgYXJpYS1sYWJlbD0iU0VMTCI+CiAgIDxwYXRoIGQ9Im0x' -HTML += b'NzEuMDEgMjM4LjM5cS0yLjExMi0yLjY4OC01LjU2OC00LjIyNC0zLjM2LTEu' -HTML += b'NjMyLTYuNTI4LTEuNjMyLTEuNjMyIDAtMy4zNiAwLjI4OC0xLjYzMiAwLjI4' -HTML += b'OC0yLjk3NiAxLjE1Mi0xLjM0NCAwLjc2OC0yLjMwNCAyLjExMi0wLjg2NCAx' -HTML += b'LjI0OC0wLjg2NCAzLjI2NCAwIDEuNzI4IDAuNjcyIDIuODggMC43NjggMS4x' -HTML += b'NTIgMi4xMTIgMi4wMTYgMS40NCAwLjg2NCAzLjM2IDEuNjMyIDEuOTIgMC42' -HTML += b'NzIgNC4zMiAxLjQ0IDMuNDU2IDEuMTUyIDcuMiAyLjU5MiAzLjc0NCAxLjM0' -HTML += b'NCA2LjgxNiAzLjY0OHQ1LjA4OCA1Ljc2cTIuMDE2IDMuMzYgMi4wMTYgOC40' -HTML += b'NDggMCA1Ljg1Ni0yLjIwOCAxMC4xNzYtMi4xMTIgNC4yMjQtNS43NiA3LjAw' -HTML += b'OHQtOC4zNTIgNC4xMjgtOS42OTYgMS4zNDRxLTcuMjk2IDAtMTQuMTEyLTIu' -HTML += b'NDk2LTYuODE2LTIuNTkyLTExLjMyOC03LjI5NmwxMC43NTItMTAuOTQ0cTIu' -HTML += b'NDk2IDMuMDcyIDYuNTI4IDUuMTg0IDQuMTI4IDIuMDE2IDguMTYgMi4wMTYg' -HTML += b'MS44MjQgMCAzLjU1Mi0wLjM4NHQyLjk3Ni0xLjI0OHExLjM0NC0wLjg2NCAy' -HTML += b'LjExMi0yLjMwNHQwLjc2OC0zLjQ1NnEwLTEuOTItMC45Ni0zLjI2NHQtMi43' -HTML += b'ODQtMi40cS0xLjcyOC0xLjE1Mi00LjQxNi0yLjAxNi0yLjU5Mi0wLjk2LTUu' -HTML += b'OTUyLTIuMDE2LTMuMjY0LTEuMDU2LTYuNDMyLTIuNDk2LTMuMDcyLTEuNDQt' -HTML += b'NS41NjgtMy42NDgtMi40LTIuMzA0LTMuOTM2LTUuNDcyLTEuNDQtMy4yNjQt' -HTML += b'MS40NC03Ljg3MiAwLTUuNjY0IDIuMzA0LTkuNjk2dDYuMDQ4LTYuNjI0IDgu' -HTML += b'NDQ4LTMuNzQ0cTQuNzA0LTEuMjQ4IDkuNTA0LTEuMjQ4IDUuNzYgMCAxMS43' -HTML += b'MTIgMi4xMTIgNi4wNDggMi4xMTIgMTAuNTYgNi4yNHoiLz4KICAgPHBhdGgg' -HTML += b'ZD0ibTE5MS44NCAyODguN3YtNjcuOTY4aDUyLjE5bC0xLjI5ODggMTMuOTJo' -HTML += b'LTM1LjA1MXYxMi43NjhoMzMuNDE5bC0xLjI5ODggMTMuMTUyaC0zMi4xMnYx' -HTML += b'NC4xMTJoMzEuNTg0bC0xLjI5ODggMTQuMDE2eiIvPgogIDwvZz4KICA8ZyB0' -HTML += b'cmFuc2Zvcm09Im1hdHJpeCguNDA3NDMgMCAwIC40MDc0MyAtNDAuMTY4IC03' -HTML += b'OC4wODIpIiBzdHJva2Utd2lkdGg9IjMuNzc5NSIgc3R5bGU9InNoYXBlLWlu' -HTML += b'c2lkZTp1cmwoI3JlY3Q5NTItOS05KTtzaGFwZS1wYWRkaW5nOjYuNTMxNDQ7' -HTML += b'd2hpdGUtc3BhY2U6cHJlIiBhcmlhLWxhYmVsPSJweSI+CiAgIDxwYXRoIGQ9' -HTML += b'Im0xODcuNDMgMjY0LjZxMCA0Ljk5Mi0xLjUzNiA5LjZ0LTQuNTEyIDguMTZx' -HTML += b'LTIuODggMy40NTYtNy4xMDQgNS41Njh0LTkuNiAyLjExMnEtNC40MTYgMC04' -HTML += b'LjM1Mi0xLjcyOC0zLjkzNi0xLjgyNC02LjE0NC00Ljg5NmgtMC4xOTJ2Mjgu' -HTML += b'MzJoLTE1Ljc0NHYtNzAuODQ4aDE0Ljk3NnY1Ljg1NmgwLjI4OHEyLjIwOC0y' -HTML += b'Ljg4IDYuMDQ4LTQuOTkyIDMuOTM2LTIuMjA4IDkuMjE2LTIuMjA4IDUuMTg0' -HTML += b'IDAgOS40MDggMi4wMTZ0Ny4xMDQgNS40NzJxMi45NzYgMy40NTYgNC41MTIg' -HTML += b'OC4wNjQgMS42MzIgNC41MTIgMS42MzIgOS41MDR6bS0xNS4yNjQgMHEwLTIu' -HTML += b'MzA0LTAuNzY4LTQuNTEyLTAuNjcyLTIuMjA4LTIuMTEyLTMuODQtMS4zNDQt' -HTML += b'MS43MjgtMy40NTYtMi43ODR0LTQuODk2LTEuMDU2cS0yLjY4OCAwLTQuOCAx' -HTML += b'LjA1NnQtMy42NDggMi43ODRxLTEuNDQgMS43MjgtMi4zMDQgMy45MzYtMC43' -HTML += b'NjggMi4yMDgtMC43NjggNC41MTJ0MC43NjggNC41MTJxMC44NjQgMi4yMDgg' -HTML += b'Mi4zMDQgMy45MzYgMS41MzYgMS43MjggMy42NDggMi43ODR0NC44IDEuMDU2' -HTML += b'cTIuNzg0IDAgNC44OTYtMS4wNTZ0My40NTYtMi43ODRxMS40NC0xLjcyOCAy' -HTML += b'LjExMi0zLjkzNiAwLjc2OC0yLjMwNCAwLjc2OC00LjYwOHoiLz4KICAgPHBh' -HTML += b'dGggZD0ibTIyNC4yOSAyOTUuOXEtMS40NCAzLjc0NC0zLjI2NCA2LjYyNC0x' -HTML += b'LjcyOCAyLjk3Ni00LjIyNCA0Ljk5Mi0yLjQgMi4xMTItNS43NiAzLjE2OC0z' -HTML += b'LjI2NCAxLjA1Ni03Ljc3NiAxLjA1Ni0yLjIwOCAwLTQuNjA4LTAuMjg4LTIu' -HTML += b'MzA0LTAuMjg4LTQuMDMyLTAuNzY4bDEuNzI4LTEzLjI0OHExLjE1MiAwLjM4' -HTML += b'NCAyLjQ5NiAwLjU3NiAxLjQ0IDAuMjg4IDIuNTkyIDAuMjg4IDMuNjQ4IDAg' -HTML += b'NS4yOC0xLjcyOCAxLjYzMi0xLjYzMiAyLjc4NC00LjcwNGwxLjUzNi0zLjkz' -HTML += b'Ni0xOS45NjgtNDcuMDRoMTcuNDcybDEwLjY1NiAzMC43MmgwLjI4OGw5LjUw' -HTML += b'NC0zMC43MmgxNi43MDR6Ii8+CiAgPC9nPgogIDxwYXRoIGQ9Im02OC4wOTYg' -HTML += b'MTUuNzc1aDcuODAyOWwtOC45ODU0IDY5Ljc5MWgtNy44MDN6IiBzdHJva2Ut' -HTML += b'd2lkdGg9IjEuMTE3NiIvPgogIDxwYXRoIGQ9Im04My44NTMgMTUuNzQ4aDcu' -HTML += b'ODAzbC04Ljk4NTQgNjkuNzkxaC03LjgwM3oiIHN0cm9rZS13aWR0aD0iMS4x' -HTML += b'MTc2Ii8+CiA8L2c+Cjwvc3ZnPgo=" /> </span> <span id="data-poli' -HTML += b'cy"></span> </div> </div> <script>let debug = false; let qu' -HTML += b'izSrc = {};var pysell=(()=>{var A=Object.defineProperty;var ' -HTML += b'pe=Object.getOwnPropertyDescriptor;var ue=Object.getOwnPrope' -HTML += b'rtyNames;var de=Object.prototype.hasOwnProperty;var f=(r,e)=' -HTML += b'>A(r,"name",{value:e,configurable:!0});var me=(r,e)=>{for(va' -HTML += b'r t in e)A(r,t,{get:e[t],enumerable:!0})},fe=(r,e,t,s)=>{if(' -HTML += b'e&&typeof e=="object"||typeof e=="function")for(let i of ue(' -HTML += b'e))!de.call(r,i)&&i!==t&&A(r,i,{get:()=>e[i],enumerable:!(s=' -HTML += b'pe(e,i))||s.enumerable});return r};var ge=r=>fe(A({},"__esMo' -HTML += b'dule",{value:!0}),r);var ke={};me(ke,{Quiz:()=>q,init:()=>be' -HTML += b'});function w(r=[]){let e=document.createElement("div");retu' -HTML += b'rn e.append(...r),e}f(w,"genDiv");function j(r=[]){let e=doc' -HTML += b'ument.createElement("ul");return e.append(...r),e}f(j,"genUl' -HTML += b'");function O(r){let e=document.createElement("li");return e' -HTML += b'.appendChild(r),e}f(O,"genLi");function W(r){let e=document.' -HTML += b'createElement("input");return e.spellcheck=!1,e.type="text",' -HTML += b'e.classList.add("inputField"),e.style.width=r+"px",e}f(W,"ge' -HTML += b'nInputField");function F(){let r=document.createElement("but' -HTML += b'ton");return r.type="button",r.classList.add("button"),r}f(F' -HTML += b',"genButton");function k(r,e=[]){let t=document.createElemen' -HTML += b't("span");return e.length>0?t.append(...e):t.innerHTML=r,t}f' -HTML += b'(k,"genSpan");function Q(r,e,t=!1){katex.render(e,r,{throwOn' -HTML += b'Error:!1,displayMode:t,macros:{"\\\\RR":"\\\\mathbb{R}","\\\\NN":"' -HTML += b'\\\\mathbb{N}","\\\\QQ":"\\\\mathbb{Q}","\\\\ZZ":"\\\\mathbb{Z}","\\\\CC' -HTML += b'":"\\\\mathbb{C}"}})}f(Q,"updateMathElement");function L(r,e=!' -HTML += b'1){let t=document.createElement("span");return Q(t,r,e),t}f(' -HTML += b'L,"genMathSpan");function K(r,e){let t=Array(e.length+1).fil' -HTML += b'l(null).map(()=>Array(r.length+1).fill(null));for(let s=0;s<' -HTML += b'=r.length;s+=1)t[0][s]=s;for(let s=0;s<=e.length;s+=1)t[s][0' -HTML += b']=s;for(let s=1;s<=e.length;s+=1)for(let i=1;i<=r.length;i+=' -HTML += b'1){let l=r[i-1]===e[s-1]?0:1;t[s][i]=Math.min(t[s][i-1]+1,t[' -HTML += b's-1][i]+1,t[s-1][i-1]+l)}return t[e.length][r.length]}f(K,"l' -HTML += b'evenshteinDistance");var Z=\'<svg xmlns="http://www.w3.org/20' -HTML += b'00/svg" height="28" viewBox="0 0 448 512"><path d="M384 80c8' -HTML += b'.8 0 16 7.2 16 16V416c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16' -HTML += b'-16V96c0-8.8 7.2-16 16-16H384zM64 32C28.7 32 0 60.7 0 96V416' -HTML += b'c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.' -HTML += b'7-64-64-64H64z"/></svg>\',X=\'<svg xmlns="http://www.w3.org/20' -HTML += b'00/svg" height="28" viewBox="0 0 448 512"><path d="M64 80c-8' -HTML += b'.8 0-16 7.2-16 16V416c0 8.8 7.2 16 16 16H384c8.8 0 16-7.2 16' -HTML += b'-16V96c0-8.8-7.2-16-16-16H64zM0 96C0 60.7 28.7 32 64 32H384c' -HTML += b'35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-' -HTML += b'28.7-64-64V96zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-' -HTML += b'64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.' -HTML += b'4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/>\',Y=\'<svg xmlns="ht' -HTML += b'tp://www.w3.org/2000/svg" height="28" viewBox="0 0 512 512">' -HTML += b'<path d="M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM' -HTML += b'0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"/></svg>\',G=\'' -HTML += b'<svg xmlns="http://www.w3.org/2000/svg" height="28" viewBox=' -HTML += b'"0 0 512 512"><path d="M256 48a208 208 0 1 1 0 416 208 208 0' -HTML += b' 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM3' -HTML += b'69 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-' -HTML += b'47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 2' -HTML += b'4.6 9.4 33.9 0L369 209z"/></svg>\',P=\'<svg xmlns="http://www.' -HTML += b'w3.org/2000/svg" width="50" height="25" viewBox="0 0 384 512' -HTML += b'" fill="white"><path d="M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 ' -HTML += b'62.6 0 80V432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361' -HTML += b' 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"/></svg>\'' -HTML += b',J=\'<svg xmlns="http://www.w3.org/2000/svg" width="50" heigh' -HTML += b't="25" viewBox="0 0 512 512" fill="white"><path d="M0 224c0 ' -HTML += b'17.7 14.3 32 32 32s32-14.3 32-32c0-53 43-96 96-96H320v32c0 1' -HTML += b'2.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.' -HTML += b'5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9S320 19.1 32' -HTML += b'0 32V64H160C71.6 64 0 135.6 0 224zm512 64c0-17.7-14.3-32-32-' -HTML += b'32s-32 14.3-32 32c0 53-43 96-96 96H192V352c0-12.9-7.8-24.6-1' -HTML += b'9.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45' -HTML += b'.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V448H' -HTML += b'352c88.4 0 160-71.6 160-160z"/></svg>\';var $={en:"This page ' -HTML += b'operates entirely in your browser and does not store any dat' -HTML += b'a on external servers.",de:"Diese Seite wird in Ihrem Browse' -HTML += b'r ausgef\\xFChrt und speichert keine Daten auf Servern.",es:"' -HTML += b'Esta p\\xE1gina se ejecuta en su navegador y no almacena ning' -HTML += b'\\xFAn dato en los servidores.",it:"Questa pagina viene esegu' -HTML += b'ita nel browser e non memorizza alcun dato sui server.",fr:"' -HTML += b'Cette page fonctionne dans votre navigateur et ne stocke auc' -HTML += b'une donn\\xE9e sur des serveurs."},ee={en:"* this page to rec' -HTML += b'eive a new set of randomized tasks.",de:"Sie k\\xF6nnen diese' -HTML += b' Seite *, um neue randomisierte Aufgaben zu erhalten.",es:"P' -HTML += b'uedes * esta p\\xE1gina para obtener nuevas tareas aleatorias' -HTML += b'.",it:"\\xC8 possibile * questa pagina per ottenere nuovi com' -HTML += b'piti randomizzati",fr:"Vous pouvez * cette page pour obtenir' -HTML += b' de nouvelles t\\xE2ches al\\xE9atoires"},te={en:"Refresh",de:' -HTML += b'"aktualisieren",es:"recargar",it:"ricaricare",fr:"recharger"' -HTML += b'},ie={en:["awesome","great","well done","nice","you got it",' -HTML += b'"good"],de:["super","gut gemacht","weiter so","richtig"],es:' -HTML += b'["impresionante","genial","correcto","bien hecho"],it:["fant' -HTML += b'astico","grande","corretto","ben fatto"],fr:["g\\xE9nial","su' -HTML += b'per","correct","bien fait"]},se={en:["please complete all fi' -HTML += b'elds"],de:["bitte alles ausf\\xFCllen"],es:["por favor, relle' -HTML += b'ne todo"],it:["compilare tutto"],fr:["remplis tout s\'il te p' -HTML += b'lait"]},ne={en:["try again","still some mistakes","wrong ans' -HTML += b'wer","no"],de:["leider falsch","nicht richtig","versuch\'s no' -HTML += b'chmal"],es:["int\\xE9ntalo de nuevo","todav\\xEDa algunos erro' -HTML += b'res","respuesta incorrecta"],it:["riprova","ancora qualche e' -HTML += b'rrore","risposta sbagliata"],fr:["r\\xE9essayer","encore des ' -HTML += b'erreurs","mauvaise r\\xE9ponse"]},re={en:"point(s)",de:"Punkt' -HTML += b'(e)",es:"punto(s)",it:"punto/i",fr:"point(s)"},ae={en:"Evalu' -HTML += b'ate now",de:"Jetzt auswerten",es:"Evaluar ahora",it:"Valuta ' -HTML += b'ora",fr:"\\xC9valuer maintenant"},le={en:"Data Policy: This w' -HTML += b'ebsite does not collect, store, or process any personal data' -HTML += b' on external servers. All functionality is executed locally ' -HTML += b'in your browser, ensuring complete privacy. No cookies are u' -HTML += b'sed, and no data is transmitted to or from the server. Your ' -HTML += b'activity on this site remains entirely private and local to ' -HTML += b'your device.",de:"Datenschutzrichtlinie: Diese Website samme' -HTML += b'lt, speichert oder verarbeitet keine personenbezogenen Daten' -HTML += b' auf externen Servern. Alle Funktionen werden lokal in Ihrem' -HTML += b' Browser ausgef\\xFChrt, um vollst\\xE4ndige Privatsph\\xE4re z' -HTML += b'u gew\\xE4hrleisten. Es werden keine Cookies verwendet, und e' -HTML += b's werden keine Daten an den Server gesendet oder von diesem ' -HTML += b'empfangen. Ihre Aktivit\\xE4t auf dieser Seite bleibt vollst\\' -HTML += b'xE4ndig privat und lokal auf Ihrem Ger\\xE4t.",es:"Pol\\xEDtic' -HTML += b'a de datos: Este sitio web no recopila, almacena ni procesa ' -HTML += b'ning\\xFAn dato personal en servidores externos. Toda la func' -HTML += b'ionalidad se ejecuta localmente en su navegador, garantizand' -HTML += b'o una privacidad completa. No se utilizan cookies y no se tr' -HTML += b'ansmiten datos hacia o desde el servidor. Su actividad en es' -HTML += b'te sitio permanece completamente privada y local en su dispo' -HTML += b'sitivo.",it:"Politica sui dati: Questo sito web non raccogli' -HTML += b'e, memorizza o elabora alcun dato personale su server estern' -HTML += b'i. Tutte le funzionalit\\xE0 vengono eseguite localmente nel ' -HTML += b'tuo browser, garantendo una privacy completa. Non vengono ut' -HTML += b'ilizzati cookie e nessun dato viene trasmesso da o verso il ' -HTML += b'server. La tua attivit\\xE0 su questo sito rimane completamen' -HTML += b'te privata e locale sul tuo dispositivo.",fr:"Politique de c' -HTML += b'onfidentialit\\xE9: Ce site web ne collecte, ne stocke ni ne ' -HTML += b'traite aucune donn\\xE9e personnelle sur des serveurs externe' -HTML += b's. Toutes les fonctionnalit\\xE9s sont ex\\xE9cut\\xE9es locale' -HTML += b'ment dans votre navigateur, garantissant une confidentialit\\' -HTML += b'xE9 totale. Aucun cookie n\\u2019est utilis\\xE9 et aucune don' -HTML += b'n\\xE9e n\\u2019est transmise vers ou depuis le serveur. Votre' -HTML += b' activit\\xE9 sur ce site reste enti\\xE8rement priv\\xE9e et l' -HTML += b'ocale sur votre appareil."},oe={en:"You have a limited time ' -HTML += b'to complete this quiz. The countdown, displayed in minutes, ' -HTML += b"is visible at the top-left of the screen. When you're ready " -HTML += b'to begin, simply press the Start button.",de:"Die Zeit f\\xFC' -HTML += b'r dieses Quiz ist begrenzt. Der Countdown, in Minuten angeze' -HTML += b'igt, l\\xE4uft oben links auf dem Bildschirm. Mit dem Start-B' -HTML += b'utton beginnt das Quiz.",es:"Tienes un tiempo limitado para ' -HTML += b'completar este cuestionario. La cuenta regresiva, mostrada e' -HTML += b'n minutos, se encuentra en la parte superior izquierda de la' -HTML += b' pantalla. Cuando est\\xE9s listo, simplemente presiona el bo' -HTML += b't\\xF3n de inicio.",it:"Hai un tempo limitato per completare ' -HTML += b'questo quiz. Il conto alla rovescia, visualizzato in minuti,' -HTML += b' \\xE8 visibile in alto a sinistra dello schermo. Quando sei ' -HTML += b'pronto, premi semplicemente il pulsante Start.",fr:"Vous dis' -HTML += b'posez d\\u2019un temps limit\\xE9 pour compl\\xE9ter ce quiz. L' -HTML += b'e compte \\xE0 rebours, affich\\xE9 en minutes, est visible en' -HTML += b' haut \\xE0 gauche de l\\u2019\\xE9cran. Lorsque vous \\xEAtes p' -HTML += b'r\\xEAt, appuyez simplement sur le bouton D\\xE9marrer."};func' -HTML += b'tion z(r,e=!1){let t=new Array(r);for(let s=0;s<r;s++)t[s]=s' -HTML += b';if(e)for(let s=0;s<r;s++){let i=Math.floor(Math.random()*r)' -HTML += b',l=Math.floor(Math.random()*r),o=t[i];t[i]=t[l],t[l]=o}retur' -HTML += b'n t}f(z,"range");function N(r,e,t=-1){if(t<0&&(t=r.length),t' -HTML += b'==1){e.push([...r]);return}for(let s=0;s<t;s++){N(r,e,t-1);l' -HTML += b'et i=t%2==0?s:0,l=r[i];r[i]=r[t-1],r[t-1]=l}}f(N,"heapsAlgor' -HTML += b'ithm");var E=class r{static{f(this,"Matrix")}constructor(e,t' -HTML += b'){this.m=e,this.n=t,this.v=new Array(e*t).fill("0")}getEleme' -HTML += b'nt(e,t){return e<0||e>=this.m||t<0||t>=this.n?"":this.v[e*th' -HTML += b'is.n+t]}resize(e,t,s){if(e<1||e>50||t<1||t>50)return!1;let i' -HTML += b'=new r(e,t);i.v.fill(s);for(let l=0;l<i.m;l++)for(let o=0;o<' -HTML += b'i.n;o++)i.v[l*i.n+o]=this.getElement(l,o);return this.fromMa' -HTML += b'trix(i),!0}fromMatrix(e){this.m=e.m,this.n=e.n,this.v=[...e.' -HTML += b'v]}fromString(e){this.m=e.split("],").length,this.v=e.replac' -HTML += b'eAll("[","").replaceAll("]","").split(",").map(t=>t.trim()),' -HTML += b'this.n=this.v.length/this.m}getMaxCellStrlen(){let e=0;for(l' -HTML += b'et t of this.v)t.length>e&&(e=t.length);return e}toTeXString' -HTML += b'(e=!1,t=!0){let s="";t?s+=e?"\\\\left[\\\\begin{array}":"\\\\begin' -HTML += b'{bmatrix}":s+=e?"\\\\left(\\\\begin{array}":"\\\\begin{pmatrix}",e' -HTML += b'&&(s+="{"+"c".repeat(this.n-1)+"|c}");for(let i=0;i<this.m;i' -HTML += b'++){for(let l=0;l<this.n;l++){l>0&&(s+="&");let o=this.getEl' -HTML += b'ement(i,l);try{o=b.parse(o).toTexString()}catch{}s+=o}s+="\\\\' -HTML += b'\\\\"}return t?s+=e?"\\\\end{array}\\\\right]":"\\\\end{bmatrix}":s+' -HTML += b'=e?"\\\\end{array}\\\\right)":"\\\\end{pmatrix}",s}},b=class r{sta' -HTML += b'tic{f(this,"Term")}constructor(){this.root=null,this.src="",' -HTML += b'this.token="",this.skippedWhiteSpace=!1,this.pos=0}clone(){l' -HTML += b'et e=new r;return e.root=this.root.clone(),e}getVars(e,t="",' -HTML += b's=null){if(s==null&&(s=this.root),s.op.startsWith("var:")){l' -HTML += b'et i=s.op.substring(4);(t.length==0||t.length>0&&i.startsWit' -HTML += b'h(t))&&e.add(i)}for(let i of s.c)this.getVars(e,t,i)}setVars' -HTML += b'(e,t=null){t==null&&(t=this.root);for(let s of t.c)this.setV' -HTML += b'ars(e,s);if(t.op.startsWith("var:")){let s=t.op.substring(4)' -HTML += b';if(s in e){let i=e[s].clone();t.op=i.op,t.c=i.c,t.re=i.re,t' -HTML += b'.im=i.im}}}renameVar(e,t,s=null){s==null&&(s=this.root);for(' -HTML += b'let i of s.c)this.renameVar(e,t,i);s.op.startsWith("var:")&&' -HTML += b's.op.substring(4)===e&&(s.op="var:"+t)}eval(e,t=null){let i=' -HTML += b'a.const(),l=0,o=0,c=null;switch(t==null&&(t=this.root),t.op)' -HTML += b'{case"const":i=t;break;case"+":case"-":case"*":case"/":case"' -HTML += b'^":{let n=this.eval(e,t.c[0]),h=this.eval(e,t.c[1]);switch(t' -HTML += b'.op){case"+":i.re=n.re+h.re,i.im=n.im+h.im;break;case"-":i.r' -HTML += b'e=n.re-h.re,i.im=n.im-h.im;break;case"*":i.re=n.re*h.re-n.im' -HTML += b'*h.im,i.im=n.re*h.im+n.im*h.re;break;case"/":l=h.re*h.re+h.i' -HTML += b'm*h.im,i.re=(n.re*h.re+n.im*h.im)/l,i.im=(n.im*h.re-n.re*h.i' -HTML += b'm)/l;break;case"^":c=new a("exp",[new a("*",[h,new a("ln",[n' -HTML += b'])])]),i=this.eval(e,c);break}break}case".-":case"abs":case"' -HTML += b'acos":case"acosh":case"asin":case"asinh":case"atan":case"ata' -HTML += b'nh":case"ceil":case"cos":case"cosh":case"cot":case"exp":case' -HTML += b'"floor":case"ln":case"log":case"log10":case"log2":case"round' -HTML += b'":case"sin":case"sinc":case"sinh":case"sqrt":case"tan":case"' -HTML += b'tanh":{let n=this.eval(e,t.c[0]);switch(t.op){case".-":i.re=' -HTML += b'-n.re,i.im=-n.im;break;case"abs":i.re=Math.sqrt(n.re*n.re+n.' -HTML += b'im*n.im),i.im=0;break;case"acos":c=new a("*",[a.const(0,-1),' -HTML += b'new a("ln",[new a("+",[a.const(0,1),new a("sqrt",[new a("-",' -HTML += b'[a.const(1,0),new a("*",[n,n])])])])])]),i=this.eval(e,c);br' -HTML += b'eak;case"acosh":c=new a("*",[n,new a("sqrt",[new a("-",[new ' -HTML += b'a("*",[n,n]),a.const(1,0)])])]),i=this.eval(e,c);break;case"' -HTML += b'asin":c=new a("*",[a.const(0,-1),new a("ln",[new a("+",[new ' -HTML += b'a("*",[a.const(0,1),n]),new a("sqrt",[new a("-",[a.const(1,0' -HTML += b'),new a("*",[n,n])])])])])]),i=this.eval(e,c);break;case"asi' -HTML += b'nh":c=new a("*",[n,new a("sqrt",[new a("+",[new a("*",[n,n])' -HTML += b',a.const(1,0)])])]),i=this.eval(e,c);break;case"atan":c=new ' -HTML += b'a("*",[a.const(0,.5),new a("ln",[new a("/",[new a("-",[a.con' -HTML += b'st(0,1),new a("*",[a.const(0,1),n])]),new a("+",[a.const(0,1' -HTML += b'),new a("*",[a.const(0,1),n])])])])]),i=this.eval(e,c);break' -HTML += b';case"atanh":c=new a("*",[a.const(.5,0),new a("ln",[new a("/' -HTML += b'",[new a("+",[a.const(1,0),n]),new a("-",[a.const(1,0),n])])' -HTML += b'])]),i=this.eval(e,c);break;case"ceil":i.re=Math.ceil(n.re),' -HTML += b'i.im=Math.ceil(n.im);break;case"cos":i.re=Math.cos(n.re)*Mat' -HTML += b'h.cosh(n.im),i.im=-Math.sin(n.re)*Math.sinh(n.im);break;case' -HTML += b'"cosh":c=new a("*",[a.const(.5,0),new a("+",[new a("exp",[n]' -HTML += b'),new a("exp",[new a(".-",[n])])])]),i=this.eval(e,c);break;' -HTML += b'case"cot":l=Math.sin(n.re)*Math.sin(n.re)+Math.sinh(n.im)*Ma' -HTML += b'th.sinh(n.im),i.re=Math.sin(n.re)*Math.cos(n.re)/l,i.im=-(Ma' -HTML += b'th.sinh(n.im)*Math.cosh(n.im))/l;break;case"exp":i.re=Math.e' -HTML += b'xp(n.re)*Math.cos(n.im),i.im=Math.exp(n.re)*Math.sin(n.im);b' -HTML += b'reak;case"floor":i.re=Math.floor(n.re),i.im=Math.floor(n.im)' -HTML += b';break;case"ln":case"log":i.re=Math.log(Math.sqrt(n.re*n.re+' -HTML += b'n.im*n.im)),l=Math.abs(n.im)<1e-9?0:n.im,i.im=Math.atan2(l,n' -HTML += b'.re);break;case"log10":c=new a("/",[new a("ln",[n]),new a("l' -HTML += b'n",[a.const(10)])]),i=this.eval(e,c);break;case"log2":c=new ' -HTML += b'a("/",[new a("ln",[n]),new a("ln",[a.const(2)])]),i=this.eva' -HTML += b'l(e,c);break;case"round":i.re=Math.round(n.re),i.im=Math.rou' -HTML += b'nd(n.im);break;case"sin":i.re=Math.sin(n.re)*Math.cosh(n.im)' -HTML += b',i.im=Math.cos(n.re)*Math.sinh(n.im);break;case"sinc":c=new ' -HTML += b'a("/",[new a("sin",[n]),n]),i=this.eval(e,c);break;case"sinh' -HTML += b'":c=new a("*",[a.const(.5,0),new a("-",[new a("exp",[n]),new' -HTML += b' a("exp",[new a(".-",[n])])])]),i=this.eval(e,c);break;case"' -HTML += b'sqrt":c=new a("^",[n,a.const(.5)]),i=this.eval(e,c);break;ca' -HTML += b'se"tan":l=Math.cos(n.re)*Math.cos(n.re)+Math.sinh(n.im)*Math' -HTML += b'.sinh(n.im),i.re=Math.sin(n.re)*Math.cos(n.re)/l,i.im=Math.s' -HTML += b'inh(n.im)*Math.cosh(n.im)/l;break;case"tanh":c=new a("/",[ne' -HTML += b'w a("-",[new a("exp",[n]),new a("exp",[new a(".-",[n])])]),n' -HTML += b'ew a("+",[new a("exp",[n]),new a("exp",[new a(".-",[n])])])]' -HTML += b'),i=this.eval(e,c);break}break}default:if(t.op.startsWith("v' -HTML += b'ar:")){let n=t.op.substring(4);if(n==="pi")return a.const(Ma' -HTML += b'th.PI);if(n==="e")return a.const(Math.E);if(n==="i")return a' -HTML += b'.const(0,1);if(n==="true")return a.const(1);if(n==="false")r' -HTML += b'eturn a.const(0);if(n in e)return e[n];throw new Error("eval' -HTML += b'-error: unknown variable \'"+n+"\'")}else throw new Error("UNI' -HTML += b'MPLEMENTED eval \'"+t.op+"\'")}return i}static parse(e){let t=' -HTML += b'new r;if(t.src=e,t.token="",t.skippedWhiteSpace=!1,t.pos=0,t' -HTML += b'.next(),t.root=t.parseExpr(!1),t.token!=="")throw new Error(' -HTML += b'"remaining tokens: "+t.token+"...");return t}parseExpr(e){re' -HTML += b'turn this.parseAdd(e)}parseAdd(e){let t=this.parseMul(e);for' -HTML += b'(;["+","-"].includes(this.token)&&!(e&&this.skippedWhiteSpac' -HTML += b'e);){let s=this.token;this.next(),t=new a(s,[t,this.parseMul' -HTML += b'(e)])}return t}parseMul(e){let t=this.parsePow(e);for(;!(e&&' -HTML += b'this.skippedWhiteSpace);){let s="*";if(["*","/"].includes(th' -HTML += b'is.token))s=this.token,this.next();else if(!e&&this.token===' -HTML += b'"(")s="*";else if(this.token.length>0&&(this.isAlpha(this.to' -HTML += b'ken[0])||this.isNum(this.token[0])))s="*";else break;t=new a' -HTML += b'(s,[t,this.parsePow(e)])}return t}parsePow(e){let t=this.par' -HTML += b'seUnary(e);for(;["^"].includes(this.token)&&!(e&&this.skippe' -HTML += b'dWhiteSpace);){let s=this.token;this.next(),t=new a(s,[t,thi' -HTML += b's.parseUnary(e)])}return t}parseUnary(e){return this.token==' -HTML += b'="-"?(this.next(),new a(".-",[this.parseMul(e)])):this.parse' -HTML += b'Infix(e)}parseInfix(e){if(this.token.length==0)throw new Err' -HTML += b'or("expected unary");if(this.isNum(this.token[0])){let t=thi' -HTML += b's.token;return this.next(),this.token==="."&&(t+=".",this.ne' -HTML += b'xt(),this.token.length>0&&(t+=this.token,this.next())),new a' -HTML += b'("const",[],parseFloat(t))}else if(this.fun1().length>0){let' -HTML += b' t=this.fun1();this.next(t.length);let s=null;if(this.token=' -HTML += b'=="(")if(this.next(),s=this.parseExpr(e),this.token+="",this' -HTML += b'.token===")")this.next();else throw Error("expected \')\'");el' -HTML += b'se s=this.parseMul(!0);return new a(t,[s])}else if(this.toke' -HTML += b'n==="("){this.next();let t=this.parseExpr(e);if(this.token+=' -HTML += b'"",this.token===")")this.next();else throw Error("expected \'' -HTML += b')\'");return t.explicitParentheses=!0,t}else if(this.token===' -HTML += b'"|"){this.next();let t=this.parseExpr(e);if(this.token+="",t' -HTML += b'his.token==="|")this.next();else throw Error("expected \'|\'")' -HTML += b';return new a("abs",[t])}else if(this.isAlpha(this.token[0])' -HTML += b'){let t="";return this.token.startsWith("pi")?t="pi":this.to' -HTML += b'ken.startsWith("true")?t="true":this.token.startsWith("false' -HTML += b'")?t="false":this.token.startsWith("C1")?t="C1":this.token.s' -HTML += b'tartsWith("C2")?t="C2":t=this.token[0],t==="I"&&(t="i"),this' -HTML += b'.next(t.length),new a("var:"+t,[])}else throw new Error("exp' -HTML += b'ected unary")}static compare(e,t,s={}){let o=new Set;e.getVa' -HTML += b'rs(o),t.getVars(o);for(let c=0;c<10;c++){let n={};for(let g ' -HTML += b'of o)g in s?n[g]=s[g]:n[g]=a.const(Math.random(),Math.random' -HTML += b'());let h=e.eval(n),p=t.eval(n),m=h.re-p.re,d=h.im-p.im;if(M' -HTML += b'ath.sqrt(m*m+d*d)>1e-9)return!1}return!0}fun1(){let e=["abs"' -HTML += b',"acos","acosh","asin","asinh","atan","atanh","ceil","cos","' -HTML += b'cosh","cot","exp","floor","ln","log","log10","log2","round",' -HTML += b'"sin","sinc","sinh","sqrt","tan","tanh"];for(let t of e)if(t' -HTML += b'his.token.toLowerCase().startsWith(t))return t;return""}next' -HTML += b'(e=-1){if(e>0&&this.token.length>e){this.token=this.token.su' -HTML += b'bstring(e),this.skippedWhiteSpace=!1;return}this.token="";le' -HTML += b't t=!1,s=this.src.length;for(this.skippedWhiteSpace=!1;this.' -HTML += b'pos<s&&`\t\n `.includes(this.src[this.pos]);)this.skippedWhite' -HTML += b'Space=!0,this.pos++;for(;!t&&this.pos<s;){let i=this.src[thi' -HTML += b's.pos];if(this.token.length>0&&(this.isNum(this.token[0])&&t' -HTML += b'his.isAlpha(i)||this.isAlpha(this.token[0])&&this.isNum(i))&' -HTML += b'&this.token!="C")return;if(`^%#*$()[]{},.:;+-*/_!<>=?|\t\n `.i' -HTML += b'ncludes(i)){if(this.token.length>0)return;t=!0}`\t\n `.include' -HTML += b's(i)==!1&&(this.token+=i),this.pos++}}isNum(e){return e.char' -HTML += b'CodeAt(0)>=48&&e.charCodeAt(0)<=57}isAlpha(e){return e.charC' -HTML += b'odeAt(0)>=65&&e.charCodeAt(0)<=90||e.charCodeAt(0)>=97&&e.ch' -HTML += b'arCodeAt(0)<=122||e==="_"}toString(){return this.root==null?' -HTML += b'"":this.root.toString()}toTexString(){return this.root==null' -HTML += b'?"":this.root.toTexString()}},a=class r{static{f(this,"TermN' -HTML += b'ode")}constructor(e,t,s=0,i=0){this.op=e,this.c=t,this.re=s,' -HTML += b'this.im=i,this.explicitParentheses=!1}clone(){let e=new r(th' -HTML += b'is.op,this.c.map(t=>t.clone()),this.re,this.im);return e.exp' -HTML += b'licitParentheses=this.explicitParentheses,e}static const(e=0' -HTML += b',t=0){return new r("const",[],e,t)}compare(e,t=0,s=1e-9){let' -HTML += b' i=this.re-e,l=this.im-t;return Math.sqrt(i*i+l*l)<s}toStrin' -HTML += b'g(){let e="";if(this.op==="const"){let t=Math.abs(this.re)>1' -HTML += b'e-14,s=Math.abs(this.im)>1e-14;t&&s&&this.im>=0?e="("+this.r' -HTML += b'e+"+"+this.im+"i)":t&&s&&this.im<0?e="("+this.re+"-"+-this.i' -HTML += b'm+"i)":t&&this.re>0?e=""+this.re:t&&this.re<0?e="("+this.re+' -HTML += b'")":s?e="("+this.im+"i)":e="0"}else this.op.startsWith("var"' -HTML += b')?e=this.op.split(":")[1]:this.c.length==1?e=(this.op===".-"' -HTML += b'?"-":this.op)+"("+this.c.toString()+")":e="("+this.c.map(t=>' -HTML += b't.toString()).join(this.op)+")";return e}toTexString(e=!1){l' -HTML += b'et s="";switch(this.op){case"const":{let i=Math.abs(this.re)' -HTML += b'>1e-9,l=Math.abs(this.im)>1e-9,o=i?""+this.re:"",c=l?""+this' -HTML += b'.im+"i":"";c==="1i"?c="i":c==="-1i"&&(c="-i"),!i&&!l?s="0":(' -HTML += b'l&&this.im>=0&&i&&(c="+"+c),s=o+c);break}case".-":s="-"+this' -HTML += b'.c[0].toTexString();break;case"+":case"-":case"*":case"^":{l' -HTML += b'et i=this.c[0].toTexString(),l=this.c[1].toTexString(),o=thi' -HTML += b's.op==="*"?"\\\\cdot ":this.op;s="{"+i+"}"+o+"{"+l+"}";break}c' -HTML += b'ase"/":{let i=this.c[0].toTexString(!0),l=this.c[1].toTexStr' -HTML += b'ing(!0);s="\\\\frac{"+i+"}{"+l+"}";break}case"floor":{let i=th' -HTML += b'is.c[0].toTexString(!0);s+="\\\\"+this.op+"\\\\left\\\\lfloor"+i+"' -HTML += b'\\\\right\\\\rfloor";break}case"ceil":{let i=this.c[0].toTexStri' -HTML += b'ng(!0);s+="\\\\"+this.op+"\\\\left\\\\lceil"+i+"\\\\right\\\\rceil";br' -HTML += b'eak}case"round":{let i=this.c[0].toTexString(!0);s+="\\\\"+thi' -HTML += b's.op+"\\\\left["+i+"\\\\right]";break}case"acos":case"acosh":cas' -HTML += b'e"asin":case"asinh":case"atan":case"atanh":case"cos":case"co' -HTML += b'sh":case"cot":case"exp":case"ln":case"log":case"log10":case"' -HTML += b'log2":case"sin":case"sinc":case"sinh":case"tan":case"tanh":{' -HTML += b'let i=this.c[0].toTexString(!0);s+="\\\\"+this.op+"\\\\left("+i+' -HTML += b'"\\\\right)";break}case"sqrt":{let i=this.c[0].toTexString(!0)' -HTML += b';s+="\\\\"+this.op+"{"+i+"}";break}case"abs":{let i=this.c[0].' -HTML += b'toTexString(!0);s+="\\\\left|"+i+"\\\\right|";break}default:if(t' -HTML += b'his.op.startsWith("var:")){let i=this.op.substring(4);switch' -HTML += b'(i){case"pi":i="\\\\pi";break}s=" "+i+" "}else{let i="warning:' -HTML += b' Node.toString(..):";i+=" unimplemented operator \'"+this.op+' -HTML += b'"\'",console.log(i),s=this.op,this.c.length>0&&(s+="\\\\left({"' -HTML += b'+this.c.map(l=>l.toTexString(!0)).join(",")+"}\\\\right)")}}re' -HTML += b'turn!e&&this.explicitParentheses&&(s="\\\\left({"+s+"}\\\\right)' -HTML += b'"),s}};function ce(r,e){let t=1e-9;if(b.compare(r,e))return!' -HTML += b'0;r=r.clone(),e=e.clone(),_(r.root),_(e.root);let s=new Set;' -HTML += b'r.getVars(s),e.getVars(s);let i=[],l=[];for(let n of s.keys(' -HTML += b'))n.startsWith("C")?i.push(n):l.push(n);let o=i.length;for(l' -HTML += b'et n=0;n<o;n++){let h=i[n];r.renameVar(h,"_C"+n),e.renameVar' -HTML += b'(h,"_C"+n)}for(let n=0;n<o;n++)r.renameVar("_C"+n,"C"+n),e.r' -HTML += b'enameVar("_C"+n,"C"+n);i=[];for(let n=0;n<o;n++)i.push("C"+n' -HTML += b');let c=[];N(z(o),c);for(let n of c){let h=r.clone(),p=e.clo' -HTML += b'ne();for(let d=0;d<o;d++)p.renameVar("C"+d,"__C"+n[d]);for(l' -HTML += b'et d=0;d<o;d++)p.renameVar("__C"+d,"C"+d);let m=!0;for(let d' -HTML += b'=0;d<o;d++){let u="C"+d,g={};g[u]=new a("*",[new a("var:C"+d' -HTML += b',[]),new a("var:K",[])]),p.setVars(g);let v={};v[u]=a.const(' -HTML += b'Math.random(),Math.random());for(let y=0;y<o;y++)d!=y&&(v["C' -HTML += b'"+y]=a.const(0,0));let M=new a("abs",[new a("-",[h.root,p.ro' -HTML += b'ot])]),S=new b;S.root=M;for(let y of l)v[y]=a.const(Math.ran' -HTML += b'dom(),Math.random());let C=ve(S,"K",v)[0];p.setVars({K:a.con' -HTML += b'st(C,0)}),v={};for(let y=0;y<o;y++)d!=y&&(v["C"+y]=a.const(0' -HTML += b',0));if(b.compare(h,p,v)==!1){m=!1;break}}if(m&&b.compare(h,' -HTML += b'p))return!0}return!1}f(ce,"compareODE");function ve(r,e,t){l' -HTML += b'et s=1e-11,i=1e3,l=0,o=0,c=1,n=888;for(;l<i;){t[e]=a.const(o' -HTML += b');let p=r.eval(t).re;t[e]=a.const(o+c);let m=r.eval(t).re;t[' -HTML += b'e]=a.const(o-c);let d=r.eval(t).re,u=0;if(m<p&&(p=m,u=1),d<p' -HTML += b'&&(p=d,u=-1),u==1&&(o+=c),u==-1&&(o-=c),p<s)break;(u==0||u!=' -HTML += b'n)&&(c/=2),n=u,l++}t[e]=a.const(o);let h=r.eval(t).re;return' -HTML += b'[o,h]}f(ve,"minimize");function _(r){for(let e of r.c)_(e);s' -HTML += b'witch(r.op){case"+":case"-":case"*":case"/":case"^":{let e=[' -HTML += b'r.c[0].op,r.c[1].op],t=[e[0]==="const",e[1]==="const"],s=[e[' -HTML += b'0].startsWith("var:C"),e[1].startsWith("var:C")];s[0]&&t[1]?' -HTML += b'(r.op=r.c[0].op,r.c=[]):s[1]&&t[0]?(r.op=r.c[1].op,r.c=[]):s' -HTML += b'[0]&&s[1]&&e[0]==e[1]&&(r.op=r.c[0].op,r.c=[]);break}case".-' -HTML += b'":case"abs":case"sin":case"sinc":case"cos":case"tan":case"co' -HTML += b't":case"exp":case"ln":case"log":case"sqrt":r.c[0].op.startsW' -HTML += b'ith("var:C")&&(r.op=r.c[0].op,r.c=[]);break}}f(_,"prepareODE' -HTML += b'constantComparison");var B=class{static{f(this,"GapInput")}c' -HTML += b'onstructor(e,t,s,i){this.question=t,this.inputId=s,s.length=' -HTML += b'=0&&(this.inputId=s="gap-"+t.gapIdx,t.types[this.inputId]="s' -HTML += b'tring",t.expected[this.inputId]=i,t.gapIdx++),s in t.student' -HTML += b'||(t.student[s]="");let l=i.split("|"),o=0;for(let p=0;p<l.l' -HTML += b'ength;p++){let m=l[p];m.length>o&&(o=m.length)}let c=k("");e' -HTML += b'.appendChild(c);let n=Math.max(o*15,24),h=W(n);if(t.gapInput' -HTML += b's[this.inputId]=h,h.addEventListener("keyup",()=>{t.editingE' -HTML += b'nabled!=!1&&(this.question.editedQuestion(),h.value=h.value.' -HTML += b'toUpperCase(),this.question.student[this.inputId]=h.value.tr' -HTML += b'im())}),c.appendChild(h),this.question.showSolution&&(this.q' -HTML += b'uestion.student[this.inputId]=h.value=l[0],l.length>1)){let ' -HTML += b'p=k("["+l.join("|")+"]");p.style.fontSize="small",p.style.te' -HTML += b'xtDecoration="underline",c.appendChild(p)}}},I=class{static{' -HTML += b'f(this,"TermInput")}constructor(e,t,s,i,l,o,c=!1){s in t.stu' -HTML += b'dent||(t.student[s]=""),this.question=t,this.inputId=s,this.' -HTML += b'outerSpan=k(""),this.outerSpan.style.position="relative",e.a' -HTML += b'ppendChild(this.outerSpan),this.inputElement=W(Math.max(i*12' -HTML += b',48)),this.outerSpan.appendChild(this.inputElement),this.equ' -HTML += b'ationPreviewDiv=w(),this.equationPreviewDiv.classList.add("e' -HTML += b'quationPreview"),this.equationPreviewDiv.style.display="none' -HTML += b'",this.outerSpan.appendChild(this.equationPreviewDiv),this.i' -HTML += b'nputElement.addEventListener("click",()=>{t.editingEnabled!=' -HTML += b'!1&&(this.question.editedQuestion(),this.edited())}),this.in' -HTML += b'putElement.addEventListener("keyup",()=>{t.editingEnabled!=!' -HTML += b'1&&(this.question.editedQuestion(),this.edited())}),this.inp' -HTML += b'utElement.addEventListener("focus",()=>{t.editingEnabled!=!1' -HTML += b'}),this.inputElement.addEventListener("focusout",()=>{this.e' -HTML += b'quationPreviewDiv.innerHTML="",this.equationPreviewDiv.style' -HTML += b'.display="none"}),this.inputElement.addEventListener("keydow' -HTML += b'n",n=>{if(t.editingEnabled==!1){n.preventDefault();return}le' -HTML += b't h="abcdefghijklmnopqrstuvwxyz";h+="ABCDEFGHIJKLMNOPQRSTUVW' -HTML += b'XYZ",h+="0123456789",h+="+-*/^(). <>=|",o&&(h="-0123456789")' -HTML += b',n.key.length<3&&h.includes(n.key)==!1&&n.preventDefault();l' -HTML += b'et p=this.inputElement.value.length*12;this.inputElement.off' -HTML += b'setWidth<p&&(this.inputElement.style.width=""+p+"px")}),(c||' -HTML += b'this.question.showSolution)&&(t.student[s]=this.inputElement' -HTML += b'.value=l)}edited(){let e=this.inputElement.value.trim(),t=""' -HTML += b',s=!1;try{let i=b.parse(e);s=i.root.op==="const",t=i.toTexSt' -HTML += b'ring(),this.inputElement.style.color="black",this.equationPr' -HTML += b'eviewDiv.style.backgroundColor="green"}catch{t=e.replaceAll(' -HTML += b'"^","\\\\hat{~}").replaceAll("_","\\\\_"),this.inputElement.styl' -HTML += b'e.color="maroon",this.equationPreviewDiv.style.backgroundCol' -HTML += b'or="maroon"}Q(this.equationPreviewDiv,t,!0),this.equationPre' -HTML += b'viewDiv.style.display=e.length>0&&!s?"block":"none",this.que' -HTML += b'stion.student[this.inputId]=e}},H=class{static{f(this,"Matri' -HTML += b'xInput")}constructor(e,t,s,i){this.parent=e,this.question=t,' -HTML += b'this.inputId=s,this.matExpected=new E(0,0),this.matExpected.' -HTML += b'fromString(i),this.matStudent=new E(this.matExpected.m==1?1:' -HTML += b'3,this.matExpected.n==1?1:3),t.showSolution&&this.matStudent' -HTML += b'.fromMatrix(this.matExpected),this.genMatrixDom(!0)}genMatri' -HTML += b'xDom(e){let t=w();this.parent.innerHTML="",this.parent.appen' -HTML += b'dChild(t),t.style.position="relative",t.style.display="inlin' -HTML += b'e-block";let s=document.createElement("table");t.appendChild' -HTML += b'(s);let i=this.matExpected.getMaxCellStrlen();for(let u=0;u<' -HTML += b'this.matStudent.m;u++){let g=document.createElement("tr");s.' -HTML += b'appendChild(g),u==0&&g.appendChild(this.generateMatrixParent' -HTML += b'hesis(!0,this.matStudent.m));for(let v=0;v<this.matStudent.n' -HTML += b';v++){let M=u*this.matStudent.n+v,S=document.createElement("' -HTML += b'td");g.appendChild(S);let C=this.inputId+"-"+M;new I(S,this.' -HTML += b'question,C,i,this.matStudent.v[M],!1,!e)}u==0&&g.appendChild' -HTML += b'(this.generateMatrixParenthesis(!1,this.matStudent.m))}let l' -HTML += b'=["+","-","+","-"],o=[0,0,1,-1],c=[1,-1,0,0],n=[0,22,888,888' -HTML += b'],h=[888,888,-22,-22],p=[-22,-22,0,22],m=[this.matExpected.n' -HTML += b'!=1,this.matExpected.n!=1,this.matExpected.m!=1,this.matExpe' -HTML += b'cted.m!=1],d=[this.matStudent.n>=10,this.matStudent.n<=1,thi' -HTML += b's.matStudent.m>=10,this.matStudent.m<=1];for(let u=0;u<4;u++' -HTML += b'){if(m[u]==!1)continue;let g=k(l[u]);n[u]!=888&&(g.style.top' -HTML += b'=""+n[u]+"px"),h[u]!=888&&(g.style.bottom=""+h[u]+"px"),p[u]' -HTML += b'!=888&&(g.style.right=""+p[u]+"px"),g.classList.add("matrixR' -HTML += b'esizeButton"),t.appendChild(g),d[u]?g.style.opacity="0.5":g.' -HTML += b'addEventListener("click",()=>{for(let v=0;v<this.matStudent.' -HTML += b'm;v++)for(let M=0;M<this.matStudent.n;M++){let S=v*this.matS' -HTML += b'tudent.n+M,C=this.inputId+"-"+S,T=this.question.student[C];t' -HTML += b'his.matStudent.v[S]=T,delete this.question.student[C]}this.m' -HTML += b'atStudent.resize(this.matStudent.m+o[u],this.matStudent.n+c[' -HTML += b'u],""),this.genMatrixDom(!1)})}}generateMatrixParenthesis(e,' -HTML += b't){let s=document.createElement("td");s.style.width="3px";fo' -HTML += b'r(let i of["Top",e?"Left":"Right","Bottom"])s.style["border"' -HTML += b'+i+"Width"]="2px",s.style["border"+i+"Style"]="solid";return' -HTML += b' this.question.language=="de"&&(e?s.style.borderTopLeftRadiu' -HTML += b's="5px":s.style.borderTopRightRadius="5px",e?s.style.borderB' -HTML += b'ottomLeftRadius="5px":s.style.borderBottomRightRadius="5px")' -HTML += b',s.rowSpan=t,s}};var x={init:0,errors:1,passed:2,incomplete:' -HTML += b'3},V=class{static{f(this,"Question")}constructor(e,t,s,i){th' -HTML += b'is.state=x.init,this.language=s,this.src=t,this.debug=i,this' -HTML += b'.instanceOrder=z(t.instances.length,!0),this.instanceIdx=0,t' -HTML += b'his.choiceIdx=0,this.includesSingleChoice=!1,this.gapIdx=0,t' -HTML += b'his.expected={},this.types={},this.student={},this.gapInputs' -HTML += b'={},this.parentDiv=e,this.questionDiv=null,this.feedbackPopu' -HTML += b'pDiv=null,this.titleDiv=null,this.checkAndRepeatBtn=null,thi' -HTML += b's.showSolution=!1,this.feedbackSpan=null,this.numCorrect=0,t' -HTML += b'his.numChecked=0,this.hasCheckButton=!0,this.editingEnabled=' -HTML += b'!0}reset(){this.gapIdx=0,this.choiceIdx=0,this.instanceIdx=(' -HTML += b'this.instanceIdx+1)%this.src.instances.length}getCurrentInst' -HTML += b'ance(){let e=this.instanceOrder[this.instanceIdx];return thi' -HTML += b's.src.instances[e]}editedQuestion(){this.state=x.init,this.u' -HTML += b'pdateVisualQuestionState(),this.questionDiv.style.color="bla' -HTML += b'ck",this.checkAndRepeatBtn.innerHTML=P,this.checkAndRepeatBt' -HTML += b'n.style.display="block",this.checkAndRepeatBtn.style.color="' -HTML += b'black"}updateVisualQuestionState(){let e="black",t="transpar' -HTML += b'ent";switch(this.state){case x.init:e="black";break;case x.p' -HTML += b'assed:e="var(--green)",t="rgba(0,150,0, 0.035)";break;case x' -HTML += b'.incomplete:case x.errors:e="var(--red)",t="rgba(150,0,0, 0.' -HTML += b'035)",this.includesSingleChoice==!1&&this.numChecked>=5&&(th' -HTML += b'is.feedbackSpan.innerHTML="  "+this.numCorrect+" /' -HTML += b' "+this.numChecked);break}this.questionDiv.style.backgroundC' -HTML += b'olor=t,this.questionDiv.style.borderColor=e}populateDom(e=!1' -HTML += b'){if(this.parentDiv.innerHTML="",this.questionDiv=w(),this.p' -HTML += b'arentDiv.appendChild(this.questionDiv),this.questionDiv.clas' -HTML += b'sList.add("question"),this.feedbackPopupDiv=w(),this.feedbac' -HTML += b'kPopupDiv.classList.add("questionFeedback"),this.questionDiv' -HTML += b'.appendChild(this.feedbackPopupDiv),this.feedbackPopupDiv.in' -HTML += b'nerHTML="awesome",this.debug&&"src_line"in this.src){let i=w' -HTML += b'();i.classList.add("debugInfo"),i.innerHTML="Source code: li' -HTML += b'nes "+this.src.src_line+"..",this.questionDiv.appendChild(i)' -HTML += b'}if(this.titleDiv=w(),this.questionDiv.appendChild(this.titl' -HTML += b'eDiv),this.titleDiv.classList.add("questionTitle"),this.titl' -HTML += b'eDiv.innerHTML=this.src.title,this.src.error.length>0){let i' -HTML += b'=k(this.src.error);this.questionDiv.appendChild(i),i.style.c' -HTML += b'olor="red";return}let t=this.getCurrentInstance();if(t!=null' -HTML += b'&&"__svg_image"in t){let i=t.__svg_image.v,l=w();this.questi' -HTML += b'onDiv.appendChild(l);let o=document.createElement("img");l.a' -HTML += b'ppendChild(o),o.classList.add("img"),o.src="data:image/svg+x' -HTML += b'ml;base64,"+i}for(let i of this.src.text.c)this.questionDiv.' -HTML += b'appendChild(this.generateText(i));let s=w();if(s.innerHTML="' -HTML += b'",s.classList.add("button-group"),this.questionDiv.appendChi' -HTML += b'ld(s),this.hasCheckButton=Object.keys(this.expected).length>' -HTML += b'0,this.hasCheckButton&&(this.checkAndRepeatBtn=F(),s.appendC' -HTML += b'hild(this.checkAndRepeatBtn),this.checkAndRepeatBtn.innerHTM' -HTML += b'L=P,this.checkAndRepeatBtn.style.backgroundColor="black",e&&' -HTML += b'(this.checkAndRepeatBtn.style.height="0",this.checkAndRepeat' -HTML += b'Btn.style.visibility="hidden")),this.feedbackSpan=k(""),this' -HTML += b'.feedbackSpan.style.userSelect="none",s.appendChild(this.fee' -HTML += b'dbackSpan),this.debug){if(this.src.variables.length>0){let o' -HTML += b'=w();o.classList.add("debugInfo"),o.innerHTML="Variables gen' -HTML += b'erated by Python Code",this.questionDiv.appendChild(o);let c' -HTML += b'=w();c.classList.add("debugCode"),this.questionDiv.appendChi' -HTML += b'ld(c);let n=this.getCurrentInstance(),h="",p=[...this.src.va' -HTML += b'riables];p.sort();for(let m of p){let d=n[m].t,u=n[m].v;swit' -HTML += b'ch(d){case"vector":u="["+u+"]";break;case"set":u="{"+u+"}";b' -HTML += b'reak}h+=d+" "+m+" = "+u+"<br/>"}c.innerHTML=h}let i=["python' -HTML += b'_src_html","text_src_html"],l=["Python Source Code","Text So' -HTML += b'urce Code"];for(let o=0;o<i.length;o++){let c=i[o];if(c in t' -HTML += b'his.src&&this.src[c].length>0){let n=w();n.classList.add("de' -HTML += b'bugInfo"),n.innerHTML=l[o],this.questionDiv.appendChild(n);l' -HTML += b'et h=w();h.classList.add("debugCode"),this.questionDiv.appen' -HTML += b'd(h),h.innerHTML=this.src[c]}}}this.hasCheckButton&&this.che' -HTML += b'ckAndRepeatBtn.addEventListener("click",()=>{this.state==x.p' -HTML += b'assed?(this.state=x.init,this.editingEnabled=!0,this.reset()' -HTML += b',this.populateDom()):R(this)})}generateMathString(e){let t="' -HTML += b'";switch(e.t){case"math":case"display-math":for(let s of e.c' -HTML += b'){let i=this.generateMathString(s);s.t==="var"&&t.includes("' -HTML += b'!PM")&&(i.startsWith("{-")?(i="{"+i.substring(2),t=t.replace' -HTML += b'All("!PM","-")):t=t.replaceAll("!PM","+")),t+=i}break;case"t' -HTML += b'ext":return e.d;case"plus_minus":{t+=" !PM ";break}case"var"' -HTML += b':{let s=this.getCurrentInstance(),i=s[e.d].t,l=s[e.d].v;swit' -HTML += b'ch(i){case"vector":return"\\\\left["+l+"\\\\right]";case"set":re' -HTML += b'turn"\\\\left\\\\{"+l+"\\\\right\\\\}";case"complex":{let o=l.split(' -HTML += b'","),c=parseFloat(o[0]),n=parseFloat(o[1]);return a.const(c,' -HTML += b'n).toTexString()}case"matrix":{let o=new E(0,0);return o.fro' -HTML += b'mString(l),t=o.toTeXString(e.d.includes("augmented"),this.la' -HTML += b'nguage!="de"),t}case"term":{try{t=b.parse(l).toTexString()}c' -HTML += b'atch{}break}default:t=l}}}return e.t==="plus_minus"?t:"{"+t+' -HTML += b'"}"}generateText(e,t=!1){switch(e.t){case"paragraph":case"sp' -HTML += b'an":{let s=document.createElement(e.t=="span"||t?"span":"p")' -HTML += b';for(let i of e.c)s.appendChild(this.generateText(i));return' -HTML += b' s.style.userSelect="none",s}case"text":return k(e.d);case"c' -HTML += b'ode":{let s=k(e.d);return s.classList.add("code"),s}case"ita' -HTML += b'lic":case"bold":{let s=k("");return s.append(...e.c.map(i=>t' -HTML += b'his.generateText(i))),e.t==="bold"?s.style.fontWeight="bold"' -HTML += b':s.style.fontStyle="italic",s}case"math":case"display-math":' -HTML += b'{let s=this.generateMathString(e);return L(s,e.t==="display-' -HTML += b'math")}case"string_var":{let s=k(""),i=this.getCurrentInstan' -HTML += b'ce(),l=i[e.d].t,o=i[e.d].v;return l==="string"?s.innerHTML=o' -HTML += b':(s.innerHTML="EXPECTED VARIABLE OF TYPE STRING",s.style.col' -HTML += b'or="red"),s}case"gap":{let s=k("");return new B(s,this,"",e.' -HTML += b'd),s}case"input":case"input2":{let s=e.t==="input2",i=k("");' -HTML += b'i.style.verticalAlign="text-bottom";let l=e.d,o=this.getCurr' -HTML += b'entInstance()[l];if(this.expected[l]=o.v,this.types[l]=o.t,!' -HTML += b's)switch(o.t){case"set":i.append(L("\\\\{"),k(" "));break;case' -HTML += b'"vector":i.append(L("["),k(" "));break}if(o.t==="string")new' -HTML += b' B(i,this,l,this.expected[l]);else if(o.t==="vector"||o.t===' -HTML += b'"set"){let c=o.v.split(","),n=c.length;for(let h=0;h<n;h++){' -HTML += b'h>0&&i.appendChild(k(" , "));let p=l+"-"+h;new I(i,this,p,c[' -HTML += b'h].length,c[h],!1)}}else if(o.t==="matrix"){let c=w();i.appe' -HTML += b'ndChild(c),new H(c,this,l,o.v)}else if(o.t==="complex"){let ' -HTML += b'c=o.v.split(",");new I(i,this,l+"-0",c[0].length,c[0],!1),i.' -HTML += b'append(k(" "),L("+"),k(" ")),new I(i,this,l+"-1",c[1].length' -HTML += b',c[1],!1),i.append(k(" "),L("i"))}else{let c=o.t==="int";new' -HTML += b' I(i,this,l,o.v.length,o.v,c)}if(!s)switch(o.t){case"set":i.' -HTML += b'append(k(" "),L("\\\\}"));break;case"vector":i.append(k(" "),L' -HTML += b'("]"));break}return i}case"itemize":return j(e.c.map(s=>O(th' -HTML += b'is.generateText(s))));case"single-choice":case"multi-choice"' -HTML += b':{let s=e.t=="multi-choice";s||(this.includesSingleChoice=!0' -HTML += b');let i=document.createElement("table"),l=e.c.length,o=this.' -HTML += b'debug==!1,c=z(l,o),n=s?X:G,h=s?Z:Y,p=[],m=[];for(let d=0;d<l' -HTML += b';d++){let u=c[d],g=e.c[u],v="mc-"+this.choiceIdx+"-"+u;m.pus' -HTML += b'h(v);let M=g.c[0].t=="bool"?g.c[0].d:this.getCurrentInstance' -HTML += b'()[g.c[0].d].v;this.expected[v]=M,this.types[v]="bool",this.' -HTML += b'student[v]=this.showSolution?M:"false";let S=this.generateTe' -HTML += b'xt(g.c[1],!0),C=document.createElement("tr");i.appendChild(C' -HTML += b'),C.style.cursor="pointer";let T=document.createElement("td"' -HTML += b');p.push(T),C.appendChild(T),T.innerHTML=this.student[v]=="t' -HTML += b'rue"?n:h;let y=document.createElement("td");C.appendChild(y)' -HTML += b',y.appendChild(S),s?C.addEventListener("click",()=>{this.edi' -HTML += b'tingEnabled!=!1&&(this.editedQuestion(),this.student[v]=this' -HTML += b'.student[v]==="true"?"false":"true",this.student[v]==="true"' -HTML += b'?T.innerHTML=n:T.innerHTML=h)}):C.addEventListener("click",(' -HTML += b')=>{if(this.editingEnabled!=!1){this.editedQuestion();for(le' -HTML += b't D of m)this.student[D]="false";this.student[v]="true";for(' -HTML += b'let D=0;D<m.length;D++){let U=c[D];p[U].innerHTML=this.stude' -HTML += b'nt[m[U]]=="true"?n:h}}})}return this.choiceIdx++,i}case"imag' -HTML += b'e":{let s=w(),l=e.d.split("."),o=l[l.length-1],c=e.c[0].d,n=' -HTML += b'e.c[1].d,h=document.createElement("img");s.appendChild(h),h.' -HTML += b'classList.add("img"),h.style.width=c+"%";let p={svg:"svg+xml' -HTML += b'",png:"png",jpg:"jpeg"};return h.src="data:image/"+p[o]+";ba' -HTML += b'se64,"+n,s}default:{let s=k("UNIMPLEMENTED("+e.t+")");return' -HTML += b' s.style.color="red",s}}}};function R(r){r.feedbackSpan.inne' -HTML += b'rHTML="",r.numChecked=0,r.numCorrect=0;let e=!0;for(let i in' -HTML += b' r.expected){let l=r.types[i],o=r.student[i],c=r.expected[i]' -HTML += b';switch(o!=null&&o.length==0&&(e=!1),l){case"bool":r.numChec' -HTML += b'ked++,o.toLowerCase()===c.toLowerCase()&&r.numCorrect++;brea' -HTML += b'k;case"string":{r.numChecked++;let n=r.gapInputs[i],h=o.trim' -HTML += b'().toUpperCase(),p=c.trim().toUpperCase().split("|"),m=!1;fo' -HTML += b'r(let d of p)if(K(h,d)<=1){m=!0,r.numCorrect++,r.gapInputs[i' -HTML += b'].value=d,r.student[i]=d;break}n.style.color=m?"black":"whit' -HTML += b'e",n.style.backgroundColor=m?"transparent":"maroon";break}ca' -HTML += b'se"int":r.numChecked++,Math.abs(parseFloat(o)-parseFloat(c))' -HTML += b'<1e-9&&r.numCorrect++;break;case"float":case"term":{r.numChe' -HTML += b'cked++;try{let n=b.parse(c),h=b.parse(o),p=!1;r.src.is_ode?p' -HTML += b'=ce(n,h):p=b.compare(n,h),p&&r.numCorrect++}catch(n){r.debug' -HTML += b'&&(console.log("term invalid"),console.log(n))}break}case"ve' -HTML += b'ctor":case"complex":case"set":{let n=c.split(",");r.numCheck' -HTML += b'ed+=n.length;let h=[];for(let p=0;p<n.length;p++){let m=r.st' -HTML += b'udent[i+"-"+p];m.length==0&&(e=!1),h.push(m)}if(l==="set")fo' -HTML += b'r(let p=0;p<n.length;p++)try{let m=b.parse(n[p]);for(let d=0' -HTML += b';d<h.length;d++){let u=b.parse(h[d]);if(b.compare(m,u)){r.nu' -HTML += b'mCorrect++;break}}}catch(m){r.debug&&console.log(m)}else for' -HTML += b'(let p=0;p<n.length;p++)try{let m=b.parse(h[p]),d=b.parse(n[' -HTML += b'p]);b.compare(m,d)&&r.numCorrect++}catch(m){r.debug&&console' -HTML += b'.log(m)}break}case"matrix":{let n=new E(0,0);n.fromString(c)' -HTML += b',r.numChecked+=n.m*n.n;for(let h=0;h<n.m;h++)for(let p=0;p<n' -HTML += b'.n;p++){let m=h*n.n+p;o=r.student[i+"-"+m],o!=null&&o.length' -HTML += b'==0&&(e=!1);let d=n.v[m];try{let u=b.parse(d),g=b.parse(o);b' -HTML += b'.compare(u,g)&&r.numCorrect++}catch(u){r.debug&&console.log(' -HTML += b'u)}}break}default:r.feedbackSpan.innerHTML="UNIMPLEMENTED EV' -HTML += b'AL OF TYPE "+l}}e==!1?r.state=x.incomplete:r.state=r.numCorr' -HTML += b'ect==r.numChecked?x.passed:x.errors,r.updateVisualQuestionSt' -HTML += b'ate();let t=[];switch(r.state){case x.passed:t=ie[r.language' -HTML += b'];break;case x.incomplete:t=se[r.language];break;case x.erro' -HTML += b'rs:t=ne[r.language];break}let s=t[Math.floor(Math.random()*t' -HTML += b'.length)];r.feedbackPopupDiv.innerHTML=s,r.feedbackPopupDiv.' -HTML += b'style.color=r.state===x.passed?"var(--green)":"var(--red)",r' -HTML += b'.feedbackPopupDiv.style.display="flex",setTimeout(()=>{r.fee' -HTML += b'dbackPopupDiv.style.display="none"},1e3),r.editingEnabled=!0' -HTML += b',r.state===x.passed?(r.editingEnabled=!1,r.src.instances.len' -HTML += b'gth>1?r.checkAndRepeatBtn.innerHTML=J:r.checkAndRepeatBtn.st' -HTML += b'yle.visibility="hidden"):r.checkAndRepeatBtn!=null&&(r.check' -HTML += b'AndRepeatBtn.innerHTML=P)}f(R,"evalQuestion");function be(r,' -HTML += b'e){new q(r,e)}f(be,"init");var q=class{static{f(this,"Quiz")' -HTML += b'}constructor(e,t){this.quizSrc=e,["en","de","es","it","fr"].' -HTML += b'includes(this.quizSrc.lang)==!1&&(this.quizSrc.lang="en"),th' -HTML += b'is.debug=t,this.debug&&(document.getElementById("debug").sty' -HTML += b'le.display="block"),this.questions=[],this.timeLeft=e.timer,' -HTML += b'this.timeLimited=e.timer>0,this.fillPageMetadata(),this.time' -HTML += b'Limited?(document.getElementById("timer-info").style.display' -HTML += b'="block",document.getElementById("timer-info-text").innerHTM' -HTML += b'L=oe[this.quizSrc.lang],document.getElementById("start-btn")' -HTML += b'.addEventListener("click",()=>{document.getElementById("time' -HTML += b'r-info").style.display="none",this.generateQuestions(),this.' -HTML += b'runTimer()})):this.generateQuestions()}fillPageMetadata(){do' -HTML += b'cument.getElementById("date").innerHTML=this.quizSrc.date,do' -HTML += b'cument.getElementById("title").innerHTML=this.quizSrc.title,' -HTML += b'document.getElementById("author").innerHTML=this.quizSrc.aut' -HTML += b'hor,document.getElementById("courseInfo1").innerHTML=$[this.' -HTML += b'quizSrc.lang];let e=\'<span onclick="location.reload()" style' -HTML += b'="text-decoration: none; font-weight: bold; cursor: pointer"' -HTML += b'>\'+te[this.quizSrc.lang]+"</span>";document.getElementById("' -HTML += b'courseInfo2").innerHTML=ee[this.quizSrc.lang].replace("*",e)' -HTML += b',document.getElementById("data-policy").innerHTML=le[this.qu' -HTML += b'izSrc.lang]}generateQuestions(){let e=document.getElementByI' -HTML += b'd("questions"),t=1;for(let s of this.quizSrc.questions){s.ti' -HTML += b'tle=""+t+". "+s.title;let i=w();e.appendChild(i);let l=new V' -HTML += b'(i,s,this.quizSrc.lang,this.debug);l.showSolution=this.debug' -HTML += b',this.questions.push(l),l.populateDom(this.timeLimited),this' -HTML += b'.debug&&s.error.length==0&&l.hasCheckButton&&l.checkAndRepea' -HTML += b'tBtn.click(),t++}}runTimer(){document.getElementById("stop-n' -HTML += b'ow").style.display="block",document.getElementById("stop-now' -HTML += b'-btn").innerHTML=ae[this.quizSrc.lang],document.getElementBy' -HTML += b'Id("stop-now-btn").addEventListener("click",()=>{this.timeLe' -HTML += b'ft=1});let e=document.getElementById("timer");e.style.displa' -HTML += b'y="block",e.innerHTML=he(this.timeLeft);let t=setInterval(()' -HTML += b'=>{this.timeLeft--,e.innerHTML=he(this.timeLeft),this.timeLe' -HTML += b'ft<=0&&this.stopTimer(t)},1e3)}stopTimer(e){document.getElem' -HTML += b'entById("stop-now").style.display="none",clearInterval(e);le' -HTML += b't t=0,s=0;for(let l of this.questions){let o=l.src.points;s+' -HTML += b'=o,R(l),l.state===x.passed&&(t+=o),l.editingEnabled=!1}docum' -HTML += b'ent.getElementById("questions-eval").style.display="block";l' -HTML += b'et i=document.getElementById("questions-eval-percentage");i.' -HTML += b'innerHTML=s==0?"":""+t+" / "+s+" "+re[this.quizSrc.lang]+" <' -HTML += b'br/><br/>"+Math.round(t/s*100)+" %"}};function he(r){let e=M' -HTML += b'ath.floor(r/60),t=r%60;return e+":"+(""+t).padStart(2,"0")}f' -HTML += b'(he,"formatTime");return ge(ke);})();pysell.init(quizSrc,deb' -HTML += b'ug);</script></body> </html> ' +HTML += b'green)" > jetzt auswerten </button> </div> <br /> <div id="q' +HTML += b'uestions-eval" class="eval" style="display: none"> <h1 id="q' +HTML += b'uestions-eval-percentage">0 %</h1> </div> </div> <br /><br ' +HTML += b'/><br /><br /> <div class="footer"> <div class="contents"> ' +HTML += b'<span id="date"></span> — This quiz was developed usin' +HTML += b'g pySELL, a Python-based Simple E-Learning Language — ' +HTML += b'<a href="https://pysell.org" style="color: var(--grey)" >htt' +HTML += b'ps://pysell.org</a > <br /> <span style="width: 64px"> <img ' +HTML += b'style="max-width: 48px; padding: 16px 0px" src="data:image/s' +HTML += b'vg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLT' +HTML += b'giPz4KPCEtLSBDcmVhdGVkIHdpdGggSW5rc2NhcGUgKGh0dHA6Ly93d3cuaW' +HTML += b'5rc2NhcGUub3JnLykgLS0+Cjxzdmcgd2lkdGg9IjEwMG1tIiBoZWlnaHQ9Ij' +HTML += b'EwMG1tIiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiB4bW' +HTML += b'xucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPS' +HTML += b'JodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KIDxkZWZzPgogIDxsaW' +HTML += b'5lYXJHcmFkaWVudCBpZD0ibGluZWFyR3JhZGllbnQzNjU4IiB4MT0iMjguNT' +HTML += b'I3IiB4Mj0iMTI4LjUzIiB5MT0iNzkuNjQ4IiB5Mj0iNzkuNjQ4IiBncmFkaW' +HTML += b'VudFRyYW5zZm9ybT0ibWF0cml4KDEuMDE2MSAwIDAgMS4wMTYxIC0yOS43OS' +HTML += b'AtMzAuOTI4KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogIC' +HTML += b'A8c3RvcCBzdG9wLWNvbG9yPSIjNTkwMDVlIiBvZmZzZXQ9IjAiLz4KICAgPH' +HTML += b'N0b3Agc3RvcC1jb2xvcj0iI2FkMDA3ZiIgb2Zmc2V0PSIxIi8+CiAgPC9saW' +HTML += b'5lYXJHcmFkaWVudD4KIDwvZGVmcz4KIDxyZWN0IHdpZHRoPSIxMDAiIGhlaW' +HTML += b'dodD0iMTAwIiByeT0iMCIgZmlsbD0idXJsKCNsaW5lYXJHcmFkaWVudDM2NT' +HTML += b'gpIi8+CiA8ZyBmaWxsPSIjZmZmIj4KICA8ZyB0cmFuc2Zvcm09Im1hdHJpeC' +HTML += b'guNDA3NDMgMCAwIC40MDc0MyAtNDIuODQyIC0zNi4xMzYpIiBzdHJva2Utd2' +HTML += b'lkdGg9IjMuNzc5NSIgc3R5bGU9InNoYXBlLWluc2lkZTp1cmwoI3JlY3Q5NT' +HTML += b'ItNyk7c2hhcGUtcGFkZGluZzo2LjUzMTQ0O3doaXRlLXNwYWNlOnByZSIgYX' +HTML += b'JpYS1sYWJlbD0iU0VMTCI+CiAgIDxwYXRoIGQ9Im0xNzEuMDEgMjM4LjM5cS' +HTML += b'0yLjExMi0yLjY4OC01LjU2OC00LjIyNC0zLjM2LTEuNjMyLTYuNTI4LTEuNj' +HTML += b'MyLTEuNjMyIDAtMy4zNiAwLjI4OC0xLjYzMiAwLjI4OC0yLjk3NiAxLjE1Mi' +HTML += b'0xLjM0NCAwLjc2OC0yLjMwNCAyLjExMi0wLjg2NCAxLjI0OC0wLjg2NCAzLj' +HTML += b'I2NCAwIDEuNzI4IDAuNjcyIDIuODggMC43NjggMS4xNTIgMi4xMTIgMi4wMT' +HTML += b'YgMS40NCAwLjg2NCAzLjM2IDEuNjMyIDEuOTIgMC42NzIgNC4zMiAxLjQ0ID' +HTML += b'MuNDU2IDEuMTUyIDcuMiAyLjU5MiAzLjc0NCAxLjM0NCA2LjgxNiAzLjY0OH' +HTML += b'Q1LjA4OCA1Ljc2cTIuMDE2IDMuMzYgMi4wMTYgOC40NDggMCA1Ljg1Ni0yLj' +HTML += b'IwOCAxMC4xNzYtMi4xMTIgNC4yMjQtNS43NiA3LjAwOHQtOC4zNTIgNC4xMj' +HTML += b'gtOS42OTYgMS4zNDRxLTcuMjk2IDAtMTQuMTEyLTIuNDk2LTYuODE2LTIuNT' +HTML += b'kyLTExLjMyOC03LjI5NmwxMC43NTItMTAuOTQ0cTIuNDk2IDMuMDcyIDYuNT' +HTML += b'I4IDUuMTg0IDQuMTI4IDIuMDE2IDguMTYgMi4wMTYgMS44MjQgMCAzLjU1Mi' +HTML += b'0wLjM4NHQyLjk3Ni0xLjI0OHExLjM0NC0wLjg2NCAyLjExMi0yLjMwNHQwLj' +HTML += b'c2OC0zLjQ1NnEwLTEuOTItMC45Ni0zLjI2NHQtMi43ODQtMi40cS0xLjcyOC' +HTML += b'0xLjE1Mi00LjQxNi0yLjAxNi0yLjU5Mi0wLjk2LTUuOTUyLTIuMDE2LTMuMj' +HTML += b'Y0LTEuMDU2LTYuNDMyLTIuNDk2LTMuMDcyLTEuNDQtNS41NjgtMy42NDgtMi' +HTML += b'40LTIuMzA0LTMuOTM2LTUuNDcyLTEuNDQtMy4yNjQtMS40NC03Ljg3MiAwLT' +HTML += b'UuNjY0IDIuMzA0LTkuNjk2dDYuMDQ4LTYuNjI0IDguNDQ4LTMuNzQ0cTQuNz' +HTML += b'A0LTEuMjQ4IDkuNTA0LTEuMjQ4IDUuNzYgMCAxMS43MTIgMi4xMTIgNi4wND' +HTML += b'ggMi4xMTIgMTAuNTYgNi4yNHoiLz4KICAgPHBhdGggZD0ibTE5MS44NCAyOD' +HTML += b'guN3YtNjcuOTY4aDUyLjE5bC0xLjI5ODggMTMuOTJoLTM1LjA1MXYxMi43Nj' +HTML += b'hoMzMuNDE5bC0xLjI5ODggMTMuMTUyaC0zMi4xMnYxNC4xMTJoMzEuNTg0bC' +HTML += b'0xLjI5ODggMTQuMDE2eiIvPgogIDwvZz4KICA8ZyB0cmFuc2Zvcm09Im1hdH' +HTML += b'JpeCguNDA3NDMgMCAwIC40MDc0MyAtNDAuMTY4IC03OC4wODIpIiBzdHJva2' +HTML += b'Utd2lkdGg9IjMuNzc5NSIgc3R5bGU9InNoYXBlLWluc2lkZTp1cmwoI3JlY3' +HTML += b'Q5NTItOS05KTtzaGFwZS1wYWRkaW5nOjYuNTMxNDQ7d2hpdGUtc3BhY2U6cH' +HTML += b'JlIiBhcmlhLWxhYmVsPSJweSI+CiAgIDxwYXRoIGQ9Im0xODcuNDMgMjY0Lj' +HTML += b'ZxMCA0Ljk5Mi0xLjUzNiA5LjZ0LTQuNTEyIDguMTZxLTIuODggMy40NTYtNy' +HTML += b'4xMDQgNS41Njh0LTkuNiAyLjExMnEtNC40MTYgMC04LjM1Mi0xLjcyOC0zLj' +HTML += b'kzNi0xLjgyNC02LjE0NC00Ljg5NmgtMC4xOTJ2MjguMzJoLTE1Ljc0NHYtNz' +HTML += b'AuODQ4aDE0Ljk3NnY1Ljg1NmgwLjI4OHEyLjIwOC0yLjg4IDYuMDQ4LTQuOT' +HTML += b'kyIDMuOTM2LTIuMjA4IDkuMjE2LTIuMjA4IDUuMTg0IDAgOS40MDggMi4wMT' +HTML += b'Z0Ny4xMDQgNS40NzJxMi45NzYgMy40NTYgNC41MTIgOC4wNjQgMS42MzIgNC' +HTML += b'41MTIgMS42MzIgOS41MDR6bS0xNS4yNjQgMHEwLTIuMzA0LTAuNzY4LTQuNT' +HTML += b'EyLTAuNjcyLTIuMjA4LTIuMTEyLTMuODQtMS4zNDQtMS43MjgtMy40NTYtMi' +HTML += b'43ODR0LTQuODk2LTEuMDU2cS0yLjY4OCAwLTQuOCAxLjA1NnQtMy42NDggMi' +HTML += b'43ODRxLTEuNDQgMS43MjgtMi4zMDQgMy45MzYtMC43NjggMi4yMDgtMC43Nj' +HTML += b'ggNC41MTJ0MC43NjggNC41MTJxMC44NjQgMi4yMDggMi4zMDQgMy45MzYgMS' +HTML += b'41MzYgMS43MjggMy42NDggMi43ODR0NC44IDEuMDU2cTIuNzg0IDAgNC44OT' +HTML += b'YtMS4wNTZ0My40NTYtMi43ODRxMS40NC0xLjcyOCAyLjExMi0zLjkzNiAwLj' +HTML += b'c2OC0yLjMwNCAwLjc2OC00LjYwOHoiLz4KICAgPHBhdGggZD0ibTIyNC4yOS' +HTML += b'AyOTUuOXEtMS40NCAzLjc0NC0zLjI2NCA2LjYyNC0xLjcyOCAyLjk3Ni00Lj' +HTML += b'IyNCA0Ljk5Mi0yLjQgMi4xMTItNS43NiAzLjE2OC0zLjI2NCAxLjA1Ni03Lj' +HTML += b'c3NiAxLjA1Ni0yLjIwOCAwLTQuNjA4LTAuMjg4LTIuMzA0LTAuMjg4LTQuMD' +HTML += b'MyLTAuNzY4bDEuNzI4LTEzLjI0OHExLjE1MiAwLjM4NCAyLjQ5NiAwLjU3Ni' +HTML += b'AxLjQ0IDAuMjg4IDIuNTkyIDAuMjg4IDMuNjQ4IDAgNS4yOC0xLjcyOCAxLj' +HTML += b'YzMi0xLjYzMiAyLjc4NC00LjcwNGwxLjUzNi0zLjkzNi0xOS45NjgtNDcuMD' +HTML += b'RoMTcuNDcybDEwLjY1NiAzMC43MmgwLjI4OGw5LjUwNC0zMC43MmgxNi43MD' +HTML += b'R6Ii8+CiAgPC9nPgogIDxwYXRoIGQ9Im02OC4wOTYgMTUuNzc1aDcuODAyOW' +HTML += b'wtOC45ODU0IDY5Ljc5MWgtNy44MDN6IiBzdHJva2Utd2lkdGg9IjEuMTE3Ni' +HTML += b'IvPgogIDxwYXRoIGQ9Im04My44NTMgMTUuNzQ4aDcuODAzbC04Ljk4NTQgNj' +HTML += b'kuNzkxaC03LjgwM3oiIHN0cm9rZS13aWR0aD0iMS4xMTc2Ii8+CiA8L2c+Cj' +HTML += b'wvc3ZnPgo=" /> </span> <span id="data-policy"></span> </div>' +HTML += b' </div> <script>let debug = false; let quizSrc = {};var pys' +HTML += b'ell=(()=>{var A=Object.defineProperty;var pe=Object.getOwnPr' +HTML += b'opertyDescriptor;var ue=Object.getOwnPropertyNames;var de=Ob' +HTML += b'ject.prototype.hasOwnProperty;var f=(r,e)=>A(r,"name",{value' +HTML += b':e,configurable:!0});var me=(r,e)=>{for(var t in e)A(r,t,{ge' +HTML += b't:e[t],enumerable:!0})},fe=(r,e,t,s)=>{if(e&&typeof e=="obje' +HTML += b'ct"||typeof e=="function")for(let i of ue(e))!de.call(r,i)&&' +HTML += b'i!==t&&A(r,i,{get:()=>e[i],enumerable:!(s=pe(e,i))||s.enumer' +HTML += b'able});return r};var ge=r=>fe(A({},"__esModule",{value:!0}),' +HTML += b'r);var ke={};me(ke,{Quiz:()=>q,init:()=>be});function w(r=[]' +HTML += b'){let e=document.createElement("div");return e.append(...r),' +HTML += b'e}f(w,"genDiv");function j(r=[]){let e=document.createElemen' +HTML += b't("ul");return e.append(...r),e}f(j,"genUl");function O(r){l' +HTML += b'et e=document.createElement("li");return e.appendChild(r),e}' +HTML += b'f(O,"genLi");function W(r){let e=document.createElement("inp' +HTML += b'ut");return e.spellcheck=!1,e.type="text",e.classList.add("i' +HTML += b'nputField"),e.style.width=r+"px",e}f(W,"genInputField");func' +HTML += b'tion F(){let r=document.createElement("button");return r.typ' +HTML += b'e="button",r.classList.add("button"),r}f(F,"genButton");func' +HTML += b'tion k(r,e=[]){let t=document.createElement("span");return e' +HTML += b'.length>0?t.append(...e):t.innerHTML=r,t}f(k,"genSpan");func' +HTML += b'tion Q(r,e,t=!1){katex.render(e,r,{throwOnError:!1,displayMo' +HTML += b'de:t,macros:{"\\\\RR":"\\\\mathbb{R}","\\\\NN":"\\\\mathbb{N}","\\\\QQ' +HTML += b'":"\\\\mathbb{Q}","\\\\ZZ":"\\\\mathbb{Z}","\\\\CC":"\\\\mathbb{C}"}})' +HTML += b'}f(Q,"updateMathElement");function L(r,e=!1){let t=document.' +HTML += b'createElement("span");return Q(t,r,e),t}f(L,"genMathSpan");f' +HTML += b'unction K(r,e){let t=Array(e.length+1).fill(null).map(()=>Ar' +HTML += b'ray(r.length+1).fill(null));for(let s=0;s<=r.length;s+=1)t[0' +HTML += b'][s]=s;for(let s=0;s<=e.length;s+=1)t[s][0]=s;for(let s=1;s<' +HTML += b'=e.length;s+=1)for(let i=1;i<=r.length;i+=1){let l=r[i-1]===' +HTML += b'e[s-1]?0:1;t[s][i]=Math.min(t[s][i-1]+1,t[s-1][i]+1,t[s-1][i' +HTML += b'-1]+l)}return t[e.length][r.length]}f(K,"levenshteinDistance' +HTML += b'");var Z=\'<svg xmlns="http://www.w3.org/2000/svg" height="28' +HTML += b'" viewBox="0 0 448 512"><path d="M384 80c8.8 0 16 7.2 16 16V' +HTML += b'416c0 8.8-7.2 16-16 16H64c-8.8 0-16-7.2-16-16V96c0-8.8 7.2-1' +HTML += b'6 16-16H384zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64' +HTML += b' 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64z"/><' +HTML += b'/svg>\',X=\'<svg xmlns="http://www.w3.org/2000/svg" height="28' +HTML += b'" viewBox="0 0 448 512"><path d="M64 80c-8.8 0-16 7.2-16 16V' +HTML += b'416c0 8.8 7.2 16 16 16H384c8.8 0 16-7.2 16-16V96c0-8.8-7.2-1' +HTML += b'6-16-16H64zM0 96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 ' +HTML += b'64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM337' +HTML += b' 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24' +HTML += b'.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.' +HTML += b'9 0s9.4 24.6 0 33.9z"/>\',Y=\'<svg xmlns="http://www.w3.org/20' +HTML += b'00/svg" height="28" viewBox="0 0 512 512"><path d="M464 256A' +HTML += b'208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 ' +HTML += b'1 512 0A256 256 0 1 1 0 256z"/></svg>\',G=\'<svg xmlns="http:/' +HTML += b'/www.w3.org/2000/svg" height="28" viewBox="0 0 512 512"><pat' +HTML += b'h d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A' +HTML += b'256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209c9.4-9.4 9.4' +HTML += b'-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9' +HTML += b'.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L369' +HTML += b' 209z"/></svg>\',P=\'<svg xmlns="http://www.w3.org/2000/svg" w' +HTML += b'idth="50" height="25" viewBox="0 0 384 512" fill="white"><pa' +HTML += b'th d="M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80V432c0 17' +HTML += b'.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-2' +HTML += b'4.2 23-41s-8.7-32.2-23-41L73 39z"/></svg>\',J=\'<svg xmlns="ht' +HTML += b'tp://www.w3.org/2000/svg" width="50" height="25" viewBox="0 ' +HTML += b'0 512 512" fill="white"><path d="M0 224c0 17.7 14.3 32 32 32' +HTML += b's32-14.3 32-32c0-53 43-96 96-96H320v32c0 12.9 7.8 24.6 19.8 ' +HTML += b'29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-' +HTML += b'64c-9.2-9.2-22.9-11.9-34.9-6.9S320 19.1 320 32V64H160C71.6 6' +HTML += b'4 0 135.6 0 224zm512 64c0-17.7-14.3-32-32-32s-32 14.3-32 32c' +HTML += b'0 53-43 96-96 96H192V352c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2' +HTML += b'-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 2' +HTML += b'2.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V448H352c88.4 0 160-71.' +HTML += b'6 160-160z"/></svg>\';var $={en:"This page operates entirely ' +HTML += b'in your browser and does not store any data on external serv' +HTML += b'ers.",de:"Diese Seite wird in Ihrem Browser ausgef\\xFChrt un' +HTML += b'd speichert keine Daten auf Servern.",es:"Esta p\\xE1gina se ' +HTML += b'ejecuta en su navegador y no almacena ning\\xFAn dato en los ' +HTML += b'servidores.",it:"Questa pagina viene eseguita nel browser e ' +HTML += b'non memorizza alcun dato sui server.",fr:"Cette page fonctio' +HTML += b'nne dans votre navigateur et ne stocke aucune donn\\xE9e sur ' +HTML += b'des serveurs."},ee={en:"* this page to receive a new set of ' +HTML += b'randomized tasks.",de:"Sie k\\xF6nnen diese Seite *, um neue ' +HTML += b'randomisierte Aufgaben zu erhalten.",es:"Puedes * esta p\\xE1' +HTML += b'gina para obtener nuevas tareas aleatorias.",it:"\\xC8 possib' +HTML += b'ile * questa pagina per ottenere nuovi compiti randomizzati"' +HTML += b',fr:"Vous pouvez * cette page pour obtenir de nouvelles t\\xE' +HTML += b'2ches al\\xE9atoires"},te={en:"Refresh",de:"aktualisieren",es' +HTML += b':"recargar",it:"ricaricare",fr:"recharger"},ie={en:["awesome' +HTML += b'","great","well done","nice","you got it","good"],de:["super' +HTML += b'","gut gemacht","weiter so","richtig"],es:["impresionante","' +HTML += b'genial","correcto","bien hecho"],it:["fantastico","grande","' +HTML += b'corretto","ben fatto"],fr:["g\\xE9nial","super","correct","bi' +HTML += b'en fait"]},se={en:["please complete all fields"],de:["bitte ' +HTML += b'alles ausf\\xFCllen"],es:["por favor, rellene todo"],it:["com' +HTML += b'pilare tutto"],fr:["remplis tout s\'il te plait"]},ne={en:["t' +HTML += b'ry again","still some mistakes","wrong answer","no"],de:["le' +HTML += b'ider falsch","nicht richtig","versuch\'s nochmal"],es:["int\\x' +HTML += b'E9ntalo de nuevo","todav\\xEDa algunos errores","respuesta in' +HTML += b'correcta"],it:["riprova","ancora qualche errore","risposta s' +HTML += b'bagliata"],fr:["r\\xE9essayer","encore des erreurs","mauvaise' +HTML += b' r\\xE9ponse"]},re={en:"point(s)",de:"Punkt(e)",es:"punto(s)"' +HTML += b',it:"punto/i",fr:"point(s)"},ae={en:"Evaluate now",de:"Jetzt' +HTML += b' auswerten",es:"Evaluar ahora",it:"Valuta ora",fr:"\\xC9value' +HTML += b'r maintenant"},le={en:"Data Policy: This website does not co' +HTML += b'llect, store, or process any personal data on external serve' +HTML += b'rs. All functionality is executed locally in your browser, e' +HTML += b'nsuring complete privacy. No cookies are used, and no data i' +HTML += b's transmitted to or from the server. Your activity on this s' +HTML += b'ite remains entirely private and local to your device.",de:"' +HTML += b'Datenschutzrichtlinie: Diese Website sammelt, speichert oder' +HTML += b' verarbeitet keine personenbezogenen Daten auf externen Serv' +HTML += b'ern. Alle Funktionen werden lokal in Ihrem Browser ausgef\\xF' +HTML += b'Chrt, um vollst\\xE4ndige Privatsph\\xE4re zu gew\\xE4hrleisten' +HTML += b'. Es werden keine Cookies verwendet, und es werden keine Dat' +HTML += b'en an den Server gesendet oder von diesem empfangen. Ihre Ak' +HTML += b'tivit\\xE4t auf dieser Seite bleibt vollst\\xE4ndig privat und' +HTML += b' lokal auf Ihrem Ger\\xE4t.",es:"Pol\\xEDtica de datos: Este s' +HTML += b'itio web no recopila, almacena ni procesa ning\\xFAn dato per' +HTML += b'sonal en servidores externos. Toda la funcionalidad se ejecu' +HTML += b'ta localmente en su navegador, garantizando una privacidad c' +HTML += b'ompleta. No se utilizan cookies y no se transmiten datos hac' +HTML += b'ia o desde el servidor. Su actividad en este sitio permanece' +HTML += b' completamente privada y local en su dispositivo.",it:"Polit' +HTML += b'ica sui dati: Questo sito web non raccoglie, memorizza o ela' +HTML += b'bora alcun dato personale su server esterni. Tutte le funzio' +HTML += b'nalit\\xE0 vengono eseguite localmente nel tuo browser, garan' +HTML += b'tendo una privacy completa. Non vengono utilizzati cookie e ' +HTML += b'nessun dato viene trasmesso da o verso il server. La tua att' +HTML += b'ivit\\xE0 su questo sito rimane completamente privata e local' +HTML += b'e sul tuo dispositivo.",fr:"Politique de confidentialit\\xE9:' +HTML += b' Ce site web ne collecte, ne stocke ni ne traite aucune donn' +HTML += b'\\xE9e personnelle sur des serveurs externes. Toutes les fonc' +HTML += b'tionnalit\\xE9s sont ex\\xE9cut\\xE9es localement dans votre na' +HTML += b'vigateur, garantissant une confidentialit\\xE9 totale. Aucun ' +HTML += b'cookie n\\u2019est utilis\\xE9 et aucune donn\\xE9e n\\u2019est ' +HTML += b'transmise vers ou depuis le serveur. Votre activit\\xE9 sur c' +HTML += b'e site reste enti\\xE8rement priv\\xE9e et locale sur votre ap' +HTML += b'pareil."},oe={en:"You have a limited time to complete this q' +HTML += b'uiz. The countdown, displayed in minutes, is visible at the ' +HTML += b"top-left of the screen. When you're ready to begin, simply p" +HTML += b'ress the Start button.",de:"Die Zeit f\\xFCr dieses Quiz ist ' +HTML += b'begrenzt. Der Countdown, in Minuten angezeigt, l\\xE4uft oben' +HTML += b' links auf dem Bildschirm. Mit dem Start-Button beginnt das ' +HTML += b'Quiz.",es:"Tienes un tiempo limitado para completar este cue' +HTML += b'stionario. La cuenta regresiva, mostrada en minutos, se encu' +HTML += b'entra en la parte superior izquierda de la pantalla. Cuando ' +HTML += b'est\\xE9s listo, simplemente presiona el bot\\xF3n de inicio."' +HTML += b',it:"Hai un tempo limitato per completare questo quiz. Il co' +HTML += b'nto alla rovescia, visualizzato in minuti, \\xE8 visibile in ' +HTML += b'alto a sinistra dello schermo. Quando sei pronto, premi semp' +HTML += b'licemente il pulsante Start.",fr:"Vous disposez d\\u2019un te' +HTML += b'mps limit\\xE9 pour compl\\xE9ter ce quiz. Le compte \\xE0 rebo' +HTML += b'urs, affich\\xE9 en minutes, est visible en haut \\xE0 gauche ' +HTML += b'de l\\u2019\\xE9cran. Lorsque vous \\xEAtes pr\\xEAt, appuyez si' +HTML += b'mplement sur le bouton D\\xE9marrer."};function z(r,e=!1){let' +HTML += b' t=new Array(r);for(let s=0;s<r;s++)t[s]=s;if(e)for(let s=0;' +HTML += b's<r;s++){let i=Math.floor(Math.random()*r),l=Math.floor(Math' +HTML += b'.random()*r),o=t[i];t[i]=t[l],t[l]=o}return t}f(z,"range");f' +HTML += b'unction N(r,e,t=-1){if(t<0&&(t=r.length),t==1){e.push([...r]' +HTML += b');return}for(let s=0;s<t;s++){N(r,e,t-1);let i=t%2==0?s:0,l=' +HTML += b'r[i];r[i]=r[t-1],r[t-1]=l}}f(N,"heapsAlgorithm");var E=class' +HTML += b' r{static{f(this,"Matrix")}constructor(e,t){this.m=e,this.n=' +HTML += b't,this.v=new Array(e*t).fill("0")}getElement(e,t){return e<0' +HTML += b'||e>=this.m||t<0||t>=this.n?"":this.v[e*this.n+t]}resize(e,t' +HTML += b',s){if(e<1||e>50||t<1||t>50)return!1;let i=new r(e,t);i.v.fi' +HTML += b'll(s);for(let l=0;l<i.m;l++)for(let o=0;o<i.n;o++)i.v[l*i.n+' +HTML += b'o]=this.getElement(l,o);return this.fromMatrix(i),!0}fromMat' +HTML += b'rix(e){this.m=e.m,this.n=e.n,this.v=[...e.v]}fromString(e){t' +HTML += b'his.m=e.split("],").length,this.v=e.replaceAll("[","").repla' +HTML += b'ceAll("]","").split(",").map(t=>t.trim()),this.n=this.v.leng' +HTML += b'th/this.m}getMaxCellStrlen(){let e=0;for(let t of this.v)t.l' +HTML += b'ength>e&&(e=t.length);return e}toTeXString(e=!1,t=!0){let s=' +HTML += b'"";t?s+=e?"\\\\left[\\\\begin{array}":"\\\\begin{bmatrix}":s+=e?"\\' +HTML += b'\\left(\\\\begin{array}":"\\\\begin{pmatrix}",e&&(s+="{"+"c".repe' +HTML += b'at(this.n-1)+"|c}");for(let i=0;i<this.m;i++){for(let l=0;l<' +HTML += b'this.n;l++){l>0&&(s+="&");let o=this.getElement(i,l);try{o=b' +HTML += b'.parse(o).toTexString()}catch{}s+=o}s+="\\\\\\\\"}return t?s+=e?' +HTML += b'"\\\\end{array}\\\\right]":"\\\\end{bmatrix}":s+=e?"\\\\end{array}\\\\' +HTML += b'right)":"\\\\end{pmatrix}",s}},b=class r{static{f(this,"Term")' +HTML += b'}constructor(){this.root=null,this.src="",this.token="",this' +HTML += b'.skippedWhiteSpace=!1,this.pos=0}clone(){let e=new r;return ' +HTML += b'e.root=this.root.clone(),e}getVars(e,t="",s=null){if(s==null' +HTML += b'&&(s=this.root),s.op.startsWith("var:")){let i=s.op.substrin' +HTML += b'g(4);(t.length==0||t.length>0&&i.startsWith(t))&&e.add(i)}fo' +HTML += b'r(let i of s.c)this.getVars(e,t,i)}setVars(e,t=null){t==null' +HTML += b'&&(t=this.root);for(let s of t.c)this.setVars(e,s);if(t.op.s' +HTML += b'tartsWith("var:")){let s=t.op.substring(4);if(s in e){let i=' +HTML += b'e[s].clone();t.op=i.op,t.c=i.c,t.re=i.re,t.im=i.im}}}renameV' +HTML += b'ar(e,t,s=null){s==null&&(s=this.root);for(let i of s.c)this.' +HTML += b'renameVar(e,t,i);s.op.startsWith("var:")&&s.op.substring(4)=' +HTML += b'==e&&(s.op="var:"+t)}eval(e,t=null){let i=a.const(),l=0,o=0,' +HTML += b'c=null;switch(t==null&&(t=this.root),t.op){case"const":i=t;b' +HTML += b'reak;case"+":case"-":case"*":case"/":case"^":{let n=this.eva' +HTML += b'l(e,t.c[0]),h=this.eval(e,t.c[1]);switch(t.op){case"+":i.re=' +HTML += b'n.re+h.re,i.im=n.im+h.im;break;case"-":i.re=n.re-h.re,i.im=n' +HTML += b'.im-h.im;break;case"*":i.re=n.re*h.re-n.im*h.im,i.im=n.re*h.' +HTML += b'im+n.im*h.re;break;case"/":l=h.re*h.re+h.im*h.im,i.re=(n.re*' +HTML += b'h.re+n.im*h.im)/l,i.im=(n.im*h.re-n.re*h.im)/l;break;case"^"' +HTML += b':c=new a("exp",[new a("*",[h,new a("ln",[n])])]),i=this.eval' +HTML += b'(e,c);break}break}case".-":case"abs":case"acos":case"acosh":' +HTML += b'case"asin":case"asinh":case"atan":case"atanh":case"ceil":cas' +HTML += b'e"cos":case"cosh":case"cot":case"exp":case"floor":case"ln":c' +HTML += b'ase"log":case"log10":case"log2":case"round":case"sin":case"s' +HTML += b'inc":case"sinh":case"sqrt":case"tan":case"tanh":{let n=this.' +HTML += b'eval(e,t.c[0]);switch(t.op){case".-":i.re=-n.re,i.im=-n.im;b' +HTML += b'reak;case"abs":i.re=Math.sqrt(n.re*n.re+n.im*n.im),i.im=0;br' +HTML += b'eak;case"acos":c=new a("*",[a.const(0,-1),new a("ln",[new a(' +HTML += b'"+",[a.const(0,1),new a("sqrt",[new a("-",[a.const(1,0),new ' +HTML += b'a("*",[n,n])])])])])]),i=this.eval(e,c);break;case"acosh":c=' +HTML += b'new a("*",[n,new a("sqrt",[new a("-",[new a("*",[n,n]),a.con' +HTML += b'st(1,0)])])]),i=this.eval(e,c);break;case"asin":c=new a("*",' +HTML += b'[a.const(0,-1),new a("ln",[new a("+",[new a("*",[a.const(0,1' +HTML += b'),n]),new a("sqrt",[new a("-",[a.const(1,0),new a("*",[n,n])' +HTML += b'])])])])]),i=this.eval(e,c);break;case"asinh":c=new a("*",[n' +HTML += b',new a("sqrt",[new a("+",[new a("*",[n,n]),a.const(1,0)])])]' +HTML += b'),i=this.eval(e,c);break;case"atan":c=new a("*",[a.const(0,.' +HTML += b'5),new a("ln",[new a("/",[new a("-",[a.const(0,1),new a("*",' +HTML += b'[a.const(0,1),n])]),new a("+",[a.const(0,1),new a("*",[a.con' +HTML += b'st(0,1),n])])])])]),i=this.eval(e,c);break;case"atanh":c=new' +HTML += b' a("*",[a.const(.5,0),new a("ln",[new a("/",[new a("+",[a.co' +HTML += b'nst(1,0),n]),new a("-",[a.const(1,0),n])])])]),i=this.eval(e' +HTML += b',c);break;case"ceil":i.re=Math.ceil(n.re),i.im=Math.ceil(n.i' +HTML += b'm);break;case"cos":i.re=Math.cos(n.re)*Math.cosh(n.im),i.im=' +HTML += b'-Math.sin(n.re)*Math.sinh(n.im);break;case"cosh":c=new a("*"' +HTML += b',[a.const(.5,0),new a("+",[new a("exp",[n]),new a("exp",[new' +HTML += b' a(".-",[n])])])]),i=this.eval(e,c);break;case"cot":l=Math.s' +HTML += b'in(n.re)*Math.sin(n.re)+Math.sinh(n.im)*Math.sinh(n.im),i.re' +HTML += b'=Math.sin(n.re)*Math.cos(n.re)/l,i.im=-(Math.sinh(n.im)*Math' +HTML += b'.cosh(n.im))/l;break;case"exp":i.re=Math.exp(n.re)*Math.cos(' +HTML += b'n.im),i.im=Math.exp(n.re)*Math.sin(n.im);break;case"floor":i' +HTML += b'.re=Math.floor(n.re),i.im=Math.floor(n.im);break;case"ln":ca' +HTML += b'se"log":i.re=Math.log(Math.sqrt(n.re*n.re+n.im*n.im)),l=Math' +HTML += b'.abs(n.im)<1e-9?0:n.im,i.im=Math.atan2(l,n.re);break;case"lo' +HTML += b'g10":c=new a("/",[new a("ln",[n]),new a("ln",[a.const(10)])]' +HTML += b'),i=this.eval(e,c);break;case"log2":c=new a("/",[new a("ln",' +HTML += b'[n]),new a("ln",[a.const(2)])]),i=this.eval(e,c);break;case"' +HTML += b'round":i.re=Math.round(n.re),i.im=Math.round(n.im);break;cas' +HTML += b'e"sin":i.re=Math.sin(n.re)*Math.cosh(n.im),i.im=Math.cos(n.r' +HTML += b'e)*Math.sinh(n.im);break;case"sinc":c=new a("/",[new a("sin"' +HTML += b',[n]),n]),i=this.eval(e,c);break;case"sinh":c=new a("*",[a.c' +HTML += b'onst(.5,0),new a("-",[new a("exp",[n]),new a("exp",[new a(".' +HTML += b'-",[n])])])]),i=this.eval(e,c);break;case"sqrt":c=new a("^",' +HTML += b'[n,a.const(.5)]),i=this.eval(e,c);break;case"tan":l=Math.cos' +HTML += b'(n.re)*Math.cos(n.re)+Math.sinh(n.im)*Math.sinh(n.im),i.re=M' +HTML += b'ath.sin(n.re)*Math.cos(n.re)/l,i.im=Math.sinh(n.im)*Math.cos' +HTML += b'h(n.im)/l;break;case"tanh":c=new a("/",[new a("-",[new a("ex' +HTML += b'p",[n]),new a("exp",[new a(".-",[n])])]),new a("+",[new a("e' +HTML += b'xp",[n]),new a("exp",[new a(".-",[n])])])]),i=this.eval(e,c)' +HTML += b';break}break}default:if(t.op.startsWith("var:")){let n=t.op.' +HTML += b'substring(4);if(n==="pi")return a.const(Math.PI);if(n==="e")' +HTML += b'return a.const(Math.E);if(n==="i")return a.const(0,1);if(n==' +HTML += b'="true")return a.const(1);if(n==="false")return a.const(0);i' +HTML += b'f(n in e)return e[n];throw new Error("eval-error: unknown va' +HTML += b'riable \'"+n+"\'")}else throw new Error("UNIMPLEMENTED eval \'"' +HTML += b'+t.op+"\'")}return i}static parse(e){let t=new r;if(t.src=e,t' +HTML += b'.token="",t.skippedWhiteSpace=!1,t.pos=0,t.next(),t.root=t.p' +HTML += b'arseExpr(!1),t.token!=="")throw new Error("remaining tokens:' +HTML += b' "+t.token+"...");return t}parseExpr(e){return this.parseAdd' +HTML += b'(e)}parseAdd(e){let t=this.parseMul(e);for(;["+","-"].includ' +HTML += b'es(this.token)&&!(e&&this.skippedWhiteSpace);){let s=this.to' +HTML += b'ken;this.next(),t=new a(s,[t,this.parseMul(e)])}return t}par' +HTML += b'seMul(e){let t=this.parsePow(e);for(;!(e&&this.skippedWhiteS' +HTML += b'pace);){let s="*";if(["*","/"].includes(this.token))s=this.t' +HTML += b'oken,this.next();else if(!e&&this.token==="(")s="*";else if(' +HTML += b'this.token.length>0&&(this.isAlpha(this.token[0])||this.isNu' +HTML += b'm(this.token[0])))s="*";else break;t=new a(s,[t,this.parsePo' +HTML += b'w(e)])}return t}parsePow(e){let t=this.parseUnary(e);for(;["' +HTML += b'^"].includes(this.token)&&!(e&&this.skippedWhiteSpace);){let' +HTML += b' s=this.token;this.next(),t=new a(s,[t,this.parseUnary(e)])}' +HTML += b'return t}parseUnary(e){return this.token==="-"?(this.next(),' +HTML += b'new a(".-",[this.parseMul(e)])):this.parseInfix(e)}parseInfi' +HTML += b'x(e){if(this.token.length==0)throw new Error("expected unary' +HTML += b'");if(this.isNum(this.token[0])){let t=this.token;return thi' +HTML += b's.next(),this.token==="."&&(t+=".",this.next(),this.token.le' +HTML += b'ngth>0&&(t+=this.token,this.next())),new a("const",[],parseF' +HTML += b'loat(t))}else if(this.fun1().length>0){let t=this.fun1();thi' +HTML += b's.next(t.length);let s=null;if(this.token==="(")if(this.next' +HTML += b'(),s=this.parseExpr(e),this.token+="",this.token===")")this.' +HTML += b'next();else throw Error("expected \')\'");else s=this.parseMul' +HTML += b'(!0);return new a(t,[s])}else if(this.token==="("){this.next' +HTML += b'();let t=this.parseExpr(e);if(this.token+="",this.token===")' +HTML += b'")this.next();else throw Error("expected \')\'");return t.expl' +HTML += b'icitParentheses=!0,t}else if(this.token==="|"){this.next();l' +HTML += b'et t=this.parseExpr(e);if(this.token+="",this.token==="|")th' +HTML += b'is.next();else throw Error("expected \'|\'");return new a("abs' +HTML += b'",[t])}else if(this.isAlpha(this.token[0])){let t="";return ' +HTML += b'this.token.startsWith("pi")?t="pi":this.token.startsWith("tr' +HTML += b'ue")?t="true":this.token.startsWith("false")?t="false":this.' +HTML += b'token.startsWith("C1")?t="C1":this.token.startsWith("C2")?t=' +HTML += b'"C2":t=this.token[0],t==="I"&&(t="i"),this.next(t.length),ne' +HTML += b'w a("var:"+t,[])}else throw new Error("expected unary")}stat' +HTML += b'ic compare(e,t,s={}){let o=new Set;e.getVars(o),t.getVars(o)' +HTML += b';for(let c=0;c<10;c++){let n={};for(let g of o)g in s?n[g]=s' +HTML += b'[g]:n[g]=a.const(Math.random(),Math.random());let h=e.eval(n' +HTML += b'),p=t.eval(n),m=h.re-p.re,d=h.im-p.im;if(Math.sqrt(m*m+d*d)>' +HTML += b'1e-9)return!1}return!0}fun1(){let e=["abs","acos","acosh","a' +HTML += b'sin","asinh","atan","atanh","ceil","cos","cosh","cot","exp",' +HTML += b'"floor","ln","log","log10","log2","round","sin","sinc","sinh' +HTML += b'","sqrt","tan","tanh"];for(let t of e)if(this.token.toLowerC' +HTML += b'ase().startsWith(t))return t;return""}next(e=-1){if(e>0&&thi' +HTML += b's.token.length>e){this.token=this.token.substring(e),this.sk' +HTML += b'ippedWhiteSpace=!1;return}this.token="";let t=!1,s=this.src.' +HTML += b'length;for(this.skippedWhiteSpace=!1;this.pos<s&&`\t\n `.inclu' +HTML += b'des(this.src[this.pos]);)this.skippedWhiteSpace=!0,this.pos+' +HTML += b'+;for(;!t&&this.pos<s;){let i=this.src[this.pos];if(this.tok' +HTML += b'en.length>0&&(this.isNum(this.token[0])&&this.isAlpha(i)||th' +HTML += b'is.isAlpha(this.token[0])&&this.isNum(i))&&this.token!="C")r' +HTML += b'eturn;if(`^%#*$()[]{},.:;+-*/_!<>=?|\t\n `.includes(i)){if(thi' +HTML += b's.token.length>0)return;t=!0}`\t\n `.includes(i)==!1&&(this.to' +HTML += b'ken+=i),this.pos++}}isNum(e){return e.charCodeAt(0)>=48&&e.c' +HTML += b'harCodeAt(0)<=57}isAlpha(e){return e.charCodeAt(0)>=65&&e.ch' +HTML += b'arCodeAt(0)<=90||e.charCodeAt(0)>=97&&e.charCodeAt(0)<=122||' +HTML += b'e==="_"}toString(){return this.root==null?"":this.root.toStr' +HTML += b'ing()}toTexString(){return this.root==null?"":this.root.toTe' +HTML += b'xString()}},a=class r{static{f(this,"TermNode")}constructor(' +HTML += b'e,t,s=0,i=0){this.op=e,this.c=t,this.re=s,this.im=i,this.exp' +HTML += b'licitParentheses=!1}clone(){let e=new r(this.op,this.c.map(t' +HTML += b'=>t.clone()),this.re,this.im);return e.explicitParentheses=t' +HTML += b'his.explicitParentheses,e}static const(e=0,t=0){return new r' +HTML += b'("const",[],e,t)}compare(e,t=0,s=1e-9){let i=this.re-e,l=thi' +HTML += b's.im-t;return Math.sqrt(i*i+l*l)<s}toString(){let e="";if(th' +HTML += b'is.op==="const"){let t=Math.abs(this.re)>1e-14,s=Math.abs(th' +HTML += b'is.im)>1e-14;t&&s&&this.im>=0?e="("+this.re+"+"+this.im+"i)"' +HTML += b':t&&s&&this.im<0?e="("+this.re+"-"+-this.im+"i)":t&&this.re>' +HTML += b'0?e=""+this.re:t&&this.re<0?e="("+this.re+")":s?e="("+this.i' +HTML += b'm+"i)":e="0"}else this.op.startsWith("var")?e=this.op.split(' +HTML += b'":")[1]:this.c.length==1?e=(this.op===".-"?"-":this.op)+"("+' +HTML += b'this.c.toString()+")":e="("+this.c.map(t=>t.toString()).join' +HTML += b'(this.op)+")";return e}toTexString(e=!1){let s="";switch(thi' +HTML += b's.op){case"const":{let i=Math.abs(this.re)>1e-9,l=Math.abs(t' +HTML += b'his.im)>1e-9,o=i?""+this.re:"",c=l?""+this.im+"i":"";c==="1i' +HTML += b'"?c="i":c==="-1i"&&(c="-i"),!i&&!l?s="0":(l&&this.im>=0&&i&&' +HTML += b'(c="+"+c),s=o+c);break}case".-":s="-"+this.c[0].toTexString(' +HTML += b');break;case"+":case"-":case"*":case"^":{let i=this.c[0].toT' +HTML += b'exString(),l=this.c[1].toTexString(),o=this.op==="*"?"\\\\cdot' +HTML += b' ":this.op;s="{"+i+"}"+o+"{"+l+"}";break}case"/":{let i=this' +HTML += b'.c[0].toTexString(!0),l=this.c[1].toTexString(!0);s="\\\\frac{' +HTML += b'"+i+"}{"+l+"}";break}case"floor":{let i=this.c[0].toTexStrin' +HTML += b'g(!0);s+="\\\\"+this.op+"\\\\left\\\\lfloor"+i+"\\\\right\\\\rfloor";b' +HTML += b'reak}case"ceil":{let i=this.c[0].toTexString(!0);s+="\\\\"+thi' +HTML += b's.op+"\\\\left\\\\lceil"+i+"\\\\right\\\\rceil";break}case"round":{l' +HTML += b'et i=this.c[0].toTexString(!0);s+="\\\\"+this.op+"\\\\left["+i+"' +HTML += b'\\\\right]";break}case"acos":case"acosh":case"asin":case"asinh' +HTML += b'":case"atan":case"atanh":case"cos":case"cosh":case"cot":case' +HTML += b'"exp":case"ln":case"log":case"log10":case"log2":case"sin":ca' +HTML += b'se"sinc":case"sinh":case"tan":case"tanh":{let i=this.c[0].to' +HTML += b'TexString(!0);s+="\\\\"+this.op+"\\\\left("+i+"\\\\right)";break}c' +HTML += b'ase"sqrt":{let i=this.c[0].toTexString(!0);s+="\\\\"+this.op+"' +HTML += b'{"+i+"}";break}case"abs":{let i=this.c[0].toTexString(!0);s+' +HTML += b'="\\\\left|"+i+"\\\\right|";break}default:if(this.op.startsWith(' +HTML += b'"var:")){let i=this.op.substring(4);switch(i){case"pi":i="\\\\' +HTML += b'pi";break}s=" "+i+" "}else{let i="warning: Node.toString(..)' +HTML += b':";i+=" unimplemented operator \'"+this.op+"\'",console.log(i)' +HTML += b',s=this.op,this.c.length>0&&(s+="\\\\left({"+this.c.map(l=>l.t' +HTML += b'oTexString(!0)).join(",")+"}\\\\right)")}}return!e&&this.expli' +HTML += b'citParentheses&&(s="\\\\left({"+s+"}\\\\right)"),s}};function ce' +HTML += b'(r,e){let t=1e-9;if(b.compare(r,e))return!0;r=r.clone(),e=e.' +HTML += b'clone(),_(r.root),_(e.root);let s=new Set;r.getVars(s),e.get' +HTML += b'Vars(s);let i=[],l=[];for(let n of s.keys())n.startsWith("C"' +HTML += b')?i.push(n):l.push(n);let o=i.length;for(let n=0;n<o;n++){le' +HTML += b't h=i[n];r.renameVar(h,"_C"+n),e.renameVar(h,"_C"+n)}for(let' +HTML += b' n=0;n<o;n++)r.renameVar("_C"+n,"C"+n),e.renameVar("_C"+n,"C' +HTML += b'"+n);i=[];for(let n=0;n<o;n++)i.push("C"+n);let c=[];N(z(o),' +HTML += b'c);for(let n of c){let h=r.clone(),p=e.clone();for(let d=0;d' +HTML += b'<o;d++)p.renameVar("C"+d,"__C"+n[d]);for(let d=0;d<o;d++)p.r' +HTML += b'enameVar("__C"+d,"C"+d);let m=!0;for(let d=0;d<o;d++){let u=' +HTML += b'"C"+d,g={};g[u]=new a("*",[new a("var:C"+d,[]),new a("var:K"' +HTML += b',[])]),p.setVars(g);let v={};v[u]=a.const(Math.random(),Math' +HTML += b'.random());for(let y=0;y<o;y++)d!=y&&(v["C"+y]=a.const(0,0))' +HTML += b';let M=new a("abs",[new a("-",[h.root,p.root])]),S=new b;S.r' +HTML += b'oot=M;for(let y of l)v[y]=a.const(Math.random(),Math.random(' +HTML += b'));let C=ve(S,"K",v)[0];p.setVars({K:a.const(C,0)}),v={};for' +HTML += b'(let y=0;y<o;y++)d!=y&&(v["C"+y]=a.const(0,0));if(b.compare(' +HTML += b'h,p,v)==!1){m=!1;break}}if(m&&b.compare(h,p))return!0}return' +HTML += b'!1}f(ce,"compareODE");function ve(r,e,t){let s=1e-11,i=1e3,l' +HTML += b'=0,o=0,c=1,n=888;for(;l<i;){t[e]=a.const(o);let p=r.eval(t).' +HTML += b're;t[e]=a.const(o+c);let m=r.eval(t).re;t[e]=a.const(o-c);le' +HTML += b't d=r.eval(t).re,u=0;if(m<p&&(p=m,u=1),d<p&&(p=d,u=-1),u==1&' +HTML += b'&(o+=c),u==-1&&(o-=c),p<s)break;(u==0||u!=n)&&(c/=2),n=u,l++' +HTML += b'}t[e]=a.const(o);let h=r.eval(t).re;return[o,h]}f(ve,"minimi' +HTML += b'ze");function _(r){for(let e of r.c)_(e);switch(r.op){case"+' +HTML += b'":case"-":case"*":case"/":case"^":{let e=[r.c[0].op,r.c[1].o' +HTML += b'p],t=[e[0]==="const",e[1]==="const"],s=[e[0].startsWith("var' +HTML += b':C"),e[1].startsWith("var:C")];s[0]&&t[1]?(r.op=r.c[0].op,r.' +HTML += b'c=[]):s[1]&&t[0]?(r.op=r.c[1].op,r.c=[]):s[0]&&s[1]&&e[0]==e' +HTML += b'[1]&&(r.op=r.c[0].op,r.c=[]);break}case".-":case"abs":case"s' +HTML += b'in":case"sinc":case"cos":case"tan":case"cot":case"exp":case"' +HTML += b'ln":case"log":case"sqrt":r.c[0].op.startsWith("var:C")&&(r.o' +HTML += b'p=r.c[0].op,r.c=[]);break}}f(_,"prepareODEconstantComparison' +HTML += b'");var B=class{static{f(this,"GapInput")}constructor(e,t,s,i' +HTML += b'){this.question=t,this.inputId=s,s.length==0&&(this.inputId=' +HTML += b's="gap-"+t.gapIdx,t.types[this.inputId]="string",t.expected[' +HTML += b'this.inputId]=i,t.gapIdx++),s in t.student||(t.student[s]=""' +HTML += b');let l=i.split("|"),o=0;for(let p=0;p<l.length;p++){let m=l' +HTML += b'[p];m.length>o&&(o=m.length)}let c=k("");e.appendChild(c);le' +HTML += b't n=Math.max(o*15,24),h=W(n);if(t.gapInputs[this.inputId]=h,' +HTML += b'h.addEventListener("keyup",()=>{t.editingEnabled!=!1&&(this.' +HTML += b'question.editedQuestion(),h.value=h.value.toUpperCase(),this' +HTML += b'.question.student[this.inputId]=h.value.trim())}),c.appendCh' +HTML += b'ild(h),this.question.showSolution&&(this.question.student[th' +HTML += b'is.inputId]=h.value=l[0],l.length>1)){let p=k("["+l.join("|"' +HTML += b')+"]");p.style.fontSize="small",p.style.textDecoration="unde' +HTML += b'rline",c.appendChild(p)}}},I=class{static{f(this,"TermInput"' +HTML += b')}constructor(e,t,s,i,l,o,c=!1){s in t.student||(t.student[s' +HTML += b']=""),this.question=t,this.inputId=s,this.outerSpan=k(""),th' +HTML += b'is.outerSpan.style.position="relative",e.appendChild(this.ou' +HTML += b'terSpan),this.inputElement=W(Math.max(i*12,48)),this.outerSp' +HTML += b'an.appendChild(this.inputElement),this.equationPreviewDiv=w(' +HTML += b'),this.equationPreviewDiv.classList.add("equationPreview"),t' +HTML += b'his.equationPreviewDiv.style.display="none",this.outerSpan.a' +HTML += b'ppendChild(this.equationPreviewDiv),this.inputElement.addEve' +HTML += b'ntListener("click",()=>{t.editingEnabled!=!1&&(this.question' +HTML += b'.editedQuestion(),this.edited())}),this.inputElement.addEven' +HTML += b'tListener("keyup",()=>{t.editingEnabled!=!1&&(this.question.' +HTML += b'editedQuestion(),this.edited())}),this.inputElement.addEvent' +HTML += b'Listener("focus",()=>{t.editingEnabled!=!1}),this.inputEleme' +HTML += b'nt.addEventListener("focusout",()=>{this.equationPreviewDiv.' +HTML += b'innerHTML="",this.equationPreviewDiv.style.display="none"}),' +HTML += b'this.inputElement.addEventListener("keydown",n=>{if(t.editin' +HTML += b'gEnabled==!1){n.preventDefault();return}let h="abcdefghijklm' +HTML += b'nopqrstuvwxyz";h+="ABCDEFGHIJKLMNOPQRSTUVWXYZ",h+="012345678' +HTML += b'9",h+="+-*/^(). <>=|",o&&(h="-0123456789"),n.key.length<3&&h' +HTML += b'.includes(n.key)==!1&&n.preventDefault();let p=this.inputEle' +HTML += b'ment.value.length*12;this.inputElement.offsetWidth<p&&(this.' +HTML += b'inputElement.style.width=""+p+"px")}),(c||this.question.show' +HTML += b'Solution)&&(t.student[s]=this.inputElement.value=l)}edited()' +HTML += b'{let e=this.inputElement.value.trim(),t="",s=!1;try{let i=b.' +HTML += b'parse(e);s=i.root.op==="const",t=i.toTexString(),this.inputE' +HTML += b'lement.style.color="black",this.equationPreviewDiv.style.bac' +HTML += b'kgroundColor="green"}catch{t=e.replaceAll("^","\\\\hat{~}").re' +HTML += b'placeAll("_","\\\\_"),this.inputElement.style.color="maroon",t' +HTML += b'his.equationPreviewDiv.style.backgroundColor="maroon"}Q(this' +HTML += b'.equationPreviewDiv,t,!0),this.equationPreviewDiv.style.disp' +HTML += b'lay=e.length>0&&!s?"block":"none",this.question.student[this' +HTML += b'.inputId]=e}},H=class{static{f(this,"MatrixInput")}construct' +HTML += b'or(e,t,s,i){this.parent=e,this.question=t,this.inputId=s,thi' +HTML += b's.matExpected=new E(0,0),this.matExpected.fromString(i),this' +HTML += b'.matStudent=new E(this.matExpected.m==1?1:3,this.matExpected' +HTML += b'.n==1?1:3),t.showSolution&&this.matStudent.fromMatrix(this.m' +HTML += b'atExpected),this.genMatrixDom(!0)}genMatrixDom(e){let t=w();' +HTML += b'this.parent.innerHTML="",this.parent.appendChild(t),t.style.' +HTML += b'position="relative",t.style.display="inline-block";let s=doc' +HTML += b'ument.createElement("table");t.appendChild(s);let i=this.mat' +HTML += b'Expected.getMaxCellStrlen();for(let u=0;u<this.matStudent.m;' +HTML += b'u++){let g=document.createElement("tr");s.appendChild(g),u==' +HTML += b'0&&g.appendChild(this.generateMatrixParenthesis(!0,this.matS' +HTML += b'tudent.m));for(let v=0;v<this.matStudent.n;v++){let M=u*this' +HTML += b'.matStudent.n+v,S=document.createElement("td");g.appendChild' +HTML += b'(S);let C=this.inputId+"-"+M;new I(S,this.question,C,i,this.' +HTML += b'matStudent.v[M],!1,!e)}u==0&&g.appendChild(this.generateMatr' +HTML += b'ixParenthesis(!1,this.matStudent.m))}let l=["+","-","+","-"]' +HTML += b',o=[0,0,1,-1],c=[1,-1,0,0],n=[0,22,888,888],h=[888,888,-22,-' +HTML += b'22],p=[-22,-22,0,22],m=[this.matExpected.n!=1,this.matExpect' +HTML += b'ed.n!=1,this.matExpected.m!=1,this.matExpected.m!=1],d=[this' +HTML += b'.matStudent.n>=10,this.matStudent.n<=1,this.matStudent.m>=10' +HTML += b',this.matStudent.m<=1];for(let u=0;u<4;u++){if(m[u]==!1)cont' +HTML += b'inue;let g=k(l[u]);n[u]!=888&&(g.style.top=""+n[u]+"px"),h[u' +HTML += b']!=888&&(g.style.bottom=""+h[u]+"px"),p[u]!=888&&(g.style.ri' +HTML += b'ght=""+p[u]+"px"),g.classList.add("matrixResizeButton"),t.ap' +HTML += b'pendChild(g),d[u]?g.style.opacity="0.5":g.addEventListener("' +HTML += b'click",()=>{for(let v=0;v<this.matStudent.m;v++)for(let M=0;' +HTML += b'M<this.matStudent.n;M++){let S=v*this.matStudent.n+M,C=this.' +HTML += b'inputId+"-"+S,T=this.question.student[C];this.matStudent.v[S' +HTML += b']=T,delete this.question.student[C]}this.matStudent.resize(t' +HTML += b'his.matStudent.m+o[u],this.matStudent.n+c[u],""),this.genMat' +HTML += b'rixDom(!1)})}}generateMatrixParenthesis(e,t){let s=document.' +HTML += b'createElement("td");s.style.width="3px";for(let i of["Top",e' +HTML += b'?"Left":"Right","Bottom"])s.style["border"+i+"Width"]="2px",' +HTML += b's.style["border"+i+"Style"]="solid";return this.question.lan' +HTML += b'guage=="de"&&(e?s.style.borderTopLeftRadius="5px":s.style.bo' +HTML += b'rderTopRightRadius="5px",e?s.style.borderBottomLeftRadius="5' +HTML += b'px":s.style.borderBottomRightRadius="5px"),s.rowSpan=t,s}};v' +HTML += b'ar x={init:0,errors:1,passed:2,incomplete:3},V=class{static{' +HTML += b'f(this,"Question")}constructor(e,t,s,i){this.state=x.init,th' +HTML += b'is.language=s,this.src=t,this.debug=i,this.instanceOrder=z(t' +HTML += b'.instances.length,!0),this.instanceIdx=0,this.choiceIdx=0,th' +HTML += b'is.includesSingleChoice=!1,this.gapIdx=0,this.expected={},th' +HTML += b'is.types={},this.student={},this.gapInputs={},this.parentDiv' +HTML += b'=e,this.questionDiv=null,this.feedbackPopupDiv=null,this.tit' +HTML += b'leDiv=null,this.checkAndRepeatBtn=null,this.showSolution=!1,' +HTML += b'this.feedbackSpan=null,this.numCorrect=0,this.numChecked=0,t' +HTML += b'his.hasCheckButton=!0,this.editingEnabled=!0}reset(){this.ga' +HTML += b'pIdx=0,this.choiceIdx=0,this.instanceIdx=(this.instanceIdx+1' +HTML += b')%this.src.instances.length}getCurrentInstance(){let e=this.' +HTML += b'instanceOrder[this.instanceIdx];return this.src.instances[e]' +HTML += b'}editedQuestion(){this.state=x.init,this.updateVisualQuestio' +HTML += b'nState(),this.questionDiv.style.color="black",this.checkAndR' +HTML += b'epeatBtn.innerHTML=P,this.checkAndRepeatBtn.style.display="b' +HTML += b'lock",this.checkAndRepeatBtn.style.color="black"}updateVisua' +HTML += b'lQuestionState(){let e="black",t="transparent";switch(this.s' +HTML += b'tate){case x.init:e="black";break;case x.passed:e="var(--gre' +HTML += b'en)",t="rgba(0,150,0, 0.035)";break;case x.incomplete:case x' +HTML += b'.errors:e="var(--red)",t="rgba(150,0,0, 0.035)",this.include' +HTML += b'sSingleChoice==!1&&this.numChecked>=5&&(this.feedbackSpan.in' +HTML += b'nerHTML="  "+this.numCorrect+" / "+this.numChecked' +HTML += b');break}this.questionDiv.style.backgroundColor=t,this.questi' +HTML += b'onDiv.style.borderColor=e}populateDom(e=!1){if(this.parentDi' +HTML += b'v.innerHTML="",this.questionDiv=w(),this.parentDiv.appendChi' +HTML += b'ld(this.questionDiv),this.questionDiv.classList.add("questio' +HTML += b'n"),this.feedbackPopupDiv=w(),this.feedbackPopupDiv.classLis' +HTML += b't.add("questionFeedback"),this.questionDiv.appendChild(this.' +HTML += b'feedbackPopupDiv),this.feedbackPopupDiv.innerHTML="awesome",' +HTML += b'this.debug&&"src_line"in this.src){let i=w();i.classList.add' +HTML += b'("debugInfo"),i.innerHTML="Source code: lines "+this.src.src' +HTML += b'_line+"..",this.questionDiv.appendChild(i)}if(this.titleDiv=' +HTML += b'w(),this.questionDiv.appendChild(this.titleDiv),this.titleDi' +HTML += b'v.classList.add("questionTitle"),this.titleDiv.innerHTML=thi' +HTML += b's.src.title,this.src.error.length>0){let i=k(this.src.error)' +HTML += b';this.questionDiv.appendChild(i),i.style.color="red";return}' +HTML += b'let t=this.getCurrentInstance();if(t!=null&&"__svg_image"in ' +HTML += b't){let i=t.__svg_image.v,l=w();this.questionDiv.appendChild(' +HTML += b'l);let o=document.createElement("img");l.appendChild(o),o.cl' +HTML += b'assList.add("img"),o.src="data:image/svg+xml;base64,"+i}for(' +HTML += b'let i of this.src.text.c)this.questionDiv.appendChild(this.g' +HTML += b'enerateText(i));let s=w();if(s.innerHTML="",s.classList.add(' +HTML += b'"button-group"),this.questionDiv.appendChild(s),this.hasChec' +HTML += b'kButton=Object.keys(this.expected).length>0,this.hasCheckBut' +HTML += b'ton&&(this.checkAndRepeatBtn=F(),s.appendChild(this.checkAnd' +HTML += b'RepeatBtn),this.checkAndRepeatBtn.innerHTML=P,this.checkAndR' +HTML += b'epeatBtn.style.backgroundColor="black",e&&(this.checkAndRepe' +HTML += b'atBtn.style.height="0",this.checkAndRepeatBtn.style.visibili' +HTML += b'ty="hidden")),this.feedbackSpan=k(""),this.feedbackSpan.styl' +HTML += b'e.userSelect="none",s.appendChild(this.feedbackSpan),this.de' +HTML += b'bug){if(this.src.variables.length>0){let o=w();o.classList.a' +HTML += b'dd("debugInfo"),o.innerHTML="Variables generated by Python C' +HTML += b'ode",this.questionDiv.appendChild(o);let c=w();c.classList.a' +HTML += b'dd("debugCode"),this.questionDiv.appendChild(c);let n=this.g' +HTML += b'etCurrentInstance(),h="",p=[...this.src.variables];p.sort();' +HTML += b'for(let m of p){let d=n[m].t,u=n[m].v;switch(d){case"vector"' +HTML += b':u="["+u+"]";break;case"set":u="{"+u+"}";break}h+=d+" "+m+" ' +HTML += b'= "+u+"<br/>"}c.innerHTML=h}let i=["python_src_html","text_s' +HTML += b'rc_html"],l=["Python Source Code","Text Source Code"];for(le' +HTML += b't o=0;o<i.length;o++){let c=i[o];if(c in this.src&&this.src[' +HTML += b'c].length>0){let n=w();n.classList.add("debugInfo"),n.innerH' +HTML += b'TML=l[o],this.questionDiv.appendChild(n);let h=w();h.classLi' +HTML += b'st.add("debugCode"),this.questionDiv.append(h),h.innerHTML=t' +HTML += b'his.src[c]}}}this.hasCheckButton&&this.checkAndRepeatBtn.add' +HTML += b'EventListener("click",()=>{this.state==x.passed?(this.state=' +HTML += b'x.init,this.editingEnabled=!0,this.reset(),this.populateDom(' +HTML += b')):R(this)})}generateMathString(e){let t="";switch(e.t){case' +HTML += b'"math":case"display-math":for(let s of e.c){let i=this.gener' +HTML += b'ateMathString(s);s.t==="var"&&t.includes("!PM")&&(i.startsWi' +HTML += b'th("{-")?(i="{"+i.substring(2),t=t.replaceAll("!PM","-")):t=' +HTML += b't.replaceAll("!PM","+")),t+=i}break;case"text":return e.d;ca' +HTML += b'se"plus_minus":{t+=" !PM ";break}case"var":{let s=this.getCu' +HTML += b'rrentInstance(),i=s[e.d].t,l=s[e.d].v;switch(i){case"vector"' +HTML += b':return"\\\\left["+l+"\\\\right]";case"set":return"\\\\left\\\\{"+l+' +HTML += b'"\\\\right\\\\}";case"complex":{let o=l.split(","),c=parseFloat(' +HTML += b'o[0]),n=parseFloat(o[1]);return a.const(c,n).toTexString()}c' +HTML += b'ase"matrix":{let o=new E(0,0);return o.fromString(l),t=o.toT' +HTML += b'eXString(e.d.includes("augmented"),this.language!="de"),t}ca' +HTML += b'se"term":{try{t=b.parse(l).toTexString()}catch{}break}defaul' +HTML += b't:t=l}}}return e.t==="plus_minus"?t:"{"+t+"}"}generateText(e' +HTML += b',t=!1){switch(e.t){case"paragraph":case"span":{let s=documen' +HTML += b't.createElement(e.t=="span"||t?"span":"p");for(let i of e.c)' +HTML += b's.appendChild(this.generateText(i));return s.style.userSelec' +HTML += b't="none",s}case"text":return k(e.d);case"code":{let s=k(e.d)' +HTML += b';return s.classList.add("code"),s}case"italic":case"bold":{l' +HTML += b'et s=k("");return s.append(...e.c.map(i=>this.generateText(i' +HTML += b'))),e.t==="bold"?s.style.fontWeight="bold":s.style.fontStyle' +HTML += b'="italic",s}case"math":case"display-math":{let s=this.genera' +HTML += b'teMathString(e);return L(s,e.t==="display-math")}case"string' +HTML += b'_var":{let s=k(""),i=this.getCurrentInstance(),l=i[e.d].t,o=' +HTML += b'i[e.d].v;return l==="string"?s.innerHTML=o:(s.innerHTML="EXP' +HTML += b'ECTED VARIABLE OF TYPE STRING",s.style.color="red"),s}case"g' +HTML += b'ap":{let s=k("");return new B(s,this,"",e.d),s}case"input":c' +HTML += b'ase"input2":{let s=e.t==="input2",i=k("");i.style.verticalAl' +HTML += b'ign="text-bottom";let l=e.d,o=this.getCurrentInstance()[l];i' +HTML += b'f(this.expected[l]=o.v,this.types[l]=o.t,!s)switch(o.t){case' +HTML += b'"set":i.append(L("\\\\{"),k(" "));break;case"vector":i.append(' +HTML += b'L("["),k(" "));break}if(o.t==="string")new B(i,this,l,this.e' +HTML += b'xpected[l]);else if(o.t==="vector"||o.t==="set"){let c=o.v.s' +HTML += b'plit(","),n=c.length;for(let h=0;h<n;h++){h>0&&i.appendChild' +HTML += b'(k(" , "));let p=l+"-"+h;new I(i,this,p,c[h].length,c[h],!1)' +HTML += b'}}else if(o.t==="matrix"){let c=w();i.appendChild(c),new H(c' +HTML += b',this,l,o.v)}else if(o.t==="complex"){let c=o.v.split(",");n' +HTML += b'ew I(i,this,l+"-0",c[0].length,c[0],!1),i.append(k(" "),L("+' +HTML += b'"),k(" ")),new I(i,this,l+"-1",c[1].length,c[1],!1),i.append' +HTML += b'(k(" "),L("i"))}else{let c=o.t==="int";new I(i,this,l,o.v.le' +HTML += b'ngth,o.v,c)}if(!s)switch(o.t){case"set":i.append(k(" "),L("\\' +HTML += b'\\}"));break;case"vector":i.append(k(" "),L("]"));break}retur' +HTML += b'n i}case"itemize":return j(e.c.map(s=>O(this.generateText(s)' +HTML += b')));case"single-choice":case"multi-choice":{let s=e.t=="mult' +HTML += b'i-choice";s||(this.includesSingleChoice=!0);let i=document.c' +HTML += b'reateElement("table"),l=e.c.length,o=this.debug==!1,c=z(l,o)' +HTML += b',n=s?X:G,h=s?Z:Y,p=[],m=[];for(let d=0;d<l;d++){let u=c[d],g' +HTML += b'=e.c[u],v="mc-"+this.choiceIdx+"-"+u;m.push(v);let M=g.c[0].' +HTML += b't=="bool"?g.c[0].d:this.getCurrentInstance()[g.c[0].d].v;thi' +HTML += b's.expected[v]=M,this.types[v]="bool",this.student[v]=this.sh' +HTML += b'owSolution?M:"false";let S=this.generateText(g.c[1],!0),C=do' +HTML += b'cument.createElement("tr");i.appendChild(C),C.style.cursor="' +HTML += b'pointer";let T=document.createElement("td");p.push(T),C.appe' +HTML += b'ndChild(T),T.innerHTML=this.student[v]=="true"?n:h;let y=doc' +HTML += b'ument.createElement("td");C.appendChild(y),y.appendChild(S),' +HTML += b's?C.addEventListener("click",()=>{this.editingEnabled!=!1&&(' +HTML += b'this.editedQuestion(),this.student[v]=this.student[v]==="tru' +HTML += b'e"?"false":"true",this.student[v]==="true"?T.innerHTML=n:T.i' +HTML += b'nnerHTML=h)}):C.addEventListener("click",()=>{if(this.editin' +HTML += b'gEnabled!=!1){this.editedQuestion();for(let D of m)this.stud' +HTML += b'ent[D]="false";this.student[v]="true";for(let D=0;D<m.length' +HTML += b';D++){let U=c[D];p[U].innerHTML=this.student[m[U]]=="true"?n' +HTML += b':h}}})}return this.choiceIdx++,i}case"image":{let s=w(),l=e.' +HTML += b'd.split("."),o=l[l.length-1],c=e.c[0].d,n=e.c[1].d,h=documen' +HTML += b't.createElement("img");s.appendChild(h),h.classList.add("img' +HTML += b'"),h.style.width=c+"%";let p={svg:"svg+xml",png:"png",jpg:"j' +HTML += b'peg"};return h.src="data:image/"+p[o]+";base64,"+n,s}default' +HTML += b':{let s=k("UNIMPLEMENTED("+e.t+")");return s.style.color="re' +HTML += b'd",s}}}};function R(r){r.feedbackSpan.innerHTML="",r.numChec' +HTML += b'ked=0,r.numCorrect=0;let e=!0;for(let i in r.expected){let l' +HTML += b'=r.types[i],o=r.student[i],c=r.expected[i];switch(o!=null&&o' +HTML += b'.length==0&&(e=!1),l){case"bool":r.numChecked++,o.toLowerCas' +HTML += b'e()===c.toLowerCase()&&r.numCorrect++;break;case"string":{r.' +HTML += b'numChecked++;let n=r.gapInputs[i],h=o.trim().toUpperCase(),p' +HTML += b'=c.trim().toUpperCase().split("|"),m=!1;for(let d of p)if(K(' +HTML += b'h,d)<=1){m=!0,r.numCorrect++,r.gapInputs[i].value=d,r.studen' +HTML += b't[i]=d;break}n.style.color=m?"black":"white",n.style.backgro' +HTML += b'undColor=m?"transparent":"maroon";break}case"int":r.numCheck' +HTML += b'ed++,Math.abs(parseFloat(o)-parseFloat(c))<1e-9&&r.numCorrec' +HTML += b't++;break;case"float":case"term":{r.numChecked++;try{let n=b' +HTML += b'.parse(c),h=b.parse(o),p=!1;r.src.is_ode?p=ce(n,h):p=b.compa' +HTML += b're(n,h),p&&r.numCorrect++}catch(n){r.debug&&(console.log("te' +HTML += b'rm invalid"),console.log(n))}break}case"vector":case"complex' +HTML += b'":case"set":{let n=c.split(",");r.numChecked+=n.length;let h' +HTML += b'=[];for(let p=0;p<n.length;p++){let m=r.student[i+"-"+p];m.l' +HTML += b'ength==0&&(e=!1),h.push(m)}if(l==="set")for(let p=0;p<n.leng' +HTML += b'th;p++)try{let m=b.parse(n[p]);for(let d=0;d<h.length;d++){l' +HTML += b'et u=b.parse(h[d]);if(b.compare(m,u)){r.numCorrect++;break}}' +HTML += b'}catch(m){r.debug&&console.log(m)}else for(let p=0;p<n.lengt' +HTML += b'h;p++)try{let m=b.parse(h[p]),d=b.parse(n[p]);b.compare(m,d)' +HTML += b'&&r.numCorrect++}catch(m){r.debug&&console.log(m)}break}case' +HTML += b'"matrix":{let n=new E(0,0);n.fromString(c),r.numChecked+=n.m' +HTML += b'*n.n;for(let h=0;h<n.m;h++)for(let p=0;p<n.n;p++){let m=h*n.' +HTML += b'n+p;o=r.student[i+"-"+m],o!=null&&o.length==0&&(e=!1);let d=' +HTML += b'n.v[m];try{let u=b.parse(d),g=b.parse(o);b.compare(u,g)&&r.n' +HTML += b'umCorrect++}catch(u){r.debug&&console.log(u)}}break}default:' +HTML += b'r.feedbackSpan.innerHTML="UNIMPLEMENTED EVAL OF TYPE "+l}}e=' +HTML += b'=!1?r.state=x.incomplete:r.state=r.numCorrect==r.numChecked?' +HTML += b'x.passed:x.errors,r.updateVisualQuestionState();let t=[];swi' +HTML += b'tch(r.state){case x.passed:t=ie[r.language];break;case x.inc' +HTML += b'omplete:t=se[r.language];break;case x.errors:t=ne[r.language' +HTML += b'];break}let s=t[Math.floor(Math.random()*t.length)];r.feedba' +HTML += b'ckPopupDiv.innerHTML=s,r.feedbackPopupDiv.style.color=r.stat' +HTML += b'e===x.passed?"var(--green)":"var(--red)",r.feedbackPopupDiv.' +HTML += b'style.display="flex",setTimeout(()=>{r.feedbackPopupDiv.styl' +HTML += b'e.display="none"},1e3),r.editingEnabled=!0,r.state===x.passe' +HTML += b'd?(r.editingEnabled=!1,r.src.instances.length>1?r.checkAndRe' +HTML += b'peatBtn.innerHTML=J:r.checkAndRepeatBtn.style.visibility="hi' +HTML += b'dden"):r.checkAndRepeatBtn!=null&&(r.checkAndRepeatBtn.inner' +HTML += b'HTML=P)}f(R,"evalQuestion");function be(r,e){new q(r,e)}f(be' +HTML += b',"init");var q=class{static{f(this,"Quiz")}constructor(e,t){' +HTML += b'this.quizSrc=e,["en","de","es","it","fr"].includes(this.quiz' +HTML += b'Src.lang)==!1&&(this.quizSrc.lang="en"),this.debug=t,this.de' +HTML += b'bug&&(document.getElementById("debug").style.display="block"' +HTML += b'),this.questions=[],this.timeLeft=e.timer,this.timeLimited=e' +HTML += b'.timer>0,this.fillPageMetadata(),this.timeLimited?(document.' +HTML += b'getElementById("timer-info").style.display="block",document.' +HTML += b'getElementById("timer-info-text").innerHTML=oe[this.quizSrc.' +HTML += b'lang],document.getElementById("start-btn").addEventListener(' +HTML += b'"click",()=>{document.getElementById("timer-info").style.dis' +HTML += b'play="none",this.generateQuestions(),this.runTimer()})):this' +HTML += b'.generateQuestions()}fillPageMetadata(){if(document.getEleme' +HTML += b'ntById("date").innerHTML=this.quizSrc.date,document.getEleme' +HTML += b'ntById("title").innerHTML=this.quizSrc.title,document.getEle' +HTML += b'mentById("author").innerHTML=this.quizSrc.author,this.quizSr' +HTML += b'c.info.length>0)document.getElementById("courseInfo1").inner' +HTML += b'HTML=this.quizSrc.info;else{document.getElementById("courseI' +HTML += b'nfo1").innerHTML=$[this.quizSrc.lang];let e=\'<span onclick="' +HTML += b'location.reload()" style="text-decoration: none; font-weight' +HTML += b': bold; cursor: pointer">\'+te[this.quizSrc.lang]+"</span>";d' +HTML += b'ocument.getElementById("courseInfo2").innerHTML=ee[this.quiz' +HTML += b'Src.lang].replace("*",e)}document.getElementById("data-polic' +HTML += b'y").innerHTML=le[this.quizSrc.lang]}generateQuestions(){let ' +HTML += b'e=document.getElementById("questions"),t=1;for(let s of this' +HTML += b'.quizSrc.questions){s.title=""+t+". "+s.title;let i=w();e.ap' +HTML += b'pendChild(i);let l=new V(i,s,this.quizSrc.lang,this.debug);l' +HTML += b'.showSolution=this.debug,this.questions.push(l),l.populateDo' +HTML += b'm(this.timeLimited),this.debug&&s.error.length==0&&l.hasChec' +HTML += b'kButton&&l.checkAndRepeatBtn.click(),t++}}runTimer(){documen' +HTML += b't.getElementById("stop-now").style.display="block",document.' +HTML += b'getElementById("stop-now-btn").innerHTML=ae[this.quizSrc.lan' +HTML += b'g],document.getElementById("stop-now-btn").addEventListener(' +HTML += b'"click",()=>{this.timeLeft=1});let e=document.getElementById' +HTML += b'("timer");e.style.display="block",e.innerHTML=he(this.timeLe' +HTML += b'ft);let t=setInterval(()=>{this.timeLeft--,e.innerHTML=he(th' +HTML += b'is.timeLeft),this.timeLeft<=0&&this.stopTimer(t)},1e3)}stopT' +HTML += b'imer(e){document.getElementById("stop-now").style.display="n' +HTML += b'one",clearInterval(e);let t=0,s=0;for(let l of this.question' +HTML += b's){let o=l.src.points;s+=o,R(l),l.state===x.passed&&(t+=o),l' +HTML += b'.editingEnabled=!1}document.getElementById("questions-eval")' +HTML += b'.style.display="block";let i=document.getElementById("questi' +HTML += b'ons-eval-percentage");i.innerHTML=s==0?"":""+t+" / "+s+" "+r' +HTML += b'e[this.quizSrc.lang]+" <br/><br/>"+Math.round(t/s*100)+" %"}' +HTML += b'};function he(r){let e=Math.floor(r/60),t=r%60;return e+":"+' +HTML += b'(""+t).padStart(2,"0")}f(he,"formatTime");return ge(ke);})()' +HTML += b';pysell.init(quizSrc,debug);</script></body> </html> ' HTML = HTML.decode('utf-8') # @end(html) diff --git a/todo.txt b/todo.txt index ca6c192..f51616b 100644 --- a/todo.txt +++ b/todo.txt @@ -1,6 +1,6 @@ -# TODO: TIMER, PTS in README.md # TODO: CSS: all-camel case or hyphens + # TODO: show points in exercises # TODO: variables with negative values -> auto-parentheses diff --git a/web/index.html b/web/index.html index 2f5302b..6130b84 100644 --- a/web/index.html +++ b/web/index.html @@ -281,7 +281,7 @@ </style> </head> <body> - <div id="timer" class="timer">02:34</div> + <div id="timer" class="timer">99:99</div> <h1 id="title"></h1> <div style="margin-top: 15px"></div> <div class="author" id="author"></div> @@ -312,7 +312,7 @@ <h1 id="debug" class="debugCode" style="display: none">DEBUG VERSION</h1> class="button" style="background-color: var(--green)" > - jetzt auswerten (TODO: translate) + jetzt auswerten </button> </div> <br /> @@ -349,7 +349,7 @@ <h1 id="questions-eval-percentage">0 %</h1> fetch("../examples/ex2.json?v=" + Date.now()) .then((data) => data.json()) .then((quizSrc) => { - let debug = false; // !!!TODO: was true + let debug = true; // !!!TODO: was true init(quizSrc, debug); }); </script> diff --git a/web/src/index.js b/web/src/index.js index 17b8c7b..647cafc 100644 --- a/web/src/index.js +++ b/web/src/index.js @@ -83,15 +83,22 @@ export class Quiz { document.getElementById("date").innerHTML = this.quizSrc.date; document.getElementById("title").innerHTML = this.quizSrc.title; document.getElementById("author").innerHTML = this.quizSrc.author; - document.getElementById("courseInfo1").innerHTML = - courseInfo1[this.quizSrc.lang]; - let reload = - '<span onclick="location.reload()" style="text-decoration: none; font-weight: bold; cursor: pointer">' + - courseInfo3[this.quizSrc.lang] + - "</span>"; - document.getElementById("courseInfo2").innerHTML = courseInfo2[ - this.quizSrc.lang - ].replace("*", reload); + + if (this.quizSrc.info.length > 0) { + // custom info + document.getElementById("courseInfo1").innerHTML = this.quizSrc.info; + } else { + // default info + document.getElementById("courseInfo1").innerHTML = + courseInfo1[this.quizSrc.lang]; + let reload = + '<span onclick="location.reload()" style="text-decoration: none; font-weight: bold; cursor: pointer">' + + courseInfo3[this.quizSrc.lang] + + "</span>"; + document.getElementById("courseInfo2").innerHTML = courseInfo2[ + this.quizSrc.lang + ].replace("*", reload); + } document.getElementById("data-policy").innerHTML = dataPolicy[this.quizSrc.lang];