From f41c7e5f7799f505b655132f06a0e88178f8ed16 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Wed, 1 Nov 2017 10:54:55 +0100 Subject: [PATCH] Rebuild with updated dependencies --- dist.js | 2 +- dist.js.map | 2 +- package-lock.json | 44 ++++++++++++++++++++++---------------------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/dist.js b/dist.js index ca51738..37ec7ff 100644 --- a/dist.js +++ b/dist.js @@ -1,2 +1,2 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="dist/",t(t.s=266)}([function(e,t,n){"use strict";function r(e,t,n,r,o,a,s,u){if(i(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,a,s,u],f=0;c=new Error(t.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var i=function(e){};e.exports=r},function(e,t,n){!function(n,r){e.exports=t=r()}(0,function(){var e=e||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},o=i.Base=function(){return{extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),a=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||u).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var o=0;o>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=0;i>16)&r,t=18e3*(65535&t)+(t>>16)&r;var i=(n<<16)+t&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}}(4294967296*(n||e.random()));n=987654071*o(),r.push(4294967296*o()|0)}return new a.init(r,t)}}),s=r.enc={},u=s.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},c=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,s=4*o,u=i/s;u=t?e.ceil(u):e.max((0|u)-this._minBufferSize,0);var c=u*o,l=e.min(4*c,i);if(c){for(var f=0;f=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function v(e){return+e!=e&&(e=0),o.alloc(+e)}function m(e,t){if(o.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 V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return K(e).length;default:if(r)return V(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,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(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=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:_(e,t,n,r,i);if("number"==typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=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;a=2,s/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;cs&&(n=s-u),c=n;c>=0;c--){for(var f=!0,p=0;pi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=n){var u,c,l,f;switch(s){case 1:o<128&&(a=o);break;case 2:u=e[i+1],128==(192&u)&&(f=(31&o)<<6|63&u)>127&&(a=f);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(f=(15&o)<<12|(63&u)<<6|63&c)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return A(r)}function A(e){var t=e.length;if(t<=Q)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function B(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function j(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(e,t,n,r,i){return i||j(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return i||j(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(e,t,n,r,52,8),n+8}function H(e){if(e=z(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function W(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.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;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function K(e){return Z.toByteArray(H(e))}function $(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e){return e!==e}var Z=n(467),X=n(468),J=n(225);t.Buffer=o,t.SlowBuffer=v,t.INSPECT_MAX_BYTES=50,o.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=r(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return a(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return u(null,e,t,n)},o.allocUnsafe=function(e){return c(null,e)},o.allocUnsafeSlow=function(e){return c(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.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);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},o.prototype.compare=function(e,t,n,r,i){if(!o.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(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var a=i-r,s=n-t,u=Math.min(a,s),c=this.slice(r,i),l=e.slice(t,n),f=0;fi)&&(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 o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return k(this,e,t,n);case"latin1":case"binary":return C(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),X.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),X.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),X.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),X.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){I(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):B(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):B(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},o.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=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=0;--i)e[i+t]=this[i+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a7&&e[n].toUpperCase()!==e[n]||parseInt(t[n],16)<=7&&e[n].toLowerCase()!==e[n])return!1;return!0},T=function(e){if(void 0===e)return"";e=e.toLowerCase().replace("0x","");for(var t=i(e),n="0x",r=0;r7?n+=e[r].toUpperCase():n+=e[r];return n},O=function(e){return C(e)?e:/^[0-9a-f]{40}$/.test(e)?"0x"+e:"0x"+s(y(e).substr(2),40)},A=function(e){return e instanceof r||e&&e.constructor&&"BigNumber"===e.constructor.name},M=function(e){return"string"==typeof e||e&&e.constructor&&"String"===e.constructor.name},P=function(e){return"function"==typeof e},L=function(e){return"object"==typeof e},N=function(e){return"boolean"==typeof e},R=function(e){return e instanceof Array},I=function(e){try{return!!JSON.parse(e)}catch(e){return!1}};e.exports={padLeft:s,padRight:u,toHex:y,toDecimal:m,fromDecimal:g,toUtf8:c,toAscii:l,fromUtf8:f,fromAscii:p,transformToFullName:h,extractDisplayName:d,extractTypeName:v,toWei:w,fromWei:_,toBigNumber:x,toTwosComplement:k,toAddress:O,isBigNumber:A,isStrictAddress:C,isAddress:S,isChecksumAddress:E,toChecksumAddress:T,isFunction:P,isString:M,isObject:L,isBoolean:N,isArray:R,isJson:I}},function(e,t,n){!function(r,i){e.exports=t=i(n(1))}(0,function(e){e.lib.Cipher||function(t){var n=e,r=n.lib,i=r.Base,o=r.WordArray,a=r.BufferedBlockAlgorithm,s=n.enc,u=(s.Utf8,s.Base64),c=n.algo,l=c.EvpKDF,f=r.Cipher=a.extend({cfg:i.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){a.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?k:_}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),p=(r.StreamCipher=f.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),n.mode={}),h=r.BlockCipherMode=i.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),d=p.CBC=function(){function e(e,n,r){var i=this._iv;if(i){var o=i;this._iv=t}else var o=this._prevBlock;for(var a=0;a>>2];e.sigBytes-=t}},g=(r.BlockCipher=f.extend({cfg:f.cfg.extend({mode:d,padding:m}),reset:function(){f.reset.call(this);var e=this.cfg,t=e.iv,n=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=n.createEncryptor;else{var r=n.createDecryptor;this._minBufferSize=1}this._mode=r.call(n,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else{var t=this._process(!0);e.unpad(t)}return t},blockSize:4}),r.CipherParams=i.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}})),y=n.format={},b=y.OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;if(n)var r=o.create([1398893684,1701076831]).concat(n).concat(t);else var r=t;return r.toString(u)},parse:function(e){var t=u.parse(e),n=t.words;if(1398893684==n[0]&&1701076831==n[1]){var r=o.create(n.slice(2,4));n.splice(0,4),t.sigBytes-=16}return g.create({ciphertext:t,salt:r})}},_=r.SerializableCipher=i.extend({cfg:i.extend({format:b}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=e.createEncryptor(n,r),o=i.finalize(t),a=i.cfg;return g.create({ciphertext:o,key:n,iv:a.iv,algorithm:e,mode:a.mode,padding:a.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),w=n.kdf={},x=w.OpenSSL={execute:function(e,t,n,r){r||(r=o.random(8));var i=l.create({keySize:t+n}).compute(e,r),a=o.create(i.words.slice(t),4*n);return i.sigBytes=4*t,g.create({key:i,iv:a,salt:r})}},k=r.PasswordBasedCipher=_.extend({cfg:_.cfg.extend({kdf:x}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var i=r.kdf.execute(n,e.keySize,e.ivSize);r.iv=i.iv;var o=_.encrypt.call(this,e,t,i.key,r);return o.mixIn(i),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var i=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=i.iv,_.decrypt.call(this,e,t,i.key,r)}})}()})},function(e,t,n){"use strict";t.__esModule=!0;var r=n(24),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(398),o=r(i),a=n(402),s=r(a),u=n(24),c=r(u);t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,c.default)(t)));e.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(o.default?(0,o.default)(e,t):e.__proto__=t)}},function(e,t,n){"use strict";var r=!("undefined"==typeof window||!window.document||!window.document.createElement),i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};e.exports=i},function(e,t,n){var r=n(134)("wks"),i=n(91),o=n(19).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function a(){v&&h&&(v=!1,h.length?d=h.concat(d):m=-1,d.length&&s())}function s(){if(!v){var e=i(a);v=!0;for(var t=d.length;t;){for(h=d,d=[];++m1)for(var n=1;n0;--t)e.removeChild(e.firstChild);return e}function n(e,n){return t(e).appendChild(n)}function r(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}function p(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}function d(e){for(;Ga.length<=e;)Ga.push(v(Ga)+" ");return Ga[e]}function v(e){return e[e.length-1]}function m(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Ka.test(e))}function w(e,t){return t?!!(t.source.indexOf("\\w")>-1&&_(e))||t.test(e):_(e)}function x(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function k(e){return e.charCodeAt(0)>=768&&$a.test(e)}function C(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function E(e,t,n){var o=this;this.input=n,o.scrollbarFiller=r("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=r("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=i("div",null,"CodeMirror-code"),o.selectionDiv=r("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=r("div",null,"CodeMirror-cursors"),o.measure=r("div",null,"CodeMirror-measure"),o.lineMeasure=r("div",null,"CodeMirror-measure"),o.lineSpace=i("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var a=i("div",[o.lineSpace],"CodeMirror-lines");o.mover=r("div",[a],null,"position: relative"),o.sizer=r("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=r("div",null,null,"position: absolute; height: "+Ha+"px; width: 1px;"),o.gutters=r("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=r("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=r("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),ga&&ya<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),ba||ha&&Oa||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,n.init(o)}function T(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?I(n,T(e,n).text.length):W(t,T(e,t.line).text.length)}function W(e,t){var n=e.ch;return null==n||n>t?I(e.line,t):n<0?I(e.line,0):e}function V(e,t){for(var n=[],r=0;r=t:o.to>t);(r||(r=[])).push(new K(a,o.from,u?null:o.to))}}return r}function J(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var u=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var w=0;w0)){var l=[u,1],f=B(c.from,s.from),h=B(c.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&l.push({from:c.from,to:s.from}),(h>0||!a.inclusiveRight&&!h)&&l.push({from:s.to,to:c.to}),i.splice.apply(i,l),u+=l.length-3}}return i}function ne(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&f<=0||l<=0&&f>=0)&&(l<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?B(c.to,n)>=0:B(c.to,n)>0)||l>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?B(c.from,r)<=0:B(c.from,r)<0)))return!0}}}function fe(e){for(var t;t=ue(e);)e=t.find(-1,!0).line;return e}function pe(e){for(var t;t=ce(e);)e=t.find(1,!0).line;return e}function he(e){for(var t,n;t=ce(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function de(e,t){var n=T(e,t),r=fe(n);return n==r?t:P(r)}function ve(e,t){if(t>e.lastLine())return t;var n,r=T(e,t);if(!me(e,r))return t;for(;n=ce(r);)r=n.find(1,!0).line;return P(r)+1}function me(e,t){var n=Za&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function we(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}function xe(e,t,n){var r;Xa=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:Xa=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:Xa=i)}return null!=r?r:Xa}function ke(e,t){var n=e.order;return null==n&&(n=e.order=Ja(e.text,t)),n}function Ce(e,t){return e._handlers&&e._handlers[t]||Qa}function Se(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=p(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ee(e,t){var n=Ce(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function Me(e){e.prototype.on=function(e,t){es(this,e,t)},e.prototype.off=function(e,t){Se(this,e,t)}}function Pe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Le(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ne(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Re(e){Pe(e),Le(e)}function Ie(e){return e.target||e.srcElement}function Be(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Aa&&e.ctrlKey&&1==t&&(t=3),t}function De(e){if(null==Fa){var t=r("span","​");n(e,r("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Fa=t.offsetWidth<=1&&t.offsetHeight>2&&!(ga&&ya<8))}var i=Fa?r("span","​"):r("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function je(e){if(null!=Ua)return Ua;var r=n(e,document.createTextNode("AخA")),i=Na(r,0,1).getBoundingClientRect(),o=Na(r,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(Ua=o.right-i.right<3)}function Fe(e){if(null!=os)return os;var t=n(e,r("span","x")),i=t.getBoundingClientRect(),o=Na(t,0,1).getBoundingClientRect();return os=Math.abs(i.left-o.left)>1}function Ue(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),as[e]=t}function He(e,t){ss[e]=t}function ze(e){if("string"==typeof e&&ss.hasOwnProperty(e))e=ss[e];else if(e&&"string"==typeof e.name&&ss.hasOwnProperty(e.name)){var t=ss[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function We(e,t){t=ze(t);var n=as[t.name];if(!n)return We(e,"text/plain");var r=n(e,t);if(us.hasOwnProperty(t.name)){var i=us[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}function Ve(e,t){l(t,us.hasOwnProperty(e)?us[e]:us[e]={})}function qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ge(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ke(e,t,n){return!e.startState||e.startState(t,n)}function $e(e,t,n,r){var i=[e.state.modeGen],o={};nt(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=n.state,s=0;se&&i.splice(u,1,e,i[u+1],r),u+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,u-n,e,"overlay "+t),u=n+2;else for(;ne.options.maxHighlightLength&&qe(e.doc.mode,r.state),o=$e(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ze(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new fs(r,!0,t);var o=rt(e,t,n),a=o>r.first&&T(r,o-1).stateAfter,s=a?fs.fromSaved(r,a,o):new fs(r,Ke(r.mode),o);return r.iter(o,t,function(n){Xe(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function et(e,t,n,r){var i,o=e.doc,a=o.mode;t=z(o,t);var s,u=T(o,t.line),c=Ze(e,t.line,n),l=new cs(u.text,e.options.tabSize,c);for(r&&(s=[]);(r||l.pose.options.maxHighlightLength?(s=!1,a&&Xe(e,t,r,f.pos),f.pos=t.length,u=null):u=tt(Qe(n,f,r.state,p),o),p){var h=p[0].name;h&&(u="m-"+(u?h+" "+u:h))}if(!s||l!=u){for(;ca;--s){if(s<=o.first)return o.first;var u=T(o,s-1),c=u.stateAfter;if(c&&(!n||s+(c instanceof ls?c.lookAhead:0)<=o.modeFrontier))return s;var l=f(u.text,null,e.options.tabSize);(null==i||r>l)&&(i=s-1,r=l)}return i}function it(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=T(e,r).stateAfter;if(i&&(!(i instanceof ls)||r+i.lookAhead1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&f.from<=c));p++);if(f.to>=l)return e(n,r,i,o,a,s,u);e(n,r.slice(0,f.to-c),i,o,null,s,u),o=null,r=r.slice(f.to-c),c=f.to}}}function ht(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function dt(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,u,c,l,f,p,h=i.length,d=0,v=1,m="",g=0;;){if(g==d){u=c=l=f=s="",p=null,g=1/0;for(var y=[],b=void 0,_=0;_d||x.collapsed&&w.to==d&&w.from==d)?(null!=w.to&&w.to!=d&&g>w.to&&(g=w.to,c=""),x.className&&(u+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&w.from==d&&(l+=" "+x.startStyle),x.endStyle&&w.to==g&&(b||(b=[])).push(x.endStyle,w.to),x.title&&!f&&(f=x.title),x.collapsed&&(!p||ae(p.marker,x)<0)&&(p=w)):w.from>d&&g>w.from&&(g=w.from)}if(b)for(var k=0;k=h)break;for(var S=Math.min(h,g);;){if(m){var E=d+m.length;if(!p){var T=E>S?m.slice(0,S-d):m;t.addToken(t,T,a?a+u:u,l,d+T.length==g?c:"",f,s)}if(E>=S){m=m.slice(S-d),d=S;break}d=E,l=""}m=i.slice(o,o=n[v++]),a=st(n[v++],t.cm.options)}}else for(var O=1;O2&&o.push((u.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Wt(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Vt(e,t){t=fe(t);var r=P(t),i=e.display.externalMeasured=new vt(e.doc,t,r);i.lineN=r;var o=i.built=ut(e,i);return i.text=o.pre,n(e.display.lineMeasure,o.pre),i}function qt(e,t,n,r){return $t(e,Kt(e,t),n,r)}function Gt(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=u-s,i=o-1,t>=u&&(a="right")),null!=i){if(r=e[c+2],s==u&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==u-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function Xt(e,t,n,r){var i,o=Yt(t.map,n,r),a=o.node,s=o.start,u=o.end,c=o.collapse;if(3==a.nodeType){for(var l=0;l<4;l++){for(;s&&k(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+u0&&(c=r="right");var f;i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(ga&&ya<9&&!s&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+_n(e.display),top:p.top,bottom:p.bottom}:bs}for(var h=i.top-t.rect.top,d=i.bottom-t.rect.top,v=(h+d)/2,m=t.view.measure.heights,g=0;g=r.text.length?(c=r.text.length,l="before"):c<=0&&(c=0,l="after"),!u)return a("before"==l?c-1:c,"before"==l);var f=xe(u,c,l),p=Xa,h=s(c,f,"before"==l);return null!=p&&(h.other=s(c,p,"before"!=l)),h}function ln(e,t){var n=0;t=z(e.doc,t),e.options.lineWrapping||(n=_n(e.display)*t.ch);var r=T(e.doc,t.line),i=ye(r)+Bt(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function fn(e,t,n,r,i){var o=I(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function pn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return fn(r.first,0,null,!0,-1);var i=L(r,n),o=r.first+r.size-1;if(i>o)return fn(r.first+r.size-1,T(r,o).text.length,null,!0,1);t<0&&(t=0);for(var a=T(r,i);;){var s=mn(e,a,i,t,n),u=ce(a),c=u&&u.find(0,!0);if(!u||!(s.ch>c.from.ch||s.ch==c.from.ch&&s.xRel>0))return s;i=P(a=c.to.line)}}function hn(e,t,n,r){r-=on(t);var i=t.text.length,o=S(function(t){return $t(e,n,t-1).bottom<=r},i,0);return i=S(function(t){return $t(e,n,t).top>r},o,i),{begin:o,end:i}}function dn(e,t,n,r){return n||(n=Kt(e,t)),hn(e,t,n,an(e,t,$t(e,n,r),"line").top)}function vn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function mn(e,t,n,r,i){i-=ye(t);var o=Kt(e,t),a=on(t),s=0,u=t.text.length,c=!0,l=ke(t,e.doc.direction);if(l){var f=(e.options.lineWrapping?yn:gn)(e,t,n,o,l,r,i);c=1!=f.level,s=c?f.from:f.to-1,u=c?f.to:f.from-1}var p,h,d=null,v=null,m=S(function(t){var n=$t(e,o,t);return n.top+=a,n.bottom+=a,!!vn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(d=t,v=n),!0)},s,u),g=!1;if(v){var y=r-v.left=_.bottom}return m=C(t.text,m,1),fn(n,m,h,g,r-p)}function gn(e,t,n,r,i,o,a){var s=S(function(s){var u=i[s],c=1!=u.level;return vn(cn(e,I(n,c?u.to:u.from,c?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),u=i[s];if(s>0){var c=1!=u.level,l=cn(e,I(n,c?u.from:u.to,c?"after":"before"),"line",t,r);vn(l,o,a,!0)&&l.top>a&&(u=i[s-1])}return u}function yn(e,t,n,r,i,o,a){var s=hn(e,t,r,a),u=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var l=null,f=null,p=0;p=c||h.to<=u)){var d=1!=h.level,v=$t(e,r,d?Math.min(c,h.to)-1:Math.max(u,h.from)).right,m=vm)&&(l=h,f=m)}}return l||(l=i[i.length-1]),l.fromc&&(l={from:l.from,to:c,level:l.level}),l}function bn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ds){ds=r("pre");for(var i=0;i<49;++i)ds.appendChild(document.createTextNode("x")),ds.appendChild(r("br"));ds.appendChild(document.createTextNode("x"))}n(e.measure,ds);var o=ds.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function _n(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=r("span","xxxxxxxxxx"),i=r("pre",[t]);n(e.measure,i);var o=t.getBoundingClientRect(),a=(o.right-o.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function wn(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[a]]=o.clientWidth;return{fixedPos:xn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function xn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function kn(e){var t=bn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/_n(e.display)-3);return function(i){if(me(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r=e.display.viewTo||s.to().line0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Nn(e){e.state.focused||(e.display.input.focus(),In(e))}function Rn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Bn(e))},100)}function In(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Ee(e,"focus",e,t),e.state.focused=!0,s(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),ba&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ln(e))}function Bn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ee(e,"blur",e,t),e.state.focused=!1,Ba(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Dn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||u<-.005)&&(M(i.line,o),jn(i.line),i.rest))for(var c=0;c=a&&(o=L(t,ye(T(t,u))-e.wrapper.clientHeight),a=u)}return{from:o,to:Math.max(a,o+1)}}function Un(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=xn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!Sa){var a=r("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Bt(e.display))+"px;\n height: "+(t.bottom-t.top+Ft(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function Wn(e,t,n,r){null==r&&(r=0);var i;e.options.lineWrapping||t!=n||(t=t.ch?I(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,n="before"==t.sticky?I(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=cn(e,t),u=n&&n!=t?cn(e,n):s;i={left:Math.min(s.left,u.left),top:Math.min(s.top,u.top)-r,right:Math.max(s.left,u.left),bottom:Math.max(s.bottom,u.bottom)+r};var c=qn(e,i),l=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=c.scrollTop&&(Jn(e,c.scrollTop),Math.abs(e.doc.scrollTop-l)>1&&(a=!0)),null!=c.scrollLeft&&(er(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return i}function Vn(e,t){var n=qn(e,t);null!=n.scrollTop&&Jn(e,n.scrollTop),null!=n.scrollLeft&&er(e,n.scrollLeft)}function qn(e,t){var n=e.display,r=bn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Ht(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Dt(n),u=t.tops-r;if(t.topi+o){var l=Math.min(t.top,(c?s:t.bottom)-o);l!=i&&(a.scrollTop=l)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,p=Ut(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),h=t.right-t.left>p;return h&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.leftp+f-3&&(a.scrollLeft=t.right+(h?0:10)-p),a}function Gn(e,t){null!=t&&(Zn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Kn(e){Zn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function $n(e,t,n){null==t&&null==n||Zn(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Yn(e,t){Zn(e),e.curOp.scrollToPos=t}function Zn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;Xn(e,ln(e,t.from),ln(e,t.to),t.margin)}}function Xn(e,t,n,r){var i=qn(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});$n(e,i.scrollLeft,i.scrollTop)}function Jn(e,t){Math.abs(e.doc.scrollTop-t)<2||(ha||Mr(e,{top:t}),Qn(e,t,!0),ha&&Mr(e),kr(e,100))}function Qn(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function er(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Un(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function tr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Dt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Ft(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function nr(e,t){t||(t=tr(e));var n=e.display.barWidth,r=e.display.barHeight;rr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Dn(e),rr(e,tr(e)),n=e.display.barWidth,r=e.display.barHeight}function rr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function ir(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Ba(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new xs[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),es(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?er(e,t):Jn(e,t)},e),e.display.scrollbars.addClass&&s(e.display.wrapper,e.display.scrollbars.addClass)}function or(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ks},gt(e.curOp)}function ar(e){bt(e.curOp,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Cs(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function cr(e){e.updatedDisplay=e.mustUpdate&&Or(e.cm,e.update)}function lr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Dn(t),e.barMeasure=tr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=qt(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Ft(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ut(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function fr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Za&&de(e.doc,t)i.viewFrom?br(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)br(e);else if(t<=i.viewFrom){var o=_r(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):br(e)}else if(n>=i.viewTo){var a=_r(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):br(e)}else{var s=_r(e,t,t,-1),u=_r(e,n,n+r,1);s&&u?(i.view=i.view.slice(0,s.index).concat(mt(e,s.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=r):br(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[En(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==p(a,n)&&a.push(n)}}}function br(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function _r(e,t,n,r){var i,o=En(e,t),a=e.display.view;if(!Za||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,u=0;u0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;de(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function wr(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=mt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=mt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,En(e,n)))),r.viewTo=n}function xr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Ze(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?qe(t.mode,r.state):null,u=$e(e,o,r,!0);s&&(r.state=s),o.styles=u.styles;var c=o.styleClasses,l=u.classes;l?o.styleClasses=l:c&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||c!=l&&(!c||!l||c.bgClass!=l.bgClass||c.textClass!=l.textClass),p=0;!f&&pn)return kr(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&hr(e,function(){for(var t=0;t=r.viewFrom&&n.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==xr(e))return!1;Hn(e)&&(br(e),n.dims=wn(e));var o=i.first+i.size,a=Math.max(n.visible.from-e.options.viewportMargin,i.first),s=Math.min(o,n.visible.to+e.options.viewportMargin);r.viewFroms&&r.viewTo-s<20&&(s=Math.min(o,r.viewTo)),Za&&(a=de(e.doc,a),s=ve(e.doc,s));var u=a!=r.viewFrom||s!=r.viewTo||r.lastWrapHeight!=n.wrapperHeight||r.lastWrapWidth!=n.wrapperWidth;wr(e,a,s),r.viewOffset=ye(T(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var c=xr(e);if(!u&&0==c&&!n.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var l=Er(e);return c>4&&(r.lineDiv.style.display="none"),Pr(e,r.updateLineNumbers,n.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Tr(l),t(r.cursorDiv),t(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,u&&(r.lastWrapHeight=n.wrapperHeight,r.lastWrapWidth=n.wrapperWidth,kr(e,400)),r.updateLineNumbers=null,!0}function Ar(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ut(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Dt(e.display)-Ht(e),n.top)}),t.visible=Fn(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Or(e,t);r=!1){Dn(e);var i=tr(e);Tn(e),nr(e,i),Nr(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Mr(e,t){var n=new Cs(e,t);if(Or(e,n)){Dn(e),Ar(e,n);var r=tr(e);Tn(e),nr(e,r),Nr(e,r),n.finish()}}function Pr(e,n,r){function i(t){var n=t.nextSibling;return ba&&Aa&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var o=e.display,a=e.options.lineNumbers,s=o.lineDiv,u=s.firstChild,c=o.view,l=o.viewFrom,f=0;f-1&&(d=!1),xt(e,h,l,r)),d&&(t(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(R(e.options,l)))),u=h.node.nextSibling}else{var v=Mt(e,h,l,r);s.insertBefore(v,u)}l+=h.size}for(;u;)u=i(u)}function Lr(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Nr(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ft(e)+"px"}function Rr(e){var n=e.display.gutters,i=e.options.gutters;t(n);for(var o=0;o-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Br(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Dr(e){var t=Br(e);return t.x*=Es,t.y*=Es,t}function jr(e,t){var n=Br(t),r=n.x,i=n.y,o=e.display,a=o.scroller,s=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(r&&s||i&&u){if(i&&Aa&&ba)e:for(var c=t.target,l=o.view;c!=a;c=c.parentNode)for(var f=0;f=0){var a=U(o.from(),i.from()),s=F(o.to(),i.to()),u=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new Os(u?s:a,u?a:s))}}return new Ts(e,t)}function Ur(e,t){return new Ts([new Os(e,t||e)],0)}function Hr(e){return e.text?I(e.from.line+e.text.length-1,v(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function zr(e,t){if(B(e,t.from)<0)return e;if(B(e,t.to)<=0)return Hr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Hr(t).ch-t.to.ch),I(n,r)}function Wr(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,d-1),e.insert(s.line+1,y)}_t(e,"change",e,t)}function Zr(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),v(e.done)):void 0}function ii(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ri(i,i.lastOp==r)))a=v(o.changes),0==B(t.from,t.to)&&0==B(t.from,a.to)?a.to=Hr(t):o.changes.push(ti(e,t));else{var u=v(i.done);for(u&&u.ranges||si(e.sel,i.done),o={changes:[ti(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Ee(e,"historyAdded")}function oi(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ai(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||oi(e,o,v(i.done),t))?i.done[i.done.length-1]=t:si(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&ni(i.undone)}function si(e,t){var n=v(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ui(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function ci(e){if(!e)return null;for(var t,n=0;n-1&&(v(s)[f]=c[f],delete c[f])}}}return r}function hi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=B(t,i)<0;o!=B(n,i)<0?(i=t,t=n):o!=B(t,n)<0&&(t=n)}return new Os(i,t)}return new Os(n||t,t)}function di(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),_i(e,new Ts([hi(e.sel.primary(),t,n,i)],0),r)}function vi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(Ee(u,"beforeCursorEnter"),u.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!u.atomic)continue;if(n){var c=u.find(r<0?1:-1),l=void 0;if((r<0?u.inclusiveRight:u.inclusiveLeft)&&(c=Ti(e,c,-r,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(l=B(c,n))&&(r<0?l<0:l>0))return Si(e,c,t,r,i)}var f=u.find(r<0?-1:1);return(r<0?u.inclusiveLeft:u.inclusiveRight)&&(f=Ti(e,f,r,f.line==t.line?o:null)),f?Si(e,f,t,r,i):null}}return t}function Ei(e,t,n,r,i){var o=r||1,a=Si(e,t,n,o,i)||!i&&Si(e,t,n,o,!0)||Si(e,t,n,-o,i)||!i&&Si(e,t,n,-o,!0);return a||(e.cantEdit=!0,I(e.first,0))}function Ti(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?z(e,I(t.line-1)):null:n>0&&t.ch==(r||T(e,t.line)).text.length?t.line=0;--i)Pi(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Pi(e,t)}}function Pi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=B(t.from,t.to)){var n=Wr(e,t);ii(e,t,n,e.cm?e.cm.curOp.id:NaN),Ri(e,t,n,Q(e,t));var r=[];Zr(e,function(e,n){n||-1!=p(r,e.history)||(Fi(e.history,t),r.push(e.history)),Ri(e,t,null,Q(e,t))})}}function Li(e,t,n){if(!e.cm||!e.cm.state.suppressEdits||n){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,u=0;u=0;--f){var h=function(n){var i=r.changes[n];if(i.origin=t,l&&!Ai(e,i,!1))return a.length=0,{};c.push(ti(e,i));var o=n?Wr(e,i):v(a);Ri(e,i,o,fi(e,i)),!n&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Hr(i)});var s=[];Zr(e,function(e,t){t||-1!=p(s,e.history)||(Fi(e.history,i),s.push(e.history)),Ri(e,i,null,fi(e,i))})}(f);if(h)return h.v}}}}function Ni(e,t){if(0!=t&&(e.first+=t,e.sel=new Ts(m(e.sel.ranges,function(e){return new Os(I(e.anchor.line+t,e.anchor.ch),I(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){gr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:I(o,T(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=O(e,t.from,t.to),n||(n=Wr(e,t)),e.cm?Ii(e.cm,t,r):Yr(e,t,r),wi(e,n,Wa)}}function Ii(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,u=o.line;e.options.lineWrapping||(u=P(fe(T(r,o.line))),r.iter(u,a.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Oe(e),Yr(r,t,n,kn(e)),e.options.lineWrapping||(r.iter(u,o.line+t.text.length,function(e){var t=be(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),it(r,o.line),kr(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?gr(e):o.line!=a.line||1!=t.text.length||$r(e.doc,t)?gr(e,o.line,a.line+1,c):yr(e,o.line,"text");var l=Ae(e,"changes"),f=Ae(e,"change");if(f||l){var p={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&_t(e,"change",e,p),l&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function Bi(e,t,n,r,i){if(r||(r=n),B(r,n)<0){var o;o=[r,n],n=o[0],r=o[1]}"string"==typeof t&&(t=e.splitLines(t)),Mi(e,{from:n,to:r,text:t,origin:i})}function Di(e,t,n,r){n0||0==s&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=i("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(le(e,t.line,t,n,a)||t.line!=n.line&&le(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");G()}a.addToHistory&&ii(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var u,c=t.line,f=e.cm;if(e.iter(c,n.line+1,function(e){f&&a.collapsed&&!f.options.lineWrapping&&fe(e)==f.display.maxLine&&(u=!0),a.collapsed&&c!=t.line&&M(e,0),Z(e,new K(a,c==t.line?t.ch:null,c==n.line?n.ch:null)),++c}),a.collapsed&&e.iter(t.line,n.line+1,function(t){me(e,t)&&M(t,0)}),a.clearOnEnter&&es(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(q(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Ms,a.atomic=!0),f){if(u&&(f.curOp.updateMaxLine=!0),a.collapsed)gr(f,t.line,n.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var p=t.line;p<=n.line;p++)yr(f,p,"text");a.atomic&&ki(f.doc),_t(f,"markerAdded",f,a)}return a}function Gi(e,t,n,r,i){r=l(r),r.shared=!1;var o=[qi(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Zr(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(qi(e,z(e,t),z(e,n),r,i));for(var u=0;u-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var c;if(t.state.draggingText&&!t.state.draggingText.copy&&(c=t.listSelections()),wi(t.doc,Ur(n,n)),c)for(var l=0;l=0;t--)Bi(e.doc,"",r[t].from,r[t].to,"+delete");Kn(e)})}function po(e,t,n){var r=C(e.text,t+n,n);return r<0||r>e.text.length?null:r}function ho(e,t,n){var r=po(e,t.ch,n);return null==r?null:new I(t.line,r,n<0?"after":"before")}function vo(e,t,n,r,i){if(e){var o=ke(n,t.doc.direction);if(o){var a,s=i<0?v(o):o[0],u=i<0==(1==s.level),c=u?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var l=Kt(t,n);a=i<0?n.text.length-1:0;var f=$t(t,l,a).top;a=S(function(e){return $t(t,l,e).top==f},i<0==(1==s.level)?s.from:s.to-1,a),"before"==c&&(a=po(n,a,1))}else a=i<0?s.to:s.from;return new I(r,a,c)}}return new I(r,i<0?n.text.length:0,i<0?"before":"after")}function mo(e,t,n,r){var i=ke(t,e.doc.direction);if(!i)return ho(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=xe(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&p>=l.begin)){var h=f?"before":"after";return new I(n.line,p,h)}}var d=function(e,t,r){for(var o=function(e,t){return t?new I(n.line,u(e,1),"before"):new I(n.line,e,"after")};e>=0&&e0==(1!=a.level),c=s?r.begin:u(r.end,-1);if(a.from<=c&&c0?l.end:u(l.begin,-1);return null==m||r>0&&m==t.text.length||!(v=d(r>0?0:i.length-1,r,c(m)))?null:v}function go(e,t){var n=T(e.doc,t),r=fe(n);return r!=n&&(t=P(r)),vo(!0,e,r,t,1)}function yo(e,t){var n=T(e.doc,t),r=pe(n);return r!=n&&(t=P(r)),vo(!0,e,n,t,-1)}function bo(e,t){var n=go(e,t.line),r=T(e.doc,n.line),i=ke(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return I(n.line,a?0:o,n.sticky)}return n}function _o(e,t,n){if("string"==typeof t&&!(t=zs[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=za}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function wo(e,t,n){for(var r=0;r-1&&(B((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(B(i.to(),t)>0||t.xRel<0)?Ro(e,r,t,o):Bo(e,r,t,o)}function Ro(e,t,n,r){var i=e.display,o=!1,a=dr(e,function(t){ba&&(i.scroller.draggable=!1),e.state.draggingText=!1,Se(document,"mouseup",a),Se(document,"mousemove",s),Se(i.scroller,"dragstart",u),Se(i.scroller,"drop",a),o||(Pe(t),r.addNew||di(e.doc,n,null,null,r.extend),ba||ga&&9==ya?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),s=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},u=function(){return o=!0};ba&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),es(document,"mouseup",a),es(document,"mousemove",s),es(i.scroller,"dragstart",u),es(i.scroller,"drop",a),Rn(e),setTimeout(function(){return i.input.focus()},20)}function Io(e,t,n){if("char"==n)return new Os(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Os(I(t.line,0),z(e.doc,I(t.line+1,0)));var r=n(e,t);return new Os(r.from,r.to)}function Bo(e,t,n,r){function i(t){if(0!=B(g,t))if(g=t,"rectangle"==r.unit){for(var i=[],o=e.options.tabSize,a=f(T(c,n.line).text,n.ch,o),s=f(T(c,t.line).text,t.ch,o),u=Math.min(a,s),v=Math.max(a,s),m=Math.min(n.line,t.line),y=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=y;m++){var b=T(c,m).text,_=h(b,u,o);u==v?i.push(new Os(I(m,_),I(m,_))):b.length>_&&i.push(new Os(I(m,_),I(m,h(b,v,o))))}i.length||i.push(new Os(n,n)),_i(c,Fr(d.ranges.slice(0,p).concat(i),p),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var w,x=l,k=Io(e,t,r.unit),C=x.anchor;B(k.anchor,C)>0?(w=k.head,C=U(x.from(),k.anchor)):(w=k.anchor,C=F(x.to(),k.head));var S=d.ranges.slice(0);S[p]=Do(e,new Os(z(c,C),w)),_i(c,Fr(S,p),Va)}}function o(t){var n=++b,s=Sn(e,t,!0,"rectangle"==r.unit);if(s)if(0!=B(s,g)){e.curOp.focus=a(),i(s);var l=Fn(u,c);(s.line>=l.to||s.liney.bottom?20:0;f&&setTimeout(dr(e,function(){b==n&&(u.scroller.scrollTop+=f,o(t))}),50)}}function s(t){e.state.selectingText=!1,b=1/0,Pe(t),u.input.focus(),Se(document,"mousemove",_),Se(document,"mouseup",w),c.history.lastSelOrigin=null}var u=e.display,c=e.doc;Pe(t);var l,p,d=c.sel,v=d.ranges;if(r.addNew&&!r.extend?(p=c.sel.contains(n),l=p>-1?v[p]:new Os(n,n)):(l=c.sel.primary(),p=c.sel.primIndex),"rectangle"==r.unit)r.addNew||(l=new Os(n,n)),n=Sn(e,t,!0,!0),p=-1;else{var m=Io(e,n,r.unit);l=r.extend?hi(l,m.anchor,m.head,r.extend):m}r.addNew?-1==p?(p=v.length,_i(c,Fr(v.concat([l]),p),{scroll:!1,origin:"*mouse"})):v.length>1&&v[p].empty()&&"char"==r.unit&&!r.extend?(_i(c,Fr(v.slice(0,p).concat(v.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),d=c.sel):mi(c,p,l,Va):(p=0,_i(c,new Ts([l],0),Va),d=c.sel);var g=n,y=u.wrapper.getBoundingClientRect(),b=0,_=dr(e,function(e){Be(e)?o(e):s(e)}),w=dr(e,s);e.state.selectingText=w,es(document,"mousemove",_),es(document,"mouseup",w)}function Do(e,t){var n=t.anchor,r=t.head,i=T(e.doc,n.line);if(0==B(n,r)&&n.sticky==r.sticky)return t;var o=ke(i);if(!o)return t;var a=xe(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var u=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;var c;if(r.line!=n.line)c=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var l=xe(o,r.ch,r.sticky),f=l-a||(r.ch-n.ch)*(1==s.level?-1:1);c=l==u-1||l==u?f<0:f>0}var p=o[u+(c?-1:0)],h=c==(1==p.level),d=h?p.from:p.to,v=h?"after":"before";return n.ch==d&&n.sticky==v?t:new Os(new I(n.line,d,v),r)}function jo(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Pe(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!Ae(e,n))return Ne(t);o-=s.top-a.viewOffset;for(var u=0;u=i){return Ee(e,n,e,L(e.doc,o),e.options.gutters[u],t),Ne(t)}}}function Fo(e,t){return jo(e,t,"gutterClick",!0)}function Uo(e,t){It(e.display,t)||Ho(e,t)||Te(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Ho(e,t){return!!Ae(e,"gutterContextMenu")&&jo(e,t,"gutterContextMenu",!1)}function zo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),tn(e)}function Wo(e){Rr(e),gr(e),Un(e)}function Vo(e,t,n){if(!t!=!(n&&n!=$s)){var r=e.display.dragFunctions,i=t?es:Se;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function qo(e){e.options.lineWrapping?(s(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Ba(e.display.wrapper,"CodeMirror-wrap"),_e(e)),Cn(e),gr(e),tn(e),setTimeout(function(){return nr(e)},100)}function Go(e,t){var n=this;if(!(this instanceof Go))return new Go(e,t);this.options=t=t?l(t):{},l(Ys,t,!1),Ir(t);var r=t.value;"string"==typeof r&&(r=new Rs(r,t.mode,null,t.lineSeparator,t.direction)),this.doc=r;var i=new Go.inputStyles[t.inputStyle](this),o=this.display=new E(e,r,i);o.wrapper.CodeMirror=this,Rr(this),zo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ir(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new ja,keySeq:null,specialChars:null},t.autofocus&&!Oa&&o.input.focus(),ga&&ya<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ko(this),to(),or(this),this.curOp.forceUpdate=!0,Xr(this,r),t.autofocus&&!Oa||this.hasFocus()?setTimeout(c(In,this),20):Bn(this);for(var a in Zs)Zs.hasOwnProperty(a)&&Zs[a](n,t[a],$s);Hn(this),t.finishInit&&t.finishInit(this);for(var s=0;s400}var i=e.display;es(i.scroller,"mousedown",dr(e,Mo)),ga&&ya<11?es(i.scroller,"dblclick",dr(e,function(t){if(!Te(e,t)){var n=Sn(e,t);if(n&&!Fo(e,t)&&!It(e.display,t)){Pe(t);var r=e.findWordAt(n);di(e.doc,r.anchor,r.head)}}})):es(i.scroller,"dblclick",function(t){return Te(e,t)||Pe(t)}),Ia||es(i.scroller,"contextmenu",function(t){return Uo(e,t)});var o,a={end:0};es(i.scroller,"touchstart",function(t){if(!Te(e,t)&&!n(t)&&!Fo(e,t)){i.input.ensurePolled(),clearTimeout(o);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),es(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),es(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!It(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new Os(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new Os(I(s.line,0),z(e.doc,I(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Pe(n)}t()}),es(i.scroller,"touchcancel",t),es(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Jn(e,i.scroller.scrollTop),er(e,i.scroller.scrollLeft,!0),Ee(e,"scroll",e))}),es(i.scroller,"mousewheel",function(t){return jr(e,t)}),es(i.scroller,"DOMMouseScroll",function(t){return jr(e,t)}),es(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Te(e,t)||Re(t)},over:function(t){Te(e,t)||(Ji(e,t),Re(t))},start:function(t){return Xi(e,t)},drop:dr(e,Zi),leave:function(t){Te(e,t)||Qi(e)}};var s=i.input.getField();es(s,"keyup",function(t){return To.call(e,t)}),es(s,"keydown",dr(e,So)),es(s,"keypress",dr(e,Oo)),es(s,"focus",function(t){return In(e,t)}),es(s,"blur",function(t){return Bn(e,t)})}function $o(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Ze(e,t).state:n="prev");var a=e.options.tabSize,s=T(o,t),u=f(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,l=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(i,s.text.slice(l.length),s.text))==za||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?f(T(o,t-1).text,null,a):0:"add"==n?c=u+e.options.indentUnit:"subtract"==n?c=u-e.options.indentUnit:"number"==typeof n&&(c=u+n),c=Math.max(0,c);var p="",h=0;if(e.options.indentWithTabs)for(var v=Math.floor(c/a);v;--v)h+=a,p+="\t";if(h1)if(Js&&Js.text.join("\n")==t){if(r.ranges.length%Js.text.length==0){u=[];for(var c=0;c=0;f--){var p=r.ranges[f],h=p.from(),d=p.to();p.empty()&&(n&&n>0?h=I(h.line,h.ch-n):e.state.overwrite&&!a?d=I(d.line,Math.min(T(o,d.line).text.length,d.ch+v(s).length)):Js&&Js.lineWise&&Js.text.join("\n")==t&&(h=d=I(h.line,0))),l=e.curOp.updateInput;var g={from:h,to:d,text:u?u[f%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Mi(e.doc,g),_t(e,"inputRead",e,g)}t&&!a&&Jo(e,t),Kn(e),e.curOp.updateInput=l,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Xo(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||hr(t,function(){return Zo(t,n,0,null,"paste")}),!0}function Jo(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=$o(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(T(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=$o(e,i.head.line,"smart"));a&&_t(e,"electricInput",e,i.head.line)}}}function Qo(e){for(var t=[],n=[],r=0;r=e.first+e.size)&&(t=new I(r,t.ch,t.sticky),c=T(e,r))}function a(r){var a;if(null==(a=i?mo(e.cm,c,t,n):ho(c,t,n))){if(r||!o())return!1;t=vo(i,e.cm,c,t.line,n)}else t=a;return!0}var s=t,u=n,c=T(e,t.line);if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var l=null,f="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||a(!h);h=!1){var d=c.text.charAt(t.ch)||"\n",v=w(d,p)?"w":f&&"\n"==d?"n":!f||/\s/.test(d)?null:"p";if(!f||h||v||(v="s"),l&&l!=v){n<0&&(n=1,a(),t.sticky="after");break}if(v&&(l=v),n>0&&!a(!h))break}var m=Ei(e,t,s,u,!0);return D(s,m)&&(m.hitSide=!0),m}function ra(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(s-.5*bn(e.display),3);i=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(var c;c=pn(e,a,i),c.outside;){if(n<0?i<=0:i>=o.height){c.hitSide=!0;break}i+=5*n}return c}function ia(e,t){var n=Gt(e,t.line);if(!n||n.hidden)return null;var r=T(e.doc,t.line),i=Wt(n,r,t.line),o=ke(r,e.doc.direction),a="left";if(o){a=xe(o,t.ch)%2?"right":"left"}var s=Yt(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function oa(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function aa(e,t){return t&&(e.bad=!0),e}function sa(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(){l&&(c+=f,l=!1)}function s(e){e&&(a(),c+=e)}function u(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return void s(n||t.textContent.replace(/\u200b/g,""));var c,p=t.getAttribute("cm-marker");if(p){var h=e.findMarks(I(r,0),I(i+1,0),o(+p));return void(h.length&&(c=h[0].find(0))&&s(O(e.doc,c.from,c.to).join(f)))}if("false"==t.getAttribute("contenteditable"))return;var d=/^(pre|div|p)$/i.test(t.nodeName);d&&a();for(var v=0;v=15&&(xa=!1,ba=!0);var Na,Ra=Aa&&(_a||xa&&(null==La||La<12.11)),Ia=ha||ga&&ya>=9,Ba=function(t,n){var r=t.className,i=e(n).exec(r);if(i){var o=r.slice(i.index+i[0].length);t.className=r.slice(0,i.index)+(o?i[1]+o:"")}};Na=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Da=function(e){e.select()};Ea?Da=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ga&&(Da=function(e){try{e.select()}catch(e){}});var ja=function(){this.id=null};ja.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Fa,Ua,Ha=30,za={toString:function(){return"CodeMirror.Pass"}},Wa={scroll:!1},Va={origin:"*mouse"},qa={origin:"+move"},Ga=[""],Ka=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,$a=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Ya=!1,Za=!1,Xa=null,Ja=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?r.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,u=/[1n]/;return function(n,r){var c="ltr"==r?"L":"R";if(0==n.length||"ltr"==r&&!i.test(n))return!1;for(var l=n.length,f=[],p=0;p=this.string.length},cs.prototype.sol=function(){return this.pos==this.lineStart},cs.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},cs.prototype.next=function(){if(this.post},cs.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},cs.prototype.skipToEnd=function(){this.pos=this.string.length},cs.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},cs.prototype.backUp=function(e){this.pos-=e},cs.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},cs.prototype.current=function(){return this.string.slice(this.start,this.pos)},cs.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},cs.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},cs.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ls=function(e,t){this.state=e,this.lookAhead=t},fs=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};fs.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},fs.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},fs.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},fs.fromSaved=function(e,t,n){return t instanceof ls?new fs(e,qe(e.mode,t.state),n,t.lookAhead):new fs(e,qe(e.mode,t),n)},fs.prototype.save=function(e){var t=!1!==e?qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ls(t,this.maxLookAhead):t};var ps=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n},hs=function(e,t,n){this.text=e,re(this,t),this.height=n?n(this):1};hs.prototype.lineNo=function(){return P(this)},Me(hs);var ds,vs={},ms={},gs=null,ys=null,bs={left:0,right:0,top:0,bottom:0},_s=function(e,t,n){this.cm=n;var i=this.vert=r("div",[r("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=r("div",[r("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),es(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),es(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ga&&ya<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};_s.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},_s.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},_s.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},_s.prototype.zeroWidthHack=function(){var e=Aa&&!Ca?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ja,this.disableVert=new ja},_s.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},_s.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ws=function(){};ws.prototype.update=function(){return{bottom:0,right:0}},ws.prototype.setScrollLeft=function(){},ws.prototype.setScrollTop=function(){},ws.prototype.clear=function(){};var xs={native:_s,null:ws},ks=0,Cs=function(e,t,n){var r=e.display;this.viewport=t,this.visible=Fn(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Ut(e),this.force=n,this.dims=wn(e),this.events=[]};Cs.prototype.signal=function(e,t){Ae(e,t)&&this.events.push(arguments)},Cs.prototype.finish=function(){for(var e=this,t=0;t=0&&B(e,i.to())<=0)return r}return-1};var Os=function(e,t){this.anchor=e,this.head=t};Os.prototype.from=function(){return U(this.anchor,this.head)},Os.prototype.to=function(){return F(this.anchor,this.head)},Os.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Hi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=this,r=e,i=e+t;r1||!(this.children[0]instanceof Hi))){var u=[];this.collapse(u),this.children=[new Hi(u)],this.children[0].parent=this}},collapse:function(e){for(var t=this,n=0;n50){for(var s=o.lines.length%25+25,u=s;u10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=this,i=0;it.display.maxLineLength&&(t.display.maxLine=l,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&gr(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&ki(t.doc)),t&&_t(t,"markerCleared",t,this,i,o),n&&ar(t),this.parent&&this.parent.clear()}},Ps.prototype.find=function(e,t){var n=this;null==e&&"bookmark"==this.type&&(e=1);for(var r,i,o=0;o=0;c--)Mi(r,i[c]);u?bi(this,u):this.cm&&Kn(this.cm)}),undo:mr(function(){Li(this,"undo")}),redo:mr(function(){Li(this,"redo")}),undoSelection:mr(function(){Li(this,"undo",!0)}),redoSelection:mr(function(){Li(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=z(this,e),t=z(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s=u.to||null==u.from&&i!=e.line||null!=u.from&&i==t.line&&u.from>=t.ch||n&&!n(u.marker)||r.push(u.marker.parent||u.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),z(this,I(n,t))},indexFromPos:function(e){e=z(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to0)i=new I(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),I(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=T(e.doc,i.line-1).text;a&&(i=new I(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),I(i.line-1,a.length-1),i,"+transpose"))}n.push(new Os(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return hr(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&0==B(t,this.pos)&&n==this.button};var Gs,Ks,$s={toString:function(){return"CodeMirror.Init"}},Ys={},Zs={};Go.defaults=Ys,Go.optionHandlers=Zs;var Xs=[];Go.defineInitHook=function(e){return Xs.push(e)};var Js=null,Qs=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ja,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Qs.prototype.init=function(e){function t(e){if(!Te(i,e)){if(i.somethingSelected())Yo({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Qo(i);Yo({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Wa),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var n=Js.text.join("\n");if(e.clipboardData.setData("Text",n),e.clipboardData.getData("Text")==n)return void e.preventDefault()}var a=ta(),s=a.firstChild;i.display.lineSpace.insertBefore(a,i.display.lineSpace.firstChild),s.value=Js.text.join("\n");var u=document.activeElement;Da(s),setTimeout(function(){i.display.lineSpace.removeChild(a),u.focus(),u==o&&r.showPrimarySelection()},50)}}var n=this,r=this,i=r.cm,o=r.div=e.lineDiv;ea(o,i.options.spellcheck),es(o,"paste",function(e){Te(i,e)||Xo(e,i)||ya<=11&&setTimeout(dr(i,function(){return n.updateFromDOM()}),20)}),es(o,"compositionstart",function(e){n.composing={data:e.data,done:!1}}),es(o,"compositionupdate",function(e){n.composing||(n.composing={data:e.data,done:!1})}),es(o,"compositionend",function(e){n.composing&&(e.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),es(o,"touchstart",function(){return r.forceCompositionEnd()}),es(o,"input",function(){n.composing||n.readFromDOMSoon()}),es(o,"copy",t),es(o,"cut",t)},Qs.prototype.prepareSelection=function(){var e=On(this.cm,!1);return e.focus=this.cm.state.focused,e},Qs.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Qs.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&ia(t,r)||{node:s[0].measure.map[2],offset:0},c=i.linee.firstLine()&&(r=I(r.line-1,T(e.doc,r.line-1).length)),i.ch==T(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,a,s;r.line==t.viewFrom||0==(o=En(e,r.line))?(a=P(t.view[0].line),s=t.view[0].node):(a=P(t.view[o].line),s=t.view[o-1].node.nextSibling);var u,c,l=En(e,i.line);if(l==t.view.length-1?(u=t.viewTo-1,c=t.lineDiv.lastChild):(u=P(t.view[l+1].line)-1,c=t.view[l+1].node.previousSibling),!s)return!1;for(var f=e.doc.splitLines(sa(e,s,c,a,u)),p=O(e.doc,I(a,0),I(u,T(e.doc,u).text.length));f.length>1&&p.length>1;)if(v(f)==v(p))f.pop(),p.pop(),u--;else{if(f[0]!=p[0])break;f.shift(),p.shift(),a++}for(var h=0,d=0,m=f[0],g=p[0],y=Math.min(m.length,g.length);hr.ch&&b.charCodeAt(b.length-d-1)==_.charCodeAt(_.length-d-1);)h--,d++;f[f.length-1]=b.slice(0,b.length-d).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");var x=I(a,h),k=I(u,p.length?v(p).length-d:0);return f.length>1||f[0]||B(x,k)?(Bi(e.doc,f,x,k,"+input"),!0):void 0},Qs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qs.prototype.reset=function(){this.forceCompositionEnd()},Qs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qs.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Qs.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||hr(this.cm,function(){return gr(e.cm)})},Qs.prototype.setUneditable=function(e){e.contentEditable="false"},Qs.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||dr(this.cm,Zo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Qs.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Qs.prototype.onContextMenu=function(){},Qs.prototype.resetPosition=function(){},Qs.prototype.needsContentAttribute=!0;var eu=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new ja,this.hasSelection=!1,this.composing=null};eu.prototype.init=function(e){function t(e){if(!Te(i,e)){if(i.somethingSelected())Yo({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Qo(i);Yo({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Wa):(r.prevInput="",a.value=t.text.join("\n"),Da(a))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var n=this,r=this,i=this.cm,o=this.wrapper=ta(),a=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),Ea&&(a.style.width="0px"),es(a,"input",function(){ga&&ya>=9&&n.hasSelection&&(n.hasSelection=null),r.poll()}),es(a,"paste",function(e){Te(i,e)||Xo(e,i)||(i.state.pasteIncoming=!0,r.fastPoll())}),es(a,"cut",t),es(a,"copy",t),es(e.scroller,"paste",function(t){It(e,t)||Te(i,t)||(i.state.pasteIncoming=!0,r.focus())}),es(e.lineSpace,"selectstart",function(t){It(e,t)||Pe(t)}),es(a,"compositionstart",function(){var e=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),es(a,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},eu.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=On(e);if(e.options.moveInputWithCursor){var i=cn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},eu.prototype.showSelection=function(e){var t=this.cm,r=t.display;n(r.cursorDiv,e.cursors),n(r.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},eu.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Da(this.textarea),ga&&ya>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",ga&&ya>=9&&(this.hasSelection=null))}},eu.prototype.getField=function(){return this.textarea},eu.prototype.supportsTouch=function(){return!1},eu.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Oa||a()!=this.textarea))try{this.textarea.focus()}catch(e){}},eu.prototype.blur=function(){this.textarea.blur()},eu.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},eu.prototype.receivedFocus=function(){this.slowPoll()},eu.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},eu.prototype.fastPoll=function(){function e(){n.poll()||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},eu.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||rs(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(ga&&ya>=9&&this.hasSelection===i||Aa&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(r.length,i.length);a1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},eu.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},eu.prototype.onKeyPress=function(){ga&&ya>=9&&(this.hasSelection=null),this.fastPoll()},eu.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=l,a.style.cssText=c,ga&&ya<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=u),null!=a.selectionStart){(!ga||ga&&ya<9)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?dr(i,Oi)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=Sn(i,e),u=o.scroller.scrollTop;if(s&&!xa){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(s)&&dr(i,_i)(i.doc,Ur(s),Wa);var c=a.style.cssText,l=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var f=r.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(ga?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var p;if(ba&&(p=window.scrollY),o.input.focus(),ba&&window.scrollTo(null,p),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),ga&&ya>=9&&t(),Ia){Re(e);var h=function(){Se(window,"mouseup",h),setTimeout(n,20)};es(window,"mouseup",h)}else setTimeout(n,50)}},eu.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},eu.prototype.setUneditable=function(){},eu.prototype.needsContentAttribute=!1,function(e){function t(t,r,i,o){e.defaults[t]=r,i&&(n[t]=o?function(e,t,n){n!=$s&&i(e,t,n)}:i)}var n=e.optionHandlers;e.defineOption=t,e.Init=$s,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Gr(e)},!0),t("indentUnit",2,Gr,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Kr(e),tn(e),gr(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(I(r,o))}r++});for(var i=n.length-1;i>=0;i--)Bi(e.doc,t,n[i],I(n[i].line,n[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=$s&&e.refresh()}),t("specialCharPlaceholder",ct,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Oa?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!Pa),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){zo(e),Wo(e)},!0),t("keyMap","default",function(e,t,n){var r=lo(t),i=n!=$s&&lo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,qo,!0),t("gutters",[],function(e){Ir(e.options),Wo(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?xn(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return nr(e)},!0),t("scrollbarStyle","native",function(e){ir(e),nr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Ir(e.options),Wo(e)},!0),t("firstLineNumber",1,Wo,!0),t("lineNumberFormatter",function(e){return e},Wo,!0),t("showCursorWhenSelecting",!1,Tn,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Bn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,Vo),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Tn,!0),t("singleCursorHeightPerLine",!0,Tn,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Kr,!0),t("addModeClass",!1,Kr,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Kr,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Go),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&dr(this,t[e])(this,n,i),Ee(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](lo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nr&&($o(t,o.head.line,e,!0),r=o.head.line,i==t.doc.sel.primIndex&&Kn(t));else{var a=o.from(),s=o.to(),u=Math.max(r,a.line);r=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var c=u;c0&&mi(t.doc,i,new Os(a,l[i].to()),Wa)}}}),getTokenAt:function(e,t){return et(this,e,t)},getLineTokens:function(e,t){return et(this,I(e),t,!0)},getTokenTypeAt:function(e){e=z(this.doc,e);var t,n=Ye(this,T(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=T(this.doc,e)}else r=e;return an(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-ye(r):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return _n(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=cn(this,z(this.doc,e));var a=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var u=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>u)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=u&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Vn(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:vr(So),triggerOnKeyPress:vr(Oo),triggerOnKeyUp:To,triggerOnMouseDown:vr(Mo),execCommand:function(e){if(zs.hasOwnProperty(e))return zs[e].call(null,this)},triggerElectric:vr(function(e){Jo(this,e)}),findPosH:function(e,t,n,r){var i=this,o=1;t<0&&(o=-1,t=-t);for(var a=z(this.doc,e),s=0;s0&&s(n.charAt(r-1));)--r;for(;i.5)&&Cn(this),Ee(this,"refresh",this)}),swapDoc:vr(function(e){var t=this.doc;return t.cm=null,Xr(this,e),tn(this),this.display.input.reset(),$n(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,_t(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Me(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Go);var tu="iter insert remove copy getEditor constructor".split(" ");for(var nu in Rs.prototype)Rs.prototype.hasOwnProperty(nu)&&p(tu,nu)<0&&(Go.prototype[nu]=function(e){return function(){return e.apply(this.doc,arguments)}}(Rs.prototype[nu]));return Me(Rs),Go.inputStyles={textarea:eu,contenteditable:Qs},Go.defineMode=function(e){Go.defaults.mode||"null"==e||(Go.defaults.mode=e),Ue.apply(this,arguments)},Go.defineMIME=He,Go.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Go.defineMIME("text/plain","null"),Go.defineExtension=function(e,t){Go.prototype[e]=t},Go.defineDocExtension=function(e,t){Rs.prototype[e]=t},Go.fromTextArea=la,function(e){e.off=Se,e.on=es,e.wheelEventPixels=Dr,e.Doc=Rs,e.splitLines=ns,e.countColumn=f,e.findColumn=h,e.isWordChar=_,e.Pass=za,e.signal=Ee,e.Line=hs,e.changeEnd=Hr,e.scrollbarModel=xs,e.Pos=I,e.cmpPos=B,e.modes=as,e.mimeModes=ss,e.resolveMode=ze,e.getMode=We,e.modeExtensions=us,e.extendMode=Ve,e.copyState=qe,e.startState=Ke,e.innerMode=Ge,e.commands=zs,e.keyMap=Hs,e.keyName=co,e.isModifierKey=so,e.lookupKey=ao,e.normalizeKeyMap=oo,e.StringStream=cs,e.SharedTextMarker=Ls,e.TextMarker=Ps,e.LineWidget=As,e.e_preventDefault=Pe,e.e_stopPropagation=Le,e.e_stop=Re,e.addClass=s,e.contains=o,e.rmClass=Ba,e.keyNames=Ds}(Go),Go.version="5.31.0",Go})},function(e,t,n){var r=n(19),i=n(8),o=n(58),a=n(48),s=function(e,t,n){var u,c,l,f=e&s.F,p=e&s.G,h=e&s.S,d=e&s.P,v=e&s.B,m=e&s.W,g=p?i:i[t]||(i[t]={}),y=g.prototype,b=p?r:h?r[t]:(r[t]||{}).prototype;p&&(n=t);for(u in n)(c=!f&&b&&void 0!==b[u])&&u in g||(l=c?b[u]:n[u],g[u]=p&&"function"!=typeof b[u]?n[u]:v&&c?o(l,r):m&&b[u]==l?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(l):d&&"function"==typeof l?o(Function.call,l):l,d&&((g.virtual||(g.virtual={}))[u]=l,e&s.R&&y&&!y[u]&&a(y,u,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},function(e,t,n){"use strict";var r=null;e.exports={debugTool:r}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(380),o=r(i),a=n(390),s=r(a),u="function"==typeof s.default&&"symbol"==typeof o.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};t.default="function"==typeof s.default&&"symbol"===u(o.default)?function(e){return void 0===e?"undefined":u(e)}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":void 0===e?"undefined":u(e)}},function(e,t,n){var r;!function(i){"use strict";function o(e){function t(e,r){var i,o,a,s,u,c,l=this;if(!(l instanceof t))return W&&P(26,"constructor call without new",e),new t(e,r);if(null!=r&&V(r,2,64,R,"base")){if(r|=0,c=e+"",10==r)return l=new t(e instanceof t?e:c),L(l,D+l.e+1,j);if((s="number"==typeof e)&&0*e!=0||!new RegExp("^-?"+(i="["+k.slice(0,r)+"]+")+"(?:\\."+i+")?$",r<37?"i":"").test(c))return m(l,c,s,r);s?(l.s=1/e<0?(c=c.slice(1),-1):1,W&&c.replace(/^0\.0*|\./,"").length>15&&P(R,x,e),s=!1):l.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=n(c,10,r,l.s)}else{if(e instanceof t)return l.s=e.s,l.e=e.e,l.c=(e=e.c)?e.slice():e,void(R=0);if((s="number"==typeof e)&&0*e==0){if(l.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,a=e;a>=10;a/=10,o++);return l.e=o,l.c=[e],void(R=0)}c=e+""}else{if(!g.test(c=e+""))return m(l,c,s);l.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((o=c.indexOf("."))>-1&&(c=c.replace(".","")),(a=c.search(/e/i))>0?(o<0&&(o=a),o+=+c.slice(a+1),c=c.substring(0,a)):o<0&&(o=c.length),a=0;48===c.charCodeAt(a);a++);for(u=c.length;48===c.charCodeAt(--u););if(c=c.slice(a,u+1))if(u=c.length,s&&W&&u>15&&(e>E||e!==b(e))&&P(R,x,l.s*e),(o=o-a-1)>z)l.c=l.e=null;else if(o=0&&(u=K,K=0,e=e.replace(".",""),d=new t(r),l=d.pow(e.length-v),K=u,d.c=f(h(s(l.c),l.e),10,n),d.e=d.c.length),p=f(e,r,n),a=u=p.length;0==p[--u];p.pop());if(!p[0])return"0";if(v<0?--a:(l.c=p,l.e=a,l.s=i,l=N(l,d,m,g,n),p=l.c,c=l.r,a=l.e),o=a+m+1,v=p[o],u=n/2,c=c||o<0||null!=p[o+1],c=g<4?(null!=v||c)&&(0==g||g==(l.s<0?3:2)):v>u||v==u&&(4==g||c||6==g&&1&p[o-1]||g==(l.s<0?8:7)),o<1||!p[0])e=c?h("1",-m):"0";else{if(p.length=o,c)for(--n;++p[--o]>n;)p[o]=0,o||(++a,p.unshift(1));for(u=p.length;!p[--u];);for(v=0,e="";v<=u;e+=k.charAt(p[v++]));e=h(e,a)}return e}function r(e,n,r,i){var o,a,u,c,l;if(r=null!=r&&V(r,0,8,i,w)?0|r:j,!e.c)return e.toString();if(o=e.c[0],u=e.e,null==n)l=s(e.c),l=19==i||24==i&&u<=F?p(l,u):h(l,u);else if(e=L(new t(e),n,r),a=e.e,l=s(e.c),c=l.length,19==i||24==i&&(n<=a||a<=F)){for(;cc){if(--n>0)for(l+=".";n--;l+="0");}else if((n+=a-c)>0)for(a+1==c&&(l+=".");n--;l+="0");return e.s<0&&o?"-"+l:l}function i(e,n){var r,i,o=0;for(l(e[0])&&(e=e[0]),r=new t(e[0]);++on||e!=d(e))&&P(r,(i||"decimal places")+(en?" out of range":" not an integer"),e),!0}function M(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,r++);return(n=r+n*S-1)>z?e.c=e.e=null:n=10;s/=10,i++);if((o=t-i)<0)o+=S,a=t,u=f[c=0],l=u/p[i-a-1]%10|0;else if((c=y((o+1)/S))>=f.length){if(!r)break e;for(;f.length<=c;f.push(0));u=l=0,i=1,o%=S,a=o-S+1}else{for(u=s=f[c],i=1;s>=10;s/=10,i++);o%=S,a=o-S+i,l=a<0?0:u/p[i-a-1]%10|0}if(r=r||t<0||null!=f[c+1]||(a<0?u:u%p[i-a-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(o>0?a>0?u/p[i-a]:0:f[c-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,r?(t-=e.e+1,f[0]=p[(S-t%S)%S],e.e=-t||0):f[0]=e.e=0,e;if(0==o?(f.length=c,s=1,c--):(f.length=c+1,s=p[S-o],f[c]=a>0?b(u/p[i-a]%p[a])*s:0),r)for(;;){if(0==c){for(o=1,a=f[0];a>=10;a/=10,o++);for(a=f[0]+=s,s=1;a>=10;a/=10,s++);o!=s&&(e.e++,f[0]==C&&(f[0]=1));break}if(f[c]+=s,f[c]!=C)break;f[c--]=0,s=1}for(o=f.length;0===f[--o];f.pop());}e.e>z?e.c=e.e=null:e.en)return null!=(e=i[n++])};return a(t="DECIMAL_PLACES")&&V(e,0,A,2,t)&&(D=0|e),r[t]=D,a(t="ROUNDING_MODE")&&V(e,0,8,2,t)&&(j=0|e),r[t]=j,a(t="EXPONENTIAL_AT")&&(l(e)?V(e[0],-A,0,2,t)&&V(e[1],0,A,2,t)&&(F=0|e[0],U=0|e[1]):V(e,-A,A,2,t)&&(F=-(U=0|(e<0?-e:e)))),r[t]=[F,U],a(t="RANGE")&&(l(e)?V(e[0],-A,-1,2,t)&&V(e[1],1,A,2,t)&&(H=0|e[0],z=0|e[1]):V(e,-A,A,2,t)&&(0|e?H=-(z=0|(e<0?-e:e)):W&&P(2,t+" cannot be zero",e))),r[t]=[H,z],a(t="ERRORS")&&(e===!!e||1===e||0===e?(R=0,V=(W=!!e)?v:c):W&&P(2,t+_,e)),r[t]=W,a(t="CRYPTO")&&(!0===e||!1===e||1===e||0===e?e?(e="undefined"==typeof crypto,!e&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?q=!0:W?P(2,"crypto unavailable",e?void 0:crypto):q=!1):q=!1:W&&P(2,t+_,e)),r[t]=q,a(t="MODULO_MODE")&&V(e,0,9,2,t)&&(G=0|e),r[t]=G,a(t="POW_PRECISION")&&V(e,0,A,2,t)&&(K=0|e),r[t]=K,a(t="FORMAT")&&("object"==typeof e?$=e:W&&P(2,t+" not an object",e)),r[t]=$,r},t.max=function(){return i(arguments,I.lt)},t.min=function(){return i(arguments,I.gt)},t.random=function(){var e=9007199254740992*Math.random()&2097151?function(){return b(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(n){var r,i,o,a,s,u=0,c=[],l=new t(B);if(n=null!=n&&V(n,0,A,14)?0|n:D,a=y(n/S),q)if(crypto.getRandomValues){for(r=crypto.getRandomValues(new Uint32Array(a*=2));u>>11),s>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),r[u]=i[0],r[u+1]=i[1]):(c.push(s%1e14),u+=2);u=a/2}else if(crypto.randomBytes){for(r=crypto.randomBytes(a*=7);u=9e15?crypto.randomBytes(7).copy(r,u):(c.push(s%1e14),u+=7);u=a/7}else q=!1,W&&P(14,"crypto unavailable",crypto);if(!q)for(;u=10;s/=10,u++);ur?1:-1;else for(i=o=0;it[i]?1:-1;break}return o}function r(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]1;e.shift());}return function(i,o,s,u,c){var l,f,p,h,d,v,m,g,y,_,w,x,k,E,T,O,A,M=i.s==o.s?1:-1,P=i.c,N=o.c;if(!(P&&P[0]&&N&&N[0]))return new t(i.s&&o.s&&(P?!N||P[0]!=N[0]:N)?P&&0==P[0]||!N?0*M:M/0:NaN);for(g=new t(M),y=g.c=[],f=i.e-o.e,M=s+f+1,c||(c=C,f=a(i.e/S)-a(o.e/S),M=M/S|0),p=0;N[p]==(P[p]||0);p++);if(N[p]>(P[p]||0)&&f--,M<0)y.push(1),h=!0;else{for(E=P.length,O=N.length,p=0,M+=2,d=b(c/(N[0]+1)),d>1&&(N=e(N,d,c),P=e(P,d,c),O=N.length,E=P.length),k=O,_=P.slice(0,O),w=_.length;w=c/2&&T++;do{if(d=0,(l=n(N,_,O,w))<0){if(x=_[0],O!=w&&(x=x*c+(_[1]||0)),(d=b(x/T))>1)for(d>=c&&(d=c-1),v=e(N,d,c),m=v.length,w=_.length;1==n(v,_,m,w);)d--,r(v,O=10;M/=10,p++);L(g,s+(g.e=p+f*S-1)+1,u,h)}else g.e=f,g.r=+h;return g}}(),m=function(){var e=/^(-?)0([xbo])(?=\w[\w.]*$)/i,n=/^([^.]+)\.$/,r=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,s,u,c){var l,f=u?s:s.replace(o,"");if(i.test(f))a.s=isNaN(f)?null:f<0?-1:1;else{if(!u&&(f=f.replace(e,function(e,t,n){return l="x"==(n=n.toLowerCase())?16:"b"==n?2:8,c&&c!=l?e:t}),c&&(l=c,f=f.replace(n,"$1").replace(r,"0.$1")),s!=f))return new t(f,l);W&&P(R,"not a"+(c?" base "+c:"")+" number",s),a.s=null}a.c=a.e=null,R=0}}(),I.absoluteValue=I.abs=function(){var e=new t(this);return e.s<0&&(e.s=1),e},I.ceil=function(){return L(new t(this),this.e+1,2)},I.comparedTo=I.cmp=function(e,n){return R=1,u(this,new t(e,n))},I.decimalPlaces=I.dp=function(){var e,t,n=this.c;if(!n)return null;if(e=((t=n.length-1)-a(this.e/S))*S,t=n[t])for(;t%10==0;t/=10,e--);return e<0&&(e=0),e},I.dividedBy=I.div=function(e,n){return R=3,N(this,new t(e,n),D,j)},I.dividedToIntegerBy=I.divToInt=function(e,n){return R=4,N(this,new t(e,n),0,1)},I.equals=I.eq=function(e,n){return R=5,0===u(this,new t(e,n))},I.floor=function(){return L(new t(this),this.e+1,3)},I.greaterThan=I.gt=function(e,n){return R=6,u(this,new t(e,n))>0},I.greaterThanOrEqualTo=I.gte=function(e,n){return R=7,1===(n=u(this,new t(e,n)))||0===n},I.isFinite=function(){return!!this.c},I.isInteger=I.isInt=function(){return!!this.c&&a(this.e/S)>this.c.length-2},I.isNaN=function(){return!this.s},I.isNegative=I.isNeg=function(){return this.s<0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.lessThan=I.lt=function(e,n){return R=8,u(this,new t(e,n))<0},I.lessThanOrEqualTo=I.lte=function(e,n){return R=9,-1===(n=u(this,new t(e,n)))||0===n},I.minus=I.sub=function(e,n){var r,i,o,s,u=this,c=u.s;if(R=10,e=new t(e,n),n=e.s,!c||!n)return new t(NaN);if(c!=n)return e.s=-n,u.plus(e);var l=u.e/S,f=e.e/S,p=u.c,h=e.c;if(!l||!f){if(!p||!h)return p?(e.s=-n,e):new t(h?u:NaN);if(!p[0]||!h[0])return h[0]?(e.s=-n,e):new t(p[0]?u:3==j?-0:0)}if(l=a(l),f=a(f),p=p.slice(),c=l-f){for((s=c<0)?(c=-c,o=p):(f=l,o=h),o.reverse(),n=c;n--;o.push(0));o.reverse()}else for(i=(s=(c=p.length)<(n=h.length))?c:n,c=n=0;n0)for(;n--;p[r++]=0);for(n=C-1;i>c;){if(p[--i]0?(u=s,r=l):(o=-o,r=c),r.reverse();o--;r.push(0));r.reverse()}for(o=c.length,n=l.length,o-n<0&&(r=l,l=c,c=r,n=o),o=0;n;)o=(c[--n]=c[n]+l[n]+o)/C|0,c[n]=C===c[n]?0:c[n]%C;return o&&(c.unshift(o),++u),M(e,c,u)},I.precision=I.sd=function(e){var t,n,r=this,i=r.c;if(null!=e&&e!==!!e&&1!==e&&0!==e&&(W&&P(13,"argument"+_,e),e!=!!e&&(e=null)),!i)return null;if(n=i.length-1,t=n*S+1,n=i[n]){for(;n%10==0;n/=10,t--);for(n=i[0];n>=10;n/=10,t++);}return e&&r.e+1>t&&(t=r.e+1),t},I.round=function(e,n){var r=new t(this);return(null==e||V(e,0,A,15))&&L(r,~~e+this.e+1,null!=n&&V(n,0,8,15,w)?0|n:j),r},I.shift=function(e){var n=this;return V(e,-E,E,16,"argument")?n.times("1e"+d(e)):new t(n.c&&n.c[0]&&(e<-E||e>E)?n.s*(e<0?0:1/0):n)},I.squareRoot=I.sqrt=function(){var e,n,r,i,o,u=this,c=u.c,l=u.s,f=u.e,p=D+4,h=new t("0.5");if(1!==l||!c||!c[0])return new t(!l||l<0&&(!c||c[0])?NaN:c?u:1/0);if(l=Math.sqrt(+u),0==l||l==1/0?(n=s(c),(n.length+f)%2==0&&(n+="0"),l=Math.sqrt(n),f=a((f+1)/2)-(f<0||f%2),l==1/0?n="1e"+f:(n=l.toExponential(),n=n.slice(0,n.indexOf("e")+1)+f),r=new t(n)):r=new t(l+""),r.c[0])for(f=r.e,l=f+p,l<3&&(l=0);;)if(o=r,r=h.times(o.plus(N(u,o,p,1))),s(o.c).slice(0,l)===(n=s(r.c)).slice(0,l)){if(r.e=0;){for(r=0,d=w[o]%y,v=w[o]/y|0,u=l,s=o+u;s>o;)f=_[--u]%y,p=_[u]/y|0,c=v*f+p*d,f=d*f+c%y*y+m[s]+r,r=(f/g|0)+(c/y|0)+v*p,m[s--]=f%g;m[s]=r}return r?++i:m.shift(),M(e,m,i)},I.toDigits=function(e,n){var r=new t(this);return e=null!=e&&V(e,1,A,18,"precision")?0|e:null,n=null!=n&&V(n,0,8,18,w)?0|n:j,e?L(r,e,n):r},I.toExponential=function(e,t){return r(this,null!=e&&V(e,0,A,19)?1+~~e:null,t,19)},I.toFixed=function(e,t){return r(this,null!=e&&V(e,0,A,20)?~~e+this.e+1:null,t,20)},I.toFormat=function(e,t){var n=r(this,null!=e&&V(e,0,A,21)?~~e+this.e+1:null,t,21);if(this.c){var i,o=n.split("."),a=+$.groupSize,s=+$.secondaryGroupSize,u=$.groupSeparator,c=o[0],l=o[1],f=this.s<0,p=f?c.slice(1):c,h=p.length;if(s&&(i=a,a=s,s=i,h-=i),a>0&&h>0){for(i=h%a||a,c=p.substr(0,i);i0&&(c+=u+p.slice(i)),f&&(c="-"+c)}n=l?c+$.decimalSeparator+((s=+$.fractionGroupSize)?l.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+$.fractionGroupSeparator):l):c}return n},I.toFraction=function(e){var n,r,i,o,a,u,c,l,f,p=W,h=this,d=h.c,v=new t(B),m=r=new t(B),g=c=new t(B);if(null!=e&&(W=!1,u=new t(e),W=p,(p=u.isInt())&&!u.lt(B)||(W&&P(22,"max denominator "+(p?"out of range":"not an integer"),e),e=!p&&u.c&&L(u,u.e+1,1).gte(B)?u:null)),!d)return h.toString();for(f=s(d),o=v.e=f.length-h.e-1,v.c[0]=T[(a=o%S)<0?S+a:a],e=!e||u.cmp(v)>0?o>0?v:m:u,a=z,z=1/0,u=new t(f),c.c[0]=0;l=N(u,v,0,1),i=r.plus(l.times(g)),1!=i.cmp(e);)r=g,g=i,m=c.plus(l.times(i=m)),c=i,v=u.minus(l.times(i=v)),u=i;return i=N(e.minus(r),g,0,1),c=c.plus(i.times(m)),r=r.plus(i.times(g)),c.s=m.s=h.s,o*=2,n=N(m,g,o,j).minus(h).abs().cmp(N(c,r,o,j).minus(h).abs())<1?[m.toString(),g.toString()]:[c.toString(),r.toString()],z=a,n},I.toNumber=function(){return+this},I.toPower=I.pow=function(e,n){var r,i,o,a=b(e<0?-e:+e),s=this;if(null!=n&&(R=23,n=new t(n)),!V(e,-E,E,23,"exponent")&&(!isFinite(e)||a>E&&(e/=0)||parseFloat(e)!=e&&!(e=NaN))||0==e)return r=Math.pow(+s,e),new t(n?r%n:r);for(n?e>1&&s.gt(B)&&s.isInt()&&n.gt(B)&&n.isInt()?s=s.mod(n):(o=n,n=null):K&&(r=y(K/S+2)),i=new t(B);;){if(a%2){if(i=i.times(s),!i.c)break;r?i.c.length>r&&(i.c.length=r):n&&(i=i.mod(n))}if(!(a=b(a/2)))break;s=s.times(s),r?s.c&&s.c.length>r&&(s.c.length=r):n&&(s=s.mod(n))}return n?i:(e<0&&(i=B.div(i)),o?i.mod(o):r?L(i,K,j):i)},I.toPrecision=function(e,t){return r(this,null!=e&&V(e,1,A,24,"precision")?0|e:null,t,24)},I.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(t=s(r.c),t=null!=e&&V(e,2,64,25,"base")?n(h(t,o),0|e,10,i):o<=F||o>=U?p(t,o):h(t,o),i<0&&r.c[0]&&(t="-"+t)),t},I.truncated=I.trunc=function(){return L(new t(this),this.e+1,1)},I.valueOf=I.toJSON=function(){var e,t=this,n=t.e;return null===n?t.toString():(e=s(t.c),e=n<=F||n>=U?p(e,n):h(e,n),t.s<0?"-"+e:e)},null!=e&&t.config(e),t}function a(e){var t=0|e;return e>0||e===t?t:t-1}function s(e){for(var t,n,r=1,i=e.length,o=e[0]+"";rc^n?1:-1;for(s=(u=i.length)<(c=o.length)?u:c,a=0;ao[a]^n?1:-1;return u==c?0:u>c^n?1:-1}function c(e,t,n){return(e=d(e))>=t&&e<=n}function l(e){return"[object Array]"==Object.prototype.toString.call(e)}function f(e,t,n){for(var r,i,o=[0],a=0,s=e.length;an-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}function p(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function h(e,t){var n,r;if(t<0){for(r="0.";++t;r+="0");e=r+e}else if(n=e.length,++t>n){for(r="0",t-=n;--t;r+="0");e+=r}else t0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},e);return Object.keys(t).forEach(function(e){switch(e){case"to":t[e]&&(t.to=r(t[e]));break;case"from":t[e]=r(t[e]);break;case"condition":t[e]=h(t[e]);break;case"gas":case"gasPrice":t[e]=p(new _(t[e]).round());break;case"value":case"nonce":t[e]=p(t[e]);break;case"data":t[e]=a(t[e])}}),t}function v(e){return e&&Object.keys(e).forEach(function(t){switch(t){case"fromAddress":case"toAddress":e[t]=[].concat(e[t]).map(function(e){return r(e)});break;case"toBlock":case"fromBlock":e[t]=o(e[t])}}),e}function m(e){return S(e)?[e]:e}function g(e){return e&&"hard"===e.type?"hard":"soft"}function y(e){var t=e&&e.hash?e.hash:e,n=g(e);return{hash:l(t),type:n}}function b(e){return e?(x(e)||(e=[e]),e.map(function(e){return{index:f(e&&e.index?e.index:e),type:g(e)}})):[]}var _=n(25),w=n(44),x=w.isArray,k=w.isHex,C=w.isInstanceOf,S=w.isString,E=n(111),T=E.padLeft,O=E.toHex;e.exports={inAddress:r,inAddresses:i,inBlockNumber:o,inData:a,inHash:s,inTopics:u,inFilter:c,inHex:l,inNumber10:f,inNumber16:p,inOptionsCondition:h,inOptions:d,inTraceFilter:v,inTraceType:m,inDeriveHash:y,inDeriveIndex:b}},function(e,t,n){e.exports=!n(59)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n){var r=n(212),i=n(132);e.exports=function(e){return r(i(e))}},function(e,t,n){!function(t,r){e.exports=r(n(43),n(2),n(54))}(0,function(e,t,n){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.PropTypes=t.propTypes=t.inject=t.Provider=t.useStaticRendering=t.trackComponents=t.componentByNodeRegistery=t.renderReporter=t.Observer=t.observer=void 0;var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=n(1);Object.defineProperty(t,"observer",{enumerable:!0,get:function(){return a.observer}}),Object.defineProperty(t,"Observer",{enumerable:!0,get:function(){return a.Observer}}),Object.defineProperty(t,"renderReporter",{enumerable:!0,get:function(){return a.renderReporter}}),Object.defineProperty(t,"componentByNodeRegistery",{enumerable:!0,get:function(){return a.componentByNodeRegistery}}),Object.defineProperty(t,"trackComponents",{enumerable:!0,get:function(){return a.trackComponents}}),Object.defineProperty(t,"useStaticRendering",{enumerable:!0,get:function(){return a.useStaticRendering}});var s=n(8);Object.defineProperty(t,"Provider",{enumerable:!0,get:function(){return i(s).default}});var u=n(6);Object.defineProperty(t,"inject",{enumerable:!0,get:function(){return i(u).default}});var c=n(2),l=r(c),f=n(3),p=i(f),h=n(4),d=(n(9),n(10)),v=r(d),m=void 0;if(m="mobx-react",!l)throw new Error(m+" requires the MobX package");if(!p.default)throw new Error(m+" requires React to be available");"function"==typeof h.unstable_batchedUpdates&&l.extras.setReactionScheduler(h.unstable_batchedUpdates),t.propTypes=v,t.PropTypes=v,t.default=e.exports,"object"===("undefined"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__?"undefined":o(__MOBX_DEVTOOLS_GLOBAL_HOOK__))&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobxReact(e.exports,l)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return y.default?y.default.findDOMNode(e):null}function o(e){var t=i(e);t&&E&&E.set(t,e),T.emit({event:"render",renderTime:e.__$mobRenderEnd-e.__$mobRenderStart,totalTime:Date.now()-e.__$mobRenderStart,component:e,node:t})}function a(){if("undefined"==typeof WeakMap)throw new Error("[mobx-react] tracking components is not supported in this browser.");k||(k=!0)}function s(e){C=e}function u(e,t){var n=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],r=e[t],i=O[t];e[t]=r?!0===n?function(){i.apply(this,arguments),r.apply(this,arguments)}:function(){r.apply(this,arguments),i.apply(this,arguments)}:i}function c(e,t){if(null==e||null==t||"object"!==(void 0===e?"undefined":p(e))||"object"!==(void 0===t?"undefined":p(t)))return e!==t;var n=Object.keys(e);if(n.length!==Object.keys(t).length)return!0;for(var r=void 0,i=n.length-1;r=n[i];i--)if(t[r]!==e[r])return!0;return!1}function l(e,t){if("string"==typeof e)throw new Error("Store names should be provided as array");if(Array.isArray(e))return S||(S=!0,console.warn('Mobx observer: Using observer to inject stores is deprecated since 4.0. Use `@inject("store1", "store2") @observer ComponentClass` or `inject("store1", "store2")(observer(componentClass))` instead of `@observer(["store1", "store2"]) ComponentClass`')),t?x.default.apply(null,e)(l(t)):function(t){return l(e,t)};var n=e;if(!0===n.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),!("function"!=typeof n||n.prototype&&n.prototype.render||n.isReactClass||m.default.Component.isPrototypeOf(n)))return l(m.default.createClass({displayName:n.displayName||n.name,propTypes:n.propTypes,contextTypes:n.contextTypes,getDefaultProps:function(){return n.defaultProps},render:function(){return n.call(this,this.props,this.context)}}));if(!n)throw new Error("Please pass a valid component to 'observer'");return f(n.prototype||n),n.isMobXReactObserver=!0,n}function f(e){u(e,"componentWillMount",!0),["componentDidMount","componentWillUnmount","componentDidUpdate"].forEach(function(t){u(e,t)}),e.shouldComponentUpdate||(e.shouldComponentUpdate=O.shouldComponentUpdate)}Object.defineProperty(t,"__esModule",{value:!0}),t.Observer=t.renderReporter=t.componentByNodeRegistery=void 0;var p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.trackComponents=a,t.useStaticRendering=s,t.observer=l;var h=n(2),d=r(h),v=n(3),m=r(v),g=n(4),y=r(g),b=n(5),_=r(b),w=n(6),x=r(w),k=!1,C=!1,S=!1,E=t.componentByNodeRegistery="undefined"!=typeof WeakMap?new WeakMap:void 0,T=t.renderReporter=new _.default,O={componentWillMount:function(){function e(e){var t=this[e],n=new d.default.Atom("reactive "+e);Object.defineProperty(this,e,{configurable:!0,enumerable:!0,get:function(){return n.reportObserved(),t},set:function(e){!o&&c(t,e)?(t=e,i=!0,n.reportChanged(),i=!1):t=e}})}var t=this;if(!0!==C){var n=this.displayName||this.name||this.constructor&&(this.constructor.displayName||this.constructor.name)||"",r=this._reactInternalInstance&&this._reactInternalInstance._rootNodeID,i=!1,o=!1;e.call(this,"props"),e.call(this,"state");var a=this.render.bind(this),s=null,u=!1,l=function(){return s=new d.default.Reaction(n+"#"+r+".render()",function(){if(!u&&(u=!0,"function"==typeof t.componentWillReact&&t.componentWillReact(),!0!==t.__$mobxIsUnmounted)){var e=!0;try{o=!0,i||m.default.Component.prototype.forceUpdate.call(t),e=!1}finally{o=!1,e&&s.dispose()}}}),f.$mobx=s,t.render=f,f()},f=function(){u=!1;var e=void 0;return s.track(function(){k&&(t.__$mobRenderStart=Date.now()),e=d.default.extras.allowStateChanges(!1,a),k&&(t.__$mobRenderEnd=Date.now())}),e};this.render=l}},componentWillUnmount:function(){if(!0!==C&&(this.render.$mobx&&this.render.$mobx.dispose(),this.__$mobxIsUnmounted=!0,k)){var e=i(this);e&&E&&E.delete(e),T.emit({event:"destroy",component:this,node:e})}},componentDidMount:function(){k&&o(this)},componentDidUpdate:function(){k&&o(this)},shouldComponentUpdate:function(e,t){return C&&console.warn("[mobx-react] It seems that a re-rendering of a React component is triggered while in static (server-side) mode. Please make sure components are rendered only once server-side."),this.state!==t||c(this.props,e)}};(t.Observer=l(function(e){return(0,e.children)()})).propTypes={children:m.default.PropTypes.func.isRequired}},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n6?s-6:0),c=6;c>",a=a||r,null==n[r]){if(t){var s=null===n[r]?"null":"undefined";return new Error("The "+o+" `"+a+"` is marked as required in `"+i+"`, but its value is `"+s+"`.")}return null}return e.apply(void 0,[n,r,i,o,a].concat(u))})}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function i(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function o(e){var t=void 0===e?"undefined":c(e);return Array.isArray(e)?"array":e instanceof RegExp?"object":i(t,e)?"symbol":t}function a(e){var t=o(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function s(e,t){return r(function(n,r,i,s,u){return(0,l.untracked)(function(){if(e&&o(n[r])===t.toLowerCase())return null;var s=void 0;switch(t){case"Array":s=l.isObservableArray;break;case"Object":s=l.isObservableObject;break;case"Map":s=l.isObservableMap;break;default:throw new Error("Unexpected mobxType: "+t)}var c=n[r];if(!s(c)){var f=a(c),p=e?" or javascript `"+t.toLowerCase()+"`":"";return new Error("Invalid prop `"+u+"` of type `"+f+"` supplied to `"+i+"`, expected `mobx.Observable"+t+"`"+p+".")}return null})})}function u(e,t){return r(function(n,r,i,o,a){for(var u=arguments.length,c=Array(u>5?u-5:0),f=5;f",e):2===arguments.length&&"function"==typeof t?F(e,t):1===arguments.length&&"string"==typeof e?i(e):i(t).apply(null,arguments)}function i(e){return function(t,n,r){return r&&"function"==typeof r.value?(r.value=F(e,r.value),r.enumerable=!1,r.configurable=!0,r):Bt(e).apply(this,arguments)}}function o(e,t,n){var r="string"==typeof e?e:e.name||"",i="function"==typeof e?e:t,o="function"==typeof e?t:n;return gt("function"==typeof i,"`runInAction` expects a function"),gt(0===i.length,"`runInAction` expects a function without arguments"),gt("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),U(r,i,o,void 0)}function a(e){return"function"==typeof e&&!0===e.isMobxAction}function s(e,t,n){function r(){o(u)}var i,o,s;"string"==typeof e?(i=e,o=t,s=n):"function"==typeof e&&(i=e.name||"Autorun@"+mt(),o=e,s=t),We(o,"autorun methods cannot have modifiers"),gt("function"==typeof o,"autorun expects a function"),gt(!1===a(o),"Warning: attempted to pass an action to autorun. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action."),s&&(o=o.bind(s));var u=new Yt(i,function(){this.track(r)});return u.schedule(),u.getDisposer()}function u(e,t,n,r){var i,o,a,u;return"string"==typeof e?(i=e,o=t,a=n,u=r):"function"==typeof e&&(i="When@"+mt(),o=e,a=t,u=n),s(i,function(e){if(o.call(u)){e.dispose();var t=ee();a.call(u),te(t)}})}function c(e,t,n){return yt("`autorunUntil` is deprecated, please use `when`."),u.apply(null,arguments)}function l(e,t,n,r){function i(){s(f)}var o,s,u,c;"string"==typeof e?(o=e,s=t,u=n,c=r):"function"==typeof e&&(o=e.name||"AutorunAsync@"+mt(),s=e,u=t,c=n),gt(!1===a(s),"Warning: attempted to pass an action to autorunAsync. Actions are untracked and will not trigger on state changes. Use `reaction` or wrap only your state modification code in an action."),void 0===u&&(u=1),c&&(s=s.bind(c));var l=!1,f=new Yt(o,function(){l||(l=!0,setTimeout(function(){l=!1,f.isDisposed||f.track(i)},u))});return f.schedule(),f.getDisposer()}function f(e,t,n,i,o,a){function s(){if(!w.isDisposed){var e=!1;w.track(function(){var t=m(w);e=St(g,_,t),_=t}),y&&f&&l(_,w),y||!0!==e||l(_,w),y&&(y=!1)}}var u,c,l,f,p,h;"string"==typeof e?(u=e,c=t,l=n,f=i,p=o,h=a):(u=e.name||t.name||"Reaction@"+mt(),c=e,l=t,f=n,p=i,h=o),void 0===f&&(f=!1),void 0===p&&(p=0);var d=Fe(c,en.Reference),v=d[0],m=d[1],g=v===en.Structure;h&&(m=m.bind(h),l=r(u,l.bind(h)));var y=!0,b=!1,_=void 0,w=new Yt(u,function(){p<1?s():b||(b=!0,setTimeout(function(){b=!1,s()},p))});return w.schedule(),w.getDisposer()}function p(e,t,n,r){return("function"==typeof e||He(e))&&arguments.length<3?"function"==typeof t?h(e,t,void 0):h(e,void 0,t):Dt.apply(null,arguments)}function h(e,t,n){var r=Fe(e,en.Recursive),i=r[0],o=r[1];return new Vt(o,n,i===en.Structure,o.name,t)}function d(e,t){gt("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var n={},r=$t.resetId,i=function(r){function i(t,n){r.call(this,function(){return e(n)},null,!1,"Transformer-"+e.name+"-"+t,void 0),this.sourceIdentifier=t,this.sourceObject=n}return It(i,r),i.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},i}(Vt);return function(e){r!==$t.resetId&&(n={},r=$t.resetId);var t=v(e),o=n[t];return o?o.get():(o=n[t]=new i(t,e),o.get())}}function v(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=mt(),Tt(e,"$transformId",t)),t}function m(e,t){return K()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),p(e,t).get()}function g(e){for(var t=[],n=1;n=2,"extendObservable expected 2 or more arguments"),gt("object"==typeof e,"extendObservable expects an object as first argument"),gt(!fn(e),"extendObservable should not be used on maps, use map.merge instead"),t.forEach(function(t){gt("object"==typeof t,"all arguments of extendObservable should be objects"),gt(!T(t),"extending an object with another observable (object) is not supported. Please construct an explicit propertymap, using `toJS` if need. See issue #540"),y(e,t,en.Recursive,null)}),e}function y(e,t,n,r){var i=Je(e,r,n);for(var o in t)if(Et(t,o)){if(e===t&&!At(e,o))continue;var a=Object.getOwnPropertyDescriptor(t,o);Qe(i,o,a)}return e}function b(e,t){return _(at(e,t))}function _(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=_t(e.observing).map(_)),t}function w(e,t){return x(at(e,t))}function x(e){var t={name:e.name};return ie(e)&&(t.observers=oe(e).map(x)),t}function k(e,t,n){return"function"==typeof n?S(e,t,n):C(e,t)}function C(e,t){return kt(e)&&!ot(e)?(yt("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),st(A(e)).intercept(t)):st(e).intercept(t)}function S(e,t,n){return kt(e)&&!ot(e)?(yt("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),g(e,{property:e[t]}),S(e,t,n)):st(e,t).intercept(n)}function E(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(!1===ot(e))return!1;var n=at(e,t);return qt(n)}return qt(e)}function T(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(Ze(e)||fn(e))throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(ot(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||Wt(e)||Jt(e)||qt(e)}function O(e,t,n){return gt(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",t),Mt(e,t),gt(!n||!n.get,"@observable can not be used on getters, use @computed instead"),jt.apply(null,arguments)}function A(e,t){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return O.apply(null,arguments);if(gt(arguments.length<3,"observable expects zero, one or two arguments"),T(e))return e;var n=Fe(e,en.Recursive),r=n[0],i=n[1];switch(r===en.Reference?Ft.Reference:M(i)){case Ft.Array:case Ft.PlainObject:return ze(i,r);case Ft.Reference:case Ft.ComplexObject:return new gn(i,r);case Ft.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case Ft.ViewFunction:return yt("Use `computed(expr)` instead of `observable(expr)`"),p(e,t)}gt(!1,"Illegal State")}function M(e){return null===e||void 0===e?Ft.Reference:"function"==typeof e?e.length?Ft.ComplexFunction:Ft.ViewFunction:Rt(e)?Ft.Array:"object"==typeof e?kt(e)?Ft.PlainObject:Ft.ComplexObject:Ft.Reference}function P(e,t,n,r){return"function"==typeof n?N(e,t,n,r):L(e,t,n)}function L(e,t,n){return kt(e)&&!ot(e)?(yt("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),st(A(e)).observe(t,n)):st(e).observe(t,n)}function N(e,t,n,r){return kt(e)&&!ot(e)?(yt("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),g(e,{property:e[t]}),N(e,t,n,r)):st(e,t).observe(n,r)}function R(e,t,n){function r(r){return t&&n.push([e,r]),r}if(void 0===t&&(t=!0),void 0===n&&(n=null),T(e)){if(t&&null===n&&(n=[]),t&&null!==e&&"object"==typeof e)for(var i=0,o=n.length;i0,"actions should have valid names, got: '"+e+"'");var n=function(){return U(e,t,this,arguments)};return n.isMobxAction=!0,n}function U(e,t,n,r){gt(!qt($t.trackingDerivation),"Computed values or transformers should not invoke actions or trigger other side effects");var i,o=ye();if(o){i=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var u=0;u0}function oe(e){return e.observers}function ae(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function se(e,t){if(1===e.observers.length)e.observers.length=0,ue(e);else{var n=e.observers,r=e.observersIndexes,i=n.pop();if(i!==t){var o=r[t.__mapid]||0;o?r[i.__mapid]=o:delete r[i.__mapid],n[o]=i}delete r[t.__mapid]}}function ue(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,$t.pendingUnobservations.push(e))}function ce(){$t.inBatch++}function le(){if(1===$t.inBatch){for(var e=$t.pendingUnobservations,t=0;t0||Xt(me)}function me(){$t.isRunningReactions=!0;for(var e=$t.pendingReactions,t=0;e.length>0;){if(++t===Zt)throw re(),new Error("Reaction doesn't converge to a stable state after "+Zt+" iterations. Probably there is a cycle in the reactive function: "+e[0]);for(var n=e.splice(0),r=0,i=n.length;r0}function Oe(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),bt(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Ae(e,t){var n=ee();try{for(var r=e.interceptors,i=0,o=r.length;i0}function Pe(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),bt(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Le(e,t){var n=ee(),r=e.changeListeners;if(r){r=r.slice();for(var i=0,o=r.length;i=this.length,value:tt?" (... and "+(e.length-t)+"more)":""):""}function xt(e){return null!==e&&"object"==typeof e}function kt(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function Ct(){for(var e=arguments[0],t=1,n=arguments.length;t=0;r--)if(!Lt(e[r],t[r]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(Pt(e).length!==Pt(t).length)return!1;for(var i in e){if(!(i in t))return!1;if(!Lt(e[i],t[i]))return!1}return!0}return e===t}function Nt(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return xt(e)&&!0===e[n]}}function Rt(e){return Array.isArray(e)||Ze(e)}var It=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};t.extras={allowStateChanges:W,getAtom:at,getDebugName:ut,getDependencyTree:b,getObserverTree:w,isComputingDerivation:K,isSpyEnabled:ye,resetGlobalState:re,spyReport:be,spyReportEnd:we,spyReportStart:_e,trackTransitions:ke,setReactionScheduler:ge},t._={getAdministration:st,resetGlobalState:re},"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx(e.exports);var Bt=ct(function(e,t,n,i,o){Tt(e,t,r(i&&1===i.length?i[0]:n.name||t||"",n))},function(e){return this[e]},function(){gt(!1,"It is not allowed to assign new values to @action fields")},!1,!0);t.action=r,t.runInAction=o,t.isAction=a,t.autorun=s,t.when=u,t.autorunUntil=c,t.autorunAsync=l,t.reaction=f;var Dt=ct(function(e,t,n,r,i){gt(void 0!==i,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.");var o=i.get,a=i.set;gt("function"==typeof o,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var s=!1;r&&1===r.length&&!0===r[0].asStructure&&(s=!0),et(Je(e,void 0,en.Recursive),t,s?Be(o):o,!1,a)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){this.$mobx.values[e].set(t)},!1,!0);t.computed=p,t.createTransformer=d,t.expr=m,t.extendObservable=g,t.intercept=k,t.isComputed=E,t.isObservable=T;var jt=ct(function(e,t,n){var r=V(!0);"function"==typeof n&&(n=Ie(n)),et(Je(e,void 0,en.Recursive),t,n,!0,void 0),q(r)},function(e){var t=this.$mobx.values[e];if(void 0!==t)return t.get()},function(e,t){rt(this,e,t)},!0,!1);t.observable=A;var Ft;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(Ft||(Ft={})),t.observe=P,t.toJS=R,t.toJSlegacy=I,t.toJSON=B,t.whyRun=j,t.useStrict=H,t.isStrictModeEnabled=z;var Ut=function(){function e(e){void 0===e&&(e="Atom@"+mt()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=zt.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){fe(this)},e.prototype.reportChanged=function(){Se("propagatingAtomChange",null,!1),pe(this),Ee(!1)},e.prototype.toString=function(){return this.name},e}();t.BaseAtom=Ut;var Ht=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+mt()),void 0===n&&(n=kn),void 0===r&&(r=kn),e.call(this,t),this.name=t,this.onBecomeObservedHandler=n,this.onBecomeUnobservedHandler=r,this.isPendingUnobservation=!1,this.isBeingTracked=!1}return It(t,e),t.prototype.reportObserved=function(){return ce(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),le(),!!$t.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(Ut);t.Atom=Ht;var zt,Wt=Nt("Atom",Ut),Vt=function(){function e(e,t,n,r,i){this.derivation=e,this.scope=t,this.compareStructural=n,this.dependenciesState=zt.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=zt.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+mt(),this.value=void 0,this.isComputing=!1,this.isRunningSetter=!1,this.name=r||"ComputedValue@"+mt(),i&&(this.setter=F(r+"-setter",i))}return e.prototype.peek=function(){this.isComputing=!0;var e=V(!1),t=this.derivation.call(this.scope);return q(e),this.isComputing=!1,t},e.prototype.peekUntracked=function(){var e=!0;try{var t=this.peek();return e=!1,t}finally{e&&Z(this)}},e.prototype.onBecomeStale=function(){de(this)},e.prototype.onBecomeUnobserved=function(){gt(this.dependenciesState!==zt.NOT_TRACKING,"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row"),J(this),this.value=void 0},e.prototype.get=function(){gt(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),ce(),1===$t.inBatch?G(this)&&(this.value=this.peekUntracked()):(fe(this),G(this)&&this.trackAndCompute()&&he(this));var e=this.value;return le(),e},e.prototype.recoverFromError=function(){this.isComputing=!1},e.prototype.set=function(e){if(this.setter){gt(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else gt(!1,"[ComputedValue '"+this.name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){ye()&&be({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=Y(this,this.peek);return St(this.compareStructural,t,e)},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return s(function(){var o=n.get();if(!r||t){var a=ee();e(o,i),te(a)}r=!1,i=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.whyRun=function(){var e=Boolean($t.trackingDerivation),t=_t(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),n=_t(oe(this).map(function(e){return e.name}));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===zt.NOT_TRACKING?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+wt(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+wt(n)+"\n")},e}(),qt=Nt("ComputedValue",Vt);!function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(zt||(zt={})),t.IDerivationState=zt,t.untracked=Q;var Gt=["mobxGuid","resetId","spyListeners","strictMode","runId"],Kt=function(){function e(){this.version=4,this.trackingDerivation=null,this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isRunningReactions=!1,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),$t=function(){var e=new Kt;if(n.__mobservableTrackingStack||n.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(n.__mobxGlobal&&n.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return n.__mobxGlobal?n.__mobxGlobal:n.__mobxGlobal=e}(),Yt=function(){function e(e,t){void 0===e&&(e="Reaction@"+mt()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=zt.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+mt(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,$t.pendingReactions.push(this),ce(),ve(),le())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,G(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&ye()&&be({object:this,type:"scheduled-reaction"})))},e.prototype.track=function(e){ce();var t,n=ye();n&&(t=Date.now(),_e({object:this,type:"reaction",fn:e})),this._isRunning=!0,Y(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&J(this),n&&we({time:Date.now()-t}),le()},e.prototype.recoverFromError=function(){this._isRunning=!1,this._isTrackPending=!1},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(ce(),J(this),le()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=_t(this._isRunning?this.newObserving:this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+wt(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"},e}();t.Reaction=Yt;var Zt=100,Xt=function(e){return e()},Jt=Nt("Reaction",Yt),Qt={spyReportEnd:!0};t.spy=xe,t.transaction=Ce;var en;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(en||(en={})),t.ValueMode=en,t.asReference=Ie,Ie.mobxModifier=en.Reference,t.asStructure=Be,Be.mobxModifier=en.Structure,t.asFlat=De,De.mobxModifier=en.Flat,t.asMap=je;var tn=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),nn=0,rn=function(){function e(){}return e}();rn.prototype=[];var on=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new Ut(e||"ObservableArray@"+mt())}return e.prototype.makeReactiveArrayItem=function(e){return We(e,"Array values cannot have modifiers"),this.mode===en.Flat||this.mode===en.Reference?e:ze(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return Oe(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Pe(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>nn&&Ke(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){$();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:void 0===t||null===t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=[]),Te(this)){var i=Ae(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return wn;t=i.removedCount,n=i.added}n=n.map(this.makeReactiveArrayItem,this);var o=n.length-t;this.updateArrayLength(r,o);var a=(s=this.values).splice.apply(s,[e,t].concat(n));return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),a;var s},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&ye(),i=Me(this),o=i||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&_e(o),this.atom.reportChanged(),i&&Le(this,o),r&&we()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&ye(),i=Me(this),o=i||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&_e(o),this.atom.reportChanged(),i&&Le(this,o),r&&we()},e}(),an=function(e){function t(t,n,r,i){void 0===i&&(i=!1),e.call(this);var o=new on(r,n,this,i);Ot(this,"$mobx",o),t&&t.length?(o.updateArrayLength(0,t.length),o.values=t.map(o.makeReactiveArrayItem,o),o.notifyArraySplice(0,o.values.slice(),wn)):o.values=[],tn&&Object.defineProperty(o.array,"0",sn)}return It(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t-1&&(this.splice(t,1),!0)},t.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},t.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},t}(rn);vt(an.prototype,function(){return dt(this.slice())}),function(e,t){for(var n=0;n1){for(var d=Array(h),v=0;v1){for(var g=Array(m),y=0;y>>6-a%4*2;r[o>>>2]|=(s|u)<<24-o%4*8,o++}return i.create(r,o)}var n=e,r=n.lib,i=r.WordArray,o=n.enc;o.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o>>2]>>>24-o%4*8&255,s=t[o+1>>>2]>>>24-(o+1)%4*8&255,u=t[o+2>>>2]>>>24-(o+2)%4*8&255,c=a<<16|s<<8|u,l=0;l<4&&o+.75*l>>6*(3-l)&63));var f=r.charAt(64);if(f)for(;i.length%4;)i.push(f);return i.join("")},parse:function(e){var n=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o>>32-o)+t}function r(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<>>32-o)+t}function i(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<>>32-o)+t}function o(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<>>32-o)+t}var a=e,s=a.lib,u=s.WordArray,c=s.Hasher,l=a.algo,f=[];!function(){for(var e=0;e<64;e++)f[e]=4294967296*t.abs(t.sin(e+1))|0}();var p=l.MD5=c.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var a=0;a<16;a++){var s=t+a,u=e[s];e[s]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var c=this._hash.words,l=e[t+0],p=e[t+1],h=e[t+2],d=e[t+3],v=e[t+4],m=e[t+5],g=e[t+6],y=e[t+7],b=e[t+8],_=e[t+9],w=e[t+10],x=e[t+11],k=e[t+12],C=e[t+13],S=e[t+14],E=e[t+15],T=c[0],O=c[1],A=c[2],M=c[3];T=n(T,O,A,M,l,7,f[0]),M=n(M,T,O,A,p,12,f[1]),A=n(A,M,T,O,h,17,f[2]),O=n(O,A,M,T,d,22,f[3]),T=n(T,O,A,M,v,7,f[4]),M=n(M,T,O,A,m,12,f[5]),A=n(A,M,T,O,g,17,f[6]),O=n(O,A,M,T,y,22,f[7]),T=n(T,O,A,M,b,7,f[8]),M=n(M,T,O,A,_,12,f[9]),A=n(A,M,T,O,w,17,f[10]),O=n(O,A,M,T,x,22,f[11]),T=n(T,O,A,M,k,7,f[12]),M=n(M,T,O,A,C,12,f[13]),A=n(A,M,T,O,S,17,f[14]),O=n(O,A,M,T,E,22,f[15]),T=r(T,O,A,M,p,5,f[16]),M=r(M,T,O,A,g,9,f[17]),A=r(A,M,T,O,x,14,f[18]),O=r(O,A,M,T,l,20,f[19]),T=r(T,O,A,M,m,5,f[20]),M=r(M,T,O,A,w,9,f[21]),A=r(A,M,T,O,E,14,f[22]),O=r(O,A,M,T,v,20,f[23]),T=r(T,O,A,M,_,5,f[24]),M=r(M,T,O,A,S,9,f[25]),A=r(A,M,T,O,d,14,f[26]),O=r(O,A,M,T,b,20,f[27]),T=r(T,O,A,M,C,5,f[28]),M=r(M,T,O,A,h,9,f[29]),A=r(A,M,T,O,y,14,f[30]),O=r(O,A,M,T,k,20,f[31]),T=i(T,O,A,M,m,4,f[32]),M=i(M,T,O,A,b,11,f[33]),A=i(A,M,T,O,x,16,f[34]),O=i(O,A,M,T,S,23,f[35]),T=i(T,O,A,M,p,4,f[36]),M=i(M,T,O,A,v,11,f[37]),A=i(A,M,T,O,y,16,f[38]),O=i(O,A,M,T,w,23,f[39]),T=i(T,O,A,M,C,4,f[40]),M=i(M,T,O,A,l,11,f[41]),A=i(A,M,T,O,d,16,f[42]),O=i(O,A,M,T,g,23,f[43]),T=i(T,O,A,M,_,4,f[44]),M=i(M,T,O,A,k,11,f[45]),A=i(A,M,T,O,E,16,f[46]),O=i(O,A,M,T,h,23,f[47]),T=o(T,O,A,M,l,6,f[48]),M=o(M,T,O,A,y,10,f[49]),A=o(A,M,T,O,S,15,f[50]),O=o(O,A,M,T,m,21,f[51]),T=o(T,O,A,M,k,6,f[52]),M=o(M,T,O,A,d,10,f[53]),A=o(A,M,T,O,w,15,f[54]),O=o(O,A,M,T,p,21,f[55]),T=o(T,O,A,M,b,6,f[56]),M=o(M,T,O,A,E,10,f[57]),A=o(A,M,T,O,g,15,f[58]),O=o(O,A,M,T,C,21,f[59]),T=o(T,O,A,M,v,6,f[60]),M=o(M,T,O,A,x,10,f[61]),A=o(A,M,T,O,h,15,f[62]),O=o(O,A,M,T,_,21,f[63]),c[0]=c[0]+T|0,c[1]=c[1]+O|0,c[2]=c[2]+A|0,c[3]=c[3]+M|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e}});a.MD5=c._createHelper(p),a.HmacMD5=c._createHmacHelper(p)}(Math),e.MD5})},function(e,t,n){!function(r,i,o){e.exports=t=i(n(1),n(145),n(146))}(0,function(e){return function(){var t=e,n=t.lib,r=n.Base,i=n.WordArray,o=t.algo,a=o.MD5,s=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=n.hasher.create(),o=i.create(),a=o.words,s=n.keySize,u=n.iterations;a.length1?(e[n[0]]=e[n[0]]||{},e[n[0]][n[1]]=t):e[n[0]]=t},o.prototype.buildCall=function(){var e=this,t=function(){var t=e.toPayload(Array.prototype.slice.call(arguments));return t.callback?e.requestManager.sendAsync(t,function(n,r){t.callback(n,e.formatOutput(r))}):e.formatOutput(e.requestManager.send(t))};return t.request=this.request.bind(this),t},o.prototype.request=function(){var e=this.toPayload(Array.prototype.slice.call(arguments));return e.format=this.formatOutput.bind(this),e},e.exports=o},function(e,t,n){(function(t){function n(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}}function r(e,t){return Array.prototype.slice.call(e,t||0)}function i(e,t){a(e,function(e,n){return t(e,n),!1})}function o(e,t){var n=s(e)?[]:{};return a(e,function(e,r){return n[r]=t(e,r),!1}),n}function a(e,t){if(s(e)){for(var n=0;n=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(412),i=n(222);e.exports=function(e,t){return t&&"hex"===t.encoding&&(e.length>2&&"0x"===e.substr(0,2)&&(e=e.substr(2)),e=r.enc.Hex.parse(e)),i(e,{outputLength:256}).toString()}},function(e,t){e.exports={InvalidNumberOfParams:function(){return new Error("Invalid number of input parameters")},InvalidConnection:function(e){return new Error("CONNECTION ERROR: Couldn't connect to node "+e+".")},InvalidProvider:function(){return new Error("Provider not set or invalid")},InvalidResponse:function(e){var t=e&&e.error&&e.error.message?e.error.message:"Invalid JSON RPC response: "+JSON.stringify(e);return new Error(t)}}},function(e,t,n){var r=n(12),i=function(e){this.name=e.name,this.getter=e.getter,this.setter=e.setter,this.outputFormatter=e.outputFormatter,this.inputFormatter=e.inputFormatter,this.requestManager=null};i.prototype.setRequestManager=function(e){this.requestManager=e},i.prototype.formatInput=function(e){return this.inputFormatter?this.inputFormatter(e):e},i.prototype.formatOutput=function(e){return this.outputFormatter&&null!==e?this.outputFormatter(e):e},i.prototype.extractCallback=function(e){if(r.isFunction(e[e.length-1]))return e.pop()},i.prototype.attachToObject=function(e){var t={get:this.buildGet(),enumerable:!0},n=this.name.split("."),r=n[0];n.length>1&&(e[n[0]]=e[n[0]]||{},e=e[n[0]],r=n[1]),Object.defineProperty(e,r,t),e[o(r)]=this.buildAsyncGet()};var o=function(e){return"get"+e.charAt(0).toUpperCase()+e.slice(1)};i.prototype.buildGet=function(){var e=this;return function(){return e.formatOutput(e.requestManager.send({method:e.getter}))}},i.prototype.buildAsyncGet=function(){var e=this,t=function(t){e.requestManager.sendAsync({method:e.getter},function(n,r){t(n,e.formatOutput(r))})};return t.request=this.request.bind(this),t},i.prototype.request=function(){var e={method:this.getter,params:[],callback:this.extractCallback(Array.prototype.slice.call(arguments))};return e.format=this.formatOutput.bind(this),e},e.exports=i},function(e,t,n){t=e.exports=n(227),t.Stream=t,t.Readable=t,t.Writable=n(153),t.Duplex=n(50),t.Transform=n(230),t.PassThrough=n(481)},function(e,t,n){(function(e){function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===m(e)}function r(e){return"boolean"==typeof e}function i(e){return null===e}function o(e){return null==e}function a(e){return"number"==typeof e}function s(e){return"string"==typeof e}function u(e){return"symbol"==typeof e}function c(e){return void 0===e}function l(e){return"[object RegExp]"===m(e)}function f(e){return"object"==typeof e&&null!==e}function p(e){return"[object Date]"===m(e)}function h(e){return"[object Error]"===m(e)||e instanceof Error}function d(e){return"function"==typeof e}function v(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function m(e){return Object.prototype.toString.call(e)}t.isArray=n,t.isBoolean=r,t.isNull=i,t.isNullOrUndefined=o,t.isNumber=a,t.isString=s,t.isSymbol=u,t.isUndefined=c,t.isRegExp=l,t.isObject=f,t.isDate=p,t.isError=h,t.isFunction=d,t.isPrimitive=v,t.isBuffer=e.isBuffer}).call(t,n(9).Buffer)},function(e,t,n){function r(){i.call(this)}e.exports=r;var i=n(151).EventEmitter;n(38)(r,i),r.Readable=n(80),r.Writable=n(497),r.Duplex=n(498),r.Transform=n(231),r.PassThrough=n(499),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function r(){c.readable&&c.resume&&c.resume()}function o(){l||(l=!0,e.end())}function a(){l||(l=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){c.removeListener("data",n),e.removeListener("drain",r),c.removeListener("end",o),c.removeListener("close",a),c.removeListener("error",s),e.removeListener("error",s),c.removeListener("end",u),c.removeListener("close",u),e.removeListener("close",u)}var c=this;c.on("data",n),e.on("drain",r),e._isStdio||t&&!1===t.end||(c.on("end",o),c.on("close",a));var l=!1;return c.on("error",s),e.on("error",s),c.on("end",u),c.on("close",u),e.on("close",u),e.emit("pipe",c),e}},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";var r=n(4),i=(n(0),{}),o={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,n,i,o,a,s,u){this.isInTransaction()&&r("27");var c,l;try{this._isInTransaction=!0,c=!0,this.initializeAll(0),l=e.call(t,n,i,o,a,s,u),c=!1}finally{try{if(c)try{this.closeAll(0)}catch(e){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return l},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n]/,u=n(124),c=u(function(e,t){if(e.namespaceURI!==o.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML=""+t+"";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(i.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),l=null}e.exports=c},function(e,t,n){"use strict";function r(e){var t=""+e,n=o.exec(t);if(!n)return t;var r,i="",a=0,s=0;for(a=n.index;a]/;e.exports=i},function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,v)||(e[v]=h++,f[e[v]]={}),f[e[v]]}var i,o=n(5),a=n(116),s=n(310),u=n(189),c=n(311),l=n(120),f={},p=!1,h=0,d={topAbort:"abort",topAnimationEnd:c("animationend")||"animationend",topAnimationIteration:c("animationiteration")||"animationiteration",topAnimationStart:c("animationstart")||"animationstart",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topTransitionEnd:c("transitionend")||"transitionend",topVolumeChange:"volumechange",topWaiting:"waiting",topWheel:"wheel"},v="_reactListenersID"+String(Math.random()).slice(2),m=o({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(m.handleTopLevel),m.ReactEventListener=e}},setEnabled:function(e){m.ReactEventListener&&m.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!m.ReactEventListener||!m.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,i=r(n),o=a.registrationNameDependencies[e],s=0;s=s;i--,o=-1){var u=e.getLine(i);o>-1&&(u=u.slice(0,o));var c=a(u,t);if(c)return{from:v(i,c.index),to:v(i,c.index+c[0].length),match:c}}}function u(e,t,r){t=n(t);for(var i,o=1,s=r.line,u=e.firstLine();s>=u;){for(var c=0;c>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?o=a:i=a+1}}function l(e,t,n,r){if(!t.length)return null;var i=r?h:d,o=i(t).split(/\r|\n\r?/);e:for(var a=n.line,s=n.ch,u=e.lastLine()+1-o.length;a<=u;a++,s=0){var l=e.getLine(a).slice(s),f=i(l);if(1==o.length){var p=f.indexOf(o[0]);if(-1==p)continue e;var n=c(l,f,p,i)+s;return{from:v(a,c(l,f,p,i)+s),to:v(a,c(l,f,p+o[0].length,i)+s)}}var m=f.length-o[0].length;if(f.slice(m)==o[0]){for(var g=1;g=u;a--,s=-1){var l=e.getLine(a);s>-1&&(l=l.slice(0,s));var f=i(l);if(1==o.length){var p=f.lastIndexOf(o[0]);if(-1==p)continue e;return{from:v(a,c(l,f,p,i)),to:v(a,c(l,f,p+o[0].length,i))}}var m=o[o.length-1];if(f.slice(0,m.length)==m){for(var g=1,n=a-o.length+1;g0);)r.push({anchor:i.from(),head:i.to()});r.length&&this.setSelections(r,0)})})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){var r=n(22),i=n(8),o=n(59);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){e.exports=!0},function(e,t,n){var r=n(35).f,i=n(47),o=n(17)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){n(387);for(var r=n(19),i=n(48),o=n(60),a=n(17)("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u=t&&r<=n?r-t+10:e}).join("")},a=function(e){for(var t,n=e;n.length>2;)t=n.slice(0,9),n=parseInt(t,10)%97+n.slice(t.length);return parseInt(n,10)%97},s=function(e){this._iban=e};s.fromAddress=function(e){var t=new r(e,16),n=t.toString(36),o=i(n,15);return s.fromBban(o.toUpperCase())},s.fromBban=function(e){var t=a(o("XE00"+e)),n=("0"+(98-t)).slice(-2);return new s("XE"+n+e)},s.createIndirect=function(e){return s.fromBban("ETH"+e.institution+e.identifier)},s.isValid=function(e){return new s(e).isValid()},s.prototype.isValid=function(){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30,31})$/.test(this._iban)&&1===a(o(this._iban))},s.prototype.isDirect=function(){return 34===this._iban.length||35===this._iban.length},s.prototype.isIndirect=function(){return 20===this._iban.length},s.prototype.checksum=function(){return this._iban.substr(2,2)},s.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},s.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},s.prototype.address=function(){if(this.isDirect()){var e=this._iban.substr(4),t=new r(e,36);return i(t.toString(16),20)}return""},s.prototype.toString=function(){return this._iban},e.exports=s},function(e,t,n){var r=n(36),i=n(12),o=function(e){return null===e||void 0===e?null:(e=String(e),0===e.indexOf("0x")?e:i.fromUtf8(e))},a=function(e){return i.isString(e)?e:(e=e||{},e.topics=e.topics||[],e.topics=e.topics.map(function(e){return i.isArray(e)?e.map(o):o(e)}),{topics:e.topics,from:e.from,to:e.to,address:e.address,fromBlock:r.inputBlockNumberFormatter(e.fromBlock),toBlock:r.inputBlockNumberFormatter(e.toBlock)})},s=function(e,t){i.isString(e.options)||e.get(function(e,n){e&&t(e),i.isArray(n)&&n.forEach(function(e){t(null,e)})})},u=function(e){var t=function(t,n){if(t)return e.callbacks.forEach(function(e){e(t)});i.isArray(n)&&n.forEach(function(t){t=e.formatter?e.formatter(t):t,e.callbacks.forEach(function(e){e(null,t)})})};e.requestManager.startPolling({method:e.implementation.poll.call,params:[e.filterId]},e.filterId,t,e.stopWatching.bind(e))},c=function(e,t,n,r,i){var o=this,c={};return n.forEach(function(t){t.setRequestManager(e),t.attachToObject(c)}),this.requestManager=e,this.options=a(t),this.implementation=c,this.filterId=null,this.callbacks=[],this.getLogsCallbacks=[],this.pollFilters=[],this.formatter=r,this.implementation.newFilter(this.options,function(e,t){if(e)o.callbacks.forEach(function(t){t(e)});else if(o.filterId=t,o.getLogsCallbacks.forEach(function(e){o.get(e)}),o.getLogsCallbacks=[],o.callbacks.forEach(function(e){s(o,e)}),o.callbacks.length>0&&u(o),"function"==typeof i)return o.watch(i)}),this};c.prototype.watch=function(e){return this.callbacks.push(e),this.filterId&&(s(this,e),u(this)),this},c.prototype.stopWatching=function(e){if(this.requestManager.stopPolling(this.filterId),this.callbacks=[],!e)return this.implementation.uninstallFilter(this.filterId);this.implementation.uninstallFilter(this.filterId,e)},c.prototype.get=function(e){var t=this;if(!i.isFunction(e)){if(null===this.filterId)throw new Error("Filter ID Error: filter().get() can't be chained synchronous, please provide a callback for the get() method.");return this.implementation.getLogs(this.filterId).map(function(e){return t.formatter?t.formatter(e):e})}return null===this.filterId?this.getLogsCallbacks.push(e):this.implementation.getLogs(this.filterId,function(n,r){n?e(n):e(null,r.map(function(e){return t.formatter?t.formatter(e):e}))}),this},e.exports=c},function(e,t,n){var r=n(65),i=function(){return[new r({name:"newFilter",call:function(e){switch(e[0]){case"latest":return e.shift(),this.params=0,"eth_newBlockFilter";case"pending":return e.shift(),this.params=0,"eth_newPendingTransactionFilter";default:return"eth_newFilter"}},params:1}),new r({name:"uninstallFilter",call:"eth_uninstallFilter",params:1}),new r({name:"getLogs",call:"eth_getFilterLogs",params:1}),new r({name:"poll",call:"eth_getFilterChanges",params:1})]},o=function(){return[new r({name:"newFilter",call:"shh_newFilter",params:1}),new r({name:"uninstallFilter",call:"shh_uninstallFilter",params:1}),new r({name:"getLogs",call:"shh_getMessages",params:1}),new r({name:"poll",call:"shh_getFilterChanges",params:1})]};e.exports={eth:i,shh:o}},function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,n){if(e&&c.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}function o(e){return c.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)}function a(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t}var u=n(469),c=n(470);t.parse=i,t.resolve=a,t.resolveObject=s,t.format=o,t.Url=r;var l=/^([a-z0-9.+-]+:)/i,f=/:[0-9]*$/,p=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["<",">",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(h),v=["'"].concat(d),m=["%","/","?",";","#"].concat(v),g=["/","?","#"],y=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,_={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},x={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},k=n(471);r.prototype.parse=function(e,t,n){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=-1!==r&&r127?R+="x":R+=N[I];if(!R.match(y)){var D=P.slice(0,E),j=P.slice(E+1),F=N.match(b);F&&(D.push(F[1]),j.unshift(F[2])),j.length&&(s="/"+j.join(".")+s),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),M||(this.hostname=u.toASCII(this.hostname));var U=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+U,this.href+=this.host,M&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!_[d])for(var E=0,L=v.length;E0)&&n.host.split("@");S&&(n.auth=S.shift(),n.host=n.hostname=S.shift())}return n.search=e.search,n.query=e.query,c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!k.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=k.slice(-1)[0],T=(n.host||e.host||k.length>1)&&("."===E||".."===E)||""===E,O=0,A=k.length;A>=0;A--)E=k[A],"."===E?k.splice(A,1):".."===E?(k.splice(A,1),O++):O&&(k.splice(A,1),O--);if(!b&&!_)for(;O--;O)k.unshift("..");!b||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),T&&"/"!==k.join("/").substr(-1)&&k.push("");var M=""===k[0]||k[0]&&"/"===k[0].charAt(0);if(C){n.hostname=n.host=M?"":k.length?k.shift():"";var S=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");S&&(n.auth=S.shift(),n.host=n.hostname=S.shift())}return b=b||n.host&&k.length,b&&!M&&k.unshift(""),k.length?n.pathname=k.join("/"):(n.pathname=null,n.path=null),c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=f.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){"use strict";(function(t){function n(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,i)});default:for(o=new Array(s-1),a=0;a>5,this.byteCount=this.blockCount<<2,this.outputBlocks=n>>5,this.extraBytes=(31&n)>>3;for(var r=0;r<50;++r)this.s[r]=0}"object"==typeof t&&t.versions&&t.versions.node&&(r=n);for(var o=!r.JS_SHA3_TEST&&"object"==typeof e&&e.exports,a="0123456789abcdef".split(""),s=[31,7936,2031616,520093696],u=[1,256,65536,16777216],c=[6,1536,393216,100663296],l=[0,8,16,24],f=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],p=[224,256,384,512],h=[128,256],d=["hex","buffer","arrayBuffer","array"],v=function(e,t,n){return function(r){return new i(e,t,e).update(r)[n]()}},m=function(e,t,n){return function(r,o){return new i(e,t,o).update(r)[n]()}},g=function(e,t){var n=v(e,t,"hex");n.create=function(){return new i(e,t,e)},n.update=function(e){return n.create().update(e)};for(var r=0;r>2]|=e[c]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(a[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=s){for(this.start=n-s,this.block=a[u],n=0;n>2]|=this.padding[3&t],this.lastByteIndex==this.byteCount)for(e[0]=e[n],t=1;t>4&15]+a[15&e]+a[e>>12&15]+a[e>>8&15]+a[e>>20&15]+a[e>>16&15]+a[e>>28&15]+a[e>>24&15];s%t==0&&(S(n),o=0)}return i&&(e=n[o],i>0&&(u+=a[e>>4&15]+a[15&e]),i>1&&(u+=a[e>>12&15]+a[e>>8&15]),i>2&&(u+=a[e>>20&15]+a[e>>16&15])),u},i.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,n=this.s,r=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3;e=i?new ArrayBuffer(r+1<<2):new ArrayBuffer(s);for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;s%n==0&&S(r)}return o&&(e=s<<2,t=r[a],o>0&&(u[e]=255&t),o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u};var S=function(e){var t,n,r,i,o,a,s,u,c,l,p,h,d,v,m,g,y,b,_,w,x,k,C,S,E,T,O,A,M,P,L,N,R,I,B,D,j,F,U,H,z,W,V,q,G,K,$,Y,Z,X,J,Q,ee,te,ne,re,ie,oe,ae,se,ue,ce,le;for(r=0;r<48;r+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],p=e[7]^e[17]^e[27]^e[37]^e[47],h=e[8]^e[18]^e[28]^e[38]^e[48],d=e[9]^e[19]^e[29]^e[39]^e[49],t=h^(a<<1|s>>>31),n=d^(s<<1|a>>>31),e[0]^=t,e[1]^=n,e[10]^=t,e[11]^=n,e[20]^=t,e[21]^=n,e[30]^=t,e[31]^=n,e[40]^=t,e[41]^=n,t=i^(u<<1|c>>>31),n=o^(c<<1|u>>>31),e[2]^=t,e[3]^=n,e[12]^=t,e[13]^=n,e[22]^=t,e[23]^=n,e[32]^=t,e[33]^=n,e[42]^=t,e[43]^=n,t=a^(l<<1|p>>>31),n=s^(p<<1|l>>>31),e[4]^=t,e[5]^=n,e[14]^=t,e[15]^=n,e[24]^=t,e[25]^=n,e[34]^=t,e[35]^=n,e[44]^=t,e[45]^=n,t=u^(h<<1|d>>>31),n=c^(d<<1|h>>>31),e[6]^=t,e[7]^=n,e[16]^=t,e[17]^=n,e[26]^=t,e[27]^=n,e[36]^=t,e[37]^=n,e[46]^=t,e[47]^=n,t=l^(i<<1|o>>>31),n=p^(o<<1|i>>>31),e[8]^=t,e[9]^=n,e[18]^=t,e[19]^=n,e[28]^=t,e[29]^=n,e[38]^=t,e[39]^=n,e[48]^=t,e[49]^=n,v=e[0],m=e[1],K=e[11]<<4|e[10]>>>28,$=e[10]<<4|e[11]>>>28,A=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,W=e[40]<<18|e[41]>>>14,V=e[41]<<18|e[40]>>>14,I=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,y=e[12]<<12|e[13]>>>20,Y=e[22]<<10|e[23]>>>22,Z=e[23]<<10|e[22]>>>22,P=e[33]<<13|e[32]>>>19,L=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,ne=e[4]<<30|e[5]>>>2,D=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,_=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,J=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,S=e[6]<<28|e[7]>>>4,E=e[7]<<28|e[6]>>>4,re=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,F=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,x=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,T=e[18]<<20|e[19]>>>12,O=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,H=e[38]<<8|e[39]>>>24,z=e[39]<<8|e[38]>>>24,k=e[48]<<14|e[49]>>>18,C=e[49]<<14|e[48]>>>18,e[0]=v^~g&b,e[1]=m^~y&_,e[10]=S^~T&A,e[11]=E^~O&M,e[20]=I^~D&F,e[21]=B^~j&U,e[30]=q^~K&Y,e[31]=G^~$&Z,e[40]=te^~re&oe,e[41]=ne^~ie&ae,e[2]=g^~b&w,e[3]=y^~_&x,e[12]=T^~A&P,e[13]=O^~M&L,e[22]=D^~F&H,e[23]=j^~U&z,e[32]=K^~Y&X,e[33]=$^~Z&J,e[42]=re^~oe&se,e[43]=ie^~ae&ue,e[4]=b^~w&k,e[5]=_^~x&C,e[14]=A^~P&N,e[15]=M^~L&R,e[24]=F^~H&W,e[25]=U^~z&V,e[34]=Y^~X&Q,e[35]=Z^~J&ee,e[44]=oe^~se&ce,e[45]=ae^~ue&le,e[6]=w^~k&v,e[7]=x^~C&m,e[16]=P^~N&S,e[17]=L^~R&E,e[26]=H^~W&I,e[27]=z^~V&B,e[36]=X^~Q&q,e[37]=J^~ee&G,e[46]=se^~ce&te,e[47]=ue^~le&ne,e[8]=k^~v&g,e[9]=C^~m&y,e[18]=N^~S&T,e[19]=R^~E&O,e[28]=W^~I&D,e[29]=V^~B&j,e[38]=Q^~q&K,e[39]=ee^~G&$,e[48]=ce^~te&re,e[49]=le^~ne&ie,e[0]^=f[r],e[1]^=f[r+1]};if(o)e.exports=_;else if(r)for(var E in _)r[E]=_[E]}(this)}).call(t,n(18),n(11))},function(e,t,n){"use strict";var r=n(246),i=n(544);i.Logging=r,e.exports=i},function(e,t,n){"use strict";(function(t){function r(e){return"0x"+t.from(e).toString("hex")}function i(e,t){if(e instanceof Array&&t.match(/bytes[0-9]+/)){for(var n="",i=0,o=!1;i=128))&&(n=null)}e=null===n?r(e):n}return"uint"===t.substr(0,4)&&+t.substr(4)<=48&&(e=+e),e}function o(e){for(var t=f(e).slice(2),n=[],r=0;r3&&void 0!==arguments[3]?arguments[3]:[];if(t){var i=r?[t,r]:[t];return this._provider.subscribe(e,n,i)}return this._provider.subscribe(e,n,r)}},{key:"removeListener",value:function(e){return this._provider.unsubscribe(e)}},{key:"unsubscribe",value:function(e){return this.removeListener(e)}}]),e}();e.exports=o},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n,r){n&&(0,b.default)(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function o(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}function a(e){for(var t={};e;)!function(){var n=e&&e.constructor&&e.constructor.name||"";(0,v.default)(e).sort().forEach(function(e){Object.prototype.hasOwnProperty.call(t,e)||(t[e]={name:e,prototypeName:n})}),e=(0,h.default)(e)}();return(0,g.default)(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s,u,c,l,f,p=n(29),h=r(p),d=n(633),v=r(d),m=n(636),g=r(m),y=n(31),b=r(y),_=n(51),w=r(_),x=n(6),k=r(x),C=n(7),S=r(C),E=n(43),T=n(115),O=void 0,A=(s=function(){function e(){(0,k.default)(this,e),i(this,"values",u,this),i(this,"position",c,this),i(this,"show",l,this),i(this,"selected",f,this),this.elements={},this.inputNode=null,this.lastObject=null,this.lastObjectPropertyNames=[]}return(0,S.default)(e,[{key:"clearCache",value:function(){this.lastObject=null,this.lastObjectPropertyNames=null}},{key:"focus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(0===this.values.length)return void(this.selected=null);if(this.selected=null===this.selected?1===e?0:this.values.length-1:(this.values.length+this.selected+e)%this.values.length,!this.isVisible(this.selected)){var t=this.elements[this.selected];t&&t.scrollIntoView(-1===e)}}},{key:"focusOnInput",value:function(){this.inputNode&&this.inputNode.focus()}},{key:"hide",value:function(){this.show=!1,this.selected=null}},{key:"isVisible",value:function(e){var t=this.elements[e];if(!t)return!1;var n=t.getBoundingClientRect(),r=t.parentElement.getBoundingClientRect();return!(n.topr.bottom)}},{key:"select",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.selected,n=null===t?0:t;if(!this.values[n])return void console.warn("autocomplete::select has been called on AutocompleteStore with wrong value "+n);var r=this.values[n].name,i=e.input,o=i.split(".");o[o.length-1]=r;var a=o.join(".");return this.hide(),this.focusOnInput(),e.updateInput(a,!1)}},{key:"setElement",value:function(e,t){this.elements[e]=t}},{key:"setInputNode",value:function(e){this.inputNode=e}},{key:"setPosition",value:function(){if(this.inputNode){var e=this.inputNode.getBoundingClientRect(),t=document.body.getBoundingClientRect();if(e.top0;!this.show&&t&&this.setPosition(),this.show=t}},{key:"update",value:function(e){if(0===e.length)return this.setValues([]);var t=e.split("."),n=t.pop().toLowerCase(),r=t.join("."),i=r.length>0?r:"window";if(i!==this.lastObject){var o=(0,T.evaluate)(i);o.error?this.lastObjectProperties=[]:this.lastObjectProperties=a(o.result),this.lastObject=i}var s=this.lastObjectProperties.filter(function(e){return e.name.toLowerCase().includes(n)});return this.setValues(s)}},{key:"hasSelected",get:function(){return null!==this.selected}}],[{key:"get",value:function(){return O||(O=new e),O}}]),e}(),u=o(s.prototype,"values",[E.observable],{enumerable:!0,initializer:function(){return[]}}),c=o(s.prototype,"position",[E.observable],{enumerable:!0,initializer:function(){return{}}}),l=o(s.prototype,"show",[E.observable],{enumerable:!0,initializer:function(){return!1}}),f=o(s.prototype,"selected",[E.observable],{enumerable:!0,initializer:function(){return null}}),o(s.prototype,"focus",[E.action],(0,w.default)(s.prototype,"focus"),s.prototype),o(s.prototype,"hide",[E.action],(0,w.default)(s.prototype,"hide"),s.prototype),o(s.prototype,"setPosition",[E.action],(0,w.default)(s.prototype,"setPosition"),s.prototype),o(s.prototype,"setValues",[E.action],(0,w.default)(s.prototype,"setValues"),s.prototype),s);t.default=A},function(e,t,n){"use strict";function r(e){try{return{result:eval.apply(window,[""+e])}}catch(n){try{var t=eval.apply(window,["(function () {\n var x = "+e+";\n return x;\n })()"]);return{result:t}}catch(e){return{error:e}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.evaluate=r},function(e,t,n){"use strict";function r(){if(s)for(var e in u){var t=u[e],n=s.indexOf(e);if(n>-1||a("96",e),!c.plugins[n]){t.extractEvents||a("97",e),c.plugins[n]=t;var r=t.eventTypes;for(var o in r)i(r[o],t,o)||a("98",o,e)}}}function i(e,t,n){c.eventNameDispatchConfigs.hasOwnProperty(n)&&a("99",n),c.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];o(s,t,n)}return!0}return!!e.registrationName&&(o(e.registrationName,t,n),!0)}function o(e,t,n){c.registrationNameModules[e]&&a("100",e),c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(4),s=(n(0),null),u={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s&&a("101"),s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];u.hasOwnProperty(n)&&u[n]===i||(u[n]&&a("102",n),u[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var i=c.registrationNameModules[n[r]];if(i)return i}}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=c},function(e,t,n){"use strict";function r(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function i(e){return"topMouseMove"===e||"topTouchMove"===e}function o(e){return"topMouseDown"===e||"topTouchStart"===e}function a(e,t,n,r){var i=e.type||"unknown-event";e.currentTarget=g.getNodeFromInstance(r),t?v.invokeGuardedCallbackWithCatch(i,n,e):v.invokeGuardedCallback(i,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function o(e,t){var n=s.get(e);if(!n){return null}return n}var a=n(4),s=(n(33),n(71)),u=(n(23),n(28)),c=(n(0),n(3),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){c.validateCallback(t,n);var i=o(e);if(!i)return null;i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],r(i)},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t,n){var i=o(e,"replaceState");i&&(i._pendingStateQueue=[t],i._pendingReplaceState=!0,void 0!==n&&null!==n&&(c.validateCallback(n,"replaceState"),i._pendingCallbacks?i._pendingCallbacks.push(n):i._pendingCallbacks=[n]),r(i))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){(n._pendingStateQueue||(n._pendingStateQueue=[])).push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e&&a("122",t,i(e))}});e.exports=c},function(e,t,n){"use strict";var r=(n(5),n(20)),i=(n(3),r);e.exports=i},function(e,t,n){"use strict";function r(e){var t,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,t>=32||13===t?t:0}e.exports=r},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(134)("keys"),i=n(91);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(19),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,n){var r=n(49),i=n(19).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t,n){var r=n(49);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(30),i=n(384),o=n(140),a=n(133)("IE_PROTO"),s=function(){},u=function(){var e,t=n(135)("iframe"),r=o.length;for(t.style.display="none",n(213).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("