function markedMermaid(e){return{extensions:[{name:"mermaid",level:"block",start(e){return e.match(/^```mermaid/m)?.index},tokenizer(e,t){e=/^```mermaid\n([\s\S]*?)\n```/.exec(e);if(e)return{type:"mermaid",raw:e[0],text:e[1].trim()}},renderer(e){const t="mermaid-"+Math.random().toString(36).substr(2,9);e=`
${e.text}
`;return"undefined"==typeof mermaid&&"function"==typeof window.loadMermaid&&window.loadMermaid(),setTimeout(()=>{if("undefined"!=typeof mermaid){window.mermaidInitialized||(mermaid.initialize({startOnLoad:!1,theme:"default",securityLevel:"loose"}),window.mermaidInitialized=!0);try{var e=document.getElementById(t);e&&!e.getAttribute("data-processed")&&(mermaid.init(void 0,e),e.setAttribute("data-processed","true"))}catch(e){console.error("Mermaid rendering error:",e)}}},100),e}}]}}"undefined"==typeof PDFJS&&(("undefined"!=typeof window?window:this).PDFJS={}),function(){function r(e,t){return new n(this.slice(e,t))}function s(e,t){arguments.length<2&&(t=0);for(var n=0,i=e.length;n>4,s=n+1>6:64,o=n+2>2)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(a)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(s)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(o));return t}),"atob"in window||(window.atob=function(e){if(1==(e=e.replace(/=+$/,"")).length%4)throw Error("bad atob input");for(var t,n,i=0,r=0,s="";n=e.charAt(r++);~n&&(t=i%4?64*t+n:n,i++%4)&&(s+=String.fromCharCode(255&t>>(-2*i&6))))n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(n);return s}),void 0===Function.prototype.bind&&(Function.prototype.bind=function(t){var n=this,i=Array.prototype.slice.call(arguments,1);return function(){var e=Array.prototype.concat.apply(i,arguments);return n.apply(t,e)}}),"dataset"in document.createElement("div")||Object.defineProperty(HTMLElement.prototype,"dataset",{get:function(){if(this._dataset)return this._dataset;for(var e={},t=0,n=this.attributes.length;te[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t},u.intersect=function(e,t){function n(e,t){return e-t}var i=[e[0],e[2],t[0],t[2]].sort(n),r=[e[1],e[3],t[1],t[3]].sort(n),s=[];return e=u.normalizeRect(e),t=u.normalizeRect(t),(i[0]===e[0]&&i[1]===t[0]||i[0]===t[0]&&i[1]===e[0])&&(s[0]=i[1],s[2]=i[2],r[0]===e[1]&&r[1]===t[1]||r[0]===t[1]&&r[1]===e[1])&&(s[1]=r[1],s[3]=r[2],s)},u.sign=function(e){return e<0?-1:1},u.concatenateToArray=function(e,t){Array.prototype.push.apply(e,t)},u.prependToArray=function(e,t){Array.prototype.unshift.apply(e,t)},u.extendObj=function(e,t){for(var n in t)e[n]=t[n]},u.getInheritableProperty=function(e,t){for(;e&&!e.has(t);)e=e.get("Parent");return e?e.get(t):null},u.inherit=function(e,t,n){for(var i in e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n)e.prototype[i]=n[i]},u.loadScript=function(e,t){var n=document.createElement("script"),i=!1;n.setAttribute("src",e),t&&(n.onload=function(){i||t(),i=!0}),document.getElementsByTagName("head")[0].appendChild(n)},n.Util=u),n=PDFJS,V=(i.prototype={clone:function(e){var t=("scale"in(e=e||{})?e:this).scale,n=("rotation"in e?e:this).rotation;return new i(this.viewBox.slice(),t,n,this.offsetX,this.offsetY,e.dontFlip)},convertToViewportPoint:function(e,t){return M.applyTransform([e,t],this.transform)},convertToViewportRectangle:function(e){var t=M.applyTransform([e[0],e[1]],this.transform);return e=M.applyTransform([e[2],e[3]],this.transform),[t[0],t[1],e[0],e[1]]},convertToPdfPoint:function(e,t){return M.applyInverseTransform([e,t],this.transform)}},n.PageViewport=i,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364]),n=PDFJS,G=0,j={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(e){e._status!=G&&(this.handlers=this.handlers.concat(e._handlers),e._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(;0n&&(n=s.length);for(i=0,r=e.length;ithis.amax||this.bmin>this.bmax)&&(m("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100)}function ie(e,t,n,i,r,s){var o=t[n],a=t[n+1];t=t[n+2],!1!==i&&(o=0+100*o/i,a=e.amin+a*(e.amax-e.amin)/i,t=e.bmin+t*(e.bmax-e.bmin)/i),a=a>e.amax?e.amax:ae.bmax?e.bmax:t>2)},isPassthrough:S.prototype.isPassthrough,createRgbBuffer:S.prototype.createRgbBuffer,isDefaultDecode:function(e){return S.isDefaultDecode(e,this.numComps)},usesZeroToOneRange:!0},te),we=function(e){return 6/29<=e?e*e*e:108/841*(e-4/29)},C=(ne.prototype={getRgb:function(e,t){var n=new Uint8Array(3);return ie(this,e,t,!1,n,0),n},getRgbItem:function(e,t,n,i){ie(this,e,t,!1,n,i)},getRgbBuffer:function(e,t,n,i,r,s){s=(1<>t)*a),o&=(1<a[1+s]&&(r=a[1+s]),i[n]=r}return h.set(e,i),i}}});ae.prototype={has:function(e){return e in this.cache},get:function(e){return this.cache[e]},set:function(e,t){this.total<1024&&(this.cache[e]=t,this.total++)}},he=ae;le.prototype={push:function(e){100<=this.stack.length&&A("PostScript function stack overflow."),this.stack.push(e)},pop:function(){return this.stack.length<=0&&A("PostScript function stack underflow."),this.stack.pop()},copy:function(e){100<=this.stack.length+e&&A("PostScript function stack overflow.");var t=this.stack,n=t.length-e;for(--e;0<=e;e--,n++)t.push(t[n])},index:function(e){this.push(this.stack[this.stack.length-e-1])},roll:function(e,t){for(var n,i=this.stack,r=i.length-e,s=i.length-1,t=r+(t-Math.floor(t/e)*e),o=r,a=s;o>n);break;case"ceiling":t=e.pop(),e.push(Math.ceil(t));break;case"copy":t=e.pop(),e.copy(t);break;case"cos":t=e.pop(),e.push(Math.cos(t));break;case"cvi":t=0|e.pop(),e.push(t);break;case"cvr":break;case"div":n=e.pop(),t=e.pop(),e.push(t/n);break;case"dup":e.copy(1);break;case"eq":n=e.pop(),t=e.pop(),e.push(t==n);break;case"exch":e.roll(2,1);break;case"exp":n=e.pop(),t=e.pop(),e.push(Math.pow(t,n));break;case"false":e.push(!1);break;case"floor":t=e.pop(),e.push(Math.floor(t));break;case"ge":n=e.pop(),t=e.pop(),e.push(n<=t);break;case"gt":n=e.pop(),t=e.pop(),e.push(n\\376\\377([^<]+)/g,function(e,t){for(var n=t.replace(/\\([0-3])([0-7])([0-7])/g,function(e,t,n,i){return String.fromCharCode(64*t+8*n+ +i)}),i="",r=0;r"+i}),e=(new DOMParser).parseFromString(e,"application/xml")):e instanceof Document||A("Metadata: Invalid metadata object"),this.metaDocument=e,this.metadata={},this.parse()}Fe.prototype={destroy:function(){this.pageCache=[],this.pagePromises=[];var e=this;this.messageHandler.send("Terminate",null,function(){e.worker&&e.worker.terminate()})},loadFakeWorkerFiles:function(){return PDFJS.fakeWorkerFilesLoadedPromise||(PDFJS.fakeWorkerFilesLoadedPromise=new b,M.loadScript(PDFJS.workerSrc)),PDFJS.fakeWorkerFilesLoadedPromise},setupFakeWorker:function(){g("Setting up fake worker.");var t={postMessage:function(e){t.onmessage({data:e})},terminate:function(){}},e=new l("main",t);this.setupMessageHandler(e),PDFJS.WorkerMessageHandler.setup(e)},setupMessageHandler:function(n){function t(e){n.send("UpdatePassword",e)}this.messageHandler=n;var i=this.pdfDataRangeTransport;i&&(i.addRangeListener(function(e,t){n.send("OnDataRange",{begin:e,chunk:t})}),i.addProgressListener(function(e){n.send("OnDataProgress",{loaded:e})}),n.on("RequestDataRange",function(e){i.requestDataRange(e.begin,e.end)},this)),n.on("GetDoc",function(e){this.pdfDocument=e=new Te(e.pdfInfo,this),this.workerReadyPromise.resolve(e)},this),n.on("NeedPassword",function(e){if(this.passwordCallback)return this.passwordCallback(t,q.NEED_PASSWORD);this.workerReadyPromise.reject(e.exception.message,e.exception)},this),n.on("IncorrectPassword",function(e){if(this.passwordCallback)return this.passwordCallback(t,q.INCORRECT_PASSWORD);this.workerReadyPromise.reject(e.exception.message,e.exception)},this),n.on("InvalidPDF",function(e){this.workerReadyPromise.reject(e.exception.name,e.exception)},this),n.on("MissingPDF",function(e){this.workerReadyPromise.reject(e.exception.message,e.exception)},this),n.on("UnknownError",function(e){this.workerReadyPromise.reject(e.exception.message,e.exception)},this),n.on("GetPage",function(e){e=e.pageInfo;var t=new Le(e,this);this.pageCache[e.pageIndex]=t,this.pagePromises[e.pageIndex].resolve(t)},this),n.on("GetAnnotations",function(e){this.pageCache[e.pageIndex].annotationsPromise.resolve(e.annotations)},this),n.on("StartRenderPage",function(e){var t=this.pageCache[e.pageIndex];t.stats.timeEnd("Page Request"),t._startRenderPage(e.transparency)},this),n.on("RenderPageChunk",function(e){this.pageCache[e.pageIndex]._renderPageChunk(e.operatorList)},this),n.on("commonobj",function(e){var t,n,i=e[0],r=e[1];if(!this.commonObjs.hasData(i))switch(r){case"Font":"error"in(e=e[2])?(g("Error during font loading: "+(n=e.error)),this.commonObjs.resolve(i,n)):(t=new Ye(e),O.bind([t],function(){this.commonObjs.resolve(i,t)}.bind(this)));break;case"FontPath":this.commonObjs.resolve(i,e[2]);break;default:n("Got unknown common object type "+r)}},this),n.on("obj",function(e){var t=e[0],n=e[2],i=this.pageCache[e[1]];if(!i.objs.hasData(t))switch(n){case"JpegStream":e=e[3];var r=i.objs,s=new Image;s.onload=function(){r.resolve(t,s)},s.src="data:image/jpeg;base64,"+window.btoa(e);break;case"Image":e=e[3],i.objs.resolve(t,e),"data"in e&&8e6a)return setTimeout(n,0),t}},endDrawing:function(){this.ctx.restore(),_.clear(),this.textLayer&&this.textLayer.endLayout(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e},setLineCap:function(e){this.ctx.lineCap=Xe[e]},setLineJoin:function(e){this.ctx.lineJoin=Je[e]},setMiterLimit:function(e){this.ctx.miterLimit=e},setDash:function(e,t){var n=this.ctx;"setLineDash"in n?(n.setLineDash(e),n.lineDashOffset=t):(n.mozDash=e,n.mozDashOffset=t)},setRenderingIntent:function(){},setFlatness:function(){},setGState:function(e){for(var t=0,n=e.length;t=e;);this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(e){this.save();var t=this.ctx,n=(e.isolated||m("TODO: Support non-isolated groups."),e.knockout&&v("Support knockout groups."),t.mozCurrentTransform),i=(e.matrix&&t.transform.apply(t,e.matrix),e.bbox||A("Bounding box is required."),M.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform)),r=(e=Math.max(Math.ceil(i[2]-i[0]),1),Math.max(Math.ceil(i[3]-i[1]),1));for(e=_.getCanvas("groupAt"+this.groupLevel,e,r,!0).context,r=i[0],i=i[1],e.translate(-r,-i),e.transform.apply(e,n),t.setTransform(1,0,0,1,0,0),t.translate(r,i),i=0,r=(n="strokeStyle fillStyle fillRule globalAlpha lineWidth lineCap lineJoin miterLimit globalCompositeOperation font".split(" ")).length;i>2)+(r[h+4]?4:0)+(r[h-u+4]?8:0)]&&(l[i+m]=c[p],++d),h+=4;if(r[h-u]!==r[h]&&(l[i+m]=r[h]?2:4,++d),h+=4,1e3>4)>>2|c<<2,i.push(m%s),i.push(m/s|0),--d,h!==m);g.push(i),--f}}f=function(e){e.save(),e.scale(1/o,-1/a),e.translate(0,-a),e.beginPath();for(var t=0,n=g.length;t>24&255)+String.fromCharCode(c>>16&255)+String.fromCharCode(c>>8&255)+String.fromCharCode(255&c)),h="url(data:font/opentype;base64,"+btoa(l)+");",O.insertRule('@font-face { font-family:"'+e+'";src:'+h+"}"),c=[],h=0,u=t.length;h",scope:{onPageLoad:"=",page:"=",pdfDoc:"="},controller:["$scope","$element",function(i,r){i.scale=1;const s=r.find("canvas")[0];i.$watch("pdfDoc",e=>{e&&i.renderPage(i.page)}),i.renderPage=async function(e){var e=await i.pdfDoc.getPage(e),t=r[0].clientWidth/e.getViewport(1).width,t=e.getViewport(t),n=(s.height=t.height,s.width=t.width,s.getContext("2d"));return await e.render({canvasContext:n,viewport:t}),i.onPageLoad&&i.$apply(function(){i.onPageLoad({page:i.page,total:i.pdfDoc.numPages})}),!0}}]}}]).directive("pdfviewer",["RecursionHelper",function(t){return{restrict:"E",template:"",scope:{onPageLoad:"&",loadProgress:"&",src:"@",id:"="},compile:function(e){return t.compile(e)},controller:["$scope",function(i){i.pdfDoc=null,i.scale=1,i.documentProgress=function(e){i.loadProgress&&i.loadProgress({state:"loading",loaded:e.loaded,total:e.total})},i.loadPDF=function(e){PDFJS.getDocument(e,null,null,i.documentProgress).then(function(e){i.$apply(()=>{i.pdfDoc=e}),i.loadProgress&&i.loadProgress({state:"finished",loaded:0,total:0})},function(e,t){console.log("PDF load error: "+e),i.loadProgress&&i.loadProgress({state:"error",loaded:0,total:0})})},i.$on("pdfviewer.nextPage",function(e,t){null===t&&i.pageNum{i.loadPDF(i.src)})}]}}]).service("PDFViewerService",["$rootScope",function(n){var e={nextPage:function(){n.$broadcast("pdfviewer.nextPage")},prevPage:function(){n.$broadcast("pdfviewer.prevPage")},Instance:function(e){var t=e;return{prevPage:function(){n.$broadcast("pdfviewer.prevPage",t)},nextPage:function(){n.$broadcast("pdfviewer.nextPage",t)},gotoPage:function(e){n.$broadcast("pdfviewer.gotoPage",t,e)}}}};return e}]),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.katex=t():e.katex=t()}("undefined"!=typeof self?self:this,function(){"use strict";var F={d:function(e,t){for(var n in t)F.o(t,n)&&!F.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};F.d(t,{default:function(){return $i}});class P{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;let n,i,r="KaTeX parse error: "+e;var s=t&&t.loc;if(s&&s.start<=s.end){const e=s.lexer.input,t=(n=s.start,i=s.end,n===e.length?r+=" at end of input: ":r+=" at position "+(n+1)+": ",e.slice(n,i).replace(/[^]/g,"$&̲"));var s=15":">","<":"<",'"':""","'":"'"},H=/[&><"']/g;var $={contains:function(e,t){return-1!==e.indexOf(t)},deflt:function(e,t){return void 0===e?t:e},escape:function(e){return String(e).replace(H,e=>N[e])},hyphenate:function(e){return e.replace(B,"-$1").toLowerCase()},getBaseElem:z,isCharacterBox:function(e){e=z(e);return"mathord"===e.type||"textord"===e.type||"atom"===e.type},protocolFromUrl:function(e){e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return e?":"===e[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?e[1].toLowerCase():null:"_relative"}};const W={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};class q{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(const n in W){var t;W.hasOwnProperty(n)&&(t=W[n],this[n]=void 0!==e[n]?t.processor?t.processor(e[n]):e[n]:function(e){if(e.default)return e.default;if(e=e.type,"string"!=typeof(e=Array.isArray(e)?e[0]:e))return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}(t))}}reportNonstrict(e,t,n){let i=this.strict;if((i="function"==typeof i?i(e,t,n):i)&&"ignore"!==i){if(!0===i||"error"===i)throw new C("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",n);"warn"===i?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,n){let i=this.strict;if("function"==typeof i)try{i=i(e,t,n)}catch(e){i="error"}return!(!i||"ignore"===i||!0!==i&&"error"!==i&&("warn"===i?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+i+"': "+t+" ["+e+"]"),1))}isTrusted(e){if(e.url&&!e.protocol){const t=$.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}const t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)}}class U{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return V[G[this.id]]}sub(){return V[j[this.id]]}fracNum(){return V[K[this.id]]}fracDen(){return V[Y[this.id]]}cramp(){return V[X[this.id]]}text(){return V[J[this.id]]}isTight(){return 2<=this.size}}const V=[new U(0,0,!1),new U(1,0,!0),new U(2,1,!1),new U(3,1,!0),new U(4,2,!1),new U(5,2,!0),new U(6,3,!1),new U(7,3,!0)],G=[4,5,4,5,6,7,6,7],j=[5,5,5,5,7,7,7,7],K=[2,3,4,5,6,7,6,7],Y=[3,3,5,5,7,7,7,7],X=[1,1,3,3,5,5,7,7],J=[0,1,2,3,2,3,2,3];var R={DISPLAY:V[0],TEXT:V[2],SCRIPT:V[4],SCRIPTSCRIPT:V[6]};const Q=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],Z=[];function ee(t){for(let e=0;e=Z[e]&&t<=Z[e+1])return 1}Q.forEach(e=>e.blocks.forEach(e=>Z.push(...e)));const te={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class ne{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return $.contains(this.classes,e)}toNode(){var t=document.createDocumentFragment();for(let e=0;ee.toText()).join("")}}var ie={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}};const re={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},se={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function oe(e,t,n){if(!ie[t])throw new Error("Font metrics not found for font: "+t+".");let i=e.charCodeAt(0),r=ie[t][i];if(!r&&e[0]in se&&(i=se[e[0]].charCodeAt(0),r=ie[t][i]),r||"text"!==n||ee(i)&&(r=ie[t][77]),r)return{depth:r[0],height:r[1],italic:r[2],skew:r[3],width:r[4]}}function ae(e,t){return t.size<2?e:ce[e-1][t.size-1]}const le={},ce=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],he=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488];class ue{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||ue.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=he[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(const n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return new ue(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:ae(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:he[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=ae(ue.BASESIZE,e);return this.size===t&&this.textSize===ue.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){let e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==ue.BASESIZE?["sizing","reset-size"+this.size,"size"+ue.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t=5<=e?0:3<=e?1:2;if(!le[t]){const e=le[t]={cssEmPerMu:re.quad[t]/18};for(const n in re)re.hasOwnProperty(n)&&(e[n]=re[n][t])}return le[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}ue.BASESIZE=6;var de=ue;function pe(e){return(e="string"!=typeof e?e.unit:e)in ve||e in ye||"ex"===e}function M(e,t){let n;if(e.unit in ve)n=ve[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)n=t.fontMetrics().cssEmPerMu;else{var i=t.style.isTight()?t.havingStyle(t.style.text()):t;if("ex"===e.unit)n=i.fontMetrics().xHeight;else{if("em"!==e.unit)throw new C("Invalid unit: '"+e.unit+"'");n=i.fontMetrics().quad}i!==t&&(n*=i.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)}function me(e){return e.filter(e=>e).join(" ")}function ge(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push("mtight");const e=t.getColor();e&&(this.style.color=e)}}function fe(e){var t=document.createElement(e);t.className=me(this.classes);for(const e in this.style)this.style.hasOwnProperty(e)&&(t.style[e]=this.style[e]);for(const e in this.attributes)this.attributes.hasOwnProperty(e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e"}const ve={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},ye={ex:!0,em:!0,mu:!0},T=function(e){return+e.toFixed(4)+"em"};class be{constructor(e,t,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,ge.call(this,e,n,i),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return $.contains(this.classes,e)}toNode(){return fe.call(this,"span")}toMarkup(){return we.call(this,"span")}}class xe{constructor(e,t,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,ge.call(this,t,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return $.contains(this.classes,e)}toNode(){return fe.call(this,"a")}toMarkup(){return we.call(this,"a")}}class Ae{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return $.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(const t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){let e=''+$.escape(this.alt)+'=i[0]&&t<=i[1])return n.name}}return null}(this.text.charCodeAt(0));e&&this.classes.push(e+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=ke[this.text])}hasClass(e){return $.contains(this.classes,e)}toNode(){const e=document.createTextNode(this.text);let t=null;0")+i+"":i}}class Se{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");for(const e in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,e)&&t.setAttribute(e,this.attributes[e]);for(let e=0;e':''}}class $e{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(const t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){let e="","\\gt",!0),n(i,s,p,"∈","\\in",!0),n(i,s,p,"","\\@not"),n(i,s,p,"⊂","\\subset",!0),n(i,s,p,"⊃","\\supset",!0),n(i,s,p,"⊆","\\subseteq",!0),n(i,s,p,"⊇","\\supseteq",!0),n(i,e,p,"⊈","\\nsubseteq",!0),n(i,e,p,"⊉","\\nsupseteq",!0),n(i,s,p,"⊨","\\models"),n(i,s,p,"←","\\leftarrow",!0),n(i,s,p,"≤","\\le"),n(i,s,p,"≤","\\leq",!0),n(i,s,p,"<","\\lt",!0),n(i,s,p,"→","\\rightarrow",!0),n(i,s,p,"→","\\to"),n(i,e,p,"≱","\\ngeq",!0),n(i,e,p,"≰","\\nleq",!0),n(i,s,g," ","\\ "),n(i,s,g," ","\\space"),n(i,s,g," ","\\nobreakspace"),n(r,s,g," ","\\ "),n(r,s,g," "," "),n(r,s,g," ","\\space"),n(r,s,g," ","\\nobreakspace"),n(i,s,g,null,"\\nobreak"),n(i,s,g,null,"\\allowbreak"),n(i,s,Ie,",",","),n(i,s,Ie,";",";"),n(i,e,a,"⊼","\\barwedge",!0),n(i,e,a,"⊻","\\veebar",!0),n(i,s,a,"⊙","\\odot",!0),n(i,s,a,"⊕","\\oplus",!0),n(i,s,a,"⊗","\\otimes",!0),n(i,s,f,"∂","\\partial",!0),n(i,s,a,"⊘","\\oslash",!0),n(i,e,a,"⊚","\\circledcirc",!0),n(i,e,a,"⊡","\\boxdot",!0),n(i,s,a,"△","\\bigtriangleup"),n(i,s,a,"▽","\\bigtriangledown"),n(i,s,a,"†","\\dagger"),n(i,s,a,"⋄","\\diamond"),n(i,s,a,"⋆","\\star"),n(i,s,a,"◃","\\triangleleft"),n(i,s,a,"▹","\\triangleright"),n(i,s,d,"{","\\{"),n(r,s,f,"{","\\{"),n(r,s,f,"{","\\textbraceleft"),n(i,s,l,"}","\\}"),n(r,s,f,"}","\\}"),n(r,s,f,"}","\\textbraceright"),n(i,s,d,"{","\\lbrace"),n(i,s,l,"}","\\rbrace"),n(i,s,d,"[","\\lbrack",!0),n(r,s,f,"[","\\lbrack",!0),n(i,s,l,"]","\\rbrack",!0),n(r,s,f,"]","\\rbrack",!0),n(i,s,d,"(","\\lparen",!0),n(i,s,l,")","\\rparen",!0),n(r,s,f,"<","\\textless",!0),n(r,s,f,">","\\textgreater",!0),n(i,s,d,"⌊","\\lfloor",!0),n(i,s,l,"⌋","\\rfloor",!0),n(i,s,d,"⌈","\\lceil",!0),n(i,s,l,"⌉","\\rceil",!0),n(i,s,f,"\\","\\backslash"),n(i,s,f,"∣","|"),n(i,s,f,"∣","\\vert"),n(r,s,f,"|","\\textbar",!0),n(i,s,f,"∥","\\|"),n(i,s,f,"∥","\\Vert"),n(r,s,f,"∥","\\textbardbl"),n(r,s,f,"~","\\textasciitilde"),n(r,s,f,"\\","\\textbackslash"),n(r,s,f,"^","\\textasciicircum"),n(i,s,p,"↑","\\uparrow",!0),n(i,s,p,"⇑","\\Uparrow",!0),n(i,s,p,"↓","\\downarrow",!0),n(i,s,p,"⇓","\\Downarrow",!0),n(i,s,p,"↕","\\updownarrow",!0),n(i,s,p,"⇕","\\Updownarrow",!0),n(i,s,h,"∐","\\coprod"),n(i,s,h,"⋁","\\bigvee"),n(i,s,h,"⋀","\\bigwedge"),n(i,s,h,"⨄","\\biguplus"),n(i,s,h,"⋂","\\bigcap"),n(i,s,h,"⋃","\\bigcup"),n(i,s,h,"∫","\\int"),n(i,s,h,"∫","\\intop"),n(i,s,h,"∬","\\iint"),n(i,s,h,"∭","\\iiint"),n(i,s,h,"∏","\\prod"),n(i,s,h,"∑","\\sum"),n(i,s,h,"⨂","\\bigotimes"),n(i,s,h,"⨁","\\bigoplus"),n(i,s,h,"⨀","\\bigodot"),n(i,s,h,"∮","\\oint"),n(i,s,h,"∯","\\oiint"),n(i,s,h,"∰","\\oiiint"),n(i,s,h,"⨆","\\bigsqcup"),n(i,s,h,"∫","\\smallint"),n(r,s,Ee,"…","\\textellipsis"),n(i,s,Ee,"…","\\mathellipsis"),n(r,s,Ee,"…","\\ldots",!0),n(i,s,Ee,"…","\\ldots",!0),n(i,s,Ee,"⋯","\\@cdots",!0),n(i,s,Ee,"⋱","\\ddots",!0),n(i,s,f,"⋮","\\varvdots"),n(i,s,o,"ˊ","\\acute"),n(i,s,o,"ˋ","\\grave"),n(i,s,o,"¨","\\ddot"),n(i,s,o,"~","\\tilde"),n(i,s,o,"ˉ","\\bar"),n(i,s,o,"˘","\\breve"),n(i,s,o,"ˇ","\\check"),n(i,s,o,"^","\\hat"),n(i,s,o,"⃗","\\vec"),n(i,s,o,"˙","\\dot"),n(i,s,o,"˚","\\mathring"),n(i,s,c,"","\\@imath"),n(i,s,c,"","\\@jmath"),n(i,s,f,"ı","ı"),n(i,s,f,"ȷ","ȷ"),n(r,s,f,"ı","\\i",!0),n(r,s,f,"ȷ","\\j",!0),n(r,s,f,"ß","\\ss",!0),n(r,s,f,"æ","\\ae",!0),n(r,s,f,"œ","\\oe",!0),n(r,s,f,"ø","\\o",!0),n(r,s,f,"Æ","\\AE",!0),n(r,s,f,"Œ","\\OE",!0),n(r,s,f,"Ø","\\O",!0),n(r,s,o,"ˊ","\\'"),n(r,s,o,"ˋ","\\`"),n(r,s,o,"ˆ","\\^"),n(r,s,o,"˜","\\~"),n(r,s,o,"ˉ","\\="),n(r,s,o,"˘","\\u"),n(r,s,o,"˙","\\."),n(r,s,o,"¸","\\c"),n(r,s,o,"˚","\\r"),n(r,s,o,"ˇ","\\v"),n(r,s,o,"¨",'\\"'),n(r,s,o,"˝","\\H"),n(r,s,o,"◯","\\textcircled");const _e={"--":!0,"---":!0,"``":!0,"''":!0};n(r,s,f,"–","--",!0),n(r,s,f,"–","\\textendash"),n(r,s,f,"—","---",!0),n(r,s,f,"—","\\textemdash"),n(r,s,f,"‘","`",!0),n(r,s,f,"‘","\\textquoteleft"),n(r,s,f,"’","'",!0),n(r,s,f,"’","\\textquoteright"),n(r,s,f,"“","``",!0),n(r,s,f,"“","\\textquotedblleft"),n(r,s,f,"”","''",!0),n(r,s,f,"”","\\textquotedblright"),n(i,s,f,"°","\\degree",!0),n(r,s,f,"°","\\degree"),n(r,s,f,"°","\\textdegree",!0),n(i,s,f,"£","\\pounds"),n(i,s,f,"£","\\mathsterling",!0),n(r,s,f,"£","\\pounds"),n(r,s,f,"£","\\textsterling",!0),n(i,e,f,"✠","\\maltese"),n(r,e,f,"✠","\\maltese");var De='0123456789/@."';for(let e=0;en&&(n=s.height),s.depth>i&&(i=s.depth),s.maxFontSize>r&&(r=s.maxFontSize)}t.height=n,t.depth=i,t.maxFontSize=r}function v(e,t,n,i){return e=new be(e,t,n,i),Be(e),e}function Ne(e){return e=new ne(e),Be(e),e}function He(e,t,n){let i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}return i+"-"+("textbf"===t&&"textit"===n?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")}const We=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],qe=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ue=(e,t,n,i)=>new be(e,t,n,i),Ve={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ge={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]};var L={fontMap:Ve,makeSymbol:ze,mathsym:function(e,t,n,i){return void 0===i&&(i=[]),"boldsymbol"===n.font&&Pe(e,"Main-Bold",t).metrics?ze(e,"Main-Bold",t,n,i.concat(["mathbf"])):"\\"===e||"main"===u[t][e].font?ze(e,"Main-Regular",t,n,i):ze(e,"AMS-Regular",t,n,i.concat(["amsrm"]))},makeSpan:v,makeSvgSpan:Ue,makeLineSpan:function(e,t,n){e=v([e],[],t);return e.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=T(e.height),e.maxFontSize=1,e},makeAnchor:function(e,t,n,i){e=new xe(e,t,n,i);return Be(e),e},makeFragment:Ne,wrapFragment:function(e,t){return e instanceof ne?v([],[e],t):e},makeVList:function(t,n){const{children:i,depth:r}=function(n){if("individualShift"===n.positionType){const s=n.children,a=[s[0]],l=-s[0].shift-s[0].elem.depth;let t=l;for(let e=1;e{var n=v(["mspace"],[],t),e=M(e,t);return n.style.marginRight=T(e),n},staticSvg:function(e,t){var[e,n,i]=Ge[e],e=new Ce(e),e=new Se([e],{width:T(n),height:T(i),style:"width:"+T(n),viewBox:"0 0 "+1e3*n+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),e=Ue(["overlay"],[e],t);return e.height=i,e.style.height=T(i),e.style.width=T(n),e},svgData:Ge,tryCombineChars:t=>{for(let e=0;e{if(me(e.classes)!==me(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){const t=e.classes[0];if("mbin"===t||"mord"===t)return!1}for(const n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(const i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0})(n,i)&&(n.text+=i.text,n.height=Math.max(n.height,i.height),n.depth=Math.max(n.depth,i.depth),n.italic=i.italic,t.splice(e+1,1),e--)}return t}};const y={number:3,unit:"mu"},je={number:4,unit:"mu"},Ke={number:5,unit:"mu"},Ye={mord:{mop:y,mbin:je,mrel:Ke,minner:y},mop:{mord:y,mop:y,mrel:Ke,minner:y},mbin:{mord:je,mop:je,mopen:je,minner:je},mrel:{mord:Ke,mop:Ke,mopen:Ke,minner:Ke},mopen:{},mclose:{mop:y,mbin:je,mrel:Ke,minner:y},mpunct:{mord:y,mop:y,mrel:Ke,mopen:y,mclose:y,mpunct:y,minner:y},minner:{mord:y,mop:y,mbin:je,mrel:Ke,mopen:y,mpunct:y,minner:y}},Xe={mord:{mop:y},mop:{mord:y,mop:y},mbin:{},mrel:{},mopen:{},mclose:{mop:y},mpunct:{},minner:{mop:y}},Je={},Qe={},Ze={};function b(e){var{type:e,names:t,props:n,handler:i,htmlBuilder:r,mathmlBuilder:s}=e,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:void 0===n.allowedInMath||n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i};for(let e=0;e{var n=t.classes[0],i=e.classes[0];"mbin"===n&&$.contains(st,i)?t.classes[0]="mord":"mbin"===i&&$.contains(rt,n)&&(e.classes[0]="mord")},{node:o},r,e),lt(s,(e,t)=>{var t=ut(t),n=ut(e),e=t&&n?(e.hasClass("mtight")?Xe:Ye)[t][n]:null;if(e)return L.makeGlue(e,i)},{node:o},r,e)}return s}function nt(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),it(t.concat(e))}const it=L.makeSpan,rt=["leftmost","mbin","mopen","mrel","mop","mpunct"],st=["rightmost","mrel","mclose","mpunct"],ot={display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT},at={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},lt=function(n,e,t,i,r){i&&n.push(i);let s=0;for(;se=>{n.splice(t+1,0,e),s++})(s)}}i&&n.pop()},ct=function(e){return e instanceof ne||e instanceof xe||e instanceof be&&e.hasClass("enclosing")?e:null},ht=function(e,t){var n=ct(e);if(n){const e=n.children;if(e.length){if("right"===t)return ht(e[e.length-1],"right");if("left"===t)return ht(e[0],"left")}}return e},ut=function(e,t){return e&&(t&&(e=ht(e,t)),at[e.classes[0]])||null},I=function(t,n,i){if(!t)return it();if(Qe[t.type]){let e=Qe[t.type](t,n);if(i&&n.size!==i.size){e=it(n.sizingClasses(i),[e],n);const t=n.sizeMultiplier/i.sizeMultiplier;e.height*=t,e.depth*=t}return e}throw new C("Got group of unknown type: '"+t.type+"'")};function dt(e,t){e=it(["base"],e,t),t=it(["strut"]);return t.style.height=T(e.height+e.depth),e.depth&&(t.style.verticalAlign=T(-e.depth)),e.children.unshift(t),e}function pt(e,n){let t=null;1===e.length&&"tag"===e[0].type&&(t=e[0].tag,e=e[0].body);var i=E(e,n,"root");let r;2===i.length&&i[1].hasClass("tag")&&(r=i.pop());var s=[];let o,a=[];for(let t=0;t"}toText(){return this.children.map(e=>e.toText()).join("")}}class gt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return $.escape(this.toText())}toText(){return this.text}}var k={MathNode:A,TextNode:gt,SpaceNode:class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=.05555<=e&&e<=.05556?" ":.1666<=e&&e<=.1667?" ":.2222<=e&&e<=.2223?" ":.2777<=e&&e<=.2778?"  ":-.05556<=e&&e<=-.05555?" ⁣":-.1667<=e&&e<=-.1666?" ⁣":-.2223<=e&&e<=-.2222?" ⁣":-.2778<=e&&e<=-.2777?" ⁣":null}toNode(){var e;return this.character?document.createTextNode(this.character):((e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",T(this.width)),e)}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character||" "}},newDocumentFragment:mt};function ft(e,t,n){return!u[t][e]||!u[t][e].replace||55349===e.charCodeAt(0)||_e.hasOwnProperty(e)&&n&&(n.fontFamily&&"tt"===n.fontFamily.slice(4,6)||n.font&&"tt"===n.font.slice(4,6))||(e=u[t][e].replace),new k.TextNode(e)}function wt(e){return 1===e.length?e[0]:new k.MathNode("mrow",e)}function vt(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";if(!(t=t.font)||"mathnormal"===t)return null;var n=e.mode;if("mathit"===t)return"italic";if("boldsymbol"===t)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===t)return"bold";if("mathbb"===t)return"double-struck";if("mathfrak"===t)return"fraktur";if("mathscr"===t||"mathcal"===t)return"script";if("mathsf"===t)return"sans-serif";if("mathtt"===t)return"monospace";let i=e.text;return!$.contains(["\\imath","\\jmath"],i)&&oe(i=u[n][i]&&u[n][i].replace?u[n][i].replace:i,L.fontMap[t].fontName,n)?L.fontMap[t].variant:null}function S(t,n,e){if(1===t.length){const i=_(t[0],n);return e&&i instanceof A&&"mo"===i.type&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}const i=[];let r;for(let e=0;e{let e,s,o;i&&"supsub"===i.type?(s=D(i.base,"accent"),e=s.base,i.base=e,o=function(e){if(e instanceof be)return e;throw new Error("Expected span but got "+String(e)+".")}(I(i,r)),i.base=s):(s=D(i,"accent"),e=s.base);i=I(e,r.havingCrampedStyle());let a=0;if(s.isShifty&&$.isCharacterBox(e)){const i=$.getBaseElem(e);a=Re(I(i,r.havingCrampedStyle())).skew}var l="\\c"===s.label;let c,h=l?i.height+i.depth:Math.min(i.height,r.fontMetrics().xHeight);if(s.isStretchy)c=$t(s,r),c=L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0{var n=e.isStretchy?Ct(e.label):new k.MathNode("mo",[ft(e.label,e.mode)]),e=new k.MathNode("mover",[_(e.base,t),n]);return e.setAttribute("accent","true"),e},Et=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),It=(b({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var t=tt(t[0]),n=!Et.test(e.funcName),i=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:i,base:t}},htmlBuilder:Tt,mathmlBuilder:Lt}),b({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{t=t[0];let n=e.parser.mode;return"math"===n&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:Tt,mathmlBuilder:Lt}),b({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:e,funcName:n}=e,t=t[0];return{type:"accentUnder",mode:e.mode,label:n,base:t}},htmlBuilder:(e,t)=>{var n=I(e.base,t),i=$t(e,t),e="\\utilde"===e.label?.12:0,i=L.makeVList({positionType:"top",positionData:n.height,children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:e},{type:"elem",elem:n}]},t);return L.makeSpan(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var n=Ct(e.label),e=new k.MathNode("munder",[_(e.base,t),n]);return e.setAttribute("accentunder","true"),e}}),e=>{e=new k.MathNode("mpadded",e?[e]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e}),_t=(b({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:e,funcName:i}=e;return{type:"xArrow",mode:e.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,i=t.havingStyle(n.sup()),r=L.wrapFragment(I(e.body,i,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";let o;r.classes.push(s+"-arrow-pad"),e.below&&(i=t.havingStyle(n.sub()),(o=L.wrapFragment(I(e.below,i,t),t)).classes.push(s+"-arrow-pad"));n=$t(e,t),i=-t.fontMetrics().axisHeight+.5*n.height;let a,l=-t.fontMetrics().axisHeight-.5*n.height-.111;if((.25{e="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==e.type||"bin"!==e.family&&"rel"!==e.family?"mord":"m"+e.family},Pt=(b({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){e=e.parser;return{type:"mclass",mode:e.mode,mclass:Ft(t[0]),body:x(t[1]),isCharacterBox:$.isCharacterBox(t[1])}}}),b({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:e,funcName:n}=e,i=t[1],t=t[0],r="\\stackrel"!==n?Ft(i):"mrel",i={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:x(i)},i={type:"supsub",mode:t.mode,base:i,sup:"\\underset"===n?null:t,sub:"\\underset"===n?t:null};return{type:"mclass",mode:e.mode,mclass:r,body:[i],isCharacterBox:$.isCharacterBox(i)}},htmlBuilder:Dt,mathmlBuilder:Ot}),b({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){e=e.parser;return{type:"pmb",mode:e.mode,mclass:Ft(t[0]),body:x(t[0])}},htmlBuilder(e,t){var n=E(e.body,t,!0),e=L.makeSpan([e.mclass],n,t);return e.style.textShadow="0.02em 0.01em 0.04px",e},mathmlBuilder(e,t){e=S(e.body,t),t=new k.MathNode("mstyle",e);return t.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),{">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"}),zt=e=>"textord"===e.type&&"@"===e.text;b({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:n}=e;return{type:"cdlabel",mode:e.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),n=L.wrapFragment(I(e.label,n,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=T(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){let n=new k.MathNode("mrow",[_(e.label,t)]);return(n=new k.MathNode("mpadded",[n])).setAttribute("width","0"),"left"===e.side&&n.setAttribute("lspace","-1width"),n.setAttribute("voffset","0.7em"),(n=new k.MathNode("mstyle",[n])).setAttribute("displaystyle","false"),n.setAttribute("scriptlevel","1"),n}}),b({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){e=e.parser;return{type:"cdlabelparent",mode:e.mode,fragment:t[0]}},htmlBuilder(e,t){e=L.wrapFragment(I(e.fragment,t),t);return e.classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new k.MathNode("mrow",[_(e.fragment,t)])}}),b({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){var e=e["parser"],n=D(t[0],"ordgroup").body;let i="";for(let e=0;e>10),56320+(1023&s))),{type:"textord",mode:e.mode,text:r}}});g=(e,t)=>{t=E(e.body,t.withColor(e.color),!1);return L.makeFragment(t)},Ie=(e,t)=>{t=S(e.body,t.withColor(e.color)),t=new k.MathNode("mstyle",t);return t.setAttribute("mathcolor",e.color),t};b({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var e=e["parser"],n=D(t[0],"color-token").color,t=t[1];return{type:"color",mode:e.mode,color:n,body:x(t)}},htmlBuilder:g,mathmlBuilder:Ie}),b({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:n}=e,t=D(t[0],"color-token").color,n=(e.gullet.macros.set("\\current@color",t),e.parseExpression(!0,n));return{type:"color",mode:e.mode,color:t,body:n}},htmlBuilder:g,mathmlBuilder:Ie}),b({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var e=e["parser"],i="["===e.gullet.future().text?e.parseSizeGroup(!0):null,r=!e.settings.displayMode||!e.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:e.mode,newLine:r,size:i&&D(i,"size").value}},htmlBuilder(e,t){var n=L.makeSpan(["mspace"],[],t);return e.newLine&&(n.classes.push("newline"),e.size)&&(n.style.marginTop=T(M(e.size,t))),n},mathmlBuilder(e,t){var n=new k.MathNode("mspace");return e.newLine&&(n.setAttribute("linebreak","newline"),e.size)&&n.setAttribute("height",T(M(e.size,t))),n}});function Bt(e,t,n){if(n=oe(u.math[e]&&u.math[e].replace||e,t,n))return n;throw new Error("Unsupported symbol "+e+" and font size "+t+".")}function Nt(e,t,n,i){return t=n.havingBaseStyle(t),i=L.makeSpan(i.concat(t.sizingClasses(n)),[e],n),e=t.sizeMultiplier/n.sizeMultiplier,i.height*=e,i.depth*=e,i.maxFontSize=t.sizeMultiplier,i}function Ht(e,t,n){n=t.havingBaseStyle(n),n=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight,e.classes.push("delimcenter"),e.style.top=T(n),e.height-=n,e.depth+=n}function Wt(e,t,n,i,r,s){return e=L.makeSymbol(e,"Size"+t+"-Regular",r,i),r=Nt(L.makeSpan(["delimsizing","size"+t],[e],i),R.TEXT,i,s),n&&Ht(r,i,R.TEXT),r}function qt(e,t,n){return{type:"elem",elem:L.makeSpan(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[L.makeSpan([],[L.makeSymbol(e,t,n)])])}}function Ut(e,t,n){var i=(ie["Size4-Regular"][e.charCodeAt(0)]?ie["Size4-Regular"]:ie["Size1-Regular"])[e.charCodeAt(0)][4],e=new Ce("inner",function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),e=new Se([e],{width:T(i),height:T(t),style:"width:"+T(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"});return(e=L.makeSvgSpan([],[e],n)).height=t,e.style.height=T(t),e.style.width=T(i),{type:"elem",elem:e}}function Vt(e,t,n,i,r,s){let o,a,l,c,h="",u=0,d=(o=l=c=e,a=null,"Size1-Regular");"\\uparrow"===e?l=c="⏐":"\\Uparrow"===e?l=c="‖":"\\downarrow"===e?o=l="⏐":"\\Downarrow"===e?o=l="‖":"\\updownarrow"===e?(o="\\uparrow",l="⏐",c="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="‖",c="\\Downarrow"):$.contains(Zt,e)?(l="∣",h="vert",u=333):$.contains(en,e)?(l="∥",h="doublevert",u=556):"["===e||"\\lbrack"===e?(o="⎡",l="⎢",c="⎣",d="Size4-Regular",h="lbrack",u=667):"]"===e||"\\rbrack"===e?(o="⎤",l="⎥",c="⎦",d="Size4-Regular",h="rbrack",u=667):"\\lfloor"===e||"⌊"===e?(l=o="⎢",c="⎣",d="Size4-Regular",h="lfloor",u=667):"\\lceil"===e||"⌈"===e?(o="⎡",l=c="⎢",d="Size4-Regular",h="lceil",u=667):"\\rfloor"===e||"⌋"===e?(l=o="⎥",c="⎦",d="Size4-Regular",h="rfloor",u=667):"\\rceil"===e||"⌉"===e?(o="⎤",l=c="⎥",d="Size4-Regular",h="rceil",u=667):"("===e||"\\lparen"===e?(o="⎛",l="⎜",c="⎝",d="Size4-Regular",h="lparen",u=875):")"===e||"\\rparen"===e?(o="⎞",l="⎟",c="⎠",d="Size4-Regular",h="rparen",u=875):"\\{"===e||"\\lbrace"===e?(o="⎧",a="⎨",c="⎩",l="⎪",d="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="⎫",a="⎬",c="⎭",l="⎪",d="Size4-Regular"):"\\lgroup"===e||"⟮"===e?(o="⎧",c="⎩",l="⎪",d="Size4-Regular"):"\\rgroup"===e||"⟯"===e?(o="⎫",c="⎭",l="⎪",d="Size4-Regular"):"\\lmoustache"===e||"⎰"===e?(o="⎧",c="⎭",l="⎪",d="Size4-Regular"):"\\rmoustache"!==e&&"⎱"!==e||(o="⎫",c="⎩",l="⎪",d="Size4-Regular");var e=Bt(o,d,r),p=e.height+e.depth,e=Bt(l,d,r),e=e.height+e.depth,m=(m=Bt(c,d,r)).height+m.depth;let g=0,f=1;if(null!==a){const e=Bt(a,d,r);g=e.height+e.depth,f=2}var w=(w=p+m+g)+Math.max(0,Math.ceil((t-w)/(f*e)))*f*e;let v=i.fontMetrics().axisHeight;n&&(v*=i.sizeMultiplier);var t=w/2-v,y=[];if(0i)return r[t]}return r[r.length-1]}function Kt(e,t,n,i,r,s){"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),u=$.contains(rn,e)?on:$.contains(tn,e)?ln:an;var o,a,l,c,h,u=jt(e,t,u,i);return"small"===u.type?(o=e,a=u.style,l=n,c=i,h=s,o=L.makeSymbol(o,"Main-Regular",r,c),o=Nt(o,a,c,h),l&&Ht(o,c,a),o):"large"===u.type?Wt(e,u.size,n,i,r,s):Vt(e,t,n,i,r,s)}const Yt={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Xt=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new C("Expected a control sequence",e);return t},Jt=(e,t,n,i)=>{let r=e.gullet.macros.get(n.text);null==r&&(n.noexpand=!0,r={tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,r,i)},Qt=(b({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:e,funcName:t}=e,n=(e.consumeSpaces(),e.fetch());if(Yt[n.text])return"\\global"!==t&&"\\\\globallong"!==t||(n.text=Yt[n.text]),D(e.parseFunction(),"internal");throw new C("Invalid token after macro prefix",n)}}),b({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){let{parser:t,funcName:n}=e,i=t.gullet.popToken();e=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new C("Expected a control sequence",i);let r,s=0;for(var o=[[]];"{"!==t.gullet.future().text;)if("#"===(i=t.gullet.popToken()).text){if("{"===t.gullet.future().text){r=t.gullet.future(),o[s].push("{");break}if(i=t.gullet.popToken(),!/^[1-9]$/.test(i.text))throw new C('Invalid argument number "'+i.text+'"');if(parseInt(i.text)!==s+1)throw new C('Argument number "'+i.text+'" out of order');s++,o.push([])}else{if("EOF"===i.text)throw new C("Expected a macro definition");o[s].push(i.text)}let a=t.gullet.consumeArg()["tokens"];return r&&a.unshift(r),"\\edef"!==n&&"\\xdef"!==n||(a=t.gullet.expandTokens(a)).reverse(),t.gullet.macros.set(e,{tokens:a,numArgs:s,delimiters:o},n===Yt[n]),{type:"internal",mode:t.mode}}}),b({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,n=Xt(e.gullet.popToken()),i=(e.gullet.consumeSpaces(),(e=>{let t=e.gullet.popToken();return t="="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t})(e));return Jt(e,n,i,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),b({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,n=Xt(e.gullet.popToken()),i=e.gullet.popToken(),r=e.gullet.popToken();return Jt(e,n,r,"\\\\globalfuture"===t),e.gullet.pushToken(r),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}}),{type:"kern",size:-.008}),Zt=["|","\\lvert","\\rvert","\\vert"],en=["\\|","\\lVert","\\rVert","\\Vert"],tn=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],nn=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],rn=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],sn=[0,1.2,1.8,2.4,3],on=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],an=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"stack"}],ln=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];var cn={sqrtImage:function(e,t){var n=t.havingBaseSizing(),i=jt("\\surd",e*n.sizeMultiplier,ln,n);let r=n.sizeMultiplier;n=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness);let s,o,a=0,l=0,c=0;return o="small"===i.type?(c=1e3+1e3*n+80,e<1?r=1:e<1.4&&(r=.7),a=(1+n+.08)/r,l=(1+n)/r,(s=Gt("sqrtMain",a,c,n,t)).style.minWidth="0.853em",.833/r):"large"===i.type?(c=1080*sn[i.size],l=(sn[i.size]+n)/r,a=(sn[i.size]+n+.08)/r,(s=Gt("sqrtSize"+i.size,a,c,n,t)).style.minWidth="1.02em",1/r):(a=e+n+.08,l=e+n,c=Math.floor(1e3*e+n)+80,(s=Gt("sqrtTall",a,c,n,t)).style.minWidth="0.742em",1.056),s.height=l,s.style.height=T(a),{span:s,advanceWidth:o,ruleWidth:(t.fontMetrics().sqrtRuleThickness+n)*r}},sizedDelim:function(e,t,n,i,r){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),$.contains(tn,e)||$.contains(rn,e))return Wt(e,t,!1,n,i,r);if($.contains(nn,e))return Vt(e,sn[t],!1,n,i,r);throw new C("Illegal delimiter: '"+e+"'")},sizeToMaxHeight:sn,customSizedDelim:Kt,leftRightDelim:function(e,t,n,i,r,s){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,a=5/i.fontMetrics().ptPerEm,t=Math.max(t-o,n+o),n=Math.max(t/500*901,2*t-a);return Kt(e,n,!0,i,r,s)}};const hn={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},un=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function dn(e,t){var n=Mt(e);if(n&&$.contains(un,n.text))return n;throw new C(n?"Invalid delimiter '"+n.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function pn(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}b({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{t=dn(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:hn[e.funcName].size,mclass:hn[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,t)=>"."===e.delim?L.makeSpan([e.mclass]):cn.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[],t=("."!==e.delim&&t.push(ft(e.delim,e.mode)),new k.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),T(cn.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t}}),b({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get("\\current@color");if(n&&"string"!=typeof n)throw new C("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:dn(t[0],e).text,color:n}}}),b({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var t=dn(t[0],e),e=e.parser,n=(++e.leftrightDepth,e.parseExpression(!1)),i=(--e.leftrightDepth,e.expect("\\right",!1),D(e.parseFunction(),"leftright-right"));return{type:"leftright",mode:e.mode,body:n,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(t,e)=>{pn(t);const n=E(t.body,e,!0,["mopen","mclose"]);let i,r,s=0,o=0,a=!1;for(let e=0;e{pn(e);var n=S(e.body,t);if("."!==e.left){const t=new k.MathNode("mo",[ft(e.left,e.mode)]);t.setAttribute("fence","true"),n.unshift(t)}if("."!==e.right){const t=new k.MathNode("mo",[ft(e.right,e.mode)]);t.setAttribute("fence","true"),e.rightColor&&t.setAttribute("mathcolor",e.rightColor),n.push(t)}return wt(n)}}),b({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{t=dn(t[0],e);if(e.parser.leftrightDepth)return{type:"middle",mode:e.parser.mode,delim:t.text};throw new C("\\middle without preceding \\left",t)},htmlBuilder:(e,t)=>{let n;return"."===e.delim?n=nt(t,[]):(n=cn.sizedDelim(e.delim,1,t,e.mode,[]),e={delim:e.delim,options:t},n.isMiddle=e),n},mathmlBuilder:(e,t)=>{e="\\vert"===e.delim||"|"===e.delim?ft("|","text"):ft(e.delim,e.mode),e=new k.MathNode("mo",[e]);return e.setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e}});a=(i,r)=>{const s=L.wrapFragment(I(i.body,r),r),o=i.label.slice(1);let a,e=r.sizeMultiplier,l=0;const c=$.isCharacterBox(i.body);if("sout"===o)(a=L.makeSpan(["stretchy","sout"])).height=r.fontMetrics().defaultRuleThickness/e,l=-.5*r.fontMetrics().xHeight;else if("phase"===o){const i=M({number:.6,unit:"pt"},r),o=M({number:.35,unit:"ex"},r),c=(e/=r.havingBaseSizing().sizeMultiplier,s.height+s.depth+i+o),$=(s.style.paddingLeft=T(c/2+i),Math.floor(1e3*c*e)),t="M400000 "+$+" H0 L"+$/2+" 0 l65 45 L145 "+($-80)+" H400000z",n=new Se([new Ce("phase",t)],{width:"400em",height:T($/1e3),viewBox:"0 0 400000 "+$,preserveAspectRatio:"xMinYMin slice"});(a=L.makeSvgSpan(["hide-tail"],[n],r)).style.height=T(c),l=s.depth+i+o}else{/cancel/.test(o)?c||s.classes.push("cancel-pad"):"angl"===o?s.classes.push("anglpad"):s.classes.push("boxpad");let e=0,t=0,n=0;t=/box/.test(o)?(n=Math.max(r.fontMetrics().fboxrule,r.minRuleThickness),e=r.fontMetrics().fboxsep+("colorbox"===o?0:n)):"angl"===o?(n=Math.max(r.fontMetrics().defaultRuleThickness,r.minRuleThickness),e=4*n,Math.max(0,.25-s.depth)):e=c?.2:0,a=function(e,t,n,i,r){let s;i=e.height+e.depth+n+i;if(/fbox|color|angl/.test(t)){if(s=L.makeSpan(["stretchy",t],[],r),"fbox"===t){const e=r.color&&r.getColor();e&&(s.style.borderColor=e)}}else{const e=[],n=(/^[bx]cancel$/.test(t)&&e.push(new $e({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&e.push(new $e({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"})),new Se(e,{width:"100%",height:T(i)}));s=L.makeSvgSpan([],[n],r)}return s.height=i,s.style.height=T(i),s}(s,o,e,t,r),/fbox|boxed|fcolorbox/.test(o)?(a.style.borderStyle="solid",a.style.borderWidth=T(n)):"angl"===o&&.049!==n&&(a.style.borderTopWidth=T(n),a.style.borderRightWidth=T(n)),l=s.depth+t,i.backgroundColor&&(a.style.backgroundColor=i.backgroundColor,i.borderColor)&&(a.style.borderColor=i.borderColor)}let t;if(i.backgroundColor)t=L.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:l},{type:"elem",elem:s,shift:0}]},r);else{const i=/cancel|phase/.test(o)?["svg-align"]:[];t=L.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:a,shift:l,wrapperClasses:i}]},r)}return/cancel/.test(o)&&(t.height=s.height,t.depth=s.depth),/cancel/.test(o)&&!c?L.makeSpan(["mord","cancel-lap"],[t],r):L.makeSpan(["mord"],[t],r)},d=(e,t)=>{let n=0;var i=new k.MathNode(-1{if(!e.parser.settings.displayMode)throw new C("{"+e.envName+"} can be used only in display mode.")};function xn(e){if(-1===e.indexOf("ed"))return-1===e.indexOf("*")}function An(t,e,n){let{hskipBeforeAndAfter:i,addJot:r,cols:s,arraystretch:o,colSeparationType:a,autoTag:l,singleRow:c,emptySingleRow:h,maxNumCols:u,leqno:d}=e;if(t.gullet.beginGroup(),c||t.gullet.macros.set("\\cr","\\\\\\relax"),!o){const e=t.gullet.expandMacroAsText("\\arraystretch");if(null==e)o=1;else if(!(o=parseFloat(e))||o<0)throw new C("Invalid \\arraystretch: "+e)}t.gullet.beginGroup();let p=[];const m=[p],g=[],f=[],w=null!=l?[]:void 0;function v(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function y(){w&&(t.gullet.macros.get("\\df@tag")?(w.push(t.subparse([new vn("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):w.push(Boolean(l)&&"1"===t.gullet.macros.get("\\@eqnsw")))}for(v(),f.push(yn(t));;){let e=t.parseExpression(!1,c?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),e={type:"ordgroup",mode:t.mode,body:e},n&&(e={type:"styling",mode:t.mode,style:n,body:[e]}),p.push(e);const i=t.fetch().text;if("&"===i){if(u&&p.length===u){if(c||a)throw new C("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else{if("\\end"===i){y(),1===p.length&&"styling"===e.type&&0===e.body[0].body.length&&(1e))for(s=0;s=c)){(0e.length));return i.cols=new Array(r).fill({type:"align",align:n}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:Sn,mathmlBuilder:Cn}),gn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){e=An(e.parser,{arraystretch:.5},"script");return e.colSeparationType="small",e},htmlBuilder:Sn,mathmlBuilder:Cn}),gn({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){t=(Mt(t[0])?[t[0]]:D(t[0],"ordgroup").body).map(function(e){var t=Rt(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new C("Unknown column alignment: "+t,e)});if(1AV".indexOf(c)))throw new C('Expected one of "<>AV=|." after @',a[i]);for(let n=0;n<2;n++){let t=!0;for(let e=i+1;e{var n=e.font,t=t.withFont(n);return I(e.body,t)},In=(e,t)=>{var n=e.font,t=t.withFont(n);return _(e.body,t)},_n={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},Dn=(b({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:e,funcName:n}=e,t=tt(t[0]);let i=n;return i in _n&&(i=_n[i]),{type:"font",mode:e.mode,font:i.slice(1),body:t}},htmlBuilder:En,mathmlBuilder:In}),b({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var e=e["parser"],t=t[0],n=$.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:Ft(t),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:t}],isCharacterBox:n}}}),b({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:e,funcName:n,breakOnTokenText:i}=e,r=e["mode"],i=e.parseExpression(!0,i);return{type:"font",mode:r,font:"math"+n.slice(1),body:{type:"ordgroup",mode:e.mode,body:i}}},htmlBuilder:En,mathmlBuilder:In}),(e,t)=>{let n=t;return"display"===e?n=n.id>=R.SCRIPT.id?n.text():R.DISPLAY:"text"===e&&n.size===R.DISPLAY.size?n=R.TEXT:"script"===e?n=R.SCRIPT:"scriptscript"===e&&(n=R.SCRIPTSCRIPT),n}),On=(e,t)=>{const n=Dn(e.size,t.style),i=n.fracNum(),r=n.fracDen();var s=t.havingStyle(i),o=I(e.numer,s,t);if(e.continued){const e=8.5/t.fontMetrics().ptPerEm,n=3.5/t.fontMetrics().ptPerEm;o.height=o.height{let n=new k.MathNode("mfrac",[_(e.numer,t),_(e.denom,t)]);if(e.hasBarLine){if(e.barSize){const i=M(e.barSize,t);n.setAttribute("linethickness",T(i))}}else n.setAttribute("linethickness","0px");const i=Dn(e.size,t.style);if(i.size!==t.style.size){n=new k.MathNode("mstyle",[n]);const e=i.size===R.DISPLAY.size?"true":"false";n.setAttribute("displaystyle",e),n.setAttribute("scriptlevel","0")}if(null==e.leftDelim&&null==e.rightDelim)return n;{const t=[];if(null!=e.leftDelim){const n=new k.MathNode("mo",[new k.TextNode(e.leftDelim.replace("\\",""))]);n.setAttribute("fence","true"),t.push(n)}if(t.push(n),null!=e.rightDelim){const n=new k.MathNode("mo",[new k.TextNode(e.rightDelim.replace("\\",""))]);n.setAttribute("fence","true"),t.push(n)}return wt(t)}},Pn=(b({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:e,funcName:n}=e,i=t[0],t=t[1];let r,s=null,o=null,a="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",o=")";break;case"\\\\bracefrac":r=!1,s="\\{",o="\\}";break;case"\\\\brackfrac":r=!1,s="[",o="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":a="display";break;case"\\tfrac":case"\\tbinom":a="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:i,denom:t,hasBarLine:r,leftDelim:s,rightDelim:o,size:a,barSize:null}},htmlBuilder:On,mathmlBuilder:Fn}),b({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(e,t)=>{var e=e["parser"],n=t[0],t=t[1];return{type:"genfrac",mode:e.mode,continued:!0,numer:n,denom:t,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}}),b({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){let t,{parser:n,funcName:i,token:r}=e;switch(i){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:n.mode,replaceWith:t,token:r}}}),["display","text","script","scriptscript"]),zn=(b({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var e=e["parser"],n=t[4],i=t[5],r=tt(t[0]),r="atom"===r.type&&"open"===r.family?Tn(r.text):null,s=tt(t[1]),s="atom"===s.type&&"close"===s.family?Tn(s.text):null,o=D(t[2],"size");let a,l=null,c=(a=!!o.isBlank||0<(l=o.value).number,"auto"),h=t[3];if("ordgroup"===h.type){if(0{var e=e["parser"],n=t[0],i=function(e){if(e)return e;throw new Error("Expected non-null, but got "+String(e))}(D(t[1],"infix").size),t=t[2],r=0{var n=t.style;let i,r;r="supsub"===e.type?(i=e.sup?I(e.sup,t.havingStyle(n.sup()),t):I(e.sub,t.havingStyle(n.sub()),t),D(e.base,"horizBrace")):D(e,"horizBrace");n=I(r.base,t.havingBaseStyle(R.DISPLAY)),e=$t(r,t);let s;if((r.isOver?(s=L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n},{type:"kern",size:.1},{type:"elem",elem:e}]},t)).children[0].children[0].children[1]:(s=L.makeVList({positionType:"bottom",positionData:n.depth+.1+e.height,children:[{type:"elem",elem:e},{type:"kern",size:.1},{type:"elem",elem:n}]},t)).children[0].children[0].children[0]).classes.push("svg-align"),i){const e=L.makeSpan(["mord",r.isOver?"mover":"munder"],[s],t);s=r.isOver?L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.2},{type:"elem",elem:i}]},t):L.makeVList({positionType:"bottom",positionData:e.depth+.2+i.height+i.depth,children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:e}]},t)}return L.makeSpan(["mord",r.isOver?"mover":"munder"],[s],t)}),Bn=(b({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:e,funcName:n}=e;return{type:"horizBrace",mode:e.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:zn,mathmlBuilder:(e,t)=>{var n=Ct(e.label);return new k.MathNode(e.isOver?"mover":"munder",[_(e.base,t),n])}}),b({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var e=e["parser"],n=t[1],t=D(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:x(n)}:e.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var n=E(e.body,t,!1);return L.makeAnchor(e.href,[],n,t)},mathmlBuilder:(e,t)=>{let n=yt(e.body,t);return(n=n instanceof A?n:new A("mrow",[n])).setAttribute("href",e.href),n}}),b({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var e=e["parser"],n=D(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:n}))return e.formatUnsupportedCmd("\\url");var i=[];for(let t=0;t{let{parser:n,funcName:i}=t;var r=D(e[0],"raw").string,t=e[1];let s;n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o={};switch(i){case"\\htmlClass":o.class=r,s={command:"\\htmlClass",class:r};break;case"\\htmlId":o.id=r,s={command:"\\htmlId",id:r};break;case"\\htmlStyle":o.style=r,s={command:"\\htmlStyle",style:r};break;case"\\htmlData":{const t=r.split(",");for(let e=0;e{var n=E(e.body,t,!1),i=["enclosing"],r=(e.attributes.class&&i.push(...e.attributes.class.trim().split(/\s+/)),L.makeSpan(i,n,t));for(const t in e.attributes)"class"!==t&&e.attributes.hasOwnProperty(t)&&r.setAttribute(t,e.attributes[t]);return r},mathmlBuilder:(e,t)=>yt(e.body,t)}),b({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(e,t)=>{e=e.parser;return{type:"htmlmathml",mode:e.mode,html:x(t[0]),mathml:x(t[1])}},htmlBuilder:(e,t)=>{e=E(e.html,t,!1);return L.makeFragment(e)},mathmlBuilder:(e,t)=>yt(e.mathml,t)}),b({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,n)=>{let i=t["parser"],r={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},a="";if(n[0]){const t=D(n[0],"raw").string.split(",");for(let e=0;e{var n=M(e.height,t);let i=0,r=(0{var n=new k.MathNode("mglyph",[]);n.setAttribute("alt",e.alt);const i=M(e.height,t);let r=0;if(0{var{parser:e,funcName:n}=e,t=t[0];return{type:"lap",mode:e.mode,alignment:n.slice(5),body:t}},htmlBuilder:(e,t)=>{let n;n="clap"===e.alignment?(n=L.makeSpan([],[I(e.body,t)]),L.makeSpan(["inner"],[n],t)):L.makeSpan(["inner"],[I(e.body,t)]);var i=L.makeSpan(["fix"],[]);let r=L.makeSpan([e.alignment],[n,i],t);e=L.makeSpan(["strut"]);return e.style.height=T(r.height+r.depth),r.depth&&(e.style.verticalAlign=T(-r.depth)),r.children.unshift(e),r=L.makeSpan(["thinbox"],[r],t),L.makeSpan(["mord","vbox"],[r],t)},mathmlBuilder:(e,t)=>{var n=new k.MathNode("mpadded",[_(e.body,t)]);if("rlap"!==e.alignment){const t="llap"===e.alignment?"-1":"-0.5";n.setAttribute("lspace",t+"width")}return n.setAttribute("width","0px"),n}}),b({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:e,parser:n}=e,i=n.mode,e=(n.switchMode("math"),"\\("===e?"\\)":"$"),r=n.parseExpression(!1,e);return n.expect(e),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:r}}}),b({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new C("Mismatched "+e.funcName)}}),(e,t)=>{switch(t.style.size){case R.DISPLAY.size:return e.display;case R.TEXT.size:return e.text;case R.SCRIPT.size:return e.script;case R.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}}),Nn=(b({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{e=e.parser;return{type:"mathchoice",mode:e.mode,display:x(t[0]),text:x(t[1]),script:x(t[2]),scriptscript:x(t[3])}},htmlBuilder:(e,t)=>{e=Bn(e,t),e=E(e,t,!1);return L.makeFragment(e)},mathmlBuilder:(e,t)=>{e=Bn(e,t);return yt(e,t)}}),(e,t,n,i,r,s,o)=>{e=L.makeSpan([],[e]);var a=n&&$.isCharacterBox(n);let l,c,h;if(t){const e=I(t,i.havingStyle(r.sup()),i);c={elem:e,kern:Math.max(i.fontMetrics().bigOpSpacing1,i.fontMetrics().bigOpSpacing3-e.depth)}}if(n){const e=I(n,i.havingStyle(r.sub()),i);l={elem:e,kern:Math.max(i.fontMetrics().bigOpSpacing2,i.fontMetrics().bigOpSpacing4-e.height)}}if(c&&l){const t=i.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o;h=L.makeVList({positionType:"bottom",positionData:t,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:T(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:T(s)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]},i)}else if(l){const t=e.height-o;h=L.makeVList({positionType:"top",positionData:t,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:T(-s)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},i)}else{if(!c)return e;{const t=e.depth+o;h=L.makeVList({positionType:"bottom",positionData:t,children:[{type:"elem",elem:e},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:T(s)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]},i)}}t=[h];if(l&&0!==s&&!a){const e=L.makeSpan(["mspace"],[],i);e.style.marginRight=T(s),t.unshift(e)}return L.makeSpan(["mop","op-limits"],t,i)}),Hn=["\\smallint"],Wn=(t,n)=>{let e,i,r,s=!1;"supsub"===t.type?(e=t.sup,i=t.sub,r=D(t.base,"op"),s=!0):r=D(t,"op");t=n.style;let o,a=!1;if(t.size===R.DISPLAY.size&&r.symbol&&!$.contains(Hn,r.name)&&(a=!0),r.symbol){const t=a?"Size2-Regular":"Size1-Regular";let e="";if("\\oiint"!==r.name&&"\\oiiint"!==r.name||(e=r.name.slice(1),r.name="oiint"===e?"\\iint":"\\iiint"),o=L.makeSymbol(r.name,t,"math",n,["mop","op-symbol",a?"large-op":"small-op"]),0{let n;if(e.symbol)n=new A("mo",[ft(e.name,e.mode)]),$.contains(Hn,e.name)&&n.setAttribute("largeop","false");else if(e.body)n=new A("mo",S(e.body,t));else{n=new A("mi",[new gt(e.name.slice(1))]);const t=new A("mo",[ft("⁡","text")]);n=e.parentIsSupSub?new A("mrow",[n,t]):mt([n,t])}return n},Un={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},Vn=(b({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{let{parser:n,funcName:i}=e,r=i;return 1===r.length&&(r=Un[r]),{type:"op",mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Wn,mathmlBuilder:qn}),b({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:x(t)}},htmlBuilder:Wn,mathmlBuilder:qn}),{"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"}),Gn=(b({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Wn,mathmlBuilder:qn}),b({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:e,funcName:t}=e;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:Wn,mathmlBuilder:qn}),b({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(e){let{parser:t,funcName:n}=e,i=n;return 1===i.length&&(i=Vn[i]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Wn,mathmlBuilder:qn}),(e,t)=>{let n,i,r,s,o=!1;if("supsub"===e.type?(n=e.sup,i=e.sub,r=D(e.base,"operatorname"),o=!0):r=D(e,"operatorname"),0{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),n=E(e,t.withFont("mathrm"),!0);for(let e=0;e{var{parser:e,funcName:n}=e,t=t[0];return{type:"operatorname",mode:e.mode,body:x(t),alwaysHandleSupSub:"\\operatornamewithlimits"===n,limits:!1,parentIsSupSub:!1}},htmlBuilder:Gn,mathmlBuilder:(t,n)=>{let i=S(t.body,n.withFont("mathrm")),r=!0;for(let e=0;ee.toText()).join("");i=[new k.TextNode(t)]}var n=new k.MathNode("mi",i),e=(n.setAttribute("mathvariant","normal"),new k.MathNode("mo",[ft("⁡","text")]));return t.parentIsSupSub?new k.MathNode("mrow",[n,e]):k.newDocumentFragment([n,e])}}),O("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),et({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?L.makeFragment(E(e.body,t,!1)):L.makeSpan(["mord"],E(e.body,t,!0),t)},mathmlBuilder(e,t){return yt(e.body,t,!0)}}),b({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){e=e.parser,t=t[0];return{type:"overline",mode:e.mode,body:t}},htmlBuilder(e,t){var e=I(e.body,t.havingCrampedStyle()),n=L.makeLineSpan("overline-line",t),i=t.fontMetrics().defaultRuleThickness,e=L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},t);return L.makeSpan(["mord","overline"],[e],t)},mathmlBuilder(e,t){var n=new k.MathNode("mo",[new k.TextNode("‾")]),e=(n.setAttribute("stretchy","true"),new k.MathNode("mover",[_(e.body,t),n]));return e.setAttribute("accent","true"),e}}),b({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"phantom",mode:e.mode,body:x(t)}},htmlBuilder:(e,t)=>{e=E(e.body,t.withPhantom(),!1);return L.makeFragment(e)},mathmlBuilder:(e,t)=>{e=S(e.body,t);return new k.MathNode("mphantom",e)}}),b({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"hphantom",mode:e.mode,body:t}},htmlBuilder:(e,t)=>{let n=L.makeSpan([],[I(e.body,t.withPhantom())]);if(n.height=0,n.depth=0,n.children)for(let e=0;e{e=S(x(e.body),t),t=new k.MathNode("mphantom",e),e=new k.MathNode("mpadded",[t]);return e.setAttribute("height","0px"),e.setAttribute("depth","0px"),e}}),b({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{e=e.parser,t=t[0];return{type:"vphantom",mode:e.mode,body:t}},htmlBuilder:(e,t)=>{var e=L.makeSpan(["inner"],[I(e.body,t.withPhantom())]),n=L.makeSpan(["fix"],[]);return L.makeSpan(["mord","rlap"],[e,n],t)},mathmlBuilder:(e,t)=>{e=S(x(e.body),t),t=new k.MathNode("mphantom",e),e=new k.MathNode("mpadded",[t]);return e.setAttribute("width","0px"),e}}),b({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var e=e["parser"],n=D(t[0],"size").value,t=t[1];return{type:"raisebox",mode:e.mode,dy:n,body:t}},htmlBuilder(e,t){var n=I(e.body,t),e=M(e.dy,t);return L.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:n}]},t)},mathmlBuilder(e,t){t=new k.MathNode("mpadded",[_(e.body,t)]),e=e.dy.number+e.dy.unit;return t.setAttribute("voffset",e),t}}),b({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){e=e.parser;return{type:"internal",mode:e.mode}}}),b({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,n){var e=e["parser"],n=n[0],i=D(t[0],"size"),t=D(t[1],"size");return{type:"rule",mode:e.mode,shift:n&&D(n,"size").value,width:i.value,height:t.value}},htmlBuilder(e,t){var n=L.makeSpan(["mord","rule"],[],t),i=M(e.width,t),r=M(e.height,t),e=e.shift?M(e.shift,t):0;return n.style.borderRightWidth=T(i),n.style.borderTopWidth=T(r),n.style.bottom=T(e),n.width=i,n.height=r+e,n.depth=-e,n.maxFontSize=1.125*r*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=M(e.width,t),i=M(e.height,t),e=e.shift?M(e.shift,t):0,t=t.color&&t.getColor()||"black",r=new k.MathNode("mspace"),t=(r.setAttribute("mathbackground",t),r.setAttribute("width",T(n)),r.setAttribute("height",T(i)),new k.MathNode("mpadded",[r]));return 0<=e?t.setAttribute("height",T(e)):(t.setAttribute("height",T(e)),t.setAttribute("depth",T(-e))),t.setAttribute("voffset",T(e)),t}});const Kn=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Yn=(b({type:"sizing",names:Kn,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:e,funcName:n,parser:i}=e,e=i.parseExpression(!1,e);return{type:"sizing",mode:i.mode,size:Kn.indexOf(n)+1,body:e}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return jn(e.body,n,t)},mathmlBuilder:(e,t)=>{t=t.havingSize(e.size),e=S(e.body,t),e=new k.MathNode("mstyle",e);return e.setAttribute("mathsize",T(t.sizeMultiplier)),e}}),b({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{let i=e["parser"],r=!1,s=!1;var o=n[0]&&D(n[0],"ordgroup");if(o){var a;for(let e=0;e{var n=L.makeSpan([],[I(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0,n.children))for(let e=0;e{t=new k.MathNode("mpadded",[_(e.body,t)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}}),b({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){e=e.parser,n=n[0],t=t[0];return{type:"sqrt",mode:e.mode,body:t,index:n}},htmlBuilder(e,t){let n=I(e.body,t.havingCrampedStyle());0===n.height&&(n.height=t.fontMetrics().xHeight),n=L.wrapFragment(n,t);const i=t.fontMetrics().defaultRuleThickness;let r=i,s=(t.style.idn.height+n.depth+s&&(s=(s+h-n.height-n.depth)/2);var u=a.height-n.height-s-l,u=(n.style.paddingLeft=T(c),L.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:-(n.height+u)},{type:"elem",elem:a},{type:"kern",size:l}]},t));if(e.index){const n=t.havingStyle(R.SCRIPTSCRIPT),i=I(e.index,n,t),r=.6*(u.height-u.depth),s=L.makeVList({positionType:"shift",positionData:-r,children:[{type:"elem",elem:i}]},t),o=L.makeSpan(["root"],[s]);return L.makeSpan(["mord","sqrt"],[o,u],t)}return L.makeSpan(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:e,index:n}=e;return n?new k.MathNode("mroot",[_(e,t),_(n,t)]):new k.MathNode("msqrt",[_(e,t)])}}),{display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT}),Xn=(b({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:e,funcName:n,parser:i}=e,e=i.parseExpression(!0,e),n=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:n,body:e}},htmlBuilder(e,t){var n=Yn[e.style],n=t.havingStyle(n).withFont("");return jn(e.body,n,t)},mathmlBuilder(e,t){var n=Yn[e.style],t=t.havingStyle(n),n=S(e.body,t),t=new k.MathNode("mstyle",n),n={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return t.setAttribute("scriptlevel",n[0]),t.setAttribute("displaystyle",n[1]),t}}),et({type:"supsub",htmlBuilder(e,t){i=t;const n=(s=(r=e).base)?"op"===s.type?s.limits&&(i.style.size===R.DISPLAY.size||s.alwaysHandleSupSub)?Wn:null:"operatorname"===s.type?s.alwaysHandleSupSub&&(i.style.size===R.DISPLAY.size||s.limits)?Gn:null:"accent"===s.type?$.isCharacterBox(s.base)?Tt:null:"horizBrace"===s.type&&!r.sub===s.isOver?zn:null:null;if(n)return n(e,t);var{base:i,sup:r,sub:s}=e,o=I(i,t);let a,l;var c=t.fontMetrics();let h=0,u=0;i=i&&$.isCharacterBox(i);if(r){const e=t.havingStyle(t.style.sup());a=I(r,e,t),i||(h=o.height-e.fontMetrics().supDrop*e.sizeMultiplier/t.sizeMultiplier)}if(s){const e=t.havingStyle(t.style.sub());l=I(s,e,t),i||(u=o.depth+e.fontMetrics().subDrop*e.sizeMultiplier/t.sizeMultiplier)}r=t.style===R.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2,s=t.sizeMultiplier,i=T(.5/c.ptPerEm/s);let d,p=null;if(l){const t=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(o instanceof m||t)&&(p=T(-o.italic))}if(a&&l){h=Math.max(h,r,a.depth+.25*c.xHeight),u=Math.max(u,c.sub2);const e=4*c.defaultRuleThickness;if(h-a.depth-(l.height-u){var e=new k.MathNode("mtd",[]);return e.setAttribute("width","50%"),e}),ei=(et({type:"tag",mathmlBuilder(e,t){e=new k.MathNode("mtable",[new k.MathNode("mtr",[Zn(),new k.MathNode("mtd",[yt(e.body,t)]),Zn(),new k.MathNode("mtd",[yt(e.tag,t)])])]);return e.setAttribute("width","100%"),e}}),{"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"}),ti={"\\textbf":"textbf","\\textmd":"textmd"},ni={"\\textit":"textit","\\textup":"textup"},ii=(e,t)=>{e=e.font;return e?ei[e]?t.withTextFontFamily(ei[e]):ti[e]?t.withTextFontWeight(ti[e]):t.withTextFontShape(ni[e]):t},ri=(b({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:e,funcName:n}=e,t=t[0];return{type:"text",mode:e.mode,body:x(t),font:n}},htmlBuilder(e,t){t=ii(e,t),e=E(e.body,t,!0);return L.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){t=ii(e,t);return yt(e.body,t)}}),b({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){e=e.parser;return{type:"underline",mode:e.mode,body:t[0]}},htmlBuilder(e,t){var e=I(e.body,t),n=L.makeLineSpan("underline-line",t),i=t.fontMetrics().defaultRuleThickness,n=L.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:e}]},t);return L.makeSpan(["mord","underline"],[n],t)},mathmlBuilder(e,t){var n=new k.MathNode("mo",[new k.TextNode("‾")]),e=(n.setAttribute("stretchy","true"),new k.MathNode("munder",[_(e.body,t),n]));return e.setAttribute("accentunder","true"),e}}),b({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){e=e.parser;return{type:"vcenter",mode:e.mode,body:t[0]}},htmlBuilder(e,t){var e=I(e.body,t),n=t.fontMetrics().axisHeight,n=.5*(e.height-n-(e.depth+n));return L.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:e}]},t)},mathmlBuilder(e,t){return new k.MathNode("mpadded",[_(e.body,t)],["vcenter"])}}),b({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new C("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(n,e){var i=ri(n),r=[],s=e.havingStyle(e.style.text());for(let t=0;te.body.replace(/ /g,e.star?"␣":" "));var si=Je;const oi="[̀-ͯ]",ai=new RegExp(oi+"+$");class li{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){const e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new vn("EOF",new wn(this,t,t));var n=this.tokenRegex.exec(e);if(null===n||n.index!==t)throw new C("Unexpected character: '"+e[t]+"'",new vn(e[t],new wn(this,t,t+1)));n=n[6]||n[3]||(n[2]?"\\ ":" ");if(14!==this.catcodes[n])return new vn(n,new wn(this,t,this.tokenRegex.lastIndex));{const t=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===t?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=t+1,this.lex()}}}class ci{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new C("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(const t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;0=t)throw new C("Invalid base-"+t+" digit "+n.text);for(var r;null!=(r=ui[e.future().text])&&r{let i=n.consumeArg().tokens;if(1!==i.length)throw new C("\\newcommand's first argument must be a macro name");var r=i[0].text,s=n.isDefined(r);if(s&&!e)throw new C("\\newcommand{"+r+"} attempting to redefine "+r+"; use \\renewcommand");if(!s&&!t)throw new C("\\renewcommand{"+r+"} when command "+r+" does not yet exist; use \\newcommand");let o=0;if(1===(i=n.consumeArg().tokens).length&&"["===i[0].text){let e="",t=n.expandNextToken();for(;"]"!==t.text&&"EOF"!==t.text;)e+=t.text,t=n.expandNextToken();if(!e.match(/^\s*[0-9]+\s*$/))throw new C("Invalid number of arguments: "+e);o=parseInt(e),i=n.consumeArg().tokens}return n.macros.set(r,{tokens:i,numArgs:o}),""}),pi=(O("\\newcommand",e=>di(e,!1,!0)),O("\\renewcommand",e=>di(e,!0,!1)),O("\\providecommand",e=>di(e,!0,!0)),O("\\message",e=>{e=e.consumeArgs(1)[0];return console.log(e.reverse().map(e=>e.text).join("")),""}),O("\\errmessage",e=>{e=e.consumeArgs(1)[0];return console.error(e.reverse().map(e=>e.text).join("")),""}),O("\\show",e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),si[n],u.math[n],u.text[n]),""}),O("\\bgroup","{"),O("\\egroup","}"),O("~","\\nobreakspace"),O("\\lq","`"),O("\\rq","'"),O("\\aa","\\r a"),O("\\AA","\\r A"),O("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),O("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),O("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),O("ℬ","\\mathscr{B}"),O("ℰ","\\mathscr{E}"),O("ℱ","\\mathscr{F}"),O("ℋ","\\mathscr{H}"),O("ℐ","\\mathscr{I}"),O("ℒ","\\mathscr{L}"),O("ℳ","\\mathscr{M}"),O("ℛ","\\mathscr{R}"),O("ℭ","\\mathfrak{C}"),O("ℌ","\\mathfrak{H}"),O("ℨ","\\mathfrak{Z}"),O("\\Bbbk","\\Bbb{k}"),O("·","\\cdotp"),O("\\llap","\\mathllap{\\textrm{#1}}"),O("\\rlap","\\mathrlap{\\textrm{#1}}"),O("\\clap","\\mathclap{\\textrm{#1}}"),O("\\mathstrut","\\vphantom{(}"),O("\\underbar","\\underline{\\text{#1}}"),O("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),O("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),O("\\ne","\\neq"),O("≠","\\neq"),O("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),O("∉","\\notin"),O("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),O("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),O("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),O("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),O("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),O("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),O("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),O("⟂","\\perp"),O("‼","\\mathclose{!\\mkern-0.8mu!}"),O("∌","\\notni"),O("⌜","\\ulcorner"),O("⌝","\\urcorner"),O("⌞","\\llcorner"),O("⌟","\\lrcorner"),O("©","\\copyright"),O("®","\\textregistered"),O("️","\\textregistered"),O("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),O("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),O("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),O("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),O("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),O("⋮","\\vdots"),O("\\varGamma","\\mathit{\\Gamma}"),O("\\varDelta","\\mathit{\\Delta}"),O("\\varTheta","\\mathit{\\Theta}"),O("\\varLambda","\\mathit{\\Lambda}"),O("\\varXi","\\mathit{\\Xi}"),O("\\varPi","\\mathit{\\Pi}"),O("\\varSigma","\\mathit{\\Sigma}"),O("\\varUpsilon","\\mathit{\\Upsilon}"),O("\\varPhi","\\mathit{\\Phi}"),O("\\varPsi","\\mathit{\\Psi}"),O("\\varOmega","\\mathit{\\Omega}"),O("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),O("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),O("\\boxed","\\fbox{$\\displaystyle{#1}$}"),O("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),O("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),O("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),{",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"}),mi=(O("\\dots",function(e){let t="\\dotso";e=e.expandAfterFuture().text;return e in pi?t=pi[e]:("\\not"===e.slice(0,4)||e in u.math&&$.contains(["bin","rel"],u.math[e].group))&&(t="\\dotsb"),t}),{")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0});O("\\dotso",function(e){return e.future().text in mi?"\\ldots\\,":"\\ldots"}),O("\\dotsc",function(e){e=e.future().text;return e in mi&&","!==e?"\\ldots\\,":"\\ldots"}),O("\\cdots",function(e){return e.future().text in mi?"\\@cdots\\,":"\\@cdots"}),O("\\dotsb","\\cdots"),O("\\dotsm","\\cdots"),O("\\dotsi","\\!\\cdots"),O("\\dotsx","\\ldots\\,"),O("\\DOTSI","\\relax"),O("\\DOTSB","\\relax"),O("\\DOTSX","\\relax"),O("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),O("\\,","\\tmspace+{3mu}{.1667em}"),O("\\thinspace","\\,"),O("\\>","\\mskip{4mu}"),O("\\:","\\tmspace+{4mu}{.2222em}"),O("\\medspace","\\:"),O("\\;","\\tmspace+{5mu}{.2777em}"),O("\\thickspace","\\;"),O("\\!","\\tmspace-{3mu}{.1667em}"),O("\\negthinspace","\\!"),O("\\negmedspace","\\tmspace-{4mu}{.2222em}"),O("\\negthickspace","\\tmspace-{5mu}{.277em}"),O("\\enspace","\\kern.5em "),O("\\enskip","\\hskip.5em\\relax"),O("\\quad","\\hskip1em\\relax"),O("\\qquad","\\hskip2em\\relax"),O("\\tag","\\@ifstar\\tag@literal\\tag@paren"),O("\\tag@paren","\\tag@literal{({#1})}"),O("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new C("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),O("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),O("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),O("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),O("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),O("\\newline","\\\\\\relax"),O("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");l=T(ie["Main-Regular"]["T".charCodeAt(0)][1]-.7*ie["Main-Regular"]["A".charCodeAt(0)][1]),O("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+l+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),O("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+l+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),O("\\hspace","\\@ifstar\\@hspacer\\@hspace"),O("\\@hspace","\\hskip #1\\relax"),O("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),O("\\ordinarycolon",":"),O("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),O("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),O("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),O("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),O("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),O("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),O("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),O("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),O("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),O("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),O("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),O("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),O("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),O("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),O("∷","\\dblcolon"),O("∹","\\eqcolon"),O("≔","\\coloneqq"),O("≕","\\eqqcolon"),O("⩴","\\Coloneqq"),O("\\ratio","\\vcentcolon"),O("\\coloncolon","\\dblcolon"),O("\\colonequals","\\coloneqq"),O("\\coloncolonequals","\\Coloneqq"),O("\\equalscolon","\\eqqcolon"),O("\\equalscoloncolon","\\Eqqcolon"),O("\\colonminus","\\coloneq"),O("\\coloncolonminus","\\Coloneq"),O("\\minuscolon","\\eqcolon"),O("\\minuscoloncolon","\\Eqcolon"),O("\\coloncolonapprox","\\Colonapprox"),O("\\coloncolonsim","\\Colonsim"),O("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),O("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),O("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),O("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),O("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),O("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),O("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),O("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),O("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),O("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),O("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),O("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),O("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),O("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),O("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),O("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),O("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),O("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),O("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),O("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),O("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),O("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),O("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),O("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),O("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),O("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),O("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),O("\\imath","\\html@mathml{\\@imath}{ı}"),O("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),O("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),O("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),O("⟦","\\llbracket"),O("⟧","\\rrbracket"),O("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),O("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),O("⦃","\\lBrace"),O("⦄","\\rBrace"),O("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),O("⦵","\\minuso"),O("\\darr","\\downarrow"),O("\\dArr","\\Downarrow"),O("\\Darr","\\Downarrow"),O("\\lang","\\langle"),O("\\rang","\\rangle"),O("\\uarr","\\uparrow"),O("\\uArr","\\Uparrow"),O("\\Uarr","\\Uparrow"),O("\\N","\\mathbb{N}"),O("\\R","\\mathbb{R}"),O("\\Z","\\mathbb{Z}"),O("\\alef","\\aleph"),O("\\alefsym","\\aleph"),O("\\Alpha","\\mathrm{A}"),O("\\Beta","\\mathrm{B}"),O("\\bull","\\bullet"),O("\\Chi","\\mathrm{X}"),O("\\clubs","\\clubsuit"),O("\\cnums","\\mathbb{C}"),O("\\Complex","\\mathbb{C}"),O("\\Dagger","\\ddagger"),O("\\diamonds","\\diamondsuit"),O("\\empty","\\emptyset"),O("\\Epsilon","\\mathrm{E}"),O("\\Eta","\\mathrm{H}"),O("\\exist","\\exists"),O("\\harr","\\leftrightarrow"),O("\\hArr","\\Leftrightarrow"),O("\\Harr","\\Leftrightarrow"),O("\\hearts","\\heartsuit"),O("\\image","\\Im"),O("\\infin","\\infty"),O("\\Iota","\\mathrm{I}"),O("\\isin","\\in"),O("\\Kappa","\\mathrm{K}"),O("\\larr","\\leftarrow"),O("\\lArr","\\Leftarrow"),O("\\Larr","\\Leftarrow"),O("\\lrarr","\\leftrightarrow"),O("\\lrArr","\\Leftrightarrow"),O("\\Lrarr","\\Leftrightarrow"),O("\\Mu","\\mathrm{M}"),O("\\natnums","\\mathbb{N}"),O("\\Nu","\\mathrm{N}"),O("\\Omicron","\\mathrm{O}"),O("\\plusmn","\\pm"),O("\\rarr","\\rightarrow"),O("\\rArr","\\Rightarrow"),O("\\Rarr","\\Rightarrow"),O("\\real","\\Re"),O("\\reals","\\mathbb{R}"),O("\\Reals","\\mathbb{R}"),O("\\Rho","\\mathrm{P}"),O("\\sdot","\\cdot"),O("\\sect","\\S"),O("\\spades","\\spadesuit"),O("\\sub","\\subset"),O("\\sube","\\subseteq"),O("\\supe","\\supseteq"),O("\\Tau","\\mathrm{T}"),O("\\thetasym","\\vartheta"),O("\\weierp","\\wp"),O("\\Zeta","\\mathrm{Z}"),O("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),O("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),O("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),O("\\bra","\\mathinner{\\langle{#1}|}"),O("\\ket","\\mathinner{|{#1}\\rangle}"),O("\\braket","\\mathinner{\\langle{#1}\\rangle}"),O("\\Bra","\\left\\langle#1\\right|"),O("\\Ket","\\left|#1\\right\\rangle"),p=l=>e=>{const t=e.consumeArg().tokens,i=e.consumeArg().tokens,r=e.consumeArg().tokens,n=e.consumeArg().tokens,s=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var a=n=>e=>{l&&(e.macros.set("|",s),r.length)&&e.macros.set("\\|",o);let t=n;return!n&&r.length&&"|"===e.future().text&&(e.popToken(),t=!0),{tokens:t?r:i,numArgs:0}},a=(e.macros.set("|",a(!1)),r.length&&e.macros.set("\\|",a(!0)),e.consumeArg().tokens),a=e.expandTokens([...n,...a,...t]);return e.macros.endGroup(),{tokens:a.reverse(),numArgs:0}};O("\\bra@ket",p(!1)),O("\\bra@set",p(!0)),O("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),O("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),O("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),O("\\angln","{\\angl n}"),O("\\blue","\\textcolor{##6495ed}{#1}"),O("\\orange","\\textcolor{##ffa500}{#1}"),O("\\pink","\\textcolor{##ff00af}{#1}"),O("\\red","\\textcolor{##df0030}{#1}"),O("\\green","\\textcolor{##28ae7b}{#1}"),O("\\gray","\\textcolor{gray}{#1}"),O("\\purple","\\textcolor{##9d38bd}{#1}"),O("\\blueA","\\textcolor{##ccfaff}{#1}"),O("\\blueB","\\textcolor{##80f6ff}{#1}"),O("\\blueC","\\textcolor{##63d9ea}{#1}"),O("\\blueD","\\textcolor{##11accd}{#1}"),O("\\blueE","\\textcolor{##0c7f99}{#1}"),O("\\tealA","\\textcolor{##94fff5}{#1}"),O("\\tealB","\\textcolor{##26edd5}{#1}"),O("\\tealC","\\textcolor{##01d1c1}{#1}"),O("\\tealD","\\textcolor{##01a995}{#1}"),O("\\tealE","\\textcolor{##208170}{#1}"),O("\\greenA","\\textcolor{##b6ffb0}{#1}"),O("\\greenB","\\textcolor{##8af281}{#1}"),O("\\greenC","\\textcolor{##74cf70}{#1}"),O("\\greenD","\\textcolor{##1fab54}{#1}"),O("\\greenE","\\textcolor{##0d923f}{#1}"),O("\\goldA","\\textcolor{##ffd0a9}{#1}"),O("\\goldB","\\textcolor{##ffbb71}{#1}"),O("\\goldC","\\textcolor{##ff9c39}{#1}"),O("\\goldD","\\textcolor{##e07d10}{#1}"),O("\\goldE","\\textcolor{##a75a05}{#1}"),O("\\redA","\\textcolor{##fca9a9}{#1}"),O("\\redB","\\textcolor{##ff8482}{#1}"),O("\\redC","\\textcolor{##f9685d}{#1}"),O("\\redD","\\textcolor{##e84d39}{#1}"),O("\\redE","\\textcolor{##bc2612}{#1}"),O("\\maroonA","\\textcolor{##ffbde0}{#1}"),O("\\maroonB","\\textcolor{##ff92c6}{#1}"),O("\\maroonC","\\textcolor{##ed5fa6}{#1}"),O("\\maroonD","\\textcolor{##ca337c}{#1}"),O("\\maroonE","\\textcolor{##9e034e}{#1}"),O("\\purpleA","\\textcolor{##ddd7ff}{#1}"),O("\\purpleB","\\textcolor{##c6b9fc}{#1}"),O("\\purpleC","\\textcolor{##aa87ff}{#1}"),O("\\purpleD","\\textcolor{##7854ab}{#1}"),O("\\purpleE","\\textcolor{##543b78}{#1}"),O("\\mintA","\\textcolor{##f5f9e8}{#1}"),O("\\mintB","\\textcolor{##edf2df}{#1}"),O("\\mintC","\\textcolor{##e0e5cc}{#1}"),O("\\grayA","\\textcolor{##f6f7f7}{#1}"),O("\\grayB","\\textcolor{##f0f1f2}{#1}"),O("\\grayC","\\textcolor{##e3e5e6}{#1}"),O("\\grayD","\\textcolor{##d6d8da}{#1}"),O("\\grayE","\\textcolor{##babec2}{#1}"),O("\\grayF","\\textcolor{##888d93}{#1}"),O("\\grayG","\\textcolor{##626569}{#1}"),O("\\grayH","\\textcolor{##3b3e40}{#1}"),O("\\grayI","\\textcolor{##21242c}{#1}"),O("\\kaBlue","\\textcolor{##314453}{#1}"),O("\\kaGreen","\\textcolor{##71B307}{#1}");const gi={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class fi{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new ci(hi,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new li(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){let t,n,i;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:t,end:n}=this.consumeArg());return this.pushToken(new vn("EOF",n.loc)),this.pushTokens(i),t.range(n,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t=[],n=e&&0this.settings.maxExpand)throw new C("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),n=t.text,i=t.noexpand?null:this._getExpansion(n);if(null==i||e&&i.unexpandable){if(e&&null==i&&"\\"===n[0]&&!this.isDefined(n))throw new C("Undefined control sequence: "+n);return this.pushToken(t),!1}this.countExpansion(1);let r=i.tokens;var s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs)for(let e=(r=r.slice()).length-1;0<=e;--e){var o=r[e];if("#"===o.text){if(0===e)throw new C("Incomplete placeholder at end of macro body",o);if("#"===(o=r[--e]).text)r.splice(e+1,1);else{if(!/^[1-9]$/.test(o.text))throw new C("Not a valid argument number",o);r.splice(e,2,...s[+o.text-1])}}}return this.pushTokens(r),r.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var e;if(!1===this.expandOnce())return(e=this.stack.pop()).treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new vn(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(!1===this.expandOnce(!0)){const e=this.stack.pop();e.treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),t.push(e)}return this.countExpansion(t.length),t}expandMacroAsText(e){e=this.expandMacro(e);return e&&e.map(e=>e.text).join("")}_getExpansion(n){const i=this.macros.get(n);if(null==i)return i;if(1===n.length){const i=this.lexer.catcodes[n];if(null!=i&&13!==i)return}n="function"==typeof i?i(this):i;if("string"!=typeof n)return n;{let e=0;if(-1!==n.indexOf("#")){const i=n.replace(/##/g,"");for(;-1!==i.indexOf("#"+(e+1));)++e}const i=new li(n,this.settings),r=[];let t=i.lex();for(;"EOF"!==t.text;)r.push(t),t=i.lex();return r.reverse(),{tokens:r,numArgs:e}}}isDefined(e){return this.macros.has(e)||si.hasOwnProperty(e)||u.math.hasOwnProperty(e)||u.text.hasOwnProperty(e)||gi.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:si.hasOwnProperty(e)&&!si[e].primitive}}const wi=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,vi=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),yi={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},bi={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"};class xi{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new fi(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new C("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken,e=(this.consume(),this.gullet.pushToken(new vn("}")),this.gullet.pushTokens(e),this.parseExpression(!1));return this.expect("}"),this.nextToken=t,e}parseExpression(e,t){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var i=this.fetch();if(-1!==xi.endOfExpression.indexOf(i.text))break;if(t&&i.text===t)break;if(e&&si[i.text]&&si[i.text].infix)break;i=this.parseAtom(t);if(!i)break;"internal"!==i.type&&n.push(i)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){let n,i=-1;for(let e=0;ee.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")).join("|")+")");for(;-1!==(n=t.search(r));){0t.startsWith(e.left));if(-1===(n=function(e,t,n){let i=n,r=0;for(var s=e.length;i-1===r.indexOf(" "+e+" "))&&c(o,s)}}};var s=function(e,t){if(!e)throw new Error("No element provided to render");var n={};for(const e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},c(e,n)}}return e.default}()}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).markedKatex=t(e.katex)}(this,function(i){"use strict";const r=/^(\${1,2})(?!\$)((?:\\.|[^\\\n])*?(?:\\.|[^\\\n\$]))\1(?=[\s?!\.,:?!。,:]|$)/,n=/^(\${1,2})\n((?:\\[^]|[^\\])+?)\n\1(?:\n|$)/;function t(t,n){return e=>i.renderToString(e.text,{...t,displayMode:e.displayMode})+(n?"\n":"")}return function(e={}){return{extensions:[{name:"inlineKatex",level:"inline",start(e){let t,n=e;for(;n;){if(-1===(t=n.indexOf("$")))return;if((0===t||" "===n.charAt(t-1))&&n.substring(t).match(r))return t;n=n.substring(t+1).replace(/^\$+/,"")}},tokenizer(e,t){e=e.match(r);if(e)return{type:"inlineKatex",raw:e[0],text:e[2].trim(),displayMode:2===e[1].length}},renderer:t(e,!1)},{name:"blockKatex",level:"block",tokenizer(e,t){e=e.match(n);if(e)return{type:"blockKatex",raw:e[0],text:e[2].trim(),displayMode:2===e[1].length}},renderer:t(e,!0)}]}}}),"undefined"!=typeof window&&(window.markedMermaid=markedMermaid),"undefined"!=typeof module&&module.exports&&(module.exports=markedMermaid),function(){function e(e){return e}function t(n){return function(e){var t=c("img",["image-output"]);return t.src="data:image/"+n+";base64,"+u(e).replace(/\n/g,""),t}}function n(){var t=this,e=d.display_priority.filter(function(e){return(t.raw.data||t.raw)[e]})[0];return e&&d.display[e]?d.display[e](t.raw[e]||t.raw.data[e]):c("div",["empty-output"])}function i(){var e=c("pre",["pyerr"]),t=this.raw.traceback.join("\n");return e.innerHTML=d.highlighter(d.ansi(h(t)),e),e}var r,s,o,a=this,l=void 0!==a.window,c=(s=(l?a:(r=new(require("jsdom").JSDOM)).window).document,function(e,t){e=s.createElement(e);return e.className=(t||[]).map(function(e){return d.prefix+e}).join(" "),e}),h=function(e){return e.replace(//g,">")},u=function(e){return e.join?e.map(u).join(""):e},d={prefix:"nb-",markdown:(o=a.marked||"function"==typeof require&&require("marked"))&&o.parse||e,ansi:(o=a.ansi_up||"function"==typeof require&&require("ansi_up"))&&o.ansi_to_html||e,sanitizer:(o=a.DOMPurify||"function"==typeof require&&require("dompurify"),(l?o&&o.sanitize:o(r.window).sanitize)||e),highlighter:e,VERSION:"0.7.0",Input:function(e,t){this.raw=e,this.cell=t}},p=(d.Input.prototype.render=function(){var e,t,n,i;return this.raw.length?(e=c("div",["input"]),"number"==typeof(i=this.cell).number&&e.setAttribute("data-prompt-number",this.cell.number),t=c("pre"),n=c("code"),i=i.worksheet.notebook.metadata,i=this.cell.raw.language||i.language||i.kernelspec&&i.kernelspec.language||i.language_info&&i.language_info.name,n.setAttribute("data-language",i),n.className="lang-"+i,n.innerHTML=d.highlighter(h(u(this.raw)),t,n,i),t.appendChild(n),e.appendChild(t),this.el=e):c("div")},d.display={},d.display.text=function(e){var t=c("pre",["text-output"]);return t.innerHTML=d.highlighter(d.ansi(u(e)),t),t},d.display["text/plain"]=d.display.text,d.display.html=function(e){var t=c("div",["html-output"]);return t.innerHTML=d.sanitizer(u(e)),t},d.display["text/html"]=d.display.html,d.display.marked=function(e){return d.display.html(d.markdown(u(e)))},d.display["text/markdown"]=d.display.marked,d.display.svg=function(e){var t=c("div",["svg-output"]);return t.innerHTML=u(e),t},d.display["text/svg+xml"]=d.display.svg,d.display["image/svg+xml"]=d.display.svg,d.display.latex=function(e){var t=c("div",["latex-output"]);return t.innerHTML=u(e),t},d.display["text/latex"]=d.display.latex,d.display.javascript=function(e){var t=c("script");return t.innerHTML=u(e),t},d.display["application/javascript"]=d.display.javascript,d.display.png=t("png"),d.display["image/png"]=d.display.png,d.display.jpeg=t("jpeg"),d.display["image/jpeg"]=d.display.jpeg,d.display_priority=["png","image/png","jpeg","image/jpeg","svg","image/svg+xml","text/svg+xml","html","text/html","text/markdown","latex","text/latex","javascript","application/javascript","text","text/plain"],d.Output=function(e,t){this.raw=e,this.cell=t,this.type=e.output_type},d.Output.prototype.renderers={display_data:n,execute_result:n,pyout:n,pyerr:i,error:i,stream:function(){var e=c("pre",[this.raw.stream||this.raw.name]),t=u(this.raw.text);return e.innerHTML=d.highlighter(d.ansi(h(t)),e),e}},d.Output.prototype.render=function(){var e=c("div",["output"]),t=("number"==typeof this.cell.number&&e.setAttribute("data-prompt-number",this.cell.number),this.renderers[this.type].call(this));return e.appendChild(t),this.el=e},d.coalesceStreams=function(e){var t,n;return e.length?(t=e[0],n=[t],e.slice(1).forEach(function(e){"stream"===e.raw.output_type&&"stream"===t.raw.output_type&&e.raw.stream===t.raw.stream&&e.raw.name===t.raw.name?t.raw.text=t.raw.text.concat(e.raw.text):(n.push(e),t=e)}),n):e},[{left:"$$",right:"$$",display:!0},{left:"\\[",right:"\\]",display:!0},{left:"\\(",right:"\\)",display:!(d.Cell=function(e,t){var n=this;n.raw=e,n.worksheet=t,n.type=e.cell_type,"code"===n.type&&(n.number=-1")))):e.innerHTML=d.sanitizer(d.markdown(t)),e},heading:function(){var e=c("h"+this.raw.level,["cell","heading-cell"]);return e.innerHTML=d.sanitizer(u(this.raw.source)),e},raw:function(){var e=c("div",["cell","raw-cell"]);return e.innerHTML=h(u(this.raw.source)),e},code:function(){var t=c("div",["cell","code-cell"]);t.appendChild(this.input.render()),this.outputs.forEach(function(e){t.appendChild(e.render())});return t}},d.Cell.prototype.render=function(){var e=this.renderers[this.type].call(this);return this.el=e},d.Worksheet=function(e,t){var n=this;this.raw=e,this.notebook=t,this.cells=e.cells.map(function(e){return new d.Cell(e,n)}),this.render=function(){var t=c("div",["worksheet"]);return n.cells.forEach(function(e){t.appendChild(e.render())}),this.el=t}},d.Notebook=function(e,t){var n=this,t=(this.raw=e,this.config=t,this.metadata=e.metadata||{}),t=(this.title=t.title||t.name,e.worksheets||[{cells:e.cells}]);this.worksheets=t.map(function(e){return new d.Worksheet(e,n)}),this.sheet=this.worksheets[0]},d.Notebook.prototype.render=function(){var t=c("div",["notebook"]);return this.worksheets.forEach(function(e){t.appendChild(e.render())}),this.el=t},d.parse=function(e,t){return new d.Notebook(e,t)},"function"==typeof define&&define.amd&&define(function(){return d}),"undefined"!=typeof exports?(exports="undefined"!=typeof module&&module.exports?module.exports=d:exports).nb=d:a.nb=d}.call(this);var Org=function(){var e={},i={rules:{},define:function(t,e){this.rules[t]=e,this["is"+t.substring(0,1).toUpperCase()+t.substring(1)]=function(e){return this.rules[t].exec(e)}}};function r(){}function s(e){this.stream=e,this.tokenStack=[]}function o(e,t){if(this.type=e,this.children=[],t)for(var n=0,i=t.length;n";return void 0!==this.value?e+=" "+this.value:this.children&&(e+="\n"+this.children.map(function(e,t){return"#"+t+" "+e.toString()}).join("\n").split("\n").map(function(e){return" "+e}).join("\n")),e}};var d={types:{},define:function(n,i){var e="create"+(this.types[n]=n).substring(0,1).toUpperCase()+n.substring(1),r="function"==typeof i;this[e]=function(e,t){e=new o(n,e);return r&&i(e,t||{}),e}}};function a(e){this.sequences=e.split(/\r?\n/),this.totalLines=this.sequences.length,this.lineNumber=0}function l(){this.inlineParser=new t}function t(){this.preEmphasis=" \t\\('\"",this.postEmphasis="- \t.,:!?;'\"\\)",this.borderForbidden=" \t\r\n,\"'",this.bodyRegexp="[\\s\\S]*?",this.markers="*/_=~+",this.emphasisPattern=this.buildEmphasisPattern(),this.linkPattern=/\[\[([^\]]*)\](?:\[([^\]]*)\])?\]/g}function n(){}function c(e,t){this.initialize(e,t),this.result=this.convert()}return d.define("text",function(e,t){e.value=t.value}),d.define("header",function(e,t){e.level=t.level}),d.define("orderedList"),d.define("unorderedList"),d.define("definitionList"),d.define("listElement"),d.define("paragraph"),d.define("preformatted"),d.define("table"),d.define("tableRow"),d.define("tableCell"),d.define("horizontalRule"),d.define("directive"),d.define("inlineContainer"),d.define("bold"),d.define("italic"),d.define("underline"),d.define("code"),d.define("verbatim"),d.define("dashed"),d.define("link",function(e,t){e.src=t.src}),void 0!==e&&(e.Node=d),a.prototype.peekNextLine=function(){return this.hasNext()?this.sequences[this.lineNumber]:null},a.prototype.getNextLine=function(){return this.hasNext()?this.sequences[this.lineNumber++]:null},a.prototype.hasNext=function(){return this.lineNumbere)){if(0<(l=s.level-n))for(var o,a=0;a]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])/i,linkURL:function(e){var t=this;return e.replace(this.urlPattern,function(e){return e.indexOf("://")<0&&(e="http://"+e),t.makeLink(e)})},makeLink:function(e){throw"Implement makeLink"},makeSubscripts:function(e){return"{}"===this.documentOptions["^"]?e.replace(/\b([^_ \t]*)_{([^}]*)}/g,this.makeSubscript):this.documentOptions["^"]?e.replace(/\b([^_ \t]*)_([^_]*)\b/g,this.makeSubscript):e},makeSubscript:function(e,t,n){throw"Implement makeSubscript"},imageExtensionPattern:new RegExp("("+["bmp","png","jpeg","jpg","gif","tiff","tif","xbm","xpm","pbm","pgm","ppm"].join("|")+")$","i")},void 0!==e&&(e.Converter=n),c.prototype={__proto__:n.prototype,convert:function(){var e=this.orgDocument.title?this.convertNode(this.orgDocument.title):this.untitled,t=this.tag("h1",e),n=this.convertNodes(this.orgDocument.nodes,!0),i=this.computeToc(this.documentOptions.toc),r=this.tocToHTML(i);return{title:e,titleHTML:t,contentHTML:n,tocHTML:r,toc:i,toString:function(){return t+r+"\n"+n}}},tocToHTML:function(e){function a(e){for(var t="",n=0;n":[">",null],'"':[""",null],"'":["'",null],"->":["➔",function(e,t){return this.exportOptions.translateSymbolArrow&&!t}]},replaceRegexp:null,escapeSpecialChars:function(n,i){this.replaceRegexp||(this.replaceRegexp=new RegExp(Object.keys(this.replaceMap).join("|"),"g"));var r=this.replaceMap,s=this;return n.replace(this.replaceRegexp,function(e){var t;if(r[e])return"function"!=typeof(t=r[e][1])||t.call(s,n,i)?r[e][0]:e;throw"escapeSpecialChars: Invalid match"})},postProcess:function(e,t,n){return t=this.exportOptions.exportFromLineNumber&&"number"==typeof e.fromLineNumber?this.inlineTag("div",t,{"data-line-number":e.fromLineNumber}):t},makeLink:function(e){return''+decodeURIComponent(e)+""},makeSubscript:function(e,t,n){return''+t+''+n+""},attributesObjectToString:function(e){var t,n="";for(t in e)e.hasOwnProperty(t)&&(n+=" "+t+'="'+e[t]+'"');return n},inlineTag:function(e,t,n,i){var r="<"+e;return i&&(r+=" "+i),r+=this.attributesObjectToString(n=n||{}),null===t?r+"/>":r+">"+t+""},tag:function(e,t,n,i){return this.inlineTag(e,t,n,i)+"\n"}},void 0!==e&&(e.ConverterHTML=c),e}();(function(){function l(e,n){var t,i;return n=o(e,n),(e=r.modules[n])||("function"==typeof(e=r.payloads[n])&&(t={id:n,uri:"",exports:i={},packaged:!0},i=e(function(e,t){return s(n,e,t)},i,t)||t.exports,r.modules[n]=i,delete r.payloads[n]),e=r.modules[n]=i||e),e}var e,t,n=function(){return this}(),r=(n||"undefined"==typeof window||(n=window),function(e,t,n){"string"!=typeof e?r.original?r.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()):(2==arguments.length&&(n=t),r.modules[e]||(r.payloads[e]=n,r.modules[e]=null))}),s=(r.modules={},r.payloads={},function(e,t,n){if("string"==typeof t){var i=l(e,t);if(null!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],s=0,o=t.length;s ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t=e.end,e=e.start,t=this.compare(t.row,t.column);return 1==t?1==(t=this.compare(e.row,e.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(e.row,e.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){e=this.compareRange(e);return-1==e||0==e||1==e},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row!==e||t<=this.end.column?0:1:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){var n,i;return this.end.row>t?n={row:t+1,column:0}:this.end.rowt?i={row:t+1,column:0}:this.start.row>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t,n={};for(t in e)n[t]=e[t];return n},t.copyArray=function(e){for(var t=[],n=0,i=e.length;nDate.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,t,n){"use strict";var z=e("../lib/event"),B=e("../lib/useragent"),N=e("../lib/dom"),H=e("../lib/lang"),W=e("../clipboard"),q=B.isChrome<18,U=B.isIE,V=63e+1?t.length:i,i+=r.length+1,r=r+"\n"+t):X&&0=f.length&&e.value===f&&f&&e.selectionEnd!==v}),x=null,A=(this.setInputHandler=function(e){x=e},!(this.getInputHandler=function(){return x})),k=function(e,t){if(A=A&&!1,p)return b(),e&&u.onPaste(e),p=!1,"";for(var n=d.selectionStart,i=d.selectionEnd,r=w,s=f.length-v,o=e,a=e.length-n,l=e.length-i,c=0;0w-1&&f[f.length-c]==e[e.length-c];)c++,s--;a-=c-1,l-=c-1;var h=o.length-c+1;return h<0&&(r=-h,h=0),o=o.slice(0,h),t||o||a||r||s||l?(h=!(m=!0),B.isAndroid&&". "==o&&(o=" ",h=!0),o&&!r&&!s&&!a&&!l||g?u.onTextInput(o):u.onTextInput(o,{extendLeft:r,extendRight:s,restoreStart:a,restoreEnd:l}),m=!1,f=e,w=n,v=i,y=l,h?"\n":o):""},S=function(e){if(o)return R();if(e&&e.inputType){if("historyUndo"==e.inputType)return u.execCommand("undo");if("historyRedo"==e.inputType)return u.execCommand("redo")}var e=d.value,t=k(e,!0);(500this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var e=e.getDocumentPosition(),t=this.editor,n=t.session.getBracketRange(e);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=t.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},this.onTripleClick=function(e){var e=e.getDocumentPosition(),t=this.editor,n=(this.setState("selectByLines"),t.getSelectionRange());n.isMultiLine()&&n.contains(e.row,e.column)?(this.$clickSelection=t.selection.getLineRange(n.start.row),this.$clickSelection.end=t.selection.getLineRange(n.end.row).end):this.$clickSelection=t.selection.getLineRange(e.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){var t,n,i,r,s,o,a;if(!e.getAccelKey())return e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0),t=this.editor,this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0}),n=this.$lastScroll,r=(a=(i=e.domEvent.timeStamp)-n.t)?e.wheelX/a:n.vx,s=a?e.wheelY/a:n.vy,a<550&&(r=(r+n.vx)/2,s=(s+n.vy)/2),a=!1,1<=(o=Math.abs(r/s))&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(a=!0),(a=o<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)?!0:a)?n.allowed=i:i-n.allowed<550&&(Math.abs(r)<=1.5*Math.abs(n.vx)&&Math.abs(s)<=1.5*Math.abs(n.vy)?(a=!0,n.allowed=i):n.allowed=0),n.t=i,n.vx=r,n.vy=s,a?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}).call(i.prototype),t.DefaultHandlers=i}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,n){"use strict";function i(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}e("./lib/oop");var r=e("./lib/dom");(function(){this.$init=function(){return this.$element=r.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){r.addCssClass(this.getElement(),e)},this.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(i.prototype),t.Tooltip=i}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,n){"use strict";function u(e){o.call(this,e)}var d=e("../lib/dom"),i=e("../lib/oop"),p=e("../lib/event"),o=e("../tooltip").Tooltip;i.inherits(u,o),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),s=this.getHeight();n<(e+=15)+r&&(e-=e+r-n),i<(t+=15)+s&&(t-=20+s),o.prototype.setPosition.call(this,e,t)}}.call(u.prototype),t.GutterHandler=function(i){function r(){n=n&&clearTimeout(n),a&&(h.hide(),a=null,l._signal("hideGutterTooltip",h),l.off("mousewheel",r))}function s(e){h.setPosition(e.x,e.y)}var n,o,a,l=i.editor,c=l.renderer.$gutterLayer,h=new u(l.container);i.editor.setDefaultHandler("guttermousedown",function(e){if(l.isFocused()&&0==e.getButton()){var t=c.getRegion(e);if("foldWidgets"!=t){var t=e.getDocumentPosition().row,n=l.session.selection;if(e.getShiftKey())n.selectTo(t,0);else{if(2==e.domEvent.detail)return l.selectAll(),e.preventDefault();i.$clickSelection=l.selection.getLineRange(t)}return i.setState("selectByLines"),i.captureMouse(e),e.preventDefault()}}}),i.editor.setDefaultHandler("guttermousemove",function(e){var t=e.domEvent.target||e.domEvent.srcElement;if(d.hasCssClass(t,"ace_fold-widget"))return r();a&&i.$tooltipFollowsMouse&&s(e),o=e,n=n||setTimeout(function(){n=null,(o&&!i.isMousePressed?function(){var e=o.getDocumentPosition().row,t=c.$annotations[e];if(!t)return r();if(e==l.session.getLength()){var e=l.renderer.pixelToScreenCoordinates(0,o.y).row,n=o.$pos;if(e>l.session.documentToScreenRow(n.row,n.column))return r()}a!=t&&(a=t.text.join("
"),h.setHtml(a),h.show(),l._signal("showGutterTooltip",h),l.on("mousewheel",r),i.$tooltipFollowsMouse?s(o):(e=o.domEvent.target.getBoundingClientRect(),(n=h.getElement().style).left=e.right+"px",n.top=e.bottom+"px"))}:r)()},50)}),p.addListener(l.renderer.$gutter,"mouseout",function(e){o=null,a&&(n=n||setTimeout(function(){n=null,r()},50))},l),l.on("changeSession",r)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),e=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};!function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){var e,t;return null===this.$inSelection&&((e=this.editor.getSelectionRange()).isEmpty()?this.$inSelection=!1:(t=this.getDocumentPosition(),this.$inSelection=e.contains(t.row,t.column))),this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}.call(e.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function i(t){function e(){var e,t,n,i,r,s,o,a,l=d;d=v.renderer.screenToTextCoordinates(c,h),r=d,s=l,o=Date.now(),a=!s||r.row!=s.row,s=!s||r.column!=s.column,!f||a||s?(v.moveCursorToPosition(r),f=o,w={x:c,y:h}):5this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=(e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging"),$.isWin?"default":"move");e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;$.isIE&&"dragReady"==this.state&&3n&&(m=-1),d=e.clientX=o,p=e.clientY=s,A=k=0,new S(e,h));if(w=o.getDocumentPosition(),r-m<500&&1==t.length&&!b)x++,e.preventDefault(),e.button=0,f=null,clearTimeout(f),h.selection.moveToPosition(w),(s=2<=x?h.selection.getLineRange(w.row):h.session.getBracketRange(w))&&!s.isEmpty()?h.selection.setRange(s):h.selection.selectWord(),y="wait";else{x=0;var o=h.selection.cursor,t=h.selection.isEmpty()?o:h.selection.anchor,s=h.renderer.$cursorLayer.getPixelPosition(o,!0),o=h.renderer.$cursorLayer.getPixelPosition(t,!0),t=h.renderer.scroller.getBoundingClientRect(),a=h.renderer.layerConfig.offset,l=h.renderer.scrollLeft,c=function(e,t){return(e/=i)*e+(t=t/n-.75)*t};if(e.clientX=t.length||(r=n[i-1])!=S&&r!=C||(l=t[i+1])!=S&&l!=C?$:(l=w?C:l)==r?l:$;case I:return(r=0=e){for(i=l+1;i=e;)i++;for(r=l,s=i-1;r>8;return 0==n?191T&&t[a]t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,t=t?e.start:e.end;this.$setSelection(n.row,n.column,t.row,t.column)},this.$setSelection=function(e,t,n,i){var r,s;!this.$silent&&(r=this.$isEmpty,s=this.inMultiSelectMode,this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||s)&&this._emit("changeSelection")},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){var n;return void 0===t&&(e=(n=e||this.lead).row,t=n.column),this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),e=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(e)},this.getLineRange=function(e,t){var e="number"==typeof e?e:this.lead.row,n=this.session.getFoldLine(e),n=n?(e=n.start.row,n.end.row):e;return!0===t?new a(e,0,n,this.session.getLine(n).length):new a(e,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,r=e.column+t;return n<0&&(i=e.column-t,r=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,r).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();(e=this.session.getFoldAt(t.row,t.column,-1))?this.moveCursorTo(e.start.row,e.start.column):0===t.column?0=n.length?(this.moveCursorTo(e,n.length),this.moveCursorRight(),ec&&(d=e.substring(c,f-g.length),u.type==p?u.value+=d:(u.type&&l.push(u),u={type:p,value:d}));for(var w=0;wv){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c=this.$rowTokens.length;){if(this.$row+=1,e=e||this.$session.getLength(),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0===n)for(n=0;0e.length&&(b=e.length)}),l==1/0&&(l=b,a=o=!1),h&&l%c!=0&&(l=Math.floor(l/c)*c),t(a?u:p)},this.toggleBlockComment=function(e,t,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var s,o,a=(d=new g(t,i.row,i.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(;a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(r.start))){var c=d.getCurrentTokenRow(),h=d.getCurrentTokenColumn()+p,u=new f(c,h,c,h+r.start.length);break}a=d.stepBackward()}for(var d,p,a=(d=new g(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(r.end))){var c=d.getCurrentTokenRow(),h=d.getCurrentTokenColumn()+p,m=new f(c,h,c,h+r.end.length);break}a=d.stepForward()}m&&t.remove(m),u&&(t.remove(u),s=u.start.row,o=-r.start.length)}else o=r.start.length,s=n.start.row,t.insert(n.end,r.end),t.insert(n.start,r.start);l.start.row==s&&(l.start.column+=o),l.end.row==s&&(l.end.column+=o),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var i in this.$embeds=[],this.$modes={},e){var t,n,r;e[i]&&(n=(t=e[i]).prototype.$id,(r=o.$modes[n])||(o.$modes[n]=r=new t),o.$modes[i]||(o.$modes[i]=r),this.$embeds.push(i),this.$modes[i]=r)}for(var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],i=0;ithis.row||(e=e,t={row:this.row,column:this.column},n=this.$insertRight,i=((o="insert"==e.action)?1:-1)*(e.end.row-e.start.row),r=(o?1:-1)*(e.end.column-e.start.column),s=e.start,o=o?s:e.end,e=a(t,s,n)?{row:t.row,column:t.column}:a(o,t,!n)?{row:t.row+i,column:t.column+(t.row==o.row?r:0)}:{row:s.row,column:s.column},this.setPosition(e.row,e.column,!0))},this.setPosition=function(e,t,n){n=n?{row:e,column:t}:this.$clipPositionToDocument(e,t);this.row==n.row&&this.column==n.column||(e={row:this.row,column:this.column},this.row=n.row,this.column=n.column,this._signal("change",{old:e,value:n}))},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}.call(e.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";function i(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}var r=e("./lib/oop"),s=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,a=e("./range").Range,l=e("./anchor").Anchor;(function(){r.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new l(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){e=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=e?e[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t,n;return e.start.row===e.end.row?t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)]:((t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column),n=t.length-1,e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))),t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),e=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:e,action:"insert",lines:[t]},!0),this.clonePos(e)},this.clippedPos=function(e,t){var n=this.getLength(),n=(void 0===e?e=n:e<0?e=0:n<=e&&(e=n-1,t=void 0),this.getLine(e));return null==t&&(t=n.length),{row:e,column:t=Math.min(Math.max(t,0),n.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0,n=(e=Math.min(Math.max(e,0),this.getLength()))e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=t.tokens}}).call(i.prototype),t.BackgroundTokenizer=i}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";function i(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"}var c=e("./lib/lang"),h=(e("./lib/oop"),e("./range").Range);(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,i){if(this.regExp)for(var r=i.firstRow,s=i.lastRow,o=r;o<=s;o++){var a=this.cache[o];null==a&&(a=(a=(a=c.getMatchOffsets(n.getLine(o),this.regExp)).length>this.MAX_RANGES?a.slice(0,this.MAX_RANGES):a).map(function(e){return new h(o,e.offset,o,e.offset+e.length)}),this.cache[o]=a.length?a:"");for(var l=a.length;l--;)t.drawSingleLineMarker(e,a[l].toScreenRange(n),this.clazz,i)}}}).call(i.prototype),t.SearchHighlight=i}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";function r(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];e=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,e.end.row,e.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var i=e("../range").Range;(function(){this.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach(function(e){e.start.row+=t,e.end.row+=t})},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),0=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,r,s=0,o=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;lt||n[n.length-1].start.row=i);o++);if("insert"==e.action)for(var l=r-i,c=-t.column+n.column;oi)break;h.start.row==i&&h.start.column>=t.column&&(h.start.column==t.column&&this.$bias<=0||(h.start.column+=c,h.start.row+=l)),h.end.row==i&&h.end.column>=t.column&&(h.end.column==t.column&&this.$bias<0||(h.end.column==t.column&&0h.start.column&&h.end.column==s[o+1].start.column&&(h.end.column-=c),h.end.column+=c,h.end.row+=l))}else for(var h,l=i-r,c=t.column-n.column;or)break;h.end.rowt.column)&&(h.end.column=t.column,h.end.row=t.row):(h.end.column+=c,h.end.row+=l):h.end.row>r&&(h.end.row+=l),h.start.rowt.column)&&(h.start.column=t.column,h.start.row=t.row):(h.start.column+=c,h.start.row+=l):h.start.row>r&&(h.start.row+=l)}if(0!=l&&o=e)return r;if(r.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(-1==(i=t?n.indexOf(t):i)&&(i=0);i=e)return r}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,r=0;ra)break}while(r&&o.test(r.type));r=i.stepBackward()}else r=i.getCurrentToken();return s.end.row=i.getCurrentTokenRow(),s.end.column=i.getCurrentTokenColumn()+r.value.length-2,s}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var r=this.foldWidgets;if(r){t=t||this.getLength();for(var s,o=e=e||0;o=e&&(o=s.end.row,s.collapseChildren=n,this.addFold("...",s))}},this.foldToLevel=function(e){for(this.foldAll();0=e)break}i--}return{range:-1!==i&&s,firstRange:o}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};this.$toggleFoldWidget(e,n)||(e=t.target||t.srcElement)&&/ace_fold-widget/.test(e.className)&&(e.className+=" ace_invalid")},this.$toggleFoldWidget=function(e,t){var n,i,r,s;if(this.getFoldWidget)return n=this.getFoldWidget(e),i=this.getLine(e),(i=this.getFoldAt(e,-1==(n="end"===n?-1:1)?0:i.length,n))?(t.children||t.all?this.removeFold(i):this.expandFold(i),i):(n=this.getFoldWidgetRange(e,!0))&&!n.isMultiLine()&&(i=this.getFoldAt(n.start.row,n.start.column,1))&&n.isEqual(i.range)?(this.removeFold(i),i):(t.siblings?((i=this.getParentFoldRangeData(e)).range&&(r=i.range.start.row+1,s=i.range.end.row),this.foldAll(r,s,t.all?1e4:0)):t.children?(s=n?n.end.row:this.getLength(),this.foldAll(e+1,s,t.all?1e4:0)):n&&(t.all&&(n.collapseChildren=1e4),this.addFold("...",n)),n)},this.toggleFoldWidget=function(e){var t,n=this.selection.getCursor().row;n=this.getRowFoldStart(n),!this.$toggleFoldWidget(n,{})&&(t=(t=this.getParentFoldRangeData(n,!0)).range||t.firstRange)&&(n=t.start.row,(n=this.getFoldAt(n,this.getLine(n).length,1))?this.removeFold(n):this.addFold("...",t))},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;0==n?this.foldWidgets[t]=null:"remove"==e.action?this.foldWidgets.splice(t,1+n,null):((e=Array(1+n)).unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,e))},this.tokenizerUpdateFoldWidgets=function(e){e=e.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var u=e("../token_iterator").TokenIterator,a=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){return 0!=e.column&&""!=(t=t||this.getLine(e.row).charAt(e.column-1))&&(t=t.match(/([\(\[\{])|([\)\]\}])/))?t[1]?this.$findClosingBracket(t[1],e):this.$findOpeningBracket(t[2],e):null},this.getBracketRange=function(e){var t,n,i=this.getLine(e.row),r=!0,s=i.charAt(e.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(o||(s=i.charAt(e.column),e={row:e.row,column:e.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),r=!1),!o)return null;if(o[1]){if(!(n=this.$findClosingBracket(o[1],e)))return null;t=a.fromPoints(e,n),r||(t.end.column++,t.start.column--),t.cursor=t.end}else{if(!(n=this.$findOpeningBracket(o[2],e)))return null;t=a.fromPoints(n,e),r||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e){var t=this.getLine(e.row),n=t.charAt(e.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);return i||(n=t.charAt(e.column),e={row:e.row,column:e.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/)),i?(t=new a(e.row,e.column-1,e.row,e.column),(n=i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e))?[t,new a(n.row,n.column,n.row,n.column+1)]:[t]):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],r=1,s=new u(this,t.row,t.column),o=s.getCurrentToken();if(o=o||s.stepForward()){n=n||new RegExp("(\\.?"+o.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+");for(var a=t.column-s.getCurrentTokenColumn()-2,l=o.value;;){for(;0<=a;){var c=l.charAt(a);if(c==i){if(0==--r)return{row:s.getCurrentTokenRow(),column:a+s.getCurrentTokenColumn()}}else c==e&&(r+=1);--a}for(;(o=s.stepBackward())&&!n.test(o.type););if(null==o)break;a=(l=o.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],r=1,s=new u(this,t.row,t.column),o=s.getCurrentToken();if(o=o||s.stepForward()){n=n||new RegExp("(\\.?"+o.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+");for(var a=t.column-s.getCurrentTokenColumn();;){for(var l=o.value,c=l.length;a>1,s=e[r];if(st&&(t=e.screenWidth)}),this.lineWidgetWidth=t)},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,s=this.$foldData[r],o=s?s.start.row:1/0,a=t.length,l=0;li&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(t.start.column+=s),t.end.row==e.end.row)&&t.end.column>e.end.column&&(t.end.column+=s),r&&t.start.row>=e.end.row&&(t.start.row+=r,t.end.row+=r)),t.end=this.insert(t.start,o),a.length&&(i=e.start,n=t.start,r=n.row-i.row,s=n.column-i.column,this.addFolds(a.map(function(e){return(e=e.clone()).start.row==i.row&&(e.start.column+=s),e.end.row==i.row&&(e.end.column+=s),e.start.row+=r,e.end.row+=r,e}))),t},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=t.start.row;r<=t.end.row;++r){var s=this.getLine(r);n.start.row=r,n.end.row=r;for(var o=0;othis.doc.getLength()-1)return 0;i=r-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var r=new u(e,0,t,Number.MAX_VALUE),r=this.getFoldsInRange(r).map(function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e}),n=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,n),r.length&&this.addFolds(r),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){var n;return t=Math.max(0,t),t=e<0?e=0:(n=this.doc.getLength())<=e?this.doc.getLine(e=n-1).length:Math.min(this.doc.getLine(e).length,t),{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){e!=this.$useWrapMode&&(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e&&(e=this.getLength(),this.$wrapData=Array(e),this.$updateWrapData(0,e-1)),this._signal("changeWrapMode"))},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange,t=(n.max<0&&(n={min:t,max:t}),this.$constrainWrapLimit(e,n.min,n.max));return t!=this.$wrapLimit&&1=r.row&&p.shiftRow(-a);o=s}else{var u=Array(a),d=(u.unshift(s,0),t?this.$wrapData:this.$rowLengthCache),c=(d.splice.apply(d,u),this.$foldData),h=0;for((p=this.getFoldLine(s))&&(0==(d=p.range.compareInside(i.row,i.column))?(p=p.split(i.row,i.column))&&(p.shiftRow(a),p.addRemoveChars(o,0,r.column-i.column)):-1==d&&(p.addRemoveChars(s,0,r.column-i.column),p.shiftRow(a)),h=c.indexOf(p)+1);h=s&&p.shiftRow(a)}else{var p,a=Math.abs(e.start.column-e.end.column);"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(p=this.getFoldLine(s))&&p.addRemoveChars(s,i.column,a)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),l},this.$updateRowLengthCache=function(e,t,n){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var o,n,a=this.doc.getAllLines(),i=this.getTabSize(),r=this.$wrapData,s=this.$wrapLimit,l=e;for(t=Math.min(t,a.length-1);l<=t;)(n=this.getFoldLine(l,n))?(o=[],n.walk(function(e,t,n,i){var r;if(null!=e){(r=this.$getDisplayTokens(e,o.length))[0]=m;for(var s=1;s>2)),a-1);ph[d-1]):!d,this.getLength()-1),m=this.getNextFoldLine(o),g=m?m.start.row:1/0;l<=e&&!(ea[c-1]):!c,this.getNextFoldLine(o)),u=h?h.start.row:1/0;o=p[m];)i++,m++;d=d.substring(p[m-1]||0,d.length),l=0u||(r.push(o=new y(c,u,c+a-1,d)),2w&&r[h].end.row==n.end.row;)h--;for(r=r.slice(p,h+1),p=0,h=r.length;p=r.length)break;u.lastIndex=a+=1}if(i.index+o>t)break;s.push(i.index,o)}for(var l=s.length-1;0<=l;l-=2){var c=s[l-1];if(n(e,c,e,c+(o=s[l])))return!0}}:function(e,t,n){var i=h.getLine(e);for(u.lastIndex=t;r=u.exec(i);){var r,s=r[0].length;if(n(e,r=r.index,e,r+s))return!0;if(!s&&(u.lastIndex=r+=1,r>=i.length))return!1}},{forEach:a?function(e){var t=i.row;if(!o(t,i.column,e)){for(t--;r<=t;t--)if(o(t,Number.MAX_VALUE,e))return;if(0!=n.wrap)for(t=s,r=i.row;r<=t;t--)if(o(t,Number.MAX_VALUE,e))return}}:function(e){var t=i.row;if(!o(t,i.column,e)){for(t+=1;t<=s;t++)if(o(t,0,e))return;if(0!=n.wrap)for(t=r,s=i.row;t<=s;t++)if(o(t,0,e))return}}})}}).call(i.prototype),t.Search=i}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function i(e,t){this.platform=t||(s.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function r(e,t){i.call(this,e,t),this.$singleCommand=!1}var a=e("../lib/keys"),s=e("../lib/useragent"),l=a.KEY_MODS;r.prototype=i.prototype,function(){function o(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),(this.commands[e.name]=e).bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n,i=e&&("string"==typeof e?e:e.name),r=(e=this.commands[i],t||delete this.commands[i],this.commandKeyBinding);for(n in r){var s,o=r[n];o==e?delete r[n]:Array.isArray(o)&&-1!=(s=o.indexOf(e))&&(o.splice(s,1),1==o.length)&&(r[n]=o[0])}},this.bindKey=function(e,i,r){if("object"==typeof e&&e&&(null==r&&(r=e.position),e=e[this.platform]),e)return"function"==typeof i?this.addCommand({exec:i,bindKey:e,name:i.name||e}):void e.split("|").forEach(function(e){var t="",n=(-1!=e.indexOf(" ")&&(e=(n=e.split(/\s+/)).pop(),n.forEach(function(e){e=this.parseKeys(e),e=l[e.hashId]+e.key;t+=(t?" ":"")+e,this._addCommandToBinding(t,"chainKeys")},this),t+=" "),this.parseKeys(e)),e=l[n.hashId]+n.key;this._addCommandToBinding(t+e,i,r)},this)},this._addCommandToBinding=function(e,t,n){var i=this.commandKeyBinding;if(t)if(!i[e]||this.$singleCommand)i[e]=t;else{Array.isArray(i[e])?-1!=(s=i[e].indexOf(t))&&i[e].splice(s,1):i[e]=[i[e]],"number"!=typeof n&&(n=o(t));for(var r=i[e],s=0;st?t+1:t,e.selection.moveCursorTo(n.row,t))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:i(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,r=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;s=i.lastRow||n.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==t&&this.renderer.animateScrolling(this.curOp.scrollTop)}e=this.selection.toJSON();this.curOp.selectionAfter=e,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(e),this.prevOp=this.curOp,this.curOp=null}}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){var t,n,i,r;this.$mergeUndoDeltas&&(t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name,"insertstring"==e.command.name?(r=e.args,void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(t.args)),this.mergeNextCommand=!0):i=i&&-1!==n.indexOf(e.command.name),(i="always"!=this.$mergeUndoDeltas&&2e3"===i.value&&a--),i&&0<=a;);else{do{if(i=l,l=n.stepBackward(),i)if(-1!==i.type.indexOf("tag-name"))s===i.value&&("<"===l.value?a++:""===i.value){for(var c=0,h=l;h;){if(-1!==h.type.indexOf("tag-name")&&h.value===s){a--;break}if("<"===h.value)break;h=n.stepBackward(),c++}for(var u=0;ua.search(/\S|$/)&&(t=a.substr(s.column).search(/\S|$/),i.doc.removeInLine(s.row,s.column,s.column+t))),this.clearSelection(),s.column),t=i.getState(s.row),a=i.getLine(s.row),l=r.checkOutdent(t,a,e);i.insert(s,e),n&&n.selection&&(2==n.selection.length?this.selection.setSelectionRange(new f(s.row,o+n.selection[0],s.row,o+n.selection[1])):this.selection.setSelectionRange(new f(s.row+n.selection[0],n.selection[1],s.row+n.selection[2],n.selection[3]))),this.$enableAutoIndent&&(i.getDocument().isNewLine(e)&&(o=r.getNextLineIndent(t,a.slice(0,s.column),i.getTabString()),i.insert({row:s.row+1,column:0},o)),l)&&r.autoOutdent(t,i,s.row)},this.autoIndent=function(){for(var e,t,n,i,r,s=this.session,o=s.getMode(),a=(n=this.selection.isEmpty()?(t=0,s.doc.getLength()-1):(t=(e=this.getSelectionRange()).start.row,e.end.row),""),l="",c=s.getTabString(),h=t;h<=n;h++)0t.toLowerCase()?1:0});for(var r=new f(0,0,0,0),i=e.first;i<=e.last;i++){var s=t.getLine(i);r.start.row=i,r.end.row=i,r.end.column=s.length,t.replace(r,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){for(var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g,i=(n.lastIndex=0,this.session.getLine(e));n.lastIndex=t)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(e){var t,n,i,r=this.selection.getCursor().row,s=this.selection.getCursor().column,o=new f(r,s-1,r,s),o=this.session.getTextRange(o);!isNaN(parseFloat(o))&&isFinite(o)?(o=this.getNumberAt(r,s))&&(i=0<=o.value.indexOf(".")?o.start+o.value.indexOf(".")+1:o.end,t=o.start+o.value.length-i,n=parseFloat(o.value),n*=Math.pow(10,t),i!==o.end&&sp+1)break;p=m.last}for(h--,a=this.session.$moveLines(d,p,t?0:e),t&&-1==e&&(u=h+1);u<=h;)o[u].moveBy(a,0),u++;l+=a=t?a:0}n.fromOrientedRange(n.ranges[0]),n.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,r=e*Math.floor(i.height/i.lineHeight),e=(!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(r,0)}):!1===t&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection()),n.scrollTop);n.scrollBy(0,r*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(e)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),e={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(e,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new y(this.session,n.row,n.column),r=i.getCurrentToken(),s=r||i.stepForward();if(s){var o,a,l,c=!1,h={},u=n.column-s.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;uwindow.innerHeight)&&null)&&(o.style.top=n+"px",o.style.left=e.left+"px",o.style.height=t.lineHeight+"px",o.scrollIntoView(s)),s=i=null)}),this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",t),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",n))})},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(t,n,i){var r=this;v.loadModule("./ext/prompt",function(e){e.prompt(r,t,n,i)})}}.call(r.prototype),v.defineOptions(r.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?x.attach(this):x.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?x.attach(this):x.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.getValue());e&&this.renderer.placeholderNode?(this.renderer.off("afterRender",this.$updatePlaceholder),i.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null):e||this.renderer.placeholderNode?!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||""):(this.renderer.on("afterRender",this.$updatePlaceholder),i.addCssClass(this.container,"ace_hasPlaceholder"),(e=i.createElement("div")).className="ace_placeholder",e.textContent=this.$placeholder||"",this.renderer.placeholderNode=e,this.renderer.content.appendChild(this.renderer.placeholderNode))}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"}),{getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}});t.Editor=r}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,n){"use strict";function r(e,t){for(var n=t;n--;){var i=e[n];if(i&&!i[0].ignore){for(;n"+e.end.row+":"+e.end.column}function o(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(0<=m(t.start,e.end))l(t,e,-1);else{if(!(m(t.start,e.start)<=0))return;l(e,t,1)}else if(n&&!i)if(0<=m(t.start,e.end))l(t,e,-1);else{if(!(m(t.end,e.start)<=0))return;l(e,t,-1)}else if(!n&&i)if(0<=m(t.start,e.start))l(t,e,1);else{if(!(m(t.start,e.start)<=0))return;l(e,t,1)}else if(!n&&!i)if(0<=m(t.start,e.start))l(t,e,1);else{if(!(m(t.end,e.start)<=0))return;l(e,t,-1)}return 1}function l(e,t,n){c(e.start,t.start,t.end,n),c(e.end,t.start,t.end,n)}function c(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function h(e,t){var n=e.lines,i=e.end,r=(e.end=a(t),e.end.row-e.start.row),s=n.splice(r,n.length),r=r?t.column:t.column-e.start.column;return n.push(s[0].substring(0,r)),s[0]=s[0].substr(r),{start:a(t),end:i,lines:s,action:e.action}}function u(e,t){var n;t={start:a((n=t).start),end:a(n.end),action:n.action,lines:n.lines.slice()};for(var i=e.length;i--;){for(var r=e[i],s=0;sa+1;)this.$lines.pop();break}(o=this.$lines.get(++a))?o.row=l:(o=this.$lines.createCell(l,e,this.session,c),this.$lines.push(o)),this.$renderCell(o,e,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"",i=((this.$fixedWidth||t.$useWrapMode)&&(r=t.getLength()+i-1),n?n.getWidth(t,r,e):r.toString().length*e.characterWidth),n=this.$padding||this.$computePadding();(i+=n.left+n.right)===this.gutterWidth||isNaN(i)||(this.gutterWidth=i,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",i))},this.$updateCursorRow=function(){var e;this.$highlightGutterLine&&(e=this.session.selection.getCursor(),this.$cursorRow!==e.row)&&(this.$cursorRow=e.row)},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(0n.right-t.right?"foldWidgets":void 0}}).call(i.prototype),t.Gutter=i}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";function i(e){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}var p=e("../range").Range,r=e("../lib/dom");(function(){this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t,n;for(n in this.config=e,this.i=0,this.markers){var i,r,s,o=this.markers[n];o.range?(s=o.range.clipRows(e.firstRow,e.lastRow)).isEmpty()||(s=s.toScreenRange(this.session),o.renderer?(i=this.$getTop(s.start.row,e),r=this.$padding+s.start.column*e.characterWidth,o.renderer(t,s,r,i,e)):"fullLine"==o.type?this.drawFullLineMarker(t,s,o.clazz,e):"screenLine"==o.type?this.drawScreenLineMarker(t,s,o.clazz,e):s.isMultiLine()?"text"==o.type?this.drawTextMarker(t,s,o.clazz,e):this.drawMultiLineMarker(t,s,o.clazz,e):this.drawSingleLineMarker(t,s,o.clazz+" ace_start ace_br15",e)):o.update(t,this,this.session,e)}if(-1!=this.i)for(;this.ie.lastRow)for(r=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);0t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){for(var i=[],r=t,s=this.session.getNextFoldLine(r),o=s?s.start.row:1/0;o=s;)o=this.$renderToken(a,o,c,h.substring(0,s-i)),h=h.substring(s-i),i=s,a=this.$createLineElement(),e.appendChild(a),a.appendChild(this.dom.createTextNode(w.stringRepeat(" ",n.indent),this.element)),o=0,s=n[++r]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,o=this.$renderToken(a,o,c,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(a,o,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,i=t[0],r=i.value;(r=this.displayIndentGuides?this.renderIndentGuide(e,r):r)&&(n=this.$renderToken(e,n,i,r));for(var s=1;sthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,r);n=this.$renderToken(e,n,i,r)}},this.$renderOverflowMessage=function(e,t,n,i,r){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));n=this.dom.createElement("span");n.className="ace_inline_button ace_keyword ace_toggle_wrap",n.textContent=r?"":"",e.appendChild(n)},this.$renderLine=function(e,t,n){var i,r,s=e;(i=(n=n||0==n?n:this.session.getFoldLine(t))?this.$getFoldLineTokens(t,n):this.session.getTokens(t)).length?(r=this.session.getRowSplitData(t))&&r.length?(this.$renderWrappedLine(e,i,r),s=e.lastChild):(s=e,this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s)),this.$renderSimpleLine(s,i)):this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s)),this.showEOL&&s&&(n&&(t=n.end.row),(r=this.dom.createElement("span")).className="ace_invisible ace_invisible_eol",r.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,s.appendChild(r))},this.$getFoldLineTokens=function(e,t){var u=this.session,d=[],p=u.getTokens(e);return t.walk(function(e,t,n,i,r){if(null!=e)d.push({type:"fold",value:e});else if((p=r?u.getTokens(t):p).length){for(var s,o=p,a=i,l=n,c=0,h=0;h+o[c].value.lengthl-a&&(s=s.substring(0,l-a)),d.push({type:o[c].type,value:s}),h=a+s.length,c+=1);hl?d.push({type:o[c].type,value:s.substring(0,l-h)}):d.push(o[c]),h+=s.length,c+=1}},t.end.row,this.session.getLine(t.end.row).length),d},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(i.prototype),t.Text=i}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";function i(e){this.element=c.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),c.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}var c=e("../lib/dom");(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)c.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){c.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){c.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,c.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=c.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){var e;if(1e.height+e.offset||a.top<0)&&1i;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=a,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&((this.overwrite=e)?c.addCssClass(this.element,"ace_overwrite-cursors"):c.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),t.Cursor=i}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){"use strict";function i(e){this.element=a.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=a.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}function r(e,t){i.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=a.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0}function s(e,t){i.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"}var o=e("./lib/oop"),a=e("./lib/dom"),l=e("./lib/event"),c=e("./lib/event_emitter").EventEmitter;!function(){o.implement(this,c),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}.call(i.prototype),o.inherits(r,i),function(){this.classSuffix="-v",this.onScroll=function(){var e;this.skipEvent||(this.scrollTop=this.element.scrollTop,1!=this.coeff&&(e=this.element.clientHeight/this.scrollHeight,this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)),this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){32768<(this.scrollHeight=e)?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(r.prototype);o.inherits(s,i),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(s.prototype),t.ScrollBar=r,t.ScrollBarV=r,t.ScrollBarH=s,t.VScrollBar=r,t.HScrollBar=s}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";function i(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;t&&(r.blockIdle(100),n.changes=0,n.onRender(t)),n.changes?n.$recursionLimit--<0||n.schedule():n.$recursionLimit=2}}var r=e("./lib/event");(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(r.nextFrame(this._flush),this.pending=!0)},this.clear=function(e){var t=this.changes;return this.changes=0,t}}).call(i.prototype),t.RenderLoop=i}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,t,n){var i=e("../lib/oop"),r=e("../lib/dom"),s=e("../lib/lang"),o=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c="function"==typeof ResizeObserver,e=t.FontMetrics=function(e){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",256),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()};!function(){i.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){var t;!(e=void 0===e?this.$measureSizes():e)||this.$characterSize.width===e.width&&this.$characterSize.height===e.height||(this.$measureNode.style.fontWeight="bold",t=this.$measureSizes(),this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e}))},this.$addObserver=function(){var t=this;this.$observer=new window.ResizeObserver(function(e){t.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){var t;return this.$pollSizeChangesTimer||this.$observer?this.$pollSizeChangesTimer:(t=this).$pollSizeChangesTimer=o.onIdle(function e(){t.checkForSizeChanges(),o.onIdle(e,500)},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){e={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/256};return 0===e.width||0===e.height?null:e},this.$measureCharWidth=function(e){return this.$main.textContent=s.stringRepeat(e,256),this.$main.getBoundingClientRect().width/256},this.getCharacterWidth=function(e){var t=this.charSizes[e];return t=void 0===t?this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width:t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t&&t.parentElement?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){function e(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]}this.els=r.buildDom([e(0,0),e(200,0),e(0,200),e(200,200)],this.el)},this.transformCoordinates=function(e,t){function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function s(e,t){return[e*t[0],e*t[1]]}function o(e){e=e.getBoundingClientRect();return[e.left,e.top]}e=e&&s(1/this.$getZoom(this.el),e),this.els||this.$initTransformMeasureNodes();var a,l=o(this.els[0]),c=o(this.els[1]),h=o(this.els[2]),u=o(this.els[3]),u=n(i(u,c),i(u,h),i(r(c,h),r(u,l))),c=s(1+u[0],i(c,l)),h=s(1+u[1],i(h,l));return t?(a=u[0]*t[0]/200+u[1]*t[1]/200+1,t=r(s(t[0],c),s(t[1],h)),r(s(1/a/200,t),l)):(a=i(e,l),t=n(i(c,s(u[0],a)),i(h,s(u[1],a)),a),s(200,t))}}.call(e.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],function(e,t,n){"use strict";function i(e,t){var n=this,e=(this.container=e||a.createElement("div"),a.addCssClass(this.container,"ace_editor"),a.HI_DPI&&a.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),this.$gutter=a.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=a.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=a.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new o(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content),this.$textLayer=new c(this.content));this.canvas=e.element,this.$markerFront=new l(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.on("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!w.isIOS,this.$loop=new p(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._signal("renderer",this)}var r=e("./lib/oop"),a=e("./lib/dom"),s=e("./config"),o=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,h=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,p=e("./renderloop").RenderLoop,m=e("./layer/font_metrics").FontMetrics,g=e("./lib/event_emitter").EventEmitter,f='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',w=e("./lib/useragent"),v=w.isIE;a.importCssString(f,"ace_editor.css");(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,r.implement(this,g),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),a.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=e)&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,i){if(!(2o.height-i?a.translate(this.textarea,0,0):(o=1,r=this.$size.height-i,s?s.useTextareaForIME?(s=this.textarea.value,o=this.characterWidth*this.session.$getStringScreenWidth(s)[0]):t+=this.lineHeight+2:t+=this.lineHeight,(n-=this.scrollLeft)>this.$size.scrollerWidth-o&&(n=this.$size.scrollerWidth-o),n+=this.gutterWidth+this.margin.left,a.setStyle(e,"height",i+"px"),a.setStyle(e,"width",o+"px"),a.translate(this.textarea,Math.min(n,this.$size.scrollerWidth-o),Math.min(t,r)))):a.translate(this.textarea,-100,0))},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var r=this.scrollMargin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.setMargin=function(e,t,n,i){var r=this.margin;r.top=0|e,r.bottom=0|t,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t)&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n,i,t=this.layerConfig;(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL)&&(e|=this.$computeLayerConfig()|this.$loop.clear(),t.firstRow!=this.layerConfig.firstRow&&t.firstRowScreen==this.layerConfig.firstRowScreen&&0<(n=this.scrollTop+(t.firstRow-this.layerConfig.firstRow)*this.lineHeight)&&(this.scrollTop=n,e=(e|=this.CHANGE_SCROLL)|(this.$computeLayerConfig()|this.$loop.clear())),t=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),a.translate(this.content,-this.scrollLeft,-t.offset),n=t.width+2*this.$padding+"px",i=t.minHeight+"px",a.setStyle(this.content.style,"width",n),a.setStyle(this.content.style,"height",i)),e&this.CHANGE_H_SCROLL&&(a.translate(this.content,-this.scrollLeft,-t.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):e&this.CHANGE_SCROLL?(this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(t):this.$textLayer.scrollLines(t),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(t):this.$gutterLayer.scrollLines(t)),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):(e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(t):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(t):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(t),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(t),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(t),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(t)),this._signal("afterRender",e)}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight());t=!((n=this.$maxPixelHeight&&n>this.$maxPixelHeight?this.$maxPixelHeight:n)<=2*this.lineHeight)&&th.top)),c=o!==i,h=(c&&(this.$vScroll=i,this.scrollBarV.setVisible(i)),this.scrollTop%this.lineHeight),o=Math.ceil(l/this.lineHeight)-1,o=(i=Math.max(0,Math.round((this.scrollTop-h)/this.lineHeight)))+o,u=this.lineHeight,i=t.screenToDocumentRow(i,0),d=t.getFoldLine(i),t=(d&&(i=d.start.row),d=t.documentToScreenRow(i,0),e=t.getRowLength(i)*u,o=Math.min(t.screenToDocumentRow(o,0),t.getLength()-1),l=n.scrollerHeight+t.getRowLength(o)*u+e,h=this.scrollTop-d*u,0);return this.layerConfig.width==s&&!a||(t=this.CHANGE_H_SCROLL),(a||c)&&(t|=this.$updateCachedSize(!0,this.gutterWidth,n.width,n.height),this._signal("scrollbarVisibilityChanged"),c)&&(s=this.$getLongestLine()),this.layerConfig={width:s,padding:this.$padding,firstRow:i,firstRowScreen:d,lastRow:o,lineHeight:u,characterWidth:this.characterWidth,minHeight:l,maxHeight:r,offset:h,gutterOffset:u?Math.max(0,Math.ceil((h+n.height-n.scrollerHeight)/u)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(s-this.$padding),t},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow,n=(this.$changedLines=null,this.layerConfig);if(!(e>n.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(e){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){var i,r,s;0!==this.$size.scrollerHeight&&(i=(e=this.$cursorLayer.getPixelPosition(e)).left,e=e.top,s=n&&n.top||0,n=n&&n.bottom||0,e<(r=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop)+s?(t&&r+s>e+this.lineHeight&&(e-=t*this.$size.scrollerHeight),0===e&&(e=-this.scrollMargin.top),this.session.setScrollTop(e)):r+this.$size.scrollerHeight-n=1-this.scrollMargin.top||0=1-this.scrollMargin.left||0this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(c.prototype);e.UIWorkerClient=function(e,t,n){var i=null,r=!1,s=Object.create(h),o=[],a=new c({messageBuffer:o,terminate:function(){},postMessage:function(e){o.push(e),i&&(r?setTimeout(l):l())}}),l=(a.setEmitSync=function(e){r=e},function(){var e=o.shift();e.command?i[e.command].apply(i,e.args):e.event&&s._signal(e.event,e.data)});return s.postMessage=function(e){a.onMessage({data:e})},s.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},s.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},u.loadModule(["worker",t],function(e){for(i=new e[n](s);o.length;)l()}),a},e.WorkerClient=c,e.createWorker=l}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";function i(e,t,n,i,r,s){var o=this,t=(this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=r,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n,e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1});this.$undoStackDepth=t.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}var l=e("./range").Range,r=e("./lib/event_emitter").EventEmitter,s=e("./lib/oop");(function(){s.implement(this,r),this.setup=function(){var t=this,n=this.doc,e=this.session,i=(this.selectionBefore=e.selection.toJSON(),e.selection.inMultiSelectMode&&e.selection.toSingleRange(),this.pos=n.createAnchor(this.$pos.row,this.$pos.column),this.pos);i.$insertRight=!0,i.detach(),i.markerId=e.addMarker(new l(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){e=n.createAnchor(e.row,e.column);e.$insertRight=!0,e.detach(),t.others.push(e)}),e.setUndoSelect(!1)},this.showOtherMarkers=function(){var t,n;this.othersActive||(t=this.session,(n=this).othersActive=!0,this.others.forEach(function(e){e.markerId=t.addMarker(new l(e.row,e.column,e.row,e.column+n.length),n.othersClass,null,!1)}))},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,r=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;0<=s;s--){var o={row:(a=this.others[s]).row,column:a.column+r};this.doc.insertMergedLines(o,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;0<=s;s--){var a,o={row:(a=this.others[s]).row,column:a.column+r};this.doc.remove(new l(o.row,o.column,o.row,o.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var n=this,i=this.session,e=function(e,t){i.removeMarker(e.markerId),e.markerId=i.addMarker(new l(e.row,e.column,e.row,e.column+n.length),t,null,!1)};e(this.pos,this.mainClass);for(var t=this.others.length;t--;)e(this.others[t],this.othersClass)}},this.onCursorChange=function(e){var t;!this.$updating&&this.session&&((t=this.session.selection.getCursor()).row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e)))},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;ns&&(s=e.column),(t=-1==t?0:t)t[1].length&&(r=t[1].length),st[3].length&&(o=t[3].length)),t):[e]}).map(t?i:a?l?function(e){return e[2]?n(r+s-e[2].length)+e[2]+n(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:i:function(e){return e[2]?n(r)+e[2]+n(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]})}}).call(c.prototype),r.onSessionChange=function(e){var t=e.session,e=(t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect,e.oldSession);e&&(e.multiSelect.off("addRange",this.$onAddRange),e.multiSelect.off("removeRange",this.$onRemoveRange),e.multiSelect.off("multiSelect",this.$onMultiSelect),e.multiSelect.off("singleSelect",this.$onSingleSelect),e.multiSelect.lead.off("change",this.$checkMultiselectChange),e.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},r.MultiSelect=n,e("./config").defineOptions(c.prototype,"editor",{enableMultiselect:{set:function(e){n(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",s)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",s))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var h=e("../../range").Range,e=t.FoldMode=function(){};!function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){e=e.getLine(n);return this.foldingStartMarker.test(e)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(e)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,r=e.getLine(t),s=r.search(i);if(-1!=s){for(var o,n=n||r.length,a=e.getLength(),r=t,l=t;++tn.row&&(i.row--,i.column=e.getLine(i.row).length),h.fromPoints(n,i)},this.closingBracketBlock=function(e,t,n,i,r){n={row:n,column:i},i=e.$findOpeningBracket(t,n);if(i)return i.column++,n.column--,h.fromPoints(i,n)}}.call(e.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";function i(e){this.session=e,(this.session.widgetManager=this).session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}var r=e("./lib/dom");(function(){this.getRowLength=function(e){var t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach(function(e){e&&e.rowCount&&!e.hidden&&(t+=e.rowCount)}),t},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e)&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets))},this.detach=function(e){var t=this.editor;t&&(this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets),t=this.session.lineWidgets)&&t.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var t=e.data,i=t.start.row,r=t.end.row,s="add"==e.action,o=i+1;or[t].column&&t++,i.unshift(t,0),r.splice.apply(r,i)),this.$updateRows())},this.$updateRows=function(){var n,e=this.session.lineWidgets;e&&(n=!0,e.forEach(function(e,t){if(e)for(n=!1,e.row=t;e.$oldWidget;)e.$oldWidget.row=t,e=e.$oldWidget}),n)&&(this.session.lineWidgets=null)},this.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t).el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1),this.session.lineWidgets[e.row]=e},this.addLineWidget=function(e){var t,n,i;return this.$registerLineWidget(e),e.session=this.session,this.editor&&(t=this.editor.renderer,e.html&&!e.el&&(e.el=r.createElement("div"),e.el.innerHTML=e.html),e.el&&(r.addCssClass(e.el,"ace_lineWidgetContainer"),e.el.style.position="absolute",e.el.style.zIndex=5,t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex=3),null==e.pixelHeight)&&(e.pixelHeight=e.el.offsetHeight),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight),n=this.session.getFoldAt(e.row,0),(e.$fold=n)&&(i=this.session.lineWidgets,e.row!=n.end.row||i[n.start.row]?e.hidden=!0:i[n.start.row]=e),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e)),e},this.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var r=1/0,s=0;s>1,o=n(t,e[s]);if(0=i.length?r=0"),s.appendChild(u.createElement("div"));l.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(a),i.widgetManager.removeLineWidget(l),e.off("changeSelection",l.destroy),e.off("changeSession",l.destroy),e.off("mouseup",l.destroy),e.off("change",l.destroy))},e.keyBinding.addKeyboardHandler(a),e.on("changeSelection",l.destroy),e.on("changeSession",l.destroy),e.on("mouseup",l.destroy),e.on("change",l.destroy),e.session.widgetManager.addLineWidget(l),l.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:l.el.offsetHeight})},u.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,s,t){"use strict";e("./lib/fixoldbrowsers");var o=e("./lib/dom"),a=e("./lib/event"),n=e("./range").Range,l=e("./editor").Editor,i=e("./edit_session").EditSession,r=e("./undomanager").UndoManager,c=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),s.config=e("./config"),s.require=e,"function"==typeof define&&(s.define=define),s.edit=function(e,t){if("string"==typeof e){var n=e;if(!(e=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}var i,r;return e&&e.env&&e.env.editor instanceof l?e.env.editor:(n="",e&&/input|textarea/i.test(e.tagName)?(n=(i=e).value,e=o.createElement("pre"),i.parentNode.replaceChild(e,i)):e&&(n=e.textContent,e.innerHTML=""),n=s.createEditSession(n),e=new l(new c(e),n,t),r={document:n,editor:e,onResize:e.resize.bind(e,null)},i&&(r.textarea=i),a.addListener(window,"resize",r.onResize),e.on("destroy",function(){a.removeListener(window,"resize",r.onResize),r.editor.container.env=null}),e.container.env=e.env=r,e)},s.createEditSession=function(e,t){e=new i(e,t);return e.setUndoManager(new r),e},s.Range=n,s.Editor=l,s.EditSession=i,s.UndoManager=r,s.VirtualRenderer=c,s.version=s.config.version}),ace.require(["ace/ace"],function(e){for(var t in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t]);window.ace.default=window.ace,"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=window.ace)}),angular.module("ui.ace",[]).constant("uiAceConfig",{}).directive("uiAce",["uiAceConfig",function(n){if(angular.isUndefined(window.ace))throw new Error("ui-ace need ace to work... (o rly?)");return{restrict:"EA",require:"?ngModel",link:function(o,e,a,i){function r(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);angular.isDefined(e)&&o.$evalAsync(function(){if(!angular.isFunction(e))throw new Error("ui-ace use a function as callback.");e(t)})}function t(e,t){if(e!==t){(u=angular.extend({},h,o.$eval(a.uiAce))).callbacks=[u.onLoad],u.onLoad!==h.onLoad&&u.callbacks.unshift(h.onLoad),p.removeListener("change",l),l=m(u.onChange),p.on("change",l),d.removeListener("blur",c),c=g(u.onBlur),d.on("blur",c);var n,i,r=d,e=p,s=u;if(angular.isDefined(s.workerPath)&&window.ace.require("ace/config").set("workerPath",s.workerPath),angular.isDefined(s.require)&&s.require.forEach(function(e){window.ace.require(e)}),angular.isDefined(s.showGutter)&&r.renderer.setShowGutter(s.showGutter),angular.isDefined(s.useWrapMode)&&e.setUseWrapMode(s.useWrapMode),angular.isDefined(s.showInvisibles)&&r.renderer.setShowInvisibles(s.showInvisibles),angular.isDefined(s.showIndentGuides)&&r.renderer.setDisplayIndentGuides(s.showIndentGuides),angular.isDefined(s.useSoftTabs)&&e.setUseSoftTabs(s.useSoftTabs),angular.isDefined(s.showPrintMargin)&&r.setShowPrintMargin(s.showPrintMargin),angular.isDefined(s.disableSearch)&&s.disableSearch&&r.commands.addCommands([{name:"unfind",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(){return!1},readOnly:!0}]),angular.isString(s.theme)&&r.setTheme("ace/theme/"+s.theme),angular.isString(s.mode)&&e.setMode("ace/mode/"+s.mode),angular.isDefined(s.firstLineNumber)&&(angular.isNumber(s.firstLineNumber)?e.setOption("firstLineNumber",s.firstLineNumber):angular.isFunction(s.firstLineNumber)&&e.setOption("firstLineNumber",s.firstLineNumber())),angular.isDefined(s.advanced))for(n in s.advanced)i={name:n,value:s.advanced[n]},r.setOption(i.name,i.value);if(angular.isDefined(s.rendererOptions))for(n in s.rendererOptions)i={name:n,value:s.rendererOptions[n]},r.renderer.setOption(i.name,i.value);angular.forEach(s.callbacks,function(e){angular.isFunction(e)&&e(r)})}}var l,c,h=n.ace||{},u=angular.extend({},h,o.$eval(a.uiAce)),d=window.ace.edit(e[0]),p=d.getSession(),m=function(n){return function(e){var t=p.getValue();!i||t===i.$viewValue||o.$$phase||o.$root.$$phase||o.$evalAsync(function(){i.$setViewValue(t)}),r(n,e,d)}},g=function(e){return function(){r(e,d)}};a.$observe("readonly",function(e){d.setReadOnly(!!e||""===e)}),i&&(i.$formatters.push(function(e){if(angular.isUndefined(e)||null===e)return"";if(angular.isObject(e)||angular.isArray(e))throw new Error("ui-ace cannot use an object or an array as a model");return e}),i.$render=function(){p.setValue(i.$viewValue)});o.$watch(a.uiAce,t,!0),t(h),e.on("$destroy",function(){d.session.$stopWorker(),d.destroy()}),o.$watch(function(){return[e[0].offsetWidth,e[0].offsetHeight]},function(){d.resize(),d.renderer.updateFull()},!0)}}}]),angular.module("anonymous-github",["ngRoute","ngSanitize","ui.ace","ngPDFViewer","pascalprecht.translate","admin"]).config(["$routeProvider","$locationProvider","$translateProvider",function(e,t,n){n.useStaticFilesLoader({prefix:"/i18n/locale-",suffix:".json"}),n.preferredLanguage("en"),e.when("/",{templateUrl:"/partials/home.htm",controller:"homeController",title:"Anonymous GitHub – Share the code, not the author"}).when("/dashboard",{templateUrl:"/partials/dashboard.htm",controller:"unifiedDashboardController",title:"Your anonymizations – Anonymous GitHub"}).when("/pr-dashboard",{redirectTo:"/dashboard"}).when("/anonymize/:repoId?",{templateUrl:"/partials/anonymize.htm",controller:"anonymizeController",title:"New anonymization – Anonymous GitHub"}).when("/pull-request-anonymize/:pullRequestId?",{templateUrl:"/partials/anonymize.htm",controller:"anonymizeController",title:"Anonymize a pull request – Anonymous GitHub"}).when("/gist-anonymize/:gistId?",{templateUrl:"/partials/anonymize.htm",controller:"anonymizeController",title:"Anonymize a gist – Anonymous GitHub"}).when("/status/:repoId",{templateUrl:"/partials/status.htm",controller:"statusController",title:"Repository status – Anonymous GitHub"}).when("/conferences",{templateUrl:"/partials/conferences.htm",controller:"conferencesController",title:"Your conferences – Anonymous GitHub"}).when("/conference/new",{templateUrl:"/partials/newConference.htm",controller:"newConferenceController",title:"New conference – Anonymous GitHub"}).when("/conference/:conferenceId/edit",{templateUrl:"/partials/newConference.htm",controller:"newConferenceController",title:"Edit conference – Anonymous GitHub"}).when("/conference/:conferenceId",{templateUrl:"/partials/conference.htm",controller:"conferenceController",title:"Conference – Anonymous GitHub"}).when("/faq",{templateUrl:"/partials/faq.htm",controller:"faqController",title:"FAQ – Anonymous GitHub"}).when("/profile",{templateUrl:"/partials/profile.htm",controller:"profileController",title:"Your settings – Anonymous GitHub"}).when("/claim",{templateUrl:"/partials/claim.htm",controller:"claimController",title:"Claim an anonymization – Anonymous GitHub"}).when("/pr/:pullRequestId",{templateUrl:"/partials/pullRequest.htm",controller:"pullRequestController",title:"Anonymous pull request – Anonymous GitHub",reloadOnUrl:!1}).when("/gist/:gistId",{templateUrl:"/partials/gist.htm",controller:"gistController",title:"Anonymous gist – Anonymous GitHub",reloadOnUrl:!1}).when("/r/:repoId/:path*?",{templateUrl:"/partials/explorer.htm",controller:"exploreController",title:"Anonymous repository – Anonymous GitHub",reloadOnUrl:!1}).when("/repository/:repoId/:path*?",{templateUrl:"/partials/explorer.htm",controller:"exploreController",title:"Anonymous repository – Anonymous GitHub",reloadOnUrl:!1}).when("/admin/",{templateUrl:"/partials/admin/overview.htm",controller:"overviewAdminController",title:"Admin · Overview – Anonymous GitHub"}).when("/admin/repositories",{templateUrl:"/partials/admin/repositories.htm",controller:"repositoriesAdminController",title:"Admin · Repositories – Anonymous GitHub"}).when("/admin/users",{templateUrl:"/partials/admin/users.htm",controller:"usersAdminController",title:"Admin · Users – Anonymous GitHub"}).when("/admin/users/:username",{templateUrl:"/partials/admin/user.htm",controller:"userAdminController",title:"Admin · User details – Anonymous GitHub"}).when("/admin/conferences",{templateUrl:"/partials/admin/conferences.htm",controller:"conferencesAdminController",title:"Admin · Conferences – Anonymous GitHub"}).when("/admin/queues",{templateUrl:"/partials/admin/queues.htm",controller:"queuesAdminController",title:"Admin · Queues – Anonymous GitHub"}).when("/admin/errors",{templateUrl:"/partials/admin/errors.htm",controller:"errorsAdminController",title:"Admin · Errors – Anonymous GitHub"}).when("/404",{templateUrl:"/partials/404.htm",title:"Page not found – Anonymous GitHub"}).otherwise({templateUrl:"/partials/404.htm",title:"Page not found – Anonymous GitHub"}),t.html5Mode(!0)}]).filter("humanFileSize",function(){return humanFileSize}).filter("bigNum",function(){return function(e){var e=Number(e)||0,t=Math.abs(e);return t<1e3?String(e):t<1e4?(e/1e3).toFixed(1).replace(/\.0$/,"")+"k":t<1e6?Math.round(e/1e3)+"k":t<1e7?(e/1e6).toFixed(1).replace(/\.0$/,"")+"M":Math.round(e/1e6)+"M"}}).filter("humanTime",function(){return function(e){if(!e)return"never";var t,n=(e="string"!=typeof(e=e instanceof Date?Math.round((Date.now()-e)/1e3):e)&&"number"!=typeof e?e:Math.round((Date.now()-new Date(e))/1e3))<0?"from now":"ago";if(172800e.replace(/&/g,"&").replace(//g,">");function u(e,t){if(t){var n=t.newPath&&"/dev/null"!==t.newPath?t.newPath:t.oldPath||"",i="/dev/null"===t.oldPath?"added":"/dev/null"===t.newPath?"deleted":t.oldPath&&t.newPath&&t.oldPath!==t.newPath?"renamed":"modified";if(e.push('
'),e.push('
'+s(n)+''+i+"
"),t.lines.length){e.push('');for(const r of t.lines)e.push('");e.push("
'+(r.oldNo||"")+''+(r.newNo||"")+''+("add"===r.kind?"+":"remove"===r.kind?"-":"hunk"===r.kind?"@":"")+''+s(r.text)+"
")}e.push("
")}}return function(e){if(!e)return e;const t=[];let n=null,i=0,r=0;var s=()=>n=n||{oldPath:"",newPath:"",lines:[]},o=()=>{n&&(n.lines.length||n.oldPath||n.newPath)&&(u(t,n),n=null)},a=e.split("\n");for(let e=0;e
',link:function(n,i){function e(){var e,t;n.file&&(n.kind=(e=n.file,"md"===(t=o(e&&e.filename))||"markdown"===t||e&&"Markdown"===e.language?"md":"code"),n.prismClass="language-"+(t=n.file,t&&t.language&&s[t.language.toLowerCase()]||s[o(t&&t.filename)]||"none"),r(()=>{i[0].querySelectorAll("pre code").forEach(e=>{window.Prism&&Prism.highlightElement(e)})},50))}n.$watch("file",e),n.$watch("file.content",e),n.$watch("terms",e),n.$watch("options",e,!0)}}}]).directive("markdown",["$location",function(r){return{restrict:"E",scope:{terms:"=",options:"=",content:"="},link:function(e,t,n){function i(){t.html(renderMD(e.content,r.url()+"/../"))}e.$watch(n.terms,i),e.$watch("terms",i),e.$watch("options",i),e.$watch("content",i)}}}]).directive("tree",[function(){return{restrict:"E",scope:{file:"=",parent:"@",searchQuery:"=",searchResults:"="},controller:["$element","$scope","$routeParams","$compile",function(n,g,i,r){if(g.repoId=document.location.pathname.split("/")[2],g.opens={},i.path){let t="";i.path.split("/").forEach(e=>{g.opens[t+"/"+e]=!0,t=t+"/"+e})}function s(e){var t,n=[];const i={"":{child:n}};for(t of e){if(t.path&&!i[t.path]){o=a=s=r=void 0;var r=t.path;if(!i[r]){var s=r.split("/");let t="";for(let e=0;e{var n=!!e.child,i=!!t.child;return n&&i?e.name.localeCompare(t.name):n?-1:i?1:e.name.localeCompare(t.name)};function w(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function v(e,t,o){if(!e)return"";let a="
    ";for(var l of e=e.sort(f))if(!o||function t(e,n,i){if(!i)return!0;const r=n?n+"/"+e.name:e.name;return e.child?!!i.folders.has(r)||e.child.some(e=>t(e,r,i)):i.paths.has(r)}(l,t?t.substring(1):"",o)){let n=!!l.child,i=l.name,r=l.size,s=l;if(n){let e=i,t=l.child;for(;t&&1==t.length;)e+="/"+t[0].name,r=t[0].size,t=t[0].child;i=e,s=t?{child:t}:l,null!=r&&0<=r&&(n=!1)}var l=null!=r?"Size: "+humanFileSize(r||0):"",c=t+"/"+i,h=n&&(u=c,h=void 0,h=g.$parent.fileCounts)&&h[u.startsWith("/")?u.substring(1):u]||0,u=o?!1!==g.opens[c]:g.opens[c],d=["file"],p=(n&&d.push("folder"),u&&d.push("open"),g.isActive(c)&&d.push("active"),n&&(m=c,p=void 0,!!(p=g.$parent.options&&g.$parent.options.truncatedFolders||[]).length)&&(m=m.startsWith("/")?m.substring(1):m,-1!==p.indexOf(m)));if(p&&d.push("truncated"),a+=`
  • `,n?(a+=`${w(i)}`,p&&(a+=``),0${h}`),a+=""):(m=""!==t,a+=`${m?'':""}${w(i)}`),u&&s.child){d=s.child;if(1"}var m,p,u,h;return a+"
"}function o(){n.html("");var e=g.searchQuery?function(){var e=g.searchResults;if(!e||!e.length)return null;var t=new Set,n=new Set;for(const r of e){var i=r.path?r.path+"/"+r.name:r.name;if(t.add(i),r.path){let e="";for(const s of r.path.split("/").filter(Boolean))e=e?e+"/"+s:s,n.add(e)}}return{paths:t,folders:n}}():null;let t;t=null!==e&&0===e.paths.size?'
No files found
':v(s(g.file).sort(f),"",e),r(t)(g,e=>{n.append(e),a&&(e=function(e){if(e)for(var t=l(),n=0;n{if(null!=e){if(0==e.length)return n.html("Empty repository");!function e(t,n){if(t)for(const r of t){var i;r.child&&0!==r.child.length&&((i=n+"/"+r.name)in g.opens||(g.opens[i]=!0),e(r.child,i))}}(s(e),""),o()}},!0),g.$watch("searchResults",(e,t)=>{e!==t&&g.file&&g.file.length&&o()}),g.$watch("searchQuery",(e,t)=>{e!==t&&!e&&g.file&&g.file.length&&o()}),g.isActive=function(e){return i.path==e.substring(1)},g.openFolder=function(e,t){var n=g.opens[e],n=(void 0===n&&g.searchQuery&&(n=!0),g.opens[e]=!n,t.target.closest("li")),t=n?n.querySelector(":scope > ul"):null;null!=t&&0!==t.children.length||g.$parent.getFiles(e.substring(1))};var a=i.path?"/"+i.path:null;function l(){return Array.from(n[0].querySelectorAll("li > a"))}function c(){return n[0].querySelector("a.tree-focused")}function h(e){var t,n;return e?(t=e.getAttribute("href"))?(n="/r/"+g.repoId,0===t.indexOf(n)?decodeURIComponent(t.substring(n.length)):null):(t=e.getAttribute("ng-click"))&&(n=t.match(/openFolder\('([^']+)'/))?n[1]:null:null}function u(e){var t=c();t&&t.classList.remove("tree-focused"),a=e?(e.classList.add("tree-focused"),e.scrollIntoView({block:"nearest"}),h(e)):null}n[0].setAttribute("tabindex","0"),n[0].addEventListener("keydown",function(e){var t,n,i,r=l();r.length&&(i=(t=c())?r.indexOf(t):-1,"ArrowDown"===e.key?(e.preventDefault(),u(r[i ul > li > a"))&&u(i):t.click())):"ArrowLeft"===e.key?(e.preventDefault(),t&&((n=t.closest("li"))&&n.classList.contains("folder")&&n.classList.contains("open")?t.click():(r=n&&n.parentElement?n.parentElement.closest("li.folder"):null)&&(i=r.querySelector(":scope > a"))&&u(i))):"Enter"===e.key&&(e.preventDefault(),t)&&t.click())}),n[0].addEventListener("click",function(e){e=e.target.closest("a");e&&n[0].contains(e)&&u(e)})}]}}]).directive("notebook",[function(){return{restrict:"E",scope:{file:"="},controller:["$element","$scope","$http",function(t,e,n){function i(e){e=nb.parse(e);try{t.html(""),t.append(e.render()),Prism.highlightAll()}catch(e){t.html("Unable to render the notebook.")}}function r(){if(e.$parent.content)try{i(JSON.parse(e.$parent.content))}catch(e){t.html("Unable to render the notebook invalid notebook format.")}else e.file&&n.get(e.file.download_url).then(e=>i(e.data))}e.$watch("file",e=>{r()}),r()}]}}]).directive("loc",[function(){return{restrict:"E",scope:{stats:"="},template:"
",controller:["$scope",function(n){function t(){for(var e in n.elements=[],n.total=0,n.stats){var t=n.stats[e].code;t&&(n.total+=t,n.elements.push({lang:e,loc:t,color:langColors[e]}))}setTimeout(()=>{$('[data-toggle="tooltip"]').tooltip()},100)}n.$watch("stats",e=>{t()}),t()}]}}]).controller("mainController",["$scope","$http","$location","$timeout",function(r,e,n,t){function i(e,t){t&&(r.title=t.title),r.path=n.url(),r.paths=n.path().substring(1).split("/")}r.title="Main",r.user={status:"connection"},r.site_options,r.toasts=[],r.removeToast=function(e){e=r.toasts.indexOf(e);-1!==e&&r.toasts.splice(e,1)},r.addToast=function(e){return r.toasts.push(e),t(function(){r.removeToast(e)},8e3),e},r.path=n.url(),r.paths=n.path().substring(1).split("/"),r.darkMode=function(e){localStorage.setItem("darkMode",e);var t,n="/css/prism-okaidia.css",i="/css/prism.css",i=(((r.isDarkMode=e)?($("body").addClass("dark-mode"),(t=document.createElement("link")).href=n,t.rel="stylesheet",document.head.append(t),$(`link[href='${i}']`)):($("body").removeClass("dark-mode"),(t=document.createElement("link")).href=i,t.rel="stylesheet",document.head.append(t),$(`link[href='${n}']`))).remove(),document.querySelector(".floatingchat-container-wrap-mo498 .floating-chat-kofi-text-container-wrap"));i&&(i.style.backgroundColor=e?"#FAF9F6":"#1A1815",i.style.color=e?"#1A1815":"#FAF9F6"),r.$broadcast("dark-mode",e)},r.darkMode("true"==localStorage.getItem("darkMode")),e.get("/api/user").then(e=>{e&&(r.user=e.data)},()=>{r.user=null}),e.get("/api/options").then(e=>{e&&(r.site_options=e.data)},()=>{r.site_options=null}),e.get("/api/message").then(e=>{e&&(r.generalMessage=e.data)},()=>{r.generalMessage=null}),r.$on("$routeChangeSuccess",i),r.$on("$routeUpdate",i)}]).controller("faqController",["$scope","$http",function(e,t){}]).controller("profileController",["$scope","$http",function(t,n){function i(){n.get("/api/user/default").then(e=>{e=e.data;e.terms&&(t.terms=e.terms.join("\n")),t.option=Object.assign({},t.option,e.options)})}t.terms="",t.options={expirationMode:"remove",update:!1,image:!0,pdf:!0,notebook:!0,loc:!0,link:!0},i(),t.saveDefault=()=>{var e={terms:t.terms.trim().split("\n"),options:t.options};n.post("/api/user/default",e).then(()=>{i(),t.message="Saved"},e=>{$translate("ERRORS."+e.data.error).then(e=>{t.error=e},console.error)})}}]).controller("claimController",["$scope","$http","$location",function(t,e,n){t.repoId=null,t.repoUrl=null,t.claim=()=>{e.post("/api/repo/claim",{repoId:t.repoId,repoUrl:t.repoUrl}).then(e=>{n.url("/dashboard")},e=>{t.error=e.data,t.claimForm.repoUrl.$setValidity("not_found",!1),t.claimForm.repoId.$setValidity("not_found",!1)})}}]).controller("homeController",["$scope","$http","$location",function(t,e,n){function i(t){var n={series:t,bars:[],viewW:100,deltaToday:0,pctChange:0,pctAbs:0,isUp:!0};if(t&&!(t.length<2)){var i=new Array(t.length-1);for(let e=1;e{t.user&&!t.user.status&&n.url("/dashboard")}),t.cards=[{key:"repositories",total:0,label:"repositories anonymized"},{key:"users",total:0,label:"researchers"},{key:"pageViews",total:0,label:"page views"},{key:"pullRequests",total:0,label:"pull requests"}],e.get("/api/stat/").then(e=>{t.stat=e.data,t.cards[0].total=e.data.nbRepositories,t.cards[1].total=e.data.nbUsers,t.cards[2].total=e.data.nbPageViews,t.cards[3].total=e.data.nbPullRequests}),t.history={repositories:i([]),users:i([]),pageViews:i([]),pullRequests:i([])},e.get("/api/stat/history?days=60").then(e=>{e=e.data||[];t.history={repositories:i(e.map(e=>e.nbRepositories||0)),users:i(e.map(e=>e.nbUsers||0)),pageViews:i(e.map(e=>e.nbPageViews||0)),pullRequests:i(e.map(e=>e.nbPullRequests||0))}})}]).controller("unifiedDashboardController",["$scope","$http","$location",function(r,s,e){r.$on("$routeChangeStart",function(){$('[data-toggle="tooltip"]').tooltip("dispose")}),r.$watch("user.status",()=>{null==r.user&&e.url("/")}),null==r.user&&e.url("/"),setTimeout(()=>{$('[data-toggle="tooltip"]').tooltip()},250),r.items=[],r.search="";const t="dashboard.filterPrefs",n="all",i={status:{ready:!0,expired:!0,removed:!1}},o="-anonymizeDate";var a=loadFilterPrefs(t)||{};r.typeFilter=a.typeFilter||n,r.filters={status:Object.assign({},i.status,a.filters&&a.filters.status||{})},r.orderBy=a.orderBy||o,r.$watchGroup(["typeFilter","orderBy"],()=>{saveFilterPrefs(t,{typeFilter:r.typeFilter,filters:r.filters,orderBy:r.orderBy})}),r.$watch("filters",()=>{saveFilterPrefs(t,{typeFilter:r.typeFilter,filters:r.filters,orderBy:r.orderBy})},!0),s.get("/api/user/quota").then(e=>{r.quota=e.data,r.quota.storage.percent=r.quota.storage.total?100*r.quota.storage.used/r.quota.storage.total:100,r.quota.file.percent=r.quota.file.total?100*r.quota.file.used/r.quota.file.total:100,r.quota.repository.percent=r.quota.repository.total?100*r.quota.repository.used/r.quota.repository.total:100},console.error);let l=null,c=null,h=null;function u(){r.items=(l||[]).concat(c||[]).concat(h||[])}function d(){l=null,c=null,h=null,s.get("/api/user/anonymized_repositories").then(e=>{l=e.data.map(e=>(e.pageView||(e.pageView=0),e.lastView||(e.lastView=""),e.options.terms=e.options.terms.filter(e=>e),e._type="repo",e._id=e.repoId,e._name=e.repoId,e._source=e.source.fullName,e._editUrl="/anonymize/"+e.repoId,e._viewUrl="/r/"+e.repoId+"/",e)),u()},e=>{console.error(e)}),s.get("/api/user/anonymized_pull_requests").then(e=>{c=e.data.map(e=>(e.pageView||(e.pageView=0),e.lastView||(e.lastView=""),e.options.terms=e.options.terms.filter(e=>e),e._type="pr",e._id=e.pullRequestId,e._name=e.pullRequestId,e._source=e.source.repositoryFullName+"#"+e.source.pullRequestId,e._editUrl="/pull-request-anonymize/"+e.pullRequestId,e._viewUrl="/pr/"+e.pullRequestId+"/",e)),u()},e=>{console.error(e)}),s.get("/api/user/anonymized_gists").then(e=>{h=e.data.map(e=>(e.pageView||(e.pageView=0),e.lastView||(e.lastView=""),e.options.terms=(e.options.terms||[]).filter(e=>e),e._type="gist",e._id=e.gistId,e._name=e.gistId,e._source=e.source.gistId,e._editUrl="/gist-anonymize/"+e.gistId,e._viewUrl="/gist/"+e.gistId+"/",e)),u()},e=>{console.error(e)})}function p(n,i){s.get("/api/repo/"+n).then(e=>{for(const t of r.items)if("repo"===t._type&&t.repoId==n){t.status=e.data.status;break}"ready"==e.data.status||"error"==e.data.status||"removed"==e.data.status||"expired"==e.data.status?i(e.data):setTimeout(()=>p(n,i),2500)})}d();const m=e=>"repo"===e?"repository":"gist"===e?"gist":"pull request",g=e=>"repo"===e?"/api/repo":"gist"===e?"/api/gist":"/api/pr";r.removeItem=t=>{const e=m(t._type);if(confirm(`Are you sure that you want to remove the ${e} ${t._id}?`)){const i={title:`Removing ${t._id}...`,date:new Date,body:`The ${e} ${t._id} is going to be removed.`};r.addToast(i);var n=g(t._type)+"/"+t._id;s.delete(n).then(()=>{"repo"===t._type?p(t._id,()=>{i.title=t._id+" is removed.",i.body=`The ${e} ${t._id} is removed.`,r.$apply()}):(i.title=t._id+" is removed.",i.body=`The ${e} ${t._id} is removed.`,d())},e=>{i.title=`Error during the removal of ${t._id}.`,i.body=e.body,d()})}},r.refreshItem=t=>{const e=m(t._type),n={title:`Refreshing ${t._id}...`,date:new Date,body:`The ${e} ${t._id} is going to be refreshed.`};r.addToast(n);var i=`${g(t._type)}/${t._id}/refresh`;s.post(i).then(()=>{"repo"===t._type?p(t._id,()=>{n.title=t._id+" is refreshed.",n.body=`The ${e} ${t._id} is refreshed.`,r.$apply()}):(n.title=t._id+" is refreshed.",n.body=`The ${e} ${t._id} is refreshed.`,d())},e=>{n.title=`Error during the refresh of ${t._id}.`,n.body=e.body,d()})},r.itemFilter=e=>("all"===r.typeFilter||e._type===r.typeFilter)&&0!=r.filters.status[e.status]&&(0==r.search.trim().length||!!(e._source&&-1{e.get("/api/repo/"+i.repoId,{repoId:i.repoId,repoUrl:i.repoUrl}).then(e=>{i.repo=e.data,e.data.rateLimitResetAt?n(e.data.rateLimitResetAt):i.repo.statusMessage=function(e){if(e){var t=e.match(/^rate_limited:(\d+)$/);if(t)return n(parseInt(t[1],10)),null;i.rateLimitResetAt=0}return e}(i.repo.statusMessage),"ready"==i.repo.status?i.progress=100:"queue"==i.repo.status?i.progress=10:"downloaded"==i.repo.status?i.progress=50:"download"==i.repo.status||"preparing"==i.repo.status?i.progress=25:"anonymizing"==i.repo.status&&(i.progress=75);e="ready"!=i.repo.status;(e="error"!=i.repo.status||i.rateLimitResetAt?e:!1)&&setTimeout(i.getStatus,2e3)},e=>{i.error=e.data.error})},i.getStatus()}]).controller("anonymizeController",["$scope","$http","$sce","$routeParams","$location","$translate","$timeout",function(s,o,r,e,t,a,l){function c(e,t,n){s.anonymize&&s.anonymize[e]&&s.anonymize[e].$setValidity(t,n)}function h(){return s.isUpdate&&s._originalRepositoryID&&function(e){try{var t=parseGithubUrl(e);if(t&&t.owner&&t.repo)return t.owner+"/"+t.repo}catch(e){}return null}(s.sourceUrl)===s._originalFullName?s._originalRepositoryID:void 0}var n;async function u(){var e=parseGithubUrl(s.sourceUrl);try{S();var t=await o.get(`/api/repo/${e.owner}/${e.repo}/`,{params:{repositoryID:h(),force:"1"}});s.details=t.data,s.details&&s.details.id&&(s.repositoryID=s.details.id),s.repoId||(s.repoId=s.details.repo+"-"+generateRandomId(4)),await s.getBranches()}catch(e){throw e.data&&(a("ERRORS."+e.data.error).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),C(e.data.error)),c("sourceUrl","missing",!1),e}}async function d(e){if(s.readme&&!e)return s.readme;var t=parseGithubUrl(s.sourceUrl);try{var n=await o.get(`/api/repo/${t.owner}/${t.repo}/readme`,{params:{force:!0===e?"1":"0",branch:s.source.branch,repositoryID:h()}});s.readme=n.data}catch(e){s.readme=""}}function i(){var e={terms:s.terms?s.terms.split("\n"):[],image:!!s.options.image,link:!!s.options.link,repoId:s.repoId};s.source&&s.source.branch&&(e.branchName=s.source.branch);try{var t=parseGithubUrl(s.sourceUrl);e.repoName=t.owner+"/"+t.repo}catch(e){}return e}function p(n,i){let r=null,s=0;return function(){r&&l.cancel(r),r=l(()=>{r=null;const t=++s;var e=n();e&&o.post("/api/anonymize-preview",e).then(e=>{t===s&&i(e.data)},()=>{})},200)}}s.sourceUrl="",s.detectedType=null,s.repoId="",s.pullRequestId="",s.gistId="",s.terms="",s.defaultTerms="",s.branches=[],s.source={branch:"",commit:""},s.options={expirationMode:"remove",expirationDate:new Date,update:!1,image:!0,pdf:!0,notebook:!0,link:!0,body:!0,title:!0,origin:!1,diff:!0,content:!0,comments:!0,username:!0,date:!0},s.options.expirationDate.setDate(s.options.expirationDate.getDate()+90),s.anonymize_readme="",s.readme="",s.html_readme="",s.isUpdate=!1,n=()=>{e.repoId&&""!=e.repoId&&(s.isUpdate=!0,s.detectedType="repo",s.repoId=e.repoId,o.get("/api/repo/"+s.repoId).then(async e=>{s.sourceUrl="https://github.com/"+e.data.source.fullName,s._originalFullName=e.data.source.fullName,s.terms=e.data.options.terms.filter(e=>e).join("\n"),s.source=e.data.source,s.role=e.data.role||"owner",s.coauthors=e.data.coauthors||[],s._originalBranch=e.data.source.branch,s.options=Object.assign({},s.options,e.data.options),s.conference=e.data.conference,s.repositoryID=e.data.source.repositoryID,s._originalRepositoryID=e.data.source.repositoryID,e.data.options.expirationDate&&(s.options.expirationDate=new Date(e.data.options.expirationDate)),await Promise.all([u(),d()]),g(),s.$apply()},()=>{t.url("/404")}),s.$watch("anonymize",()=>{s.anonymize.repoId&&(s.anonymize.repoId.$$element[0].disabled=!0)})),e.pullRequestId&&""!=e.pullRequestId&&(s.isUpdate=!0,s.detectedType="pr",s.pullRequestId=e.pullRequestId,o.get("/api/pr/"+s.pullRequestId).then(async t=>{s.sourceUrl="https://github.com/"+t.data.source.repositoryFullName+"/pull/"+t.data.source.pullRequestId,s.terms=t.data.options.terms.filter(e=>e).join("\n"),s.source=t.data.source,s.options=Object.assign({},s.options,t.data.options),s.conference=t.data.conference,t.data.options.expirationDate&&(s.options.expirationDate=new Date(t.data.options.expirationDate));try{s.details=(await o.get(`/api/pr/${t.data.source.repositoryFullName}/`+t.data.source.pullRequestId)).data}catch(e){t=e&&e.data&&e.data.error;t&&(a("ERRORS."+t).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),C(t))}s.$apply()},()=>{t.url("/404")}),s.$watch("anonymize",()=>{s.anonymize.pullRequestId&&(s.anonymize.pullRequestId.$$element[0].disabled=!0),s.anonymize.sourceUrl&&(s.anonymize.sourceUrl.$$element[0].disabled=!0)})),e.gistId&&""!=e.gistId&&(s.isUpdate=!0,s.detectedType="gist",s.gistId=e.gistId,o.get("/api/gist/"+s.gistId).then(async e=>{s.sourceUrl="https://gist.github.com/"+e.data.source.gistId,s.terms=e.data.options.terms.filter(e=>e).join("\n"),s.source=e.data.source,s.options=Object.assign({},s.options,e.data.options),s.conference=e.data.conference,e.data.options.expirationDate&&(s.options.expirationDate=new Date(e.data.options.expirationDate)),s.details=(await o.get("/api/gist/source/"+e.data.source.gistId)).data,s.$apply()},()=>{t.url("/404")}),s.$watch("anonymize",()=>{s.anonymize.gistId&&(s.anonymize.gistId.$$element[0].disabled=!0),s.anonymize.sourceUrl&&(s.anonymize.sourceUrl.$$element[0].disabled=!0)}))},o.get("/api/user/default").then(e=>{e=e.data;e.terms&&(s.defaultTerms=e.terms.join("\n")),s.options=Object.assign({},s.options,e.options),s.options.expirationDate=new Date(s.options.expirationDate),s.options.expirationDate.setDate(s.options.expirationDate.getDate()+90),n&&n()}),s.urlSelected=async()=>{s.terms=s.defaultTerms,s.isUpdate||(s.repoId="",s.pullRequestId="",s.gistId=""),s.details=null,s.branches=[],s.source={type:"GitHubStream",branch:"",commit:""},s.anonymize_readme="",s.readme="",s.html_readme="",s.detectedType=null;let e;try{e=parseGithubUrl(s.sourceUrl)}catch(e){return void c("sourceUrl","github",!1)}c("sourceUrl","github",!0);try{if(e.gistId&&!e.repo){s.detectedType="gist",s.source={gistId:e.gistId};var t=parseGithubUrl(s.sourceUrl);try{S();var n=await o.get("/api/gist/source/"+t.gistId);s.details=n.data,s.gistId||(s.gistId="gist-"+t.gistId.substring(0,6)+"-"+generateRandomId(4))}catch(e){throw e.data&&(a("ERRORS."+e.data.error).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),C(e.data.error)),c("sourceUrl","missing",!1),e}await 0}else if(e.pullRequestId){s.detectedType="pr",s.source={repositoryFullName:e.owner+"/"+e.repo,pullRequestId:e.pullRequestId};var i=parseGithubUrl(s.sourceUrl);try{S();var r=await o.get(`/api/pr/${i.owner}/${i.repo}/`+i.pullRequestId);s.details=r.data,s.pullRequestId||(s.pullRequestId=i.repo+"-PR"+i.pullRequestId+"-"+generateRandomId(4))}catch(e){throw e.data&&(a("ERRORS."+e.data.error).then(e=>{s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),C(e.data.error)),c("sourceUrl","missing",!1),e}await 0}else s.detectedType="repo",await Promise.all([u(),d()]),g()}catch(e){return}s.$apply(),$('[data-toggle="tooltip"]').tooltip()},$('[data-toggle="tooltip"]').tooltip(),s.$watch("options.update",e=>{"repo"===s.detectedType&&s.anonymize&&s.anonymize.commit&&(s.anonymize.commit.$$element[0].disabled=!!e)}),s.$watch("source.branch",async()=>{var e;"repo"===s.detectedType&&(e=s.branches.filter(e=>e.name==s.source.branch)[0])&&(s.isUpdate&&s._originalBranch===s.source.branch&&!!s.source.commit||(s.source.commit=e.commit),s.readme=e.readme,await d(),g(),s.$apply())}),s.getBranches=async e=>{var t=parseGithubUrl(s.sourceUrl);try{var n=await o.get(`/api/repo/${t.owner}/${t.repo}/branches`,{params:{force:!0===e?"1":"0",repositoryID:h()}}),i=(s.branches=n.data,s.sourceUnreachable=!1,s.source.branch||(s.source.branch=s.details.defaultBranch),s.branches.filter(e=>e.name==s.source.branch));0{s.toasts=s.toasts||[],s.addToast({title:"Error",date:new Date,body:e}),s.error=e},console.error),c("sourceUrl","missing",!1)}s.$apply()};const m=p(()=>s.readme?{content:s.readme,options:i()}:null,e=>{s.anonymize_readme=e.content||"";let t="";try{var n=parseGithubUrl(s.sourceUrl),i=s.source.branch||s.details&&s.details.defaultBranch||"main";t=`https://github.com/${n.owner}/${n.repo}/raw/${i}/`}catch(e){}e=renderMD(s.anonymize_readme,t);s.html_readme=r.trustAsHtml(e),l(Prism.highlightAll,150)});function g(){s.anonymize&&s.anonymize.terms&&(s.termsRegexWarning=!!s.terms&&!!s.terms.match(/[-[\]{}()*+?.,\\^$|#]/g),m())}let f=new Map,w=new Set;const v=p(()=>{var e=function(){var e=new Set,t=s.details&&s.details.pullRequest;if(t){"string"==typeof t.title&&e.add(t.title),"string"==typeof t.body&&e.add(t.body),"string"==typeof t.diff&&e.add(t.diff);for(const n of s.details&&s.details.comments||[])"string"==typeof n.author&&e.add(n.author),"string"==typeof n.body&&e.add(n.body)}return e}(),e=(w=e,Array.from(e));return 0===e.length?null:{contents:e,options:i()}},t=>{if(t&&Array.isArray(t.contents)){var n=Array.from(w),i=new Map;for(let e=0;e{var e=function(){var e=new Set,t=s.details&&s.details.gist;if(t){"string"==typeof t.description&&e.add(t.description),"string"==typeof t.ownerLogin&&e.add(t.ownerLogin);for(const n of t.files||[])"string"==typeof n.filename&&e.add(n.filename),"string"==typeof n.content&&e.add(n.content);for(const i of t.comments||[])"string"==typeof i.author&&e.add(i.author),"string"==typeof i.body&&e.add(i.body)}return e}(),e=(b=e,Array.from(e));return 0===e.length?null:{contents:e,options:i()}},t=>{if(t&&Array.isArray(t.contents)){var n=Array.from(b),i=new Map;for(let e=0;e({filename:s.anonymizeGistContent(e.filename),content:s.anonymizeGistContent(e.content),language:e.language}))}function S(){c("repoId","used",!0),c("repoId","format",!0),c("pullRequestId","used",!0),c("pullRequestId","format",!0),c("gistId","used",!0),c("gistId","format",!0),c("sourceUrl","used",!0),c("sourceUrl","missing",!0),c("sourceUrl","access",!0),c("sourceUrl","github",!0),c("commit","exists",!0),c("conference","activated",!0),c("terms","format",!0),s.termsRegexWarning=!1}function C(e){var t="pr"===s.detectedType?"pullRequestId":"gist"===s.detectedType?"gistId":"repoId";switch(e){case"repoId_already_used":c(t,"used",!1);break;case"invalid_repoId":case"options_not_provided":c(t,"format",!1);break;case"repo_already_anonymized":c("sourceUrl","used",!1);break;case"invalid_terms_format":c("terms","format",!1);break;case"repo_not_found":c("sourceUrl","missing",!1);break;case"repo_not_accessible":c("sourceUrl","access",!1);break;case"commit_not_found":c("commit","exists",!1);break;case"conf_not_activated":c("conference","activated",!1)}}s.anonymizeGistContent=function(e){if(e){if(y.has(e))return y.get(e);b.has(e)||A()}return e},s.previewGistFiles=[],s.$watch("details.gist.files",k,!0),s.$watch("terms",k),s.coauthors=s.coauthors||[],s.coauthorResults=[],s.coauthorError="",s.searchCoauthors=()=>{var e=(s.coauthorSearch||"").trim();s.coauthorError="",e.length<2?s.coauthorResults=[]:o.get("/api/user/search/github-users",{params:{q:e}}).then(e=>{const t=new Set((s.coauthors||[]).map(e=>(e.username||"").toLowerCase()));s.coauthorResults=(e.data||[]).filter(e=>!t.has((e.username||"").toLowerCase()))},()=>{s.coauthorResults=[]})},s.addCoauthor=(e,t)=>{t&&t.preventDefault(),e&&e.username&&o.post("/api/repo/"+s.repoId+"/coauthors",{username:e.username}).then(e=>{s.coauthors=e.data||[],s.coauthorResults=[],s.coauthorSearch="",s.coauthorError=""},e=>{e=e&&e.data&&e.data.error||"unknown_error";s.coauthorError=e})},s.removeCoauthor=e=>{e&&e.username&&confirm("Remove co-author "+e.username+"?")&&o.delete("/api/repo/"+s.repoId+"/coauthors/"+encodeURIComponent(e.username)).then(e=>{s.coauthors=e.data||[]},e=>{e=e&&e.data&&e.data.error||"unknown_error";s.coauthorError=e})},s.anonymizeRepo=e=>{e.target.disabled=!0;var t=parseGithubUrl(s.sourceUrl),t={repoId:s.repoId,terms:s.terms.trim().split("\n").filter(e=>e),fullName:t.owner+"/"+t.repo,repository:s.sourceUrl,options:s.options,source:s.source,conference:s.conference},n=(s.details&&(t.options.pageSource=s.details.pageSource),S(),s.isUpdate?"/api/repo/"+s.repoId:"/api/repo/");o.post(n,t,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/status/"+s.repoId},e=>{e.data&&(a("ERRORS."+e.data.error).then(e=>{s.error=e},console.error),C(e.data.error))}).finally(()=>{e.target.disabled=!1,s.$apply()})},s.anonymizeGist=e=>{e.target.disabled=!0;var t=parseGithubUrl(s.sourceUrl),t={gistId:s.gistId,terms:s.terms.trim().split("\n").filter(e=>e),source:{gistId:t.gistId},options:s.options,conference:s.conference},n=(S(),s.isUpdate?"/api/gist/"+s.gistId:"/api/gist/");o.post(n,t,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/gist/"+s.gistId},e=>{e.data&&(a("ERRORS."+e.data.error).then(e=>{s.error=e},console.error),C(e.data.error))}).finally(()=>{e.target.disabled=!1,s.$apply()})},s.anonymizePullRequest=e=>{e.target.disabled=!0;var t=parseGithubUrl(s.sourceUrl),t={pullRequestId:s.pullRequestId,terms:s.terms.trim().split("\n").filter(e=>e),source:{repositoryFullName:t.owner+"/"+t.repo,pullRequestId:t.pullRequestId},options:s.options,conference:s.conference},n=(S(),s.isUpdate?"/api/pr/"+s.pullRequestId:"/api/pr/");o.post(n,t,{headers:{"Content-Type":"application/json"}}).then(()=>{window.location.href="/pr/"+s.pullRequestId},e=>{e.data&&(a("ERRORS."+e.data.error).then(e=>{s.error=e},console.error),C(e.data.error))}).finally(()=>{e.target.disabled=!1,s.$apply()})},s.$watch("conference",()=>{s.conference&&o.get("/api/conferences/"+s.conference).then(e=>{s.conference_data=e.data,s.conference_data.startDate=new Date(s.conference_data.startDate),s.conference_data.endDate=new Date(s.conference_data.endDate),s.options.expirationDate=new Date(s.conference_data.endDate),s.options.expirationMode="remove",s.options.update=s.conference_data.options.update,s.options.image=s.conference_data.options.image,s.options.pdf=s.conference_data.options.pdf,s.options.notebook=s.conference_data.options.notebook,s.options.link=s.conference_data.options.link},()=>{s.conference_data=null})}),s.$watch("terms",()=>{"repo"===s.detectedType&&g(),"pr"===s.detectedType&&v(),"gist"===s.detectedType&&A()}),s.$watch("options.image",()=>{"repo"===s.detectedType&&g(),"pr"===s.detectedType&&v(),"gist"===s.detectedType&&A()}),s.$watch("options.link",()=>{"repo"===s.detectedType&&g(),"pr"===s.detectedType&&v(),"gist"===s.detectedType&&A()}),s.$watch("details",()=>{"pr"===s.detectedType&&v(),"gist"===s.detectedType&&A()},!0)}]).controller("exploreController",["$scope","$http","$location","$routeParams","$sce","$q","PDFViewerService",function(g,s,o,i,a,r,l){g.files=[],g.isMac=/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent),g.fileSearchQuery="",g.fileSearchResults=null,g.fileSearchLoading=!1,document.addEventListener("keydown",function(e){(e.metaKey||e.ctrlKey)&&"k"===e.key&&(e.preventDefault(),e=document.querySelector(".tree-search-input"))&&(e.focus(),e.select())});var f=null;g.onFileSearchChange=function(){f&&(f.resolve(),f=null);var e=g.fileSearchQuery;!e||e.length<2?(g.fileSearchResults=null,g.fileSearchLoading=!1):(g.fileSearchLoading=!0,f=r.defer(),s.get(`/api/repo/${g.repoId}/files/search?q=`+encodeURIComponent(e),{timeout:f.promise}).then(function(e){f=null,g.fileSearchLoading=!1;for(var t={},n=(g.files.forEach(function(e){t[(e.path||"")+"/"+e.name]=!0}),[]),i={},r=0;re&&0e.path===n)||g.getFiles(n)}}}),g.fileCounts=null,g.getFiles=function(n){return s.get(`/api/repo/${g.repoId}/files/?path=${encodeURIComponent(n)}&v=`+g.options.lastUpdateDate).then(function(e){const t=n||"";return g.files=g.files.filter(e=>e.path!==t),g.files.push(...e.data),e.data},function(e){g.type="error",g.content=e&&e.data&&e.data.error||"unknown_error",g.files=[]})};var m=null;function w(){g.content="",g.file=g.files.filter(e=>e.name==g.paths[g.paths.length-1]&&e.path==g.paths.slice(0,g.paths.length-1).join("/"))[0];let e="0",t=(g.file&&g.file.sha&&(e=g.file.sha),g.url=`/api/repo/${g.repoId}/file/${encodePathForUrl(g.filePath)}?v=`+e,g.filePath.toLowerCase());var n=t.lastIndexOf("."),n=(-1{i.scrollToLine(n,!0,!0,function(){})},100)}else s(null)}e(!0);let o=null;i.on("guttermousedown",function(e){var t=e.getDocumentPosition().row;let n=t,i=t;e.domEvent&&e.domEvent.shiftKey&&null!==o?(n=Math.min(o,t),i=Math.max(o,t)):o=t;t=n===i?"#L"+(n+1):`#L${n+1}-L`+(i+1),t=window.location.pathname+window.location.search+t;window.history.replaceState(null,"",t),s(n,i),e.stop()}),window.addEventListener("hashchange",()=>e(!1)),i.setFontSize(g.aceOption.fontSize),i.setReadOnly(g.aceOption.readOnly),i.setKeyboardHandler(g.aceOption.keyBinding),i.setSelectionStyle(g.aceOption.fullLineSelection?"line":"text"),i.setOption("displayIndentGuides",!0),i.setHighlightActiveLine(g.aceOption.highlightActiveLine),"hide"==g.aceOption.cursor&&(i.renderer.$cursorLayer.element.style.display="none"),i.setHighlightGutterLine(g.aceOption.highlightGutterLine),i.setShowInvisibles(g.aceOption.showInvisibles),i.setDisplayIndentGuides(g.aceOption.showIndentGuides),i.renderer.setShowPrintMargin(g.aceOption.showPrintMargin),i.setHighlightSelectedWord(g.aceOption.highlightSelectedWord),i.session.setUseSoftTabs(g.aceOption.useSoftTab),i.session.setTabSize(g.aceOption.tabSize),i.setBehavioursEnabled(g.aceOption.enableBehaviours),i.setFadeFoldWidgets(g.aceOption.fadeFoldWidgets)}},g.$on("dark-mode",(e,t)=>{g.aceOption.theme=t?"nord_dark":"chrome"}),g.isDarkMode&&(g.aceOption.theme="nord_dark"),g.type="pdf"==(n=t)?(g.instance=l.Instance("viewer"),"pdf"):"md"==n?"md":"org"==n?"org":"ipynb"==n?"IPython":-1e}).then(e=>{var t;g.type=r,g.content=e.data,""==g.content&&(g.content=null),"md"==g.type&&(g.content=a.trustAsHtml(renderMD(e.data,o.url()+"/../")),g.type="html"),"org"==g.type&&(t=contentAbs2Relative(e.data),t=(new Org.Parser).parse(t).convert(Org.ConverterHTML,{headerOffset:1,exportFromLineNumber:!1,suppressSubScriptHandling:!0,suppressAutoLink:!1}),g.content=a.trustAsHtml(t.toString()),g.type="html"),"code"==g.type&&"application/octet-stream"==e.headers("content-type")&&(g.type="binary",g.content="binary"),setTimeout(()=>{Prism.highlightAll()},50)},t=>{g.type="error",g.content="unknown_error";try{t.data=JSON.parse(t.data),t.data.error?g.content=t.data.error:g.content=t.data}catch(e){console.log(t),-1==t.status?g.content="request_error":502==t.status&&(g.content="unreachable")}})}else g.type="error",g.content="no_file_selected"}function v(){g.repoId=i.repoId,g.type="loading",g.filePath=i.path||"",g.paths=g.filePath.split("/"),function n(i){s.get(`/api/repo/${g.repoId}/options`).then(e=>{g.options=e.data,g.options.url?window.location=g.options.url:i&&i(e.data)},e=>{function t(){var e,t=Math.max(0,Math.ceil((g.rateLimitResetAt-Date.now())/1e3));t<=0?(g.rateLimitCountdown="",g.rateLimitResetAt=0,m&&(clearInterval(m),m=null),n(i)):(e=Math.floor(t/60),t%=60,g.rateLimitCountdown=0{n.options=e.data,n.options.url?window.location=n.options.url:t&&t(e.data)},e=>{n.type="error",n.content=e.data.error})}(e=>{!async function(t){i.get(`/api/pr/${n.pullRequestId}/content`).then(e=>{n.details=e.data,t&&t(e.data)},e=>{n.type="error",n.content=e.data.error})}()})}]).controller("gistController",["$scope","$http","$location","$routeParams","$sce",function(n,e,t,i,r){n.gistId=i.gistId,n.type="loading",async function(t){e.get(`/api/gist/${n.gistId}/options`).then(e=>{n.options=e.data,n.options.url?window.location=n.options.url:t&&t(e.data)},e=>{n.type="error",n.content=e.data.error})}(()=>{!async function(t){e.get(`/api/gist/${n.gistId}/content`).then(e=>{n.details=e.data,t&&t(e.data)},e=>{n.type="error",n.content=e.data.error})}()})}]).controller("conferencesController",["$scope","$http","$location",function(n,i,e){n.$watch("user.status",()=>{null==n.user&&e.url("/")}),null==n.user&&e.url("/"),n.conferences=[],n.search="";const t="conferences.filterPrefs",r={status:{ready:!0,expired:!1,removed:!1}},s="name";var o=loadFilterPrefs(t)||{};function a(){i.get("/api/conferences/").then(e=>{n.conferences=e.data||[]},e=>{console.error(e)})}n.filters={status:Object.assign({},r.status,o.filters&&o.filters.status||{})},n.orderBy=o.orderBy||s,n.$watch("orderBy",()=>{saveFilterPrefs(t,{filters:n.filters,orderBy:n.orderBy})}),n.$watch("filters",()=>{saveFilterPrefs(t,{filters:n.filters,orderBy:n.orderBy})},!0),n.removeConference=function(e){if(confirm(`Are you sure that you want to remove the conference ${e.name}? All the repositories linked to this conference will expire.`)){const t={title:`Removing ${e.name}...`,date:new Date,body:`The conference ${e.name} is going to be removed.`};n.addToast(t),i.delete("/api/conferences/"+e.conferenceID).then(()=>{t.title=e.name+" is removed.",t.body=`The conference ${e.name} is removed.`,a()})}},a(),n.conferenceFilter=e=>0!=n.filters.status[e.status]&&(0==n.search.trim().length||-1{null==n.user&&i.url("/")}),null==n.user&&i.url("/"),n.plans=[],n.editionMode=!1,t.conferenceId&&(n.editionMode=!0,e.get("/api/conferences/"+t.conferenceId).then(e=>{n.options=e.data,n.options.startDate=new Date(n.options.startDate),n.options.endDate=new Date(n.options.endDate)})),e.get("/api/conferences/plans").then(e=>{n.plans=e.data,n.plan=n.plans.filter(e=>e.id==n.options.plan.planID)[0]});var t=new Date,r=(t.setDate(1),t.setMonth(t.getMonth()+1),new Date);r.setMonth(t.getMonth()+7,0),n.options={startDate:t,endDate:r,plan:{planID:"free_conference"},options:{link:!0,image:!0,pdf:!0,notebook:!0,update:!0,page:!0}},n.plan=null,n.$watch("options.plan.planID",()=>{n.plan=n.plans.filter(e=>e.id==n.options.plan.planID)[0]}),n.submit=function(){const t={title:`Creating ${n.options.name}...`,date:new Date,body:`The conference ${n.options.conferenceID} is in creation.`};n.editionMode&&(t.title=`Updating ${n.options.name}...`,t.body=`The conference '${n.options.conferenceID}' is updating.`),n.addToast(t),n.conference.name.$setValidity("required",!0),n.conference.conferenceID.$setValidity("pattern",!0),n.conference.conferenceID.$setValidity("required",!0),n.conference.conferenceID.$setValidity("used",!0),n.conference.startDate.$setValidity("required",!0),n.conference.startDate.$setValidity("invalid",!0),n.conference.endDate.$setValidity("required",!0),n.conference.endDate.$setValidity("invalid",!0),n.conference.$setValidity("error",!0),e.post("/api/conferences/"+(n.editionMode?n.options.conferenceID:""),n.options).then(()=>{n.editionMode?(t.title=n.options.name+" updated",t.body=`The conference '${n.options.conferenceID}' is updated.`):(t.title=n.options.name+" created",t.body=`The conference '${n.options.conferenceID}' is created.`),i.url("/conference/"+n.options.conferenceID)},e=>{switch(e.data.error){case"conf_name_missing":n.conference.name.$setValidity("required",!1);break;case"conf_id_missing":n.conference.conferenceID.$setValidity("required",!1);break;case"conf_id_format":n.conference.conferenceID.$setValidity("pattern",!1);break;case"conf_id_used":n.conference.conferenceID.$setValidity("used",!1);break;case"conf_start_date_missing":n.conference.startDate.$setValidity("required",!1);break;case"conf_end_date_missing":n.conference.endDate.$setValidity("required",!1);break;case"conf_start_date_invalid":n.conference.startDate.$setValidity("invalid",!1);break;case"conf_end_date_invalid":n.conference.endDate.$setValidity("invalid",!1);break;default:n.conference.$setValidity("error",!1)}n.removeToast(t)})}}]).controller("conferenceController",["$scope","$http","$location","$routeParams",function(t,e,n,i){t.$watch("user.status",()=>{null==t.user&&n.url("/")}),null==t.user&&n.url("/"),t.conference=null,t.search="",t.filters={status:{ready:!0,expired:!1,removed:!1}},t.orderBy="-anonymizeDate",t.repoFiler=e=>0!=t.filters.status[e.status]&&(0==t.search.trim().length||-1{t.conference=e.data})}]),$(document).on("click","#navbarSupportedContent .nav-link",function(e){var t;"dropdown"!==$(this).attr("data-toggle")&&(t=$("#navbarSupportedContent")).hasClass("show")&&t.collapse("hide")}),angular.module("admin",[]).controller("repositoriesAdminController",["$scope","$http","$location",function(i,r,e){i.Math=Math,i.$watch("user.status",()=>{null==i.user&&e.url("/")}),null==i.user&&e.url("/"),i.repositories=[],i.total=-1,i.totalPage=0,i.statusCounts=[],i.totalSize=0,i.selected={},i.allSelected=!1;const t=e=>{"/"===e.key&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)&&(e.preventDefault(),e=document.querySelector('.admin-filter-toolbar input[type="search"]'))&&e.focus()},s=(document.addEventListener("keydown",t),i.$on("$destroy",()=>document.removeEventListener("keydown",t)),i.clearFilter=e=>{"dateRange"===e?(i.query.dateFrom="",i.query.dateTo=""):i.query[e]="",i.query.page=1},i.chips=[],()=>{var e=[];i.query.owner&&e.push({key:"owner",label:"Owner",value:i.query.owner}),i.query.conference&&e.push({key:"conference",label:"Conference",value:i.query.conference}),i.chips=e}),o=(i.showStatusMessage=e=>{var t=e.statusMessage||"(no message)";window.prompt(`Status message for ${e.repoId} (${e.status}):`,t)},i.fetchGithubInfo=e=>{const t=window.open("","_blank");t&&t.document.write("
Loading GitHub info for "+e.repoId+"...
"),r.get("/api/admin/repos/"+e.repoId+"/github").then(e=>{t&&(t.document.open(),t.document.write('
'+JSON.stringify(e.data,null,2).replace(/[<>]/g,e=>"<"===e?"<":">")+"
"),t.document.close())},e=>{e=e&&e.data?JSON.stringify(e.data,null,2):String(e);t&&(t.document.body.innerHTML='
'+e+"
")})},i.statusCountFor=t=>{var e=(i.statusCounts||[]).find(e=>e._id===t);return e?e.count:0},i.statusStorageFor=t=>{var e=(i.statusCounts||[]).find(e=>e._id===t);return e?e.storage:0},i.isErrorsOnly=()=>i.query&&i.query.error&&!i.query.ready&&!i.query.preparing&&!i.query.expired&&!i.query.removed,i.toggleErrorsOnly=()=>{i.isErrorsOnly()?Object.assign(i.query,{ready:!1,preparing:!0,expired:!1,removed:!1,error:!0}):Object.assign(i.query,{ready:!1,preparing:!1,expired:!1,removed:!1,error:!0}),i.query.page=1},i.toggleSortDirection=()=>{i.query.direction="asc"===i.query.direction?"desc":"asc"},i.sortBy=e=>{i.query.sort===e?i.query.direction="asc"===i.query.direction?"desc":"asc":(i.query.sort=e,i.query.direction="desc"),i.query.page=1},i.sortIcon=e=>i.query.sort===e?"asc"===i.query.direction?"fa-arrow-up":"fa-arrow-down":"","admin.repos.filterPrefs");var n=loadFilterPrefs(o)||{},n=(i.query=Object.assign({},{page:1,limit:25,sort:"lastView",direction:"desc",search:"",owner:"",conference:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},n,{page:1,search:""}),e.search());n.owner&&(i.query.owner=n.owner),n.conference&&(i.query.conference=n.conference),n.search&&(i.query.search=n.search);const a="admin.repos.presets";function l(){i.fetchError=null,r.get("/api/admin/repos",{params:i.query}).then(e=>{i.total=e.data.total,i.totalPage=Math.ceil(e.data.total/i.query.limit),i.repositories=e.data.results,i.statusCounts=e.data.statusCounts||[],i.totalSize=e.data.totalSize||0,i.allSelected=!1},e=>{i.fetchError=e&&e.data&&e.data.error||"Failed to load repositories",console.error(e)})}i.presets=JSON.parse(localStorage.getItem(a)||"[]"),i.savePreset=()=>{const t=window.prompt("Preset name:");var e;t&&(delete(e=Object.assign({},i.query)).page,i.presets=(i.presets||[]).filter(e=>e.name!==t),i.presets.push({name:t,query:e}),localStorage.setItem(a,JSON.stringify(i.presets)))},i.applyPreset=e=>{Object.assign(i.query,e.query,{page:1})},i.deletePreset=t=>{i.presets=(i.presets||[]).filter(e=>e.name!==t.name),localStorage.setItem(a,JSON.stringify(i.presets))},i.selectAllOnPage=()=>{i.allSelected=!i.allSelected,i.repositories.forEach(e=>{i.selected[e.repoId]=i.allSelected})},i.selectedCount=()=>Object.values(i.selected||{}).filter(Boolean).length,i.selectedRepos=()=>i.repositories.filter(e=>i.selected[e.repoId]),i.bulkRefresh=()=>{var e=i.selectedRepos();e.length&&confirm(`Force refresh ${e.length} repositories?`)&&e.forEach(e=>i.updateRepository(e))},i.bulkRemoveCache=()=>{var e=i.selectedRepos();e.length&&confirm(`Purge cache for ${e.length} repositories?`)&&e.forEach(e=>i.removeCache(e))},i.clearSelection=()=>{i.selected={},i.allSelected=!1},i.exportCsv=()=>{var e=new URLSearchParams(Object.entries(i.query).filter(([,e])=>""!==e&&!1!==e&&null!=e));e.set("format","csv"),e.set("limit","10000"),window.open("/api/admin/repos?"+e.toString(),"_blank")},i.removeCache=e=>{confirm("Remove cached files for "+e.repoId+"?")&&r.delete("/api/admin/repos/"+e.repoId).then(()=>l(),e=>console.error(e))},i.removeRepository=e=>{confirm("Remove repository "+e.repoId+"?")&&r.delete("/api/repo/"+e.repoId+"/").then(()=>l(),e=>console.error(e))},i.updateRepository=t=>{const n={title:`Refreshing ${t.repoId}...`,date:new Date,body:`The repository ${t.repoId} is going to be refreshed.`};i.toasts.push(n),r.post(`/api/repo/${t.repoId}/refresh`).then(e=>{"ready"==e.data.status?n.title=t.repoId+" is refreshed.":n.title=`Refreshing of ${t.repoId}.`},e=>{n.title=`Error during the refresh of ${t.repoId}.`,n.body=e.body})},i.fetchError=null,l();let c=null;i.$watch("query",()=>{clearTimeout(c),c=setTimeout(l,500);const{page:e,search:t,...n}=i.query;saveFilterPrefs(o,n),s()},!0),s()}]).controller("usersAdminController",["$scope","$http","$location",function(i,t,e){i.Math=Math,i.$watch("user.status",()=>{null==i.user&&e.url("/")}),null==i.user&&e.url("/"),i.users=[],i.total=-1,i.totalPage=0,i.statusCounts=[],i.selected={},i.allSelected=!1;const n=e=>{"/"===e.key&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)&&(e.preventDefault(),e=document.querySelector('.admin-filter-toolbar input[type="search"]'))&&e.focus()},r=(document.addEventListener("keydown",n),i.$on("$destroy",()=>document.removeEventListener("keydown",n)),i.clearFilter=e=>{"dateRange"===e?(i.query.dateFrom="",i.query.dateTo=""):i.query[e]="",i.query.page=1},i.chips=[],()=>{var e=[];i.query.role&&e.push({key:"role",label:"Role",value:i.query.role}),i.chips=e}),s=(i.statusCountFor=t=>{var e=(i.statusCounts||[]).find(e=>e._id===t);return e?e.count:0},i.toggleSortDirection=()=>{i.query.direction="asc"===i.query.direction?"desc":"asc"},i.sortBy=e=>{i.query.sort===e?i.query.direction="asc"===i.query.direction?"desc":"asc":(i.query.sort=e,i.query.direction="desc"),i.query.page=1},i.sortIcon=e=>i.query.sort===e?"asc"===i.query.direction?"fa-arrow-up":"fa-arrow-down":"","admin.users.filterPrefs");var o=loadFilterPrefs(s)||{};function a(){i.fetchError=null,t.get("/api/admin/users",{params:i.query}).then(e=>{i.total=e.data.total,i.totalPage=Math.ceil(e.data.total/i.query.limit),i.users=e.data.results,i.statusCounts=e.data.statusCounts||[],i.allSelected=!1,i.$apply()},e=>{i.fetchError=e&&e.data&&e.data.error||"Failed to load users",console.error(e)})}i.query=Object.assign({},{page:1,limit:25,sort:"username",direction:"asc",search:"",status:"",role:"",dateFrom:"",dateTo:""},o,{page:1,search:""}),i.selectAllOnPage=()=>{i.allSelected=!i.allSelected,i.users.forEach(e=>{i.selected[e.username]=i.allSelected})},i.selectedCount=()=>Object.values(i.selected||{}).filter(Boolean).length,i.selectedUsers=()=>i.users.filter(e=>i.selected[e.username]),i.banUser=e=>{confirm(`Ban user ${e.username}?`)&&t.post(`/api/admin/users/${e.username}/ban`).then(a,e=>console.error(e))},i.activateUser=e=>{t.post(`/api/admin/users/${e.username}/activate`).then(a,e=>console.error(e))},i.bulkBan=()=>{var e=i.selectedUsers();e.length&&confirm(`Ban ${e.length} users?`)&&e.forEach(e=>i.banUser(e))},i.exportCsv=()=>{var e=new URLSearchParams(Object.entries(i.query).filter(([,e])=>""!==e&&!1!==e&&null!=e));e.set("format","csv"),e.set("limit","10000"),window.open("/api/admin/users?"+e.toString(),"_blank")},i.fetchError=null,a();let l=null;i.$watch("query",()=>{clearTimeout(l),l=setTimeout(a,500);const{page:e,search:t,...n}=i.query;saveFilterPrefs(s,n),r()},!0),r()}]).controller("userAdminController",["$scope","$http","$location","$routeParams",function(i,r,e,n){i.$watch("user.status",()=>{null==i.user&&e.url("/")}),null==i.user&&e.url("/"),i.userInfo,i.repositories=[],i.search="",i.selected={},i.allSelected=!1;const t="admin.user.filterPrefs",s={status:{ready:!0,expired:!0,removed:!0,error:!0,preparing:!0}},o="anonymizeDate",a="desc";var l=loadFilterPrefs(t)||{};function c(e){r.get("/api/admin/users/"+e+"/repos",{}).then(e=>{i.repositories=e.data},e=>{console.error(e)})}function h(e){r.get("/api/admin/users/"+e,{}).then(e=>{i.userInfo=e.data},e=>{console.error(e)})}function u(){r.get("/api/admin/tokens").then(e=>{i.tokens=e.data||[]},e=>{401!==e.status&&403!==e.status&&console.error(e)})}i.filters={status:Object.assign({},s.status,l.filters&&l.filters.status||{})},i.query={sort:l.sort||o,direction:l.direction||a},i.orderBy=("asc"===i.query.direction?"":"-")+i.query.sort,i.sortBy=e=>{i.query.sort===e?i.query.direction="asc"===i.query.direction?"desc":"asc":(i.query.sort=e,i.query.direction="desc"),i.orderBy=("asc"===i.query.direction?"":"-")+i.query.sort},i.sortIcon=e=>i.query.sort===e?"asc"===i.query.direction?"fa-arrow-up":"fa-arrow-down":"",i.$watch("query",()=>{saveFilterPrefs(t,{filters:i.filters,sort:i.query.sort,direction:i.query.direction})},!0),i.$watch("filters",()=>{saveFilterPrefs(t,{filters:i.filters,sort:i.query.sort,direction:i.query.direction})},!0),i.statusCountFor=t=>(i.repositories||[]).filter(e=>e.status===t).length,i.repoFiler=e=>0!=i.filters.status[e.status]&&(0==i.search.trim().length||-1{i.allSelected=!i.allSelected,(i.filteredRepositories||i.repositories).forEach(e=>{i.selected[e.repoId]=i.allSelected})},i.selectedCount=()=>Object.values(i.selected||{}).filter(Boolean).length,i.selectedRepos=()=>i.repositories.filter(e=>i.selected[e.repoId]),i.bulkRefresh=()=>{var e=i.selectedRepos();e.length&&confirm(`Force refresh ${e.length} repositories?`)&&e.forEach(e=>i.updateRepository(e))},i.bulkRemoveCache=()=>{var e=i.selectedRepos();e.length&&confirm(`Purge cache for ${e.length} repositories?`)&&e.forEach(e=>i.removeCache(e))},i.clearSelection=()=>{i.selected={},i.allSelected=!1},i.exportCsv=()=>{var e=i.filteredRepositories||i.repositories,t=["repoId","status","statusMessage","pageView","anonymizeDate","source.fullName","conference","size.storage"].join(","),e=e.map(e=>[e.repoId,e.status,e.statusMessage||"",e.pageView||0,e.anonymizeDate||"",e.source&&e.source.fullName||"",e.conference||"",e.size&&e.size.storage||0].map(e=>{e=String(null==e?"":e);return/[",\n\r]/.test(e)?'"'+e.replace(/"/g,'""')+'"':e}).join(",")),t=new Blob([t+"\n"+e.join("\n")],{type:"text/csv"}),e=document.createElement("a");e.href=URL.createObjectURL(t),e.download=n.username+"-repositories.csv",e.click()},i.showStatusMessage=e=>{var t=e.statusMessage||"(no message)";window.prompt(`Status message for ${e.repoId} (${e.status}):`,t)},i.fetchGithubInfo=e=>{const t=window.open("","_blank");t&&t.document.write("
Loading GitHub info for "+e.repoId+"...
"),r.get("/api/admin/repos/"+e.repoId+"/github").then(e=>{t&&(t.document.open(),t.document.write('
'+JSON.stringify(e.data,null,2).replace(/[<>]/g,e=>"<"===e?"<":">")+"
"),t.document.close())},e=>{e=e&&e.data?JSON.stringify(e.data,null,2):String(e);t&&(t.document.body.innerHTML='
'+e+"
")})},h(n.username),c(n.username),i.banUser=()=>{confirm(`Ban user ${n.username}?`)&&r.post(`/api/admin/users/${n.username}/ban`).then(()=>h(n.username),e=>console.error(e))},i.activateUser=()=>{r.post(`/api/admin/users/${n.username}/activate`).then(()=>h(n.username),e=>console.error(e))},i.promoteUser=()=>{confirm(`Promote ${n.username} to admin?`)&&r.post(`/api/admin/users/${n.username}/promote`).then(()=>h(n.username),e=>console.error(e))},i.demoteUser=()=>{confirm(`Remove admin privileges from ${n.username}?`)&&r.post(`/api/admin/users/${n.username}/demote`).then(()=>h(n.username),e=>console.error(e))},i.tokens=[],i.tokenForm={name:"",plaintext:null},u(),i.createToken=()=>{i.tokenForm.name&&r.post("/api/admin/tokens",{name:i.tokenForm.name}).then(e=>{i.tokenForm.plaintext=e.data.token,i.tokenForm.name="",u()},e=>console.error(e))},i.revokeToken=e=>{confirm(`Revoke token "${e.name}"?`)&&r.delete("/api/admin/tokens/"+e.id).then(()=>u(),e=>console.error(e))},i.removeCache=e=>{confirm("Remove cached files for "+e.repoId+"?")&&r.delete("/api/admin/repos/"+e.repoId).then(()=>c(n.username),e=>console.error(e))},i.removeRepository=e=>{confirm("Remove repository "+e.repoId+"?")&&r.delete("/api/repo/"+e.repoId+"/").then(()=>c(n.username),e=>console.error(e))},i.updateRepository=t=>{const n={title:`Refreshing ${t.repoId}...`,date:new Date,body:`The repository ${t.repoId} is going to be refreshed.`};i.toasts.push(n),r.post(`/api/repo/${t.repoId}/refresh`).then(e=>{"ready"==e.data.status?n.title=t.repoId+" is refreshed.":n.title=`Refreshing of ${t.repoId}.`},e=>{n.title=`Error during the refresh of ${t.repoId}.`,n.body=e.body})},i.getGitHubRepositories=e=>{r.get(`/api/user/${i.userInfo.username}/all_repositories`,{params:{force:"1"}}).then(e=>{i.userInfo.repositories=e.data})};let d=null;i.$watch("query",()=>{clearTimeout(d),d=setTimeout(()=>{c(n.username)},500)},!0)}]).controller("conferencesAdminController",["$scope","$http","$location",function(i,t,e){i.Math=Math,i.$watch("user.status",()=>{null==i.user&&e.url("/")}),null==i.user&&e.url("/"),i.conferences=[],i.total=-1,i.totalPage=0,i.statusCounts=[];const n=e=>{"/"===e.key&&!["INPUT","TEXTAREA","SELECT"].includes(document.activeElement?.tagName)&&(e.preventDefault(),e=document.querySelector('.admin-filter-toolbar input[type="search"]'))&&e.focus()},r=(document.addEventListener("keydown",n),i.$on("$destroy",()=>document.removeEventListener("keydown",n)),i.clearFilter=e=>{"dateRange"===e?(i.query.dateFrom="",i.query.dateTo=""):i.query[e]="",i.query.page=1},i.chips=[],()=>{var e=[];(i.query.dateFrom||i.query.dateTo)&&e.push({key:"dateRange",label:"Date",value:(i.query.dateFrom||"…")+" – "+(i.query.dateTo||"…")}),i.chips=e}),s=(i.statusCountFor=t=>{var e=(i.statusCounts||[]).find(e=>e._id===t);return e?e.count:0},i.toggleSortDirection=()=>{i.query.direction="asc"===i.query.direction?"desc":"asc"},i.sortBy=e=>{i.query.sort===e?i.query.direction="asc"===i.query.direction?"desc":"asc":(i.query.sort=e,i.query.direction="desc"),i.query.page=1},i.sortIcon=e=>i.query.sort===e?"asc"===i.query.direction?"fa-arrow-up":"fa-arrow-down":"","admin.conferences.filterPrefs");var o=loadFilterPrefs(s)||{},o=(i.query=Object.assign({},{page:1,limit:25,sort:"name",direction:"asc",search:"",dateFrom:"",dateTo:"",ready:!1,expired:!1,removed:!1,error:!0,preparing:!0},o,{page:1,search:""}),e.search());o.search&&(i.query.search=o.search);const a="admin.conferences.presets";function l(){i.fetchError=null,t.get("/api/admin/conferences",{params:i.query}).then(e=>{i.total=e.data.total,i.totalPage=Math.ceil(e.data.total/i.query.limit),i.conferences=e.data.results,i.statusCounts=e.data.statusCounts||[]},e=>{i.fetchError=e&&e.data&&e.data.error||"Failed to load conferences",console.error(e)})}i.presets=JSON.parse(localStorage.getItem(a)||"[]"),i.savePreset=()=>{const t=window.prompt("Preset name:");var e;t&&(delete(e=Object.assign({},i.query)).page,i.presets=(i.presets||[]).filter(e=>e.name!==t),i.presets.push({name:t,query:e}),localStorage.setItem(a,JSON.stringify(i.presets)))},i.applyPreset=e=>{Object.assign(i.query,e.query,{page:1})},i.deletePreset=t=>{i.presets=(i.presets||[]).filter(e=>e.name!==t.name),localStorage.setItem(a,JSON.stringify(i.presets))},i.removeConference=e=>{confirm("Remove conference "+e.conferenceID+"?")&&t.delete("/api/admin/conferences/"+e.conferenceID).then(()=>l(),e=>console.error(e))},i.exportCsv=()=>{var e=new URLSearchParams(Object.entries(i.query).filter(([,e])=>""!==e&&!1!==e&&null!=e));e.set("format","csv"),e.set("limit","10000"),window.open("/api/admin/conferences?"+e.toString(),"_blank")},i.fetchError=null,l();let c=null;i.$watch("query",()=>{clearTimeout(c),c=setTimeout(l,500);const{page:e,search:t,...n}=i.query;saveFilterPrefs(s,n),r()},!0),r()}]).controller("queuesAdminController",["$scope","$http","$location","$interval","$timeout",function(R,t,e,n,i){function r(){var e={queue:R.selectedQueue,search:R.query.search};t.get("/api/admin/queues",{params:e}).then(e=>{R.queueList=e.data.queues||[],R.jobs=e.data.jobs||[],R.selectedStats=R.queueList.find(e=>e.key===R.selectedQueue)||R.queueList[0]||null},e=>console.error(e))}function s(){t.get("/api/admin/queues/metrics",{params:{queue:R.selectedQueue,range:R.range}}).then(e=>{R.metricsPoints=e.data.points||[],i(c,0)},e=>console.error(e))}R.$watch("user.status",()=>{null==R.user&&e.url("/")}),null==R.user&&e.url("/"),R.queueList=[],R.jobs=[],R.selectedQueue="download",R.selectedStats=null,R.range="1h",R.allStates=["active","waiting","delayed","failed","completed"],R.stateFilter={active:!0,waiting:!0,delayed:!0,failed:!0,completed:!0},R.query={search:"",autoRefresh:!0},R.filteredJobs=()=>(R.jobs||[]).filter(e=>R.stateFilter[e._state]),R.jobProgressPct=e=>e&&e.progress&&"object"==typeof e.progress&&"number"==typeof e.progress.percent?Math.max(0,Math.min(100,Math.round(e.progress.percent))):"number"==typeof e.progress?Math.max(0,Math.min(100,Math.round(e.progress))):null,R.jobDuration=e=>{return e.processedOn?(e=(e.finishedOn||Date.now())-e.processedOn)<1e3?e+"ms":(e/1e3).toFixed(1)+"s":"-"},R.metricsPoints=[],R.selectQueue=e=>{R.selectedQueue=e,r(),s()},R.setRange=e=>{R.range=e,s()},r(),s();const o=n(()=>{R.query.autoRefresh&&(r(),s())},15e3);function a(e){var t=e&&e.data&&(e.data.message||e.data.error)||"Request failed";R.actionError=t,i(()=>{R.actionError=null},5e3),console.error(e)}R.$on("$destroy",()=>n.cancel(o)),R.refreshNow=function(){r(),s()},R.actionError=null,R.removeJob=e=>{t.delete(`/api/admin/queue/${R.selectedQueue}/`+e.id).then(r,a)},R.retryJob=e=>{t.post(`/api/admin/queue/${R.selectedQueue}/`+e.id).then(r,a)},R.retryFailed=()=>{confirm(`Retry all failed jobs in ${R.selectedQueue}?`)&&t.post(`/api/admin/queue/${R.selectedQueue}/retry-failed`).then(r,e=>console.error(e))},R.drainSelected=()=>{confirm(`Drain the ${R.selectedQueue} queue?`)&&t.post(`/api/admin/queue/${R.selectedQueue}/drain`).then(r,e=>console.error(e))},R.togglePause=()=>{var e=R.selectedStats&&R.selectedStats.paused?"resume":"pause";t.post(`/api/admin/queue/${R.selectedQueue}/`+e).then(r,e=>console.error(e))},R.emptyQueue=()=>{confirm(`Empty the ${R.selectedQueue} queue? This removes ALL jobs.`)&&t.post(`/api/admin/queue/${R.selectedQueue}/empty`).then(r,e=>console.error(e))},R.pauseAll=()=>{confirm("Pause all queues?")&&t.post("/api/admin/queues/pause-all").then(r,e=>console.error(e))};let l=null;function M(e){if(e<=0)return{ticks:[0],niceMax:1};var t=Math.pow(10,Math.floor(Math.log10(e)));let n=t;e/n<2?n=t/2:5{clearTimeout(l),l=setTimeout(r,350)}),R.expanded={},R.toggleJob=e=>{R.expanded[e.id]=!R.expanded[e.id]},R.humanTime=e=>{return e?(e=new Date(e)).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})+" "+e.toLocaleDateString([],{month:"short",day:"numeric"}):""},R.delayCountdown=e=>{var t;return e?(e=Math.max(0,Math.ceil((e-Date.now())/1e3)))<=0?"resuming soon":(t=e%60,"in "+(0<(e=Math.floor(e/60))?e+"m "+t+"s":t+"s")):""};var T=null;function h(){var s,o,a=document.getElementById("q-throughput-chart");a&&!a._tipBound&&(a._tipBound=!0,s=document.getElementById("q-chart-tooltip"),o=document.getElementById("q-chart-crosshair"),a.addEventListener("mousemove",function(e){var t,n,i,r;T&&s&&o&&(t=T,n=a.getBoundingClientRect(),e=e.clientX-n.left,(n=Math.round((e-t.marginLeft)/t.step))<0||n>=t.maxLen?(s.style.display="none",o.style.display="none"):(e=t.pts[n],i=Date.now(),r='
'+((i=Math.round((i-e.ts)/6e4))<=0?"now":i<60?i+"m ago":i<1440?(r=i%60,Math.floor(i/60)+"h"+(r?" "+r+"m":"")+" ago"):Math.round(i/1440)+"d ago")+'
● completed: '+e.completed+'/min
● failed: '+e.failed+"/min
",0● avg time: '+(1e3<=e.avgMs?(e.avgMs/1e3).toFixed(1)+"s":e.avgMs+"ms")+""),s.innerHTML=r,(e=(i=t.toX(n))+10)+(r=s.offsetWidth)>t.totalW&&(e=i-r-10),s.style.display="block",s.style.left=e+"px",s.style.top="8px",o.style.display="block",o.style.left=i+"px"))}),a.addEventListener("mouseleave",function(){s&&(s.style.display="none"),o&&(o.style.display="none")}))}R.$watch("metricsPoints",function(){i(h,50)})}]).controller("errorsAdminController",["$scope","$http","$location","$interval",function(h,i,e,t){h.$watch("user.status",()=>{null==h.user&&e.url("/")}),null==h.user&&e.url("/"),h.entries=[],h.visible=[],h.available=!0,h.cap=1e3,h.total=0,h.pageSize=250,h.expanded={},h.detailTab={},h.copyHint="",h.parsedFilterCount=0,h.stats={last24h:0,prev24h:0,delta:0,severity:{error:0,warn:0,info:0},unique:{error:0,warn:0,info:0},buckets:[],dropped:0},h.query={search:"",bucket:"",sort:"recent",group:"code",autoRefresh:!0},h.relTime=e=>{var t;return e?(t=new Date(e).getTime(),isNaN(t)?e:(t=Math.max(0,Date.now()-t),(t=Math.floor(t/1e3))<5?"just now":t<60?t+"s ago":(t=Math.floor(t/60))<60?t+"m ago":(t=Math.floor(t/60))<24?t+"h ago":(t=Math.floor(t/24))<7?t+"d ago":new Date(e).toLocaleDateString())):""},h.absTime=e=>{var t;return e?(t=new Date(e),isNaN(t.getTime())?e:t.toLocaleString()):""},h.absTimeShort=e=>{var t;return e?(t=new Date(e),isNaN(t.getTime())?e:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})):""};const o=/^[a-zA-Z][a-zA-Z0-9]*(?:_[a-zA-Z0-9]+)+$/;function r(t){var n=(t.raw||[]).find(e=>e&&"object"==typeof e&&!Array.isArray(e));if(n){n.message&&o.test(n.message)?(t.displayMessage=n.message,t.displayContext=t.message):n.code&&o.test(String(n.code))?(t.displayMessage=String(n.code),t.displayContext=t.message):n.name&&"AnonymousError"!==n.name&&"Error"!==n.name?(t.displayMessage=n.name,t.displayContext=n.message||t.message):t.displayMessage=t.message,t._status=n.httpStatus||n.status||null,t._url=n.url||null,t._method=n.method||null,t._repoId=n.repoId||n.detail||null,t._detail=n.detail&&n.detail!==t._repoId?n.detail:null;let e="string"==typeof n.stack?n.stack:null;for(var i=[n.cause,n.err].filter(Boolean),r=0;!e&&r{null!=t&&""!==t&&s.push([e,t])};n("name",t&&t.name),n("code",e.displayMessage||t&&t.message),e._bucket&&n("kind",e._bucket);n("httpStatus",t&&t.httpStatus),t&&t.status&&!t.httpStatus&&n("status",t.status);n("module",e.module);let i=t&&t.detail;if("string"==typeof i){var r=i.trim();if("{"===r[0]||"["===r[0])try{i=JSON.parse(i)}catch{}}if(n("detail",i),n("repoId",t&&t.repoId),n("filePath",t&&t.filePath),n("upstreamStatus",t&&t.upstreamStatus),n("upstreamBody",t&&t.upstreamBody),n("url",e._url),n("err",t&&t.err),n("cause",t&&!t.err&&t.cause),n("ts",e.ts),!s.length)return JSON.stringify(e,null,2);const o=s.reduce((e,t)=>Math.max(e,t[0].length),0),a=["{"];return s.forEach(([e,t],n)=>{e=` ${`"${e}":`.padEnd(o+3," ")} `,n=n0===t?e:r+e).join("\n")}else i="number"==typeof t||"boolean"==typeof t?String(t):JSON.stringify(t);a.push(e+i+n)}),a.push("}"),a.join("\n")}(t,n),t}function u(t,e){for(const a of e.filters){let e;if("code"===a.key)e=t.displayMessage;else if("module"===a.key)e=t.module;else if("status"===a.key)e=t._status;else if("url"===a.key)e=t._url;else if("repo"===a.key)e=t._repoId;else{if("level"!==a.key)continue;e=t.level}if(null==e)return!1;if(n=e,i=a.val,r=a.op,o=s=void 0,s=parseFloat(n),o=parseFloat(i),!("="===r?String(n)===String(i):"!="===r?String(n)!==String(i):">="===r?o<=s:"<="===r?s<=o:">"===r?o=|<=|!=|>|<|=)?([^\s]+)/g;let s=0;for(;i=r.exec(e);)n+=e.slice(s,i.index),s=r.lastIndex,t.push({key:i[1],op:i[2]||"=",val:i[3]});return{filters:t,free:(n+=e.slice(s)).trim().toLowerCase()}}(h.query.search||""),n=(h.parsedFilterCount=t.filters.length,h.query.bucket);let e=h.entries.filter(e=>(!n||e._bucket===n)&&u(e,t));const i=h.query.group;if(i){var r=new Map;for(const l of e){o=l;var s,o="module"===i?o.module:o.displayMessage||o.message||"_";r.has(o)?((s=r.get(o)).count++,s._related.push(l),new Date(l.ts)>new Date(s.ts)&&(s.ts=l.ts,s._url=l._url,s._status=l._status),new Date(l.ts)new Date(e.ts).getTime()>=a).length;e=Array.from(r.values())}else e=e.map((e,t)=>(e._key="row:"+t+":"+e.ts,e._related=[e],e._firstSeen=e.ts,e._lastHourCount=0,e.count=1,e));var o;"count"===h.query.sort?e.sort((e,t)=>t.count-e.count||new Date(t.ts)-new Date(e.ts)):e.sort((e,t)=>new Date(t.ts)-new Date(e.ts)),h.visible=e}function n(n){var e=n?h.entries.length:0,t=n?h.pageSize:Math.max(h.pageSize,h.entries.length||h.pageSize);i.get("/api/admin/errors",{params:{offset:e,limit:t}}).then(e=>{var t=(e.data.entries||[]).map(r);h.entries=n?h.entries.concat(t):t,h.available=!!e.data.available,h.cap=e.data.max||h.cap,h.total=e.data.total||h.entries.length,s()},e=>console.error(e))}function a(){n(),i.get("/api/admin/errors/stats").then(e=>{var e=e.data||{},t=e.prev24h?Math.round((e.last24h-e.prev24h)/e.prev24h*100):0;h.stats={last24h:e.last24h||0,prev24h:e.prev24h||0,delta:t,severity:e.severity||{error:0,warn:0,info:0},unique:e.unique||{error:0,warn:0,info:0},buckets:e.buckets||[],dropped:e.dropped||0}},e=>console.error(e))}function l(e){h.copyHint=e+" copied",setTimeout(()=>{h.copyHint="",h.$apply()},1500)}h.loadMore=()=>n(!0),h.canLoadMore=()=>h.entries.length{var n,i;let r=0;for(const s of h.stats.buckets||[])r=Math.max(r,(s.error||0)+(s.warn||0)+(s.info||0));return r&&(n=(e.error||0)+(e.warn||0)+(e.info||0))?(i=Math.round(n/r*60),e=e[t]||0,Math.round(e/n*i)):0},h.bucketTitle=e=>{return`${new Date(e.hour).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})} · ${e.error||0} err · ${e.warn||0} warn · ${e.info||0} info`},h.toggle=e=>{h.expanded[e._key]=!h.expanded[e._key]},h.setBucket=e=>{h.query.bucket=e},h.refreshNow=a,h.clearAll=()=>{confirm("Clear all captured errors?")&&i.delete("/api/admin/errors").then(a,e=>console.error(e))},h.exportCsv=()=>{var e=["ts","level","module","displayMessage","_status","_url","_repoId"],t=[e.join(",")];for(const r of h.visible)t.push(e.map(e=>{e=null==r[e]?"":String(r[e]);return/[",\n]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}).join(","));var n=new Blob([t.join("\n")],{type:"text/csv;charset=utf-8"}),n=URL.createObjectURL(n),i=document.createElement("a");i.href=n,i.download=`errors-${(new Date).toISOString().slice(0,19)}.csv`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(n)},h.copyJson=e=>{navigator.clipboard.writeText(e._detailJson).then(()=>l("JSON"))},h.copyCurl=e=>{e._url&&(e=`curl -X ${e._method||"GET"} '${window.location.origin}${e._url}'`,navigator.clipboard.writeText(e).then(()=>l("curl")))},a();const c=t(()=>{h.query.autoRefresh&&a()},15e3);h.$on("$destroy",()=>t.cancel(c)),h.$watch("query.search",s),h.$watch("query.bucket",s),h.$watch("query.sort",s),h.$watch("query.group",s)}]).controller("overviewAdminController",["$scope","$http","$location","$interval",function(s,e,t,n){var i,r;function o(){e.get("/api/admin/overview").then(function(e){var r,t;e.data.history=(t=e.data.history,(r=t||[]).map(function(e,t){var n=r[t-1]||{},i=Object.assign({},e);return i.dailyRepositories=t?Math.max(0,(e.nbRepositories||0)-(n.nbRepositories||0)):0,i.dailyUsers=t?Math.max(0,(e.nbUsers||0)-(n.nbUsers||0)):0,i.dailyPageViews=t?Math.max(0,(e.nbPageViews||0)-(n.nbPageViews||0)):0,i})),e.data.daily={today:{repositories:(t=(t=e.data.history)&&t.length?t[t.length-1]:{}).dailyRepositories||0,users:t.dailyUsers||0,pageViews:t.dailyPageViews||0}},s.data=e.data,s.loading=!1,s.error=null,i={},(e.data.history||[]).forEach(function(t){["dailyPageViews","dailyRepositories","dailyUsers","nbUsers"].forEach(function(e){(!i[e]||t[e]>i[e])&&(i[e]=t[e])})})},function(e){s.loading=!1,s.error=e.data&&e.data.error||"Failed to load overview"})}s.Math=Math,s.$watch("user.status",()=>{null==s.user&&t.url("/")}),null==s.user?t.url("/"):(s.data=null,s.loading=!0,s.error=null,s.humanBytes=function(e){if(null==e)return"—";for(var t=["B","KB","MB","GB","TB"],n=0,i=e;1024<=i&&n