@digabi/exam-engine-core 16.4.1-alpha.1 → 16.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main-bundle.js
CHANGED
@@ -39,7 +39,7 @@ function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterat
|
|
39
39
|
* @author Feross Aboukhadijeh <http://feross.org>
|
40
40
|
* @license MIT
|
41
41
|
*/
|
42
|
-
var r=n(109),i=n(110),a=n(111);function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=f(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|p(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):f(e,t);if("Buffer"===t.type&&a(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=s(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(r)return Z(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return E(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(a=n;a<s;a++)if(c(e,a)===c(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===l)return u*o}else-1!==u&&(a-=a-u),u=-1}else for(n+l>s&&(n=s-l),a=n;a>=0;a--){for(var d=!0,f=0;f<l;f++)if(c(e,a+f)!==c(t,f)){d=!1;break}if(d)return a}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function I(e,t,n,r){return G(Z(t,e.length-n),e,n,r)}function x(e,t,n,r){return G(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return x(e,t,n,r)}function T(e,t,n,r){return G(F(t),e,n,r)}function M(e,t,n,r){return G(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},l.byteLength=h,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):g.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,i),u=e.slice(t,n),d=0;d<s;++d)if(c[d]!==u[d]){a=c[d],o=u[d];break}return a<o?-1:o<a?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return I(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function N(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function S(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=U(e[a]);return i}function k(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function j(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,i,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function P(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,a){return a||P(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function z(e,t,n,r,a){return a||P(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;n=new l(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=l.isBuffer(e)?e:Z(new l(e,r).toString()),s=o.length;for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var _=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function Z(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function F(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(_,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(11))},function(e,t){},function(e,t){},function(e,t,n){"use strict";let r,i,a=n(9);class o extends a{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new r(new i,this,e).stringify()}}o.registerLazyResult=e=>{r=e},o.registerProcessor=e=>{i=e},e.exports=o,o.default=o},function(e,t,n){"use strict";let r=n(63);class i{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new r(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}e.exports=i,i.default=i},function(e,t,n){"use strict";let r=n(9),i=n(114),a=n(21);function o(e,t){let n=new a(e,t),r=new i(n);try{r.parse()}catch(e){throw e}return r.root}e.exports=o,o.default=o,r.registerParse(o)},function(e,t,n){"use strict";let r=n(9);class i extends r{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=i,i.default=i,r.registerAtRule(i)},function(e,t,n){"use strict";let r=n(9),i=n(64);class a extends r{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}e.exports=a,a.default=a,r.registerRule(a)},function(e,t,n){"use strict";var r=n(81),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=p(n);i&&i!==h&&e(t,i,r)}var o=u(n);d&&(o=o.concat(d(n)));for(var s=l(t),g=l(n),m=0;m<o.length;++m){var y=o[m];if(!(a[y]||r&&r[y]||g&&g[y]||s&&s[y])){var v=f(n,y);try{c(t,y,v)}catch(e){}}}}return t}},function(e,t,n){const r=n(92),i=n(103),{isPlainObject:a}=n(104),o=n(105),s=n(106),{parse:l}=n(107),c=["img","audio","video","picture","svg","object","map","iframe","embed"],u=["script","style"];function d(e,t){e&&Object.keys(e).forEach((function(n){t(e[n],n)}))}function f(e,t){return{}.hasOwnProperty.call(e,t)}function p(e,t){const n=[];return d(e,(function(e){t(e)&&n.push(e)})),n}e.exports=g;const h=/^[^\0\t\n\f\r /<=>]+$/;function g(e,t,n){if(null==e)return"";let y="",v="";function b(e,t){const n=this;this.tag=e,this.attribs=t||{},this.tagPosition=y.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(S.length){S[S.length-1].text+=n.text}},this.updateParentNodeMediaChildren=function(){if(S.length&&c.includes(this.tag)){S[S.length-1].mediaChildren.push(this.tag)}}}(t=Object.assign({},g.defaults,t)).parser=Object.assign({},m,t.parser),u.forEach((function(e){t.allowedTags&&t.allowedTags.indexOf(e)>-1&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)}));const I=t.nonTextTags||["script","style","textarea","option"];let x,w;t.allowedAttributes&&(x={},w={},d(t.allowedAttributes,(function(e,t){x[t]=[];const n=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(i(e).replace(/\\\*/g,".*")):x[t].push(e)})),n.length&&(w[t]=new RegExp("^("+n.join("|")+")$"))})));const T={},M={},A={};d(t.allowedClasses,(function(e,t){x&&(f(x,t)||(x[t]=[]),x[t].push("class")),T[t]=[],A[t]=[];const n=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(i(e).replace(/\\\*/g,".*")):e instanceof RegExp?A[t].push(e):T[t].push(e)})),n.length&&(M[t]=new RegExp("^("+n.join("|")+")$"))}));const C={};let E,N,S,k,j,D,L;d(t.transformTags,(function(e,t){let n;"function"==typeof e?n=e:"string"==typeof e&&(n=g.simpleTransform(e)),"*"===t?E=n:C[t]=n}));let O=!1;R();const P=new r.Parser({onopentag:function(e,n){if(t.enforceHtmlBoundary&&"html"===e&&R(),D)return void L++;const r=new b(e,n);S.push(r);let i=!1;const c=!!r.text;let u;if(f(C,e)&&(u=C[e](e,n),r.attribs=n=u.attribs,void 0!==u.text&&(r.innerText=u.text),e!==u.tagName&&(r.name=e=u.tagName,j[N]=u.tagName)),E&&(u=E(e,n),r.attribs=n=u.attribs,e!==u.tagName&&(r.name=e=u.tagName,j[N]=u.tagName)),(t.allowedTags&&-1===t.allowedTags.indexOf(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(const t in e)if(f(e,t))return!1;return!0}(k)||null!=t.nestingLimit&&N>=t.nestingLimit)&&(i=!0,k[N]=!0,"discard"===t.disallowedTagsMode&&-1!==I.indexOf(e)&&(D=!0,L=1),k[N]=!0),N++,i){if("discard"===t.disallowedTagsMode)return;v=y,y=""}y+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(r.innerText=""),(!x||f(x,e)||x["*"])&&d(n,(function(n,i){if(!h.test(i))return void delete r.attribs[i];let c,u=!1;if(!x||f(x,e)&&-1!==x[e].indexOf(i)||x["*"]&&-1!==x["*"].indexOf(i)||f(w,e)&&w[e].test(i)||w["*"]&&w["*"].test(i))u=!0;else if(x&&x[e])for(const t of x[e])if(a(t)&&t.name&&t.name===i){u=!0;let e="";if(!0===t.multiple){const r=n.split(" ");for(const n of r)-1!==t.values.indexOf(n)&&(""===e?e=n:e+=" "+n)}else t.values.indexOf(n)>=0&&(e=n);n=e}if(u){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(i)&&_(e,n))return void delete r.attribs[i];if("script"===e&&"src"===i){let e=!0;try{const r=new URL(n);if(t.allowedScriptHostnames||t.allowedScriptDomains){const n=(t.allowedScriptHostnames||[]).find((function(e){return e===r.hostname})),i=(t.allowedScriptDomains||[]).find((function(e){return r.hostname===e||r.hostname.endsWith("."+e)}));e=n||i}}catch(t){e=!1}if(!e)return void delete r.attribs[i]}if("iframe"===e&&"src"===i){let e=!0;try{if((n=n.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let r="relative://relative-site";for(let e=0;e<100;e++)r+="/"+e;const i=new URL(n,r);if(i&&"relative-site"===i.hostname&&"relative:"===i.protocol)e=f(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const n=(t.allowedIframeHostnames||[]).find((function(e){return e===i.hostname})),r=(t.allowedIframeDomains||[]).find((function(e){return i.hostname===e||i.hostname.endsWith("."+e)}));e=n||r}}catch(t){e=!1}if(!e)return void delete r.attribs[i]}if("srcset"===i)try{if(c=s(n),c.forEach((function(e){_("srcset",e.url)&&(e.evil=!0)})),c=p(c,(function(e){return!e.evil})),!c.length)return void delete r.attribs[i];n=p(c,(function(e){return!e.evil})).map((function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")})).join(", "),r.attribs[i]=n}catch(e){return void delete r.attribs[i]}if("class"===i){const t=T[e],a=T["*"],s=M[e],l=A[e],c=[s,M["*"]].concat(l).filter((function(e){return e}));if(!(n=U(n,t&&a?o(t,a):t||a,c)).length)return void delete r.attribs[i]}if("style"===i)try{if(0===(n=function(e){return e.nodes[0].nodes.reduce((function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e}),[]).join(";")}(function(e,t){if(!t)return e;const n=e.nodes[0];let r;r=t[n.selector]&&t["*"]?o(t[n.selector],t["*"]):t[n.selector]||t["*"];r&&(e.nodes[0].nodes=n.nodes.reduce(function(e){return function(t,n){if(f(e,n.prop)){e[n.prop].some((function(e){return e.test(n.value)}))&&t.push(n)}return t}}(r),[]));return e}(l(e+" {"+n+"}"),t.allowedStyles))).length)return void delete r.attribs[i]}catch(e){return void delete r.attribs[i]}y+=" "+i,n&&n.length&&(y+='="'+z(n,!0)+'"')}else delete r.attribs[i]})),-1!==t.selfClosing.indexOf(e)?y+=" />":(y+=">",!r.innerText||c||t.textFilter||(y+=z(r.innerText),O=!0)),i&&(y=v+z(y),v="")},ontext:function(e){if(D)return;const n=S[S.length-1];let r;if(n&&(r=n.tag,e=void 0!==n.innerText?n.innerText:e),"discard"!==t.disallowedTagsMode||"script"!==r&&"style"!==r){const n=z(e,!1);t.textFilter&&!O?y+=t.textFilter(n,r):O||(y+=n)}else y+=e;if(S.length){S[S.length-1].text+=e}},onclosetag:function(e){if(D){if(L--,L)return;D=!1}const n=S.pop();if(!n)return;D=!!t.enforceHtmlBoundary&&"html"===e,N--;const r=k[N];if(r){if(delete k[N],"discard"===t.disallowedTagsMode)return void n.updateParentNodeText();v=y,y=""}j[N]&&(e=j[N],delete j[N]),t.exclusiveFilter&&t.exclusiveFilter(n)?y=y.substr(0,n.tagPosition):(n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1===t.selfClosing.indexOf(e)?(y+="</"+e+">",r&&(y=v+z(y),v=""),O=!1):r&&(y=v,v=""))}},t.parser);return P.write(e),P.end(),y;function R(){y="",N=0,S=[],k={},j={},D=!1,L=0}function z(e,n){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),n&&(e=e.replace(/"/g,"""))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),n&&(e=e.replace(/"/g,""")),e}function _(e,n){const r=(n=(n=n.replace(/[\x00-\x20]+/g,"")).replace(/<!--.*?-->/g,"")).match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!r)return!!n.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const i=r[1].toLowerCase();return f(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(i):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(i)}function U(e,t,n){return t?(e=e.split(/\s+/)).filter((function(e){return-1!==t.indexOf(e)||n.some((function(t){return t.test(e)}))})).join(" "):e}}const m={decodeEntities:!0};g.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1},g.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,i){let a;if(n)for(a in t)i[a]=t[a];else i=t;return{tagName:e,attribs:i}}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(3),i=n.n(r),a=n(69);function o(e,t,n,r,a){const o=e.originalEvent.clipboardData,l=o.items&&o.items.length>0&&o.items[o.items.length-1].getAsFile();if(l)!function(e,t,n,r){e.preventDefault(),r.indexOf(t.type)>=0&&n({data:t,type:t.type,id:String((new Date).getTime())}).then(e=>{const t=`<img src="${e}"/>`;window.document.execCommand("insertHTML",!1,t)})}(e,l,t,r);else{const l=o.getData("text/html");l?function(e,t,n,r,i,a,o){e.preventDefault(),window.document.execCommand("insertHTML",!1,o(n)),s(t,r,i,a)}(e,i()(e.currentTarget),l,t,n,r,a):function(e,t,n,r){s(e,t,n,r)}(i()(e.currentTarget),t,n,r)}}function s(t,n,r,i){setTimeout(()=>Promise.all(function(t,n,r){t.find(n).remove();const i=t.find('img[src^="data:image/"]').toArray().map(t=>Object.assign(function(t){if(!t)return null;const n=t.match(/^data:([A-Za-z-+/]+);base64,(.+)$/);if(3!==n.length)return null;return{type:n[1],data:e.from(n[2],"base64")}}(t.getAttribute("src")),{el:t}));i.filter(({type:e})=>-1===r.indexOf(e)&&"image/svg+xml"!==e).forEach(({el:e})=>e.remove());const o=i.filter(({type:e})=>r.indexOf(e)>=0);return o.forEach(({el:e})=>e.setAttribute("src",a.a)),o}(t,r,i).map(e=>n(e).then(t=>e.el.setAttribute("src",t)).catch(t=>{throw e.el.remove(),t}))).then(()=>t.trigger("input")),0)}}).call(this,n(30).Buffer)},function(e,t,n){!function(){var t=n(3),r="mathquill-block-id",i=Math.min,a=Math.max;if(!t)throw"MathQuill requires jQuery 1.5.2+ to be loaded first";function o(){}var s=[].slice;function l(e){var t=e.length-1;return function(){var n=s.call(arguments,0,t),r=s.call(arguments,t);return e.apply(this,n.concat([r]))}}var c=l((function(e,t){return l((function(n,r){if(e in n)return n[e].apply(n,t.concat(r))}))}));function u(e){return l((function(t,n){"function"!=typeof t&&(t=c(t));return e.call(this,(function(e){return t.apply(e,[e].concat(n))}))}))}function d(e){var t=s.call(arguments,1);return function(){return e.apply(this,t)}}function f(e,t){if(!t)throw new Error("prayer failed: "+e)}var p=function(e,t,n){function r(e){return"object"==typeof e}function i(e){return"function"==typeof e}function a(){}return function e(n,o){function s(){var e=new l;return i(e.init)&&e.init.apply(e,arguments),e}function l(){}void 0===o&&(o=n,n=Object),s.Bare=l;var c,u=a.prototype=n.prototype,d=l.prototype=s.prototype=s.p=new a;return d.constructor=s,s.extend=function(t){return e(s,t)},(s.open=function(e){if(c={},i(e)?c=e.call(s,d,u,s,n):r(e)&&(c=e),r(c))for(var a in c)t.call(c,a)&&(d[a]=c[a]);return i(d.init)||(d.init=n),s})(o)}}(0,{}.hasOwnProperty),h=-1;function g(e){f("a direction was passed",e===h||1===e)}var m=p(t,(function(e){e.insDirOf=function(e,t){return e===h?this.insertBefore(t.first()):this.insertAfter(t.last())},e.insAtDirEnd=function(e,t){return e===h?this.prependTo(t):this.appendTo(t)}})),y=p((function(e){e.parent=0,e[h]=0,e[1]=0,e.init=function(e,t,n){this.parent=e,this[h]=t,this[1]=n},this.copy=function(e){return y(e.parent,e[h],e[1])}})),v=p((function(e){e[h]=0,e[1]=0,e.parent=0;var t=0;this.byId={},e.init=function(){this.id=t+=1,v.byId[this.id]=this,this.ends={},this.ends[h]=0,this.ends[1]=0},e.dispose=function(){delete v.byId[this.id]},e.toString=function(){return"{{ MathQuill Node #"+this.id+" }}"},e.jQ=m(),e.jQadd=function(e){return this.jQ=this.jQ.add(e)},e.jQize=function(e){e=m(e||this.html());function t(e){if(e.getAttribute){var n=e.getAttribute("mathquill-command-id"),r=e.getAttribute("mathquill-block-id");n&&v.byId[n].jQadd(e),r&&v.byId[r].jQadd(e)}for(e=e.firstChild;e;e=e.nextSibling)t(e)}for(var n=0;n<e.length;n+=1)t(e[n]);return e},e.createDir=function(e,t){g(e);return this.jQize(),this.jQ.insDirOf(e,t.jQ),t[e]=this.adopt(t.parent,t[h],t[1]),this},e.createLeftOf=function(e){return this.createDir(h,e)},e.selectChildren=function(e,t){return M(e,t)},e.bubble=u((function(e){for(var t=this;t;t=t.parent){if(!1===e(t))break}return this})),e.postOrder=u((function(e){return function t(n){n.eachChild(t),e(n)}(this),this})),e.isEmpty=function(){return 0===this.ends[h]&&0===this.ends[1]},e.isStyleBlock=function(){return!1},e.children=function(){return I(this.ends[h],this.ends[1])},e.eachChild=function(){var e=this.children();return e.each.apply(e,arguments),this},e.foldChildren=function(e,t){return this.children().fold(e,t)},e.withDirAdopt=function(e,t,n,r){return I(this,this).withDirAdopt(e,t,n,r),this},e.adopt=function(e,t,n){return I(this,this).adopt(e,t,n),this},e.disown=function(){return I(this,this).disown(),this},e.remove=function(){return this.jQ.remove(),this.postOrder("dispose"),this.disown()}}));function b(e,t,n){f("a parent is always present",e),f("leftward is properly set up",t?t[1]===n&&t.parent===e:e.ends[h]===n),f("rightward is properly set up",n?n[h]===t&&n.parent===e:e.ends[1]===t)}var I=p((function(e){e.init=function(e,t,n){if(void 0===n&&(n=h),g(n),f("no half-empty fragments",!e==!t),this.ends={},e){f("withDir is passed to Fragment",e instanceof v),f("oppDir is passed to Fragment",t instanceof v),f("withDir and oppDir have the same parent",e.parent===t.parent),this.ends[n]=e,this.ends[-n]=t;var r=this.fold([],(function(e,t){return e.push.apply(e,t.jQ.get()),e}));this.jQ=this.jQ.add(r)}},e.jQ=m(),e.withDirAdopt=function(e,t,n,r){return e===h?this.adopt(t,n,r):this.adopt(t,r,n)},e.adopt=function(e,t,n){b(e,t,n);this.disowned=!1;var r=this.ends[h];if(!r)return this;var i=this.ends[1];return t||(e.ends[h]=r),n?n[h]=i:e.ends[1]=i,this.ends[1][1]=n,this.each((function(n){n[h]=t,n.parent=e,t&&(t[1]=n),t=n})),this},e.disown=function(){var e=this.ends[h];if(!e||this.disowned)return this;this.disowned=!0;var t=this.ends[1],n=e.parent;return b(n,e[h],e),b(n,t,t[1]),e[h]?e[h][1]=t[1]:n.ends[h]=t[1],t[1]?t[1][h]=e[h]:n.ends[1]=e[h],this},e.remove=function(){return this.jQ.remove(),this.each("postOrder","dispose"),this.disown()},e.each=u((function(e){var t=this.ends[h];if(!t)return this;for(;t!==this.ends[1][1];t=t[1]){if(!1===e(t))break}return this})),e.fold=function(e,t){return this.each((function(n){e=t.call(this,e,n)})),e}})),x={},w={},T=p(y,(function(e){e.init=function(e,t){this.parent=e,this.options=t;var n=this.jQ=this._jQ=m('<span class="mq-cursor">​</span>');this.blink=function(){n.toggleClass("mq-blink")},this.upDownCache={}},e.show=function(){return this.jQ=this._jQ.removeClass("mq-blink"),"intervalId"in this?clearInterval(this.intervalId):(this[1]?this.selection&&this.selection.ends[h][h]===this[h]?this.jQ.insertBefore(this.selection.jQ):this.jQ.insertBefore(this[1].jQ.first()):this.jQ.appendTo(this.parent.jQ),this.parent.focus()),this.intervalId=setInterval(this.blink,500),this},e.hide=function(){return"intervalId"in this&&clearInterval(this.intervalId),delete this.intervalId,this.jQ.detach(),this.jQ=m(),this},e.withDirInsertAt=function(e,t,n,r){var i=this.parent;this.parent=t,this[e]=n,this[-e]=r,i!==t&&i.blur&&i.blur(this)},e.insDirOf=function(e,t){return g(e),this.jQ.insDirOf(e,t.jQ),this.withDirInsertAt(e,t.parent,t[e],t),this.parent.jQ.addClass("mq-hasCursor"),this},e.insLeftOf=function(e){return this.insDirOf(h,e)},e.insRightOf=function(e){return this.insDirOf(1,e)},e.insAtDirEnd=function(e,t){return g(e),this.jQ.insAtDirEnd(e,t.jQ),this.withDirInsertAt(e,t,0,t.ends[e]),t.focus(),this},e.insAtLeftEnd=function(e){return this.insAtDirEnd(h,e)},e.insAtRightEnd=function(e){return this.insAtDirEnd(1,e)},e.jumpUpDown=function(e,t){this.upDownCache[e.id]=y.copy(this);var n=this.upDownCache[t.id];if(n)n[1]?this.insLeftOf(n[1]):this.insAtRightEnd(n.parent);else{var r=this.offset().left;t.seek(r,this)}},e.offset=function(){var e=this.jQ.removeClass("mq-cursor").offset();return this.jQ.addClass("mq-cursor"),e},e.unwrapGramp=function(){var e=this.parent.parent,t=e.parent,n=e[1],r=e[h];if(e.disown().eachChild((function(i){i.isEmpty()||(i.children().adopt(t,r,n).each((function(t){t.jQ.insertBefore(e.jQ.first())})),r=i.ends[1])})),!this[1])if(this[h])this[1]=this[h][1];else for(;!this[1];){if(this.parent=this.parent[1],!this.parent){this[1]=e[1],this.parent=t;break}this[1]=this.parent.ends[h]}this[1]?this.insLeftOf(this[1]):this.insAtRightEnd(t),e.jQ.remove(),e[h].siblingDeleted&&e[h].siblingDeleted(this.options,1),e[1].siblingDeleted&&e[1].siblingDeleted(this.options,h)},e.startSelection=function(){for(var e=this.anticursor=y.copy(this),t=e.ancestors={},n=e;n.parent;n=n.parent)t[n.parent.id]=n},e.endSelection=function(){delete this.anticursor},e.select=function(){var e=this.anticursor;if(this[h]===e[h]&&this.parent===e.parent)return!1;for(var t=this;t.parent;t=t.parent)if(t.parent.id in e.ancestors){var n=t.parent;break}f("cursor and anticursor in the same tree",n);var r,i,a=e.ancestors[n.id],o=1;if(t[h]!==a)for(var s=t;s;s=s[1])if(s[1]===a[1]){o=h,r=t,i=a;break}return 1===o&&(r=a,i=t),r instanceof y&&(r=r[1]),i instanceof y&&(i=i[h]),this.hide().selection=n.selectChildren(r,i),this.insDirOf(o,this.selection.ends[o]),this.selectionChanged(),!0},e.clearSelection=function(){return this.selection&&(this.selection.clear(),delete this.selection,this.selectionChanged()),this},e.deleteSelection=function(){this.selection&&(this[h]=this.selection.ends[h][h],this[1]=this.selection.ends[1][1],this.selection.remove(),this.selectionChanged(),delete this.selection)},e.replaceSelection=function(){var e=this.selection;return e&&(this[h]=e.ends[h][h],this[1]=e.ends[1][1],delete this.selection),e}})),M=p(I,(function(e,t){e.init=function(){t.init.apply(this,arguments),this.jQ=this.jQ.wrapAll('<span class="mq-selection"></span>').parent()},e.adopt=function(){return this.jQ.replaceWith(this.jQ=this.jQ.children()),t.adopt.apply(this,arguments)},e.clear=function(){return this.jQ.replaceWith(this.jQ[0].childNodes),this},e.join=function(e){return this.fold("",(function(t,n){return t+n[e]()}))}})),A=p((function(e){e.init=function(e,t,n){this.id=e.id,this.data={},this.root=e,this.container=t,this.options=n,e.controller=this,this.cursor=e.cursor=T(e,n)},e.handle=function(e,t){var n=this.options.handlers;if(n&&n.fns[e]){var r=n.APIClasses[this.KIND_OF_MQ](this);t===h||1===t?n.fns[e](t,r):n.fns[e](r)}};var t=[];this.onNotify=function(e){t.push(e)},e.notify=function(){for(var e=0;e<t.length;e+=1)t[e].apply(this.cursor,arguments);return this}})),C={},E=p(),N={},S=p(),k={};function j(){window.console&&console.warn('You are using the MathQuill API without specifying an interface version, which will fail in v1.0.0. Easiest fix is to do the following before doing anything else:\n\n MathQuill = MathQuill.getInterface(1);\n // now MathQuill.MathField() works like it used to\n\nSee also the "`dev` branch (2014–2015) → v0.10.0 Migration Guide" at\n https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide')}function D(e){return j(),Be(e)}D.prototype=S.p,D.VERSION="v0.10.5",D.interfaceVersion=function(e){if(1!==e)throw"Only interface version 1 supported. You specified: "+e;return(j=function(){window.console&&console.warn('You called MathQuill.interfaceVersion(1); to specify the interface version, which will fail in v1.0.0. You can fix this easily by doing this before doing anything else:\n\n MathQuill = MathQuill.getInterface(1);\n // now MathQuill.MathField() works like it used to\n\nSee also the "`dev` branch (2014–2015) → v0.10.0 Migration Guide" at\n https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide')})(),D},D.getInterface=P;var L=P.MIN=1,O=P.MAX=2;function P(e){if(!(L<=e&&e<=O))throw"Only interface versions between "+L+" and "+O+" supported. You specified: "+e;function n(e){if(!e||!e.nodeType)return null;var t=m(e).children(".mq-root-block").attr(r),n=t&&v.byId[t].controller;return n?i[n.KIND_OF_MQ](n):null}var i={};function a(e,t){for(var n in t&&t.handlers&&(t.handlers={fns:t.handlers,APIClasses:i}),t)if(t.hasOwnProperty(n)){var r=t[n],a=N[n];e[n]=a?a(r):r}}n.L=h,n.R=1,n.saneKeyboardEvents=Z,n.config=function(e){return a(E.p,e),this},n.registerEmbed=function(e,t){if(!/^[a-z][a-z0-9]*$/i.test(e))throw"Embed name must start with letter and be only letters and digits";k[e]=t};var s=i.AbstractMathQuill=p(S,(function(e){e.init=function(e){this.__controller=e,this.__options=e.options,this.id=e.id,this.data=e.data},e.__mathquillify=function(e){var t=this.__controller,n=t.root,i=t.container;t.createTextarea();var a=i.addClass(e).contents().detach();n.jQ=m('<span class="mq-root-block"/>').attr(r,n.id).appendTo(i),this.latex(a.text()),this.revert=function(){return i.empty().unbind(".mathquill").removeClass("mq-editable-field mq-math-mode mq-text-mode").append(a)}},e.config=function(e){return a(this.__options,e),this},e.el=function(){return this.__controller.container[0]},e.text=function(){return this.__controller.exportText()},e.latex=function(e){return arguments.length>0?(this.__controller.renderLatexMath(e),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this):this.__controller.exportLatex()},e.html=function(){return this.__controller.root.jQ.html().replace(/ mathquill-(?:command|block)-id="?\d+"?/g,"").replace(/<span class="?mq-cursor( mq-blink)?"?>.?<\/span>/i,"").replace(/ mq-hasCursor|mq-hasCursor ?/,"").replace(/ class=(""|(?= |>))/g,"")},e.reflow=function(){return this.__controller.root.postOrder("reflow"),this}}));for(var l in n.prototype=s.prototype,i.EditableField=p(s,(function(e,n){e.__mathquillify=function(){return n.__mathquillify.apply(this,arguments),this.__controller.editable=!0,this.__controller.delegateMouseEvents(),this.__controller.editablesTextareaEvents(),this},e.focus=function(){return this.__controller.textarea.focus(),this},e.blur=function(){return this.__controller.textarea.blur(),this},e.write=function(e){return this.__controller.writeLatex(e),this.__controller.scrollHoriz(),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this},e.empty=function(){var e=this.__controller.root,t=this.__controller.cursor;return e.eachChild("postOrder","dispose"),e.ends[h]=e.ends[1]=0,e.jQ.empty(),delete t.selection,t.insAtRightEnd(e),this},e.cmd=function(e){var t=this.__controller.notify(),n=t.cursor;if(/^\\[a-z]+$/i.test(e)){e=e.slice(1);var r=x[e]||Ue[e];r&&(e=r(e),n.selection&&e.replaces(n.replaceSelection()),e.createLeftOf(n.show()),this.__controller.scrollHoriz())}else n.parent.write(n,e);return t.blurred&&n.hide().parent.blur(),this},e.select=function(){var e=this.__controller;for(e.notify("move").cursor.insAtRightEnd(e.root);e.cursor[h];)e.selectLeft();return this},e.clearSelection=function(){return this.__controller.cursor.clearSelection(),this},e.moveToDirEnd=function(e){return this.__controller.notify("move").cursor.insAtDirEnd(e,this.__controller.root),this},e.moveToLeftEnd=function(){return this.moveToDirEnd(h)},e.moveToRightEnd=function(){return this.moveToDirEnd(1)},e.keystroke=function(e){e=e.replace(/^\s+|\s+$/g,"").split(/\s+/);for(var t=0;t<e.length;t+=1)this.__controller.keystroke(e[t],{preventDefault:o});return this},e.typedText=function(e){for(var t=0;t<e.length;t+=1)this.__controller.typedText(e.charAt(t));return this},e.dropEmbedded=function(e,t,n){var r=e-m(window).scrollLeft(),i=t-m(window).scrollTop(),a=document.elementFromPoint(r,i);this.__controller.seek(m(a),e,t),_e().setOptions(n).createLeftOf(this.__controller.cursor)},e.clickAt=function(e,n,r){r=r||document.elementFromPoint(e,n);var i=this.__controller,a=i.root;return t.contains(a.jQ[0],r)||(r=a.jQ[0]),i.seek(m(r),e+pageXOffset,n+pageYOffset),i.blurred&&this.focus(),this},e.ignoreNextMousedown=function(e){return this.__controller.cursor.options.ignoreNextMousedown=e,this}})),n.EditableField=function(){throw"wtf don't call me, I'm 'abstract'"},n.EditableField.prototype=i.EditableField.prototype,C)!function(t,r){var a=i[t]=r(i);n[t]=function(r,i){var o=n(r);if(o instanceof a||!r||!r.nodeType)return o;var s=A(a.RootBlock(),m(r),E());return s.KIND_OF_MQ=t,a(s).__mathquillify(i,e)},n[t].prototype=a.prototype}(l,C[l]);return n}D.noConflict=function(){return window.MathQuill=R,D};var R=window.MathQuill;function z(e){for(var t="moveOutOf deleteOutOf selectOutOf upOutOf downOutOf".split(" "),n=0;n<t.length;n+=1)!function(t){e[t]=function(e){this.controller.handle(t,e)}}(t[n]);e.reflow=function(){this.controller.handle("reflow"),this.controller.handle("edited"),this.controller.handle("edit")}}window.MathQuill=D;var _,U=p((function(e,t,n){function r(e,t){throw"Parse Error: "+t+" at "+(e=e?"'"+e+"'":"EOF")}e.init=function(e){this._=e},e.parse=function(e){return this.skip(o)._(""+e,(function(e,t){return t}),r)},e.or=function(e){f("or is passed a parser",e instanceof n);var t=this;return n((function(n,r,i){return t._(n,r,(function(t){return e._(n,r,i)}))}))},e.then=function(e){var t=this;return n((function(r,i,a){return t._(r,(function(t,r){var o=e instanceof n?e:e(r);return f("a parser is returned",o instanceof n),o._(t,i,a)}),a)}))},e.many=function(){var e=this;return n((function(t,n,r){for(var i=[];e._(t,a,o););return n(t,i);function a(e,n){return t=e,i.push(n),!0}function o(){return!1}}))},e.times=function(e,t){arguments.length<2&&(t=e);var r=this;return n((function(n,i,a){for(var o,s=[],l=!0,c=0;c<e;c+=1)if(!(l=r._(n,u,d)))return a(n,o);for(;c<t&&l;c+=1)l=r._(n,u,f);return i(n,s);function u(e,t){return s.push(t),n=e,!0}function d(e,t){return o=t,n=e,!1}function f(e,t){return!1}}))},e.result=function(e){return this.then(a(e))},e.atMost=function(e){return this.times(0,e)},e.atLeast=function(e){var t=this;return t.times(e).then((function(e){return t.many().map((function(t){return e.concat(t)}))}))},e.map=function(e){return this.then((function(t){return a(e(t))}))},e.skip=function(e){return this.then((function(t){return e.result(t)}))};this.string=function(e){var t=e.length,r="expected '"+e+"'";return n((function(n,i,a){var o=n.slice(0,t);return o===e?i(n.slice(t),o):a(n,r)}))};var i=this.regex=function(e){f("regexp parser is anchored","^"===e.toString().charAt(1));var t="expected "+e;return n((function(n,r,i){var a=e.exec(n);if(a){var o=a[0];return r(n.slice(o.length),o)}return i(n,t)}))},a=n.succeed=function(e){return n((function(t,n){return n(t,e)}))},o=(n.fail=function(e){return n((function(t,n,r){return r(t,e)}))},n.letter=i(/^[a-z]/i),n.letters=i(/^[a-z]*/i),n.digit=i(/^[0-9]/),n.digits=i(/^[0-9]*/),n.whitespace=i(/^\s+/),n.optWhitespace=i(/^\s*/),n.any=n((function(e,t,n){return e?t(e.slice(1),e.charAt(0)):n(e,"expected any character")})),n.all=n((function(e,t,n){return t("",e)})),n.eof=n((function(e,t,n){return e?n(e,"expected EOF"):t(e,e)})))})),Z=(_={8:"Backspace",9:"Tab",10:"Enter",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Esc",32:"Spacebar",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",45:"Insert",46:"Del",144:"NumLock"},function(e,n){var r,i=null,a=null,s=t(e),l=t(n.container||s),c=o;function u(e){c=e,clearTimeout(r),r=setTimeout(e)}function d(e){u((function(t){c=o,clearTimeout(r),e(t)}))}l.bind("keydown keypress input keyup focusout paste",(function(e){c(e)}));var f=!1;function p(){n.keystroke(function(e){var t,n=e.which||e.keyCode,r=_[n],i=[];return e.ctrlKey&&i.push("Ctrl"),e.originalEvent&&e.originalEvent.metaKey&&i.push("Meta"),e.altKey&&i.push("Alt"),e.shiftKey&&i.push("Shift"),t=r||String.fromCharCode(n),i.length||r?(i.push(t),i.join("-")):t}(i),i)}function h(){if(!("selectionStart"in(e=s[0]))||e.selectionStart===e.selectionEnd){var e,t=s.val();1===t.length?(s.val(""),n.typedText(t)):t&&s[0].select&&s[0].select()}}function g(){var e=s.val();s.val(""),e&&n.paste(e)}return l.bind({keydown:function(e){i=e,a=null,f&&d((function(e){e&&"focusout"===e.type||!s[0].select||s[0].select()})),p()},keypress:function(e){i&&a&&p(),a=e,u(h)},keyup:function(e){i&&!a&&u(h)},focusout:function(){i=a=null},cut:function(){d((function(){n.cut()}))},copy:function(){d((function(){n.copy()}))},paste:function(e){s.focus(),u(g)}}),{select:function(e){c(),c=o,clearTimeout(r),s.val(e),e&&s[0].select&&s[0].select(),f=!!e}}});A.open((function(e,t){e.exportText=function(){return this.root.foldChildren("",(function(e,t){return e+t.text()}))}})),A.open((function(e){e.focusBlurEvents=function(){var e,t=this,n=t.root,r=t.cursor;function i(){clearTimeout(e),r.selection&&r.selection.jQ.addClass("mq-blur"),a()}function a(){r.hide().parent.blur(),t.container.removeClass("mq-focused"),m(window).unbind("blur",i)}t.textarea.focus((function(){t.blurred=!1,clearTimeout(e),t.container.addClass("mq-focused"),r.parent||r.insAtRightEnd(n),r.selection?(r.selection.jQ.removeClass("mq-blur"),t.selectionChanged()):r.show()})).blur((function(){t.blurred=!0,e=setTimeout((function(){n.postOrder("intentionalBlur"),r.clearSelection().endSelection(),a()})),m(window).bind("blur",i)})),t.blurred=!0,r.hide().parent.blur()}})),A.open((function(e){e.keystroke=function(e,t){this.cursor.parent.keystroke(e,t,this)}})),v.open((function(e){e.keystroke=function(e,t,n){var r=n.cursor;switch(e){case"Ctrl-Shift-Backspace":case"Ctrl-Backspace":n.ctrlDeleteDir(h);break;case"Shift-Backspace":case"Backspace":n.backspace();break;case"Esc":case"Tab":return void n.escapeDir(1,e,t);case"Shift-Tab":case"Shift-Esc":return void n.escapeDir(h,e,t);case"End":n.notify("move").cursor.insAtRightEnd(r.parent);break;case"Ctrl-End":n.notify("move").cursor.insAtRightEnd(n.root);break;case"Shift-End":for(;r[1];)n.selectRight();break;case"Ctrl-Shift-End":for(;r[1]||r.parent!==n.root;)n.selectRight();break;case"Home":n.notify("move").cursor.insAtLeftEnd(r.parent);break;case"Ctrl-Home":n.notify("move").cursor.insAtLeftEnd(n.root);break;case"Shift-Home":for(;r[h];)n.selectLeft();break;case"Ctrl-Shift-Home":for(;r[h]||r.parent!==n.root;)n.selectLeft();break;case"Left":n.moveLeft();break;case"Shift-Left":n.selectLeft();break;case"Ctrl-Left":break;case"Right":n.moveRight();break;case"Shift-Right":n.selectRight();break;case"Ctrl-Right":break;case"Up":n.moveUp();break;case"Down":n.moveDown();break;case"Shift-Up":if(r[h])for(;r[h];)n.selectLeft();else n.selectLeft();case"Shift-Down":if(r[1])for(;r[1];)n.selectRight();else n.selectRight();case"Ctrl-Up":case"Ctrl-Down":break;case"Ctrl-Shift-Del":case"Ctrl-Del":n.ctrlDeleteDir(1);break;case"Shift-Del":case"Del":n.deleteForward();break;case"Meta-A":case"Ctrl-A":for(n.notify("move").cursor.insAtRightEnd(n.root);r[h];)n.selectLeft();break;default:return}t.preventDefault(),n.scrollHoriz()},e.moveOutOf=e.moveTowards=e.deleteOutOf=e.deleteTowards=e.unselectInto=e.selectOutOf=e.selectTowards=function(){f("overridden or never called on this node")}})),A.open((function(e){function t(e,t){var n=e.notify("upDown").cursor,r=t+"Into",i=t+"OutOf";return n[1][r]?n.insAtLeftEnd(n[1][r]):n[h][r]?n.insAtRightEnd(n[h][r]):n.parent.bubble((function(e){var t=e[i];if(t&&("function"==typeof t&&(t=e[i](n)),t instanceof v&&n.jumpUpDown(e,t),!0!==t))return!1})),e}this.onNotify((function(e){"move"!==e&&"upDown"!==e||this.show().clearSelection()})),e.escapeDir=function(e,t,n){g(e);var r=this.cursor;if(r.parent!==this.root&&n.preventDefault(),r.parent!==this.root)return r.parent.moveOutOf(e,r),this.notify("move")},N.leftRightIntoCmdGoes=function(e){if(e&&"up"!==e&&"down"!==e)throw'"up" or "down" required for leftRightIntoCmdGoes option, got "'+e+'"';return e},e.moveDir=function(e){g(e);var t=this.cursor,n=t.options.leftRightIntoCmdGoes;return t.selection?t.insDirOf(e,t.selection.ends[e]):t[e]?t[e].moveTowards(e,t,n):t.parent.moveOutOf(e,t,n),this.notify("move")},e.moveLeft=function(){return this.moveDir(h)},e.moveRight=function(){return this.moveDir(1)},e.moveUp=function(){return t(this,"up")},e.moveDown=function(){return t(this,"down")},this.onNotify((function(e){"upDown"!==e&&(this.upDownCache={})})),this.onNotify((function(e){"edit"===e&&this.show().deleteSelection()})),e.deleteDir=function(e){g(e);var t=this.cursor,n=t.selection;return this.notify("edit"),n||(t[e]?t[e].deleteTowards(e,t):t.parent.deleteOutOf(e,t)),t[h].siblingDeleted&&t[h].siblingDeleted(t.options,1),t[1].siblingDeleted&&t[1].siblingDeleted(t.options,h),t.parent.bubble("reflow"),this},e.ctrlDeleteDir=function(e){g(e);var t=this.cursor;return!t[e]||t.selection?this.deleteDir(e):(this.notify("edit"),e===h?I(t.parent.ends[h],t[h]).remove():I(t[1],t.parent.ends[1]).remove(),t.insAtDirEnd(e,t.parent),t[h].siblingDeleted&&t[h].siblingDeleted(t.options,1),t[1].siblingDeleted&&t[1].siblingDeleted(t.options,h),t.parent.bubble("reflow"),this)},e.backspace=function(){return this.deleteDir(h)},e.deleteForward=function(){return this.deleteDir(1)},this.onNotify((function(e){"select"!==e&&this.endSelection()})),e.selectDir=function(e){var t=this.notify("select").cursor,n=t.selection;g(e),t.anticursor||t.startSelection();var r=t[e];r?n&&n.ends[e]===r&&t.anticursor[-e]!==r?r.unselectInto(e,t):r.selectTowards(e,t):t.parent.selectOutOf(e,t),t.clearSelection(),t.select()||t.show()},e.selectLeft=function(){return this.selectDir(h)},e.selectRight=function(){return this.selectDir(1)}}));var F=function(){function e(e){for(var t=e[0]||V(),n=1;n<e.length;n+=1)e[n].children().adopt(t,t.ends[1],0);return t}var t=U.string,n=U.regex,r=U.letter,i=U.any,a=U.optWhitespace,o=U.succeed,s=U.fail,l=r.map((function(e){return ne(e)})),c=n(/^[^${}\\_^]/).map((function(e){return W(e)})),u=n(/^[^\\a-eg-zA-Z]/).or(t("\\").then(n(/^[a-z]+/i).or(n(/^\s+/).result(" ")).or(i))).then((function(e){var t=x[e];return t?t(e).parser():s("unknown command: \\"+e)})).or(l).or(c),d=t("{").then((function(){return p})).skip(t("}")),f=a.then(d.or(u.map((function(e){var t=V();return e.adopt(t,0,0),t})))),p=f.many().map(e).skip(a),h=t("[").then(f.then((function(e){return"]"!==e.join("latex")?o(e):s()})).many().map(e).skip(a)).skip(t("]")),g=p;return g.block=f,g.optBlock=h,g}();A.open((function(e,t){e.exportLatex=function(){return this.root.latex().replace(/(\\[a-z]+) (?![a-z])/gi,"$1")},e.writeLatex=function(e){var t=this.notify("edit").cursor,n=U.all,r=U.eof,i=F.skip(r).or(n.result(!1)).parse(e);i&&!i.isEmpty()&&(i.children().adopt(t.parent,t[h],t[1]),i.jQize().insertBefore(t.jQ),t[h]=i.ends[1],i.finalizeInsert(t.options,t),i.ends[1][1].siblingCreated&&i.ends[1][1].siblingCreated(t.options,h),i.ends[h][h].siblingCreated&&i.ends[h][h].siblingCreated(t.options,1),t.parent.bubble("reflow"));return this},e.renderLatexMath=function(e){var t=this.root,n=this.cursor,r=U.all,i=U.eof,a=F.skip(i).or(r.result(!1)).parse(e);t.eachChild("postOrder","dispose"),t.ends[h]=t.ends[1]=0,a&&a.children().adopt(t,0,0);var o=t.jQ;if(a){var s=a.join("html");o.html(s),t.jQize(o.children()),t.finalizeInsert(n.options)}else o.empty();delete n.selection,n.insAtRightEnd(t)},e.renderLatexText=function(e){var t=this.root,n=this.cursor;t.jQ.children().slice(1).remove(),t.eachChild("postOrder","dispose"),t.ends[h]=t.ends[1]=0,delete n.selection,n.show().insAtRightEnd(t);var r=U.regex,i=U.string,a=U.eof,o=U.all,s=i("$").then(F).skip(i("$").or(a)).map((function(e){var t=K(n);t.createBlocks();var r=t.ends[h];return e.children().adopt(r,0,0),t})),l=i("\\$").result("$").or(r(/^[^$]/)).map(W),c=s.or(l).many().skip(a).or(o.result(!1)).parse(e);if(c){for(var u=0;u<c.length;u+=1)c[u].adopt(t,t.ends[1],0);t.jQize().appendTo(t.jQ),t.finalizeInsert(n.options)}}})),A.open((function(e){E.p.ignoreNextMousedown=o,e.delegateMouseEvents=function(){var e=this.root.jQ;this.container.bind("mousedown.mathquill",(function(t){var n,i=m(t.target).closest(".mq-root-block"),a=v.byId[i.attr(r)||e.attr(r)].controller,s=a.cursor,l=s.blink,c=a.textareaSpan,u=a.textarea;(t.preventDefault(),t.target.unselectable=!0,s.options.ignoreNextMousedown(t))||(s.options.ignoreNextMousedown=o,a.blurred&&(a.editable||i.prepend(c),u.focus()),s.blink=o,a.seek(m(t.target),t.pageX,t.pageY).cursor.startSelection(),i.mousemove(d),m(t.target.ownerDocument).mousemove(f).mouseup((function e(t){s.blink=l,s.selection||(a.editable?s.show():c.detach()),i.unbind("mousemove",d),m(t.target.ownerDocument).unbind("mousemove",f).unbind("mouseup",e)})));function d(e){n=m(e.target)}function f(e){s.anticursor||s.startSelection(),a.seek(n,e.pageX,e.pageY).cursor.select(),n=void 0}}))}})),A.open((function(e){e.seek=function(e,t,n){var i=this.notify("select").cursor;if(e){var a=e.attr(r)||e.attr("mathquill-command-id");if(!a){var o=e.parent();a=o.attr(r)||o.attr("mathquill-command-id")}}var s=a?v.byId[a]:this.root;return f("nodeId is the id of some Node that exists",s),i.clearSelection().show(),s.seek(t,i),this.scrollHoriz(),this}})),A.open((function(e){e.scrollHoriz=function(){var e=this.cursor,t=e.selection,n=e.offset();if(n){var r=e.jQ.closest(".mq-editable-field"),i=Number(n.top-r.offset().top+2*e.jQ.height());r.find(".mq-textarea textarea").css("top",i+"px")}var a=this.root.jQ[0].getBoundingClientRect();if(t){var o=t.jQ[0].getBoundingClientRect(),s=o.left-(a.left+20),l=o.right-(a.right-20);if(t.ends[h]===e[1])if(s<0)u=s;else{if(!(l>0))return;if(o.left-l<a.left+20)u=s;else u=l}else if(l>0)u=l;else{if(!(s<0))return;if(o.right-s>a.right-20)u=l;else u=s}}else{var c=e.jQ[0].getBoundingClientRect().left;if(c>a.right-20)var u=c-(a.right-20);else{if(!(c<a.left+20))return;var u=c-(a.left+20)}}this.root.jQ.stop().animate({scrollLeft:"+="+u},100)}})),A.open((function(e){E.p.substituteTextarea=function(){return m("<textarea autocapitalize=off autocomplete=off autocorrect=off spellcheck=false x-palm-disable-ste-all=true />")[0]},e.createTextarea=function(){var e=this.textareaSpan=m('<span class="mq-textarea"></span>'),t=this.options.substituteTextarea();if(!t.nodeType)throw"substituteTextarea() must return a DOM element, got "+t;t=this.textarea=m(t).appendTo(e);var n=this;n.cursor.selectionChanged=function(){n.selectionChanged()}},e.selectionChanged=function(){var e=this;ye(e.container[0]),void 0===e.textareaSelectionTimeout&&(e.textareaSelectionTimeout=setTimeout((function(){e.setTextareaSelection()})))},e.setTextareaSelection=function(){this.textareaSelectionTimeout=void 0;var e="";this.cursor.selection&&(e=this.cursor.selection.join("latex"),this.options.statelessClipboard&&(e="$"+e+"$")),this.selectFn(e)},e.staticMathTextareaEvents=function(){var e=this,n=(e.root,e.cursor),r=e.textarea,i=e.textareaSpan;function a(){i.detach(),e.blurred=!0}this.container.prepend(t('<span class="mq-selectable">').text("$"+e.exportLatex()+"$")),e.blurred=!0,r.bind("cut paste",!1).bind("copy",(function(){e.setTextareaSelection()})).focus((function(){e.blurred=!1})).blur((function(){n.selection&&n.selection.clear(),setTimeout(a)})),e.selectFn=function(e){r.val(e),e&&r.select()}},E.p.substituteKeyboardEvents=Z,e.editablesTextareaEvents=function(){var e=this.textarea,t=this.textareaSpan,n=this.options.substituteKeyboardEvents(e,this);this.selectFn=function(e){n.select(e)},this.container.prepend(t),this.focusBlurEvents()},e.typedText=function(e){if("\n"===e)return this.handle("enter");var t=this.notify().cursor;t.parent.write(t,e),this.scrollHoriz()},e.cut=function(){var e=this,t=e.cursor;t.selection&&setTimeout((function(){e.notify("edit"),t.parent.bubble("reflow")}))},e.copy=function(){this.setTextareaSelection()},e.paste=function(e){this.options.statelessClipboard&&(e="$"===e.slice(0,1)&&"$"===e.slice(-1)?e.slice(1,-1):"\\text{"+e+"}"),this.writeLatex(e).cursor.show()}}));var G=p(v,(function(e,t){e.finalizeInsert=function(e,t){this.postOrder("finalizeTree",e),this.postOrder("contactWeld",t),this.postOrder("blur"),this.postOrder("reflow"),this[1].siblingCreated&&this[1].siblingCreated(e,h),this[h].siblingCreated&&this[h].siblingCreated(e,1),this.bubble("reflow")}})),B=p(G,(function(e,t){e.init=function(e,n,r){t.init.call(this),this.ctrlSeq||(this.ctrlSeq=e),n&&(this.htmlTemplate=n),r&&(this.textTemplate=r)},e.replaces=function(e){e.disown(),this.replacedFragment=e},e.isEmpty=function(){return this.foldChildren(!0,(function(e,t){return e&&t.isEmpty()}))},e.parser=function(){var e=F.block,t=this;return e.times(t.numBlocks()).map((function(e){t.blocks=e;for(var n=0;n<e.length;n+=1)e[n].adopt(t,t.ends[1],0);return t}))},e.createLeftOf=function(e){var n=this.replacedFragment;this.createBlocks(),t.createLeftOf.call(this,e),n&&(n.adopt(this.ends[h],0,0),n.jQ.appendTo(this.ends[h].jQ)),this.finalizeInsert(e.options),this.placeCursor(e)},e.createBlocks=function(){for(var e=this.numBlocks(),t=this.blocks=Array(e),n=0;n<e;n+=1){(t[n]=V()).adopt(this,this.ends[1],0)}},e.placeCursor=function(e){e.insAtRightEnd(this.foldChildren(this.ends[h],(function(e,t){return e.isEmpty()?e:t})))},e.moveTowards=function(e,t,n){var r=n&&this[n+"Into"];t.insAtDirEnd(-e,r||this.ends[-e])},e.deleteTowards=function(e,t){this.isEmpty()?t[e]=this.remove()[e]:this.moveTowards(e,t,null)},e.selectTowards=function(e,t){t[-e]=this,t[e]=this[e]},e.selectChildren=function(){return M(this,this)},e.unselectInto=function(e,t){t.insAtDirEnd(-e,t.anticursor.ancestors[this.id])},e.seek=function(e,t){function n(e){var t={};return t[h]=e.jQ.offset().left,t[1]=t[h]+e.jQ.outerWidth(),t}var r=this,i=n(r);if(e<i[h])return t.insLeftOf(r);if(e>i[1])return t.insRightOf(r);var a=i[h];r.eachChild((function(o){var s=n(o);return e<s[h]?(e-a<s[h]-e?o[h]?t.insAtRightEnd(o[h]):t.insLeftOf(r):t.insAtLeftEnd(o),!1):e>s[1]?void(o[1]?a=s[1]:i[1]-e<e-s[1]?t.insRightOf(r):t.insAtRightEnd(o)):(o.seek(e,t),!1)}))},e.numBlocks=function(){var e=this.htmlTemplate.match(/&\d+/g);return e?e.length:0},e.html=function(){var e=this.blocks,t=" mathquill-command-id="+this.id,n=this.htmlTemplate.match(/<[^<>]+>|[^<>]+/g);f("no unmatched angle brackets",n.join("")===this.htmlTemplate);for(var r=0,i=n[0];i;i=n[r+=1])if("/>"===i.slice(-2))n[r]=i.slice(0,-2)+t+"/>";else if("<"===i.charAt(0)){f("not an unmatched top-level close tag","/"!==i.charAt(1)),n[r]=i.slice(0,-1)+t+">";var a=1;do{f("no missing close tags",i=n[r+=1]),"</"===i.slice(0,2)?a-=1:"<"===i.charAt(0)&&"/>"!==i.slice(-2)&&(a+=1)}while(a>0)}return n.join("").replace(/>&(\d+)/g,(function(t,n){return" mathquill-block-id="+e[n].id+">"+e[n].join("html")}))},e.latex=function(){return this.foldChildren(this.ctrlSeq,(function(e,t){return e+"{"+(t.latex()||" ")+"}"}))},e.textTemplate=[""],e.text=function(){var e=this,t=0;return e.foldChildren(e.textTemplate[t],(function(n,r){t+=1;var i=r.text();return n&&"("===e.textTemplate[t]&&"("===i[0]&&")"===i.slice(-1)?n+i.slice(1,-1)+e.textTemplate[t]:n+r.text()+(e.textTemplate[t]||"")}))}})),Y=p(B,(function(e,t){e.init=function(e,n,r){r||(r=e&&e.length>1?e.slice(1):e),t.init.call(this,e,n,[r])},e.parser=function(){return U.succeed(this)},e.numBlocks=function(){return 0},e.replaces=function(e){e.remove()},e.createBlocks=o,e.moveTowards=function(e,t){t.jQ.insDirOf(e,this.jQ),t[-e]=this,t[e]=this[e]},e.deleteTowards=function(e,t){t[e]=this.remove()[e]},e.seek=function(e,t){e-this.jQ.offset().left<this.jQ.outerWidth()/2?t.insLeftOf(this):t.insRightOf(this)},e.latex=function(){return this.ctrlSeq},e.text=function(){return this.textTemplate},e.placeCursor=o,e.isEmpty=function(){return!0}})),W=p(Y,(function(e,t){e.init=function(e,n){t.init.call(this,e,"<span>"+(n||e)+"</span>")}})),H=p(Y,(function(e,t){e.init=function(e,n,r){t.init.call(this,e,'<span class="mq-binary-operator">'+n+"</span>",r)}})),V=p(G,(function(e,t){e.join=function(e){return this.foldChildren("",(function(t,n){return t+n[e]()}))},e.html=function(){return this.join("html")},e.latex=function(){return this.join("latex")},e.text=function(){return this.ends[h]===this.ends[1]&&0!==this.ends[h]?this.ends[h].text():this.join("text")},e.keystroke=function(e,n,r){return!r.options.spaceBehavesLikeTab||"Spacebar"!==e&&"Shift-Spacebar"!==e?t.keystroke.apply(this,arguments):(n.preventDefault(),void r.escapeDir("Shift-Spacebar"===e?h:1,e,n))},e.moveOutOf=function(e,t,n){!(n&&this.parent[n+"Into"])&&this[e]?t.insAtDirEnd(-e,this[e]):t.insDirOf(e,this.parent)},e.selectOutOf=function(e,t){t.insDirOf(e,this.parent)},e.deleteOutOf=function(e,t){t.unwrapGramp()},e.seek=function(e,t){var n=this.ends[1];if(!n||n.jQ.offset().left+n.jQ.outerWidth()<e)return t.insAtRightEnd(this);if(e<this.ends[h].jQ.offset().left)return t.insAtLeftEnd(this);for(;e<n.jQ.offset().left;)n=n[h];return n.seek(e,t)},e.chToCmd=function(e,t){var n;return e.match(/^[a-eg-zA-Z]$/)?ne(e):/^\d$/.test(e)?ee(e):t&&t.typingSlashWritesDivisionSymbol&&"/"===e?x["÷"](e):t&&t.typingAsteriskWritesTimesSymbol&&"*"===e?x["×"](e):(n=w[e]||x[e])?n(e):W(e)},e.write=function(e,t){var n=this.chToCmd(t,e.options);e.selection&&n.replaces(e.replaceSelection()),n.createLeftOf(e.show())},e.focus=function(){return this.jQ.addClass("mq-hasCursor"),this.jQ.removeClass("mq-empty"),this},e.blur=function(){return this.jQ.removeClass("mq-hasCursor"),this.isEmpty()&&this.jQ.addClass("mq-empty"),this}}));C.StaticMath=function(e){return p(e.AbstractMathQuill,(function(t,n){this.RootBlock=V,t.__mathquillify=function(e,t){return this.config(e),n.__mathquillify.call(this,"mq-math-mode"),this.__controller.delegateMouseEvents(),this.__controller.staticMathTextareaEvents(),this},t.init=function(){n.init.apply(this,arguments),this.__controller.root.postOrder("registerInnerField",this.innerFields=[],e.MathField)},t.latex=function(){var t=n.latex.apply(this,arguments);return arguments.length>0&&this.__controller.root.postOrder("registerInnerField",this.innerFields=[],e.MathField),t}}))};var q=p(V,z);C.MathField=function(e){return p(e.EditableField,(function(e,t){this.RootBlock=q,e.__mathquillify=function(e,n){return this.config(e),n>1&&(this.__controller.root.reflow=o),t.__mathquillify.call(this,"mq-editable-field mq-math-mode"),delete this.__controller.root.reflow,this}}))};var Q=p(v,(function(e,t){function n(e){e.jQ[0].normalize();var t=e.jQ[0].firstChild;if(t){f("only node in TextBlock span is Text node",3===t.nodeType);var n=J(t.data);return n.jQadd(t),e.children().disown(),n.adopt(e,0,0)}}e.ctrlSeq="\\text",e.replaces=function(e){e instanceof I?this.replacedText=e.remove().jQ.text():"string"==typeof e&&(this.replacedText=e)},e.jQadd=function(e){t.jQadd.call(this,e),this.ends[h]&&this.ends[h].jQadd(this.jQ[0].firstChild)},e.createLeftOf=function(e){if(t.createLeftOf.call(this,e),this[1].siblingCreated&&this[1].siblingCreated(e.options,h),this[h].siblingCreated&&this[h].siblingCreated(e.options,1),this.bubble("reflow"),e.insAtRightEnd(this),this.replacedText)for(var n=0;n<this.replacedText.length;n+=1)this.write(e,this.replacedText.charAt(n))},e.parser=function(){var e=this,t=U.string,n=U.regex;return U.optWhitespace.then(t("{")).then(n(/^[^}]*/)).skip(t("}")).map((function(t){return 0===t.length?I():(J(t).adopt(e,0,0),e)}))},e.textContents=function(){return this.foldChildren("",(function(e,t){return e+t.text}))},e.text=function(){return'"'+this.textContents()+'"'},e.latex=function(){var e=this.textContents();return 0===e.length?"":"\\text{"+e.replace(/\\/g,"\\backslash ").replace(/[{}]/g,"\\$&")+"}"},e.html=function(){return'<span class="mq-text-mode" mathquill-command-id='+this.id+">"+this.textContents()+"</span>"},e.moveTowards=function(e,t){t.insAtDirEnd(-e,this)},e.moveOutOf=function(e,t){t.insDirOf(e,this)},e.unselectInto=e.moveTowards,e.selectTowards=B.prototype.selectTowards,e.deleteTowards=B.prototype.deleteTowards,e.selectOutOf=function(e,t){t.insDirOf(e,this)},e.deleteOutOf=function(e,t){this.isEmpty()&&t.insRightOf(this)},e.write=function(e,n){if(e.show().deleteSelection(),"$"!==n)e[h]?e[h].appendText(n):J(n).createLeftOf(e);else if(this.isEmpty())e.insRightOf(this),W("\\$","$").createLeftOf(e);else if(e[1])if(e[h]){var r=Q(),i=this.ends[h];i.disown().jQ.detach(),i.adopt(r,0,0),e.insLeftOf(this),t.createLeftOf.call(r,e)}else e.insLeftOf(this);else e.insRightOf(this)},e.seek=function(e,t){t.hide();var r=n(this),i=this.jQ.width()/this.text.length,a=Math.round((e-this.jQ.offset().left)/i);a<=0?t.insAtLeftEnd(this):a>=r.text.length?t.insAtRightEnd(this):t.insLeftOf(r.splitRight(a));for(var o=e-t.show().offset().left,s=o&&o<0?h:1,l=s;t[s]&&o*l>0;)t[s].moveTowards(s,t),l=o,o=e-t.offset().left;if(s*o<-s*l&&t[-s].moveTowards(-s,t),t.anticursor){if(t.anticursor.parent===this){var c=t[h]&&t[h].text.length;if(this.anticursorPosition===c)t.anticursor=y.copy(t);else{if(this.anticursorPosition<c){var u=t[h].splitRight(this.anticursorPosition);t[h]=u}else u=t[1].splitRight(this.anticursorPosition-c);t.anticursor=y(this,u[h],u)}}}else this.anticursorPosition=t[h]&&t[h].text.length},e.blur=function(e){V.prototype.blur.call(this),e&&(""===this.textContents()?(this.remove(),e[h]===this?e[h]=this[h]:e[1]===this&&(e[1]=this[1])):n(this))},e.focus=V.prototype.focus})),J=p(v,(function(e,t){function n(e,t){return t.charAt(e===h?0:-1+t.length)}e.init=function(e){t.init.call(this),this.text=e},e.jQadd=function(e){this.dom=e,this.jQ=m(e)},e.jQize=function(){return this.jQadd(document.createTextNode(this.text))},e.appendText=function(e){this.text+=e,this.dom.appendData(e)},e.prependText=function(e){this.text=e+this.text,this.dom.insertData(0,e)},e.insTextAtDirEnd=function(e,t){g(t),1===t?this.appendText(e):this.prependText(e)},e.splitRight=function(e){var t=J(this.text.slice(e)).adopt(this.parent,this,this[1]);return t.jQadd(this.dom.splitText(e)),this.text=this.text.slice(0,e),t},e.moveTowards=function(e,t){g(e);var r=n(-e,this.text),i=this[-e];return i?i.insTextAtDirEnd(r,e):J(r).createDir(-e,t),this.deleteTowards(e,t)},e.latex=function(){return this.text},e.deleteTowards=function(e,t){this.text.length>1?1===e?(this.dom.deleteData(0,1),this.text=this.text.slice(1)):(this.dom.deleteData(-1+this.text.length,1),this.text=this.text.slice(0,-1)):(this.remove(),this.jQ.remove(),t[e]=this[e])},e.selectTowards=function(e,t){g(e);var r=t.anticursor,i=n(-e,this.text);if(r[e]===this){var a=J(i).createDir(e,t);r[e]=a,t.insDirOf(e,a)}else{var o=this[-e];if(o)o.insTextAtDirEnd(i,e);else(a=J(i).createDir(-e,t)).jQ.insDirOf(-e,t.selection.jQ);1===this.text.length&&r[-e]===this&&(r[-e]=this[-e])}return this.deleteTowards(e,t)}}));function X(e,t,n){return p(Q,{ctrlSeq:e,htmlTemplate:"<"+t+" "+n+">&0</"+t+">"})}x.text=x.textnormal=x.textrm=x.textup=x.textmd=Q,x.em=x.italic=x.italics=x.emph=x.textit=x.textsl=X("\\textit","i",'class="mq-text-mode"'),x.strong=x.bold=x.textbf=X("\\textbf","b",'class="mq-text-mode"'),x.sf=x.textsf=X("\\textsf","span",'class="mq-sans-serif mq-text-mode"'),x.tt=x.texttt=X("\\texttt","span",'class="mq-monospace mq-text-mode"'),x.textsc=X("\\textsc","span",'style="font-variant:small-caps" class="mq-text-mode"'),x.uppercase=X("\\uppercase","span",'style="text-transform:uppercase" class="mq-text-mode"'),x.lowercase=X("\\lowercase","span",'style="text-transform:lowercase" class="mq-text-mode"');var K=p(B,(function(e,t){e.init=function(e){t.init.call(this,"$"),this.cursor=e},e.htmlTemplate='<span class="mq-math-mode">&0</span>',e.createBlocks=function(){t.createBlocks.call(this),this.ends[h].cursor=this.cursor,this.ends[h].write=function(e,t){"$"!==t?V.prototype.write.call(this,e,t):this.isEmpty()?(e.insRightOf(this.parent),this.parent.deleteTowards(dir,e),W("\\$","$").createLeftOf(e.show())):e[1]?e[h]?V.prototype.write.call(this,e,t):e.insLeftOf(this.parent):e.insRightOf(this.parent)}},e.latex=function(){return"$"+this.ends[h].latex()+"$"}})),$=p(q,(function(e,t){e.keystroke=function(e){if("Spacebar"!==e&&"Shift-Spacebar"!==e)return t.keystroke.apply(this,arguments)},e.write=function(e,t){var n;(e.show().deleteSelection(),"$"===t)?K(e).createLeftOf(e):("<"===t?n="<":">"===t&&(n=">"),W(t,n).createLeftOf(e))}}));C.TextField=function(e){return p(e.EditableField,(function(e,t){this.RootBlock=$,e.__mathquillify=function(){return t.__mathquillify.call(this,"mq-editable-field mq-text-mode")},e.latex=function(e){return arguments.length>0?(this.__controller.renderLatexText(e),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this):this.__controller.exportLatex()}}))};var ee=p(W,(function(e,t){e.createLeftOf=function(e){e.options.autoSubscriptNumerals&&e.parent!==e.parent.parent.sub&&(e[h]instanceof te&&!1!==e[h].isItalic||e[h]instanceof Ae&&e[h][h]instanceof te&&!1!==e[h][h].isItalic)?(x._().createLeftOf(e),t.createLeftOf.call(this,e),e.insRightOf(e.parent.parent)):t.createLeftOf.call(this,e)}})),te=p(Y,(function(e,t){e.init=function(e,n){t.init.call(this,e,"<var>"+(n||e)+"</var>")},e.text=function(){var e=this.ctrlSeq;return this.isPartOfOperator?"\\"==e[0]?e=e.slice(1,e.length):" "==e[e.length-1]&&(e=e.slice(0,-1)):(!this[h]||this[h]instanceof te||this[h]instanceof H||"\\ "===this[h].ctrlSeq||(e="*"+e),!this[1]||this[1]instanceof H||this[1]instanceof Ae||(e+="*")),e}}));E.p.autoCommands={_maxLength:0},N.autoCommands=function(e){if(!/^[a-z]+(?: [a-z]+)*$/i.test(e))throw'"'+e+'" not a space-delimited list of only letters';for(var t=e.split(" "),n={},r=0,i=0;i<t.length;i+=1){var o=t[i];if(o.length<2)throw'autocommand "'+o+'" not minimum length of 2';if(x[o]===oe)throw'"'+o+'" is a built-in operator name';n[o]=1,r=a(r,o.length)}return n._maxLength=r,n};var ne=p(te,(function(e,t){function n(e){return!e||e instanceof H||e instanceof Ee}e.init=function(e){return t.init.call(this,this.letter=e)},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments);var n=e.options.autoCommands,r=n._maxLength;if(r>0){for(var i="",a=this,o=0;a instanceof ne&&a.ctrlSeq===a.letter&&o<r;)i=a.letter+i,a=a[h],o+=1;for(;i.length;){if(n.hasOwnProperty(i)){for(o=1,a=this;o<i.length;o+=1,a=a[h]);return I(a,this).remove(),e[h]=a[h],x[i](i).createLeftOf(e)}i=i.slice(1)}}},e.italicize=function(e){return this.isItalic=e,this.isPartOfOperator=!e,this.jQ.toggleClass("mq-operator-name",!e),this},e.finalizeTree=e.siblingDeleted=e.siblingCreated=function(e,t){t!==h&&this[1]instanceof ne||this.autoUnItalicize(e)},e.autoUnItalicize=function(e){var t=e.autoOperatorNames;if(0!==t._maxLength){for(var r=this.letter,a=this[h];a instanceof ne;a=a[h])r=a.letter+r;for(var o=this[1];o instanceof ne;o=o[1])r+=o.letter;I(a[1]||this.parent.ends[h],o[h]||this.parent.ends[1]).each((function(e){e.italicize(!0).jQ.removeClass("mq-first mq-last mq-followed-by-supsub"),e.ctrlSeq=e.letter}));e:for(var s=0,l=a[1]||this.parent.ends[h];s<r.length;s+=1,l=l[1])for(var c=i(t._maxLength,r.length-s);c>0;c-=1){var u=r.slice(s,s+c);if(t.hasOwnProperty(u)){for(var d=0,f=l;d<c;d+=1,f=f[1]){f.italicize(!1);var p=f}var g=re.hasOwnProperty(u);if(l.ctrlSeq=(g?"\\":"\\operatorname{")+l.ctrlSeq,p.ctrlSeq+=g?" ":"}",ae.hasOwnProperty(u)&&p[h][h][h].jQ.addClass("mq-last"),n(l[h])||l.jQ.addClass("mq-first"),!n(p[1]))if(p[1]instanceof Ae){var m=p[1];(m.siblingCreated=m.siblingDeleted=function(){m.jQ.toggleClass("mq-after-operator-name",!(m[1]instanceof Oe))})()}else p.jQ.toggleClass("mq-last",!(p[1]instanceof Oe));s+=c-1,l=p;continue e}}}}})),re={},ie=E.p.autoOperatorNames={_maxLength:9},ae={limsup:1,liminf:1,projlim:1,injlim:1};!function(){for(var e="arg deg det dim exp gcd hom inf ker lg lim ln log max min sup limsup liminf injlim projlim Pr".split(" "),t=0;t<e.length;t+=1)re[e[t]]=ie[e[t]]=1;var n="sin cos tan arcsin arccos arctan sinh cosh tanh sec csc cot coth".split(" ");for(t=0;t<n.length;t+=1)re[n[t]]=1;var r="sin cos tan sec cosec csc cotan cot ctg".split(" ");for(t=0;t<r.length;t+=1)ie[r[t]]=ie["arc"+r[t]]=ie[r[t]+"h"]=ie["ar"+r[t]+"h"]=ie["arc"+r[t]+"h"]=1;var i="gcf hcf lcm proj span".split(" ");for(t=0;t<i.length;t+=1)ie[i[t]]=1}(),N.autoOperatorNames=function(e){if(!/^[a-z]+(?: [a-z]+)*$/i.test(e))throw'"'+e+'" not a space-delimited list of only letters';for(var t=e.split(" "),n={},r=0,i=0;i<t.length;i+=1){var o=t[i];if(o.length<2)throw'"'+o+'" not minimum length of 2';n[o]=1,r=a(r,o.length)}return n._maxLength=r,n};var oe=p(Y,(function(e,t){e.init=function(e){this.ctrlSeq=e},e.createLeftOf=function(e){for(var t=this.ctrlSeq,n=0;n<t.length;n+=1)ne(t.charAt(n)).createLeftOf(e)},e.parser=function(){for(var e=this.ctrlSeq,t=V(),n=0;n<e.length;n+=1)ne(e.charAt(n)).adopt(t,t.ends[1],0);return U.succeed(t.children())}}));for(var se in ie)ie.hasOwnProperty(se)&&(x[se]=oe);x.operatorname=p(B,(function(e){e.createLeftOf=o,e.numBlocks=function(){return 1},e.parser=function(){return F.block.map((function(e){return e.children()}))}})),x.f=p(ne,(function(e,t){e.init=function(){Y.p.init.call(this,this.letter="f",'<var class="mq-f">f</var>')},e.italicize=function(e){return this.jQ.html("f").toggleClass("mq-f",e),t.italicize.apply(this,arguments)}})),x[" "]=x.space=d(W,"\\ "," "),x[","]=d(W,"{,}",","),x["'"]=x.prime=d(W,"'","′"),x["″"]=x.dprime=d(W,"″","″"),x.backslash=d(W,"\\backslash ","\\"),w["\\"]||(w["\\"]=x.backslash),x.$=d(W,"\\$","$");var le=p(Y,(function(e,t){e.init=function(e,n){t.init.call(this,e,'<span class="mq-nonSymbola">'+(n||e)+"</span>")}}));x["@"]=le,x["#"]=d(le,"\\#","#"),x["&"]=d(le,"\\&","&"),x["%"]=d(le,"\\%","%"),x.alpha=x.beta=x.gamma=x.delta=x.zeta=x.eta=x.theta=x.iota=x.kappa=x.mu=x.nu=x.xi=x.rho=x.sigma=x.tau=x.chi=x.psi=x.omega=p(te,(function(e,t){e.init=function(e){t.init.call(this,"\\"+e+" ","&"+e+";")}})),x.phi=d(te,"\\phi ","ϕ"),x.phiv=x.varphi=d(te,"\\varphi ","φ"),x.epsilon=d(te,"\\epsilon ","ϵ"),x.epsiv=x.varepsilon=d(te,"\\varepsilon ","ε"),x.piv=x.varpi=d(te,"\\varpi ","ϖ"),x.sigmaf=x.sigmav=x.varsigma=d(te,"\\varsigma ","ς"),x.thetav=x.vartheta=x.thetasym=d(te,"\\vartheta ","ϑ"),x.upsilon=x.upsi=d(te,"\\upsilon ","υ"),x.gammad=x.Gammad=x.digamma=d(te,"\\digamma ","ϝ"),x.kappav=x.varkappa=d(te,"\\varkappa ","ϰ"),x.rhov=x.varrho=d(te,"\\varrho ","ϱ"),x.pi=x["π"]=d(le,"\\pi ","π"),x.lambda=d(le,"\\lambda ","λ"),x.Upsilon=x.Upsi=x.upsih=x.Upsih=d(Y,"\\Upsilon ",'<var style="font-family: serif">ϒ</var>'),x.Gamma=x.Delta=x.Theta=x.Lambda=x.Xi=x.Pi=x.Sigma=x.Phi=x.Psi=x.Omega=x.forall=p(W,(function(e,t){e.init=function(e){t.init.call(this,"\\"+e+" ","&"+e+";")}}));var ce=p(B,(function(e){e.init=function(e){this.latex=e},e.createLeftOf=function(e){var t=F.parse(this.latex);t.children().adopt(e.parent,e[h],e[1]),e[h]=t.ends[1],t.jQize().insertBefore(e.jQ),t.finalizeInsert(e.options,e),t.ends[1][1].siblingCreated&&t.ends[1][1].siblingCreated(e.options,h),t.ends[h][h].siblingCreated&&t.ends[h][h].siblingCreated(e.options,1),e.parent.bubble("reflow")},e.parser=function(){var e=F.parse(this.latex).children();return U.succeed(e)}}));x["⁰"]=d(ce,"^0"),x["¹"]=d(ce,"^1"),x["²"]=d(ce,"^2"),x["³"]=d(ce,"^3"),x["⁴"]=d(ce,"^4"),x["⁵"]=d(ce,"^5"),x["⁶"]=d(ce,"^6"),x["⁷"]=d(ce,"^7"),x["⁸"]=d(ce,"^8"),x["⁹"]=d(ce,"^9"),x["₀"]=d(ce,"_0"),x["₁"]=d(ce,"_1"),x["₂"]=d(ce,"_2"),x["₃"]=d(ce,"_3"),x["₄"]=d(ce,"_4"),x["₅"]=d(ce,"_5"),x["₆"]=d(ce,"_6"),x["₇"]=d(ce,"_7"),x["₈"]=d(ce,"_8"),x["₉"]=d(ce,"_9"),x["¼"]=d(ce,"\\frac14"),x["½"]=d(ce,"\\frac12"),x["¾"]=d(ce,"\\frac34");var ue=p(H,(function(e){e.init=W.prototype.init,e.contactWeld=e.siblingCreated=e.siblingDeleted=function(e,t){if(1!==t)return this.jQ[0].className=function e(t){return t[h]?t[h]instanceof H||/^[,;:\(\[]$/.test(t[h].ctrlSeq)?"":"mq-binary-operator":t.parent&&t.parent.parent&&t.parent.parent.isStyleBlock()?e(t.parent.parent):""}(this),this}}));x["+"]=d(ue,"+","+"),x["–"]=x["-"]=d(ue,"-","−"),x["±"]=x.pm=x.plusmn=x.plusminus=d(ue,"\\pm ","±"),x.mp=x.mnplus=x.minusplus=d(ue,"\\mp ","∓"),w["*"]=x.sdot=x.cdot=d(H,"\\cdot ","·","*");var de=p(H,(function(e,t){e.init=function(e,n){this.data=e,this.strict=n;var r=n?"Strict":"";t.init.call(this,e["ctrlSeq"+r],e["html"+r],e["text"+r])},e.swap=function(e){this.strict=e;var t=e?"Strict":"";this.ctrlSeq=this.data["ctrlSeq"+t],this.jQ.html(this.data["html"+t]),this.textTemplate=[this.data["text"+t]]},e.deleteTowards=function(e,n){if(e===h&&!this.strict)return this.swap(!0),void this.bubble("reflow");t.deleteTowards.apply(this,arguments)}})),fe={ctrlSeq:"\\le ",html:"≤",text:"≤",ctrlSeqStrict:"<",htmlStrict:"<",textStrict:"<"},pe={ctrlSeq:"\\ge ",html:"≥",text:"≥",ctrlSeqStrict:">",htmlStrict:">",textStrict:">"};x["<"]=x.lt=d(de,fe,!0),x[">"]=x.gt=d(de,pe,!0),x["≤"]=x.le=x.leq=d(de,fe,!1),x["≥"]=x.ge=x.geq=d(de,pe,!1);var he=p(H,(function(e,t){e.init=function(){t.init.call(this,"=","=")},e.createLeftOf=function(e){if(e[h]instanceof de&&e[h].strict)return e[h].swap(!1),void e[h].bubble("reflow");t.createLeftOf.apply(this,arguments)}}));x["="]=he,x["×"]=x.times=d(H,"\\times ","×","[x]"),x["÷"]=x.div=x.divide=x.divides=d(H,"\\div ","÷","[/]"),w["~"]=x.sim=d(H,"\\sim ","~","~"),x.notin=x.cong=x.equiv=x.oplus=x.otimes=p(H,(function(e,t){e.init=function(e){t.init.call(this,"\\"+e+" ","&"+e+";")}})),x["≠"]=x.ne=x.neq=d(H,"\\ne ","≠"),x["∗"]=x.ast=x.star=x.loast=x.lowast=d(H,"\\ast ","∗"),x.therefor=x.therefore=d(H,"\\therefore ","∴"),x.cuz=x.because=d(H,"\\because ","∵"),x.prop=x.propto=d(H,"\\propto ","∝"),x["≈"]=x.asymp=x.approx=d(H,"\\approx ","≈"),x["≢"]=x.notequiv=x.nequiv=d(H,"\\not\\equiv ","≢"),x.isin=x.in=d(H,"\\in ","∈"),x.ni=x.contains=d(H,"\\ni ","∋"),x.notni=x.niton=x.notcontains=x.doesnotcontain=d(H,"\\not\\ni ","∌"),x.sub=x.subset=d(H,"\\subset ","⊂"),x.sup=x.supset=x.superset=d(H,"\\supset ","⊃"),x.nsub=x.notsub=x.nsubset=x.notsubset=d(H,"\\not\\subset ","⊄"),x.nsup=x.notsup=x.nsupset=x.notsupset=x.nsuperset=x.notsuperset=d(H,"\\not\\supset ","⊅"),x.sube=x.subeq=x.subsete=x.subseteq=d(H,"\\subseteq ","⊆"),x.supe=x.supeq=x.supsete=x.supseteq=x.supersete=x.superseteq=d(H,"\\supseteq ","⊇"),x.nsube=x.nsubeq=x.notsube=x.notsubeq=x.nsubsete=x.nsubseteq=x.notsubsete=x.notsubseteq=d(H,"\\not\\subseteq ","⊈"),x.nsupe=x.nsupeq=x.notsupe=x.notsupeq=x.nsupsete=x.nsupseteq=x.notsupsete=x.notsupseteq=x.nsupersete=x.nsuperseteq=x.notsupersete=x.notsuperseteq=d(H,"\\not\\supseteq ","⊉"),x.N=x.naturals=x.Naturals=d(W,"\\mathbb{N}","ℕ"),x.P=x.primes=x.Primes=x.projective=x.Projective=x.probability=x.Probability=d(W,"\\mathbb{P}","ℙ"),x.Z=x.integers=x.Integers=d(W,"\\mathbb{Z}","ℤ"),x.Q=x.rationals=x.Rationals=d(W,"\\mathbb{Q}","ℚ"),x.R=x.reals=x.Reals=d(W,"\\mathbb{R}","ℝ"),x.C=x.complex=x.Complex=x.complexes=x.Complexes=x.complexplane=x.Complexplane=x.ComplexPlane=d(W,"\\mathbb{C}","ℂ"),x.H=x.Hamiltonian=x.quaternions=x.Quaternions=d(W,"\\mathbb{H}","ℍ"),x.quad=x.emsp=d(W,"\\quad "," "),x.qquad=d(W,"\\qquad "," "),x.diamond=d(W,"\\diamond ","◇"),x.bigtriangleup=d(W,"\\bigtriangleup ","△"),x.ominus=d(W,"\\ominus ","⊖"),x.uplus=d(W,"\\uplus ","⊎"),x.bigtriangledown=d(W,"\\bigtriangledown ","▽"),x.sqcap=d(W,"\\sqcap ","⊓"),x.triangleleft=d(W,"\\triangleleft ","⊲"),x.sqcup=d(W,"\\sqcup ","⊔"),x.triangleright=d(W,"\\triangleright ","⊳"),x.odot=x.circledot=d(W,"\\odot ","⊙"),x.bigcirc=d(W,"\\bigcirc ","◯"),x.dagger=d(W,"\\dagger ","†"),x.ddagger=d(W,"\\ddagger ","‡"),x.wr=d(W,"\\wr ","≀"),x.amalg=d(W,"\\amalg ","∐"),x.models=d(W,"\\models ","⊨"),x.prec=d(W,"\\prec ","≺"),x.succ=d(W,"\\succ ","≻"),x.preceq=d(W,"\\preceq ","≼"),x.succeq=d(W,"\\succeq ","≽"),x.simeq=d(W,"\\simeq ","≃"),x.mid=d(W,"\\mid ","∣"),x.nmid=d(W,"\\nmid","∤"),x.ll=d(W,"\\ll ","≪"),x.gg=d(W,"\\gg ","≫"),x.parallel=d(W,"\\parallel ","∥"),x.nparallel=d(W,"\\nparallel ","∦"),x.bowtie=d(W,"\\bowtie ","⋈"),x.sqsubset=d(W,"\\sqsubset ","⊏"),x.sqsupset=d(W,"\\sqsupset ","⊐"),x.smile=d(W,"\\smile ","⌣"),x.sqsubseteq=d(W,"\\sqsubseteq ","⊑"),x.sqsupseteq=d(W,"\\sqsupseteq ","⊒"),x.doteq=d(W,"\\doteq ","≐"),x.frown=d(W,"\\frown ","⌢"),x.vdash=d(W,"\\vdash ","⊦"),x.dashv=d(W,"\\dashv ","⊣"),x.nless=d(W,"\\nless ","≮"),x.ngtr=d(W,"\\ngtr ","≯"),x.longleftarrow=d(W,"\\longleftarrow ","←"),x.longrightarrow=d(W,"\\longrightarrow ","→"),x.Longleftarrow=d(W,"\\Longleftarrow ","⇐"),x.Longrightarrow=d(W,"\\Longrightarrow ","⇒"),x.longleftrightarrow=d(W,"\\longleftrightarrow ","↔"),x.updownarrow=d(W,"\\updownarrow ","↕"),x.Longleftrightarrow=d(W,"\\Longleftrightarrow ","⇔"),x.Updownarrow=d(W,"\\Updownarrow ","⇕"),x.mapsto=d(W,"\\mapsto ","↦"),x.nearrow=d(W,"\\nearrow ","↗"),x.hookleftarrow=d(W,"\\hookleftarrow ","↩"),x.hookrightarrow=d(W,"\\hookrightarrow ","↪"),x.searrow=d(W,"\\searrow ","↘"),x.leftharpoonup=d(W,"\\leftharpoonup ","↼"),x.rightharpoonup=d(W,"\\rightharpoonup ","⇀"),x.swarrow=d(W,"\\swarrow ","↙"),x.leftharpoondown=d(W,"\\leftharpoondown ","↽"),x.rightharpoondown=d(W,"\\rightharpoondown ","⇁"),x.nwarrow=d(W,"\\nwarrow ","↖"),x.ldots=d(W,"\\ldots ","…"),x.cdots=d(W,"\\cdots ","⋯"),x.vdots=d(W,"\\vdots ","⋮"),x.ddots=d(W,"\\ddots ","⋱"),x.surd=d(W,"\\surd ","√"),x.triangle=d(W,"\\triangle ","△"),x.ell=d(W,"\\ell ","ℓ"),x.top=d(W,"\\top ","⊤"),x.flat=d(W,"\\flat ","♭"),x.natural=d(W,"\\natural ","♮"),x.sharp=d(W,"\\sharp ","♯"),x.wp=d(W,"\\wp ","℘"),x.bot=d(W,"\\bot ","⊥"),x.clubsuit=d(W,"\\clubsuit ","♣"),x.diamondsuit=d(W,"\\diamondsuit ","♢"),x.heartsuit=d(W,"\\heartsuit ","♡"),x.spadesuit=d(W,"\\spadesuit ","♠"),x.parallelogram=d(W,"\\parallelogram ","▱"),x.square=d(W,"\\square ","⬜"),x.oint=d(W,"\\oint ","∮"),x.bigcap=d(W,"\\bigcap ","∩"),x.bigcup=d(W,"\\bigcup ","∪"),x.bigsqcup=d(W,"\\bigsqcup ","⊔"),x.bigvee=d(W,"\\bigvee ","∨"),x.bigwedge=d(W,"\\bigwedge ","∧"),x.bigodot=d(W,"\\bigodot ","⊙"),x.bigotimes=d(W,"\\bigotimes ","⊗"),x.bigoplus=d(W,"\\bigoplus ","⊕"),x.biguplus=d(W,"\\biguplus ","⊎"),x.lfloor=d(W,"\\lfloor ","⌊"),x.rfloor=d(W,"\\rfloor ","⌋"),x.lceil=d(W,"\\lceil ","⌈"),x.rceil=d(W,"\\rceil ","⌉"),x.opencurlybrace=x.lbrace=d(W,"\\lbrace ","{"),x.closecurlybrace=x.rbrace=d(W,"\\rbrace ","}"),x.lbrack=d(W,"["),x.rbrack=d(W,"]"),x.slash=d(W,"/"),x.vert=d(W,"|"),x.perp=x.perpendicular=d(W,"\\perp ","⊥"),x.nabla=x.del=d(W,"\\nabla ","∇"),x.hbar=d(W,"\\hbar ","ℏ"),x.AA=x.Angstrom=x.angstrom=d(W,"\\text\\AA ","Å"),x.ring=x.circ=x.circle=d(W,"\\circ ","∘"),x.bull=x.bullet=d(W,"\\bullet ","•"),x.setminus=x.smallsetminus=d(W,"\\setminus ","∖"),x["¬"]=x.neg=d(W,"\\neg ","¬"),x.not=p(W,(function(e,t){e.suffixes={"\\equiv":"notequiv","\\ni":"notni","\\subset":"notsubset","\\subseteq":"notsubseteq","\\supset":"notsupset","\\supseteq":"notsupseteq"},e.init=function(){return t.init.call(this,"\\neg ","¬")},e.parser=function(){var t=U.succeed,n=U.optWhitespace;return function e(t){var n=U.string(t.shift());return t.length?n.or(e(t)):n}(Object.keys(e.suffixes).sort((function(e,t){return t.length-e.length}))).then((function(r){return n.then(t(x[e.suffixes[r]]()))})).or(n.then(t(this)))}})),x["…"]=x.dots=x.ellip=x.hellip=x.ellipsis=x.hellipsis=d(W,"\\dots ","…"),x.converges=x.darr=x.dnarr=x.dnarrow=x.downarrow=d(W,"\\downarrow ","↓"),x.dArr=x.dnArr=x.dnArrow=x.Downarrow=d(W,"\\Downarrow ","⇓"),x.diverges=x.uarr=x.uparrow=d(W,"\\uparrow ","↑"),x.uArr=x.Uparrow=d(W,"\\Uparrow ","⇑"),x.to=d(H,"\\to ","→"),x.rarr=x.rightarrow=d(W,"\\rightarrow ","→"),x.implies=d(H,"\\Rightarrow ","⇒"),x.rArr=x.Rightarrow=d(W,"\\Rightarrow ","⇒"),x.gets=d(H,"\\gets ","←"),x.larr=x.leftarrow=d(W,"\\leftarrow ","←"),x.impliedby=d(H,"\\Leftarrow ","⇐"),x.lArr=x.Leftarrow=d(W,"\\Leftarrow ","⇐"),x.harr=x.lrarr=x.leftrightarrow=d(W,"\\leftrightarrow ","↔"),x.iff=d(H,"\\Leftrightarrow ","⇔"),x.hArr=x.lrArr=x.Leftrightarrow=d(W,"\\Leftrightarrow ","⇔"),x.Re=x.Real=x.real=d(W,"\\Re ","ℜ"),x.Im=x.imag=x.image=x.imagin=x.imaginary=x.Imaginary=d(W,"\\Im ","ℑ"),x.part=x.partial=d(W,"\\partial ","∂"),x.infty=x.infin=x.infinity=d(W,"\\infty ","∞"),x.alef=x.alefsym=x.aleph=x.alephsym=d(W,"\\aleph ","ℵ"),x.xist=x.xists=x.exist=x.exists=d(W,"\\exists ","∃"),x.nexists=x.nexist=d(W,"\\nexists ","∄"),x.and=x.land=x.wedge=d(H,"\\wedge ","∧"),x.or=x.lor=x.vee=d(H,"\\vee ","∨"),x.o=x.O=x.empty=x.emptyset=x.oslash=x.Oslash=x.nothing=x.varnothing=d(H,"\\varnothing ","∅"),x.cup=x.union=d(H,"\\cup ","∪"),x.cap=x.intersect=x.intersection=d(H,"\\cap ","∩"),x.deg=x.degree=d(W,"\\degree ","°"),x.ang=x.angle=d(W,"\\angle ","∠"),x.measuredangle=d(W,"\\measuredangle ","∡"),x.sphericalangle=d(W,"\\sphericalangle ","∢");var ge,me,ye=o,ve=document.createElement("div").style;for(var be in{transform:1,WebkitTransform:1,MozTransform:1,OTransform:1,msTransform:1})if(be in ve){me=be;break}me?ge=function(e,t,n){e.css(me,"scale("+t+","+n+")")}:"filter"in ve?(ye=function(e){e.className=e.className},ge=function(e,t,n){t/=1+(n-1)/2,e.css("fontSize",n+"em"),e.hasClass("mq-matrixed-container")||e.addClass("mq-matrixed-container").wrapInner('<span class="mq-matrixed"></span>');var r=e.children().css("filter","progid:DXImageTransform.Microsoft.Matrix(M11="+t+",SizingMethod='auto expand')");function i(){e.css("marginRight",(r.width()-1)*(t-1)/t+"px")}i();var a=setInterval(i);m(window).load((function(){clearTimeout(a),i()}))}):ge=function(e,t,n){e.css("fontSize",n+"em")};var Ie=p(B,(function(e,t){e.init=function(e,n,r){t.init.call(this,e,"<"+n+" "+r+">&0</"+n+">")}})),xe=p(te,(function(e,t){e.symbols={C:"ℂ",H:"ℍ",N:"ℕ",P:"ℙ",Q:"ℚ",R:"ℝ",Z:"ℤ"},e.init=function(e){var n=e;this.symbols[e]&&(n='<span class="mq-original">'+e+"</span>"+this.symbols[e]),t.init.call(this,e,n)}}));x.mathrm=d(Ie,"\\mathrm","span",'class="mq-roman mq-font"'),x.mathit=d(Ie,"\\mathit","i",'class="mq-font"'),x.mathbf=d(Ie,"\\mathbf","b",'class="mq-font"'),x.mathsf=d(Ie,"\\mathsf","span",'class="mq-sans-serif mq-font"'),x.mathtt=d(Ie,"\\mathtt","span",'class="mq-monospace mq-font"'),x.mathbb=p(B,(function(e,t){e.init=function(){t.init.call(this,"\\mathbb",'<span class="mq-mathbb mq-font">&0</span>')},e.adopt=function(){return this.eachChild((function(e){if(!e.writeOverride){var t=e.write,n=e.deleteOutOf;e.write=e.writeOverride=function(n,r,i){var a;if(!xe.prototype.symbols[r])return t.apply(e,arguments);a=xe(r),i&&a.replaces(i),a.createLeftOf(n)},e.deleteOutOf=function(t,r){var i=[];return e.eachChild((function(t){var n=t.ctrlSeq;i.push(te(n).adopt(e,e.ends[1],0)),t.remove()})),i.length&&(r[1]=i[0]),e.jQize().appendTo(e.jQ),n.apply(e,arguments)}}})),t.adopt.apply(this,arguments)},e.finalizeTree=function(){this.eachChild((function(e){e.eachChild((function(t){var n=t.ctrlSeq,r=te;xe.prototype.symbols[n]&&(r=xe),r(n).adopt(e,e.ends[1],0),t.remove()})),e.jQize().appendTo(e.jQ)}))}})),x.underline=d(Ie,"\\underline","span",'class="mq-non-leaf mq-underline"'),x.overline=x.bar=d(Ie,"\\overline","span",'class="mq-non-leaf mq-overline"');var we=p(B,(function(e,t){e.init=function(e,n){t.init.call(this,e,"<span "+n+'><span class="mq-arrow-inner">&0</span></span>')}}));x.overrightarrow=d(we,"\\overrightarrow",'class="mq-non-leaf mq-overarrow mq-arrow-right"'),x.overleftarrow=d(we,"\\overleftarrow",'class="mq-non-leaf mq-overarrow mq-arrow-left"'),x.overleftrightarrow=d(we,"\\overleftrightarrow",'class="mq-non-leaf mq-overarrow mq-arrow-leftright"'),x.underrightarrow=d(we,"\\underrightarrow",'class="mq-non-leaf mq-underarrow mq-arrow-right"'),x.underleftarrow=d(we,"\\underleftarrow",'class="mq-non-leaf mq-underarrow mq-arrow-left"'),x.underleftrightarrow=d(we,"\\underleftrightarrow",'class="mq-non-leaf mq-underarrow mq-arrow-leftright"');var Te=p(B,(function(e,t){e.ctrlSeq="\\xrightleftharpoons",e.htmlTemplate='<span class="mq-harpoons mq-harpoons-rightleft mq-non-leaf"><span class="mq-harpoons-numerator">&0</span><span class="mq-harpoons-harpoons">⇌</span></span>'})),Me=x.xrightleftharpoons=p(Te,(function(e,t){e.ctrlSeq="\\xrightleftharpoons",e.htmlTemplate='<span class="mq-harpoons mq-harpoons-rightleft mq-non-leaf"><span class="mq-harpoons-numerator">&1</span><span class="mq-harpoons-harpoons">⇌</span><span class="mq-harpoons-denominator">&0</span></span>',e.parser=function(){return F.optBlock.then((function(e){return F.block.map((function(t){var n=Me();return n.blocks=[e,t],e.adopt(n,0,0),t.adopt(n,e,0),n}))})).or(F.block.map((function(e){var t=Te();return t.blocks=[e],e.adopt(t,0,0),t})))},e.latex=function(){return this.ctrlSeq+"["+this.ends[h].latex()+"]{"+this.ends[1].latex()+"}"}}));x.overarc=d(Ie,"\\overarc","span",'class="mq-non-leaf mq-overarc"'),x.dot=p(B,(function(e,t){e.init=function(){t.init.call(this,"\\dot",'<span class="mq-non-leaf"><span class="mq-dot-recurring-inner"><span class="mq-dot-recurring">˙</span><span class="mq-empty-box">&0</span></span></span>')}}));x.textcolor=p(B,(function(e,t){e.setColor=function(e){this.color=e,this.htmlTemplate='<span class="mq-textcolor" style="color:'+e+'">&0</span>'},e.latex=function(){return"\\textcolor{"+this.color+"}{"+this.blocks[0].latex()+"}"},e.parser=function(){var e=this,n=U.optWhitespace,r=U.string,i=U.regex;return n.then(r("{")).then(i(/^[#\w\s.,()%-]*/)).skip(r("}")).then((function(n){return e.setColor(n),t.parser.call(e)}))},e.isStyleBlock=function(){return!0}})),x.class=p(B,(function(e,t){e.parser=function(){var e=this,n=U.string,r=U.regex;return U.optWhitespace.then(n("{")).then(r(/^[-\w\s\\\xA0-\xFF]*/)).skip(n("}")).then((function(n){return e.cls=n||"",e.htmlTemplate='<span class="mq-class '+n+'">&0</span>',t.parser.call(e)}))},e.latex=function(){return"\\class{"+this.cls+"}{"+this.blocks[0].latex()+"}"},e.isStyleBlock=function(){return!0}}));var Ae=p(B,(function(e,t){e.ctrlSeq="_{...}^{...}",e.createLeftOf=function(e){if(this.replacedFragment||e[h]||!e.options.supSubsRequireOperand)return t.createLeftOf.apply(this,arguments)},e.contactWeld=function(e){for(var t=h;t;t=t===h&&1)if(this[t]instanceof Ae){for(var n="sub";n;n="sub"===n&&"sup"){var r=this[n],i=this[t][n];if(r){if(i)if(r.isEmpty())o=y(i,0,i.ends[h]);else{r.jQ.children().insAtDirEnd(-t,i.jQ);var a=r.children().disown(),o=y(i,a.ends[1],i.ends[h]);t===h?a.adopt(i,i.ends[1],0):a.adopt(i,0,i.ends[h])}else this[t].addBlock(r.disown());this.placeCursor=function(e,n){return function(r){r.insAtDirEnd(-t,e||n)}}(i,r)}}this.remove(),e&&e[h]===this&&(1===t&&o?o[h]?e.insRightOf(o[h]):e.insAtLeftEnd(o.parent):e.insRightOf(this[t]));break}},E.p.charsThatBreakOutOfSupSub="",e.finalizeTree=function(){this.ends[h].write=function(e,t){if(e.options.autoSubscriptNumerals&&this===this.parent.sub){if("_"===t)return;var n=this.chToCmd(t,e.options);return n instanceof Y?e.deleteSelection():e.clearSelection().insRightOf(this.parent),n.createLeftOf(e.show())}e[h]&&!e[1]&&!e.selection&&e.options.charsThatBreakOutOfSupSub.indexOf(t)>-1&&e.insRightOf(this.parent),V.p.write.apply(this,arguments)}},e.moveTowards=function(e,n,r){n.options.autoSubscriptNumerals&&!this.sup?n.insDirOf(e,this):t.moveTowards.apply(this,arguments)},e.deleteTowards=function(e,n){if(n.options.autoSubscriptNumerals&&this.sub){var r=this.sub.ends[-e];r instanceof Y?r.remove():r&&r.deleteTowards(e,n.insAtDirEnd(-e,this.sub)),this.sub.isEmpty()&&(this.sub.deleteOutOf(h,n.insAtLeftEnd(this.sub)),this.sup&&n.insDirOf(-e,this))}else t.deleteTowards.apply(this,arguments)},e.latex=function(){function e(e,t){var n=t&&t.latex();return t?e+(1===n.length?n:"{"+(n||" ")+"}"):""}return e("_",this.sub)+e("^",this.sup)},e.addBlock=function(e){"sub"===this.supsub?(this.sup=this.upInto=this.sub.upOutOf=e,e.adopt(this,this.sub,0).downOutOf=this.sub,e.jQ=m('<span class="mq-sup"/>').append(e.jQ.children()).attr(r,e.id).prependTo(this.jQ)):(this.sub=this.downInto=this.sup.downOutOf=e,e.adopt(this,0,this.sup).upOutOf=this.sup,e.jQ=m('<span class="mq-sub"></span>').append(e.jQ.children()).attr(r,e.id).appendTo(this.jQ.removeClass("mq-sup-only")),this.jQ.append('<span style="display:inline-block;width:0">​</span>'));for(var t=0;t<2;t+=1)!function(e,t,n,r){e[t].deleteOutOf=function(i,a){if(a.insDirOf(this[i]?-i:i,this.parent),!this.isEmpty()){var o=this.ends[i];this.children().disown().withDirAdopt(i,a.parent,a[i],a[-i]).jQ.insDirOf(-i,a.jQ),a[-i]=o}e.supsub=n,delete e[t],delete e[r+"Into"],e[n][r+"OutOf"]=Ce,delete e[n].deleteOutOf,"sub"===t&&m(e.jQ.addClass("mq-sup-only")[0].lastChild).remove(),this.remove()}}(this,"sub sup".split(" ")[t],"sup sub".split(" ")[t],"down up".split(" ")[t])}}));function Ce(e){var t=this.parent,n=e;do{if(n[1])return e.insLeftOf(t);n=n.parent.parent}while(n!==t);e.insRightOf(t)}x.subscript=x._=p(Ae,(function(e,t){e.supsub="sub",e.htmlTemplate='<span class="mq-supsub mq-non-leaf"><span class="mq-sub">&0</span><span style="display:inline-block;width:0">​</span></span>',e.textTemplate=["_"],e.finalizeTree=function(){this.downInto=this.sub=this.ends[h],this.sub.upOutOf=Ce,t.finalizeTree.call(this)}})),x.superscript=x.supscript=x["^"]=p(Ae,(function(e,t){e.supsub="sup",e.htmlTemplate='<span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup">&0</span></span>',e.textTemplate=["^"],e.finalizeTree=function(){this.upInto=this.sup=this.ends[1],this.sup.downOutOf=Ce,t.finalizeTree.call(this)}}));var Ee=p(B,(function(e,t){e.init=function(e,t){var n='<span class="mq-large-operator mq-non-leaf"><span class="mq-to"><span>&1</span></span><big>'+t+'</big><span class="mq-from"><span>&0</span></span></span>';Y.prototype.init.call(this,e,n)},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments),e.options.sumStartsWithNEquals&&(ne("n").createLeftOf(e),he().createLeftOf(e))},e.latex=function(){function e(e){return 1===e.length?e:"{"+(e||" ")+"}"}return this.ctrlSeq+"_"+e(this.ends[h].latex())+"^"+e(this.ends[1].latex())},e.parser=function(){for(var e=U.string,t=U.optWhitespace,n=U.succeed,r=F.block,i=this,a=i.blocks=[V(),V()],o=0;o<a.length;o+=1)a[o].adopt(i,i.ends[1],0);return t.then(e("_").or(e("^"))).then((function(e){var t=a["_"===e?0:1];return r.then((function(e){return e.children().adopt(t,t.ends[1],0),n(i)}))})).many().result(i)},e.finalizeTree=function(){this.downInto=this.ends[h],this.upInto=this.ends[1],this.ends[h].upOutOf=this.ends[1],this.ends[1].downOutOf=this.ends[h]}}));x["∑"]=x.sum=x.summation=d(Ee,"\\sum ","∑"),x["∏"]=x.prod=x.product=d(Ee,"\\prod ","∏"),x.coprod=x.coproduct=d(Ee,"\\coprod ","∐"),x["∫"]=x.int=x.integral=p(Ee,(function(e,t){e.init=function(){Y.prototype.init.call(this,"\\int ",'<span class="mq-int mq-non-leaf"><big>∫</big><span class="mq-supsub mq-non-leaf"><span class="mq-sup"><span class="mq-sup-inner">&1</span></span><span class="mq-sub">&0</span><span style="display:inline-block;width:0">​</span></span></span>')},e.createLeftOf=B.p.createLeftOf})),x.bigg=x.intsub=x.integralsubstitution=p(Ee,(function(e,t){e.init=function(){Y.prototype.init.call(this,"\\bigg",'<span class="mq-intsub mq-non-leaf"><big>/</big><span class="mq-supsub mq-non-leaf"><span class="mq-sup"><span class="mq-sup-inner">&1</span></span><span class="mq-sub">&0</span><span style="display:inline-block;width:0">​</span></span></span>')},e.createLeftOf=B.p.createLeftOf,e.parser=function(){var e=this,t=U.string,n=U.optWhitespace,r=U.succeed;e.blocks=[V(),V()];for(var i=0;i<e.blocks.length;i+=1)e.blocks[i].adopt(e,e.ends[1],0);return t("/_{").then(t("\\!").many()).then(F).then((function(t){return t.children().adopt(e.blocks[0],e.blocks[0].ends[1],0),r(e)})).then(n).then(t("}")).then(n).then(t("^")).then(F.block).then((function(t){return t.children().adopt(e.blocks[1],e.blocks[1].ends[1],0),r(e)}))},e.latex=function(){function e(e){return 1===e.length?e:"{"+(e||" ")+"}"}return"\\bigg/_{\\!\\!\\!\\!\\!"+e(this.blocks[0].latex())+"}^"+e(this.blocks[1].latex())}}));var Ne=x.frac=x.dfrac=x.cfrac=x.fraction=p(B,(function(e,t){e.ctrlSeq="\\frac",e.htmlTemplate='<span class="mq-fraction mq-non-leaf"><span class="mq-numerator">&0</span><span class="mq-denominator">&1</span><span style="display:inline-block;width:0">​</span></span>',e.textTemplate=["(",")/(",")"],e.finalizeTree=function(){this.upInto=this.ends[1].upOutOf=this.ends[h],this.downInto=this.ends[h].downOutOf=this.ends[1]}})),Se=x.over=w["/"]=p(Ne,(function(e,t){e.createLeftOf=function(e){if(!this.replacedFragment){for(var n=e[h];n&&!(n instanceof H||n instanceof(x.text||o)||n instanceof Ee||"\\ "===n.ctrlSeq||/^[,;:]$/.test(n.ctrlSeq));)n=n[h];n instanceof Ee&&n[1]instanceof Ae&&(n=n[1])[1]instanceof Ae&&n[1].ctrlSeq!=n.ctrlSeq&&(n=n[1]),n!==e[h]&&(this.replaces(I(n[1]||e.parent.ends[h],e[h])),e[h]=n)}t.createLeftOf.call(this,e)}})),ke=x.sqrt=x["√"]=p(B,(function(e,t){e.ctrlSeq="\\sqrt",e.htmlTemplate='<span class="mq-non-leaf"><span class="mq-scaled mq-sqrt-prefix">√</span><span class="mq-non-leaf mq-sqrt-stem">&0</span></span>',e.textTemplate=["sqrt(",")"],e.parser=function(){return F.optBlock.then((function(e){return F.block.map((function(t){var n=je();return n.blocks=[e,t],e.adopt(n,0,0),t.adopt(n,e,0),n}))})).or(t.parser.call(this))},e.reflow=function(){var e=this.ends[1].jQ;ge(e.prev(),1,e.innerHeight()/+e.css("fontSize").slice(0,-2)-.1)}})),je=(x.hat=p(B,(function(e,t){e.ctrlSeq="\\hat",e.htmlTemplate='<span class="mq-non-leaf"><span class="mq-hat-prefix">^</span><span class="mq-hat-stem">&0</span></span>',e.textTemplate=["hat(",")"]})),x.nthroot=p(ke,(function(e,t){e.htmlTemplate='<span class="mq-nthroot mq-non-leaf">&0</span><span class="mq-scaled"><span class="mq-sqrt-prefix mq-scaled">√</span><span class="mq-sqrt-stem mq-non-leaf">&1</span></span>',e.textTemplate=["sqrt[","](",")"],e.latex=function(){return"\\sqrt["+this.ends[h].latex()+"]{"+this.ends[1].latex()+"}"}}))),De=p(B,(function(e,t){e.init=function(e,n,r){var i='<span class="mq-non-leaf"><span class="mq-diacritic-above">'+n+'</span><span class="mq-diacritic-stem">&0</span></span>';t.init.call(this,e,i,r)}}));function Le(e,t){e.jQadd=function(){t.jQadd.apply(this,arguments),this.delimjQs=this.jQ.children(":first").add(this.jQ.children(":last")),this.contentjQ=this.jQ.children(":eq(1)")},e.reflow=function(){var e=this.contentjQ.outerHeight()/parseFloat(this.contentjQ.css("fontSize"));ge(this.delimjQs,i(1+.2*(e-1),1.2),1.2*e)}}x.vec=d(De,"\\vec","→",["vec(",")"]),x.tilde=d(De,"\\tilde","~",["tilde(",")"]);var Oe=p(p(B,Le),(function(e,t){e.init=function(e,n,r,i,a){t.init.call(this,"\\left"+i,void 0,[n,r]),this.side=e,this.sides={},this.sides[h]={ch:n,ctrlSeq:i},this.sides[1]={ch:r,ctrlSeq:a}},e.numBlocks=function(){return 1},e.html=function(){return this.htmlTemplate='<span class="mq-non-leaf"><span class="mq-scaled mq-paren'+(1===this.side?" mq-ghost":"")+'">'+this.sides[h].ch+'</span><span class="mq-non-leaf">&0</span><span class="mq-scaled mq-paren'+(this.side===h?" mq-ghost":"")+'">'+this.sides[1].ch+"</span></span>",t.html.call(this)},e.latex=function(){return"\\left"+this.sides[h].ctrlSeq+this.ends[h].latex()+"\\right"+this.sides[1].ctrlSeq},e.matchBrack=function(e,t,n){return n instanceof Oe&&n.side&&n.side!==-t&&(!e.restrictMismatchedBrackets||Pe[this.sides[this.side].ch]===n.sides[n.side].ch||{"(":"]","[":")"}[this.sides[h].ch]===n.sides[1].ch)&&n},e.closeOpposing=function(e){e.side=0,e.sides[this.side]=this.sides[this.side],e.delimjQs.eq(this.side===h?0:1).removeClass("mq-ghost").html(this.sides[this.side].ch)},e.createLeftOf=function(e){if(!this.replacedFragment){var n=e.options;if("|"===this.sides[h].ch)var r=this.matchBrack(n,1,e[1])||this.matchBrack(n,h,e[h])||this.matchBrack(n,0,e.parent.parent);else r=this.matchBrack(n,-this.side,e[-this.side])||this.matchBrack(n,-this.side,e.parent.parent)}if(r){var i=this.side=-r.side;this.closeOpposing(r),r===e.parent.parent&&e[i]&&I(e[i],e.parent.ends[i],-i).disown().withDirAdopt(-i,r.parent,r,r[i]).jQ.insDirOf(i,r.jQ),r.bubble("reflow")}else i=(r=this).side,r.replacedFragment?r.side=0:e[-i]&&(r.replaces(I(e[-i],e.parent.ends[-i],i)),e[-i]=0),t.createLeftOf.call(r,e);i===h?e.insAtLeftEnd(r.ends[h]):e.insRightOf(r)},e.placeCursor=o,e.unwrap=function(){this.ends[h].children().disown().adopt(this.parent,this,this[1]).jQ.insertAfter(this.jQ),this.remove()},e.deleteSide=function(e,t,n){var r=this.parent,i=this[e],a=r.ends[e];if(e===this.side)return this.unwrap(),void(i?n.insDirOf(-e,i):n.insAtDirEnd(e,r));var o=n.options,s=!this.side;if(this.side=-e,this.matchBrack(o,e,this.ends[h].ends[this.side])){this.closeOpposing(this.ends[h].ends[this.side]);var l=this.ends[h].ends[e];this.unwrap(),l.siblingCreated&&l.siblingCreated(n.options,e),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r)}else{if(this.matchBrack(o,e,this.parent.parent))this.parent.parent.closeOpposing(this),this.parent.parent.unwrap();else{if(t&&s)return this.unwrap(),void(i?n.insDirOf(-e,i):n.insAtDirEnd(e,r));this.sides[e]={ch:Pe[this.sides[this.side].ch],ctrlSeq:Pe[this.sides[this.side].ctrlSeq]},this.delimjQs.removeClass("mq-ghost").eq(e===h?0:1).addClass("mq-ghost").html(this.sides[e].ch)}if(i){l=this.ends[h].ends[e];I(i,a,-e).disown().withDirAdopt(-e,this.ends[h],l,0).jQ.insAtDirEnd(e,this.ends[h].jQ.removeClass("mq-empty")),l.siblingCreated&&l.siblingCreated(n.options,e),n.insDirOf(-e,i)}else t?n.insDirOf(e,this):n.insAtDirEnd(e,this.ends[h])}},e.deleteTowards=function(e,t){this.deleteSide(-e,!1,t)},e.finalizeTree=function(){this.ends[h].deleteOutOf=function(e,t){this.parent.deleteSide(e,!0,t)},this.finalizeTree=this.intentionalBlur=function(){this.delimjQs.eq(this.side===h?1:0).removeClass("mq-ghost"),this.side=0}},e.siblingCreated=function(e,t){t===-this.side&&this.finalizeTree()}})),Pe={"(":")",")":"(","[":"]","]":"[","{":"}","}":"{","\\{":"\\}","\\}":"\\{","⟨":"⟩","⟩":"⟨","\\langle ":"\\rangle ","\\rangle ":"\\langle ","|":"|","\\lVert ":"\\rVert ","\\rVert ":"\\lVert "};function Re(e,t){t=t||e;var n=Pe[e],r=Pe[t];w[e]=d(Oe,h,e,n,t,r),w[n]=d(Oe,1,e,n,t,r)}Re("("),Re("["),Re("{","\\{"),x.langle=d(Oe,h,"⟨","⟩","\\langle ","\\rangle "),x.rangle=d(Oe,1,"⟨","⟩","\\langle ","\\rangle "),w["|"]=d(Oe,h,"|","|","|","|"),x.lVert=d(Oe,h,"∥","∥","\\lVert ","\\rVert "),x.rVert=d(Oe,1,"∥","∥","\\lVert ","\\rVert "),x.left=p(B,(function(e){e.parser=function(){var e=U.regex,t=U.string,n=(U.succeed,U.optWhitespace);return n.then(e(/^(?:[([|]|\\\{|\\langle\b|\\lVert\b)/)).then((function(r){var i="\\"===r.charAt(0)?r.slice(1):r;return"\\langle"==r&&(i="⟨",r+=" "),"\\lVert"==r&&(i="∥",r+=" "),F.then((function(a){return t("\\right").skip(n).then(e(/^(?:[\])|]|\\\}|\\rangle\b|\\rVert\b)/)).map((function(e){var t="\\"===e.charAt(0)?e.slice(1):e;"\\rangle"==e&&(t="⟩",e+=" "),"\\rVert"==e&&(t="∥",e+=" ");var n=Oe(0,i,t,r,e);return n.blocks=[a],a.adopt(n,0,0),n}))}))}))}})),x.right=p(B,(function(e){e.parser=function(){return U.fail("unmatched \\right")}}));var ze=x.binom=x.binomial=p(p(B,Le),(function(e,t){e.ctrlSeq="\\binom",e.htmlTemplate='<span class="mq-non-leaf"><span class="mq-paren mq-scaled">(</span><span class="mq-non-leaf"><span class="mq-array mq-non-leaf"><span>&0</span><span>&1</span></span></span><span class="mq-paren mq-scaled">)</span></span>',e.textTemplate=["choose(",",",")"]}));x.choose=p(ze,(function(e){e.createLeftOf=Se.prototype.createLeftOf}));x.editable=x.MathQuillMathField=p(B,(function(e,t){e.ctrlSeq="\\MathQuillMathField",e.htmlTemplate='<span class="mq-editable-field"><span class="mq-root-block">&0</span></span>',e.parser=function(){var e=this,n=U.string,r=U.regex,i=U.succeed;return n("[").then(r(/^[a-z][a-z0-9]*/i)).skip(n("]")).map((function(t){e.name=t})).or(i()).then(t.parser.call(e))},e.finalizeTree=function(e){var t=A(this.ends[h],this.jQ,e);t.KIND_OF_MQ="MathField",t.editable=!0,t.createTextarea(),t.editablesTextareaEvents(),t.cursor.insAtRightEnd(t.root),z(t.root)},e.registerInnerField=function(e,t){e.push(e[this.name]=t(this.ends[h].controller))},e.latex=function(){return this.ends[h].latex()},e.text=function(){return this.ends[h].text()}}));var _e=x.embed=p(Y,(function(e,t){e.setOptions=function(e){function t(){return""}return this.text=e.text||t,this.htmlTemplate=e.htmlString||"",this.latex=e.latex||t,this},e.parser=function(){var e=this,t=U.string,n=U.regex,r=U.succeed;return t("{").then(n(/^[a-z][a-z0-9]*/i)).skip(t("}")).then((function(i){return t("[").then(n(/^[-\w\s]*/)).skip(t("]")).or(r()).map((function(t){return e.setOptions(k[i](t))}))}))}})),Ue={};x.begin=p(B,(function(e,t){e.parser=function(){var e=U.string,t=U.regex;return e("{").then(t(/^[a-z]+/i)).skip(e("}")).then((function(t){return(Ue[t]?Ue[t]().parser():U.fail("unknown environment type: "+t)).skip(e("\\end{"+t+"}"))}))}}));var Ze=p(B,(function(e,t){e.template=[["\\begin{","}"],["\\end{","}"]],e.wrappers=function(){return[e.template[0].join(this.environment),e.template[1].join(this.environment)]}})),Fe=Ue.matrix=p(Ze,(function(e,t){var n="&",a="\\\\";e.parentheses={left:null,right:null},e.environment="matrix",e.reflow=function(){var e=this.jQ.children("table"),t=e.outerHeight()/+e.css("fontSize").slice(0,-2),n=this.jQ.children(".mq-paren");n.length&&ge(n,i(1+.2*(t-1),1.2),1.05*t)},e.latex=function(){var e,t=this.hline,r="";this.eachChild((function(i){void 0!==e&&(e!==i.row?(r+=a+"\n",t&&(r+="\\hline\n",t=!1)):r+=n),e=i.row,r+=i.latex()}));var i=this.options?"{"+this.options+"}":"";return this.wrappers().join(i+"\n"+r+"\n")},e.html=function(){var e,n=[],r="",i=0;function a(e){return e?'<span class="mq-scaled mq-paren">'+e+"</span>":""}return this.eachChild((function(t){e!==t.row&&(e=t.row,r+="<tr>$tds</tr>",n[e]=[]),n[e].push("<td>&"+i+++"</td>")})),this.htmlTemplate='<span class="mq-matrix mq-matrix-'+this.environment+' mq-non-leaf">'+a(this.parentheses.left)+'<table class="mq-non-leaf">'+r.replace(/\$tds/g,(function(){return n.shift().join("")}))+"</table>"+a(this.parentheses.right)+"</span>",t.html.call(this)},e.createBlocks=function(){this.blocks=[Ge(0,this),Ge(0,this),Ge(1,this),Ge(1,this)]},e.parser=function(){var e=this,t=U.optWhitespace,r=U.string;return(0,U.regex)(/^({[clr](\|?[clr])*})?/).then((function(t){return t&&!e.options&&(e.options=t.slice(1,-1)),U.succeed(e)})).then(t.then(r(n).or(r(a)).or(r("\\hline")).or(F.block)).many()).skip(t).then((function(t){var n=[],r=0;function i(){e.blocks.push(Ge(r,e,n)),n=[]}e.blocks=[];for(var o=0;o<t.length;o+=1)t[o]instanceof V?n.push(t[o]):"\\hline"===t[o]?e.hline=!0:(i(),t[o]===a&&(r+=1));return i(),e.autocorrect(),U.succeed(e)}))},e.finalizeTree=function(){var e=this.jQ.find("table");e.toggleClass("mq-rows-1",1===e.find("tr").length),this.relink()},e.relink=function(){for(var e,t,n,r=this.blocks,i=[],a=0;a<r.length;a+=1)e!==(n=r[a]).row&&(i[e=n.row]=[],t=0),i[e][t]=n,n[1]=r[a+1],n[h]=r[a-1],i[e-1]&&i[e-1][t]&&(n.upOutOf=i[e-1][t],i[e-1][t].downOutOf=n),t+=1;this.ends[h]=r[0],this.ends[1]=r[r.length-1]},e.autocorrect=function(e){var t,n,r,i,a,o=[],s=(e=[],this.blocks);for(a=0;a<s.length;a+=1)e[i=s[a].row]=e[i]||[],e[i].push(s[a]),o[i]=e[i].length;if((t=Math.max.apply(null,o))!==Math.min.apply(null,o)){for(a=0;a<e.length;a+=1)for(n=t-e[a].length;n;)r=t*a+e[a].length,s.splice(r,0,Ge(a,this)),n-=1;this.relink()}},e.deleteCell=function(e){var t,n,r=[],i=[],a=[],o=[],s=this.blocks;function l(e){for(var t=[],n=0;n<e.length;n+=1)e[n].isEmpty()&&t.push(e[n]);return t.length===e.length}function c(e){for(var t=0;t<e.length;t+=1)s.indexOf(e[t])>-1&&(e[t].remove(),s.splice(s.indexOf(e[t]),1))}this.eachChild((function(s){t!==s.row&&(t=s.row,r[t]=[],n=0),i[n]=i[n]||[],i[n].push(s),r[t].push(s),s===e&&(a=r[t],o=i[n]),n+=1})),l(a)&&o.length>1&&(t=r.indexOf(a),this.eachChild((function(e){e.row>t&&(e.row-=1)})),c(a),this.jQ.find("tr").eq(t).remove()),l(o)&&a.length>1&&c(o),this.finalizeTree()},e.addRow=function(e){var t,n=[],i=[],a=[],o=m("<tr></tr>"),s=e.row,l=0;this.eachChild((function(e){e.row<=s&&n.push(e),e.row===s&&(l+=1),e.row>s&&(e.row+=1,a.push(e))}));for(var c=0;c<l;c+=1)(t=Ge(s+1)).parent=this,i.push(t),t.jQ=m('<td class="mq-empty">').attr(r,t.id).appendTo(o);return this.jQ.find("tr").eq(s).after(o),this.blocks=n.concat(i,a),i[0]},e.addColumn=function(e){var t,n,i=[],a=[];this.eachChild((function(n){i[n.row]=i[n.row]||[],i[n.row].push(n),n===e&&(t=i[n.row].length)}));for(var o=0;o<i.length;o+=1)(n=Ge(o)).parent=this,a.push(n),i[o].splice(t,0,n),n.jQ=m('<td class="mq-empty">').attr(r,n.id);return this.jQ.find("tr").each((function(e){m(this).find("td").eq(t-1).after(i[e][t].jQ)})),this.blocks=[].concat.apply([],i),a[e.row]},e.insert=function(e,t){var n=this[e](t);this.cursor=this.cursor||this.parent.cursor,this.finalizeTree(),this.bubble("reflow").cursor.insAtRightEnd(n)},e.backspace=function(e,t,n,r){var i=e[t];if(e.isEmpty()){for(this.deleteCell(e);i&&i[t]&&-1===this.blocks.indexOf(i);)i=i[t];i&&n.insAtDirEnd(-t,i),1===this.blocks.length&&this.blocks[0].isEmpty()&&(r(),this.finalizeTree()),this.bubble("edited")}}}));Ue.pmatrix=p(Fe,(function(e,t){e.environment="pmatrix",e.parentheses={left:"(",right:")"}})),Ue.bmatrix=p(Fe,(function(e,t){e.environment="bmatrix",e.parentheses={left:"[",right:"]"}})),Ue.Bmatrix=p(Fe,(function(e,t){e.environment="Bmatrix",e.parentheses={left:"{",right:"}"}})),Ue.vmatrix=p(Fe,(function(e,t){e.environment="vmatrix",e.parentheses={left:"|",right:"|"}})),Ue.Vmatrix=p(Fe,(function(e,t){e.environment="Vmatrix",e.parentheses={left:"‖",right:"‖"}})),Ue.cases=p(Fe,(function(e,t){e.environment="cases",e.parentheses={left:"{",right:null}})),Ue.array=p(Fe,(function(e,t){e.environment="array",e.parentheses={left:null,right:null},e.hline=!0,e.options="l|l"}));var Ge=p(V,(function(e,t){e.init=function(e,n,r){if(t.init.call(this),this.row=e,n&&this.adopt(n,n.ends[1],0),r)for(var i=0;i<r.length;i++)r[i].children().adopt(this,this.ends[1],0)},e.keystroke=function(e,n,r){switch(e){case"Tab":var i,a=this,o=0;if(this.parent.eachChild((function(e){e.row===a.row&&(e===a&&(i=o),o+=1)})),i===o-1)return n.preventDefault(),this.parent.insert("addColumn",this);break;case"Enter":var s,l=this.row+1,c=!0;if(this.parent.eachChild((function(e){e.row===l&&(s||(s=e),e.isEmpty()||(c=!1))})),n.preventDefault(),s&&c){r.cursor.insAtDirEnd(h,s);break}return this.parent.insert("addRow",this)}return t.keystroke.apply(this,arguments)},e.deleteOutOf=function(e,n){var r=this,i=arguments;this.parent.backspace(this,e,n,(function(){return t.deleteOutOf.apply(r,i)}))}})),Be=(w["\\"]=p(B,(function(e,t){e.ctrlSeq="\\",e.replaces=function(e){this._replacedFragment=e.disown(),this.isEmpty=function(){return!1}},e.htmlTemplate='<span class="mq-latex-command-input mq-non-leaf">\\<span>&0</span></span>',e.textTemplate=["\\"],e.createBlocks=function(){t.createBlocks.call(this),this.ends[h].focus=function(){return this.parent.jQ.addClass("mq-hasCursor"),this.isEmpty()&&this.parent.jQ.removeClass("mq-empty"),this},this.ends[h].blur=function(){return this.parent.jQ.removeClass("mq-hasCursor"),this.isEmpty()&&this.parent.jQ.addClass("mq-empty"),this},this.ends[h].write=function(e,t){e.show().deleteSelection(),t.match(/[a-z]/i)?W(t).createLeftOf(e):(this.parent.renderCommand(e),"\\"===t&&this.isEmpty()||e.parent.write(e,t))},this.ends[h].keystroke=function(e,n,r){return"Tab"===e||"Enter"===e||"Spacebar"===e?(this.parent.renderCommand(r.cursor),void n.preventDefault()):t.keystroke.apply(this,arguments)}},e.createLeftOf=function(e){if(t.createLeftOf.call(this,e),this._replacedFragment){var n=this.jQ[0];this.jQ=this._replacedFragment.jQ.addClass("mq-blur").bind("mousedown mousemove",(function(e){return m(e.target=n).trigger(e),!1})).insertBefore(this.jQ).add(this.jQ)}},e.latex=function(){return"\\"+this.ends[h].latex()+" "},e.renderCommand=function(e){this.jQ=this.jQ.last(),this.remove(),this[1]?e.insLeftOf(this[1]):e.insAtRightEnd(this.parent);var t=this.ends[h].latex();t||(t=" ");var n=x[t]||Ue[t];n?(n=n(t),this._replacedFragment&&n.replaces(this._replacedFragment),n.createLeftOf(e)):((n=Q()).replaces(t),n.createLeftOf(e),e.insRightOf(n),this._replacedFragment&&this._replacedFragment.remove())}})),P(1));for(var Ye in Be)!function(e,t){"function"==typeof t?(D[e]=function(){return j(),t.apply(this,arguments)},D[e].prototype=t.prototype):D[e]=t}(Ye,Be[Ye]);"object"==typeof e.exports&&(e.exports=D)}()},function(e,t,n){"use strict";(function(e,r){var i,a=n(70);i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var o=Object(a.a)(i);t.a=o}).call(this,n(11),n(17)(e))},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,c=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var e=s(f);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||u||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var i=r(n(45)),a=new Set(["input","option","optgroup","select","button","datalist","textarea"]),o=new Set(["p"]),s={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:o,h1:o,h2:o,h3:o,h4:o,h5:o,h6:o,select:a,input:a,output:a,button:a,datalist:a,textarea:a,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:o,article:o,aside:o,blockquote:o,details:o,div:o,dl:o,fieldset:o,figcaption:o,figure:o,footer:o,form:o,header:o,hr:o,main:o,nav:o,ol:o,pre:o,section:o,table:o,ul:o,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},l=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),c=new Set(["math","svg"]),u=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),d=/\s|\//,f=function(){function e(e,t){var n,r,a,o,s;void 0===t&&(t={}),this.startIndex=0,this.endIndex=null,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.options=t,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(n=t.lowerCaseTags)&&void 0!==n?n:!t.xmlMode,this.lowerCaseAttributeNames=null!==(r=t.lowerCaseAttributeNames)&&void 0!==r?r:!t.xmlMode,this.tokenizer=new(null!==(a=t.Tokenizer)&&void 0!==a?a:i.default)(this.options,this),null===(s=(o=this.cbs).onparserinit)||void 0===s||s.call(o,this)}return e.prototype.updatePosition=function(e){null===this.endIndex?this.tokenizer.sectionStart<=e?this.startIndex=0:this.startIndex=this.tokenizer.sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this.tokenizer.getAbsoluteIndex()},e.prototype.ontext=function(e){var t,n;this.updatePosition(1),this.endIndex--,null===(n=(t=this.cbs).ontext)||void 0===n||n.call(t,e)},e.prototype.onopentagname=function(e){var t,n;if(this.lowerCaseTagNames&&(e=e.toLowerCase()),this.tagname=e,!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(s,e))for(var r=void 0;this.stack.length>0&&s[e].has(r=this.stack[this.stack.length-1]);)this.onclosetag(r);!this.options.xmlMode&&l.has(e)||(this.stack.push(e),c.has(e)?this.foreignContext.push(!0):u.has(e)&&this.foreignContext.push(!1)),null===(n=(t=this.cbs).onopentagname)||void 0===n||n.call(t,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.onopentagend=function(){var e,t;this.updatePosition(1),this.attribs&&(null===(t=(e=this.cbs).onopentag)||void 0===t||t.call(e,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&l.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},e.prototype.onclosetag=function(e){if(this.updatePosition(1),this.lowerCaseTagNames&&(e=e.toLowerCase()),(c.has(e)||u.has(e))&&this.foreignContext.pop(),!this.stack.length||!this.options.xmlMode&&l.has(e))this.options.xmlMode||"br"!==e&&"p"!==e||(this.onopentagname(e),this.closeCurrentTag());else{var t=this.stack.lastIndexOf(e);if(-1!==t)if(this.cbs.onclosetag)for(t=this.stack.length-t;t--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=t;else"p"!==e||this.options.xmlMode||(this.onopentagname(e),this.closeCurrentTag())}},e.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},e.prototype.closeCurrentTag=function(){var e,t,n=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===n&&(null===(t=(e=this.cbs).onclosetag)||void 0===t||t.call(e,n),this.stack.pop())},e.prototype.onattribname=function(e){this.lowerCaseAttributeNames&&(e=e.toLowerCase()),this.attribname=e},e.prototype.onattribdata=function(e){this.attribvalue+=e},e.prototype.onattribend=function(e){var t,n;null===(n=(t=this.cbs).onattribute)||void 0===n||n.call(t,this.attribname,this.attribvalue,e),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(d),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},e.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+t,"!"+e)}},e.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+t,"?"+e)}},e.prototype.oncomment=function(e){var t,n,r,i;this.updatePosition(4),null===(n=(t=this.cbs).oncomment)||void 0===n||n.call(t,e),null===(i=(r=this.cbs).oncommentend)||void 0===i||i.call(r)},e.prototype.oncdata=function(e){var t,n,r,i,a,o;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?(null===(n=(t=this.cbs).oncdatastart)||void 0===n||n.call(t),null===(i=(r=this.cbs).ontext)||void 0===i||i.call(r,e),null===(o=(a=this.cbs).oncdataend)||void 0===o||o.call(a)):this.oncomment("[CDATA["+e+"]]")},e.prototype.onerror=function(e){var t,n;null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,e)},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag)for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n]));null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,n,r;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],null===(r=(n=this.cbs).onparserinit)||void 0===r||r.call(n,this)},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.write=function(e){this.tokenizer.write(e)},e.prototype.end=function(e){this.tokenizer.end(e)},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){this.tokenizer.resume()},e.prototype.parseChunk=function(e){this.write(e)},e.prototype.done=function(e){this.end(e)},e}();t.Parser=f},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(46)),a=r(n(26)),o=r(n(47)),s=r(n(27));function l(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function c(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function u(e,t,n){var r=e.toLowerCase();return e===r?function(e,i){i===r?e._state=t:(e._state=n,e._index--)}:function(i,a){a===r||a===e?i._state=t:(i._state=n,i._index--)}}function d(e,t){var n=e.toLowerCase();return function(r,i){i===n||i===e?r._state=t:(r._state=3,r._index--)}}var f=u("C",24,16),p=u("D",25,16),h=u("A",26,16),g=u("T",27,16),m=u("A",28,16),y=d("R",35),v=d("I",36),b=d("P",37),I=d("T",38),x=u("R",40,1),w=u("I",41,1),T=u("P",42,1),M=u("T",43,1),A=d("Y",45),C=d("L",46),E=d("E",47),N=u("Y",49,1),S=u("L",50,1),k=u("E",51,1),j=d("I",54),D=d("T",55),L=d("L",56),O=d("E",57),P=u("I",58,1),R=u("T",59,1),z=u("L",60,1),_=u("E",61,1),U=u("#",63,64),Z=u("X",66,65),F=function(){function e(e,t){var n;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=t,this.xmlMode=!!(null==e?void 0:e.xmlMode),this.decodeEntities=null===(n=null==e?void 0:e.decodeEntities)||void 0===n||n}return e.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},e.prototype.write=function(e){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=e,this.parse()},e.prototype.end=function(e){this.ended&&this.cbs.onerror(Error(".end() after done!")),e&&this.write(e),this.ended=!0,this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this._index<this.buffer.length&&this.parse(),this.ended&&this.finish()},e.prototype.getAbsoluteIndex=function(){return this.bufferOffset+this._index},e.prototype.stateText=function(e){"<"===e?(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):!this.decodeEntities||"&"!==e||1!==this.special&&4!==this.special||(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},e.prototype.stateBeforeTagName=function(e){"/"===e?this._state=5:"<"===e?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):">"===e||1!==this.special||l(e)?this._state=1:"!"===e?(this._state=15,this.sectionStart=this._index+1):"?"===e?(this._state=17,this.sectionStart=this._index+1):c(e)?(this._state=this.xmlMode||"s"!==e&&"S"!==e?this.xmlMode||"t"!==e&&"T"!==e?3:52:32,this.sectionStart=this._index):this._state=1},e.prototype.stateInTagName=function(e){("/"===e||">"===e||l(e))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},e.prototype.stateBeforeClosingTagName=function(e){l(e)||(">"===e?this._state=1:1!==this.special?"s"===e||"S"===e?this._state=33:"t"===e||"T"===e?this._state=53:(this._state=1,this._index--):c(e)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},e.prototype.stateInClosingTagName=function(e){(">"===e||l(e))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},e.prototype.stateAfterClosingTagName=function(e){">"===e&&(this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeAttributeName=function(e){">"===e?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):"/"===e?this._state=4:l(e)||(this._state=9,this.sectionStart=this._index)},e.prototype.stateInSelfClosingTag=function(e){">"===e?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):l(e)||(this._state=8,this._index--)},e.prototype.stateInAttributeName=function(e){("="===e||"/"===e||">"===e||l(e))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},e.prototype.stateAfterAttributeName=function(e){"="===e?this._state=11:"/"===e||">"===e?(this.cbs.onattribend(void 0),this._state=8,this._index--):l(e)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},e.prototype.stateBeforeAttributeValue=function(e){'"'===e?(this._state=12,this.sectionStart=this._index+1):"'"===e?(this._state=13,this.sectionStart=this._index+1):l(e)||(this._state=14,this.sectionStart=this._index,this._index--)},e.prototype.handleInAttributeValue=function(e,t){e===t?(this.emitToken("onattribdata"),this.cbs.onattribend(t),this._state=8):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,'"')},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"'")},e.prototype.stateInAttributeValueNoQuotes=function(e){l(e)||">"===e?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateBeforeDeclaration=function(e){this._state="["===e?23:"-"===e?18:16},e.prototype.stateInDeclaration=function(e){">"===e&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateInProcessingInstruction=function(e){">"===e&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeComment=function(e){"-"===e?(this._state=19,this.sectionStart=this._index+1):this._state=16},e.prototype.stateInComment=function(e){"-"===e&&(this._state=21)},e.prototype.stateInSpecialComment=function(e){">"===e&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateAfterComment1=function(e){this._state="-"===e?22:19},e.prototype.stateAfterComment2=function(e){">"===e?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"-"!==e&&(this._state=19)},e.prototype.stateBeforeCdata6=function(e){"["===e?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},e.prototype.stateInCdata=function(e){"]"===e&&(this._state=30)},e.prototype.stateAfterCdata1=function(e){this._state="]"===e?31:29},e.prototype.stateAfterCdata2=function(e){">"===e?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"]"!==e&&(this._state=29)},e.prototype.stateBeforeSpecialS=function(e){"c"===e||"C"===e?this._state=34:"t"===e||"T"===e?this._state=44:(this._state=3,this._index--)},e.prototype.stateBeforeSpecialSEnd=function(e){2!==this.special||"c"!==e&&"C"!==e?3!==this.special||"t"!==e&&"T"!==e?this._state=1:this._state=48:this._state=39},e.prototype.stateBeforeSpecialLast=function(e,t){("/"===e||">"===e||l(e))&&(this.special=t),this._state=3,this._index--},e.prototype.stateAfterSpecialLast=function(e,t){">"===e||l(e)?(this.special=1,this._state=6,this.sectionStart=this._index-t,this._index--):this._state=1},e.prototype.parseFixedEntity=function(e){if(void 0===e&&(e=this.xmlMode?s.default:a.default),this.sectionStart+1<this._index){var t=this.buffer.substring(this.sectionStart+1,this._index);Object.prototype.hasOwnProperty.call(e,t)&&(this.emitPartial(e[t]),this.sectionStart=this._index+1)}},e.prototype.parseLegacyEntity=function(){for(var e=this.sectionStart+1,t=Math.min(this._index-e,6);t>=2;){var n=this.buffer.substr(e,t);if(Object.prototype.hasOwnProperty.call(o.default,n))return this.emitPartial(o.default[n]),void(this.sectionStart+=t+1);t--}},e.prototype.stateInNamedEntity=function(e){";"===e?(this.parseFixedEntity(),1===this.baseState&&this.sectionStart+1<this._index&&!this.xmlMode&&this.parseLegacyEntity(),this._state=this.baseState):(e<"0"||e>"9")&&!c(e)&&(this.xmlMode||this.sectionStart+1===this._index||(1!==this.baseState?"="!==e&&this.parseFixedEntity(o.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},e.prototype.decodeNumericEntity=function(e,t,n){var r=this.sectionStart+e;if(r!==this._index){var a=this.buffer.substring(r,this._index),o=parseInt(a,t);this.emitPartial(i.default(o)),this.sectionStart=n?this._index+1:this._index}this._state=this.baseState},e.prototype.stateInNumericEntity=function(e){";"===e?this.decodeNumericEntity(2,10,!0):(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},e.prototype.stateInHexEntity=function(e){";"===e?this.decodeNumericEntity(3,16,!0):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},e.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(1===this._state?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},e.prototype.parse=function(){for(;this._index<this.buffer.length&&this.running;){var e=this.buffer.charAt(this._index);1===this._state?this.stateText(e):12===this._state?this.stateInAttributeValueDoubleQuotes(e):9===this._state?this.stateInAttributeName(e):19===this._state?this.stateInComment(e):20===this._state?this.stateInSpecialComment(e):8===this._state?this.stateBeforeAttributeName(e):3===this._state?this.stateInTagName(e):6===this._state?this.stateInClosingTagName(e):2===this._state?this.stateBeforeTagName(e):10===this._state?this.stateAfterAttributeName(e):13===this._state?this.stateInAttributeValueSingleQuotes(e):11===this._state?this.stateBeforeAttributeValue(e):5===this._state?this.stateBeforeClosingTagName(e):7===this._state?this.stateAfterClosingTagName(e):32===this._state?this.stateBeforeSpecialS(e):21===this._state?this.stateAfterComment1(e):14===this._state?this.stateInAttributeValueNoQuotes(e):4===this._state?this.stateInSelfClosingTag(e):16===this._state?this.stateInDeclaration(e):15===this._state?this.stateBeforeDeclaration(e):22===this._state?this.stateAfterComment2(e):18===this._state?this.stateBeforeComment(e):33===this._state?this.stateBeforeSpecialSEnd(e):53===this._state?P(this,e):39===this._state?x(this,e):40===this._state?w(this,e):41===this._state?T(this,e):34===this._state?y(this,e):35===this._state?v(this,e):36===this._state?b(this,e):37===this._state?I(this,e):38===this._state?this.stateBeforeSpecialLast(e,2):42===this._state?M(this,e):43===this._state?this.stateAfterSpecialLast(e,6):44===this._state?A(this,e):29===this._state?this.stateInCdata(e):45===this._state?C(this,e):46===this._state?E(this,e):47===this._state?this.stateBeforeSpecialLast(e,3):48===this._state?N(this,e):49===this._state?S(this,e):50===this._state?k(this,e):51===this._state?this.stateAfterSpecialLast(e,5):52===this._state?j(this,e):54===this._state?D(this,e):55===this._state?L(this,e):56===this._state?O(this,e):57===this._state?this.stateBeforeSpecialLast(e,4):58===this._state?R(this,e):59===this._state?z(this,e):60===this._state?_(this,e):61===this._state?this.stateAfterSpecialLast(e,5):17===this._state?this.stateInProcessingInstruction(e):64===this._state?this.stateInNamedEntity(e):23===this._state?f(this,e):62===this._state?U(this,e):24===this._state?p(this,e):25===this._state?h(this,e):30===this._state?this.stateAfterCdata1(e):31===this._state?this.stateAfterCdata2(e):26===this._state?g(this,e):27===this._state?m(this,e):28===this._state?this.stateBeforeCdata6(e):66===this._state?this.stateInHexEntity(e):65===this._state?this.stateInNumericEntity(e):63===this._state?Z(this,e):this.cbs.onerror(Error("unknown _state"),this._state),this._index++}this.cleanup()},e.prototype.finish=function(){this.sectionStart<this._index&&this.handleTrailingData(),this.cbs.onend()},e.prototype.handleTrailingData=function(){var e=this.buffer.substr(this.sectionStart);29===this._state||30===this._state||31===this._state?this.cbs.oncdata(e):19===this._state||21===this._state||22===this._state?this.cbs.oncomment(e):64!==this._state||this.xmlMode?65!==this._state||this.xmlMode?66!==this._state||this.xmlMode?3!==this._state&&8!==this._state&&11!==this._state&&10!==this._state&&9!==this._state&&13!==this._state&&12!==this._state&&14!==this._state&&6!==this._state&&this.cbs.ontext(e):(this.decodeNumericEntity(3,16,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.decodeNumericEntity(2,10,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.parseLegacyEntity(),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData()))},e.prototype.getSection=function(){return this.buffer.substring(this.sectionStart,this._index)},e.prototype.emitToken=function(e){this.cbs[e](this.getSection()),this.sectionStart=-1},e.prototype.emitPartial=function(e){1!==this.baseState?this.cbs.onattribdata(e):this.cbs.ontext(e)},e}();t.default=F},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(93));t.default=function(e){if(e>=55296&&e<=57343||e>1114111)return"�";e in i.default&&(e=i.default[e]);var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}},function(e){e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","QUOT":"\\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}')},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(49);i(n(49),t);var o=/\s+/g,s={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){var e;this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null!==(e=this.parser)&&void 0!==e?e:null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=new a.Element(e,t);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,n=this.lastNode;if(n&&"text"===n.type)t?n.data=(n.data+e).replace(o," "):n.data+=e;else{t&&(e=e.replace(o," "));var r=new a.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&"comment"===this.lastNode.type)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.NodeWithChildren("cdata",[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e.prototype.addDataNode=function(e){this.addNode(e),this.lastNode=e},e}();t.DomHandler=l,t.default=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var o=new Map([["tag",1],["script",1],["style",1],["directive",1],["text",3],["cdata",4],["comment",8],["root",9]]),s=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=o.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),g(this,e)},e}();t.Node=s;var l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=l;var c=function(e){function t(t){return e.call(this,"text",t)||this}return i(t,e),t}(l);t.Text=c;var u=function(e){function t(t){return e.call(this,"comment",t)||this}return i(t,e),t}(l);t.Comment=u;var d=function(e){function t(t,n){var r=e.call(this,"directive",n)||this;return r.name=t,r}return i(t,e),t}(l);t.ProcessingInstruction=d;var f=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=f;var p=function(e){function t(t){return e.call(this,"root",t)||this}return i(t,e),t}(f);t.Document=p;var h=function(e){function t(t,n,r){void 0===r&&(r=[]);var i=e.call(this,"script"===t?"script":"style"===t?"style":"tag",r)||this;return i.name=t,i.attribs=n,i.attribs=n,i}return i(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function g(e,t){var n;switch(void 0===t&&(t=!1),e.type){case"text":n=new c(e.data);break;case"directive":var r=e;n=new d(r.name,r.data),null!=r["x-name"]&&(n["x-name"]=r["x-name"],n["x-publicId"]=r["x-publicId"],n["x-systemId"]=r["x-systemId"]);break;case"comment":n=new u(e.data);break;case"tag":case"script":case"style":var i=e,o=t?m(i.children):[],s=new h(i.name,a({},i.attribs),o);o.forEach((function(e){return e.parent=s})),i["x-attribsNamespace"]&&(s["x-attribsNamespace"]=a({},i["x-attribsNamespace"])),i["x-attribsPrefix"]&&(s["x-attribsPrefix"]=a({},i["x-attribsPrefix"])),n=s;break;case"cdata":o=t?m(e.children):[];var l=new f(e.type,o);o.forEach((function(e){return e.parent=l})),n=l;break;case"root":var g=e,y=(o=t?m(g.children):[],new p(o));o.forEach((function(e){return e.parent=y})),g["x-mode"]&&(y["x-mode"]=g["x-mode"]),n=y;break;case"doctype":throw new Error("Not implemented yet: ElementType.Doctype case")}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,n}function m(e){for(var t=e.map((function(e){return g(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=h,t.cloneNode=g},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseFeed=t.FeedHandler=void 0;var c,u,d=l(n(48)),f=s(n(51)),p=n(44);!function(e){e[e.image=0]="image",e[e.audio=1]="audio",e[e.video=2]="video",e[e.document=3]="document",e[e.executable=4]="executable"}(c||(c={})),function(e){e[e.sample=0]="sample",e[e.full=1]="full",e[e.nonstop=2]="nonstop"}(u||(u={}));var h=function(e){function t(t,n){return"object"==typeof t&&(n=t=void 0),e.call(this,t,n)||this}return i(t,e),t.prototype.onend=function(){var e,t,n=y(x,this.dom);if(n){var r={};if("feed"===n.name){var i=n.children;r.type="atom",I(r,"id","id",i),I(r,"title","title",i);var a=b("href",y("link",i));a&&(r.link=a),I(r,"description","subtitle",i),(o=v("updated",i))&&(r.updated=new Date(o)),I(r,"author","email",i,!0),r.items=m("entry",i).map((function(e){var t={},n=e.children;I(t,"id","id",n),I(t,"title","title",n);var r=b("href",y("link",n));r&&(t.link=r);var i=v("summary",n)||v("content",n);i&&(t.description=i);var a=v("updated",n);return a&&(t.pubDate=new Date(a)),t.media=g(n),t}))}else{var o;i=null!==(t=null===(e=y("channel",n.children))||void 0===e?void 0:e.children)&&void 0!==t?t:[];r.type=n.name.substr(0,3),r.id="",I(r,"title","title",i),I(r,"link","link",i),I(r,"description","description",i),(o=v("lastBuildDate",i))&&(r.updated=new Date(o)),I(r,"author","managingEditor",i,!0),r.items=m("item",n.children).map((function(e){var t={},n=e.children;I(t,"id","guid",n),I(t,"title","title",n),I(t,"link","link",n),I(t,"description","description",n);var r=v("pubDate",n);return r&&(t.pubDate=new Date(r)),t.media=g(n),t}))}this.feed=r,this.handleCallback(null)}else this.handleCallback(new Error("couldn't find root of feed"))},t}(d.default);function g(e){return m("media:content",e).map((function(e){var t={medium:e.attribs.medium,isDefault:!!e.attribs.isDefault};return e.attribs.url&&(t.url=e.attribs.url),e.attribs.fileSize&&(t.fileSize=parseInt(e.attribs.fileSize,10)),e.attribs.type&&(t.type=e.attribs.type),e.attribs.expression&&(t.expression=e.attribs.expression),e.attribs.bitrate&&(t.bitrate=parseInt(e.attribs.bitrate,10)),e.attribs.framerate&&(t.framerate=parseInt(e.attribs.framerate,10)),e.attribs.samplingrate&&(t.samplingrate=parseInt(e.attribs.samplingrate,10)),e.attribs.channels&&(t.channels=parseInt(e.attribs.channels,10)),e.attribs.duration&&(t.duration=parseInt(e.attribs.duration,10)),e.attribs.height&&(t.height=parseInt(e.attribs.height,10)),e.attribs.width&&(t.width=parseInt(e.attribs.width,10)),e.attribs.lang&&(t.lang=e.attribs.lang),t}))}function m(e,t){return f.getElementsByTagName(e,t,!0)}function y(e,t){return f.getElementsByTagName(e,t,!0,1)[0]}function v(e,t,n){return void 0===n&&(n=!1),f.getText(f.getElementsByTagName(e,t,n,1)).trim()}function b(e,t){return t?t.attribs[e]:null}function I(e,t,n,r,i){void 0===i&&(i=!1);var a=v(n,r,i);a&&(e[t]=a)}function x(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}t.FeedHandler=h,t.parseFeed=function(e,t){void 0===t&&(t={xmlMode:!0});var n=new h(t);return new p.Parser(n,t).end(e),n.feed}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(95),t),i(n(99),t),i(n(100),t),i(n(55),t),i(n(101),t),i(n(102),t),i(n(12),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTag=function(e){return"tag"===e.type||"script"===e.type||"style"===e.type},t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(26)),a=r(n(47)),o=r(n(27)),s=r(n(46));function l(e){var t=Object.keys(e).join("|"),n=u(e),r=new RegExp("&(?:"+(t+="|#[xX][\\da-fA-F]+|#\\d+")+");","g");return function(e){return String(e).replace(r,n)}}t.decodeXML=l(o.default),t.decodeHTMLStrict=l(i.default);var c=function(e,t){return e<t?1:-1};function u(e){return function(t){return"#"===t.charAt(1)?"X"===t.charAt(2)||"x"===t.charAt(2)?s.default(parseInt(t.substr(3),16)):s.default(parseInt(t.substr(2),10)):e[t.slice(1,-1)]}}t.decodeHTML=function(){for(var e=Object.keys(a.default).sort(c),t=Object.keys(i.default).sort(c),n=0,r=0;n<t.length;n++)e[r]===t[n]?(t[n]+=";?",r++):t[n]+=";";var o=new RegExp("&(?:"+t.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),s=u(i.default);function l(e){return";"!==e.substr(-1)&&(e+=";"),s(e)}return function(e){return String(e).replace(o,l)}}()},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=l(r(n(27)).default),a=c(i);t.encodeXML=h(i,a);var o=l(r(n(26)).default),s=c(o);function l(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function c(e){var t=[],n=[];return Object.keys(e).forEach((function(e){return 1===e.length?t.push("\\"+e):n.push(e)})),n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}t.encodeHTML=h(o,s);var u=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function f(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"}function p(e,t){return"&#x"+(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536).toString(16).toUpperCase()+";"}function h(e,t){return function(n){return n.replace(t,(function(t){return e[t]})).replace(d,p).replace(u,f)}}var g=c(i);t.escape=function(e){return e.replace(g,f).replace(d,p).replace(u,f)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var r=n(12);function i(e,t,n,a){for(var o=[],s=0,l=t;s<l.length;s++){var c=l[s];if(e(c)&&(o.push(c),--a<=0))break;if(n&&r.hasChildren(c)&&c.children.length>0){var u=i(e,c.children,n,a);if(o.push.apply(o,u),(a-=u.length)<=0)break}}return o}t.filter=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),Array.isArray(t)||(t=[t]),i(e,t,n,r)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,n,i){void 0===i&&(i=!0);for(var a=null,o=0;o<n.length&&!a;o++){var s=n[o];r.isTag(s)&&(t(s)?a=s:i&&s.children.length>0&&(a=e(t,s.children)))}return a},t.existsOne=function e(t,n){return n.some((function(n){return r.isTag(n)&&(t(n)||n.children.length>0&&e(t,n.children))}))},t.findAll=function(e,t){for(var n,i,a=[],o=t.filter(r.isTag);i=o.shift();){var s=null===(n=i.children)||void 0===n?void 0:n.filter(r.isTag);s&&s.length>0&&o.unshift.apply(o,s),e(i)&&a.push(i)}return a}},function(e,t){},function(e,t,n){"use strict";const r={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1};class i{constructor(e){this.builder=e}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}document(e){this.body(e)}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{let i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],a=this.raw(i,"before");a&&this.builder(a),this.stringify(i,t!==r||n)}}block(e,t){let n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}raw(e,t,n){let i;if(n||(n=t),t&&(i=e.raws[t],void 0!==i))return i;let a=e.parent;if("before"===n){if(!a||"root"===a.type&&a.first===e)return"";if(a&&"document"===a.type)return""}if(!a)return r[n];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[n])return o.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let r="raw"+((s=n)[0].toUpperCase()+s.slice(1));this[r]?i=this[r](o,e):o.walk(e=>{if(i=e.raws[t],void 0!==i)return!1})}var s;return void 0===i&&(i=r[n]),o.rawCache[n]=i,i}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,i=0;for(;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)n+=t}return n}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}}e.exports=i,i.default=i},function(e,t,n){"use strict";let{isClean:r,my:i}=n(29),a=n(59),o=n(20),s=n(9),l=n(33),c=(n(62),n(34)),u=n(35),d=n(13);const f={document:"Document",root:"Root",atrule:"AtRule",rule:"Rule",decl:"Declaration",comment:"Comment"},p={postcssPlugin:!0,prepare:!0,Once:!0,Document:!0,Root:!0,Declaration:!0,Rule:!0,AtRule:!0,Comment:!0,DeclarationExit:!0,RuleExit:!0,AtRuleExit:!0,CommentExit:!0,RootExit:!0,DocumentExit:!0,OnceExit:!0},h={postcssPlugin:!0,prepare:!0,Once:!0};function g(e){return"object"==typeof e&&"function"==typeof e.then}function m(e){let t=!1,n=f[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function y(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:m(e),{node:e,events:t,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function v(e){return e[r]=!1,e.nodes&&e.nodes.forEach(e=>v(e)),e}let b={};class I{constructor(e,t,n){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof I||t instanceof c)r=v(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=u;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{r=e(t,n)}catch(e){this.processed=!0,this.error=e}r&&!r[i]&&s.rebuild(r)}else r=v(t);this.result=new c(e,r,n),this.helpers={...b,result:this.result,postcss:b},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}get[Symbol.toStringTag](){return"LazyResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,t){return this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(g(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r];)e[r]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=o;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new a(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}walkSync(e){e[r]=!0;let t=m(e);for(let n of t)if(0===n)e.nodes&&e.each(e=>{e[r]||this.walkSync(e)});else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}visitSync(e,t){for(let[n,r]of e){let e;this.result.lastPlugin=n;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(g(e))throw this.getAsyncError()}}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return g(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(g(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r];){e[r]=!0;let t=[y(e)];for(;t.length>0;){let e=this.visitTick(t);if(g(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!p[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!h[n])if("object"==typeof t[n])for(let r in t[n])e(t,"*"===r?n:n+"-"+r.toLowerCase(),t[n][r]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let t=e[e.length-1],{node:n,visitors:i}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(i.length>0&&t.visitorIndex<i.length){let[e,r]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return r(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let i,a=t.iterator;for(;i=n.nodes[n.indexes[a]];)if(n.indexes[a]+=1,!i[r])return i[r]=!0,void e.push(y(i));t.iterator=0,delete n.indexes[a]}let a=t.events;for(;t.eventIndex<a.length;){let e=a[t.eventIndex];if(t.eventIndex+=1,0===e)return void(n.nodes&&n.nodes.length&&(n[r]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}}I.registerPostcss=e=>{b=e},e.exports=I,I.default=I,d.registerLazyResult(I),l.registerLazyResult(I)},function(e,t,n){"use strict";(function(t){let{SourceMapConsumer:r,SourceMapGenerator:i}=n(31),{dirname:a,resolve:o,relative:s,sep:l}=n(32),{pathToFileURL:c}=n(60),u=n(21),d=Boolean(r&&i),f=Boolean(a&&o&&s&&l);e.exports=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new u(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;n&&!e[n]&&(e[n]=!0,this.map.setSourceContent(this.toUrl(this.path(n)),t.source.input.css))}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),i=e.root||a(e.file);!1===this.mapOpts.sourcesContent?(t=new r(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map(()=>null))):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(i)))}}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}toBase64(e){return t?t.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=i.fromSourceMap(e)}else this.map=new i({file:this.outputFile()}),this.map.addMapping({source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",generated:{line:1,column:0},original:{line:1,column:0}});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}path(e){if(0===e.indexOf("<"))return e;if(/^\w+:\/\//.test(e))return e;if(this.mapOpts.absolute)return e;let t=this.opts.to?a(this.opts.to):".";return"string"==typeof this.mapOpts.annotation&&(t=a(o(t,this.mapOpts.annotation))),e=s(t,e)}toUrl(e){return"\\"===l&&(e=e.replace(/\\/g,"/")),encodeURI(e).replace(/[#?]/g,encodeURIComponent)}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);if(this.mapOpts.absolute){if(c)return c(e.source.input.from).toString();throw new Error("`map.absolute` option is not available in this PostCSS build")}return this.toUrl(this.path(e.source.input.from))}generateString(){this.css="",this.map=new i({file:this.outputFile()});let e,t,n=1,r=1,a={source:"",generated:{line:0,column:0},original:{line:0,column:0}};this.stringify(this.root,(i,o,s)=>{if(this.css+=i,o&&"end"!==s&&(a.generated.line=n,a.generated.column=r-1,o.source&&o.source.start?(a.source=this.sourcePath(o),a.original.line=o.source.start.line,a.original.column=o.source.start.column-1,this.map.addMapping(a)):(a.source="<no source>",a.original.line=1,a.original.column=0,this.map.addMapping(a))),e=i.match(/\n/g),e?(n+=e.length,t=i.lastIndexOf("\n"),r=i.length-t):r+=i.length,o&&"start"!==s){let e=o.parent||{raws:{}};("decl"!==o.type||o!==e.last||e.raws.semicolon)&&(o.source&&o.source.end?(a.source=this.sourcePath(o),a.original.line=o.source.end.line,a.original.column=o.source.end.column-1,a.generated.line=n,a.generated.column=r-2,this.map.addMapping(a)):(a.source="<no source>",a.original.line=1,a.original.column=0,a.generated.line=n,a.generated.column=r-1,this.map.addMapping(a)))}})}generate(){if(this.clearAnnotation(),f&&d&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}}}).call(this,n(30).Buffer)},function(e,t){},function(e,t,n){"use strict";(function(t){let{SourceMapConsumer:r,SourceMapGenerator:i}=n(31),{existsSync:a,readFileSync:o}=n(113),{dirname:s,join:l}=n(32);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,t){return!!e&&e.substr(0,t.length)===t}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return n=e.substr(RegExp.lastMatch.length),t?t.from(n,"base64").toString():window.atob(n);var n;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}loadFile(e){if(this.root=s(e),a(e))return this.mapFile=e,o(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=l(s(e),t)),this.loadFile(t)}}}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}}e.exports=c,c.default=c}).call(this,n(30).Buffer)},function(e,t,n){"use strict";let r={};e.exports=function(e){r[e]||(r[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},function(e,t,n){"use strict";class r{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=r,r.default=r},function(e,t,n){"use strict";let r={split(e,t,n){let r=[],i="",a=!1,o=0,s=!1,l=!1;for(let n of e)l?l=!1:"\\"===n?l=!0:s?n===s&&(s=!1):'"'===n||"'"===n?s=n:"("===n?o+=1:")"===n?o>0&&(o-=1):0===o&&t.includes(n)&&(a=!0),a?(""!==i&&r.push(i.trim()),i="",a=!1):i+=n;return(n||""!==i)&&r.push(i.trim()),r},space:e=>r.split(e,[" ","\n","\t"]),comma:e=>r.split(e,[","],!0)};e.exports=r,r.default=r},function(e,t,n){"use strict";t.a=function(){return!1}},function(e,t,n){var r=n(76),i=n(77),a=n(78),o=n(80);e.exports=function(e,t){return r(e)||i(e,t)||a(e,t)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";t.a="data:image/gif;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZC5pbmZvACH5BAAKAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAAKAAEALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0KDV4EEEAQLiF18TAYNXDaSe3x6mjidN1s3IQAh+QQACgACACwAAAAAEAAQAAAFeCAgAgLZDGU5jgRECEUiCI+yioSDwDJyLKsXoHFQxBSHAoAAFBhqtMJg8DgQBgfrEsJAEAg4YhZIEiwgKtHiMBgtpg3wbUZXGO7kOb1MUKRFMysCChAoggJCIg0GC2aNe4gqQldfL4l/Ag1AXySJgn5LcoE3QXI3IQAh+QQACgADACwAAAAAEAAQAAAFdiAgAgLZNGU5joQhCEjxIssqEo8bC9BRjy9Ag7GILQ4QEoE0gBAEBcOpcBA0DoxSK/e8LRIHn+i1cK0IyKdg0VAoljYIg+GgnRrwVS/8IAkICyosBIQpBAMoKy9dImxPhS+GKkFrkX+TigtLlIyKXUF+NjagNiEAIfkEAAoABAAsAAAAABAAEAAABWwgIAICaRhlOY4EIgjH8R7LKhKHGwsMvb4AAy3WODBIBBKCsYA9TjuhDNDKEVSERezQEL0WrhXucRUQGuik7bFlngzqVW9LMl9XWvLdjFaJtDFqZ1cEZUB0dUgvL3dgP4WJZn4jkomWNpSTIyEAIfkEAAoABQAsAAAAABAAEAAABX4gIAICuSxlOY6CIgiD8RrEKgqGOwxwUrMlAoSwIzAGpJpgoSDAGifDY5kopBYDlEpAQBwevxfBtRIUGi8xwWkDNBCIwmC9Vq0aiQQDQuK+VgQPDXV9hCJjBwcFYU5pLwwHXQcMKSmNLQcIAExlbH8JBwttaX0ABAcNbWVbKyEAIfkEAAoABgAsAAAAABAAEAAABXkgIAICSRBlOY7CIghN8zbEKsKoIjdFzZaEgUBHKChMJtRwcWpAWoWnifm6ESAMhO8lQK0EEAV3rFopIBCEcGwDKAqPh4HUrY4ICHH1dSoTFgcHUiZjBhAJB2AHDykpKAwHAwdzf19KkASIPl9cDgcnDkdtNwiMJCshACH5BAAKAAcALAAAAAAQABAAAAV3ICACAkkQZTmOAiosiyAoxCq+KPxCNVsSMRgBsiClWrLTSWFoIQZHl6pleBh6suxKMIhlvzbAwkBWfFWrBQTxNLq2RG2yhSUkDs2b63AYDAoJXAcFRwADeAkJDX0AQCsEfAQMDAIPBz0rCgcxky0JRWE1AmwpKyEAIfkEAAoACAAsAAAAABAAEAAABXkgIAICKZzkqJ4nQZxLqZKv4NqNLKK2/Q4Ek4lFXChsg5ypJjs1II3gEDUSRInEGYAw6B6zM4JhrDAtEosVkLUtHA7RHaHAGJQEjsODcEg0FBAFVgkQJQ1pAwcDDw8KcFtSInwJAowCCA6RIwqZAgkPNgVpWndjdyohACH5BAAKAAkALAAAAAAQABAAAAV5ICACAimc5KieLEuUKvm2xAKLqDCfC2GaO9eL0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQACgAKACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQACgALACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAADxiciAvPgo8Yj5XYXJuaW5nPC9iPjogIG15c3FsX3F1ZXJ5KCkgWzxhIGhyZWY9J2Z1bmN0aW9uLm15c3FsLXF1ZXJ5Jz5mdW5jdGlvbi5teXNxbC1xdWVyeTwvYT5dOiBDYW4ndCBjb25uZWN0IHRvIGxvY2FsIE15U1FMIHNlcnZlciB0aHJvdWdoIHNvY2tldCAnL3Zhci9ydW4vbXlzcWxkL215c3FsZC5zb2NrJyAoMikgaW4gPGI+L2hvbWUvYWpheGxvYWQvd3d3L2xpYnJhaXJpZXMvY2xhc3MubXlzcWwucGhwPC9iPiBvbiBsaW5lIDxiPjY4PC9iPjxiciAvPgo8YnIgLz4KPGI+V2FybmluZzwvYj46ICBteXNxbF9xdWVyeSgpIFs8YSBocmVmPSdmdW5jdGlvbi5teXNxbC1xdWVyeSc+ZnVuY3Rpb24ubXlzcWwtcXVlcnk8L2E+XTogQSBsaW5rIHRvIHRoZSBzZXJ2ZXIgY291bGQgbm90IGJlIGVzdGFibGlzaGVkIGluIDxiPi9ob21lL2FqYXhsb2FkL3d3dy9saWJyYWlyaWVzL2NsYXNzLm15c3FsLnBocDwvYj4gb24gbGluZSA8Yj42ODwvYj48YnIgLz4KPGJyIC8+CjxiPldhcm5pbmc8L2I+OiAgbXlzcWxfcXVlcnkoKSBbPGEgaHJlZj0nZnVuY3Rpb24ubXlzcWwtcXVlcnknPmZ1bmN0aW9uLm15c3FsLXF1ZXJ5PC9hPl06IENhbid0IGNvbm5lY3QgdG8gbG9jYWwgTXlTUUwgc2VydmVyIHRocm91Z2ggc29ja2V0ICcvdmFyL3J1bi9teXNxbGQvbXlzcWxkLnNvY2snICgyKSBpbiA8Yj4vaG9tZS9hamF4bG9hZC93d3cvbGlicmFpcmllcy9jbGFzcy5teXNxbC5waHA8L2I+IG9uIGxpbmUgPGI+Njg8L2I+PGJyIC8+CjxiciAvPgo8Yj5XYXJuaW5nPC9iPjogIG15c3FsX3F1ZXJ5KCkgWzxhIGhyZWY9J2Z1bmN0aW9uLm15c3FsLXF1ZXJ5Jz5mdW5jdGlvbi5teXNxbC1xdWVyeTwvYT5dOiBBIGxpbmsgdG8gdGhlIHNlcnZlciBjb3VsZCBub3QgYmUgZXN0YWJsaXNoZWQgaW4gPGI+L2hvbWUvYWpheGxvYWQvd3d3L2xpYnJhaXJpZXMvY2xhc3MubXlzcWwucGhwPC9iPiBvbiBsaW5lIDxiPjY4PC9iPjxiciAvPgo8YnIgLz4KPGI+V2FybmluZzwvYj46ICBteXNxbF9xdWVyeSgpIFs8YSBocmVmPSdmdW5jdGlvbi5teXNxbC1xdWVyeSc+ZnVuY3Rpb24ubXlzcWwtcXVlcnk8L2E+XTogQ2FuJ3QgY29ubmVjdCB0byBsb2NhbCBNeVNRTCBzZXJ2ZXIgdGhyb3VnaCBzb2NrZXQgJy92YXIvcnVuL215c3FsZC9teXNxbGQuc29jaycgKDIpIGluIDxiPi9ob21lL2FqYXhsb2FkL3d3dy9saWJyYWlyaWVzL2NsYXNzLm15c3FsLnBocDwvYj4gb24gbGluZSA8Yj42ODwvYj48YnIgLz4KPGJyIC8+CjxiPldhcm5pbmc8L2I+OiAgbXlzcWxfcXVlcnkoKSBbPGEgaHJlZj0nZnVuY3Rpb24ubXlzcWwtcXVlcnknPmZ1bmN0aW9uLm15c3FsLXF1ZXJ5PC9hPl06IEEgbGluayB0byB0aGUgc2VydmVyIGNvdWxkIG5vdCBiZSBlc3RhYmxpc2hlZCBpbiA8Yj4vaG9tZS9hamF4bG9hZC93d3cvbGlicmFpcmllcy9jbGFzcy5teXNxbC5waHA8L2I+IG9uIGxpbmUgPGI+Njg8L2I+PGJyIC8+Cg=="},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){var r=n(4),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i?r.a.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(17)(e))},,,,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(79);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";e.exports=n(82)},function(e,t,n){"use strict";
|
42
|
+
var r=n(109),i=n(110),a=n(111);function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=f(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|h(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|p(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):f(e,t);if("Buffer"===t.type&&a(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function d(e,t){if(u(t),e=s(e,t<0?0:0|p(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|p(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function p(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(r)return Z(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return E(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var a,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(a=n;a<s;a++)if(c(e,a)===c(t,-1===u?0:a-u)){if(-1===u&&(u=a),a-u+1===l)return u*o}else-1!==u&&(a-=a-u),u=-1}else for(n+l>s&&(n=s-l),a=n;a>=0;a--){for(var d=!0,f=0;f<l;f++)if(c(e,a+f)!==c(t,f)){d=!1;break}if(d)return a}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function I(e,t,n,r){return G(Z(t,e.length-n),e,n,r)}function x(e,t,n,r){return G(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function w(e,t,n,r){return x(e,t,n,r)}function T(e,t,n,r){return G(F(t),e,n,r)}function M(e,t,n,r){return G(function(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a,o,s,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(a=e[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return d(null,e)},l.allocUnsafeSlow=function(e){return d(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!l.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},l.byteLength=h,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?C(this,0,e):g.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(a,o),c=this.slice(r,i),u=e.slice(t,n),d=0;d<s;++d)if(c[d]!==u[d]){a=c[d],o=u[d];break}return a<o?-1:o<a?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var a=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return I(this,e,t,n);case"ascii":return x(this,e,t,n);case"latin1":case"binary":return w(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function E(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function N(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function S(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=t;a<n;++a)i+=U(e[a]);return i}function k(e,t,n){for(var r=e.slice(t,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function j(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,i,a){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function O(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function P(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,a){return a||P(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function z(e,t,n,r,a){return a||P(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;n=new l(i,void 0);for(var a=0;a<i;++a)n[a]=this[a+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||j(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||j(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||j(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||j(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},l.prototype.readInt8=function(e,t){return t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||j(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||j(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||j(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||j(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return z(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return z(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,a=r-n;if(this===e&&n<t&&t<r)for(i=a-1;i>=0;--i)e[i+t]=this[i+n];else if(a<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{var o=l.isBuffer(e)?e:Z(new l(e,r).toString()),s=o.length;for(a=0;a<n-t;++a)this[a+t]=o[a%s]}return this};var _=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function Z(e,t){var n;t=t||1/0;for(var r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function F(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(_,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function G(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(11))},function(e,t){},function(e,t){},function(e,t,n){"use strict";let r,i,a=n(9);class o extends a{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new r(new i,this,e).stringify()}}o.registerLazyResult=e=>{r=e},o.registerProcessor=e=>{i=e},e.exports=o,o.default=o},function(e,t,n){"use strict";let r=n(63);class i{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new r(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}e.exports=i,i.default=i},function(e,t,n){"use strict";let r=n(9),i=n(114),a=n(21);function o(e,t){let n=new a(e,t),r=new i(n);try{r.parse()}catch(e){throw e}return r.root}e.exports=o,o.default=o,r.registerParse(o)},function(e,t,n){"use strict";let r=n(9);class i extends r{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=i,i.default=i,r.registerAtRule(i)},function(e,t,n){"use strict";let r=n(9),i=n(64);class a extends r{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}e.exports=a,a.default=a,r.registerRule(a)},function(e,t,n){"use strict";var r=n(81),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=p(n);i&&i!==h&&e(t,i,r)}var o=u(n);d&&(o=o.concat(d(n)));for(var s=l(t),g=l(n),m=0;m<o.length;++m){var y=o[m];if(!(a[y]||r&&r[y]||g&&g[y]||s&&s[y])){var v=f(n,y);try{c(t,y,v)}catch(e){}}}}return t}},function(e,t,n){const r=n(92),i=n(103),{isPlainObject:a}=n(104),o=n(105),s=n(106),{parse:l}=n(107),c=["img","audio","video","picture","svg","object","map","iframe","embed"],u=["script","style"];function d(e,t){e&&Object.keys(e).forEach((function(n){t(e[n],n)}))}function f(e,t){return{}.hasOwnProperty.call(e,t)}function p(e,t){const n=[];return d(e,(function(e){t(e)&&n.push(e)})),n}e.exports=g;const h=/^[^\0\t\n\f\r /<=>]+$/;function g(e,t,n){if(null==e)return"";let y="",v="";function b(e,t){const n=this;this.tag=e,this.attribs=t||{},this.tagPosition=y.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){if(S.length){S[S.length-1].text+=n.text}},this.updateParentNodeMediaChildren=function(){if(S.length&&c.includes(this.tag)){S[S.length-1].mediaChildren.push(this.tag)}}}(t=Object.assign({},g.defaults,t)).parser=Object.assign({},m,t.parser),u.forEach((function(e){t.allowedTags&&t.allowedTags.indexOf(e)>-1&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)}));const I=t.nonTextTags||["script","style","textarea","option"];let x,w;t.allowedAttributes&&(x={},w={},d(t.allowedAttributes,(function(e,t){x[t]=[];const n=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(i(e).replace(/\\\*/g,".*")):x[t].push(e)})),n.length&&(w[t]=new RegExp("^("+n.join("|")+")$"))})));const T={},M={},A={};d(t.allowedClasses,(function(e,t){x&&(f(x,t)||(x[t]=[]),x[t].push("class")),T[t]=[],A[t]=[];const n=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(i(e).replace(/\\\*/g,".*")):e instanceof RegExp?A[t].push(e):T[t].push(e)})),n.length&&(M[t]=new RegExp("^("+n.join("|")+")$"))}));const C={};let E,N,S,k,j,D,L;d(t.transformTags,(function(e,t){let n;"function"==typeof e?n=e:"string"==typeof e&&(n=g.simpleTransform(e)),"*"===t?E=n:C[t]=n}));let O=!1;R();const P=new r.Parser({onopentag:function(e,n){if(t.enforceHtmlBoundary&&"html"===e&&R(),D)return void L++;const r=new b(e,n);S.push(r);let i=!1;const c=!!r.text;let u;if(f(C,e)&&(u=C[e](e,n),r.attribs=n=u.attribs,void 0!==u.text&&(r.innerText=u.text),e!==u.tagName&&(r.name=e=u.tagName,j[N]=u.tagName)),E&&(u=E(e,n),r.attribs=n=u.attribs,e!==u.tagName&&(r.name=e=u.tagName,j[N]=u.tagName)),(t.allowedTags&&-1===t.allowedTags.indexOf(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(const t in e)if(f(e,t))return!1;return!0}(k)||null!=t.nestingLimit&&N>=t.nestingLimit)&&(i=!0,k[N]=!0,"discard"===t.disallowedTagsMode&&-1!==I.indexOf(e)&&(D=!0,L=1),k[N]=!0),N++,i){if("discard"===t.disallowedTagsMode)return;v=y,y=""}y+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(r.innerText=""),(!x||f(x,e)||x["*"])&&d(n,(function(n,i){if(!h.test(i))return void delete r.attribs[i];let c,u=!1;if(!x||f(x,e)&&-1!==x[e].indexOf(i)||x["*"]&&-1!==x["*"].indexOf(i)||f(w,e)&&w[e].test(i)||w["*"]&&w["*"].test(i))u=!0;else if(x&&x[e])for(const t of x[e])if(a(t)&&t.name&&t.name===i){u=!0;let e="";if(!0===t.multiple){const r=n.split(" ");for(const n of r)-1!==t.values.indexOf(n)&&(""===e?e=n:e+=" "+n)}else t.values.indexOf(n)>=0&&(e=n);n=e}if(u){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(i)&&_(e,n))return void delete r.attribs[i];if("script"===e&&"src"===i){let e=!0;try{const r=new URL(n);if(t.allowedScriptHostnames||t.allowedScriptDomains){const n=(t.allowedScriptHostnames||[]).find((function(e){return e===r.hostname})),i=(t.allowedScriptDomains||[]).find((function(e){return r.hostname===e||r.hostname.endsWith("."+e)}));e=n||i}}catch(t){e=!1}if(!e)return void delete r.attribs[i]}if("iframe"===e&&"src"===i){let e=!0;try{if((n=n.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let r="relative://relative-site";for(let e=0;e<100;e++)r+="/"+e;const i=new URL(n,r);if(i&&"relative-site"===i.hostname&&"relative:"===i.protocol)e=f(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const n=(t.allowedIframeHostnames||[]).find((function(e){return e===i.hostname})),r=(t.allowedIframeDomains||[]).find((function(e){return i.hostname===e||i.hostname.endsWith("."+e)}));e=n||r}}catch(t){e=!1}if(!e)return void delete r.attribs[i]}if("srcset"===i)try{if(c=s(n),c.forEach((function(e){_("srcset",e.url)&&(e.evil=!0)})),c=p(c,(function(e){return!e.evil})),!c.length)return void delete r.attribs[i];n=p(c,(function(e){return!e.evil})).map((function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")})).join(", "),r.attribs[i]=n}catch(e){return void delete r.attribs[i]}if("class"===i){const t=T[e],a=T["*"],s=M[e],l=A[e],c=[s,M["*"]].concat(l).filter((function(e){return e}));if(!(n=U(n,t&&a?o(t,a):t||a,c)).length)return void delete r.attribs[i]}if("style"===i)try{if(0===(n=function(e){return e.nodes[0].nodes.reduce((function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e}),[]).join(";")}(function(e,t){if(!t)return e;const n=e.nodes[0];let r;r=t[n.selector]&&t["*"]?o(t[n.selector],t["*"]):t[n.selector]||t["*"];r&&(e.nodes[0].nodes=n.nodes.reduce(function(e){return function(t,n){if(f(e,n.prop)){e[n.prop].some((function(e){return e.test(n.value)}))&&t.push(n)}return t}}(r),[]));return e}(l(e+" {"+n+"}"),t.allowedStyles))).length)return void delete r.attribs[i]}catch(e){return void delete r.attribs[i]}y+=" "+i,n&&n.length&&(y+='="'+z(n,!0)+'"')}else delete r.attribs[i]})),-1!==t.selfClosing.indexOf(e)?y+=" />":(y+=">",!r.innerText||c||t.textFilter||(y+=z(r.innerText),O=!0)),i&&(y=v+z(y),v="")},ontext:function(e){if(D)return;const n=S[S.length-1];let r;if(n&&(r=n.tag,e=void 0!==n.innerText?n.innerText:e),"discard"!==t.disallowedTagsMode||"script"!==r&&"style"!==r){const n=z(e,!1);t.textFilter&&!O?y+=t.textFilter(n,r):O||(y+=n)}else y+=e;if(S.length){S[S.length-1].text+=e}},onclosetag:function(e){if(D){if(L--,L)return;D=!1}const n=S.pop();if(!n)return;D=!!t.enforceHtmlBoundary&&"html"===e,N--;const r=k[N];if(r){if(delete k[N],"discard"===t.disallowedTagsMode)return void n.updateParentNodeText();v=y,y=""}j[N]&&(e=j[N],delete j[N]),t.exclusiveFilter&&t.exclusiveFilter(n)?y=y.substr(0,n.tagPosition):(n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1===t.selfClosing.indexOf(e)?(y+="</"+e+">",r&&(y=v+z(y),v=""),O=!1):r&&(y=v,v=""))}},t.parser);return P.write(e),P.end(),y;function R(){y="",N=0,S=[],k={},j={},D=!1,L=0}function z(e,n){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),n&&(e=e.replace(/"/g,"""))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),n&&(e=e.replace(/"/g,""")),e}function _(e,n){const r=(n=(n=n.replace(/[\x00-\x20]+/g,"")).replace(/<!--.*?-->/g,"")).match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!r)return!!n.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const i=r[1].toLowerCase();return f(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(i):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(i)}function U(e,t,n){return t?(e=e.split(/\s+/)).filter((function(e){return-1!==t.indexOf(e)||n.some((function(t){return t.test(e)}))})).join(" "):e}}const m={decodeEntities:!0};g.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1},g.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,i){let a;if(n)for(a in t)i[a]=t[a];else i=t;return{tagName:e,attribs:i}}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s}));var r=n(3),i=n.n(r),a=n(69);function o(e,t,n,r,a){const o=e.originalEvent.clipboardData,l=o.items&&o.items.length>0&&o.items[o.items.length-1].getAsFile();if(l)!function(e,t,n,r){e.preventDefault(),r.indexOf(t.type)>=0&&n({data:t,type:t.type}).then(e=>{const t=`<img src="${e}"/>`;window.document.execCommand("insertHTML",!1,t)})}(e,l,t,r);else{const l=o.getData("text/html");l?function(e,t,n,r,i,a,o){e.preventDefault(),window.document.execCommand("insertHTML",!1,o(n)),s(t,r,i,a)}(e,i()(e.currentTarget),l,t,n,r,a):function(e,t,n,r){s(e,t,n,r)}(i()(e.currentTarget),t,n,r)}}function s(t,n,r,i){setTimeout(()=>Promise.all(function(t,n,r){t.find(n).remove();const i=t.find('img[src^="data:image/"]').toArray().map(t=>Object.assign(Object.assign({},function(t){if(!t)return null;const n=t.match(/^data:([A-Za-z-+/]+);base64,(.+)$/);if(3!==n.length)return null;return{type:n[1],data:e.from(n[2],"base64")}}(t.getAttribute("src"))),{el:t}));i.filter(({type:e})=>-1===r.indexOf(e)&&"image/svg+xml"!==e).forEach(({el:e})=>e.remove());const o=i.filter(({type:e})=>r.indexOf(e)>=0);return o.forEach(({el:e})=>e.setAttribute("src",a.a)),o}(t,r,i).map(e=>n(e).then(t=>e.el.setAttribute("src",t)).catch(t=>{throw e.el.remove(),t}))).then(()=>t.trigger("input")),0)}}).call(this,n(30).Buffer)},function(e,t,n){!function(){var t=n(3),r="mathquill-block-id",i=Math.min,a=Math.max;if(!t)throw"MathQuill requires jQuery 1.5.2+ to be loaded first";function o(){}var s=[].slice;function l(e){var t=e.length-1;return function(){var n=s.call(arguments,0,t),r=s.call(arguments,t);return e.apply(this,n.concat([r]))}}var c=l((function(e,t){return l((function(n,r){if(e in n)return n[e].apply(n,t.concat(r))}))}));function u(e){return l((function(t,n){"function"!=typeof t&&(t=c(t));return e.call(this,(function(e){return t.apply(e,[e].concat(n))}))}))}function d(e){var t=s.call(arguments,1);return function(){return e.apply(this,t)}}function f(e,t){if(!t)throw new Error("prayer failed: "+e)}var p=function(e,t,n){function r(e){return"object"==typeof e}function i(e){return"function"==typeof e}function a(){}return function e(n,o){function s(){var e=new l;return i(e.init)&&e.init.apply(e,arguments),e}function l(){}void 0===o&&(o=n,n=Object),s.Bare=l;var c,u=a.prototype=n.prototype,d=l.prototype=s.prototype=s.p=new a;return d.constructor=s,s.extend=function(t){return e(s,t)},(s.open=function(e){if(c={},i(e)?c=e.call(s,d,u,s,n):r(e)&&(c=e),r(c))for(var a in c)t.call(c,a)&&(d[a]=c[a]);return i(d.init)||(d.init=n),s})(o)}}(0,{}.hasOwnProperty),h=-1;function g(e){f("a direction was passed",e===h||1===e)}var m=p(t,(function(e){e.insDirOf=function(e,t){return e===h?this.insertBefore(t.first()):this.insertAfter(t.last())},e.insAtDirEnd=function(e,t){return e===h?this.prependTo(t):this.appendTo(t)}})),y=p((function(e){e.parent=0,e[h]=0,e[1]=0,e.init=function(e,t,n){this.parent=e,this[h]=t,this[1]=n},this.copy=function(e){return y(e.parent,e[h],e[1])}})),v=p((function(e){e[h]=0,e[1]=0,e.parent=0;var t=0;this.byId={},e.init=function(){this.id=t+=1,v.byId[this.id]=this,this.ends={},this.ends[h]=0,this.ends[1]=0},e.dispose=function(){delete v.byId[this.id]},e.toString=function(){return"{{ MathQuill Node #"+this.id+" }}"},e.jQ=m(),e.jQadd=function(e){return this.jQ=this.jQ.add(e)},e.jQize=function(e){e=m(e||this.html());function t(e){if(e.getAttribute){var n=e.getAttribute("mathquill-command-id"),r=e.getAttribute("mathquill-block-id");n&&v.byId[n].jQadd(e),r&&v.byId[r].jQadd(e)}for(e=e.firstChild;e;e=e.nextSibling)t(e)}for(var n=0;n<e.length;n+=1)t(e[n]);return e},e.createDir=function(e,t){g(e);return this.jQize(),this.jQ.insDirOf(e,t.jQ),t[e]=this.adopt(t.parent,t[h],t[1]),this},e.createLeftOf=function(e){return this.createDir(h,e)},e.selectChildren=function(e,t){return M(e,t)},e.bubble=u((function(e){for(var t=this;t;t=t.parent){if(!1===e(t))break}return this})),e.postOrder=u((function(e){return function t(n){n.eachChild(t),e(n)}(this),this})),e.isEmpty=function(){return 0===this.ends[h]&&0===this.ends[1]},e.isStyleBlock=function(){return!1},e.children=function(){return I(this.ends[h],this.ends[1])},e.eachChild=function(){var e=this.children();return e.each.apply(e,arguments),this},e.foldChildren=function(e,t){return this.children().fold(e,t)},e.withDirAdopt=function(e,t,n,r){return I(this,this).withDirAdopt(e,t,n,r),this},e.adopt=function(e,t,n){return I(this,this).adopt(e,t,n),this},e.disown=function(){return I(this,this).disown(),this},e.remove=function(){return this.jQ.remove(),this.postOrder("dispose"),this.disown()}}));function b(e,t,n){f("a parent is always present",e),f("leftward is properly set up",t?t[1]===n&&t.parent===e:e.ends[h]===n),f("rightward is properly set up",n?n[h]===t&&n.parent===e:e.ends[1]===t)}var I=p((function(e){e.init=function(e,t,n){if(void 0===n&&(n=h),g(n),f("no half-empty fragments",!e==!t),this.ends={},e){f("withDir is passed to Fragment",e instanceof v),f("oppDir is passed to Fragment",t instanceof v),f("withDir and oppDir have the same parent",e.parent===t.parent),this.ends[n]=e,this.ends[-n]=t;var r=this.fold([],(function(e,t){return e.push.apply(e,t.jQ.get()),e}));this.jQ=this.jQ.add(r)}},e.jQ=m(),e.withDirAdopt=function(e,t,n,r){return e===h?this.adopt(t,n,r):this.adopt(t,r,n)},e.adopt=function(e,t,n){b(e,t,n);this.disowned=!1;var r=this.ends[h];if(!r)return this;var i=this.ends[1];return t||(e.ends[h]=r),n?n[h]=i:e.ends[1]=i,this.ends[1][1]=n,this.each((function(n){n[h]=t,n.parent=e,t&&(t[1]=n),t=n})),this},e.disown=function(){var e=this.ends[h];if(!e||this.disowned)return this;this.disowned=!0;var t=this.ends[1],n=e.parent;return b(n,e[h],e),b(n,t,t[1]),e[h]?e[h][1]=t[1]:n.ends[h]=t[1],t[1]?t[1][h]=e[h]:n.ends[1]=e[h],this},e.remove=function(){return this.jQ.remove(),this.each("postOrder","dispose"),this.disown()},e.each=u((function(e){var t=this.ends[h];if(!t)return this;for(;t!==this.ends[1][1];t=t[1]){if(!1===e(t))break}return this})),e.fold=function(e,t){return this.each((function(n){e=t.call(this,e,n)})),e}})),x={},w={},T=p(y,(function(e){e.init=function(e,t){this.parent=e,this.options=t;var n=this.jQ=this._jQ=m('<span class="mq-cursor">​</span>');this.blink=function(){n.toggleClass("mq-blink")},this.upDownCache={}},e.show=function(){return this.jQ=this._jQ.removeClass("mq-blink"),"intervalId"in this?clearInterval(this.intervalId):(this[1]?this.selection&&this.selection.ends[h][h]===this[h]?this.jQ.insertBefore(this.selection.jQ):this.jQ.insertBefore(this[1].jQ.first()):this.jQ.appendTo(this.parent.jQ),this.parent.focus()),this.intervalId=setInterval(this.blink,500),this},e.hide=function(){return"intervalId"in this&&clearInterval(this.intervalId),delete this.intervalId,this.jQ.detach(),this.jQ=m(),this},e.withDirInsertAt=function(e,t,n,r){var i=this.parent;this.parent=t,this[e]=n,this[-e]=r,i!==t&&i.blur&&i.blur(this)},e.insDirOf=function(e,t){return g(e),this.jQ.insDirOf(e,t.jQ),this.withDirInsertAt(e,t.parent,t[e],t),this.parent.jQ.addClass("mq-hasCursor"),this},e.insLeftOf=function(e){return this.insDirOf(h,e)},e.insRightOf=function(e){return this.insDirOf(1,e)},e.insAtDirEnd=function(e,t){return g(e),this.jQ.insAtDirEnd(e,t.jQ),this.withDirInsertAt(e,t,0,t.ends[e]),t.focus(),this},e.insAtLeftEnd=function(e){return this.insAtDirEnd(h,e)},e.insAtRightEnd=function(e){return this.insAtDirEnd(1,e)},e.jumpUpDown=function(e,t){this.upDownCache[e.id]=y.copy(this);var n=this.upDownCache[t.id];if(n)n[1]?this.insLeftOf(n[1]):this.insAtRightEnd(n.parent);else{var r=this.offset().left;t.seek(r,this)}},e.offset=function(){var e=this.jQ.removeClass("mq-cursor").offset();return this.jQ.addClass("mq-cursor"),e},e.unwrapGramp=function(){var e=this.parent.parent,t=e.parent,n=e[1],r=e[h];if(e.disown().eachChild((function(i){i.isEmpty()||(i.children().adopt(t,r,n).each((function(t){t.jQ.insertBefore(e.jQ.first())})),r=i.ends[1])})),!this[1])if(this[h])this[1]=this[h][1];else for(;!this[1];){if(this.parent=this.parent[1],!this.parent){this[1]=e[1],this.parent=t;break}this[1]=this.parent.ends[h]}this[1]?this.insLeftOf(this[1]):this.insAtRightEnd(t),e.jQ.remove(),e[h].siblingDeleted&&e[h].siblingDeleted(this.options,1),e[1].siblingDeleted&&e[1].siblingDeleted(this.options,h)},e.startSelection=function(){for(var e=this.anticursor=y.copy(this),t=e.ancestors={},n=e;n.parent;n=n.parent)t[n.parent.id]=n},e.endSelection=function(){delete this.anticursor},e.select=function(){var e=this.anticursor;if(this[h]===e[h]&&this.parent===e.parent)return!1;for(var t=this;t.parent;t=t.parent)if(t.parent.id in e.ancestors){var n=t.parent;break}f("cursor and anticursor in the same tree",n);var r,i,a=e.ancestors[n.id],o=1;if(t[h]!==a)for(var s=t;s;s=s[1])if(s[1]===a[1]){o=h,r=t,i=a;break}return 1===o&&(r=a,i=t),r instanceof y&&(r=r[1]),i instanceof y&&(i=i[h]),this.hide().selection=n.selectChildren(r,i),this.insDirOf(o,this.selection.ends[o]),this.selectionChanged(),!0},e.clearSelection=function(){return this.selection&&(this.selection.clear(),delete this.selection,this.selectionChanged()),this},e.deleteSelection=function(){this.selection&&(this[h]=this.selection.ends[h][h],this[1]=this.selection.ends[1][1],this.selection.remove(),this.selectionChanged(),delete this.selection)},e.replaceSelection=function(){var e=this.selection;return e&&(this[h]=e.ends[h][h],this[1]=e.ends[1][1],delete this.selection),e}})),M=p(I,(function(e,t){e.init=function(){t.init.apply(this,arguments),this.jQ=this.jQ.wrapAll('<span class="mq-selection"></span>').parent()},e.adopt=function(){return this.jQ.replaceWith(this.jQ=this.jQ.children()),t.adopt.apply(this,arguments)},e.clear=function(){return this.jQ.replaceWith(this.jQ[0].childNodes),this},e.join=function(e){return this.fold("",(function(t,n){return t+n[e]()}))}})),A=p((function(e){e.init=function(e,t,n){this.id=e.id,this.data={},this.root=e,this.container=t,this.options=n,e.controller=this,this.cursor=e.cursor=T(e,n)},e.handle=function(e,t){var n=this.options.handlers;if(n&&n.fns[e]){var r=n.APIClasses[this.KIND_OF_MQ](this);t===h||1===t?n.fns[e](t,r):n.fns[e](r)}};var t=[];this.onNotify=function(e){t.push(e)},e.notify=function(){for(var e=0;e<t.length;e+=1)t[e].apply(this.cursor,arguments);return this}})),C={},E=p(),N={},S=p(),k={};function j(){window.console&&console.warn('You are using the MathQuill API without specifying an interface version, which will fail in v1.0.0. Easiest fix is to do the following before doing anything else:\n\n MathQuill = MathQuill.getInterface(1);\n // now MathQuill.MathField() works like it used to\n\nSee also the "`dev` branch (2014–2015) → v0.10.0 Migration Guide" at\n https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide')}function D(e){return j(),Be(e)}D.prototype=S.p,D.VERSION="v0.10.5",D.interfaceVersion=function(e){if(1!==e)throw"Only interface version 1 supported. You specified: "+e;return(j=function(){window.console&&console.warn('You called MathQuill.interfaceVersion(1); to specify the interface version, which will fail in v1.0.0. You can fix this easily by doing this before doing anything else:\n\n MathQuill = MathQuill.getInterface(1);\n // now MathQuill.MathField() works like it used to\n\nSee also the "`dev` branch (2014–2015) → v0.10.0 Migration Guide" at\n https://github.com/mathquill/mathquill/wiki/%60dev%60-branch-(2014%E2%80%932015)-%E2%86%92-v0.10.0-Migration-Guide')})(),D},D.getInterface=P;var L=P.MIN=1,O=P.MAX=2;function P(e){if(!(L<=e&&e<=O))throw"Only interface versions between "+L+" and "+O+" supported. You specified: "+e;function n(e){if(!e||!e.nodeType)return null;var t=m(e).children(".mq-root-block").attr(r),n=t&&v.byId[t].controller;return n?i[n.KIND_OF_MQ](n):null}var i={};function a(e,t){for(var n in t&&t.handlers&&(t.handlers={fns:t.handlers,APIClasses:i}),t)if(t.hasOwnProperty(n)){var r=t[n],a=N[n];e[n]=a?a(r):r}}n.L=h,n.R=1,n.saneKeyboardEvents=Z,n.config=function(e){return a(E.p,e),this},n.registerEmbed=function(e,t){if(!/^[a-z][a-z0-9]*$/i.test(e))throw"Embed name must start with letter and be only letters and digits";k[e]=t};var s=i.AbstractMathQuill=p(S,(function(e){e.init=function(e){this.__controller=e,this.__options=e.options,this.id=e.id,this.data=e.data},e.__mathquillify=function(e){var t=this.__controller,n=t.root,i=t.container;t.createTextarea();var a=i.addClass(e).contents().detach();n.jQ=m('<span class="mq-root-block"/>').attr(r,n.id).appendTo(i),this.latex(a.text()),this.revert=function(){return i.empty().unbind(".mathquill").removeClass("mq-editable-field mq-math-mode mq-text-mode").append(a)}},e.config=function(e){return a(this.__options,e),this},e.el=function(){return this.__controller.container[0]},e.text=function(){return this.__controller.exportText()},e.latex=function(e){return arguments.length>0?(this.__controller.renderLatexMath(e),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this):this.__controller.exportLatex()},e.html=function(){return this.__controller.root.jQ.html().replace(/ mathquill-(?:command|block)-id="?\d+"?/g,"").replace(/<span class="?mq-cursor( mq-blink)?"?>.?<\/span>/i,"").replace(/ mq-hasCursor|mq-hasCursor ?/,"").replace(/ class=(""|(?= |>))/g,"")},e.reflow=function(){return this.__controller.root.postOrder("reflow"),this}}));for(var l in n.prototype=s.prototype,i.EditableField=p(s,(function(e,n){e.__mathquillify=function(){return n.__mathquillify.apply(this,arguments),this.__controller.editable=!0,this.__controller.delegateMouseEvents(),this.__controller.editablesTextareaEvents(),this},e.focus=function(){return this.__controller.textarea.focus(),this},e.blur=function(){return this.__controller.textarea.blur(),this},e.write=function(e){return this.__controller.writeLatex(e),this.__controller.scrollHoriz(),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this},e.empty=function(){var e=this.__controller.root,t=this.__controller.cursor;return e.eachChild("postOrder","dispose"),e.ends[h]=e.ends[1]=0,e.jQ.empty(),delete t.selection,t.insAtRightEnd(e),this},e.cmd=function(e){var t=this.__controller.notify(),n=t.cursor;if(/^\\[a-z]+$/i.test(e)){e=e.slice(1);var r=x[e]||Ue[e];r&&(e=r(e),n.selection&&e.replaces(n.replaceSelection()),e.createLeftOf(n.show()),this.__controller.scrollHoriz())}else n.parent.write(n,e);return t.blurred&&n.hide().parent.blur(),this},e.select=function(){var e=this.__controller;for(e.notify("move").cursor.insAtRightEnd(e.root);e.cursor[h];)e.selectLeft();return this},e.clearSelection=function(){return this.__controller.cursor.clearSelection(),this},e.moveToDirEnd=function(e){return this.__controller.notify("move").cursor.insAtDirEnd(e,this.__controller.root),this},e.moveToLeftEnd=function(){return this.moveToDirEnd(h)},e.moveToRightEnd=function(){return this.moveToDirEnd(1)},e.keystroke=function(e){e=e.replace(/^\s+|\s+$/g,"").split(/\s+/);for(var t=0;t<e.length;t+=1)this.__controller.keystroke(e[t],{preventDefault:o});return this},e.typedText=function(e){for(var t=0;t<e.length;t+=1)this.__controller.typedText(e.charAt(t));return this},e.dropEmbedded=function(e,t,n){var r=e-m(window).scrollLeft(),i=t-m(window).scrollTop(),a=document.elementFromPoint(r,i);this.__controller.seek(m(a),e,t),_e().setOptions(n).createLeftOf(this.__controller.cursor)},e.clickAt=function(e,n,r){r=r||document.elementFromPoint(e,n);var i=this.__controller,a=i.root;return t.contains(a.jQ[0],r)||(r=a.jQ[0]),i.seek(m(r),e+pageXOffset,n+pageYOffset),i.blurred&&this.focus(),this},e.ignoreNextMousedown=function(e){return this.__controller.cursor.options.ignoreNextMousedown=e,this}})),n.EditableField=function(){throw"wtf don't call me, I'm 'abstract'"},n.EditableField.prototype=i.EditableField.prototype,C)!function(t,r){var a=i[t]=r(i);n[t]=function(r,i){var o=n(r);if(o instanceof a||!r||!r.nodeType)return o;var s=A(a.RootBlock(),m(r),E());return s.KIND_OF_MQ=t,a(s).__mathquillify(i,e)},n[t].prototype=a.prototype}(l,C[l]);return n}D.noConflict=function(){return window.MathQuill=R,D};var R=window.MathQuill;function z(e){for(var t="moveOutOf deleteOutOf selectOutOf upOutOf downOutOf".split(" "),n=0;n<t.length;n+=1)!function(t){e[t]=function(e){this.controller.handle(t,e)}}(t[n]);e.reflow=function(){this.controller.handle("reflow"),this.controller.handle("edited"),this.controller.handle("edit")}}window.MathQuill=D;var _,U=p((function(e,t,n){function r(e,t){throw"Parse Error: "+t+" at "+(e=e?"'"+e+"'":"EOF")}e.init=function(e){this._=e},e.parse=function(e){return this.skip(o)._(""+e,(function(e,t){return t}),r)},e.or=function(e){f("or is passed a parser",e instanceof n);var t=this;return n((function(n,r,i){return t._(n,r,(function(t){return e._(n,r,i)}))}))},e.then=function(e){var t=this;return n((function(r,i,a){return t._(r,(function(t,r){var o=e instanceof n?e:e(r);return f("a parser is returned",o instanceof n),o._(t,i,a)}),a)}))},e.many=function(){var e=this;return n((function(t,n,r){for(var i=[];e._(t,a,o););return n(t,i);function a(e,n){return t=e,i.push(n),!0}function o(){return!1}}))},e.times=function(e,t){arguments.length<2&&(t=e);var r=this;return n((function(n,i,a){for(var o,s=[],l=!0,c=0;c<e;c+=1)if(!(l=r._(n,u,d)))return a(n,o);for(;c<t&&l;c+=1)l=r._(n,u,f);return i(n,s);function u(e,t){return s.push(t),n=e,!0}function d(e,t){return o=t,n=e,!1}function f(e,t){return!1}}))},e.result=function(e){return this.then(a(e))},e.atMost=function(e){return this.times(0,e)},e.atLeast=function(e){var t=this;return t.times(e).then((function(e){return t.many().map((function(t){return e.concat(t)}))}))},e.map=function(e){return this.then((function(t){return a(e(t))}))},e.skip=function(e){return this.then((function(t){return e.result(t)}))};this.string=function(e){var t=e.length,r="expected '"+e+"'";return n((function(n,i,a){var o=n.slice(0,t);return o===e?i(n.slice(t),o):a(n,r)}))};var i=this.regex=function(e){f("regexp parser is anchored","^"===e.toString().charAt(1));var t="expected "+e;return n((function(n,r,i){var a=e.exec(n);if(a){var o=a[0];return r(n.slice(o.length),o)}return i(n,t)}))},a=n.succeed=function(e){return n((function(t,n){return n(t,e)}))},o=(n.fail=function(e){return n((function(t,n,r){return r(t,e)}))},n.letter=i(/^[a-z]/i),n.letters=i(/^[a-z]*/i),n.digit=i(/^[0-9]/),n.digits=i(/^[0-9]*/),n.whitespace=i(/^\s+/),n.optWhitespace=i(/^\s*/),n.any=n((function(e,t,n){return e?t(e.slice(1),e.charAt(0)):n(e,"expected any character")})),n.all=n((function(e,t,n){return t("",e)})),n.eof=n((function(e,t,n){return e?n(e,"expected EOF"):t(e,e)})))})),Z=(_={8:"Backspace",9:"Tab",10:"Enter",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Esc",32:"Spacebar",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",45:"Insert",46:"Del",144:"NumLock"},function(e,n){var r,i=null,a=null,s=t(e),l=t(n.container||s),c=o;function u(e){c=e,clearTimeout(r),r=setTimeout(e)}function d(e){u((function(t){c=o,clearTimeout(r),e(t)}))}l.bind("keydown keypress input keyup focusout paste",(function(e){c(e)}));var f=!1;function p(){n.keystroke(function(e){var t,n=e.which||e.keyCode,r=_[n],i=[];return e.ctrlKey&&i.push("Ctrl"),e.originalEvent&&e.originalEvent.metaKey&&i.push("Meta"),e.altKey&&i.push("Alt"),e.shiftKey&&i.push("Shift"),t=r||String.fromCharCode(n),i.length||r?(i.push(t),i.join("-")):t}(i),i)}function h(){if(!("selectionStart"in(e=s[0]))||e.selectionStart===e.selectionEnd){var e,t=s.val();1===t.length?(s.val(""),n.typedText(t)):t&&s[0].select&&s[0].select()}}function g(){var e=s.val();s.val(""),e&&n.paste(e)}return l.bind({keydown:function(e){i=e,a=null,f&&d((function(e){e&&"focusout"===e.type||!s[0].select||s[0].select()})),p()},keypress:function(e){i&&a&&p(),a=e,u(h)},keyup:function(e){i&&!a&&u(h)},focusout:function(){i=a=null},cut:function(){d((function(){n.cut()}))},copy:function(){d((function(){n.copy()}))},paste:function(e){s.focus(),u(g)}}),{select:function(e){c(),c=o,clearTimeout(r),s.val(e),e&&s[0].select&&s[0].select(),f=!!e}}});A.open((function(e,t){e.exportText=function(){return this.root.foldChildren("",(function(e,t){return e+t.text()}))}})),A.open((function(e){e.focusBlurEvents=function(){var e,t=this,n=t.root,r=t.cursor;function i(){clearTimeout(e),r.selection&&r.selection.jQ.addClass("mq-blur"),a()}function a(){r.hide().parent.blur(),t.container.removeClass("mq-focused"),m(window).unbind("blur",i)}t.textarea.focus((function(){t.blurred=!1,clearTimeout(e),t.container.addClass("mq-focused"),r.parent||r.insAtRightEnd(n),r.selection?(r.selection.jQ.removeClass("mq-blur"),t.selectionChanged()):r.show()})).blur((function(){t.blurred=!0,e=setTimeout((function(){n.postOrder("intentionalBlur"),r.clearSelection().endSelection(),a()})),m(window).bind("blur",i)})),t.blurred=!0,r.hide().parent.blur()}})),A.open((function(e){e.keystroke=function(e,t){this.cursor.parent.keystroke(e,t,this)}})),v.open((function(e){e.keystroke=function(e,t,n){var r=n.cursor;switch(e){case"Ctrl-Shift-Backspace":case"Ctrl-Backspace":n.ctrlDeleteDir(h);break;case"Shift-Backspace":case"Backspace":n.backspace();break;case"Esc":case"Tab":return void n.escapeDir(1,e,t);case"Shift-Tab":case"Shift-Esc":return void n.escapeDir(h,e,t);case"End":n.notify("move").cursor.insAtRightEnd(r.parent);break;case"Ctrl-End":n.notify("move").cursor.insAtRightEnd(n.root);break;case"Shift-End":for(;r[1];)n.selectRight();break;case"Ctrl-Shift-End":for(;r[1]||r.parent!==n.root;)n.selectRight();break;case"Home":n.notify("move").cursor.insAtLeftEnd(r.parent);break;case"Ctrl-Home":n.notify("move").cursor.insAtLeftEnd(n.root);break;case"Shift-Home":for(;r[h];)n.selectLeft();break;case"Ctrl-Shift-Home":for(;r[h]||r.parent!==n.root;)n.selectLeft();break;case"Left":n.moveLeft();break;case"Shift-Left":n.selectLeft();break;case"Ctrl-Left":break;case"Right":n.moveRight();break;case"Shift-Right":n.selectRight();break;case"Ctrl-Right":break;case"Up":n.moveUp();break;case"Down":n.moveDown();break;case"Shift-Up":if(r[h])for(;r[h];)n.selectLeft();else n.selectLeft();case"Shift-Down":if(r[1])for(;r[1];)n.selectRight();else n.selectRight();case"Ctrl-Up":case"Ctrl-Down":break;case"Ctrl-Shift-Del":case"Ctrl-Del":n.ctrlDeleteDir(1);break;case"Shift-Del":case"Del":n.deleteForward();break;case"Meta-A":case"Ctrl-A":for(n.notify("move").cursor.insAtRightEnd(n.root);r[h];)n.selectLeft();break;default:return}t.preventDefault(),n.scrollHoriz()},e.moveOutOf=e.moveTowards=e.deleteOutOf=e.deleteTowards=e.unselectInto=e.selectOutOf=e.selectTowards=function(){f("overridden or never called on this node")}})),A.open((function(e){function t(e,t){var n=e.notify("upDown").cursor,r=t+"Into",i=t+"OutOf";return n[1][r]?n.insAtLeftEnd(n[1][r]):n[h][r]?n.insAtRightEnd(n[h][r]):n.parent.bubble((function(e){var t=e[i];if(t&&("function"==typeof t&&(t=e[i](n)),t instanceof v&&n.jumpUpDown(e,t),!0!==t))return!1})),e}this.onNotify((function(e){"move"!==e&&"upDown"!==e||this.show().clearSelection()})),e.escapeDir=function(e,t,n){g(e);var r=this.cursor;if(r.parent!==this.root&&n.preventDefault(),r.parent!==this.root)return r.parent.moveOutOf(e,r),this.notify("move")},N.leftRightIntoCmdGoes=function(e){if(e&&"up"!==e&&"down"!==e)throw'"up" or "down" required for leftRightIntoCmdGoes option, got "'+e+'"';return e},e.moveDir=function(e){g(e);var t=this.cursor,n=t.options.leftRightIntoCmdGoes;return t.selection?t.insDirOf(e,t.selection.ends[e]):t[e]?t[e].moveTowards(e,t,n):t.parent.moveOutOf(e,t,n),this.notify("move")},e.moveLeft=function(){return this.moveDir(h)},e.moveRight=function(){return this.moveDir(1)},e.moveUp=function(){return t(this,"up")},e.moveDown=function(){return t(this,"down")},this.onNotify((function(e){"upDown"!==e&&(this.upDownCache={})})),this.onNotify((function(e){"edit"===e&&this.show().deleteSelection()})),e.deleteDir=function(e){g(e);var t=this.cursor,n=t.selection;return this.notify("edit"),n||(t[e]?t[e].deleteTowards(e,t):t.parent.deleteOutOf(e,t)),t[h].siblingDeleted&&t[h].siblingDeleted(t.options,1),t[1].siblingDeleted&&t[1].siblingDeleted(t.options,h),t.parent.bubble("reflow"),this},e.ctrlDeleteDir=function(e){g(e);var t=this.cursor;return!t[e]||t.selection?this.deleteDir(e):(this.notify("edit"),e===h?I(t.parent.ends[h],t[h]).remove():I(t[1],t.parent.ends[1]).remove(),t.insAtDirEnd(e,t.parent),t[h].siblingDeleted&&t[h].siblingDeleted(t.options,1),t[1].siblingDeleted&&t[1].siblingDeleted(t.options,h),t.parent.bubble("reflow"),this)},e.backspace=function(){return this.deleteDir(h)},e.deleteForward=function(){return this.deleteDir(1)},this.onNotify((function(e){"select"!==e&&this.endSelection()})),e.selectDir=function(e){var t=this.notify("select").cursor,n=t.selection;g(e),t.anticursor||t.startSelection();var r=t[e];r?n&&n.ends[e]===r&&t.anticursor[-e]!==r?r.unselectInto(e,t):r.selectTowards(e,t):t.parent.selectOutOf(e,t),t.clearSelection(),t.select()||t.show()},e.selectLeft=function(){return this.selectDir(h)},e.selectRight=function(){return this.selectDir(1)}}));var F=function(){function e(e){for(var t=e[0]||V(),n=1;n<e.length;n+=1)e[n].children().adopt(t,t.ends[1],0);return t}var t=U.string,n=U.regex,r=U.letter,i=U.any,a=U.optWhitespace,o=U.succeed,s=U.fail,l=r.map((function(e){return ne(e)})),c=n(/^[^${}\\_^]/).map((function(e){return W(e)})),u=n(/^[^\\a-eg-zA-Z]/).or(t("\\").then(n(/^[a-z]+/i).or(n(/^\s+/).result(" ")).or(i))).then((function(e){var t=x[e];return t?t(e).parser():s("unknown command: \\"+e)})).or(l).or(c),d=t("{").then((function(){return p})).skip(t("}")),f=a.then(d.or(u.map((function(e){var t=V();return e.adopt(t,0,0),t})))),p=f.many().map(e).skip(a),h=t("[").then(f.then((function(e){return"]"!==e.join("latex")?o(e):s()})).many().map(e).skip(a)).skip(t("]")),g=p;return g.block=f,g.optBlock=h,g}();A.open((function(e,t){e.exportLatex=function(){return this.root.latex().replace(/(\\[a-z]+) (?![a-z])/gi,"$1")},e.writeLatex=function(e){var t=this.notify("edit").cursor,n=U.all,r=U.eof,i=F.skip(r).or(n.result(!1)).parse(e);i&&!i.isEmpty()&&(i.children().adopt(t.parent,t[h],t[1]),i.jQize().insertBefore(t.jQ),t[h]=i.ends[1],i.finalizeInsert(t.options,t),i.ends[1][1].siblingCreated&&i.ends[1][1].siblingCreated(t.options,h),i.ends[h][h].siblingCreated&&i.ends[h][h].siblingCreated(t.options,1),t.parent.bubble("reflow"));return this},e.renderLatexMath=function(e){var t=this.root,n=this.cursor,r=U.all,i=U.eof,a=F.skip(i).or(r.result(!1)).parse(e);t.eachChild("postOrder","dispose"),t.ends[h]=t.ends[1]=0,a&&a.children().adopt(t,0,0);var o=t.jQ;if(a){var s=a.join("html");o.html(s),t.jQize(o.children()),t.finalizeInsert(n.options)}else o.empty();delete n.selection,n.insAtRightEnd(t)},e.renderLatexText=function(e){var t=this.root,n=this.cursor;t.jQ.children().slice(1).remove(),t.eachChild("postOrder","dispose"),t.ends[h]=t.ends[1]=0,delete n.selection,n.show().insAtRightEnd(t);var r=U.regex,i=U.string,a=U.eof,o=U.all,s=i("$").then(F).skip(i("$").or(a)).map((function(e){var t=K(n);t.createBlocks();var r=t.ends[h];return e.children().adopt(r,0,0),t})),l=i("\\$").result("$").or(r(/^[^$]/)).map(W),c=s.or(l).many().skip(a).or(o.result(!1)).parse(e);if(c){for(var u=0;u<c.length;u+=1)c[u].adopt(t,t.ends[1],0);t.jQize().appendTo(t.jQ),t.finalizeInsert(n.options)}}})),A.open((function(e){E.p.ignoreNextMousedown=o,e.delegateMouseEvents=function(){var e=this.root.jQ;this.container.bind("mousedown.mathquill",(function(t){var n,i=m(t.target).closest(".mq-root-block"),a=v.byId[i.attr(r)||e.attr(r)].controller,s=a.cursor,l=s.blink,c=a.textareaSpan,u=a.textarea;(t.preventDefault(),t.target.unselectable=!0,s.options.ignoreNextMousedown(t))||(s.options.ignoreNextMousedown=o,a.blurred&&(a.editable||i.prepend(c),u.focus()),s.blink=o,a.seek(m(t.target),t.pageX,t.pageY).cursor.startSelection(),i.mousemove(d),m(t.target.ownerDocument).mousemove(f).mouseup((function e(t){s.blink=l,s.selection||(a.editable?s.show():c.detach()),i.unbind("mousemove",d),m(t.target.ownerDocument).unbind("mousemove",f).unbind("mouseup",e)})));function d(e){n=m(e.target)}function f(e){s.anticursor||s.startSelection(),a.seek(n,e.pageX,e.pageY).cursor.select(),n=void 0}}))}})),A.open((function(e){e.seek=function(e,t,n){var i=this.notify("select").cursor;if(e){var a=e.attr(r)||e.attr("mathquill-command-id");if(!a){var o=e.parent();a=o.attr(r)||o.attr("mathquill-command-id")}}var s=a?v.byId[a]:this.root;return f("nodeId is the id of some Node that exists",s),i.clearSelection().show(),s.seek(t,i),this.scrollHoriz(),this}})),A.open((function(e){e.scrollHoriz=function(){var e=this.cursor,t=e.selection,n=e.offset();if(n){var r=e.jQ.closest(".mq-editable-field"),i=Number(n.top-r.offset().top+2*e.jQ.height());r.find(".mq-textarea textarea").css("top",i+"px")}var a=this.root.jQ[0].getBoundingClientRect();if(t){var o=t.jQ[0].getBoundingClientRect(),s=o.left-(a.left+20),l=o.right-(a.right-20);if(t.ends[h]===e[1])if(s<0)u=s;else{if(!(l>0))return;if(o.left-l<a.left+20)u=s;else u=l}else if(l>0)u=l;else{if(!(s<0))return;if(o.right-s>a.right-20)u=l;else u=s}}else{var c=e.jQ[0].getBoundingClientRect().left;if(c>a.right-20)var u=c-(a.right-20);else{if(!(c<a.left+20))return;var u=c-(a.left+20)}}this.root.jQ.stop().animate({scrollLeft:"+="+u},100)}})),A.open((function(e){E.p.substituteTextarea=function(){return m("<textarea autocapitalize=off autocomplete=off autocorrect=off spellcheck=false x-palm-disable-ste-all=true />")[0]},e.createTextarea=function(){var e=this.textareaSpan=m('<span class="mq-textarea"></span>'),t=this.options.substituteTextarea();if(!t.nodeType)throw"substituteTextarea() must return a DOM element, got "+t;t=this.textarea=m(t).appendTo(e);var n=this;n.cursor.selectionChanged=function(){n.selectionChanged()}},e.selectionChanged=function(){var e=this;ye(e.container[0]),void 0===e.textareaSelectionTimeout&&(e.textareaSelectionTimeout=setTimeout((function(){e.setTextareaSelection()})))},e.setTextareaSelection=function(){this.textareaSelectionTimeout=void 0;var e="";this.cursor.selection&&(e=this.cursor.selection.join("latex"),this.options.statelessClipboard&&(e="$"+e+"$")),this.selectFn(e)},e.staticMathTextareaEvents=function(){var e=this,n=(e.root,e.cursor),r=e.textarea,i=e.textareaSpan;function a(){i.detach(),e.blurred=!0}this.container.prepend(t('<span class="mq-selectable">').text("$"+e.exportLatex()+"$")),e.blurred=!0,r.bind("cut paste",!1).bind("copy",(function(){e.setTextareaSelection()})).focus((function(){e.blurred=!1})).blur((function(){n.selection&&n.selection.clear(),setTimeout(a)})),e.selectFn=function(e){r.val(e),e&&r.select()}},E.p.substituteKeyboardEvents=Z,e.editablesTextareaEvents=function(){var e=this.textarea,t=this.textareaSpan,n=this.options.substituteKeyboardEvents(e,this);this.selectFn=function(e){n.select(e)},this.container.prepend(t),this.focusBlurEvents()},e.typedText=function(e){if("\n"===e)return this.handle("enter");var t=this.notify().cursor;t.parent.write(t,e),this.scrollHoriz()},e.cut=function(){var e=this,t=e.cursor;t.selection&&setTimeout((function(){e.notify("edit"),t.parent.bubble("reflow")}))},e.copy=function(){this.setTextareaSelection()},e.paste=function(e){this.options.statelessClipboard&&(e="$"===e.slice(0,1)&&"$"===e.slice(-1)?e.slice(1,-1):"\\text{"+e+"}"),this.writeLatex(e).cursor.show()}}));var G=p(v,(function(e,t){e.finalizeInsert=function(e,t){this.postOrder("finalizeTree",e),this.postOrder("contactWeld",t),this.postOrder("blur"),this.postOrder("reflow"),this[1].siblingCreated&&this[1].siblingCreated(e,h),this[h].siblingCreated&&this[h].siblingCreated(e,1),this.bubble("reflow")}})),B=p(G,(function(e,t){e.init=function(e,n,r){t.init.call(this),this.ctrlSeq||(this.ctrlSeq=e),n&&(this.htmlTemplate=n),r&&(this.textTemplate=r)},e.replaces=function(e){e.disown(),this.replacedFragment=e},e.isEmpty=function(){return this.foldChildren(!0,(function(e,t){return e&&t.isEmpty()}))},e.parser=function(){var e=F.block,t=this;return e.times(t.numBlocks()).map((function(e){t.blocks=e;for(var n=0;n<e.length;n+=1)e[n].adopt(t,t.ends[1],0);return t}))},e.createLeftOf=function(e){var n=this.replacedFragment;this.createBlocks(),t.createLeftOf.call(this,e),n&&(n.adopt(this.ends[h],0,0),n.jQ.appendTo(this.ends[h].jQ)),this.finalizeInsert(e.options),this.placeCursor(e)},e.createBlocks=function(){for(var e=this.numBlocks(),t=this.blocks=Array(e),n=0;n<e;n+=1){(t[n]=V()).adopt(this,this.ends[1],0)}},e.placeCursor=function(e){e.insAtRightEnd(this.foldChildren(this.ends[h],(function(e,t){return e.isEmpty()?e:t})))},e.moveTowards=function(e,t,n){var r=n&&this[n+"Into"];t.insAtDirEnd(-e,r||this.ends[-e])},e.deleteTowards=function(e,t){this.isEmpty()?t[e]=this.remove()[e]:this.moveTowards(e,t,null)},e.selectTowards=function(e,t){t[-e]=this,t[e]=this[e]},e.selectChildren=function(){return M(this,this)},e.unselectInto=function(e,t){t.insAtDirEnd(-e,t.anticursor.ancestors[this.id])},e.seek=function(e,t){function n(e){var t={};return t[h]=e.jQ.offset().left,t[1]=t[h]+e.jQ.outerWidth(),t}var r=this,i=n(r);if(e<i[h])return t.insLeftOf(r);if(e>i[1])return t.insRightOf(r);var a=i[h];r.eachChild((function(o){var s=n(o);return e<s[h]?(e-a<s[h]-e?o[h]?t.insAtRightEnd(o[h]):t.insLeftOf(r):t.insAtLeftEnd(o),!1):e>s[1]?void(o[1]?a=s[1]:i[1]-e<e-s[1]?t.insRightOf(r):t.insAtRightEnd(o)):(o.seek(e,t),!1)}))},e.numBlocks=function(){var e=this.htmlTemplate.match(/&\d+/g);return e?e.length:0},e.html=function(){var e=this.blocks,t=" mathquill-command-id="+this.id,n=this.htmlTemplate.match(/<[^<>]+>|[^<>]+/g);f("no unmatched angle brackets",n.join("")===this.htmlTemplate);for(var r=0,i=n[0];i;i=n[r+=1])if("/>"===i.slice(-2))n[r]=i.slice(0,-2)+t+"/>";else if("<"===i.charAt(0)){f("not an unmatched top-level close tag","/"!==i.charAt(1)),n[r]=i.slice(0,-1)+t+">";var a=1;do{f("no missing close tags",i=n[r+=1]),"</"===i.slice(0,2)?a-=1:"<"===i.charAt(0)&&"/>"!==i.slice(-2)&&(a+=1)}while(a>0)}return n.join("").replace(/>&(\d+)/g,(function(t,n){return" mathquill-block-id="+e[n].id+">"+e[n].join("html")}))},e.latex=function(){return this.foldChildren(this.ctrlSeq,(function(e,t){return e+"{"+(t.latex()||" ")+"}"}))},e.textTemplate=[""],e.text=function(){var e=this,t=0;return e.foldChildren(e.textTemplate[t],(function(n,r){t+=1;var i=r.text();return n&&"("===e.textTemplate[t]&&"("===i[0]&&")"===i.slice(-1)?n+i.slice(1,-1)+e.textTemplate[t]:n+r.text()+(e.textTemplate[t]||"")}))}})),Y=p(B,(function(e,t){e.init=function(e,n,r){r||(r=e&&e.length>1?e.slice(1):e),t.init.call(this,e,n,[r])},e.parser=function(){return U.succeed(this)},e.numBlocks=function(){return 0},e.replaces=function(e){e.remove()},e.createBlocks=o,e.moveTowards=function(e,t){t.jQ.insDirOf(e,this.jQ),t[-e]=this,t[e]=this[e]},e.deleteTowards=function(e,t){t[e]=this.remove()[e]},e.seek=function(e,t){e-this.jQ.offset().left<this.jQ.outerWidth()/2?t.insLeftOf(this):t.insRightOf(this)},e.latex=function(){return this.ctrlSeq},e.text=function(){return this.textTemplate},e.placeCursor=o,e.isEmpty=function(){return!0}})),W=p(Y,(function(e,t){e.init=function(e,n){t.init.call(this,e,"<span>"+(n||e)+"</span>")}})),H=p(Y,(function(e,t){e.init=function(e,n,r){t.init.call(this,e,'<span class="mq-binary-operator">'+n+"</span>",r)}})),V=p(G,(function(e,t){e.join=function(e){return this.foldChildren("",(function(t,n){return t+n[e]()}))},e.html=function(){return this.join("html")},e.latex=function(){return this.join("latex")},e.text=function(){return this.ends[h]===this.ends[1]&&0!==this.ends[h]?this.ends[h].text():this.join("text")},e.keystroke=function(e,n,r){return!r.options.spaceBehavesLikeTab||"Spacebar"!==e&&"Shift-Spacebar"!==e?t.keystroke.apply(this,arguments):(n.preventDefault(),void r.escapeDir("Shift-Spacebar"===e?h:1,e,n))},e.moveOutOf=function(e,t,n){!(n&&this.parent[n+"Into"])&&this[e]?t.insAtDirEnd(-e,this[e]):t.insDirOf(e,this.parent)},e.selectOutOf=function(e,t){t.insDirOf(e,this.parent)},e.deleteOutOf=function(e,t){t.unwrapGramp()},e.seek=function(e,t){var n=this.ends[1];if(!n||n.jQ.offset().left+n.jQ.outerWidth()<e)return t.insAtRightEnd(this);if(e<this.ends[h].jQ.offset().left)return t.insAtLeftEnd(this);for(;e<n.jQ.offset().left;)n=n[h];return n.seek(e,t)},e.chToCmd=function(e,t){var n;return e.match(/^[a-eg-zA-Z]$/)?ne(e):/^\d$/.test(e)?ee(e):t&&t.typingSlashWritesDivisionSymbol&&"/"===e?x["÷"](e):t&&t.typingAsteriskWritesTimesSymbol&&"*"===e?x["×"](e):(n=w[e]||x[e])?n(e):W(e)},e.write=function(e,t){var n=this.chToCmd(t,e.options);e.selection&&n.replaces(e.replaceSelection()),n.createLeftOf(e.show())},e.focus=function(){return this.jQ.addClass("mq-hasCursor"),this.jQ.removeClass("mq-empty"),this},e.blur=function(){return this.jQ.removeClass("mq-hasCursor"),this.isEmpty()&&this.jQ.addClass("mq-empty"),this}}));C.StaticMath=function(e){return p(e.AbstractMathQuill,(function(t,n){this.RootBlock=V,t.__mathquillify=function(e,t){return this.config(e),n.__mathquillify.call(this,"mq-math-mode"),this.__controller.delegateMouseEvents(),this.__controller.staticMathTextareaEvents(),this},t.init=function(){n.init.apply(this,arguments),this.__controller.root.postOrder("registerInnerField",this.innerFields=[],e.MathField)},t.latex=function(){var t=n.latex.apply(this,arguments);return arguments.length>0&&this.__controller.root.postOrder("registerInnerField",this.innerFields=[],e.MathField),t}}))};var q=p(V,z);C.MathField=function(e){return p(e.EditableField,(function(e,t){this.RootBlock=q,e.__mathquillify=function(e,n){return this.config(e),n>1&&(this.__controller.root.reflow=o),t.__mathquillify.call(this,"mq-editable-field mq-math-mode"),delete this.__controller.root.reflow,this}}))};var Q=p(v,(function(e,t){function n(e){e.jQ[0].normalize();var t=e.jQ[0].firstChild;if(t){f("only node in TextBlock span is Text node",3===t.nodeType);var n=J(t.data);return n.jQadd(t),e.children().disown(),n.adopt(e,0,0)}}e.ctrlSeq="\\text",e.replaces=function(e){e instanceof I?this.replacedText=e.remove().jQ.text():"string"==typeof e&&(this.replacedText=e)},e.jQadd=function(e){t.jQadd.call(this,e),this.ends[h]&&this.ends[h].jQadd(this.jQ[0].firstChild)},e.createLeftOf=function(e){if(t.createLeftOf.call(this,e),this[1].siblingCreated&&this[1].siblingCreated(e.options,h),this[h].siblingCreated&&this[h].siblingCreated(e.options,1),this.bubble("reflow"),e.insAtRightEnd(this),this.replacedText)for(var n=0;n<this.replacedText.length;n+=1)this.write(e,this.replacedText.charAt(n))},e.parser=function(){var e=this,t=U.string,n=U.regex;return U.optWhitespace.then(t("{")).then(n(/^[^}]*/)).skip(t("}")).map((function(t){return 0===t.length?I():(J(t).adopt(e,0,0),e)}))},e.textContents=function(){return this.foldChildren("",(function(e,t){return e+t.text}))},e.text=function(){return'"'+this.textContents()+'"'},e.latex=function(){var e=this.textContents();return 0===e.length?"":"\\text{"+e.replace(/\\/g,"\\backslash ").replace(/[{}]/g,"\\$&")+"}"},e.html=function(){return'<span class="mq-text-mode" mathquill-command-id='+this.id+">"+this.textContents()+"</span>"},e.moveTowards=function(e,t){t.insAtDirEnd(-e,this)},e.moveOutOf=function(e,t){t.insDirOf(e,this)},e.unselectInto=e.moveTowards,e.selectTowards=B.prototype.selectTowards,e.deleteTowards=B.prototype.deleteTowards,e.selectOutOf=function(e,t){t.insDirOf(e,this)},e.deleteOutOf=function(e,t){this.isEmpty()&&t.insRightOf(this)},e.write=function(e,n){if(e.show().deleteSelection(),"$"!==n)e[h]?e[h].appendText(n):J(n).createLeftOf(e);else if(this.isEmpty())e.insRightOf(this),W("\\$","$").createLeftOf(e);else if(e[1])if(e[h]){var r=Q(),i=this.ends[h];i.disown().jQ.detach(),i.adopt(r,0,0),e.insLeftOf(this),t.createLeftOf.call(r,e)}else e.insLeftOf(this);else e.insRightOf(this)},e.seek=function(e,t){t.hide();var r=n(this),i=this.jQ.width()/this.text.length,a=Math.round((e-this.jQ.offset().left)/i);a<=0?t.insAtLeftEnd(this):a>=r.text.length?t.insAtRightEnd(this):t.insLeftOf(r.splitRight(a));for(var o=e-t.show().offset().left,s=o&&o<0?h:1,l=s;t[s]&&o*l>0;)t[s].moveTowards(s,t),l=o,o=e-t.offset().left;if(s*o<-s*l&&t[-s].moveTowards(-s,t),t.anticursor){if(t.anticursor.parent===this){var c=t[h]&&t[h].text.length;if(this.anticursorPosition===c)t.anticursor=y.copy(t);else{if(this.anticursorPosition<c){var u=t[h].splitRight(this.anticursorPosition);t[h]=u}else u=t[1].splitRight(this.anticursorPosition-c);t.anticursor=y(this,u[h],u)}}}else this.anticursorPosition=t[h]&&t[h].text.length},e.blur=function(e){V.prototype.blur.call(this),e&&(""===this.textContents()?(this.remove(),e[h]===this?e[h]=this[h]:e[1]===this&&(e[1]=this[1])):n(this))},e.focus=V.prototype.focus})),J=p(v,(function(e,t){function n(e,t){return t.charAt(e===h?0:-1+t.length)}e.init=function(e){t.init.call(this),this.text=e},e.jQadd=function(e){this.dom=e,this.jQ=m(e)},e.jQize=function(){return this.jQadd(document.createTextNode(this.text))},e.appendText=function(e){this.text+=e,this.dom.appendData(e)},e.prependText=function(e){this.text=e+this.text,this.dom.insertData(0,e)},e.insTextAtDirEnd=function(e,t){g(t),1===t?this.appendText(e):this.prependText(e)},e.splitRight=function(e){var t=J(this.text.slice(e)).adopt(this.parent,this,this[1]);return t.jQadd(this.dom.splitText(e)),this.text=this.text.slice(0,e),t},e.moveTowards=function(e,t){g(e);var r=n(-e,this.text),i=this[-e];return i?i.insTextAtDirEnd(r,e):J(r).createDir(-e,t),this.deleteTowards(e,t)},e.latex=function(){return this.text},e.deleteTowards=function(e,t){this.text.length>1?1===e?(this.dom.deleteData(0,1),this.text=this.text.slice(1)):(this.dom.deleteData(-1+this.text.length,1),this.text=this.text.slice(0,-1)):(this.remove(),this.jQ.remove(),t[e]=this[e])},e.selectTowards=function(e,t){g(e);var r=t.anticursor,i=n(-e,this.text);if(r[e]===this){var a=J(i).createDir(e,t);r[e]=a,t.insDirOf(e,a)}else{var o=this[-e];if(o)o.insTextAtDirEnd(i,e);else(a=J(i).createDir(-e,t)).jQ.insDirOf(-e,t.selection.jQ);1===this.text.length&&r[-e]===this&&(r[-e]=this[-e])}return this.deleteTowards(e,t)}}));function X(e,t,n){return p(Q,{ctrlSeq:e,htmlTemplate:"<"+t+" "+n+">&0</"+t+">"})}x.text=x.textnormal=x.textrm=x.textup=x.textmd=Q,x.em=x.italic=x.italics=x.emph=x.textit=x.textsl=X("\\textit","i",'class="mq-text-mode"'),x.strong=x.bold=x.textbf=X("\\textbf","b",'class="mq-text-mode"'),x.sf=x.textsf=X("\\textsf","span",'class="mq-sans-serif mq-text-mode"'),x.tt=x.texttt=X("\\texttt","span",'class="mq-monospace mq-text-mode"'),x.textsc=X("\\textsc","span",'style="font-variant:small-caps" class="mq-text-mode"'),x.uppercase=X("\\uppercase","span",'style="text-transform:uppercase" class="mq-text-mode"'),x.lowercase=X("\\lowercase","span",'style="text-transform:lowercase" class="mq-text-mode"');var K=p(B,(function(e,t){e.init=function(e){t.init.call(this,"$"),this.cursor=e},e.htmlTemplate='<span class="mq-math-mode">&0</span>',e.createBlocks=function(){t.createBlocks.call(this),this.ends[h].cursor=this.cursor,this.ends[h].write=function(e,t){"$"!==t?V.prototype.write.call(this,e,t):this.isEmpty()?(e.insRightOf(this.parent),this.parent.deleteTowards(dir,e),W("\\$","$").createLeftOf(e.show())):e[1]?e[h]?V.prototype.write.call(this,e,t):e.insLeftOf(this.parent):e.insRightOf(this.parent)}},e.latex=function(){return"$"+this.ends[h].latex()+"$"}})),$=p(q,(function(e,t){e.keystroke=function(e){if("Spacebar"!==e&&"Shift-Spacebar"!==e)return t.keystroke.apply(this,arguments)},e.write=function(e,t){var n;(e.show().deleteSelection(),"$"===t)?K(e).createLeftOf(e):("<"===t?n="<":">"===t&&(n=">"),W(t,n).createLeftOf(e))}}));C.TextField=function(e){return p(e.EditableField,(function(e,t){this.RootBlock=$,e.__mathquillify=function(){return t.__mathquillify.call(this,"mq-editable-field mq-text-mode")},e.latex=function(e){return arguments.length>0?(this.__controller.renderLatexText(e),this.__controller.blurred&&this.__controller.cursor.hide().parent.blur(),this):this.__controller.exportLatex()}}))};var ee=p(W,(function(e,t){e.createLeftOf=function(e){e.options.autoSubscriptNumerals&&e.parent!==e.parent.parent.sub&&(e[h]instanceof te&&!1!==e[h].isItalic||e[h]instanceof Ae&&e[h][h]instanceof te&&!1!==e[h][h].isItalic)?(x._().createLeftOf(e),t.createLeftOf.call(this,e),e.insRightOf(e.parent.parent)):t.createLeftOf.call(this,e)}})),te=p(Y,(function(e,t){e.init=function(e,n){t.init.call(this,e,"<var>"+(n||e)+"</var>")},e.text=function(){var e=this.ctrlSeq;return this.isPartOfOperator?"\\"==e[0]?e=e.slice(1,e.length):" "==e[e.length-1]&&(e=e.slice(0,-1)):(!this[h]||this[h]instanceof te||this[h]instanceof H||"\\ "===this[h].ctrlSeq||(e="*"+e),!this[1]||this[1]instanceof H||this[1]instanceof Ae||(e+="*")),e}}));E.p.autoCommands={_maxLength:0},N.autoCommands=function(e){if(!/^[a-z]+(?: [a-z]+)*$/i.test(e))throw'"'+e+'" not a space-delimited list of only letters';for(var t=e.split(" "),n={},r=0,i=0;i<t.length;i+=1){var o=t[i];if(o.length<2)throw'autocommand "'+o+'" not minimum length of 2';if(x[o]===oe)throw'"'+o+'" is a built-in operator name';n[o]=1,r=a(r,o.length)}return n._maxLength=r,n};var ne=p(te,(function(e,t){function n(e){return!e||e instanceof H||e instanceof Ee}e.init=function(e){return t.init.call(this,this.letter=e)},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments);var n=e.options.autoCommands,r=n._maxLength;if(r>0){for(var i="",a=this,o=0;a instanceof ne&&a.ctrlSeq===a.letter&&o<r;)i=a.letter+i,a=a[h],o+=1;for(;i.length;){if(n.hasOwnProperty(i)){for(o=1,a=this;o<i.length;o+=1,a=a[h]);return I(a,this).remove(),e[h]=a[h],x[i](i).createLeftOf(e)}i=i.slice(1)}}},e.italicize=function(e){return this.isItalic=e,this.isPartOfOperator=!e,this.jQ.toggleClass("mq-operator-name",!e),this},e.finalizeTree=e.siblingDeleted=e.siblingCreated=function(e,t){t!==h&&this[1]instanceof ne||this.autoUnItalicize(e)},e.autoUnItalicize=function(e){var t=e.autoOperatorNames;if(0!==t._maxLength){for(var r=this.letter,a=this[h];a instanceof ne;a=a[h])r=a.letter+r;for(var o=this[1];o instanceof ne;o=o[1])r+=o.letter;I(a[1]||this.parent.ends[h],o[h]||this.parent.ends[1]).each((function(e){e.italicize(!0).jQ.removeClass("mq-first mq-last mq-followed-by-supsub"),e.ctrlSeq=e.letter}));e:for(var s=0,l=a[1]||this.parent.ends[h];s<r.length;s+=1,l=l[1])for(var c=i(t._maxLength,r.length-s);c>0;c-=1){var u=r.slice(s,s+c);if(t.hasOwnProperty(u)){for(var d=0,f=l;d<c;d+=1,f=f[1]){f.italicize(!1);var p=f}var g=re.hasOwnProperty(u);if(l.ctrlSeq=(g?"\\":"\\operatorname{")+l.ctrlSeq,p.ctrlSeq+=g?" ":"}",ae.hasOwnProperty(u)&&p[h][h][h].jQ.addClass("mq-last"),n(l[h])||l.jQ.addClass("mq-first"),!n(p[1]))if(p[1]instanceof Ae){var m=p[1];(m.siblingCreated=m.siblingDeleted=function(){m.jQ.toggleClass("mq-after-operator-name",!(m[1]instanceof Oe))})()}else p.jQ.toggleClass("mq-last",!(p[1]instanceof Oe));s+=c-1,l=p;continue e}}}}})),re={},ie=E.p.autoOperatorNames={_maxLength:9},ae={limsup:1,liminf:1,projlim:1,injlim:1};!function(){for(var e="arg deg det dim exp gcd hom inf ker lg lim ln log max min sup limsup liminf injlim projlim Pr".split(" "),t=0;t<e.length;t+=1)re[e[t]]=ie[e[t]]=1;var n="sin cos tan arcsin arccos arctan sinh cosh tanh sec csc cot coth".split(" ");for(t=0;t<n.length;t+=1)re[n[t]]=1;var r="sin cos tan sec cosec csc cotan cot ctg".split(" ");for(t=0;t<r.length;t+=1)ie[r[t]]=ie["arc"+r[t]]=ie[r[t]+"h"]=ie["ar"+r[t]+"h"]=ie["arc"+r[t]+"h"]=1;var i="gcf hcf lcm proj span".split(" ");for(t=0;t<i.length;t+=1)ie[i[t]]=1}(),N.autoOperatorNames=function(e){if(!/^[a-z]+(?: [a-z]+)*$/i.test(e))throw'"'+e+'" not a space-delimited list of only letters';for(var t=e.split(" "),n={},r=0,i=0;i<t.length;i+=1){var o=t[i];if(o.length<2)throw'"'+o+'" not minimum length of 2';n[o]=1,r=a(r,o.length)}return n._maxLength=r,n};var oe=p(Y,(function(e,t){e.init=function(e){this.ctrlSeq=e},e.createLeftOf=function(e){for(var t=this.ctrlSeq,n=0;n<t.length;n+=1)ne(t.charAt(n)).createLeftOf(e)},e.parser=function(){for(var e=this.ctrlSeq,t=V(),n=0;n<e.length;n+=1)ne(e.charAt(n)).adopt(t,t.ends[1],0);return U.succeed(t.children())}}));for(var se in ie)ie.hasOwnProperty(se)&&(x[se]=oe);x.operatorname=p(B,(function(e){e.createLeftOf=o,e.numBlocks=function(){return 1},e.parser=function(){return F.block.map((function(e){return e.children()}))}})),x.f=p(ne,(function(e,t){e.init=function(){Y.p.init.call(this,this.letter="f",'<var class="mq-f">f</var>')},e.italicize=function(e){return this.jQ.html("f").toggleClass("mq-f",e),t.italicize.apply(this,arguments)}})),x[" "]=x.space=d(W,"\\ "," "),x[","]=d(W,"{,}",","),x["'"]=x.prime=d(W,"'","′"),x["″"]=x.dprime=d(W,"″","″"),x.backslash=d(W,"\\backslash ","\\"),w["\\"]||(w["\\"]=x.backslash),x.$=d(W,"\\$","$");var le=p(Y,(function(e,t){e.init=function(e,n){t.init.call(this,e,'<span class="mq-nonSymbola">'+(n||e)+"</span>")}}));x["@"]=le,x["#"]=d(le,"\\#","#"),x["&"]=d(le,"\\&","&"),x["%"]=d(le,"\\%","%"),x.alpha=x.beta=x.gamma=x.delta=x.zeta=x.eta=x.theta=x.iota=x.kappa=x.mu=x.nu=x.xi=x.rho=x.sigma=x.tau=x.chi=x.psi=x.omega=p(te,(function(e,t){e.init=function(e){t.init.call(this,"\\"+e+" ","&"+e+";")}})),x.phi=d(te,"\\phi ","ϕ"),x.phiv=x.varphi=d(te,"\\varphi ","φ"),x.epsilon=d(te,"\\epsilon ","ϵ"),x.epsiv=x.varepsilon=d(te,"\\varepsilon ","ε"),x.piv=x.varpi=d(te,"\\varpi ","ϖ"),x.sigmaf=x.sigmav=x.varsigma=d(te,"\\varsigma ","ς"),x.thetav=x.vartheta=x.thetasym=d(te,"\\vartheta ","ϑ"),x.upsilon=x.upsi=d(te,"\\upsilon ","υ"),x.gammad=x.Gammad=x.digamma=d(te,"\\digamma ","ϝ"),x.kappav=x.varkappa=d(te,"\\varkappa ","ϰ"),x.rhov=x.varrho=d(te,"\\varrho ","ϱ"),x.pi=x["π"]=d(le,"\\pi ","π"),x.lambda=d(le,"\\lambda ","λ"),x.Upsilon=x.Upsi=x.upsih=x.Upsih=d(Y,"\\Upsilon ",'<var style="font-family: serif">ϒ</var>'),x.Gamma=x.Delta=x.Theta=x.Lambda=x.Xi=x.Pi=x.Sigma=x.Phi=x.Psi=x.Omega=x.forall=p(W,(function(e,t){e.init=function(e){t.init.call(this,"\\"+e+" ","&"+e+";")}}));var ce=p(B,(function(e){e.init=function(e){this.latex=e},e.createLeftOf=function(e){var t=F.parse(this.latex);t.children().adopt(e.parent,e[h],e[1]),e[h]=t.ends[1],t.jQize().insertBefore(e.jQ),t.finalizeInsert(e.options,e),t.ends[1][1].siblingCreated&&t.ends[1][1].siblingCreated(e.options,h),t.ends[h][h].siblingCreated&&t.ends[h][h].siblingCreated(e.options,1),e.parent.bubble("reflow")},e.parser=function(){var e=F.parse(this.latex).children();return U.succeed(e)}}));x["⁰"]=d(ce,"^0"),x["¹"]=d(ce,"^1"),x["²"]=d(ce,"^2"),x["³"]=d(ce,"^3"),x["⁴"]=d(ce,"^4"),x["⁵"]=d(ce,"^5"),x["⁶"]=d(ce,"^6"),x["⁷"]=d(ce,"^7"),x["⁸"]=d(ce,"^8"),x["⁹"]=d(ce,"^9"),x["₀"]=d(ce,"_0"),x["₁"]=d(ce,"_1"),x["₂"]=d(ce,"_2"),x["₃"]=d(ce,"_3"),x["₄"]=d(ce,"_4"),x["₅"]=d(ce,"_5"),x["₆"]=d(ce,"_6"),x["₇"]=d(ce,"_7"),x["₈"]=d(ce,"_8"),x["₉"]=d(ce,"_9"),x["¼"]=d(ce,"\\frac14"),x["½"]=d(ce,"\\frac12"),x["¾"]=d(ce,"\\frac34");var ue=p(H,(function(e){e.init=W.prototype.init,e.contactWeld=e.siblingCreated=e.siblingDeleted=function(e,t){if(1!==t)return this.jQ[0].className=function e(t){return t[h]?t[h]instanceof H||/^[,;:\(\[]$/.test(t[h].ctrlSeq)?"":"mq-binary-operator":t.parent&&t.parent.parent&&t.parent.parent.isStyleBlock()?e(t.parent.parent):""}(this),this}}));x["+"]=d(ue,"+","+"),x["–"]=x["-"]=d(ue,"-","−"),x["±"]=x.pm=x.plusmn=x.plusminus=d(ue,"\\pm ","±"),x.mp=x.mnplus=x.minusplus=d(ue,"\\mp ","∓"),w["*"]=x.sdot=x.cdot=d(H,"\\cdot ","·","*");var de=p(H,(function(e,t){e.init=function(e,n){this.data=e,this.strict=n;var r=n?"Strict":"";t.init.call(this,e["ctrlSeq"+r],e["html"+r],e["text"+r])},e.swap=function(e){this.strict=e;var t=e?"Strict":"";this.ctrlSeq=this.data["ctrlSeq"+t],this.jQ.html(this.data["html"+t]),this.textTemplate=[this.data["text"+t]]},e.deleteTowards=function(e,n){if(e===h&&!this.strict)return this.swap(!0),void this.bubble("reflow");t.deleteTowards.apply(this,arguments)}})),fe={ctrlSeq:"\\le ",html:"≤",text:"≤",ctrlSeqStrict:"<",htmlStrict:"<",textStrict:"<"},pe={ctrlSeq:"\\ge ",html:"≥",text:"≥",ctrlSeqStrict:">",htmlStrict:">",textStrict:">"};x["<"]=x.lt=d(de,fe,!0),x[">"]=x.gt=d(de,pe,!0),x["≤"]=x.le=x.leq=d(de,fe,!1),x["≥"]=x.ge=x.geq=d(de,pe,!1);var he=p(H,(function(e,t){e.init=function(){t.init.call(this,"=","=")},e.createLeftOf=function(e){if(e[h]instanceof de&&e[h].strict)return e[h].swap(!1),void e[h].bubble("reflow");t.createLeftOf.apply(this,arguments)}}));x["="]=he,x["×"]=x.times=d(H,"\\times ","×","[x]"),x["÷"]=x.div=x.divide=x.divides=d(H,"\\div ","÷","[/]"),w["~"]=x.sim=d(H,"\\sim ","~","~"),x.notin=x.cong=x.equiv=x.oplus=x.otimes=p(H,(function(e,t){e.init=function(e){t.init.call(this,"\\"+e+" ","&"+e+";")}})),x["≠"]=x.ne=x.neq=d(H,"\\ne ","≠"),x["∗"]=x.ast=x.star=x.loast=x.lowast=d(H,"\\ast ","∗"),x.therefor=x.therefore=d(H,"\\therefore ","∴"),x.cuz=x.because=d(H,"\\because ","∵"),x.prop=x.propto=d(H,"\\propto ","∝"),x["≈"]=x.asymp=x.approx=d(H,"\\approx ","≈"),x["≢"]=x.notequiv=x.nequiv=d(H,"\\not\\equiv ","≢"),x.isin=x.in=d(H,"\\in ","∈"),x.ni=x.contains=d(H,"\\ni ","∋"),x.notni=x.niton=x.notcontains=x.doesnotcontain=d(H,"\\not\\ni ","∌"),x.sub=x.subset=d(H,"\\subset ","⊂"),x.sup=x.supset=x.superset=d(H,"\\supset ","⊃"),x.nsub=x.notsub=x.nsubset=x.notsubset=d(H,"\\not\\subset ","⊄"),x.nsup=x.notsup=x.nsupset=x.notsupset=x.nsuperset=x.notsuperset=d(H,"\\not\\supset ","⊅"),x.sube=x.subeq=x.subsete=x.subseteq=d(H,"\\subseteq ","⊆"),x.supe=x.supeq=x.supsete=x.supseteq=x.supersete=x.superseteq=d(H,"\\supseteq ","⊇"),x.nsube=x.nsubeq=x.notsube=x.notsubeq=x.nsubsete=x.nsubseteq=x.notsubsete=x.notsubseteq=d(H,"\\not\\subseteq ","⊈"),x.nsupe=x.nsupeq=x.notsupe=x.notsupeq=x.nsupsete=x.nsupseteq=x.notsupsete=x.notsupseteq=x.nsupersete=x.nsuperseteq=x.notsupersete=x.notsuperseteq=d(H,"\\not\\supseteq ","⊉"),x.N=x.naturals=x.Naturals=d(W,"\\mathbb{N}","ℕ"),x.P=x.primes=x.Primes=x.projective=x.Projective=x.probability=x.Probability=d(W,"\\mathbb{P}","ℙ"),x.Z=x.integers=x.Integers=d(W,"\\mathbb{Z}","ℤ"),x.Q=x.rationals=x.Rationals=d(W,"\\mathbb{Q}","ℚ"),x.R=x.reals=x.Reals=d(W,"\\mathbb{R}","ℝ"),x.C=x.complex=x.Complex=x.complexes=x.Complexes=x.complexplane=x.Complexplane=x.ComplexPlane=d(W,"\\mathbb{C}","ℂ"),x.H=x.Hamiltonian=x.quaternions=x.Quaternions=d(W,"\\mathbb{H}","ℍ"),x.quad=x.emsp=d(W,"\\quad "," "),x.qquad=d(W,"\\qquad "," "),x.diamond=d(W,"\\diamond ","◇"),x.bigtriangleup=d(W,"\\bigtriangleup ","△"),x.ominus=d(W,"\\ominus ","⊖"),x.uplus=d(W,"\\uplus ","⊎"),x.bigtriangledown=d(W,"\\bigtriangledown ","▽"),x.sqcap=d(W,"\\sqcap ","⊓"),x.triangleleft=d(W,"\\triangleleft ","⊲"),x.sqcup=d(W,"\\sqcup ","⊔"),x.triangleright=d(W,"\\triangleright ","⊳"),x.odot=x.circledot=d(W,"\\odot ","⊙"),x.bigcirc=d(W,"\\bigcirc ","◯"),x.dagger=d(W,"\\dagger ","†"),x.ddagger=d(W,"\\ddagger ","‡"),x.wr=d(W,"\\wr ","≀"),x.amalg=d(W,"\\amalg ","∐"),x.models=d(W,"\\models ","⊨"),x.prec=d(W,"\\prec ","≺"),x.succ=d(W,"\\succ ","≻"),x.preceq=d(W,"\\preceq ","≼"),x.succeq=d(W,"\\succeq ","≽"),x.simeq=d(W,"\\simeq ","≃"),x.mid=d(W,"\\mid ","∣"),x.nmid=d(W,"\\nmid","∤"),x.ll=d(W,"\\ll ","≪"),x.gg=d(W,"\\gg ","≫"),x.parallel=d(W,"\\parallel ","∥"),x.nparallel=d(W,"\\nparallel ","∦"),x.bowtie=d(W,"\\bowtie ","⋈"),x.sqsubset=d(W,"\\sqsubset ","⊏"),x.sqsupset=d(W,"\\sqsupset ","⊐"),x.smile=d(W,"\\smile ","⌣"),x.sqsubseteq=d(W,"\\sqsubseteq ","⊑"),x.sqsupseteq=d(W,"\\sqsupseteq ","⊒"),x.doteq=d(W,"\\doteq ","≐"),x.frown=d(W,"\\frown ","⌢"),x.vdash=d(W,"\\vdash ","⊦"),x.dashv=d(W,"\\dashv ","⊣"),x.nless=d(W,"\\nless ","≮"),x.ngtr=d(W,"\\ngtr ","≯"),x.longleftarrow=d(W,"\\longleftarrow ","←"),x.longrightarrow=d(W,"\\longrightarrow ","→"),x.Longleftarrow=d(W,"\\Longleftarrow ","⇐"),x.Longrightarrow=d(W,"\\Longrightarrow ","⇒"),x.longleftrightarrow=d(W,"\\longleftrightarrow ","↔"),x.updownarrow=d(W,"\\updownarrow ","↕"),x.Longleftrightarrow=d(W,"\\Longleftrightarrow ","⇔"),x.Updownarrow=d(W,"\\Updownarrow ","⇕"),x.mapsto=d(W,"\\mapsto ","↦"),x.nearrow=d(W,"\\nearrow ","↗"),x.hookleftarrow=d(W,"\\hookleftarrow ","↩"),x.hookrightarrow=d(W,"\\hookrightarrow ","↪"),x.searrow=d(W,"\\searrow ","↘"),x.leftharpoonup=d(W,"\\leftharpoonup ","↼"),x.rightharpoonup=d(W,"\\rightharpoonup ","⇀"),x.swarrow=d(W,"\\swarrow ","↙"),x.leftharpoondown=d(W,"\\leftharpoondown ","↽"),x.rightharpoondown=d(W,"\\rightharpoondown ","⇁"),x.nwarrow=d(W,"\\nwarrow ","↖"),x.ldots=d(W,"\\ldots ","…"),x.cdots=d(W,"\\cdots ","⋯"),x.vdots=d(W,"\\vdots ","⋮"),x.ddots=d(W,"\\ddots ","⋱"),x.surd=d(W,"\\surd ","√"),x.triangle=d(W,"\\triangle ","△"),x.ell=d(W,"\\ell ","ℓ"),x.top=d(W,"\\top ","⊤"),x.flat=d(W,"\\flat ","♭"),x.natural=d(W,"\\natural ","♮"),x.sharp=d(W,"\\sharp ","♯"),x.wp=d(W,"\\wp ","℘"),x.bot=d(W,"\\bot ","⊥"),x.clubsuit=d(W,"\\clubsuit ","♣"),x.diamondsuit=d(W,"\\diamondsuit ","♢"),x.heartsuit=d(W,"\\heartsuit ","♡"),x.spadesuit=d(W,"\\spadesuit ","♠"),x.parallelogram=d(W,"\\parallelogram ","▱"),x.square=d(W,"\\square ","⬜"),x.oint=d(W,"\\oint ","∮"),x.bigcap=d(W,"\\bigcap ","∩"),x.bigcup=d(W,"\\bigcup ","∪"),x.bigsqcup=d(W,"\\bigsqcup ","⊔"),x.bigvee=d(W,"\\bigvee ","∨"),x.bigwedge=d(W,"\\bigwedge ","∧"),x.bigodot=d(W,"\\bigodot ","⊙"),x.bigotimes=d(W,"\\bigotimes ","⊗"),x.bigoplus=d(W,"\\bigoplus ","⊕"),x.biguplus=d(W,"\\biguplus ","⊎"),x.lfloor=d(W,"\\lfloor ","⌊"),x.rfloor=d(W,"\\rfloor ","⌋"),x.lceil=d(W,"\\lceil ","⌈"),x.rceil=d(W,"\\rceil ","⌉"),x.opencurlybrace=x.lbrace=d(W,"\\lbrace ","{"),x.closecurlybrace=x.rbrace=d(W,"\\rbrace ","}"),x.lbrack=d(W,"["),x.rbrack=d(W,"]"),x.slash=d(W,"/"),x.vert=d(W,"|"),x.perp=x.perpendicular=d(W,"\\perp ","⊥"),x.nabla=x.del=d(W,"\\nabla ","∇"),x.hbar=d(W,"\\hbar ","ℏ"),x.AA=x.Angstrom=x.angstrom=d(W,"\\text\\AA ","Å"),x.ring=x.circ=x.circle=d(W,"\\circ ","∘"),x.bull=x.bullet=d(W,"\\bullet ","•"),x.setminus=x.smallsetminus=d(W,"\\setminus ","∖"),x["¬"]=x.neg=d(W,"\\neg ","¬"),x.not=p(W,(function(e,t){e.suffixes={"\\equiv":"notequiv","\\ni":"notni","\\subset":"notsubset","\\subseteq":"notsubseteq","\\supset":"notsupset","\\supseteq":"notsupseteq"},e.init=function(){return t.init.call(this,"\\neg ","¬")},e.parser=function(){var t=U.succeed,n=U.optWhitespace;return function e(t){var n=U.string(t.shift());return t.length?n.or(e(t)):n}(Object.keys(e.suffixes).sort((function(e,t){return t.length-e.length}))).then((function(r){return n.then(t(x[e.suffixes[r]]()))})).or(n.then(t(this)))}})),x["…"]=x.dots=x.ellip=x.hellip=x.ellipsis=x.hellipsis=d(W,"\\dots ","…"),x.converges=x.darr=x.dnarr=x.dnarrow=x.downarrow=d(W,"\\downarrow ","↓"),x.dArr=x.dnArr=x.dnArrow=x.Downarrow=d(W,"\\Downarrow ","⇓"),x.diverges=x.uarr=x.uparrow=d(W,"\\uparrow ","↑"),x.uArr=x.Uparrow=d(W,"\\Uparrow ","⇑"),x.to=d(H,"\\to ","→"),x.rarr=x.rightarrow=d(W,"\\rightarrow ","→"),x.implies=d(H,"\\Rightarrow ","⇒"),x.rArr=x.Rightarrow=d(W,"\\Rightarrow ","⇒"),x.gets=d(H,"\\gets ","←"),x.larr=x.leftarrow=d(W,"\\leftarrow ","←"),x.impliedby=d(H,"\\Leftarrow ","⇐"),x.lArr=x.Leftarrow=d(W,"\\Leftarrow ","⇐"),x.harr=x.lrarr=x.leftrightarrow=d(W,"\\leftrightarrow ","↔"),x.iff=d(H,"\\Leftrightarrow ","⇔"),x.hArr=x.lrArr=x.Leftrightarrow=d(W,"\\Leftrightarrow ","⇔"),x.Re=x.Real=x.real=d(W,"\\Re ","ℜ"),x.Im=x.imag=x.image=x.imagin=x.imaginary=x.Imaginary=d(W,"\\Im ","ℑ"),x.part=x.partial=d(W,"\\partial ","∂"),x.infty=x.infin=x.infinity=d(W,"\\infty ","∞"),x.alef=x.alefsym=x.aleph=x.alephsym=d(W,"\\aleph ","ℵ"),x.xist=x.xists=x.exist=x.exists=d(W,"\\exists ","∃"),x.nexists=x.nexist=d(W,"\\nexists ","∄"),x.and=x.land=x.wedge=d(H,"\\wedge ","∧"),x.or=x.lor=x.vee=d(H,"\\vee ","∨"),x.o=x.O=x.empty=x.emptyset=x.oslash=x.Oslash=x.nothing=x.varnothing=d(H,"\\varnothing ","∅"),x.cup=x.union=d(H,"\\cup ","∪"),x.cap=x.intersect=x.intersection=d(H,"\\cap ","∩"),x.deg=x.degree=d(W,"\\degree ","°"),x.ang=x.angle=d(W,"\\angle ","∠"),x.measuredangle=d(W,"\\measuredangle ","∡"),x.sphericalangle=d(W,"\\sphericalangle ","∢");var ge,me,ye=o,ve=document.createElement("div").style;for(var be in{transform:1,WebkitTransform:1,MozTransform:1,OTransform:1,msTransform:1})if(be in ve){me=be;break}me?ge=function(e,t,n){e.css(me,"scale("+t+","+n+")")}:"filter"in ve?(ye=function(e){e.className=e.className},ge=function(e,t,n){t/=1+(n-1)/2,e.css("fontSize",n+"em"),e.hasClass("mq-matrixed-container")||e.addClass("mq-matrixed-container").wrapInner('<span class="mq-matrixed"></span>');var r=e.children().css("filter","progid:DXImageTransform.Microsoft.Matrix(M11="+t+",SizingMethod='auto expand')");function i(){e.css("marginRight",(r.width()-1)*(t-1)/t+"px")}i();var a=setInterval(i);m(window).load((function(){clearTimeout(a),i()}))}):ge=function(e,t,n){e.css("fontSize",n+"em")};var Ie=p(B,(function(e,t){e.init=function(e,n,r){t.init.call(this,e,"<"+n+" "+r+">&0</"+n+">")}})),xe=p(te,(function(e,t){e.symbols={C:"ℂ",H:"ℍ",N:"ℕ",P:"ℙ",Q:"ℚ",R:"ℝ",Z:"ℤ"},e.init=function(e){var n=e;this.symbols[e]&&(n='<span class="mq-original">'+e+"</span>"+this.symbols[e]),t.init.call(this,e,n)}}));x.mathrm=d(Ie,"\\mathrm","span",'class="mq-roman mq-font"'),x.mathit=d(Ie,"\\mathit","i",'class="mq-font"'),x.mathbf=d(Ie,"\\mathbf","b",'class="mq-font"'),x.mathsf=d(Ie,"\\mathsf","span",'class="mq-sans-serif mq-font"'),x.mathtt=d(Ie,"\\mathtt","span",'class="mq-monospace mq-font"'),x.mathbb=p(B,(function(e,t){e.init=function(){t.init.call(this,"\\mathbb",'<span class="mq-mathbb mq-font">&0</span>')},e.adopt=function(){return this.eachChild((function(e){if(!e.writeOverride){var t=e.write,n=e.deleteOutOf;e.write=e.writeOverride=function(n,r,i){var a;if(!xe.prototype.symbols[r])return t.apply(e,arguments);a=xe(r),i&&a.replaces(i),a.createLeftOf(n)},e.deleteOutOf=function(t,r){var i=[];return e.eachChild((function(t){var n=t.ctrlSeq;i.push(te(n).adopt(e,e.ends[1],0)),t.remove()})),i.length&&(r[1]=i[0]),e.jQize().appendTo(e.jQ),n.apply(e,arguments)}}})),t.adopt.apply(this,arguments)},e.finalizeTree=function(){this.eachChild((function(e){e.eachChild((function(t){var n=t.ctrlSeq,r=te;xe.prototype.symbols[n]&&(r=xe),r(n).adopt(e,e.ends[1],0),t.remove()})),e.jQize().appendTo(e.jQ)}))}})),x.underline=d(Ie,"\\underline","span",'class="mq-non-leaf mq-underline"'),x.overline=x.bar=d(Ie,"\\overline","span",'class="mq-non-leaf mq-overline"');var we=p(B,(function(e,t){e.init=function(e,n){t.init.call(this,e,"<span "+n+'><span class="mq-arrow-inner">&0</span></span>')}}));x.overrightarrow=d(we,"\\overrightarrow",'class="mq-non-leaf mq-overarrow mq-arrow-right"'),x.overleftarrow=d(we,"\\overleftarrow",'class="mq-non-leaf mq-overarrow mq-arrow-left"'),x.overleftrightarrow=d(we,"\\overleftrightarrow",'class="mq-non-leaf mq-overarrow mq-arrow-leftright"'),x.underrightarrow=d(we,"\\underrightarrow",'class="mq-non-leaf mq-underarrow mq-arrow-right"'),x.underleftarrow=d(we,"\\underleftarrow",'class="mq-non-leaf mq-underarrow mq-arrow-left"'),x.underleftrightarrow=d(we,"\\underleftrightarrow",'class="mq-non-leaf mq-underarrow mq-arrow-leftright"');var Te=p(B,(function(e,t){e.ctrlSeq="\\xrightleftharpoons",e.htmlTemplate='<span class="mq-harpoons mq-harpoons-rightleft mq-non-leaf"><span class="mq-harpoons-numerator">&0</span><span class="mq-harpoons-harpoons">⇌</span></span>'})),Me=x.xrightleftharpoons=p(Te,(function(e,t){e.ctrlSeq="\\xrightleftharpoons",e.htmlTemplate='<span class="mq-harpoons mq-harpoons-rightleft mq-non-leaf"><span class="mq-harpoons-numerator">&1</span><span class="mq-harpoons-harpoons">⇌</span><span class="mq-harpoons-denominator">&0</span></span>',e.parser=function(){return F.optBlock.then((function(e){return F.block.map((function(t){var n=Me();return n.blocks=[e,t],e.adopt(n,0,0),t.adopt(n,e,0),n}))})).or(F.block.map((function(e){var t=Te();return t.blocks=[e],e.adopt(t,0,0),t})))},e.latex=function(){return this.ctrlSeq+"["+this.ends[h].latex()+"]{"+this.ends[1].latex()+"}"}}));x.overarc=d(Ie,"\\overarc","span",'class="mq-non-leaf mq-overarc"'),x.dot=p(B,(function(e,t){e.init=function(){t.init.call(this,"\\dot",'<span class="mq-non-leaf"><span class="mq-dot-recurring-inner"><span class="mq-dot-recurring">˙</span><span class="mq-empty-box">&0</span></span></span>')}}));x.textcolor=p(B,(function(e,t){e.setColor=function(e){this.color=e,this.htmlTemplate='<span class="mq-textcolor" style="color:'+e+'">&0</span>'},e.latex=function(){return"\\textcolor{"+this.color+"}{"+this.blocks[0].latex()+"}"},e.parser=function(){var e=this,n=U.optWhitespace,r=U.string,i=U.regex;return n.then(r("{")).then(i(/^[#\w\s.,()%-]*/)).skip(r("}")).then((function(n){return e.setColor(n),t.parser.call(e)}))},e.isStyleBlock=function(){return!0}})),x.class=p(B,(function(e,t){e.parser=function(){var e=this,n=U.string,r=U.regex;return U.optWhitespace.then(n("{")).then(r(/^[-\w\s\\\xA0-\xFF]*/)).skip(n("}")).then((function(n){return e.cls=n||"",e.htmlTemplate='<span class="mq-class '+n+'">&0</span>',t.parser.call(e)}))},e.latex=function(){return"\\class{"+this.cls+"}{"+this.blocks[0].latex()+"}"},e.isStyleBlock=function(){return!0}}));var Ae=p(B,(function(e,t){e.ctrlSeq="_{...}^{...}",e.createLeftOf=function(e){if(this.replacedFragment||e[h]||!e.options.supSubsRequireOperand)return t.createLeftOf.apply(this,arguments)},e.contactWeld=function(e){for(var t=h;t;t=t===h&&1)if(this[t]instanceof Ae){for(var n="sub";n;n="sub"===n&&"sup"){var r=this[n],i=this[t][n];if(r){if(i)if(r.isEmpty())o=y(i,0,i.ends[h]);else{r.jQ.children().insAtDirEnd(-t,i.jQ);var a=r.children().disown(),o=y(i,a.ends[1],i.ends[h]);t===h?a.adopt(i,i.ends[1],0):a.adopt(i,0,i.ends[h])}else this[t].addBlock(r.disown());this.placeCursor=function(e,n){return function(r){r.insAtDirEnd(-t,e||n)}}(i,r)}}this.remove(),e&&e[h]===this&&(1===t&&o?o[h]?e.insRightOf(o[h]):e.insAtLeftEnd(o.parent):e.insRightOf(this[t]));break}},E.p.charsThatBreakOutOfSupSub="",e.finalizeTree=function(){this.ends[h].write=function(e,t){if(e.options.autoSubscriptNumerals&&this===this.parent.sub){if("_"===t)return;var n=this.chToCmd(t,e.options);return n instanceof Y?e.deleteSelection():e.clearSelection().insRightOf(this.parent),n.createLeftOf(e.show())}e[h]&&!e[1]&&!e.selection&&e.options.charsThatBreakOutOfSupSub.indexOf(t)>-1&&e.insRightOf(this.parent),V.p.write.apply(this,arguments)}},e.moveTowards=function(e,n,r){n.options.autoSubscriptNumerals&&!this.sup?n.insDirOf(e,this):t.moveTowards.apply(this,arguments)},e.deleteTowards=function(e,n){if(n.options.autoSubscriptNumerals&&this.sub){var r=this.sub.ends[-e];r instanceof Y?r.remove():r&&r.deleteTowards(e,n.insAtDirEnd(-e,this.sub)),this.sub.isEmpty()&&(this.sub.deleteOutOf(h,n.insAtLeftEnd(this.sub)),this.sup&&n.insDirOf(-e,this))}else t.deleteTowards.apply(this,arguments)},e.latex=function(){function e(e,t){var n=t&&t.latex();return t?e+(1===n.length?n:"{"+(n||" ")+"}"):""}return e("_",this.sub)+e("^",this.sup)},e.addBlock=function(e){"sub"===this.supsub?(this.sup=this.upInto=this.sub.upOutOf=e,e.adopt(this,this.sub,0).downOutOf=this.sub,e.jQ=m('<span class="mq-sup"/>').append(e.jQ.children()).attr(r,e.id).prependTo(this.jQ)):(this.sub=this.downInto=this.sup.downOutOf=e,e.adopt(this,0,this.sup).upOutOf=this.sup,e.jQ=m('<span class="mq-sub"></span>').append(e.jQ.children()).attr(r,e.id).appendTo(this.jQ.removeClass("mq-sup-only")),this.jQ.append('<span style="display:inline-block;width:0">​</span>'));for(var t=0;t<2;t+=1)!function(e,t,n,r){e[t].deleteOutOf=function(i,a){if(a.insDirOf(this[i]?-i:i,this.parent),!this.isEmpty()){var o=this.ends[i];this.children().disown().withDirAdopt(i,a.parent,a[i],a[-i]).jQ.insDirOf(-i,a.jQ),a[-i]=o}e.supsub=n,delete e[t],delete e[r+"Into"],e[n][r+"OutOf"]=Ce,delete e[n].deleteOutOf,"sub"===t&&m(e.jQ.addClass("mq-sup-only")[0].lastChild).remove(),this.remove()}}(this,"sub sup".split(" ")[t],"sup sub".split(" ")[t],"down up".split(" ")[t])}}));function Ce(e){var t=this.parent,n=e;do{if(n[1])return e.insLeftOf(t);n=n.parent.parent}while(n!==t);e.insRightOf(t)}x.subscript=x._=p(Ae,(function(e,t){e.supsub="sub",e.htmlTemplate='<span class="mq-supsub mq-non-leaf"><span class="mq-sub">&0</span><span style="display:inline-block;width:0">​</span></span>',e.textTemplate=["_"],e.finalizeTree=function(){this.downInto=this.sub=this.ends[h],this.sub.upOutOf=Ce,t.finalizeTree.call(this)}})),x.superscript=x.supscript=x["^"]=p(Ae,(function(e,t){e.supsub="sup",e.htmlTemplate='<span class="mq-supsub mq-non-leaf mq-sup-only"><span class="mq-sup">&0</span></span>',e.textTemplate=["^"],e.finalizeTree=function(){this.upInto=this.sup=this.ends[1],this.sup.downOutOf=Ce,t.finalizeTree.call(this)}}));var Ee=p(B,(function(e,t){e.init=function(e,t){var n='<span class="mq-large-operator mq-non-leaf"><span class="mq-to"><span>&1</span></span><big>'+t+'</big><span class="mq-from"><span>&0</span></span></span>';Y.prototype.init.call(this,e,n)},e.createLeftOf=function(e){t.createLeftOf.apply(this,arguments),e.options.sumStartsWithNEquals&&(ne("n").createLeftOf(e),he().createLeftOf(e))},e.latex=function(){function e(e){return 1===e.length?e:"{"+(e||" ")+"}"}return this.ctrlSeq+"_"+e(this.ends[h].latex())+"^"+e(this.ends[1].latex())},e.parser=function(){for(var e=U.string,t=U.optWhitespace,n=U.succeed,r=F.block,i=this,a=i.blocks=[V(),V()],o=0;o<a.length;o+=1)a[o].adopt(i,i.ends[1],0);return t.then(e("_").or(e("^"))).then((function(e){var t=a["_"===e?0:1];return r.then((function(e){return e.children().adopt(t,t.ends[1],0),n(i)}))})).many().result(i)},e.finalizeTree=function(){this.downInto=this.ends[h],this.upInto=this.ends[1],this.ends[h].upOutOf=this.ends[1],this.ends[1].downOutOf=this.ends[h]}}));x["∑"]=x.sum=x.summation=d(Ee,"\\sum ","∑"),x["∏"]=x.prod=x.product=d(Ee,"\\prod ","∏"),x.coprod=x.coproduct=d(Ee,"\\coprod ","∐"),x["∫"]=x.int=x.integral=p(Ee,(function(e,t){e.init=function(){Y.prototype.init.call(this,"\\int ",'<span class="mq-int mq-non-leaf"><big>∫</big><span class="mq-supsub mq-non-leaf"><span class="mq-sup"><span class="mq-sup-inner">&1</span></span><span class="mq-sub">&0</span><span style="display:inline-block;width:0">​</span></span></span>')},e.createLeftOf=B.p.createLeftOf})),x.bigg=x.intsub=x.integralsubstitution=p(Ee,(function(e,t){e.init=function(){Y.prototype.init.call(this,"\\bigg",'<span class="mq-intsub mq-non-leaf"><big>/</big><span class="mq-supsub mq-non-leaf"><span class="mq-sup"><span class="mq-sup-inner">&1</span></span><span class="mq-sub">&0</span><span style="display:inline-block;width:0">​</span></span></span>')},e.createLeftOf=B.p.createLeftOf,e.parser=function(){var e=this,t=U.string,n=U.optWhitespace,r=U.succeed;e.blocks=[V(),V()];for(var i=0;i<e.blocks.length;i+=1)e.blocks[i].adopt(e,e.ends[1],0);return t("/_{").then(t("\\!").many()).then(F).then((function(t){return t.children().adopt(e.blocks[0],e.blocks[0].ends[1],0),r(e)})).then(n).then(t("}")).then(n).then(t("^")).then(F.block).then((function(t){return t.children().adopt(e.blocks[1],e.blocks[1].ends[1],0),r(e)}))},e.latex=function(){function e(e){return 1===e.length?e:"{"+(e||" ")+"}"}return"\\bigg/_{\\!\\!\\!\\!\\!"+e(this.blocks[0].latex())+"}^"+e(this.blocks[1].latex())}}));var Ne=x.frac=x.dfrac=x.cfrac=x.fraction=p(B,(function(e,t){e.ctrlSeq="\\frac",e.htmlTemplate='<span class="mq-fraction mq-non-leaf"><span class="mq-numerator">&0</span><span class="mq-denominator">&1</span><span style="display:inline-block;width:0">​</span></span>',e.textTemplate=["(",")/(",")"],e.finalizeTree=function(){this.upInto=this.ends[1].upOutOf=this.ends[h],this.downInto=this.ends[h].downOutOf=this.ends[1]}})),Se=x.over=w["/"]=p(Ne,(function(e,t){e.createLeftOf=function(e){if(!this.replacedFragment){for(var n=e[h];n&&!(n instanceof H||n instanceof(x.text||o)||n instanceof Ee||"\\ "===n.ctrlSeq||/^[,;:]$/.test(n.ctrlSeq));)n=n[h];n instanceof Ee&&n[1]instanceof Ae&&(n=n[1])[1]instanceof Ae&&n[1].ctrlSeq!=n.ctrlSeq&&(n=n[1]),n!==e[h]&&(this.replaces(I(n[1]||e.parent.ends[h],e[h])),e[h]=n)}t.createLeftOf.call(this,e)}})),ke=x.sqrt=x["√"]=p(B,(function(e,t){e.ctrlSeq="\\sqrt",e.htmlTemplate='<span class="mq-non-leaf"><span class="mq-scaled mq-sqrt-prefix">√</span><span class="mq-non-leaf mq-sqrt-stem">&0</span></span>',e.textTemplate=["sqrt(",")"],e.parser=function(){return F.optBlock.then((function(e){return F.block.map((function(t){var n=je();return n.blocks=[e,t],e.adopt(n,0,0),t.adopt(n,e,0),n}))})).or(t.parser.call(this))},e.reflow=function(){var e=this.ends[1].jQ;ge(e.prev(),1,e.innerHeight()/+e.css("fontSize").slice(0,-2)-.1)}})),je=(x.hat=p(B,(function(e,t){e.ctrlSeq="\\hat",e.htmlTemplate='<span class="mq-non-leaf"><span class="mq-hat-prefix">^</span><span class="mq-hat-stem">&0</span></span>',e.textTemplate=["hat(",")"]})),x.nthroot=p(ke,(function(e,t){e.htmlTemplate='<span class="mq-nthroot mq-non-leaf">&0</span><span class="mq-scaled"><span class="mq-sqrt-prefix mq-scaled">√</span><span class="mq-sqrt-stem mq-non-leaf">&1</span></span>',e.textTemplate=["sqrt[","](",")"],e.latex=function(){return"\\sqrt["+this.ends[h].latex()+"]{"+this.ends[1].latex()+"}"}}))),De=p(B,(function(e,t){e.init=function(e,n,r){var i='<span class="mq-non-leaf"><span class="mq-diacritic-above">'+n+'</span><span class="mq-diacritic-stem">&0</span></span>';t.init.call(this,e,i,r)}}));function Le(e,t){e.jQadd=function(){t.jQadd.apply(this,arguments),this.delimjQs=this.jQ.children(":first").add(this.jQ.children(":last")),this.contentjQ=this.jQ.children(":eq(1)")},e.reflow=function(){var e=this.contentjQ.outerHeight()/parseFloat(this.contentjQ.css("fontSize"));ge(this.delimjQs,i(1+.2*(e-1),1.2),1.2*e)}}x.vec=d(De,"\\vec","→",["vec(",")"]),x.tilde=d(De,"\\tilde","~",["tilde(",")"]);var Oe=p(p(B,Le),(function(e,t){e.init=function(e,n,r,i,a){t.init.call(this,"\\left"+i,void 0,[n,r]),this.side=e,this.sides={},this.sides[h]={ch:n,ctrlSeq:i},this.sides[1]={ch:r,ctrlSeq:a}},e.numBlocks=function(){return 1},e.html=function(){return this.htmlTemplate='<span class="mq-non-leaf"><span class="mq-scaled mq-paren'+(1===this.side?" mq-ghost":"")+'">'+this.sides[h].ch+'</span><span class="mq-non-leaf">&0</span><span class="mq-scaled mq-paren'+(this.side===h?" mq-ghost":"")+'">'+this.sides[1].ch+"</span></span>",t.html.call(this)},e.latex=function(){return"\\left"+this.sides[h].ctrlSeq+this.ends[h].latex()+"\\right"+this.sides[1].ctrlSeq},e.matchBrack=function(e,t,n){return n instanceof Oe&&n.side&&n.side!==-t&&(!e.restrictMismatchedBrackets||Pe[this.sides[this.side].ch]===n.sides[n.side].ch||{"(":"]","[":")"}[this.sides[h].ch]===n.sides[1].ch)&&n},e.closeOpposing=function(e){e.side=0,e.sides[this.side]=this.sides[this.side],e.delimjQs.eq(this.side===h?0:1).removeClass("mq-ghost").html(this.sides[this.side].ch)},e.createLeftOf=function(e){if(!this.replacedFragment){var n=e.options;if("|"===this.sides[h].ch)var r=this.matchBrack(n,1,e[1])||this.matchBrack(n,h,e[h])||this.matchBrack(n,0,e.parent.parent);else r=this.matchBrack(n,-this.side,e[-this.side])||this.matchBrack(n,-this.side,e.parent.parent)}if(r){var i=this.side=-r.side;this.closeOpposing(r),r===e.parent.parent&&e[i]&&I(e[i],e.parent.ends[i],-i).disown().withDirAdopt(-i,r.parent,r,r[i]).jQ.insDirOf(i,r.jQ),r.bubble("reflow")}else i=(r=this).side,r.replacedFragment?r.side=0:e[-i]&&(r.replaces(I(e[-i],e.parent.ends[-i],i)),e[-i]=0),t.createLeftOf.call(r,e);i===h?e.insAtLeftEnd(r.ends[h]):e.insRightOf(r)},e.placeCursor=o,e.unwrap=function(){this.ends[h].children().disown().adopt(this.parent,this,this[1]).jQ.insertAfter(this.jQ),this.remove()},e.deleteSide=function(e,t,n){var r=this.parent,i=this[e],a=r.ends[e];if(e===this.side)return this.unwrap(),void(i?n.insDirOf(-e,i):n.insAtDirEnd(e,r));var o=n.options,s=!this.side;if(this.side=-e,this.matchBrack(o,e,this.ends[h].ends[this.side])){this.closeOpposing(this.ends[h].ends[this.side]);var l=this.ends[h].ends[e];this.unwrap(),l.siblingCreated&&l.siblingCreated(n.options,e),i?n.insDirOf(-e,i):n.insAtDirEnd(e,r)}else{if(this.matchBrack(o,e,this.parent.parent))this.parent.parent.closeOpposing(this),this.parent.parent.unwrap();else{if(t&&s)return this.unwrap(),void(i?n.insDirOf(-e,i):n.insAtDirEnd(e,r));this.sides[e]={ch:Pe[this.sides[this.side].ch],ctrlSeq:Pe[this.sides[this.side].ctrlSeq]},this.delimjQs.removeClass("mq-ghost").eq(e===h?0:1).addClass("mq-ghost").html(this.sides[e].ch)}if(i){l=this.ends[h].ends[e];I(i,a,-e).disown().withDirAdopt(-e,this.ends[h],l,0).jQ.insAtDirEnd(e,this.ends[h].jQ.removeClass("mq-empty")),l.siblingCreated&&l.siblingCreated(n.options,e),n.insDirOf(-e,i)}else t?n.insDirOf(e,this):n.insAtDirEnd(e,this.ends[h])}},e.deleteTowards=function(e,t){this.deleteSide(-e,!1,t)},e.finalizeTree=function(){this.ends[h].deleteOutOf=function(e,t){this.parent.deleteSide(e,!0,t)},this.finalizeTree=this.intentionalBlur=function(){this.delimjQs.eq(this.side===h?1:0).removeClass("mq-ghost"),this.side=0}},e.siblingCreated=function(e,t){t===-this.side&&this.finalizeTree()}})),Pe={"(":")",")":"(","[":"]","]":"[","{":"}","}":"{","\\{":"\\}","\\}":"\\{","⟨":"⟩","⟩":"⟨","\\langle ":"\\rangle ","\\rangle ":"\\langle ","|":"|","\\lVert ":"\\rVert ","\\rVert ":"\\lVert "};function Re(e,t){t=t||e;var n=Pe[e],r=Pe[t];w[e]=d(Oe,h,e,n,t,r),w[n]=d(Oe,1,e,n,t,r)}Re("("),Re("["),Re("{","\\{"),x.langle=d(Oe,h,"⟨","⟩","\\langle ","\\rangle "),x.rangle=d(Oe,1,"⟨","⟩","\\langle ","\\rangle "),w["|"]=d(Oe,h,"|","|","|","|"),x.lVert=d(Oe,h,"∥","∥","\\lVert ","\\rVert "),x.rVert=d(Oe,1,"∥","∥","\\lVert ","\\rVert "),x.left=p(B,(function(e){e.parser=function(){var e=U.regex,t=U.string,n=(U.succeed,U.optWhitespace);return n.then(e(/^(?:[([|]|\\\{|\\langle\b|\\lVert\b)/)).then((function(r){var i="\\"===r.charAt(0)?r.slice(1):r;return"\\langle"==r&&(i="⟨",r+=" "),"\\lVert"==r&&(i="∥",r+=" "),F.then((function(a){return t("\\right").skip(n).then(e(/^(?:[\])|]|\\\}|\\rangle\b|\\rVert\b)/)).map((function(e){var t="\\"===e.charAt(0)?e.slice(1):e;"\\rangle"==e&&(t="⟩",e+=" "),"\\rVert"==e&&(t="∥",e+=" ");var n=Oe(0,i,t,r,e);return n.blocks=[a],a.adopt(n,0,0),n}))}))}))}})),x.right=p(B,(function(e){e.parser=function(){return U.fail("unmatched \\right")}}));var ze=x.binom=x.binomial=p(p(B,Le),(function(e,t){e.ctrlSeq="\\binom",e.htmlTemplate='<span class="mq-non-leaf"><span class="mq-paren mq-scaled">(</span><span class="mq-non-leaf"><span class="mq-array mq-non-leaf"><span>&0</span><span>&1</span></span></span><span class="mq-paren mq-scaled">)</span></span>',e.textTemplate=["choose(",",",")"]}));x.choose=p(ze,(function(e){e.createLeftOf=Se.prototype.createLeftOf}));x.editable=x.MathQuillMathField=p(B,(function(e,t){e.ctrlSeq="\\MathQuillMathField",e.htmlTemplate='<span class="mq-editable-field"><span class="mq-root-block">&0</span></span>',e.parser=function(){var e=this,n=U.string,r=U.regex,i=U.succeed;return n("[").then(r(/^[a-z][a-z0-9]*/i)).skip(n("]")).map((function(t){e.name=t})).or(i()).then(t.parser.call(e))},e.finalizeTree=function(e){var t=A(this.ends[h],this.jQ,e);t.KIND_OF_MQ="MathField",t.editable=!0,t.createTextarea(),t.editablesTextareaEvents(),t.cursor.insAtRightEnd(t.root),z(t.root)},e.registerInnerField=function(e,t){e.push(e[this.name]=t(this.ends[h].controller))},e.latex=function(){return this.ends[h].latex()},e.text=function(){return this.ends[h].text()}}));var _e=x.embed=p(Y,(function(e,t){e.setOptions=function(e){function t(){return""}return this.text=e.text||t,this.htmlTemplate=e.htmlString||"",this.latex=e.latex||t,this},e.parser=function(){var e=this,t=U.string,n=U.regex,r=U.succeed;return t("{").then(n(/^[a-z][a-z0-9]*/i)).skip(t("}")).then((function(i){return t("[").then(n(/^[-\w\s]*/)).skip(t("]")).or(r()).map((function(t){return e.setOptions(k[i](t))}))}))}})),Ue={};x.begin=p(B,(function(e,t){e.parser=function(){var e=U.string,t=U.regex;return e("{").then(t(/^[a-z]+/i)).skip(e("}")).then((function(t){return(Ue[t]?Ue[t]().parser():U.fail("unknown environment type: "+t)).skip(e("\\end{"+t+"}"))}))}}));var Ze=p(B,(function(e,t){e.template=[["\\begin{","}"],["\\end{","}"]],e.wrappers=function(){return[e.template[0].join(this.environment),e.template[1].join(this.environment)]}})),Fe=Ue.matrix=p(Ze,(function(e,t){var n="&",a="\\\\";e.parentheses={left:null,right:null},e.environment="matrix",e.reflow=function(){var e=this.jQ.children("table"),t=e.outerHeight()/+e.css("fontSize").slice(0,-2),n=this.jQ.children(".mq-paren");n.length&&ge(n,i(1+.2*(t-1),1.2),1.05*t)},e.latex=function(){var e,t=this.hline,r="";this.eachChild((function(i){void 0!==e&&(e!==i.row?(r+=a+"\n",t&&(r+="\\hline\n",t=!1)):r+=n),e=i.row,r+=i.latex()}));var i=this.options?"{"+this.options+"}":"";return this.wrappers().join(i+"\n"+r+"\n")},e.html=function(){var e,n=[],r="",i=0;function a(e){return e?'<span class="mq-scaled mq-paren">'+e+"</span>":""}return this.eachChild((function(t){e!==t.row&&(e=t.row,r+="<tr>$tds</tr>",n[e]=[]),n[e].push("<td>&"+i+++"</td>")})),this.htmlTemplate='<span class="mq-matrix mq-matrix-'+this.environment+' mq-non-leaf">'+a(this.parentheses.left)+'<table class="mq-non-leaf">'+r.replace(/\$tds/g,(function(){return n.shift().join("")}))+"</table>"+a(this.parentheses.right)+"</span>",t.html.call(this)},e.createBlocks=function(){this.blocks=[Ge(0,this),Ge(0,this),Ge(1,this),Ge(1,this)]},e.parser=function(){var e=this,t=U.optWhitespace,r=U.string;return(0,U.regex)(/^({[clr](\|?[clr])*})?/).then((function(t){return t&&!e.options&&(e.options=t.slice(1,-1)),U.succeed(e)})).then(t.then(r(n).or(r(a)).or(r("\\hline")).or(F.block)).many()).skip(t).then((function(t){var n=[],r=0;function i(){e.blocks.push(Ge(r,e,n)),n=[]}e.blocks=[];for(var o=0;o<t.length;o+=1)t[o]instanceof V?n.push(t[o]):"\\hline"===t[o]?e.hline=!0:(i(),t[o]===a&&(r+=1));return i(),e.autocorrect(),U.succeed(e)}))},e.finalizeTree=function(){var e=this.jQ.find("table");e.toggleClass("mq-rows-1",1===e.find("tr").length),this.relink()},e.relink=function(){for(var e,t,n,r=this.blocks,i=[],a=0;a<r.length;a+=1)e!==(n=r[a]).row&&(i[e=n.row]=[],t=0),i[e][t]=n,n[1]=r[a+1],n[h]=r[a-1],i[e-1]&&i[e-1][t]&&(n.upOutOf=i[e-1][t],i[e-1][t].downOutOf=n),t+=1;this.ends[h]=r[0],this.ends[1]=r[r.length-1]},e.autocorrect=function(e){var t,n,r,i,a,o=[],s=(e=[],this.blocks);for(a=0;a<s.length;a+=1)e[i=s[a].row]=e[i]||[],e[i].push(s[a]),o[i]=e[i].length;if((t=Math.max.apply(null,o))!==Math.min.apply(null,o)){for(a=0;a<e.length;a+=1)for(n=t-e[a].length;n;)r=t*a+e[a].length,s.splice(r,0,Ge(a,this)),n-=1;this.relink()}},e.deleteCell=function(e){var t,n,r=[],i=[],a=[],o=[],s=this.blocks;function l(e){for(var t=[],n=0;n<e.length;n+=1)e[n].isEmpty()&&t.push(e[n]);return t.length===e.length}function c(e){for(var t=0;t<e.length;t+=1)s.indexOf(e[t])>-1&&(e[t].remove(),s.splice(s.indexOf(e[t]),1))}this.eachChild((function(s){t!==s.row&&(t=s.row,r[t]=[],n=0),i[n]=i[n]||[],i[n].push(s),r[t].push(s),s===e&&(a=r[t],o=i[n]),n+=1})),l(a)&&o.length>1&&(t=r.indexOf(a),this.eachChild((function(e){e.row>t&&(e.row-=1)})),c(a),this.jQ.find("tr").eq(t).remove()),l(o)&&a.length>1&&c(o),this.finalizeTree()},e.addRow=function(e){var t,n=[],i=[],a=[],o=m("<tr></tr>"),s=e.row,l=0;this.eachChild((function(e){e.row<=s&&n.push(e),e.row===s&&(l+=1),e.row>s&&(e.row+=1,a.push(e))}));for(var c=0;c<l;c+=1)(t=Ge(s+1)).parent=this,i.push(t),t.jQ=m('<td class="mq-empty">').attr(r,t.id).appendTo(o);return this.jQ.find("tr").eq(s).after(o),this.blocks=n.concat(i,a),i[0]},e.addColumn=function(e){var t,n,i=[],a=[];this.eachChild((function(n){i[n.row]=i[n.row]||[],i[n.row].push(n),n===e&&(t=i[n.row].length)}));for(var o=0;o<i.length;o+=1)(n=Ge(o)).parent=this,a.push(n),i[o].splice(t,0,n),n.jQ=m('<td class="mq-empty">').attr(r,n.id);return this.jQ.find("tr").each((function(e){m(this).find("td").eq(t-1).after(i[e][t].jQ)})),this.blocks=[].concat.apply([],i),a[e.row]},e.insert=function(e,t){var n=this[e](t);this.cursor=this.cursor||this.parent.cursor,this.finalizeTree(),this.bubble("reflow").cursor.insAtRightEnd(n)},e.backspace=function(e,t,n,r){var i=e[t];if(e.isEmpty()){for(this.deleteCell(e);i&&i[t]&&-1===this.blocks.indexOf(i);)i=i[t];i&&n.insAtDirEnd(-t,i),1===this.blocks.length&&this.blocks[0].isEmpty()&&(r(),this.finalizeTree()),this.bubble("edited")}}}));Ue.pmatrix=p(Fe,(function(e,t){e.environment="pmatrix",e.parentheses={left:"(",right:")"}})),Ue.bmatrix=p(Fe,(function(e,t){e.environment="bmatrix",e.parentheses={left:"[",right:"]"}})),Ue.Bmatrix=p(Fe,(function(e,t){e.environment="Bmatrix",e.parentheses={left:"{",right:"}"}})),Ue.vmatrix=p(Fe,(function(e,t){e.environment="vmatrix",e.parentheses={left:"|",right:"|"}})),Ue.Vmatrix=p(Fe,(function(e,t){e.environment="Vmatrix",e.parentheses={left:"‖",right:"‖"}})),Ue.cases=p(Fe,(function(e,t){e.environment="cases",e.parentheses={left:"{",right:null}})),Ue.array=p(Fe,(function(e,t){e.environment="array",e.parentheses={left:null,right:null},e.hline=!0,e.options="l|l"}));var Ge=p(V,(function(e,t){e.init=function(e,n,r){if(t.init.call(this),this.row=e,n&&this.adopt(n,n.ends[1],0),r)for(var i=0;i<r.length;i++)r[i].children().adopt(this,this.ends[1],0)},e.keystroke=function(e,n,r){switch(e){case"Tab":var i,a=this,o=0;if(this.parent.eachChild((function(e){e.row===a.row&&(e===a&&(i=o),o+=1)})),i===o-1)return n.preventDefault(),this.parent.insert("addColumn",this);break;case"Enter":var s,l=this.row+1,c=!0;if(this.parent.eachChild((function(e){e.row===l&&(s||(s=e),e.isEmpty()||(c=!1))})),n.preventDefault(),s&&c){r.cursor.insAtDirEnd(h,s);break}return this.parent.insert("addRow",this)}return t.keystroke.apply(this,arguments)},e.deleteOutOf=function(e,n){var r=this,i=arguments;this.parent.backspace(this,e,n,(function(){return t.deleteOutOf.apply(r,i)}))}})),Be=(w["\\"]=p(B,(function(e,t){e.ctrlSeq="\\",e.replaces=function(e){this._replacedFragment=e.disown(),this.isEmpty=function(){return!1}},e.htmlTemplate='<span class="mq-latex-command-input mq-non-leaf">\\<span>&0</span></span>',e.textTemplate=["\\"],e.createBlocks=function(){t.createBlocks.call(this),this.ends[h].focus=function(){return this.parent.jQ.addClass("mq-hasCursor"),this.isEmpty()&&this.parent.jQ.removeClass("mq-empty"),this},this.ends[h].blur=function(){return this.parent.jQ.removeClass("mq-hasCursor"),this.isEmpty()&&this.parent.jQ.addClass("mq-empty"),this},this.ends[h].write=function(e,t){e.show().deleteSelection(),t.match(/[a-z]/i)?W(t).createLeftOf(e):(this.parent.renderCommand(e),"\\"===t&&this.isEmpty()||e.parent.write(e,t))},this.ends[h].keystroke=function(e,n,r){return"Tab"===e||"Enter"===e||"Spacebar"===e?(this.parent.renderCommand(r.cursor),void n.preventDefault()):t.keystroke.apply(this,arguments)}},e.createLeftOf=function(e){if(t.createLeftOf.call(this,e),this._replacedFragment){var n=this.jQ[0];this.jQ=this._replacedFragment.jQ.addClass("mq-blur").bind("mousedown mousemove",(function(e){return m(e.target=n).trigger(e),!1})).insertBefore(this.jQ).add(this.jQ)}},e.latex=function(){return"\\"+this.ends[h].latex()+" "},e.renderCommand=function(e){this.jQ=this.jQ.last(),this.remove(),this[1]?e.insLeftOf(this[1]):e.insAtRightEnd(this.parent);var t=this.ends[h].latex();t||(t=" ");var n=x[t]||Ue[t];n?(n=n(t),this._replacedFragment&&n.replaces(this._replacedFragment),n.createLeftOf(e)):((n=Q()).replaces(t),n.createLeftOf(e),e.insRightOf(n),this._replacedFragment&&this._replacedFragment.remove())}})),P(1));for(var Ye in Be)!function(e,t){"function"==typeof t?(D[e]=function(){return j(),t.apply(this,arguments)},D[e].prototype=t.prototype):D[e]=t}(Ye,Be[Ye]);"object"==typeof e.exports&&(e.exports=D)}()},function(e,t,n){"use strict";(function(e,r){var i,a=n(70);i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var o=Object(a.a)(i);t.a=o}).call(this,n(11),n(17)(e))},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,c=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var e=s(f);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||u||s(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var i=r(n(45)),a=new Set(["input","option","optgroup","select","button","datalist","textarea"]),o=new Set(["p"]),s={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:o,h1:o,h2:o,h3:o,h4:o,h5:o,h6:o,select:a,input:a,output:a,button:a,datalist:a,textarea:a,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:o,article:o,aside:o,blockquote:o,details:o,div:o,dl:o,fieldset:o,figcaption:o,figure:o,footer:o,form:o,header:o,hr:o,main:o,nav:o,ol:o,pre:o,section:o,table:o,ul:o,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},l=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),c=new Set(["math","svg"]),u=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),d=/\s|\//,f=function(){function e(e,t){var n,r,a,o,s;void 0===t&&(t={}),this.startIndex=0,this.endIndex=null,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.options=t,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(n=t.lowerCaseTags)&&void 0!==n?n:!t.xmlMode,this.lowerCaseAttributeNames=null!==(r=t.lowerCaseAttributeNames)&&void 0!==r?r:!t.xmlMode,this.tokenizer=new(null!==(a=t.Tokenizer)&&void 0!==a?a:i.default)(this.options,this),null===(s=(o=this.cbs).onparserinit)||void 0===s||s.call(o,this)}return e.prototype.updatePosition=function(e){null===this.endIndex?this.tokenizer.sectionStart<=e?this.startIndex=0:this.startIndex=this.tokenizer.sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this.tokenizer.getAbsoluteIndex()},e.prototype.ontext=function(e){var t,n;this.updatePosition(1),this.endIndex--,null===(n=(t=this.cbs).ontext)||void 0===n||n.call(t,e)},e.prototype.onopentagname=function(e){var t,n;if(this.lowerCaseTagNames&&(e=e.toLowerCase()),this.tagname=e,!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(s,e))for(var r=void 0;this.stack.length>0&&s[e].has(r=this.stack[this.stack.length-1]);)this.onclosetag(r);!this.options.xmlMode&&l.has(e)||(this.stack.push(e),c.has(e)?this.foreignContext.push(!0):u.has(e)&&this.foreignContext.push(!1)),null===(n=(t=this.cbs).onopentagname)||void 0===n||n.call(t,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.onopentagend=function(){var e,t;this.updatePosition(1),this.attribs&&(null===(t=(e=this.cbs).onopentag)||void 0===t||t.call(e,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&l.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},e.prototype.onclosetag=function(e){if(this.updatePosition(1),this.lowerCaseTagNames&&(e=e.toLowerCase()),(c.has(e)||u.has(e))&&this.foreignContext.pop(),!this.stack.length||!this.options.xmlMode&&l.has(e))this.options.xmlMode||"br"!==e&&"p"!==e||(this.onopentagname(e),this.closeCurrentTag());else{var t=this.stack.lastIndexOf(e);if(-1!==t)if(this.cbs.onclosetag)for(t=this.stack.length-t;t--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=t;else"p"!==e||this.options.xmlMode||(this.onopentagname(e),this.closeCurrentTag())}},e.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},e.prototype.closeCurrentTag=function(){var e,t,n=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===n&&(null===(t=(e=this.cbs).onclosetag)||void 0===t||t.call(e,n),this.stack.pop())},e.prototype.onattribname=function(e){this.lowerCaseAttributeNames&&(e=e.toLowerCase()),this.attribname=e},e.prototype.onattribdata=function(e){this.attribvalue+=e},e.prototype.onattribend=function(e){var t,n;null===(n=(t=this.cbs).onattribute)||void 0===n||n.call(t,this.attribname,this.attribvalue,e),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(d),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},e.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+t,"!"+e)}},e.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+t,"?"+e)}},e.prototype.oncomment=function(e){var t,n,r,i;this.updatePosition(4),null===(n=(t=this.cbs).oncomment)||void 0===n||n.call(t,e),null===(i=(r=this.cbs).oncommentend)||void 0===i||i.call(r)},e.prototype.oncdata=function(e){var t,n,r,i,a,o;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?(null===(n=(t=this.cbs).oncdatastart)||void 0===n||n.call(t),null===(i=(r=this.cbs).ontext)||void 0===i||i.call(r,e),null===(o=(a=this.cbs).oncdataend)||void 0===o||o.call(a)):this.oncomment("[CDATA["+e+"]]")},e.prototype.onerror=function(e){var t,n;null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,e)},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag)for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n]));null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,n,r;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],null===(r=(n=this.cbs).onparserinit)||void 0===r||r.call(n,this)},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.write=function(e){this.tokenizer.write(e)},e.prototype.end=function(e){this.tokenizer.end(e)},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){this.tokenizer.resume()},e.prototype.parseChunk=function(e){this.write(e)},e.prototype.done=function(e){this.end(e)},e}();t.Parser=f},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(46)),a=r(n(26)),o=r(n(47)),s=r(n(27));function l(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function c(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function u(e,t,n){var r=e.toLowerCase();return e===r?function(e,i){i===r?e._state=t:(e._state=n,e._index--)}:function(i,a){a===r||a===e?i._state=t:(i._state=n,i._index--)}}function d(e,t){var n=e.toLowerCase();return function(r,i){i===n||i===e?r._state=t:(r._state=3,r._index--)}}var f=u("C",24,16),p=u("D",25,16),h=u("A",26,16),g=u("T",27,16),m=u("A",28,16),y=d("R",35),v=d("I",36),b=d("P",37),I=d("T",38),x=u("R",40,1),w=u("I",41,1),T=u("P",42,1),M=u("T",43,1),A=d("Y",45),C=d("L",46),E=d("E",47),N=u("Y",49,1),S=u("L",50,1),k=u("E",51,1),j=d("I",54),D=d("T",55),L=d("L",56),O=d("E",57),P=u("I",58,1),R=u("T",59,1),z=u("L",60,1),_=u("E",61,1),U=u("#",63,64),Z=u("X",66,65),F=function(){function e(e,t){var n;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=t,this.xmlMode=!!(null==e?void 0:e.xmlMode),this.decodeEntities=null===(n=null==e?void 0:e.decodeEntities)||void 0===n||n}return e.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},e.prototype.write=function(e){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=e,this.parse()},e.prototype.end=function(e){this.ended&&this.cbs.onerror(Error(".end() after done!")),e&&this.write(e),this.ended=!0,this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this._index<this.buffer.length&&this.parse(),this.ended&&this.finish()},e.prototype.getAbsoluteIndex=function(){return this.bufferOffset+this._index},e.prototype.stateText=function(e){"<"===e?(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):!this.decodeEntities||"&"!==e||1!==this.special&&4!==this.special||(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},e.prototype.stateBeforeTagName=function(e){"/"===e?this._state=5:"<"===e?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):">"===e||1!==this.special||l(e)?this._state=1:"!"===e?(this._state=15,this.sectionStart=this._index+1):"?"===e?(this._state=17,this.sectionStart=this._index+1):c(e)?(this._state=this.xmlMode||"s"!==e&&"S"!==e?this.xmlMode||"t"!==e&&"T"!==e?3:52:32,this.sectionStart=this._index):this._state=1},e.prototype.stateInTagName=function(e){("/"===e||">"===e||l(e))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},e.prototype.stateBeforeClosingTagName=function(e){l(e)||(">"===e?this._state=1:1!==this.special?"s"===e||"S"===e?this._state=33:"t"===e||"T"===e?this._state=53:(this._state=1,this._index--):c(e)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},e.prototype.stateInClosingTagName=function(e){(">"===e||l(e))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},e.prototype.stateAfterClosingTagName=function(e){">"===e&&(this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeAttributeName=function(e){">"===e?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):"/"===e?this._state=4:l(e)||(this._state=9,this.sectionStart=this._index)},e.prototype.stateInSelfClosingTag=function(e){">"===e?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):l(e)||(this._state=8,this._index--)},e.prototype.stateInAttributeName=function(e){("="===e||"/"===e||">"===e||l(e))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},e.prototype.stateAfterAttributeName=function(e){"="===e?this._state=11:"/"===e||">"===e?(this.cbs.onattribend(void 0),this._state=8,this._index--):l(e)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},e.prototype.stateBeforeAttributeValue=function(e){'"'===e?(this._state=12,this.sectionStart=this._index+1):"'"===e?(this._state=13,this.sectionStart=this._index+1):l(e)||(this._state=14,this.sectionStart=this._index,this._index--)},e.prototype.handleInAttributeValue=function(e,t){e===t?(this.emitToken("onattribdata"),this.cbs.onattribend(t),this._state=8):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,'"')},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"'")},e.prototype.stateInAttributeValueNoQuotes=function(e){l(e)||">"===e?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateBeforeDeclaration=function(e){this._state="["===e?23:"-"===e?18:16},e.prototype.stateInDeclaration=function(e){">"===e&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateInProcessingInstruction=function(e){">"===e&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeComment=function(e){"-"===e?(this._state=19,this.sectionStart=this._index+1):this._state=16},e.prototype.stateInComment=function(e){"-"===e&&(this._state=21)},e.prototype.stateInSpecialComment=function(e){">"===e&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateAfterComment1=function(e){this._state="-"===e?22:19},e.prototype.stateAfterComment2=function(e){">"===e?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"-"!==e&&(this._state=19)},e.prototype.stateBeforeCdata6=function(e){"["===e?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},e.prototype.stateInCdata=function(e){"]"===e&&(this._state=30)},e.prototype.stateAfterCdata1=function(e){this._state="]"===e?31:29},e.prototype.stateAfterCdata2=function(e){">"===e?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"]"!==e&&(this._state=29)},e.prototype.stateBeforeSpecialS=function(e){"c"===e||"C"===e?this._state=34:"t"===e||"T"===e?this._state=44:(this._state=3,this._index--)},e.prototype.stateBeforeSpecialSEnd=function(e){2!==this.special||"c"!==e&&"C"!==e?3!==this.special||"t"!==e&&"T"!==e?this._state=1:this._state=48:this._state=39},e.prototype.stateBeforeSpecialLast=function(e,t){("/"===e||">"===e||l(e))&&(this.special=t),this._state=3,this._index--},e.prototype.stateAfterSpecialLast=function(e,t){">"===e||l(e)?(this.special=1,this._state=6,this.sectionStart=this._index-t,this._index--):this._state=1},e.prototype.parseFixedEntity=function(e){if(void 0===e&&(e=this.xmlMode?s.default:a.default),this.sectionStart+1<this._index){var t=this.buffer.substring(this.sectionStart+1,this._index);Object.prototype.hasOwnProperty.call(e,t)&&(this.emitPartial(e[t]),this.sectionStart=this._index+1)}},e.prototype.parseLegacyEntity=function(){for(var e=this.sectionStart+1,t=Math.min(this._index-e,6);t>=2;){var n=this.buffer.substr(e,t);if(Object.prototype.hasOwnProperty.call(o.default,n))return this.emitPartial(o.default[n]),void(this.sectionStart+=t+1);t--}},e.prototype.stateInNamedEntity=function(e){";"===e?(this.parseFixedEntity(),1===this.baseState&&this.sectionStart+1<this._index&&!this.xmlMode&&this.parseLegacyEntity(),this._state=this.baseState):(e<"0"||e>"9")&&!c(e)&&(this.xmlMode||this.sectionStart+1===this._index||(1!==this.baseState?"="!==e&&this.parseFixedEntity(o.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},e.prototype.decodeNumericEntity=function(e,t,n){var r=this.sectionStart+e;if(r!==this._index){var a=this.buffer.substring(r,this._index),o=parseInt(a,t);this.emitPartial(i.default(o)),this.sectionStart=n?this._index+1:this._index}this._state=this.baseState},e.prototype.stateInNumericEntity=function(e){";"===e?this.decodeNumericEntity(2,10,!0):(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},e.prototype.stateInHexEntity=function(e){";"===e?this.decodeNumericEntity(3,16,!0):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},e.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(1===this._state?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},e.prototype.parse=function(){for(;this._index<this.buffer.length&&this.running;){var e=this.buffer.charAt(this._index);1===this._state?this.stateText(e):12===this._state?this.stateInAttributeValueDoubleQuotes(e):9===this._state?this.stateInAttributeName(e):19===this._state?this.stateInComment(e):20===this._state?this.stateInSpecialComment(e):8===this._state?this.stateBeforeAttributeName(e):3===this._state?this.stateInTagName(e):6===this._state?this.stateInClosingTagName(e):2===this._state?this.stateBeforeTagName(e):10===this._state?this.stateAfterAttributeName(e):13===this._state?this.stateInAttributeValueSingleQuotes(e):11===this._state?this.stateBeforeAttributeValue(e):5===this._state?this.stateBeforeClosingTagName(e):7===this._state?this.stateAfterClosingTagName(e):32===this._state?this.stateBeforeSpecialS(e):21===this._state?this.stateAfterComment1(e):14===this._state?this.stateInAttributeValueNoQuotes(e):4===this._state?this.stateInSelfClosingTag(e):16===this._state?this.stateInDeclaration(e):15===this._state?this.stateBeforeDeclaration(e):22===this._state?this.stateAfterComment2(e):18===this._state?this.stateBeforeComment(e):33===this._state?this.stateBeforeSpecialSEnd(e):53===this._state?P(this,e):39===this._state?x(this,e):40===this._state?w(this,e):41===this._state?T(this,e):34===this._state?y(this,e):35===this._state?v(this,e):36===this._state?b(this,e):37===this._state?I(this,e):38===this._state?this.stateBeforeSpecialLast(e,2):42===this._state?M(this,e):43===this._state?this.stateAfterSpecialLast(e,6):44===this._state?A(this,e):29===this._state?this.stateInCdata(e):45===this._state?C(this,e):46===this._state?E(this,e):47===this._state?this.stateBeforeSpecialLast(e,3):48===this._state?N(this,e):49===this._state?S(this,e):50===this._state?k(this,e):51===this._state?this.stateAfterSpecialLast(e,5):52===this._state?j(this,e):54===this._state?D(this,e):55===this._state?L(this,e):56===this._state?O(this,e):57===this._state?this.stateBeforeSpecialLast(e,4):58===this._state?R(this,e):59===this._state?z(this,e):60===this._state?_(this,e):61===this._state?this.stateAfterSpecialLast(e,5):17===this._state?this.stateInProcessingInstruction(e):64===this._state?this.stateInNamedEntity(e):23===this._state?f(this,e):62===this._state?U(this,e):24===this._state?p(this,e):25===this._state?h(this,e):30===this._state?this.stateAfterCdata1(e):31===this._state?this.stateAfterCdata2(e):26===this._state?g(this,e):27===this._state?m(this,e):28===this._state?this.stateBeforeCdata6(e):66===this._state?this.stateInHexEntity(e):65===this._state?this.stateInNumericEntity(e):63===this._state?Z(this,e):this.cbs.onerror(Error("unknown _state"),this._state),this._index++}this.cleanup()},e.prototype.finish=function(){this.sectionStart<this._index&&this.handleTrailingData(),this.cbs.onend()},e.prototype.handleTrailingData=function(){var e=this.buffer.substr(this.sectionStart);29===this._state||30===this._state||31===this._state?this.cbs.oncdata(e):19===this._state||21===this._state||22===this._state?this.cbs.oncomment(e):64!==this._state||this.xmlMode?65!==this._state||this.xmlMode?66!==this._state||this.xmlMode?3!==this._state&&8!==this._state&&11!==this._state&&10!==this._state&&9!==this._state&&13!==this._state&&12!==this._state&&14!==this._state&&6!==this._state&&this.cbs.ontext(e):(this.decodeNumericEntity(3,16,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.decodeNumericEntity(2,10,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.parseLegacyEntity(),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData()))},e.prototype.getSection=function(){return this.buffer.substring(this.sectionStart,this._index)},e.prototype.emitToken=function(e){this.cbs[e](this.getSection()),this.sectionStart=-1},e.prototype.emitPartial=function(e){1!==this.baseState?this.cbs.onattribdata(e):this.cbs.ontext(e)},e}();t.default=F},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(93));t.default=function(e){if(e>=55296&&e<=57343||e>1114111)return"�";e in i.default&&(e=i.default[e]);var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}},function(e){e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","QUOT":"\\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}')},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(49);i(n(49),t);var o=/\s+/g,s={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){var e;this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null!==(e=this.parser)&&void 0!==e?e:null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=new a.Element(e,t);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,n=this.lastNode;if(n&&"text"===n.type)t?n.data=(n.data+e).replace(o," "):n.data+=e;else{t&&(e=e.replace(o," "));var r=new a.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&"comment"===this.lastNode.type)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.NodeWithChildren("cdata",[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new a.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e.prototype.addDataNode=function(e){this.addNode(e),this.lastNode=e},e}();t.DomHandler=l,t.default=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return(a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var o=new Map([["tag",1],["script",1],["style",1],["directive",1],["text",3],["cdata",4],["comment",8],["root",9]]),s=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=o.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),g(this,e)},e}();t.Node=s;var l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.data=n,r}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=l;var c=function(e){function t(t){return e.call(this,"text",t)||this}return i(t,e),t}(l);t.Text=c;var u=function(e){function t(t){return e.call(this,"comment",t)||this}return i(t,e),t}(l);t.Comment=u;var d=function(e){function t(t,n){var r=e.call(this,"directive",n)||this;return r.name=t,r}return i(t,e),t}(l);t.ProcessingInstruction=d;var f=function(e){function t(t,n){var r=e.call(this,t)||this;return r.children=n,r}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=f;var p=function(e){function t(t){return e.call(this,"root",t)||this}return i(t,e),t}(f);t.Document=p;var h=function(e){function t(t,n,r){void 0===r&&(r=[]);var i=e.call(this,"script"===t?"script":"style"===t?"style":"tag",r)||this;return i.name=t,i.attribs=n,i.attribs=n,i}return i(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(f);function g(e,t){var n;switch(void 0===t&&(t=!1),e.type){case"text":n=new c(e.data);break;case"directive":var r=e;n=new d(r.name,r.data),null!=r["x-name"]&&(n["x-name"]=r["x-name"],n["x-publicId"]=r["x-publicId"],n["x-systemId"]=r["x-systemId"]);break;case"comment":n=new u(e.data);break;case"tag":case"script":case"style":var i=e,o=t?m(i.children):[],s=new h(i.name,a({},i.attribs),o);o.forEach((function(e){return e.parent=s})),i["x-attribsNamespace"]&&(s["x-attribsNamespace"]=a({},i["x-attribsNamespace"])),i["x-attribsPrefix"]&&(s["x-attribsPrefix"]=a({},i["x-attribsPrefix"])),n=s;break;case"cdata":o=t?m(e.children):[];var l=new f(e.type,o);o.forEach((function(e){return e.parent=l})),n=l;break;case"root":var g=e,y=(o=t?m(g.children):[],new p(o));o.forEach((function(e){return e.parent=y})),g["x-mode"]&&(y["x-mode"]=g["x-mode"]),n=y;break;case"doctype":throw new Error("Not implemented yet: ElementType.Doctype case")}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,n}function m(e){for(var t=e.map((function(e){return g(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=h,t.cloneNode=g},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return o(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseFeed=t.FeedHandler=void 0;var c,u,d=l(n(48)),f=s(n(51)),p=n(44);!function(e){e[e.image=0]="image",e[e.audio=1]="audio",e[e.video=2]="video",e[e.document=3]="document",e[e.executable=4]="executable"}(c||(c={})),function(e){e[e.sample=0]="sample",e[e.full=1]="full",e[e.nonstop=2]="nonstop"}(u||(u={}));var h=function(e){function t(t,n){return"object"==typeof t&&(n=t=void 0),e.call(this,t,n)||this}return i(t,e),t.prototype.onend=function(){var e,t,n=y(x,this.dom);if(n){var r={};if("feed"===n.name){var i=n.children;r.type="atom",I(r,"id","id",i),I(r,"title","title",i);var a=b("href",y("link",i));a&&(r.link=a),I(r,"description","subtitle",i),(o=v("updated",i))&&(r.updated=new Date(o)),I(r,"author","email",i,!0),r.items=m("entry",i).map((function(e){var t={},n=e.children;I(t,"id","id",n),I(t,"title","title",n);var r=b("href",y("link",n));r&&(t.link=r);var i=v("summary",n)||v("content",n);i&&(t.description=i);var a=v("updated",n);return a&&(t.pubDate=new Date(a)),t.media=g(n),t}))}else{var o;i=null!==(t=null===(e=y("channel",n.children))||void 0===e?void 0:e.children)&&void 0!==t?t:[];r.type=n.name.substr(0,3),r.id="",I(r,"title","title",i),I(r,"link","link",i),I(r,"description","description",i),(o=v("lastBuildDate",i))&&(r.updated=new Date(o)),I(r,"author","managingEditor",i,!0),r.items=m("item",n.children).map((function(e){var t={},n=e.children;I(t,"id","guid",n),I(t,"title","title",n),I(t,"link","link",n),I(t,"description","description",n);var r=v("pubDate",n);return r&&(t.pubDate=new Date(r)),t.media=g(n),t}))}this.feed=r,this.handleCallback(null)}else this.handleCallback(new Error("couldn't find root of feed"))},t}(d.default);function g(e){return m("media:content",e).map((function(e){var t={medium:e.attribs.medium,isDefault:!!e.attribs.isDefault};return e.attribs.url&&(t.url=e.attribs.url),e.attribs.fileSize&&(t.fileSize=parseInt(e.attribs.fileSize,10)),e.attribs.type&&(t.type=e.attribs.type),e.attribs.expression&&(t.expression=e.attribs.expression),e.attribs.bitrate&&(t.bitrate=parseInt(e.attribs.bitrate,10)),e.attribs.framerate&&(t.framerate=parseInt(e.attribs.framerate,10)),e.attribs.samplingrate&&(t.samplingrate=parseInt(e.attribs.samplingrate,10)),e.attribs.channels&&(t.channels=parseInt(e.attribs.channels,10)),e.attribs.duration&&(t.duration=parseInt(e.attribs.duration,10)),e.attribs.height&&(t.height=parseInt(e.attribs.height,10)),e.attribs.width&&(t.width=parseInt(e.attribs.width,10)),e.attribs.lang&&(t.lang=e.attribs.lang),t}))}function m(e,t){return f.getElementsByTagName(e,t,!0)}function y(e,t){return f.getElementsByTagName(e,t,!0,1)[0]}function v(e,t,n){return void 0===n&&(n=!1),f.getText(f.getElementsByTagName(e,t,n,1)).trim()}function b(e,t){return t?t.attribs[e]:null}function I(e,t,n,r,i){void 0===i&&(i=!1);var a=v(n,r,i);a&&(e[t]=a)}function x(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}t.FeedHandler=h,t.parseFeed=function(e,t){void 0===t&&(t={xmlMode:!0});var n=new h(t);return new p.Parser(n,t).end(e),n.feed}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(95),t),i(n(99),t),i(n(100),t),i(n(55),t),i(n(101),t),i(n(102),t),i(n(12),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTag=function(e){return"tag"===e.type||"script"===e.type||"style"===e.type},t.Text="text",t.Directive="directive",t.Comment="comment",t.Script="script",t.Style="style",t.Tag="tag",t.CDATA="cdata",t.Doctype="doctype"},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(26)),a=r(n(47)),o=r(n(27)),s=r(n(46));function l(e){var t=Object.keys(e).join("|"),n=u(e),r=new RegExp("&(?:"+(t+="|#[xX][\\da-fA-F]+|#\\d+")+");","g");return function(e){return String(e).replace(r,n)}}t.decodeXML=l(o.default),t.decodeHTMLStrict=l(i.default);var c=function(e,t){return e<t?1:-1};function u(e){return function(t){return"#"===t.charAt(1)?"X"===t.charAt(2)||"x"===t.charAt(2)?s.default(parseInt(t.substr(3),16)):s.default(parseInt(t.substr(2),10)):e[t.slice(1,-1)]}}t.decodeHTML=function(){for(var e=Object.keys(a.default).sort(c),t=Object.keys(i.default).sort(c),n=0,r=0;n<t.length;n++)e[r]===t[n]?(t[n]+=";?",r++):t[n]+=";";var o=new RegExp("&(?:"+t.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),s=u(i.default);function l(e){return";"!==e.substr(-1)&&(e+=";"),s(e)}return function(e){return String(e).replace(o,l)}}()},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=l(r(n(27)).default),a=c(i);t.encodeXML=h(i,a);var o=l(r(n(26)).default),s=c(o);function l(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function c(e){var t=[],n=[];return Object.keys(e).forEach((function(e){return 1===e.length?t.push("\\"+e):n.push(e)})),n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}t.encodeHTML=h(o,s);var u=/[^\0-\x7F]/g,d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function f(e){return"&#x"+e.charCodeAt(0).toString(16).toUpperCase()+";"}function p(e,t){return"&#x"+(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536).toString(16).toUpperCase()+";"}function h(e,t){return function(n){return n.replace(t,(function(t){return e[t]})).replace(d,p).replace(u,f)}}var g=c(i);t.escape=function(e){return e.replace(g,f).replace(d,p).replace(u,f)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var r=n(12);function i(e,t,n,a){for(var o=[],s=0,l=t;s<l.length;s++){var c=l[s];if(e(c)&&(o.push(c),--a<=0))break;if(n&&r.hasChildren(c)&&c.children.length>0){var u=i(e,c.children,n,a);if(o.push.apply(o,u),(a-=u.length)<=0)break}}return o}t.filter=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),Array.isArray(t)||(t=[t]),i(e,t,n,r)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,n,i){void 0===i&&(i=!0);for(var a=null,o=0;o<n.length&&!a;o++){var s=n[o];r.isTag(s)&&(t(s)?a=s:i&&s.children.length>0&&(a=e(t,s.children)))}return a},t.existsOne=function e(t,n){return n.some((function(n){return r.isTag(n)&&(t(n)||n.children.length>0&&e(t,n.children))}))},t.findAll=function(e,t){for(var n,i,a=[],o=t.filter(r.isTag);i=o.shift();){var s=null===(n=i.children)||void 0===n?void 0:n.filter(r.isTag);s&&s.length>0&&o.unshift.apply(o,s),e(i)&&a.push(i)}return a}},function(e,t){},function(e,t,n){"use strict";const r={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1};class i{constructor(e){this.builder=e}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}document(e){this.body(e)}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{let i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],a=this.raw(i,"before");a&&this.builder(a),this.stringify(i,t!==r||n)}}block(e,t){let n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}raw(e,t,n){let i;if(n||(n=t),t&&(i=e.raws[t],void 0!==i))return i;let a=e.parent;if("before"===n){if(!a||"root"===a.type&&a.first===e)return"";if(a&&"document"===a.type)return""}if(!a)return r[n];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[n])return o.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let r="raw"+((s=n)[0].toUpperCase()+s.slice(1));this[r]?i=this[r](o,e):o.walk(e=>{if(i=e.raws[t],void 0!==i)return!1})}var s;return void 0===i&&(i=r[n]),o.rawCache[n]=i,i}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let r=e.parent,i=0;for(;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)n+=t}return n}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}}e.exports=i,i.default=i},function(e,t,n){"use strict";let{isClean:r,my:i}=n(29),a=n(59),o=n(20),s=n(9),l=n(33),c=(n(62),n(34)),u=n(35),d=n(13);const f={document:"Document",root:"Root",atrule:"AtRule",rule:"Rule",decl:"Declaration",comment:"Comment"},p={postcssPlugin:!0,prepare:!0,Once:!0,Document:!0,Root:!0,Declaration:!0,Rule:!0,AtRule:!0,Comment:!0,DeclarationExit:!0,RuleExit:!0,AtRuleExit:!0,CommentExit:!0,RootExit:!0,DocumentExit:!0,OnceExit:!0},h={postcssPlugin:!0,prepare:!0,Once:!0};function g(e){return"object"==typeof e&&"function"==typeof e.then}function m(e){let t=!1,n=f[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function y(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:m(e),{node:e,events:t,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function v(e){return e[r]=!1,e.nodes&&e.nodes.forEach(e=>v(e)),e}let b={};class I{constructor(e,t,n){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof I||t instanceof c)r=v(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=u;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{r=e(t,n)}catch(e){this.processed=!0,this.error=e}r&&!r[i]&&s.rebuild(r)}else r=v(t);this.result=new c(e,r,n),this.helpers={...b,result:this.result,postcss:b},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}get[Symbol.toStringTag](){return"LazyResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,t){return this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(g(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r];)e[r]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=o;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new a(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}walkSync(e){e[r]=!0;let t=m(e);for(let n of t)if(0===n)e.nodes&&e.each(e=>{e[r]||this.walkSync(e)});else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}visitSync(e,t){for(let[n,r]of e){let e;this.result.lastPlugin=n;try{e=r(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(g(e))throw this.getAsyncError()}}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return g(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(g(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r];){e[r]=!0;let t=[y(e)];for(;t.length>0;){let e=this.visitTick(t);if(g(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!p[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!h[n])if("object"==typeof t[n])for(let r in t[n])e(t,"*"===r?n:n+"-"+r.toLowerCase(),t[n][r]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let t=e[e.length-1],{node:n,visitors:i}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(i.length>0&&t.visitorIndex<i.length){let[e,r]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return r(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let i,a=t.iterator;for(;i=n.nodes[n.indexes[a]];)if(n.indexes[a]+=1,!i[r])return i[r]=!0,void e.push(y(i));t.iterator=0,delete n.indexes[a]}let a=t.events;for(;t.eventIndex<a.length;){let e=a[t.eventIndex];if(t.eventIndex+=1,0===e)return void(n.nodes&&n.nodes.length&&(n[r]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}}I.registerPostcss=e=>{b=e},e.exports=I,I.default=I,d.registerLazyResult(I),l.registerLazyResult(I)},function(e,t,n){"use strict";(function(t){let{SourceMapConsumer:r,SourceMapGenerator:i}=n(31),{dirname:a,resolve:o,relative:s,sep:l}=n(32),{pathToFileURL:c}=n(60),u=n(21),d=Boolean(r&&i),f=Boolean(a&&o&&s&&l);e.exports=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new u(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;n&&!e[n]&&(e[n]=!0,this.map.setSourceContent(this.toUrl(this.path(n)),t.source.input.css))}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),i=e.root||a(e.file);!1===this.mapOpts.sourcesContent?(t=new r(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map(()=>null))):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(i)))}}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}toBase64(e){return t?t.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=i.fromSourceMap(e)}else this.map=new i({file:this.outputFile()}),this.map.addMapping({source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",generated:{line:1,column:0},original:{line:1,column:0}});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}path(e){if(0===e.indexOf("<"))return e;if(/^\w+:\/\//.test(e))return e;if(this.mapOpts.absolute)return e;let t=this.opts.to?a(this.opts.to):".";return"string"==typeof this.mapOpts.annotation&&(t=a(o(t,this.mapOpts.annotation))),e=s(t,e)}toUrl(e){return"\\"===l&&(e=e.replace(/\\/g,"/")),encodeURI(e).replace(/[#?]/g,encodeURIComponent)}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);if(this.mapOpts.absolute){if(c)return c(e.source.input.from).toString();throw new Error("`map.absolute` option is not available in this PostCSS build")}return this.toUrl(this.path(e.source.input.from))}generateString(){this.css="",this.map=new i({file:this.outputFile()});let e,t,n=1,r=1,a={source:"",generated:{line:0,column:0},original:{line:0,column:0}};this.stringify(this.root,(i,o,s)=>{if(this.css+=i,o&&"end"!==s&&(a.generated.line=n,a.generated.column=r-1,o.source&&o.source.start?(a.source=this.sourcePath(o),a.original.line=o.source.start.line,a.original.column=o.source.start.column-1,this.map.addMapping(a)):(a.source="<no source>",a.original.line=1,a.original.column=0,this.map.addMapping(a))),e=i.match(/\n/g),e?(n+=e.length,t=i.lastIndexOf("\n"),r=i.length-t):r+=i.length,o&&"start"!==s){let e=o.parent||{raws:{}};("decl"!==o.type||o!==e.last||e.raws.semicolon)&&(o.source&&o.source.end?(a.source=this.sourcePath(o),a.original.line=o.source.end.line,a.original.column=o.source.end.column-1,a.generated.line=n,a.generated.column=r-2,this.map.addMapping(a)):(a.source="<no source>",a.original.line=1,a.original.column=0,a.generated.line=n,a.generated.column=r-1,this.map.addMapping(a)))}})}generate(){if(this.clearAnnotation(),f&&d&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}}}).call(this,n(30).Buffer)},function(e,t){},function(e,t,n){"use strict";(function(t){let{SourceMapConsumer:r,SourceMapGenerator:i}=n(31),{existsSync:a,readFileSync:o}=n(113),{dirname:s,join:l}=n(32);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,t){return!!e&&e.substr(0,t.length)===t}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return n=e.substr(RegExp.lastMatch.length),t?t.from(n,"base64").toString():window.atob(n);var n;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}loadFile(e){if(this.root=s(e),a(e))return this.mapFile=e,o(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=l(s(e),t)),this.loadFile(t)}}}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}}e.exports=c,c.default=c}).call(this,n(30).Buffer)},function(e,t,n){"use strict";let r={};e.exports=function(e){r[e]||(r[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},function(e,t,n){"use strict";class r{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=r,r.default=r},function(e,t,n){"use strict";let r={split(e,t,n){let r=[],i="",a=!1,o=0,s=!1,l=!1;for(let n of e)l?l=!1:"\\"===n?l=!0:s?n===s&&(s=!1):'"'===n||"'"===n?s=n:"("===n?o+=1:")"===n?o>0&&(o-=1):0===o&&t.includes(n)&&(a=!0),a?(""!==i&&r.push(i.trim()),i="",a=!1):i+=n;return(n||""!==i)&&r.push(i.trim()),r},space:e=>r.split(e,[" ","\n","\t"]),comma:e=>r.split(e,[","],!0)};e.exports=r,r.default=r},function(e,t,n){"use strict";t.a=function(){return!1}},function(e,t,n){var r=n(76),i=n(77),a=n(78),o=n(80);e.exports=function(e,t){return r(e)||i(e,t)||a(e,t)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";t.a="data:image/gif;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZC5pbmZvACH5BAAKAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAAKAAEALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0KDV4EEEAQLiF18TAYNXDaSe3x6mjidN1s3IQAh+QQACgACACwAAAAAEAAQAAAFeCAgAgLZDGU5jgRECEUiCI+yioSDwDJyLKsXoHFQxBSHAoAAFBhqtMJg8DgQBgfrEsJAEAg4YhZIEiwgKtHiMBgtpg3wbUZXGO7kOb1MUKRFMysCChAoggJCIg0GC2aNe4gqQldfL4l/Ag1AXySJgn5LcoE3QXI3IQAh+QQACgADACwAAAAAEAAQAAAFdiAgAgLZNGU5joQhCEjxIssqEo8bC9BRjy9Ag7GILQ4QEoE0gBAEBcOpcBA0DoxSK/e8LRIHn+i1cK0IyKdg0VAoljYIg+GgnRrwVS/8IAkICyosBIQpBAMoKy9dImxPhS+GKkFrkX+TigtLlIyKXUF+NjagNiEAIfkEAAoABAAsAAAAABAAEAAABWwgIAICaRhlOY4EIgjH8R7LKhKHGwsMvb4AAy3WODBIBBKCsYA9TjuhDNDKEVSERezQEL0WrhXucRUQGuik7bFlngzqVW9LMl9XWvLdjFaJtDFqZ1cEZUB0dUgvL3dgP4WJZn4jkomWNpSTIyEAIfkEAAoABQAsAAAAABAAEAAABX4gIAICuSxlOY6CIgiD8RrEKgqGOwxwUrMlAoSwIzAGpJpgoSDAGifDY5kopBYDlEpAQBwevxfBtRIUGi8xwWkDNBCIwmC9Vq0aiQQDQuK+VgQPDXV9hCJjBwcFYU5pLwwHXQcMKSmNLQcIAExlbH8JBwttaX0ABAcNbWVbKyEAIfkEAAoABgAsAAAAABAAEAAABXkgIAICSRBlOY7CIghN8zbEKsKoIjdFzZaEgUBHKChMJtRwcWpAWoWnifm6ESAMhO8lQK0EEAV3rFopIBCEcGwDKAqPh4HUrY4ICHH1dSoTFgcHUiZjBhAJB2AHDykpKAwHAwdzf19KkASIPl9cDgcnDkdtNwiMJCshACH5BAAKAAcALAAAAAAQABAAAAV3ICACAkkQZTmOAiosiyAoxCq+KPxCNVsSMRgBsiClWrLTSWFoIQZHl6pleBh6suxKMIhlvzbAwkBWfFWrBQTxNLq2RG2yhSUkDs2b63AYDAoJXAcFRwADeAkJDX0AQCsEfAQMDAIPBz0rCgcxky0JRWE1AmwpKyEAIfkEAAoACAAsAAAAABAAEAAABXkgIAICKZzkqJ4nQZxLqZKv4NqNLKK2/Q4Ek4lFXChsg5ypJjs1II3gEDUSRInEGYAw6B6zM4JhrDAtEosVkLUtHA7RHaHAGJQEjsODcEg0FBAFVgkQJQ1pAwcDDw8KcFtSInwJAowCCA6RIwqZAgkPNgVpWndjdyohACH5BAAKAAkALAAAAAAQABAAAAV5ICACAimc5KieLEuUKvm2xAKLqDCfC2GaO9eL0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQACgAKACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQACgALACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAADxiciAvPgo8Yj5XYXJuaW5nPC9iPjogIG15c3FsX3F1ZXJ5KCkgWzxhIGhyZWY9J2Z1bmN0aW9uLm15c3FsLXF1ZXJ5Jz5mdW5jdGlvbi5teXNxbC1xdWVyeTwvYT5dOiBDYW4ndCBjb25uZWN0IHRvIGxvY2FsIE15U1FMIHNlcnZlciB0aHJvdWdoIHNvY2tldCAnL3Zhci9ydW4vbXlzcWxkL215c3FsZC5zb2NrJyAoMikgaW4gPGI+L2hvbWUvYWpheGxvYWQvd3d3L2xpYnJhaXJpZXMvY2xhc3MubXlzcWwucGhwPC9iPiBvbiBsaW5lIDxiPjY4PC9iPjxiciAvPgo8YnIgLz4KPGI+V2FybmluZzwvYj46ICBteXNxbF9xdWVyeSgpIFs8YSBocmVmPSdmdW5jdGlvbi5teXNxbC1xdWVyeSc+ZnVuY3Rpb24ubXlzcWwtcXVlcnk8L2E+XTogQSBsaW5rIHRvIHRoZSBzZXJ2ZXIgY291bGQgbm90IGJlIGVzdGFibGlzaGVkIGluIDxiPi9ob21lL2FqYXhsb2FkL3d3dy9saWJyYWlyaWVzL2NsYXNzLm15c3FsLnBocDwvYj4gb24gbGluZSA8Yj42ODwvYj48YnIgLz4KPGJyIC8+CjxiPldhcm5pbmc8L2I+OiAgbXlzcWxfcXVlcnkoKSBbPGEgaHJlZj0nZnVuY3Rpb24ubXlzcWwtcXVlcnknPmZ1bmN0aW9uLm15c3FsLXF1ZXJ5PC9hPl06IENhbid0IGNvbm5lY3QgdG8gbG9jYWwgTXlTUUwgc2VydmVyIHRocm91Z2ggc29ja2V0ICcvdmFyL3J1bi9teXNxbGQvbXlzcWxkLnNvY2snICgyKSBpbiA8Yj4vaG9tZS9hamF4bG9hZC93d3cvbGlicmFpcmllcy9jbGFzcy5teXNxbC5waHA8L2I+IG9uIGxpbmUgPGI+Njg8L2I+PGJyIC8+CjxiciAvPgo8Yj5XYXJuaW5nPC9iPjogIG15c3FsX3F1ZXJ5KCkgWzxhIGhyZWY9J2Z1bmN0aW9uLm15c3FsLXF1ZXJ5Jz5mdW5jdGlvbi5teXNxbC1xdWVyeTwvYT5dOiBBIGxpbmsgdG8gdGhlIHNlcnZlciBjb3VsZCBub3QgYmUgZXN0YWJsaXNoZWQgaW4gPGI+L2hvbWUvYWpheGxvYWQvd3d3L2xpYnJhaXJpZXMvY2xhc3MubXlzcWwucGhwPC9iPiBvbiBsaW5lIDxiPjY4PC9iPjxiciAvPgo8YnIgLz4KPGI+V2FybmluZzwvYj46ICBteXNxbF9xdWVyeSgpIFs8YSBocmVmPSdmdW5jdGlvbi5teXNxbC1xdWVyeSc+ZnVuY3Rpb24ubXlzcWwtcXVlcnk8L2E+XTogQ2FuJ3QgY29ubmVjdCB0byBsb2NhbCBNeVNRTCBzZXJ2ZXIgdGhyb3VnaCBzb2NrZXQgJy92YXIvcnVuL215c3FsZC9teXNxbGQuc29jaycgKDIpIGluIDxiPi9ob21lL2FqYXhsb2FkL3d3dy9saWJyYWlyaWVzL2NsYXNzLm15c3FsLnBocDwvYj4gb24gbGluZSA8Yj42ODwvYj48YnIgLz4KPGJyIC8+CjxiPldhcm5pbmc8L2I+OiAgbXlzcWxfcXVlcnkoKSBbPGEgaHJlZj0nZnVuY3Rpb24ubXlzcWwtcXVlcnknPmZ1bmN0aW9uLm15c3FsLXF1ZXJ5PC9hPl06IEEgbGluayB0byB0aGUgc2VydmVyIGNvdWxkIG5vdCBiZSBlc3RhYmxpc2hlZCBpbiA8Yj4vaG9tZS9hamF4bG9hZC93d3cvbGlicmFpcmllcy9jbGFzcy5teXNxbC5waHA8L2I+IG9uIGxpbmUgPGI+Njg8L2I+PGJyIC8+Cg=="},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){var r=n(4),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i?r.a.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(17)(e))},,,,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(79);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";e.exports=n(82)},function(e,t,n){"use strict";
|
43
43
|
/** @license React v16.13.1
|
44
44
|
* react-is.production.min.js
|
45
45
|
*
|