svgedit/dist/editor/extensions/ext-mathjax/ext-mathjax.js

11 lines
111 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t,e,n){return t(n={path:e,exports:{},require:function(t,e){return function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==e&&n.path)}},n.exports),n.exports}var check=function(t){return t&&t.Math==Math&&t},e=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof t&&t)||function(){return this}()||Function("return this")(),fails=function(t){try{return!!t()}catch(t){return!0}},n=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o={f:i&&!r.call({1:2},1)?function propertyIsEnumerable(t){var e=i(this,t);return!!e&&e.enumerable}:r},createPropertyDescriptor=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},s={}.toString,classofRaw=function(t){return s.call(t).slice(8,-1)},u="".split,l=fails((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==classofRaw(t)?u.call(t,""):Object(t)}:Object,requireObjectCoercible=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},toIndexedObject=function(t){return l(requireObjectCoercible(t))},isObject=function(t){return"object"==typeof t?null!==t:"function"==typeof t},toPrimitive=function(t,e){if(!isObject(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!isObject(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!isObject(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!isObject(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},h={}.hasOwnProperty,has=function(t,e){return h.call(t,e)},f=e.document,p=isObject(f)&&isObject(f.createElement),documentCreateElement=function(t){return p?f.createElement(t):{}},d=!n&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),m=Object.getOwnPropertyDescriptor,v={f:n?m:function getOwnPropertyDescriptor(t,e){if(t=toIndexedObject(t),e=toPrimitive(e,!0),d)try{return m(t,e)}catch(t){}if(has(t,e))return createPropertyDescriptor(!o.f.call(t,e),t[e])}},anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},x=Object.defineProperty,y={f:n?x:function defineProperty(t,e,n){if(anObject(t),e=toPrimitive(e,!0),anObject(n),d)try{return x(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},S=n?function(t,e,n){return y.f(t,e,createPropertyDescriptor(1,n))}:function(t,e,n){return t[e]=n,t},setGlobal=function(t,n){try{S(e,t,n)}catch(r){e[t]=n}return n},M=e["__core-js_shared__"]||setGlobal("__core-js_shared__",{}),w=Function.toString;"function"!=typeof M.inspectSource&&(M.inspectSource=function(t){return w.call(t)});var E,J,T,P=M.inspectSource,k=e.WeakMap,A="function"==typeof k&&/native code/.test(P(k)),C=createCommonjsModule((function(t){(t.exports=function(t,e){return M[t]||(M[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.7.0",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),j=0,I=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++j+I).toString(36)},O=C("keys"),sharedKey=function(t){return O[t]||(O[t]=uid(t))},R={},L=e.WeakMap;if(A){var D=M.state||(M.state=new L),H=D.get,U=D.has,N=D.set;E=function(t,e){return e.facade=t,N.call(D,t,e),e},J=function(t){return H.call(D,t)||{}},T=function(t){return U.call(D,t)}}else{var B=sharedKey("state");R[B]=!0,E=function(t,e){return e.facade=t,S(t,B,e),e},J=function(t){return has(t,B)?t[B]:{}},T=function(t){return has(t,B)}}var q,G={set:E,get:J,has:T,enforce:function(t){return T(t)?J(t):E(t,{})},getterFor:function(t){return function(e){var n;if(!isObject(e)||(n=J(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}},z=createCommonjsModule((function(t){var n=G.get,r=G.enforce,i=String(String).split("String");(t.exports=function(t,n,o,s){var u,l=!!s&&!!s.unsafe,h=!!s&&!!s.enumerable,f=!!s&&!!s.noTargetGet;"function"==typeof o&&("string"!=typeof n||has(o,"name")||S(o,"name",n),(u=r(o)).source||(u.source=i.join("string"==typeof n?n:""))),t!==e?(l?!f&&t[n]&&(h=!0):delete t[n],h?t[n]=o:S(t,n,o)):h?t[n]=o:setGlobal(n,o)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&n(this).source||P(this)}))})),$=e,aFunction=function(t){return"function"==typeof t?t:void 0},getBuiltIn=function(t,n){return arguments.length<2?aFunction($[t])||aFunction(e[t]):$[t]&&$[t][n]||e[t]&&e[t][n]},V=Math.ceil,K=Math.floor,toInteger=function(t){return isNaN(t=+t)?0:(t>0?K:V)(t)},Q=Math.min,toLength=function(t){return t>0?Q(toInteger(t),9007199254740991):0},W=Math.max,X=Math.min,toAbsoluteIndex=function(t,e){var n=toInteger(t);return n<0?W(n+e,0):X(n,e)},createMethod=function(t){return function(e,n,r){var i,o=toIndexedObject(e),s=toLength(o.length),u=toAbsoluteIndex(r,s);if(t&&n!=n){for(;s>u;)if((i=o[u++])!=i)return!0}else for(;s>u;u++)if((t||u in o)&&o[u]===n)return t||u||0;return!t&&-1}},Y={includes:createMethod(!0),indexOf:createMethod(!1)}.indexOf,objectKeysInternal=function(t,e){var n,r=toIndexedObject(t),i=0,o=[];for(n in r)!has(R,n)&&has(r,n)&&o.push(n);for(;e.length>i;)has(r,n=e[i++])&&(~Y(o,n)||o.push(n));return o},Z=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tt=Z.concat("length","prototype"),et={f:Object.getOwnPropertyNames||function getOwnPropertyNames(t){return objectKeysInternal(t,tt)}},nt={f:Object.getOwnPropertySymbols},rt=getBuiltIn("Reflect","ownKeys")||function ownKeys(t){var e=et.f(anObject(t)),n=nt.f;return n?e.concat(n(t)):e},copyConstructorProperties=function(t,e){for(var n=rt(e),r=y.f,i=v.f,o=0;o<n.length;o++){var s=n[o];has(t,s)||r(t,s,i(e,s))}},it=/#|\.prototype\./,isForced=function(t,e){var n=at[ot(t)];return n==ut||n!=st&&("function"==typeof e?fails(e):!!e)},ot=isForced.normalize=function(t){return String(t).replace(it,".").toLowerCase()},at=isForced.data={},st=isForced.NATIVE="N",ut=isForced.POLYFILL="P",ct=isForced,lt=v.f,_export=function(t,n){var r,i,o,s,u,l=t.target,h=t.global,f=t.stat;if(r=h?e:f?e[l]||setGlobal(l,{}):(e[l]||{}).prototype)for(i in n){if(s=n[i],o=t.noTargetGet?(u=lt(r,i))&&u.value:r[i],!ct(h?i:l+(f?".":"#")+i,t.forced)&&void 0!==o){if(typeof s==typeof o)continue;copyConstructorProperties(s,o)}(t.sham||o&&o.sham)&&S(s,"sham",!0),z(r,i,s,t)}},aFunction$1=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},functionBindContext=function(t,e,n){if(aFunction$1(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}},toObject=function(t){return Object(requireObjectCoercible(t))},ht=Array.isArray||function isArray(t){return"Array"==classofRaw(t)},ft=!!Object.getOwnPropertySymbols&&!fails((function(){return!String(Symbol())})),pt=ft&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,dt=C("wks"),gt=e.Symbol,mt=pt?gt:gt&&gt.withoutSetter||uid,wellKnownSymbol=function(t){return has(dt,t)||(ft&&has(gt,t)?dt[t]=gt[t]:dt[t]=mt("Symbol."+t)),dt[t]},vt=wellKnownSymbol("species"),arraySpeciesCreate=function(t,e){var n;return ht(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!ht(n.prototype)?isObject(n)&&null===(n=n[vt])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},xt=[].push,createMethod$1=function(t){var e=1==t,n=2==t,r=3==t,i=4==t,o=6==t,s=5==t||o;return function(u,h,f,p){for(var d,m,v=toObject(u),x=l(v),y=functionBindContext(h,f,3),S=toLength(x.length),M=0,w=p||arraySpeciesCreate,E=e?w(u,S):n?w(u,0):void 0;S>M;M++)if((s||M in x)&&(m=y(d=x[M],M,v),t))if(e)E[M]=m;else if(m)switch(t){case 3:return!0;case 5:return d;case 6:return M;case 2:xt.call(E,d)}else if(i)return!1;return o?-1:r||i?i:E}},yt={forEach:createMethod$1(0),map:createMethod$1(1),filter:createMethod$1(2),some:createMethod$1(3),every:createMethod$1(4),find:createMethod$1(5),findIndex:createMethod$1(6)},bt=Object.keys||function keys(t){return objectKeysInternal(t,Z)},St=n?Object.defineProperties:function defineProperties(t,e){anObject(t);for(var n,r=bt(e),i=r.length,o=0;i>o;)y.f(t,n=r[o++],e[n]);return t},Mt=getBuiltIn("document","documentElement"),wt=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"<\/script>"},NullProtoObject=function(){try{q=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;NullProtoObject=q?function(t){t.write(scriptTag("")),t.close();var e=t.parentWindow.Object;return t=null,e}(q):((e=documentCreateElement("iframe")).style.display="none",Mt.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F);for(var n=Z.length;n--;)delete NullProtoObject.prototype[Z[n]];return NullProtoObject()};R[wt]=!0;var Et=Object.create||function create(t,e){var n;return null!==t?(EmptyConstructor.prototype=anObject(t),n=new EmptyConstructor,EmptyConstructor.prototype=null,n[wt]=t):n=NullProtoObject(),void 0===e?n:St(n,e)},Jt=wellKnownSymbol("unscopables"),Tt=Array.prototype;null==Tt[Jt]&&y.f(Tt,Jt,{configurable:!0,value:Et(null)});var addToUnscopables=function(t){Tt[Jt][t]=!0},Pt=Object.defineProperty,kt={},thrower=function(t){throw t},arrayMethodUsesToLength=function(t,e){if(has(kt,t))return kt[t];e||(e={});var r=[][t],i=!!has(e,"ACCESSORS")&&e.ACCESSORS,o=has(e,0)?e[0]:thrower,s=has(e,1)?e[1]:void 0;return kt[t]=!!r&&!fails((function(){if(i&&!n)return!0;var t={length:-1};i?Pt(t,1,{enumerable:!0,get:thrower}):t[1]=1,r.call(t,o,s)}))},At=yt.find,Ct=!0,jt=arrayMethodUsesToLength("find");"find"in[]&&Array(1).find((function(){Ct=!1})),_export({target:"Array",proto:!0,forced:Ct||!jt},{find:function find(t){return At(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("find");var It,Ot,_t=getBuiltIn("navigator","userAgent")||"",Rt=e.process,Lt=Rt&&Rt.versions,Dt=Lt&&Lt.v8;Dt?Ot=(It=Dt.split("."))[0]+It[1]:_t&&(!(It=_t.match(/Edge\/(\d+)/))||It[1]>=74)&&(It=_t.match(/Chrome\/(\d+)/))&&(Ot=It[1]);var Ht=Ot&&+Ot,Ft=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(t){return Ht>=51||!fails((function(){var e=[];return(e.constructor={})[Ft]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Ut=yt.map,Nt=arrayMethodHasSpeciesSupport("map"),Bt=arrayMethodUsesToLength("map");_export({target:"Array",proto:!0,forced:!Nt||!Bt},{map:function map(t){return Ut(this,t,arguments.length>1?arguments[1]:void 0)}});var createProperty=function(t,e,n){var r=toPrimitive(e);r in t?y.f(t,r,createPropertyDescriptor(0,n)):t[r]=n},qt=arrayMethodHasSpeciesSupport("slice"),Gt=arrayMethodUsesToLength("slice",{ACCESSORS:!0,0:0,1:2}),zt=wellKnownSymbol("species"),$t=[].slice,Vt=Math.max;_export({target:"Array",proto:!0,forced:!qt||!Gt},{slice:function slice(t,e){var n,r,i,o=toIndexedObject(this),s=toLength(o.length),u=toAbsoluteIndex(t,s),l=toAbsoluteIndex(void 0===e?s:e,s);if(ht(o)&&("function"!=typeof(n=o.constructor)||n!==Array&&!ht(n.prototype)?isObject(n)&&null===(n=n[zt])&&(n=void 0):n=void 0,n===Array||void 0===n))return $t.call(o,u,l);for(r=new(void 0===n?Array:n)(Vt(l-u,0)),i=0;u<l;u++,i++)u in o&&createProperty(r,i,o[u]);return r.length=i,r}});var Kt=y.f,Qt=Function.prototype,Wt=Qt.toString,Xt=/^\s*function ([^ (]*)/;n&&!("name"in Qt)&&Kt(Qt,"name",{configurable:!0,get:function(){try{return Wt.call(this).match(Xt)[1]}catch(t){return""}}});var Yt=Object.assign,Zt=Object.defineProperty,te=!Yt||fails((function(){if(n&&1!==Yt({b:1},Yt(Zt({},"a",{enumerable:!0,get:function(){Zt(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach((function(t){e[t]=t})),7!=Yt({},t)[r]||bt(Yt({},e)).join("")!=i}))?function assign(t,e){for(var r=toObject(t),i=arguments.length,s=1,u=nt.f,h=o.f;i>s;)for(var f,p=l(arguments[s++]),d=u?bt(p).concat(u(p)):bt(p),m=d.length,v=0;m>v;)f=d[v++],n&&!h.call(p,f)||(r[f]=p[f]);return r}:Yt;_export({target:"Object",stat:!0,forced:Object.assign!==te},{assign:te});var ee={};ee[wellKnownSymbol("toStringTag")]="z";var ne="[object z]"===String(ee),re=wellKnownSymbol("toStringTag"),ie="Arguments"==classofRaw(function(){return arguments}()),oe=ne?classofRaw:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),re))?n:ie?classofRaw(e):"Object"==(r=classofRaw(e))&&"function"==typeof e.callee?"Arguments":r},ae=ne?{}.toString:function toString(){return"[object "+oe(this)+"]"};ne||z(Object.prototype,"toString",ae,{unsafe:!0});var se=e.Promise,ue=y.f,ce=wellKnownSymbol("toStringTag"),setToStringTag=function(t,e,n){t&&!has(t=n?t:t.prototype,ce)&&ue(t,ce,{configurable:!0,value:e})},le=wellKnownSymbol("species"),setSpecies=function(t){var e=getBuiltIn(t),r=y.f;n&&e&&!e[le]&&r(e,le,{configurable:!0,get:function(){return this}})},he={},fe=wellKnownSymbol("iterator"),pe=Array.prototype,de=wellKnownSymbol("iterator"),iteratorClose=function(t){var e=t.return;if(void 0!==e)return anObject(e.call(t)).value},Result=function(t,e){this.stopped=t,this.result=e},iterate=function(t,e,n){var r,i,o,s,u,l,h,f,p=n&&n.that,d=!(!n||!n.AS_ENTRIES),m=!(!n||!n.IS_ITERATOR),v=!(!n||!n.INTERRUPTED),x=functionBindContext(e,p,1+d+v),stop=function(t){return r&&iteratorClose(r),new Result(!0,t)},callFn=function(t){return d?(anObject(t),v?x(t[0],t[1],stop):x(t[0],t[1])):v?x(t,stop):x(t)};if(m)r=t;else{if("function"!=typeof(i=function(t){if(null!=t)return t[de]||t["@@iterator"]||he[oe(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(f=i)&&(he.Array===f||pe[fe]===f)){for(o=0,s=toLength(t.length);s>o;o++)if((u=callFn(t[o]))&&u instanceof Result)return u;return new Result(!1)}r=i.call(t)}for(l=r.next;!(h=l.call(r)).done;){try{u=callFn(h.value)}catch(t){throw iteratorClose(r),t}if("object"==typeof u&&u&&u instanceof Result)return u}return new Result(!1)},ge=wellKnownSymbol("iterator"),me=!1;try{var ve=0,xe={next:function(){return{done:!!ve++}},return:function(){me=!0}};xe[ge]=function(){return this},Array.from(xe,(function(){throw 2}))}catch(t){}var ye,be,Se,Me=wellKnownSymbol("species"),speciesConstructor=function(t,e){var n,r=anObject(t).constructor;return void 0===r||null==(n=anObject(r)[Me])?e:aFunction$1(n)},we=/(iphone|ipod|ipad).*applewebkit/i.test(_t),Ee="process"==classofRaw(e.process),Je=e.location,Te=e.setImmediate,Pe=e.clearImmediate,ke=e.process,Ae=e.MessageChannel,Ce=e.Dispatch,je=0,Ie={},run=function(t){if(Ie.hasOwnProperty(t)){var e=Ie[t];delete Ie[t],e()}},runner=function(t){return function(){run(t)}},listener=function(t){run(t.data)},post=function(t){e.postMessage(t+"",Je.protocol+"//"+Je.host)};Te&&Pe||(Te=function setImmediate(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Ie[++je]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},ye(je),je},Pe=function clearImmediate(t){delete Ie[t]},Ee?ye=function(t){ke.nextTick(runner(t))}:Ce&&Ce.now?ye=function(t){Ce.now(runner(t))}:Ae&&!we?(Se=(be=new Ae).port2,be.port1.onmessage=listener,ye=functionBindContext(Se.postMessage,Se,1)):e.addEventListener&&"function"==typeof postMessage&&!e.importScripts&&Je&&"file:"!==Je.protocol&&!fails(post)?(ye=post,e.addEventListener("message",listener,!1)):ye="onreadystatechange"in documentCreateElement("script")?function(t){Mt.appendChild(documentCreateElement("script")).onreadystatechange=function(){Mt.removeChild(this),run(t)}}:function(t){setTimeout(runner(t),0)});var Oe,_e,Re,Le,De,He,Fe,Ue,Ne={set:Te,clear:Pe},Be=v.f,qe=Ne.set,Ge=e.MutationObserver||e.WebKitMutationObserver,ze=e.document,$e=e.process,Ve=e.Promise,Ke=Be(e,"queueMicrotask"),Qe=Ke&&Ke.value;Qe||(Oe=function(){var t,e;for(Ee&&(t=$e.domain)&&t.exit();_e;){e=_e.fn,_e=_e.next;try{e()}catch(t){throw _e?Le():Re=void 0,t}}Re=void 0,t&&t.enter()},!we&&!Ee&&Ge&&ze?(De=!0,He=ze.createTextNode(""),new Ge(Oe).observe(He,{characterData:!0}),Le=function(){He.data=De=!De}):Ve&&Ve.resolve?(Fe=Ve.resolve(void 0),Ue=Fe.then,Le=function(){Ue.call(Fe,Oe)}):Le=Ee?function(){$e.nextTick(Oe)}:function(){qe.call(e,Oe)});var We,Xe,Ye,Ze,tn=Qe||function(t){var e={fn:t,next:void 0};Re&&(Re.next=e),_e||(_e=e,Le()),Re=e},PromiseCapability=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=aFunction$1(e),this.reject=aFunction$1(n)},en={f:function(t){return new PromiseCapability(t)}},promiseResolve=function(t,e){if(anObject(t),isObject(e)&&e.constructor===t)return e;var n=en.f(t);return(0,n.resolve)(e),n.promise},perform=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},nn=Ne.set,rn=wellKnownSymbol("species"),on="Promise",an=G.get,sn=G.set,un=G.getterFor(on),cn=se,ln=e.TypeError,hn=e.document,fn=e.process,pn=getBuiltIn("fetch"),dn=en.f,gn=dn,mn=!!(hn&&hn.createEvent&&e.dispatchEvent),vn="function"==typeof PromiseRejectionEvent,xn=ct(on,(function(){if(!(P(cn)!==String(cn))){if(66===Ht)return!0;if(!Ee&&!vn)return!0}if(Ht>=51&&/native code/.test(cn))return!1;var t=cn.resolve(1),FakePromise=function(t){t((function(){}),(function(){}))};return(t.constructor={})[rn]=FakePromise,!(t.then((function(){}))instanceof FakePromise)})),yn=xn||!function(t,e){if(!e&&!me)return!1;var n=!1;try{var r={};r[ge]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){cn.all(t).catch((function(){}))})),isThenable=function(t){var e;return!(!isObject(t)||"function"!=typeof(e=t.then))&&e},notify$1=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;tn((function(){for(var r=t.value,i=1==t.state,o=0;n.length>o;){var s,u,l,h=n[o++],f=i?h.ok:h.fail,p=h.resolve,d=h.reject,m=h.domain;try{f?(i||(2===t.rejection&&onHandleUnhandled(t),t.rejection=1),!0===f?s=r:(m&&m.enter(),s=f(r),m&&(m.exit(),l=!0)),s===h.promise?d(ln("Promise-chain cycle")):(u=isThenable(s))?u.call(s,p,d):p(s)):d(r)}catch(t){m&&!l&&m.exit(),d(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&onUnhandled(t)}))}},dispatchEvent=function(t,n,r){var i,o;mn?((i=hn.createEvent("Event")).promise=n,i.reason=r,i.initEvent(t,!1,!0),e.dispatchEvent(i)):i={promise:n,reason:r},!vn&&(o=e["on"+t])?o(i):"unhandledrejection"===t&&function(t,n){var r=e.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,n))}("Unhandled promise rejection",r)},onUnhandled=function(t){nn.call(e,(function(){var e,n=t.facade,r=t.value;if(isUnhandled(t)&&(e=perform((function(){Ee?fn.emit("unhandledRejection",r,n):dispatchEvent("unhandledrejection",n,r)})),t.rejection=Ee||isUnhandled(t)?2:1,e.error))throw e.value}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t){nn.call(e,(function(){var e=t.facade;Ee?fn.emit("rejectionHandled",e):dispatchEvent("rejectionhandled",e,t.value)}))},bind=function(t,e,n){return function(r){t(e,r,n)}},internalReject=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,notify$1(t,!0))},internalResolve=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw ln("Promise can't be resolved itself");var r=isThenable(e);r?tn((function(){var n={done:!1};try{r.call(e,bind(internalResolve,n,t),bind(internalReject,n,t))}catch(e){internalReject(n,e,t)}})):(t.value=e,t.state=1,notify$1(t,!1))}catch(e){internalReject({done:!1},e,t)}}};xn&&(cn=function Promise(t){!function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,cn,on),aFunction$1(t),We.call(this);var e=an(this);try{t(bind(internalResolve,e),bind(internalReject,e))}catch(t){internalReject(e,t)}},(We=function Promise(t){sn(this,{type:on,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,e,n){for(var r in e)z(t,r,e[r],n);return t}(cn.prototype,{then:function then(t,e){var n=un(this),r=dn(speciesConstructor(this,cn));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=Ee?fn.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&notify$1(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),Xe=function(){var t=new We,e=an(t);this.promise=t,this.resolve=bind(internalResolve,e),this.reject=bind(internalReject,e)},en.f=dn=function(t){return t===cn||t===Ye?new Xe(t):gn(t)},"function"==typeof se&&(Ze=se.prototype.then,z(se.prototype,"then",(function then(t,e){var n=this;return new cn((function(t,e){Ze.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof pn&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){return promiseResolve(cn,pn.apply(e,arguments))}}))),_export({global:!0,wrap:!0,forced:xn},{Promise:cn}),setToStringTag(cn,on,!1),setSpecies(on),Ye=getBuiltIn(on),_export({target:on,stat:!0,forced:xn},{reject:function reject(t){var e=dn(this);return e.reject.call(void 0,t),e.promise}}),_export({target:on,stat:!0,forced:xn},{resolve:function resolve(t){return promiseResolve(this,t)}}),_export({target:on,stat:!0,forced:yn},{all:function all(t){var e=this,n=dn(e),r=n.resolve,i=n.reject,o=perform((function(){var n=aFunction$1(e.resolve),o=[],s=0,u=1;iterate(t,(function(t){var l=s++,h=!1;o.push(void 0),u++,n.call(e,t).then((function(t){h||(h=!0,o[l]=t,--u||r(o))}),i)})),--u||r(o)}));return o.error&&i(o.value),n.promise},race:function race(t){var e=this,n=dn(e),r=n.reject,i=perform((function(){var i=aFunction$1(e.resolve);iterate(t,(function(t){i.call(e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});var bn=et.f,Sn={}.toString,Mn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],wn={f:function getOwnPropertyNames(t){return Mn&&"[object Window]"==Sn.call(t)?function(t){try{return bn(t)}catch(t){return Mn.slice()}}(t):bn(toIndexedObject(t))}},En={f:wellKnownSymbol},Jn=y.f,defineWellKnownSymbol=function(t){var e=$.Symbol||($.Symbol={});has(e,t)||Jn(e,t,{value:En.f(t)})},Tn=yt.forEach,Pn=sharedKey("hidden"),kn=wellKnownSymbol("toPrimitive"),An=G.set,Cn=G.getterFor("Symbol"),jn=Object.prototype,In=e.Symbol,On=getBuiltIn("JSON","stringify"),_n=v.f,Rn=y.f,Ln=wn.f,Dn=o.f,Hn=C("symbols"),Fn=C("op-symbols"),Un=C("string-to-symbol-registry"),Nn=C("symbol-to-string-registry"),Bn=C("wks"),qn=e.QObject,Gn=!qn||!qn.prototype||!qn.prototype.findChild,zn=n&&fails((function(){return 7!=Et(Rn({},"a",{get:function(){return Rn(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=_n(jn,e);r&&delete jn[e],Rn(t,e,n),r&&t!==jn&&Rn(jn,e,r)}:Rn,wrap=function(t,e){var r=Hn[t]=Et(In.prototype);return An(r,{type:"Symbol",tag:t,description:e}),n||(r.description=e),r},$n=pt?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof In},Vn=function defineProperty(t,e,n){t===jn&&Vn(Fn,e,n),anObject(t);var r=toPrimitive(e,!0);return anObject(n),has(Hn,r)?(n.enumerable?(has(t,Pn)&&t[Pn][r]&&(t[Pn][r]=!1),n=Et(n,{enumerable:createPropertyDescriptor(0,!1)})):(has(t,Pn)||Rn(t,Pn,createPropertyDescriptor(1,{})),t[Pn][r]=!0),zn(t,r,n)):Rn(t,r,n)},Kn=function defineProperties(t,e){anObject(t);var r=toIndexedObject(e),i=bt(r).concat(Yn(r));return Tn(i,(function(e){n&&!Qn.call(r,e)||Vn(t,e,r[e])})),t},Qn=function propertyIsEnumerable(t){var e=toPrimitive(t,!0),n=Dn.call(this,e);return!(this===jn&&has(Hn,e)&&!has(Fn,e))&&(!(n||!has(this,e)||!has(Hn,e)||has(this,Pn)&&this[Pn][e])||n)},Wn=function getOwnPropertyDescriptor(t,e){var n=toIndexedObject(t),r=toPrimitive(e,!0);if(n!==jn||!has(Hn,r)||has(Fn,r)){var i=_n(n,r);return!i||!has(Hn,r)||has(n,Pn)&&n[Pn][r]||(i.enumerable=!0),i}},Xn=function getOwnPropertyNames(t){var e=Ln(toIndexedObject(t)),n=[];return Tn(e,(function(t){has(Hn,t)||has(R,t)||n.push(t)})),n},Yn=function getOwnPropertySymbols(t){var e=t===jn,n=Ln(e?Fn:toIndexedObject(t)),r=[];return Tn(n,(function(t){!has(Hn,t)||e&&!has(jn,t)||r.push(Hn[t])})),r};if(ft||(z((In=function Symbol(){if(this instanceof In)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=uid(t),setter=function(t){this===jn&&setter.call(Fn,t),has(this,Pn)&&has(this[Pn],e)&&(this[Pn][e]=!1),zn(this,e,createPropertyDescriptor(1,t))};return n&&Gn&&zn(jn,e,{configurable:!0,set:setter}),wrap(e,t)}).prototype,"toString",(function toString(){return Cn(this).tag})),z(In,"withoutSetter",(function(t){return wrap(uid(t),t)})),o.f=Qn,y.f=Vn,v.f=Wn,et.f=wn.f=Xn,nt.f=Yn,En.f=function(t){return wrap(wellKnownSymbol(t),t)},n&&(Rn(In.prototype,"description",{configurable:!0,get:function description(){return Cn(this).description}}),z(jn,"propertyIsEnumerable",Qn,{unsafe:!0}))),_export({global:!0,wrap:!0,forced:!ft,sham:!ft},{Symbol:In}),Tn(bt(Bn),(function(t){defineWellKnownSymbol(t)})),_export({target:"Symbol",stat:!0,forced:!ft},{for:function(t){var e=String(t);if(has(Un,e))return Un[e];var n=In(e);return Un[e]=n,Nn[n]=e,n},keyFor:function keyFor(t){if(!$n(t))throw TypeError(t+" is not a symbol");if(has(Nn,t))return Nn[t]},useSetter:function(){Gn=!0},useSimple:function(){Gn=!1}}),_export({target:"Object",stat:!0,forced:!ft,sham:!n},{create:function create(t,e){return void 0===e?Et(t):Kn(Et(t),e)},defineProperty:Vn,defineProperties:Kn,getOwnPropertyDescriptor:Wn}),_export({target:"Object",stat:!0,forced:!ft},{getOwnPropertyNames:Xn,getOwnPropertySymbols:Yn}),_export({target:"Object",stat:!0,forced:fails((function(){nt.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){return nt.f(toObject(t))}}),On){var Zn=!ft||fails((function(){var t=In();return"[null]"!=On([t])||"{}"!=On({a:t})||"{}"!=On(Object(t))}));_export({target:"JSON",stat:!0,forced:Zn},{stringify:function stringify(t,e,n){for(var r,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=e,(isObject(e)||void 0!==t)&&!$n(t))return ht(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!$n(e))return e}),i[1]=e,On.apply(null,i)}})}In.prototype[kn]||S(In.prototype,kn,In.prototype.valueOf),setToStringTag(In,"Symbol"),R[Pn]=!0;var tr=y.f,er=e.Symbol;if(n&&"function"==typeof er&&(!("description"in er.prototype)||void 0!==er().description)){var nr={},rr=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof rr?new er(t):void 0===t?er():er(t);return""===t&&(nr[e]=!0),e};copyConstructorProperties(rr,er);var ir=rr.prototype=er.prototype;ir.constructor=rr;var or=ir.toString,ar="Symbol(test)"==String(er("test")),sr=/^Symbol\((.*)\)[^)]+$/;tr(ir,"description",{configurable:!0,get:function description(){var t=isObject(this)?this.valueOf():this,e=or.call(t);if(has(nr,t))return"";var n=ar?e.slice(7,-1):e.replace(sr,"$1");return""===n?void 0:n}}),_export({global:!0,forced:!0},{Symbol:rr})}defineWellKnownSymbol("asyncIterator"),defineWellKnownSymbol("iterator"),defineWellKnownSymbol("toStringTag");var arrayMethodIsStrict=function(t,e){var n=[][t];return!!n&&fails((function(){n.call(null,e||function(){throw 1},1)}))},ur=yt.forEach,cr=arrayMethodIsStrict("forEach"),lr=arrayMethodUsesToLength("forEach"),hr=cr&&lr?[].forEach:function forEach(t){return ur(this,t,arguments.length>1?arguments[1]:void 0)};_export({target:"Array",proto:!0,forced:[].forEach!=hr},{forEach:hr});var fr,pr,dr,gr=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),mr=sharedKey("IE_PROTO"),vr=Object.prototype,xr=gr?Object.getPrototypeOf:function(t){return t=toObject(t),has(t,mr)?t[mr]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?vr:null},yr=wellKnownSymbol("iterator"),br=!1;[].keys&&("next"in(dr=[].keys())?(pr=xr(xr(dr)))!==Object.prototype&&(fr=pr):br=!0),null==fr&&(fr={}),has(fr,yr)||S(fr,yr,(function(){return this}));var Sr={IteratorPrototype:fr,BUGGY_SAFARI_ITERATORS:br},Mr=Sr.IteratorPrototype,returnThis$1=function(){return this},wr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function setPrototypeOf(n,r){return anObject(n),function(t){if(!isObject(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(r),e?t.call(n,r):n.__proto__=r,n}}():void 0),Er=Sr.IteratorPrototype,Jr=Sr.BUGGY_SAFARI_ITERATORS,Tr=wellKnownSymbol("iterator"),returnThis$2=function(){return this},defineIterator=function(t,e,n,r,i,o,s){!function(t,e,n){var r=e+" Iterator";t.prototype=Et(Mr,{next:createPropertyDescriptor(1,n)}),setToStringTag(t,r,!1),he[r]=returnThis$1}(n,e,r);var u,l,h,getIterationMethod=function(t){if(t===i&&v)return v;if(!Jr&&t in d)return d[t];switch(t){case"keys":return function keys(){return new n(this,t)};case"values":return function values(){return new n(this,t)};case"entries":return function entries(){return new n(this,t)}}return function(){return new n(this)}},f=e+" Iterator",p=!1,d=t.prototype,m=d[Tr]||d["@@iterator"]||i&&d[i],v=!Jr&&m||getIterationMethod(i),x="Array"==e&&d.entries||m;if(x&&(u=xr(x.call(new t)),Er!==Object.prototype&&u.next&&(xr(u)!==Er&&(wr?wr(u,Er):"function"!=typeof u[Tr]&&S(u,Tr,returnThis$2)),setToStringTag(u,f,!0))),"values"==i&&m&&"values"!==m.name&&(p=!0,v=function values(){return m.call(this)}),d[Tr]!==v&&S(d,Tr,v),he[e]=v,i)if(l={values:getIterationMethod("values"),keys:o?v:getIterationMethod("keys"),entries:getIterationMethod("entries")},s)for(h in l)(Jr||p||!(h in d))&&z(d,h,l[h]);else _export({target:e,proto:!0,forced:Jr||p},l);return l},Pr=G.set,kr=G.getterFor("Array Iterator"),Ar=defineIterator(Array,"Array",(function(t,e){Pr(this,{type:"Array Iterator",target:toIndexedObject(t),index:0,kind:e})}),(function(){var t=kr(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");he.Arguments=he.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var Cr=[].reverse,jr=[1,2];_export({target:"Array",proto:!0,forced:String(jr)===String(jr.reverse())},{reverse:function reverse(){return ht(this)&&(this.length=this.length),Cr.call(this)}});var Ir=Date.prototype,Or=Ir.toString,_r=Ir.getTime;new Date(NaN)+""!="Invalid Date"&&z(Ir,"toString",(function toString(){var t=_r.call(this);return t==t?Or.call(this):"Invalid Date"})),setToStringTag(e.JSON,"JSON",!0),setToStringTag(Math,"Math",!0),_export({target:"Object",stat:!0,sham:!n},{create:Et}),_export({target:"Object",stat:!0,forced:!n,sham:!n},{defineProperty:y.f});var Rr=fails((function(){xr(1)}));_export({target:"Object",stat:!0,forced:Rr,sham:!gr},{getPrototypeOf:function getPrototypeOf(t){return xr(toObject(t))}}),_export({target:"Object",stat:!0},{setPrototypeOf:wr});var regexpFlags=function(){var t=anObject(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Lr=RegExp.prototype,Dr=Lr.toString,Hr=fails((function(){return"/a/b"!=Dr.call({source:"a",flags:"b"})})),Fr="toString"!=Dr.name;(Hr||Fr)&&z(RegExp.prototype,"toString",(function toString(){var t=anObject(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in Lr)?regexpFlags.call(t):n)}),{unsafe:!0});var createMethod$2=function(t){return function(e,n){var r,i,o=String(requireObjectCoercible(e)),s=toInteger(n),u=o.length;return s<0||s>=u?t?"":void 0:(r=o.charCodeAt(s))<55296||r>56319||s+1===u||(i=o.charCodeAt(s+1))<56320||i>57343?t?o.charAt(s):r:t?o.slice(s,s+2):i-56320+(r-55296<<10)+65536}},Ur={codeAt:createMethod$2(!1),charAt:createMethod$2(!0)},Nr=Ur.charAt,Br=G.set,qr=G.getterFor("String Iterator");defineIterator(String,"String",(function(t){Br(this,{type:"String Iterator",string:String(t),index:0})}),(function next(){var t,e=qr(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=Nr(n,r),e.index+=t.length,{value:t,done:!1})}));var Gr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var zr in Gr){var $r=e[zr],Vr=$r&&$r.prototype;if(Vr&&Vr.forEach!==hr)try{S(Vr,"forEach",hr)}catch(t){Vr.forEach=hr}}var Kr=wellKnownSymbol("iterator"),Qr=wellKnownSymbol("toStringTag"),Wr=Ar.values;for(var Xr in Gr){var Yr=e[Xr],Zr=Yr&&Yr.prototype;if(Zr){if(Zr[Kr]!==Wr)try{S(Zr,Kr,Wr)}catch(t){Zr[Kr]=Wr}if(Zr[Qr]||S(Zr,Qr,Xr),Gr[Xr])for(var ti in Ar)if(Zr[ti]!==Ar[ti])try{S(Zr,ti,Ar[ti])}catch(t){Zr[ti]=Ar[ti]}}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function asyncGeneratorStep(t,e,n,r,i,o,s){try{var u=t[o](s),l=u.value}catch(t){return void n(t)}u.done?e(l):Promise.resolve(l).then(r,i)}function _asyncToGenerator(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function _next(t){asyncGeneratorStep(o,r,i,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(o,r,i,_next,_throw,"throw",t)}_next(void 0)}))}}createCommonjsModule((function(t){var e=function(t){var e,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,n){return t[e]=n}}function wrap(t,e,n,r){var i=e&&e.prototype instanceof Generator?e:Generator,o=Object.create(i.prototype),s=new Context(r||[]);return o._invoke=function makeInvokeMethod(t,e,n){var r=l;return function invoke(i,o){if(r===f)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return doneResult()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var u=maybeInvokeDelegate(s,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var m=tryCatch(t,e,n);if("normal"===m.type){if(r=n.done?p:h,m.arg===d)continue;return{value:m.arg,done:n.done}}"throw"===m.type&&(r=p,n.method="throw",n.arg=m.arg)}}}(t,n,s),o}function tryCatch(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=wrap;var l="suspendedStart",h="suspendedYield",f="executing",p="completed",d={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var m={};m[o]=function(){return this};var v=Object.getPrototypeOf,x=v&&v(v(values([])));x&&x!==n&&r.call(x,o)&&(m=x);var y=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(m);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){var n;this._invoke=function enqueue(i,o){function callInvokeWithMethodAndArg(){return new e((function(n,s){!function invoke(n,i,o,s){var u=tryCatch(t[n],t,i);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"===_typeof(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,o,s)}),(function(t){invoke("throw",t,o,s)})):e.resolve(h).then((function(t){l.value=t,o(l)}),(function(t){return invoke("throw",t,o,s)}))}s(u.arg)}(i,o,n,s)}))}return n=n?n.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}function maybeInvokeDelegate(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,maybeInvokeDelegate(t,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=tryCatch(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function next(){for(;++i<t.length;)if(r.call(t,i))return next.value=t[i],next.done=!1,next;return next.value=e,next.done=!0,next};return s.next=s}}return{next:doneResult}}function doneResult(){return{value:e,done:!0}}return GeneratorFunction.prototype=y.constructor=GeneratorFunctionPrototype,GeneratorFunctionPrototype.constructor=GeneratorFunction,GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},defineIteratorMethods(AsyncIterator.prototype),AsyncIterator.prototype[s]=function(){return this},t.AsyncIterator=AsyncIterator,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var s=new AsyncIterator(wrap(e,n,r,i),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},defineIteratorMethods(y),define(y,u,"Generator"),y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function next(){for(;e.length;){var n=e.pop();if(n in t)return next.value=n,next.done=!1,next}return next.done=!0,next}},t.values=values,Context.prototype={constructor:Context,reset:function reset(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(resetTryEntry),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var n=this;function handle(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return handle("end");if(o.tryLoc<=this.prev){var u=r.call(o,"catchLoc"),l=r.call(o,"finallyLoc");if(u&&l){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0);if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return handle(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return handle(o.finallyLoc)}}}},abrupt:function abrupt(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),resetTryEntry(n),d}},catch:function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;resetTryEntry(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,n,r){return this.delegate={iterator:values(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}));function __variableDynamicImportRuntime0__(t){switch(t){case"./locale/en.js":return Promise.resolve().then((function(){return ri}));case"./locale/zh-CN.js":return Promise.resolve().then((function(){return ii}));default:return Promise.reject(new Error("Unknown variable dynamic import: "+t))}}
/**
* @file ext-mathjax.js
*
* @license MIT
*
* @copyright 2013 Jo Segaert
*
*/var ei=function(){var t=_asyncToGenerator(regeneratorRuntime.mark((function _callee(t){var e;return regeneratorRuntime.wrap((function _callee$(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,__variableDynamicImportRuntime0__("./locale/".concat(encodeURIComponent(t),".js"));case 3:e=n.sent,n.next=12;break;case 6:return n.prev=6,n.t0=n.catch(0),console.error("Missing translation (".concat(t,") - using 'en'")),n.next=11,Promise.resolve().then((function(){return ri}));case 11:e=n.sent;case 12:return n.abrupt("return",e.default);case 13:case"end":return n.stop()}}),_callee,null,[[0,6]])})));return function loadExtensionTranslation(e){return t.apply(this,arguments)}}(),ni={name:"mathjax",init:function init(t){var e=this;return _asyncToGenerator(regeneratorRuntime.mark((function _callee3(){var n,r,i,o,s,u,l,h,f,p,d;return regeneratorRuntime.wrap((function _callee3$(m){for(;;)switch(m.prev=m.next){case 0:return p=function _saveMath(){var t=n("#mathjax_code_textarea").val();MathJax.Hub.queue.Push(["Text",u,"\\displaystyle{"+t+"}"]),MathJax.Hub.queue.Push((function(){var t=n(".MathJax_SVG"),e=n(t.html());e.find("use").each((function(){var t=n(this).attr("href")?n(this).attr("href").slice(1):n(this).attr("xlink:href").slice(1),e=n("#"+t).clone().removeAttr("id"),r=n(this).attr("x"),i=n(this).attr("y"),o=n(this).attr("transform");o&&(r||i)?e.attr("transform",o+" translate("+r+","+i+")"):o?e.attr("transform",o):(r||i)&&e.attr("transform","translate("+r+","+i+")"),n(this).replaceWith(e)})),e.removeAttr("style"),e.attr("xmlns","http://www.w3.org/2000/svg"),o.importSvgString(n("<div>").append(e.clone()).html(),!0),o.ungroupSelectedElement(),o.moveSelectedElements(l,h,!0)}))},n=t.$,r=e,m.next=5,ei(r.curPrefs.lang);case 5:return i=m.sent,o=r.canvas,s=r.uiStrings,f=!1,n.extend(s,{mathjax:{embed_svg:"Save as mathematics",embed_mathml:"Save as figure",svg_save_warning:"The math will be transformed into a figure is manipulatable like everything else. You will not be able to manipulate the TeX-code anymore.",mathml_save_warning:"Advised. The math will be saved as a figure.",title:"Mathematics code editor"}}),d=[{id:"tool_mathjax",type:"mode",icon:"mathjax.png",events:{click:function click(){return _asyncToGenerator(regeneratorRuntime.mark((function _callee2(){return regeneratorRuntime.wrap((function _callee2$(t){for(;;)switch(t.prev=t.next){case 0:if(o.setMode("mathjax"),!1!==f){t.next=17;break}return n('<div id="mathjax">\x3c!-- Here is where MathJax creates the math --\x3e<div id="mathjax_creator" class="tex2jax_process" style="display:none">$${}$$</div><div id="mathjax_overlay"></div><div id="mathjax_container"><div id="tool_mathjax_back" class="toolbar_button"><button id="tool_mathjax_save">OK</button><button id="tool_mathjax_cancel">Cancel</button></div><fieldset><legend id="mathjax_legend">Mathematics Editor</legend><label><span id="mathjax_explication">Please type your mathematics in <a href="https://en.wikipedia.org/wiki/Help:Displaying_a_formula" target="_blank">TeX</a> code.</span></label><textarea id="mathjax_code_textarea" spellcheck="false"></textarea></fieldset></div></div>').insertAfter("#svg_prefs").hide(),n("#mathjax_container").draggable({cancel:"button,fieldset",containment:"window"}),n("#tool_mathjax_cancel").prepend(n.getSvgIcon("cancel",!0)).on("click touched",(function(){n("#mathjax").hide()})),n("#tool_mathjax_save").prepend(n.getSvgIcon("ok",!0)).on("click touched",(function(){p(),n("#mathjax").hide()})),n("body").addClass("tex2jax_ignore"),t.prev=7,t.next=10,Promise.resolve().then((function(){return wo}));case 10:MathJax.Hub.queue.Push((function(){u=MathJax.Hub.getAllJax("#mathjax_creator")[0],console.log(u),f=!0,console.log("MathJax Loaded")})),t.next=17;break;case 13:t.prev=13,t.t0=t.catch(7),console.log("Failed loading MathJax."),n.alert("Failed loading MathJax. You will not be able to change the mathematics.");case 17:case"end":return t.stop()}}),_callee2,null,[[7,13]])})))()}}}],m.abrupt("return",{name:i.name,svgicons:"mathjax-icons.xml",buttons:i.buttons.map((function(t,e){return Object.assign(d[e],t)})),mouseDown:function mouseDown(){if("mathjax"===o.getMode())return{started:!0}},mouseUp:function mouseUp(t){if("mathjax"===o.getMode()){var e=o.getZoom();return l=t.mouse_x/e,h=t.mouse_y/e,n("#mathjax").show(),{started:!1}}},callback:function callback(){n("<style>").text("#mathjax fieldset{padding: 5px;margin: 5px;border: 1px solid #DDD;}#mathjax label{display: block;margin: .5em;}#mathjax legend {max-width:195px;}#mathjax_overlay {position: absolute;top: 0;left: 0;right: 0;bottom: 0;background-color: black;opacity: 0.6;z-index: 20000;}#mathjax_container {position: absolute;top: 50px;padding: 10px;background-color: #B0B0B0;border: 1px outset #777;opacity: 1.0;font-family: Verdana, Helvetica, sans-serif;font-size: .8em;z-index: 20001;}#tool_mathjax_back {margin-left: 1em;overflow: auto;}#mathjax_legend{font-weight: bold;font-size:1.1em;}#mathjax_code_textarea {\\nmargin: 5px .7em;overflow: hidden;width: 416px;display: block;height: 100px;}").appendTo("head")}});case 12:case"end":return m.stop()}}),_callee3)})))()}},ri=Object.freeze({__proto__:null,default:{name:"MathJax",buttons:[{title:"Add Mathematics"}]}}),ii=Object.freeze({__proto__:null,default:{name:"数学",buttons:[{title:"添加数学计算"}]}}),oi=wellKnownSymbol("isConcatSpreadable"),ai=Ht>=51||!fails((function(){var t=[];return t[oi]=!1,t.concat()[0]!==t})),si=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(t){if(!isObject(t))return!1;var e=t[oi];return void 0!==e?!!e:ht(t)};_export({target:"Array",proto:!0,forced:!ai||!si},{concat:function concat(t){var e,n,r,i,o,s=toObject(this),u=arraySpeciesCreate(s,0),l=0;for(e=-1,r=arguments.length;e<r;e++)if(isConcatSpreadable(o=-1===e?s:arguments[e])){if(l+(i=toLength(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,l++)n in o&&createProperty(u,l,o[n])}else{if(l>=9007199254740991)throw TypeError("Maximum allowed index exceeded");createProperty(u,l++,o)}return u.length=l,u}});var ui=[].join,ci=l!=Object,li=arrayMethodIsStrict("join",",");_export({target:"Array",proto:!0,forced:ci||!li},{join:function join(t){return ui.call(toIndexedObject(this),void 0===t?",":t)}});var hi=Math.min,fi=[].lastIndexOf,pi=!!fi&&1/[1].lastIndexOf(1,-0)<0,di=arrayMethodIsStrict("lastIndexOf"),gi=arrayMethodUsesToLength("indexOf",{ACCESSORS:!0,1:0}),mi=pi||!di||!gi?function lastIndexOf(t){if(pi)return fi.apply(this,arguments)||0;var e=toIndexedObject(this),n=toLength(e.length),r=n-1;for(arguments.length>1&&(r=hi(r,toInteger(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}:fi;_export({target:"Array",proto:!0,forced:mi!==[].lastIndexOf},{lastIndexOf:mi});var vi=[],xi=vi.sort,yi=fails((function(){vi.sort(void 0)})),bi=fails((function(){vi.sort(null)})),Si=arrayMethodIsStrict("sort");_export({target:"Array",proto:!0,forced:yi||!bi||!Si},{sort:function sort(t){return void 0===t?xi.call(toObject(this)):xi.call(toObject(this),aFunction$1(t))}});var Mi=arrayMethodHasSpeciesSupport("splice"),wi=arrayMethodUsesToLength("splice",{ACCESSORS:!0,0:0,1:2}),Ei=Math.max,Ji=Math.min;_export({target:"Array",proto:!0,forced:!Mi||!wi},{splice:function splice(t,e){var n,r,i,o,s,u,l=toObject(this),h=toLength(l.length),f=toAbsoluteIndex(t,h),p=arguments.length;if(0===p?n=r=0:1===p?(n=0,r=h-f):(n=p-2,r=Ji(Ei(toInteger(e),0),h-f)),h+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(i=arraySpeciesCreate(l,r),o=0;o<r;o++)(s=f+o)in l&&createProperty(i,o,l[s]);if(i.length=r,n<r){for(o=f;o<h-r;o++)u=o+n,(s=o+r)in l?l[u]=l[s]:delete l[u];for(o=h;o>h-r+n;o--)delete l[o-1]}else if(n>r)for(o=h-r;o>f;o--)u=o+n-1,(s=o+r-1)in l?l[u]=l[s]:delete l[u];for(o=0;o<n;o++)l[o+f]=arguments[o+2];return l.length=h-r+n,i}});var Ti="\t\n\v\f\r    \u2028\u2029\ufeff",Pi="["+Ti+"]",ki=RegExp("^"+Pi+Pi+"*"),Ai=RegExp(Pi+Pi+"*$"),createMethod$3=function(t){return function(e){var n=String(requireObjectCoercible(e));return 1&t&&(n=n.replace(ki,"")),2&t&&(n=n.replace(Ai,"")),n}},Ci={start:createMethod$3(1),end:createMethod$3(2),trim:createMethod$3(3)},ji=Ci.trim,Ii=e.parseFloat,Oi=1/Ii(Ti+"-0")!=-1/0?function parseFloat(t){var e=ji(String(t)),n=Ii(e);return 0===n&&"-"==e.charAt(0)?-0:n}:Ii;_export({global:!0,forced:parseFloat!=Oi},{parseFloat:Oi});var _i=Ci.trim,Ri=e.parseInt,Li=/^[+-]?0[Xx]/,Di=8!==Ri(Ti+"08")||22!==Ri(Ti+"0x16")?function parseInt(t,e){var n=_i(String(t));return Ri(n,e>>>0||(Li.test(n)?16:10))}:Ri;_export({global:!0,forced:parseInt!=Di},{parseInt:Di});var Hi=wellKnownSymbol("match"),isRegexp=function(t){var e;return isObject(t)&&(void 0!==(e=t[Hi])?!!e:"RegExp"==classofRaw(t))};function RE(t,e){return RegExp(t,e)}var Fi={UNSUPPORTED_Y:fails((function(){var t=RE("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),BROKEN_CARET:fails((function(){var t=RE("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},Ui=y.f,Ni=et.f,Bi=G.set,qi=wellKnownSymbol("match"),Gi=e.RegExp,zi=Gi.prototype,$i=/a/g,Vi=/a/g,Ki=new Gi($i)!==$i,Qi=Fi.UNSUPPORTED_Y;if(n&&ct("RegExp",!Ki||Qi||fails((function(){return Vi[qi]=!1,Gi($i)!=$i||Gi(Vi)==Vi||"/a/i"!=Gi($i,"i")})))){for(var Wi=function RegExp(t,e){var n,r=this instanceof Wi,i=isRegexp(t),o=void 0===e;if(!r&&i&&t.constructor===Wi&&o)return t;Ki?i&&!o&&(t=t.source):t instanceof Wi&&(o&&(e=regexpFlags.call(t)),t=t.source),Qi&&(n=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var s,u,l,h,f,p=(s=Ki?new Gi(t,e):Gi(t,e),u=r?this:zi,l=Wi,wr&&"function"==typeof(h=u.constructor)&&h!==l&&isObject(f=h.prototype)&&f!==l.prototype&&wr(s,f),s);return Qi&&n&&Bi(p,{sticky:n}),p},proxy=function(t){t in Wi||Ui(Wi,t,{configurable:!0,get:function(){return Gi[t]},set:function(e){Gi[t]=e}})},Xi=Ni(Gi),Yi=0;Xi.length>Yi;)proxy(Xi[Yi++]);zi.constructor=Wi,Wi.prototype=zi,z(e,"RegExp",Wi)}setSpecies("RegExp");var Zi=RegExp.prototype.exec,to=String.prototype.replace,eo=Zi,no=function(){var t=/a/,e=/b*/g;return Zi.call(t,"a"),Zi.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),ro=Fi.UNSUPPORTED_Y||Fi.BROKEN_CARET,io=void 0!==/()??/.exec("")[1];(no||io||ro)&&(eo=function exec(t){var e,n,r,i,o=this,s=ro&&o.sticky,u=regexpFlags.call(o),l=o.source,h=0,f=t;return s&&(-1===(u=u.replace("y","")).indexOf("g")&&(u+="g"),f=String(t).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==t[o.lastIndex-1])&&(l="(?: "+l+")",f=" "+f,h++),n=new RegExp("^(?:"+l+")",u)),io&&(n=new RegExp("^"+l+"$(?!\\s)",u)),no&&(e=o.lastIndex),r=Zi.call(s?n:o,f),s?r?(r.input=r.input.slice(h),r[0]=r[0].slice(h),r.index=o.lastIndex,o.lastIndex+=r[0].length):o.lastIndex=0:no&&r&&(o.lastIndex=o.global?r.index+r[0].length:e),io&&r&&r.length>1&&to.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r});var oo=eo;_export({target:"RegExp",proto:!0,forced:/./.exec!==oo},{exec:oo});var ao=wellKnownSymbol("species"),so=!fails((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),uo="$0"==="a".replace(/./,"$0"),co=wellKnownSymbol("replace"),lo=!!/./[co]&&""===/./[co]("a","$0"),ho=!fails((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),fixRegexpWellKnownSymbolLogic=function(t,e,n,r){var i=wellKnownSymbol(t),o=!fails((function(){var e={};return e[i]=function(){return 7},7!=""[t](e)})),s=o&&!fails((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[ao]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return e=!0,null},n[i](""),!e}));if(!o||!s||"replace"===t&&(!so||!uo||lo)||"split"===t&&!ho){var u=/./[i],l=n(i,""[t],(function(t,e,n,r,i){return e.exec===oo?o&&!i?{done:!0,value:u.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:uo,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:lo}),h=l[0],f=l[1];z(String.prototype,t,h),z(RegExp.prototype,i,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)})}r&&S(RegExp.prototype[i],"sham",!0)},fo=Ur.charAt,advanceStringIndex=function(t,e,n){return e+(n?fo(t,e).length:1)},regexpExecAbstract=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==classofRaw(t))throw TypeError("RegExp#exec called on incompatible receiver");return oo.call(t,e)};fixRegexpWellKnownSymbolLogic("match",1,(function(t,e,n){return[function match(e){var n=requireObjectCoercible(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var i=anObject(t),o=String(this);if(!i.global)return regexpExecAbstract(i,o);var s=i.unicode;i.lastIndex=0;for(var u,l=[],h=0;null!==(u=regexpExecAbstract(i,o));){var f=String(u[0]);l[h]=f,""===f&&(i.lastIndex=advanceStringIndex(o,toLength(i.lastIndex),s)),h++}return 0===h?null:l}]}));var po=Math.max,go=Math.min,mo=Math.floor,vo=/\$([$&'`]|\d\d?|<[^>]*>)/g,xo=/\$([$&'`]|\d\d?)/g;fixRegexpWellKnownSymbolLogic("replace",2,(function(t,e,n,r){var i=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,o=r.REPLACE_KEEPS_$0,s=i?"$":"$0";return[function replace(n,r){var i=requireObjectCoercible(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):e.call(String(i),n,r)},function(t,r){if(!i&&o||"string"==typeof r&&-1===r.indexOf(s)){var u=n(e,t,this,r);if(u.done)return u.value}var l=anObject(t),h=String(this),f="function"==typeof r;f||(r=String(r));var p=l.global;if(p){var d=l.unicode;l.lastIndex=0}for(var m=[];;){var v=regexpExecAbstract(l,h);if(null===v)break;if(m.push(v),!p)break;""===String(v[0])&&(l.lastIndex=advanceStringIndex(h,toLength(l.lastIndex),d))}for(var x,y="",S=0,M=0;M<m.length;M++){v=m[M];for(var w=String(v[0]),E=po(go(toInteger(v.index),h.length),0),J=[],T=1;T<v.length;T++)J.push(void 0===(x=v[T])?x:String(x));var P=v.groups;if(f){var k=[w].concat(J,E,h);void 0!==P&&k.push(P);var A=String(r.apply(void 0,k))}else A=getSubstitution(w,h,E,J,P,r);E>=S&&(y+=h.slice(S,E)+A,S=E+w.length)}return y+h.slice(S)}];function getSubstitution(t,n,r,i,o,s){var u=r+t.length,l=i.length,h=xo;return void 0!==o&&(o=toObject(o),h=vo),e.call(s,h,(function(e,s){var h;switch(s.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":h=o[s.slice(1,-1)];break;default:var f=+s;if(0===f)return e;if(f>l){var p=mo(f/10);return 0===p?e:p<=l?void 0===i[p-1]?s.charAt(1):i[p-1]+s.charAt(1):e}h=i[f-1]}return void 0===h?"":h}))}}));var yo=[].push,bo=Math.min,So=!fails((function(){return!RegExp(4294967295,"y")}));fixRegexpWellKnownSymbolLogic("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(requireObjectCoercible(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===t)return[r];if(!isRegexp(t))return e.call(r,t,i);for(var o,s,u,l=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,p=new RegExp(t.source,h+"g");(o=oo.call(p,r))&&!((s=p.lastIndex)>f&&(l.push(r.slice(f,o.index)),o.length>1&&o.index<r.length&&yo.apply(l,o.slice(1)),u=o[0].length,f=s,l.length>=i));)p.lastIndex===o.index&&p.lastIndex++;return f===r.length?!u&&p.test("")||l.push(""):l.push(r.slice(f)),l.length>i?l.slice(0,i):l}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function split(e,n){var i=requireObjectCoercible(this),o=null==e?void 0:e[t];return void 0!==o?o.call(e,i,n):r.call(String(i),e,n)},function(t,i){var o=n(r,t,this,i,r!==e);if(o.done)return o.value;var s=anObject(t),u=String(this),l=speciesConstructor(s,RegExp),h=s.unicode,f=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(So?"y":"g"),p=new l(So?s:"^(?:"+s.source+")",f),d=void 0===i?4294967295:i>>>0;if(0===d)return[];if(0===u.length)return null===regexpExecAbstract(p,u)?[u]:[];for(var m=0,v=0,x=[];v<u.length;){p.lastIndex=So?v:0;var y,S=regexpExecAbstract(p,So?u:u.slice(v));if(null===S||(y=bo(toLength(p.lastIndex+(So?0:v)),u.length))===m)v=advanceStringIndex(u,v,h);else{if(x.push(u.slice(m,v)),x.length===d)return x;for(var M=1;M<=S.length-1;M++)if(x.push(S[M]),x.length===d)return x;v=m=y}}return x.push(u.slice(m)),x}]}),!So);var Mo=Ci.trim;_export({target:"String",proto:!0,forced:function(t){return fails((function(){return!!Ti[t]()||"…"!="…"[t]()||Ti[t].name!==t}))}("trim")},{trim:function trim(){return Mo(this)}}),document.getElementById&&document.childNodes&&document.createElement&&(window.MathJax&&MathJax.Hub||(window.MathJax?window.MathJax={AuthorConfig:window.MathJax}:window.MathJax={},MathJax.isPacked=!0,MathJax.version="2.3",MathJax.fileversion="2.3.1",function(t){var e=window[t];e||(e=window[t]={});var n=[],r=function c(t){var e=t.constructor;for(var n in e||(e=new Function("")),t)"constructor"!==n&&t.hasOwnProperty(n)&&(e[n]=t[n]);return e},i=function a(){return new Function("return arguments.callee.Init.call(this,arguments)")},o=i();o.prototype={bug_test:1},o.prototype.bug_test||(i=function a(){return function(){return arguments.callee.Init.call(this,arguments)}}),e.Object=r({constructor:i(),Subclass:function Subclass(t,e){var r=i();return r.SUPER=this,r.Init=this.Init,r.Subclass=this.Subclass,r.Augment=this.Augment,r.protoFunction=this.protoFunction,r.can=this.can,r.has=this.has,r.isa=this.isa,r.prototype=new this(n),r.prototype.constructor=r,r.Augment(t,e),r},Init:function Init(t){var e=this;return 1===t.length&&t[0]===n?e:(e instanceof t.callee||(e=new t.callee(n)),e.Init.apply(e,t)||e)},Augment:function Augment(t,e){var n;if(null!=t){for(n in t)t.hasOwnProperty(n)&&this.protoFunction(n,t[n]);t.toString!==this.prototype.toString&&t.toString!=={}.toString&&this.protoFunction("toString",t.toString)}if(null!=e)for(n in e)e.hasOwnProperty(n)&&(this[n]=e[n]);return this},protoFunction:function protoFunction(t,e){this.prototype[t]=e,"function"==typeof e&&(e.SUPER=this.SUPER.prototype)},prototype:{Init:function Init(){},SUPER:function SUPER(t){return t.callee.SUPER},can:function can(t){return"function"==typeof this[t]},has:function has(t){return void 0!==this[t]},isa:function isa(t){return t instanceof Object&&this instanceof t}},can:function can(t){return this.prototype.can.call(this,t)},has:function has(t){return this.prototype.has.call(this,t)},isa:function isa(t){for(var e=this;e;){if(e===t)return!0;e=e.SUPER}return!1},SimpleSUPER:r({constructor:function constructor(t){return this.SimpleSUPER.define(t)},define:function define(t){var e={};if(null!=t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=this.wrap(n,t[n]));t.toString!==this.prototype.toString&&t.toString!=={}.toString&&(e.toString=this.wrap("toString",t.toString))}return e},wrap:function wrap(t,e){if("function"==typeof e&&e.toString().match(/\.\s*SUPER\s*\(/)){var n=new Function(this.wrapper);n.label=t,n.original=e,e=n,n.toString=this.stringify}return e},wrapper:function(){var t=arguments.callee;this.SUPER=t.SUPER[t.label];try{var e=t.original.apply(this,arguments)}catch(t){throw delete this.SUPER,t}return delete this.SUPER,e}.toString().replace(/^\s*function\s*\(\)\s*\{\s*/i,"").replace(/\s*\}\s*$/i,""),toString:function toString(){return this.original.toString.apply(this.original,arguments)}})})}("MathJax"),function(t){var e=window.MathJax;e||(e=window.MathJax={});var n=function CALLBACK(t){var e=new Function("return arguments.callee.execute.apply(arguments.callee,arguments)");for(var n in CALLBACK.prototype)CALLBACK.prototype.hasOwnProperty(n)&&(void 0!==t[n]?e[n]=t[n]:e[n]=CALLBACK.prototype[n]);return e.toString=CALLBACK.prototype.toString,e};n.prototype={isCallback:!0,hook:function hook(){},data:[],object:window,execute:function execute(){if(!this.called||this.autoReset)return this.called=!this.autoReset,this.hook.apply(this.object,this.data.concat([].slice.call(arguments,0)))},reset:function reset(){delete this.called},toString:function toString(){return this.hook.toString.apply(this.hook,arguments)}};var r=function ISCALLBACK(t){return"function"==typeof t&&t.isCallback},i=function EVAL(t){return eval.call(window,t)};if(i("var __TeSt_VaR__ = 1"),window.__TeSt_VaR__)try{delete window.__TeSt_VaR__}catch(t){window.__TeSt_VaR__=null}else i=window.execScript?function EVAL(t){e.__code=t,t="try {MathJax.__result = eval(MathJax.__code)} catch(err) {MathJax.__result = err}",window.execScript(t);var n=e.__result;if(delete e.__result,delete e.__code,n instanceof Error)throw n;return n}:function EVAL(t){e.__code=t,t="try {MathJax.__result = eval(MathJax.__code)} catch(err) {MathJax.__result = err}";var n=document.getElementsByTagName("head")[0];n||(n=document.body);var r=document.createElement("script");r.appendChild(document.createTextNode(t)),n.appendChild(r),n.removeChild(r);var i=e.__result;if(delete e.__result,delete e.__code,i instanceof Error)throw i;return i};var o=function USING(t,e){if(arguments.length>1&&(t=2===arguments.length&&"function"!=typeof arguments[0]&&arguments[0]instanceof Object&&"number"==typeof arguments[1]?[].slice.call(t,e):[].slice.call(arguments,0)),t instanceof Array&&1===t.length&&(t=t[0]),"function"==typeof t)return t.execute===n.prototype.execute?t:n({hook:t});if(t instanceof Array){if("string"==typeof t[0]&&t[1]instanceof Object&&"function"==typeof t[1][t[0]])return n({hook:t[1][t[0]],object:t[1],data:t.slice(2)});if("function"==typeof t[0])return n({hook:t[0],data:t.slice(1)});if("function"==typeof t[1])return n({hook:t[1],object:t[0],data:t.slice(2)})}else{if("string"==typeof t)return n({hook:i,data:[t]});if(t instanceof Object)return n(t);if(void 0===t)return n({})}throw Error("Can't make callback from given data")},s=function WAITFOR(t,e){(t=o(t)).called||(l(t,e),e.pending++)},u=function WAITEXECUTE(){var t=this.signal;delete this.signal,this.execute=this.oldExecute,delete this.oldExecute;var e=this.execute.apply(this,arguments);if(r(e)&&!e.called)l(e,t);else for(var n=0,i=t.length;n<i;n++)t[n].pending--,t[n].pending<=0&&t[n].call()},l=function WAITSIGNAL(t,e){e instanceof Array||(e=[e]),t.signal?1===e.length?t.signal.push(e[0]):t.signal=t.signal.concat(e):(t.oldExecute=t.execute,t.execute=u,t.signal=e)},h=function AFTER(t){(t=o(t)).pending=0;for(var e=1,n=arguments.length;e<n;e++)arguments[e]&&s(arguments[e],t);if(0===t.pending){var i=t();r(i)&&(t=i)}return t},f=MathJax.Object.Subclass({Init:function Init(t){this.hooks=[],this.reset=t},Add:function Add(t,e){null==e&&(e=10),r(t)||(t=o(t)),t.priority=e;for(var n=this.hooks.length;n>0&&e<this.hooks[n-1].priority;)n--;return this.hooks.splice(n,0,t),t},Remove:function Remove(t){for(var e=0,n=this.hooks.length;e<n;e++)if(this.hooks[e]===t)return void this.hooks.splice(e,1)},Execute:function Execute(){for(var t=[{}],e=0,n=this.hooks.length;e<n;e++){this.reset&&this.hooks[e].reset();var i=this.hooks[e].apply(window,arguments);r(i)&&!i.called&&t.push(i)}return 1===t.length?null:2===t.length?t[1]:h.apply({},t)}}),p=e.Object.Subclass({Init:function Init(){this.pending=0,this.running=0,this.queue=[],this.Push.apply(this,arguments)},Push:function Push(){for(var t,e=0,n=arguments.length;e<n;e++)(t=o(arguments[e]))!==arguments[e]||t.called||(t=o(["wait",this,t])),this.queue.push(t);return this.running||this.pending||this.Process(),t},Process:function Process(t){for(;!this.running&&!this.pending&&this.queue.length;){var e=this.queue[0];t=this.queue.slice(1),this.queue=[],this.Suspend();var n=e();this.Resume(),t.length&&(this.queue=t.concat(this.queue)),r(n)&&!n.called&&s(n,this)}},Suspend:function Suspend(){this.running++},Resume:function Resume(){this.running&&this.running--},call:function call(){this.Process.apply(this,arguments)},wait:function wait(t){return t}}),d=p.Subclass({Init:function Init(t){p.prototype.Init.call(this),this.name=t,this.posted=[],this.listeners=f(!0)},Post:function Post(t,e,n){if(e=o(e),this.posting||this.pending)this.Push(["Post",this,t,e,n]);else{this.callback=e,e.reset(),n||this.posted.push(t),this.Suspend(),this.posting=!0;var i=this.listeners.Execute(t);r(i)&&!i.called&&s(i,this),this.Resume(),delete this.posting,this.pending||this.call()}return e},Clear:function Clear(t){return t=o(t),this.posting||this.pending?t=this.Push(["Clear",this,t]):(this.posted=[],t()),t},call:function call(){this.callback(this),this.Process()},Interest:function Interest(t,e,n){if(t=o(t),this.listeners.Add(t,n),!e)for(var i=0,u=this.posted.length;i<u;i++){t.reset();var l=t(this.posted[i]);r(l)&&i===this.posted.length-1&&s(l,this)}return t},NoInterest:function NoInterest(t){this.listeners.Remove(t)},MessageHook:function MessageHook(t,e,n){e=o(e),this.hooks||(this.hooks={},this.Interest(["ExecuteHooks",this])),this.hooks[t]||(this.hooks[t]=f(!0)),this.hooks[t].Add(e,n);for(var r=0,i=this.posted.length;r<i;r++)this.posted[r]==t&&(e.reset(),e(this.posted[r]));return e},ExecuteHooks:function ExecuteHooks(t,e){var n=t instanceof Array?t[0]:t;return this.hooks[n]?this.hooks[n].Execute(t):null}},{signals:{},find:function find(t){return d.signals[t]||(d.signals[t]=new d(t)),d.signals[t]}});e.Callback=e.CallBack=o,e.Callback.Delay=function DELAY(t,e){return(e=o(e)).timeout=setTimeout(e,t),e},e.Callback.After=h,e.Callback.Queue=p,e.Callback.Signal=d.find,e.Callback.Hooks=f,e.Callback.ExecuteHooks=function EXECUTEHOOKS(t,e,n){if(!t)return null;t instanceof Array||(t=[t]),e instanceof Array||(e=null==e?[]:[e]);for(var r=f(n),i=0,o=t.length;i<o;i++)r.Add(t[i]);return r.Execute.apply(r,e)}}(),function(t){var e=window[t];e||(e=window[t]={});var n="Apple Computer, Inc."===navigator.vendor&&void 0===navigator.vendorSub,r=0,i=function g(t){return document.styleSheets&&document.styleSheets.length>r&&(r=document.styleSheets.length),t||(t=document.getElementsByTagName("head")[0])||(t=document.body),t},o=[],s=function b(){for(var t=0,n=o.length;t<n;t++)e.Ajax.head.removeChild(o[t]);o=[]};e.Ajax={loaded:{},loading:{},loadHooks:{},timeout:15e3,styleDelay:1,config:{root:""},STATUS:{OK:1,ERROR:-1},rootPattern:new RegExp("^\\["+t+"\\]"),fileURL:function fileURL(t){return t.replace(this.rootPattern,this.config.root)},Require:function Require(t,n){var r;if(n=e.Callback(n),t instanceof Object)for(var i in t)t.hasOwnProperty(i)&&(r=i.toUpperCase(),t=t[i]);else r=t.split(/\./).pop().toUpperCase();if(t=this.fileURL(t),this.loaded[t])n(this.loaded[t]);else{var o={};o[r]=t,this.Load(o,n)}return n},Load:function Load(t,n){var r;if(n=e.Callback(n),t instanceof Object)for(var o in t)t.hasOwnProperty(o)&&(r=o.toUpperCase(),t=t[o]);else r=t.split(/\./).pop().toUpperCase();if(t=this.fileURL(t),this.loading[t])this.addHook(t,n);else{if(this.head=i(this.head),!this.loader[r])throw Error("Can't load files of type "+r);this.loader[r].call(this,t,n)}return n},LoadHook:function LoadHook(t,n,r){if(n=e.Callback(n),t instanceof Object)for(var i in t)t.hasOwnProperty(i)&&(t=t[i]);return t=this.fileURL(t),this.loaded[t]?n(this.loaded[t]):this.addHook(t,n,r),n},addHook:function addHook(t,e,n){this.loadHooks[t]||(this.loadHooks[t]=MathJax.Callback.Hooks()),this.loadHooks[t].Add(e,n)},Preloading:function Preloading(){for(var t=0,e=arguments.length;t<e;t++){var n=this.fileURL(arguments[t]);this.loading[n]||(this.loading[n]={preloaded:!0})}},loader:{JS:function JS(t,n){var r=document.createElement("script"),i=e.Callback(["loadTimeout",this,t]);this.loading[t]={callback:n,timeout:setTimeout(i,this.timeout),status:this.STATUS.OK,script:r},this.loading[t].message=e.Message.File(t),r.onerror=i,r.type="text/javascript",r.src=t,this.head.appendChild(r)},CSS:function CSS(t,n){var r=document.createElement("link");r.rel="stylesheet",r.type="text/css",r.href=t,this.loading[t]={callback:n,message:e.Message.File(t),status:this.STATUS.OK},this.head.appendChild(r),this.timer.create.call(this,[this.timer.file,t],r)}},timer:{create:function create(t,i){return t=e.Callback(t),"STYLE"===i.nodeName&&i.styleSheet&&void 0!==i.styleSheet.cssText||window.chrome&&"LINK"===i.nodeName?t(this.STATUS.OK):n?this.timer.start(this,[this.timer.checkSafari2,r++,t],this.styleDelay):this.timer.start(this,[this.timer.checkLength,i,t],this.styleDelay),t},start:function start(t,n,r,i){(n=e.Callback(n)).execute=this.execute,n.time=this.time,n.STATUS=t.STATUS,n.timeout=i||t.timeout,n.delay=n.total=r||0,r?setTimeout(n,r):n()},time:function time(t){return this.total+=this.delay,this.delay=Math.floor(1.05*this.delay+5),this.total>=this.timeout?(t(this.STATUS.ERROR),1):0},file:function file(t,n){n<0?e.Ajax.loadTimeout(t):e.Ajax.loadComplete(t)},execute:function execute(){this.hook.call(this.object,this,this.data[0],this.data[1])},checkSafari2:function checkSafari2(t,e,n){t.time(n)||(document.styleSheets.length>e&&document.styleSheets[e].cssRules&&document.styleSheets[e].cssRules.length?n(t.STATUS.OK):setTimeout(t,t.delay))},checkLength:function checkLength(t,n,r){if(!t.time(r)){var i=0,o=n.sheet||n.styleSheet;try{(o.cssRules||o.rules||[]).length>0&&(i=1)}catch(t){(t.message.match(/protected variable|restricted URI/)||t.message.match(/Security error/))&&(i=1)}i?setTimeout(e.Callback([r,t.STATUS.OK]),0):setTimeout(t,t.delay)}}},loadComplete:function loadComplete(t){t=this.fileURL(t);var n=this.loading[t];return n&&!n.preloaded?(e.Message.Clear(n.message),clearTimeout(n.timeout),n.script&&(0===o.length&&setTimeout(s,0),o.push(n.script)),this.loaded[t]=n.status,delete this.loading[t],this.addHook(t,n.callback)):(n&&delete this.loading[t],this.loaded[t]=this.STATUS.OK,n={status:this.STATUS.OK}),this.loadHooks[t]?this.loadHooks[t].Execute(n.status):null},loadTimeout:function loadTimeout(t){this.loading[t].timeout&&clearTimeout(this.loading[t].timeout),this.loading[t].status=this.STATUS.ERROR,this.loadError(t),this.loadComplete(t)},loadError:function loadError(t){e.Message.Set(["LoadFailed","File failed to load: %1",t],null,2e3),e.Hub.signal.Post(["file load error",t])},Styles:function Styles(t,n){var r=this.StyleString(t);if(""===r)(n=e.Callback(n))();else{var o=document.createElement("style");o.type="text/css",this.head=i(this.head),this.head.appendChild(o),o.styleSheet&&void 0!==o.styleSheet.cssText?o.styleSheet.cssText=r:o.appendChild(document.createTextNode(r)),n=this.timer.create.call(this,n,o)}return n},StyleString:function StyleString(t){if("string"==typeof t)return t;var e,n,r="";for(e in t)if(t.hasOwnProperty(e))if("string"==typeof t[e])r+=e+" {"+t[e]+"}\n";else if(t[e]instanceof Array)for(var i=0;i<t[e].length;i++)(n={})[e]=t[e][i],r+=this.StyleString(n);else if("@media"===e.substr(0,6))r+=e+" {"+this.StyleString(t[e])+"}\n";else if(null!=t[e]){for(var o in n=[],t[e])t[e].hasOwnProperty(o)&&null!=t[e][o]&&(n[n.length]=o+": "+t[e][o]);r+=e+" {"+n.join("; ")+"}\n"}return r}}}("MathJax"),MathJax.HTML={Element:function Element(t,e,n){var r=document.createElement(t);if(e){if(e.style){var i=e.style;for(var o in e.style={},i)i.hasOwnProperty(o)&&(e.style[o.replace(/-([a-z])/g,this.ucMatch)]=i[o])}MathJax.Hub.Insert(r,e)}if(n){n instanceof Array||(n=[n]);for(var s=0;s<n.length;s++)n[s]instanceof Array?r.appendChild(this.Element(n[s][0],n[s][1],n[s][2])):"script"===t?this.setScript(r,n[s]):r.appendChild(document.createTextNode(n[s]))}return r},ucMatch:function ucMatch(t,e){return e.toUpperCase()},addElement:function addElement(t,e,n,r){return t.appendChild(this.Element(e,n,r))},TextNode:function TextNode(t){return document.createTextNode(t)},addText:function addText(t,e){return t.appendChild(this.TextNode(e))},setScript:function setScript(t,e){if(this.setScriptBug)t.text=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);this.addText(t,e)}},getScript:function getScript(t){return(""===t.text?t.innerHTML:t.text).replace(/^\s+/,"").replace(/\s+$/,"")},Cookie:{prefix:"mjx",expires:365,Set:function Set(t,e){var n=[];if(e)for(var r in e)e.hasOwnProperty(r)&&n.push(r+":"+e[r].toString().replace(/&/g,"&&"));var i=this.prefix+"."+t+"="+escape(n.join("&;"));if(this.expires){var o=new Date;o.setDate(o.getDate()+this.expires),i+="; expires="+o.toGMTString()}try{document.cookie=i+"; path=/"}catch(t){}},Get:function Get(t,e){e||(e={});var n=new RegExp("(?:^|;\\s*)"+this.prefix+"\\."+t+"=([^;]*)(?:;|$)").exec(document.cookie);if(n&&""!==n[1])for(var r=unescape(n[1]).split("&;"),i=0,o=r.length;i<o;i++){var s=(n=r[i].match(/([^:]+):(.*)/))[2].replace(/&&/g,"&");"true"===s?s=!0:"false"===s?s=!1:s.match(/^-?(\d+(\.\d+)?|\.\d+)$/)&&(s=parseFloat(s)),e[n[1]]=s}return e}}},MathJax.Localization={locale:"en",directory:"[MathJax]/localization",strings:{br:{menuTitle:"brezhoneg"},cdo:{menuTitle:"Mìng-dĕ̤ng-ngṳ̄"},cs:{menuTitle:"česky"},da:{menuTitle:"dansk"},de:{menuTitle:"Deutsch"},en:{menuTitle:"English",isLoaded:!0},eo:{menuTitle:"Esperanto"},es:{menuTitle:"español"},fa:{menuTitle:"فارسی"},fi:{menuTitle:"suomi"},fr:{menuTitle:"français"},gl:{menuTitle:"galego"},he:{menuTitle:"עברית"},ia:{menuTitle:"interlingua"},it:{menuTitle:"italiano"},ja:{menuTitle:"日本語"},ko:{menuTitle:"한국어"},lb:{menuTitle:"Lëtzebuergesch"},mk:{menuTitle:"македонски"},nl:{menuTitle:"Nederlands"},oc:{menuTitle:"occitan"},pl:{menuTitle:"polski"},"pt-br":{menuTitle:"português do Brasil"},pt:{menuTitle:"portugusê"},ru:{menuTitle:"русский"},sl:{menuTitle:"slovenščina"},sv:{menuTitle:"svenska"},tr:{menuTitle:"Türkçe"},uk:{menuTitle:"українська"},"zh-hans":{menuTitle:"中文(简体)"}},pattern:/%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g,SPLIT:3==="axb".split(/(x)/).length?function(t,e){return t.split(e)}:function(t,e){var n,r=[],i=0;for(e.lastIndex=0;n=e.exec(t);)r.push(t.substr(i,n.index)),r.push.apply(r,n.slice(1)),i=n.index+n[0].length;return r.push(t.substr(i)),r},_:function _(t,e){return e instanceof Array?this.processSnippet(t,e):this.processString(this.lookupPhrase(t,e),[].slice.call(arguments,2))},processString:function processString(t,e,n){var r,i;for(r=0,i=e.length;r<i;r++)n&&e[r]instanceof Array&&(e[r]=this.processSnippet(n,e[r]));var o=this.SPLIT(t,this.pattern);for(r=1,i=o.length;r<i;r+=2){var s=o[r].charAt(0);if(s>="0"&&s<="9")o[r]=e[o[r]-1],"number"==typeof o[r]&&(o[r]=this.number(o[r]));else if("{"===s)if((s=o[r].substr(1))>="0"&&s<="9")o[r]=e[o[r].substr(1,o[r].length-2)-1],"number"==typeof o[r]&&(o[r]=this.number(o[r]));else{var u=o[r].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/);if(u)if("plural"===u[1]){var l=e[u[2]-1];if(void 0===l)o[r]="???";else{l=this.plural(l)-1;var h=u[3].replace(/(^|[^%])(%%)*%\|/g,"$1$2%").split(/\|/);l>=0&&l<h.length?o[r]=this.processString(h[l].replace(/\uEFEF/g,"|"),e,n):o[r]="???"}}else o[r]="%"+o[r]}null==o[r]&&(o[r]="???")}if(!n)return o.join("");var f=[],p="";for(r=0;r<i;r++)p+=o[r],++r<i&&(o[r]instanceof Array?(f.push(p),f=f.concat(o[r]),p=""):p+=o[r]);return""!==p&&f.push(p),f},processSnippet:function processSnippet(t,e){for(var n=[],r=0,i=e.length;r<i;r++)if(e[r]instanceof Array){var o=e[r];if("string"==typeof o[1]){var s=o[0];s instanceof Array||(s=[t,s]);var u=this.lookupPhrase(s,o[1]);n=n.concat(this.processMarkdown(u,o.slice(2),t))}else o[1]instanceof Array?n=n.concat(this.processSnippet.apply(this,o)):o.length>=3?n.push([o[0],o[1],this.processSnippet(t,o[2])]):n.push(e[r])}else n.push(e[r]);return n},markdownPattern:/(%.)|(\*{1,3})((?:%.|.)+?)\2|(`+)((?:%.|.)+?)\4|\[((?:%.|.)+?)\]\(([^\s\)]+)\)/,processMarkdown:function processMarkdown(t,e,n){for(var r,i=[],o=t.split(this.markdownPattern),s=o[0],u=1,l=o.length;u<l;u+=8)o[u+1]?((r=this.processString(o[u+2],e,n))instanceof Array||(r=[r]),r=[["b","i","i"][o[u+1].length-1],{},r],3===o[u+1].length&&(r=["b",{},r])):o[u+3]?((r=this.processString(o[u+4].replace(/^\s/,"").replace(/\s$/,""),e,n))instanceof Array||(r=[r]),r=["code",{},r]):o[u+5]?((r=this.processString(o[u+5],e,n))instanceof Array||(r=[r]),r=["a",{href:this.processString(o[u+6],e),target:"_blank"},r]):(s+=o[u],r=null),r&&((i=this.concatString(i,s,e,n)).push(r),s=""),""!==o[u+7]&&(s+=o[u+7]);return i=this.concatString(i,s,e,n)},concatString:function concatString(t,e,n,r){return""!=e&&((e=this.processString(e,n,r))instanceof Array||(e=[e]),t=t.concat(e)),t},lookupPhrase:function lookupPhrase(t,e,n){n||(n="_"),t instanceof Array&&(n=t[0]||"_",t=t[1]||"");var r=this.loadDomain(n);r&&MathJax.Hub.RestartAfter(r);var i=this.strings[this.locale];if(i&&i.domains&&n in i.domains){var o=i.domains[n];o.strings&&t in o.strings&&(e=o.strings[t])}return e},loadFile:function loadFile(t,e,n){(n=MathJax.Callback(n||{}),(t=e.file||t).match(/\.js$/)||(t+=".js"),t.match(/^([a-z]+:|\[MathJax\])/))||(t=(this.strings[this.locale].directory||this.directory+"/"+this.locale||"[MathJax]/localization/"+this.locale)+"/"+t);var r=MathJax.Ajax.Require(t,(function(){return e.isLoaded=!0,n()}));return r.called?null:r},loadDomain:function loadDomain(t,e){var n,r=this.strings[this.locale];if(r){if(!r.isLoaded&&(n=this.loadFile(this.locale,r)))return MathJax.Callback.Queue(n,["loadDomain",this,t]).Push(e);if(r.domains&&t in r.domains){var i=r.domains[t];if(!i.isLoaded&&(n=this.loadFile(t,i)))return MathJax.Callback.Queue(n).Push(e)}}return MathJax.Callback(e)()},Try:function Try(t){(t=MathJax.Callback(t)).autoReset=!0;try{t()}catch(e){if(!e.restart)throw e;MathJax.Callback.After(["Try",this,t],e.restart)}},resetLocale:function resetLocale(t){if(t){for(t=t.toLowerCase();!this.strings[t];){var e=t.lastIndexOf("-");if(-1===e)return;t=t.substring(0,e)}var n=this.strings[t].remap;this.locale=n||t}},setLocale:function setLocale(t){this.resetLocale(t),MathJax.Menu&&this.loadDomain("MathMenu")},addTranslation:function addTranslation(t,e,n){var r=this.strings[t],i=!1;r||(r=this.strings[t]={},i=!0),r.domains||(r.domains={}),e&&(r.domains[e]||(r.domains[e]={}),r=r.domains[e]),MathJax.Hub.Insert(r,n),i&&MathJax.Menu.menu&&MathJax.Menu.CreateLocaleMenu()},setCSS:function setCSS(t){var e=this.strings[this.locale];return e&&(e.fontFamily&&(t.style.fontFamily=e.fontFamily),e.fontDirection&&(t.style.direction=e.fontDirection,"rtl"===e.fontDirection&&(t.style.textAlign="right"))),t},fontFamily:function fontFamily(){var t=this.strings[this.locale];return t?t.fontFamily:null},fontDirection:function fontDirection(){var t=this.strings[this.locale];return t?t.fontDirection:null},plural:function plural(t){var e=this.strings[this.locale];return e&&e.plural?e.plural(t):1==t?1:2},number:function number(t){var e=this.strings[this.locale];return e&&e.number?e.number(t):t}},MathJax.Message={ready:!1,log:[{}],current:null,textNodeBug:"Apple Computer, Inc."===navigator.vendor&&void 0===navigator.vendorSub||window.hasOwnProperty&&window.hasOwnProperty("konqueror"),styles:{"#MathJax_Message":{position:"fixed",left:"1px",bottom:"2px","background-color":"#E6E6E6",border:"1px solid #959595",margin:"0px",padding:"2px 8px","z-index":"102",color:"black","font-size":"80%",width:"auto","white-space":"nowrap"},"#MathJax_MSIE_Frame":{position:"absolute",top:0,left:0,width:"0px","z-index":101,border:"0px",margin:"0px",padding:"0px"}},browsers:{MSIE:function MSIE(t){MathJax.Hub.config.styles["#MathJax_Message"].position="absolute",MathJax.Message.quirks="BackCompat"===document.compatMode},Chrome:function Chrome(t){MathJax.Hub.config.styles["#MathJax_Message"].bottom="1.5em",MathJax.Hub.config.styles["#MathJax_Message"].left="1em"}},Init:function Init(t){if(t&&(this.ready=!0),!document.body||!this.ready)return!1;if(this.div&&null==this.div.parentNode&&(this.div=document.getElementById("MathJax_Message"),this.div&&(this.text=this.div.firstChild)),!this.div){var e=document.body;MathJax.Hub.Browser.isMSIE&&((e=this.frame=this.addDiv(document.body)).removeAttribute("id"),e.style.position="absolute",e.style.border=e.style.margin=e.style.padding="0px",e.style.zIndex="101",e.style.height="0px",(e=this.addDiv(e)).id="MathJax_MSIE_Frame",window.attachEvent("onscroll",this.MoveFrame),window.attachEvent("onresize",this.MoveFrame),this.MoveFrame()),this.div=this.addDiv(e),this.div.style.display="none",this.text=this.div.appendChild(document.createTextNode(""))}return!0},addDiv:function addDiv(t){var e=document.createElement("div");return e.id="MathJax_Message",t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e),e},MoveFrame:function MoveFrame(){var t=MathJax.Message.quirks?document.body:document.documentElement,e=MathJax.Message.frame;e.style.left=t.scrollLeft+"px",e.style.top=t.scrollTop+"px",e.style.width=t.clientWidth+"px",(e=e.firstChild).style.height=t.clientHeight+"px"},localize:function localize(t){return MathJax.Localization._(t,t)},filterText:function filterText(t,e,n){return"simple"===MathJax.Hub.config.messageStyle&&("LoadFile"===n?(this.loading||(this.loading=this.localize("Loading")+" "),t=this.loading,this.loading+="."):"ProcessMath"===n?(this.processing||(this.processing=this.localize("Processing")+" "),t=this.processing,this.processing+="."):"TypesetMath"===n&&(this.typesetting||(this.typesetting=this.localize("Typesetting")+" "),t=this.typesetting,this.typesetting+=".")),t},Set:function Set(t,e,n){null==e&&(e=this.log.length,this.log[e]={});var r="";if(t instanceof Array){(r=t[0])instanceof Array&&(r=r[1]);try{t=MathJax.Localization._.apply(MathJax.Localization,t)}catch(r){if(!r.restart)throw r;if(!r.restart.called)return null==this.log[e].restarted&&(this.log[e].restarted=0),this.log[e].restarted++,delete this.log[e].cleared,MathJax.Callback.After(["Set",this,t,e,n],r.restart),e}}return this.timer&&(clearTimeout(this.timer),delete this.timer),this.log[e].text=t,this.log[e].filteredText=t=this.filterText(t,e,r),void 0===this.log[e].next&&(this.log[e].next=this.current,null!=this.current&&(this.log[this.current].prev=e),this.current=e),this.current===e&&"none"!==MathJax.Hub.config.messageStyle&&(this.Init()?(this.textNodeBug?this.div.innerHTML=t:this.text.nodeValue=t,this.div.style.display="",this.status&&(window.status="",delete this.status)):(window.status=t,this.status=!0)),this.log[e].restarted&&(this.log[e].cleared&&(n=0),0==--this.log[e].restarted&&delete this.log[e].cleared),n?setTimeout(MathJax.Callback(["Clear",this,e]),n):0==n&&this.Clear(e,0),e},Clear:function Clear(t,e){null!=this.log[t].prev&&(this.log[this.log[t].prev].next=this.log[t].next),null!=this.log[t].next&&(this.log[this.log[t].next].prev=this.log[t].prev),this.current===t&&(this.current=this.log[t].next,this.text?(null==this.div.parentNode&&this.Init(),null==this.current?(this.timer&&(clearTimeout(this.timer),delete this.timer),null==e&&(e=600),0===e?this.Remove():this.timer=setTimeout(MathJax.Callback(["Remove",this]),e)):"none"!==MathJax.Hub.config.messageStyle&&(this.textNodeBug?this.div.innerHTML=this.log[this.current].filteredText:this.text.nodeValue=this.log[this.current].filteredText),this.status&&(window.status="",delete this.status)):this.status&&(window.status=null==this.current?"":this.log[this.current].text)),delete this.log[t].next,delete this.log[t].prev,delete this.log[t].filteredText,this.log[t].restarted&&(this.log[t].cleared=!0)},Remove:function Remove(){this.text.nodeValue="",this.div.style.display="none"},File:function File(t){var e=MathJax.Ajax.config.root;return t.substr(0,e.length)===e&&(t="[MathJax]"+t.substr(e.length)),this.Set(["LoadFile","Loading %1",t],null,null)},Log:function Log(){for(var t=[],e=1,n=this.log.length;e<n;e++)t[e]=this.log[e].text;return t.join("\n")}},MathJax.Hub={config:{root:"",config:[],styleSheets:[],styles:{".MathJax_Preview":{color:"#888"}},jax:[],extensions:[],preJax:null,postJax:null,displayAlign:"center",displayIndent:"0",preRemoveClass:"MathJax_Preview",showProcessingMessages:!0,messageStyle:"normal",delayStartupUntil:"none",skipStartupTypeset:!1,elements:[],positionToHash:!0,showMathMenu:!0,showMathMenuMSIE:!0,menuSettings:{zoom:"None",CTRL:!1,ALT:!1,CMD:!1,Shift:!1,discoverable:!1,zscale:"200%",renderer:"",font:"Auto",context:"MathJax",locale:"en",mpContext:!1,mpMouse:!1,texHints:!0},errorSettings:{message:["[",["MathProcessingError","Math Processing Error"],"]"],style:{color:"#CC0000","font-style":"italic"}}},preProcessors:MathJax.Callback.Hooks(!0),inputJax:{},outputJax:{order:{}},processUpdateTime:250,processUpdateDelay:10,signal:MathJax.Callback.Signal("Hub"),Config:function Config(t){this.Insert(this.config,t),this.config.Augment&&this.Augment(this.config.Augment)},CombineConfig:function CombineConfig(t,e){for(var n,r,i=this.config,o=0,s=(t=t.split(/\./)).length;o<s;o++)i[n=t[o]]||(i[n]={}),r=i,i=i[n];return r[n]=i=this.Insert(e,i),i},Register:{PreProcessor:function PreProcessor(){MathJax.Hub.preProcessors.Add.apply(MathJax.Hub.preProcessors,arguments)},MessageHook:function MessageHook(){return MathJax.Hub.signal.MessageHook.apply(MathJax.Hub.signal,arguments)},StartupHook:function StartupHook(){return MathJax.Hub.Startup.signal.MessageHook.apply(MathJax.Hub.Startup.signal,arguments)},LoadHook:function LoadHook(){return MathJax.Ajax.LoadHook.apply(MathJax.Ajax,arguments)}},getAllJax:function getAllJax(t){for(var e=[],n=this.elementScripts(t),r=0,i=n.length;r<i;r++)n[r].MathJax&&n[r].MathJax.elementJax&&e.push(n[r].MathJax.elementJax);return e},getJaxByType:function getJaxByType(t,e){for(var n=[],r=this.elementScripts(e),i=0,o=r.length;i<o;i++)r[i].MathJax&&r[i].MathJax.elementJax&&r[i].MathJax.elementJax.mimeType===t&&n.push(r[i].MathJax.elementJax);return n},getJaxByInputType:function getJaxByInputType(t,e){for(var n=[],r=this.elementScripts(e),i=0,o=r.length;i<o;i++)r[i].MathJax&&r[i].MathJax.elementJax&&r[i].type&&r[i].type.replace(/ *;(.|\s)*/,"")===t&&n.push(r[i].MathJax.elementJax);return n},getJaxFor:function getJaxFor(t){if("string"==typeof t&&(t=document.getElementById(t)),t&&t.MathJax)return t.MathJax.elementJax;if(t&&t.isMathJax){for(;t&&!t.jaxID;)t=t.parentNode;if(t)return MathJax.OutputJax[t.jaxID].getJaxFromMath(t)}return null},isJax:function isJax(t){if("string"==typeof t&&(t=document.getElementById(t)),t&&t.isMathJax)return 1;if(t&&null!=t.tagName&&"script"===t.tagName.toLowerCase()){if(t.MathJax)return t.MathJax.state===MathJax.ElementJax.STATE.PROCESSED?1:-1;if(t.type&&this.inputJax[t.type.replace(/ *;(.|\s)*/,"")])return-1}return 0},setRenderer:function setRenderer(t,e){if(t){if(MathJax.OutputJax[t]){this.config.menuSettings.renderer=t,null==e&&(e="jax/mml");var n=this.outputJax;return n[e]&&n[e].length&&t!==n[e][0].id?(n[e].unshift(MathJax.OutputJax[t]),this.signal.Post(["Renderer Selected",t])):null}this.config.menuSettings.renderer="";var r="[MathJax]/jax/output/"+t+"/config.js";return MathJax.Ajax.Require(r,["setRenderer",this,t,e])}},Queue:function Queue(){return this.queue.Push.apply(this.queue,arguments)},Typeset:function Typeset(t,e){if(!MathJax.isReady)return null;for(var n=this.elementCallback(t,e),r=MathJax.Callback.Queue(),i=0,o=n.elements.length;i<o;i++)n.elements[i]&&r.Push(["PreProcess",this,n.elements[i]],["Process",this,n.elements[i]]);return r.Push(n.callback)},PreProcess:function PreProcess(t,e){for(var n=this.elementCallback(t,e),r=MathJax.Callback.Queue(),i=0,o=n.elements.length;i<o;i++)n.elements[i]&&r.Push(["Post",this.signal,["Begin PreProcess",n.elements[i]]],arguments.callee.disabled?{}:["Execute",this.preProcessors,n.elements[i]],["Post",this.signal,["End PreProcess",n.elements[i]]]);return r.Push(n.callback)},Process:function Process(t,e){return this.takeAction("Process",t,e)},Update:function Update(t,e){return this.takeAction("Update",t,e)},Reprocess:function Reprocess(t,e){return this.takeAction("Reprocess",t,e)},Rerender:function Rerender(t,e){return this.takeAction("Rerender",t,e)},takeAction:function takeAction(t,e,n){for(var r=this.elementCallback(e,n),i=MathJax.Callback.Queue(["Clear",this.signal]),o=0,s=r.elements.length;o<s;o++)if(r.elements[o]){var u={scripts:[],start:(new Date).getTime(),i:0,j:0,jax:{},jaxIDs:[]};i.Push(["Post",this.signal,["Begin "+t,r.elements[o]]],["Post",this.signal,["Begin Math",r.elements[o],t]],["prepareScripts",this,t,r.elements[o],u],["Post",this.signal,["Begin Math Input",r.elements[o],t]],["processInput",this,u],["Post",this.signal,["End Math Input",r.elements[o],t]],["prepareOutput",this,u,"preProcess"],["Post",this.signal,["Begin Math Output",r.elements[o],t]],["processOutput",this,u],["Post",this.signal,["End Math Output",r.elements[o],t]],["prepareOutput",this,u,"postProcess"],["Post",this.signal,["End Math",r.elements[o],t]],["Post",this.signal,["End "+t,r.elements[o]]])}return i.Push(r.callback)},scriptAction:{Process:function Process(t){},Update:function Update(t){var e=t.MathJax.elementJax;e&&e.needsUpdate()?(e.Remove(!0),t.MathJax.state=e.STATE.UPDATE):t.MathJax.state=e.STATE.PROCESSED},Reprocess:function Reprocess(t){var e=t.MathJax.elementJax;e&&(e.Remove(!0),t.MathJax.state=e.STATE.UPDATE)},Rerender:function Rerender(t){var e=t.MathJax.elementJax;e&&(e.Remove(!0),t.MathJax.state=e.STATE.OUTPUT)}},prepareScripts:function prepareScripts(t,e,n){if(!arguments.callee.disabled)for(var r=this.elementScripts(e),i=MathJax.ElementJax.STATE,o=0,s=r.length;o<s;o++){var u=r[o];u.type&&this.inputJax[u.type.replace(/ *;(.|\n)*/,"")]&&(u.MathJax&&(u.MathJax.elementJax&&u.MathJax.elementJax.hover&&MathJax.Extension.MathEvents.Hover.ClearHover(u.MathJax.elementJax),u.MathJax.state!==i.PENDING&&this.scriptAction[t](u)),u.MathJax||(u.MathJax={state:i.PENDING}),u.MathJax.state!==i.PROCESSED&&n.scripts.push(u))}},checkScriptSiblings:function checkScriptSiblings(t){if(!t.MathJax.checked){var e=this.config,n=t.previousSibling;if(n&&"#text"===n.nodeName){var r,i,o=t.nextSibling;o&&"#text"!==o.nodeName&&(o=null),e.preJax&&("string"==typeof e.preJax&&(e.preJax=new RegExp(e.preJax+"$")),r=n.nodeValue.match(e.preJax)),e.postJax&&o&&("string"==typeof e.postJax&&(e.postJax=new RegExp("^"+e.postJax)),i=o.nodeValue.match(e.postJax)),!r||e.postJax&&!i||(n.nodeValue=n.nodeValue.replace(e.preJax,r.length>1?r[1]:""),n=null),!i||e.preJax&&!r||(o.nodeValue=o.nodeValue.replace(e.postJax,i.length>1?i[1]:"")),n&&!n.nodeValue.match(/\S/)&&(n=n.previousSibling)}e.preRemoveClass&&n&&n.className===e.preRemoveClass&&(t.MathJax.preview=n),t.MathJax.checked=1}},processInput:function processInput(t){var e,n,r,i=MathJax.ElementJax.STATE,o=t.scripts.length;try{for(;t.i<o;)if(n=t.scripts[t.i])if((r=n.previousSibling)&&"MathJax_Error"===r.className&&r.parentNode.removeChild(r),n.MathJax&&n.MathJax.state!==i.PROCESSED){if(n.MathJax.elementJax&&n.MathJax.state!==i.UPDATE)n.MathJax.state===i.OUTPUT&&this.saveScript(n.MathJax.elementJax,t,n,i);else{this.checkScriptSiblings(n);var s=n.type.replace(/ *;(.|\s)*/,"");if("function"==typeof(e=this.inputJax[s].Process(n,t))){if(e.called)continue;this.RestartAfter(e)}e.Attach(n,this.inputJax[s].id),this.saveScript(e,t,n,i)}t.i++;var u=(new Date).getTime();u-t.start>this.processUpdateTime&&t.i<t.scripts.length&&(t.start=u,this.RestartAfter(MathJax.Callback.Delay(1)))}else t.i++;else t.i++}catch(e){return this.processError(e,t,"Input")}return t.scripts.length&&this.config.showProcessingMessages&&MathJax.Message.Set(["ProcessMath","Processing math: %1%%",100],0),t.start=(new Date).getTime(),t.i=t.j=0,null},saveScript:function saveScript(t,e,n,r){if(!this.outputJax[t.mimeType])throw n.MathJax.state=r.UPDATE,Error("No output jax registered for "+t.mimeType);t.outputJax=this.outputJax[t.mimeType][0].id,e.jax[t.outputJax]||(0===e.jaxIDs.length?e.jax[t.outputJax]=e.scripts:(1===e.jaxIDs.length&&(e.jax[e.jaxIDs[0]]=e.scripts.slice(0,e.i)),e.jax[t.outputJax]=[]),e.jaxIDs.push(t.outputJax)),e.jaxIDs.length>1&&e.jax[t.outputJax].push(n),n.MathJax.state=r.OUTPUT},prepareOutput:function prepareOutput(t,e){for(;t.j<t.jaxIDs.length;){var n=t.jaxIDs[t.j],r=MathJax.OutputJax[n];if(r[e])try{var i=r[e](t);if("function"==typeof i){if(i.called)continue;this.RestartAfter(i)}}catch(r){return r.restart||(MathJax.Message.Set(["PrepError","Error preparing %1 output (%2)",n,e],null,600),MathJax.Hub.lastPrepError=r,t.j++),MathJax.Callback.After(["prepareOutput",this,t,e],r.restart)}t.j++}return null},processOutput:function processOutput(t){var e,n=MathJax.ElementJax.STATE,r=t.scripts.length;try{for(;t.i<r;)if((e=t.scripts[t.i])&&e.MathJax&&!e.MathJax.error){var i=e.MathJax.elementJax;if(i){MathJax.OutputJax[i.outputJax].Process(e,t),e.MathJax.state=n.PROCESSED,t.i++,e.MathJax.preview&&(e.MathJax.preview.innerHTML=""),this.signal.Post(["New Math",i.inputID]);var o=(new Date).getTime();o-t.start>this.processUpdateTime&&t.i<t.scripts.length&&(t.start=o,this.RestartAfter(MathJax.Callback.Delay(this.processUpdateDelay)))}else t.i++}else t.i++}catch(e){return this.processError(e,t,"Output")}return t.scripts.length&&this.config.showProcessingMessages&&(MathJax.Message.Set(["TypesetMath","Typesetting math: %1%%",100],0),MathJax.Message.Clear(0)),t.i=t.j=0,null},processMessage:function processMessage(t,e){var n=Math.floor(t.i/t.scripts.length*100),r="Output"===e?["TypesetMath","Typesetting math: %1%%"]:["ProcessMath","Processing math: %1%%"];this.config.showProcessingMessages&&MathJax.Message.Set(r.concat(n),0)},processError:function processError(t,e,n){if(!t.restart){if(!this.config.errorSettings.message)throw t;this.formatError(e.scripts[e.i],t),e.i++}return this.processMessage(e,n),MathJax.Callback.After(["process"+n,this,e],t.restart)},formatError:function formatError(t,e){var n="Error: "+e.message+"\n";e.sourceURL&&(n+="\nfile: "+e.sourceURL),e.line&&(n+="\nline: "+e.line),t.MathJax.error=MathJax.OutputJax.Error.Jax(n,t);var r=this.config.errorSettings,i=MathJax.Localization._(r.messageId,r.message),o=MathJax.HTML.Element("span",{className:"MathJax_Error",jaxID:"Error",isMathJax:!0},i);MathJax.Extension.MathEvents?(o.oncontextmenu=MathJax.Extension.MathEvents.Event.Menu,o.onmousedown=MathJax.Extension.MathEvents.Event.Mousedown):MathJax.Ajax.Require("[MathJax]/extensions/MathEvents.js",(function(){o.oncontextmenu=MathJax.Extension.MathEvents.Event.Menu,o.onmousedown=MathJax.Extension.MathEvents.Event.Mousedown})),t.parentNode.insertBefore(o,t),t.MathJax.preview&&(t.MathJax.preview.innerHTML=""),this.lastError=e,this.signal.Post(["Math Processing Error",t,e])},RestartAfter:function RestartAfter(t){throw this.Insert(Error("restart"),{restart:MathJax.Callback(t)})},elementCallback:function elementCallback(t,e){if(null==e&&(t instanceof Array||"function"==typeof t))try{MathJax.Callback(t),e=t,t=null}catch(t){}null==t&&(t=this.config.elements||[]),t instanceof Array||(t=[t]);for(var n=0,r=(t=[].concat(t)).length;n<r;n++)"string"==typeof t[n]&&(t[n]=document.getElementById(t[n]));return document.body||(document.body=document.getElementsByTagName("body")[0]),0==t.length&&t.push(document.body),e||(e={}),{elements:t,callback:e}},elementScripts:function elementScripts(t){if(t instanceof Array){for(var e=[],n=0,r=t.length;n<r;n++)e.push.apply(e,this.elementScripts(t[n]));return e}return"string"==typeof t&&(t=document.getElementById(t)),document.body||(document.body=document.getElementsByTagName("body")[0]),null==t&&(t=document.body),null!=t.tagName&&"script"===t.tagName.toLowerCase()?[t]:t.getElementsByTagName("script")},Insert:function Insert(t,e){for(var n in e)e.hasOwnProperty(n)&&("object"!==_typeof(e[n])||e[n]instanceof Array||"object"!==_typeof(t[n])&&"function"!=typeof t[n]?t[n]=e[n]:this.Insert(t[n],e[n]));return t},SplitList:"trim"in String.prototype?function(t){return t.trim().split(/\s+/)}:function(t){return t.replace(/^\s+/,"").replace(/\s+$/,"").split(/\s+/)}},MathJax.Hub.Insert(MathJax.Hub.config.styles,MathJax.Message.styles),MathJax.Hub.Insert(MathJax.Hub.config.styles,{".MathJax_Error":MathJax.Hub.config.errorSettings.style}),MathJax.Extension={},MathJax.Hub.Configured=MathJax.Callback({}),MathJax.Hub.Startup={script:"",queue:MathJax.Callback.Queue(),signal:MathJax.Callback.Signal("Startup"),params:{},Config:function Config(){this.queue.Push(["Post",this.signal,"Begin Config"]),this.params.locale&&(MathJax.Localization.resetLocale(this.params.locale),MathJax.Hub.config.menuSettings.locale=this.params.locale);var t=MathJax.HTML.Cookie.Get("user");if((t.URL||t.Config)&&(confirm(MathJax.Localization._("CookieConfig","MathJax has found a user-configuration cookie that includes code to be run. Do you want to run it?\n\n(You should press Cancel unless you set up the cookie yourself.)"))?(t.URL&&this.queue.Push(["Require",MathJax.Ajax,t.URL]),t.Config&&this.queue.Push(new Function(t.Config))):MathJax.HTML.Cookie.Set("user",{})),this.params.config)for(var e=this.params.config.split(/,/),n=0,r=e.length;n<r;n++)e[n].match(/\.js$/)||(e[n]+=".js"),this.queue.Push(["Require",MathJax.Ajax,this.URL("config",e[n])]);this.queue.Push(["Config",MathJax.Hub,MathJax.AuthorConfig]),this.script.match(/\S/)&&this.queue.Push(this.script+";\n1;"),this.queue.Push(["ConfigDelay",this],["ConfigBlocks",this],[function(t){return t.loadArray(MathJax.Hub.config.config,"config",null,!0)},this],["Post",this.signal,"End Config"])},ConfigDelay:function ConfigDelay(){var t=this.params.delayStartupUntil||MathJax.Hub.config.delayStartupUntil;return"onload"===t?this.onload:"configured"===t?MathJax.Hub.Configured:t},ConfigBlocks:function ConfigBlocks(){for(var t=document.getElementsByTagName("script"),e=null,n=MathJax.Callback.Queue(),r=0,i=t.length;r<i;r++){var o=String(t[r].type).replace(/ /g,"");o.match(/^text\/x-mathjax-config(;.*)?$/)&&!o.match(/;executed=true/)&&(t[r].type+=";executed=true",e=n.Push(t[r].innerHTML+";\n1;"))}return e},Cookie:function Cookie(){return this.queue.Push(["Post",this.signal,"Begin Cookie"],["Get",MathJax.HTML.Cookie,"menu",MathJax.Hub.config.menuSettings],[function(t){t.menuSettings.locale&&MathJax.Localization.resetLocale(t.menuSettings.locale);var e=t.menuSettings.renderer,n=t.jax;if(e){var r="output/"+e;n.sort();for(var i=0,o=n.length;i<o&&"output/"!==n[i].substr(0,7);i++);if(i==o-1)n.pop();else for(;i<o;){if(n[i]===r){n.splice(i,1);break}i++}n.unshift(r)}},MathJax.Hub.config],["Post",this.signal,"End Cookie"])},Styles:function Styles(){return this.queue.Push(["Post",this.signal,"Begin Styles"],["loadArray",this,MathJax.Hub.config.styleSheets,"config"],["Styles",MathJax.Ajax,MathJax.Hub.config.styles],["Post",this.signal,"End Styles"])},Jax:function Jax(){for(var t=MathJax.Hub.config,e=MathJax.Hub.outputJax,n=0,r=t.jax.length,i=0;n<r;n++){var o=t.jax[n].substr(7);"output/"===t.jax[n].substr(0,7)&&null==e.order[o]&&(e.order[o]=i,i++)}return MathJax.Callback.Queue().Push(["Post",this.signal,"Begin Jax"],["loadArray",this,t.jax,"jax","config.js"],["Post",this.signal,"End Jax"])},Extensions:function Extensions(){return MathJax.Callback.Queue().Push(["Post",this.signal,"Begin Extensions"],["loadArray",this,MathJax.Hub.config.extensions,"extensions"],["Post",this.signal,"End Extensions"])},Message:function Message(){MathJax.Message.Init(!0)},Menu:function Menu(){var t,e=MathJax.Hub.config.menuSettings,n=MathJax.Hub.outputJax;for(var r in n)if(n.hasOwnProperty(r)&&n[r].length){t=n[r];break}t&&t.length&&(e.renderer&&e.renderer!==t[0].id&&t.unshift(MathJax.OutputJax[e.renderer]),e.renderer=t[0].id)},Hash:function Hash(){if(MathJax.Hub.config.positionToHash&&document.location.hash&&document.body&&document.body.scrollIntoView){var t=document.location.hash.substr(1),e=document.getElementById(t);if(!e)for(var n=document.getElementsByTagName("a"),r=0,i=n.length;r<i;r++)if(n[r].name===t){e=n[r];break}if(e){for(;!e.scrollIntoView;)e=e.parentNode;(e=this.HashCheck(e))&&e.scrollIntoView&&setTimeout((function(){e.scrollIntoView(!0)}),1)}}},HashCheck:function HashCheck(t){if(t.isMathJax){var e=MathJax.Hub.getJaxFor(t);e&&MathJax.OutputJax[e.outputJax].hashCheck&&(t=MathJax.OutputJax[e.outputJax].hashCheck(t))}return t},MenuZoom:function MenuZoom(){MathJax.Extension.MathMenu?setTimeout(MathJax.Callback(["loadDomain",MathJax.Localization,"MathMenu"]),1e3):setTimeout((function(){MathJax.Callback.Queue(["Require",MathJax.Ajax,"[MathJax]/extensions/MathMenu.js",{}],["loadDomain",MathJax.Localization,"MathMenu"])}),1e3),MathJax.Extension.MathZoom||setTimeout(MathJax.Callback(["Require",MathJax.Ajax,"[MathJax]/extensions/MathZoom.js",{}]),2e3)},onLoad:function onLoad(){var t=this.onload=MathJax.Callback((function(){MathJax.Hub.Startup.signal.Post("onLoad")}));if(document.body&&document.readyState)if(MathJax.Hub.Browser.isMSIE){if("complete"===document.readyState)return[t]}else if("loading"!==document.readyState)return[t];return window.addEventListener?(window.addEventListener("load",t,!1),this.params.noDOMContentEvent||window.addEventListener("DOMContentLoaded",t,!1)):window.attachEvent?window.attachEvent("onload",t):window.onload=t,t},Typeset:function Typeset(t,e){return MathJax.Hub.config.skipStartupTypeset?function(){}:this.queue.Push(["Post",this.signal,"Begin Typeset"],["Typeset",MathJax.Hub,t,e],["Post",this.signal,"End Typeset"])},URL:function URL(t,e){return e.match(/^([a-z]+:\/\/|\[|\/)/)||(e="[MathJax]/"+t+"/"+e),e},loadArray:function loadArray(t,e,n,r){if(t&&(t instanceof Array||(t=[t]),t.length)){for(var i,o=MathJax.Callback.Queue(),s={},u=0,l=t.length;u<l;u++)i=this.URL(e,t[u]),n&&(i+="/"+n),r?o.Push(["Require",MathJax.Ajax,i,s]):o.Push(MathJax.Ajax.Require(i,s));return o.Push({})}return null}},function(t){var e=window[t],n="["+t+"]",r=e.Hub,i=e.Ajax,o=e.Callback,s=MathJax.Object.Subclass({JAXFILE:"jax.js",require:null,config:{},Init:function Init(t,e){return 0===arguments.length?this:this.constructor.Subclass(t,e)()},Augment:function Augment(t,e){var n=this.constructor,i={};if(null!=t){for(var o in t)t.hasOwnProperty(o)&&("function"==typeof t[o]?n.protoFunction(o,t[o]):i[o]=t[o]);t.toString!==n.prototype.toString&&t.toString!=={}.toString&&n.protoFunction("toString",t.toString)}return r.Insert(n.prototype,i),n.Augment(null,e),this},Translate:function Translate(t,e){throw Error(this.directory+"/"+this.JAXFILE+" failed to define the Translate() method")},Register:function Register(t){},Config:function Config(){this.config=r.CombineConfig(this.id,this.config),this.config.Augment&&this.Augment(this.config.Augment)},Startup:function Startup(){},loadComplete:function loadComplete(t){if("config.js"===t)return i.loadComplete(this.directory+"/"+t);var e=o.Queue();return e.Push(r.Register.StartupHook("End Config",{}),["Post",r.Startup.signal,this.id+" Jax Config"],["Config",this],["Post",r.Startup.signal,this.id+" Jax Require"],[function(t){return MathJax.Hub.Startup.loadArray(t.require,this.directory)},this],[function(t,e){return MathJax.Hub.Startup.loadArray(t.extensions,"extensions/"+e)},this.config||{},this.id],["Post",r.Startup.signal,this.id+" Jax Startup"],["Startup",this],["Post",r.Startup.signal,this.id+" Jax Ready"]),this.copyTranslate&&e.Push([function(t){t.preProcess=t.preTranslate,t.Process=t.Translate,t.postProcess=t.postTranslate},this.constructor.prototype]),e.Push(["loadComplete",i,this.directory+"/"+t])}},{id:"Jax",version:"2.3",directory:n+"/jax",extensionDir:n+"/extensions"});e.InputJax=s.Subclass({elementJax:"mml",sourceMenuTitle:["Original","Original Form"],copyTranslate:!0,Process:function Process(t,n){var s,u=o.Queue(),l=this.elementJax;l instanceof Array||(l=[l]);for(var h=0,f=l.length;h<f;h++)s=e.ElementJax.directory+"/"+l[h]+"/"+this.JAXFILE,this.require?this.require instanceof Array||(this.require=[this.require]):this.require=[],this.require.push(s),u.Push(i.Require(s));s=this.directory+"/"+this.JAXFILE;var p=u.Push(i.Require(s));return p.called||(this.constructor.prototype.Process=function(){if(!p.called)return p;throw Error(s+" failed to load properly")}),(l=r.outputJax["jax/"+l[0]])&&u.Push(i.Require(l[0].directory+"/"+this.JAXFILE)),u.Push({})},needsUpdate:function needsUpdate(t){var n=t.SourceElement();return t.originalText!==e.HTML.getScript(n)},Register:function Register(t){r.inputJax||(r.inputJax={}),r.inputJax[t]=this}},{id:"InputJax",version:"2.3",directory:s.directory+"/input",extensionDir:s.extensionDir}),e.OutputJax=s.Subclass({copyTranslate:!0,preProcess:function preProcess(t){var e,n=this.directory+"/"+this.JAXFILE;return this.constructor.prototype.preProcess=function(t){if(!e.called)return e;throw Error(n+" failed to load properly")},e=i.Require(n)},Register:function Register(t){var n=r.outputJax;n[t]||(n[t]=[]),n[t].length&&(this.id===r.config.menuSettings.renderer||(n.order[this.id]||0)<(n.order[n[t][0].id]||0))?n[t].unshift(this):n[t].push(this),this.require?this.require instanceof Array||(this.require=[this.require]):this.require=[],this.require.push(e.ElementJax.directory+"/"+t.split(/\//)[1]+"/"+this.JAXFILE)},Remove:function Remove(t){}},{id:"OutputJax",version:"2.3",directory:s.directory+"/output",extensionDir:s.extensionDir,fontDir:n+(e.isPacked?"":"/..")+"/fonts",imageDir:n+(e.isPacked?"":"/..")+"/images"}),e.ElementJax=s.Subclass({Init:function Init(t,e){return this.constructor.Subclass(t,e)},inputJax:null,outputJax:null,inputID:null,originalText:"",mimeType:"",sourceMenuTitle:["MathMLcode","MathML Code"],Text:function Text(t,n){var i=this.SourceElement();return e.HTML.setScript(i,t),i.MathJax.state=this.STATE.UPDATE,r.Update(i,n)},Reprocess:function Reprocess(t){var e=this.SourceElement();return e.MathJax.state=this.STATE.UPDATE,r.Reprocess(e,t)},Update:function Update(t){return this.Rerender(t)},Rerender:function Rerender(t){var e=this.SourceElement();return e.MathJax.state=this.STATE.OUTPUT,r.Process(e,t)},Remove:function Remove(t){this.hover&&this.hover.clear(this),e.OutputJax[this.outputJax].Remove(this),t||(r.signal.Post(["Remove Math",this.inputID]),this.Detach())},needsUpdate:function needsUpdate(){return e.InputJax[this.inputJax].needsUpdate(this)},SourceElement:function SourceElement(){return document.getElementById(this.inputID)},Attach:function Attach(t,n){var r=t.MathJax.elementJax;return t.MathJax.state===this.STATE.UPDATE?r.Clone(this):(r=t.MathJax.elementJax=this,t.id?this.inputID=t.id:(t.id=this.inputID=e.ElementJax.GetID(),this.newID=1)),r.originalText=e.HTML.getScript(t),r.inputJax=n,r.root&&(r.root.inputID=r.inputID),r},Detach:function Detach(){var t=this.SourceElement();if(t){try{delete t.MathJax}catch(e){t.MathJax=null}this.newID&&(t.id="")}},Clone:function Clone(t){var e;for(e in this)this.hasOwnProperty(e)&&void 0===t[e]&&"newID"!==e&&delete this[e];for(e in t)t.hasOwnProperty(e)&&(void 0===this[e]||this[e]!==t[e]&&"inputID"!==e)&&(this[e]=t[e])}},{id:"ElementJax",version:"2.3",directory:s.directory+"/element",extensionDir:s.extensionDir,ID:0,STATE:{PENDING:1,PROCESSED:2,UPDATE:3,OUTPUT:4},GetID:function GetID(){return this.ID++,"MathJax-Element-"+this.ID},Subclass:function Subclass(){var t=s.Subclass.apply(this,arguments);return t.loadComplete=this.prototype.loadComplete,t}}),e.ElementJax.prototype.STATE=e.ElementJax.STATE,e.OutputJax.Error={id:"Error",version:"2.3",config:{},ContextMenu:function ContextMenu(){return e.Extension.MathEvents.Event.ContextMenu.apply(e.Extension.MathEvents.Event,arguments)},Mousedown:function Mousedown(){return e.Extension.MathEvents.Event.AltContextMenu.apply(e.Extension.MathEvents.Event,arguments)},getJaxFromMath:function getJaxFromMath(t){return(t.nextSibling.MathJax||{}).error},Jax:function Jax(t,e){return{inputJax:(MathJax.Hub.inputJax[e.type.replace(/ *;(.|\s)*/,"")]||{id:"Error"}).id,outputJax:"Error",sourceMenuTitle:["ErrorMessage","Error Message"],sourceMenuFormat:"Error",originalText:MathJax.HTML.getScript(e),errorText:t}}},e.InputJax.Error={id:"Error",version:"2.3",config:{},sourceMenuTitle:["Original","Original Form"]}}("MathJax"),function(t){var e=window[t];e||(e=window[t]={});var n=e.Hub,r=n.Startup,i=n.config,o=document.getElementsByTagName("head")[0];o||(o=document.childNodes[0]);for(var s=(document.documentElement||document).getElementsByTagName("script"),u=new RegExp("(^|/)"+t+"\\.js(\\?.*)?$"),l=s.length-1;l>=0;l--)if((s[l].src||"").match(u)){if(r.script=s[l].innerHTML,RegExp.$2)for(var h=RegExp.$2.substr(1).split(/\&/),f=0,p=h.length;f<p;f++){var d=h[f].match(/(.*)=(.*)/);d&&(r.params[unescape(d[1])]=unescape(d[2]))}i.root=s[l].src.replace(/(^|\/)[^\/]*(\?.*)?$/,"").replace(/^(https?:\/\/(cdn.mathjax.org|c328740.ssl.cf1.rackcdn.com)\/mathjax\/)(latest)/,"$1"+e.version+"-$3");break}e.Ajax.config=i;var m={isMac:"Mac"===navigator.platform.substr(0,3),isPC:"Win"===navigator.platform.substr(0,3),isMSIE:null!=window.ActiveXObject&&null!=window.clipboardData,isFirefox:null!=navigator.userAgent.match(/Gecko/)&&null==navigator.userAgent.match(/KHTML/),isSafari:null!=navigator.userAgent.match(/ (Apple)?WebKit\//)&&(!window.chrome||null==window.chrome.loadTimes),isChrome:null!=window.chrome&&null!=window.chrome.loadTimes,isOpera:null!=window.opera&&null!=window.opera.version,isKonqueror:window.hasOwnProperty&&window.hasOwnProperty("konqueror")&&"KDE"==navigator.vendor,versionAtLeast:function versionAtLeast(t){for(var e=this.version.split("."),n=0,r=(t=new String(t).split(".")).length;n<r;n++)if(e[n]!=t[n])return parseInt(e[n]||"0")>=parseInt(t[n]);return!0},Select:function Select(t){var e=t[n.Browser];return e?e(n.Browser):null}},v=navigator.userAgent.replace(/^Mozilla\/(\d+\.)+\d+ /,"").replace(/[a-z][-a-z0-9._: ]+\/\d+[^ ]*-[^ ]*\.([a-z][a-z])?\d+ /i,"").replace(/Gentoo |Ubuntu\/(\d+\.)*\d+ (\([^)]*\) )?/,"");for(var x in n.Browser=n.Insert(n.Insert(new String("Unknown"),{version:"0.0"}),m),m)if(m.hasOwnProperty(x)&&m[x]&&"is"===x.substr(0,2)){if("Mac"===(x=x.slice(2))||"PC"===x)continue;n.Browser=n.Insert(new String(x),m);var y=new RegExp(".*(Version)/((?:\\d+\\.)+\\d+)|.*("+x+")"+("MSIE"==x?" ":"/")+"((?:\\d+\\.)*\\d+)|(?:^|\\(| )([a-z][-a-z0-9._: ]+|(?:Apple)?WebKit)/((?:\\d+\\.)+\\d+)").exec(v)||["","","","unknown","0.0"];n.Browser.name="Version"==y[1]?x:y[3]||y[5],n.Browser.version=y[2]||y[4]||y[6];break}n.Browser.Select({Safari:function Safari(t){var e=parseInt(String(t.version).split(".")[0]);e>85&&(t.webkit=t.version),e>=534?t.version="5.1":e>=533?t.version="5.0":e>=526?t.version="4.0":e>=525?t.version="3.1":e>500?t.version="3.0":e>400?t.version="2.0":e>85&&(t.version="1.0"),t.isMobile=null!=navigator.appVersion.match(/Mobile/i),t.noContextMenu=t.isMobile},Firefox:function Firefox(t){if(("0.0"===t.version||null==navigator.userAgent.match(/Firefox/))&&"Gecko"===navigator.product){var e=navigator.userAgent.match(/[\/ ]rv:(\d+\.\d.*?)[\) ]/);if(e)t.version=e[1];else{var n=(navigator.buildID||navigator.productSub||"0").substr(0,8);n>="20111220"?t.version="9.0":n>="20111120"?t.version="8.0":n>="20110927"?t.version="7.0":n>="20110816"?t.version="6.0":n>="20110621"?t.version="5.0":n>="20110320"?t.version="4.0":n>="20100121"?t.version="3.6":n>="20090630"?t.version="3.5":n>="20080617"?t.version="3.0":n>="20061024"&&(t.version="2.0")}}t.isMobile=null!=navigator.appVersion.match(/Android/i)||null!=navigator.userAgent.match(/ Fennec\//)||null!=navigator.userAgent.match(/Mobile/)},Opera:function Opera(t){t.version=opera.version()},MSIE:function MSIE(t){t.isIE9=!(!document.documentMode||!window.performance&&!window.msPerformance),MathJax.HTML.setScriptBug=!t.isIE9||document.documentMode<9;var e=!1;try{new ActiveXObject("MathPlayer.Factory.1"),t.hasMathPlayer=e=!0}catch(t){}try{if(e&&!r.params.NoMathPlayer){var n=document.createElement("object");n.id="mathplayer",n.classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987",document.getElementsByTagName("head")[0].appendChild(n),document.namespaces.add("m","https://web.archive.org/web/20131208123133/http://www.w3.org/1998/Math/MathML"),t.mpNamespace=!0,!document.readyState||"loading"!==document.readyState&&"interactive"!==document.readyState||(document.write('<?import namespace="m" implementation="#MathPlayer">'),t.mpImported=!0)}else document.namespaces.add("mjx_IE_fix","https://web.archive.org/web/20131208123133/http://www.w3.org/1999/xlink")}catch(t){}}}),n.Browser.Select(MathJax.Message.browsers),e.AuthorConfig&&"function"==typeof e.AuthorConfig.AuthorInit&&e.AuthorConfig.AuthorInit(),n.queue=e.Callback.Queue(),n.queue.Push(["Post",r.signal,"Begin"],["Config",r],["Cookie",r],["Styles",r],["Message",r],(function(){return e.Callback.Queue(r.Jax(),r.Extensions()).Push({})}),["Menu",r],r.onLoad(),(function(){MathJax.isReady=!0}),["Typeset",r],["Hash",r],["MenuZoom",r],["Post",r.signal,"End"])}("MathJax")));var wo=Object.freeze({__proto__:null});export default ni;
//# sourceMappingURL=ext-mathjax.js.map