/*! For license information please see 2.265d5543.chunk.js.LICENSE.txt */ (this.webpackJsonpfrontend=this.webpackJsonpfrontend||[]).push([[2],[function(t,e,r){"use strict";t.exports=r(343)},function(t,e,r){t.exports=r(349)()},function(t,e,r){"use strict";r.d(e,"n",(function(){return a})),r.d(e,"g",(function(){return s})),r.d(e,"e",(function(){return u})),r.d(e,"k",(function(){return l})),r.d(e,"l",(function(){return c})),r.d(e,"m",(function(){return f})),r.d(e,"q",(function(){return d})),r.d(e,"p",(function(){return m})),r.d(e,"o",(function(){return g})),r.d(e,"c",(function(){return v})),r.d(e,"a",(function(){return b})),r.d(e,"b",(function(){return y})),r.d(e,"j",(function(){return w})),r.d(e,"d",(function(){return _})),r.d(e,"i",(function(){return M})),r.d(e,"h",(function(){return S})),r.d(e,"f",(function(){return A}));var n,i=r(1),o=r.n(i);function a(t){document.body.style.paddingRight=t>0?t+"px":null}function s(){var t=window.getComputedStyle(document.body,null);return parseInt(t&&t.getPropertyValue("padding-right")||0,10)}function u(){var t=function(){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t);var e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e}(),e=document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")[0],r=e?parseInt(e.style.paddingRight||0,10):0;document.body.clientWidth0;)o[r=n[i-=1]]=t[r];return o}var h={};function d(t){h[t]||("undefined"!==typeof console&&console.error(t),h[t]=!0)}var p="object"===typeof window&&window.Element||function(){};var m=o.a.oneOfType([o.a.string,o.a.func,function(t,e,r){if(!(t[e]instanceof p))return new Error("Invalid prop `"+e+"` supplied to `"+r+"`. Expected prop to be an instance of Element. Validation failed.")},o.a.shape({current:o.a.any})]),g=o.a.oneOfType([o.a.func,o.a.string,o.a.shape({$$typeof:o.a.symbol,render:o.a.func}),o.a.arrayOf(o.a.oneOfType([o.a.func,o.a.string,o.a.shape({$$typeof:o.a.symbol,render:o.a.func})]))]),v={Fade:150,Collapse:350,Modal:300,Carousel:600},b=["in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],y={ENTERING:"entering",ENTERED:"entered",EXITING:"exiting",EXITED:"exited"},w={esc:27,space:32,enter:13,tab:9,up:38,down:40,home:36,end:35,n:78,p:80},_=!("undefined"===typeof window||!window.document||!window.document.createElement);function x(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function M(t){var e=typeof t;return null!=t&&("object"===e||"function"===e)}function E(t){if(function(t){return!(!t||"object"!==typeof t)&&"current"in t}(t))return t.current;if(function(t){if(!M(t))return!1;var e=x(t);return"[object Function]"===e||"[object AsyncFunction]"===e||"[object GeneratorFunction]"===e||"[object Proxy]"===e}(t))return t();if("string"===typeof t&&_){var e=document.querySelectorAll(t);if(e.length||(e=document.querySelectorAll("#"+t)),!e.length)throw new Error("The target '"+t+"' could not be identified in the dom, tip: check spelling");return e}return t}function k(t){return null!==t&&(Array.isArray(t)||_&&"number"===typeof t.length)}function S(t,e){var r=E(t);return e?k(r)?r:null===r?[]:[r]:k(r)?r[0]:r}var A=["a[href]","area[href]","input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","object","embed","[tabindex]:not(.modal)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])']},function(t,e,r){t.exports=r(205)},function(t,e,r){"use strict";function n(){return(n=Object.assign||function(t){for(var e=1;e=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(t).length;default:if(n)return z(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function v(t,e,r,n,i){if(0===t.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"===typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var f=!0,h=0;hi&&(n=i):n=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:l>223?3:l>191?2:1;if(i+f<=r)switch(f){case 1:l<128&&(c=l);break;case 2:128===(192&(o=t[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],a=t[i+2],128===(192&o)&&128===(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),l=this.slice(n,i),c=t.slice(e,r),f=0;fi)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return _(this,t,e,r);case"latin1":case"binary":return x(this,t,e,r);case"base64":return M(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function P(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function I(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function R(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function F(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,o){return o||F(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,o){return o||F(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||D(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||D(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||P(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"===typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function H(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(20))},function(t,e,r){"use strict";function n(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(l){return void r(l)}s.done?e(u):Promise.resolve(u).then(n,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,o){var a=t.apply(e,r);function s(t){n(a,i,o,s,u,"next",t)}function u(t){n(a,i,o,s,u,"throw",t)}s(void 0)}))}}r.d(e,"a",(function(){return i}))},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";function n(t,e){for(var r=0;r=0||(i[r]=t[r]);return i}r.d(e,"a",(function(){return n}))},function(t,e,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var t=[],e=0;e=0;n--){var i=e[n](t);if(i)return i}return function(e,n){throw new Error("Invalid value of type "+typeof t+" for "+r+" argument when connecting component "+n.wrappedComponentName+".")}}function L(t,e){return t===e}function z(t){var e=void 0===t?{}:t,r=e.connectHOC,n=void 0===r?E:r,i=e.mapStateToPropsFactories,o=void 0===i?P:i,a=e.mapDispatchToPropsFactories,s=void 0===a?D:a,u=e.mergePropsFactories,l=void 0===u?R:u,c=e.selectorFactory,d=void 0===c?j:c;return function(t,e,r,i){void 0===i&&(i={});var a=i,u=a.pure,c=void 0===u||u,p=a.areStatesEqual,m=void 0===p?L:p,g=a.areOwnPropsEqual,v=void 0===g?S:g,b=a.areStatePropsEqual,y=void 0===b?S:b,w=a.areMergedPropsEqual,_=void 0===w?S:w,x=Object(h.a)(a,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),M=N(t,o,"mapStateToProps"),E=N(e,s,"mapDispatchToProps"),k=N(r,l,"mergeProps");return n(d,Object(f.a)({methodName:"connect",getDisplayName:function(t){return"Connect("+t+")"},shouldHandleStateChanges:Boolean(t),initMapStateToProps:M,initMapDispatchToProps:E,initMergeProps:k,pure:c,areStatesEqual:m,areOwnPropsEqual:v,areStatePropsEqual:y,areMergedPropsEqual:_},x))}}var U=z();var H,W=r(66);H=W.unstable_batchedUpdates,a=H},function(t,e,r){"use strict";function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}r.d(e,"a",(function(){return n}))},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"===typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"===typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,l=[],c=!1,f=-1;function h(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&d())}function d(){if(!c){var t=s(h);c=!0;for(var e=l.length;e;){for(u=l,l=[];++f1)for(var r=1;r=0||(i[r]=t[r]);return i}function L(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var z=function(t){return Array.isArray(t)&&0===t.length},U=function(t){return"function"===typeof t},H=function(t){return null!==t&&"object"===typeof t},W=function(t){return String(Math.floor(Number(t)))===t},q=function(t){return"[object String]"===Object.prototype.toString.call(t)},G=function(t){return 0===n.Children.count(t)},V=function(t){return H(t)&&U(t.then)};function Y(t,e,r,n){void 0===n&&(n=0);for(var i=T(e);t&&n=0?[]:{}}}return(0===o?t:i)[a[o]]===r?t:(void 0===r?delete i[a[o]]:i[a[o]]=r,0===o&&void 0===r&&delete n[a[o]],n)}function K(t,e,r,n){void 0===r&&(r=new WeakMap),void 0===n&&(n={});for(var i=0,o=Object.keys(t);i=r.length)break;o=r[i++]}else{if((i=r.next()).done)break;o=i.value}var a=o;Y(e,a.path)||(e=Z(e,a.path,a.message))}}return e}(r)):e(r)}))}))}),[m.validationSchema]),C=Object(n.useCallback)((function(t,e){return new Promise((function(r){return r(x.current[t].validate(e))}))}),[]),O=Object(n.useCallback)((function(t){var e=Object.keys(x.current).filter((function(t){return U(x.current[t].validate)})),r=e.length>0?e.map((function(e){return C(e,Y(t,e))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(r).then((function(t){return t.reduce((function(t,r,n){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===r||r&&(t=Z(t,e[n],r)),t}),{})}))}),[C]),T=Object(n.useCallback)((function(t){return Promise.all([O(t),m.validationSchema?A(t):{},m.validate?S(t):{}]).then((function(t){var e=t[0],r=t[1],n=t[2];return f.all([e,r,n],{arrayMerge:ot})}))}),[m.validate,m.validationSchema,O,S,A]),D=st((function(t){return void 0===t&&(t=E.values),Object(P.unstable_runWithPriority)(P.unstable_LowPriority,(function(){return T(t).then((function(t){return _.current&&k({type:"SET_ERRORS",payload:t}),t})).catch((function(t){0}))}))})),I=st((function(t){return void 0===t&&(t=E.values),k({type:"SET_ISVALIDATING",payload:!0}),T(t).then((function(t){return _.current&&(k({type:"SET_ISVALIDATING",payload:!1}),o()(E.errors,t)||k({type:"SET_ERRORS",payload:t})),t}))})),R=Object(n.useCallback)((function(t){var e=t&&t.values?t.values:g.current,r=t&&t.errors?t.errors:v.current?v.current:m.initialErrors||{},n=t&&t.touched?t.touched:b.current?b.current:m.initialTouched||{},i=t&&t.status?t.status:y.current?y.current:m.initialStatus;g.current=e,v.current=r,b.current=n,y.current=i;var o=function(){k({type:"RESET_FORM",payload:{isSubmitting:!!t&&!!t.isSubmitting,errors:r,touched:n,status:i,values:e,isValidating:!!t&&!!t.isValidating,submitCount:t&&t.submitCount&&"number"===typeof t.submitCount?t.submitCount:0}})};if(m.onReset){var a=m.onReset(E.values,ht);V(a)?a.then(o):o()}else o()}),[m.initialErrors,m.initialStatus,m.initialTouched]);Object(n.useEffect)((function(){!0!==_.current||o()(g.current,m.initialValues)||(g.current=m.initialValues,h&&R(),u&&D(g.current))}),[h,m.initialValues,R,u,D]),Object(n.useEffect)((function(){h&&!0===_.current&&!o()(v.current,m.initialErrors)&&(v.current=m.initialErrors||et,k({type:"SET_ERRORS",payload:m.initialErrors||et}))}),[h,m.initialErrors]),Object(n.useEffect)((function(){h&&!0===_.current&&!o()(b.current,m.initialTouched)&&(b.current=m.initialTouched||rt,k({type:"SET_TOUCHED",payload:m.initialTouched||rt}))}),[h,m.initialTouched]),Object(n.useEffect)((function(){h&&!0===_.current&&!o()(y.current,m.initialStatus)&&(y.current=m.initialStatus,k({type:"SET_STATUS",payload:m.initialStatus}))}),[h,m.initialStatus,m.initialTouched]);var F=st((function(t){if(U(x.current[t].validate)){var e=Y(E.values,t),r=x.current[t].validate(e);return V(r)?(k({type:"SET_ISVALIDATING",payload:!0}),r.then((function(t){return t})).then((function(e){k({type:"SET_FIELD_ERROR",payload:{field:t,value:e}}),k({type:"SET_ISVALIDATING",payload:!1})}))):(k({type:"SET_FIELD_ERROR",payload:{field:t,value:r}}),Promise.resolve(r))}return m.validationSchema?(k({type:"SET_ISVALIDATING",payload:!0}),A(E.values,t).then((function(t){return t})).then((function(e){k({type:"SET_FIELD_ERROR",payload:{field:t,value:e[t]}}),k({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),j=Object(n.useCallback)((function(t,e){var r=e.validate;x.current[t]={validate:r}}),[]),L=Object(n.useCallback)((function(t){delete x.current[t]}),[]),z=st((function(t,e){return k({type:"SET_TOUCHED",payload:t}),(void 0===e?a:e)?D(E.values):Promise.resolve()})),W=Object(n.useCallback)((function(t){k({type:"SET_ERRORS",payload:t})}),[]),G=st((function(t,e){return k({type:"SET_VALUES",payload:t}),(void 0===e?r:e)?D(t):Promise.resolve()})),K=Object(n.useCallback)((function(t,e){k({type:"SET_FIELD_ERROR",payload:{field:t,value:e}})}),[]),$=st((function(t,e,n){return k({type:"SET_FIELD_VALUE",payload:{field:t,value:e}}),(void 0===n?r:n)?D(Z(E.values,t,e)):Promise.resolve()})),X=Object(n.useCallback)((function(t,e){var r,n=e,i=t;if(!q(t)){t.persist&&t.persist();var o=t.target?t.target:t.currentTarget,a=o.type,s=o.name,u=o.id,l=o.value,c=o.checked,f=(o.outerHTML,o.options),h=o.multiple;n=e||(s||u),i=/number|range/.test(a)?(r=parseFloat(l),isNaN(r)?"":r):/checkbox/.test(a)?function(t,e,r){if("boolean"===typeof t)return Boolean(e);var n=[],i=!1,o=-1;if(Array.isArray(t))n=t,o=t.indexOf(r),i=o>=0;else if(!r||"true"==r||"false"==r)return Boolean(e);if(e&&r&&!i)return n.concat(r);if(!i)return n;return n.slice(0,o).concat(n.slice(o+1))}(Y(E.values,n),c,l):h?function(t){return Array.from(t).filter((function(t){return t.selected})).map((function(t){return t.value}))}(f):l}n&&$(n,i)}),[$,E.values]),J=st((function(t){if(q(t))return function(e){return X(e,t)};X(t)})),Q=st((function(t,e,r){return void 0===e&&(e=!0),k({type:"SET_FIELD_TOUCHED",payload:{field:t,value:e}}),(void 0===r?a:r)?D(E.values):Promise.resolve()})),nt=Object(n.useCallback)((function(t,e){t.persist&&t.persist();var r=t.target,n=r.name,i=r.id,o=(r.outerHTML,e||(n||i));Q(o,!0)}),[Q]),it=st((function(t){if(q(t))return function(e){return nt(e,t)};nt(t)})),at=Object(n.useCallback)((function(t){U(t)?k({type:"SET_FORMIK_STATE",payload:t}):k({type:"SET_FORMIK_STATE",payload:function(){return t}})}),[]),ut=Object(n.useCallback)((function(t){k({type:"SET_STATUS",payload:t})}),[]),lt=Object(n.useCallback)((function(t){k({type:"SET_ISSUBMITTING",payload:t})}),[]),ct=st((function(){return k({type:"SUBMIT_ATTEMPT"}),I().then((function(t){var e=t instanceof Error;if(!e&&0===Object.keys(t).length){var r;try{if(void 0===(r=dt()))return}catch(n){throw n}return Promise.resolve(r).then((function(t){return _.current&&k({type:"SUBMIT_SUCCESS"}),t})).catch((function(t){if(_.current)throw k({type:"SUBMIT_FAILURE"}),t}))}if(_.current&&(k({type:"SUBMIT_FAILURE"}),e))throw t}))})),ft=st((function(t){t&&t.preventDefault&&U(t.preventDefault)&&t.preventDefault(),t&&t.stopPropagation&&U(t.stopPropagation)&&t.stopPropagation(),ct().catch((function(t){console.warn("Warning: An unhandled error was caught from submitForm()",t)}))})),ht={resetForm:R,validateForm:I,validateField:F,setErrors:W,setFieldError:K,setFieldTouched:Q,setFieldValue:$,setStatus:ut,setSubmitting:lt,setTouched:z,setValues:G,setFormikState:at,submitForm:ct},dt=st((function(){return d(E.values,ht)})),pt=st((function(t){t&&t.preventDefault&&U(t.preventDefault)&&t.preventDefault(),t&&t.stopPropagation&&U(t.stopPropagation)&&t.stopPropagation(),R()})),mt=Object(n.useCallback)((function(t){return{value:Y(E.values,t),error:Y(E.errors,t),touched:!!Y(E.touched,t),initialValue:Y(g.current,t),initialTouched:!!Y(b.current,t),initialError:Y(v.current,t)}}),[E.errors,E.touched,E.values]),gt=Object(n.useCallback)((function(t){return{setValue:function(e,r){return $(t,e,r)},setTouched:function(e,r){return Q(t,e,r)},setError:function(e){return K(t,e)}}}),[$,Q,K]),vt=Object(n.useCallback)((function(t){var e=H(t),r=e?t.name:t,n=Y(E.values,r),i={name:r,value:n,onChange:J,onBlur:it};if(e){var o=t.type,a=t.value,s=t.as,u=t.multiple;"checkbox"===o?void 0===a?i.checked=!!n:(i.checked=!(!Array.isArray(n)||!~n.indexOf(a)),i.value=a):"radio"===o?(i.checked=n===a,i.value=a):"select"===s&&u&&(i.value=i.value||[],i.multiple=!0)}return i}),[it,J,E.values]),bt=Object(n.useMemo)((function(){return!o()(g.current,E.values)}),[g.current,E.values]),yt=Object(n.useMemo)((function(){return"undefined"!==typeof l?bt?E.errors&&0===Object.keys(E.errors).length:!1!==l&&U(l)?l(m):l:E.errors&&0===Object.keys(E.errors).length}),[l,bt,E.errors,m]);return B({},E,{initialValues:g.current,initialErrors:v.current,initialTouched:b.current,initialStatus:y.current,handleBlur:it,handleChange:J,handleReset:pt,handleSubmit:ft,resetForm:R,setErrors:W,setFormikState:at,setFieldTouched:Q,setFieldValue:$,setFieldError:K,setStatus:ut,setSubmitting:lt,setTouched:z,setValues:G,submitForm:ct,validateForm:I,validateField:F,isValid:yt,dirty:bt,unregisterField:L,registerField:j,getFieldProps:vt,getFieldMeta:mt,getFieldHelpers:gt,validateOnBlur:a,validateOnChange:r,validateOnMount:u})}function it(t){var e=nt(t),r=t.component,i=t.children,o=t.render,a=t.innerRef;return Object(n.useImperativeHandle)(a,(function(){return e})),Object(n.createElement)(X,{value:e},r?Object(n.createElement)(r,e):o?o(e):i?U(i)?i(e):G(i)?null:n.Children.only(i):null)}function ot(t,e,r){var n=t.slice();return e.forEach((function(e,i){if("undefined"===typeof n[i]){var o=!1!==r.clone&&r.isMergeableObject(e);n[i]=o?f(Array.isArray(e)?[]:{},e,r):e}else r.isMergeableObject(e)?n[i]=f(t[i],e,r):-1===t.indexOf(e)&&n.push(e)})),n}var at="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?n.useLayoutEffect:n.useEffect;function st(t){var e=Object(n.useRef)(t);return at((function(){e.current=t})),Object(n.useCallback)((function(){for(var t=arguments.length,r=new Array(t),n=0;nt?e:t}),0);return Array.from(B({},t,{length:e+1}))}return[]},ft=function(t){function e(e){var r;return(r=t.call(this,e)||this).updateArrayField=function(t,e,n){var i=r.props,o=i.name;(0,i.formik.setFormikState)((function(r){var i="function"===typeof n?n:t,a="function"===typeof e?e:t,s=Z(r.values,o,t(Y(r.values,o))),u=n?i(Y(r.errors,o)):void 0,l=e?a(Y(r.touched,o)):void 0;return z(u)&&(u=void 0),z(l)&&(l=void 0),B({},r,{values:s,errors:n?Z(r.errors,o,u):r.errors,touched:e?Z(r.touched,o,l):r.touched})}))},r.push=function(t){return r.updateArrayField((function(e){return[].concat(ct(e),[F(t)])}),!1,!1)},r.handlePush=function(t){return function(){return r.push(t)}},r.swap=function(t,e){return r.updateArrayField((function(r){return function(t,e,r){var n=ct(t),i=n[e];return n[e]=n[r],n[r]=i,n}(r,t,e)}),!0,!0)},r.handleSwap=function(t,e){return function(){return r.swap(t,e)}},r.move=function(t,e){return r.updateArrayField((function(r){return function(t,e,r){var n=ct(t),i=n[e];return n.splice(e,1),n.splice(r,0,i),n}(r,t,e)}),!0,!0)},r.handleMove=function(t,e){return function(){return r.move(t,e)}},r.insert=function(t,e){return r.updateArrayField((function(r){return lt(r,t,e)}),(function(e){return lt(e,t,null)}),(function(e){return lt(e,t,null)}))},r.handleInsert=function(t,e){return function(){return r.insert(t,e)}},r.replace=function(t,e){return r.updateArrayField((function(r){return function(t,e,r){var n=ct(t);return n[e]=r,n}(r,t,e)}),!1,!1)},r.handleReplace=function(t,e){return function(){return r.replace(t,e)}},r.unshift=function(t){var e=-1;return r.updateArrayField((function(r){var n=r?[t].concat(r):[t];return e<0&&(e=n.length),n}),(function(t){var r=t?[null].concat(t):[null];return e<0&&(e=r.length),r}),(function(t){var r=t?[null].concat(t):[null];return e<0&&(e=r.length),r})),e},r.handleUnshift=function(t){return function(){return r.unshift(t)}},r.handleRemove=function(t){return function(){return r.remove(t)}},r.handlePop=function(){return function(){return r.pop()}},r.remove=r.remove.bind(L(r)),r.pop=r.pop.bind(L(r)),r}j(e,t);var r=e.prototype;return r.componentDidUpdate=function(t){!o()(Y(t.formik.values,t.name),Y(this.props.formik.values,this.props.name))&&this.props.formik.validateOnChange&&this.props.formik.validateForm(this.props.formik.values)},r.remove=function(t){var e;return this.updateArrayField((function(r){var n=r?ct(r):[];return e||(e=n[t]),U(n.splice)&&n.splice(t,1),n}),!0,!0),e},r.pop=function(){var t;return this.updateArrayField((function(e){var r=e;return t||(t=r&&r.pop&&r.pop()),r}),!0,!0),t},r.render=function(){var t={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},e=this.props,r=e.component,i=e.render,o=e.children,a=e.name,s=B({},t,{form:N(e.formik,["validate","validationSchema"]),name:a});return r?Object(n.createElement)(r,s):i?i(s):o?"function"===typeof o?o(s):G(o)?null:n.Children.only(o):null},e}(n.Component);ft.defaultProps={validateOnChange:!0};n.Component,n.Component},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,r){"use strict";var n=Array.isArray;e.a=n},,function(t,e,r){"use strict";r.d(e,"a",(function(){return w})),r.d(e,"b",(function(){return E})),r.d(e,"c",(function(){return m})),r.d(e,"d",(function(){return T})),r.d(e,"e",(function(){return p})),r.d(e,"f",(function(){return M}));var n=r(16),i=r(0),o=r.n(i),a=(r(1),r(46)),s=r(199),u=r(40),l=r(4),c=r(200),f=r.n(c),h=(r(133),r(11)),d=(r(72),function(t){var e=Object(s.a)();return e.displayName=t,e}("Router-History")),p=function(t){var e=Object(s.a)();return e.displayName=t,e}("Router"),m=function(t){function e(e){var r;return(r=t.call(this,e)||this).state={location:e.history.location},r._isMounted=!1,r._pendingLocation=null,e.staticContext||(r.unlisten=e.history.listen((function(t){r._isMounted?r.setState({location:t}):r._pendingLocation=t}))),r}Object(n.a)(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var r=e.prototype;return r.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},r.componentWillUnmount=function(){this.unlisten&&this.unlisten()},r.render=function(){return o.a.createElement(p.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.a.createElement(d.Provider,{children:this.props.children||null,value:this.props.history}))},e}(o.a.Component);o.a.Component;var g=function(t){function e(){return t.apply(this,arguments)||this}Object(n.a)(e,t);var r=e.prototype;return r.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},r.componentDidUpdate=function(t){this.props.onUpdate&&this.props.onUpdate.call(this,this,t)},r.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},r.render=function(){return null},e}(o.a.Component);var v={},b=0;function y(t,e){return void 0===t&&(t="/"),void 0===e&&(e={}),"/"===t?t:function(t){if(v[t])return v[t];var e=f.a.compile(t);return b<1e4&&(v[t]=e,b++),e}(t)(e,{pretty:!0})}function w(t){var e=t.computedMatch,r=t.to,n=t.push,i=void 0!==n&&n;return o.a.createElement(p.Consumer,null,(function(t){t||Object(u.a)(!1);var n=t.history,s=t.staticContext,c=i?n.push:n.replace,f=Object(a.c)(e?"string"===typeof r?y(r,e.params):Object(l.a)({},r,{pathname:y(r.pathname,e.params)}):r);return s?(c(f),null):o.a.createElement(g,{onMount:function(){c(f)},onUpdate:function(t,e){var r=Object(a.c)(e.to);Object(a.f)(r,Object(l.a)({},f,{key:r.key}))||c(f)},to:r})}))}var _={},x=0;function M(t,e){void 0===e&&(e={}),("string"===typeof e||Array.isArray(e))&&(e={path:e});var r=e,n=r.path,i=r.exact,o=void 0!==i&&i,a=r.strict,s=void 0!==a&&a,u=r.sensitive,l=void 0!==u&&u;return[].concat(n).reduce((function(e,r){if(!r&&""!==r)return null;if(e)return e;var n=function(t,e){var r=""+e.end+e.strict+e.sensitive,n=_[r]||(_[r]={});if(n[t])return n[t];var i=[],o={regexp:f()(t,i,e),keys:i};return x<1e4&&(n[t]=o,x++),o}(r,{end:o,strict:s,sensitive:l}),i=n.regexp,a=n.keys,u=i.exec(t);if(!u)return null;var c=u[0],h=u.slice(1),d=t===c;return o&&!d?null:{path:r,url:"/"===r&&""===c?"/":c,isExact:d,params:a.reduce((function(t,e,r){return t[e.name]=h[r],t}),{})}}),null)}var E=function(t){function e(){return t.apply(this,arguments)||this}return Object(n.a)(e,t),e.prototype.render=function(){var t=this;return o.a.createElement(p.Consumer,null,(function(e){e||Object(u.a)(!1);var r=t.props.location||e.location,n=t.props.computedMatch?t.props.computedMatch:t.props.path?M(r.pathname,t.props):e.match,i=Object(l.a)({},e,{location:r,match:n}),a=t.props,s=a.children,c=a.component,f=a.render;return Array.isArray(s)&&0===s.length&&(s=null),o.a.createElement(p.Provider,{value:i},i.match?s?"function"===typeof s?s(i):s:c?o.a.createElement(c,i):f?f(i):null:"function"===typeof s?s(i):null)}))},e}(o.a.Component);function k(t){return"/"===t.charAt(0)?t:"/"+t}function S(t,e){if(!t)return e;var r=k(t);return 0!==e.pathname.indexOf(r)?e:Object(l.a)({},e,{pathname:e.pathname.substr(r.length)})}function A(t){return"string"===typeof t?t:Object(a.e)(t)}function C(t){return function(){Object(u.a)(!1)}}function O(){}o.a.Component;var T=function(t){function e(){return t.apply(this,arguments)||this}return Object(n.a)(e,t),e.prototype.render=function(){var t=this;return o.a.createElement(p.Consumer,null,(function(e){e||Object(u.a)(!1);var r,n,i=t.props.location||e.location;return o.a.Children.forEach(t.props.children,(function(t){if(null==n&&o.a.isValidElement(t)){r=t;var a=t.props.path||t.props.from;n=a?M(i.pathname,Object(l.a)({},t.props,{path:a})):e.match}})),n?o.a.cloneElement(r,{location:i,computedMatch:n}):null}))},e}(o.a.Component);o.a.useContext},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";var n=r(134),i="object"==typeof self&&self&&self.Object===Object&&self,o=n.a||i||Function("return this")();e.a=o},function(t,e,r){"use strict";e.a=function(t){return null!=t&&"object"==typeof t}},function(t,e,r){"use strict";function n(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";var n=r(28).a.Symbol;e.a=n},function(t,e,r){t.exports=function(){var t=t||function(t,e){var r=Object.create||function(){function t(){}return function(e){var r;return t.prototype=e,r=new t,t.prototype=null,r}}(),n={},i=n.lib={},o=i.Base={extend:function(t){var e=r(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},a=i.WordArray=o.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=void 0!=e?e:4*t.length},toString:function(t){return(t||u).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var o=0;o>>2]>>>24-o%4*8&255;e[n+o>>>2]|=a<<24-(n+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var r,n=[],i=function(e){e=e;var r=987654321,n=4294967295;return function(){var i=((r=36969*(65535&r)+(r>>16)&n)<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n;return i/=4294967296,(i+=.5)*(t.random()>.5?1:-1)}},o=0;o>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new a.init(r,e/2)}},l=s.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;i>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;n>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new a.init(r,e)}},c=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(l.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return l.parse(unescape(encodeURIComponent(t)))}},f=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r=this._data,n=r.words,i=r.sigBytes,o=this.blockSize,s=i/(4*o),u=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*o,l=t.min(4*u,i);if(u){for(var c=0;c1?this.errors.length+" errors occurred":this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,yt)}yt.prototype=Object.create(Error.prototype),yt.prototype.constructor=yt,yt.isError=function(t){return t&&"ValidationError"===t.name},yt.formatError=function(t,e){"string"===typeof t&&(t=bt(t));var r=function(e){return e.path=e.label||e.path||"this","function"===typeof t?t(e):t};return 1===arguments.length?r:r(e)};var wt=function(t){return t?gt.SynchronousPromise:Promise};function _t(t,e){return t?null:function(t){return e.push(t),t.value}}function xt(t){var e=t.validations,r=t.value,n=t.path,i=t.sync,o=t.errors,a=t.sort;return o=function(t){return void 0===t&&(t=[]),t.inner&&t.inner.length?t.inner:[].concat(t)}(o),function(t,e){var r=wt(e);return r.all(t.map((function(t){return r.resolve(t).then((function(t){return{fulfilled:!0,value:t}}),(function(t){return{fulfilled:!1,value:t}}))})))}(e,i).then((function(t){var e=t.filter((function(t){return!t.fulfilled})).reduce((function(t,e){var r=e.value;if(!yt.isError(r))throw r;return t.concat(r)}),[]);if(a&&e.sort(a),(o=e.concat(o)).length)throw new yt(o,r,n);return r}))}function Mt(t){var e,r,n,i=t.endEarly,o=Object(mt.a)(t,["endEarly"]);return i?(e=o.validations,r=o.value,n=o.sync,wt(n).all(e).catch((function(t){throw"ValidationError"===t.name&&(t.value=r),t})).then((function(){return r}))):xt(o)}var Et=function(t){return"[object Object]"===Object.prototype.toString.call(t)};var kt=r(71);var St=function(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===r(o[u],u,o))break}return e}}();var At=function(t,e){return t&&St(t,e,$.a)},Ct=r(75),Ot=r(84);var Tt=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var Dt=function(t){return this.__data__.has(t)};function Pt(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Ot.a;++es))return!1;var l=o.get(t);if(l&&o.get(e))return l==e;var c=-1,f=!0,h=2&r?new It:void 0;for(o.set(t,e),o.set(e,t);++c=r.length)throw new Error("Yup.reach cannot resolve an array item at index: "+s+", in the path: "+e+". because there is no value at that index. ");i=r,r=r&&r[f],t=t.innerType}if(!l){if(!t.fields||!t.fields[c])throw new Error("The schema does not contain the path: "+e+". (failed at: "+a+' which is a type: "'+t._type+'")');i=r,r=r&&r[c],t=t.fields[c]}o=c,a=u?"["+s+"]":"."+s})),{schema:t,parent:i,parentPath:o}):{parent:i,parentPath:e,schema:t}}function xe(t,e){var r;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"===typeof t)return Me(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Me(t,e)}(t))||e&&t&&"number"===typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}function Me(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0},length:function(t,e){return void 0===e&&(e=ut.length),this.test({message:e,name:"length",exclusive:!0,params:{length:t},test:function(e){return Be(e)||e.length===this.resolve(t)}})},min:function(t,e){return void 0===e&&(e=ut.min),this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(e){return Be(e)||e.length>=this.resolve(t)}})},max:function(t,e){return void 0===e&&(e=ut.max),this.test({name:"max",exclusive:!0,message:e,params:{max:t},test:function(e){return Be(e)||e.length<=this.resolve(t)}})},matches:function(t,e){var r,n,i=!1;return e&&("object"===typeof e?(i=e.excludeEmptyString,r=e.message,n=e.name):r=e),this.test({name:n||"matches",message:r||ut.matches,params:{regex:t},test:function(e){return Be(e)||""===e&&i||-1!==e.search(t)}})},email:function(t){return void 0===t&&(t=ut.email),this.matches(je,{name:"email",message:t,excludeEmptyString:!0})},url:function(t){return void 0===t&&(t=ut.url),this.matches(Ne,{name:"url",message:t,excludeEmptyString:!0})},uuid:function(t){return void 0===t&&(t=ut.uuid),this.matches(Le,{name:"uuid",message:t,excludeEmptyString:!1})},ensure:function(){return this.default("").transform((function(t){return null===t?"":t}))},trim:function(t){return void 0===t&&(t=ut.trim),this.transform((function(t){return null!=t?t.trim():t})).test({message:t,name:"trim",test:ze})},lowercase:function(t){return void 0===t&&(t=ut.lowercase),this.transform((function(t){return Be(t)?t:t.toLowerCase()})).test({message:t,name:"string_case",exclusive:!0,test:function(t){return Be(t)||t===t.toLowerCase()}})},uppercase:function(t){return void 0===t&&(t=ut.uppercase),this.transform((function(t){return Be(t)?t:t.toUpperCase()})).test({message:t,name:"string_case",exclusive:!0,test:function(t){return Be(t)||t===t.toUpperCase()}})}});Re((function t(){var e=this;if(!(this instanceof t))return new t;ke.call(this,{type:"number"}),this.withMutation((function(){e.transform((function(t){var e=t;if("string"===typeof e){if(""===(e=e.replace(/\s/g,"")))return NaN;e=+e}return this.isType(e)?e:parseFloat(e)}))}))}),ke,{_typeCheck:function(t){return t instanceof Number&&(t=t.valueOf()),"number"===typeof t&&!function(t){return t!=+t}(t)},min:function(t,e){return void 0===e&&(e=lt.min),this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(e){return Be(e)||e>=this.resolve(t)}})},max:function(t,e){return void 0===e&&(e=lt.max),this.test({message:e,name:"max",exclusive:!0,params:{max:t},test:function(e){return Be(e)||e<=this.resolve(t)}})},lessThan:function(t,e){return void 0===e&&(e=lt.lessThan),this.test({message:e,name:"max",exclusive:!0,params:{less:t},test:function(e){return Be(e)||ethis.resolve(t)}})},positive:function(t){return void 0===t&&(t=lt.positive),this.moreThan(0,t)},negative:function(t){return void 0===t&&(t=lt.negative),this.lessThan(0,t)},integer:function(t){return void 0===t&&(t=lt.integer),this.test({name:"integer",message:t,test:function(t){return Be(t)||Number.isInteger(t)}})},truncate:function(){return this.transform((function(t){return Be(t)?t:0|t}))},round:function(t){var e=["ceil","floor","round","trunc"];if("trunc"===(t=t&&t.toLowerCase()||"round"))return this.truncate();if(-1===e.indexOf(t.toLowerCase()))throw new TypeError("Only valid options for round() are: "+e.join(", "));return this.transform((function(e){return Be(e)?e:Math[t](e)}))}});var He=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;var We=new Date("");function qe(){var t=this;if(!(this instanceof qe))return new qe;ke.call(this,{type:"date"}),this.withMutation((function(){t.transform((function(t){return this.isType(t)?t:(t=function(t){var e,r,n=[1,4,5,6,7,10,11],i=0;if(r=He.exec(t)){for(var o,a=0;o=n[a];++a)r[o]=+r[o]||0;r[2]=(+r[2]||1)-1,r[3]=+r[3]||1,r[7]=r[7]?String(r[7]).substr(0,3):0,void 0!==r[8]&&""!==r[8]||void 0!==r[9]&&""!==r[9]?("Z"!==r[8]&&void 0!==r[9]&&(i=60*r[10]+r[11],"+"===r[9]&&(i=0-i)),e=Date.UTC(r[1],r[2],r[3],r[4],r[5]+i,r[6],r[7])):e=+new Date(r[1],r[2],r[3],r[4],r[5],r[6],r[7])}else e=Date.parse?Date.parse(t):NaN;return e}(t),isNaN(t)?We:new Date(t))}))}))}function Ge(t,e){return e||(e=t.slice(0)),t.raw=e,t}Re(qe,ke,{_typeCheck:function(t){return e=t,"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(t.getTime());var e},min:function(t,e){void 0===e&&(e=ct.min);var r=t;if(!ve.isRef(r)&&(r=this.cast(t),!this._typeCheck(r)))throw new TypeError("`min` must be a Date or a value that can be `cast()` to a Date");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(t){return Be(t)||t>=this.resolve(r)}})},max:function(t,e){void 0===e&&(e=ct.max);var r=t;if(!ve.isRef(r)&&(r=this.cast(t),!this._typeCheck(r)))throw new TypeError("`max` must be a Date or a value that can be `cast()` to a Date");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},test:function(t){return Be(t)||t<=this.resolve(r)}})}});var Ve=function(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++ii?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n=n?t:_r(t,e,r)};var Mr=function(t){return function(e){e=Object(d.a)(e);var r=F(e)?Y(e):void 0,n=r?r[0]:e.charAt(0),i=r?xr(r,1).join(""):e.slice(1);return n[t]()+i}}("toUpperCase");var Er=function(t){return Mr(Object(d.a)(t).toLowerCase())},kr=yr((function(t,e,r){return e=e.toLowerCase(),t+(r?Er(e):e)}));var Sr=function(t,e){var r={};return e=he(e,3),At(t,(function(t,n,i){Object(kt.a)(r,e(t,n,i),t)})),r},Ar=r(337),Cr=r.n(Ar);function Or(t,e){void 0===e&&(e=[]);var r=[],n=[];function i(t,i){var o=Object(pe.split)(t)[0];~n.indexOf(o)||n.push(o),~e.indexOf(i+"-"+o)||r.push([i,o])}for(var o in t)if(w(t,o)){var a=t[o];~n.indexOf(o)||n.push(o),ve.isRef(a)&&a.isSibling?i(a.path,o):dt(a)&&a._deps&&a._deps.forEach((function(t){return i(t,o)}))}return Cr.a.array(n,r).reverse()}function Tr(t,e){var r=1/0;return t.some((function(t,n){if(-1!==e.path.indexOf(t))return r=n,!0})),r}function Dr(t){var e=Object.keys(t);return function(t,r){return Tr(e,t)-Tr(e,r)}}function Pr(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n0},of:function(t){var e=this.clone();if(!1!==t&&!dt(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema, or `false` to negate a current sub-schema. not: "+at(t));return e._subType=t,e.innerType=t,e},min:function(t,e){return e=e||ht.min,this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(e){return Be(e)||e.length>=this.resolve(t)}})},max:function(t,e){return e=e||ht.max,this.test({message:e,name:"max",exclusive:!0,params:{max:t},test:function(e){return Be(e)||e.length<=this.resolve(t)}})},ensure:function(){var t=this;return this.default((function(){return[]})).transform((function(e,r){return t._typeCheck(e)?e:null==r?[]:[].concat(r)}))},compact:function(t){var e=t?function(e,r,n){return!t(e,r,n)}:function(t){return!!t};return this.transform((function(t){return null!=t?t.filter(e):t}))},describe:function(){var t=ke.prototype.describe.call(this);return this.innerType&&(t.innerType=this.innerType.describe()),t}});var Ur=function(){function t(t){this._resolve=function(e,r){var n=t(e,r);if(!dt(n))throw new TypeError("lazy() functions must return a valid schema");return n.resolve(r)}}var e=t.prototype;return e.resolve=function(t){return this._resolve(t.value,t)},e.cast=function(t,e){return this._resolve(t,e).cast(t,e)},e.validate=function(t,e){return this._resolve(t,e).validate(t,e)},e.validateSync=function(t,e){return this._resolve(t,e).validateSync(t,e)},e.validateAt=function(t,e,r){return this._resolve(e,r).validateAt(t,e,r)},e.validateSyncAt=function(t,e,r){return this._resolve(e,r).validateSyncAt(t,e,r)},t}();Ur.prototype.__isYupSchema__=!0;var Hr=function(t,e){return new ve(t,e)}},function(t,e,r){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return t}})),u=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&e._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),c(n,t,n.depth)}function u(t,e){var r=s.styles[e];return r?"\x1b["+s.colors[r][0]+"m"+t+"\x1b["+s.colors[r][1]+"m":t}function l(t,e){return t}function c(t,r,n){if(t.customInspect&&r&&M(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return v(i)||(i=c(t,i,n)),i}var o=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(g(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),x(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(r);if(0===a.length){if(M(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(y(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return t.stylize(Date.prototype.toString.call(r),"date");if(x(r))return f(r)}var l,w="",E=!1,k=["{","}"];(d(r)&&(E=!0,k=["[","]"]),M(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return y(r)&&(w=" "+RegExp.prototype.toString.call(r)),_(r)&&(w=" "+Date.prototype.toUTCString.call(r)),x(r)&&(w=" "+f(r)),0!==a.length||E&&0!=r.length?n<0?y(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),l=E?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(l,w,k)):k[0]+w+k[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),C(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=m(r)?c(t,u.value,null):c(t,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function d(t){return Array.isArray(t)}function p(t){return"boolean"===typeof t}function m(t){return null===t}function g(t){return"number"===typeof t}function v(t){return"string"===typeof t}function b(t){return void 0===t}function y(t){return w(t)&&"[object RegExp]"===E(t)}function w(t){return"object"===typeof t&&null!==t}function _(t){return w(t)&&"[object Date]"===E(t)}function x(t){return w(t)&&("[object Error]"===E(t)||t instanceof Error)}function M(t){return"function"===typeof t}function E(t){return Object.prototype.toString.call(t)}function k(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(b(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,REACT_APP_API_KEY:"wR16EUuvYraYHQsmkgphexzCqunDlgG5RHwNlQff",REACT_APP_API_URL:"https://ie5vrztqa7.execute-api.ap-northeast-1.amazonaws.com/api",REACT_APP_IMAGE_URL:"https://img.algodooonline.net"}).NODE_DEBUG||""),r=r.toUpperCase(),!a[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=t.pid;a[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,t)}}else a[r]=function(){};return a[r]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=v,e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=b,e.isRegExp=y,e.isObject=w,e.isDate=_,e.isError=x,e.isFunction=M,e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=r(372);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var t=new Date,e=[k(t.getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",A(),e.format.apply(e,arguments))},e.inherits=r(373),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var O="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function T(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');if(O&&t[O]){var e;if("function"!==typeof(e=t[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o2),g=/Android/.test(t),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),b=m||/Mac/.test(e),y=/\bCrOS\b/.test(t),w=/win/i.test(e),_=f&&t.match(/Version\/(\d*\.\d*)/);_&&(_=Number(_[1])),_&&_>=15&&(f=!1,u=!0);var x=b&&(l||f&&(null==_||_<12.11)),M=r||a&&s>=9;function E(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var k,S=function(t,e){var r=t.className,n=E(e).exec(r);if(n){var i=r.slice(n.index+n[0].length);t.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function A(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function C(t,e){return A(t).appendChild(e)}function O(t,e,r,n){var i=document.createElement(t);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return a+(e-o);a+=s-o,a+=r-a%r,o=s+1}}m?F=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(F=function(t){try{t.select()}catch(e){}});var L=function(){this.id=null,this.f=null,this.time=0,this.handler=B(this.onTimeout,this)};function z(t,e){for(var r=0;r=e)return n+Math.min(a,e-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=e)return n}}var V=[""];function Y(t){for(;V.length<=t;)V.push(Z(V)+" ");return V[t]}function Z(t){return t[t.length-1]}function K(t,e){for(var r=[],n=0;n"\x80"&&(t.toUpperCase()!=t.toLowerCase()||J.test(t))}function tt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&Q(t))||e.test(t):Q(t)}function et(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var rt=/[\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]/;function nt(t){return t.charCodeAt(0)>=768&&rt.test(t)}function it(t,e,r){for(;(r<0?e>0:er?-1:1;;){if(e==r)return e;var i=(e+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==e)return t(o)?e:r;t(o)?r=o:e=o+n}}var at=null;function st(t,e,r){var n;at=null;for(var i=0;ie)return i;o.to==e&&(o.from!=o.to&&"before"==r?n=i:at=i),o.from==e&&(o.from!=o.to&&"before"!=r?n=i:at=i)}return null!=n?n:at}var ut=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,r=/[LRr]/,n=/[Lb1n]/,i=/[1n]/;function o(t,e,r){this.level=t,this.from=e,this.to=r}return function(a,s){var u="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!t.test(a))return!1;for(var l,c=a.length,f=[],h=0;h-1&&(n[e]=i.slice(0,o).concat(i.slice(o+1)))}}}function pt(t,e){var r=ht(t,e);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function bt(t){t.prototype.on=function(t,e){ft(this,t,e)},t.prototype.off=function(t,e){dt(this,t,e)}}function yt(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function wt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function _t(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function xt(t){yt(t),wt(t)}function Mt(t){return t.target||t.srcElement}function Et(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),b&&t.ctrlKey&&1==e&&(e=3),e}var kt,St,At=function(){if(a&&s<9)return!1;var t=O("div");return"draggable"in t||"dragDrop"in t}();function Ct(t){if(null==kt){var e=O("span","\u200b");C(t,O("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(kt=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var r=kt?O("span","\u200b"):O("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ot(t){if(null!=St)return St;var e=C(t,document.createTextNode("A\u062eA")),r=k(e,0,1).getBoundingClientRect(),n=k(e,1,2).getBoundingClientRect();return A(t),!(!r||r.left==r.right)&&(St=n.right-r.right<3)}var Tt=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,r=[],n=t.length;e<=n;){var i=t.indexOf("\n",e);-1==i&&(i=t.length);var o=t.slice(e,"\r"==t.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),e+=a+1):(r.push(o),e=i+1)}return r}:function(t){return t.split(/\r\n?|\n/)},Dt=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(e){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(r){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Pt=function(){var t=O("div");return"oncopy"in t||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy)}(),It=null,Rt={},Ft={};function Bt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Rt[t]=e}function jt(t){if("string"==typeof t&&Ft.hasOwnProperty(t))t=Ft[t];else if(t&&"string"==typeof t.name&&Ft.hasOwnProperty(t.name)){var e=Ft[t.name];"string"==typeof e&&(e={name:e}),(t=X(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return jt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return jt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Nt(t,e){e=jt(e);var r=Rt[e.name];if(!r)return Nt(t,"text/plain");var n=r(t,e);if(Lt.hasOwnProperty(e.name)){var i=Lt[e.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=e.name,e.helperType&&(n.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)n[a]=e.modeProps[a];return n}var Lt={};function zt(t,e){j(e,Lt.hasOwnProperty(t)?Lt[t]:Lt[t]={})}function Ut(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var r={};for(var n in e){var i=e[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Ht(t,e){for(var r;t.innerMode&&(r=t.innerMode(e))&&r.mode!=t;)e=r.state,t=r.mode;return r||{mode:t,state:e}}function Wt(t,e,r){return!t.startState||t.startState(e,r)}var qt=function(t,e,r){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Gt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var r=t;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(e=t.first&&er?Qt(r,Gt(t,r).text.length):function(t,e){var r=t.ch;return null==r||r>e?Qt(t.line,e):r<0?Qt(t.line,0):t}(e,Gt(t,e.line).text.length)}function se(t,e){for(var r=[],n=0;n=this.string.length},qt.prototype.sol=function(){return this.pos==this.lineStart},qt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qt.prototype.next=function(){if(this.pose},qt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},qt.prototype.skipToEnd=function(){this.pos=this.string.length},qt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},qt.prototype.backUp=function(t){this.pos-=t},qt.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==e&&(this.pos+=n[0].length),n)}var i=function(t){return r?t.toLowerCase():t};if(i(this.string.substr(this.pos,t.length))==i(t))return!1!==e&&(this.pos+=t.length),!0},qt.prototype.current=function(){return this.string.slice(this.start,this.pos)},qt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},qt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},qt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ue=function(t,e){this.state=t,this.lookAhead=e},le=function(t,e,r,n){this.state=e,this.doc=t,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function ce(t,e,r,n){var i=[t.state.modeGen],o={};ye(t,e.text,t.doc.mode,r,(function(t,e){return i.push(t,e)}),o,n);for(var a=r.state,s=function(n){r.baseTokens=i;var s=t.state.overlays[n],u=1,l=0;r.state=!0,ye(t,e.text,s.mode,r,(function(t,e){for(var r=u;lt&&i.splice(u,1,t,i[u+1],n),u+=2,l=Math.min(t,n)}if(e)if(s.opaque)i.splice(r,u-r,t,"overlay "+e),u=r+2;else for(;rt.options.maxHighlightLength&&Ut(t.doc.mode,n.state),o=ce(t,e,n);i&&(n.state=i),e.stateAfter=n.save(!i),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),r===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function he(t,e,r){var n=t.doc,i=t.display;if(!n.mode.startState)return new le(n,!0,e);var o=function(t,e,r){for(var n,i,o=t.doc,a=r?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=o.first)return o.first;var u=Gt(o,s-1),l=u.stateAfter;if(l&&(!r||s+(l instanceof ue?l.lookAhead:0)<=o.modeFrontier))return s;var c=N(u.text,null,t.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}(t,e,r),a=o>n.first&&Gt(n,o-1).stateAfter,s=a?le.fromSaved(n,a,o):new le(n,Wt(n.mode),o);return n.iter(o,e,(function(r){de(t,r.text,s);var n=s.line;r.stateAfter=n==e-1||n%5==0||n>=i.viewFrom&&ne.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}le.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},le.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},le.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},le.fromSaved=function(t,e,r){return e instanceof ue?new le(t,Ut(t.mode,e.state),r,e.lookAhead):new le(t,Ut(t.mode,e),r)},le.prototype.save=function(t){var e=!1!==t?Ut(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ue(e,this.maxLookAhead):e};var ge=function(t,e,r){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=r};function ve(t,e,r,n){var i,o,a=t.doc,s=a.mode,u=Gt(a,(e=ae(a,e)).line),l=he(t,e.line,r),c=new qt(u.text,t.options.tabSize,l);for(n&&(o=[]);(n||c.post.options.maxHighlightLength?(s=!1,a&&de(t,e,n,f.pos),f.pos=e.length,u=null):u=be(me(r,f,n.state,h),o),h){var d=h[0].name;d&&(u="m-"+(u?d+" "+u:d))}if(!s||c!=u){for(;l=e:o.to>e);(n||(n=[])).push(new xe(a,o.from,s?null:o.to))}}return n}(r,i,a),u=function(t,e,r){var n;if(t)for(var i=0;i=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from0&&s)for(var y=0;ye)&&(!r||De(r,o.marker)<0)&&(r=o.marker)}return r}function Be(t,e,r,n,i){var o=Gt(t,e),a=_e&&o.markedSpans;if(a)for(var s=0;s=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?te(l.to,r)>=0:te(l.to,r)>0)||c>=0&&(u.marker.inclusiveRight&&i.inclusiveLeft?te(l.from,n)<=0:te(l.from,n)<0)))return!0}}}function je(t){for(var e;e=Ie(t);)t=e.find(-1,!0).line;return t}function Ne(t,e){var r=Gt(t,e),n=je(r);return r==n?e:Kt(n)}function Le(t,e){if(e>t.lastLine())return e;var r,n=Gt(t,e);if(!ze(t,n))return e;for(;r=Re(n);)n=r.find(1,!0).line;return Kt(n)+1}function ze(t,e){var r=_e&&e.markedSpans;if(r)for(var n=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=r,e.maxLine=t)}))}var Ge=function(t,e,r){this.text=t,Ce(this,e),this.height=r?r(this):1};function Ve(t){t.parent=null,Ae(t)}Ge.prototype.lineNo=function(){return Kt(this)},bt(Ge);var Ye={},Ze={};function Ke(t,e){if(!t||/^\s*$/.test(t))return null;var r=e.addModeClass?Ze:Ye;return r[t]||(r[t]=t.replace(/\S+/g,"cm-$&"))}function $e(t,e){var r=T("span",null,null,u?"padding-right: .1px":null),n={pre:T("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var o=i?e.rest[i-1]:e.line,a=void 0;n.pos=0,n.addToken=Je,Ot(t.display.measure)&&(a=lt(o,t.doc.direction))&&(n.addToken=Qe(n.addToken,a)),n.map=[],er(o,n,fe(t,o,e!=t.display.externalMeasured&&Kt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=R(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=R(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Ct(t.display.measure))),0==i?(e.measure.map=n.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(n.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(u){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return pt(t,"renderLine",t,e.line,n.pre),n.pre.className&&(n.textClass=R(n.pre.className,n.textClass||"")),n}function Xe(t){var e=O("span","\u2022","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Je(t,e,r,n,i,o,u){if(e){var l,c=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var r=e,n="",i=0;il&&f.from<=l);h++);if(f.to>=c)return t(r,n,i,o,a,s,u);t(r,n.slice(0,f.to-l),i,o,null,s,u),o=null,n=n.slice(f.to-l),l=f.to}}}function tr(t,e,r,n){var i=!n&&r.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!n&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function er(t,e,r){var n=t.markedSpans,i=t.text,o=0;if(n)for(var a,s,u,l,c,f,h,d=i.length,p=0,m=1,g="",v=0;;){if(v==p){u=l=c=s="",h=null,f=null,v=1/0;for(var b=[],y=void 0,w=0;wp||x.collapsed&&_.to==p&&_.from==p)){if(null!=_.to&&_.to!=p&&v>_.to&&(v=_.to,l=""),x.className&&(u+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&_.from==p&&(c+=" "+x.startStyle),x.endStyle&&_.to==v&&(y||(y=[])).push(x.endStyle,_.to),x.title&&((h||(h={})).title=x.title),x.attributes)for(var M in x.attributes)(h||(h={}))[M]=x.attributes[M];x.collapsed&&(!f||De(f.marker,x)<0)&&(f=_)}else _.from>p&&v>_.from&&(v=_.from)}if(y)for(var E=0;E=d)break;for(var S=Math.min(d,v);;){if(g){var A=p+g.length;if(!f){var C=A>S?g.slice(0,S-p):g;e.addToken(e,C,a?a+u:u,c,p+C.length==v?l:"",s,h)}if(A>=S){g=g.slice(S-p),p=S;break}p=A,c=""}g=i.slice(o,o=r[m++]),a=Ke(r[m++],e.cm.options)}}else for(var O=1;Or)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function Cr(t,e,r,n){return Dr(t,Tr(t,e),r,n)}function Or(t,e){if(e>=t.display.viewFrom&&e=r.lineN&&e2&&o.push((u.bottom+l.top)/2-r.top)}}o.push(r.bottom-r.top)}}(t,e.view,e.rect),e.hasHeights=!0),(o=function(t,e,r,n){var i,o=Rr(e.map,r,n),u=o.node,l=o.start,c=o.end,f=o.collapse;if(3==u.nodeType){for(var h=0;h<4;h++){for(;l&&nt(e.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+c1}(t))return e;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*r,right:e.right*r,top:e.top*n,bottom:e.bottom*n}}(t.display.measure,i))}else{var d;l>0&&(f=n="right"),i=t.options.lineWrapping&&(d=u.getClientRects()).length>1?d["right"==n?d.length-1:0]:u.getBoundingClientRect()}if(a&&s<9&&!l&&(!i||!i.left&&!i.right)){var p=u.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+rn(t.display),top:p.top,bottom:p.bottom}:Ir}for(var m=i.top-e.rect.top,g=i.bottom-e.rect.top,v=(m+g)/2,b=e.view.measure.heights,y=0;ye)&&(i=(o=u-s)-1,e>=u&&(a="right")),null!=i){if(n=t[l+2],s==u&&r==(n.insertLeft?"left":"right")&&(a=r),"left"==r&&0==i)for(;l&&t[l-2]==t[l-3]&&t[l-1].insertLeft;)n=t[2+(l-=3)],a="left";if("right"==r&&i==u-s)for(;l=0&&(r=t[i]).left==r.right;i--);return r}function Br(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e=n.text.length?(u=n.text.length,l="before"):u<=0&&(u=0,l="after"),!s)return a("before"==l?u-1:u,"before"==l);function c(t,e,r){return a(r?t-1:t,1==s[e].level!=r)}var f=st(s,u,l),h=at,d=c(u,f,"before"==l);return null!=h&&(d.other=c(u,h,"before"!=l)),d}function Vr(t,e){var r=0;e=ae(t.doc,e),t.options.lineWrapping||(r=rn(t.display)*e.ch);var n=Gt(t.doc,e.line),i=He(n)+_r(t.display);return{left:r,right:r,top:i,bottom:i+n.height}}function Yr(t,e,r,n,i){var o=Qt(t,e,r);return o.xRel=i,n&&(o.outside=n),o}function Zr(t,e,r){var n=t.doc;if((r+=t.display.viewOffset)<0)return Yr(n.first,0,null,-1,-1);var i=$t(n,r),o=n.first+n.size-1;if(i>o)return Yr(n.first+n.size-1,Gt(n,o).text.length,null,1,1);e<0&&(e=0);for(var a=Gt(n,i);;){var s=Jr(t,a,i,e,r),u=Fe(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!u)return s;var l=u.find(1);if(l.line==i)return l;a=Gt(n,i=l.line)}}function Kr(t,e,r,n){n-=Ur(e);var i=e.text.length,o=ot((function(e){return Dr(t,r,e-1).bottom<=n}),i,0);return{begin:o,end:i=ot((function(e){return Dr(t,r,e).top>n}),o,i)}}function $r(t,e,r,n){return r||(r=Tr(t,e)),Kr(t,e,r,Hr(t,e,Dr(t,r,n),"line").top)}function Xr(t,e,r,n){return!(t.bottom<=r)&&(t.top>r||(n?t.left:t.right)>e)}function Jr(t,e,r,n,i){i-=He(e);var o=Tr(t,e),a=Ur(e),s=0,u=e.text.length,l=!0,c=lt(e,t.doc.direction);if(c){var f=(t.options.lineWrapping?tn:Qr)(t,e,r,o,c,n,i);s=(l=1!=f.level)?f.from:f.to-1,u=l?f.to:f.from-1}var h,d,p=null,m=null,g=ot((function(e){var r=Dr(t,o,e);return r.top+=a,r.bottom+=a,!!Xr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=e,m=r),!0)}),s,u),v=!1;if(m){var b=n-m.left=w.bottom?1:0}return Yr(r,g=it(e.text,g,1),d,v,n-h)}function Qr(t,e,r,n,i,o,a){var s=ot((function(s){var u=i[s],l=1!=u.level;return Xr(Gr(t,Qt(r,l?u.to:u.from,l?"before":"after"),"line",e,n),o,a,!0)}),0,i.length-1),u=i[s];if(s>0){var l=1!=u.level,c=Gr(t,Qt(r,l?u.from:u.to,l?"after":"before"),"line",e,n);Xr(c,o,a,!0)&&c.top>a&&(u=i[s-1])}return u}function tn(t,e,r,n,i,o,a){var s=Kr(t,e,n,a),u=s.begin,l=s.end;/\s/.test(e.text.charAt(l-1))&&l--;for(var c=null,f=null,h=0;h=l||d.to<=u)){var p=Dr(t,n,1!=d.level?Math.min(l,d.to)-1:Math.max(u,d.from)).right,m=pm)&&(c=d,f=m)}}return c||(c=i[i.length-1]),c.froml&&(c={from:c.from,to:l,level:c.level}),c}function en(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==Pr){Pr=O("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)Pr.appendChild(document.createTextNode("x")),Pr.appendChild(O("br"));Pr.appendChild(document.createTextNode("x"))}C(t.measure,Pr);var r=Pr.offsetHeight/50;return r>3&&(t.cachedTextHeight=r),A(t.measure),r||1}function rn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=O("span","xxxxxxxxxx"),r=O("pre",[e],"CodeMirror-line-like");C(t.measure,r);var n=e.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(t.cachedCharWidth=i),i||10}function nn(t){for(var e=t.display,r={},n={},i=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=t.display.gutterSpecs[a].className;r[s]=o.offsetLeft+o.clientLeft+i,n[s]=o.clientWidth}return{fixedPos:on(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:e.wrapper.clientWidth}}function on(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function an(t){var e=en(t.display),r=t.options.lineWrapping,n=r&&Math.max(5,t.display.scroller.clientWidth/rn(t.display)-3);return function(i){if(ze(t.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a0&&(u=Gt(t.doc,l.line).text).length==l.ch){var c=N(u,u.length,t.options.tabSize)-u.length;l=Qt(l.line,Math.max(0,Math.round((o-Mr(t.display).left)/rn(t.display))-c))}return l}function ln(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var r=t.display.view,n=0;ne)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)_e&&Ne(t.doc,e)i.viewFrom?hn(t):(i.viewFrom+=n,i.viewTo+=n);else if(e<=i.viewFrom&&r>=i.viewTo)hn(t);else if(e<=i.viewFrom){var o=dn(t,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):hn(t)}else if(r>=i.viewTo){var a=dn(t,e,e,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):hn(t)}else{var s=dn(t,e,e,-1),u=dn(t,r,r+n,1);s&&u?(i.view=i.view.slice(0,s.index).concat(nr(t,s.lineN,u.lineN)).concat(i.view.slice(u.index)),i.viewTo+=n):hn(t)}var l=i.externalMeasured;l&&(r=i.lineN&&e=n.viewTo)){var o=n.view[ln(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==z(a,r)&&a.push(r)}}}function hn(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function dn(t,e,r,n){var i,o=ln(t,e),a=t.display.view;if(!_e||r==t.doc.first+t.doc.size)return{index:o,lineN:r};for(var s=t.display.viewFrom,u=0;u0){if(o==a.length-1)return null;i=s+a[o].size-e,o++}else i=s-e;e+=i,r+=i}for(;Ne(t.doc,r)!=r;){if(o==(n<0?0:a.length-1))return null;r+=n*a[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function pn(t){for(var e=t.display.view,r=0,n=0;n=t.display.viewTo||s.to().linee||e==r&&a.to==e)&&(n(Math.max(a.from,e),Math.min(a.to,r),1==a.level?"rtl":"ltr",o),i=!0)}i||n(e,r,"ltr")}(m,r||0,null==n?h:n,(function(t,e,i,f){var g="ltr"==i,v=d(t,g?"left":"right"),b=d(e-1,g?"right":"left"),y=null==r&&0==t,w=null==n&&e==h,_=0==f,x=!m||f==m.length-1;if(b.top-v.top<=3){var M=(l?w:y)&&x,E=(l?y:w)&&_?s:(g?v:b).left,k=M?u:(g?b:v).right;c(E,v.top,k-E,v.bottom)}else{var S,A,C,O;g?(S=l&&y&&_?s:v.left,A=l?u:p(t,i,"before"),C=l?s:p(e,i,"after"),O=l&&w&&x?u:b.right):(S=l?p(t,i,"before"):s,A=!l&&y&&_?u:v.right,C=!l&&w&&x?s:b.left,O=l?p(e,i,"after"):u),c(S,v.top,A-S,v.bottom),v.bottom0?e.blinker=setInterval((function(){t.hasFocus()||En(t),e.cursorDiv.style.visibility=(r=!r)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function _n(t){t.hasFocus()||(t.display.input.focus(),t.state.focused||Mn(t))}function xn(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&En(t))}),100)}function Mn(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(pt(t,"focus",t,e),t.state.focused=!0,I(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),u&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),wn(t))}function En(t,e){t.state.delayingBlurEvent||(t.state.focused&&(pt(t,"blur",t,e),t.state.focused=!1,S(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function kn(t){for(var e=t.display,r=e.lineDiv.offsetTop,n=0;n.005||h<-.005)&&(Zt(i.line,u),Sn(i.line),i.rest))for(var d=0;dt.display.sizerWidth){var p=Math.ceil(l/rn(t.display));p>t.display.maxLineLength&&(t.display.maxLineLength=p,t.display.maxLine=i.line,t.display.maxLineChanged=!0)}}}}function Sn(t){if(t.widgets)for(var e=0;e=a&&(o=$t(e,He(Gt(e,u))-t.wrapper.clientHeight),a=u)}return{from:o,to:Math.max(a,o+1)}}function Cn(t,e){var r=t.display,n=en(t.display);e.top<0&&(e.top=0);var i=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:r.scroller.scrollTop,o=Sr(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var s=t.doc.height+xr(r),u=e.tops-n;if(e.topi+o){var c=Math.min(e.top,(l?s:e.bottom)-o);c!=i&&(a.scrollTop=c)}var f=t.options.fixedGutter?0:r.gutters.offsetWidth,h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:r.scroller.scrollLeft-f,d=kr(t)-r.gutters.offsetWidth,p=e.right-e.left>d;return p&&(e.right=e.left+d),e.left<10?a.scrollLeft=0:e.leftd+h-3&&(a.scrollLeft=e.right+(p?0:10)-d),a}function On(t,e){null!=e&&(Pn(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function Tn(t){Pn(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function Dn(t,e,r){null==e&&null==r||Pn(t),null!=e&&(t.curOp.scrollLeft=e),null!=r&&(t.curOp.scrollTop=r)}function Pn(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,In(t,Vr(t,e.from),Vr(t,e.to),e.margin))}function In(t,e,r,n){var i=Cn(t,{left:Math.min(e.left,r.left),top:Math.min(e.top,r.top)-n,right:Math.max(e.right,r.right),bottom:Math.max(e.bottom,r.bottom)+n});Dn(t,i.scrollLeft,i.scrollTop)}function Rn(t,e){Math.abs(t.doc.scrollTop-e)<2||(r||si(t,{top:e}),Fn(t,e,!0),r&&si(t),ri(t,100))}function Fn(t,e,r){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||r)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function Bn(t,e,r,n){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(r?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!n||(t.doc.scrollLeft=e,ci(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function jn(t){var e=t.display,r=e.gutters.offsetWidth,n=Math.round(t.doc.height+xr(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+Er(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:r}}var Nn=function(t,e,r){this.cm=r;var n=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,t(n),t(i),ft(n,"scroll",(function(){n.clientHeight&&e(n.scrollTop,"vertical")})),ft(i,"scroll",(function(){i.clientWidth&&e(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Nn.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,r=t.scrollHeight>t.clientHeight+1,n=t.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=e?n+"px":"0";var i=t.viewHeight-(e?n:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:e?n:0}},Nn.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Nn.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Nn.prototype.zeroWidthHack=function(){var t=b&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new L,this.disableVert=new L},Nn.prototype.enableZeroWidthBar=function(t,e,r){t.style.pointerEvents="auto",e.set(1e3,(function n(){var i=t.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,n)}))},Nn.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var Ln=function(){};function zn(t,e){e||(e=jn(t));var r=t.display.barWidth,n=t.display.barHeight;Un(t,e);for(var i=0;i<4&&r!=t.display.barWidth||n!=t.display.barHeight;i++)r!=t.display.barWidth&&t.options.lineWrapping&&kn(t),Un(t,jn(t)),r=t.display.barWidth,n=t.display.barHeight}function Un(t,e){var r=t.display,n=r.scrollbars.update(e);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=e.gutterWidth+"px"):r.gutterFiller.style.display=""}Ln.prototype.update=function(){return{bottom:0,right:0}},Ln.prototype.setScrollLeft=function(){},Ln.prototype.setScrollTop=function(){},Ln.prototype.clear=function(){};var Hn={native:Nn,null:Ln};function Wn(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&S(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new Hn[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ft(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,r){"horizontal"==r?Bn(t,e):Rn(t,e)}),t),t.display.scrollbars.addClass&&I(t.display.wrapper,t.display.scrollbars.addClass)}var qn=0;function Gn(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++qn},e=t.curOp,ir?ir.ops.push(e):e.ownsGroup=ir={ops:[e],delayedCallbacks:[]}}function Vn(t){var e=t.curOp;e&&function(t,e){var r=t.ownsGroup;if(r)try{!function(t){var e=t.delayedCallbacks,r=0;do{for(;r=r.viewTo)||r.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new ii(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Zn(t){t.updatedDisplay=t.mustUpdate&&oi(t.cm,t.update)}function Kn(t){var e=t.cm,r=e.display;t.updatedDisplay&&kn(e),t.barMeasure=jn(e),r.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Cr(e,r.maxLine,r.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+t.adjustWidthTo+Er(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+t.adjustWidthTo-kr(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=r.input.prepareSelection())}function $n(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=O("div","\u200b",null,"position: absolute;\n top: "+(e.top-r.viewOffset-_r(t.display))+"px;\n height: "+(e.bottom-e.top+Er(t)+r.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(i),t.display.lineSpace.removeChild(o)}}}(e,function(t,e,r,n){var i;null==n&&(n=0),t.options.lineWrapping||e!=r||(r="before"==(e=e.ch?Qt(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?Qt(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,s=Gr(t,e),u=r&&r!=e?Gr(t,r):s,l=Cn(t,i={left:Math.min(s.left,u.left),top:Math.min(s.top,u.top)-n,right:Math.max(s.left,u.left),bottom:Math.max(s.bottom,u.bottom)+n}),c=t.doc.scrollTop,f=t.doc.scrollLeft;if(null!=l.scrollTop&&(Rn(t,l.scrollTop),Math.abs(t.doc.scrollTop-c)>1&&(a=!0)),null!=l.scrollLeft&&(Bn(t,l.scrollLeft),Math.abs(t.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return i}(e,ae(n,t.scrollToPos.from),ae(n,t.scrollToPos.to),t.scrollToPos.margin));var i=t.maybeHiddenMarkers,o=t.maybeUnhiddenMarkers;if(i)for(var a=0;a=t.display.viewTo)){var r=+new Date+t.options.workTime,n=he(t,e.highlightFrontier),i=[];e.iter(n.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(n.line>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength?Ut(e.mode,n.state):null,u=ce(t,o,n,!0);s&&(n.state=s),o.styles=u.styles;var l=o.styleClasses,c=u.classes;c?o.styleClasses=c:l&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||l!=c&&(!l||!c||l.bgClass!=c.bgClass||l.textClass!=c.textClass),h=0;!f&&hr)return ri(t,t.options.workDelay),!0})),e.highlightFrontier=n.line,e.modeFrontier=Math.max(e.modeFrontier,n.line),i.length&&Jn(t,(function(){for(var e=0;e=r.viewFrom&&e.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==pn(t))return!1;fi(t)&&(hn(t),e.dims=nn(t));var i=n.first+n.size,o=Math.max(e.visible.from-t.options.viewportMargin,n.first),a=Math.min(i,e.visible.to+t.options.viewportMargin);r.viewFroma&&r.viewTo-a<20&&(a=Math.min(i,r.viewTo)),_e&&(o=Ne(t.doc,o),a=Le(t.doc,a));var s=o!=r.viewFrom||a!=r.viewTo||r.lastWrapHeight!=e.wrapperHeight||r.lastWrapWidth!=e.wrapperWidth;!function(t,e,r){var n=t.display;0==n.view.length||e>=n.viewTo||r<=n.viewFrom?(n.view=nr(t,e,r),n.viewFrom=e):(n.viewFrom>e?n.view=nr(t,e,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,ln(t,r)))),n.viewTo=r}(t,o,a),r.viewOffset=He(Gt(t.doc,r.viewFrom)),t.display.mover.style.top=r.viewOffset+"px";var l=pn(t);if(!s&&0==l&&!e.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=function(t){if(t.hasFocus())return null;var e=P();if(!e||!D(t.display.lineDiv,e))return null;var r={activeElt:e};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&D(t.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(t);return l>4&&(r.lineDiv.style.display="none"),function(t,e,r){var n=t.display,i=t.options.lineNumbers,o=n.lineDiv,a=o.firstChild;function s(e){var r=e.nextSibling;return u&&b&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),r}for(var l=n.view,c=n.viewFrom,f=0;f-1&&(d=!1),ur(t,h,c,r)),d&&(A(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(Jt(t.options,c)))),a=h.node.nextSibling}else{var p=mr(t,h,c,r);o.insertBefore(p,a)}c+=h.size}for(;a;)a=s(a)}(t,r.updateLineNumbers,e.dims),l>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(t){if(t&&t.activeElt&&t.activeElt!=P()&&(t.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(t.activeElt.nodeName)&&t.anchorNode&&D(document.body,t.anchorNode)&&D(document.body,t.focusNode))){var e=window.getSelection(),r=document.createRange();r.setEnd(t.anchorNode,t.anchorOffset),r.collapse(!1),e.removeAllRanges(),e.addRange(r),e.extend(t.focusNode,t.focusOffset)}}(c),A(r.cursorDiv),A(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=e.wrapperHeight,r.lastWrapWidth=e.wrapperWidth,ri(t,400)),r.updateLineNumbers=null,!0}function ai(t,e){for(var r=e.viewport,n=!0;;n=!1){if(n&&t.options.lineWrapping&&e.oldDisplayWidth!=kr(t))n&&(e.visible=An(t.display,t.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(t.doc.height+xr(t.display)-Sr(t),r.top)}),e.visible=An(t.display,t.doc,r),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!oi(t,e))break;kn(t);var i=jn(t);mn(t),zn(t,i),li(t,i),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function si(t,e){var r=new ii(t,e);if(oi(t,r)){kn(t),ai(t,r);var n=jn(t);mn(t),zn(t,n),li(t,n),r.finish()}}function ui(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function li(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Er(t)+"px"}function ci(t){var e=t.display,r=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var n=on(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,o=n+"px",a=0;as.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&l||o&&c){if(o&&b&&u)t:for(var h=e.target,d=a.view;h!=s;h=h.parentNode)for(var p=0;p=0&&te(t,n.to())<=0)return r}return-1};var xi=function(t,e){this.anchor=t,this.head=e};function Mi(t,e,r){var n=t&&t.options.selectionsMayTouch,i=e[r];e.sort((function(t,e){return te(t.from(),e.from())})),r=z(e,i);for(var o=1;o0:u>=0){var l=ie(s.from(),a.from()),c=ne(s.to(),a.to()),f=s.empty()?a.from()==a.head:s.from()==s.head;o<=r&&--r,e.splice(--o,2,new xi(f?c:l,f?l:c))}}return new _i(e,r)}function Ei(t,e){return new _i([new xi(t,e||t)],0)}function ki(t){return t.text?Qt(t.from.line+t.text.length-1,Z(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Si(t,e){if(te(t,e.from)<0)return t;if(te(t,e.to)<=0)return ki(e);var r=t.line+e.text.length-(e.to.line-e.from.line)-1,n=t.ch;return t.line==e.to.line&&(n+=ki(e).ch-e.to.ch),Qt(r,n)}function Ai(t,e){for(var r=[],n=0;n1&&t.remove(s.line+1,p-1),t.insert(s.line+1,v)}ar(t,"change",t,e)}function Ii(t,e,r){!function t(n,i,o){if(n.linked)for(var a=0;as-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=function(t,e){return e?(Ni(t.done),Z(t.done)):t.done.length&&!Z(t.done).ranges?Z(t.done):t.done.length>1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Z(t.done)):void 0}(i,i.lastOp==n)))a=Z(o.changes),0==te(e.from,e.to)&&0==te(e.from,a.to)?a.to=ki(e):o.changes.push(ji(t,e));else{var u=Z(i.done);for(u&&u.ranges||Ui(t.sel,i.done),o={changes:[ji(t,e)],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(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=e.origin,a||pt(t,"historyAdded")}function zi(t,e,r,n){var i=t.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(t,e,r,n){var i=e.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}(t,o,Z(i.done),e))?i.done[i.done.length-1]=e:Ui(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Ni(i.undone)}function Ui(t,e){var r=Z(e);r&&r.ranges&&r.equals(t)||e.push(t)}function Hi(t,e,r,n){var i=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,r),Math.min(t.first+t.size,n),(function(r){r.markedSpans&&((i||(i=e["spans_"+t.id]={}))[o]=r.markedSpans),++o}))}function Wi(t){if(!t)return null;for(var e,r=0;r-1&&(Z(s)[f]=l[f],delete l[f])}}}return n}function Vi(t,e,r,n){if(n){var i=t.anchor;if(r){var o=te(e,i)<0;o!=te(r,i)<0?(i=e,e=r):o!=te(e,r)<0&&(e=r)}return new xi(i,e)}return new xi(r||e,e)}function Yi(t,e,r,n,i){null==i&&(i=t.cm&&(t.cm.display.shift||t.extend)),Ji(t,new _i([Vi(t.sel.primary(),e,r,i)],0),n)}function Zi(t,e,r){for(var n=[],i=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:s.to>e.ch))){if(i&&(pt(u,"beforeCursorEnter"),u.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!u.atomic)continue;if(r){var f=u.find(n<0?1:-1),h=void 0;if((n<0?c:l)&&(f=oo(t,f,-n,f&&f.line==e.line?o:null)),f&&f.line==e.line&&(h=te(f,r))&&(n<0?h<0:h>0))return no(t,f,e,n,i)}var d=u.find(n<0?-1:1);return(n<0?l:c)&&(d=oo(t,d,n,d.line==e.line?o:null)),d?no(t,d,e,n,i):null}}return e}function io(t,e,r,n,i){var o=n||1,a=no(t,e,r,o,i)||!i&&no(t,e,r,o,!0)||no(t,e,r,-o,i)||!i&&no(t,e,r,-o,!0);return a||(t.cantEdit=!0,Qt(t.first,0))}function oo(t,e,r,n){return r<0&&0==e.ch?e.line>t.first?ae(t,Qt(e.line-1)):null:r>0&&e.ch==(n||Gt(t,e.line)).text.length?e.line0)){var c=[u,1],f=te(l.from,s.from),h=te(l.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:l.from,to:s.from}),(h>0||!a.inclusiveRight&&!h)&&c.push({from:s.to,to:l.to}),i.splice.apply(i,c),u+=c.length-3}}return i}(t,e.from,e.to);if(n)for(var i=n.length-1;i>=0;--i)lo(t,{from:n[i].from,to:n[i].to,text:i?[""]:e.text,origin:e.origin});else lo(t,e)}}function lo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=te(e.from,e.to)){var r=Ai(t,e);Li(t,e,r,t.cm?t.cm.curOp.id:NaN),ho(t,e,r,ke(t,e));var n=[];Ii(t,(function(t,r){r||-1!=z(n,t.history)||(vo(t.history,e),n.push(t.history)),ho(t,e,null,ke(t,e))}))}}function co(t,e,r){var n=t.cm&&t.cm.state.suppressEdits;if(!n||r){for(var i,o=t.history,a=t.sel,s="undo"==e?o.done:o.undone,u="undo"==e?o.undone:o.done,l=0;l=0;--d){var p=h(d);if(p)return p.v}}}}function fo(t,e){if(0!=e&&(t.first+=e,t.sel=new _i(K(t.sel.ranges,(function(t){return new xi(Qt(t.anchor.line+e,t.anchor.ch),Qt(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){cn(t.cm,t.first,t.first-e,e);for(var r=t.cm.display,n=r.viewFrom;nt.lastLine())){if(e.from.lineo&&(e={from:e.from,to:Qt(o,Gt(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Vt(t,e.from,e.to),r||(r=Ai(t,e)),t.cm?function(t,e,r){var n=t.doc,i=t.display,o=e.from,a=e.to,s=!1,u=o.line;t.options.lineWrapping||(u=Kt(je(Gt(n,o.line))),n.iter(u,a.line+1,(function(t){if(t==i.maxLine)return s=!0,!0}))),n.sel.contains(e.from,e.to)>-1&>(t),Pi(n,e,r,an(t)),t.options.lineWrapping||(n.iter(u,o.line+e.text.length,(function(t){var e=We(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)})),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontierr;n--){var i=Gt(t,n).stateAfter;if(i&&(!(i instanceof ue)||n+i.lookAhead1||!(this.children[0]instanceof yo))){var s=[];this.collapse(s),this.children=[new yo(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var a=i.lines.length%25+25,s=a;s10);t.parent.maybeSpill()}},iterN:function(t,e,r){for(var n=0;n0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=T("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Be(t,e.line,e,r,o)||e.line!=r.line&&Be(t,r.line,e,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");_e=!0}o.addToHistory&&Li(t,{from:e,to:r,origin:"markText"},t.sel,NaN);var s,u=e.line,l=t.cm;if(t.iter(u,r.line+1,(function(t){l&&o.collapsed&&!l.options.lineWrapping&&je(t)==l.display.maxLine&&(s=!0),o.collapsed&&u!=e.line&&Zt(t,0),function(t,e){t.markedSpans=t.markedSpans?t.markedSpans.concat([e]):[e],e.marker.attachLine(t)}(t,new xe(o,u==e.line?e.ch:null,u==r.line?r.ch:null)),++u})),o.collapsed&&t.iter(e.line,r.line+1,(function(e){ze(t,e)&&Zt(e,0)})),o.clearOnEnter&&ft(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(we=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++Mo,o.atomic=!0),l){if(s&&(l.curOp.updateMaxLine=!0),o.collapsed)cn(l,e.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=e.line;c<=r.line;c++)fn(l,c,"text");o.atomic&&eo(l.doc),ar(l,"markerAdded",l,o)}return o}Eo.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&Gn(t),vt(this,"clear")){var r=this.find();r&&ar(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=l,t.display.maxLineLength=c,t.display.maxLineChanged=!0)}null!=n&&t&&this.collapsed&&cn(t,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&eo(t.doc)),t&&ar(t,"markerCleared",t,this,n,i),e&&Vn(t),this.parent&&this.parent.clear()}},Eo.prototype.find=function(t,e){var r,n;null==t&&"bookmark"==this.type&&(t=1);for(var i=0;i=0;u--)uo(this,n[u]);s?Xi(this,s):this.cm&&Tn(this.cm)})),undo:ei((function(){co(this,"undo")})),redo:ei((function(){co(this,"redo")})),undoSelection:ei((function(){co(this,"undo",!0)})),redoSelection:ei((function(){co(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,r=0,n=0;n=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,r){t=ae(this,t),e=ae(this,e);var n=[],i=t.line;return this.iter(t.line,e.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=u.to||null==u.from&&i!=t.line||null!=u.from&&i==e.line&&u.from>=e.ch||r&&!r(u.marker)||n.push(u.marker.parent||u.marker)}++i})),n},getAllMarks:function(){var t=[];return this.iter((function(e){var r=e.markedSpans;if(r)for(var n=0;nt)return e=t,!0;t-=o,++r})),ae(this,Qt(r,e))},indexFromPos:function(t){var e=(t=ae(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var f=t.dataTransfer.getData("Text");if(f){var h;if(e.state.draggingText&&!e.state.draggingText.copy&&(h=e.listSelections()),Qi(e.doc,Ei(r,r)),h)for(var d=0;d=0;e--)po(t.doc,"",n[e].from,n[e].to,"+delete");Tn(t)}))}function Xo(t,e,r){var n=it(t.text,e+r,r);return n<0||n>t.text.length?null:n}function Jo(t,e,r){var n=Xo(t,e.ch,r);return null==n?null:new Qt(e.line,n,r<0?"after":"before")}function Qo(t,e,r,n,i){if(t){"rtl"==e.doc.direction&&(i=-i);var o=lt(r,e.doc.direction);if(o){var a,s=i<0?Z(o):o[0],u=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var l=Tr(e,r);a=i<0?r.text.length-1:0;var c=Dr(e,l,a).top;a=ot((function(t){return Dr(e,l,t).top==c}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==u&&(a=Xo(r,a,1))}else a=i<0?s.to:s.from;return new Qt(n,a,u)}}return new Qt(n,i<0?r.text.length:0,i<0?"before":"after")}Ho.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ho.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ho.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ho.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ho.default=b?Ho.macDefault:Ho.pcDefault;var ta={selectAll:ao,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),H)},killLine:function(t){return $o(t,(function(e){if(e.empty()){var r=Gt(t.doc,e.head.line).text.length;return e.head.ch==r&&e.head.line0)i=new Qt(i.line,i.ch+1),t.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Qt(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var a=Gt(t.doc,i.line-1).text;a&&(i=new Qt(i.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),Qt(i.line-1,a.length-1),i,"+transpose"))}r.push(new xi(i,i))}t.setSelections(r)}))},newlineAndIndent:function(t){return Jn(t,(function(){for(var e=t.listSelections(),r=e.length-1;r>=0;r--)t.replaceRange(t.doc.lineSeparator(),e[r].anchor,e[r].head,"+input");e=t.listSelections();for(var n=0;n-1&&(te((i=l.ranges[i]).from(),e)<0||e.xRel>0)&&(te(i.to(),e)>0||e.xRel<0)?function(t,e,r,n){var i=t.display,o=!1,l=Qn(t,(function(e){u&&(i.scroller.draggable=!1),t.state.draggingText=!1,t.state.delayingBlurEvent&&(t.hasFocus()?t.state.delayingBlurEvent=!1:xn(t)),dt(i.wrapper.ownerDocument,"mouseup",l),dt(i.wrapper.ownerDocument,"mousemove",c),dt(i.scroller,"dragstart",f),dt(i.scroller,"drop",l),o||(yt(e),n.addNew||Yi(t.doc,r,null,null,n.extend),u&&!h||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),c=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},f=function(){return o=!0};u&&(i.scroller.draggable=!0),t.state.draggingText=l,l.copy=!n.moveOnDrag,ft(i.wrapper.ownerDocument,"mouseup",l),ft(i.wrapper.ownerDocument,"mousemove",c),ft(i.scroller,"dragstart",f),ft(i.scroller,"drop",l),t.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(t,n,e,o):function(t,e,r,n){a&&xn(t);var i=t.display,o=t.doc;yt(e);var s,u,l=o.sel,c=l.ranges;if(n.addNew&&!n.extend?(u=o.sel.contains(r),s=u>-1?c[u]:new xi(r,r)):(s=o.sel.primary(),u=o.sel.primIndex),"rectangle"==n.unit)n.addNew||(s=new xi(r,r)),r=un(t,e,!0,!0),u=-1;else{var f=ga(t,r,n.unit);s=n.extend?Vi(s,f.anchor,f.head,n.extend):f}n.addNew?-1==u?(u=c.length,Ji(o,Mi(t,c.concat([s]),u),{scroll:!1,origin:"*mouse"})):c.length>1&&c[u].empty()&&"char"==n.unit&&!n.extend?(Ji(o,Mi(t,c.slice(0,u).concat(c.slice(u+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Ki(o,u,s,W):(u=0,Ji(o,new _i([s],0),W),l=o.sel);var h=r;function d(e){if(0!=te(h,e))if(h=e,"rectangle"==n.unit){for(var i=[],a=t.options.tabSize,c=N(Gt(o,r.line).text,r.ch,a),f=N(Gt(o,e.line).text,e.ch,a),d=Math.min(c,f),p=Math.max(c,f),m=Math.min(r.line,e.line),g=Math.min(t.lastLine(),Math.max(r.line,e.line));m<=g;m++){var v=Gt(o,m).text,b=G(v,d,a);d==p?i.push(new xi(Qt(m,b),Qt(m,b))):v.length>b&&i.push(new xi(Qt(m,b),Qt(m,G(v,p,a))))}i.length||i.push(new xi(r,r)),Ji(o,Mi(t,l.ranges.slice(0,u).concat(i),u),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var y,w=s,_=ga(t,e,n.unit),x=w.anchor;te(_.anchor,x)>0?(y=_.head,x=ie(w.from(),_.anchor)):(y=_.anchor,x=ne(w.to(),_.head));var M=l.ranges.slice(0);M[u]=function(t,e){var r=e.anchor,n=e.head,i=Gt(t.doc,r.line);if(0==te(r,n)&&r.sticky==n.sticky)return e;var o=lt(i);if(!o)return e;var a=st(o,r.ch,r.sticky),s=o[a];if(s.from!=r.ch&&s.to!=r.ch)return e;var u,l=a+(s.from==r.ch==(1!=s.level)?0:1);if(0==l||l==o.length)return e;if(n.line!=r.line)u=(n.line-r.line)*("ltr"==t.doc.direction?1:-1)>0;else{var c=st(o,n.ch,n.sticky),f=c-a||(n.ch-r.ch)*(1==s.level?-1:1);u=c==l-1||c==l?f<0:f>0}var h=o[l+(u?-1:0)],d=u==(1==h.level),p=d?h.from:h.to,m=d?"after":"before";return r.ch==p&&r.sticky==m?e:new xi(new Qt(r.line,p,m),n)}(t,new xi(ae(o,x),y)),Ji(o,Mi(t,M,u),W)}}var p=i.wrapper.getBoundingClientRect(),m=0;function g(e){t.state.selectingText=!1,m=1/0,e&&(yt(e),i.input.focus()),dt(i.wrapper.ownerDocument,"mousemove",v),dt(i.wrapper.ownerDocument,"mouseup",b),o.history.lastSelOrigin=null}var v=Qn(t,(function(e){0!==e.buttons&&Et(e)?function e(r){var a=++m,s=un(t,r,!0,"rectangle"==n.unit);if(s)if(0!=te(s,h)){t.curOp.focus=P(),d(s);var u=An(i,o);(s.line>=u.to||s.linep.bottom?20:0;l&&setTimeout(Qn(t,(function(){m==a&&(i.scroller.scrollTop+=l,e(r))})),50)}}(e):g(e)})),b=Qn(t,g);t.state.selectingText=b,ft(i.wrapper.ownerDocument,"mousemove",v),ft(i.wrapper.ownerDocument,"mouseup",b)}(t,n,e,o)}(e,n,o,t):Mt(t)==r.scroller&&yt(t):2==i?(n&&Yi(e.doc,n),setTimeout((function(){return r.input.focus()}),20)):3==i&&(M?e.display.input.onContextMenu(t):xn(e)))}}function ga(t,e,r){if("char"==r)return new xi(e,e);if("word"==r)return t.findWordAt(e);if("line"==r)return new xi(Qt(e.line,0),ae(t.doc,Qt(e.line+1,0)));var n=r(t,e);return new xi(n.from,n.to)}function va(t,e,r,n){var i,o;if(e.touches)i=e.touches[0].clientX,o=e.touches[0].clientY;else try{i=e.clientX,o=e.clientY}catch(c){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;n&&yt(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!vt(t,r))return _t(e);o-=s.top-a.viewOffset;for(var u=0;u=i)return pt(t,r,t,$t(t.doc,o),t.display.gutterSpecs[u].className,e),_t(e)}}function ba(t,e){return va(t,e,"gutterClick",!0)}function ya(t,e){wr(t.display,e)||function(t,e){return!!vt(t,"gutterContextMenu")&&va(t,e,"gutterContextMenu",!1)}(t,e)||mt(t,e,"contextmenu")||M||t.display.input.onContextMenu(e)}function wa(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Nr(t)}pa.prototype.compare=function(t,e,r){return this.time+400>t&&0==te(e,this.pos)&&r==this.button};var _a={toString:function(){return"CodeMirror.Init"}},xa={},Ma={};function Ea(t,e,r){if(!e!=!(r&&r!=_a)){var n=t.display.dragFunctions,i=e?ft:dt;i(t.display.scroller,"dragstart",n.start),i(t.display.scroller,"dragenter",n.enter),i(t.display.scroller,"dragover",n.over),i(t.display.scroller,"dragleave",n.leave),i(t.display.scroller,"drop",n.drop)}}function ka(t){t.options.lineWrapping?(I(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(S(t.display.wrapper,"CodeMirror-wrap"),qe(t)),sn(t),cn(t),Nr(t),setTimeout((function(){return zn(t)}),100)}function Sa(t,e){var r=this;if(!(this instanceof Sa))return new Sa(t,e);this.options=e=e?j(e):{},j(xa,e,!1);var n=e.value;"string"==typeof n?n=new To(n,e.mode,null,e.lineSeparator,e.direction):e.mode&&(n.modeOption=e.mode),this.doc=n;var i=new Sa.inputStyles[e.inputStyle](this),o=this.display=new mi(t,n,i,e);for(var l in o.wrapper.CodeMirror=this,wa(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Wn(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 L,keySeq:null,specialChars:null},e.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return r.display.input.reset(!0)}),20),function(t){var e=t.display;ft(e.scroller,"mousedown",Qn(t,ma)),ft(e.scroller,"dblclick",a&&s<11?Qn(t,(function(e){if(!mt(t,e)){var r=un(t,e);if(r&&!ba(t,e)&&!wr(t.display,e)){yt(e);var n=t.findWordAt(r);Yi(t.doc,n.anchor,n.head)}}})):function(e){return mt(t,e)||yt(e)}),ft(e.scroller,"contextmenu",(function(e){return ya(t,e)})),ft(e.input.getField(),"contextmenu",(function(r){e.scroller.contains(r.target)||ya(t,r)}));var r,n={end:0};function i(){e.activeTouch&&(r=setTimeout((function(){return e.activeTouch=null}),1e3),(n=e.activeTouch).end=+new Date)}function o(t,e){if(null==e.left)return!0;var r=e.left-t.left,n=e.top-t.top;return r*r+n*n>400}ft(e.scroller,"touchstart",(function(i){if(!mt(t,i)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(i)&&!ba(t,i)){e.input.ensurePolled(),clearTimeout(r);var o=+new Date;e.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==i.touches.length&&(e.activeTouch.left=i.touches[0].pageX,e.activeTouch.top=i.touches[0].pageY)}})),ft(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ft(e.scroller,"touchend",(function(r){var n=e.activeTouch;if(n&&!wr(e,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var a,s=t.coordsChar(e.activeTouch,"page");a=!n.prev||o(n,n.prev)?new xi(s,s):!n.prev.prev||o(n,n.prev.prev)?t.findWordAt(s):new xi(Qt(s.line,0),ae(t.doc,Qt(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),yt(r)}i()})),ft(e.scroller,"touchcancel",i),ft(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(Rn(t,e.scroller.scrollTop),Bn(t,e.scroller.scrollLeft,!0),pt(t,"scroll",t))})),ft(e.scroller,"mousewheel",(function(e){return wi(t,e)})),ft(e.scroller,"DOMMouseScroll",(function(e){return wi(t,e)})),ft(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){mt(t,e)||xt(e)},over:function(e){mt(t,e)||(function(t,e){var r=un(t,e);if(r){var n=document.createDocumentFragment();vn(t,r,n),t.display.dragCursor||(t.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),t.display.lineSpace.insertBefore(t.display.dragCursor,t.display.cursorDiv)),C(t.display.dragCursor,n)}}(t,e),xt(e))},start:function(e){return function(t,e){if(a&&(!t.state.draggingText||+new Date-Do<100))xt(e);else if(!mt(t,e)&&!wr(t.display,e)&&(e.dataTransfer.setData("Text",t.getSelection()),e.dataTransfer.effectAllowed="copyMove",e.dataTransfer.setDragImage&&!h)){var r=O("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(r.width=r.height=1,t.display.wrapper.appendChild(r),r._top=r.offsetTop),e.dataTransfer.setDragImage(r,0,0),f&&r.parentNode.removeChild(r)}}(t,e)},drop:Qn(t,Po),leave:function(e){mt(t,e)||Io(t)}};var u=e.input.getField();ft(u,"keyup",(function(e){return ca.call(t,e)})),ft(u,"keydown",Qn(t,la)),ft(u,"keypress",Qn(t,fa)),ft(u,"focus",(function(e){return Mn(t,e)})),ft(u,"blur",(function(e){return En(t,e)}))}(this),Bo(),Gn(this),this.curOp.forceUpdate=!0,Ri(this,n),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){r.hasFocus()&&!r.state.focused&&Mn(r)}),20):En(this),Ma)Ma.hasOwnProperty(l)&&Ma[l](this,e[l],_a);fi(this),e.finishInit&&e.finishInit(this);for(var c=0;c150)){if(!n)return;r="prev"}}else l=0,r="not";"prev"==r?l=e>o.first?N(Gt(o,e-1).text,null,a):0:"add"==r?l=u+t.options.indentUnit:"subtract"==r?l=u-t.options.indentUnit:"number"==typeof r&&(l=u+r),l=Math.max(0,l);var f="",h=0;if(t.options.indentWithTabs)for(var d=Math.floor(l/a);d;--d)h+=a,f+="\t";if(ha,u=Tt(e),l=null;if(s&&n.ranges.length>1)if(Oa&&Oa.text.join("\n")==e){if(n.ranges.length%Oa.text.length==0){l=[];for(var c=0;c=0;h--){var d=n.ranges[h],p=d.from(),m=d.to();d.empty()&&(r&&r>0?p=Qt(p.line,p.ch-r):t.state.overwrite&&!s?m=Qt(m.line,Math.min(Gt(o,m.line).text.length,m.ch+Z(u).length)):s&&Oa&&Oa.lineWise&&Oa.text.join("\n")==u.join("\n")&&(p=m=Qt(p.line,0)));var g={from:p,to:m,text:l?l[h%l.length]:u,origin:i||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};uo(t.doc,g),ar(t,"inputRead",t,g)}e&&!s&&Ia(t,e),Tn(t),t.curOp.updateInput<2&&(t.curOp.updateInput=f),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Pa(t,e){var r=t.clipboardData&&t.clipboardData.getData("Text");if(r)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Jn(e,(function(){return Da(e,r,0,null,"paste")})),!0}function Ia(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var r=t.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=t.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Ca(t,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Gt(t.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ca(t,i.head.line,"smart"));a&&ar(t,"electricInput",t,i.head.line)}}}function Ra(t){for(var e=[],r=[],n=0;n0?0:-1));a=isNaN(l)?null:new Qt(e.line,Math.max(0,Math.min(s.text.length,e.ch+r*(l>=55296&&l<56320?2:1))),-r)}else a=i?function(t,e,r,n){var i=lt(e,t.doc.direction);if(!i)return Jo(e,r,n);r.ch>=e.text.length?(r.ch=e.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=st(i,r.ch,r.sticky),a=i[o];if("ltr"==t.doc.direction&&a.level%2==0&&(n>0?a.to>r.ch:a.from=a.from&&h>=c.begin)){var d=f?"before":"after";return new Qt(r.line,h,d)}}var p=function(t,e,n){for(var o=function(t,e){return e?new Qt(r.line,u(t,1),"before"):new Qt(r.line,t,"after")};t>=0&&t0==(1!=a.level),l=s?n.begin:u(n.end,-1);if(a.from<=l&&l0?c.end:u(c.begin,-1);return null==g||n>0&&g==e.text.length||!(m=p(n>0?0:i.length-1,n,l(g)))?null:m}(t.cm,s,e,r):Jo(s,e,r);if(null==a){if(o||!function(){var r=e.line+u;return!(r=t.first+t.size)&&(e=new Qt(r,e.ch,e.sticky),s=Gt(t,r))}())return!1;e=Qo(i,t.cm,s,e.line,u)}else e=a;return!0}if("char"==n||"codepoint"==n)l();else if("column"==n)l(!0);else if("word"==n||"group"==n)for(var c=null,f="group"==n,h=t.cm&&t.cm.getHelper(e,"wordChars"),d=!0;!(r<0)||l(!d);d=!1){var p=s.text.charAt(e.ch)||"\n",m=tt(p,h)?"w":f&&"\n"==p?"n":!f||/\s/.test(p)?null:"p";if(!f||d||m||(m="s"),c&&c!=m){r<0&&(r=1,l(),e.sticky="after");break}if(m&&(c=m),r>0&&!l(!d))break}var g=io(t,e,o,a,!0);return ee(o,g)&&(g.hitSide=!0),g}function Na(t,e,r,n){var i,o,a=t.doc,s=e.left;if("page"==n){var u=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(u-.5*en(t.display),3);i=(r>0?e.bottom:e.top)+r*l}else"line"==n&&(i=r>0?e.bottom+3:e.top-3);for(;(o=Zr(t,s,i)).outside;){if(r<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*r}return o}var La=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new L,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function za(t,e){var r=Or(t,e.line);if(!r||r.hidden)return null;var n=Gt(t.doc,e.line),i=Ar(r,n,e.line),o=lt(n,t.doc.direction),a="left";o&&(a=st(o,e.ch)%2?"right":"left");var s=Rr(i.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Ua(t,e){return e&&(t.bad=!0),t}function Ha(t,e,r){var n;if(e==t.display.lineDiv){if(!(n=t.display.lineDiv.childNodes[r]))return Ua(t.clipPos(Qt(t.display.viewTo-1)),!0);e=null,r=0}else for(n=e;;n=n.parentNode){if(!n||n==t.display.lineDiv)return null;if(n.parentNode&&n.parentNode==t.display.lineDiv)break}for(var i=0;i=e.display.viewTo||o.line=e.display.viewFrom&&za(e,i)||{node:u[0].measure.map[2],offset:0},c=o.linen.firstLine()&&(a=Qt(a.line-1,Gt(n.doc,a.line-1).length)),s.ch==Gt(n.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(t=ln(n,a.line))?(e=Kt(i.view[0].line),r=i.view[0].node):(e=Kt(i.view[t].line),r=i.view[t-1].node.nextSibling);var u,l,c=ln(n,s.line);if(c==i.view.length-1?(u=i.viewTo-1,l=i.lineDiv.lastChild):(u=Kt(i.view[c+1].line)-1,l=i.view[c+1].node.previousSibling),!r)return!1;for(var f=n.doc.splitLines(function(t,e,r,n,i){var o="",a=!1,s=t.doc.lineSeparator(),u=!1;function l(){a&&(o+=s,u&&(o+=s),a=u=!1)}function c(t){t&&(l(),o+=t)}function f(e){if(1==e.nodeType){var r=e.getAttribute("cm-text");if(r)return void c(r);var o,h=e.getAttribute("cm-marker");if(h){var d=t.findMarks(Qt(n,0),Qt(i+1,0),(g=+h,function(t){return t.id==g}));return void(d.length&&(o=d[0].find(0))&&c(Vt(t.doc,o.from,o.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;p&&l();for(var m=0;m1&&h.length>1;)if(Z(f)==Z(h))f.pop(),h.pop(),u--;else{if(f[0]!=h[0])break;f.shift(),h.shift(),e++}for(var d=0,p=0,m=f[0],g=h[0],v=Math.min(m.length,g.length);da.ch&&b.charCodeAt(b.length-p-1)==y.charCodeAt(y.length-p-1);)d--,p++;f[f.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var _=Qt(e,d),x=Qt(u,h.length?Z(h).length-p:0);return f.length>1||f[0]||te(_,x)?(po(n.doc,f,_,x,"+input"),!0):void 0},La.prototype.ensurePolled=function(){this.forceCompositionEnd()},La.prototype.reset=function(){this.forceCompositionEnd()},La.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},La.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},La.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Jn(this.cm,(function(){return cn(t.cm)}))},La.prototype.setUneditable=function(t){t.contentEditable="false"},La.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Qn(this.cm,Da)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},La.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},La.prototype.onContextMenu=function(){},La.prototype.resetPosition=function(){},La.prototype.needsContentAttribute=!0;var qa=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new L,this.hasSelection=!1,this.composing=null};qa.prototype.init=function(t){var e=this,r=this,n=this.cm;this.createField(t);var i=this.textarea;function o(t){if(!mt(n,t)){if(n.somethingSelected())Ta({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var e=Ra(n);Ta({lineWise:!0,text:e.text}),"cut"==t.type?n.setSelections(e.ranges,null,H):(r.prevInput="",i.value=e.text.join("\n"),F(i))}"cut"==t.type&&(n.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),m&&(i.style.width="0px"),ft(i,"input",(function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),r.poll()})),ft(i,"paste",(function(t){mt(n,t)||Pa(t,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())})),ft(i,"cut",o),ft(i,"copy",o),ft(t.scroller,"paste",(function(e){if(!wr(t,e)&&!mt(n,e)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,i.dispatchEvent(o)}})),ft(t.lineSpace,"selectstart",(function(e){wr(t,e)||yt(e)})),ft(i,"compositionstart",(function(){var t=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:t,range:n.markText(t,n.getCursor("to"),{className:"CodeMirror-composing"})}})),ft(i,"compositionend",(function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)}))},qa.prototype.createField=function(t){this.wrapper=Ba(),this.textarea=this.wrapper.firstChild},qa.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},qa.prototype.prepareSelection=function(){var t=this.cm,e=t.display,r=t.doc,n=gn(t);if(t.options.moveInputWithCursor){var i=Gr(t,r.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+a.top-o.top)),n.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+a.left-o.left))}return n},qa.prototype.showSelection=function(t){var e=this.cm.display;C(e.cursorDiv,t.cursors),C(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},qa.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var r=e.getSelection();this.textarea.value=r,e.state.focused&&F(this.textarea),a&&s>=9&&(this.hasSelection=r)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},qa.prototype.getField=function(){return this.textarea},qa.prototype.supportsTouch=function(){return!1},qa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||P()!=this.textarea))try{this.textarea.focus()}catch(t){}},qa.prototype.blur=function(){this.textarea.blur()},qa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},qa.prototype.receivedFocus=function(){this.slowPoll()},qa.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},qa.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,(function r(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,r))}))},qa.prototype.poll=function(){var t=this,e=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||Dt(r)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=r.value;if(i==n&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||b&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="\u200b"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var u=0,l=Math.min(n.length,i.length);u1e3||i.indexOf("\n")>-1?r.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},qa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},qa.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},qa.prototype.onContextMenu=function(t){var e=this,r=e.cm,n=r.display,i=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=un(r,t),l=n.scroller.scrollTop;if(o&&!f){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Qn(r,Ji)(r.doc,Ei(o),H);var c,h=i.style.cssText,d=e.wrapper.style.cssText,p=e.wrapper.offsetParent.getBoundingClientRect();e.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-p.top-5)+"px; left: "+(t.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",u&&(c=window.scrollY),n.input.focus(),u&&window.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(i.value=e.prevInput=" "),e.contextMenuPending=g,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),a&&s>=9&&m(),M?(xt(t),ft(window,"mouseup",(function t(){dt(window,"mouseup",t),setTimeout(g,20)}))):setTimeout(g,50)}function m(){if(null!=i.selectionStart){var t=r.somethingSelected(),o="\u200b"+(t?i.value:"");i.value="\u21da",i.value=o,e.prevInput=t?"":"\u200b",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function g(){if(e.contextMenuPending==g&&(e.contextMenuPending=!1,e.wrapper.style.cssText=d,i.style.cssText=h,a&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=l),null!=i.selectionStart)){(!a||a&&s<9)&&m();var t=0;n.detectingSelectAll=setTimeout((function o(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"\u200b"==e.prevInput?Qn(r,ao)(r):t++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())}),200)}}},qa.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},qa.prototype.setUneditable=function(){},qa.prototype.needsContentAttribute=!1,function(t){var e=t.optionHandlers;function r(r,n,i,o){t.defaults[r]=n,i&&(e[r]=o?function(t,e,r){r!=_a&&i(t,e,r)}:i)}t.defineOption=r,t.Init=_a,r("value","",(function(t,e){return t.setValue(e)}),!0),r("mode",null,(function(t,e){t.doc.modeOption=e,Oi(t)}),!0),r("indentUnit",2,Oi,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,(function(t){Ti(t),Nr(t),cn(t)}),!0),r("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var r=[],n=t.doc.first;t.doc.iter((function(t){for(var i=0;;){var o=t.text.indexOf(e,i);if(-1==o)break;i=o+e.length,r.push(Qt(n,o))}n++}));for(var i=r.length-1;i>=0;i--)po(t.doc,e,r[i],Qt(r[i].line,r[i].ch+e.length))}})),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,r){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),r!=_a&&t.refresh()})),r("specialCharPlaceholder",Xe,(function(t){return t.refresh()}),!0),r("electricChars",!0),r("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),r("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),r("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),r("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",(function(t){wa(t),pi(t)}),!0),r("keyMap","default",(function(t,e,r){var n=Ko(e),i=r!=_a&&Ko(r);i&&i.detach&&i.detach(t,n),n.attach&&n.attach(t,i||null)})),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,ka,!0),r("gutters",[],(function(t,e){t.display.gutterSpecs=hi(e,t.options.lineNumbers),pi(t)}),!0),r("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?on(t.display)+"px":"0",t.refresh()}),!0),r("coverGutterNextToScrollbar",!1,(function(t){return zn(t)}),!0),r("scrollbarStyle","native",(function(t){Wn(t),zn(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),r("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=hi(t.options.gutters,e),pi(t)}),!0),r("firstLineNumber",1,pi,!0),r("lineNumberFormatter",(function(t){return t}),pi,!0),r("showCursorWhenSelecting",!1,mn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,(function(t,e){"nocursor"==e&&(En(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),r("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),r("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),r("dragDrop",!0,Ea),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,mn,!0),r("singleCursorHeightPerLine",!0,mn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Ti,!0),r("addModeClass",!1,Ti,!0),r("pollInterval",100),r("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),r("historyEventDelay",1250),r("viewportMargin",10,(function(t){return t.refresh()}),!0),r("maxHighlightLength",1e4,Ti,!0),r("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),r("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),r("autofocus",null),r("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),r("phrases",null)}(Sa),function(t){var e=t.optionHandlers,r=t.helpers={};t.prototype={constructor:t,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,r){var n=this.options,i=n[t];n[t]==r&&"mode"!=t||(n[t]=r,e.hasOwnProperty(t)&&Qn(this,e[t])(this,r,i),pt(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](Ko(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,r=0;rr&&(Ca(this,i.head.line,t,!0),r=i.head.line,n==this.doc.sel.primIndex&&Tn(this));else{var o=i.from(),a=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var u=s;u0&&Ki(this.doc,n,new xi(o,l[n].to()),H)}}})),getTokenAt:function(t,e){return ve(this,t,e)},getLineTokens:function(t,e){return ve(this,Qt(t),e,!0)},getTokenTypeAt:function(t){t=ae(this.doc,t);var e,r=fe(this,Gt(this.doc,t.line)),n=0,i=(r.length-1)/2,o=t.ch;if(0==o)e=r[2];else for(;;){var a=n+i>>1;if((a?r[2*a-1]:0)>=o)i=a;else{if(!(r[2*a+1]o&&(t=o,i=!0),n=Gt(this.doc,t)}else n=t;return Hr(this,n,{top:0,left:0},e||"page",r||i).top+(i?this.doc.height-He(n):0)},defaultTextHeight:function(){return en(this.display)},defaultCharWidth:function(){return rn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,r,n,i){var o=this.display,a=(t=Gr(this,ae(this.doc,t))).bottom,s=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==n)a=t.top;else if("above"==n||"near"==n){var u=Math.max(o.wrapper.clientHeight,this.doc.height),l=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||t.bottom+e.offsetHeight>u)&&t.top>e.offsetHeight?a=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=u&&(a=t.bottom),s+e.offsetWidth>l&&(s=l-e.offsetWidth)}e.style.top=a+"px",e.style.left=e.style.right="","right"==i?(s=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=s+"px"),r&&function(t,e){var r=Cn(t,e);null!=r.scrollTop&&Rn(t,r.scrollTop),null!=r.scrollLeft&&Bn(t,r.scrollLeft)}(this,{left:s,top:a,right:s+e.offsetWidth,bottom:a+e.offsetHeight})},triggerOnKeyDown:ti(la),triggerOnKeyPress:ti(fa),triggerOnKeyUp:ca,triggerOnMouseDown:ti(ma),execCommand:function(t){if(ta.hasOwnProperty(t))return ta[t].call(null,this)},triggerElectric:ti((function(t){Ia(this,t)})),findPosH:function(t,e,r,n){var i=1;e<0&&(i=-1,e=-e);for(var o=ae(this.doc,t),a=0;a0&&a(e.charAt(r-1));)--r;for(;n.5||this.options.lineWrapping)&&sn(this),pt(this,"refresh",this)})),swapDoc:ti((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),Ri(this,t),Nr(this),this.display.input.reset(),Dn(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,ar(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[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}},bt(t),t.registerHelper=function(e,n,i){r.hasOwnProperty(e)||(r[e]=t[e]={_global:[]}),r[e][n]=i},t.registerGlobalHelper=function(e,n,i,o){t.registerHelper(e,n,o),r[e]._global.push({pred:i,val:o})}}(Sa);var Ga="iter insert remove copy getEditor constructor".split(" ");for(var Va in To.prototype)To.prototype.hasOwnProperty(Va)&&z(Ga,Va)<0&&(Sa.prototype[Va]=function(t){return function(){return t.apply(this.doc,arguments)}}(To.prototype[Va]));return bt(To),Sa.inputStyles={textarea:qa,contenteditable:La},Sa.defineMode=function(t){Sa.defaults.mode||"null"==t||(Sa.defaults.mode=t),Bt.apply(this,arguments)},Sa.defineMIME=function(t,e){Ft[t]=e},Sa.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Sa.defineMIME("text/plain","null"),Sa.defineExtension=function(t,e){Sa.prototype[t]=e},Sa.defineDocExtension=function(t,e){To.prototype[t]=e},Sa.fromTextArea=function(t,e){if((e=e?j(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var r=P();e.autofocus=r==t||null!=t.getAttribute("autofocus")&&r==document.body}function n(){t.value=s.getValue()}var i;if(t.form&&(ft(t.form,"submit",n),!e.leaveSubmitMethodAlone)){var o=t.form;i=o.submit;try{var a=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=a}}catch(u){}}e.finishInit=function(r){r.save=n,r.getTextArea=function(){return t},r.toTextArea=function(){r.toTextArea=isNaN,n(),t.parentNode.removeChild(r.getWrapperElement()),t.style.display="",t.form&&(dt(t.form,"submit",n),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=i))}},t.style.display="none";var s=Sa((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return s},function(t){t.off=dt,t.on=ft,t.wheelEventPixels=yi,t.Doc=To,t.splitLines=Tt,t.countColumn=N,t.findColumn=G,t.isWordChar=Q,t.Pass=U,t.signal=pt,t.Line=Ge,t.changeEnd=ki,t.scrollbarModel=Hn,t.Pos=Qt,t.cmpPos=te,t.modes=Rt,t.mimeModes=Ft,t.resolveMode=jt,t.getMode=Nt,t.modeExtensions=Lt,t.extendMode=zt,t.copyState=Ut,t.startState=Wt,t.innerMode=Ht,t.commands=ta,t.keyMap=Ho,t.keyName=Zo,t.isModifierKey=Vo,t.lookupKey=Go,t.normalizeKeyMap=qo,t.StringStream=qt,t.SharedTextMarker=So,t.TextMarker=Eo,t.LineWidget=_o,t.e_preventDefault=yt,t.e_stopPropagation=wt,t.e_stop=xt,t.addClass=I,t.contains=D,t.rmClass=S,t.keyNames=No}(Sa),Sa.version="5.59.0",Sa}()},function(t,e,r){"use strict";e.a=function(t,e){}},function(t,e,r){"use strict";e.a=function(t,e){if(!t)throw new Error("Invariant failed")}},function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=r,r.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},function(t,e,r){"use strict";var n=e,i=r(54),o=r(41),a=r(243);n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0;t.cmpn(-n)>0||e.cmpn(-i)>0;){var o,a,s,u=t.andln(3)+n&3,l=e.andln(3)+i&3;if(3===u&&(u=-1),3===l&&(l=-1),0===(1&u))o=0;else o=3!==(s=t.andln(7)+n&7)&&5!==s||2!==l?u:-u;if(r[0].push(o),0===(1&l))a=0;else a=3!==(s=e.andln(7)+i&7)&&5!==s||2!==u?l:-l;r[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"===typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},function(t,e,r){"use strict";e.a=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){"use strict";var n=r(145),i=r(96),o=r(136),a=Object(o.a)(Object.keys,Object),s=Object.prototype.hasOwnProperty;var u=function(t){if(!Object(i.a)(t))return a(t);var e=[];for(var r in Object(t))s.call(t,r)&&"constructor"!=r&&e.push(r);return e},l=r(98);e.a=function(t){return Object(l.a)(t)?Object(n.a)(t):u(t)}},function(t,e,r){"use strict";var n=r(31),i=r(93),o=r(24),a=r(68),s=n.a?n.a.prototype:void 0,u=s?s.toString:void 0;var l=function t(e){if("string"==typeof e)return e;if(Object(o.a)(e))return Object(i.a)(e,t)+"";if(Object(a.a)(e))return u?u.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r};e.a=function(t){return null==t?"":l(t)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return _})),r.d(e,"b",(function(){return S})),r.d(e,"d",(function(){return C})),r.d(e,"c",(function(){return m})),r.d(e,"f",(function(){return g})),r.d(e,"e",(function(){return p}));var n=r(4);function i(t){return"/"===t.charAt(0)}function o(t,e){for(var r=e,n=r+1,i=t.length;n=0;h--){var d=a[h];"."===d?o(a,h):".."===d?(o(a,h),f++):f&&(o(a,h),f--)}if(!l)for(;f--;f)a.unshift("..");!l||""===a[0]||a[0]&&i(a[0])||a.unshift("");var p=a.join("/");return r&&"/"!==p.substr(-1)&&(p+="/"),p};function s(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}var u=function t(e,r){if(e===r)return!0;if(null==e||null==r)return!1;if(Array.isArray(e))return Array.isArray(r)&&e.length===r.length&&e.every((function(e,n){return t(e,r[n])}));if("object"===typeof e||"object"===typeof r){var n=s(e),i=s(r);return n!==e||i!==r?t(n,i):Object.keys(Object.assign({},e,r)).every((function(n){return t(e[n],r[n])}))}return!1},l=r(40);function c(t){return"/"===t.charAt(0)?t:"/"+t}function f(t){return"/"===t.charAt(0)?t.substr(1):t}function h(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function d(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function p(t){var e=t.pathname,r=t.search,n=t.hash,i=e||"/";return r&&"?"!==r&&(i+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(i+="#"===n.charAt(0)?n:"#"+n),i}function m(t,e,r,i){var o;"string"===typeof t?(o=function(t){var e=t||"/",r="",n="",i=e.indexOf("#");-1!==i&&(n=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(r=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===r?"":r,hash:"#"===n?"":n}}(t)).state=e:(void 0===(o=Object(n.a)({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return r&&(o.key=r),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function g(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&u(t.state,e.state)}function v(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,r,n,i){if(null!=t){var o="function"===typeof t?t(e,r):t;"string"===typeof o?"function"===typeof n?n(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(t){var r=!0;function n(){r&&t.apply(void 0,arguments)}return e.push(n),function(){r=!1,e=e.filter((function(t){return t!==n}))}},notifyListeners:function(){for(var t=arguments.length,r=new Array(t),n=0;ne?r.splice(e,r.length-e,n):r.push(n),f({action:"PUSH",location:n,index:e,entries:r})}}))},replace:function(t,e){var n=m(t,e,h(),w.location);c.confirmTransitionTo(n,"REPLACE",r,(function(t){t&&(w.entries[w.index]=n,f({action:"REPLACE",location:n}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(t){var e=w.index+t;return e>=0&&e>15;--o>=0;){var u=32767&this[t],l=this[t++]>>15,c=s*u+l*a;i=((u=a*u+((32767&c)<<15)+r[n]+(1073741823&i))>>>30)+(c>>>15)+s*l+(i>>>30),r[n++]=1073741823&u}return i},n=30):m&&"Netscape"!=navigator.appName?(d.prototype.am=function(t,e,r,n,i,o){for(;--o>=0;){var a=e*this[t++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i},n=26):(d.prototype.am=function(t,e,r,n,i,o){for(var a=16383&e,s=e>>14;--o>=0;){var u=16383&this[t],l=this[t++]>>14,c=s*u+l*a;i=((u=a*u+((16383&c)<<14)+r[n]+i)>>28)+(c>>14)+s*l,r[n++]=268435455&u}return i},n=28),d.prototype.DB=n,d.prototype.DM=(1<>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function M(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e},M.prototype.revert=function(t){var e=p();return t.copyTo(e),this.reduce(e),e},M.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},M.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},M.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},d.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},d.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},d.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");r=2}this.t=0,this.s=0;for(var n=t.length,i=!1,o=0;--n>=0;){var a=w(t,n);a<0?"-"==t.charAt(n)&&(i=!0):(i=!1,0==o?this[this.t++]=a:o+r>this.DB?(this[this.t-1]|=(a&(1<>this.DB-o):this[this.t-1]|=a<=this.DB&&(o-=this.DB))}this.clamp(),i&&d.ZERO.subTo(this,this)},d.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},d.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},d.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e[r+a+1]=this[r]>>i|s,s=(this[r]&o)<=0;--r)e[r]=0;e[a]=s,e.t=this.t+a+1,e.s=this.s,e.clamp()},d.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<>n;for(var a=r+1;a>n;n>0&&(e[this.t-r-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},d.prototype.multiplyTo=function(t,e){var r=this.abs(),n=t.abs(),i=r.t;for(e.t=i+n.t;--i>=0;)e[i]=0;for(i=0;i=0;)t[r]=0;for(r=0;r=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},d.prototype.divRemTo=function(t,e,r){var n=t.abs();if(!(n.t<=0)){var i=this.abs();if(i.t0?(n.lShiftTo(u,o),i.lShiftTo(u,r)):(n.copyTo(o),i.copyTo(r));var l=o.t,c=o[l-1];if(0!=c){var f=c*(1<1?o[l-2]>>this.F2:0),h=this.FV/f,m=(1<=0&&(r[r.t++]=1,r.subTo(y,r)),d.ONE.dlShiftTo(l,y),y.subTo(o,o);o.t=0;){var w=r[--v]==c?this.DM:Math.floor(r[v]*h+(r[v-1]+g)*m);if((r[v]+=o.am(0,w,r,b,0,l))0&&r.rShiftTo(u,r),a<0&&d.ZERO.subTo(r,r)}}},d.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},d.prototype.addTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r>=this.DB;if(t.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},d.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");e=2}var r,n=(1<0)for(s>s)>0&&(i=!0,o=y(r));a>=0;)s>(s+=this.DB-e)):(r=this[a]>>(s-=e)&n,s<=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=y(r));return i?o:"0"},d.prototype.negate=function(){var t=p();return d.ZERO.subTo(this,t),t},d.prototype.abs=function(){return this.s<0?this.negate():this},d.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},d.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+x(this[this.t-1]^this.s&this.DM)},d.prototype.mod=function(t){var e=p();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(d.ZERO)>0&&t.subTo(e,e),e},d.prototype.equals=function(t){return 0==this.compareTo(t)},d.prototype.add=function(t){var e=p();return this.addTo(t,e),e},d.prototype.subtract=function(t){var e=p();return this.subTo(t,e),e},d.prototype.multiply=function(t){var e=p();return this.multiplyTo(t,e),e},d.prototype.divide=function(t){var e=p();return this.divRemTo(t,e,null),e},d.prototype.modPow=function(t,e,r){var n,i=t.bitLength(),o=_(1),a=new M(e);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6;var s=new Array,u=3,l=n-1,c=(1<1){var f=p();for(a.sqrTo(s[1],f);u<=c;)s[u]=p(),a.mulTo(f,s[u-2],s[u]),u+=2}var h,d,m=t.t-1,g=!0,v=p();for(i=x(t[m])-1;m>=0;){for(i>=l?h=t[m]>>i-l&c:(h=(t[m]&(1<0&&(h|=t[m-1]>>this.DB+i-l)),u=n;0==(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--m),g)s[h].copyTo(o),g=!1;else{for(;u>1;)a.sqrTo(o,v),a.sqrTo(v,o),u-=2;u>0?a.sqrTo(o,v):(d=o,o=v,v=d),a.mulTo(v,s[h],o)}for(;m>=0&&0==(t[m]&1<=t.length)&&56320===(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"===typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(t="0"+t),i=0;i>6|192,r[n++]=63&a|128):o(t,i)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,a=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,a,s){var u=0,l=e;return u+=(l=l+n>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,r,n,i,o,a,s){return e+n+o+s>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,a,s,u,l){var c=0,f=e;return c+=(f=f+n>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,r,n,i,o,a,s,u,l){return e+n+o+s+l>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},function(t,e,r){"use strict";var n=r(68);e.a=function(t){if("string"==typeof t||Object(n.a)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(417).Buffer}catch(E){}function s(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,l=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,f=67108863&u,h=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=h;d++){var p=l-d|0;c+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=c[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:l[h-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,l=new t(o),c=this.clone();if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,x=0|a[4],M=8191&x,E=x>>>13,k=0|a[5],S=8191&k,A=k>>>13,C=0|a[6],O=8191&C,T=C>>>13,D=0|a[7],P=8191&D,I=D>>>13,R=0|a[8],F=8191&R,B=R>>>13,j=0|a[9],N=8191&j,L=j>>>13,z=0|s[0],U=8191&z,H=z>>>13,W=0|s[1],q=8191&W,G=W>>>13,V=0|s[2],Y=8191&V,Z=V>>>13,K=0|s[3],$=8191&K,X=K>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,ct=0|s[8],ft=8191&ct,ht=ct>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(l+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(h,U)|0))<<13)|0;l=((o=Math.imul(h,H))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,H))+Math.imul(m,U)|0,o=Math.imul(m,H);var vt=(l+(n=n+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,q)|0))<<13)|0;l=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,H))+Math.imul(b,U)|0,o=Math.imul(b,H),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,G)|0;var bt=(l+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,Y)|0))<<13)|0;l=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,H))+Math.imul(_,U)|0,o=Math.imul(_,H),n=n+Math.imul(v,q)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(l+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,$)|0))<<13)|0;l=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,H))+Math.imul(E,U)|0,o=Math.imul(E,H),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,X)|0;var wt=(l+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,Q)|0))<<13)|0;l=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(S,U),i=(i=Math.imul(S,H))+Math.imul(A,U)|0,o=Math.imul(A,H),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;l=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,H))+Math.imul(T,U)|0,o=Math.imul(T,H),n=n+Math.imul(S,q)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var xt=(l+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;l=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,H))+Math.imul(I,U)|0,o=Math.imul(I,H),n=n+Math.imul(O,q)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(l+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(h,ut)|0))<<13)|0;l=((o=o+Math.imul(h,lt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,H))+Math.imul(B,U)|0,o=Math.imul(B,H),n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var Et=(l+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;l=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,H))+Math.imul(L,U)|0,o=Math.imul(L,H),n=n+Math.imul(F,q)|0,i=(i=i+Math.imul(F,G)|0)+Math.imul(B,q)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,lt)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ht)|0;var kt=(l+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,pt)|0))<<13)|0;l=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,G))+Math.imul(L,q)|0,o=Math.imul(L,G),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var St=(l+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,Y),i=(i=Math.imul(N,Z))+Math.imul(L,Y)|0,o=Math.imul(L,Z),n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,lt)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ht)|0;var At=(l+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;l=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,$),i=(i=Math.imul(N,X))+Math.imul(L,$)|0,o=Math.imul(L,X),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,lt)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,ht)|0;var Ct=(l+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,lt)|0,n=n+Math.imul(S,ft)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,ht)|0;var Ot=(l+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(E,pt)|0))<<13)|0;l=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(L,rt)|0,o=Math.imul(L,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,lt)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(T,ft)|0,o=o+Math.imul(T,ht)|0;var Tt=(l+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(A,pt)|0))<<13)|0;l=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,at))+Math.imul(L,ot)|0,o=Math.imul(L,at),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,lt)|0,n=n+Math.imul(P,ft)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var Dt=(l+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;l=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,lt))+Math.imul(L,ut)|0,o=Math.imul(L,lt),n=n+Math.imul(F,ft)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Pt=(l+(n=n+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(I,pt)|0))<<13)|0;l=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(N,ft),i=(i=Math.imul(N,ht))+Math.imul(L,ft)|0,o=Math.imul(L,ht);var It=(l+(n=n+Math.imul(F,pt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(B,pt)|0))<<13)|0;l=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(l+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,mt))+Math.imul(L,pt)|0))<<13)|0;return l=((o=Math.imul(L,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=gt,u[1]=vt,u[2]=bt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=xt,u[7]=Mt,u[8]=Et,u[9]=kt,u[10]=St,u[11]=At,u[12]=Ct,u[13]=Ot,u[14]=Tt,u[15]=Dt,u[16]=Pt,u[17]=It,u[18]=Rt,0!==l&&(u[19]=l,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?h(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(l)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0===(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(b,v),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var l=e.words[n],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,x),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(53)(t))},function(t,e){function r(t,e){for(var r=0;r1?e-1:0),n=1;n0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function p(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[t];if(void 0===u)return!1;if("function"===typeof u)o(u,this,e);else{var l=u.length,c=g(u,l);for(r=0;r=0;o--)if(r[o]===e||r[o].listener===e){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},s.prototype.listeners=function(t){return p(this,t,!0)},s.prototype.rawListeners=function(t){return p(this,t,!1)},s.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,r){"use strict";(function(e){"undefined"===typeof e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!==typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,i)}));default:for(o=new Array(s-1),a=0;a=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var i=/[^.^\]^[]+|(?=\[\]|\.\.)/g,o=/^\d+$/,a=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,u=/^\s*(['"]?)(.*?)(\1)\s*$/,l=new n(512),c=new n(512),f=new n(512);function h(t){return l.get(t)||l.set(t,d(t).map((function(t){return t.replace(u,"$2")})))}function d(t){return t.match(i)}function p(t){return"string"===typeof t&&t&&-1!==["'",'"'].indexOf(t.charAt(0))}function m(t){return!p(t)&&(function(t){return t.match(a)&&!t.match(o)}(t)||function(t){return s.test(t)}(t))}t.exports={Cache:n,split:d,normalizePath:h,setter:function(t){var e=h(t);return c.get(t)||c.set(t,(function(t,r){for(var n=0,i=e.length;n-1};var c=function(t,e){var r=this.__data__,n=o(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function f(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function c(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e){function r(e){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?t.exports=r=function(t){return typeof t}:t.exports=r=function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(e)}t.exports=r},function(t,e,r){"use strict";r.d(e,"a",(function(){return f}));var n=r(26),i=r(16),o=r(0),a=r.n(o),s=r(46),u=(r(1),r(4)),l=r(11),c=r(40),f=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),i=0;i4294967295)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(t);if(t>0)if(t>65536)for(var a=0;a2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,a,s;if("string"===typeof e&&(i="not ",e.substr(!a||a<0?0:+a,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!==typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=l;var i=r(217),o=r(221);r(13)(l,i);for(var a=n(o.prototype),s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,r){"use strict";var n=r(63),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=Object.create(r(50));o.inherits=r(13);var a=r(287),s=r(290);o.inherits(f,a);for(var u=i(s.prototype),l=0;l=u?a=new RangeError(l):e=n.concat(i,o),i=[],t.close(),r(a,e)}t.on("error",(function(e){t.removeListener("end",s),t.removeListener("readable",a),r(e)})),t.on("end",s),t.end(e),a()}function b(t,e){if("string"===typeof e&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return t._processChunk(e,r)}function y(t){if(!(this instanceof y))return new y(t);A.call(this,t,o.DEFLATE)}function w(t){if(!(this instanceof w))return new w(t);A.call(this,t,o.INFLATE)}function _(t){if(!(this instanceof _))return new _(t);A.call(this,t,o.GZIP)}function x(t){if(!(this instanceof x))return new x(t);A.call(this,t,o.GUNZIP)}function M(t){if(!(this instanceof M))return new M(t);A.call(this,t,o.DEFLATERAW)}function E(t){if(!(this instanceof E))return new E(t);A.call(this,t,o.INFLATERAW)}function k(t){if(!(this instanceof k))return new k(t);A.call(this,t,o.UNZIP)}function S(t){return t===o.Z_NO_FLUSH||t===o.Z_PARTIAL_FLUSH||t===o.Z_SYNC_FLUSH||t===o.Z_FULL_FLUSH||t===o.Z_FINISH||t===o.Z_BLOCK}function A(t,r){var a=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||e.Z_DEFAULT_CHUNK,i.call(this,t),t.flush&&!S(t.flush))throw new Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!S(t.finishFlush))throw new Error("Invalid flush flag: "+t.finishFlush);if(this._flushFlag=t.flush||o.Z_NO_FLUSH,this._finishFlushFlag="undefined"!==typeof t.finishFlush?t.finishFlush:o.Z_FINISH,t.chunkSize&&(t.chunkSizee.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBitse.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.levele.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevele.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=e.Z_FILTERED&&t.strategy!=e.Z_HUFFMAN_ONLY&&t.strategy!=e.Z_RLE&&t.strategy!=e.Z_FIXED&&t.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!n.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new o.Zlib(r);var s=this;this._hadError=!1,this._handle.onerror=function(t,r){C(s),s._hadError=!0;var n=new Error(t);n.errno=r,n.code=e.codes[r],s.emit("error",n)};var u=e.Z_DEFAULT_COMPRESSION;"number"===typeof t.level&&(u=t.level);var l=e.Z_DEFAULT_STRATEGY;"number"===typeof t.strategy&&(l=t.strategy),this._handle.init(t.windowBits||e.Z_DEFAULT_WINDOWBITS,u,t.memLevel||e.Z_DEFAULT_MEMLEVEL,l,t.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=l,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!a._handle},configurable:!0,enumerable:!0})}function C(e,r){r&&t.nextTick(r),e._handle&&(e._handle.close(),e._handle=null)}function O(t){t.emit("close")}Object.defineProperty(e,"codes",{enumerable:!0,value:Object.freeze(d),writable:!1}),e.Deflate=y,e.Inflate=w,e.Gzip=_,e.Gunzip=x,e.DeflateRaw=M,e.InflateRaw=E,e.Unzip=k,e.createDeflate=function(t){return new y(t)},e.createInflate=function(t){return new w(t)},e.createDeflateRaw=function(t){return new M(t)},e.createInflateRaw=function(t){return new E(t)},e.createGzip=function(t){return new _(t)},e.createGunzip=function(t){return new x(t)},e.createUnzip=function(t){return new k(t)},e.deflate=function(t,e,r){return"function"===typeof e&&(r=e,e={}),v(new y(e),t,r)},e.deflateSync=function(t,e){return b(new y(e),t)},e.gzip=function(t,e,r){return"function"===typeof e&&(r=e,e={}),v(new _(e),t,r)},e.gzipSync=function(t,e){return b(new _(e),t)},e.deflateRaw=function(t,e,r){return"function"===typeof e&&(r=e,e={}),v(new M(e),t,r)},e.deflateRawSync=function(t,e){return b(new M(e),t)},e.unzip=function(t,e,r){return"function"===typeof e&&(r=e,e={}),v(new k(e),t,r)},e.unzipSync=function(t,e){return b(new k(e),t)},e.inflate=function(t,e,r){return"function"===typeof e&&(r=e,e={}),v(new w(e),t,r)},e.inflateSync=function(t,e){return b(new w(e),t)},e.gunzip=function(t,e,r){return"function"===typeof e&&(r=e,e={}),v(new x(e),t,r)},e.gunzipSync=function(t,e){return b(new x(e),t)},e.inflateRaw=function(t,e,r){return"function"===typeof e&&(r=e,e={}),v(new E(e),t,r)},e.inflateRawSync=function(t,e){return b(new E(e),t)},a.inherits(A,i),A.prototype.params=function(r,n,i){if(re.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+r);if(n!=e.Z_FILTERED&&n!=e.Z_HUFFMAN_ONLY&&n!=e.Z_RLE&&n!=e.Z_FIXED&&n!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==r||this._strategy!==n){var a=this;this.flush(o.Z_SYNC_FLUSH,(function(){s(a._handle,"zlib binding closed"),a._handle.params(r,n),a._hadError||(a._level=r,a._strategy=n,i&&i())}))}else t.nextTick(i)},A.prototype.reset=function(){return s(this._handle,"zlib binding closed"),this._handle.reset()},A.prototype._flush=function(t){this._transform(n.alloc(0),"",t)},A.prototype.flush=function(e,r){var i=this,a=this._writableState;("function"===typeof e||void 0===e&&!r)&&(r=e,e=o.Z_FULL_FLUSH),a.ended?r&&t.nextTick(r):a.ending?r&&this.once("end",r):a.needDrain?r&&this.once("drain",(function(){return i.flush(e,r)})):(this._flushFlag=e,this.write(n.alloc(0),"",r))},A.prototype.close=function(e){C(this,e),t.nextTick(O,this)},A.prototype._transform=function(t,e,r){var i,a=this._writableState,s=(a.ending||a.ended)&&(!t||a.length===t.length);return null===t||n.isBuffer(t)?this._handle?(s?i=this._finishFlushFlag:(i=this._flushFlag,t.length>=a.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),void this._processChunk(t,i,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},A.prototype._processChunk=function(t,e,r){var i=t&&t.length,o=this._chunkSize-this._offset,a=0,c=this,f="function"===typeof r;if(!f){var h,d=[],p=0;this.on("error",(function(t){h=t})),s(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(e,t,a,i,this._buffer,this._offset,o)}while(!this._hadError&&b(m[0],m[1]));if(this._hadError)throw h;if(p>=u)throw C(this),new RangeError(l);var g=n.concat(d,p);return C(this),g}s(this._handle,"zlib binding closed");var v=this._handle.write(e,t,a,i,this._buffer,this._offset,o);function b(u,l){if(this&&(this.buffer=null,this.callback=null),!c._hadError){var h=o-l;if(s(h>=0,"have should not go down"),h>0){var m=c._buffer.slice(c._offset,c._offset+h);c._offset+=h,f?c.push(m):(d.push(m),p+=m.length)}if((0===l||c._offset>=c._chunkSize)&&(o=c._chunkSize,c._offset=0,c._buffer=n.allocUnsafe(c._chunkSize)),0===l){if(a+=i-u,i=u,!f)return!0;var g=c._handle.write(e,t,a,i,c._buffer,c._offset,c._chunkSize);return g.callback=b,void(g.buffer=t)}if(!f)return!1;r()}}v.buffer=t,v.callback=b},a.inherits(y,A),a.inherits(w,A),a.inherits(_,A),a.inherits(x,A),a.inherits(M,A),a.inherits(E,A),a.inherits(k,A)}).call(this,r(18))},function(t,e){t.exports=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}},function(t,e,r){"use strict";e.a=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r-1&&t%1==0&&t<=9007199254740991}},function(t,e,r){"use strict";e.a=function(t){return function(e){return t(e)}}},function(t,e,r){"use strict";function n(t){return Array.prototype.slice.apply(t)}function i(t){this.status="pending",this._continuations=[],this._parent=null,this._paused=!1,t&&t.call(this,this._continueWith.bind(this),this._failWith.bind(this))}function o(t){return t&&"function"===typeof t.then}function a(t){return t}if(i.prototype={then:function(t,e){var r=i.unresolved()._setParent(this);if(this._isRejected()){if(this._paused)return this._continuations.push({promise:r,nextFn:t,catchFn:e}),r;if(e)try{var n=e(this._error);return o(n)?(this._chainPromiseData(n,r),r):i.resolve(n)._setParent(this)}catch(a){return i.reject(a)._setParent(this)}return i.reject(this._error)._setParent(this)}return this._continuations.push({promise:r,nextFn:t,catchFn:e}),this._runResolutions(),r},catch:function(t){if(this._isResolved())return i.resolve(this._data)._setParent(this);var e=i.unresolved()._setParent(this);return this._continuations.push({promise:e,catchFn:t}),this._runRejections(),e},finally:function(t){var e=!1;function r(r,n){if(!e){e=!0,t||(t=a);var i=t(r);return o(i)?i.then((function(){if(n)throw n;return r})):r}}return this.then((function(t){return r(t)})).catch((function(t){return r(null,t)}))},pause:function(){return this._paused=!0,this},resume:function(){var t=this._findFirstPaused();return t&&(t._paused=!1,t._runResolutions(),t._runRejections()),this},_findAncestry:function(){return this._continuations.reduce((function(t,e){if(e.promise){var r={promise:e.promise,children:e.promise._findAncestry()};t.push(r)}return t}),[])},_setParent:function(t){if(this._parent)throw new Error("parent already set");return this._parent=t,this},_continueWith:function(t){var e=this._findFirstPending();e&&(e._data=t,e._setResolved())},_findFirstPending:function(){return this._findFirstAncestor((function(t){return t._isPending&&t._isPending()}))},_findFirstPaused:function(){return this._findFirstAncestor((function(t){return t._paused}))},_findFirstAncestor:function(t){for(var e,r=this;r;)t(r)&&(e=r),r=r._parent;return e},_failWith:function(t){var e=this._findFirstPending();e&&(e._error=t,e._setRejected())},_takeContinuations:function(){return this._continuations.splice(0,this._continuations.length)},_runRejections:function(){if(!this._paused&&this._isRejected()){var t=this._error,e=this._takeContinuations(),r=this;e.forEach((function(e){if(e.catchFn)try{var n=e.catchFn(t);r._handleUserFunctionResult(n,e.promise)}catch(i){e.promise.reject(i)}else e.promise.reject(t)}))}},_runResolutions:function(){if(!this._paused&&this._isResolved()&&!this._isPending()){var t=this._takeContinuations();if(o(this._data))return this._handleWhenResolvedDataIsPromise(this._data);var e=this._data,r=this;t.forEach((function(t){if(t.nextFn)try{var n=t.nextFn(e);r._handleUserFunctionResult(n,t.promise)}catch(i){r._handleResolutionError(i,t)}else t.promise&&t.promise.resolve(e)}))}},_handleResolutionError:function(t,e){if(this._setRejected(),e.catchFn)try{return void e.catchFn(t)}catch(r){t=r}e.promise&&e.promise.reject(t)},_handleWhenResolvedDataIsPromise:function(t){var e=this;return t.then((function(t){e._data=t,e._runResolutions()})).catch((function(t){e._error=t,e._setRejected(),e._runRejections()}))},_handleUserFunctionResult:function(t,e){o(t)?this._chainPromiseData(t,e):e.resolve(t)},_chainPromiseData:function(t,e){t.then((function(t){e.resolve(t)})).catch((function(t){e.reject(t)}))},_setResolved:function(){this.status="resolved",this._paused||this._runResolutions()},_setRejected:function(){this.status="rejected",this._paused||this._runRejections()},_isPending:function(){return"pending"===this.status},_isResolved:function(){return"resolved"===this.status},_isRejected:function(){return"rejected"===this.status}},i.resolve=function(t){return new i((function(e,r){o(t)?t.then((function(t){e(t)})).catch((function(t){r(t)})):e(t)}))},i.reject=function(t){return new i((function(e,r){r(t)}))},i.unresolved=function(){return new i((function(t,e){this.resolve=t,this.reject=e}))},i.all=function(){var t=n(arguments);return Array.isArray(t[0])&&(t=t[0]),t.length?new i((function(e,r){var n=[],o=0,a=!1;t.forEach((function(s,u){i.resolve(s).then((function(r){n[u]=r,(o+=1)===t.length&&e(n)})).catch((function(t){!function(t){a||(a=!0,r(t))}(t)}))}))})):i.resolve([])},Promise===i)throw new Error("Please use SynchronousPromise.installGlobally() to install globally");var s=Promise;i.installGlobally=function(t){if(Promise===i)return t;var e=function(t){if("undefined"===typeof t||t.__patched)return t;var e=t;return(t=function(){e.apply(this,n(arguments))}).__patched=!0,t}(t);return Promise=i,e},i.uninstallGlobally=function(){Promise===i&&(Promise=s)},t.exports={SynchronousPromise:i}},function(t,e,r){"use strict";var n=r(75);var i=function(t,e){for(var r=-1,n=null==t?0:t.length;++r=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o2?arguments[2]:{},o=n(e);i&&(o=a.call(o,Object.getOwnPropertySymbols(e)));for(var s=0;s=0;l--)if(c[l]!==f[l])return!1;for(l=c.length-1;l>=0;l--)if(s=c[l],!y(t[s],e[s],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function w(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(r){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function x(t,e,r,n){var i;if("function"!==typeof e)throw new TypeError('"block" argument must be a function');"string"===typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(r){e=r}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&v(i,r,"Missing expected exception"+n);var o="string"===typeof n,s=!t&&i&&!r;if((!t&&a.isError(i)&&o&&_(i,r)||s)&&v(i,r,"Got unwanted exception"+n),t&&i&&r&&!_(i,r)||!t&&i)throw i}h.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return m(g(t.actual),128)+" "+t.operator+" "+m(g(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=p(e),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},a.inherits(h.AssertionError,Error),h.fail=v,h.ok=b,h.equal=function(t,e,r){t!=e&&v(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&v(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){y(t,e,!1)||v(t,e,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,r){y(t,e,!0)||v(t,e,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,r){y(t,e,!1)&&v(t,e,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,r,n){y(e,r,!0)&&v(e,r,n,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,r){t!==e&&v(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&v(t,e,r,"!==",h.notStrictEqual)},h.throws=function(t,e,r){x(!0,t,e,r)},h.doesNotThrow=function(t,e,r){x(!1,t,e,r)},h.ifError=function(t){if(t)throw t},h.strict=n((function t(e,r){e||v(e,!0,r,"==",t)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var M=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this,r(20))},function(t,e,r){"use strict";t.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},function(t,e,r){var n=r(183);t.exports=function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}},function(t,e,r){var n=r(316),i=r(317),o=r(598);t.exports=function(t){return function(){var e,r=n(t);if(i()){var a=n(this).constructor;e=Reflect.construct(r,arguments,a)}else e=r.apply(this,arguments);return o(this,e)}}},function(t,e,r){"use strict";var n=r(3),i=r(56),o=r(55),a=r(48);Object.defineProperty(e,"__esModule",{value:!0});var s=r(112),u=r(323),l=r(323);e.EndOfStreamError=l.EndOfStreamError;var c=function t(){var e=this;a(this,t),this.promise=new Promise((function(t,r){e.reject=r,e.resolve=t}))},f=function(){function t(e){var r=this;if(a(this,t),this.s=e,this.endOfStream=!1,this.peekQueue=[],!e.read||!e.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",(function(){return r.reject(new u.EndOfStreamError)})),this.s.once("error",(function(t){return r.reject(t)})),this.s.once("close",(function(){return r.reject(new Error("Stream closed"))}))}return o(t,[{key:"peek",value:function(){var t=i(n.mark((function t(e,r,i){var o;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.read(e,r,i);case 2:return o=t.sent,this.peekQueue.push(e.slice(r,r+o)),t.abrupt("return",o);case 5:case"end":return t.stop()}}),t,this)})));return function(e,r,n){return t.apply(this,arguments)}}()},{key:"read",value:function(){var t=i(n.mark((function t(e,r,i){var o,a,s,l,c,f;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==i){t.next=2;break}return t.abrupt("return",0);case 2:if(0!==this.peekQueue.length||!this.endOfStream){t.next=4;break}throw new u.EndOfStreamError;case 4:for(o=i,a=0;this.peekQueue.length>0&&o>0;)s=this.peekQueue.pop(),l=Math.min(s.length,o),s.copy(e,r+a,0,l),a+=l,o-=l,l0)||this.endOfStream){t.next=18;break}return c=Math.min(o,1048576),t.next=11,this._read(e,r+a,c);case 11:if(f=t.sent,a+=f,!(f0?1:0):0};e.lazySlidesOnLeft=h;var d=function(t){return t.centerMode?Math.floor((t.slidesToShow-1)/2)+1+(parseInt(t.centerPadding)>0?1:0):t.slidesToShow};e.lazySlidesOnRight=d;var p=function(t){return t&&t.offsetWidth||0};e.getWidth=p;var m=function(t){return t&&t.offsetHeight||0};e.getHeight=m;var g=function(t){var e,r,n,i,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e=t.startX-t.curX,r=t.startY-t.curY,n=Math.atan2(r,e),(i=Math.round(180*n/Math.PI))<0&&(i=360-Math.abs(i)),i<=45&&i>=0||i<=360&&i>=315?"left":i>=135&&i<=225?"right":!0===o?i>=35&&i<=135?"up":"down":"vertical"};e.getSwipeDirection=g;var v=function(t){var e=!0;return t.infinite||(t.centerMode&&t.currentSlide>=t.slideCount-1||t.slideCount<=t.slidesToShow||t.currentSlide>=t.slideCount-t.slidesToShow)&&(e=!1),e};e.canGoNext=v;e.extractObject=function(t,e){var r={};return e.forEach((function(e){return r[e]=t[e]})),r};e.initializedState=function(t){var e,r=i.default.Children.count(t.children),n=t.listRef,o=Math.ceil(p(n)),s=t.trackRef&&t.trackRef.node,u=Math.ceil(p(s));if(t.vertical)e=o;else{var c=t.centerMode&&2*parseInt(t.centerPadding);"string"===typeof t.centerPadding&&"%"===t.centerPadding.slice(-1)&&(c*=o/100),e=Math.ceil((o-c)/t.slidesToShow)}var f=n&&m(n.querySelector('[data-index="0"]')),h=f*t.slidesToShow,d=void 0===t.currentSlide?t.initialSlide:t.currentSlide;t.rtl&&void 0===t.currentSlide&&(d=r-1-t.initialSlide);var g=t.lazyLoadedList||[],v=l(a(a({},t),{},{currentSlide:d,lazyLoadedList:g}));g.concat(v);var b={slideCount:r,slideWidth:e,listWidth:o,trackWidth:u,currentSlide:d,slideHeight:f,listHeight:h,lazyLoadedList:g};return null===t.autoplaying&&t.autoplay&&(b.autoplaying="playing"),b};e.slideHandler=function(t){var e=t.waitForAnimate,r=t.animating,n=t.fade,i=t.infinite,o=t.index,s=t.slideCount,c=t.lazyLoadedList,f=t.lazyLoad,h=t.currentSlide,d=t.centerMode,p=t.slidesToScroll,m=t.slidesToShow,g=t.useCSS;if(e&&r)return{};var b,y,w,_=o,k={},S={},A=i?o:u(o,0,s-1);if(n){if(!i&&(o<0||o>=s))return{};o<0?_=o+s:o>=s&&(_=o-s),f&&c.indexOf(_)<0&&c.push(_),k={animating:!0,currentSlide:_,lazyLoadedList:c,targetSlide:_},S={animating:!1,targetSlide:_}}else b=_,_<0?(b=_+s,i?s%p!==0&&(b=s-s%p):b=0):!v(t)&&_>h?_=b=h:d&&_>=s?(_=i?s:s-1,b=i?0:s-1):_>=s&&(b=_-s,i?s%p!==0&&(b=0):b=s-m),!i&&_+m>=s&&(b=s-m),y=E(a(a({},t),{},{slideIndex:_})),w=E(a(a({},t),{},{slideIndex:b})),i||(y===w&&(_=b),y=w),f&&c.concat(l(a(a({},t),{},{currentSlide:_}))),g?(k={animating:!0,currentSlide:b,trackStyle:M(a(a({},t),{},{left:y})),lazyLoadedList:c,targetSlide:A},S={animating:!1,currentSlide:b,trackStyle:x(a(a({},t),{},{left:w})),swipeLeft:null,targetSlide:A}):k={currentSlide:b,trackStyle:x(a(a({},t),{},{left:w})),lazyLoadedList:c,targetSlide:A};return{state:k,nextState:S}};e.changeSlide=function(t,e){var r,n,i,o,s=t.slidesToScroll,u=t.slidesToShow,l=t.slideCount,c=t.currentSlide,f=t.targetSlide,h=t.lazyLoad,d=t.infinite;if(r=l%s!==0?0:(l-c)%s,"previous"===e.message)o=c-(i=0===r?s:u-r),h&&!d&&(o=-1===(n=c-i)?l-1:n),d||(o=f-s);else if("next"===e.message)o=c+(i=0===r?s:r),h&&!d&&(o=(c+s)%l+r),d||(o=f+s);else if("dots"===e.message)o=e.index*e.slidesToScroll;else if("children"===e.message){if(o=e.index,d){var p=C(a(a({},t),{},{targetSlide:o}));o>e.currentSlide&&"left"===p?o-=l:o10)return{scrolling:!0};s&&(w.swipeLength=O);var T=(u?-1:1)*(w.curX>w.startX?1:-1);s&&(T=w.curY>w.startY?1:-1);var D=Math.ceil(m/b),P=g(e.touchObject,s),I=w.swipeLength;return y||(0===l&&"right"===P||l+1>=D&&"left"===P||!v(e)&&"left"===P)&&(I=w.swipeLength*c,!1===f&&h&&(h(P),A.edgeDragged=!0)),!d&&_&&(_(P),A.swiped=!0),S=i?C+I*(M/k)*T:u?C-I*T:C+I*T,s&&(S=C+I*T),A=a(a({},A),{},{touchObject:w,swipeLeft:S,trackStyle:x(a(a({},e),{},{left:S}))}),Math.abs(w.curX-w.startX)<.8*Math.abs(w.curY-w.startY)?A:(w.swipeLength>10&&(A.swiping=!0,t.preventDefault()),A)}};e.swipeEnd=function(t,e){var r=e.dragging,n=e.swipe,i=e.touchObject,o=e.listWidth,s=e.touchThreshold,u=e.verticalSwiping,l=e.listHeight,c=e.swipeToSlide,f=e.scrolling,h=e.onSwipe,d=e.targetSlide,p=e.currentSlide,m=e.infinite;if(!r)return n&&t.preventDefault(),{};var v=u?l/s:o/s,b=g(i,u),_={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(f)return _;if(!i.swipeLength)return _;if(i.swipeLength>v){var x,k;t.preventDefault(),h&&h(b);var S=m?p:d;switch(b){case"left":case"up":k=S+w(e),x=c?y(e,k):k,_.currentDirection=0;break;case"right":case"down":k=S-w(e),x=c?y(e,k):k,_.currentDirection=1;break;default:x=S}_.triggerSlideHandler=x}else{var A=E(e);_.trackStyle=M(a(a({},e),{},{left:A}))}return _};var b=function(t){for(var e=t.infinite?2*t.slideCount:t.slideCount,r=t.infinite?-1*t.slidesToShow:0,n=t.infinite?-1*t.slidesToShow:0,i=[];rr[r.length-1])e=r[r.length-1];else for(var i in r){if(e-1*t.swipeLeft)return r=n,!1}else if(n.offsetLeft-e+p(n)/2>-1*t.swipeLeft)return r=n,!1;return!0})),!r)return 0;var i=!0===t.rtl?t.slideCount-t.currentSlide:t.currentSlide;return Math.abs(r.dataset.index-i)||1}return t.slidesToScroll};e.getSlideCount=w;var _=function(t,e){return e.reduce((function(e,r){return e&&t.hasOwnProperty(r)}),!0)?null:console.error("Keys Missing:",t)};e.checkSpecKeys=_;var x=function(t){var e,r;_(t,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);var n=t.slideCount+2*t.slidesToShow;t.vertical?r=n*t.slideHeight:e=A(t)*t.slideWidth;var i={opacity:1,transition:"",WebkitTransition:""};if(t.useTransform){var o=t.vertical?"translate3d(0px, "+t.left+"px, 0px)":"translate3d("+t.left+"px, 0px, 0px)",s=t.vertical?"translate3d(0px, "+t.left+"px, 0px)":"translate3d("+t.left+"px, 0px, 0px)",u=t.vertical?"translateY("+t.left+"px)":"translateX("+t.left+"px)";i=a(a({},i),{},{WebkitTransform:o,transform:s,msTransform:u})}else t.vertical?i.top=t.left:i.left=t.left;return t.fade&&(i={opacity:1}),e&&(i.width=e),r&&(i.height=r),window&&!window.addEventListener&&window.attachEvent&&(t.vertical?i.marginTop=t.left+"px":i.marginLeft=t.left+"px"),i};e.getTrackCSS=x;var M=function(t){_(t,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);var e=x(t);return t.useTransform?(e.WebkitTransition="-webkit-transform "+t.speed+"ms "+t.cssEase,e.transition="transform "+t.speed+"ms "+t.cssEase):t.vertical?e.transition="top "+t.speed+"ms "+t.cssEase:e.transition="left "+t.speed+"ms "+t.cssEase,e};e.getTrackAnimateCSS=M;var E=function(t){if(t.unslick)return 0;_(t,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);var e,r,n=t.slideIndex,i=t.trackRef,o=t.infinite,a=t.centerMode,s=t.slideCount,u=t.slidesToShow,l=t.slidesToScroll,c=t.slideWidth,f=t.listWidth,h=t.variableWidth,d=t.slideHeight,p=t.fade,m=t.vertical;if(p||1===t.slideCount)return 0;var g=0;if(o?(g=-k(t),s%l!==0&&n+l>s&&(g=-(n>s?u-(n-s):s%l)),a&&(g+=parseInt(u/2))):(s%l!==0&&n+l>s&&(g=u-s%l),a&&(g=parseInt(u/2))),e=m?n*d*-1+g*d:n*c*-1+g*c,!0===h){var v,b=i&&i.node;if(v=n+k(t),e=(r=b&&b.childNodes[v])?-1*r.offsetLeft:0,!0===a){v=o?n+k(t):n,r=b&&b.children[v],e=0;for(var y=0;yt.currentSlide?t.targetSlide>t.currentSlide+O(t)?"left":"right":t.targetSlide0&&(o+=1),n&&e%2===0&&(o+=1),o}return n?0:e-1};e.slidesOnRight=O;var T=function(t){var e=t.slidesToShow,r=t.centerMode,n=t.rtl,i=t.centerPadding;if(r){var o=(e-1)/2+1;return parseInt(i)>0&&(o+=1),n||e%2!==0||(o+=1),o}return n?e-1:0};e.slidesOnLeft=T;e.canUseDOM=function(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return h})),r.d(e,"b",(function(){return d})),r.d(e,"c",(function(){return p}));var n=r(23),i=r.n(n),o=r(92),a=r.n(o),s=r(19),u=r.n(s),l=r(0),c=r(192),f=r.n(c),h=f()(),d=f()(),p=function(t){function e(){for(var e,r=arguments.length,n=new Array(r),o=0;o>>24]^c[p>>>16&255]^f[m>>>8&255]^h[255&g]^e[v++],a=l[p>>>24]^c[m>>>16&255]^f[g>>>8&255]^h[255&d]^e[v++],s=l[m>>>24]^c[g>>>16&255]^f[d>>>8&255]^h[255&p]^e[v++],u=l[g>>>24]^c[d>>>16&255]^f[p>>>8&255]^h[255&m]^e[v++],d=o,p=a,m=s,g=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&g])^e[v++],a=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[g>>>8&255]<<8|n[255&d])^e[v++],s=(n[m>>>24]<<24|n[g>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^e[v++],u=(n[g>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^e[v++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var l=s^s<<1^s<<2^s<<3^s<<4;l=l>>>8^255&l^99,r[a]=l,n[l]=a;var c=t[a],f=t[c],h=t[f],d=257*t[l]^16843008*l;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*h^65537*f^257*c^16843008*a,o[0][l]=d<<24|d>>>8,o[1][l]=d<<16|d>>>16,o[2][l]=d<<8|d>>>24,o[3][l]=d,0===a?a=s=1:(a=c^t[t[t[h^c]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function l(t){this._key=i(t),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e===4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-e]^a}for(var l=[],c=0;c>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=l},l.prototype.encryptBlockRaw=function(t){return a(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},l.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},l.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=a(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},l.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=l},function(t,e,r){var n=r(14).Buffer,i=r(154);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),l=n.alloc(0);a>0||o>0;){var c=new i;c.update(l),c.update(t),e&&c.update(e),l=c.digest();var f=0;if(a>0){var h=s.length-a;f=Math.min(a,l.length),l.copy(s,h,0,f),a-=f}if(f0){var d=u.length-o,p=Math.min(o,l.length-f);l.copy(u,d,f,f+p),o-=p}}return l.fill(0),{key:s,iv:u}}},function(t,e,r){"use strict";var n=r(54),i=r(42),o=i.getNAF,a=i.getJSF,s=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function l(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){s(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<=u;e--)l=(l<<1)+n[e];a.push(l)}for(var c=this.jpoint(null,null,null),f=this.jpoint(null,null,null),h=i;h>0;h--){for(u=0;u=0;l--){for(e=0;l>=0&&0===a[l];l--)e++;if(l>=0&&e++,u=u.dblp(e),l<0)break;var c=a[l];s(0!==c),u="affine"===t.type?c>0?u.mixedAdd(i[c-1>>1]):u.mixedAdd(i[-c-1>>1].neg()):c>0?u.add(i[c-1>>1]):u.add(i[-c-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,l=this._wnafT3,c=0,f=0;f=1;f-=2){var d=f-1,p=f;if(1===s[d]&&1===s[p]){var m=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(m[1]=e[d].add(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].add(e[p].neg())):(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=a(r[d],r[p]);c=Math.max(v[0].length,c),l[d]=new Array(c),l[p]=new Array(c);for(var b=0;b=0;f--){for(var M=0;f>=0;){var E=!0;for(b=0;b=0&&M++,_=_.dblp(M),f<0)break;for(b=0;b0?k=u[b][S-1>>1]:S<0&&(k=u[b][-S-1>>1].neg()),_="affine"===k.type?_.mixedAdd(k):_.add(k))}}for(f=0;f=Math.ceil((t.bitLength()+1)/e.step)},l.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i-1&&t%1==0&&tt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=t[Symbol.iterator]()).next.bind(n)}var n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){function e(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}t.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:e,changeDefaults:function(e){t.exports.defaults=e}}})),i=(n.defaults,n.getDefaults,n.changeDefaults,/[&<>"']/),o=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,u={"&":"&","<":"<",">":">",'"':""","'":"'"},l=function(t){return u[t]},c=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function f(t){return t.replace(c,(function(t,e){return"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""}))}var h=/(^|[^\[])\^/g,d=/[^\w:]/g,p=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},g=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,b=/^([^:]+:\/*[^/]*)[\s\S]*$/;function y(t,e){m[" "+t]||(g.test(t)?m[" "+t]=t+"/":m[" "+t]=w(t,"/",!0));var r=-1===(t=m[" "+t]).indexOf(":");return"//"===e.substring(0,2)?r?e:t.replace(v,"$1")+e:"/"===e.charAt(0)?r?e:t.replace(b,"$1")+e:t+e}function w(t,e,r){var n=t.length;if(0===n)return"";for(var i=0;i=0&&"\\"===r[i];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(r.length>e)r.splice(e);else for(;r.length1;)1&e&&(r+=t),e>>=1,t+=t;return r+t},P=n.defaults,I=C,R=A,F=_,B=O;function j(t,e,r){var n=e.href,i=e.title?F(e.title):null,o=t[1].replace(/\\([\[\]])/g,"$1");return"!"!==t[0].charAt(0)?{type:"link",raw:r,href:n,title:i,text:o}:{type:"image",raw:r,href:n,title:i,text:F(o)}}var N=function(){function t(t){this.options=t||P}var e=t.prototype;return e.space=function(t){var e=this.rules.block.newline.exec(t);if(e)return e[0].length>1?{type:"space",raw:e[0]}:{raw:"\n"}},e.code=function(t,e){var r=this.rules.block.code.exec(t);if(r){var n=e[e.length-1];if(n&&"paragraph"===n.type)return{raw:r[0],text:r[0].trimRight()};var i=r[0].replace(/^ {4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:I(i,"\n")}}},e.fences=function(t){var e=this.rules.block.fences.exec(t);if(e){var r=e[0],n=function(t,e){var r=t.match(/^(\s+)(?:```)/);if(null===r)return e;var n=r[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:e[0].length>=n.length?t.slice(n.length):t})).join("\n")}(r,e[3]||"");return{type:"code",raw:r,lang:e[2]?e[2].trim():e[2],text:n}}},e.heading=function(t){var e=this.rules.block.heading.exec(t);if(e){var r=e[2].trim();if(/#$/.test(r)){var n=I(r,"#");this.options.pedantic?r=n.trim():n&&!/ $/.test(n)||(r=n.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r}}},e.nptable=function(t){var e=this.rules.block.nptable.exec(t);if(e){var r={type:"table",header:R(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[],raw:e[0]};if(r.header.length===r.align.length){var n,i=r.align.length;for(n=0;n ?/gm,"");return{type:"blockquote",raw:e[0],text:r}}},e.list=function(t){var e=this.rules.block.list.exec(t);if(e){var r,n,i,o,a,s,u,l,c=e[0],f=e[2],h=f.length>1,d={type:"list",raw:c,ordered:h,start:h?+f.slice(0,-1):"",loose:!1,items:[]},p=e[0].match(this.rules.block.item),m=!1,g=p.length;i=this.rules.block.listItemStart.exec(p[0]);for(var v=0;vi[0].length||o[1].length>3){p.splice(v,2,p[v]+"\n"+p[v+1]),v--,g--;continue}(!this.options.pedantic||this.options.smartLists?o[2][o[2].length-1]!==f[f.length-1]:h===(1===o[2].length))&&(a=p.slice(v+1).join("\n"),d.raw=d.raw.substring(0,d.raw.length-a.length),v=g-1),i=o}n=r.length,~(r=r.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(n-=r.length,r=this.options.pedantic?r.replace(/^ {1,4}/gm,""):r.replace(new RegExp("^ {1,"+n+"}","gm"),"")),s=m||/\n\n(?!\s*$)/.test(r),v!==g-1&&(m="\n"===r.charAt(r.length-1),s||(s=m)),s&&(d.loose=!0),this.options.gfm&&(l=void 0,(u=/^\[[ xX]\] /.test(r))&&(l=" "!==r[1],r=r.replace(/^\[[ xX]\] +/,""))),d.items.push({type:"list_item",raw:c,task:u,checked:l,loose:s,text:r})}return d}},e.html=function(t){var e=this.rules.block.html.exec(t);if(e)return{type:this.options.sanitize?"paragraph":"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):F(e[0]):e[0]}},e.def=function(t){var e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}},e.table=function(t){var e=this.rules.block.table.exec(t);if(e){var r={type:"table",header:R(e[1].replace(/^ *| *\| *$/g,"")),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:e[3]?e[3].replace(/\n$/,"").split("\n"):[]};if(r.header.length===r.align.length){r.raw=e[0];var n,i=r.align.length;for(n=0;n/i.test(n[0])&&(e=!1),!r&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?r=!0:r&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(r=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:e,inRawBlock:r,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):F(n[0]):n[0]}},e.link=function(t){var e=this.rules.inline.link.exec(t);if(e){var r=e[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;var n=I(r.slice(0,-1),"\\");if((r.length-n.length)%2===0)return}else{var i=B(e[2],"()");if(i>-1){var o=(0===e[0].indexOf("!")?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,o).trim(),e[3]=""}}var a=e[2],s="";if(this.options.pedantic){var u=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);u&&(a=u[1],s=u[3])}else s=e[3]?e[3].slice(1,-1):"";return a=a.trim(),/^$/.test(r)?a.slice(1):a.slice(1,-1)),j(e,{href:a?a.replace(this.rules.inline._escapes,"$1"):a,title:s?s.replace(this.rules.inline._escapes,"$1"):s},e[0])}},e.reflink=function(t,e){var r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){var n=(r[2]||r[1]).replace(/\s+/g," ");if(!(n=e[n.toLowerCase()])||!n.href){var i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return j(r,n,r[0])}},e.strong=function(t,e,r){void 0===r&&(r="");var n=this.rules.inline.strong.start.exec(t);if(n&&(!n[1]||n[1]&&(""===r||this.rules.inline.punctuation.exec(r)))){e=e.slice(-1*t.length);var i,o="**"===n[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(n=o.exec(e));)if(i=this.rules.inline.strong.middle.exec(e.slice(0,n.index+3)))return{type:"strong",raw:t.slice(0,i[0].length),text:t.slice(2,i[0].length-2)}}},e.em=function(t,e,r){void 0===r&&(r="");var n=this.rules.inline.em.start.exec(t);if(n&&(!n[1]||n[1]&&(""===r||this.rules.inline.punctuation.exec(r)))){e=e.slice(-1*t.length);var i,o="*"===n[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(n=o.exec(e));)if(i=this.rules.inline.em.middle.exec(e.slice(0,n.index+2)))return{type:"em",raw:t.slice(0,i[0].length),text:t.slice(1,i[0].length-1)}}},e.codespan=function(t){var e=this.rules.inline.code.exec(t);if(e){var r=e[2].replace(/\n/g," "),n=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return n&&i&&(r=r.substring(1,r.length-1)),r=F(r,!0),{type:"codespan",raw:e[0],text:r}}},e.br=function(t){var e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}},e.del=function(t){var e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2]}},e.autolink=function(t,e){var r,n,i=this.rules.inline.autolink.exec(t);if(i)return n="@"===i[2]?"mailto:"+(r=F(this.options.mangle?e(i[1]):i[1])):r=F(i[1]),{type:"link",raw:i[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}},e.url=function(t,e){var r;if(r=this.rules.inline.url.exec(t)){var n,i;if("@"===r[2])i="mailto:"+(n=F(this.options.mangle?e(r[0]):r[0]));else{var o;do{o=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0]}while(o!==r[0]);n=F(r[0]),i="www."===r[1]?"http://"+n:n}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}},e.inlineText=function(t,e,r){var n,i=this.rules.inline.text.exec(t);if(i)return n=e?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):F(i[0]):i[0]:F(this.options.smartypants?r(i[0]):i[0]),{type:"text",raw:i[0],text:n}},t}(),L=k,z=M,U=S,H={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:L,table:L,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=z(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,H.item=z(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.listItemStart=z(/^( *)(bull)/).replace("bull",H.bullet).getRegex(),H.list=z(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",H._comment=/|$)/,H.html=z(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=z(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=z(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=U({},H),H.gfm=U({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=z(H.gfm.nptable).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=z(H.gfm.table).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=U({},H.normal,{html:z("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:L,paragraph:z(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var W={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:L,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation*\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation_\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation*\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:L,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};W.punctuation=z(W.punctuation).replace(/punctuation/g,W._punctuation).getRegex(),W._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",W._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",W._comment=z(H._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),W.em.start=z(W.em.start).replace(/punctuation/g,W._punctuation).getRegex(),W.em.middle=z(W.em.middle).replace(/punctuation/g,W._punctuation).replace(/overlapSkip/g,W._overlapSkip).getRegex(),W.em.endAst=z(W.em.endAst,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.em.endUnd=z(W.em.endUnd,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.strong.start=z(W.strong.start).replace(/punctuation/g,W._punctuation).getRegex(),W.strong.middle=z(W.strong.middle).replace(/punctuation/g,W._punctuation).replace(/overlapSkip/g,W._overlapSkip).getRegex(),W.strong.endAst=z(W.strong.endAst,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.strong.endUnd=z(W.strong.endUnd,"g").replace(/punctuation/g,W._punctuation).getRegex(),W.blockSkip=z(W._blockSkip,"g").getRegex(),W.overlapSkip=z(W._overlapSkip,"g").getRegex(),W._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,W._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,W._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,W.autolink=z(W.autolink).replace("scheme",W._scheme).replace("email",W._email).getRegex(),W._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,W.tag=z(W.tag).replace("comment",W._comment).replace("attribute",W._attribute).getRegex(),W._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,W._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,W._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,W.link=z(W.link).replace("label",W._label).replace("href",W._href).replace("title",W._title).getRegex(),W.reflink=z(W.reflink).replace("label",W._label).getRegex(),W.reflinkSearch=z(W.reflinkSearch,"g").replace("reflink",W.reflink).replace("nolink",W.nolink).getRegex(),W.normal=U({},W),W.pedantic=U({},W.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:z(/^!?\[(label)\]\((.*?)\)/).replace("label",W._label).getRegex(),reflink:z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",W._label).getRegex()}),W.gfm=U({},W.normal,{escape:z(W.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(r="x"+r.toString(16)),n+="&#"+r+";";return n}var X=function(){function e(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||G,this.options.tokenizer=this.options.tokenizer||new N,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var e={block:V.normal,inline:Y.normal};this.options.pedantic?(e.block=V.pedantic,e.inline=Y.pedantic):this.options.gfm&&(e.block=V.gfm,this.options.breaks?e.inline=Y.breaks:e.inline=Y.gfm),this.tokenizer.rules=e}e.lex=function(t,r){return new e(r).lex(t)},e.lexInline=function(t,r){return new e(r).inlineTokens(t)};var r,n,i,o=e.prototype;return o.lex=function(t){return t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens,!0),this.inline(this.tokens),this.tokens},o.blockTokens=function(t,e,r){var n,i,o,a;for(void 0===e&&(e=[]),void 0===r&&(r=!0),t=t.replace(/^ +$/gm,"");t;)if(n=this.tokenizer.space(t))t=t.substring(n.raw.length),n.type&&e.push(n);else if(n=this.tokenizer.code(t,e))t=t.substring(n.raw.length),n.type?e.push(n):((a=e[e.length-1]).raw+="\n"+n.raw,a.text+="\n"+n.text);else if(n=this.tokenizer.fences(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.heading(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.nptable(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.hr(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.blockquote(t))t=t.substring(n.raw.length),n.tokens=this.blockTokens(n.text,[],r),e.push(n);else if(n=this.tokenizer.list(t)){for(t=t.substring(n.raw.length),o=n.items.length,i=0;i0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(u));)l.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(u=u.slice(0,o.index)+"["+Z("a",o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(u));)u=u.slice(0,o.index)+"["+Z("a",o[0].length-2)+"]"+u.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;t;)if(a||(s=""),a=!1,i=this.tokenizer.escape(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.tag(t,r,n))t=t.substring(i.raw.length),r=i.inLink,n=i.inRawBlock,e.push(i);else if(i=this.tokenizer.link(t))t=t.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,n)),e.push(i);else if(i=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(i.raw.length),"link"===i.type&&(i.tokens=this.inlineTokens(i.text,[],!0,n)),e.push(i);else if(i=this.tokenizer.strong(t,u,s))t=t.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],r,n),e.push(i);else if(i=this.tokenizer.em(t,u,s))t=t.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],r,n),e.push(i);else if(i=this.tokenizer.codespan(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.br(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.del(t))t=t.substring(i.raw.length),i.tokens=this.inlineTokens(i.text,[],r,n),e.push(i);else if(i=this.tokenizer.autolink(t,$))t=t.substring(i.raw.length),e.push(i);else if(r||!(i=this.tokenizer.url(t,$))){if(i=this.tokenizer.inlineText(t,n,K))t=t.substring(i.raw.length),s=i.raw.slice(-1),a=!0,e.push(i);else if(t){var c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else t=t.substring(i.raw.length),e.push(i);return e},r=e,i=[{key:"rules",get:function(){return{block:V,inline:Y}}}],(n=null)&&t(r.prototype,n),i&&t(r,i),e}(),J=n.defaults,Q=E,tt=_,et=function(){function t(t){this.options=t||J}var e=t.prototype;return e.code=function(t,e,r){var n=(e||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(t,n);null!=i&&i!==t&&(r=!0,t=i)}return n?'
'+(r?t:tt(t,!0))+"
\n":"
"+(r?t:tt(t,!0))+"
\n"},e.blockquote=function(t){return"
\n"+t+"
\n"},e.html=function(t){return t},e.heading=function(t,e,r,n){return this.options.headerIds?"'+t+"\n":""+t+"\n"},e.hr=function(){return this.options.xhtml?"
\n":"
\n"},e.list=function(t,e,r){var n=e?"ol":"ul";return"<"+n+(e&&1!==r?' start="'+r+'"':"")+">\n"+t+"\n"},e.listitem=function(t){return"
  • "+t+"
  • \n"},e.checkbox=function(t){return" "},e.paragraph=function(t){return"

    "+t+"

    \n"},e.table=function(t,e){return e&&(e=""+e+""),"\n\n"+t+"\n"+e+"
    \n"},e.tablerow=function(t){return"\n"+t+"\n"},e.tablecell=function(t,e){var r=e.header?"th":"td";return(e.align?"<"+r+' align="'+e.align+'">':"<"+r+">")+t+"\n"},e.strong=function(t){return""+t+""},e.em=function(t){return""+t+""},e.codespan=function(t){return""+t+""},e.br=function(){return this.options.xhtml?"
    ":"
    "},e.del=function(t){return""+t+""},e.link=function(t,e,r){if(null===(t=Q(this.options.sanitize,this.options.baseUrl,t)))return r;var n='"},e.image=function(t,e,r){if(null===(t=Q(this.options.sanitize,this.options.baseUrl,t)))return r;var n=''+r+'":">"},e.text=function(t){return t},t}(),rt=function(){function t(){}var e=t.prototype;return e.strong=function(t){return t},e.em=function(t){return t},e.codespan=function(t){return t},e.del=function(t){return t},e.html=function(t){return t},e.text=function(t){return t},e.link=function(t,e,r){return""+r},e.image=function(t,e,r){return""+r},e.br=function(){return""},t}(),nt=function(){function t(){this.seen={}}var e=t.prototype;return e.serialize=function(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},e.getNextSafeSlug=function(t,e){var r=t,n=0;if(this.seen.hasOwnProperty(r)){n=this.seen[t];do{r=t+"-"+ ++n}while(this.seen.hasOwnProperty(r))}return e||(this.seen[t]=n,this.seen[r]=0),r},e.slug=function(t,e){void 0===e&&(e={});var r=this.serialize(t);return this.getNextSafeSlug(r,e.dryrun)},t}(),it=n.defaults,ot=x,at=function(){function t(t){this.options=t||it,this.options.renderer=this.options.renderer||new et,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new rt,this.slugger=new nt}t.parse=function(e,r){return new t(r).parse(e)},t.parseInline=function(e,r){return new t(r).parseInline(e)};var e=t.prototype;return e.parse=function(t,e){void 0===e&&(e=!0);var r,n,i,o,a,s,u,l,c,f,h,d,p,m,g,v,b,y,w="",_=t.length;for(r=0;r<_;r++)switch((f=t[r]).type){case"space":continue;case"hr":w+=this.renderer.hr();continue;case"heading":w+=this.renderer.heading(this.parseInline(f.tokens),f.depth,ot(this.parseInline(f.tokens,this.textRenderer)),this.slugger);continue;case"code":w+=this.renderer.code(f.text,f.lang,f.escaped);continue;case"table":for(l="",u="",o=f.header.length,n=0;n0&&"text"===g.tokens[0].type?(g.tokens[0].text=y+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=y+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:y}):m+=y),m+=this.parse(g.tokens,p),c+=this.renderer.listitem(m,b,v);w+=this.renderer.list(c,h,d);continue;case"html":w+=this.renderer.html(f.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(f.tokens));continue;case"text":for(c=f.tokens?this.parseInline(f.tokens):f.text;r+1<_&&"text"===t[r+1].type;)c+="\n"+((f=t[++r]).tokens?this.parseInline(f.tokens):f.text);w+=e?this.renderer.paragraph(c):c;continue;default:var x='Token with "'+f.type+'" type was not found.';if(this.options.silent)return void console.error(x);throw new Error(x)}return w},e.parseInline=function(t,e){e=e||this.renderer;var r,n,i="",o=t.length;for(r=0;rAn error occurred:

    "+lt(u.message+"",!0)+"
    ";throw u}}return dt.options=dt.setOptions=function(t){return st(dt.defaults,t),ft(dt.defaults),dt},dt.getDefaults=ct,dt.defaults=ht,dt.use=function(t){var e=st({},t);if(t.renderer&&function(){var r=dt.defaults.renderer||new et,n=function(e){var n=r[e];r[e]=function(){for(var i=arguments.length,o=new Array(i),a=0;aAn error occurred:

    "+lt(n.message+"",!0)+"
    ";throw n}},dt.Parser=at,dt.parser=at.parse,dt.Renderer=et,dt.TextRenderer=rt,dt.Lexer=X,dt.lexer=X.lex,dt.Tokenizer=N,dt.Slugger=nt,dt.parse=dt,dt}()},function(t,e,r){var n;"undefined"!==typeof self&&self,n=function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=7)}([function(t,e,r){"use strict";t.exports=function(t,e,r,n,i,o,a,s){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,i,o,a,s],c=0;(u=new Error(e.replace(/%s/g,(function(){return l[c++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(t,e,r){"use strict";function n(t){return function(){return t}}var i=function(){};i.thatReturns=n,i.thatReturnsFalse=n(!1),i.thatReturnsTrue=n(!0),i.thatReturnsNull=n(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t},t.exports=i},function(t,e,r){"use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(i){return!1}}()?Object.assign:function(t,e){for(var r,s,u=a(t),l=1;l0},f(n,r)}return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),i(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.delay;this.state.delayed&&(this.timeout=setTimeout((function(){t.setState({delayed:!1})}),e))}},{key:"componentWillUnmount",value:function(){var t=this.timeout;t&&clearTimeout(t)}},{key:"render",value:function(){var t=this.props,e=t.color,r=(t.delay,t.type),i=t.height,o=t.width,s=function(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}(t,["color","delay","type","height","width"]),l=this.state.delayed?"blank":r,c=u[l],f={fill:e,height:i,width:o};return a.default.createElement("div",n({style:f,dangerouslySetInnerHTML:{__html:c}},s))}}]),e}(o.Component);h.propTypes={color:s.default.string,delay:s.default.number,type:s.default.string,height:s.default.oneOfType([s.default.string,s.default.number]),width:s.default.oneOfType([s.default.string,s.default.number])},h.defaultProps={color:"#fff",delay:0,type:"balls",height:64,width:64},e.default=h},function(t,e,r){"use strict";t.exports=r(9)},function(t,e,r){"use strict";var n=r(2),i=r(0),o=r(5),a=r(1),s="function"===typeof Symbol&&Symbol.for,u=s?Symbol.for("react.element"):60103,l=s?Symbol.for("react.portal"):60106,c=s?Symbol.for("react.fragment"):60107,f=s?Symbol.for("react.strict_mode"):60108,h=s?Symbol.for("react.provider"):60109,d=s?Symbol.for("react.context"):60110,p=s?Symbol.for("react.async_mode"):60111,m=s?Symbol.for("react.forward_ref"):60112,g="function"===typeof Symbol&&Symbol.iterator;function v(t){for(var e=arguments.length-1,r="http://reactjs.org/docs/error-decoder.html?invariant="+t,n=0;nO.length&&O.push(t)}function P(t,e,r,n){var i=typeof t;"undefined"!==i&&"boolean"!==i||(t=null);var o=!1;if(null===t)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case u:case l:o=!0}}if(o)return r(n,t,""===e?"."+I(t,0):e),1;if(o=0,e=""===e?".":e+":",Array.isArray(t))for(var a=0;a>";return new c("Invalid "+i+" `"+o+"` of type `"+(((s=e[r]).constructor&&s.constructor.name?s.constructor.name:"<>")+"` supplied to `")+n+"`, expected instance of `"+a+"`.")}var s;return null}))},node:f((function(t,e,r,n,i){return d(t[e])?null:new c("Invalid "+n+" `"+i+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(t){return f((function(e,r,n,i,o){if("function"!==typeof t)return new c("Property `"+o+"` of component `"+n+"` has invalid PropType notation inside objectOf.");var a=e[r],u=p(a);if("object"!==u)return new c("Invalid "+i+" `"+o+"` of type `"+u+"` supplied to `"+n+"`, expected an object.");for(var l in a)if(a.hasOwnProperty(l)){var f=t(a,l,n,i,o+"."+l,s);if(f instanceof Error)return f}return null}))},oneOf:function(t){return Array.isArray(t)?f((function(e,r,n,i,o){for(var a=e[r],s=0;s>",l=l||o,f!==s&&e&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"),null==n[o]?r?null===n[o]?new c("The "+u+" `"+l+"` is marked as required in `"+a+"`, but its value is `null`."):new c("The "+u+" `"+l+"` is marked as required in `"+a+"`, but its value is `undefined`."):null:t(n,o,a,u,l)}var n=r.bind(null,!1);return n.isRequired=r.bind(null,!0),n}function h(t){return f((function(e,r,n,i,o,a){var s=e[r];return p(s)!==t?new c("Invalid "+i+" `"+o+"` of type `"+m(s)+"` supplied to `"+n+"`, expected `"+t+"`."):null}))}function d(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(d);if(null===e||t(e))return!0;var n=function(t){var e=t&&(r&&t[r]||t["@@iterator"]);if("function"===typeof e)return e}(e);if(!n)return!1;var i,o=n.call(e);if(n!==e.entries){for(;!(i=o.next()).done;)if(!d(i.value))return!1}else for(;!(i=o.next()).done;){var a=i.value;if(a&&!d(a[1]))return!1}return!0;default:return!1}}function p(t){var e=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":function(t,e){return"symbol"===t||"Symbol"===e["@@toStringTag"]||"function"===typeof Symbol&&e instanceof Symbol}(e,t)?"symbol":e}function m(t){if("undefined"===typeof t||null===t)return""+t;var e=p(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function g(t){var e=m(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}return c.prototype=Error.prototype,l.checkPropTypes=u,l.PropTypes=l,l}},function(t,e,r){"use strict";var n=r(1),i=r(0),o=r(4);t.exports=function(){function t(t,e,r,n,a,s){s!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return r.checkPropTypes=n,r.PropTypes=r,r}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(15);Object.defineProperty(e,"blank",{enumerable:!0,get:function(){return h(n).default}});var i=r(16);Object.defineProperty(e,"balls",{enumerable:!0,get:function(){return h(i).default}});var o=r(17);Object.defineProperty(e,"bars",{enumerable:!0,get:function(){return h(o).default}});var a=r(18);Object.defineProperty(e,"bubbles",{enumerable:!0,get:function(){return h(a).default}});var s=r(19);Object.defineProperty(e,"cubes",{enumerable:!0,get:function(){return h(s).default}});var u=r(20);Object.defineProperty(e,"cylon",{enumerable:!0,get:function(){return h(u).default}});var l=r(21);Object.defineProperty(e,"spin",{enumerable:!0,get:function(){return h(l).default}});var c=r(22);Object.defineProperty(e,"spinningBubbles",{enumerable:!0,get:function(){return h(c).default}});var f=r(23);function h(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"spokes",{enumerable:!0,get:function(){return h(f).default}})},function(t,e){t.exports='\n'},function(t,e){t.exports='\n \n \n \n \n \n \n \n \n \n \n \n \n\n'},function(t,e){t.exports='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n'},function(t,e){t.exports='\n \n \n \n \n \n \n \n \n \n\n'},function(t,e){t.exports='\n \n \n \n \n \n \n \n \n \n \n \n \n\n'},function(t,e){t.exports='\n \n \n \n \n \n \n \n \n \n\n'},function(t,e){t.exports='\n \n \n \n \n\n'},function(t,e){t.exports='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n'},function(t,e){t.exports='\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n'}])},t.exports=n()},function(t,e,r){"use strict";var n=r(84);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function r(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n.a),r}i.Cache=n.a;var o=i;var a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,u=function(t){var e=o(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(a,(function(t,r,n,i){e.push(n?i.replace(s,"$1"):r||t)})),e}));e.a=u},function(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r-1?n:o.nextTick;b.WritableState=v;var l=Object.create(r(50));l.inherits=r(13);var c={deprecate:r(153)},f=r(211),h=r(14).Buffer,d=i.Uint8Array||function(){};var p,m=r(212);function g(){}function v(t,e){s=s||r(78),t=t||{};var n=e instanceof s;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,l=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(l||0===l)?l:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(E,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),E(t,e))}(t,r,n,e,i);else{var a=x(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(t,r),n?u(w,t,r,a,i):w(t,r,a,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(t){if(s=s||r(78),!p.call(b,this)&&!(this instanceof s))return new b(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),f.call(this)}function y(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),E(t,e)}function _(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,y(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,f=r.callback;if(y(t,e,!1,e.objectMode?1:l.length,l,c,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function x(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function M(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),E(t,e)}))}function E(t,e){var r=x(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"===typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(M,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}l.inherits(b,f),v.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===b&&(t&&t._writableState instanceof v)}})):p=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(t,e,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=t,h.isBuffer(n)||n instanceof d);return s&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"===typeof e&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!==typeof r&&(r=g),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"===typeof r||void 0===r||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(n,a),i=!1),i}(this,i,t,r))&&(i.pendingcb++,a=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=h.from(e,r));return e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(t,e,r){var n=this._writableState;"function"===typeof t?(r=t,t=null,e=null):"function"===typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,E(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=m.destroy,b.prototype._undestroy=m.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(18),r(152).setImmediate,r(20))},function(t,e,r){(function(t){var n="undefined"!==typeof t&&t||"undefined"!==typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(365),e.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(20))},function(t,e,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(n){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,r(20))},function(t,e,r){"use strict";var n=r(13),i=r(215),o=r(14).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<>>32-e}function l(t,e,r,n,i,o,a){return u(t+(e&r|~e&n)+i+o|0,a)+e|0}function c(t,e,r,n,i,o,a){return u(t+(e&n|r&~n)+i+o|0,a)+e|0}function f(t,e,r,n,i,o,a){return u(t+(e^r^n)+i+o|0,a)+e|0}function h(t,e,r,n,i,o,a){return u(t+(r^(e|~n))+i+o|0,a)+e|0}n(s,i),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=l(r,n,i,o,t[0],3614090360,7),o=l(o,r,n,i,t[1],3905402710,12),i=l(i,o,r,n,t[2],606105819,17),n=l(n,i,o,r,t[3],3250441966,22),r=l(r,n,i,o,t[4],4118548399,7),o=l(o,r,n,i,t[5],1200080426,12),i=l(i,o,r,n,t[6],2821735955,17),n=l(n,i,o,r,t[7],4249261313,22),r=l(r,n,i,o,t[8],1770035416,7),o=l(o,r,n,i,t[9],2336552879,12),i=l(i,o,r,n,t[10],4294925233,17),n=l(n,i,o,r,t[11],2304563134,22),r=l(r,n,i,o,t[12],1804603682,7),o=l(o,r,n,i,t[13],4254626195,12),i=l(i,o,r,n,t[14],2792965006,17),r=c(r,n=l(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=c(o,r,n,i,t[6],3225465664,9),i=c(i,o,r,n,t[11],643717713,14),n=c(n,i,o,r,t[0],3921069994,20),r=c(r,n,i,o,t[5],3593408605,5),o=c(o,r,n,i,t[10],38016083,9),i=c(i,o,r,n,t[15],3634488961,14),n=c(n,i,o,r,t[4],3889429448,20),r=c(r,n,i,o,t[9],568446438,5),o=c(o,r,n,i,t[14],3275163606,9),i=c(i,o,r,n,t[3],4107603335,14),n=c(n,i,o,r,t[8],1163531501,20),r=c(r,n,i,o,t[13],2850285829,5),o=c(o,r,n,i,t[2],4243563512,9),i=c(i,o,r,n,t[7],1735328473,14),r=f(r,n=c(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=f(o,r,n,i,t[8],2272392833,11),i=f(i,o,r,n,t[11],1839030562,16),n=f(n,i,o,r,t[14],4259657740,23),r=f(r,n,i,o,t[1],2763975236,4),o=f(o,r,n,i,t[4],1272893353,11),i=f(i,o,r,n,t[7],4139469664,16),n=f(n,i,o,r,t[10],3200236656,23),r=f(r,n,i,o,t[13],681279174,4),o=f(o,r,n,i,t[0],3936430074,11),i=f(i,o,r,n,t[3],3572445317,16),n=f(n,i,o,r,t[6],76029189,23),r=f(r,n,i,o,t[9],3654602809,4),o=f(o,r,n,i,t[12],3873151461,11),i=f(i,o,r,n,t[15],530742520,16),r=h(r,n=f(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=h(o,r,n,i,t[7],1126891415,10),i=h(i,o,r,n,t[14],2878612391,15),n=h(n,i,o,r,t[5],4237533241,21),r=h(r,n,i,o,t[12],1700485571,6),o=h(o,r,n,i,t[3],2399980690,10),i=h(i,o,r,n,t[10],4293915773,15),n=h(n,i,o,r,t[1],2240044497,21),r=h(r,n,i,o,t[8],1873313359,6),o=h(o,r,n,i,t[15],4264355552,10),i=h(i,o,r,n,t[6],2734768916,15),n=h(n,i,o,r,t[13],1309151649,21),r=h(r,n,i,o,t[4],4149444226,6),o=h(o,r,n,i,t[11],3174756917,10),i=h(i,o,r,n,t[2],718787259,15),n=h(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},function(t,e,r){"use strict";var n=r(87).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"===typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i>>32-e}function m(t,e,r,n,i,o,a,s){return p(t+(e^r^n)+o+a|0,s)+i|0}function g(t,e,r,n,i,o,a,s){return p(t+(e&r|~e&n)+o+a|0,s)+i|0}function v(t,e,r,n,i,o,a,s){return p(t+((e|~r)^n)+o+a|0,s)+i|0}function b(t,e,r,n,i,o,a,s){return p(t+(e&n|r&~n)+o+a|0,s)+i|0}function y(t,e,r,n,i,o,a,s){return p(t+(e^(r|~n))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,x=0|this._c,M=0|this._d,E=0|this._e,k=0;k<80;k+=1){var S,A;k<16?(S=m(r,n,i,o,d,t[s[k]],f[0],l[k]),A=y(w,_,x,M,E,t[u[k]],h[0],c[k])):k<32?(S=g(r,n,i,o,d,t[s[k]],f[1],l[k]),A=b(w,_,x,M,E,t[u[k]],h[1],c[k])):k<48?(S=v(r,n,i,o,d,t[s[k]],f[2],l[k]),A=v(w,_,x,M,E,t[u[k]],h[2],c[k])):k<64?(S=b(r,n,i,o,d,t[s[k]],f[3],l[k]),A=g(w,_,x,M,E,t[u[k]],h[3],c[k])):(S=y(r,n,i,o,d,t[s[k]],f[4],l[k]),A=m(w,_,x,M,E,t[u[k]],h[4],c[k])),r=d,d=o,o=p(i,10),i=n,n=S,w=E,E=M,M=p(x,10),x=_,_=A}var C=this._b+i+M|0;this._b=this._c+o+E|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+n+x|0,this._a=C},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(384),e.sha1=r(385),e.sha224=r(386),e.sha256=r(223),e.sha384=r(387),e.sha512=r(224)},function(t,e,r){"use strict";var n=r(41);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function a(t,r){var i=function(t){var e=o(t);return{blinder:e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(r),a=r.modulus.byteLength(),s=new n(t).mul(i.blinder).umod(r.modulus),u=s.toRed(n.mont(r.prime1)),l=s.toRed(n.mont(r.prime2)),c=r.coefficient,f=r.prime1,h=r.prime2,d=u.redPow(r.exponent1).fromRed(),p=l.redPow(r.exponent2).fromRed(),m=d.isub(p).imul(c).umod(f).imul(h);return p.iadd(m).imul(i.unblinder).umod(r.modulus).toArrayLike(e,"be",a)}a.getr=o,t.exports=a}).call(this,r(5).Buffer)},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(415).Buffer}catch(A){}function s(t,e,r){for(var i=0,o=Math.min(t.length,r),a=0,s=e;s=49&&l<=54?l-49+10:l>=17&&l<=22?l-17+10:l,a|=u}return n(!(240&a),"Invalid character in "+t),i}function u(t,e,r,i){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?l-49+10:l>=17?l-17+10:l,n(l>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,l=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=c}catch(A){o.prototype.inspect=c}else o.prototype.inspect=c;function c(){return(this.red?""}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var l=h[t],c=d[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(c).toString(t);r=(p=p.idivn(c)).isZero()?m+r:f[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,f=67108863&u,h=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=h;d++){var p=l-d|0;c+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,x=0|a[4],M=8191&x,E=x>>>13,k=0|a[5],S=8191&k,A=k>>>13,C=0|a[6],O=8191&C,T=C>>>13,D=0|a[7],P=8191&D,I=D>>>13,R=0|a[8],F=8191&R,B=R>>>13,j=0|a[9],N=8191&j,L=j>>>13,z=0|s[0],U=8191&z,H=z>>>13,W=0|s[1],q=8191&W,G=W>>>13,V=0|s[2],Y=8191&V,Z=V>>>13,K=0|s[3],$=8191&K,X=K>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,ct=0|s[8],ft=8191&ct,ht=ct>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(l+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(h,U)|0))<<13)|0;l=((o=Math.imul(h,H))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,H))+Math.imul(m,U)|0,o=Math.imul(m,H);var vt=(l+(n=n+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,q)|0))<<13)|0;l=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,H))+Math.imul(b,U)|0,o=Math.imul(b,H),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,G)|0;var bt=(l+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,Y)|0))<<13)|0;l=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,H))+Math.imul(_,U)|0,o=Math.imul(_,H),n=n+Math.imul(v,q)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(l+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,$)|0))<<13)|0;l=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,H))+Math.imul(E,U)|0,o=Math.imul(E,H),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,X)|0;var wt=(l+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,Q)|0))<<13)|0;l=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(S,U),i=(i=Math.imul(S,H))+Math.imul(A,U)|0,o=Math.imul(A,H),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;l=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,H))+Math.imul(T,U)|0,o=Math.imul(T,H),n=n+Math.imul(S,q)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var xt=(l+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;l=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,H))+Math.imul(I,U)|0,o=Math.imul(I,H),n=n+Math.imul(O,q)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(l+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(h,ut)|0))<<13)|0;l=((o=o+Math.imul(h,lt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,H))+Math.imul(B,U)|0,o=Math.imul(B,H),n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var Et=(l+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;l=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,H))+Math.imul(L,U)|0,o=Math.imul(L,H),n=n+Math.imul(F,q)|0,i=(i=i+Math.imul(F,G)|0)+Math.imul(B,q)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,lt)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ht)|0;var kt=(l+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,pt)|0))<<13)|0;l=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,G))+Math.imul(L,q)|0,o=Math.imul(L,G),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var St=(l+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,Y),i=(i=Math.imul(N,Z))+Math.imul(L,Y)|0,o=Math.imul(L,Z),n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,lt)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ht)|0;var At=(l+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;l=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,$),i=(i=Math.imul(N,X))+Math.imul(L,$)|0,o=Math.imul(L,X),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,lt)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,ht)|0;var Ct=(l+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,lt)|0,n=n+Math.imul(S,ft)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,ht)|0;var Ot=(l+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(E,pt)|0))<<13)|0;l=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(L,rt)|0,o=Math.imul(L,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,lt)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(T,ft)|0,o=o+Math.imul(T,ht)|0;var Tt=(l+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(A,pt)|0))<<13)|0;l=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,at))+Math.imul(L,ot)|0,o=Math.imul(L,at),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,lt)|0,n=n+Math.imul(P,ft)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var Dt=(l+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;l=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,lt))+Math.imul(L,ut)|0,o=Math.imul(L,lt),n=n+Math.imul(F,ft)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Pt=(l+(n=n+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(I,pt)|0))<<13)|0;l=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(N,ft),i=(i=Math.imul(N,ht))+Math.imul(L,ft)|0,o=Math.imul(L,ht);var It=(l+(n=n+Math.imul(F,pt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(B,pt)|0))<<13)|0;l=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(l+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,mt))+Math.imul(L,pt)|0))<<13)|0;return l=((o=Math.imul(L,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=gt,u[1]=vt,u[2]=bt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=xt,u[7]=Mt,u[8]=Et,u[9]=kt,u[10]=St,u[11]=At,u[12]=Ct,u[13]=Ot,u[14]=Tt,u[15]=Dt,u[16]=Pt,u[17]=It,u[18]=Rt,0!==l&&(u[19]=l,r.length++),r};function g(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function v(t,e,r){return g(t,e,r)}function b(t,e){this.x=t,this.y=e}Math.imul||(m=p),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?p(this,t,e):r<1024?g(this,t,e):v(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},b.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[i]=67108863&a}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(l)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0===(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new x;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new E}return y[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(l(t,t.umod(this.m)._forceRed(this)),t)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var l=e.words[n],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,k),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(53)(t))},function(t,e,r){"use strict";var n=e;n.version=r(416).version,n.utils=r(42),n.rand=r(161),n.curve=r(244),n.curves=r(166),n.ec=r(428),n.eddsa=r(432)},function(t,e,r){"use strict";var n,i=e,o=r(167),a=r(244),s=r(42).assert;function u(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,l("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),l("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),l("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(427)}catch(c){n=void 0}l("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},function(t,e,r){var n=e;n.utils=r(51),n.common=r(109),n.sha=r(421),n.ripemd=r(425),n.hmac=r(426),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},function(t,e,r){"use strict";(function(e){var n,i=r(5),o=i.Buffer,a={};for(n in i)i.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(a[n]=i[n]);var s=a.Buffer={};for(n in o)o.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(s[n]=o[n]);if(a.Buffer.prototype=o.prototype,s.from&&s.from!==Uint8Array.from||(s.from=function(t,e,r){if("number"===typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&"undefined"===typeof t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return o(t,e,r)}),s.alloc||(s.alloc=function(t,e,r){if("number"!==typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var n=o(t);return e&&0!==e.length?"string"===typeof r?n.fill(e,r):n.fill(e):n.fill(0),n}),!a.kStringMaxLength)try{a.kStringMaxLength=e.binding("buffer").kStringMaxLength}catch(u){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),t.exports=a}).call(this,r(18))},function(t,e,r){"use strict";var n=r(170).Reporter,i=r(110).EncoderBuffer,o=r(110).DecoderBuffer,a=r(41),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function l(t,e,r){var n={};this._baseState=n,n.name=r,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}t.exports=l;var c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){var t=this._baseState,e={};c.forEach((function(r){e[r]=t[r]}));var r=new this.constructor(e.parent);return r._baseState=e,r},l.prototype._wrap=function(){var t=this._baseState;u.forEach((function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},l.prototype._init=function(t){var e=this._baseState;a(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),a.equal(e.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(t){var e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(a(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(a(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!==typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);var n=t[r];e[n]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){l.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),s.forEach((function(t){l.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===e.tag),e.tag=t,this._useArgs(r),this}})),l.prototype.use=function(t){a(t);var e=this._baseState;return a(null===e.use),e.use=t,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(t){var e=this._baseState;return a(null===e.default),e.default=t,e.optional=!0,this},l.prototype.explicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.explicit=t,this},l.prototype.implicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.implicit=t,this},l.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},l.prototype.key=function(t){var e=this._baseState;return a(null===e.key),e.key=t,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(t){var e=this._baseState;return a(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},l.prototype.contains=function(t){var e=this._baseState;return a(null===e.use),e.contains=t,this},l.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var n,i=r.default,a=!0,s=null;if(null!==r.key&&(s=t.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(a=this._peekTag(t,u,r.any),t.isError(a))return a}else{var l=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),a=!0}catch(m){a=!1}t.restore(l)}}if(r.obj&&a&&(n=t.enterObject()),a){if(null!==r.explicit){var c=this._decodeTag(t,r.explicit);if(t.isError(c))return c;t=c}var f=t.offset;if(null===r.use&&null===r.choice){var h;r.any&&(h=t.save());var d=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(d))return d;r.any?i=t.raw(h):t=d}if(e&&e.track&&null!==r.tag&&e.track(t.path(),f,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(p,e)}}return r.obj&&a&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==a?null!==s&&t.exitKey(s):t.leaveKey(s,r.key,i),i},l.prototype._decodeGeneric=function(t,e,r){var n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},l.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},l.prototype._decodeChoice=function(t,e){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var a=t.save(),s=r.choice[o];try{var u=s._decode(t,e);if(t.isError(u))return!1;n={type:o,value:u},i=!0}catch(l){return t.restore(a),!1}return!0}),this),i?n:t.error("Choice not matched")},l.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},l.prototype._encode=function(t,e,r){var n=this._baseState;if(null===n.default||n.default!==t){var i=this._encodeValue(t,e,r);if(void 0!==i&&!this._skipDefault(i,e,r))return i}},l.prototype._encodeValue=function(t,e,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);var o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var a=null,s=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)a=this._getUse(i.contains,r)._encode(t,e),s=!0;else if(i.children)a=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");var n=e.enterKey(r._baseState.key);if("object"!==typeof t)return e.error("Child expected, but input is not object");var i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i}),this).filter((function(t){return t})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,a=this._createEncoderBuffer(t.map((function(r){var n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)}),u))}else null!==i.use?o=this._getUse(i.use,r)._encode(t,e):(a=this._encodePrimitive(i.tag,t),s=!0);if(!i.any&&null===i.choice){var l=null!==i.implicit?i.implicit:i.tag,c=null===i.implicit?"universal":"context";null===l?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(l,s,c,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},l.prototype._encodeChoice=function(t,e){var r=this._baseState,n=r.choice[t.type];return n||a(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},l.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},l.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},l.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},function(t,e,r){"use strict";var n=r(13);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.Reporter=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){var n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){var e,r=this._reporterState,n=t instanceof o;if(e=n?t:new o(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(t,e,r){"use strict";function n(t){var e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=n(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=n(e.tag)},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(451).Buffer}catch(E){}function s(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,l=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,f=67108863&u,h=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=h;d++){var p=l-d|0;c+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=c[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:l[h-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,l=new t(o),c=this.clone();if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,x=0|a[4],M=8191&x,E=x>>>13,k=0|a[5],S=8191&k,A=k>>>13,C=0|a[6],O=8191&C,T=C>>>13,D=0|a[7],P=8191&D,I=D>>>13,R=0|a[8],F=8191&R,B=R>>>13,j=0|a[9],N=8191&j,L=j>>>13,z=0|s[0],U=8191&z,H=z>>>13,W=0|s[1],q=8191&W,G=W>>>13,V=0|s[2],Y=8191&V,Z=V>>>13,K=0|s[3],$=8191&K,X=K>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,ct=0|s[8],ft=8191&ct,ht=ct>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(l+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(h,U)|0))<<13)|0;l=((o=Math.imul(h,H))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,H))+Math.imul(m,U)|0,o=Math.imul(m,H);var vt=(l+(n=n+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,q)|0))<<13)|0;l=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,H))+Math.imul(b,U)|0,o=Math.imul(b,H),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,G)|0;var bt=(l+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,Y)|0))<<13)|0;l=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,H))+Math.imul(_,U)|0,o=Math.imul(_,H),n=n+Math.imul(v,q)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(l+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,$)|0))<<13)|0;l=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,H))+Math.imul(E,U)|0,o=Math.imul(E,H),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,X)|0;var wt=(l+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,Q)|0))<<13)|0;l=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(S,U),i=(i=Math.imul(S,H))+Math.imul(A,U)|0,o=Math.imul(A,H),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;l=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,H))+Math.imul(T,U)|0,o=Math.imul(T,H),n=n+Math.imul(S,q)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var xt=(l+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;l=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,H))+Math.imul(I,U)|0,o=Math.imul(I,H),n=n+Math.imul(O,q)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(l+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(h,ut)|0))<<13)|0;l=((o=o+Math.imul(h,lt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,H))+Math.imul(B,U)|0,o=Math.imul(B,H),n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var Et=(l+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;l=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,H))+Math.imul(L,U)|0,o=Math.imul(L,H),n=n+Math.imul(F,q)|0,i=(i=i+Math.imul(F,G)|0)+Math.imul(B,q)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,lt)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ht)|0;var kt=(l+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,pt)|0))<<13)|0;l=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,G))+Math.imul(L,q)|0,o=Math.imul(L,G),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var St=(l+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,Y),i=(i=Math.imul(N,Z))+Math.imul(L,Y)|0,o=Math.imul(L,Z),n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,lt)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ht)|0;var At=(l+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;l=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,$),i=(i=Math.imul(N,X))+Math.imul(L,$)|0,o=Math.imul(L,X),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,lt)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,ht)|0;var Ct=(l+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,lt)|0,n=n+Math.imul(S,ft)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,ht)|0;var Ot=(l+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(E,pt)|0))<<13)|0;l=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(L,rt)|0,o=Math.imul(L,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,lt)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(T,ft)|0,o=o+Math.imul(T,ht)|0;var Tt=(l+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(A,pt)|0))<<13)|0;l=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,at))+Math.imul(L,ot)|0,o=Math.imul(L,at),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,lt)|0,n=n+Math.imul(P,ft)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var Dt=(l+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;l=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,lt))+Math.imul(L,ut)|0,o=Math.imul(L,lt),n=n+Math.imul(F,ft)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Pt=(l+(n=n+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(I,pt)|0))<<13)|0;l=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(N,ft),i=(i=Math.imul(N,ht))+Math.imul(L,ft)|0,o=Math.imul(L,ht);var It=(l+(n=n+Math.imul(F,pt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(B,pt)|0))<<13)|0;l=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(l+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,mt))+Math.imul(L,pt)|0))<<13)|0;return l=((o=Math.imul(L,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=gt,u[1]=vt,u[2]=bt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=xt,u[7]=Mt,u[8]=Et,u[9]=kt,u[10]=St,u[11]=At,u[12]=Ct,u[13]=Ot,u[14]=Tt,u[15]=Dt,u[16]=Pt,u[17]=It,u[18]=Rt,0!==l&&(u[19]=l,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?h(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(l)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0===(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(b,v),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var l=e.words[n],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,x),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(53)(t))},function(t,e,r){var n=r(518),i=r(519),o=r(280),a=r(520);t.exports=function(t,e){return n(t)||i(t,e)||o(t,e)||a()}},function(t,e,r){(function(t){function r(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n=-1&&!i;o--){var a=o>=0?arguments[o]:t.cwd();if("string"!==typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,i="/"===a.charAt(0))}return(i?"/":"")+(e=r(n(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var o=e.isAbsolute(t),a="/"===i(t,-1);return(t=r(n(t.split("/"),(function(t){return!!t})),!o).join("/"))||o||(t="."),t&&a&&(t+="/"),(o?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(n(t,(function(t,e){if("string"!==typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,r){function n(t){for(var e=0;e=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=e.resolve(t).substr(1),r=e.resolve(r).substr(1);for(var i=n(t.split("/")),o=n(r.split("/")),a=Math.min(i.length,o.length),s=a,u=0;u=1;--o)if(47===(e=t.charCodeAt(o))){if(!i){n=o;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":t.slice(0,n)},e.basename=function(t,e){var r=function(t){"string"!==typeof t&&(t+="");var e,r=0,n=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){r=e+1;break}}else-1===n&&(i=!1,n=e+1);return-1===n?"":t.slice(r,n)}(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},e.extname=function(t){"string"!==typeof t&&(t+="");for(var e=-1,r=0,n=-1,i=!0,o=0,a=t.length-1;a>=0;--a){var s=t.charCodeAt(a);if(47!==s)-1===n&&(i=!1,n=a+1),46===s?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){r=a+1;break}}return-1===e||-1===n||0===o||1===o&&e===n-1&&e===r+1?"":t.slice(e,n)};var i="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,r(18))},function(t,e){t.exports=function(){for(var t={},e=0;e",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(l),f=["%","/","?",";","#"].concat(c),h=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=r(292);function y(t,e,r){if(t&&i.isObject(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?I+="x":I+=P[R];if(!I.match(d)){var B=T.slice(0,A),j=T.slice(A+1),N=P.match(p);N&&(B.push(N[1]),j.unshift(N[2])),j.length&&(y="/"+j.join(".")+y),this.hostname=B.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=n.toASCII(this.hostname));var L=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+L,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!m[x])for(A=0,D=c.length;A0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift());return r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!M.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=M.slice(-1)[0],S=(r.host||t.host||M.length>1)&&("."===k||".."===k)||""===k,A=0,C=M.length;C>=0;C--)"."===(k=M[C])?M.splice(C,1):".."===k?(M.splice(C,1),A++):A&&(M.splice(C,1),A--);if(!_&&!x)for(;A--;A)M.unshift("..");!_||""===M[0]||M[0]&&"/"===M[0].charAt(0)||M.unshift(""),S&&"/"!==M.join("/").substr(-1)&&M.push("");var O,T=""===M[0]||M[0]&&"/"===M[0].charAt(0);E&&(r.hostname=r.host=T?"":M.length?M.shift():"",(O=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=O.shift(),r.host=r.hostname=O.shift()));return(_=_||r.host&&M.length)&&!T&&M.unshift(""),M.length?r.pathname=M.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(t,e,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(t,e,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EDGE_CROP=e.EDGE_WRAP=e.EDGE_EXTEND=e.BLEND_EXCLUSION=e.BLEND_DIFFERENCE=e.BLEND_HARDLIGHT=e.BLEND_LIGHTEN=e.BLEND_DARKEN=e.BLEND_OVERLAY=e.BLEND_SCREEN=e.BLEND_ADD=e.BLEND_MULTIPLY=e.BLEND_DESTINATION_OVER=e.BLEND_SOURCE_OVER=e.VERTICAL_ALIGN_BOTTOM=e.VERTICAL_ALIGN_MIDDLE=e.VERTICAL_ALIGN_TOP=e.HORIZONTAL_ALIGN_RIGHT=e.HORIZONTAL_ALIGN_CENTER=e.HORIZONTAL_ALIGN_LEFT=e.AUTO=void 0;e.AUTO=-1;e.HORIZONTAL_ALIGN_LEFT=1;e.HORIZONTAL_ALIGN_CENTER=2;e.HORIZONTAL_ALIGN_RIGHT=4;e.VERTICAL_ALIGN_TOP=8;e.VERTICAL_ALIGN_MIDDLE=16;e.VERTICAL_ALIGN_BOTTOM=32;e.BLEND_SOURCE_OVER="srcOver";e.BLEND_DESTINATION_OVER="dstOver";e.BLEND_MULTIPLY="multiply";e.BLEND_ADD="add";e.BLEND_SCREEN="screen";e.BLEND_OVERLAY="overlay";e.BLEND_DARKEN="darken";e.BLEND_LIGHTEN="lighten";e.BLEND_HARDLIGHT="hardLight";e.BLEND_DIFFERENCE="difference";e.BLEND_EXCLUSION="exclusion";e.EDGE_EXTEND=1;e.EDGE_WRAP=2;e.EDGE_CROP=3},function(t,e,r){var n=r(300);t.exports=function(t,e){if(t){if("string"===typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}},function(t,e,r){"use strict";(function(e){var n=r(48),i=r(55),o=function(){function t(){if(n(this,t),0===arguments.length)throw new Error("constructor requires parameters");var r=arguments.length<=0?void 0:arguments[0];if(null!==r&&"object"===typeof r)if(r instanceof t){var i=r.bitmap;this.bitmap={width:i.width,height:i.height,data:new e(i.width*i.height*4)},i.data.copy(this.bitmap.data)}else{if(!(r.width&&r.height&&r.data))throw new Error("unrecognized constructor parameters");this.bitmap=r}else{if("number"!==typeof r||"number"!==typeof(arguments.length<=1?void 0:arguments[1]))throw new Error("unrecognized constructor parameters");var o=r,a=arguments.length<=1?void 0:arguments[1],s=arguments.length<=2?void 0:arguments[2];this.bitmap={width:o,height:a},e.isBuffer(s)?this.bitmap.data=s:(this.bitmap.data=new e(o*a*4),"number"===typeof s&&this.fillRGBA(s))}}return i(t,[{key:"blit",value:function(t,e,r,n,i,o,a){if(n+o>this.bitmap.width)throw new Error("copy exceeds width of source bitmap");if(e+o>t.bitmap.width)throw new Error("copy exceeds width of target bitmap");if(i+a>this.bitmap.height)throw new Error("copy exceeds height of source bitmap");if(r+a>t.bitmap.height)throw new Erro("copy exceeds height of target bitmap");for(var s=this.bitmap.data,u=t.bitmap.data,l=4*this.bitmap.width,c=4*t.bitmap.width,f=4*o,h=i*l+4*n,d=r*c+4*e;--a>=0;)s.copy(u,d,h,h+f),h+=l,d+=c;return this}},{key:"fillRGBA",value:function(t){for(var e=this.bitmap.data,r=4*this.bitmap.height,n=0;nthis.bitmap.width?this.bitmap.width-s:n,c=i+u>this.bitmap.height?this.bitmap.height-u:i,f=e<0?-e:0,h=r<0?-r:0;if(void 0===o){if(s!==e||u!=r||l!==n||c!==i)throw new GifError("fillRGBA required for this reframing");a=new t(n,i)}else a=new t(n,i,o);return this.blit(a,f,h,s,u,l,c),this.bitmap=a.bitmap,this}},{key:"scale",value:function(t){if(1!==t){if(!Number.isInteger(t)||t<1)throw new Error("the scale must be an integer >= 1");for(var r,n=this.bitmap.width,i=this.bitmap.height,o=n*t*4,a=this.bitmap.data,s=new e(i*o*t),u=0,l=0,c=0;c>8&16777215;t.add(i)}r+=4}var o=new Array(t.size),a=t.values();for(r=0;r>>7)^(p<<14|p>>>18)^p>>>3,g=l[d-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;l[d]=m+l[d-7]+v+l[d-16]}var b=n&i^n&o^i&o,y=(n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22),w=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&f)+u[d]+l[d];h=f,f=c,c=s,s=a+w|0,a=o,o=i,i=n,n=w+(y+b)|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0,r[5]=r[5]+c|0,r[6]=r[6]+f|0,r[7]=r[7]+h|0},_doFinalize:function(){var e=this._data,r=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return r[i>>>5]|=128<<24-i%32,r[14+(i+64>>>9<<4)]=t.floor(n/4294967296),r[15+(i+64>>>9<<4)]=n,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(c),e.HmacSHA256=o._createHmacHelper(c)}(Math),i.SHA256)}()},function(t,e,r){"use strict";var n=function(){};t.exports=n},function(t,e,r){(function(t){t.exports=function(){"use strict";var e,r;function n(){return e.apply(null,arguments)}function i(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function a(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function s(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(a(t,e))return!1;return!0}function u(t){return void 0===t}function l(t){return"number"===typeof t||"[object Number]"===Object.prototype.toString.call(t)}function c(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function f(t,e){var r,n=[];for(r=0;r>>0;for(e=0;e0)for(r=0;r=0?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,E=Object.keys?Object.keys:function(t){var e,r=[];for(e in t)a(t,e)&&r.push(e);return r};var D=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,P=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I={},R={};function F(t,e,r,n){var i=n;"string"===typeof n&&(i=function(){return this[n]()}),t&&(R[t]=i),e&&(R[e[0]]=function(){return T(i.apply(this,arguments),e[1],e[2])}),r&&(R[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function B(t,e){return t.isValid()?(e=j(e,t.localeData()),I[e]=I[e]||function(t){var e,r,n,i=t.match(D);for(e=0,r=i.length;e=0&&P.test(t);)t=t.replace(P,n),P.lastIndex=0,r-=1;return t}var N={};function L(t,e){var r=t.toLowerCase();N[r]=N[r+"s"]=N[e]=t}function z(t){return"string"===typeof t?N[t]||N[t.toLowerCase()]:void 0}function U(t){var e,r,n={};for(r in t)a(t,r)&&(e=z(r))&&(n[e]=t[r]);return n}var H={};function W(t,e){H[t]=e}function q(t){return t%4===0&&t%100!==0||t%400===0}function G(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function V(t){var e=+t,r=0;return 0!==e&&isFinite(e)&&(r=G(e)),r}function Y(t,e){return function(r){return null!=r?(K(this,t,r),n.updateOffset(this,e),this):Z(this,t)}}function Z(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function K(t,e,r){t.isValid()&&!isNaN(r)&&("FullYear"===e&&q(t.year())&&1===t.month()&&29===t.date()?(r=V(r),t._d["set"+(t._isUTC?"UTC":"")+e](r,t.month(),_t(r,t.month()))):t._d["set"+(t._isUTC?"UTC":"")+e](r))}var $,X=/\d/,J=/\d\d/,Q=/\d{3}/,tt=/\d{4}/,et=/[+-]?\d{6}/,rt=/\d\d?/,nt=/\d\d\d\d?/,it=/\d\d\d\d\d\d?/,ot=/\d{1,3}/,at=/\d{1,4}/,st=/[+-]?\d{1,6}/,ut=/\d+/,lt=/[+-]?\d+/,ct=/Z|[+-]\d\d:?\d\d/gi,ft=/Z|[+-]\d\d(?::?\d\d)?/gi,ht=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function dt(t,e,r){$[t]=A(e)?e:function(t,n){return t&&r?r:e}}function pt(t,e){return a($,t)?$[t](e._strict,e._locale):new RegExp(mt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,r,n,i){return e||r||n||i}))))}function mt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}$={};var gt,vt={};function bt(t,e){var r,n=e;for("string"===typeof t&&(t=[t]),l(e)&&(n=function(t,r){r[e]=V(t)}),r=0;r68?1900:2e3)};var Pt=Y("FullYear",!0);function It(t,e,r,n,i,o,a){var s;return t<100&&t>=0?(s=new Date(t+400,e,r,n,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,r,n,i,o,a),s}function Rt(t){var e,r;return t<100&&t>=0?((r=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,r)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function Ft(t,e,r){var n=7+e-r;return-(7+Rt(t,0,n).getUTCDay()-e)%7+n-1}function Bt(t,e,r,n,i){var o,a,s=1+7*(e-1)+(7+r-n)%7+Ft(t,n,i);return s<=0?a=Dt(o=t-1)+s:s>Dt(t)?(o=t+1,a=s-Dt(t)):(o=t,a=s),{year:o,dayOfYear:a}}function jt(t,e,r){var n,i,o=Ft(t.year(),e,r),a=Math.floor((t.dayOfYear()-o-1)/7)+1;return a<1?n=a+Nt(i=t.year()-1,e,r):a>Nt(t.year(),e,r)?(n=a-Nt(t.year(),e,r),i=t.year()+1):(i=t.year(),n=a),{week:n,year:i}}function Nt(t,e,r){var n=Ft(t,e,r),i=Ft(t+1,e,r);return(Dt(t)-n+i)/7}function Lt(t,e){return t.slice(e,7).concat(t.slice(0,e))}F("w",["ww",2],"wo","week"),F("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),W("week",5),W("isoWeek",5),dt("w",rt),dt("ww",rt,J),dt("W",rt),dt("WW",rt,J),yt(["w","ww","W","WW"],(function(t,e,r,n){e[n.substr(0,1)]=V(t)})),F("d",0,"do","day"),F("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),F("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),F("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),F("e",0,0,"weekday"),F("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),W("day",11),W("weekday",11),W("isoWeekday",11),dt("d",rt),dt("e",rt),dt("E",rt),dt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),dt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),dt("dddd",(function(t,e){return e.weekdaysRegex(t)})),yt(["dd","ddd","dddd"],(function(t,e,r,n){var i=r._locale.weekdaysParse(t,n,r._strict);null!=i?e.d=i:p(r).invalidWeekday=t})),yt(["d","e","E"],(function(t,e,r,n){e[n]=V(t)}));var zt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ut="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ht="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Wt=ht,qt=ht,Gt=ht;function Vt(t,e,r){var n,i,o,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=d([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?"dddd"===e?-1!==(i=gt.call(this._weekdaysParse,a))?i:null:"ddd"===e?-1!==(i=gt.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=gt.call(this._minWeekdaysParse,a))?i:null:"dddd"===e?-1!==(i=gt.call(this._weekdaysParse,a))||-1!==(i=gt.call(this._shortWeekdaysParse,a))||-1!==(i=gt.call(this._minWeekdaysParse,a))?i:null:"ddd"===e?-1!==(i=gt.call(this._shortWeekdaysParse,a))||-1!==(i=gt.call(this._weekdaysParse,a))||-1!==(i=gt.call(this._minWeekdaysParse,a))?i:null:-1!==(i=gt.call(this._minWeekdaysParse,a))||-1!==(i=gt.call(this._weekdaysParse,a))||-1!==(i=gt.call(this._shortWeekdaysParse,a))?i:null}function Yt(){function t(t,e){return e.length-t.length}var e,r,n,i,o,a=[],s=[],u=[],l=[];for(e=0;e<7;e++)r=d([2e3,1]).day(e),n=mt(this.weekdaysMin(r,"")),i=mt(this.weekdaysShort(r,"")),o=mt(this.weekdays(r,"")),a.push(n),s.push(i),u.push(o),l.push(n),l.push(i),l.push(o);a.sort(t),s.sort(t),u.sort(t),l.sort(t),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Zt(){return this.hours()%12||12}function Kt(t,e){F(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function $t(t,e){return e._meridiemParse}F("H",["HH",2],0,"hour"),F("h",["hh",2],0,Zt),F("k",["kk",2],0,(function(){return this.hours()||24})),F("hmm",0,0,(function(){return""+Zt.apply(this)+T(this.minutes(),2)})),F("hmmss",0,0,(function(){return""+Zt.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)})),F("Hmm",0,0,(function(){return""+this.hours()+T(this.minutes(),2)})),F("Hmmss",0,0,(function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)})),Kt("a",!0),Kt("A",!1),L("hour","h"),W("hour",13),dt("a",$t),dt("A",$t),dt("H",rt),dt("h",rt),dt("k",rt),dt("HH",rt,J),dt("hh",rt,J),dt("kk",rt,J),dt("hmm",nt),dt("hmmss",it),dt("Hmm",nt),dt("Hmmss",it),bt(["H","HH"],3),bt(["k","kk"],(function(t,e,r){var n=V(t);e[3]=24===n?0:n})),bt(["a","A"],(function(t,e,r){r._isPm=r._locale.isPM(t),r._meridiem=t})),bt(["h","hh"],(function(t,e,r){e[3]=V(t),p(r).bigHour=!0})),bt("hmm",(function(t,e,r){var n=t.length-2;e[3]=V(t.substr(0,n)),e[4]=V(t.substr(n)),p(r).bigHour=!0})),bt("hmmss",(function(t,e,r){var n=t.length-4,i=t.length-2;e[3]=V(t.substr(0,n)),e[4]=V(t.substr(n,2)),e[5]=V(t.substr(i)),p(r).bigHour=!0})),bt("Hmm",(function(t,e,r){var n=t.length-2;e[3]=V(t.substr(0,n)),e[4]=V(t.substr(n))})),bt("Hmmss",(function(t,e,r){var n=t.length-4,i=t.length-2;e[3]=V(t.substr(0,n)),e[4]=V(t.substr(n,2)),e[5]=V(t.substr(i))}));var Xt,Jt=Y("Hours",!0),Qt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:xt,monthsShort:Mt,week:{dow:0,doy:6},weekdays:zt,weekdaysMin:Ht,weekdaysShort:Ut,meridiemParse:/[ap]\.?m?\.?/i},te={},ee={};function re(t,e){var r,n=Math.min(t.length,e.length);for(r=0;r0;){if(n=ie(i.slice(0,e).join("-")))return n;if(r&&r.length>=e&&re(i,r)>=e-1)break;e--}o++}return Xt}(t)}function ue(t){var e,r=t._a;return r&&-2===p(t).overflow&&(e=r[1]<0||r[1]>11?1:r[2]<1||r[2]>_t(r[0],r[1])?2:r[3]<0||r[3]>24||24===r[3]&&(0!==r[4]||0!==r[5]||0!==r[6])?3:r[4]<0||r[4]>59?4:r[5]<0||r[5]>59?5:r[6]<0||r[6]>999?6:-1,p(t)._overflowDayOfYear&&(e<0||e>2)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}var le=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,fe=/Z|[+-]\d\d(?::?\d\d)?/,he=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],de=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],pe=/^\/?Date\((-?\d+)/i,me=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ge={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ve(t){var e,r,n,i,o,a,s=t._i,u=le.exec(s)||ce.exec(s);if(u){for(p(t).iso=!0,e=0,r=he.length;e7)&&(u=!0)):(o=t._locale._week.dow,a=t._locale._week.doy,l=jt(ke(),o,a),r=we(e.gg,t._a[0],l.year),n=we(e.w,l.week),null!=e.d?((i=e.d)<0||i>6)&&(u=!0):null!=e.e?(i=e.e+o,(e.e<0||e.e>6)&&(u=!0)):i=o),n<1||n>Nt(r,o,a)?p(t)._overflowWeeks=!0:null!=u?p(t)._overflowWeekday=!0:(s=Bt(r,n,i,o,a),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(a=we(t._a[0],i[0]),(t._dayOfYear>Dt(a)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),r=Rt(a,0,t._dayOfYear),t._a[1]=r.getUTCMonth(),t._a[2]=r.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=i[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Rt:It).apply(null,s),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&"undefined"!==typeof t._w.d&&t._w.d!==o&&(p(t).weekdayMismatch=!0)}}function xe(t){if(t._f!==n.ISO_8601)if(t._f!==n.RFC_2822){t._a=[],p(t).empty=!0;var e,r,i,o,a,s,u=""+t._i,l=u.length,c=0;for(i=j(t._f,t._locale).match(D)||[],e=0;e0&&p(t).unusedInput.push(a),u=u.slice(u.indexOf(r)+r.length),c+=r.length),R[o]?(r?p(t).empty=!1:p(t).unusedTokens.push(o),wt(o,r,t)):t._strict&&!r&&p(t).unusedTokens.push(o);p(t).charsLeftOver=l-c,u.length>0&&p(t).unusedInput.push(u),t._a[3]<=12&&!0===p(t).bigHour&&t._a[3]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,r){var n;return null==r?e:null!=t.meridiemHour?t.meridiemHour(e,r):null!=t.isPM?((n=t.isPM(r))&&e<12&&(e+=12),n||12!==e||(e=0),e):e}(t._locale,t._a[3],t._meridiem),null!==(s=p(t).era)&&(t._a[0]=t._locale.erasConvertYear(s,t._a[0])),_e(t),ue(t)}else ye(t);else ve(t)}function Me(t){var e=t._i,r=t._f;return t._locale=t._locale||se(t._l),null===e||void 0===r&&""===e?g({nullInput:!0}):("string"===typeof e&&(t._i=e=t._locale.preparse(e)),_(e)?new w(ue(e)):(c(e)?t._d=e:i(r)?function(t){var e,r,n,i,o,a,s=!1;if(0===t._f.length)return p(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;ithis?this:t:g()}));function Ce(t,e){var r,n;if(1===e.length&&i(e[0])&&(e=e[0]),!e.length)return ke();for(r=e[0],n=1;n=0?new Date(t+400,e,r)-126227808e5:new Date(t,e,r).valueOf()}function nr(t,e,r){return t<100&&t>=0?Date.UTC(t+400,e,r)-126227808e5:Date.UTC(t,e,r)}function ir(t,e){return e.erasAbbrRegex(t)}function or(){var t,e,r=[],n=[],i=[],o=[],a=this.eras();for(t=0,e=a.length;t(o=Nt(t,n,i))&&(e=o),ur.call(this,t,e,r,n,i))}function ur(t,e,r,n,i){var o=Bt(t,e,r,n,i),a=Rt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}F("N",0,0,"eraAbbr"),F("NN",0,0,"eraAbbr"),F("NNN",0,0,"eraAbbr"),F("NNNN",0,0,"eraName"),F("NNNNN",0,0,"eraNarrow"),F("y",["y",1],"yo","eraYear"),F("y",["yy",2],0,"eraYear"),F("y",["yyy",3],0,"eraYear"),F("y",["yyyy",4],0,"eraYear"),dt("N",ir),dt("NN",ir),dt("NNN",ir),dt("NNNN",(function(t,e){return e.erasNameRegex(t)})),dt("NNNNN",(function(t,e){return e.erasNarrowRegex(t)})),bt(["N","NN","NNN","NNNN","NNNNN"],(function(t,e,r,n){var i=r._locale.erasParse(t,n,r._strict);i?p(r).era=i:p(r).invalidEra=t})),dt("y",ut),dt("yy",ut),dt("yyy",ut),dt("yyyy",ut),dt("yo",(function(t,e){return e._eraYearOrdinalRegex||ut})),bt(["y","yy","yyy","yyyy"],0),bt(["yo"],(function(t,e,r,n){var i;r._locale._eraYearOrdinalRegex&&(i=t.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?e[0]=r._locale.eraYearOrdinalParse(t,i):e[0]=parseInt(t,10)})),F(0,["gg",2],0,(function(){return this.weekYear()%100})),F(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ar("gggg","weekYear"),ar("ggggg","weekYear"),ar("GGGG","isoWeekYear"),ar("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),W("weekYear",1),W("isoWeekYear",1),dt("G",lt),dt("g",lt),dt("GG",rt,J),dt("gg",rt,J),dt("GGGG",at,tt),dt("gggg",at,tt),dt("GGGGG",st,et),dt("ggggg",st,et),yt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,r,n){e[n.substr(0,2)]=V(t)})),yt(["gg","GG"],(function(t,e,r,i){e[i]=n.parseTwoDigitYear(t)})),F("Q",0,"Qo","quarter"),L("quarter","Q"),W("quarter",7),dt("Q",X),bt("Q",(function(t,e){e[1]=3*(V(t)-1)})),F("D",["DD",2],"Do","date"),L("date","D"),W("date",9),dt("D",rt),dt("DD",rt,J),dt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),bt(["D","DD"],2),bt("Do",(function(t,e){e[2]=V(t.match(rt)[0])}));var lr=Y("Date",!0);F("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),W("dayOfYear",4),dt("DDD",ot),dt("DDDD",Q),bt(["DDD","DDDD"],(function(t,e,r){r._dayOfYear=V(t)})),F("m",["mm",2],0,"minute"),L("minute","m"),W("minute",14),dt("m",rt),dt("mm",rt,J),bt(["m","mm"],4);var cr=Y("Minutes",!1);F("s",["ss",2],0,"second"),L("second","s"),W("second",15),dt("s",rt),dt("ss",rt,J),bt(["s","ss"],5);var fr,hr,dr=Y("Seconds",!1);for(F("S",0,0,(function(){return~~(this.millisecond()/100)})),F(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),F(0,["SSS",3],0,"millisecond"),F(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),F(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),F(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),F(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),F(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),F(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),L("millisecond","ms"),W("millisecond",16),dt("S",ot,X),dt("SS",ot,J),dt("SSS",ot,Q),fr="SSSS";fr.length<=9;fr+="S")dt(fr,ut);function pr(t,e){e[6]=V(1e3*("0."+t))}for(fr="S";fr.length<=9;fr+="S")bt(fr,pr);hr=Y("Milliseconds",!1),F("z",0,0,"zoneAbbr"),F("zz",0,0,"zoneName");var mr=w.prototype;function gr(t){return t}mr.add=Ve,mr.calendar=function(t,e){1===arguments.length&&(Ke(arguments[0])?(t=arguments[0],e=void 0):$e(arguments[0])&&(e=arguments[0],t=void 0));var r=t||ke(),i=Be(r,this).startOf("day"),o=n.calendarFormat(this,i)||"sameElse",a=e&&(A(e[o])?e[o].call(this,r):e[o]);return this.format(a||this.localeData().calendar(o,this,ke(r)))},mr.clone=function(){return new w(this)},mr.diff=function(t,e,r){var n,i,o;if(!this.isValid())return NaN;if(!(n=Be(t,this)).isValid())return NaN;switch(i=6e4*(n.utcOffset()-this.utcOffset()),e=z(e)){case"year":o=Xe(this,n)/12;break;case"month":o=Xe(this,n);break;case"quarter":o=Xe(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-i)/864e5;break;case"week":o=(this-n-i)/6048e5;break;default:o=this-n}return r?o:G(o)},mr.endOf=function(t){var e,r;if(void 0===(t=z(t))||"millisecond"===t||!this.isValid())return this;switch(r=this._isUTC?nr:rr,t){case"year":e=r(this.year()+1,0,1)-1;break;case"quarter":e=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=r(this.year(),this.month()+1,1)-1;break;case"week":e=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-er(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-er(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-er(e,1e3)-1}return this._d.setTime(e),n.updateOffset(this,!0),this},mr.format=function(t){t||(t=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var e=B(this,t);return this.localeData().postformat(e)},mr.from=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||ke(t).isValid())?Ue({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},mr.fromNow=function(t){return this.from(ke(),t)},mr.to=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||ke(t).isValid())?Ue({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},mr.toNow=function(t){return this.to(ke(),t)},mr.get=function(t){return A(this[t=z(t)])?this[t]():this},mr.invalidAt=function(){return p(this).overflow},mr.isAfter=function(t,e){var r=_(t)?t:ke(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=z(e)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()9999?B(r,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",B(r,"Z")):B(r,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},mr.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,r,n="moment",i="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),t="["+n+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r=i+'[")]',this.format(t+e+"-MM-DD[T]HH:mm:ss.SSS"+r)},"undefined"!==typeof Symbol&&null!=Symbol.for&&(mr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),mr.toJSON=function(){return this.isValid()?this.toISOString():null},mr.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},mr.unix=function(){return Math.floor(this.valueOf()/1e3)},mr.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},mr.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},mr.eraName=function(){var t,e,r,n=this.localeData().eras();for(t=0,e=n.length;tthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},mr.isLocal=function(){return!!this.isValid()&&!this._isUTC},mr.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},mr.isUtc=Ne,mr.isUTC=Ne,mr.zoneAbbr=function(){return this._isUTC?"UTC":""},mr.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},mr.dates=M("dates accessor is deprecated. Use date instead.",lr),mr.months=M("months accessor is deprecated. Use month instead",Ot),mr.years=M("years accessor is deprecated. Use year instead",Pt),mr.zone=M("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!==typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),mr.isDSTShifted=M("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var t,e={};return y(e,this),(e=Me(e))._a?(t=e._isUTC?d(e._a):ke(e._a),this._isDSTShifted=this.isValid()&&function(t,e,r){var n,i=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),a=0;for(n=0;n0):this._isDSTShifted=!1,this._isDSTShifted}));var vr=O.prototype;function br(t,e,r,n){var i=se(),o=d().set(n,e);return i[r](o,t)}function yr(t,e,r){if(l(t)&&(e=t,t=void 0),t=t||"",null!=e)return br(t,e,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=br(t,n,r,"month");return i}function wr(t,e,r,n){"boolean"===typeof t?(l(e)&&(r=e,e=void 0),e=e||""):(r=e=t,t=!1,l(e)&&(r=e,e=void 0),e=e||"");var i,o=se(),a=t?o._week.dow:0,s=[];if(null!=r)return br(e,(r+a)%7,n,"day");for(i=0;i<7;i++)s[i]=br(e,(i+a)%7,n,"day");return s}vr.calendar=function(t,e,r){var n=this._calendar[t]||this._calendar.sameElse;return A(n)?n.call(e,r):n},vr.longDateFormat=function(t){var e=this._longDateFormat[t],r=this._longDateFormat[t.toUpperCase()];return e||!r?e:(this._longDateFormat[t]=r.match(D).map((function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t})).join(""),this._longDateFormat[t])},vr.invalidDate=function(){return this._invalidDate},vr.ordinal=function(t){return this._ordinal.replace("%d",t)},vr.preparse=gr,vr.postformat=gr,vr.relativeTime=function(t,e,r,n){var i=this._relativeTime[r];return A(i)?i(t,e,r,n):i.replace(/%d/i,t)},vr.pastFuture=function(t,e){var r=this._relativeTime[t>0?"future":"past"];return A(r)?r(e):r.replace(/%s/i,e)},vr.set=function(t){var e,r;for(r in t)a(t,r)&&(A(e=t[r])?this[r]=e:this["_"+r]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},vr.eras=function(t,e){var r,i,o,a=this._eras||se("en")._eras;for(r=0,i=a.length;r=0)return u[n]},vr.erasConvertYear=function(t,e){var r=t.since<=t.until?1:-1;return void 0===e?n(t.since).year():n(t.since).year()+(e-t.offset)*r},vr.erasAbbrRegex=function(t){return a(this,"_erasAbbrRegex")||or.call(this),t?this._erasAbbrRegex:this._erasRegex},vr.erasNameRegex=function(t){return a(this,"_erasNameRegex")||or.call(this),t?this._erasNameRegex:this._erasRegex},vr.erasNarrowRegex=function(t){return a(this,"_erasNarrowRegex")||or.call(this),t?this._erasNarrowRegex:this._erasRegex},vr.months=function(t,e){return t?i(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Et).test(e)?"format":"standalone"][t.month()]:i(this._months)?this._months:this._months.standalone},vr.monthsShort=function(t,e){return t?i(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Et.test(e)?"format":"standalone"][t.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},vr.monthsParse=function(t,e,r){var n,i,o;if(this._monthsParseExact)return At.call(this,t,e,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=d([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),r&&"MMMM"===e&&this._longMonthsParse[n].test(t))return n;if(r&&"MMM"===e&&this._shortMonthsParse[n].test(t))return n;if(!r&&this._monthsParse[n].test(t))return n}},vr.monthsRegex=function(t){return this._monthsParseExact?(a(this,"_monthsRegex")||Tt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=St),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},vr.monthsShortRegex=function(t){return this._monthsParseExact?(a(this,"_monthsRegex")||Tt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=kt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},vr.week=function(t){return jt(t,this._week.dow,this._week.doy).week},vr.firstDayOfYear=function(){return this._week.doy},vr.firstDayOfWeek=function(){return this._week.dow},vr.weekdays=function(t,e){var r=i(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Lt(r,this._week.dow):t?r[t.day()]:r},vr.weekdaysMin=function(t){return!0===t?Lt(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},vr.weekdaysShort=function(t){return!0===t?Lt(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},vr.weekdaysParse=function(t,e,r){var n,i,o;if(this._weekdaysParseExact)return Vt.call(this,t,e,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=d([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&"dddd"===e&&this._fullWeekdaysParse[n].test(t))return n;if(r&&"ddd"===e&&this._shortWeekdaysParse[n].test(t))return n;if(r&&"dd"===e&&this._minWeekdaysParse[n].test(t))return n;if(!r&&this._weekdaysParse[n].test(t))return n}},vr.weekdaysRegex=function(t){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Yt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Wt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},vr.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Yt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},vr.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Yt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Gt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},vr.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},vr.meridiem=function(t,e,r){return t>11?r?"pm":"PM":r?"am":"AM"},oe("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===V(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),n.lang=M("moment.lang is deprecated. Use moment.locale instead.",oe),n.langData=M("moment.langData is deprecated. Use moment.localeData instead.",se);var _r=Math.abs;function xr(t,e,r,n){var i=Ue(e,r);return t._milliseconds+=n*i._milliseconds,t._days+=n*i._days,t._months+=n*i._months,t._bubble()}function Mr(t){return t<0?Math.floor(t):Math.ceil(t)}function Er(t){return 4800*t/146097}function kr(t){return 146097*t/4800}function Sr(t){return function(){return this.as(t)}}var Ar=Sr("ms"),Cr=Sr("s"),Or=Sr("m"),Tr=Sr("h"),Dr=Sr("d"),Pr=Sr("w"),Ir=Sr("M"),Rr=Sr("Q"),Fr=Sr("y");function Br(t){return function(){return this.isValid()?this._data[t]:NaN}}var jr=Br("milliseconds"),Nr=Br("seconds"),Lr=Br("minutes"),zr=Br("hours"),Ur=Br("days"),Hr=Br("months"),Wr=Br("years"),qr=Math.round,Gr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Vr(t,e,r,n,i){return i.relativeTime(e||1,!!r,t,n)}var Yr=Math.abs;function Zr(t){return(t>0)-(t<0)||+t}function Kr(){if(!this.isValid())return this.localeData().invalidDate();var t,e,r,n,i,o,a,s,u=Yr(this._milliseconds)/1e3,l=Yr(this._days),c=Yr(this._months),f=this.asSeconds();return f?(t=G(u/60),e=G(t/60),u%=60,t%=60,r=G(c/12),c%=12,n=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=f<0?"-":"",o=Zr(this._months)!==Zr(f)?"-":"",a=Zr(this._days)!==Zr(f)?"-":"",s=Zr(this._milliseconds)!==Zr(f)?"-":"",i+"P"+(r?o+r+"Y":"")+(c?o+c+"M":"")+(l?a+l+"D":"")+(e||t||u?"T":"")+(e?s+e+"H":"")+(t?s+t+"M":"")+(u?s+n+"S":"")):"P0D"}var $r=Te.prototype;return $r.isValid=function(){return this._isValid},$r.abs=function(){var t=this._data;return this._milliseconds=_r(this._milliseconds),this._days=_r(this._days),this._months=_r(this._months),t.milliseconds=_r(t.milliseconds),t.seconds=_r(t.seconds),t.minutes=_r(t.minutes),t.hours=_r(t.hours),t.months=_r(t.months),t.years=_r(t.years),this},$r.add=function(t,e){return xr(this,t,e,1)},$r.subtract=function(t,e){return xr(this,t,e,-1)},$r.as=function(t){if(!this.isValid())return NaN;var e,r,n=this._milliseconds;if("month"===(t=z(t))||"quarter"===t||"year"===t)switch(e=this._days+n/864e5,r=this._months+Er(e),t){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(e=this._days+Math.round(kr(this._months)),t){case"week":return e/7+n/6048e5;case"day":return e+n/864e5;case"hour":return 24*e+n/36e5;case"minute":return 1440*e+n/6e4;case"second":return 86400*e+n/1e3;case"millisecond":return Math.floor(864e5*e)+n;default:throw new Error("Unknown unit "+t)}},$r.asMilliseconds=Ar,$r.asSeconds=Cr,$r.asMinutes=Or,$r.asHours=Tr,$r.asDays=Dr,$r.asWeeks=Pr,$r.asMonths=Ir,$r.asQuarters=Rr,$r.asYears=Fr,$r.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*V(this._months/12):NaN},$r._bubble=function(){var t,e,r,n,i,o=this._milliseconds,a=this._days,s=this._months,u=this._data;return o>=0&&a>=0&&s>=0||o<=0&&a<=0&&s<=0||(o+=864e5*Mr(kr(s)+a),a=0,s=0),u.milliseconds=o%1e3,t=G(o/1e3),u.seconds=t%60,e=G(t/60),u.minutes=e%60,r=G(e/60),u.hours=r%24,a+=G(r/24),i=G(Er(a)),s+=i,a-=Mr(kr(i)),n=G(s/12),s%=12,u.days=a,u.months=s,u.years=n,this},$r.clone=function(){return Ue(this)},$r.get=function(t){return t=z(t),this.isValid()?this[t+"s"]():NaN},$r.milliseconds=jr,$r.seconds=Nr,$r.minutes=Lr,$r.hours=zr,$r.days=Ur,$r.weeks=function(){return G(this.days()/7)},$r.months=Hr,$r.years=Wr,$r.humanize=function(t,e){if(!this.isValid())return this.localeData().invalidDate();var r,n,i=!1,o=Gr;return"object"===typeof t&&(e=t,t=!1),"boolean"===typeof t&&(i=t),"object"===typeof e&&(o=Object.assign({},Gr,e),null!=e.s&&null==e.ss&&(o.ss=e.s-1)),r=this.localeData(),n=function(t,e,r,n){var i=Ue(t).abs(),o=qr(i.as("s")),a=qr(i.as("m")),s=qr(i.as("h")),u=qr(i.as("d")),l=qr(i.as("M")),c=qr(i.as("w")),f=qr(i.as("y")),h=o<=r.ss&&["s",o]||o0,h[4]=n,Vr.apply(null,h)}(this,!i,o,r),i&&(n=r.pastFuture(+this,n)),r.postformat(n)},$r.toISOString=Kr,$r.toString=Kr,$r.toJSON=Kr,$r.locale=Je,$r.localeData=tr,$r.toIsoString=M("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Kr),$r.lang=Qe,F("X",0,0,"unix"),F("x",0,0,"valueOf"),dt("x",lt),dt("X",/[+-]?\d+(\.\d{1,3})?/),bt("X",(function(t,e,r){r._d=new Date(1e3*parseFloat(t))})),bt("x",(function(t,e,r){r._d=new Date(V(t))})),n.version="2.27.0",e=ke,n.fn=mr,n.min=function(){var t=[].slice.call(arguments,0);return Ce("isBefore",t)},n.max=function(){var t=[].slice.call(arguments,0);return Ce("isAfter",t)},n.now=function(){return Date.now?Date.now():+new Date},n.utc=d,n.unix=function(t){return ke(1e3*t)},n.months=function(t,e){return yr(t,e,"months")},n.isDate=c,n.locale=oe,n.invalid=g,n.duration=Ue,n.isMoment=_,n.weekdays=function(t,e,r){return wr(t,e,r,"weekdays")},n.parseZone=function(){return ke.apply(null,arguments).parseZone()},n.localeData=se,n.isDuration=De,n.monthsShort=function(t,e){return yr(t,e,"monthsShort")},n.weekdaysMin=function(t,e,r){return wr(t,e,r,"weekdaysMin")},n.defineLocale=ae,n.updateLocale=function(t,e){if(null!=e){var r,n,i=Qt;null!=te[t]&&null!=te[t].parentLocale?te[t].set(C(te[t]._config,e)):(null!=(n=ie(t))&&(i=n._config),e=C(i,e),null==n&&(e.abbr=t),(r=new O(e)).parentLocale=te[t],te[t]=r),oe(t)}else null!=te[t]&&(null!=te[t].parentLocale?(te[t]=te[t].parentLocale,t===oe()&&oe(t)):null!=te[t]&&delete te[t]);return te[t]},n.locales=function(){return E(te)},n.weekdaysShort=function(t,e,r){return wr(t,e,r,"weekdaysShort")},n.normalizeUnits=z,n.relativeTimeRounding=function(t){return void 0===t?qr:"function"===typeof t&&(qr=t,!0)},n.relativeTimeThreshold=function(t,e){return void 0!==Gr[t]&&(void 0===e?Gr[t]:(Gr[t]=e,"s"===t&&(Gr.ss=e-1),!0))},n.calendarFormat=function(t,e){var r=t.diff(e,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"},n.prototype=mr,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}()}).call(this,r(53)(t))},function(t,e,r){"use strict";(function(t,n){var i,o=r(325);i="undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof t?t:n;var a=Object(o.a)(i);e.a=a}).call(this,r(20),r(123)(t))},function(t,e,r){!function(e,n){var i;t.exports=(i=r(32),function(){var t=i,e=t.lib.WordArray;t.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,n=this._map;t.clamp();for(var i=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var u=n.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(t){var r=t.length,n=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o>>6-a%4*2;i[o>>>2]|=(s|u)<<24-o%4*8,o++}return e.create(i,o)}(t,r,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),i.enc.Base64)}()},function(t,e,r){"use strict";var n=r(4),i=r(11),o=r(17),a=r(16),s=r(0),u=r.n(s),l=r(1),c=r.n(l),f=r(118),h=r(12),d=r.n(h),p=r(67),m=r(2),g={a11y:c.a.bool,disabled:c.a.bool,direction:c.a.oneOf(["up","down","left","right"]),group:c.a.bool,isOpen:c.a.bool,nav:c.a.bool,active:c.a.bool,addonType:c.a.oneOfType([c.a.bool,c.a.oneOf(["prepend","append"])]),size:c.a.string,tag:m.o,toggle:c.a.func,children:c.a.node,className:c.a.string,cssModule:c.a.object,inNavbar:c.a.bool,setActiveFromChild:c.a.bool},v=[m.j.space,m.j.enter,m.j.up,m.j.down,m.j.end,m.j.home],b=function(t){function e(e){var r;return(r=t.call(this,e)||this).addEvents=r.addEvents.bind(Object(o.a)(r)),r.handleDocumentClick=r.handleDocumentClick.bind(Object(o.a)(r)),r.handleKeyDown=r.handleKeyDown.bind(Object(o.a)(r)),r.removeEvents=r.removeEvents.bind(Object(o.a)(r)),r.toggle=r.toggle.bind(Object(o.a)(r)),r.containerRef=u.a.createRef(),r}Object(a.a)(e,t);var r=e.prototype;return r.getContextValue=function(){return{toggle:this.toggle,isOpen:this.props.isOpen,direction:"down"===this.props.direction&&this.props.dropup?"up":this.props.direction,inNavbar:this.props.inNavbar,disabled:this.props.disabled}},r.componentDidMount=function(){this.handleProps()},r.componentDidUpdate=function(t){this.props.isOpen!==t.isOpen&&this.handleProps()},r.componentWillUnmount=function(){this.removeEvents()},r.getContainer=function(){return this.containerRef.current},r.getMenuCtrl=function(){return this._$menuCtrl||(this._$menuCtrl=this.getContainer().querySelector("[aria-expanded]")),this._$menuCtrl},r.getMenuItems=function(){return[].slice.call(this.getContainer().querySelectorAll('[role="menuitem"]'))},r.addEvents=function(){var t=this;["click","touchstart","keyup"].forEach((function(e){return document.addEventListener(e,t.handleDocumentClick,!0)}))},r.removeEvents=function(){var t=this;["click","touchstart","keyup"].forEach((function(e){return document.removeEventListener(e,t.handleDocumentClick,!0)}))},r.handleDocumentClick=function(t){if(!t||3!==t.which&&("keyup"!==t.type||t.which===m.j.tab)){var e=this.getContainer();(!e.contains(t.target)||e===t.target||"keyup"===t.type&&t.which!==m.j.tab)&&this.toggle(t)}},r.handleKeyDown=function(t){var e=this;if(!/input|textarea/i.test(t.target.tagName)&&(m.j.tab!==t.which||"menuitem"===t.target.getAttribute("role")&&this.props.a11y)&&((-1!==v.indexOf(t.which)||t.which>=48&&t.which<=90)&&t.preventDefault(),!this.props.disabled&&(this.getMenuCtrl()===t.target&&(!this.props.isOpen&&[m.j.space,m.j.enter,m.j.up,m.j.down].indexOf(t.which)>-1?(this.toggle(t),setTimeout((function(){return e.getMenuItems()[0].focus()}))):this.props.isOpen&&t.which===m.j.esc&&this.toggle(t)),this.props.isOpen&&"menuitem"===t.target.getAttribute("role"))))if([m.j.tab,m.j.esc].indexOf(t.which)>-1)this.toggle(t),this.getMenuCtrl().focus();else if([m.j.space,m.j.enter].indexOf(t.which)>-1)t.target.click(),this.getMenuCtrl().focus();else if([m.j.down,m.j.up].indexOf(t.which)>-1||[m.j.n,m.j.p].indexOf(t.which)>-1&&t.ctrlKey){var r=this.getMenuItems(),n=r.indexOf(t.target);m.j.up===t.which||m.j.p===t.which&&t.ctrlKey?n=0!==n?n-1:r.length-1:(m.j.down===t.which||m.j.n===t.which&&t.ctrlKey)&&(n=n===r.length-1?0:n+1),r[n].focus()}else if(m.j.end===t.which){var i=this.getMenuItems();i[i.length-1].focus()}else if(m.j.home===t.which){this.getMenuItems()[0].focus()}else if(t.which>=48&&t.which<=90)for(var o=this.getMenuItems(),a=String.fromCharCode(t.which).toLowerCase(),s=0;s=0)return 1;return 0}();var i=r&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),n))}};function o(t){return t&&"[object Function]"==={}.toString.call(t)}function a(t,e){if(1!==t.nodeType)return[];var r=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?r[e]:r}function s(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function u(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=a(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/(auto|scroll|overlay)/.test(r+i+n)?t:u(s(t))}function l(t){return t&&t.referenceNode?t.referenceNode:t}var c=r&&!(!window.MSInputMethodContext||!document.documentMode),f=r&&/MSIE 10/.test(navigator.userAgent);function h(t){return 11===t?c:10===t?f:c||f}function d(t){if(!t)return document.documentElement;for(var e=h(10)?document.body:null,r=t.offsetParent||null;r===e&&t.nextElementSibling;)r=(t=t.nextElementSibling).offsetParent;var n=r&&r.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TH","TD","TABLE"].indexOf(r.nodeName)&&"static"===a(r,"position")?d(r):r:t?t.ownerDocument.documentElement:document.documentElement}function p(t){return null!==t.parentNode?p(t.parentNode):t}function m(t,e){if(!t||!t.nodeType||!e||!e.nodeType)return document.documentElement;var r=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?t:e,i=r?e:t,o=document.createRange();o.setStart(n,0),o.setEnd(i,0);var a=o.commonAncestorContainer;if(t!==a&&e!==a||n.contains(i))return function(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||d(t.firstElementChild)===t)}(a)?a:d(a);var s=p(t);return s.host?m(s.host,e):m(t,p(e).host)}function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",r="top"===e?"scrollTop":"scrollLeft",n=t.nodeName;if("BODY"===n||"HTML"===n){var i=t.ownerDocument.documentElement,o=t.ownerDocument.scrollingElement||i;return o[r]}return t[r]}function v(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=g(e,"top"),i=g(e,"left"),o=r?-1:1;return t.top+=n*o,t.bottom+=n*o,t.left+=i*o,t.right+=i*o,t}function b(t,e){var r="x"===e?"Left":"Top",n="Left"===r?"Right":"Bottom";return parseFloat(t["border"+r+"Width"])+parseFloat(t["border"+n+"Width"])}function y(t,e,r,n){return Math.max(e["offset"+t],e["scroll"+t],r["client"+t],r["offset"+t],r["scroll"+t],h(10)?parseInt(r["offset"+t])+parseInt(n["margin"+("Height"===t?"Top":"Left")])+parseInt(n["margin"+("Height"===t?"Bottom":"Right")]):0)}function w(t){var e=t.body,r=t.documentElement,n=h(10)&&getComputedStyle(r);return{height:y("Height",e,r,n),width:y("Width",e,r,n)}}var _=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},x=function(){function t(t,e){for(var r=0;r2&&void 0!==arguments[2]&&arguments[2],n=h(10),i="HTML"===e.nodeName,o=S(t),s=S(e),l=u(t),c=a(e),f=parseFloat(c.borderTopWidth),d=parseFloat(c.borderLeftWidth);r&&i&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var p=k({top:o.top-s.top-f,left:o.left-s.left-d,width:o.width,height:o.height});if(p.marginTop=0,p.marginLeft=0,!n&&i){var m=parseFloat(c.marginTop),g=parseFloat(c.marginLeft);p.top-=f-m,p.bottom-=f-m,p.left-=d-g,p.right-=d-g,p.marginTop=m,p.marginLeft=g}return(n&&!r?e.contains(l):e===l&&"BODY"!==l.nodeName)&&(p=v(p,e)),p}function C(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.ownerDocument.documentElement,n=A(t,r),i=Math.max(r.clientWidth,window.innerWidth||0),o=Math.max(r.clientHeight,window.innerHeight||0),a=e?0:g(r),s=e?0:g(r,"left"),u={top:a-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:o};return k(u)}function O(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===a(t,"position"))return!0;var r=s(t);return!!r&&O(r)}function T(t){if(!t||!t.parentElement||h())return document.documentElement;for(var e=t.parentElement;e&&"none"===a(e,"transform");)e=e.parentElement;return e||document.documentElement}function D(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?T(t):m(t,l(e));if("viewport"===n)o=C(a,i);else{var c=void 0;"scrollParent"===n?"BODY"===(c=u(s(e))).nodeName&&(c=t.ownerDocument.documentElement):c="window"===n?t.ownerDocument.documentElement:n;var f=A(c,a,i);if("HTML"!==c.nodeName||O(a))o=f;else{var h=w(t.ownerDocument),d=h.height,p=h.width;o.top+=f.top-f.marginTop,o.bottom=d+f.top,o.left+=f.left-f.marginLeft,o.right=p+f.left}}var g="number"===typeof(r=r||0);return o.left+=g?r:r.left||0,o.top+=g?r:r.top||0,o.right-=g?r:r.right||0,o.bottom-=g?r:r.bottom||0,o}function P(t){return t.width*t.height}function I(t,e,r,n,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=D(r,n,o,i),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},u=Object.keys(s).map((function(t){return E({key:t},s[t],{area:P(s[t])})})).sort((function(t,e){return e.area-t.area})),l=u.filter((function(t){var e=t.width,n=t.height;return e>=r.clientWidth&&n>=r.clientHeight})),c=l.length>0?l[0].key:u[0].key,f=t.split("-")[1];return c+(f?"-"+f:"")}function R(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=n?T(e):m(e,l(r));return A(r,i,n)}function F(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),r=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),n=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+n,height:t.offsetHeight+r}}function B(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))}function j(t,e,r){r=r.split("-")[0];var n=F(t),i={width:n.width,height:n.height},o=-1!==["right","left"].indexOf(r),a=o?"top":"left",s=o?"left":"top",u=o?"height":"width",l=o?"width":"height";return i[a]=e[a]+e[u]/2-n[u]/2,i[s]=r===s?e[s]-n[l]:e[B(s)],i}function N(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function L(t,e,r){return(void 0===r?t:t.slice(0,function(t,e,r){if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===r}));var n=N(t,(function(t){return t[e]===r}));return t.indexOf(n)}(t,"name",r))).forEach((function(t){t.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var r=t.function||t.fn;t.enabled&&o(r)&&(e.offsets.popper=k(e.offsets.popper),e.offsets.reference=k(e.offsets.reference),e=r(e,t))})),e}function z(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=R(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=I(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=j(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=L(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function U(t,e){return t.some((function(t){var r=t.name;return t.enabled&&r===e}))}function H(t){for(var e=[!1,"ms","Webkit","Moz","O"],r=t.charAt(0).toUpperCase()+t.slice(1),n=0;n1&&void 0!==arguments[1]&&arguments[1],r=Q.indexOf(t),n=Q.slice(r+1).concat(Q.slice(0,r));return e?n.reverse():n}var et="flip",rt="clockwise",nt="counterclockwise";function it(t,e,r,n){var i=[0,0],o=-1!==["right","left"].indexOf(n),a=t.split(/(\+|\-)/).map((function(t){return t.trim()})),s=a.indexOf(N(a,(function(t){return-1!==t.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,l=-1!==s?[a.slice(0,s).concat([a[s].split(u)[0]]),[a[s].split(u)[1]].concat(a.slice(s+1))]:[a];return(l=l.map((function(t,n){var i=(1===n?!o:o)?"height":"width",a=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)}),[]).map((function(t){return function(t,e,r,n){var i=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=r;break;case"%":case"%r":default:s=n}return k(s)[e]/100*o}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}(t,i,e,r)}))}))).forEach((function(t,e){t.forEach((function(r,n){Z(r)&&(i[e]+=r*("-"===t[n-1]?-1:1))}))})),i}var ot={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(t){var e=t.placement,r=e.split("-")[0],n=e.split("-")[1];if(n){var i=t.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(r),u=s?"left":"top",l=s?"width":"height",c={start:M({},u,o[u]),end:M({},u,o[u]+o[l]-a[l])};t.offsets.popper=E({},a,c[n])}return t}},offset:{order:200,enabled:!0,fn:function(t,e){var r=e.offset,n=t.placement,i=t.offsets,o=i.popper,a=i.reference,s=n.split("-")[0],u=void 0;return u=Z(+r)?[+r,0]:it(r,o,a,s),"left"===s?(o.top+=u[0],o.left-=u[1]):"right"===s?(o.top+=u[0],o.left+=u[1]):"top"===s?(o.left+=u[0],o.top-=u[1]):"bottom"===s&&(o.left+=u[0],o.top+=u[1]),t.popper=o,t},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(t,e){var r=e.boundariesElement||d(t.instance.popper);t.instance.reference===r&&(r=d(r));var n=H("transform"),i=t.instance.popper.style,o=i.top,a=i.left,s=i[n];i.top="",i.left="",i[n]="";var u=D(t.instance.popper,t.instance.reference,e.padding,r,t.positionFixed);i.top=o,i.left=a,i[n]=s,e.boundaries=u;var l=e.priority,c=t.offsets.popper,f={primary:function(t){var r=c[t];return c[t]u[t]&&!e.escapeWithReference&&(n=Math.min(c[r],u[t]-("right"===t?c.width:c.height))),M({},r,n)}};return l.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";c=E({},c,f[e](t))})),t.offsets.popper=c,t},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(t){var e=t.offsets,r=e.popper,n=e.reference,i=t.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",u=a?"left":"top",l=a?"width":"height";return r[s]o(n[s])&&(t.offsets.popper[u]=o(n[s])),t}},arrow:{order:500,enabled:!0,fn:function(t,e){var r;if(!X(t.instance.modifiers,"arrow","keepTogether"))return t;var n=e.element;if("string"===typeof n){if(!(n=t.instance.popper.querySelector(n)))return t}else if(!t.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var i=t.placement.split("-")[0],o=t.offsets,s=o.popper,u=o.reference,l=-1!==["left","right"].indexOf(i),c=l?"height":"width",f=l?"Top":"Left",h=f.toLowerCase(),d=l?"left":"top",p=l?"bottom":"right",m=F(n)[c];u[p]-ms[p]&&(t.offsets.popper[h]+=u[h]+m-s[p]),t.offsets.popper=k(t.offsets.popper);var g=u[h]+u[c]/2-m/2,v=a(t.instance.popper),b=parseFloat(v["margin"+f]),y=parseFloat(v["border"+f+"Width"]),w=g-t.offsets.popper[h]-b-y;return w=Math.max(Math.min(s[c]-m,w),0),t.arrowElement=n,t.offsets.arrow=(M(r={},h,Math.round(w)),M(r,d,""),r),t},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(t,e){if(U(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var r=D(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),n=t.placement.split("-")[0],i=B(n),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case et:a=[n,i];break;case rt:a=tt(n);break;case nt:a=tt(n,!0);break;default:a=e.behavior}return a.forEach((function(s,u){if(n!==s||a.length===u+1)return t;n=t.placement.split("-")[0],i=B(n);var l=t.offsets.popper,c=t.offsets.reference,f=Math.floor,h="left"===n&&f(l.right)>f(c.left)||"right"===n&&f(l.left)f(c.top)||"bottom"===n&&f(l.top)f(r.right),m=f(l.top)f(r.bottom),v="left"===n&&d||"right"===n&&p||"top"===n&&m||"bottom"===n&&g,b=-1!==["top","bottom"].indexOf(n),y=!!e.flipVariations&&(b&&"start"===o&&d||b&&"end"===o&&p||!b&&"start"===o&&m||!b&&"end"===o&&g),w=!!e.flipVariationsByContent&&(b&&"start"===o&&p||b&&"end"===o&&d||!b&&"start"===o&&g||!b&&"end"===o&&m),_=y||w;(h||v||_)&&(t.flipped=!0,(h||v)&&(n=a[u+1]),_&&(o=function(t){return"end"===t?"start":"start"===t?"end":t}(o)),t.placement=n+(o?"-"+o:""),t.offsets.popper=E({},t.offsets.popper,j(t.instance.popper,t.offsets.reference,t.placement)),t=L(t.instance.modifiers,t,"flip"))})),t},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(t){var e=t.placement,r=e.split("-")[0],n=t.offsets,i=n.popper,o=n.reference,a=-1!==["left","right"].indexOf(r),s=-1===["top","left"].indexOf(r);return i[a?"left":"top"]=o[r]-(s?i[a?"width":"height"]:0),t.placement=B(e),t.offsets.popper=k(i),t}},hide:{order:800,enabled:!0,fn:function(t){if(!X(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,r=N(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomr.right||e.top>r.bottom||e.right2&&void 0!==arguments[2]?arguments[2]:{};_(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=i(this.update.bind(this)),this.options=E({},t.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(E({},t.Defaults.modifiers,a.modifiers)).forEach((function(e){n.options.modifiers[e]=E({},t.Defaults.modifiers[e]||{},a.modifiers?a.modifiers[e]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(t){return E({name:t},n.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})),this.modifiers.forEach((function(t){t.enabled&&o(t.onLoad)&&t.onLoad(n.reference,n.popper,n.options,t,n.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return x(t,[{key:"update",value:function(){return z.call(this)}},{key:"destroy",value:function(){return W.call(this)}},{key:"enableEventListeners",value:function(){return V.call(this)}},{key:"disableEventListeners",value:function(){return Y.call(this)}}]),t}();at.Utils=("undefined"!==typeof window?window:t).PopperUtils,at.placements=J,at.Defaults=ot,e.a=at}).call(this,r(20))},function(t,e,r){"use strict";t.exports=r(487)},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(144);function i(t){if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=Object(n.a)(t))){var e=0,r=function(){};return{s:r,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o,a=!0,s=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==i.return||i.return()}finally{if(s)throw o}}}}},function(t,e,r){"use strict";var n=r(27);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(514)),o=n(r(568)),a=n(r(604)),s=(0,i.default)({types:[o.default],plugins:[a.default]});e.default=s},,function(t,e,r){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=((n=r(657))&&n.__esModule?n:{default:n}).default;e.default=i},function(t,e,r){"use strict";(function(t){var n=r(0),i=r.n(n),o=r(16),a=r(1),s=r.n(a),u="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof t?t:{};function l(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(r,n){t=r,e.forEach((function(e){return e(t,n)}))}}}var c=i.a.createContext||function(t,e){var r,i,a="__create-react-context-"+function(){var t="__global_unique_id__";return u[t]=(u[t]||0)+1}()+"__",c=function(t){function r(){var e;return(e=t.apply(this,arguments)||this).emitter=l(e.props.value),e}Object(o.a)(r,t);var n=r.prototype;return n.getChildContext=function(){var t;return(t={})[a]=this.emitter,t},n.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var r,n=this.props.value,i=t.value;((o=n)===(a=i)?0!==o||1/o===1/a:o!==o&&a!==a)?r=0:(r="function"===typeof e?e(n,i):1073741823,0!==(r|=0)&&this.emitter.set(t.value,r))}var o,a},n.render=function(){return this.props.children},r}(n.Component);c.childContextTypes=((r={})[a]=s.a.object.isRequired,r);var f=function(e){function r(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,r){0!==((0|t.observedBits)&r)&&t.setState({value:t.getValue()})},t}Object(o.a)(r,e);var n=r.prototype;return n.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=void 0===e||null===e?1073741823:e},n.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=void 0===t||null===t?1073741823:t},n.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},n.getValue=function(){return this.context[a]?this.context[a].get():t},n.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},r}(n.Component);return f.contextTypes=((i={})[a]=s.a.object,i),{Provider:c,Consumer:f}};e.a=c}).call(this,r(20))},function(t,e,r){var n=r(674);t.exports=d,t.exports.parse=o,t.exports.compile=function(t,e){return s(o(t,e),e)},t.exports.tokensToFunction=s,t.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(t,e){for(var r,n=[],o=0,a=0,s="",c=e&&e.delimiter||"/";null!=(r=i.exec(t));){var f=r[0],h=r[1],d=r.index;if(s+=t.slice(a,d),a=d+f.length,h)s+=h[1];else{var p=t[a],m=r[2],g=r[3],v=r[4],b=r[5],y=r[6],w=r[7];s&&(n.push(s),s="");var _=null!=m&&null!=p&&p!==m,x="+"===y||"*"===y,M="?"===y||"*"===y,E=r[2]||c,k=v||b;n.push({name:g||o++,prefix:m||"",delimiter:E,optional:M,repeat:x,partial:_,asterisk:!!w,pattern:k?l(k):w?".*":"[^"+u(E)+"]+?"})}}return a0&&void 0!==arguments[0]?arguments[0]:o,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.type,a=e.payload;if(r===i)return n({},t,{locationBeforeTransitions:a});return t};var i=e.LOCATION_CHANGE="@@router/LOCATION_CHANGE",o={locationBeforeTransitions:null}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=e.CALL_HISTORY_METHOD="@@router/CALL_HISTORY_METHOD";function i(t){return function(){for(var e=arguments.length,r=Array(e),i=0;i=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;_(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:M(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=n}catch(i){Function("r","regeneratorRuntime = r")(n)}},function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=l}return(d?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,l=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,l-=8);t[r+d-p]|=128*m}},function(t,e,r){!function(e,n){var i;t.exports=(i=r(32),function(){if("function"==typeof ArrayBuffer){var t=i.lib.WordArray,e=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!==typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,n=[],i=0;i>>2]|=t[i]<<24-i%4*8;e.call(this,n,r)}else e.apply(this,arguments)}).prototype=t}}(),i.lib.WordArray)}()},function(t,e,r){var n=r(149);t.exports=function(t,e){e=e||{};var r=n.decode(t,e);if(!r)return null;var i=r.payload;if("string"===typeof i)try{var o=JSON.parse(i);null!==o&&"object"===typeof o&&(i=o)}catch(a){}return!0===e.complete?{header:r.header,payload:i,signature:r.signature}:i}},function(t,e,r){(function(e){var n=r(14).Buffer,i=r(61);function o(t){if(this.buffer=null,this.writable=!0,this.readable=!0,!t)return this.buffer=n.alloc(0),this;if("function"===typeof t.pipe)return this.buffer=n.alloc(0),t.pipe(this),this;if(t.length||"object"===typeof t)return this.buffer=t,this.writable=!1,e.nextTick(function(){this.emit("end",t),this.readable=!1,this.emit("close")}.bind(this)),this;throw new TypeError("Unexpected data type ("+typeof t+")")}r(37).inherits(o,i),o.prototype.write=function(t){this.buffer=n.concat([this.buffer,n.from(t)]),this.emit("data",t)},o.prototype.end=function(t){t&&this.write(t),this.emit("end",t),this.emit("close"),this.writable=!1,this.readable=!1},t.exports=o}).call(this,r(18))},function(t,e,r){"use strict";(function(e,n){var i=r(63);t.exports=y;var o,a=r(148);y.ReadableState=b;r(62).EventEmitter;var s=function(t,e){return t.listeners(e).length},u=r(211),l=r(14).Buffer,c=e.Uint8Array||function(){};var f=Object.create(r(50));f.inherits=r(13);var h=r(362),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var p,m=r(363),g=r(212);f.inherits(y,u);var v=["error","close","destroy","pause","resume"];function b(t,e){t=t||{};var n=e instanceof(o=o||r(78));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(79).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function y(t){if(o=o||r(78),!(this instanceof y))return new y(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,r,n,i){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,M(t)}(t,a)):(i||(o=function(t,e){var r;n=e,l.isBuffer(n)||n instanceof c||"string"===typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===l.prototype||(e=function(t){return l.from(t)}(e)),n?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?_(t,a,e,!1):k(t,a)):_(t,a,e,!1))):n||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function M(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(E,t):E(t))}function E(t){d("emit readable"),t.emit("readable"),O(t)}function k(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(S,t,e))}function S(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=l.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0===(t-=a)){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function D(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(P,e,t))}function P(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function I(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?D(this):M(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&D(this),null;var n,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t0?T(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&D(this)),null!==n&&this.emit("data",n),n},y.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?c:y;function l(e,n){d("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),t.removeListener("close",v),t.removeListener("finish",b),t.removeListener("drain",f),t.removeListener("error",g),t.removeListener("unpipe",l),r.removeListener("end",c),r.removeListener("end",y),r.removeListener("data",m),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function c(){d("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",l);var f=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,O(t))}}(r);t.on("drain",f);var h=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==I(o.pipes,t))&&!h&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function g(e){d("onerror",e),y(),t.removeListener("error",g),0===s(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",b),y()}function b(){d("onfinish"),t.removeListener("close",v),y()}function y(){d("unpipe"),r.unpipe(t)}return r.on("data",m),function(t,e,r){if("function"===typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",v),t.once("finish",b),t.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),t},y.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,r){(e=t.exports=r(217)).Stream=e,e.Readable=e,e.Writable=r(221),e.Duplex=r(88),e.Transform=r(222),e.PassThrough=r(382),e.finished=r(155),e.pipeline=r(383)},function(t,e,r){"use strict";(function(e,n){var i;t.exports=k,k.ReadableState=E;r(62).EventEmitter;var o=function(t,e){return t.listeners(e).length},a=r(218),s=r(5).Buffer,u=e.Uint8Array||function(){};var l,c=r(377);l=c&&c.debuglog?c.debuglog("stream"):function(){};var f,h,d,p=r(378),m=r(219),g=r(220).getHighWaterMark,v=r(87).codes,b=v.ERR_INVALID_ARG_TYPE,y=v.ERR_STREAM_PUSH_AFTER_EOF,w=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(13)(k,a);var x=m.errorOrDestroy,M=["error","close","destroy","pause","resume"];function E(t,e,n){i=i||r(88),t=t||{},"boolean"!==typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=r(79).StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function k(t){if(i=i||r(88),!(this instanceof k))return new k(t);var e=this instanceof i;this._readableState=new E(t,this,e),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function S(t,e,r,n,i){l("readableAddChunk",e);var o,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(l("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?O(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,T(t)))}(t,a);else if(i||(o=function(t,e){var r;n=e,s.isBuffer(n)||n instanceof u||"string"===typeof e||void 0===e||t.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(a,e)),o)x(t,o);else if(a.objectMode||e&&e.length>0)if("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)a.endEmitted?x(t,new _):A(t,a,e,!0);else if(a.ended)x(t,new y);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?A(t,a,e,!1):D(t,a)):A(t,a,e,!1)}else n||(a.reading=!1,D(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function O(t){var e=t._readableState;l("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(T,t))}function T(t){var e=t._readableState;l("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function D(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(P,t,e))}function P(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function R(t){l("readable nexttick read 0"),t.read(0)}function F(t,e){l("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(l("flow",e.flowing);e.flowing&&null!==t.read(););}function j(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function N(t){var e=t._readableState;l("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(L,e,t))}function L(t,e){if(l("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function z(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):O(this),null;if(0===(t=C(t,e))&&e.ended)return 0===e.length&&N(this),null;var n,i=e.needReadable;return l("need readable",i),(0===e.length||e.length-t0?j(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&N(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(t){x(this,new w("_read()"))},k.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,l("pipe count=%d opts=%j",i.pipesCount,e);var a=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:g;function s(e,n){l("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,l("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",c),t.removeListener("error",d),t.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",h),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function u(){l("onend"),t.end()}i.endEmitted?n.nextTick(a):r.once("end",a),t.on("unpipe",s);var c=function(t){return function(){var e=t._readableState;l("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",c);var f=!1;function h(e){l("ondata");var n=t.write(e);l("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==z(i.pipes,t))&&!f&&(l("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){l("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&x(t,e)}function p(){t.removeListener("finish",m),g()}function m(){l("onfinish"),t.removeListener("close",p),g()}function g(){l("unpipe"),r.unpipe(t)}return r.on("data",h),function(t,e,r){if("function"===typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",r),i.flowing||(l("pipe resume"),r.resume()),t},k.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,l("on readable",i.length,i.reading),i.length?O(this):i.reading||n.nextTick(R,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(t,e){var r=a.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(I,this),r},k.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(I,this),e},k.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(F,t,e))}(this,t)),t.paused=!1,this},k.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(l("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(l("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause())))})),t)void 0===this[i]&&"function"===typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(t,e,r){r(new m("_write()"))},k.prototype._writev=null,k.prototype.end=function(t,e,r){var i=this._writableState;return"function"===typeof t?(r=t,t=null,e=null):"function"===typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,D(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(t,e){e(t)}}).call(this,r(20),r(18))},function(t,e,r){"use strict";t.exports=c;var n=r(87).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(88);function l(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function h(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,v=0;v<16;++v)r[v]=t.readInt32BE(4*v);for(;v<64;++v)r[v]=0|(((e=r[v-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[v-7]+d(r[v-15])+r[v-16];for(var b=0;b<64;++b){var y=g+h(u)+l(u,p,m)+a[b]+r[b]|0,w=f(n)+c(n,i,o)|0;g=m,m=p,p=u,u=s+y|0,s=o,o=i,i=n,n=y+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,r){var n=r(13),i=r(89),o=r(14).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function l(t,e,r){return r^t&(e^r)}function c(t,e,r){return t&e|r&(t|e)}function f(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function h(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function v(t,e){return t>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,b=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,x=0|this._cl,M=0|this._dl,E=0|this._el,k=0|this._fl,S=0|this._gl,A=0|this._hl,C=0;C<32;C+=2)e[C]=t.readInt32BE(4*C),e[C+1]=t.readInt32BE(4*C+4);for(;C<160;C+=2){var O=e[C-30],T=e[C-30+1],D=d(O,T),P=p(T,O),I=m(O=e[C-4],T=e[C-4+1]),R=g(T,O),F=e[C-14],B=e[C-14+1],j=e[C-32],N=e[C-32+1],L=P+B|0,z=D+F+v(L,P)|0;z=(z=z+I+v(L=L+R|0,R)|0)+j+v(L=L+N|0,N)|0,e[C]=z,e[C+1]=L}for(var U=0;U<160;U+=2){z=e[U],L=e[U+1];var H=c(r,n,i),W=c(w,_,x),q=f(r,w),G=f(w,r),V=h(s,E),Y=h(E,s),Z=a[U],K=a[U+1],$=l(s,u,b),X=l(E,k,S),J=A+Y|0,Q=y+V+v(J,A)|0;Q=(Q=(Q=Q+$+v(J=J+X|0,X)|0)+Z+v(J=J+K|0,K)|0)+z+v(J=J+L|0,L)|0;var tt=G+W|0,et=q+H+v(tt,G)|0;y=b,A=S,b=u,S=k,u=s,k=E,s=o+Q+v(E=M+J|0,M)|0,o=i,M=x,i=n,x=_,n=r,_=w,r=Q+et+v(w=J+tt|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+x|0,this._dl=this._dl+M|0,this._el=this._el+E|0,this._fl=this._fl+k|0,this._gl=this._gl+S|0,this._hl=this._hl+A|0,this._ah=this._ah+r+v(this._al,w)|0,this._bh=this._bh+n+v(this._bl,_)|0,this._ch=this._ch+i+v(this._cl,x)|0,this._dh=this._dh+o+v(this._dl,M)|0,this._eh=this._eh+s+v(this._el,E)|0,this._fh=this._fh+u+v(this._fl,k)|0,this._gh=this._gh+b+v(this._gl,S)|0,this._hh=this._hh+y+v(this._hl,A)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,r){"use strict";var n=r(13),i=r(388),o=r(64),a=r(14).Buffer,s=r(226),u=r(156),l=r(157),c=a.alloc(128);function f(t,e){o.call(this,"digest"),"string"===typeof e&&(e=a.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new u:l(t)).update(e).digest():e.lengthr||e!==e)throw new TypeError("Bad key length")}},function(t,e,r){(function(e){var r;if(e.browser)r="utf-8";else if(e.version){r=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";t.exports=r}).call(this,r(18))},function(t,e,r){var n=r(226),i=r(156),o=r(157),a=r(14).Buffer,s=r(229),u=r(230),l=r(232),c=a.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(t,e,r){var s=function(t){function e(e){return o(t).update(e).digest()}return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?n:e}(t),u="sha512"===t||"sha384"===t?128:64;e.length>u?e=s(e):e.length>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=e>>>s+a&1,i<<=1,i|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,r,i){for(var o=0,a=0,s=n.length>>>1,u=0;u>>n[u]&1;for(u=s;u>>n[u]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},e.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(t>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(e>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r>>o[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.length>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,t.keys,a)}},u.prototype._update=function(t,e,r,n){var i=this._desState,a=o.readUInt32BE(t,e),s=o.readUInt32BE(t,e+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n>>0,a=h}o.rip(s,a,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var a=r,s=e,u=t.keys.length-2;u>=0;u-=2){var l=t.keys[u],c=t.keys[u+1];o.expand(a,t.tmp,0),l^=t.tmp[0],c^=t.tmp[1];var f=o.substitute(l,c),h=a;a=(s^o.permute(f))>>>0,s=h}o.rip(a,s,n,i)}},function(t,e,r){var n=r(108),i=r(14).Buffer,o=r(236);function a(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var s=0;st;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(l))for(;r.mod(c).cmp(f);)r.iadd(d)}else for(;r.mod(o).cmp(h);)r.iadd(d);if(g(p=r.shrn(1))&&g(r)&&v(p)&&v(r)&&a.test(p)&&a.test(r))return r}}},function(t,e,r){(function(t){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var a;"object"===typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=r(407).Buffer}catch(E){}function s(t,e,r){for(var n=0,i=Math.min(t.length,r),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,l=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,f=67108863&u,h=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=h;d++){var p=l-d|0;c+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=c[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:l[h-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,l=new t(o),c=this.clone();if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,x=0|a[4],M=8191&x,E=x>>>13,k=0|a[5],S=8191&k,A=k>>>13,C=0|a[6],O=8191&C,T=C>>>13,D=0|a[7],P=8191&D,I=D>>>13,R=0|a[8],F=8191&R,B=R>>>13,j=0|a[9],N=8191&j,L=j>>>13,z=0|s[0],U=8191&z,H=z>>>13,W=0|s[1],q=8191&W,G=W>>>13,V=0|s[2],Y=8191&V,Z=V>>>13,K=0|s[3],$=8191&K,X=K>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,ct=0|s[8],ft=8191&ct,ht=ct>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(l+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(h,U)|0))<<13)|0;l=((o=Math.imul(h,H))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,H))+Math.imul(m,U)|0,o=Math.imul(m,H);var vt=(l+(n=n+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,q)|0))<<13)|0;l=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,H))+Math.imul(b,U)|0,o=Math.imul(b,H),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,G)|0;var bt=(l+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,Y)|0))<<13)|0;l=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,H))+Math.imul(_,U)|0,o=Math.imul(_,H),n=n+Math.imul(v,q)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(l+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,$)|0))<<13)|0;l=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,H))+Math.imul(E,U)|0,o=Math.imul(E,H),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,X)|0;var wt=(l+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,Q)|0))<<13)|0;l=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(S,U),i=(i=Math.imul(S,H))+Math.imul(A,U)|0,o=Math.imul(A,H),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;l=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,H))+Math.imul(T,U)|0,o=Math.imul(T,H),n=n+Math.imul(S,q)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var xt=(l+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;l=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,H))+Math.imul(I,U)|0,o=Math.imul(I,H),n=n+Math.imul(O,q)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(l+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(h,ut)|0))<<13)|0;l=((o=o+Math.imul(h,lt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,H))+Math.imul(B,U)|0,o=Math.imul(B,H),n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var Et=(l+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;l=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,H))+Math.imul(L,U)|0,o=Math.imul(L,H),n=n+Math.imul(F,q)|0,i=(i=i+Math.imul(F,G)|0)+Math.imul(B,q)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,lt)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ht)|0;var kt=(l+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,pt)|0))<<13)|0;l=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,G))+Math.imul(L,q)|0,o=Math.imul(L,G),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var St=(l+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,Y),i=(i=Math.imul(N,Z))+Math.imul(L,Y)|0,o=Math.imul(L,Z),n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,lt)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ht)|0;var At=(l+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;l=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,$),i=(i=Math.imul(N,X))+Math.imul(L,$)|0,o=Math.imul(L,X),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,lt)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,ht)|0;var Ct=(l+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,lt)|0,n=n+Math.imul(S,ft)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,ht)|0;var Ot=(l+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(E,pt)|0))<<13)|0;l=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(L,rt)|0,o=Math.imul(L,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,lt)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(T,ft)|0,o=o+Math.imul(T,ht)|0;var Tt=(l+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(A,pt)|0))<<13)|0;l=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,at))+Math.imul(L,ot)|0,o=Math.imul(L,at),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,lt)|0,n=n+Math.imul(P,ft)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var Dt=(l+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;l=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,lt))+Math.imul(L,ut)|0,o=Math.imul(L,lt),n=n+Math.imul(F,ft)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Pt=(l+(n=n+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(I,pt)|0))<<13)|0;l=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(N,ft),i=(i=Math.imul(N,ht))+Math.imul(L,ft)|0,o=Math.imul(L,ht);var It=(l+(n=n+Math.imul(F,pt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(B,pt)|0))<<13)|0;l=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(l+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,mt))+Math.imul(L,pt)|0))<<13)|0;return l=((o=Math.imul(L,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=gt,u[1]=vt,u[2]=bt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=xt,u[7]=Mt,u[8]=Et,u[9]=kt,u[10]=St,u[11]=At,u[12]=Ct,u[13]=Ot,u[14]=Tt,u[15]=Dt,u[16]=Pt,u[17]=It,u[18]=Rt,0!==l&&(u[19]=l,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?h(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(l)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0===(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(b,v),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var l=e.words[n],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,x),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(53)(t))},function(t,e,r){var n=r(408),i=r(161);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),a=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var l=t.shrn(u),c=s.toRed(o);e>0;e--){var f=this._randrange(new n(2),s);r&&r(f);var h=f.toRed(o).redPow(l);if(0!==h.cmp(a)&&0!==h.cmp(c)){for(var d=1;d0;e--){var c=this._randrange(new n(2),a),f=t.gcd(c);if(0!==f.cmpn(1))return f;var h=c.toRed(i).redPow(u);if(0!==h.cmp(o)&&0!==h.cmp(l)){for(var d=1;d>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(t,e){return"hex"===e?o(t):t}},function(t,e,r){"use strict";var n=e;n.base=r(126),n.short=r(418),n.mont=r(419),n.edwards=r(420)},function(t,e,r){"use strict";var n=r(51).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function a(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?a(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=a,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},function(t,e,r){"use strict";var n=r(51),i=r(109),o=r(245),a=r(41),s=n.sum32,u=n.sum32_4,l=n.sum32_5,c=o.ch32,f=o.maj32,h=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,v=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(b,g),t.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"===typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"===typeof t)return this._initNumber(t,e,r);if("object"===typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"===typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,l=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var l=1;l>>26,f=67108863&u,h=Math.min(l,e.length-1),d=Math.max(0,l-t.length+1);d<=h;d++){var p=l-d|0;c+=(a=(i=0|t.words[p])*(o=0|e.words[d])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=c[t],d=f[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:l[h-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n("undefined"!==typeof a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,l=new t(o),c=this.clone();if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0===(8191&e)&&(r+=13,e>>>=13),0===(127&e)&&(r+=7,e>>>=7),0===(15&e)&&(r+=4,e>>>=4),0===(3&e)&&(r+=2,e>>>=2),0===(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"===typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"===typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],w=8191&y,_=y>>>13,x=0|a[4],M=8191&x,E=x>>>13,k=0|a[5],S=8191&k,A=k>>>13,C=0|a[6],O=8191&C,T=C>>>13,D=0|a[7],P=8191&D,I=D>>>13,R=0|a[8],F=8191&R,B=R>>>13,j=0|a[9],N=8191&j,L=j>>>13,z=0|s[0],U=8191&z,H=z>>>13,W=0|s[1],q=8191&W,G=W>>>13,V=0|s[2],Y=8191&V,Z=V>>>13,K=0|s[3],$=8191&K,X=K>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,lt=st>>>13,ct=0|s[8],ft=8191&ct,ht=ct>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(l+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(h,U)|0))<<13)|0;l=((o=Math.imul(h,H))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,H))+Math.imul(m,U)|0,o=Math.imul(m,H);var vt=(l+(n=n+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,q)|0))<<13)|0;l=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,H))+Math.imul(b,U)|0,o=Math.imul(b,H),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,G)|0;var bt=(l+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,Y)|0))<<13)|0;l=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,H))+Math.imul(_,U)|0,o=Math.imul(_,H),n=n+Math.imul(v,q)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(b,q)|0,o=o+Math.imul(b,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var yt=(l+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,$)|0))<<13)|0;l=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,H))+Math.imul(E,U)|0,o=Math.imul(E,H),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(v,Y)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,X)|0;var wt=(l+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,Q)|0))<<13)|0;l=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(S,U),i=(i=Math.imul(S,H))+Math.imul(A,U)|0,o=Math.imul(A,H),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(l+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;l=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,H))+Math.imul(T,U)|0,o=Math.imul(T,H),n=n+Math.imul(S,q)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,$)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var xt=(l+(n=n+Math.imul(f,ot)|0)|0)+((8191&(i=(i=i+Math.imul(f,at)|0)+Math.imul(h,ot)|0))<<13)|0;l=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,H))+Math.imul(I,U)|0,o=Math.imul(I,H),n=n+Math.imul(O,q)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,Z)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(l+(n=n+Math.imul(f,ut)|0)|0)+((8191&(i=(i=i+Math.imul(f,lt)|0)+Math.imul(h,ut)|0))<<13)|0;l=((o=o+Math.imul(h,lt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,H))+Math.imul(B,U)|0,o=Math.imul(B,H),n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(I,q)|0,o=o+Math.imul(I,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,n=n+Math.imul(S,$)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,lt)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,lt)|0;var Et=(l+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;l=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,U),i=(i=Math.imul(N,H))+Math.imul(L,U)|0,o=Math.imul(L,H),n=n+Math.imul(F,q)|0,i=(i=i+Math.imul(F,G)|0)+Math.imul(B,q)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(O,$)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(T,$)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,lt)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,lt)|0,n=n+Math.imul(p,ft)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ft)|0,o=o+Math.imul(m,ht)|0;var kt=(l+(n=n+Math.imul(f,pt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,pt)|0))<<13)|0;l=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,G))+Math.imul(L,q)|0,o=Math.imul(L,G),n=n+Math.imul(F,Y)|0,i=(i=i+Math.imul(F,Z)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,lt)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ft)|0,o=o+Math.imul(b,ht)|0;var St=(l+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;l=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(N,Y),i=(i=Math.imul(N,Z))+Math.imul(L,Y)|0,o=Math.imul(L,Z),n=n+Math.imul(F,$)|0,i=(i=i+Math.imul(F,X)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,lt)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,lt)|0,n=n+Math.imul(w,ft)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ft)|0,o=o+Math.imul(_,ht)|0;var At=(l+(n=n+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;l=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,$),i=(i=Math.imul(N,X))+Math.imul(L,$)|0,o=Math.imul(L,X),n=n+Math.imul(F,Q)|0,i=(i=i+Math.imul(F,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,n=n+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,lt)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,lt)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(E,ft)|0,o=o+Math.imul(E,ht)|0;var Ct=(l+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;l=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),n=n+Math.imul(F,rt)|0,i=(i=i+Math.imul(F,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,n=n+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,lt)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,lt)|0,n=n+Math.imul(S,ft)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(A,ft)|0,o=o+Math.imul(A,ht)|0;var Ot=(l+(n=n+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(E,pt)|0))<<13)|0;l=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(L,rt)|0,o=Math.imul(L,nt),n=n+Math.imul(F,ot)|0,i=(i=i+Math.imul(F,at)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,at)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,lt)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(T,ft)|0,o=o+Math.imul(T,ht)|0;var Tt=(l+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(A,pt)|0))<<13)|0;l=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,at))+Math.imul(L,ot)|0,o=Math.imul(L,at),n=n+Math.imul(F,ut)|0,i=(i=i+Math.imul(F,lt)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,lt)|0,n=n+Math.imul(P,ft)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(I,ft)|0,o=o+Math.imul(I,ht)|0;var Dt=(l+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(T,pt)|0))<<13)|0;l=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,n=Math.imul(N,ut),i=(i=Math.imul(N,lt))+Math.imul(L,ut)|0,o=Math.imul(L,lt),n=n+Math.imul(F,ft)|0,i=(i=i+Math.imul(F,ht)|0)+Math.imul(B,ft)|0,o=o+Math.imul(B,ht)|0;var Pt=(l+(n=n+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(I,pt)|0))<<13)|0;l=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(N,ft),i=(i=Math.imul(N,ht))+Math.imul(L,ft)|0,o=Math.imul(L,ht);var It=(l+(n=n+Math.imul(F,pt)|0)|0)+((8191&(i=(i=i+Math.imul(F,mt)|0)+Math.imul(B,pt)|0))<<13)|0;l=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(l+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,mt))+Math.imul(L,pt)|0))<<13)|0;return l=((o=Math.imul(L,mt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=gt,u[1]=vt,u[2]=bt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=xt,u[7]=Mt,u[8]=Et,u[9]=kt,u[10]=St,u[11]=At,u[12]=Ct,u[13]=Ot,u[14]=Tt,u[15]=Dt,u[16]=Pt,u[17]=It,u[18]=Rt,0!==l&&(u[19]=l,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?h(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n>=1;return n},m.prototype.permute=function(t,e,r,n,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,r[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==c||l>=i);l--){var f=0|this.words[l];this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"===typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"===typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,a=0|i.words[i.length-1];0!==(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]);var s,u=n.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var l=0;l=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++l;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var h=0,d=1;0===(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(c),a.isub(f)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),a.isub(u)):(r.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:r.iushln(l)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0===(e.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(e.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),a.isub(s)):(r.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"===typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"===typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(b,v),b.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new y;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},x.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2===1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u);for(var f=this.pow(c,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var l=e.words[n],c=u-1;c>=0;c--){var f=l>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==a?(a<<=1,a|=f,(4===++s||0===n&&0===c)&&(i=this.mul(i,r[a]),s=0,a=0)):s=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,x),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(53)(t))},function(t,e,r){"use strict";var n=e;n.der=r(251),n.pem=r(438)},function(t,e,r){"use strict";var n=r(13),i=r(168).Buffer,o=r(169),a=r(171);function s(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){o.call(this,"der",t)}function l(t){return t<10?"0"+t:t}t.exports=s,s.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(u,o),u.prototype._encodeComposite=function(t,e,r,n){var o=function(t,e,r,n){var i;"seqof"===t?t="seq":"setof"===t&&(t="set");if(a.tagByName.hasOwnProperty(t))i=a.tagByName[t];else{if("number"!==typeof t||(0|t)!==t)return n.error("Unknown tag: "+t);i=t}if(i>=31)return n.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(t,e,r,this.reporter);if(n.length<128){var s=i.alloc(2);return s[0]=o,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var u=1,l=n.length;l>=256;l>>=8)u++;var c=i.alloc(2+u);c[0]=o,c[1]=128|u;for(var f=1+u,h=n.length;h>0;f--,h>>=8)c[f]=255&h;return this._createEncoderBuffer([c,n])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=i.alloc(2*t.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}for(var a=0,s=0;s=128;u>>=7)a++}for(var l=i.alloc(a),c=l.length-1,f=t.length-1;f>=0;f--){var h=t[f];for(l[c--]=127&h;(h>>=7)>0;)l[c--]=128|127&h}return this._createEncoderBuffer(l)},u.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[l(n.getUTCFullYear()),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[l(n.getUTCFullYear()%100),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"===typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!==typeof t&&!i.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=i.from(r)}if(i.isBuffer(t)){var n=t.length;0===t.length&&n++;var o=i.alloc(n);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);for(var a=1,s=t;s>=256;s>>=8)a++;for(var u=new Array(a),l=u.length-1;l>=0;l--)u[l]=255&t,t>>=8;return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(i.from(u))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"===typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n>6],i=0===(32&r);if(31===(31&r)){var o=r;for(r=0;128===(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function f(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0===(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var o=0;o=8.0.0")}).call(this,r(18))},function(t,e,r){"use strict";var n=Array.prototype.slice,i=r(264),o=Object.keys,a=o?function(t){return o(t)}:r(470),s=Object.keys;a.shim=function(){Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return i(t)?s(n.call(t)):s(t)}):Object.keys=a;return Object.keys||a},t.exports=a},function(t,e,r){"use strict";var n=Object.prototype.toString;t.exports=function(t){var e=n.call(t),r="[object Arguments]"===e;return r||(r="[object Array]"!==e&&null!==t&&"object"===typeof t&&"number"===typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),r}},function(t,e,r){"use strict";var n=r(266),i=r(474),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(a,o);t.exports=function(){return s(n,a,arguments)},t.exports.apply=function(){return s(n,o,arguments)}},function(t,e,r){"use strict";var n=r(473);t.exports=Function.prototype.bind||n},function(t,e,r){"use strict";(function(e){var n=e.Symbol,i=r(475);t.exports=function(){return"function"===typeof n&&("function"===typeof Symbol&&("symbol"===typeof n("foo")&&("symbol"===typeof Symbol("bar")&&i())))}}).call(this,r(20))},function(t,e,r){"use strict";var n=function(t){return t!==t};t.exports=function(t,e){return 0===t&&0===e?1/t===1/e:t===e||!(!n(t)||!n(e))}},function(t,e,r){"use strict";var n=r(268);t.exports=function(){return"function"===typeof Object.is?Object.is:n}},function(t,e,r){"use strict";var n=Object,i=TypeError;t.exports=function(){if(null!=this&&this!==n(this))throw new i("RegExp.prototype.flags getter called on non-object");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t}},function(t,e,r){"use strict";var n=r(270),i=r(111).supportsDescriptors,o=Object.getOwnPropertyDescriptor,a=TypeError;t.exports=function(){if(!i)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var t=o(RegExp.prototype,"flags");if(t&&"function"===typeof t.get&&"boolean"===typeof/a/.dotAll)return t.get}return n}},function(t,e,r){"use strict";e.__esModule=!0,e.default=e.EXITING=e.ENTERED=e.ENTERING=e.EXITED=e.UNMOUNTED=void 0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};n.get||n.set?Object.defineProperty(e,r,n):e[r]=t[r]}return e.default=t,e}(r(1)),i=s(r(0)),o=s(r(66)),a=r(273);r(274);function s(t){return t&&t.__esModule?t:{default:t}}e.UNMOUNTED="unmounted";e.EXITED="exited";e.ENTERING="entering";e.ENTERED="entered";e.EXITING="exiting";var u=function(t){var e,r;function n(e,r){var n;n=t.call(this,e,r)||this;var i,o=r.transitionGroup,a=o&&!o.isMounting?e.enter:e.appear;return n.appearStatus=null,e.in?a?(i="exited",n.appearStatus="entering"):i="entered":i=e.unmountOnExit||e.mountOnEnter?"unmounted":"exited",n.state={status:i},n.nextCallback=null,n}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var a=n.prototype;return a.getChildContext=function(){return{transitionGroup:null}},n.getDerivedStateFromProps=function(t,e){return t.in&&"unmounted"===e.status?{status:"exited"}:null},a.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},a.componentDidUpdate=function(t){var e=null;if(t!==this.props){var r=this.state.status;this.props.in?"entering"!==r&&"entered"!==r&&(e="entering"):"entering"!==r&&"entered"!==r||(e="exiting")}this.updateStatus(!1,e)},a.componentWillUnmount=function(){this.cancelNextCallback()},a.getTimeouts=function(){var t,e,r,n=this.props.timeout;return t=e=r=n,null!=n&&"number"!==typeof n&&(t=n.exit,e=n.enter,r=void 0!==n.appear?n.appear:e),{exit:t,enter:e,appear:r}},a.updateStatus=function(t,e){if(void 0===t&&(t=!1),null!==e){this.cancelNextCallback();var r=o.default.findDOMNode(this);"entering"===e?this.performEnter(r,t):this.performExit(r)}else this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},a.performEnter=function(t,e){var r=this,n=this.props.enter,i=this.context.transitionGroup?this.context.transitionGroup.isMounting:e,o=this.getTimeouts(),a=i?o.appear:o.enter;e||n?(this.props.onEnter(t,i),this.safeSetState({status:"entering"},(function(){r.props.onEntering(t,i),r.onTransitionEnd(t,a,(function(){r.safeSetState({status:"entered"},(function(){r.props.onEntered(t,i)}))}))}))):this.safeSetState({status:"entered"},(function(){r.props.onEntered(t)}))},a.performExit=function(t){var e=this,r=this.props.exit,n=this.getTimeouts();r?(this.props.onExit(t),this.safeSetState({status:"exiting"},(function(){e.props.onExiting(t),e.onTransitionEnd(t,n.exit,(function(){e.safeSetState({status:"exited"},(function(){e.props.onExited(t)}))}))}))):this.safeSetState({status:"exited"},(function(){e.props.onExited(t)}))},a.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},a.safeSetState=function(t,e){e=this.setNextCallback(e),this.setState(t,e)},a.setNextCallback=function(t){var e=this,r=!0;return this.nextCallback=function(n){r&&(r=!1,e.nextCallback=null,t(n))},this.nextCallback.cancel=function(){r=!1},this.nextCallback},a.onTransitionEnd=function(t,e,r){this.setNextCallback(r);var n=null==e&&!this.props.addEndListener;t&&!n?(this.props.addEndListener&&this.props.addEndListener(t,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},a.render=function(){var t=this.state.status;if("unmounted"===t)return null;var e=this.props,r=e.children,n=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i}(e,["children"]);if(delete n.in,delete n.mountOnEnter,delete n.unmountOnExit,delete n.appear,delete n.enter,delete n.exit,delete n.timeout,delete n.addEndListener,delete n.onEnter,delete n.onEntering,delete n.onEntered,delete n.onExit,delete n.onExiting,delete n.onExited,"function"===typeof r)return r(t,n);var o=i.default.Children.only(r);return i.default.cloneElement(o,n)},n}(i.default.Component);function l(){}u.contextTypes={transitionGroup:n.object},u.childContextTypes={transitionGroup:function(){}},u.propTypes={},u.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:l,onEntering:l,onEntered:l,onExit:l,onExiting:l,onExited:l},u.UNMOUNTED=0,u.EXITED=1,u.ENTERING=2,u.ENTERED=3,u.EXITING=4;var c=(0,a.polyfill)(u);e.default=c},function(t,e,r){"use strict";function n(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);null!==t&&void 0!==t&&this.setState(t)}function i(t){this.setState(function(e){var r=this.constructor.getDerivedStateFromProps(t,e);return null!==r&&void 0!==r?r:null}.bind(this))}function o(t,e){try{var r=this.props,n=this.state;this.props=t,this.state=e,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,n)}finally{this.props=r,this.state=n}}function a(t){var e=t.prototype;if(!e||!e.isReactComponent)throw new Error("Can only polyfill class components");if("function"!==typeof t.getDerivedStateFromProps&&"function"!==typeof e.getSnapshotBeforeUpdate)return t;var r=null,a=null,s=null;if("function"===typeof e.componentWillMount?r="componentWillMount":"function"===typeof e.UNSAFE_componentWillMount&&(r="UNSAFE_componentWillMount"),"function"===typeof e.componentWillReceiveProps?a="componentWillReceiveProps":"function"===typeof e.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"===typeof e.componentWillUpdate?s="componentWillUpdate":"function"===typeof e.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==r||null!==a||null!==s){var u=t.displayName||t.name,l="function"===typeof t.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+u+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==r?"\n "+r:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"===typeof t.getDerivedStateFromProps&&(e.componentWillMount=n,e.componentWillReceiveProps=i),"function"===typeof e.getSnapshotBeforeUpdate){if("function"!==typeof e.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");e.componentWillUpdate=o;var c=e.componentDidUpdate;e.componentDidUpdate=function(t,e,r){var n=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:r;c.call(this,t,e,n)}}return t}r.r(e),r.d(e,"polyfill",(function(){return a})),n.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0},function(t,e,r){"use strict";e.__esModule=!0,e.classNamesShape=e.timeoutsShape=void 0;var n;(n=r(1))&&n.__esModule;e.timeoutsShape=null;e.classNamesShape=null},function(t,e,r){"use strict";e.__esModule=!0,e.default=void 0;var n=s(r(1)),i=s(r(0)),o=r(273),a=r(486);function s(t){return t&&t.__esModule?t:{default:t}}function u(){return(u=Object.assign||function(t){for(var e=1;e=0||(i[r]=t[r]);return i}(t,["component","childFactory"]),o=c(this.state.children).map(r);return delete n.appear,delete n.enter,delete n.exit,null===e?o:i.default.createElement(e,n,o)},n}(i.default.Component);f.childContextTypes={transitionGroup:n.default.object.isRequired},f.propTypes={},f.defaultProps={component:"div",childFactory:function(t){return t}};var h=(0,o.polyfill)(f);e.default=h,t.exports=e.default},function(t,e,r){!function(t){"use strict";t.defineMode("markdown",(function(e,r){var n=t.getMode(e,"text/html"),i="null"==n.name;void 0===r.highlightFormatting&&(r.highlightFormatting=!1),void 0===r.maxBlockquoteDepth&&(r.maxBlockquoteDepth=0),void 0===r.taskLists&&(r.taskLists=!1),void 0===r.strikethrough&&(r.strikethrough=!1),void 0===r.emoji&&(r.emoji=!1),void 0===r.fencedCodeBlockHighlighting&&(r.fencedCodeBlockHighlighting=!0),void 0===r.fencedCodeBlockDefaultMode&&(r.fencedCodeBlockDefaultMode="text/plain"),void 0===r.xml&&(r.xml=!0),void 0===r.tokenTypeOverrides&&(r.tokenTypeOverrides={});var o={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var a in o)o.hasOwnProperty(a)&&r.tokenTypeOverrides[a]&&(o[a]=r.tokenTypeOverrides[a]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,u=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,l=/^\[(x| )\](?=\s)/i,c=r.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,f=/^ {0,3}(?:\={1,}|-{2,})\s*$/,h=/^[^#!\[\]*_\\<>` "'(~:]+/,d=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,p=/^\s*\[[^\]]+?\]:.*$/,m=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/;function g(t,e,r){return e.f=e.inline=r,r(t,e)}function v(t,e,r){return e.f=e.block=r,r(t,e)}function b(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==w){var r=i;if(!r){var o=t.innerMode(n,e.htmlState);r="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}r&&(e.f=E,e.block=y,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function y(n,i){var a,h=n.column()===i.indentation,m=!(a=i.prevLine.stream)||!/\S/.test(a.string),v=i.indentedCode,b=i.prevLine.hr,y=!1!==i.list,w=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var M=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,y)){for(i.list=null;M=4&&(v||i.prevLine.fencedCodeEnd||i.prevLine.header||m))return n.skipToEnd(),i.indentedCode=!0,o.code;if(n.eatSpace())return null;if(h&&i.indentation<=w&&(S=n.match(c))&&S[1].length<=6)return i.quote=0,i.header=S[1].length,i.thisLine.header=!0,r.highlightFormatting&&(i.formatting="header"),i.f=i.inline,x(i);if(i.indentation<=w&&n.eat(">"))return i.quote=h?1:i.quote+1,r.highlightFormatting&&(i.formatting="quote"),n.eatSpace(),x(i);if(!k&&!i.setext&&h&&i.indentation<=w&&(S=n.match(u))){var A=S[1]?"ol":"ul";return i.indentation=M+n.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,r.taskLists&&n.match(l,!1)&&(i.taskList=!0),i.f=i.inline,r.highlightFormatting&&(i.formatting=["list","list-"+A]),x(i)}return h&&i.indentation<=w&&(S=n.match(d,!0))?(i.quote=0,i.fencedEndRE=new RegExp(S[1]+"+ *$"),i.localMode=r.fencedCodeBlockHighlighting&&function(r){if(t.findModeByName){var n=t.findModeByName(r);n&&(r=n.mime||n.mimes[0])}var i=t.getMode(e,r);return"null"==i.name?null:i}(S[2]||r.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=t.startState(i.localMode)),i.f=i.block=_,r.highlightFormatting&&(i.formatting="code-block"),i.code=-1,x(i)):i.setext||!(E&&y||i.quote||!1!==i.list||i.code||k||p.test(n.string))&&(S=n.lookAhead(1))&&(S=S.match(f))?(i.setext?(i.header=i.setext,i.setext=0,n.skipToEnd(),r.highlightFormatting&&(i.formatting="header")):(i.header="="==S[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,x(i)):k?(n.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,o.hr):"["===n.peek()?g(n,i,C):g(n,i,i.inline)}function w(e,r){var o=n.token(e,r.htmlState);if(!i){var a=t.innerMode(n,r.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||r.md_inside&&e.current().indexOf(">")>-1)&&(r.f=E,r.block=y,r.htmlState=null)}return o}function _(t,e){var n,i=e.listStack[e.listStack.length-1]||0,a=e.indentation=t.quote?e.push(o.formatting+"-"+t.formatting[n]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(o.linkHref,"url"):(t.strong&&e.push(o.strong),t.em&&e.push(o.em),t.strikethrough&&e.push(o.strikethrough),t.emoji&&e.push(o.emoji),t.linkText&&e.push(o.linkText),t.code&&e.push(o.code),t.image&&e.push(o.image),t.imageAltText&&e.push(o.imageAltText,"link"),t.imageMarker&&e.push(o.imageMarker)),t.header&&e.push(o.header,o.header+"-"+t.header),t.quote&&(e.push(o.quote),!r.maxBlockquoteDepth||r.maxBlockquoteDepth>=t.quote?e.push(o.quote+"-"+t.quote):e.push(o.quote+"-"+r.maxBlockquoteDepth)),!1!==t.list){var i=(t.listStack.length-1)%3;i?1===i?e.push(o.list2):e.push(o.list3):e.push(o.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function M(t,e){if(t.match(h,!0))return x(e)}function E(e,i){var a=i.text(e,i);if("undefined"!==typeof a)return a;if(i.list)return i.list=null,x(i);if(i.taskList)return" "===e.match(l,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,r.highlightFormatting&&(i.formatting="task"),i.taskList=!1,x(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&e.match(/^#+$/,!0))return r.highlightFormatting&&(i.formatting="header"),x(i);var s=e.next();if(i.linkTitle){i.linkTitle=!1;var u=s;"("===s&&(u=")");var c="^\\s*(?:[^"+(u=(u+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+u;if(e.match(new RegExp(c),!0))return o.linkHref}if("`"===s){var f=i.formatting;r.highlightFormatting&&(i.formatting="code"),e.eatWhile("`");var h=e.current().length;if(0!=i.code||i.quote&&1!=h){if(h==i.code){var d=x(i);return i.code=0,d}return i.formatting=f,x(i)}return i.code=h,x(i)}if(i.code)return x(i);if("\\"===s&&(e.next(),r.highlightFormatting)){var p=x(i),g=o.formatting+"-escape";return p?p+" "+g:g}if("!"===s&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,r.highlightFormatting&&(i.formatting="image"),x(i);if("["===s&&i.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,r.highlightFormatting&&(i.formatting="image"),x(i);if("]"===s&&i.imageAltText){r.highlightFormatting&&(i.formatting="image");var p=x(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=S,p}if("["===s&&!i.image)return i.linkText&&e.match(/^.*?\]/)||(i.linkText=!0,r.highlightFormatting&&(i.formatting="link")),x(i);if("]"===s&&i.linkText){r.highlightFormatting&&(i.formatting="link");var p=x(i);return i.linkText=!1,i.inline=i.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?S:E,p}if("<"===s&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=k,r.highlightFormatting&&(i.formatting="link"),(p=x(i))?p+=" ":p="",p+o.linkInline;if("<"===s&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=k,r.highlightFormatting&&(i.formatting="link"),(p=x(i))?p+=" ":p="",p+o.linkEmail;if(r.xml&&"<"===s&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var b=e.string.indexOf(">",e.pos);if(-1!=b){var y=e.string.substring(e.start,b);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(i.md_inside=!0)}return e.backUp(1),i.htmlState=t.startState(n),v(e,i,w)}if(r.xml&&"<"===s&&e.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===s||"_"===s){for(var _=1,M=1==e.pos?" ":e.string.charAt(e.pos-2);_<3&&e.eat(s);)_++;var A=e.peek()||" ",C=!/\s/.test(A)&&(!m.test(A)||/\s/.test(M)||m.test(M)),O=!/\s/.test(M)&&(!m.test(M)||/\s/.test(A)||m.test(A)),T=null,D=null;if(_%2&&(i.em||!C||"*"!==s&&O&&!m.test(M)?i.em!=s||!O||"*"!==s&&C&&!m.test(A)||(T=!1):T=!0),_>1&&(i.strong||!C||"*"!==s&&O&&!m.test(M)?i.strong!=s||!O||"*"!==s&&C&&!m.test(A)||(D=!1):D=!0),null!=D||null!=T)return r.highlightFormatting&&(i.formatting=null==T?"strong":null==D?"em":"strong em"),!0===T&&(i.em=s),!0===D&&(i.strong=s),d=x(i),!1===T&&(i.em=!1),!1===D&&(i.strong=!1),d}else if(" "===s&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return x(i);e.backUp(1)}if(r.strikethrough)if("~"===s&&e.eatWhile(s)){if(i.strikethrough)return r.highlightFormatting&&(i.formatting="strikethrough"),d=x(i),i.strikethrough=!1,d;if(e.match(/^[^\s]/,!1))return i.strikethrough=!0,r.highlightFormatting&&(i.formatting="strikethrough"),x(i)}else if(" "===s&&e.match(/^~~/,!0)){if(" "===e.peek())return x(i);e.backUp(2)}if(r.emoji&&":"===s&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,r.highlightFormatting&&(i.formatting="emoji");var P=x(i);return i.emoji=!1,P}return" "===s&&(e.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),x(i)}function k(t,e){if(">"===t.next()){e.f=e.inline=E,r.highlightFormatting&&(e.formatting="link");var n=x(e);return n?n+=" ":n="",n+o.linkInline}return t.match(/^[^>]+/,!0),o.linkInline}function S(t,e){if(t.eatSpace())return null;var n,i=t.next();return"("===i||"["===i?(e.f=e.inline=(n="("===i?")":"]",function(t,e){if(t.next()===n){e.f=e.inline=E,r.highlightFormatting&&(e.formatting="link-string");var i=x(e);return e.linkHref=!1,i}return t.match(A[n]),e.linkHref=!0,x(e)}),r.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,x(e)):"error"}var A={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function C(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=O,t.next(),r.highlightFormatting&&(e.formatting="link"),e.linkText=!0,x(e)):g(t,e,E)}function O(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=T,r.highlightFormatting&&(e.formatting="link");var n=x(e);return e.linkText=!1,n}return t.match(/^([^\]\\]|\\.)+/,!0),o.linkText}function T(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=E,o.linkHref+" url")}var D={startState:function(){return{f:y,prevLine:{stream:null},thisLine:{stream:null},block:y,htmlState:null,indentation:0,inline:E,text:M,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(n,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine.stream){if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0))return b(e),null;if(e.prevLine=e.thisLine,e.thisLine={stream:t},e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,!e.localState&&(e.f=e.block,e.f!=w)){var r=t.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(e.indentation=r,e.indentationDiff=null,r>0)return null}}return e.f(t,e)},innerMode:function(t){return t.block==w?{state:t.htmlState,mode:n}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:D}},indent:function(e,r,i){return e.block==w&&n.indent?n.indent(e.htmlState,r,i):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,r,i):t.Pass},blankLine:b,getType:x,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return D}),"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")}(r(38),r(277),r(492))},function(t,e,r){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},r={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(n,i){var o,a,s=n.indentUnit,u={},l=i.htmlMode?e:r;for(var c in l)u[c]=l[c];for(var c in i)u[c]=i[c];function f(t,e){function r(r){return e.tokenize=r,r(t,e)}var n=t.next();return"<"==n?t.eat("!")?t.eat("[")?t.match("CDATA[")?r(d("atom","]]>")):null:t.match("--")?r(d("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),r(function t(e){return function(r,n){for(var i;null!=(i=r.next());){if("<"==i)return n.tokenize=t(e+1),n.tokenize(r,n);if(">"==i){if(1==e){n.tokenize=f;break}return n.tokenize=t(e-1),n.tokenize(r,n)}}return"meta"}}(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=d("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",e.tokenize=h,"tag bracket"):"&"==n?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function h(t,e){var r=t.next();if(">"==r||"/"==r&&t.eat(">"))return e.tokenize=f,o=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return o="equals",null;if("<"==r){e.tokenize=f,e.state=v,e.tagName=e.tagStart=null;var n=e.tokenize(t,e);return n?n+" tag error":"tag error"}return/[\'\"]/.test(r)?(e.tokenize=function(t){var e=function(e,r){for(;!e.eol();)if(e.next()==t){r.tokenize=h;break}return"string"};return e.isInAttribute=!0,e}(r),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function d(t,e){return function(r,n){for(;!r.eol();){if(r.match(e)){n.tokenize=f;break}r.next()}return t}}function p(t,e,r){this.prev=t.context,this.tagName=e||"",this.indent=t.indented,this.startOfLine=r,(u.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function m(t){t.context&&(t.context=t.context.prev)}function g(t,e){for(var r;;){if(!t.context)return;if(r=t.context.tagName,!u.contextGrabbers.hasOwnProperty(r)||!u.contextGrabbers[r].hasOwnProperty(e))return;m(t)}}function v(t,e,r){return"openTag"==t?(r.tagStart=e.column(),b):"closeTag"==t?y:v}function b(t,e,r){return"word"==t?(r.tagName=e.current(),a="tag",x):u.allowMissingTagName&&"endTag"==t?(a="tag bracket",x(t,0,r)):(a="error",b)}function y(t,e,r){if("word"==t){var n=e.current();return r.context&&r.context.tagName!=n&&u.implicitlyClosed.hasOwnProperty(r.context.tagName)&&m(r),r.context&&r.context.tagName==n||!1===u.matchClosing?(a="tag",w):(a="tag error",_)}return u.allowMissingTagName&&"endTag"==t?(a="tag bracket",w(t,0,r)):(a="error",_)}function w(t,e,r){return"endTag"!=t?(a="error",w):(m(r),v)}function _(t,e,r){return a="error",w(t,0,r)}function x(t,e,r){if("word"==t)return a="attribute",M;if("endTag"==t||"selfcloseTag"==t){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==t||u.autoSelfClosers.hasOwnProperty(n)?g(r,n):(g(r,n),r.context=new p(r,n,i==r.indented)),v}return a="error",x}function M(t,e,r){return"equals"==t?E:(u.allowMissing||(a="error"),x(t,0,r))}function E(t,e,r){return"string"==t?k:"word"==t&&u.allowUnquoted?(a="string",x):(a="error",x(t,0,r))}function k(t,e,r){return"string"==t?k:x(t,0,r)}return f.isInText=!0,{startState:function(t){var e={tokenize:f,state:v,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;o=null;var r=e.tokenize(t,e);return(r||o)&&"comment"!=r&&(a=null,e.state=e.state(o||r,t,e),a&&(r="error"==a?r+" error":a)),r},indent:function(e,r,n){var i=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(i&&i.noIndent)return t.Pass;if(e.tokenize!=h&&e.tokenize!=f)return n?n.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==u.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(u.multilineTagIndentFactor||1);if(u.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:u.htmlMode?"html":"xml",helperType:u.htmlMode?"html":"xml",skipAttribute:function(t){t.state==E&&(t.state=x)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],r=t.context;r;r=r.prev)e.push(r.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(r(38))},function(t,e,r){!function(t){"use strict";t.overlayMode=function(e,r,n){return{startState:function(){return{base:t.startState(e),overlay:t.startState(r),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(n){return{base:t.copyState(e,n.base),overlay:t.copyState(r,n.overlay),basePos:n.basePos,baseCur:null,overlayPos:n.overlayPos,overlayCur:null}},token:function(t,i){return(t!=i.streamSeen||Math.min(i.basePos,i.overlayPos)t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=I(t,360),e=I(e,100),r=I(r,100),0===e)n=i=o=r;else{var s=r<.5?r*(1+e):r+e-r*e,u=2*r-s;n=a(u,s,t+1/3),i=a(u,s,t),o=a(u,s,t-1/3)}return{r:255*n,g:255*i,b:255*o}}(t.h,n,u),f=!0,h="hsl"),t.hasOwnProperty("a")&&(r=t.a));var d,p,m;return r=P(r),{ok:f,format:t.format||h,r:l(255,c(e.r,0)),g:l(255,c(e.g,0)),b:l(255,c(e.b,0)),a:r}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=u(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=u(this._r)),this._g<1&&(this._g=u(this._g)),this._b<1&&(this._b=u(this._b)),this._ok=r.ok,this._tc_id=s++}function d(t,e,r){t=I(t,255),e=I(e,255),r=I(r,255);var n,i,o=c(t,e,r),a=l(t,e,r),s=(o+a)/2;if(o==a)n=i=0;else{var u=o-a;switch(i=s>.5?u/(2-o-a):u/(o+a),o){case t:n=(e-r)/u+(e>1)+720)%360;--e;)n.h=(n.h+i)%360,o.push(h(n));return o}function O(t,e){e=e||6;for(var r=h(t).toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/e;e--;)a.push(h({h:n,s:i,v:o})),o=(o+s)%1;return a}h.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:i.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=P(t),this._roundA=u(100*this._a)/100,this},toHsv:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=p(this._r,this._g,this._b),e=u(360*t.h),r=u(100*t.s),n=u(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=d(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=d(this._r,this._g,this._b),e=u(360*t.h),r=u(100*t.s),n=u(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return m(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[B(u(t).toString(16)),B(u(e).toString(16)),B(u(r).toString(16)),B(N(n))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:u(this._r),g:u(this._g),b:u(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+u(this._r)+", "+u(this._g)+", "+u(this._b)+")":"rgba("+u(this._r)+", "+u(this._g)+", "+u(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:u(100*I(this._r,255))+"%",g:u(100*I(this._g,255))+"%",b:u(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+u(100*I(this._r,255))+"%, "+u(100*I(this._g,255))+"%, "+u(100*I(this._b,255))+"%)":"rgba("+u(100*I(this._r,255))+"%, "+u(100*I(this._g,255))+"%, "+u(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(D[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+g(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=h(t);r="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(b,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(M,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(E,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(A,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(S,arguments)}},h.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:j(t[n]));t=r}return h(t,e)},h.equals=function(t,e){return!(!t||!e)&&h(t).toRgbString()==h(e).toRgbString()},h.random=function(){return h.fromRatio({r:f(),g:f(),b:f()})},h.mix=function(t,e,r){r=0===r?0:r||50;var n=h(t).toRgb(),i=h(e).toRgb(),o=r/100;return h({r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a})},h.readability=function(t,e){var r=h(t),n=h(e);return(i.max(r.getLuminance(),n.getLuminance())+.05)/(i.min(r.getLuminance(),n.getLuminance())+.05)},h.isReadable=function(t,e,r){var n,i,o=h.readability(t,e);switch(i=!1,(n=function(t){var e,r;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==r&&"large"!==r&&(r="small");return{level:e,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},h.mostReadable=function(t,e,r){var n,i,o,a,s=null,u=0;i=(r=r||{}).includeFallbackColors,o=r.level,a=r.size;for(var l=0;lu&&(u=n,s=h(e[l]));return h.isReadable(t,s,{level:o,size:a})||!i?s:(r.includeFallbackColors=!1,h.mostReadable(t,["#fff","#000"],r))};var T=h.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D=h.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(T);function P(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function I(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"===typeof t&&-1!=t.indexOf("%")}(t);return t=l(e,c(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),i.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function R(t){return l(1,c(0,t))}function F(t){return parseInt(t,16)}function B(t){return 1==t.length?"0"+t:""+t}function j(t){return t<=1&&(t=100*t+"%"),t}function N(t){return i.round(255*parseFloat(t)).toString(16)}function L(t){return F(t)/255}var z=function(){var t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+r),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+r),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+r),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function U(t){return!!z.CSS_UNIT.exec(t)}t.exports?t.exports=h:void 0===(n=function(){return h}.call(e,r,e,t))||(t.exports=n)}(Math)},function(t,e,r){(function(t){var n=r(537),i=r(285),o=r(175),a=r(543),s=r(176),u=e;u.request=function(e,r){e="string"===typeof e?s.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||i,u=e.hostname||e.host,l=e.port,c=e.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),e.url=(u?a+"//"+u:"")+(l?":"+l:"")+c,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var f=new n(e);return r&&f.on("response",r),f},u.get=function(t,e){var r=u.request(t,e);return r.end(),r},u.ClientRequest=n,u.IncomingMessage=i.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=a,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(20))},function(t,e,r){(function(t){e.fetch=s(t.fetch)&&s(t.ReadableStream),e.writableStream=s(t.WritableStream),e.abortController=s(t.AbortController),e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),e.blobConstructor=!0}catch(u){}var r;function n(){if(void 0!==r)return r;if(t.XMLHttpRequest){r=new t.XMLHttpRequest;try{r.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(u){r=null}}else r=null;return r}function i(t){var e=n();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(u){}return!1}var o="undefined"!==typeof t.ArrayBuffer,a=o&&s(t.ArrayBuffer.prototype.slice);function s(t){return"function"===typeof t}e.arraybuffer=e.fetch||o&&i("arraybuffer"),e.msstream=!e.fetch&&a&&i("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&o&&i("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!n()&&s(n().overrideMimeType),e.vbArray=s(t.VBArray),r=null}).call(this,r(20))},function(t,e,r){(function(t,n,i){var o=r(284),a=r(13),s=r(286),u=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},l=e.IncomingMessage=function(e,r,a,u){var l=this;if(s.Readable.call(l),l._mode=a,l.headers={},l.rawHeaders=[],l.trailers={},l.rawTrailers=[],l.on("end",(function(){t.nextTick((function(){l.emit("close")}))})),"fetch"===a){if(l._fetchResponse=r,l.url=r.url,l.statusCode=r.status,l.statusMessage=r.statusText,r.headers.forEach((function(t,e){l.headers[e.toLowerCase()]=t,l.rawHeaders.push(e,t)})),o.writableStream){var c=new WritableStream({write:function(t){return new Promise((function(e,r){l._destroyed?r():l.push(new i(t))?e():l._resumeFetch=e}))},close:function(){n.clearTimeout(u),l._destroyed||l.push(null)},abort:function(t){l._destroyed||l.emit("error",t)}});try{return void r.body.pipeTo(c).catch((function(t){n.clearTimeout(u),l._destroyed||l.emit("error",t)}))}catch(p){}}var f=r.body.getReader();!function t(){f.read().then((function(e){if(!l._destroyed){if(e.done)return n.clearTimeout(u),void l.push(null);l.push(new i(e.value)),t()}})).catch((function(t){n.clearTimeout(u),l._destroyed||l.emit("error",t)}))}()}else{if(l._xhr=e,l._pos=0,l.url=e.responseURL,l.statusCode=e.status,l.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var r=e[1].toLowerCase();"set-cookie"===r?(void 0===l.headers[r]&&(l.headers[r]=[]),l.headers[r].push(e[2])):void 0!==l.headers[r]?l.headers[r]+=", "+e[2]:l.headers[r]=e[2],l.rawHeaders.push(e[1],e[2])}})),l._charset="x-user-defined",!o.overrideMimeType){var h=l.rawHeaders["mime-type"];if(h){var d=h.match(/;\s*charset=([^;])(;|$)/);d&&(l._charset=d[1].toLowerCase())}l._charset||(l._charset="utf-8")}}};a(l,s.Readable),l.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},l.prototype._onXHRProgress=function(){var t=this,e=t._xhr,r=null;switch(t._mode){case"text:vbarray":if(e.readyState!==u.DONE)break;try{r=new n.VBArray(e.responseBody).toArray()}catch(c){}if(null!==r){t.push(new i(r));break}case"text":try{r=e.responseText}catch(c){t._mode="text:vbarray";break}if(r.length>t._pos){var o=r.substr(t._pos);if("x-user-defined"===t._charset){for(var a=new i(o.length),s=0;st._pos&&(t.push(new i(new Uint8Array(l.result.slice(t._pos)))),t._pos=l.result.byteLength)},l.onload=function(){t.push(null)},l.readAsArrayBuffer(r)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,r(18),r(20),r(5).Buffer)},function(t,e,r){(e=t.exports=r(287)).Stream=e,e.Readable=e,e.Writable=r(290),e.Duplex=r(90),e.Transform=r(291),e.PassThrough=r(541)},function(t,e,r){"use strict";(function(e,n){var i=r(63);t.exports=y;var o,a=r(148);y.ReadableState=b;r(62).EventEmitter;var s=function(t,e){return t.listeners(e).length},u=r(288),l=r(14).Buffer,c=e.Uint8Array||function(){};var f=Object.create(r(50));f.inherits=r(13);var h=r(538),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var p,m=r(539),g=r(289);f.inherits(y,u);var v=["error","close","destroy","pause","resume"];function b(t,e){t=t||{};var n=e instanceof(o=o||r(90));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(79).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function y(t){if(o=o||r(90),!(this instanceof y))return new y(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,r,n,i){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,M(t)}(t,a)):(i||(o=function(t,e){var r;n=e,l.isBuffer(n)||n instanceof c||"string"===typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"===typeof e||a.objectMode||Object.getPrototypeOf(e)===l.prototype||(e=function(t){return l.from(t)}(e)),n?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?_(t,a,e,!1):k(t,a)):_(t,a,e,!1))):n||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function M(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(E,t):E(t))}function E(t){d("emit readable"),t.emit("readable"),O(t)}function k(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(S,t,e))}function S(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=l.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0===(t-=a)){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function D(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(P,e,t))}function P(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function I(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?D(this):M(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&D(this),null;var n,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t0?T(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&D(this)),null!==n&&this.emit("data",n),n},y.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?c:y;function l(e,n){d("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),t.removeListener("close",v),t.removeListener("finish",b),t.removeListener("drain",f),t.removeListener("error",g),t.removeListener("unpipe",l),r.removeListener("end",c),r.removeListener("end",y),r.removeListener("data",m),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function c(){d("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",l);var f=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,O(t))}}(r);t.on("drain",f);var h=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==I(o.pipes,t))&&!h&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function g(e){d("onerror",e),y(),t.removeListener("error",g),0===s(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",b),y()}function b(){d("onfinish"),t.removeListener("close",v),y()}function y(){d("unpipe"),r.unpipe(t)}return r.on("data",m),function(t,e,r){if("function"===typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",v),t.once("finish",b),t.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),t},y.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o-1?n:o.nextTick;b.WritableState=v;var l=Object.create(r(50));l.inherits=r(13);var c={deprecate:r(153)},f=r(288),h=r(14).Buffer,d=i.Uint8Array||function(){};var p,m=r(289);function g(){}function v(t,e){s=s||r(90),t=t||{};var n=e instanceof s;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,l=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(l||0===l)?l:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===t.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(E,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),E(t,e))}(t,r,n,e,i);else{var a=x(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(t,r),n?u(w,t,r,a,i):w(t,r,a,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(t){if(s=s||r(90),!p.call(b,this)&&!(this instanceof s))return new b(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"===typeof t.write&&(this._write=t.write),"function"===typeof t.writev&&(this._writev=t.writev),"function"===typeof t.destroy&&(this._destroy=t.destroy),"function"===typeof t.final&&(this._final=t.final)),f.call(this)}function y(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),E(t,e)}function _(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,y(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,f=r.callback;if(y(t,e,!1,e.objectMode?1:l.length,l,c,f),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function x(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function M(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),E(t,e)}))}function E(t,e){var r=x(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"===typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(M,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}l.inherits(b,f),v.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(v.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===b&&(t&&t._writableState instanceof v)}})):p=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(t,e,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=t,h.isBuffer(n)||n instanceof d);return s&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"===typeof e&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!==typeof r&&(r=g),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"===typeof r||void 0===r||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(n,a),i=!1),i}(this,i,t,r))&&(i.pendingcb++,a=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!==typeof e||(e=h.from(e,r));return e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(t,e,r){var n=this._writableState;"function"===typeof t?(r=t,t=null,e=null):"function"===typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,E(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=m.destroy,b.prototype._undestroy=m.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(18),r(152).setImmediate,r(20))},function(t,e,r){"use strict";t.exports=a;var n=r(90),i=Object.create(r(50));function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length4?9:0)}function f(t){for(var e=t.length;--e>=0;)t[e]=0}function h(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function d(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,h(t.strm)}function p(t,e){t.pending_buf[t.pending++]=e}function m(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function g(t,e,r,n){var o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,i.arraySet(e,t.input,t.next_in,o,r),1===t.state.wrap?t.adler=a(t.adler,e,o,r):2===t.state.wrap&&(t.adler=s(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)}function v(t,e){var r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,l=t.window,c=t.w_mask,f=t.prev,h=t.strstart+258,d=l[o+a-1],p=l[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(l[(r=e)+a]===p&&l[r+a-1]===d&&l[r]===l[o]&&l[++r]===l[o+1]){o+=2,r++;do{}while(l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;d=l[o+a-1],p=l[o+a]}}}while((e=f[e&c])>u&&0!==--i);return a<=t.lookahead?a:t.lookahead}function b(t){var e,r,n,o,a,s=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-262)){i.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--r);e=r=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--r);o+=s}if(0===t.strm.avail_in)break;if(r=g(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=r,t.lookahead+t.insert>=3)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<15&&(s=2,n-=16),o<1||o>9||8!==r||n<8||n>15||e<0||e>9||a<0||a>4)return l(t,-2);8===n&&(n=9);var u=new x;return t.state=u,u.strm=t,u.wrap=s,u.gzhead=null,u.w_bits=n,u.w_size=1<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(b(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,d(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(d(t,!1),t.strm.avail_out),1)})),new _(4,4,8,4,y),new _(4,5,16,8,y),new _(4,6,32,32,y),new _(4,4,16,16,w),new _(8,16,32,32,w),new _(8,16,128,128,w),new _(8,32,128,256,w),new _(32,128,258,1024,w),new _(32,258,258,4096,w)],e.deflateInit=function(t,e){return k(t,e,8,15,8,0)},e.deflateInit2=k,e.deflateReset=E,e.deflateResetKeep=M,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?-2:(t.state.gzhead=e,0):-2},e.deflate=function(t,e){var r,i,a,u;if(!t||!t.state||e>5||e<0)return t?l(t,-2):-2;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&4!==e)return l(t,0===t.avail_out?-5:-2);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,p(i,31),p(i,139),p(i,8),i.gzhead?(p(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),p(i,255&i.gzhead.time),p(i,i.gzhead.time>>8&255),p(i,i.gzhead.time>>16&255),p(i,i.gzhead.time>>24&255),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(p(i,255&i.gzhead.extra.length),p(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(p(i,0),p(i,0),p(i,0),p(i,0),p(i,0),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,3),i.status=113);else{var g=8+(i.w_bits-8<<4)<<8;g|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(g|=32),g+=31-g%31,i.status=113,m(i,g),0!==i.strstart&&(m(i,t.adler>>>16),m(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),h(t),a=i.pending,i.pending!==i.pending_buf_size));)p(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),h(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),h(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&h(t),i.pending+2<=i.pending_buf_size&&(p(i,255&t.adler),p(i,t.adler>>8&255),t.adler=0,i.status=113)):i.status=113),0!==i.pending){if(h(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&c(e)<=c(r)&&4!==e)return l(t,-5);if(666===i.status&&0!==t.avail_in)return l(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var v=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(b(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=258){if(b(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=t.strstart+258;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==v&&4!==v||(i.status=666),1===v||3===v)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===v&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(f(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),h(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(p(i,255&t.adler),p(i,t.adler>>8&255),p(i,t.adler>>16&255),p(i,t.adler>>24&255),p(i,255&t.total_in),p(i,t.total_in>>8&255),p(i,t.total_in>>16&255),p(i,t.total_in>>24&255)):(m(i,t.adler>>>16),m(i,65535&t.adler)),h(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?l(t,-2):(t.state=null,113===e?l(t,-3):0):-2},e.deflateSetDictionary=function(t,e){var r,n,o,s,u,l,c,h,d=e.length;if(!t||!t.state)return-2;if(2===(s=(r=t.state).wrap)||1===s&&42!==r.status||r.lookahead)return-2;for(1===s&&(t.adler=a(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===s&&(f(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,e,d-r.w_size,r.w_size,0),e=h,d=r.w_size),u=t.avail_in,l=t.next_in,c=t.input,t.avail_in=d,t.next_in=0,t.input=e,b(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}},function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,e,r,i){var o=n,a=i+r;t^=-1;for(var s=i;s>>8^o[255&(t^e[s])];return-1^t}},function(t,e,r){"use strict";var n=r(65),i=r(294),o=r(295),a=r(551),s=r(552);function u(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function l(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):-2}function f(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,c(t)):-2}function h(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,f(t))):-2}function d(t,e){var r,n;return t?(n=new l,t.state=n,n.window=null,0!==(r=h(t,e))&&(t.state=null),r):-2}var p,m,g=!0;function v(t){if(g){var e;for(p=new n.Buf32(512),m=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(1,t.lens,0,288,p,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(2,t.lens,0,32,m,0,t.work,{bits:5}),g=!1}t.lencode=p,t.lenbits=9,t.distcode=m,t.distbits=5}function b(t,e,r,i){var o,a=t.state;return null===a.window&&(a.wsize=1<=a.wsize?(n.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,e,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=o(r.check,F,2,0),m=0,g=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!==(15&m)){t.msg="unknown compression method",r.mode=30;break}if(g-=4,T=8+(15&(m>>>=4)),0===r.wbits)r.wbits=T;else if(T>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(F[0]=255&m,F[1]=m>>>8&255,r.check=o(r.check,F,2,0)),m=0,g=0,r.mode=3;case 3:for(;g<32;){if(0===d)break t;d--,m+=l[f++]<>>8&255,F[2]=m>>>16&255,F[3]=m>>>24&255,r.check=o(r.check,F,4,0)),m=0,g=0,r.mode=4;case 4:for(;g<16;){if(0===d)break t;d--,m+=l[f++]<>8),512&r.flags&&(F[0]=255&m,F[1]=m>>>8&255,r.check=o(r.check,F,2,0)),m=0,g=0,r.mode=5;case 5:if(1024&r.flags){for(;g<16;){if(0===d)break t;d--,m+=l[f++]<>>8&255,r.check=o(r.check,F,2,0)),m=0,g=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((_=r.length)>d&&(_=d),_&&(r.head&&(T=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,l,f,_,T)),512&r.flags&&(r.check=o(r.check,l,_,f)),d-=_,f+=_,r.length-=_),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===d)break t;_=0;do{T=l[f+_++],r.head&&T&&r.length<65536&&(r.head.name+=String.fromCharCode(T))}while(T&&_>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;g<32;){if(0===d)break t;d--,m+=l[f++]<>>=7&g,g-=7&g,r.mode=27;break}for(;g<3;){if(0===d)break t;d--,m+=l[f++]<>>=1)){case 0:r.mode=14;break;case 1:if(v(r),r.mode=20,6===e){m>>>=2,g-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}m>>>=2,g-=2;break;case 14:for(m>>>=7&g,g-=7&g;g<32;){if(0===d)break t;d--,m+=l[f++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&m,m=0,g=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(_=r.length){if(_>d&&(_=d),_>p&&(_=p),0===_)break t;n.arraySet(c,l,f,_,h),d-=_,f+=_,p-=_,h+=_,r.length-=_;break}r.mode=12;break;case 17:for(;g<14;){if(0===d)break t;d--,m+=l[f++]<>>=5,g-=5,r.ndist=1+(31&m),m>>>=5,g-=5,r.ncode=4+(15&m),m>>>=4,g-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,g-=3}for(;r.have<19;)r.lens[B[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},D=s(0,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,D){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,S=65535&R,!((E=R>>>24)<=g);){if(0===d)break t;d--,m+=l[f++]<>>=E,g-=E,r.lens[r.have++]=S;else{if(16===S){for(I=E+2;g>>=E,g-=E,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}T=r.lens[r.have-1],_=3+(3&m),m>>>=2,g-=2}else if(17===S){for(I=E+3;g>>=E)),m>>>=3,g-=3}else{for(I=E+7;g>>=E)),m>>>=7,g-=7}if(r.have+_>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;_--;)r.lens[r.have++]=T}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,P={bits:r.lenbits},D=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,D){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},D=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,D){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(d>=6&&p>=258){t.next_out=h,t.avail_out=p,t.next_in=f,t.avail_in=d,r.hold=m,r.bits=g,a(t,w),h=t.next_out,c=t.output,p=t.avail_out,f=t.next_in,l=t.input,d=t.avail_in,m=r.hold,g=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;k=(R=r.lencode[m&(1<>>16&255,S=65535&R,!((E=R>>>24)<=g);){if(0===d)break t;d--,m+=l[f++]<>A)])>>>16&255,S=65535&R,!(A+(E=R>>>24)<=g);){if(0===d)break t;d--,m+=l[f++]<>>=A,g-=A,r.back+=A}if(m>>>=E,g-=E,r.back+=E,r.length=S,0===k){r.mode=26;break}if(32&k){r.back=-1,r.mode=12;break}if(64&k){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&k,r.mode=22;case 22:if(r.extra){for(I=r.extra;g>>=r.extra,g-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;k=(R=r.distcode[m&(1<>>16&255,S=65535&R,!((E=R>>>24)<=g);){if(0===d)break t;d--,m+=l[f++]<>A)])>>>16&255,S=65535&R,!(A+(E=R>>>24)<=g);){if(0===d)break t;d--,m+=l[f++]<>>=A,g-=A,r.back+=A}if(m>>>=E,g-=E,r.back+=E,64&k){t.msg="invalid distance code",r.mode=30;break}r.offset=S,r.extra=15&k,r.mode=24;case 24:if(r.extra){for(I=r.extra;g>>=r.extra,g-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===p)break t;if(_=w-p,r.offset>_){if((_=r.offset-_)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}_>r.wnext?(_-=r.wnext,x=r.wsize-_):x=r.wnext-_,_>r.length&&(_=r.length),M=r.window}else M=c,x=h-r.offset,_=r.length;_>p&&(_=p),p-=_,r.length-=_;do{c[h++]=M[x++]}while(--_);0===r.length&&(r.mode=21);break;case 26:if(0===p)break t;c[h++]=r.length,p--,r.mode=21;break;case 27:if(r.wrap){for(;g<32;){if(0===d)break t;d--,m|=l[f++]<2?r-2:0),i=2;it.length)&&(e=t.length);for(var r=0,n=new Array(e);r4&&(e=t.openWithOffset(e.nextUInt32())),2===a){var c=(n=e.nextString(u)).indexOf("\0");-1!==c&&(n=n.substr(0,c))}else if(7===a)n=e.nextBuffer(u);else if(0!==a)for(n=[],i=0;i=t.length||e<0?t:t.slice(0,e).concat(t.slice(e+1))}function p(t,e,r){if(t[e]===r)return t;for(var n=t.length,i=Array(n),o=0;o6?a-6:0),u=6;u6?a-6:0),u=6;u7?u-7:0),c=7;c=0||(s[c]=t[c])}return s}function E(t,e,r,n,i,o){for(var a=arguments.length,s=new Array(a>6?a-6:0),u=6;u0&&(this._paused=!1,this.emit("drain"))}.bind(this))},a.prototype.write=function(t,e){return this.writable?(r=n.isBuffer(t)?t:new n(t,e||this._encoding),this._buffers.push(r),this._buffered+=r.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused):(this.emit("error",new Error("Stream not writable")),!1);var r},a.prototype.end=function(t,e){t&&this.write(t,e),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},a.prototype.destroySoon=a.prototype.end,a.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("Unexpected end of input")),this.destroy()},a.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},a.prototype._processReadAllowingLess=function(t){this._reads.shift();var e=this._buffers[0];e.length>t.length?(this._buffered-=t.length,this._buffers[0]=e.slice(t.length),t.func.call(this,e.slice(0,t.length))):(this._buffered-=e.length,this._buffers.shift(),t.func.call(this,e))},a.prototype._processRead=function(t){this._reads.shift();for(var e=0,r=0,i=new n(t.length);e0&&this._buffers.splice(0,r),this._buffered-=t.length,t.func.call(this,i)},a.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){var t=this._reads[0];if(t.allowLess)this._processReadAllowingLess(t);else{if(!(this._buffered>=t.length))break;this._processRead(t)}}this._buffers&&!this.writable&&this._end()}catch(e){this.emit("error",e)}}}).call(this,r(18),r(5).Buffer)},function(t,e,r){"use strict";(function(e){var n=r(306),i=r(307);function o(t,e,r){var n=t*e;return 8!==r&&(n=Math.ceil(n/(8/r))),n}var a=t.exports=function(t,e){var r=t.width,i=t.height,a=t.interlace,s=t.bpp,u=t.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],a)for(var l=n.getImagePasses(r,i),c=0;ci?e[o-n]:0;e[o]=a+s}},a.prototype._unFilterType2=function(t,e,r){for(var n=this._lastLine,i=0;ii?e[a-n]:0,c=Math.floor((l+u)/2);e[a]=s+c}},a.prototype._unFilterType4=function(t,e,r){for(var n=this._xComparison,o=n-1,a=this._lastLine,s=0;so?e[s-n]:0,f=s>o&&a?a[s-n]:0,h=i(c,l,f);e[s]=u+h}},a.prototype._reverseFilterLine=function(t){var r,n=t[0],i=this._images[this._imageIndex],o=i.byteWidth;if(0===n)r=t.slice(1,o+1);else switch(r=new e(o),n){case 1:this._unFilterType1(t,r,o);break;case 2:this._unFilterType2(t,r,o);break;case 3:this._unFilterType3(t,r,o);break;case 4:this._unFilterType4(t,r,o);break;default:throw new Error("Unrecognised filter type - "+n)}this.write(r),i.lineIndex++,i.lineIndex>=i.height?(this._lastLine=null,this._imageIndex++,i=this._images[this._imageIndex]):this._lastLine=r,i?this.read(i.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}}).call(this,r(5).Buffer)},function(t,e,r){"use strict";var n=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];e.getImagePasses=function(t,e){for(var r=[],i=t%8,o=e%8,a=(t-i)/8,s=(e-o)/8,u=0;u0&&f>0&&r.push({width:c,height:f,index:u})}return r},e.getInterlaceIterator=function(t){return function(e,r,i){var o=e%n[i].x.length,a=(e-o)/n[i].x.length*8+n[i].x[o],s=r%n[i].y.length;return 4*a+((r-s)/n[i].y.length*8+n[i].y[s])*t*4}}},function(t,e,r){"use strict";t.exports=function(t,e,r){var n=t+e-r,i=Math.abs(n-t),o=Math.abs(n-e),a=Math.abs(n-r);return i<=o&&i<=a?t:o<=a?e:r}},function(t,e,r){"use strict";(function(e){var n=r(113),i=r(309),o=t.exports=function(t,e){this._options=t,t.checkCRC=!1!==t.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[n.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[n.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[n.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[n.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[n.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[n.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};o.prototype.start=function(){this.read(n.PNG_SIGNATURE.length,this._parseSignature.bind(this))},o.prototype._parseSignature=function(t){for(var e=n.PNG_SIGNATURE,r=0;rthis._palette.length)return void this.error(new Error("More transparent colors than palette size"));for(var e=0;e0?this._handleIDAT(r):this._handleChunkEnd()},o.prototype._handleIEND=function(t){this.read(t,this._parseIEND.bind(this))},o.prototype._parseIEND=function(t){this._crc.write(t),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}}).call(this,r(5).Buffer)},function(t,e,r){"use strict";var n=[];!function(){for(var t=0;t<256;t++){for(var e=t,r=0;r<8;r++)1&e?e=3988292384^e>>>1:e>>>=1;n[t]=e}}();var i=t.exports=function(){this._crc=-1};i.prototype.write=function(t){for(var e=0;e>>8;return!0},i.prototype.crc32=function(){return-1^this._crc},i.crc32=function(t){for(var e=-1,r=0;r>>8;return-1^e}},function(t,e,r){"use strict";(function(t){var n=r(306),i=[function(){},function(t,e,r,n){if(n===e.length)throw new Error("Ran out of data");var i=e[n];t[r]=i,t[r+1]=i,t[r+2]=i,t[r+3]=255},function(t,e,r,n){if(n+1>=e.length)throw new Error("Ran out of data");var i=e[n];t[r]=i,t[r+1]=i,t[r+2]=i,t[r+3]=e[n+1]},function(t,e,r,n){if(n+2>=e.length)throw new Error("Ran out of data");t[r]=e[n],t[r+1]=e[n+1],t[r+2]=e[n+2],t[r+3]=255},function(t,e,r,n){if(n+3>=e.length)throw new Error("Ran out of data");t[r]=e[n],t[r+1]=e[n+1],t[r+2]=e[n+2],t[r+3]=e[n+3]}],o=[function(){},function(t,e,r,n){var i=e[0];t[r]=i,t[r+1]=i,t[r+2]=i,t[r+3]=n},function(t,e,r){var n=e[0];t[r]=n,t[r+1]=n,t[r+2]=n,t[r+3]=e[1]},function(t,e,r,n){t[r]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=n},function(t,e,r){t[r]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=e[3]}];function a(t,e,r,n,o,a){for(var s=t.width,u=t.height,l=t.index,c=0;c>4,r.push(f,c);break;case 2:u=3&h,l=h>>2&3,c=h>>4&3,f=h>>6&3,r.push(f,c,l,u);break;case 1:i=1&h,o=h>>1&1,a=h>>2&1,s=h>>3&1,u=h>>4&1,l=h>>5&1,c=h>>6&1,f=h>>7&1,r.push(f,c,l,u,s,a,o,i)}}return{get:function(t){for(;r.length0&&this._buffer.length;){var t=this._reads[0];if(!this._buffer.length||!(this._buffer.length>=t.length||t.allowLess))break;this._reads.shift();var e=this._buffer;this._buffer=e.slice(t.length),t.func.call(this,e.slice(0,t.length))}return this._reads.length>0?new Error("There are some read requests waitng on finished stream"):this._buffer.length>0?new Error("unrecognised content at end of stream"):void 0}},function(t,e,r){"use strict";var n=r(65),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(l){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(l){o=!1}for(var a=new n.Buf8(256),s=0;s<256;s++)a[s]=s>=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function u(t,e){if(e<65534&&(t.subarray&&o||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",a=0;a>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},e.buf2binstring=function(t){return u(t,t.length)},e.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r4)l[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?l[n++]=65533:i<65536?l[n++]=i:(i-=65536,l[n++]=55296|i>>10&1023,l[n++]=56320|1023&i)}return u(l,n)},e.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128===(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}},function(t,e,r){"use strict";function n(t,e,r,n){for(var i=t[e++],o=1<>=u,c-=u,g!==o){if(g===a)break;for(var v=go;)y=p[y]>>8,++b;var w=y;if(h+b+(v!==g?1:0)>n)return void console.log("Warning, gif stream longer than expected.");r[h++]=w;var _=h+=b;for(v!==g&&(r[h++]=w),y=v;b--;)y=p[y],r[--_]=255&y,y>>=8;null!==m&&s<4096&&(p[s++]=m<<8|w,s>=l+1&&u<12&&(++u,l=l<<1|1)),m=g}else s=a+1,l=(1<<(u=i+1))-1,m=null}return h!==n&&console.log("Warning, gif stream shorter than expected."),r}try{e.GifWriter=function(t,e,r,n){var i=0,o=void 0===(n=void 0===n?{}:n).loop?null:n.loop,a=void 0===n.palette?null:n.palette;if(e<=0||r<=0||e>65535||r>65535)throw new Error("Width/Height invalid.");function s(t){var e=t.length;if(e<2||e>256||e&e-1)throw new Error("Invalid code/color length, must be power of 2 and 2 .. 256.");return e}t[i++]=71,t[i++]=73,t[i++]=70,t[i++]=56,t[i++]=57,t[i++]=97;var u=0,l=0;if(null!==a){for(var c=s(a);c>>=1;)++u;if(c=1<=c)throw new Error("Background index out of range.");if(0===l)throw new Error("Background index explicitly passed as 0.")}}if(t[i++]=255&e,t[i++]=e>>8&255,t[i++]=255&r,t[i++]=r>>8&255,t[i++]=(null!==a?128:0)|u,t[i++]=l,t[i++]=0,null!==a)for(var f=0,h=a.length;f>16&255,t[i++]=d>>8&255,t[i++]=255&d}if(null!==o){if(o<0||o>65535)throw new Error("Loop count invalid.");t[i++]=33,t[i++]=255,t[i++]=11,t[i++]=78,t[i++]=69,t[i++]=84,t[i++]=83,t[i++]=67,t[i++]=65,t[i++]=80,t[i++]=69,t[i++]=50,t[i++]=46,t[i++]=48,t[i++]=3,t[i++]=1,t[i++]=255&o,t[i++]=o>>8&255,t[i++]=0}var p=!1;this.addFrame=function(e,r,n,o,u,l){if(!0===p&&(--i,p=!1),l=void 0===l?{}:l,e<0||r<0||e>65535||r>65535)throw new Error("x/y invalid.");if(n<=0||o<=0||n>65535||o>65535)throw new Error("Width/Height invalid.");if(u.length>=1;)++d;h=1<3)throw new Error("Disposal out of range.");var v=!1,b=0;if(void 0!==l.transparent&&null!==l.transparent&&(v=!0,(b=l.transparent)<0||b>=h))throw new Error("Transparent color index.");if((0!==g||v||0!==m)&&(t[i++]=33,t[i++]=249,t[i++]=4,t[i++]=g<<2|(!0===v?1:0),t[i++]=255&m,t[i++]=m>>8&255,t[i++]=b,t[i++]=0),t[i++]=44,t[i++]=255&e,t[i++]=e>>8&255,t[i++]=255&r,t[i++]=r>>8&255,t[i++]=255&n,t[i++]=n>>8&255,t[i++]=255&o,t[i++]=o>>8&255,t[i++]=!0===c?128|d-1:0,!0===c)for(var y=0,w=f.length;y>16&255,t[i++]=_>>8&255,t[i++]=255&_}return i=function(t,e,r,n){t[e++]=r;var i=e++,o=1<=r;)t[e++]=255&f,f>>=8,c-=8,e===i+256&&(t[i]=255,i=e++)}function d(t){f|=t<=8;)t[e++]=255&f,f>>=8,c-=8,e===i+256&&(t[i]=255,i=e++);4096===u?(d(o),u=s+1,l=r+1,m={}):(u>=1<>7,s=1<<(7&o)+1;t[e++],t[e++];var u=null,l=null;a&&(u=e,l=s,e+=3*s);var c=!0,f=[],h=0,d=null,p=0,m=null;for(this.width=r,this.height=i;c&&e=0))throw Error("Invalid block size");if(0===C)break;e+=C}break;case 249:if(4!==t[e++]||0!==t[e+4])throw new Error("Invalid graphics extension block.");var g=t[e++];h=t[e++]|t[e++]<<8,d=t[e++],0===(1&g)&&(d=null),p=g>>2&7,e++;break;case 254:for(;;){if(!((C=t[e++])>=0))throw Error("Invalid block size");if(0===C)break;e+=C}break;default:throw new Error("Unknown graphic control label: 0x"+t[e-1].toString(16))}break;case 44:var v=t[e++]|t[e++]<<8,b=t[e++]|t[e++]<<8,y=t[e++]|t[e++]<<8,w=t[e++]|t[e++]<<8,_=t[e++],x=_>>6&1,M=1<<(7&_)+1,E=u,k=l,S=!1;if(_>>7){S=!0;E=e,k=M,e+=3*M}var A=e;for(e++;;){var C;if(!((C=t[e++])>=0))throw Error("Invalid block size");if(0===C)break;e+=C}f.push({x:v,y:b,width:y,height:w,has_local_palette:S,palette_offset:E,palette_size:k,data_offset:A,data_length:e-A,transparent_index:d,interlaced:!!x,delay:h,disposal:p});break;case 59:c=!1;break;default:throw new Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return f.length},this.loopCount=function(){return m},this.frameInfo=function(t){if(t<0||t>=f.length)throw new Error("Frame index out of range.");return f[t]},this.decodeAndBlitFrameBGRA=function(e,i){var o=this.frameInfo(e),a=o.width*o.height,s=new Uint8Array(a);n(t,o.data_offset,s,a);var u=o.palette_offset,l=o.transparent_index;null===l&&(l=256);var c=o.width,f=r-c,h=c,d=4*(o.y*r+o.x),p=4*((o.y+o.height)*r+o.x),m=d,g=4*f;!0===o.interlaced&&(g+=4*r*7);for(var v=8,b=0,y=s.length;b=p&&(g=4*f+4*r*(v-1),m=d+(c+f)*(v<<1),v>>=1)),w===l)m+=4;else{var _=t[u+3*w],x=t[u+3*w+1],M=t[u+3*w+2];i[m++]=M,i[m++]=x,i[m++]=_,i[m++]=255}--h}},this.decodeAndBlitFrameRGBA=function(e,i){var o=this.frameInfo(e),a=o.width*o.height,s=new Uint8Array(a);n(t,o.data_offset,s,a);var u=o.palette_offset,l=o.transparent_index;null===l&&(l=256);var c=o.width,f=r-c,h=c,d=4*(o.y*r+o.x),p=4*((o.y+o.height)*r+o.x),m=d,g=4*f;!0===o.interlaced&&(g+=4*r*7);for(var v=8,b=0,y=s.length;b=p&&(g=4*f+4*r*(v-1),m=d+(c+f)*(v<<1),v>>=1)),w===l)m+=4;else{var _=t[u+3*w],x=t[u+3*w+1],M=t[u+3*w+2];i[m++]=_,i[m++]=x,i[m++]=M,i[m++]=255}--h}}}}catch(i){}},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(e)}t.exports=r},function(t,e){t.exports=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}},function(t,e,r){var n=r(316),i=r(183),o=r(601),a=r(602);function s(e){var r="function"===typeof Map?new Map:void 0;return t.exports=s=function(t){if(null===t||!o(t))return t;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof r){if(r.has(t))return r.get(t);r.set(t,e)}function e(){return a(t,arguments,n(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),i(e,t)},s(e)}t.exports=s},function(t,e,r){"use strict";(function(t,n){var i,o=r(48),a=r(55),s=r(315),u=r(132),l=u.Gif,c=u.GifError;t.nextTick((function(){i=r(320)}));var f=r(184).GifFrame,h=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),this._transparentRGB=null,"number"===typeof e.transparentRGB&&0!==e.transparentRGB&&(this._transparentRGBA=256*e.transparentRGB),this._testInitialBufferSize=0}return a(t,[{key:"decodeGif",value:function(t){try{var e;try{e=new s.GifReader(t)}catch(u){throw new c(u)}for(var r=e.numFrames(),n=[],i={width:e.width,height:e.height,loops:e.loopCount(),usesTransparency:!1},o=0;o1&&void 0!==arguments[1]?arguments[1]:{};try{if(null===t||0===t.length)throw new c("there are no frames");var r=i.getMaxDimensions(t);return(e=Object.assign({},e)).width=r.maxWidth,e.height=r.maxHeight,e.loops=e.loops||0,e.colorScope=e.colorScope||l.GlobalColorsPreferred,Promise.resolve(this._encodeGif(t,e))}catch(n){return Promise.reject(n)}}},{key:"_decodeFrame",value:function(t,e,r){var i,o;try{if(i=t.frameInfo(e),o=new n(t.width*t.height*4),t.decodeAndBlitFrameRGBA(e,o),i.width!==t.width||i.height!==t.height){if(i.y&&(o=o.slice(i.y*t.width*4)),t.width>i.width)for(var a=0;a0)return this._testInitialBufferSize;var r=968,n=v(t);return e.forEach((function(t){r+=g(t,n)})),r}},{key:"_getSizeEstimateLocal",value:function(t,e){if(this._testInitialBufferSize>0)return this._testInitialBufferSize;for(var r=200,n=0;ne)i=r-1;else{if(!(t[r]n;)n<<=1;e.length=n,e.fill(0,r)}function g(t,e){var r=t.bitmap.width*t.bitmap.height;return r=Math.ceil(r*e/8),100+(r+=Math.ceil(r/255))+768}function v(t){var e=t.indexCount,r=0;for(--e;e;)++r,e>>=1;return r>0?r:1}function b(t,e,r,i,o){if(r.interlaced)throw new c("writing interlaced GIFs is not supported");var a=function(t,e,r){for(var i=r.colors,o=i.length<=8?d:p,a=e.bitmap.data,s=new n(a.length/4),u=i.length,l=0,f=0;l>8&16777215;s[f]=o(i,h)}else s[f]=u;l+=4,++f}if(r.usesTransparency){if(256===u)throw new c("Frame ".concat(t," already has 256 colors")+"and so can't use transparency")}else u=null;return{buffer:s,transparentIndex:u}}(e,r,i),s={delay:r.delayCentisecs,disposal:r.disposalMethod,transparent:a.transparentIndex};o&&(m(i),s.palette=i.colors);try{for(var u,l=t.getOutputBuffer(),f=t.getOutputBufferPosition(),h=!0;h;)if(u=t.addFrame(r.xOffset,r.yOffset,r.bitmap.width,r.bitmap.height,a.buffer,s),h=!1,u>=l.length-1){var g=new n(1.5*l.length);l.copy(g),t.setOutputBuffer(g),t.setOutputBufferPosition(f),l=g,h=!0}return l}catch(v){throw new c(v)}}e.GifCodec=h}).call(this,r(18),r(5).Buffer)},function(t,e,r){"use strict";(function(t){var n=r(131),i=r(603),o=r(182),a=r(184).GifFrame,s=r(132).GifError,u=r(319).GifCodec,l=[".jpg",".jpeg",".png",".bmp"],c=new u;function f(t,e,r,n,o){var a=Array.isArray(t)?t:[t];if(o){if(["FloydSteinberg","FalseFloydSteinberg","Stucki","Atkinson","Jarvis","Burkes","Sierra","TwoSierra","SierraLite"].indexOf(o.ditherAlgorithm)<0)throw new Error("Invalid ditherAlgorithm '".concat(o.ditherAlgorithm,"'"));void 0===o.serpentine&&(o.serpentine=!0),void 0===o.minimumColorDistanceToDither&&(o.minimumColorDistanceToDither=0),void 0===o.calculateErrorLikeGIMP&&(o.calculateErrorLikeGIMP=!1)}var s,u=new i.distance.Euclidean,l=new i.palette[e](u,r,n);s=o?new i.image.ErrorDiffusionArray(u,i.image.ErrorDiffusionArrayKernel[o.ditherAlgorithm],o.serpentine,o.minimumColorDistanceToDither,o.calculateErrorLikeGIMP):new i.image.NearestColor(u);var c=[];a.forEach((function(t){for(var e=t.bitmap.data,r=new ArrayBuffer(e.length),n=new Uint32Array(r),o=0,a=0;o256)throw new s("Frame ".concat(i," uses more than 256 color indexes"));n.push(o)}if(0===e)return{usesTransparency:r,palettes:n};var a=new Set;n.forEach((function(t){t.colors.forEach((function(t){a.add(t)}))}));var u=a.size;if(r&&++u,e&&u>e)return{usesTransparency:r,palettes:n};for(var l=new Array(a.size),c=a.values(),f=0;fe&&(e=n);var i=t.yOffset+t.bitmap.height;i>r&&(r=i)})),{maxWidth:e,maxHeight:r}},e.quantizeDekker=function(t,e,r){f(t,"NeuQuantFloat",e=e||256,0,r)},e.quantizeSorokin=function(t,e,r,n){var i;switch(e=e||256,r=r||"min-pop"){case"min-pop":i=2;break;case"top-pop":i=1;break;default:throw new Error("Invalid quantizeSorokin histogram '".concat(r,"'"))}f(t,"RGBQuant",e,i,n)},e.quantizeWu=function(t,e,r,n){if(e=e||256,(r=r||5)<1||r>8)throw new Error("Invalid quantization quality");f(t,"WuQuant",e,r,n)},e.read=function(e,r){return r=r||c,t.isBuffer(e)?r.decodeGif(e):(i=e,new Promise((function(t,e){n.readFile(i,(function(r,n){return r?e(r):t(n)}))}))).then((function(t){return r.decodeGif(t)}));var i},e.shareAsJimp=function(t,e){var r=new t(e.bitmap.width,e.bitmap.height,0);return r.bitmap.data=e.bitmap.data,r},e.write=function(t,e,r,i){i=i||c;var o=t.match(/\.[a-zA-Z]+$/);if(null!==o&&l.includes(o[0].toLowerCase()))throw new Error("GIF '".concat(t,"' has an unexpected suffix"));return i.encodeGif(e,r).then((function(e){return function(t,e){return new Promise((function(r,i){n.writeFile(t,e,(function(t){return t?i(t):r()}))}))}(t,e.buffer).then((function(){return e}))}))}}).call(this,r(5).Buffer)},function(t,e,r){"use strict";var n=r(3),i=r(56);Object.defineProperty(e,"__esModule",{value:!0}),e.readFile=e.writeFileSync=e.writeFile=e.read=e.open=e.close=e.stat=e.createReadStream=e.pathExists=void 0;var o=r(131);function a(){return(a=i(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){o.stat(e,(function(e,n){e?r(e):t(n)}))})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function s(){return(s=i(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){o.close(e,(function(e){e?r(e):t()}))})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function u(){return(u=i(n.mark((function t(e,r){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){o.open(e,r,(function(e,r){e?n(e):t(r)}))})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function l(){return(l=i(n.mark((function t(e,r,i,a,s){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){o.read(e,r,i,a,s,(function(e,r,i){e?n(e):t({bytesRead:r,buffer:i})}))})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function c(){return(c=i(n.mark((function t(e,r){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){o.writeFile(e,r,(function(e){e?n(e):t()}))})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function f(){return(f=i(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,r){o.readFile(e,(function(e,n){e?r(e):t(n)}))})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}e.pathExists=o.existsSync,e.createReadStream=o.createReadStream,e.stat=function(t){return a.apply(this,arguments)},e.close=function(t){return s.apply(this,arguments)},e.open=function(t,e){return u.apply(this,arguments)},e.read=function(t,e,r,n,i){return l.apply(this,arguments)},e.writeFile=function(t,e){return c.apply(this,arguments)},e.writeFileSync=function(t,e){o.writeFileSync(t,e)},e.readFile=function(t){return f.apply(this,arguments)}},function(t,e,r){"use strict";(function(t){var n=r(3),i=r(56),o=r(48),a=r(55);Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTokenizer=void 0;var s=r(116),u=function(){function e(r){o(this,e),this.position=0,this.numBuffer=t.alloc(10),this.fileInfo=r||{}}return a(e,[{key:"readToken",value:function(){var e=i(n.mark((function e(r,i){var o;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.alloc(r.len),e.next=3,this.readBuffer(o,{position:i});case 3:if(!(e.sent1&&void 0!==a[1]?a[1]:this.position,o=t.alloc(r.len),e.next=4,this.peekBuffer(o,{position:i});case 4:if(!(e.sent=0||(i[r]=t[r]);return i}},function(t,e,r){var n=r(263),i=r(471),o=r(472),a=r(477),s=r(478),u=r(480),l=Date.prototype.getTime;function c(t,e,r){var d=r||{};return!!(d.strict?o(t,e):t===e)||(!t||!e||"object"!==typeof t&&"object"!==typeof e?d.strict?o(t,e):t==e:function(t,e,r){var o,d;if(typeof t!==typeof e)return!1;if(f(t)||f(e))return!1;if(t.prototype!==e.prototype)return!1;if(i(t)!==i(e))return!1;var p=a(t),m=a(e);if(p!==m)return!1;if(p||m)return t.source===e.source&&s(t)===s(e);if(u(t)&&u(e))return l.call(t)===l.call(e);var g=h(t),v=h(e);if(g!==v)return!1;if(g||v){if(t.length!==e.length)return!1;for(o=0;o=0;o--)if(b[o]!=y[o])return!1;for(o=b.length-1;o>=0;o--)if(d=b[o],!c(t[d],e[d],r))return!1;return!0}(t,e,d))}function f(t){return null===t||void 0===t}function h(t){return!(!t||"object"!==typeof t||"number"!==typeof t.length)&&("function"===typeof t.copy&&"function"===typeof t.slice&&!(t.length>0&&"number"!==typeof t[0]))}t.exports=c},function(t,e,r){"use strict";e.a=function(){return!1}},function(t,e,r){"use strict";(function(t){var n=r(28),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i?n.a.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var r=t.length,n=s?s(r):new t.constructor(r);return t.copy(n),n}}).call(this,r(123)(t))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==typeof t&&"function"!==typeof t)return{default:t};var e=i();if(e&&e.has(t))return e.get(t);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var a=n?Object.getOwnPropertyDescriptor(t,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=t[o]}r.default=t,e&&e.set(t,r);return r}(r(0));function i(){if("function"!==typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}function o(t,e){if(null==t)return{};var r,n,i=function(t,e){if(null==t)return{};var r,n,i={},o=Object.keys(t);for(n=0;n=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"===typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(u){i=!0,o=u}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(t,e)||function(t,e){if(!t)return;if("string"===typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r>2,s=(3&e)<<4|r>>4,u=1>6:64,l=2>4,r=(15&a)<<4|(s=o.indexOf(t.charAt(l++)))>>2,n=(3&s)<<6|(u=o.indexOf(t.charAt(l++))),h[c++]=e,64!==s&&(h[c++]=r),64!==u&&(h[c++]=n);return h}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var n=t("./external"),i=t("./stream/DataWorker"),o=t("./stream/DataLengthProbe"),a=t("./stream/Crc32Probe");function s(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}o=t("./stream/DataLengthProbe"),s.prototype={getContentWorker:function(){var t=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(t,e,r){return t.pipe(new a).pipe(new o("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},e.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var n=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var n=t("./utils"),i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,r,n){var o=i,a=0+r;t^=-1;for(var s=0;s>>8^o[255&(t^e[s])];return-1^t}(0|e,t,t.length):function(t,e,r,n){var o=i,a=0+r;t^=-1;for(var s=0;s>>8^o[255&(t^e.charCodeAt(s))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:n}},{lie:37}],7:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako"),o=t("./utils"),a=t("./stream/GenericWorker"),s=n?"uint8array":"array";function u(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",o.inherits(u,a),u.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,t.data),!1)},u.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(t){return new u("Deflate",t)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function n(t,e){var r,n="";for(r=0;r>>=8;return n}function i(t,e,r,i,a,c){var f,h,d=t.file,p=t.compression,m=c!==s.utf8encode,g=o.transformTo("string",c(d.name)),v=o.transformTo("string",s.utf8encode(d.name)),b=d.comment,y=o.transformTo("string",c(b)),w=o.transformTo("string",s.utf8encode(b)),_=v.length!==d.name.length,x=w.length!==b.length,M="",E="",k="",S=d.dir,A=d.date,C={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(C.crc32=t.crc32,C.compressedSize=t.compressedSize,C.uncompressedSize=t.uncompressedSize);var O=0;e&&(O|=8),m||!_&&!x||(O|=2048);var T=0,D=0;S&&(T|=16),"UNIX"===a?(D=798,T|=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16}(d.unixPermissions,S)):(D=20,T|=function(t){return 63&(t||0)}(d.dosPermissions)),f=A.getUTCHours(),f<<=6,f|=A.getUTCMinutes(),f<<=5,f|=A.getUTCSeconds()/2,h=A.getUTCFullYear()-1980,h<<=4,h|=A.getUTCMonth()+1,h<<=5,h|=A.getUTCDate(),_&&(E=n(1,1)+n(u(g),4)+v,M+="up"+n(E.length,2)+E),x&&(k=n(1,1)+n(u(y),4)+w,M+="uc"+n(k.length,2)+k);var P="";return P+="\n\0",P+=n(O,2),P+=p.magic,P+=n(f,2),P+=n(h,2),P+=n(C.crc32,4),P+=n(C.compressedSize,4),P+=n(C.uncompressedSize,4),P+=n(g.length,2),P+=n(M.length,2),{fileRecord:l.LOCAL_FILE_HEADER+P+g+M,dirRecord:l.CENTRAL_FILE_HEADER+n(D,2)+P+n(y.length,2)+"\0\0\0\0"+n(T,4)+n(i,4)+g+M+y}}var o=t("../utils"),a=t("../stream/GenericWorker"),s=t("../utf8"),u=t("../crc32"),l=t("../signature");function c(t,e,r,n){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(c,a),c.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,a.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},c.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=i(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:function(t){return l.DATA_DESCRIPTOR+n(t.crc32,4)+n(t.compressedSize,4)+n(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return n.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=i},{"../utils":32}],19:[function(t,e,r){"use strict";var n=t("./Uint8ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var n=t("./DataReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var n=t("./ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../support"),o=t("./ArrayReader"),a=t("./StringReader"),s=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new s(t):i.uint8array?new u(n.transformTo("uint8array",t)):new o(n.transformTo("array",t)):new a(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK\x03\x04",r.CENTRAL_FILE_HEADER="PK\x01\x02",r.CENTRAL_DIRECTORY_END="PK\x05\x06",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",r.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",r.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../utils");function o(t){n.call(this,"ConvertWorker to "+t),this.destType=t}i.inherits(o,n),o.prototype.processChunk=function(t){this.push({data:i.transformTo(this.destType,t.data),meta:t.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(o,i),o.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},e.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=n.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}n.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r "+t:t}},e.exports=n},{}],29:[function(t,r,n){"use strict";var i=t("../utils"),o=t("./ConvertWorker"),a=t("./GenericWorker"),s=t("../base64"),u=t("../support"),l=t("../external"),c=null;if(u.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function f(t,e,r){var n=e;switch(e){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=e,this._mimeType=r,i.checkSupport(n),this._worker=t.pipe(new o(n)),t.lock()}catch(t){this._worker=new a("error"),this._worker.error(t)}}f.prototype={accumulate:function(t){return function(t,r){return new l.Promise((function(n,o){var a=[],u=t._internalType,l=t._outputType,c=t._mimeType;t.on("data",(function(t,e){a.push(t),r&&r(e)})).on("error",(function(t){a=[],o(t)})).on("end",(function(){try{var t=function(t,e,r){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",e),r);case"base64":return s.encode(e);default:return i.transformTo(t,e)}}(l,function(t,r){var n,i=0,o=null,a=0;for(n=0;n>>6:(r<65536?e[a++]=224|r>>>12:(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63),e[a++]=128|r>>>6&63),e[a++]=128|63&r);return e}(t)},r.utf8decode=function(t){return i.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,o,a=t.length,u=new Array(2*a);for(e=r=0;e>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(t=n.transformTo(i.uint8array?"uint8array":"array",t))},n.inherits(l,a),l.prototype.processChunk=function(t){var e=n.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var a=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+s[t[r]]>e?r:e}(e),u=e;a!==e.length&&(i.uint8array?(u=e.subarray(0,a),this.leftOver=e.subarray(a,e.length)):(u=e.slice(0,a),this.leftOver=e.slice(a,e.length))),this.push({data:r.utf8decode(u),meta:t.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=l,n.inherits(c,a),c.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,r){"use strict";var n=t("./support"),i=t("./base64"),o=t("./nodejsUtils"),a=t("set-immediate-shim"),s=t("./external");function u(t){return t}function l(t,e){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(r<65536?e[a++]=224|r>>>12:(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63),e[a++]=128|r>>>6&63),e[a++]=128|63&r);return e},r.buf2binstring=function(t){return u(t,t.length)},r.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r>10&1023,l[n++]=56320|1023&i)}return u(l,n)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var o=n,a=i+r;t^=-1;for(var s=i;s>>8^o[255&(t^e[s])];return-1^t}},{}],46:[function(t,e,r){"use strict";var n,i=t("../utils/common"),o=t("./trees"),a=t("./adler32"),s=t("./crc32"),u=t("./messages"),l=-2,c=258,f=262,h=113;function d(t,e){return t.msg=u[e],e}function p(t){return(t<<1)-(4t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function v(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,g(t.strm)}function b(t,e){t.pending_buf[t.pending++]=e}function y(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function w(t,e){var r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-f?t.strstart-(t.w_size-f):0,l=t.window,h=t.w_mask,d=t.prev,p=t.strstart+c,m=l[o+a-1],g=l[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(l[(r=e)+a]===g&&l[r+a-1]===m&&l[r]===l[o]&&l[++r]===l[o+1]){o+=2,r++;do{}while(l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&l[++o]===l[++r]&&ou&&0!=--i);return a<=t.lookahead?a:t.lookahead}function _(t){var e,r,n,o,u,l,c,h,d,p,m=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=m+(m-f)){for(i.arraySet(t.window,t.window,m,m,0),t.match_start-=m,t.strstart-=m,t.block_start-=m,e=r=t.hash_size;n=t.head[--e],t.head[e]=m<=n?n-m:0,--r;);for(e=r=m;n=t.prev[--e],t.prev[e]=m<=n?n-m:0,--r;);o+=m}if(0===t.strm.avail_in)break;if(l=t.strm,c=t.window,h=t.strstart+t.lookahead,p=void 0,(d=o)<(p=l.avail_in)&&(p=d),r=0===p?0:(l.avail_in-=p,i.arraySet(c,l.input,l.next_in,p,h),1===l.state.wrap?l.adler=a(l.adler,c,p,h):2===l.state.wrap&&(l.adler=s(l.adler,c,p,h)),l.next_in+=p,l.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(_(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,v(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-f&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(v(t,!1),t.strm.avail_out),1)})),new E(4,4,8,4,x),new E(4,5,16,8,x),new E(4,6,32,32,x),new E(4,4,16,16,M),new E(8,16,32,32,M),new E(8,16,128,128,M),new E(8,32,128,256,M),new E(32,128,258,1024,M),new E(32,258,258,4096,M)],r.deflateInit=function(t,e){return C(t,e,8,15,8,0)},r.deflateInit2=C,r.deflateReset=A,r.deflateResetKeep=S,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?l:(t.state.gzhead=e,0):l},r.deflate=function(t,e){var r,i,a,u;if(!t||!t.state||5>8&255),b(i,i.gzhead.time>>16&255),b(i,i.gzhead.time>>24&255),b(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),b(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(b(i,255&i.gzhead.extra.length),b(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(b(i,0),b(i,0),b(i,0),b(i,0),b(i,0),b(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),b(i,3),i.status=h);else{var f=8+(i.w_bits-8<<4)<<8;f|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=h,y(i,f),0!==i.strstart&&(y(i,t.adler>>>16),y(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),g(t),a=i.pending,i.pending!==i.pending_buf_size));)b(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),g(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),g(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&g(t),i.pending+2<=i.pending_buf_size&&(b(i,255&t.adler),b(i,t.adler>>8&255),t.adler=0,i.status=h)):i.status=h),0!==i.pending){if(g(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&p(e)<=p(r)&&4!==e)return d(t,-5);if(666===i.status&&0!==t.avail_in)return d(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var w=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(_(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=c){if(_(t),t.lookahead<=c&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==w&&4!==w||(i.status=666),1===w||3===w)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===w&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(m(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),g(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(b(i,255&t.adler),b(i,t.adler>>8&255),b(i,t.adler>>16&255),b(i,t.adler>>24&255),b(i,255&t.total_in),b(i,t.total_in>>8&255),b(i,t.total_in>>16&255),b(i,t.total_in>>24&255)):(y(i,t.adler>>>16),y(i,65535&t.adler)),g(t),0=r.w_size&&(0===s&&(m(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,e,d-r.w_size,r.w_size,0),e=h,d=r.w_size),u=t.avail_in,c=t.next_in,f=t.input,t.avail_in=d,t.next_in=0,t.input=e,_(r);r.lookahead>=3;){for(n=r.strstart,o=r.lookahead-2;r.ins_h=(r.ins_h<>>=w=y>>>24,p-=w,0===(w=y>>>16&255))S[o++]=65535&y;else{if(!(16&w)){if(0==(64&w)){y=m[(65535&y)+(d&(1<>>=w,p-=w),p<15&&(d+=k[n++]<>>=w=y>>>24,p-=w,!(16&(w=y>>>16&255))){if(0==(64&w)){y=g[(65535&y)+(d&(1<>>=w,p-=w,(w=o-a)>3,d&=(1<<(p-=_<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):u}function h(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,f(t)):u}function d(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=a.wsize?(n.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(o=a.wsize-a.wnext)&&(o=i),n.arraySet(a.window,e,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=o(r.check,B,2,0),v=g=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&g)<<8)+(g>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&g)){t.msg="unknown compression method",r.mode=30;break}if(v-=4,D=8+(15&(g>>>=4)),0===r.wbits)r.wbits=D;else if(D>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(B[0]=255&g,B[1]=g>>>8&255,r.check=o(r.check,B,2,0)),v=g=0,r.mode=3;case 3:for(;v<32;){if(0===p)break t;p--,g+=c[h++]<>>8&255,B[2]=g>>>16&255,B[3]=g>>>24&255,r.check=o(r.check,B,4,0)),v=g=0,r.mode=4;case 4:for(;v<16;){if(0===p)break t;p--,g+=c[h++]<>8),512&r.flags&&(B[0]=255&g,B[1]=g>>>8&255,r.check=o(r.check,B,2,0)),v=g=0,r.mode=5;case 5:if(1024&r.flags){for(;v<16;){if(0===p)break t;p--,g+=c[h++]<>>8&255,r.check=o(r.check,B,2,0)),v=g=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(p<(x=r.length)&&(x=p),x&&(r.head&&(D=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,h,x,D)),512&r.flags&&(r.check=o(r.check,c,x,h)),p-=x,h+=x,r.length-=x),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===p)break t;for(x=0;D=c[h+x++],r.head&&D&&r.length<65536&&(r.head.name+=String.fromCharCode(D)),D&&x>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;v<32;){if(0===p)break t;p--,g+=c[h++]<>>=7&v,v-=7&v,r.mode=27;break}for(;v<3;){if(0===p)break t;p--,g+=c[h++]<>>=1)){case 0:r.mode=14;break;case 1:if(b(r),r.mode=20,6!==e)break;g>>>=2,v-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}g>>>=2,v-=2;break;case 14:for(g>>>=7&v,v-=7&v;v<32;){if(0===p)break t;p--,g+=c[h++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&g,v=g=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(x=r.length){if(p>>=5,v-=5,r.ndist=1+(31&g),g>>>=5,v-=5,r.ncode=4+(15&g),g>>>=4,v-=4,286>>=3,v-=3}for(;r.have<19;)r.lens[j[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,I={bits:r.lenbits},P=s(0,r.lens,0,19,r.lencode,0,r.work,I),r.lenbits=I.bits,P){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,A=65535&F,!((k=F>>>24)<=v);){if(0===p)break t;p--,g+=c[h++]<>>=k,v-=k,r.lens[r.have++]=A;else{if(16===A){for(R=k+2;v>>=k,v-=k,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}D=r.lens[r.have-1],x=3+(3&g),g>>>=2,v-=2}else if(17===A){for(R=k+3;v>>=k)),g>>>=3,v-=3}else{for(R=k+7;v>>=k)),g>>>=7,v-=7}if(r.have+x>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;x--;)r.lens[r.have++]=D}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,I={bits:r.lenbits},P=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,I),r.lenbits=I.bits,P){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,I={bits:r.distbits},P=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,I),r.distbits=I.bits,P){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=p&&258<=m){t.next_out=d,t.avail_out=m,t.next_in=h,t.avail_in=p,r.hold=g,r.bits=v,a(t,_),d=t.next_out,f=t.output,m=t.avail_out,h=t.next_in,c=t.input,p=t.avail_in,g=r.hold,v=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;S=(F=r.lencode[g&(1<>>16&255,A=65535&F,!((k=F>>>24)<=v);){if(0===p)break t;p--,g+=c[h++]<>C)])>>>16&255,A=65535&F,!(C+(k=F>>>24)<=v);){if(0===p)break t;p--,g+=c[h++]<>>=C,v-=C,r.back+=C}if(g>>>=k,v-=k,r.back+=k,r.length=A,0===S){r.mode=26;break}if(32&S){r.back=-1,r.mode=12;break}if(64&S){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&S,r.mode=22;case 22:if(r.extra){for(R=r.extra;v>>=r.extra,v-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;S=(F=r.distcode[g&(1<>>16&255,A=65535&F,!((k=F>>>24)<=v);){if(0===p)break t;p--,g+=c[h++]<>C)])>>>16&255,A=65535&F,!(C+(k=F>>>24)<=v);){if(0===p)break t;p--,g+=c[h++]<>>=C,v-=C,r.back+=C}if(g>>>=k,v-=k,r.back+=k,64&S){t.msg="invalid distance code",r.mode=30;break}r.offset=A,r.extra=15&S,r.mode=24;case 24:if(r.extra){for(R=r.extra;v>>=r.extra,v-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===m)break t;if(x=_-m,r.offset>x){if((x=r.offset-x)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}M=x>r.wnext?(x-=r.wnext,r.wsize-x):r.wnext-x,x>r.length&&(x=r.length),E=r.window}else E=f,M=d-r.offset,x=r.length;for(mb?(w=j[N+f[E]],I[R+f[E]]):(w=96,0),d=1<>O)+(p-=d)]=y<<24|w<<16|_|0,0!==p;);for(d=1<>=1;if(0!==d?(P&=d-1,P+=d):P=0,E++,0==--F[M]){if(M===S)break;M=e[r+f[E]]}if(A>>7)]}function k(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function S(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<>>=1,r<<=1,0<--e;);return r>>>1}function O(t,e,r){var n,i,o=new Array(16),a=0;for(n=1;n<=u;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=C(o[s]++,s))}}function T(t){var e;for(e=0;e>1;1<=r;r--)I(t,o,r);for(i=l;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],I(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,I(t,o,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,a,s,l=e.dyn_tree,c=e.max_code,f=e.stat_desc.static_tree,h=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,m=e.stat_desc.max_length,g=0;for(o=0;o<=u;o++)t.bl_count[o]=0;for(l[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)m<(o=l[2*l[2*(n=t.heap[r])+1]+1]+1)&&(o=m,g++),l[2*n+1]=o,c>=7;n>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e>>3,(a=t.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==e?L(t,e,r,n):4===t.strategy||a===i?(S(t,2+(n?1:0),3),R(t,d,p)):(S(t,4+(n?1:0),3),function(t,e,r,n){var i;for(S(t,e-257,5),S(t,r-1,5),S(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(g[r]+o+1)]++,t.dyn_dtree[2*E(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){S(t,2,3),A(t,256,d),function(t){16===t.bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,r){"use strict";e.exports="function"==typeof n?n:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}).call(this,r(5).Buffer,r(20),r(152).setImmediate)},function(t,e){function r(t,e){var r=t.length,n=new Array(r),i={},o=r,a=function(t){for(var e=new Map,r=0,n=t.length;r0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}Object.create;var c=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function f(t,e){var r=function(t){var e=t.name;if(e&&-1!==e.lastIndexOf(".")&&!t.type){var r=e.split(".").pop().toLowerCase(),n=c.get(r);n&&Object.defineProperty(t,"type",{value:n,writable:!1,configurable:!1,enumerable:!0})}return t}(t);if("string"!==typeof r.path){var n=t.webkitRelativePath;Object.defineProperty(r,"path",{value:"string"===typeof e?e:"string"===typeof n&&n.length>0?n:t.name,writable:!1,configurable:!1,enumerable:!0})}return r}var h=[".DS_Store","Thumbs.db"];function d(t){return(null!==t.target&&t.target.files?g(t.target.files):[]).map((function(t){return f(t)}))}function p(t,e){return s(this,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:return t.items?(r=g(t.items).filter((function(t){return"file"===t.kind})),"drop"!==e?[2,r]:[4,Promise.all(r.map(v))]):[3,2];case 1:return[2,m(b(n.sent()))];case 2:return[2,m(g(t.files).map((function(t){return f(t)})))]}}))}))}function m(t){return t.filter((function(t){return-1===h.indexOf(t.name)}))}function g(t){for(var e=[],r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rr)return[!1,C(r)];if(t.sizer)return[!1,C(r)]}return[!0,null]}function I(t){return void 0!==t&&null!==t}function R(t){var e=t.files,r=t.accept,n=t.minSize,i=t.maxSize,o=t.multiple,a=t.maxFiles;return!(!o&&e.length>1||o&&a>=1&&e.length>a)&&e.every((function(t){var e=k(D(t,r),1)[0],o=k(P(t,n,i),1)[0];return e&&o}))}function F(t){return"function"===typeof t.isPropagationStopped?t.isPropagationStopped():"undefined"!==typeof t.cancelBubble&&t.cancelBubble}function B(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,(function(t){return"Files"===t||"application/x-moz-file"===t})):!!t.target&&!!t.target.files}function j(t){t.preventDefault()}function N(t){return-1!==t.indexOf("MSIE")||-1!==t.indexOf("Trident/")}function L(t){return-1!==t.indexOf("Edge/")}function z(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return N(t)||L(t)}function U(){for(var t=arguments.length,e=new Array(t),r=0;r1?r-1:0),i=1;it.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0||(i[r]=t[r]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var $=Object(n.forwardRef)((function(t,e){var r=t.children,o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Y(Y({},X),t),r=e.accept,i=e.disabled,o=e.getFilesFromEvent,a=e.maxSize,s=e.minSize,u=e.multiple,l=e.maxFiles,c=e.onDragEnter,f=e.onDragLeave,h=e.onDragOver,d=e.onDrop,p=e.onDropAccepted,m=e.onDropRejected,g=e.onFileDialogCancel,v=e.preventDropOnDocument,b=e.noClick,y=e.noKeyboard,w=e.noDrag,_=e.noDragEventsBubbling,x=Object(n.useRef)(null),M=Object(n.useRef)(null),E=Object(n.useReducer)(Q,J),k=W(E,2),S=k[0],A=k[1],C=S.isFocused,O=S.isFileDialogActive,I=S.draggedFiles,N=Object(n.useCallback)((function(){M.current&&(A({type:"openDialog"}),M.current.value=null,M.current.click())}),[A]),L=function(){O&&setTimeout((function(){M.current&&(M.current.files.length||(A({type:"closeDialog"}),"function"===typeof g&&g()))}),300)};Object(n.useEffect)((function(){return window.addEventListener("focus",L,!1),function(){window.removeEventListener("focus",L,!1)}}),[M,O,g]);var q=Object(n.useCallback)((function(t){x.current&&x.current.isEqualNode(t.target)&&(32!==t.keyCode&&13!==t.keyCode||(t.preventDefault(),N()))}),[x,M]),G=Object(n.useCallback)((function(){A({type:"focus"})}),[]),V=Object(n.useCallback)((function(){A({type:"blur"})}),[]),$=Object(n.useCallback)((function(){b||(z()?setTimeout(N,0):N())}),[M,b]),tt=Object(n.useRef)([]),et=function(t){x.current&&x.current.contains(t.target)||(t.preventDefault(),tt.current=[])};Object(n.useEffect)((function(){return v&&(document.addEventListener("dragover",j,!1),document.addEventListener("drop",et,!1)),function(){v&&(document.removeEventListener("dragover",j),document.removeEventListener("drop",et))}}),[x,v]);var rt=Object(n.useCallback)((function(t){t.preventDefault(),t.persist(),lt(t),tt.current=[].concat(H(tt.current),[t.target]),B(t)&&Promise.resolve(o(t)).then((function(e){F(t)&&!_||(A({draggedFiles:e,isDragActive:!0,type:"setDraggedFiles"}),c&&c(t))}))}),[o,c,_]),nt=Object(n.useCallback)((function(t){if(t.preventDefault(),t.persist(),lt(t),t.dataTransfer)try{t.dataTransfer.dropEffect="copy"}catch(e){}return B(t)&&h&&h(t),!1}),[h,_]),it=Object(n.useCallback)((function(t){t.preventDefault(),t.persist(),lt(t);var e=tt.current.filter((function(t){return x.current&&x.current.contains(t)})),r=e.indexOf(t.target);-1!==r&&e.splice(r,1),tt.current=e,e.length>0||(A({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),B(t)&&f&&f(t))}),[x,f,_]),ot=Object(n.useCallback)((function(t){t.preventDefault(),t.persist(),lt(t),tt.current=[],B(t)&&Promise.resolve(o(t)).then((function(e){if(!F(t)||_){var n=[],i=[];e.forEach((function(t){var e=W(D(t,r),2),o=e[0],u=e[1],l=W(P(t,s,a),2),c=l[0],f=l[1];if(o&&c)n.push(t);else{var h=[u,f].filter((function(t){return t}));i.push({file:t,errors:h})}})),(!u&&n.length>1||u&&l>=1&&n.length>l)&&(n.forEach((function(t){i.push({file:t,errors:[T]})})),n.splice(0)),A({acceptedFiles:n,fileRejections:i,type:"setFiles"}),d&&d(n,i,t),i.length>0&&m&&m(i,t),n.length>0&&p&&p(n,t)}})),A({type:"reset"})}),[u,r,s,a,l,o,d,p,m,_]),at=function(t){return i?null:t},st=function(t){return y?null:at(t)},ut=function(t){return w?null:at(t)},lt=function(t){_&&t.stopPropagation()},ct=Object(n.useMemo)((function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,r=void 0===e?"ref":e,n=t.onKeyDown,o=t.onFocus,a=t.onBlur,s=t.onClick,u=t.onDragEnter,l=t.onDragOver,c=t.onDragLeave,f=t.onDrop,h=K(t,["refKey","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"]);return Y(Y(Z({onKeyDown:st(U(n,q)),onFocus:st(U(o,G)),onBlur:st(U(a,V)),onClick:at(U(s,$)),onDragEnter:ut(U(u,rt)),onDragOver:ut(U(l,nt)),onDragLeave:ut(U(c,it)),onDrop:ut(U(f,ot))},r,x),i||y?{}:{tabIndex:0}),h)}}),[x,q,G,V,$,rt,nt,it,ot,y,w,i]),ft=Object(n.useCallback)((function(t){t.stopPropagation()}),[]),ht=Object(n.useMemo)((function(){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.refKey,n=void 0===e?"ref":e,i=t.onChange,o=t.onClick,a=K(t,["refKey","onChange","onClick"]),s=Z({accept:r,multiple:u,type:"file",style:{display:"none"},onChange:at(U(i,ot)),onClick:at(U(o,ft)),autoComplete:"off",tabIndex:-1},n,M);return Y(Y({},s),a)}}),[M,r,u,ot,i]),dt=I.length,pt=dt>0&&R({files:I,accept:r,minSize:s,maxSize:a,multiple:u,maxFiles:l}),mt=dt>0&&!pt;return Y(Y({},S),{},{isDragAccept:pt,isDragReject:mt,isFocused:C&&!i,getRootProps:ct,getInputProps:ht,rootRef:x,inputRef:M,open:at(N)})}(K(t,["children"])),a=o.open,s=K(o,["open"]);return Object(n.useImperativeHandle)(e,(function(){return{open:a}}),[a]),i.a.createElement(n.Fragment,null,r(Y(Y({},s),{},{open:a})))}));$.displayName="Dropzone";var X={disabled:!1,getFilesFromEvent:function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,(r=t,r.dataTransfer&&t.dataTransfer?p(t.dataTransfer,t.type):d(t))];var r}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1};$.defaultProps=X,$.propTypes={children:a.a.func,accept:a.a.oneOfType([a.a.string,a.a.arrayOf(a.a.string)]),multiple:a.a.bool,preventDropOnDocument:a.a.bool,noClick:a.a.bool,noKeyboard:a.a.bool,noDrag:a.a.bool,noDragEventsBubbling:a.a.bool,minSize:a.a.number,maxSize:a.a.number,maxFiles:a.a.number,disabled:a.a.bool,getFilesFromEvent:a.a.func,onFileDialogCancel:a.a.func,onDragEnter:a.a.func,onDragLeave:a.a.func,onDragOver:a.a.func,onDrop:a.a.func,onDropAccepted:a.a.func,onDropRejected:a.a.func};e.a=$;var J={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Q(t,e){switch(e.type){case"focus":return Y(Y({},t),{},{isFocused:!0});case"blur":return Y(Y({},t),{},{isFocused:!1});case"openDialog":return Y(Y({},t),{},{isFileDialogActive:!0});case"closeDialog":return Y(Y({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":var r=e.isDragActive,n=e.draggedFiles;return Y(Y({},t),{},{draggedFiles:n,isDragActive:r});case"setFiles":return Y(Y({},t),{},{acceptedFiles:e.acceptedFiles,fileRejections:e.fileRejections});case"reset":return Y(Y({},t),{},{isFileDialogActive:!1,isDragActive:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]});default:return t}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(144);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(u){i=!0,o=u}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(t,e)||Object(n.a)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},,function(t,e,r){"use strict";var n=r(122),i="function"===typeof Symbol&&Symbol.for,o=i?Symbol.for("react.element"):60103,a=i?Symbol.for("react.portal"):60106,s=i?Symbol.for("react.fragment"):60107,u=i?Symbol.for("react.strict_mode"):60108,l=i?Symbol.for("react.profiler"):60114,c=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.forward_ref"):60112,d=i?Symbol.for("react.suspense"):60113,p=i?Symbol.for("react.memo"):60115,m=i?Symbol.for("react.lazy"):60116,g="function"===typeof Symbol&&Symbol.iterator;function v(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;rT.length&&T.push(t)}function I(t,e,r){return null==t?0:function t(e,r,n,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case a:u=!0}}if(u)return n(i,e,""===r?"."+R(e,0):r),1;if(u=0,r=""===r?".":r+":",Array.isArray(e))for(var l=0;l