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

11 lines
110 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.

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)}))}}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t){var e={exports:{}};return t(e,e.exports),e.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$1=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$1(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}},M=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{M(e,t,n)}catch(r){e[t]=n}return n},S=e["__core-js_shared__"]||setGlobal("__core-js_shared__",{}),w=Function.toString;"function"!=typeof S.inspectSource&&(S.inspectSource=function(t){return w.call(t)});var E,J,T,P=S.inspectSource,k=e.WeakMap,A="function"==typeof k&&/native code/.test(P(k)),C=createCommonjsModule((function(t){(t.exports=function(t,e){return S[t]||(S[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.9.1",mode:"global",copyright:"© 2021 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=S.state||(S.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,M(t,B,e),e},J=function(t){return has$1(t,B)?t[B]:{}},T=function(t){return has$1(t,B)}}var q,G,z={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}}},$=createCommonjsModule((function(t){var n=z.get,r=z.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$1(o,"name")||M(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:M(t,n,o)):h?t[n]=o:setGlobal(n,o)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&n(this).source||P(this)}))})),V=e,aFunction$1=function(t){return"function"==typeof t?t:void 0},getBuiltIn=function(t,n){return arguments.length<2?aFunction$1(V[t])||aFunction$1(e[t]):V[t]&&V[t][n]||e[t]&&e[t][n]},K=Math.ceil,Q=Math.floor,toInteger=function(t){return isNaN(t=+t)?0:(t>0?Q:K)(t)},W=Math.min,toLength=function(t){return t>0?W(toInteger(t),9007199254740991):0},X=Math.max,Y=Math.min,toAbsoluteIndex=function(t,e){var n=toInteger(t);return n<0?X(n+e,0):Y(n,e)},createMethod$3=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}},Z={includes:createMethod$3(!0),indexOf:createMethod$3(!1)}.indexOf,objectKeysInternal=function(t,e){var n,r=toIndexedObject(t),i=0,o=[];for(n in r)!has$1(R,n)&&has$1(r,n)&&o.push(n);for(;e.length>i;)has$1(r,n=e[i++])&&(~Z(o,n)||o.push(n));return o},tt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],et=tt.concat("length","prototype"),nt={f:Object.getOwnPropertyNames||function getOwnPropertyNames(t){return objectKeysInternal(t,et)}},rt={f:Object.getOwnPropertySymbols},it=getBuiltIn("Reflect","ownKeys")||function ownKeys(t){var e=nt.f(anObject(t)),n=rt.f;return n?e.concat(n(t)):e},copyConstructorProperties=function(t,e){for(var n=it(e),r=y.f,i=v.f,o=0;o<n.length;o++){var s=n[o];has$1(t,s)||r(t,s,i(e,s))}},ot=/#|\.prototype\./,isForced=function(t,e){var n=st[at(t)];return n==ct||n!=ut&&("function"==typeof e?fails(e):!!e)},at=isForced.normalize=function(t){return String(t).replace(ot,".").toLowerCase()},st=isForced.data={},ut=isForced.NATIVE="N",ct=isForced.POLYFILL="P",lt=isForced,ht=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=ht(r,i))&&u.value:r[i],!lt(h?i:l+(f?".":"#")+i,t.forced)&&void 0!==o){if(typeof s==typeof o)continue;copyConstructorProperties(s,o)}(t.sham||o&&o.sham)&&M(s,"sham",!0),$(r,i,s,t)}},ft="process"==classofRaw(e.process),pt=getBuiltIn("navigator","userAgent")||"",dt=e.process,gt=dt&&dt.versions,mt=gt&&gt.v8;mt?G=(q=mt.split("."))[0]+q[1]:pt&&(!(q=pt.match(/Edge\/(\d+)/))||q[1]>=74)&&(q=pt.match(/Chrome\/(\d+)/))&&(G=q[1]);var vt,xt=G&&+G,yt=!!Object.getOwnPropertySymbols&&!fails((function(){return!Symbol.sham&&(ft?38===xt:xt>37&&xt<41)})),bt=yt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Mt=Array.isArray||function isArray(t){return"Array"==classofRaw(t)},toObject=function(t){return Object(requireObjectCoercible(t))},St=Object.keys||function keys(t){return objectKeysInternal(t,tt)},wt=n?Object.defineProperties:function defineProperties(t,e){anObject(t);for(var n,r=St(e),i=r.length,o=0;i>o;)y.f(t,n=r[o++],e[n]);return t},Et=getBuiltIn("document","documentElement"),Jt=sharedKey("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(t){return"<script>"+t+"<\/script>"},NullProtoObject=function(){try{vt=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;NullProtoObject=vt?function(t){t.write(scriptTag("")),t.close();var e=t.parentWindow.Object;return t=null,e}(vt):((e=documentCreateElement("iframe")).style.display="none",Et.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F);for(var n=tt.length;n--;)delete NullProtoObject.prototype[tt[n]];return NullProtoObject()};R[Jt]=!0;var Tt=Object.create||function create(t,e){var n;return null!==t?(EmptyConstructor.prototype=anObject(t),n=new EmptyConstructor,EmptyConstructor.prototype=null,n[Jt]=t):n=NullProtoObject(),void 0===e?n:wt(n,e)},Pt=nt.f,kt={}.toString,At="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ct={f:function getOwnPropertyNames(t){return At&&"[object Window]"==kt.call(t)?function(t){try{return Pt(t)}catch(t){return At.slice()}}(t):Pt(toIndexedObject(t))}},jt=C("wks"),It=e.Symbol,_t=bt?It:It&&It.withoutSetter||uid,wellKnownSymbol=function(t){return has$1(jt,t)&&(yt||"string"==typeof jt[t])||(yt&&has$1(It,t)?jt[t]=It[t]:jt[t]=_t("Symbol."+t)),jt[t]},Ot={f:wellKnownSymbol},Rt=y.f,defineWellKnownSymbol=function(t){var e=V.Symbol||(V.Symbol={});has$1(e,t)||Rt(e,t,{value:Ot.f(t)})},Lt=y.f,Dt=wellKnownSymbol("toStringTag"),setToStringTag=function(t,e,n){t&&!has$1(t=n?t:t.prototype,Dt)&&Lt(t,Dt,{configurable:!0,value:e})},aFunction=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},functionBindContext=function(t,e,n){if(aFunction(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)}},Ht=wellKnownSymbol("species"),arraySpeciesCreate=function(t,e){var n;return Mt(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!Mt(n.prototype)?isObject(n)&&null===(n=n[Ht])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},Ft=[].push,createMethod$2=function(t){var e=1==t,n=2==t,r=3==t,i=4==t,o=6==t,s=7==t,u=5==t||o;return function(h,f,p,d){for(var m,v,x=toObject(h),y=l(x),M=functionBindContext(f,p,3),S=toLength(y.length),w=0,E=d||arraySpeciesCreate,J=e?E(h,S):n||s?E(h,0):void 0;S>w;w++)if((u||w in y)&&(v=M(m=y[w],w,x),t))if(e)J[w]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return w;case 2:Ft.call(J,m)}else switch(t){case 4:return!1;case 7:Ft.call(J,m)}return o?-1:r||i?i:J}},Ut={forEach:createMethod$2(0),map:createMethod$2(1),filter:createMethod$2(2),some:createMethod$2(3),every:createMethod$2(4),find:createMethod$2(5),findIndex:createMethod$2(6),filterOut:createMethod$2(7)},Nt=Ut.forEach,Bt=sharedKey("hidden"),qt=wellKnownSymbol("toPrimitive"),Gt=z.set,zt=z.getterFor("Symbol"),$t=Object.prototype,Vt=e.Symbol,Kt=getBuiltIn("JSON","stringify"),Qt=v.f,Wt=y.f,Xt=Ct.f,Yt=o.f,Zt=C("symbols"),te=C("op-symbols"),ee=C("string-to-symbol-registry"),ne=C("symbol-to-string-registry"),re=C("wks"),ie=e.QObject,oe=!ie||!ie.prototype||!ie.prototype.findChild,ae=n&&fails((function(){return 7!=Tt(Wt({},"a",{get:function(){return Wt(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=Qt($t,e);r&&delete $t[e],Wt(t,e,n),r&&t!==$t&&Wt($t,e,r)}:Wt,wrap=function(t,e){var r=Zt[t]=Tt(Vt.prototype);return Gt(r,{type:"Symbol",tag:t,description:e}),n||(r.description=e),r},se=bt?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof Vt},ue=function defineProperty(t,e,n){t===$t&&ue(te,e,n),anObject(t);var r=toPrimitive(e,!0);return anObject(n),has$1(Zt,r)?(n.enumerable?(has$1(t,Bt)&&t[Bt][r]&&(t[Bt][r]=!1),n=Tt(n,{enumerable:createPropertyDescriptor(0,!1)})):(has$1(t,Bt)||Wt(t,Bt,createPropertyDescriptor(1,{})),t[Bt][r]=!0),ae(t,r,n)):Wt(t,r,n)},ce=function defineProperties(t,e){anObject(t);var r=toIndexedObject(e),i=St(r).concat(pe(r));return Nt(i,(function(e){n&&!le.call(r,e)||ue(t,e,r[e])})),t},le=function propertyIsEnumerable(t){var e=toPrimitive(t,!0),n=Yt.call(this,e);return!(this===$t&&has$1(Zt,e)&&!has$1(te,e))&&(!(n||!has$1(this,e)||!has$1(Zt,e)||has$1(this,Bt)&&this[Bt][e])||n)},he=function getOwnPropertyDescriptor(t,e){var n=toIndexedObject(t),r=toPrimitive(e,!0);if(n!==$t||!has$1(Zt,r)||has$1(te,r)){var i=Qt(n,r);return!i||!has$1(Zt,r)||has$1(n,Bt)&&n[Bt][r]||(i.enumerable=!0),i}},fe=function getOwnPropertyNames(t){var e=Xt(toIndexedObject(t)),n=[];return Nt(e,(function(t){has$1(Zt,t)||has$1(R,t)||n.push(t)})),n},pe=function getOwnPropertySymbols(t){var e=t===$t,n=Xt(e?te:toIndexedObject(t)),r=[];return Nt(n,(function(t){!has$1(Zt,t)||e&&!has$1($t,t)||r.push(Zt[t])})),r};if(yt||($((Vt=function Symbol(){if(this instanceof Vt)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===$t&&setter.call(te,t),has$1(this,Bt)&&has$1(this[Bt],e)&&(this[Bt][e]=!1),ae(this,e,createPropertyDescriptor(1,t))};return n&&oe&&ae($t,e,{configurable:!0,set:setter}),wrap(e,t)}).prototype,"toString",(function toString(){return zt(this).tag})),$(Vt,"withoutSetter",(function(t){return wrap(uid(t),t)})),o.f=le,y.f=ue,v.f=he,nt.f=Ct.f=fe,rt.f=pe,Ot.f=function(t){return wrap(wellKnownSymbol(t),t)},n&&(Wt(Vt.prototype,"description",{configurable:!0,get:function description(){return zt(this).description}}),$($t,"propertyIsEnumerable",le,{unsafe:!0}))),_export({global:!0,wrap:!0,forced:!yt,sham:!yt},{Symbol:Vt}),Nt(St(re),(function(t){defineWellKnownSymbol(t)})),_export({target:"Symbol",stat:!0,forced:!yt},{for:function(t){var e=String(t);if(has$1(ee,e))return ee[e];var n=Vt(e);return ee[e]=n,ne[n]=e,n},keyFor:function keyFor(t){if(!se(t))throw TypeError(t+" is not a symbol");if(has$1(ne,t))return ne[t]},useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),_export({target:"Object",stat:!0,forced:!yt,sham:!n},{create:function create(t,e){return void 0===e?Tt(t):ce(Tt(t),e)},defineProperty:ue,defineProperties:ce,getOwnPropertyDescriptor:he}),_export({target:"Object",stat:!0,forced:!yt},{getOwnPropertyNames:fe,getOwnPropertySymbols:pe}),_export({target:"Object",stat:!0,forced:fails((function(){rt.f(1)}))},{getOwnPropertySymbols:function getOwnPropertySymbols(t){return rt.f(toObject(t))}}),Kt){var de=!yt||fails((function(){var t=Vt();return"[null]"!=Kt([t])||"{}"!=Kt({a:t})||"{}"!=Kt(Object(t))}));_export({target:"JSON",stat:!0,forced:de},{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)&&!se(t))return Mt(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!se(e))return e}),i[1]=e,Kt.apply(null,i)}})}Vt.prototype[qt]||M(Vt.prototype,qt,Vt.prototype.valueOf),setToStringTag(Vt,"Symbol"),R[Bt]=!0;var ge=y.f,me=e.Symbol;if(n&&"function"==typeof me&&(!("description"in me.prototype)||void 0!==me().description)){var ve={},xe=function Symbol(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof xe?new me(t):void 0===t?me():me(t);return""===t&&(ve[e]=!0),e};copyConstructorProperties(xe,me);var ye=xe.prototype=me.prototype;ye.constructor=xe;var be=ye.toString,Me="Symbol(test)"==String(me("test")),Se=/^Symbol\((.*)\)[^)]+$/;ge(ye,"description",{configurable:!0,get:function description(){var t=isObject(this)?this.valueOf():this,e=be.call(t);if(has$1(ve,t))return"";var n=Me?e.slice(7,-1):e.replace(Se,"$1");return""===n?void 0:n}}),_export({global:!0,forced:!0},{Symbol:xe})}var we={};we[wellKnownSymbol("toStringTag")]="z";var Ee="[object z]"===String(we),Je=wellKnownSymbol("toStringTag"),Te="Arguments"==classofRaw(function(){return arguments}()),Pe=Ee?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),Je))?n:Te?classofRaw(e):"Object"==(r=classofRaw(e))&&"function"==typeof e.callee?"Arguments":r},ke=Ee?{}.toString:function toString(){return"[object "+Pe(this)+"]"};Ee||$(Object.prototype,"toString",ke,{unsafe:!0}),defineWellKnownSymbol("iterator");var Ae,Ce,je,createMethod$1=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}},Ie={codeAt:createMethod$1(!1),charAt:createMethod$1(!0)},_e=!fails((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})),Oe=sharedKey("IE_PROTO"),Re=Object.prototype,Le=_e?Object.getPrototypeOf:function(t){return t=toObject(t),has$1(t,Oe)?t[Oe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Re:null},De=wellKnownSymbol("iterator"),He=!1;[].keys&&("next"in(je=[].keys())?(Ce=Le(Le(je)))!==Object.prototype&&(Ae=Ce):He=!0),(null==Ae||fails((function(){var t={};return Ae[De].call(t)!==t})))&&(Ae={}),has$1(Ae,De)||M(Ae,De,(function(){return this}));var Fe={IteratorPrototype:Ae,BUGGY_SAFARI_ITERATORS:He},Ue={},Ne=Fe.IteratorPrototype,returnThis$1=function(){return this},Be=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),qe=Fe.IteratorPrototype,Ge=Fe.BUGGY_SAFARI_ITERATORS,ze=wellKnownSymbol("iterator"),returnThis=function(){return this},defineIterator=function(t,e,n,r,i,o,s){!function(t,e,n){var r=e+" Iterator";t.prototype=Tt(Ne,{next:createPropertyDescriptor(1,n)}),setToStringTag(t,r,!1),Ue[r]=returnThis$1}(n,e,r);var u,l,h,getIterationMethod=function(t){if(t===i&&v)return v;if(!Ge&&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[ze]||d["@@iterator"]||i&&d[i],v=!Ge&&m||getIterationMethod(i),x="Array"==e&&d.entries||m;if(x&&(u=Le(x.call(new t)),qe!==Object.prototype&&u.next&&(Le(u)!==qe&&(Be?Be(u,qe):"function"!=typeof u[ze]&&M(u,ze,returnThis)),setToStringTag(u,f,!0))),"values"==i&&m&&"values"!==m.name&&(p=!0,v=function values(){return m.call(this)}),d[ze]!==v&&M(d,ze,v),Ue[e]=v,i)if(l={values:getIterationMethod("values"),keys:o?v:getIterationMethod("keys"),entries:getIterationMethod("entries")},s)for(h in l)(Ge||p||!(h in d))&&$(d,h,l[h]);else _export({target:e,proto:!0,forced:Ge||p},l);return l},$e=Ie.charAt,Ve=z.set,Ke=z.getterFor("String Iterator");defineIterator(String,"String",(function(t){Ve(this,{type:"String Iterator",string:String(t),index:0})}),(function next(){var t,e=Ke(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=$e(n,r),e.index+=t.length,{value:t,done:!1})}));var Qe=wellKnownSymbol("unscopables"),We=Array.prototype;null==We[Qe]&&y.f(We,Qe,{configurable:!0,value:Tt(null)});var addToUnscopables=function(t){We[Qe][t]=!0},Xe=z.set,Ye=z.getterFor("Array Iterator"),Ze=defineIterator(Array,"Array",(function(t,e){Xe(this,{type:"Array Iterator",target:toIndexedObject(t),index:0,kind:e})}),(function(){var t=Ye(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");Ue.Arguments=Ue.Array,addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries");var tn={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},en=wellKnownSymbol("iterator"),nn=wellKnownSymbol("toStringTag"),rn=Ze.values;for(var on in tn){var an=e[on],sn=an&&an.prototype;if(sn){if(sn[en]!==rn)try{M(sn,en,rn)}catch(t){sn[en]=rn}if(sn[nn]||M(sn,nn,on),tn[on])for(var un in Ze)if(sn[un]!==Ze[un])try{M(sn,un,Ze[un])}catch(t){sn[un]=Ze[un]}}}defineWellKnownSymbol("asyncIterator"),defineWellKnownSymbol("toStringTag"),setToStringTag(Math,"Math",!0),setToStringTag(e.JSON,"JSON",!0);var cn=fails((function(){Le(1)}));_export({target:"Object",stat:!0,forced:cn,sham:!_e},{getPrototypeOf:function getPrototypeOf(t){return Le(toObject(t))}});var arrayMethodIsStrict=function(t,e){var n=[][t];return!!n&&fails((function(){n.call(null,e||function(){throw 1},1)}))},ln=Ut.forEach,hn=arrayMethodIsStrict("forEach")?[].forEach:function forEach(t){return ln(this,t,arguments.length>1?arguments[1]:void 0)};_export({target:"Array",proto:!0,forced:[].forEach!=hn},{forEach:hn});var fn=y.f,pn=Function.prototype,dn=pn.toString,gn=/^\s*function ([^ (]*)/;n&&!("name"in pn)&&fn(pn,"name",{configurable:!0,get:function(){try{return dn.call(this).match(gn)[1]}catch(t){return""}}}),_export({target:"Object",stat:!0},{setPrototypeOf:Be});var mn=e.Promise,vn=wellKnownSymbol("species"),setSpecies=function(t){var e=getBuiltIn(t),r=y.f;n&&e&&!e[vn]&&r(e,vn,{configurable:!0,get:function(){return this}})},xn=wellKnownSymbol("iterator"),yn=Array.prototype,bn=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[bn]||t["@@iterator"]||Ue[Pe(t)]}(t)))throw TypeError("Target is not iterable");if(void 0!==(f=i)&&(Ue.Array===f||yn[xn]===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)},Mn=wellKnownSymbol("iterator"),Sn=!1;try{var wn=0,En={next:function(){return{done:!!wn++}},return:function(){Sn=!0}};En[Mn]=function(){return this},Array.from(En,(function(){throw 2}))}catch(t){}var Jn,Tn,Pn,kn=wellKnownSymbol("species"),speciesConstructor=function(t,e){var n,r=anObject(t).constructor;return void 0===r||null==(n=anObject(r)[kn])?e:aFunction(n)},An=/(iphone|ipod|ipad).*applewebkit/i.test(pt),Cn=e.location,jn=e.setImmediate,In=e.clearImmediate,_n=e.process,On=e.MessageChannel,Rn=e.Dispatch,Ln=0,Dn={},run=function(t){if(Dn.hasOwnProperty(t)){var e=Dn[t];delete Dn[t],e()}},runner=function(t){return function(){run(t)}},listener=function(t){run(t.data)},post=function(t){e.postMessage(t+"",Cn.protocol+"//"+Cn.host)};jn&&In||(jn=function setImmediate(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Dn[++Ln]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Jn(Ln),Ln},In=function clearImmediate(t){delete Dn[t]},ft?Jn=function(t){_n.nextTick(runner(t))}:Rn&&Rn.now?Jn=function(t){Rn.now(runner(t))}:On&&!An?(Pn=(Tn=new On).port2,Tn.port1.onmessage=listener,Jn=functionBindContext(Pn.postMessage,Pn,1)):e.addEventListener&&"function"==typeof postMessage&&!e.importScripts&&Cn&&"file:"!==Cn.protocol&&!fails(post)?(Jn=post,e.addEventListener("message",listener,!1)):Jn="onreadystatechange"in documentCreateElement("script")?function(t){Et.appendChild(documentCreateElement("script")).onreadystatechange=function(){Et.removeChild(this),run(t)}}:function(t){setTimeout(runner(t),0)});var Hn,Fn,Un,Nn,Bn,qn,Gn,zn,$n={set:jn,clear:In},Vn=/web0s(?!.*chrome)/i.test(pt),Kn=v.f,Qn=$n.set,Wn=e.MutationObserver||e.WebKitMutationObserver,Xn=e.document,Yn=e.process,Zn=e.Promise,tr=Kn(e,"queueMicrotask"),er=tr&&tr.value;er||(Hn=function(){var t,e;for(ft&&(t=Yn.domain)&&t.exit();Fn;){e=Fn.fn,Fn=Fn.next;try{e()}catch(t){throw Fn?Nn():Un=void 0,t}}Un=void 0,t&&t.enter()},An||ft||Vn||!Wn||!Xn?Zn&&Zn.resolve?(Gn=Zn.resolve(void 0),zn=Gn.then,Nn=function(){zn.call(Gn,Hn)}):Nn=ft?function(){Yn.nextTick(Hn)}:function(){Qn.call(e,Hn)}:(Bn=!0,qn=Xn.createTextNode(""),new Wn(Hn).observe(qn,{characterData:!0}),Nn=function(){qn.data=Bn=!Bn}));var nr,rr,ir,or,ar=er||function(t){var e={fn:t,next:void 0};Un&&(Un.next=e),Fn||(Fn=e,Nn()),Un=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(e),this.reject=aFunction(n)},sr={f:function(t){return new PromiseCapability(t)}},promiseResolve=function(t,e){if(anObject(t),isObject(e)&&e.constructor===t)return e;var n=sr.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}}},ur=$n.set,cr=wellKnownSymbol("species"),lr="Promise",hr=z.get,fr=z.set,pr=z.getterFor(lr),dr=mn,gr=e.TypeError,mr=e.document,vr=e.process,xr=getBuiltIn("fetch"),yr=sr.f,br=yr,Mr=!!(mr&&mr.createEvent&&e.dispatchEvent),Sr="function"==typeof PromiseRejectionEvent,wr=lt(lr,(function(){if(!(P(dr)!==String(dr))){if(66===xt)return!0;if(!ft&&!Sr)return!0}if(xt>=51&&/native code/.test(dr))return!1;var t=dr.resolve(1),FakePromise=function(t){t((function(){}),(function(){}))};return(t.constructor={})[cr]=FakePromise,!(t.then((function(){}))instanceof FakePromise)})),Er=wr||!function(t,e){if(!e&&!Sn)return!1;var n=!1;try{var r={};r[Mn]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}((function(t){dr.all(t).catch((function(){}))})),isThenable=function(t){var e;return!(!isObject(t)||"function"!=typeof(e=t.then))&&e},notify=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;ar((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(gr("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;Mr?((i=mr.createEvent("Event")).promise=n,i.reason=r,i.initEvent(t,!1,!0),e.dispatchEvent(i)):i={promise:n,reason:r},!Sr&&(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){ur.call(e,(function(){var e,n=t.facade,r=t.value;if(isUnhandled(t)&&(e=perform((function(){ft?vr.emit("unhandledRejection",r,n):dispatchEvent("unhandledrejection",n,r)})),t.rejection=ft||isUnhandled(t)?2:1,e.error))throw e.value}))},isUnhandled=function(t){return 1!==t.rejection&&!t.parent},onHandleUnhandled=function(t){ur.call(e,(function(){var e=t.facade;ft?vr.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(t,!0))},internalResolve=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw gr("Promise can't be resolved itself");var r=isThenable(e);r?ar((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(t,!1))}catch(e){internalReject({done:!1},e,t)}}};wr&&(dr=function Promise(t){!function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,dr,lr),aFunction(t),nr.call(this);var e=hr(this);try{t(bind(internalResolve,e),bind(internalReject,e))}catch(t){internalReject(e,t)}},(nr=function Promise(t){fr(this,{type:lr,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(t,e,n){for(var r in e)$(t,r,e[r],n);return t}(dr.prototype,{then:function then(t,e){var n=pr(this),r=yr(speciesConstructor(this,dr));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=ft?vr.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&notify(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),rr=function(){var t=new nr,e=hr(t);this.promise=t,this.resolve=bind(internalResolve,e),this.reject=bind(internalReject,e)},sr.f=yr=function(t){return t===dr||t===ir?new rr(t):br(t)},"function"==typeof mn&&(or=mn.prototype.then,$(mn.prototype,"then",(function then(t,e){var n=this;return new dr((function(t,e){or.call(n,t,e)})).then(t,e)}),{unsafe:!0}),"function"==typeof xr&&_export({global:!0,enumerable:!0,forced:!0},{fetch:function fetch(t){return promiseResolve(dr,xr.apply(e,arguments))}}))),_export({global:!0,wrap:!0,forced:wr},{Promise:dr}),setToStringTag(dr,lr,!1),setSpecies(lr),ir=getBuiltIn(lr),_export({target:lr,stat:!0,forced:wr},{reject:function reject(t){var e=yr(this);return e.reject.call(void 0,t),e.promise}}),_export({target:lr,stat:!0,forced:wr},{resolve:function resolve(t){return promiseResolve(this,t)}}),_export({target:lr,stat:!0,forced:Er},{all:function all(t){var e=this,n=yr(e),r=n.resolve,i=n.reject,o=perform((function(){var n=aFunction(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=yr(e),r=n.reject,i=perform((function(){var i=aFunction(e.resolve);iterate(t,(function(t){i.call(e,t).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}});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},Jr=RegExp.prototype,Tr=Jr.toString,Pr=fails((function(){return"/a/b"!=Tr.call({source:"a",flags:"b"})})),kr="toString"!=Tr.name;for(var Ar in(Pr||kr)&&$(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 Jr)?regexpFlags.call(t):n)}),{unsafe:!0}),tn){var Cr=e[Ar],jr=Cr&&Cr.prototype;if(jr&&jr.forEach!==hn)try{M(jr,"forEach",hn)}catch(t){jr.forEach=hn}}var Ir=[].reverse,_r=[1,2];_export({target:"Array",proto:!0,forced:String(_r)===String(_r.reverse())},{reverse:function reverse(){return Mt(this)&&(this.length=this.length),Ir.call(this)}});var createProperty=function(t,e,n){var r=toPrimitive(e);r in t?y.f(t,r,createPropertyDescriptor(0,n)):t[r]=n},Or=wellKnownSymbol("species"),arrayMethodHasSpeciesSupport=function(t){return xt>=51||!fails((function(){var e=[];return(e.constructor={})[Or]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Rr=arrayMethodHasSpeciesSupport("slice"),Lr=wellKnownSymbol("species"),Dr=[].slice,Hr=Math.max;_export({target:"Array",proto:!0,forced:!Rr},{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(Mt(o)&&("function"!=typeof(n=o.constructor)||n!==Array&&!Mt(n.prototype)?isObject(n)&&null===(n=n[Lr])&&(n=void 0):n=void 0,n===Array||void 0===n))return Dr.call(o,u,l);for(r=new(void 0===n?Array:n)(Hr(l-u,0)),i=0;u<l;u++,i++)u in o&&createProperty(r,i,o[u]);return r.length=i,r}}),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)}}));var Fr=Ut.find,Ur=!0;"find"in[]&&Array(1).find((function(){Ur=!1})),_export({target:"Array",proto:!0,forced:Ur},{find:function find(t){return Fr(this,t,arguments.length>1?arguments[1]:void 0)}}),addToUnscopables("find");var Nr=Ut.map,Br=arrayMethodHasSpeciesSupport("map");_export({target:"Array",proto:!0,forced:!Br},{map:function map(t){return Nr(this,t,arguments.length>1?arguments[1]:void 0)}});var qr=Object.assign,Gr=Object.defineProperty,zr=!qr||fails((function(){if(n&&1!==qr({b:1},qr(Gr({},"a",{enumerable:!0,get:function(){Gr(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!=qr({},t)[r]||St(qr({},e)).join("")!=i}))?function assign(t,e){for(var r=toObject(t),i=arguments.length,s=1,u=rt.f,h=o.f;i>s;)for(var f,p=l(arguments[s++]),d=u?St(p).concat(u(p)):St(p),m=d.length,v=0;m>v;)f=d[v++],n&&!h.call(p,f)||(r[f]=p[f]);return r}:qr;function __variableDynamicImportRuntime0__(t){switch(t){case"./locale/en.js":return Promise.resolve().then((function(){return Kr}));case"./locale/zh-CN.js":return Promise.resolve().then((function(){return Qr}));default:return Promise.reject(new Error("Unknown variable dynamic import: "+t))}}
/**
* @file ext-mathjax.js
*
* @license MIT
*
* @copyright 2013 Jo Segaert
*
*/_export({target:"Object",stat:!0,forced:Object.assign!==zr},{assign:zr});var $r=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 Kr}));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)}}(),Vr={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,$r(r.configObj.pref("lang"));case 5:return i=m.sent,o=r.svgCanvas,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=16;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("#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=6,t.next=9,Promise.resolve().then((function(){return fo}));case 9:MathJax.Hub.queue.Push((function(){u=MathJax.Hub.getAllJax("#mathjax_creator")[0],console.log(u),f=!0,console.log("MathJax Loaded")})),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(6),console.log("Failed loading MathJax."),alert("Failed loading MathJax. You will not be able to change the mathematics.");case 16:case"end":return t.stop()}}),_callee2,null,[[6,12]])})))()}}}],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)})))()}},Kr=Object.freeze({__proto__:null,default:{name:"MathJax",buttons:[{title:"Add Mathematics"}]}}),Qr=Object.freeze({__proto__:null,default:{name:"数学",buttons:[{title:"添加数学计算"}]}});function RE(t,e){return RegExp(t,e)}var Wr={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")}))},Xr=RegExp.prototype.exec,Yr=String.prototype.replace,Zr=Xr,ti=function(){var t=/a/,e=/b*/g;return Xr.call(t,"a"),Xr.call(e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),ei=Wr.UNSUPPORTED_Y||Wr.BROKEN_CARET,ni=void 0!==/()??/.exec("")[1];(ti||ni||ei)&&(Zr=function exec(t){var e,n,r,i,o=this,s=ei&&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)),ni&&(n=new RegExp("^"+l+"$(?!\\s)",u)),ti&&(e=o.lastIndex),r=Xr.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:ti&&r&&(o.lastIndex=o.global?r.index+r[0].length:e),ni&&r&&r.length>1&&Yr.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r});var ri=Zr;_export({target:"RegExp",proto:!0,forced:/./.exec!==ri},{exec:ri});var ii=wellKnownSymbol("species"),oi=!fails((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),ai="$0"==="a".replace(/./,"$0"),si=wellKnownSymbol("replace"),ui=!!/./[si]&&""===/./[si]("a","$0"),ci=!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[ii]=function(){return n},n.flags="",n[i]=/./[i]),n.exec=function(){return e=!0,null},n[i](""),!e}));if(!o||!s||"replace"===t&&(!oi||!ai||ui)||"split"===t&&!ci){var u=/./[i],l=n(i,""[t],(function(t,e,n,r,i){return e.exec===ri?o&&!i?{done:!0,value:u.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:ai,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:ui}),h=l[0],f=l[1];$(String.prototype,t,h),$(RegExp.prototype,i,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)})}r&&M(RegExp.prototype[i],"sham",!0)},li=Ie.charAt,advanceStringIndex=function(t,e,n){return e+(n?li(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 ri.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 hi=Math.floor,fi="".replace,pi=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,di=/\$([$&'`]|\d{1,2})/g,getSubstitution=function(t,e,n,r,i,o){var s=n+t.length,u=r.length,l=di;return void 0!==i&&(i=toObject(i),l=pi),fi.call(o,l,(function(o,l){var h;switch(l.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(s);case"<":h=i[l.slice(1,-1)];break;default:var f=+l;if(0===f)return o;if(f>u){var p=hi(f/10);return 0===p?o:p<=u?void 0===r[p-1]?l.charAt(1):r[p-1]+l.charAt(1):o}h=r[f-1]}return void 0===h?"":h}))},gi=Math.max,mi=Math.min;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="",M=0,S=0;S<m.length;S++){v=m[S];for(var w=String(v[0]),E=gi(mi(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>=M&&(y+=h.slice(M,E)+A,M=E+w.length)}return y+h.slice(M)}]}));var vi=wellKnownSymbol("isConcatSpreadable"),xi=xt>=51||!fails((function(){var t=[];return t[vi]=!1,t.concat()[0]!==t})),yi=arrayMethodHasSpeciesSupport("concat"),isConcatSpreadable=function(t){if(!isObject(t))return!1;var e=t[vi];return void 0!==e?!!e:Mt(t)};_export({target:"Array",proto:!0,forced:!xi||!yi},{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 bi=arrayMethodHasSpeciesSupport("splice"),Mi=Math.max,Si=Math.min;_export({target:"Array",proto:!0,forced:!bi},{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=Si(Mi(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 wi=wellKnownSymbol("match"),isRegexp=function(t){var e;return isObject(t)&&(void 0!==(e=t[wi])?!!e:"RegExp"==classofRaw(t))},Ei=y.f,Ji=nt.f,Ti=z.set,Pi=wellKnownSymbol("match"),ki=e.RegExp,Ai=ki.prototype,Ci=/a/g,ji=/a/g,Ii=new ki(Ci)!==Ci,_i=Wr.UNSUPPORTED_Y;if(n&&lt("RegExp",!Ii||_i||fails((function(){return ji[Pi]=!1,ki(Ci)!=Ci||ki(ji)==ji||"/a/i"!=ki(Ci,"i")})))){for(var Oi=function RegExp(t,e){var n,r=this instanceof Oi,i=isRegexp(t),o=void 0===e;if(!r&&i&&t.constructor===Oi&&o)return t;Ii?i&&!o&&(t=t.source):t instanceof Oi&&(o&&(e=regexpFlags.call(t)),t=t.source),_i&&(n=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var s,u,l,h,f,p=(s=Ii?new ki(t,e):ki(t,e),u=r?this:Ai,l=Oi,Be&&"function"==typeof(h=u.constructor)&&h!==l&&isObject(f=h.prototype)&&f!==l.prototype&&Be(s,f),s);return _i&&n&&Ti(p,{sticky:n}),p},proxy=function(t){t in Oi||Ei(Oi,t,{configurable:!0,get:function(){return ki[t]},set:function(e){ki[t]=e}})},Ri=Ji(ki),Li=0;Ri.length>Li;)proxy(Ri[Li++]);Ai.constructor=Oi,Oi.prototype=Ai,$(e,"RegExp",Oi)}setSpecies("RegExp");var Di=[].push,Hi=Math.min,Fi=!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=ri.call(p,r))&&!((s=p.lastIndex)>f&&(l.push(r.slice(f,o.index)),o.length>1&&o.index<r.length&&Di.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":"")+(Fi?"y":"g"),p=new l(Fi?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=Fi?v:0;var y,M=regexpExecAbstract(p,Fi?u:u.slice(v));if(null===M||(y=Hi(toLength(p.lastIndex+(Fi?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 S=1;S<=M.length-1;S++)if(x.push(M[S]),x.length===d)return x;v=m=y}}return x.push(u.slice(m)),x}]}),!Fi);var Ui=[].join,Ni=l!=Object,Bi=arrayMethodIsStrict("join",",");_export({target:"Array",proto:!0,forced:Ni||!Bi},{join:function join(t){return Ui.call(toIndexedObject(this),void 0===t?",":t)}});var qi="\t\n\v\f\r    \u2028\u2029\ufeff",Gi="["+qi+"]",zi=RegExp("^"+Gi+Gi+"*"),$i=RegExp(Gi+Gi+"*$"),createMethod=function(t){return function(e){var n=String(requireObjectCoercible(e));return 1&t&&(n=n.replace(zi,"")),2&t&&(n=n.replace($i,"")),n}},Vi={start:createMethod(1),end:createMethod(2),trim:createMethod(3)},Ki=Vi.trim,Qi=e.parseFloat,Wi=1/Qi(qi+"-0")!=-1/0?function parseFloat(t){var e=Ki(String(t)),n=Qi(e);return 0===n&&"-"==e.charAt(0)?-0:n}:Qi;_export({global:!0,forced:parseFloat!=Wi},{parseFloat:Wi});var Xi=Math.min,Yi=[].lastIndexOf,Zi=!!Yi&&1/[1].lastIndexOf(1,-0)<0,to=arrayMethodIsStrict("lastIndexOf"),eo=Zi||!to?function lastIndexOf(t){if(Zi)return Yi.apply(this,arguments)||0;var e=toIndexedObject(this),n=toLength(e.length),r=n-1;for(arguments.length>1&&(r=Xi(r,toInteger(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}:Yi;_export({target:"Array",proto:!0,forced:eo!==[].lastIndexOf},{lastIndexOf:eo});var no=Vi.trim;_export({target:"String",proto:!0,forced:function(t){return fails((function(){return!!qi[t]()||"…"!="…"[t]()||qi[t].name!==t}))}("trim")},{trim:function trim(){return no(this)}});var ro=[],io=ro.sort,oo=fails((function(){ro.sort(void 0)})),ao=fails((function(){ro.sort(null)})),so=arrayMethodIsStrict("sort");_export({target:"Array",proto:!0,forced:oo||!ao||!so},{sort:function sort(t){return void 0===t?io.call(toObject(this)):io.call(toObject(this),aFunction(t))}});var uo=Vi.trim,co=e.parseInt,lo=/^[+-]?0[Xx]/,ho=8!==co(qi+"08")||22!==co(qi+"0x16")?function parseInt(t,e){var n=uo(String(t));return co(n,e>>>0||(lo.test(n)?16:10))}:co;_export({global:!0,forced:parseInt!=ho},{parseInt:ho}),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 fo=Object.freeze({__proto__:null});export default Vr;
//# sourceMappingURL=ext-mathjax.js.map