From 1e82e772441f0a15ff841b1feba8cabf7f9d2800 Mon Sep 17 00:00:00 2001 From: jywarren <jeff@unterbahn.com> Date: Mon, 26 Dec 2016 23:59:16 -0500 Subject: [PATCH 1/2] constructor options to configure WebJack --- README.md | 15 +++++++++++++++ dist/webjackport.js | 7 +++++-- src/index.js | 7 +++++-- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 59e5dba..6b2fc18 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,21 @@ board.on("ready", function() { }.bind(this), 500); }); ``` + +You can configure WebJack with a profile object (see [docs](https://github.com/publiclab/webjack#individual-profile-options)) by passing it as a constructor option: + +```js +var board = new Firmata(new WebJackPort({ + profile: { + baud : 1225, + freqLow : 4900, + freqHigh : 7350, + echoCancellation : false, + softmodem : true + } +})); +``` + Also take a look at the demo site in the example folder. ### Sketches diff --git a/dist/webjackport.js b/dist/webjackport.js index ae3bd34..88d9cfa 100644 --- a/dist/webjackport.js +++ b/dist/webjackport.js @@ -10,7 +10,7 @@ var WebJack = require("webjack"); var Emitter = require("events").EventEmitter; var priv = new Map(); -function WebJackPort() { +function WebJackPort(options) { Emitter.call(this); @@ -37,7 +37,10 @@ function WebJackPort() { } }; - var connection = new WebJack.Connection({raw : true}); + options = options || {}; + options.profile = options.profile || {}; + options.profile.raw = true; + var connection = new WebJack.Connection(options.profile); state.flushTo(connection); connection.listen(function(data) { diff --git a/src/index.js b/src/index.js index ae3bd34..88d9cfa 100644 --- a/src/index.js +++ b/src/index.js @@ -10,7 +10,7 @@ var WebJack = require("webjack"); var Emitter = require("events").EventEmitter; var priv = new Map(); -function WebJackPort() { +function WebJackPort(options) { Emitter.call(this); @@ -37,7 +37,10 @@ function WebJackPort() { } }; - var connection = new WebJack.Connection({raw : true}); + options = options || {}; + options.profile = options.profile || {}; + options.profile.raw = true; + var connection = new WebJack.Connection(options.profile); state.flushTo(connection); connection.listen(function(data) { From c0057f15a274751db27b25fbbe669f8fc8c2ca57 Mon Sep 17 00:00:00 2001 From: jywarren <jeff@unterbahn.com> Date: Tue, 27 Dec 2016 01:15:17 -0500 Subject: [PATCH 2/2] starting attempt at example for configurable WebJack options --- example/Demo.js | 9 ++++- example/bundle.js | 18 ++++----- example/jquery.min.js | 8 ++-- example/slow/index.html | 81 +++++++++++++++++++++++++++++++++++++++++ example/slow/slow.js | 11 ++++++ 5 files changed, 113 insertions(+), 14 deletions(-) create mode 100644 example/slow/index.html create mode 100644 example/slow/slow.js diff --git a/example/Demo.js b/example/Demo.js index 8307c4f..0798d06 100644 --- a/example/Demo.js +++ b/example/Demo.js @@ -13,6 +13,10 @@ var CAPABILITY_QUERY = 0x6B; var ANALOG_MAPPING_QUERY = 0x69; var SAMPLING_INTERVAL = 0x7A; +function setOptions(options) { + board = new Board(new WebJackPort(options), opts); +} + $(document).ready(function($) { var log = $('.webjack-log'); log.appends = function(text){ @@ -109,5 +113,8 @@ $(document).ready(function($) { }); }); -module.exports = { board: board }; +module.exports = { + board: board, + setOptions: setOptions +}; diff --git a/example/bundle.js b/example/bundle.js index 940ce26..685eccd 100644 --- a/example/bundle.js +++ b/example/bundle.js @@ -1,9 +1,9 @@ -var Demo=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";var n=r(1),i=n.Board,o=r(56),a={reportVersionTimeout:2500,skipCapabilities:!0},s=new i(new o,a),u=107,c=105,l=122;$(document).ready(function(t){function e(){var t=s.firmware.name+"-"+s.firmware.version.major+"."+s.firmware.version.minor;console.log(t),r.appends("Firmware: "+t)}var r=t(".webjack-log");r.appends=function(t){this.append(t+"<br>"),this.scrollTop(this[0].scrollHeight)},s.sysexResponse(u,function(t){}),s.sysexResponse(c,function(t){}),s.sysexResponse(l,function(t){});var n=t("#digital")[0],i=t("#analog")[0];n.disabled=!0,i.disabled=!0,s.on("ready",function(){e(),r.appends("READY! Press 'Query Capabilities' to enable analogRead."),n.disabled=!1,s.queryAnalogMapping(function(t){i.disabled=!1})}),t("#capab").click(function(){s.queryCapabilities(function(){r.appends("Received capabilities."),s.queryAnalogMapping(function(t){r.appends("Received analog mapping. Ready to read."),i.disabled=!1})})}),t("#firmware").click(function(){s.queryFirmware(function(){e()})}),n.onclick=function(){if(s.isReady){var e=t("#pin").val(),r="0"==t("#state").val()?s.LOW:s.HIGH;console.log("digitalWrite("+e+","+r+")"),s.pinMode(e,s.MODES.OUTPUT),s.digitalWrite(e,r)}},i.onclick=function(){if(s.isReady){var e=t("#apin").val();console.log("analogRead("+e+")"),s.setSamplingInterval(200),s.analogRead(e,function(t){console.log("Received analog value: "+t),r.appends("Analog Pin "+e+": "+t)})}},t("#reset").click(function(){s.reset()})}),t.exports={board:s}},function(t,e,r){(function(e,n,i){function o(t,e,r){function n(){i.isReady=!0,i.emit("ready"),"function"==typeof r&&r()}if("function"!=typeof e&&"undefined"!=typeof e||(r=e,e={}),!(this instanceof o))return new o(t,e,r);u.call(this);var i=this,a={reportVersionTimeout:5e3,samplingInterval:19,serialport:{baudRate:57600,bufferSize:1}},s=Object.assign({},a,e);this.isReady=!1,this.MODES={INPUT:0,OUTPUT:1,ANALOG:2,PWM:3,SERVO:4,SHIFT:5,I2C:6,ONEWIRE:7,STEPPER:8,SERIAL:10,IGNORE:127,PING_READ:117,UNKOWN:16},this.I2C_MODES={WRITE:0,READ:1,CONTINUOUS_READ:2,STOP_READING:3},this.STEPPER={TYPE:{DRIVER:1,TWO_WIRE:2,FOUR_WIRE:4},RUNSTATE:{STOP:0,ACCEL:1,DECEL:2,RUN:3},DIRECTION:{CCW:0,CW:1}},this.SERIAL_MODES={CONTINUOUS_READ:0,STOP_READING:1},this.SERIAL_PORT_IDs={HW_SERIAL0:0,HW_SERIAL1:1,HW_SERIAL2:2,HW_SERIAL3:3,SW_SERIAL0:8,SW_SERIAL1:9,SW_SERIAL2:16,SW_SERIAL3:17,DEFAULT:8},this.SERIAL_PIN_TYPES={RES_RX0:0,RES_TX0:1,RES_RX1:2,RES_TX1:3,RES_RX2:4,RES_TX2:5,RES_RX3:6,RES_TX3:7},this.HIGH=1,this.LOW=0,this.pins=[],this.analogPins=[],this.version={},this.firmware={},this.currentBuffer=[],this.versionReceived=!1,this.name="Firmata",this.settings=s,"object"==typeof t?this.transport=t:this.transport=new f.SerialPort(t,s.serialport),this.sp=this.transport,this.transport.on("close",function(){this.emit("close")}.bind(this)),this.transport.on("disconnect",function(){this.emit("disconnect")}.bind(this)),this.transport.on("open",function(){this.emit("open"),this.emit("connect")}.bind(this)),this.transport.on("error",function(t){this.isReady||"function"!=typeof r?this.emit("error",t):r(t)}.bind(this)),this.transport.on("data",function(t){for(var e,r,n,i,o,a,s=0;s<t.length;s++)e=t[s],0===this.currentBuffer.length&&0===e||(this.currentBuffer.push(e),i=this.currentBuffer[0],o=this.currentBuffer[this.currentBuffer.length-1],i===et&&o===m?(a=st[this.currentBuffer[1]],a&&this.versionReceived&&(a(this),this.currentBuffer.length=0)):i===et&&s>0?(r=this.currentBuffer[s],r>127&&(this.currentBuffer.length=0,this.currentBuffer.push(r))):i!==et&&(n=i<et?i&et:i,n!==H&&n!==y&&n!==b&&(this.currentBuffer.length=0)),3===this.currentBuffer.length&&i!==et&&(n=i<et?i&et:i,at[n]?((this.versionReceived||i===H)&&(this.versionReceived=!0,at[n](this)),this.currentBuffer.length=0):this.currentBuffer.length=0))}.bind(this)),this.reportVersionTimeoutId=setTimeout(function(){this.versionReceived===!1&&(this.reportVersion(function(){}),this.queryFirmware(function(){}))}.bind(this),s.reportVersionTimeout),this.once("reportversion",function(){clearTimeout(this.reportVersionTimeoutId),this.versionReceived=!0,this.once("queryfirmware",function(){if(void 0!==e.samplingInterval&&this.setSamplingInterval(e.samplingInterval),s.skipCapabilities){if(this.analogPins=s.analogPins||this.analogPins,this.pins=s.pins||this.pins,!this.pins.length)for(var t=0;t<(s.pinCount||ot);t++){var r=this.analogPins.indexOf(t);r<0&&(r=127),this.pins.push({supportedModes:[],analogChannel:r})}n()}else this.queryCapabilities(function(){this.queryAnalogMapping(n)})})})}function a(t,e){var r=p.get(t);if(!r)throw new Error("I2C is not enabled for this board. To enable, call the i2cConfig() method.");if(e[1]===O){var n=e[2];r[n]||(r[n]={stopTX:!0}),e[3]&j&&(e[3]|=Number(!r[n].stopTX)<<6)}t.transport.write(new i(e))}Object.assign&&Map||r(7);var s=r(8),u=r(11).EventEmitter,c=r(12),l=r(13),f=null,p=new Map;try{f=r(e.browser||parseFloat(e.versions.nw)>=.13?14:n.IS_TEST_MODE?!function(){var t=new Error('Cannot find module "../test/MockSerialPort"');throw t.code="MODULE_NOT_FOUND",t}():15)}catch(t){}if(null==f)throw console.log("It looks like serialport didn't compile properly. This is a common problem and its fix is well documented here https://github.com/voodootikigod/node-serialport#to-install"),"Missing serialport dependency";var h=105,d=106,y=224,v=107,g=108,b=144,m=247,_=111,w=120,E=119,O=118,j=24,S=65,T=115,C=16,x=67,P=8,R=1,A=69,k=68,I=66,M=64,N=60,F=32,B=244,L=109,D=110,U=117,W=121,z=192,q=208,H=249,V=122,$=112,G=96,Y=16,X=32,Q=48,J=64,Z=80,K=96,tt=112,et=240,rt=114,nt=113,it=255,ot=128,at={};at[H]=function(t){t.version.major=t.currentBuffer[1],t.version.minor=t.currentBuffer[2],t.emit("reportversion")},at[y]=function(t){var e=t.currentBuffer[1]|t.currentBuffer[2]<<7,r=15&t.currentBuffer[0];t.pins[t.analogPins[r]]&&(t.pins[t.analogPins[r]].value=e),t.emit("analog-read-"+r,e),t.emit("analog-read",{pin:r,value:e})},at[b]=function(t){for(var e=15&t.currentBuffer[0],r=t.currentBuffer[1]|t.currentBuffer[2]<<7,n=0;n<8;n++){var i=8*e+n,o=t.pins[i];o&&o.mode===t.MODES.INPUT&&(o.value=r>>(7&n)&1,t.emit("digital-read-"+i,o.value),t.emit("digital-read",{pin:i,value:o.value}))}};var st={};st[W]=function(t){for(var e=t.currentBuffer.length-2,r=new i(Math.round((e-4)/2)),n=0,o=0,a=4;a<e;a+=2)n=127&t.currentBuffer[a]|(127&t.currentBuffer[a+1])<<7,r.writeUInt8(n,o++);t.firmware={name:r.toString(),version:{major:t.currentBuffer[2],minor:t.currentBuffer[3]}},t.emit("queryfirmware")},st[g]=function(t){function e(t){return r.reduce(function(e,r,n){return t&1<<r&&e.push(r),e},[])}var r=Object.keys(t.MODES).map(function(e){return t.MODES[e]}),n=0;if(!t.pins.length)for(var i=2,o=0;i<t.currentBuffer.length-1;i++)127!==t.currentBuffer[i]?(0===o&&(n|=1<<t.currentBuffer[i]),o^=1):(t.pins.push({supportedModes:e(n),mode:void 0,value:0,report:1}),n=0,o=0);t.emit("capability-query")},st[D]=function(t){var e=t.currentBuffer[2];t.pins[e].mode=t.currentBuffer[3],t.pins[e].state=t.currentBuffer[4],t.currentBuffer.length>6&&(t.pins[e].state|=t.currentBuffer[5]<<7),t.currentBuffer.length>7&&(t.pins[e].state|=t.currentBuffer[6]<<14),t.emit("pin-state-"+e)},st[d]=function(t){for(var e,r=0,n=2;n<t.currentBuffer.length-1;n++)e=t.currentBuffer[n],t.pins[r].analogChannel=e,127!==e&&t.analogPins.push(r),r++;t.emit("analog-mapping-query")},st[E]=function(t){for(var e=[],r=127&t.currentBuffer[2]|(127&t.currentBuffer[3])<<7,n=127&t.currentBuffer[4]|(127&t.currentBuffer[5])<<7,i=6,o=t.currentBuffer.length-1;i<o;i+=2)e.push(t.currentBuffer[i]|t.currentBuffer[i+1]<<7);t.emit("I2C-reply-"+r+"-"+n,e)},st[T]=function(t){var e=t.currentBuffer[2];st[e]&&st[e](t)},st[I]=function(t){var e=t.currentBuffer[3],r=t.currentBuffer.slice(4,t.currentBuffer.length-1);t.emit("1-wire-search-reply-"+e,l.readDevices(r))},st[A]=function(t){var e=t.currentBuffer[3],r=t.currentBuffer.slice(4,t.currentBuffer.length-1);t.emit("1-wire-search-alarms-reply-"+e,l.readDevices(r))},st[x]=function(t){var e=t.currentBuffer.slice(4,t.currentBuffer.length-1),r=c.from7BitArray(e),n=r[1]<<8|r[0];t.emit("1-wire-read-reply-"+n,r.slice(2))},st[nt]=function(t){var e=new i(t.currentBuffer.slice(2,-1)).toString("utf8").replace(/\0/g,"");t.emit("string",e)},st[U]=function(t){var e=127&t.currentBuffer[2]|(127&t.currentBuffer[3])<<7,r=[127&t.currentBuffer[4]|(127&t.currentBuffer[5])<<7,127&t.currentBuffer[6]|(127&t.currentBuffer[7])<<7,127&t.currentBuffer[8]|(127&t.currentBuffer[9])<<7,127&t.currentBuffer[10]|(127&t.currentBuffer[11])<<7],n=(r[0]<<24)+(r[1]<<16)+(r[2]<<8)+r[3];t.emit("ping-read-"+e,n)},st[rt]=function(t){var e=t.currentBuffer[2];t.emit("stepper-done-"+e,!0)},st[G]=function(t){var e=240&t.currentBuffer[2],r=15&t.currentBuffer[2],n=[];if(e===J){for(var i=3,o=t.currentBuffer.length;i<o-1;i+=2)n.push(t.currentBuffer[i+1]<<7|t.currentBuffer[i]);t.emit("serial-data-"+r,n)}},s.inherits(o,u),o.prototype.reportVersion=function(t){this.once("reportversion",t),this.transport.write(new i([H]))},o.prototype.queryFirmware=function(t){this.once("queryfirmware",t),this.transport.write(new i([et,W,m]))},o.prototype.analogRead=function(t,e){this.reportAnalogPin(t,1),this.addListener("analog-read-"+t,e)},o.prototype.analogWrite=function(t,e){var r=[];this.pins[t].value=e,t>15?(r[0]=et,r[1]=_,r[2]=t,r[3]=127&e,r[4]=e>>7&127,e>16384&&(r[r.length]=e>>14&127),e>2097152&&(r[r.length]=e>>21&127),e>268435456&&(r[r.length]=e>>28&127),r[r.length]=m):r.push(y|t,127&e,e>>7&127),this.transport.write(new i(r))},o.prototype.pwmWrite=o.prototype.analogWrite,o.prototype.servoConfig=function(t,e,r){var n;if("object"==typeof t&&null!==t&&(n=t,t=n.pin,e=n.min,r=n.max),"undefined"==typeof t)throw new Error("servoConfig: pin must be specified");if("undefined"==typeof e)throw new Error("servoConfig: min must be specified");if("undefined"==typeof r)throw new Error("servoConfig: max must be specified");var o=[et,$,t,127&e,e>>7&127,127&r,r>>7&127,m];this.pins[t].mode=this.MODES.SERVO,this.transport.write(new i(o))},o.prototype.servoWrite=function(t,e){this.analogWrite.apply(this,arguments)},o.prototype.pinMode=function(t,e){this.pins[t].mode=e,this.transport.write(new i([B,t,e]))},o.prototype.digitalWrite=function(t,e){var r,n=Math.floor(t/8),o=0;this.pins[t].value=e;for(var a=0;a<8;a++)r=this.pins[8*n+a],r&&r.value&&(o|=1<<a);this.transport.write(new i([b|n,127&o,o>>7&127]))},o.prototype.digitalRead=function(t,e){this.reportDigitalPin(t,1),this.addListener("digital-read-"+t,e)},o.prototype.queryCapabilities=function(t){this.once("capability-query",t),this.transport.write(new i([et,v,m]))},o.prototype.queryAnalogMapping=function(t){this.once("analog-mapping-query",t),this.transport.write(new i([et,h,m]))},o.prototype.queryPinState=function(t,e){this.once("pin-state-"+t,e),this.transport.write(new i([et,L,t,m]))},o.prototype.sendString=function(t){var e=new i(t+"\0","utf8"),r=[];r.push(et),r.push(nt);for(var n=0,o=e.length;n<o;n++)r.push(127&e[n]),r.push(e[n]>>7&127);r.push(m),this.transport.write(r)},o.prototype.sendI2CConfig=function(t){return this.i2cConfig(t)},o.prototype.i2cConfig=function(t){var e,r=p.get(this);return r||(r={},p.set(this,r)),"number"==typeof t?e=t:"object"==typeof t&&null!==t&&(e=Number(t.delay),"undefined"!=typeof t.address&&(r[t.address]||(r[t.address]={stopTX:!0}),t.settings,Object.assign(r[t.address],t.settings))),r.delay=e=e||0,a(this,[et,w,255&e,e>>8&255,m]),this},o.prototype.sendI2CWriteRequest=function(t,e){var r=[];e=e||[],r.push(et,O,t,this.I2C_MODES.WRITE<<3);for(var n=0,i=e.length;n<i;n++)r.push(127&e[n],e[n]>>7&127);r.push(m),a(this,r)},o.prototype.i2cWrite=function(t,e,r){var n,o=[et,O,t,this.I2C_MODES.WRITE<<3];if(3===arguments.length&&!Array.isArray(e)&&!Array.isArray(r))return this.i2cWriteReg(t,e,r);2===arguments.length&&(Array.isArray(e)?(r=e.slice(),e=r.shift()):r=[]),n=new i([e].concat(r));for(var s=0,u=n.length;s<u;s++)o.push(127&n[s],n[s]>>7&127);return o.push(m),a(this,o),this},o.prototype.i2cWriteReg=function(t,e,r){return a(this,[et,O,t,this.I2C_MODES.WRITE<<3,127&e,e>>7&127,127&r,r>>7&127,m]),this},o.prototype.sendI2CReadRequest=function(t,e,r){a(this,[et,O,t,this.I2C_MODES.READ<<3,127&e,e>>7&127,m]),this.once("I2C-reply-"+t+"-0",r)},o.prototype.i2cRead=function(t,e,r,n){3===arguments.length&&"number"==typeof e&&"function"==typeof r&&(n=r,r=e,e=null);var i="I2C-reply-"+t+"-",o=[et,O,t,this.I2C_MODES.CONTINUOUS_READ<<3];return null!==e?o.push(127&e,e>>7&127):e=0,i+=e,o.push(127&r,r>>7&127,m),this.on(i,n),a(this,o),this},o.prototype.i2cReadOnce=function(t,e,r,n){3===arguments.length&&"number"==typeof e&&"function"==typeof r&&(n=r,r=e,e=null);var i="I2C-reply-"+t+"-",o=[et,O,t,this.I2C_MODES.READ<<3];return null!==e?o.push(127&e,e>>7&127):e=0,i+=e,o.push(127&r,r>>7&127,m),this.once(i,n),a(this,o),this},o.prototype.sendOneWireConfig=function(t,e){this.transport.write(new i([et,T,S,t,e?1:0,m]))},o.prototype.sendOneWireSearch=function(t,e){this._sendOneWireSearch(M,"1-wire-search-reply-"+t,t,e)},o.prototype.sendOneWireAlarmsSearch=function(t,e){this._sendOneWireSearch(k,"1-wire-search-alarms-reply-"+t,t,e)},o.prototype._sendOneWireSearch=function(t,e,r,n){this.transport.write(new i([et,T,t,r,m]));var o=setTimeout(function(){n(new Error("1-Wire device search timeout - are you running ConfigurableFirmata?"))},5e3);this.once(e,function(t){clearTimeout(o),n(null,t)})},o.prototype.sendOneWireRead=function(t,e,r,n){var i=Math.floor(255*Math.random()),o=setTimeout(function(){n(new Error("1-Wire device read timeout - are you running ConfigurableFirmata?"))},5e3);this._sendOneWireRequest(t,P,e,r,i,null,null,"1-wire-read-reply-"+i,function(t){clearTimeout(o),n(null,t)})},o.prototype.sendOneWireReset=function(t){this._sendOneWireRequest(t,R)},o.prototype.sendOneWireWrite=function(t,e,r){this._sendOneWireRequest(t,F,e,null,null,null,Array.isArray(r)?r:[r])},o.prototype.sendOneWireDelay=function(t,e){this._sendOneWireRequest(t,C,null,null,null,e)},o.prototype.sendOneWireWriteAndRead=function(t,e,r,n,i){var o=Math.floor(255*Math.random()),a=setTimeout(function(){i(new Error("1-Wire device read timeout - are you running ConfigurableFirmata?"))},5e3);this._sendOneWireRequest(t,F|P,e,n,o,null,Array.isArray(r)?r:[r],"1-wire-read-reply-"+o,function(t){clearTimeout(a),i(null,t)})},o.prototype._sendOneWireRequest=function(t,e,r,n,o,a,s,u,l){var f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];(r||n||o||a||s)&&(e|=N),r&&f.splice.apply(f,[0,8].concat(r)),n&&(f[8]=255&n,f[9]=n>>8&255),o&&(f[10]=255&o,f[11]=o>>8&255),a&&(f[12]=255&a,f[13]=a>>8&255,f[14]=a>>16&255,f[15]=a>>24&255),s&&s.forEach(function(t){f.push(t)});var p=[et,T,e,t];p=p.concat(c.to7BitArray(f)),p.push(m),this.transport.write(new i(p)),u&&l&&this.once(u,l)},o.prototype.setSamplingInterval=function(t){var e=t<10?10:t>65535?65535:t;this.settings.samplingInterval=e,this.transport.write(new i([et,V,127&e,e>>7&127,m]))},o.prototype.getSamplingInterval=function(t){return this.settings.samplingInterval},o.prototype.reportAnalogPin=function(t,e){0!==e&&1!==e||(this.pins[this.analogPins[t]].report=e,this.transport.write(new i([z|t,e])))},o.prototype.reportDigitalPin=function(t,e){var r=Math.floor(t/8);0!==e&&1!==e||(this.pins[t].report=e,this.transport.write(new i([q|r,e])))},o.prototype.pingRead=function(t,e){if(this.pins[t.pin].supportedModes.indexOf(U)===-1)throw new Error("Please upload PingFirmata to the board");var r=t.pin,n=t.value,o=t.pulseOut||0,a=t.timeout||1e6,s=[o>>24&255,o>>16&255,o>>8&255,255&o],u=[a>>24&255,a>>16&255,a>>8&255,255&a],c=[et,U,r,n,127&s[0],s[0]>>7&127,127&s[1],s[1]>>7&127,127&s[2],s[2]>>7&127,127&s[3],s[3]>>7&127,127&u[0],u[0]>>7&127,127&u[1],u[1]>>7&127,127&u[2],u[2]>>7&127,127&u[3],u[3]>>7&127,m];this.transport.write(new i(c)),this.once("ping-read-"+r,e)},o.prototype.stepperConfig=function(t,e,r,n,o,a,s){var u=[et,rt,0,t,e,127&r,r>>7&127,n,o];e===this.STEPPER.TYPE.FOUR_WIRE&&u.push(a,s),u.push(m),this.transport.write(new i(u))},o.prototype.stepperStep=function(t,e,r,n,o,a,s){"function"==typeof o&&(s=o,o=0,a=0);var u=[et,rt,1,t,e,127&r,r>>7&127,r>>14&127,127&n,n>>7&127];(o>0||a>0)&&u.push(127&o,o>>7&127,127&a,a>>7&127),u.push(m),this.transport.write(new i(u)),this.once("stepper-done-"+t,s)},o.prototype.serialConfig=function(t){var e,r,n,o;if("object"==typeof t&&null!==t&&(e=t.portId,r=t.baud,n=t.rxPin,o=t.txPin),"undefined"==typeof e)throw new Error("portId must be specified, see SERIAL_PORT_IDs for options.");r=r||57600;var a=[et,G,Y|e,127&r,r>>7&127,r>>14&127];if(e>7&&"undefined"!=typeof n&&"undefined"!=typeof o)a.push(n),a.push(o);else if(e>7)throw new Error("Both RX and TX pins must be defined when using Software Serial.");a.push(m),this.transport.write(new i(a))},o.prototype.serialWrite=function(t,e){for(var r=[et,G,X|t],n=0,o=e.length;n<o;n++)r.push(127&e[n]),r.push(e[n]>>7&127);r.push(m),r.length>0&&this.transport.write(new i(r))},o.prototype.serialRead=function(t,e,r){var n=[et,G,Q|t,this.SERIAL_MODES.CONTINUOUS_READ];2===arguments.length&&"function"==typeof e?r=e:(n.push(127&e),n.push(e>>7&127)),n.push(m),this.transport.write(new i(n)),this.on("serial-data-"+t,r)},o.prototype.serialStop=function(t){var e=[et,G,Q|t,this.SERIAL_MODES.STOP_READING,m];this.transport.write(new i(e)),this.removeAllListeners("serial-data-"+t)},o.prototype.serialClose=function(t){var e=[et,G,Z|t,m];this.transport.write(new i(e))},o.prototype.serialFlush=function(t){var e=[et,G,K|t,m];this.transport.write(new i(e))},o.prototype.serialListen=function(t){if(!(t<8)){var e=[et,G,tt|t,m];this.transport.write(new i(e))}},o.prototype.sysexResponse=function(t,e){if(o.SYSEX_RESPONSE[t])throw new Error(t+" is not an available SYSEX_RESPONSE byte");return o.SYSEX_RESPONSE[t]=function(t){e(t.currentBuffer.slice(2,-1))},this},o.prototype.sysexCommand=function(t){if(!t.length)throw new Error("Sysex Command cannot be empty");var e=t.slice();return e.unshift(et),e.push(m),this.transport.write(new i(e)),this},o.prototype.reset=function(){this.transport.write(new i([it]))},o.isAcceptablePort=function(t){var e=/usb|acm|^com/i;return!!e.test(t.comName)},o.requestPort=function(t){f.list(function(e,r){var n=r.find(function(t){if(o.isAcceptablePort(t))return t});n?t(null,n):t(new Error("No Acceptable Port Found"),null)})},o.Board=o,o.SYSEX_RESPONSE=st,o.MIDI_RESPONSE=at,o.encode=function(t){for(var e=[],r=t.length,n=0;n<r;n++)e.push(127&t[n],t[n]>>7&127);return e},o.decode=function(t){var e=[];if(t.length%2!==0)throw new Error("Board.decode(data) called with odd number of data bytes");for(;t.length;){var r=t.shift(),n=t.shift();e.push(r|n<<7)}return e},n.IS_TEST_MODE&&(o.test={i2cPeripheralSettings:function(t){return p.get(t)},get i2cActive(){return p}}),t.exports=o}).call(e,r(2),function(){return this}(),r(3).Buffer)},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===n||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){y&&h&&(y=!1,h.length?d=h.concat(d):v=-1,d.length&&s())}function s(){if(!y){var t=i(a);y=!0;for(var e=d.length;e;){for(h=d,d=[];++v<e;)h&&h[v].run();v=-1,e=d.length}h=null,y=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var l,f,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(t){l=r}try{f="function"==typeof clearTimeout?clearTimeout:n}catch(t){f=n}}();var h,d=[],y=!1,v=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new u(t,e)),1!==d.length||y||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e,r){(function(t,n){"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,r){if(o()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return s(this,e,r,n)}function s(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?h(t,e,r,n):"string"==typeof e?f(t,e,r):d(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e,r,n){return u(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}function l(e,r){if(u(r),e=a(e,r<0?0:0|y(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function f(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|g(r,n);e=a(e,i);var o=e.write(r,n);return o!==i&&(e=e.slice(0,o)),e}function p(t,e){var r=e.length<0?0:0|y(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function h(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=p(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|y(r.length);return e=a(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||Q(r.length)?a(e,0):p(e,r);if("Buffer"===r.type&&K(r.data))return p(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function v(e){return+e!=e&&(e=0),t.alloc(+e)}function g(e,r){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(i)return V(e).length;r=(""+r).toLowerCase(),i=!0}}function b(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,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return P(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return k(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:w(e,r,n,i,o);if("number"==typeof r)return r&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):w(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,u=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"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}var c;if(i){var l=-1;for(c=r;c<s;c++)if(o(t,c)===o(e,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===u)return l*a}else l!==-1&&(c-=c-l),l=-1}else for(r+u>s&&(r=s-u),c=r;c>=0;c--){for(var f=!0,p=0;p<u;p++)if(o(t,c+p)!==o(e,p)){f=!1;break}if(f)return c}return-1}function E(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(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<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function O(t,e,r,n){return X(V(e,t.length-r),t,r,n)}function j(t,e,r,n){return X($(e),t,r,n)}function S(t,e,r,n){return j(t,e,r,n)}function T(t,e,r,n){return X(Y(e),t,r,n)}function C(t,e,r,n){return X(G(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?J.fromByteArray(t):J.fromByteArray(t.slice(e,r))}function P(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=r){var u,c,l,f;switch(s){case 1:o<128&&(a=o);break;case 2:u=t[i+1],128===(192&u)&&(f=(31&o)<<6|63&u,f>127&&(a=f));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(f=(15&o)<<12|(63&u)<<6|63&c,f>2047&&(f<55296||f>57343)&&(a=f));break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l,f>65535&&f<1114112&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return R(n)}function R(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function k(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function I(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=H(t[o]);return i}function M(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function N(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function F(e,r,n,i,o,a){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function B(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function L(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function D(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 U(t,e,r,n,i){return i||D(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(t,e,r,n,23,4),r+4}function W(t,e,r,n,i){return i||D(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(t,e,r,n,52,8),r+8}function z(t){if(t=q(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function q(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function V(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&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=(i-55296<<10|r-56320)+65536}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 $(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function G(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function Y(t){return J.toByteArray(z(t))}function X(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Q(t){return t!==t}var J=r(4),Z=r(5),K=r(6);e.Buffer=t,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,r){return s(null,t,e,r)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,r){return c(null,t,e,r)},t.allocUnsafe=function(t){return l(null,t)},t.allocUnsafeSlow=function(t){return l(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!K(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!t.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i},t.byteLength=g,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):b.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "), -this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var a=o-i,s=n-r,u=Math.min(a,s),c=this.slice(i,o),l=e.slice(r,n),f=0;f<u;++f)if(c[f]!==l[f]){a=c[f],s=l[f];break}return a<s?-1:s<a?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return _(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return _(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(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 E(this,t,e,r);case"utf8":case"utf-8":return O(this,t,e,r);case"ascii":return j(this,t,e,r);case"latin1":case"binary":return S(this,t,e,r);case"base64":return T(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=t.prototype;else{var o=r-e;i=new t(o,void 0);for(var a=0;a<o;++a)i[a]=this[a+e]}return i},t.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||N(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||N(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||N(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||N(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||N(t,4,this.length),Z.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||N(t,4,this.length),Z.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||N(t,8,this.length),Z.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||N(t,8,this.length),Z.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;F(this,t,e,r,i,0)}var o=1,a=0;for(this[e]=255&t;++a<r&&(o*=256);)this[e+a]=t/o&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;F(this,t,e,r,i,0)}var o=r-1,a=1;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=t/a&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},t.prototype.writeUInt16LE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):B(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):B(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):L(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):L(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);F(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);F(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},t.prototype.writeInt8=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):B(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):B(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):L(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):L(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return W(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return W(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,a=i-n;if(this===e&&n<r&&r<i)for(o=a-1;o>=0;--o)e[o+r]=this[o+n];else if(a<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),r);return a},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=r;a<n;++a)this[a]=e;else{var s=t.isBuffer(e)?e:V(new t(e,i).toString()),u=s.length;for(a=0;a<n-r;++a)this[a+r]=s[a%u]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(3).Buffer,function(){return this}())},function(t,e){"use strict";function r(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-r(t)}function i(t){var e,n,i,o,a,s,u=t.length;a=r(t),s=new l(3*u/4-a),i=a>0?u-4:u;var f=0;for(e=0,n=0;e<i;e+=4,n+=3)o=c[t.charCodeAt(e)]<<18|c[t.charCodeAt(e+1)]<<12|c[t.charCodeAt(e+2)]<<6|c[t.charCodeAt(e+3)],s[f++]=o>>16&255,s[f++]=o>>8&255,s[f++]=255&o;return 2===a?(o=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,s[f++]=255&o):1===a&&(o=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,s[f++]=o>>8&255,s[f++]=255&o),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function a(t,e,r){for(var n,i=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(o(n));return i.join("")}function s(t){for(var e,r=t.length,n=r%3,i="",o=[],s=16383,c=0,l=r-n;c<l;c+=s)o.push(a(t,c,c+s>l?l:c+s));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=n,e.toByteArray=i,e.fromByteArray=s;for(var u=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,h=f.length;p<h;++p)u[p]=f[p],c[f.charCodeAt(p)]=p;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,p=r?-1:1,h=t[e+f];for(f+=p,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,d=n?1:-1,y=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=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+f>=1?p/u:p*Math.pow(2,1-f),e*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):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+h]=255&s,h+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[r+h]=255&a,h+=d,a/=256,c-=8);t[r+h-d]|=128*y}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){var n,i;(function(o,a){!function(o,a){n=a,i="function"==typeof n?n.call(e,r,e,t):n,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";var t,e=Function.call.bind(Function.apply),r=Function.call.bind(Function.call),n=Array.isArray,i=function(t){return function(){return!e(t,this,arguments)}},s=function(t){try{return t(),!1}catch(t){return!0}},u=function(t){try{return t()}catch(t){return!1}},c=i(s),l=function(){return!s(function(){Object.defineProperty({},"x",{get:function(){}})})},f=!!Object.defineProperty&&l(),p="foo"===function(){}.name,h=Function.call.bind(Array.prototype.forEach),d=Function.call.bind(Array.prototype.reduce),y=Function.call.bind(Array.prototype.filter),v=Function.call.bind(Array.prototype.some),g=function(t,e,r,n){!n&&e in t||(f?Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:r}):t[e]=r)},b=function(t,e){h(Object.keys(e),function(r){var n=e[r];g(t,r,n,!1)})},m=Object.create||function(t,e){var r=function(){};r.prototype=t;var n=new r;return"undefined"!=typeof e&&Object.keys(e).forEach(function(t){Q.defineByDescriptor(n,t,e[t])}),n},_=function(t,e){return!!Object.setPrototypeOf&&u(function(){var r=function e(r){var n=new t(r);return Object.setPrototypeOf(n,e.prototype),n};return Object.setPrototypeOf(r,t),r.prototype=m(t.prototype,{constructor:{value:r}}),e(r)})},w=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof o)return o;throw new Error("unable to locate global object")},E=w(),O=E.isFinite,j=Function.call.bind(String.prototype.indexOf),S=Function.call.bind(Object.prototype.toString),T=Function.call.bind(Array.prototype.concat),C=Function.call.bind(String.prototype.slice),x=Function.call.bind(Array.prototype.push),P=Function.apply.bind(Array.prototype.push),R=Function.call.bind(Array.prototype.shift),A=Math.max,k=Math.min,I=Math.floor,M=Math.abs,N=Math.log,F=Math.sqrt,B=Function.call.bind(Object.prototype.hasOwnProperty),L=function(){},D=E.Symbol||{},U=D.species||"@@species",W=Number.isNaN||function(t){return t!==t},z=Number.isFinite||function(t){return"number"==typeof t&&O(t)},q=function(t){return"[object Arguments]"===S(t)},H=function(t){return null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==S(t)&&"[object Function]"===S(t.callee)},V=q(arguments)?q:H,$={primitive:function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},object:function(t){return null!==t&&"object"==typeof t},string:function(t){return"[object String]"===S(t)},regex:function(t){return"[object RegExp]"===S(t)},symbol:function(t){return"function"==typeof E.Symbol&&"symbol"==typeof t}},G=$.symbol(D.iterator)?D.iterator:"_es6-shim iterator_";E.Set&&"function"==typeof(new E.Set)["@@iterator"]&&(G="@@iterator"),E.Reflect||g(E,"Reflect",{});var Y=E.Reflect,X={Call:function(t,r){var n=arguments.length>2?arguments[2]:[];if(!X.IsCallable(t))throw new TypeError(t+" is not a function");return e(t,r,n)},RequireObjectCoercible:function(t,e){if(null==t)throw new TypeError(e||"Cannot call method on "+t)},TypeIsObject:function(t){return null!=t&&Object(t)===t},ToObject:function(t,e){return X.RequireObjectCoercible(t,e),Object(t)},IsCallable:function(t){return"function"==typeof t&&"[object Function]"===S(t)},IsConstructor:function(t){return X.IsCallable(t)},ToInt32:function(t){return X.ToNumber(t)>>0},ToUint32:function(t){return X.ToNumber(t)>>>0},ToNumber:function(t){if("[object Symbol]"===S(t))throw new TypeError("Cannot convert a Symbol value to a number");return+t},ToInteger:function(t){var e=X.ToNumber(t);return W(e)?0:0!==e&&z(e)?(e>0?1:-1)*I(M(e)):e},ToLength:function(t){var e=X.ToInteger(t);return e<=0?0:e>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:e},SameValue:function(t,e){return t===e?0!==t||1/t===1/e:W(t)&&W(e)},SameValueZero:function(t,e){return t===e||W(t)&&W(e)},IsIterable:function(t){return X.TypeIsObject(t)&&("undefined"!=typeof t[G]||V(t))},GetIterator:function(e){if(V(e))return new t(e,"value");var n=X.GetMethod(e,G);if(!X.IsCallable(n))throw new TypeError("value is not an iterable");var i=r(n,e);if(!X.TypeIsObject(i))throw new TypeError("bad iterator");return i},GetMethod:function(t,e){var r=X.ToObject(t)[e];if(void 0!==r&&null!==r){if(!X.IsCallable(r))throw new TypeError("Method not callable: "+e);return r}},IteratorComplete:function(t){return!!t.done},IteratorClose:function(t,e){var n=X.GetMethod(t,"return");if(void 0!==n){var i,o;try{i=r(n,t)}catch(t){o=t}if(!e){if(o)throw o;if(!X.TypeIsObject(i))throw new TypeError("Iterator's return method returned a non-object.")}}},IteratorNext:function(t){var e=arguments.length>1?t.next(arguments[1]):t.next();if(!X.TypeIsObject(e))throw new TypeError("bad iterator");return e},IteratorStep:function(t){var e=X.IteratorNext(t),r=X.IteratorComplete(e);return!r&&e},Construct:function(t,e,r,n){var i="undefined"==typeof r?t:r;if(!n)return Y.construct(t,e,i);var o=i.prototype;X.TypeIsObject(o)||(o=Object.prototype);var a=m(o),s=X.Call(t,a,e);return X.TypeIsObject(s)?s:a},SpeciesConstructor:function(t,e){var r=t.constructor;if(void 0===r)return e;if(!X.TypeIsObject(r))throw new TypeError("Bad constructor");var n=r[U];if(void 0===n||null===n)return e;if(!X.IsConstructor(n))throw new TypeError("Bad @@species");return n},CreateHTML:function(t,e,r,n){var i=String(t),o="<"+e;if(""!==r){var a=String(n),s=a.replace(/"/g,""");o+=" "+r+'="'+s+'"'}var u=o+">",c=u+i;return c+"</"+e+">"}},Q={getter:function(t,e,r){if(!f)throw new TypeError("getters require true ES5 support");Object.defineProperty(t,e,{configurable:!0,enumerable:!1,get:r})},proxy:function(t,e,r){if(!f)throw new TypeError("getters require true ES5 support");var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,{configurable:n.configurable,enumerable:n.enumerable,get:function(){return t[e]},set:function(r){t[e]=r}})},redefine:function(t,e,r){if(f){var n=Object.getOwnPropertyDescriptor(t,e);n.value=r,Object.defineProperty(t,e,n)}else t[e]=r},defineByDescriptor:function(t,e,r){f?Object.defineProperty(t,e,r):"value"in r&&(t[e]=r.value)},preserveToString:function(t,e){e&&X.IsCallable(e.toString)&&g(t,"toString",e.toString.bind(e),!0)}},J=function(t,e,r){Q.preserveToString(e,t),Object.setPrototypeOf&&Object.setPrototypeOf(t,e),f?h(Object.getOwnPropertyNames(t),function(n){n in L||r[n]||Q.proxy(t,n,e)}):h(Object.keys(t),function(n){n in L||r[n]||(e[n]=t[n])}),e.prototype=t.prototype,Q.redefine(t.prototype,"constructor",e)},Z=function(){return this},K=function(t){f&&!B(t,U)&&Q.getter(t,U,Z)},tt=function(t,e,r){var n=t[e];g(t,e,r,!0),Q.preserveToString(t[e],n)},et=function(t,e){var r=e||function(){return this};g(t,G,r),!t[G]&&$.symbol(G)&&(t[G]=r)},rt=function(t,e,r){f?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r},nt=function(t,e,r){if(rt(t,e,r),!X.SameValue(t[e],r))throw new TypeError("property is nonconfigurable")},it=function(t,e,r,n){if(!X.TypeIsObject(t))throw new TypeError("Constructor requires `new`: "+e.name);var i=e.prototype;X.TypeIsObject(i)||(i=r);var o=m(i);for(var a in n)if(B(n,a)){var s=n[a];g(o,a,s,!0)}return o};if(String.fromCodePoint&&1!==String.fromCodePoint.length){var ot=String.fromCodePoint;tt(String,"fromCodePoint",function(t){return e(ot,this,arguments)})}var at={fromCodePoint:function(t){for(var e,r=[],n=0,i=arguments.length;n<i;n++){if(e=Number(arguments[n]),!X.SameValue(e,X.ToInteger(e))||e<0||e>1114111)throw new RangeError("Invalid code point "+e);e<65536?x(r,String.fromCharCode(e)):(e-=65536,x(r,String.fromCharCode((e>>10)+55296)),x(r,String.fromCharCode(e%1024+56320)))}return r.join("")},raw:function(t){var e=X.ToObject(t,"bad callSite"),r=X.ToObject(e.raw,"bad raw value"),n=r.length,i=X.ToLength(n);if(i<=0)return"";for(var o,a,s,u,c=[],l=0;l<i&&(o=String(l),s=String(r[o]),x(c,s),!(l+1>=i));)a=l+1<arguments.length?arguments[l+1]:"",u=String(a),x(c,u),l+=1;return c.join("")}};String.raw&&"xy"!==String.raw({raw:{0:"x",1:"y",length:2}})&&tt(String,"raw",at.raw),b(String,at);var st=function t(e,r){if(r<1)return"";if(r%2)return t(e,r-1)+e;var n=t(e,r/2);return n+n},ut=1/0,ct={repeat:function(t){X.RequireObjectCoercible(this);var e=String(this),r=X.ToInteger(t);if(r<0||r>=ut)throw new RangeError("repeat count must be less than infinity and not overflow maximum string size");return st(e,r)},startsWith:function(t){X.RequireObjectCoercible(this);var e=String(this);if($.regex(t))throw new TypeError('Cannot call method "startsWith" with a regex');var r=String(t),n=arguments.length>1?arguments[1]:void 0,i=A(X.ToInteger(n),0);return C(e,i,i+r.length)===r},endsWith:function(t){X.RequireObjectCoercible(this);var e=String(this);if($.regex(t))throw new TypeError('Cannot call method "endsWith" with a regex');var r=String(t),n=e.length,i=arguments.length>1?arguments[1]:void 0,o="undefined"==typeof i?n:X.ToInteger(i),a=k(A(o,0),n);return C(e,a-r.length,a)===r},includes:function(t){if($.regex(t))throw new TypeError('"includes" does not accept a RegExp');var e;return arguments.length>1&&(e=arguments[1]),j(this,t,e)!==-1},codePointAt:function(t){X.RequireObjectCoercible(this);var e=String(this),r=X.ToInteger(t),n=e.length;if(r>=0&&r<n){var i=e.charCodeAt(r),o=r+1===n;if(i<55296||i>56319||o)return i;var a=e.charCodeAt(r+1);return a<56320||a>57343?i:1024*(i-55296)+(a-56320)+65536}}};if(String.prototype.includes&&"a".includes("a",1/0)!==!1&&tt(String.prototype,"includes",ct.includes),String.prototype.startsWith&&String.prototype.endsWith){var lt=s(function(){"/a/".startsWith(/a/)}),ft="abc".startsWith("a",1/0)===!1;lt&&ft||(tt(String.prototype,"startsWith",ct.startsWith),tt(String.prototype,"endsWith",ct.endsWith))}b(String.prototype,ct);var pt=["\t\n\v\f\r "," \u2028","\u2029\ufeff"].join(""),ht=new RegExp("(^["+pt+"]+)|(["+pt+"]+$)","g"),dt=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(ht,"")},yt=[" ","",""].join(""),vt=new RegExp("["+yt+"]","g"),gt=/^[\-+]0x[0-9a-f]+$/i,bt=yt.trim().length!==yt.length;g(String.prototype,"trim",dt,bt);var mt=function(t){X.RequireObjectCoercible(t),this._s=String(t),this._i=0};mt.prototype.next=function(){var t=this._s,e=this._i;if("undefined"==typeof t||e>=t.length)return this._s=void 0,{value:void 0,done:!0};var r,n,i=t.charCodeAt(e);return i<55296||i>56319||e+1===t.length?n=1:(r=t.charCodeAt(e+1),n=r<56320||r>57343?1:2),this._i=e+n,{value:t.substr(e,n),done:!1}},et(mt.prototype),et(String.prototype,function(){return new mt(this)});var _t={from:function(t){var e,n,i=this,o=arguments.length>1?arguments[1]:void 0;if(void 0===o)e=!1;else{if(!X.IsCallable(o))throw new TypeError("Array.from: when provided, the second argument must be a function");n=arguments.length>2?arguments[2]:void 0,e=!0}var a,s,u,c="undefined"!=typeof(V(t)||X.GetMethod(t,G));if(c){s=X.IsConstructor(i)?Object(new i):[];var l,f,p=X.GetIterator(t);for(u=0;;){if(l=X.IteratorStep(p),l===!1)break;f=l.value;try{e&&(f=void 0===n?o(f,u):r(o,n,f,u)),s[u]=f}catch(t){throw X.IteratorClose(p,!0),t}u+=1}a=u}else{var h=X.ToObject(t);a=X.ToLength(h.length),s=X.IsConstructor(i)?Object(new i(a)):new Array(a);var d;for(u=0;u<a;++u)d=h[u],e&&(d=void 0!==n?r(o,n,d,u):o(d,u)),s[u]=d}return s.length=a,s},of:function(){for(var t=arguments.length,e=this,r=n(e)||!X.IsCallable(e)?new Array(t):X.Construct(e,[t]),i=0;i<t;++i)nt(r,i,arguments[i]);return r.length=t,r}};b(Array,_t),K(Array);var wt=function(t){return{value:t,done:0===arguments.length}};t=function(t,e){this.i=0,this.array=t,this.kind=e},b(t.prototype,{next:function(){var e=this.i,r=this.array;if(!(this instanceof t))throw new TypeError("Not an ArrayIterator");if("undefined"!=typeof r)for(var n=X.ToLength(r.length);e<n;e++){var i,o=this.kind;return"key"===o?i=e:"value"===o?i=r[e]:"entry"===o&&(i=[e,r[e]]),this.i=e+1,{value:i,done:!1}}return this.array=void 0,{value:void 0,done:!0}}}),et(t.prototype);var Et=function(t){var e=[];for(var r in t)x(e,r);return e},Ot=function(t,e){b(this,{object:t,array:Et(t),kind:e})};b(Ot.prototype,{next:function(){var t,e=this.array;if(!(this instanceof Ot))throw new TypeError("Not an ObjectIterator");for(;e.length>0;)if(t=R(e),t in this.object)return wt("key"===this.kind?t:"value"===this.kind?this.object[t]:[t,this.object[t]]);return wt()}}),et(Ot.prototype);var jt=Array.of===_t.of||function(){var t=function(t){this.length=t};t.prototype=[];var e=Array.of.apply(t,[1,2]);return e instanceof t&&2===e.length}();jt||tt(Array,"of",_t.of);var St={copyWithin:function(t,e){var r=arguments[2],n=X.ToObject(this),i=X.ToLength(n.length),o=X.ToInteger(t),a=X.ToInteger(e),s=o<0?A(i+o,0):k(o,i),u=a<0?A(i+a,0):k(a,i);r="undefined"==typeof r?i:X.ToInteger(r);var c=r<0?A(i+r,0):k(r,i),l=k(c-u,i-s),f=1;for(u<s&&s<u+l&&(f=-1,u+=l-1,s+=l-1);l>0;)B(n,u)?n[s]=n[u]:delete n[u],u+=f,s+=f,l-=1;return n},fill:function(t){var e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=X.ToObject(this),i=X.ToLength(n.length);e=X.ToInteger("undefined"==typeof e?0:e),r=X.ToInteger("undefined"==typeof r?i:r);for(var o=e<0?A(i+e,0):k(e,i),a=r<0?i+r:r,s=o;s<i&&s<a;++s)n[s]=t;return n},find:function(t){var e=X.ToObject(this),n=X.ToLength(e.length);if(!X.IsCallable(t))throw new TypeError("Array#find: predicate must be a function");for(var i,o=arguments.length>1?arguments[1]:null,a=0;a<n;a++)if(i=e[a],o){if(r(t,o,i,a,e))return i}else if(t(i,a,e))return i},findIndex:function(t){var e=X.ToObject(this),n=X.ToLength(e.length);if(!X.IsCallable(t))throw new TypeError("Array#findIndex: predicate must be a function");for(var i=arguments.length>1?arguments[1]:null,o=0;o<n;o++)if(i){if(r(t,i,e[o],o,e))return o}else if(t(e[o],o,e))return o;return-1},keys:function(){return new t(this,"key")},values:function(){return new t(this,"value")},entries:function(){return new t(this,"entry")}};if(Array.prototype.keys&&!X.IsCallable([1].keys().next)&&delete Array.prototype.keys,Array.prototype.entries&&!X.IsCallable([1].entries().next)&&delete Array.prototype.entries,Array.prototype.keys&&Array.prototype.entries&&!Array.prototype.values&&Array.prototype[G]&&(b(Array.prototype,{values:Array.prototype[G]}),$.symbol(D.unscopables)&&(Array.prototype[D.unscopables].values=!0)),p&&Array.prototype.values&&"values"!==Array.prototype.values.name){var Tt=Array.prototype.values;tt(Array.prototype,"values",function(){return r(Tt,this)}),g(Array.prototype,G,Array.prototype.values,!0)}b(Array.prototype,St),et(Array.prototype,function(){return this.values()}),Object.getPrototypeOf&&et(Object.getPrototypeOf([].values()));var Ct=function(){return u(function(){return 0===Array.from({length:-1}).length})}(),xt=function(){var t=Array.from([0].entries());return 1===t.length&&n(t[0])&&0===t[0][0]&&0===t[0][1]}();Ct&&xt||tt(Array,"from",_t.from);var Pt=function(){return u(function(){return Array.from([0],void 0)})}();if(!Pt){var Rt=Array.from;tt(Array,"from",function(t){return arguments.length>0&&"undefined"!=typeof arguments[1]?e(Rt,this,arguments):r(Rt,this,t)})}var At=function(t,e){var n={length:-1};return n[e?4294967294:0]=!0,u(function(){r(t,n,function(){throw new RangeError("should not reach here")},[])})};if(!At(Array.prototype.forEach)){var kt=Array.prototype.forEach;tt(Array.prototype,"forEach",function(t){return e(kt,this.length>=0?this:[],arguments)},!0)}if(!At(Array.prototype.map)){var It=Array.prototype.map;tt(Array.prototype,"map",function(t){return e(It,this.length>=0?this:[],arguments)},!0)}if(!At(Array.prototype.filter)){var Mt=Array.prototype.filter;tt(Array.prototype,"filter",function(t){return e(Mt,this.length>=0?this:[],arguments)},!0)}if(!At(Array.prototype.some)){var Nt=Array.prototype.some;tt(Array.prototype,"some",function(t){return e(Nt,this.length>=0?this:[],arguments)},!0)}if(!At(Array.prototype.every)){var Ft=Array.prototype.every;tt(Array.prototype,"every",function(t){return e(Ft,this.length>=0?this:[],arguments)},!0)}if(!At(Array.prototype.reduce)){var Bt=Array.prototype.reduce;tt(Array.prototype,"reduce",function(t){return e(Bt,this.length>=0?this:[],arguments)},!0)}if(!At(Array.prototype.reduceRight,!0)){var Lt=Array.prototype.reduceRight;tt(Array.prototype,"reduceRight",function(t){return e(Lt,this.length>=0?this:[],arguments)},!0)}var Dt=8!==Number("0o10"),Ut=2!==Number("0b10"),Wt=v(yt,function(t){return 0===Number(t+0+t)});if(Dt||Ut||Wt){var zt=Number,qt=/^0b[01]+$/i,Ht=/^0o[0-7]+$/i,Vt=qt.test.bind(qt),$t=Ht.test.bind(Ht),Gt=function(t){var e;if("function"==typeof t.valueOf&&(e=t.valueOf(),$.primitive(e)))return e;if("function"==typeof t.toString&&(e=t.toString(),$.primitive(e)))return e;throw new TypeError("No default value")},Yt=vt.test.bind(vt),Xt=gt.test.bind(gt),Qt=function(){var t=function(e){var n;n=arguments.length>0?$.primitive(e)?e:Gt(e,"number"):0,"string"==typeof n&&(n=r(dt,n),Vt(n)?n=parseInt(C(n,2),2):$t(n)?n=parseInt(C(n,2),8):(Yt(n)||Xt(n))&&(n=NaN));var i=this,o=u(function(){return zt.prototype.valueOf.call(i),!0});return i instanceof t&&!o?new zt(n):zt(n)};return t}();J(zt,Qt,{}),Number=Qt,Q.redefine(E,"Number",Qt)}var Jt=Math.pow(2,53)-1;b(Number,{MAX_SAFE_INTEGER:Jt,MIN_SAFE_INTEGER:-Jt,EPSILON:2.220446049250313e-16,parseInt:E.parseInt,parseFloat:E.parseFloat,isFinite:z,isInteger:function(t){return z(t)&&X.ToInteger(t)===t},isSafeInteger:function(t){return Number.isInteger(t)&&M(t)<=Number.MAX_SAFE_INTEGER},isNaN:W}),g(Number,"parseInt",E.parseInt,Number.parseInt!==E.parseInt),[,1].find(function(t,e){return 0===e})||tt(Array.prototype,"find",St.find),0!==[,1].findIndex(function(t,e){return 0===e})&&tt(Array.prototype,"findIndex",St.findIndex);var Zt=Function.bind.call(Function.bind,Object.prototype.propertyIsEnumerable),Kt=function(){for(var t=Number(this),e=arguments.length,r=e-t,n=new Array(r<0?0:r),i=t;i<e;++i)n[i-t]=arguments[i];return n},te=function(t){return function(e,r){return e[r]=t[r],e}},ee=function(t,e){var r,n=Object.keys(Object(e));return X.IsCallable(Object.getOwnPropertySymbols)&&(r=y(Object.getOwnPropertySymbols(Object(e)),Zt(e))),d(T(n,r||[]),te(e),t)},re={assign:function(t,r){var n=X.ToObject(t,"Cannot convert undefined or null to object");return d(e(Kt,1,arguments),ee,n)},is:function(t,e){return X.SameValue(t,e)}},ne=Object.assign&&Object.preventExtensions&&function(){var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch(e){return"y"===t[1]}}();if(ne&&tt(Object,"assign",re.assign),b(Object,re),f){var ie={setPrototypeOf:function(t,e){var n,i=function(t,e){if(!X.TypeIsObject(t))throw new TypeError("cannot set prototype on a non-object");if(null!==e&&!X.TypeIsObject(e))throw new TypeError("can only set prototype to an object or null"+e)},o=function(t,e){return i(t,e),r(n,t,e),t};try{n=t.getOwnPropertyDescriptor(t.prototype,e).set,r(n,{},null)}catch(r){if(t.prototype!=={}[e])return;n=function(t){this[e]=t},o.polyfill=o(o({},null),t.prototype)instanceof t}return o}(Object,"__proto__")};b(Object,ie)}Object.setPrototypeOf&&Object.getPrototypeOf&&null!==Object.getPrototypeOf(Object.setPrototypeOf({},null))&&null===Object.getPrototypeOf(Object.create(null))&&!function(){var t=Object.create(null),e=Object.getPrototypeOf,r=Object.setPrototypeOf;Object.getPrototypeOf=function(r){var n=e(r);return n===t?null:n},Object.setPrototypeOf=function(e,n){var i=null===n?t:n;return r(e,i)},Object.setPrototypeOf.polyfill=!1}();var oe=!s(function(){Object.keys("foo")});if(!oe){var ae=Object.keys;tt(Object,"keys",function(t){return ae(X.ToObject(t))})}if(Object.getOwnPropertyNames){var se=!s(function(){Object.getOwnPropertyNames("foo")});if(!se){var ue="object"==typeof window?Object.getOwnPropertyNames(window):[],ce=Object.getOwnPropertyNames;tt(Object,"getOwnPropertyNames",function(t){var e=X.ToObject(t);if("[object Window]"===S(e))try{return ce(e)}catch(t){return T([],ue)}return ce(e)})}}if(Object.getOwnPropertyDescriptor){var le=!s(function(){Object.getOwnPropertyDescriptor("foo","bar")});if(!le){var fe=Object.getOwnPropertyDescriptor;tt(Object,"getOwnPropertyDescriptor",function(t,e){return fe(X.ToObject(t),e)})}}if(Object.seal){var pe=!s(function(){Object.seal("foo")});if(!pe){var he=Object.seal;tt(Object,"seal",function(t){return $.object(t)?he(t):t})}}if(Object.isSealed){var de=!s(function(){Object.isSealed("foo")});if(!de){var ye=Object.isSealed;tt(Object,"isSealed",function(t){return!$.object(t)||ye(t)})}}if(Object.freeze){var ve=!s(function(){Object.freeze("foo")});if(!ve){var ge=Object.freeze;tt(Object,"freeze",function(t){return $.object(t)?ge(t):t})}}if(Object.isFrozen){var be=!s(function(){Object.isFrozen("foo")});if(!be){var me=Object.isFrozen;tt(Object,"isFrozen",function(t){return!$.object(t)||me(t)})}}if(Object.preventExtensions){var _e=!s(function(){Object.preventExtensions("foo")});if(!_e){var we=Object.preventExtensions;tt(Object,"preventExtensions",function(t){return $.object(t)?we(t):t})}}if(Object.isExtensible){var Ee=!s(function(){Object.isExtensible("foo")});if(!Ee){var Oe=Object.isExtensible;tt(Object,"isExtensible",function(t){return!!$.object(t)&&Oe(t)})}}if(Object.getPrototypeOf){var je=!s(function(){Object.getPrototypeOf("foo")});if(!je){var Se=Object.getPrototypeOf;tt(Object,"getPrototypeOf",function(t){return Se(X.ToObject(t)); -})}}var Te=f&&function(){var t=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags");return t&&X.IsCallable(t.get)}();if(f&&!Te){var Ce=function(){if(!X.TypeIsObject(this))throw new TypeError("Method called on incompatible type: must be an object.");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t};Q.getter(RegExp.prototype,"flags",Ce)}var xe=u(function(){return"/a/i"===String(new RegExp(/a/g,"i"))});if(!xe&&f){var Pe=RegExp,Re=function(){return function t(e,r){var n=this instanceof t;return!n&&($.regex(e)||e&&e.constructor===t)?e:$.regex(e)&&$.string(r)?new t(e.source,r):new Pe(e,r)}}();J(Pe,Re,{$input:!0}),RegExp=Re,Q.redefine(E,"RegExp",Re)}if(f){var Ae={input:"$_",lastMatch:"$&",lastParen:"$+",leftContext:"$`",rightContext:"$'"};h(Object.keys(Ae),function(t){t in RegExp&&!(Ae[t]in RegExp)&&Q.getter(RegExp,Ae[t],function(){return RegExp[t]})})}K(RegExp);var ke=1/Number.EPSILON,Ie=function(t){return t+ke-ke},Me=Math.pow(2,-23),Ne=Math.pow(2,127)*(2-Me),Fe=Math.pow(2,-126),Be=Number.prototype.clz;delete Number.prototype.clz;var Le={acosh:function(t){var e=Number(t);return Number.isNaN(e)||t<1?NaN:1===e?0:e===1/0?e:N(e/Math.E+F(e+1)*F(e-1)/Math.E)+1},asinh:function(t){var e=Number(t);return 0!==e&&O(e)?e<0?-Math.asinh(-e):N(e+F(e*e+1)):e},atanh:function(t){var e=Number(t);return Number.isNaN(e)||e<-1||e>1?NaN:e===-1?-(1/0):1===e?1/0:0===e?e:.5*N((1+e)/(1-e))},cbrt:function(t){var e=Number(t);if(0===e)return e;var r,n=e<0;return n&&(e=-e),e===1/0?r=1/0:(r=Math.exp(N(e)/3),r=(e/(r*r)+2*r)/3),n?-r:r},clz32:function(t){var e=Number(t),n=X.ToUint32(e);return 0===n?32:Be?r(Be,n):31-I(N(n+.5)*Math.LOG2E)},cosh:function(t){var e=Number(t);return 0===e?1:Number.isNaN(e)?NaN:O(e)?(e<0&&(e=-e),e>21?Math.exp(e)/2:(Math.exp(e)+Math.exp(-e))/2):1/0},expm1:function(t){var e=Number(t);if(e===-(1/0))return-1;if(!O(e)||0===e)return e;if(M(e)>.5)return Math.exp(e)-1;for(var r=e,n=0,i=1;n+r!==n;)n+=r,i+=1,r*=e/i;return n},hypot:function(t,e){for(var r=0,n=0,i=0;i<arguments.length;++i){var o=M(Number(arguments[i]));n<o?(r*=n/o*(n/o),r+=1,n=o):r+=o>0?o/n*(o/n):o}return n===1/0?1/0:n*F(r)},log2:function(t){return N(t)*Math.LOG2E},log10:function(t){return N(t)*Math.LOG10E},log1p:function(t){var e=Number(t);return e<-1||Number.isNaN(e)?NaN:0===e||e===1/0?e:e===-1?-(1/0):1+e-1===0?e:e*(N(1+e)/(1+e-1))},sign:function(t){var e=Number(t);return 0===e?e:Number.isNaN(e)?e:e<0?-1:1},sinh:function(t){var e=Number(t);return O(e)&&0!==e?M(e)<1?(Math.expm1(e)-Math.expm1(-e))/2:(Math.exp(e-1)-Math.exp(-e-1))*Math.E/2:e},tanh:function(t){var e=Number(t);if(Number.isNaN(e)||0===e)return e;if(e===1/0)return 1;if(e===-(1/0))return-1;var r=Math.expm1(e),n=Math.expm1(-e);return r===1/0?1:n===1/0?-1:(r-n)/(Math.exp(e)+Math.exp(-e))},trunc:function(t){var e=Number(t);return e<0?-I(-e):I(e)},imul:function(t,e){var r=X.ToUint32(t),n=X.ToUint32(e),i=r>>>16&65535,o=65535&r,a=n>>>16&65535,s=65535&n;return o*s+(i*s+o*a<<16>>>0)|0},fround:function(t){var e=Number(t);if(0===e||e===1/0||e===-(1/0)||W(e))return e;var r=Math.sign(e),n=M(e);if(n<Fe)return r*Ie(n/Fe/Me)*Fe*Me;var i=(1+Me/Number.EPSILON)*n,o=i-(i-n);return o>Ne||W(o)?r*(1/0):r*o}};b(Math,Le),g(Math,"log1p",Le.log1p,Math.log1p(-1e-17)!==-1e-17),g(Math,"asinh",Le.asinh,Math.asinh(-1e7)!==-Math.asinh(1e7)),g(Math,"tanh",Le.tanh,Math.tanh(-2e-17)!==-2e-17),g(Math,"acosh",Le.acosh,Math.acosh(Number.MAX_VALUE)===1/0),g(Math,"cbrt",Le.cbrt,Math.abs(1-Math.cbrt(1e-300)/1e-100)/Number.EPSILON>8),g(Math,"sinh",Le.sinh,Math.sinh(-2e-17)!==-2e-17);var De=Math.expm1(10);g(Math,"expm1",Le.expm1,De>22025.465794806718||De<22025.465794806718);var Ue=Math.round,We=0===Math.round(.5-Number.EPSILON/4)&&1===Math.round(-.5+Number.EPSILON/3.99),ze=ke+1,qe=2*ke-1,He=[ze,qe].every(function(t){return Math.round(t)===t});g(Math,"round",function(t){var e=I(t),r=e===-1?-0:e+1;return t-e<.5?e:r},!We||!He),Q.preserveToString(Math.round,Ue);var Ve=Math.imul;Math.imul(4294967295,5)!==-5&&(Math.imul=Le.imul,Q.preserveToString(Math.imul,Ve)),2!==Math.imul.length&&tt(Math,"imul",function(t,r){return e(Ve,Math,arguments)});var $e=function(){var t=E.setTimeout;if("function"==typeof t||"object"==typeof t){X.IsPromise=function(t){return!!X.TypeIsObject(t)&&"undefined"!=typeof t._promise};var e,n=function(t){if(!X.IsConstructor(t))throw new TypeError("Bad promise constructor");var e=this,r=function(t,r){if(void 0!==e.resolve||void 0!==e.reject)throw new TypeError("Bad Promise implementation!");e.resolve=t,e.reject=r};if(e.promise=new t(r),!X.IsCallable(e.resolve)||!X.IsCallable(e.reject))throw new TypeError("Bad promise constructor")};"undefined"!=typeof window&&X.IsCallable(window.postMessage)&&(e=function(){var t=[],e="zero-timeout-message",r=function(r){x(t,r),window.postMessage(e,"*")},n=function(r){if(r.source===window&&r.data===e){if(r.stopPropagation(),0===t.length)return;var n=R(t);n()}};return window.addEventListener("message",n,!0),r});var i,o=function(){var t=E.Promise;return t&&t.resolve&&function(e){return t.resolve().then(e)}},s=X.IsCallable(E.setImmediate)?E.setImmediate.bind(E):"object"==typeof a&&a.nextTick?a.nextTick:o()||(X.IsCallable(e)?e():function(e){t(e,0)}),u=1,c=2,l=3,f=4,p=5,d=function(t,e){var r,n,i=t.capabilities,o=t.handler,a=!1;if(o===u)r=e;else if(o===c)r=e,a=!0;else try{r=o(e)}catch(t){r=t,a=!0}(n=a?i.reject:i.resolve)(r)},y=function(t,e){h(t,function(t){s(function(){d(t,e)})})},v=function(t,e){var r=t._promise,n=r.fulfillReactions;r.result=e,r.fulfillReactions=void 0,r.rejectReactions=void 0,r.state=f,y(n,e)},g=function(t,e){var r=t._promise,n=r.rejectReactions;r.result=e,r.fulfillReactions=void 0,r.rejectReactions=void 0,r.state=p,y(n,e)},m=function(t){var e=!1,r=function(r){var n;if(!e){if(e=!0,r===t)return g(t,new TypeError("Self resolution"));if(!X.TypeIsObject(r))return v(t,r);try{n=r.then}catch(e){return g(t,e)}return X.IsCallable(n)?void s(function(){_(t,r,n)}):v(t,r)}},n=function(r){if(!e)return e=!0,g(t,r)};return{resolve:r,reject:n}},_=function(t,e,n){var i=m(t),o=i.resolve,a=i.reject;try{r(n,e,o,a)}catch(t){a(t)}},w=function(t){if(!X.TypeIsObject(t))throw new TypeError("Promise is not object");var e=t[U];return void 0!==e&&null!==e?e:t},O=function(){var t=function(e){if(!(this instanceof t))throw new TypeError('Constructor Promise requires "new"');if(this&&this._promise)throw new TypeError("Bad construction");if(!X.IsCallable(e))throw new TypeError("not a valid resolver");var r=it(this,t,i,{_promise:{result:void 0,state:l,fulfillReactions:[],rejectReactions:[]}}),n=m(r),o=n.reject;try{e(n.resolve,o)}catch(t){o(t)}return r};return t}();i=O.prototype;var j=function(t,e,r,n){var i=!1;return function(o){if(!i&&(i=!0,e[t]=o,0===--n.count)){var a=r.resolve;a(e)}}},S=function(t,e,r){for(var n,i,o=t.iterator,a=[],s={count:1},u=0;;){try{if(n=X.IteratorStep(o),n===!1){t.done=!0;break}i=n.value}catch(e){throw t.done=!0,e}a[u]=void 0;var c=e.resolve(i),l=j(u,a,r,s);s.count+=1,c.then(l,r.reject),u+=1}if(0===--s.count){var f=r.resolve;f(a)}return r.promise},T=function(t,e,r){for(var n,i,o,a=t.iterator;;){try{if(n=X.IteratorStep(a),n===!1){t.done=!0;break}i=n.value}catch(e){throw t.done=!0,e}o=e.resolve(i),o.then(r.resolve,r.reject)}return r.promise};return b(O,{all:function(t){var e,r,i=w(this),o=new n(i);try{return e=X.GetIterator(t),r={iterator:e,done:!1},S(r,i,o)}catch(t){var a=t;if(r&&!r.done)try{X.IteratorClose(e,!0)}catch(t){a=t}var s=o.reject;return s(a),o.promise}},race:function(t){var e,r,i=w(this),o=new n(i);try{return e=X.GetIterator(t),r={iterator:e,done:!1},T(r,i,o)}catch(t){var a=t;if(r&&!r.done)try{X.IteratorClose(e,!0)}catch(t){a=t}var s=o.reject;return s(a),o.promise}},reject:function(t){var e=this,r=new n(e),i=r.reject;return i(t),r.promise},resolve:function(t){var e=this;if(X.IsPromise(t)){var r=t.constructor;if(r===e)return t}var i=new n(e),o=i.resolve;return o(t),i.promise}}),b(i,{catch:function(t){return this.then(void 0,t)},then:function(t,e){var r=this;if(!X.IsPromise(r))throw new TypeError("not a promise");var i,o=X.SpeciesConstructor(r,O),a=new n(o),h={capabilities:a,handler:X.IsCallable(t)?t:u},y={capabilities:a,handler:X.IsCallable(e)?e:c},v=r._promise;if(v.state===l)x(v.fulfillReactions,h),x(v.rejectReactions,y);else if(v.state===f)i=v.result,s(function(){d(h,i)});else{if(v.state!==p)throw new TypeError("unexpected Promise state");i=v.result,s(function(){d(y,i)})}return a.promise}}),O}}();if(E.Promise&&(delete E.Promise.accept,delete E.Promise.defer,delete E.Promise.prototype.chain),"function"==typeof $e){b(E,{Promise:$e});var Ge=_(E.Promise,function(t){return t.resolve(42).then(function(){})instanceof t}),Ye=!s(function(){E.Promise.reject(42).then(null,5).then(null,L)}),Xe=s(function(){E.Promise.call(3,L)}),Qe=function(t){var e=t.resolve(5);e.constructor={};var r=t.resolve(e);return e===r}(E.Promise);Ge&&Ye&&Xe&&!Qe||(Promise=$e,tt(E,"Promise",$e)),K(Promise)}var Je=function(t){var e=Object.keys(d(t,function(t,e){return t[e]=!0,t},{}));return t.join(":")===e.join(":")},Ze=Je(["z","a","bb"]),Ke=Je(["z",1,"a","3",2]);if(f){var tr=function(t){if(!Ze)return null;var e=typeof t;return"undefined"===e||null===t?"^"+String(t):"string"===e?"$"+t:"number"===e?Ke?t:"n"+t:"boolean"===e?"b"+t:null},er=function(){return Object.create?Object.create(null):{}},rr=function(t,e,i){if(n(i)||$.string(i))h(i,function(t){e.set(t[0],t[1])});else if(i instanceof t)r(t.prototype.forEach,i,function(t,r){e.set(r,t)});else{var o,a;if(null!==i&&"undefined"!=typeof i){if(a=e.set,!X.IsCallable(a))throw new TypeError("bad map");o=X.GetIterator(i)}if("undefined"!=typeof o)for(;;){var s=X.IteratorStep(o);if(s===!1)break;var u=s.value;try{if(!X.TypeIsObject(u))throw new TypeError("expected iterable of pairs");r(a,e,u[0],u[1])}catch(t){throw X.IteratorClose(o,!0),t}}}},nr=function(t,e,i){if(n(i)||$.string(i))h(i,function(t){e.add(t)});else if(i instanceof t)r(t.prototype.forEach,i,function(t){e.add(t)});else{var o,a;if(null!==i&&"undefined"!=typeof i){if(a=e.add,!X.IsCallable(a))throw new TypeError("bad set");o=X.GetIterator(i)}if("undefined"!=typeof o)for(;;){var s=X.IteratorStep(o);if(s===!1)break;var u=s.value;try{r(a,e,u)}catch(t){throw X.IteratorClose(o,!0),t}}}},ir={Map:function(){var t={},e=function(t,e){this.key=t,this.value=e,this.next=null,this.prev=null};e.prototype.isRemoved=function(){return this.key===t};var n=function(t){return!!t._es6map},i=function(t,e){if(!X.TypeIsObject(t)||!n(t))throw new TypeError("Method Map.prototype."+e+" called on incompatible receiver "+String(t))},o=function(t,e){i(t,"[[MapIterator]]"),this.head=t._head,this.i=this.head,this.kind=e};o.prototype={next:function(){var t,e=this.i,r=this.kind,n=this.head;if("undefined"==typeof this.i)return{value:void 0,done:!0};for(;e.isRemoved()&&e!==n;)e=e.prev;for(;e.next!==n;)if(e=e.next,!e.isRemoved())return t="key"===r?e.key:"value"===r?e.value:[e.key,e.value],this.i=e,{value:t,done:!1};return this.i=void 0,{value:void 0,done:!0}}},et(o.prototype);var a,s=function t(){if(!(this instanceof t))throw new TypeError('Constructor Map requires "new"');if(this&&this._es6map)throw new TypeError("Bad construction");var r=it(this,t,a,{_es6map:!0,_head:null,_storage:er(),_size:0}),n=new e(null,null);return n.next=n.prev=n,r._head=n,arguments.length>0&&rr(t,r,arguments[0]),r};return a=s.prototype,Q.getter(a,"size",function(){if("undefined"==typeof this._size)throw new TypeError("size method called on incompatible Map");return this._size}),b(a,{get:function(t){i(this,"get");var e=tr(t);if(null!==e){var r=this._storage[e];return r?r.value:void 0}for(var n=this._head,o=n;(o=o.next)!==n;)if(X.SameValueZero(o.key,t))return o.value},has:function(t){i(this,"has");var e=tr(t);if(null!==e)return"undefined"!=typeof this._storage[e];for(var r=this._head,n=r;(n=n.next)!==r;)if(X.SameValueZero(n.key,t))return!0;return!1},set:function(t,r){i(this,"set");var n,o=this._head,a=o,s=tr(t);if(null!==s){if("undefined"!=typeof this._storage[s])return this._storage[s].value=r,this;n=this._storage[s]=new e(t,r),a=o.prev}for(;(a=a.next)!==o;)if(X.SameValueZero(a.key,t))return a.value=r,this;return n=n||new e(t,r),X.SameValue(-0,t)&&(n.key=0),n.next=this._head,n.prev=this._head.prev,n.prev.next=n,n.next.prev=n,this._size+=1,this},delete:function(e){i(this,"delete");var r=this._head,n=r,o=tr(e);if(null!==o){if("undefined"==typeof this._storage[o])return!1;n=this._storage[o].prev,delete this._storage[o]}for(;(n=n.next)!==r;)if(X.SameValueZero(n.key,e))return n.key=n.value=t,n.prev.next=n.next,n.next.prev=n.prev,this._size-=1,!0;return!1},clear:function(){i(this,"clear"),this._size=0,this._storage=er();for(var e=this._head,r=e,n=r.next;(r=n)!==e;)r.key=r.value=t,n=r.next,r.next=r.prev=e;e.next=e.prev=e},keys:function(){return i(this,"keys"),new o(this,"key")},values:function(){return i(this,"values"),new o(this,"value")},entries:function(){return i(this,"entries"),new o(this,"key+value")},forEach:function(t){i(this,"forEach");for(var e=arguments.length>1?arguments[1]:null,n=this.entries(),o=n.next();!o.done;o=n.next())e?r(t,e,o.value[1],o.value[0],this):t(o.value[1],o.value[0],this)}}),et(a,a.entries),s}(),Set:function(){var t,e=function(t){return t._es6set&&"undefined"!=typeof t._storage},n=function(t,r){if(!X.TypeIsObject(t)||!e(t))throw new TypeError("Set.prototype."+r+" called on incompatible receiver "+String(t))},i=function e(){if(!(this instanceof e))throw new TypeError('Constructor Set requires "new"');if(this&&this._es6set)throw new TypeError("Bad construction");var r=it(this,e,t,{_es6set:!0,"[[SetData]]":null,_storage:er()});if(!r._es6set)throw new TypeError("bad set");return arguments.length>0&&nr(e,r,arguments[0]),r};t=i.prototype;var o=function(t){if(!t["[[SetData]]"]){var e=t["[[SetData]]"]=new ir.Map;h(Object.keys(t._storage),function(t){var r=t;if("^null"===r)r=null;else if("^undefined"===r)r=void 0;else{var n=r.charAt(0);r="$"===n?C(r,1):"n"===n?+C(r,1):"b"===n?"btrue"===r:+r}e.set(r,r)}),t._storage=null}};return Q.getter(i.prototype,"size",function(){return n(this,"size"),o(this),this["[[SetData]]"].size}),b(i.prototype,{has:function(t){n(this,"has");var e;return this._storage&&null!==(e=tr(t))?!!this._storage[e]:(o(this),this["[[SetData]]"].has(t))},add:function(t){n(this,"add");var e;return this._storage&&null!==(e=tr(t))?(this._storage[e]=!0,this):(o(this),this["[[SetData]]"].set(t,t),this)},delete:function(t){n(this,"delete");var e;if(this._storage&&null!==(e=tr(t))){var r=B(this._storage,e);return delete this._storage[e]&&r}return o(this),this["[[SetData]]"].delete(t)},clear:function(){n(this,"clear"),this._storage?this._storage=er():this["[[SetData]]"].clear()},values:function(){return n(this,"values"),o(this),this["[[SetData]]"].values()},entries:function(){return n(this,"entries"),o(this),this["[[SetData]]"].entries()},forEach:function(t){n(this,"forEach");var e=arguments.length>1?arguments[1]:null,i=this;o(i),this["[[SetData]]"].forEach(function(n,o){e?r(t,e,o,o,i):t(o,o,i)})}}),g(i.prototype,"keys",i.prototype.values,!0),et(i.prototype,i.prototype.values),i}()};if(E.Map||E.Set){var or=u(function(){return 2===new Map([[1,2]]).get(1)});if(!or){var ar=E.Map;E.Map=function t(){if(!(this instanceof t))throw new TypeError('Constructor Map requires "new"');var e=new ar;return arguments.length>0&&rr(t,e,arguments[0]),Object.setPrototypeOf(e,E.Map.prototype),g(e,"constructor",t,!0),e},E.Map.prototype=m(ar.prototype),Q.preserveToString(E.Map,ar)}var sr=new Map,ur=function(t){return t.delete(0),t.delete(-0),t.set(0,3),t.get(-0,4),3===t.get(0)&&4===t.get(-0)}(sr),cr=sr.set(1,2)===sr;if(!ur||!cr){var lr=Map.prototype.set;tt(Map.prototype,"set",function(t,e){return r(lr,this,0===t?0:t,e),this})}if(!ur){var fr=Map.prototype.get,pr=Map.prototype.has;b(Map.prototype,{get:function(t){return r(fr,this,0===t?0:t)},has:function(t){return r(pr,this,0===t?0:t)}},!0),Q.preserveToString(Map.prototype.get,fr),Q.preserveToString(Map.prototype.has,pr)}var hr=new Set,dr=function(t){return t.delete(0),t.add(-0),!t.has(0)}(hr),yr=hr.add(1)===hr;if(!dr||!yr){var vr=Set.prototype.add;Set.prototype.add=function(t){return r(vr,this,0===t?0:t),this},Q.preserveToString(Set.prototype.add,vr)}if(!dr){var gr=Set.prototype.has;Set.prototype.has=function(t){return r(gr,this,0===t?0:t)},Q.preserveToString(Set.prototype.has,gr);var br=Set.prototype.delete;Set.prototype.delete=function(t){return r(br,this,0===t?0:t)},Q.preserveToString(Set.prototype.delete,br)}var mr=_(E.Map,function(t){var e=new t([]);return e.set(42,42),e instanceof t}),_r=Object.setPrototypeOf&&!mr,wr=function(){try{return!(E.Map()instanceof E.Map)}catch(t){return t instanceof TypeError}}();if(0!==E.Map.length||_r||!wr){var Er=E.Map;E.Map=function t(){if(!(this instanceof t))throw new TypeError('Constructor Map requires "new"');var e=new Er;return arguments.length>0&&rr(t,e,arguments[0]),Object.setPrototypeOf(e,t.prototype),g(e,"constructor",t,!0),e},E.Map.prototype=Er.prototype,Q.preserveToString(E.Map,Er)}var Or=_(E.Set,function(t){var e=new t([]);return e.add(42,42),e instanceof t}),jr=Object.setPrototypeOf&&!Or,Sr=function(){try{return!(E.Set()instanceof E.Set)}catch(t){return t instanceof TypeError}}();if(0!==E.Set.length||jr||!Sr){var Tr=E.Set;E.Set=function t(){if(!(this instanceof t))throw new TypeError('Constructor Set requires "new"');var e=new Tr;return arguments.length>0&&nr(t,e,arguments[0]),Object.setPrototypeOf(e,t.prototype),g(e,"constructor",t,!0),e},E.Set.prototype=Tr.prototype,Q.preserveToString(E.Set,Tr)}var Cr=!u(function(){return(new Map).keys().next().done});if(("function"!=typeof E.Map.prototype.clear||0!==(new E.Set).size||0!==(new E.Map).size||"function"!=typeof E.Map.prototype.keys||"function"!=typeof E.Set.prototype.keys||"function"!=typeof E.Map.prototype.forEach||"function"!=typeof E.Set.prototype.forEach||c(E.Map)||c(E.Set)||"function"!=typeof(new E.Map).keys().next||Cr||!mr)&&(delete E.Map,delete E.Set,b(E,{Map:ir.Map,Set:ir.Set},!0)),E.Set.prototype.keys!==E.Set.prototype.values&&g(E.Set.prototype,"keys",E.Set.prototype.values,!0),et(Object.getPrototypeOf((new E.Map).keys())),et(Object.getPrototypeOf((new E.Set).keys())),p&&"has"!==E.Set.prototype.has.name){var xr=E.Set.prototype.has;tt(E.Set.prototype,"has",function(t){return r(xr,this,t)})}}b(E,ir),K(E.Map),K(E.Set)}var Pr=function(t){if(!X.TypeIsObject(t))throw new TypeError("target must be an object")},Rr={apply:function(){return e(X.Call,null,arguments)},construct:function(t,e){if(!X.IsConstructor(t))throw new TypeError("First argument must be a constructor.");var r=arguments.length<3?t:arguments[2];if(!X.IsConstructor(r))throw new TypeError("new.target must be a constructor.");return X.Construct(t,e,r,"internal")},deleteProperty:function(t,e){if(Pr(t),f){var r=Object.getOwnPropertyDescriptor(t,e);if(r&&!r.configurable)return!1}return delete t[e]},enumerate:function(t){return Pr(t),new Ot(t,"key")},has:function(t,e){return Pr(t),e in t}};Object.getOwnPropertyNames&&Object.assign(Rr,{ownKeys:function(t){Pr(t);var e=Object.getOwnPropertyNames(t);return X.IsCallable(Object.getOwnPropertySymbols)&&P(e,Object.getOwnPropertySymbols(t)),e}});var Ar=function(t){return!s(t)};if(Object.preventExtensions&&Object.assign(Rr,{isExtensible:function(t){return Pr(t),Object.isExtensible(t)},preventExtensions:function(t){return Pr(t),Ar(function(){Object.preventExtensions(t)})}}),f){var kr=function(t,e,n){var i=Object.getOwnPropertyDescriptor(t,e);if(!i){var o=Object.getPrototypeOf(t);if(null===o)return;return kr(o,e,n)}return"value"in i?i.value:i.get?r(i.get,n):void 0},Ir=function(t,e,n,i){var o=Object.getOwnPropertyDescriptor(t,e);if(!o){var a=Object.getPrototypeOf(t);if(null!==a)return Ir(a,e,n,i);o={value:void 0,writable:!0,enumerable:!0,configurable:!0}}if("value"in o){if(!o.writable)return!1;if(!X.TypeIsObject(i))return!1;var s=Object.getOwnPropertyDescriptor(i,e);return s?Y.defineProperty(i,e,{value:n}):Y.defineProperty(i,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}return!!o.set&&(r(o.set,i,n),!0)};Object.assign(Rr,{defineProperty:function(t,e,r){return Pr(t),Ar(function(){Object.defineProperty(t,e,r)})},getOwnPropertyDescriptor:function(t,e){return Pr(t),Object.getOwnPropertyDescriptor(t,e)},get:function(t,e){Pr(t);var r=arguments.length>2?arguments[2]:t;return kr(t,e,r)},set:function(t,e,r){Pr(t);var n=arguments.length>3?arguments[3]:t;return Ir(t,e,r,n)}})}if(Object.getPrototypeOf){var Mr=Object.getPrototypeOf;Rr.getPrototypeOf=function(t){return Pr(t),Mr(t)}}if(Object.setPrototypeOf&&Rr.getPrototypeOf){var Nr=function(t,e){for(var r=e;r;){if(t===r)return!0;r=Rr.getPrototypeOf(r)}return!1};Object.assign(Rr,{setPrototypeOf:function(t,e){if(Pr(t),null!==e&&!X.TypeIsObject(e))throw new TypeError("proto must be an object or null");return e===Y.getPrototypeOf(t)||!(Y.isExtensible&&!Y.isExtensible(t))&&(!Nr(t,e)&&(Object.setPrototypeOf(t,e),!0))}})}var Fr=function(t,e){if(X.IsCallable(E.Reflect[t])){var r=u(function(){return E.Reflect[t](1),E.Reflect[t](NaN),E.Reflect[t](!0),!0});r&&tt(E.Reflect,t,e)}else g(E.Reflect,t,e)};if(Object.keys(Rr).forEach(function(t){Fr(t,Rr[t])}),p&&"getPrototypeOf"!==E.Reflect.getPrototypeOf.name){var Br=E.Reflect.getPrototypeOf;tt(E.Reflect,"getPrototypeOf",function(t){return r(Br,E.Reflect,t)})}if(E.Reflect.setPrototypeOf&&u(function(){return E.Reflect.setPrototypeOf(1,{}),!0})&&tt(E.Reflect,"setPrototypeOf",Rr.setPrototypeOf),E.Reflect.defineProperty&&(u(function(){var t=!E.Reflect.defineProperty(1,"test",{value:1}),e="function"!=typeof Object.preventExtensions||!E.Reflect.defineProperty(Object.preventExtensions({}),"test",{});return t&&e})||tt(E.Reflect,"defineProperty",Rr.defineProperty)),E.Reflect.construct&&(u(function(){var t=function(){};return E.Reflect.construct(function(){},[],t)instanceof t})||tt(E.Reflect,"construct",Rr.construct)),"Invalid Date"!==String(new Date(NaN))){var Lr=Date.prototype.toString,Dr=function(){var t=+this;return t!==t?"Invalid Date":r(Lr,this)};tt(Date.prototype,"toString",Dr)}var Ur={anchor:function(t){return X.CreateHTML(this,"a","name",t)},big:function(){return X.CreateHTML(this,"big","","")},blink:function(){return X.CreateHTML(this,"blink","","")},bold:function(){return X.CreateHTML(this,"b","","")},fixed:function(){return X.CreateHTML(this,"tt","","")},fontcolor:function(t){return X.CreateHTML(this,"font","color",t)},fontsize:function(t){return X.CreateHTML(this,"font","size",t)},italics:function(){return X.CreateHTML(this,"i","","")},link:function(t){return X.CreateHTML(this,"a","href",t)},small:function(){return X.CreateHTML(this,"small","","")},strike:function(){return X.CreateHTML(this,"strike","","")},sub:function(){return X.CreateHTML(this,"sub","","")},sup:function(){return X.CreateHTML(this,"sup","","")}};h(Object.keys(Ur),function(t){var e=String.prototype[t],n=!1;if(X.IsCallable(e)){var i=r(e,"",' " '),o=T([],i.match(/"/g)).length;n=i!==i.toLowerCase()||o>2}else n=!0;n&&tt(String.prototype,t,Ur[t])});var Wr=function(){if(!$.symbol(D.iterator))return!1;var t="object"==typeof JSON&&"function"==typeof JSON.stringify?JSON.stringify:null;if(!t)return!1;if("undefined"!=typeof t(D()))return!0;if("[null]"!==t([D()]))return!0;var e={a:D()};return e[D()]=!0,"{}"!==t(e)}(),zr=u(function(){return!$.symbol(D.iterator)||"{}"===JSON.stringify(Object(D()))&&"[{}]"===JSON.stringify([Object(D())])});if(Wr||!zr){var qr=JSON.stringify;tt(JSON,"stringify",function(t){if("symbol"!=typeof t){var e;arguments.length>1&&(e=arguments[1]);var i=[t];if(n(e))i.push(e);else{var o=(X.IsCallable(e)?e:null,function(t,n){var i=e?r(e,this,t,n):n;if("symbol"!=typeof i)return $.symbol(i)?te({})(i):i});i.push(o)}return arguments.length>2&&i.push(arguments[2]),qr.apply(this,i)}})}return E})}).call(e,function(){return this}(),r(2))},function(t,e,r){(function(t,n){function i(t,r){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function u(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return m(i)||(i=u(t,i,n)),i}var o=c(t,r);if(o)return o;var a=Object.keys(r),y=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),S(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(r);if(0===a.length){if(T(r)){var v=r.name?": "+r.name:"";return t.stylize("[Function"+v+"]","special")}if(E(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(j(r))return t.stylize(Date.prototype.toString.call(r),"date");if(S(r))return l(r)}var g="",b=!1,_=["{","}"];if(d(r)&&(b=!0,_=["[","]"]),T(r)){var w=r.name?": "+r.name:"";g=" [Function"+w+"]"}if(E(r)&&(g=" "+RegExp.prototype.toString.call(r)),j(r)&&(g=" "+Date.prototype.toUTCString.call(r)),S(r)&&(g=" "+l(r)),0===a.length&&(!b||0==r.length))return _[0]+g+_[1];if(n<0)return E(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var O;return O=b?f(t,r,n,y,a):a.map(function(e){return p(t,r,n,y,e,b)}),t.seen.pop(),h(O,g,_)}function c(t,e){if(w(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):y(e)?t.stylize(""+e,"boolean"):v(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i){for(var o=[],a=0,s=e.length;a<s;++a)A(e,String(a))?o.push(p(t,e,r,n,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(p(t,e,r,n,i,!0))}),o}function p(t,e,r,n,i,o){var a,s,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?s=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(s=t.stylize("[Setter]","special")),A(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(c.value)<0?(s=v(r)?u(t,c.value,null):u(t,c.value,r-1),s.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")),w(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.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 h(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function y(t){return"boolean"==typeof t}function v(t){return null===t}function g(t){return null==t}function b(t){return"number"==typeof t}function m(t){return"string"==typeof t}function _(t){return"symbol"==typeof t}function w(t){return void 0===t}function E(t){return O(t)&&"[object RegExp]"===x(t)}function O(t){return"object"==typeof t&&null!==t}function j(t){return O(t)&&"[object Date]"===x(t)}function S(t){return O(t)&&("[object Error]"===x(t)||t instanceof Error)}function T(t){return"function"==typeof t}function C(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function x(t){return Object.prototype.toString.call(t)}function P(t){return t<10?"0"+t.toString(10):t.toString(10)}function R(){var t=new Date,e=[P(t.getHours()),P(t.getMinutes()),P(t.getSeconds())].join(":");return[t.getDate(),N[t.getMonth()],e].join(" ")}function A(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var k=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,a=String(t).replace(k,function(t){if("%%"===t)return"%";if(r>=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(t){return"[Circular]"}default:return t}}),s=n[r];r<o;s=n[++r])a+=v(s)||!O(s)?" "+s:" "+i(s);return a},e.deprecate=function(r,i){function o(){if(!a){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),a=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var a=!1;return o};var I,M={};e.debuglog=function(t){if(w(I)&&(I=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!M[t])if(new RegExp("\\b"+t+"\\b","i").test(I)){var r=n.pid;M[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else M[t]=function(){};return M[t]},e.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=y,e.isNull=v,e.isNullOrUndefined=g,e.isNumber=b,e.isString=m,e.isSymbol=_,e.isUndefined=w,e.isRegExp=E,e.isObject=O,e.isDate=j,e.isError=S,e.isFunction=T,e.isPrimitive=C,e.isBuffer=r(9);var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",R(),e.format.apply(e,arguments))},e.inherits=r(10),e._extend=function(t,e){if(!e||!O(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(2))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,i,s,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}if(r=this._events[t],a(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(o(r))for(s=Array.prototype.slice.call(arguments,1),c=r.slice(),i=c.length,u=0;u<i;u++)c[u].apply(this,s);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners, -i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,a,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],a=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){i=s;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e){t.exports={to7BitArray:function(t){var e=0,r=0,n=[];return t.forEach(function(t){0===e?(n.push(127&t),e++,r=t>>7):(n.push(t<<e&127|r),6===e?(n.push(t>>1),e=0):(e++,r=t>>8-e))}),e>0&&n.push(r),n},from7BitArray:function(t){for(var e=7*t.length>>3,r=[],n=0;n<e;n++){var i=n<<3,o=parseInt(i/7,10),a=i%7;r[n]=t[o]>>a|t[o+1]<<7-a&255}return r}}},function(t,e,r){var n=r(12),i={crc8:function(t){for(var e=0,r=0;r<t.length;r++)for(var n=t[r],i=8;i;i--){var o=1&(e^n);e>>=1,o&&(e^=140),n>>=1}return e},readDevices:function(t){for(var e=n.from7BitArray(t),r=[],o=0;o<e.length;o+=8){var a=e.slice(o,o+8);if(8===a.length){var s=i.crc8(a.slice(0,7));s!==a[7]&&console.error("ROM invalid!"),r.push(a)}}return r}};t.exports=i},function(t,e,r){(function(e,n){"use strict";function i(t){switch(t.dataBits){case 7:t.dataBits="seven";break;case 8:t.dataBits="eight"}switch(t.stopBits){case 1:t.stopBits="one";break;case 2:t.stopBits="two"}switch(t.parity){case"none":t.parity="no"}return t}function o(t,r,n,o){l.call(this);var a=this,s=Array.prototype.slice.call(arguments);o=s.pop(),"function"!=typeof o&&(o=null),r="function"!=typeof r&&r||{},n=void 0===n||null===n||n,o=o||function(t){t&&a.emit("error",t)};var u;if(r.baudRate=r.baudRate||r.baudrate||v.baudrate,r.dataBits=r.dataBits||r.databits||v.databits,p.indexOf(r.dataBits)===-1)return u=new Error('Invalid "databits": '+r.dataBits),void o(u);if(r.stopBits=r.stopBits||r.stopbits||v.stopbits,h.indexOf(r.stopBits)===-1)return u=new Error('Invalid "stopbits": '+r.stopbits),void o(u);if(r.parity=r.parity||v.parity,d.indexOf(r.parity)===-1)return u=new Error('Invalid "parity": '+r.parity),void o(u);if(!t)return u=new Error("Invalid port specified: "+t),void o(u);if(r.rtscts=v.rtscts,r.flowControl||r.flowcontrol){var c=r.flowControl||r.flowcontrol;if("boolean"==typeof c)r.rtscts=!0;else{var f=c.every(function(t){var e=t.toUpperCase(),n=y.indexOf(e);if(n<0){var i=new Error('Invalid "flowControl": '+e+". Valid options: "+y.join(", "));return o(i),!1}switch(n){case 0:r.rtscts=!0}return!0});if(!f)return}}if(r.bufferSize=r.bufferSize||r.buffersize||v.buffersize,r.serial=r.serial||"undefined"!=typeof chrome&&chrome.serial,!r.serial)throw new Error("No access to serial ports. Try loading as a Chrome Application.");this.options=i(r),this.options.serial.onReceiveError.addListener(function(t){switch(t.error){case"disconnected":case"device_lost":case"system_error":u=new Error("Disconnected"),a.options.disconnectedCallback?a.options.disconnectedCallback(u):a.emit("disconnect",u),a.connectionId>=0&&a.close();break;case"timeout":}}),this.path=t,n&&e.nextTick(function(){a.open(o)})}function a(t){"undefined"!=typeof chrome&&chrome.serial?chrome.serial.getDevices(function(e){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]={comName:e[n].path,manufacturer:e[n].displayName,serialNumber:"",pnpId:"",locationId:"",vendorId:"0x"+(e[n].vendorId||0).toString(16),productId:"0x"+(e[n].productId||0).toString(16)};t(chrome.runtime.lastError,r)}):t(new Error("No access to serial ports. Try loading as a Chrome Application."),null)}function s(t){for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return e}function u(t){for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n<t.length;n++)r[n]=t[n];return e}function c(t){for(var e=new n(t.byteLength),r=new Uint8Array(t),i=0;i<e.length;++i)e[i]=r[i];return e}var l=r(11).EventEmitter,f=r(8),p=[7,8],h=[1,2],d=["none","even","mark","odd","space"],y=["RTSCTS"],v={baudrate:9600,parity:"none",rtscts:!1,databits:8,stopbits:1,buffersize:256};f.inherits(o,l),o.prototype.connectionId=-1,o.prototype.open=function(t){var e={bitrate:parseInt(this.options.baudRate,10),dataBits:this.options.dataBits,parityBit:this.options.parity,stopBits:this.options.stopBits,ctsFlowControl:this.options.rtscts};this.options.serial.connect(this.path,e,this.proxy("onOpen",t))},o.prototype.onOpen=function(t,e){return chrome.runtime.lastError?void("function"==typeof t?t(chrome.runtime.lastError):this.emit("error",chrome.runtime.lastError)):(this.connectionId=e.connectionId,this.connectionId===-1?void this.emit("error",new Error("Could not open port.")):(this.emit("open",e),this._reader=this.proxy("onRead"),this.options.serial.onReceive.addListener(this._reader),void("function"==typeof t&&t(chrome.runtime.lastError,e))))},o.prototype.onRead=function(t){t&&this.connectionId===t.connectionId&&(this.options.dataCallback?this.options.dataCallback(c(t.data)):this.emit("data",c(t.data)))},o.prototype.write=function(t,e){if(this.connectionId<0){var r=new Error("Serialport not open.");return void("function"==typeof e?e(r):this.emit("error",r))}"string"==typeof t&&(t=s(t)),t instanceof ArrayBuffer==!1&&(t=u(t)),this.options.serial.send(this.connectionId,t,function(t){"function"==typeof e&&e(chrome.runtime.lastError,t)})},o.prototype.close=function(t){if(this.connectionId<0){var e=new Error("Serialport not open.");return void("function"==typeof t?t(e):this.emit("error",e))}this.options.serial.disconnect(this.connectionId,this.proxy("onClose",t))},o.prototype.onClose=function(t,e){this.connectionId=-1,this.emit("close"),this.removeAllListeners(),this._reader&&(this.options.serial.onReceive.removeListener(this._reader),this._reader=null),"function"==typeof t&&t(chrome.runtime.lastError,e)},o.prototype.flush=function(t){if(this.connectionId<0){var e=new Error("Serialport not open.");return void("function"==typeof t?t(e):this.emit("error",e))}var r=this;this.options.serial.flush(this.connectionId,function(e){return chrome.runtime.lastError?void("function"==typeof t?t(chrome.runtime.lastError,e):r.emit("error",chrome.runtime.lastError)):void t(null,e)})},o.prototype.drain=function(t){if(this.connectionId<0){var e=new Error("Serialport not open.");return void("function"==typeof t?t(e):this.emit("error",e))}"function"==typeof t&&t()},o.prototype.proxy=function(){for(var t=this,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=e.splice(0,1)[0],i=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e.concat(r);t[n].apply(t,o)};return i},o.prototype.set=function(t,e){this.options.serial.setControlSignals(this.connectionId,t,function(t){e(chrome.runtime.lastError,t)})},t.exports={SerialPort:o,list:a,buffer2ArrayBuffer:u,used:[]}}).call(e,r(2),r(3).Buffer)},function(t,e,r){(function(e,n){"use strict";function i(t){return j.forEach(function(e){var r=e.toLowerCase();if(t.hasOwnProperty(r)){var n=t[r];delete t[r],t[e]=n}}),t}function o(t,r,n,o){var a=Array.prototype.slice.call(arguments);if(o=a.pop(),"function"!=typeof o&&(o=null),r="function"!=typeof r&&r||{},void 0!==n&&null!==n||(n=!0),p.Stream.call(this),o=o||function(t){t&&(this._events.error?this.emit("error",t):d.emit("error",t))}.bind(this),!t)return o(new Error("Invalid port specified: "+t));this.path=t;var u=i(r),c=s({},E,u);if(y.indexOf(c.dataBits)===-1)return o(new Error('Invalid "databits": '+c.dataBits));if(v.indexOf(c.stopBits)===-1)return o(new Error('Invalid "stopbits": '+c.stopbits));if(g.indexOf(c.parity)===-1)return o(new Error('Invalid "parity": '+c.parity));var l=c.flowControl;if(l===!0)c.rtscts=!0;else if(Array.isArray(l))for(var f=l.length-1;f>=0;f--){var h=l[f].toLowerCase();if(!(b.indexOf(h)>-1))return o(new Error("Invalid flowControl option: "+h));c[h]=!0}c.dataCallback=r.dataCallback||function(t){c.parser(this,t)}.bind(this),c.disconnectedCallback=r.disconnectedCallback||function(t){this.closing||(t||(t=new Error("Disconnected")),this.emit("disconnect",t))}.bind(this),this.fd=null,this.paused=!0,this.opening=!1,this.closing=!1,"win32"!==e.platform&&(this.bufferSize=c.bufferSize,this.readable=!0,this.reading=!1),this.options=c,n&&e.nextTick(function(){this.open(o)}.bind(this))}var a=r(16)("serialport"),s=r(19).getPolyfill(),u=r(30),c=r(38),l=r(11).EventEmitter,f=r(36),p=r(39),h=r(8),d=new l;d.parsers=c,d.list=u.list;var y=[5,6,7,8],v=[1,1.5,2],g=["none","even","mark","odd","space"],b=["xon","xoff","xany","rtscts"],m=["brk","cts","dtr","dts","rts"],_=40960,w=128,E={baudRate:9600,parity:"none",xon:!1,xoff:!1,xany:!1,rtscts:!1,hupcl:!0,dataBits:8,stopBits:1,bufferSize:65536,parser:c.raw,platformOptions:u.platformOptions},O={brk:!1,cts:!1,dtr:!0,dts:!1,rts:!0},j=["baudRate","dataBits","stopBits","bufferSize","platformOptions","flowControl"];d.SerialPort=o,h.inherits(o,p.Stream),o.prototype._error=function(t,e){e?e(t):this.emit("error",t)},o.prototype.open=function(t){if(this.isOpen())return this._error(new Error("Port is already open"),t);if(this.opening)return this._error(new Error("Port is opening"),t);this.paused=!0,this.readable=!0,this.reading=!1,this.opening=!0;var r=this;u.open(this.path,this.options,function(n,i){return n?(a("SerialPortBinding.open had an error",n),r._error(n,t)):(r.fd=i,r.paused=!1,r.opening=!1,"win32"!==e.platform&&(r.serialPoller=new u.SerialportPoller(r.fd,function(t){t?r.disconnected(t):r._read()}),r.serialPoller.start()),r.emit("open"),void(t&&t()))})},o.prototype.update=function(t,e){if(!this.isOpen())return a("update attempted, but port is not open"),this._error(new Error("Port is not open"),e);var r=i(t),n=s({},E,r);this.options.baudRate=n.baudRate,u.update(this.fd,this.options,function(t){return t?this._error(t,e):(this.emit("open"),void(e&&e()))}.bind(this))},o.prototype.isOpen=function(){return null!==this.fd&&!this.closing},o.prototype.write=function(t,e){if(!this.isOpen())return a("write attempted, but port is not open"),this._error(new Error("Port is not open"),e);n.isBuffer(t)||(t=new n(t)),a("write data: "+JSON.stringify(t));var r=this;u.write(this.fd,t,function(t,n){e?e(t,n):t&&r.emit("error",t)})},"win32"!==e.platform&&(o.prototype._read=function(){function t(t,r,o,a){if(e.reading=!1,t)t.code&&"EAGAIN"===t.code?!e.closing&&e.isOpen()&&e.serialPoller.start():!t.code||"EBADF"!==t.code&&"ENXIO"!==t.code&&t.errno!==-1&&"UNKNOWN"!==t.code?(e.fd=null,e.readable=!1,e.emit("error",t)):e.disconnected(t);else if(e.pool.used-=a-r,0===r)e.isOpen()&&e.serialPoller.start();else{var s=e.pool.slice(i,i+r);if(e.paused)return void(e.buffer=n.concat([e.buffer,s]));if(e._emitData(s),!e.readable)return;e._read()}}var e=this;if(e.readable&&!e.paused&&!e.reading&&!this.closing){e.reading=!0,(!e.pool||e.pool.length-e.pool.used<w)&&(e.pool=new n(_),e.pool.used=0);var r=Math.min(e.pool.length-e.pool.used,~~e.bufferSize),i=e.pool.used;f.read(e.fd,e.pool,e.pool.used,r,null,function(n,i){var o=e.pool,a=r;t(n,i,o,a)}),e.pool.used+=r}},o.prototype._emitData=function(t){this.options.dataCallback(t)},o.prototype.pause=function(){var t=this;t.paused=!0},o.prototype.resume=function(){var t=this;if(t.paused=!1,t.buffer){var e=t.buffer;t.buffer=null,t._emitData(e)}this.isOpen()&&t._read()}),o.prototype.disconnected=function(t){var r=this,n=r.fd;r.options.disconnectedCallback?r.options.disconnectedCallback(t):r.emit("disconnect",t),r.paused=!0,r.closing=!0,r.emit("close"),n=r.fd;try{u.close(n,function(t){a(t?"Disconnect completed with error: "+JSON.stringify(t):"Disconnect completed.")})}catch(t){a("Disconnect completed with an exception: "+JSON.stringify(t))}r.removeAllListeners(),r.closing=!1,r.fd=null,"win32"!==e.platform&&(r.readable=!1,r.serialPoller.close())},o.prototype.close=function(t){var r=this,n=r.fd;if(r.closing)return a("close attempted, but port is already closing"),this._error(new Error("Port is not open"),t);if(!this.isOpen())return a("close attempted, but port is not open"),this._error(new Error("Port is not open"),t);r.closing=!0,"win32"!==e.platform&&(r.readable=!1,r.serialPoller.close());try{u.close(n,function(e){return r.closing=!1,e?(a("SerialPortBinding.close had an error",e),r._error(e,t)):(r.fd=null,r.emit("close"),t&&t(),void r.removeAllListeners())})}catch(e){return this.closing=!1,a("SerialPortBinding.close had an throwing error",e),this._error(e,t)}},o.prototype.flush=function(t){var e=this,r=e.fd;return this.isOpen()?void u.flush(r,function(r,n){t?t(r,n):r&&e.emit("error",r)}):(a("flush attempted, but port is not open"),this._error(new Error("Port is not open"),t))},o.prototype.set=function(t,e){if(!this.isOpen())return a("set attempted, but port is not open"),this._error(new Error("Port is not open"),e);t=t||{},e||"function"!=typeof t||(e=t,t={});for(var r={},n=m.length-1;n>=0;n--){var i=m[n];void 0!==t[i]?r[i]=t[i]:r[i]=O[i]}u.set(this.fd,r,function(t,r){return t?(a("SerialPortBinding.set had an error",t),this._error(t,e)):void(e&&e(null,r))}.bind(this))},o.prototype.drain=function(t){var e=this,r=this.fd;return this.isOpen()?void u.drain(r,function(r,n){t?t(r,n):r&&e.emit("error",r)}):(a("drain attempted, but port is not open"),this._error(new Error("Port is not open"),t))},t.exports=d}).call(e,r(2),r(3).Buffer)},function(t,e,r){function n(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function i(){var t=arguments,r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),!r)return t;var n="color: "+this.color;t=[t[0],n,"color: inherit"].concat(Array.prototype.slice.call(t,1));var i=0,o=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(i++,"%c"===t&&(o=i))}),t.splice(o,0,n),t}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function s(){var t;try{t=e.storage.debug}catch(t){}return t}function u(){try{return window.localStorage}catch(t){}}e=t.exports=r(17),e.log=o,e.formatArgs=i,e.save=a,e.load=s,e.useColors=n,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){return JSON.stringify(t)},e.enable(s())},function(t,e,r){function n(){return e.colors[l++%e.colors.length]}function i(t){function r(){}function i(){var t=i,r=+new Date,o=r-(c||r);t.diff=o,t.prev=c,t.curr=r,c=r,null==t.useColors&&(t.useColors=e.useColors()),null==t.color&&t.useColors&&(t.color=n());var a=Array.prototype.slice.call(arguments);a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var s=0;a[0]=a[0].replace(/%([a-z%])/g,function(r,n){if("%%"===r)return r;s++;var i=e.formatters[n];if("function"==typeof i){var o=a[s];r=i.call(t,o),a.splice(s,1),s--}return r}),"function"==typeof e.formatArgs&&(a=e.formatArgs.apply(t,a));var u=i.log||e.log||console.log.bind(console);u.apply(t,a)}r.enabled=!1,i.enabled=!0;var o=e.enabled(t)?i:r;return o.namespace=t,o}function o(t){e.save(t);for(var r=(t||"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&(t=r[i].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function a(){e.enable("")}function s(t){var r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1}function u(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=i,e.coerce=u,e.disable=a,e.enable=o,e.enabled=s,e.humanize=r(18),e.names=[],e.skips=[],e.formatters={};var c,l=0},function(t,e){function r(t){if(t=""+t,!(t.length>1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*l;case"days":case"day":case"d":return r*c;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*s;case"seconds":case"second":case"secs":case"sec":case"s":return r*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function n(t){return t>=c?Math.round(t/c)+"d":t>=u?Math.round(t/u)+"h":t>=s?Math.round(t/s)+"m":t>=a?Math.round(t/a)+"s":t+"ms"}function i(t){return o(t,c,"day")||o(t,u,"hour")||o(t,s,"minute")||o(t,a,"second")||t+" ms"}function o(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+r:Math.ceil(t/e)+" "+r+"s"}var a=1e3,s=60*a,u=60*s,c=24*u,l=365.25*c;t.exports=function(t,e){return e=e||{},"string"==typeof t?r(t):e.long?i(t):n(t)}},function(t,e,r){"use strict";var n=r(20),i=r(24),o=r(28),a=r(29),s=o();n(s,{implementation:i,getPolyfill:o,shim:a}),t.exports=s},function(t,e,r){"use strict";var n=r(21),i=r(23),o="function"==typeof Symbol&&"symbol"==typeof Symbol(),a=Object.prototype.toString,s=function(t){return"function"==typeof t&&"[object Function]"===a.call(t)},u=function(){var t={};try{Object.defineProperty(t,"x",{enumerable:!1,value:t});for(var e in t)return!1;return t.x===t}catch(t){return!1}},c=Object.defineProperty&&u(),l=function(t,e,r,n){(!(e in t)||s(n)&&n())&&(c?Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},f=function(t,e){var r=arguments.length>2?arguments[2]:{},a=n(e);o&&(a=a.concat(Object.getOwnPropertySymbols(e))),i(a,function(n){l(t,n,e[n],r[n])})};f.supportsDescriptors=!!c,t.exports=f},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Array.prototype.slice,a=r(22),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},p={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!p["$"+t]&&n.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{f(window[t])}catch(t){return!0}}catch(t){return!0}return!1}(),d=function(t){if("undefined"==typeof window||!h)return f(t);try{return f(t)}catch(t){return!1}},y=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===i.call(t),o=a(t),s=e&&"[object String]"===i.call(t),f=[];if(!e&&!r&&!o)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(s&&t.length>0&&!n.call(t,0))for(var h=0;h<t.length;++h)f.push(String(h));if(o&&t.length>0)for(var y=0;y<t.length;++y)f.push(String(y));else for(var v in t)p&&"prototype"===v||!n.call(t,v)||f.push(String(v));if(u)for(var g=d(t),b=0;b<l.length;++b)g&&"constructor"===l[b]||!n.call(t,l[b])||f.push(l[b]);return f};y.shim=function(){if(Object.keys){var t=function(){return 2===(Object.keys(arguments)||"").length}(1,2);if(!t){var e=Object.keys;Object.keys=function(t){return e(a(t)?o.call(t):t)}}}else Object.keys=y;return Object.keys||y},t.exports=y},function(t,e){"use strict";var r=Object.prototype.toString;t.exports=function(t){var e=r.call(t),n="[object Arguments]"===e;return n||(n="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===r.call(t.callee)),n}},function(t,e){var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString;t.exports=function(t,e,i){if("[object Function]"!==n.call(e))throw new TypeError("iterator must be a function");var o=t.length;if(o===+o)for(var a=0;a<o;a++)e.call(i,t[a],a,t);else for(var s in t)r.call(t,s)&&e.call(i,t[s],s,t)}},function(t,e,r){"use strict";var n=r(21),i=r(25),o=function(t){return"undefined"!=typeof t&&null!==t},a=r(27)(),s=Object,u=i.call(Function.call,Array.prototype.push),c=i.call(Function.call,Object.prototype.propertyIsEnumerable),l=a?Object.getOwnPropertySymbols:null;t.exports=function(t,e){if(!o(t))throw new TypeError("target must be an object");var r,i,f,p,h,d,y,v=s(t);for(r=1;r<arguments.length;++r){i=s(arguments[r]),p=n(i);var g=a&&(Object.getOwnPropertySymbols||l);if(g)for(h=g(i),f=0;f<h.length;++f)y=h[f],c(i,y)&&u(p,y);for(f=0;f<p.length;++f)y=p[f],d=i[y],c(i,y)&&(v[y]=d)}return v}},function(t,e,r){var n=r(26);t.exports=Function.prototype.bind||n},function(t,e){var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,i=Object.prototype.toString,o="[object Function]";t.exports=function(t){var e=this;if("function"!=typeof e||i.call(e)!==o)throw new TypeError(r+e);for(var a,s=n.call(arguments,1),u=function(){if(this instanceof a){var r=e.apply(this,s.concat(n.call(arguments)));return Object(r)===r?r:this}return e.apply(t,s.concat(n.call(arguments)))},c=Math.max(0,e.length-s.length),l=[],f=0;f<c;f++)l.push("$"+f);if(a=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(u),e.prototype){var p=function(){};p.prototype=e.prototype,a.prototype=new p,p.prototype=null}return a}},function(t,e,r){"use strict";var n=r(21);t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;var i=42;t[e]=i;for(e in t)return!1;if(0!==n(t).length)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(t,e);if(a.value!==i||a.enumerable!==!0)return!1}return!0}},function(t,e,r){"use strict";var n=r(24),i=function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),r={},n=0;n<e.length;++n)r[e[n]]=e[n];var i=Object.assign({},r),o="";for(var a in i)o+=a;return t!==o},o=function(){if(!Object.assign||!Object.preventExtensions)return!1;var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch(e){return"y"===t[1]}return!1};t.exports=function(){return Object.assign?i()?n:o()?n:Object.assign:n}},function(t,e,r){"use strict";var n=r(20),i=r(28);t.exports=function(){var t=i();return n(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t}},function(t,e,r){(function(e){"use strict";function n(t){return t=t||function(t){t&&this.emit("error",t)}.bind(this),o(t)}var i=r(31)("serialport.node"),o=r(32),a="win32"!==e.platform&&"darwin"!==e.platform,s={};"win32"!==e.platform&&(s={vmin:1,vtime:0}),t.exports={close:i.close,drain:i.drain,flush:i.flush,list:a?n:i.list,open:i.open,SerialportPoller:i.SerialportPoller,set:i.set,update:i.update,write:i.write,platformOptions:s}}).call(e,r(2))},function(t,e){t.exports=bindings},function(t,e,r){"use strict";function n(t){var e,r=t.split("\n").reduce(function(t,e){if(!e||""===e.trim())return t;var r=e.split("=").map(function(t){return t.trim()});return t[r[0].toLowerCase()]=r[1],t},{});r.devlinks&&r.devlinks.split(" ").forEach(function(t){t.indexOf("/by-id/")!==-1&&(e=t.substring(t.lastIndexOf("/")+1))});var n=r.id_vendor_id;n&&"0x"!==n.substring(0,2)&&(n="0x"+n);var i=r.id_model_id;return i&&"0x"!==i.substring(0,2)&&(i="0x"+i),{comName:r.devname,manufacturer:r.id_vendor,serialNumber:r.id_serial,pnpId:e,vendorId:n,productId:i}}function i(t){return!!/(tty(S|ACM|USB|AMA|MFD)|rfcomm)/.test(t)&&c.statAsync(t).then(function(t){return t.isCharacterDevice()})}function o(t){var e="udevadm info --query=property -p $(udevadm info -q path -n "+t+")";return u.execAsync(e).then(n)}function a(t){var e="/dev";c.readdirAsync(e).catch(function(t){if(34===t.errno)return[];throw t}).map(function(t){return l.join(e,t)}).filter(i).map(o).asCallback(t)}var s=r(33),u=s.promisifyAll(r(35)),c=s.promisifyAll(r(36)),l=r(37);t.exports=a},function(t,e,r){(function(e,r,n){!function(e){t.exports=e()}(function(){var t,i,o;return function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var u="function"==typeof _dereq_&&_dereq_;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[a]={exports:{}};e[a][0].call(l.exports,function(t){var r=e[a][1][t];return i(r?r:t)},l,l.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(t,e,r){"use strict";e.exports=function(t){function e(t){var e=new r(t),n=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),n}var r=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,r,n){"use strict";function i(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new l(16),this._normalQueue=new l(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=c}function o(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()}function a(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}var u;try{throw new Error}catch(t){u=t}var c=t("./schedule"),l=t("./queue"),f=t("./util");i.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},i.prototype.hasCustomScheduler=function(){return this._customScheduler},i.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},i.prototype.disableTrampolineIfNecessary=function(){f.hasDevTools&&(this._trampolineEnabled=!1)},i.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},i.prototype.fatalError=function(t,r){r?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},i.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},f.hasDevTools?(i.prototype.invokeLater=function(t,e,r){this._trampolineEnabled?o.call(this,t,e,r):this._schedule(function(){setTimeout(function(){t.call(e,r)},100)})},i.prototype.invoke=function(t,e,r){this._trampolineEnabled?a.call(this,t,e,r):this._schedule(function(){t.call(e,r)})},i.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(i.prototype.invokeLater=o,i.prototype.invoke=a,i.prototype.settlePromises=s),i.prototype.invokeFirst=function(t,e,r){this._normalQueue.unshift(t,e,r),this._queueTick()},i.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var r=t.shift(),n=t.shift();e.call(r,n)}else e._settlePromises()}},i.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},i.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},i.prototype._reset=function(){this._isTickUsed=!1},r.exports=i,r.exports.firstLineError=u},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=n.propagateFromFunction(),t.prototype._boundValue=n.boundValueFunction());var c=r(o),l=new t(e);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(c),c instanceof t){var p={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:c};f._then(e,a,void 0,l,p),c._then(s,u,void 0,l,p),l._setOnCancel(c)}else l._resolveCallback(f);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=this._bitField&-2097153},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},{}],4:[function(t,e,r){"use strict";function n(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=n,e.exports=o},{"./promise":22}],5:[function(t,e,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}e.exports=function(e){function r(t,r){var n;if(null!=t&&(n=t[r]),"function"!=typeof n){var i="Object "+s.classString(t)+" has no method '"+s.toString(r)+"'";throw new e.TypeError(i)}return n}function n(t){var e=this.pop(),n=r(t,e);return n.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}var a,s=t("./util"),u=s.canEvaluate;s.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(n,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,r="number"==typeof t;if(r)e=o;else if(u){var n=a(t);e=null!==n?n:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,u=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var r=t._cancellationParent;if(null==r||!r._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=r}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0; -},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var r=0;r<t.length;++r)this._doInvokeOnCancel(t[r],e);else if(void 0!==t)if("function"==typeof t){if(!e){var n=a(t).call(this._boundValue());n===s&&(this._attachExtraTrace(n.e),u.throwLater(n.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,r){"use strict";e.exports=function(e){function r(t,r,s){return function(u){var c=s._boundValue();t:for(var l=0;l<t.length;++l){var f=t[l];if(f===Error||null!=f&&f.prototype instanceof Error){if(u instanceof f)return o(r).call(c,u)}else if("function"==typeof f){var p=o(f).call(c,u);if(p===a)return p;if(p)return o(r).call(c,u)}else if(n.isObject(u)){for(var h=i(f),d=0;d<h.length;++d){var y=h[d];if(f[y]!=u[y])continue t}return o(r).call(c,u)}}return e}}var n=t("./util"),i=t("./es5").keys,o=n.tryCatch,a=n.errorObj;return r}},{"./es5":13,"./util":36}],8:[function(t,e,r){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(n())}function r(){if(i)return new e}function n(){var t=o.length-1;if(t>=0)return o[t]}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=r,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var r=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,u=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=u,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=n,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,r,n){"use strict";r.exports=function(r,n){function i(t,e){return{promise:e}}function o(){return!1}function a(t,e,r){var n=this;try{t(e,r,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+D.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?D.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function u(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(t,e){if(0!==(1&e)){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof r?t.isFulfilled()?t.value():void 0:t}function d(){this._trace=new k(this._peekContext())}function y(t,e){if(U(t)){var r=this._trace;if(void 0!==r&&e&&(r=r._parent),void 0!==r)r.attachExtraTrace(t);else if(!t.__stackCleaned__){var n=j(t);D.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),D.notEnumerableProp(t,"__stackCleaned__",!0)}}}function v(t,e,r,n,i){if(void 0===t&&null!==e&&Q){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&n._bitField))return;r&&(r+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),u=E(s),c=u.length-1;c>=0;--c){var l=u[c];if(!z.test(l)){var f=l.match(q);f&&(o="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(u.length>0)for(var p=u[0],c=0;c<s.length;++c)if(s[c]===p){c>0&&(a="\n"+s[c-1]);break}}var h="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(h,!0,e)}}function g(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),b(r)}function b(t,e,n){if(at.warnings){var i,o=new L(t);if(e)n._attachExtraTrace(o);else if(at.longStackTraces&&(i=r._peekContext()))i.attachExtraTrace(o);else{var a=j(o);o.stack=a.message+"\n"+a.stack.join("\n")}et("warning",o)||S(o,"",!0)}}function m(t,e){for(var r=0;r<e.length-1;++r)e[r].push("From previous event:"),e[r]=e[r].join("\n");return r<e.length&&(e[r]=e[r].join("\n")),t+"\n"+e.join("\n")}function _(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function w(t){for(var e=t[0],r=1;r<t.length;++r){for(var n=t[r],i=e.length-1,o=e[i],a=-1,s=n.length-1;s>=0;--s)if(n[s]===o){a=s;break}for(var s=a;s>=0;--s){var u=n[s];if(e[i]!==u)break;e.pop(),i--}e=n}}function E(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=" (No stack trace)"===n||H.test(n),o=i&&nt(n);i&&!o&&($&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function O(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r<e.length;++r){var n=e[r];if(" (No stack trace)"===n||H.test(n))break}return r>0&&(e=e.slice(r)),e}function j(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?O(t):[" (No stack trace)"],{message:r,stack:E(e)}}function S(t,e,r){if("undefined"!=typeof console){var n;if(D.isObject(t)){var i=t.stack;n=e+V(i,t)}else n=e+String(t);"function"==typeof N?N(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function T(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){B.throwLater(t)}"unhandledRejection"===t?et(t,r,n)||i||S(r,"Unhandled rejection "):et(t,n)}function C(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():D.toString(t);var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(e))try{var n=JSON.stringify(t);e=n}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function P(){return"function"==typeof ot}function R(t){var e=t.match(it);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function A(t,e){if(P()){for(var r,n,i=t.stack.split("\n"),o=e.stack.split("\n"),a=-1,s=-1,u=0;u<i.length;++u){var c=R(i[u]);if(c){r=c.fileName,a=c.line;break}}for(var u=0;u<o.length;++u){var c=R(o[u]);if(c){n=c.fileName,s=c.line;break}}a<0||s<0||!r||!n||r!==n||a>=s||(nt=function(t){if(W.test(t))return!0;var e=R(t);return!!(e&&e.fileName===r&&a<=e.line&&e.line<=s)})}}function k(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);ot(this,k),e>32&&this.uncycle()}var I,M,N,F=r._getDomain,B=r._async,L=t("./errors").Warning,D=t("./util"),U=D.canAttachTrace,W=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,z=/\((?:timers\.js):\d+:\d+\)/,q=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,H=null,V=null,$=!1,G=!(0==D.env("BLUEBIRD_DEBUG")),Y=!(0==D.env("BLUEBIRD_WARNINGS")||!G&&!D.env("BLUEBIRD_WARNINGS")),X=!(0==D.env("BLUEBIRD_LONG_STACK_TRACES")||!G&&!D.env("BLUEBIRD_LONG_STACK_TRACES")),Q=0!=D.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(Y||!!D.env("BLUEBIRD_W_FORGOTTEN_RETURN"));r.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=t._bitField&-1048577|524288},r.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),B.invokeLater(this._notifyUnhandledRejection,this,void 0))},r.prototype._notifyUnhandledRejectionIsHandled=function(){T("rejectionHandled",I,void 0,this)},r.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},r.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},r.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),T("unhandledRejection",M,t,this)}},r.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},r.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},r.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},r.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},r.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},r.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},r.prototype._warn=function(t,e,r){return b(t,e,r||this)},r.onPossiblyUnhandledRejection=function(t){var e=F();M="function"==typeof t?null===e?t:D.domainBind(e,t):void 0},r.onUnhandledRejectionHandled=function(t){var e=F();I="function"==typeof t?null===e?t:D.domainBind(e,t):void 0};var J=function(){};r.longStackTraces=function(){if(B.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&P()){var t=r.prototype._captureStackTrace,e=r.prototype._attachExtraTrace;at.longStackTraces=!0,J=function(){if(B.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");r.prototype._captureStackTrace=t,r.prototype._attachExtraTrace=e,n.deactivateLongStackTraces(),B.enableTrampoline(),at.longStackTraces=!1},r.prototype._captureStackTrace=d,r.prototype._attachExtraTrace=y,n.activateLongStackTraces(),B.disableTrampolineIfNecessary()}},r.hasLongStackTraces=function(){return at.longStackTraces&&P()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return D.global.dispatchEvent(t),function(t,e){var r=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!D.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return D.global.dispatchEvent(t),function(t,e){var r=new Event(t.toLowerCase(),{cancelable:!0});return r.detail=e,!D.global.dispatchEvent(r)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),D.global.dispatchEvent(t),function(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t.toLowerCase(),!1,!0,e),!D.global.dispatchEvent(r)}}catch(t){}return function(){return!1}}(),K=function(){return D.isNode?function(){return e.emit.apply(e,arguments)}:D.global?function(t){var e="on"+t.toLowerCase(),r=D.global[e];return!!r&&(r.apply(D.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),tt={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:i},et=function(t){var e=!1;try{e=K.apply(null,arguments)}catch(t){B.throwLater(t),e=!0}var r=!1;try{r=Z(t,tt[t].apply(null,arguments))}catch(t){B.throwLater(t),r=!0}return r||e};r.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?r.longStackTraces():!t.longStackTraces&&r.hasLongStackTraces()&&J()),"warnings"in t){var e=t.warnings;at.warnings=!!e,Q=at.warnings,D.isObject(e)&&"wForgottenReturn"in e&&(Q=!!e.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!at.cancellation){if(B.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");r.prototype._clearCancellationData=l,r.prototype._propagateFrom=f,r.prototype._onCancel=u,r.prototype._setOnCancel=c,r.prototype._attachCancellationCallback=s,r.prototype._execute=a,rt=f,at.cancellation=!0}"monitoring"in t&&(t.monitoring&&!at.monitoring?(at.monitoring=!0,r.prototype._fireEvent=et):!t.monitoring&&at.monitoring&&(at.monitoring=!1,r.prototype._fireEvent=o))},r.prototype._fireEvent=o,r.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},r.prototype._onCancel=function(){},r.prototype._setOnCancel=function(t){},r.prototype._attachCancellationCallback=function(t){},r.prototype._captureStackTrace=function(){},r.prototype._attachExtraTrace=function(){},r.prototype._clearCancellationData=function(){},r.prototype._propagateFrom=function(t,e){};var rt=p,nt=function(){return!1},it=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;D.inherits(k,Error),n.CapturedTrace=k,k.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],r={},n=0,i=this;void 0!==i;++n)e.push(i),i=i._parent;t=this._length=n;for(var n=t-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(var n=0;n<t;++n){var a=e[n].stack,s=r[a];if(void 0!==s&&s!==n){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var u=n>0?e[n-1]:this;s<t-1?(u._parent=e[s+1],u._parent.uncycle(),u._length=u._parent._length+1):(u._parent=void 0,u._length=1);for(var c=u._length+1,l=n-2;l>=0;--l)e[l]._length=c,c++;return}}}},k.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=j(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(E(i.stack.split("\n"))),i=i._parent;w(n),_(n),D.notEnumerableProp(t,"stack",m(r,n)),D.notEnumerableProp(t,"__stackCleaned__",!0)}};var ot=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():C(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,H=t,V=e;var r=Error.captureStackTrace;return nt=function(t){return W.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n=new Error;if("string"==typeof n.stack&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0)return H=/@/,V=e,$=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(t){i="stack"in t}return"stack"in n||!i||"number"!=typeof Error.stackTraceLimit?(V=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?C(e):e.toString()},null):(H=t,V=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(N=function(t){console.warn(t)},D.isNode&&e.stderr.isTTY?N=function(t,e){var r=e?"[33m":"[31m";console.warn(r+t+"[0m\n")}:D.isNode||"string"!=typeof(new Error).stack||(N=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:Y,longStackTraces:!1,cancellation:!1,monitoring:!1};return X&&r.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return h},checkForgottenReturns:v,setBounds:A,warn:b,deprecated:g,CapturedTrace:k,fireDomEvent:Z,fireGlobalEvent:K}}},{"./errors":12,"./util":36}],10:[function(t,e,r){"use strict";e.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(r){return r instanceof t&&r.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:r},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(r,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:t},void 0);var e=arguments[1],n=function(){throw e};return this.caught(t,n)},t.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof t&&r.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:r},void 0);var n=arguments[1];n instanceof t&&n.suppressUnhandledRejections();var i=function(){return n};return this.caught(r,i)}}},{}],11:[function(t,e,r){"use strict";e.exports=function(t,e){function r(){return o(this)}function n(t,r){return i(t,r,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(r,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,n){return i(t,n,e,0)._then(r,void 0,void 0,t,void 0)},t.mapSeries=n}},{}],12:[function(t,e,r){"use strict";function n(t,e){function r(n){return this instanceof r?(f(this,"message","string"==typeof n?n:e),f(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new r(n)}return l(r,Error),r}function i(t){return this instanceof i?(f(this,"name","OperationalError"),f(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(f(this,"message",t.message),f(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,a,s=t("./es5"),u=s.freeze,c=t("./util"),l=c.inherits,f=c.notEnumerableProp,p=n("Warning","warning"),h=n("CancellationError","cancellation error"),d=n("TimeoutError","timeout error"),y=n("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(t){o=n("TypeError","type error"),a=n("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g<v.length;++g)"function"==typeof Array.prototype[v[g]]&&(y.prototype[v[g]]=Array.prototype[v[g]]);s.defineProperty(y.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),y.prototype.isOperational=!0;var b=0;y.prototype.toString=function(){var t=Array(4*b+1).join(" "),e="\n"+t+"AggregateError of:\n";b++,t=Array(4*b+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];n=i.join("\n"),e+=n+"\n"}return b--,e},l(i,Error);var m=Error.__BluebirdErrorTypes__;m||(m=u({CancellationError:h,TimeoutError:d,OperationalError:i,RejectionError:i,AggregateError:y}),s.defineProperty(Error,"__BluebirdErrorTypes__",{value:m,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:a,CancellationError:m.CancellationError,OperationalError:m.OperationalError,TimeoutError:m.TimeoutError,AggregateError:m.AggregateError,Warning:p}},{"./es5":13,"./util":36}],13:[function(t,e,r){var n=function(){"use strict";return void 0===this}();if(n)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!(r&&!r.writable&&!r.set)}};else{var i={}.hasOwnProperty,o={}.toString,a={}.constructor.prototype,s=function(t){var e=[];for(var r in t)i.call(t,r)&&e.push(r);return e},u=function(t,e){return{value:t[e]}},c=function(t,e,r){return t[e]=r.value,t},l=function(t){return t},f=function(t){try{return Object(t).constructor.prototype}catch(t){return a}},p=function(t){try{return"[object Array]"===o.call(t)}catch(t){return!1}};e.exports={isArray:p,keys:s,names:s,defineProperty:c,getDescriptor:u,freeze:l,getPrototypeOf:f,isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)},t.filter=function(t,n,i){return r(t,n,i,e)}}},{}],15:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function i(t){this.finallyHandler=t}function o(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function a(){return u.call(this,this.promise._target()._settledValue())}function s(t){if(!o(this,t))return f.e=t,f}function u(t){var n=this.promise,u=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?u.call(n._boundValue()):u.call(n._boundValue(),t);if(void 0!==c){n._setReturnedNonUndefined();var p=r(c,n);if(p instanceof e){if(null!=this.cancelPromise){if(p._isCancelled()){var h=new l("late cancellation observer");return n._attachExtraTrace(h),f.e=h,f}p.isPending()&&p._attachCancellationCallback(new i(this))}return p._then(a,s,void 0,this,void 0)}}}return n.isRejected()?(o(this),f.e=t,f):(o(this),t)}var c=t("./util"),l=e.CancellationError,f=c.errorObj;return n.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,r,i){return"function"!=typeof t?this.then():this._then(r,i,void 0,new n(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,u,u)},e.prototype.tap=function(t){return this._passThrough(t,1,u)},n}},{"./util":36}],16:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function s(t,r,n){for(var o=0;o<r.length;++o){n._pushContext();var a=h(r[o])(t);if(n._popContext(),a===p){n._pushContext();var s=e.reject(p.e);return n._popContext(),s}var u=i(a,n);if(u instanceof e)return u}return null}function u(t,r,i,o){if(a.cancellation()){var s=new e(n),u=this._finallyPromise=new e(n);this._promise=s.lastly(function(){return u}),s._captureStackTrace(),s._setOnCancel(this)}else{var c=this._promise=new e(n);c._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(d):d,this._yieldedPromise=null,this._cancellationPhase=!1}var c=t("./errors"),l=c.TypeError,f=t("./util"),p=f.errorObj,h=f.tryCatch,d=[];f.inherits(u,o),u.prototype._isResolved=function(){return null===this._promise},u.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},u.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,r="undefined"!=typeof this._generator.return;if(r)this._promise._pushContext(),t=h(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var n=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=n,this._promise._attachExtraTrace(n),this._promise._pushContext(),t=h(this._generator.throw).call(this._generator,n),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},u.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=h(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=h(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},u.prototype.promise=function(){return this._promise},u.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},u.prototype._continue=function(t){var r=this._promise;if(t===p)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(t.e,!1);var n=t.value;if(t.done===!0)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(!(o instanceof e)&&(o=s(o,this._yieldHandlers,this._promise),null===o))return void this._promiseRejected(new l("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",n)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var a=o._bitField;0===(50397184&a)?(this._yieldedPromise=o,o._proxy(this,null)):0!==(33554432&a)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!==(16777216&a)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new l("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(e).yieldHandler,n=u,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new n(void 0,void 0,r,i),a=o.promise();return o._generator=e,o._promiseFulfilled(void 0),a}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new l("expecting a function but got "+f.classString(t));d.push(t)},e.spawn=function(t){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return r("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new u(t,this),i=n.promise();return n._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var n}var i=[].slice.call(arguments);t&&i.pop();var n=new r(i).promise();return void 0!==t?n.spread(t):n}}},{"./util":36}],18:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function s(t,e,r,n){this.constructor$(t),this._promise._captureStackTrace();var i=c();this._callback=null===i?e:l.domainBind(i,e),this._preservedValues=n===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],h.invoke(this._asyncInit,this,void 0)}function u(t,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+l.classString(r));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+l.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+l.classString(i.concurrency)));a=i.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new s(t,r,a,o).promise()}var c=e._getDomain,l=t("./util"),f=l.tryCatch,p=l.errorObj,h=e._async;l.inherits(s,r),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(t,r){var n=this._values,o=this.length(),s=this._preservedValues,u=this._limit;if(r<0){if(r=r*-1-1,n[r]=t,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return n[r]=t,this._queue.push(r),!1;null!==s&&(s[r]=t);var c=this._promise,l=this._callback,h=c._boundValue();c._pushContext();var d=f(l).call(h,t,r,o),y=c._popContext();if(a.checkForgottenReturns(d,y,null!==s?"Promise.filter":"Promise.map",c),d===p)return this._reject(d.e),!0;var v=i(d,this._promise);if(v instanceof e){v=v._target();var g=v._bitField;if(0===(50397184&g))return u>=1&&this._inFlight++,n[r]=v,v._proxy(this,(r+1)*-1),!1;if(0===(33554432&g))return 0!==(16777216&g)?(this._reject(v._reason()),!0):(this._cancel(),!0);d=v._value()}n[r]=d}var b=++this._totalResolved;return b>=o&&(null!==s?this._filter(n,s):this._resolve(n),!0)},s.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var n=t.pop();this._promiseFulfilled(r[n],n)}},s.prototype._filter=function(t,e){for(var r=e.length,n=new Array(r),i=0,o=0;o<r;++o)t[o]&&(n[i++]=e[o]);n.length=i,this._resolve(n)},s.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return u(this,t,e,null)},e.map=function(t,e,r,n){return u(t,e,r,n)}}},{"./util":36}],19:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var n=new e(r);n._captureStackTrace(),n._pushContext();var i=s(t).apply(this,arguments),a=n._popContext();return o.checkForgottenReturns(i,a,"Promise.method",n),n._resolveFromSyncValue(i),n}},e.attempt=e.try=function(t){if("function"!=typeof t)return i("expecting a function but got "+a.classString(t));var n=new e(r);n._captureStackTrace(),n._pushContext();var u;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];u=a.isArray(c)?s(t).apply(l,c):s(t).call(l,c)}else u=s(t)();var f=n._popContext();return o.checkForgottenReturns(u,f,"Promise.try",n),n._resolveFromSyncValue(u),n},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,r){"use strict";function n(t){return t instanceof Error&&l.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(n(t)){e=new c(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var r=l.keys(t),i=0;i<r.length;++i){var o=r[i];f.test(o)||(e[o]=t[o])}return e}return a.markAsOriginatingFromRejection(t),t}function o(t,e){return function(r,n){if(null!==t){if(r){var o=i(s(r));t._attachExtraTrace(o),t._reject(o)}else if(e){var a=[].slice.call(arguments,1);t._fulfill(a)}else t._fulfill(n);t=null}}}var a=t("./util"),s=a.maybeWrapAsError,u=t("./errors"),c=u.OperationalError,l=t("./es5"),f=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,r){"use strict";e.exports=function(e){function r(t,e){var r=this;if(!o.isArray(t))return n.call(r,t,e);var i=s(e).apply(r._boundValue(),[null].concat(t));i===u&&a.throwLater(i.e)}function n(t,e){var r=this,n=r._boundValue(),i=void 0===t?s(e).call(n,null):s(e).call(n,null,t);i===u&&a.throwLater(i.e)}function i(t,e){var r=this;if(!t){var n=new Error(t+"");n.cause=t,t=n}var i=s(e).call(r._boundValue(),t);i===u&&a.throwLater(i.e)}var o=t("./util"),a=e._async,s=o.tryCatch,u=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=n;void 0!==e&&Object(e).spread&&(o=r),this._then(o,i,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,r,n){"use strict";r.exports=function(){function n(){}function i(t,e){if("function"!=typeof e)throw new m("expecting a function but got "+d.classString(e));if(t.constructor!==o)throw new m("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function o(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==w&&(i(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function a(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function u(t){var e=new o(w);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new m("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},f=function(){return new o.PromiseInspection(this._target()); -},p=function(t){return o.reject(new m(t))},h={},d=t("./util");c=d.isNode?function(){var t=e.domain;return void 0===t&&(t=null),t}:function(){return null},d.notEnumerableProp(o,"_getDomain",c);var y=t("./es5"),v=t("./async"),g=new v;y.defineProperty(o,"_async",{value:g});var b=t("./errors"),m=o.TypeError=b.TypeError;o.RangeError=b.RangeError;var _=o.CancellationError=b.CancellationError;o.TimeoutError=b.TimeoutError,o.OperationalError=b.OperationalError,o.RejectionError=b.OperationalError,o.AggregateError=b.AggregateError;var w=function(){},E={},O={},j=t("./thenables")(o,w),S=t("./promise_array")(o,w,j,p,n),T=t("./context")(o),C=T.create,x=t("./debuggability")(o,T),P=(x.CapturedTrace,t("./finally")(o,j)),R=t("./catch_filter")(O),A=t("./nodeback"),k=d.errorObj,I=d.tryCatch;return o.prototype.toString=function(){return"[object Promise]"},o.prototype.caught=o.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),i=0;for(r=0;r<e-1;++r){var o=arguments[r];if(!d.isObject(o))return p("expecting an object but got A catch statement predicate "+d.classString(o));n[i++]=o}return n.length=i,t=arguments[r],this.then(void 0,R(n,t,this))}return this.then(void 0,t)},o.prototype.reflect=function(){return this._then(f,f,void 0,this,void 0)},o.prototype.then=function(t,e){if(x.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+d.classString(t);arguments.length>1&&(r+=", "+d.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},o.prototype.done=function(t,e){var r=this._then(t,e,void 0,void 0,void 0);r._setIsFinal()},o.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+d.classString(t)):this.all()._then(t,void 0,void 0,E,void 0)},o.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new S(this).promise()},o.prototype.error=function(t){return this.caught(d.originatesFromRejection,t)},o.getNewLibraryCopy=r.exports,o.is=function(t){return t instanceof o},o.fromNode=o.fromCallback=function(t){var e=new o(w);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=I(t)(A(e,r));return n===k&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},o.all=function(t){return new S(t).promise()},o.cast=function(t){var e=j(t);return e instanceof o||(e=new o(w),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(t){var e=new o(w);return e._captureStackTrace(),e._rejectCallback(t,!0),e},o.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+d.classString(t));return g.setScheduler(t)},o.prototype._then=function(t,e,r,n,i){var a=void 0!==i,s=a?i:new o(w),u=this._target(),l=u._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!==(2097152&this._bitField)&&(n=0!==(50397184&l)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=c();if(0!==(50397184&l)){var p,h,y=u._settlePromiseCtx;0!==(33554432&l)?(h=u._rejectionHandler0,p=t):0!==(16777216&l)?(h=u._fulfillmentHandler0,p=e,u._unsetRejectionIsUnhandled()):(y=u._settlePromiseLateCancellationObserver,h=new _("late cancellation observer"),u._attachExtraTrace(h),p=e),g.invoke(y,u,{handler:null===f?p:"function"==typeof p&&d.domainBind(f,p),promise:s,receiver:n,value:h})}else u._addCallbacks(t,e,s,n,f);return s},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},o.prototype._setLength=function(t){this._bitField=this._bitField&-65536|65535&t},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){g.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==h)return void 0===e&&this._isBound()?this._boundValue():e},o.prototype._promiseAt=function(t){return this[4*t-4+2]},o.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},o.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,r,n,i,null)},o.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(r,n,i,o,null)},o.prototype._addCallbacks=function(t,e,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:d.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:d.domainBind(i,e));else{var a=4*o-4;this[a+2]=r,this[a+3]=n,"function"==typeof t&&(this[a+0]=null===i?t:d.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:d.domainBind(i,e))}return this._setLength(o+1),o},o.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},o.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var r=j(t,this);if(!(r instanceof o))return this._fulfill(t);e&&this._propagateFrom(r,2);var n=r._target();if(n===this)return void this._reject(l());var i=n._bitField;if(0===(50397184&i)){var a=this._length();a>0&&n._migrateCallback0(this);for(var s=1;s<a;++s)n._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!==(33554432&i))this._fulfill(n._value());else if(0!==(16777216&i))this._reject(n._reason());else{var u=new _("late cancellation observer");n._attachExtraTrace(u),this._reject(u)}}},o.prototype._rejectCallback=function(t,e,r){var n=d.ensureErrorObject(t),i=n===t;if(!i&&!r&&x.warnings()){var o="a promise was rejected with a non-error: "+d.classString(t);this._warn(o,!0)}this._attachExtraTrace(n,!!e&&i),this._reject(t)},o.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,r)});r=!1,this._popContext(),void 0!==n&&e._rejectCallback(n,!0)},o.prototype._settlePromiseFromHandler=function(t,e,r,n){var i=n._bitField;if(0===(65536&i)){n._pushContext();var o;e===E?r&&"number"==typeof r.length?o=I(t).apply(this._boundValue(),r):(o=k,o.e=new m("cannot .spread() a non-array: "+d.classString(r))):o=I(t).call(e,r);var a=n._popContext();i=n._bitField,0===(65536&i)&&(o===O?n._reject(r):o===k?n._rejectCallback(o.e,!1):(x.checkForgottenReturns(o,a,"",n,this),n._resolveCallback(o)))}},o.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},o.prototype._followee=function(){return this._rejectionHandler0},o.prototype._setFollowee=function(t){this._rejectionHandler0=t},o.prototype._settlePromise=function(t,e,r,i){var a=t instanceof o,s=this._bitField,u=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof P&&r.isFinallyHandler()?(r.cancelPromise=t,I(e).call(r,i)===k&&t._reject(k.e)):e===f?t._fulfill(f.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof S?t._cancel():r.cancel()):"function"==typeof e?a?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,i,t)):e.call(r,i,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(i,t):r._promiseRejected(i,t)):a&&(u&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(i):t._reject(i))},o.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,i=t.value;"function"==typeof e?r instanceof o?this._settlePromiseFromHandler(e,n,i,r):e.call(n,i,r):r instanceof o&&r._reject(i)},o.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},o.prototype._settlePromise0=function(t,e,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,t,i,e)},o.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},o.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var r=l();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():g.settlePromises(this))}},o.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?g.fatalError(t,d.isNode):void((65535&e)>0?g.settlePromises(this):this._ensurePossibleRejectionHandled())},o.prototype._fulfillPromises=function(t,e){for(var r=1;r<t;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},o.prototype._rejectPromises=function(t,e){for(var r=1;r<t;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},o.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t),this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){x.deprecated("Promise.defer","new Promise");var t=new o(w);return{promise:t,resolve:a,reject:s}},d.notEnumerableProp(o,"_makeSelfResolutionError",l),t("./method")(o,w,j,p,x),t("./bind")(o,w,j,x),t("./cancel")(o,S,p,x),t("./direct_resolve")(o),t("./synchronous_inspection")(o),t("./join")(o,S,j,w,g,c),o.Promise=o,o.version="3.4.6",t("./map.js")(o,S,p,j,w,x),t("./call_get.js")(o),t("./using.js")(o,p,j,C,w,x),t("./timers.js")(o,w,x),t("./generators.js")(o,p,w,j,n,x),t("./nodeify.js")(o),t("./promisify.js")(o,w),t("./props.js")(o,S,j,p),t("./race.js")(o,w,j,p),t("./reduce.js")(o,S,p,j,w,x),t("./settle.js")(o,S,x),t("./some.js")(o,S,p),t("./filter.js")(o,w),t("./each.js")(o,w),t("./any.js")(o),d.toFastProperties(o),d.toFastProperties(o.prototype),u({a:1}),u({b:2}),u({c:3}),u(1),u(function(){}),u(void 0),u(!1),u(new o(w)),x.setBounds(v.firstLineError,d.lastLineError),o}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o){function a(t){switch(t){case-2:return[];case-3:return{}}}function s(t){var n=this._promise=new e(r);t instanceof e&&n._propagateFrom(t,3),n._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=t("./util");u.isArray;return u.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function t(r,o){var s=n(this._values,this._promise);if(s instanceof e){s=s._target();var c=s._bitField;if(this._values=s,0===(50397184&c))return this._promise._setAsyncGuaranteed(),s._then(t,this._reject,void 0,this,o);if(0===(33554432&c))return 0!==(16777216&c)?this._reject(s._reason()):this._cancel();s=s._value()}if(s=u.asArray(s),null===s){var l=i("expecting an array or an iterable object but got "+u.classString(s)).reason();return void this._promise._rejectCallback(l,!1)}return 0===s.length?void(o===-5?this._resolveEmptyArray():this._resolve(a(o))):void this._iterate(s)},s.prototype._iterate=function(t){var r=this.getActualLength(t.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,a=null,s=0;s<r;++s){var u=n(t[s],i);u instanceof e?(u=u._target(),a=u._bitField):a=null,o?null!==a&&u.suppressUnhandledRejections():null!==a?0===(50397184&a)?(u._proxy(this,s),this._values[s]=u):o=0!==(33554432&a)?this._promiseFulfilled(u._value(),s):0!==(16777216&a)?this._promiseRejected(u._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(u,s)}o||i._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;return r>=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var r=0;r<t.length;++r)t[r]instanceof e&&t[r].cancel()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},{"./util":36}],24:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t){return!E.test(t)}function i(t){try{return t.__isPromisified__===!0}catch(t){return!1}}function o(t,e,r){var n=h.getDataPropertyOrDefault(t,e+r,_);return!!n&&i(n)}function a(t,e,r){for(var n=0;n<t.length;n+=2){var i=t[n];if(r.test(i))for(var o=i.replace(r,""),a=0;a<t.length;a+=2)if(t[a]===o)throw new b("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function s(t,e,r,n){for(var s=h.inheritedDataKeys(t),u=[],c=0;c<s.length;++c){var l=s[c],f=t[l],p=n===O||O(l,f,t);"function"!=typeof f||i(f)||o(t,l,e)||!n(l,f,t,p)||u.push(l,f)}return a(u,e,r),u}function u(t,n,i,o,a,s){function u(){var i=n;n===p&&(i=this);var o=new e(r);o._captureStackTrace();var a="string"==typeof l&&this!==c?this[l]:t,u=d(o,s);try{a.apply(i,y(arguments,u))}catch(t){o._rejectCallback(v(t),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var c=function(){return this}(),l=t;return"string"==typeof l&&(t=o),h.notEnumerableProp(u,"__isPromisified__",!0),u}function c(t,e,r,n,i){for(var o=new RegExp(j(e)+"$"),a=s(t,e,o,r),u=0,c=a.length;u<c;u+=2){var l=a[u],f=a[u+1],d=l+e;if(n===S)t[d]=S(l,p,l,f,e,i);else{var y=n(f,function(){return S(l,p,l,f,e,i)});h.notEnumerableProp(y,"__isPromisified__",!0),t[d]=y}}return h.toFastProperties(t),t}function l(t,e,r){return S(t,e,void 0,t,null,r)}var f,p={},h=t("./util"),d=t("./nodeback"),y=h.withAppended,v=h.maybeWrapAsError,g=h.canEvaluate,b=t("./errors").TypeError,m="Async",_={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],E=new RegExp("^(?:"+w.join("|")+")$"),O=function(t){return h.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},j=function(t){return t.replace(/([$])/,"\\$")},S=g?f:u;e.promisify=function(t,e){if("function"!=typeof t)throw new b("expecting a function but got "+h.classString(t));if(i(t))return t;e=Object(e);var r=void 0===e.context?p:e.context,o=!!e.multiArgs,a=l(t,r,o);return h.copyDescriptors(t,a,n),a},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new b("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var r=!!e.multiArgs,n=e.suffix;"string"!=typeof n&&(n=m);var i=e.filter;"function"!=typeof i&&(i=O);var o=e.promisifier;if("function"!=typeof o&&(o=S),!h.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=h.inheritedDataKeys(t),s=0;s<a.length;++s){var u=t[a[s]];"constructor"!==a[s]&&h.isClass(u)&&(c(u.prototype,n,i,o,r),c(u,n,i,o,r))}return c(t,n,i,o,r)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){function o(t){var e,r=!1;if(void 0!==s&&t instanceof s)e=f(t),r=!0;else{var n=l.keys(t),i=n.length;e=new Array(2*i);for(var o=0;o<i;++o){var a=n[o];e[o]=t[a],e[o+i]=a}}this.constructor$(e),this._isMap=r,this._init$(void 0,-3)}function a(t){var r,a=n(t);return c(a)?(r=a instanceof e?a._then(e.props,void 0,void 0,void 0,void 0):new o(a).promise(),a instanceof e&&r._propagateFrom(a,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var s,u=t("./util"),c=u.isObject,l=t("./es5");"function"==typeof Map&&(s=Map);var f=function(){function t(t,n){this[e]=t,this[e+r]=n,e++}var e=0,r=0;return function(n){r=n.size,e=0;var i=new Array(2*n.size);return n.forEach(t,i),i}}(),p=function(t){for(var e=new s,r=t.length/2|0,n=0;n<r;++n){var i=t[r+n],o=t[n];e.set(i,o)}return e};u.inherits(o,r),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;if(r>=this._length){var n;if(this._isMap)n=p(this._values);else{n={};for(var i=this.length(),o=0,a=this.length();o<a;++o)n[this._values[o+i]]=this._values[o]}return this._resolve(n),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return a(this)},e.props=function(t){return a(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,r){"use strict";function n(t,e,r,n,i){for(var o=0;o<i;++o)r[o+n]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var r=this._front+e&this._capacity-1;this[r]=t,this._length=e+1},i.prototype._unshiftOne=function(t){var e=this._capacity;this._checkCapacity(this.length()+1);var r=this._front,n=(r-1&e-1^e)-e;this[n]=t,this._front=n,this._length=this.length()+1},i.prototype.unshift=function(t,e,r){this._unshiftOne(r),this._unshiftOne(e),this._unshiftOne(t)},i.prototype.push=function(t,e,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(t),this._pushOne(e),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=r,this._length=n},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var r=this._front,i=this._length,o=r+i&e-1;n(this,0,this,e,o)},e.exports=i},{}],27:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){function o(t,o){var u=n(t);if(u instanceof e)return s(u);if(t=a.asArray(t),null===t)return i("expecting an array or an iterable object but got "+a.classString(t));var c=new e(r);void 0!==o&&c._propagateFrom(o,3);for(var l=c._fulfill,f=c._reject,p=0,h=t.length;p<h;++p){var d=t[p];(void 0!==d||p in t)&&e.cast(d)._then(l,f,void 0,c,null)}return c}var a=t("./util"),s=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function s(t,r,n,i){this.constructor$(t);var a=p();this._fn=null===a?r:h.domainBind(a,r),void 0!==n&&(n=e.resolve(n),n._attachCancellationCallback(this)),this._initialValue=n,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function u(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function c(t,e,r,i){if("function"!=typeof e)return n("expecting a function but got "+h.classString(e));var o=new s(t,e,r,i);return o.promise()}function l(t){this.accum=t,this.array._gotAccum(t);var r=i(this.value,this.array._promise);return r instanceof e?(this.array._currentCancellable=r,r._then(f,void 0,void 0,this,void 0)):f.call(this,r)}function f(t){var r=this.array,n=r._promise,i=d(r._fn);n._pushContext();var o;o=void 0!==r._eachValues?i.call(n._boundValue(),t,this.index,this.length):i.call(n._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(r._currentCancellable=o);var s=n._popContext();return a.checkForgottenReturns(o,s,void 0!==r._eachValues?"Promise.each":"Promise.reduce",n),o}var p=e._getDomain,h=t("./util"),d=h.tryCatch;h.inherits(s,r),s.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},s.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},s.prototype._init=function(){},s.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},s.prototype.shouldCopyValues=function(){return!1},s.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},s.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},s.prototype._iterate=function(t){this._values=t;var r,n,i=t.length;if(void 0!==this._initialValue?(r=this._initialValue,n=0):(r=e.resolve(t[0]),n=1),this._currentCancellable=r,!r.isRejected())for(;n<i;++n){var o={accum:null,value:t[n],index:n,length:i,array:this};r=r._then(l,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(u,u,void 0,r,this)},e.prototype.reduce=function(t,e){return c(this,t,e,null)},e.reduce=function(t,e,r,n){return c(t,e,r,n)}}},{"./util":36}],29:[function(t,i,o){"use strict";var a,s=t("./util"),u=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},c=s.getNativePromise();if(s.isNode&&"undefined"==typeof MutationObserver){var l=r.setImmediate,f=e.nextTick;a=s.isRecentNode?function(t){l.call(r,t)}:function(t){f.call(e,t)}}else if("function"==typeof c&&"function"==typeof c.resolve){var p=c.resolve();a=function(t){p.then(t)}}else a="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof n?function(t){n(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:u:function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),r=!1});i.observe(n,e);var o=function(){r||(r=!0,n.classList.toggle("foo"))};return function(r){var n=new MutationObserver(function(){n.disconnect(),r()});n.observe(t,e),o()}}();i.exports=a},{"./util":36}],30:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.constructor$(t)}var o=e.PromiseInspection,a=t("./util");a.inherits(i,r),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var r=++this._totalResolved;return r>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var r=new o;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},i.prototype._promiseRejected=function(t,e){var r=new o;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},e.settle=function(t){return n.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||e<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new i(t),o=r.promise();return r.setHowMany(e),r.init(),o}var a=t("./util"),s=t("./errors").RangeError,u=t("./errors").AggregateError,c=a.isArray,l={};a.inherits(i,r),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new u,e=this.length();e<this._values.length;++e)this._values[e]!==l&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new s(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,r){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t,n){if(l(t)){if(t instanceof e)return t;var i=o(t);if(i===c){n&&n._pushContext();var u=e.reject(i.e);return n&&n._popContext(),u}if("function"==typeof i){if(a(t)){var u=new e(r);return t._then(u._fulfill,u._reject,void 0,u,null),u}return s(t,i,n)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(t){return c.e=t,c}}function a(t){try{return f.call(t,"_promise0")}catch(t){return!1}}function s(t,n,i){function o(t){s&&(s._resolveCallback(t),s=null)}function a(t){s&&(s._rejectCallback(t,f,!0),s=null)}var s=new e(r),l=s;i&&i._pushContext(),s._captureStackTrace(),i&&i._popContext();var f=!0,p=u.tryCatch(n).call(t,o,a);return f=!1,s&&p===c&&(s._rejectCallback(p.e,!0,!0),s=null),l}var u=t("./util"),c=u.errorObj,l=u.isObject,f={}.hasOwnProperty;return n}},{"./util":36}],34:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function a(t){throw clearTimeout(this.handle),t}var s=t("./util"),u=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(t){return l(+this).thenReturn(t)},l=e.delay=function(t,o){var a,s;return void 0!==o?(a=e.resolve(o)._then(c,null,null,t,void 0),n.cancellation()&&o instanceof e&&a._setOnCancel(o)):(a=new e(r),s=setTimeout(function(){a._fulfill()},+t),n.cancellation()&&a._setOnCancel(new i(s)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};e.prototype.delay=function(t){return l(t,this)};var f=function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new u("operation timed out"):new u(e),s.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()};e.prototype.timeout=function(t,e){t=+t;var r,s,u=new i(setTimeout(function(){r.isPending()&&f(r,e,s)},t));return n.cancellation()?(s=this.then(),r=s._then(o,a,void 0,u,void 0),r._setOnCancel(u)):r=this._then(o,a,void 0,u,void 0),r}}},{"./util":36}],35:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function s(t){setTimeout(function(){throw t},0)}function u(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function c(t,r){function i(){if(a>=c)return l._fulfill();var o=u(t[a++]);if(o instanceof e&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),t.promise); -}catch(t){return s(t)}if(o instanceof e)return o._then(i,s,null,null,null)}i()}var a=0,c=t.length,l=new e(o);return i(),l}function l(t,e,r){this._data=t,this._promise=e,this._context=r}function f(t,e,r){this.constructor$(t,e,r)}function p(t){return l.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function h(t){this.length=t,this.promise=null,this[t-1]=null}var d=t("./util"),y=t("./errors").TypeError,v=t("./util").inherits,g=d.errorObj,b=d.tryCatch,m={};l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():m},l.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==m?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},l.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(f,l),f.prototype.doDispose=function(t,e){var r=this.data();return r.call(t,t,e)},h.prototype._resultCancelled=function(){for(var t=this.length,r=0;r<t;++r){var n=this[r];n instanceof e&&n.cancel()}},e.using=function(){var t=arguments.length;if(t<2)return r("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return r("expecting a function but got "+d.classString(i));var o,s=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,s=!1):(o=arguments,t--);for(var u=new h(t),f=0;f<t;++f){var y=o[f];if(l.isDisposer(y)){var v=y;y=y.promise(),y._setDisposable(v)}else{var m=n(y);m instanceof e&&(y=m._then(p,null,null,{resources:u,index:f},void 0))}u[f]=y}for(var _=new Array(u.length),f=0;f<_.length;++f)_[f]=e.resolve(u[f]).reflect();var w=e.all(_).then(function(t){for(var e=0;e<t.length;++e){var r=t[e];if(r.isRejected())return g.e=r.error(),g;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}E._pushContext(),i=b(i);var n=s?i.apply(void 0,t):i(t),o=E._popContext();return a.checkForgottenReturns(n,o,"Promise.using",E),n}),E=w.lastly(function(){var t=new e.PromiseInspection(w);return c(u,t)});return u.promise=E,E._setOnCancel(u),E},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new f(t,this,i());throw new y}}},{"./errors":12,"./util":36}],36:[function(t,n,i){"use strict";function o(){try{var t=A;return A=null,t.apply(this,arguments)}catch(t){return R.e=t,R}}function a(t){return A=t,o}function s(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function u(t){return"function"==typeof t||"object"==typeof t&&null!==t}function c(t){return s(t)?new Error(b(t)):t}function l(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;r<n;++r)i[r]=t[r];return i[r]=e,i}function f(t,e,r){if(!x.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function p(t,e,r){if(s(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return x.defineProperty(t,e,n),t}function h(t){throw t}function d(t){try{if("function"==typeof t){var e=x.names(t.prototype),r=x.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=N.test(t+"")&&x.names(t).length>0;if(r||n||i)return!0}return!1}catch(t){return!1}}function y(t){function e(){}e.prototype=t;for(var r=8;r--;)new e;return t}function v(t){return F.test(t)}function g(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=e+i+r;return n}function b(t){try{return t+""}catch(t){return"[no string representation]"}}function m(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function _(t){try{p(t,"isOperational",!0)}catch(t){}}function w(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0)}function E(t){return m(t)&&x.propertyIsWritable(t,"stack")}function O(t){return{}.toString.call(t)}function j(t,e,r){for(var n=x.names(t),i=0;i<n.length;++i){var o=n[i];if(r(o))try{x.defineProperty(e,o,x.getDescriptor(t,o))}catch(t){}}}function S(t,r){return U?e.env[t]:r}function T(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}function C(t,e){return t.bind(e)}var x=t("./es5"),P="undefined"==typeof navigator,R={e:{}},A,k="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof r?r:void 0!==this?this:null,I=function(t,e){function r(){this.constructor=t,this.constructor$=e;for(var r in e.prototype)n.call(e.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=e.prototype[r])}var n={}.hasOwnProperty;return r.prototype=e.prototype,t.prototype=new r,t.prototype},M=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1};if(x.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var n=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=r(t)}catch(t){return n}for(var a=0;a<o.length;++a){var s=o[a];if(!i[s]){i[s]=!0;var u=Object.getOwnPropertyDescriptor(t,s);null!=u&&null==u.get&&null==u.set&&n.push(s)}}t=x.getPrototypeOf(t)}return n}}var n={}.hasOwnProperty;return function(r){if(e(r))return[];var i=[];t:for(var o in r)if(n.call(r,o))i.push(o);else{for(var a=0;a<t.length;++a)if(n.call(t[a],o))continue t;i.push(o)}return i}}(),N=/this\s*\.\s*\S+\s*=/,F=/^[a-z$_][a-z$_0-9]*$/i,B=function(){return"stack"in new Error?function(t){return E(t)?t:new Error(b(t))}:function(t){if(E(t))return t;try{throw new Error(b(t))}catch(t){return t}}}(),L=function(t){return x.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var D="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,r=[],n=t[Symbol.iterator]();!(e=n.next()).done;)r.push(e.value);return r};L=function(t){return x.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?D(t):null}}var U="undefined"!=typeof e&&"[object process]"===O(e).toLowerCase(),W={isClass:d,isIdentifier:v,inheritedDataKeys:M,getDataPropertyOrDefault:f,thrower:h,isArray:x.isArray,asArray:L,notEnumerableProp:p,isPrimitive:s,isObject:u,isError:m,canEvaluate:P,errorObj:R,tryCatch:a,inherits:I,withAppended:l,maybeWrapAsError:c,toFastProperties:y,filledRange:g,toString:b,canAttachTrace:E,ensureErrorObject:B,originatesFromRejection:w,markAsOriginatingFromRejection:_,classString:O,copyDescriptors:j,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:U,env:S,global:k,getNativePromise:T,domainBind:C};W.isRecentNode=W.isNode&&function(){var t=e.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),W.isNode&&W.toFastProperties(e);try{throw new Error}catch(t){W.lastLineError=t}n.exports=W},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(e,r(2),function(){return this}(),r(34).setImmediate)},function(t,e,r){(function(t,n){function i(t,e){this._id=t,this._clearFn=e}var o=r(2).nextTick,a=Function.prototype.apply,s=Array.prototype.slice,u={},c=0;e.setTimeout=function(){return new i(a.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(a.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,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))},e.setImmediate="function"==typeof t?t:function(t){var r=c++,n=!(arguments.length<2)&&s.call(arguments,1);return u[r]=!0,o(function(){u[r]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(r))}),r},e.clearImmediate="function"==typeof n?n:function(t){delete u[t]}}).call(e,r(34).setImmediate,r(34).clearImmediate)},function(t,e){t.exports=child_process},function(t,e){t.exports=fs},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<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(t){return i.exec(t).slice(1)};e.resolve=function(){for(var e="",i=!1,o=arguments.length-1;o>=-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 e=r(n(e.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+e||"."},e.normalize=function(t){var i=e.isAbsolute(t),o="/"===a(t,-1);return t=r(n(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&o&&(t+="/"),(i?"/":"")+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<t.length&&""===t[e];e++);for(var r=t.length-1;r>=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<a;u++)if(i[u]!==o[u]){s=u;break}for(var c=[],u=s;u<i.length;u++)c.push("..");return c=c.concat(o.slice(s)),c.join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){var e=o(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},e.basename=function(t,e){var r=o(t)[2];return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},e.extname=function(t){return o(t)[3]};var a="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(e,r(2))},function(t,e,r){(function(e){"use strict";t.exports={raw:function(t,e){t.emit("data",e)},readline:function(t,e){"undefined"!=typeof t&&null!==t||(t="\r"),"undefined"!=typeof e&&null!==e||(e="utf8");var r="";return function(n,i){r+=i.toString(e);var o=r.split(t);r=o.pop(),o.forEach(function(t){n.emit("data",t)})}},byteLength:function(t){var r=new e(0);return function(n,i){for(r=e.concat([r,i]);r.length>=t;){var o=r.slice(0,t);r=r.slice(t),n.emit("data",o)}}},byteDelimiter:function(t){"[object Array]"!==Object.prototype.toString.call(t)&&(t=[t]);var e=[],r=0;return function(n,i){for(var o=0;o<i.length;o++)e[e.length]=i[o],e[e.length-1]===t[r]&&r++,r===t.length&&(n.emit("data",e),e=[],r=0)}}}}).call(e,r(3).Buffer)},function(t,e,r){function n(){i.call(this)}t.exports=n;var i=r(11).EventEmitter,o=r(40);o(n,i),n.Readable=r(41),n.Writable=r(52),n.Duplex=r(53),n.Transform=r(54),n.PassThrough=r(55),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&c.pause&&c.pause()}function n(){c.readable&&c.resume&&c.resume()}function o(){l||(l=!0,t.end())}function a(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function s(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){c.removeListener("data",r),t.removeListener("drain",n),c.removeListener("end",o),c.removeListener("close",a),c.removeListener("error",s),t.removeListener("error",s),c.removeListener("end",u),c.removeListener("close",u),t.removeListener("close",u)}var c=this;c.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(c.on("end",o),c.on("close",a));var l=!1;return c.on("error",s),t.on("error",s),c.on("end",u),c.on("close",u),t.on("close",u),t.emit("pipe",c),t}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){(function(n){e=t.exports=r(42),e.Stream=r(39),e.Readable=e,e.Writable=r(48),e.Duplex=r(47),e.Transform=r(50),e.PassThrough=r(51),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(39))}).call(e,r(2))},function(t,e,r){(function(e){function n(t,e){var n=r(47);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],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.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(x||(x=r(49).StringDecoder),this.decoder=new x(t.encoding),this.encoding=t.encoding)}function i(t){r(47);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=c(e,r);if(o)t.emit("error",o);else if(C.isNullOrUndefined(r))e.reading=!1,e.ended||l(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&i){var s=new Error("stream.unshift() after end event");t.emit("error",s)}else!e.decoder||i||n||(r=e.decoder.write(r)),i||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&f(t)),h(t,e);else i||(e.reading=!1);return a(e)}function a(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function s(t){if(t>=R)t=R;else{t--;for(var e=1;e<32;e<<=1)t|=t>>e;t++}return t}function u(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||C.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:t<=0?0:(t>e.highWaterMark&&(e.highWaterMark=s(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function c(t,e){var r=null;return C.isBuffer(e)||C.isString(e)||C.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(t,e){if(e.decoder&&!e.ended){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,f(t)}function f(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(P("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){p(t)}):p(t))}function p(t){P("emit readable"),t.emit("readable"),b(t)}function h(t,r){r.readingMore||(r.readingMore=!0,e.nextTick(function(){d(t,r)}))}function d(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(P("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function y(t){return function(){var e=t._readableState;P("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&S.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function v(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){g(t,r)}))}function g(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(P("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function m(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,a=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(a)r=n.shift();else if(!t||t>=i)r=o?n.join(""):j.concat(n,i),n.length=0;else if(t<n[0].length){var s=n[0];r=s.slice(0,t),n[0]=s.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new j(t);for(var u=0,c=0,l=n.length;c<l&&u<t;c++){var s=n[0],f=Math.min(t-u,s.length);o?r+=s.slice(0,f):s.copy(r,u,0,f),f<s.length?n[0]=s.slice(f):n.shift(),u+=f}}return r}function _(t){var r=t._readableState;if(r.length>0)throw new Error("endReadable called on non-empty stream");r.endEmitted||(r.ended=!0,e.nextTick(function(){r.endEmitted||0!==r.length||(r.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function w(t,e){for(var r=0,n=t.length;r<n;r++)e(t[r],r)}function E(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}t.exports=i;var O=r(43),j=r(3).Buffer;i.ReadableState=n;var S=r(11).EventEmitter;S.listenerCount||(S.listenerCount=function(t,e){return t.listeners(e).length});var T=r(39),C=r(44);C.inherits=r(45);var x,P=r(46);P=P&&P.debuglog?P.debuglog("stream"):function(){},C.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return C.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new j(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return x||(x=r(49).StringDecoder),this._readableState.decoder=new x(t),this._readableState.encoding=t,this};var R=8388608;i.prototype.read=function(t){P("read",t);var e=this._readableState,r=t;if((!C.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return P("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?_(this):f(this),null;if(t=u(t,e),0===t&&e.ended)return 0===e.length&&_(this),null;var n=e.needReadable;P("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,P("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,P("reading or ended",n)),n&&(P("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=u(r,e));var i;return i=t>0?m(t,e):null,C.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),r!==t&&e.ended&&0===e.length&&_(this),C.isNull(i)||this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,r){function n(t){P("onunpipe"),t===f&&o()}function i(){P("onend"),t.end()}function o(){P("cleanup"),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("drain",v),t.removeListener("error",s),t.removeListener("unpipe",n),f.removeListener("end",i),f.removeListener("end",o),f.removeListener("data",a),!p.awaitDrain||t._writableState&&!t._writableState.needDrain||v()}function a(e){P("ondata");var r=t.write(e);!1===r&&(P("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,f.pause())}function s(e){P("onerror",e),l(),t.removeListener("error",s),0===S.listenerCount(t,"error")&&t.emit("error",e)}function u(){t.removeListener("finish",c),l()}function c(){P("onfinish"),t.removeListener("close",u),l()}function l(){P("unpipe"),f.unpipe(t)}var f=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=t;break;case 1:p.pipes=[p.pipes,t];break;default:p.pipes.push(t)}p.pipesCount+=1,P("pipe count=%d opts=%j",p.pipesCount,r);var h=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=h?i:o;p.endEmitted?e.nextTick(d):f.once("end",d),t.on("unpipe",n);var v=y(f);return t.on("drain",v),f.on("data",a),t._events&&t._events.error?O(t._events.error)?t._events.error.unshift(s):t._events.error=[s,t._events.error]:t.on("error",s),t.once("close",u),t.once("finish",c),t.emit("pipe",f),p.flowing||(P("pipe resume"),f.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}var i=E(e.pipes,t);return i===-1?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&f(this,i);else{var o=this;e.nextTick(function(){P("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(P("resume"),t.flowing=!0,t.reading||(P("resume read 0"),this.read(0)),v(this,t)),this},i.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(P("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(P("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)C.isFunction(t[i])&&C.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){P("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=m}).call(e,r(2))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t){function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===v(t)}function n(t){return"boolean"==typeof t}function i(t){return null===t}function o(t){return null==t}function a(t){return"number"==typeof t}function s(t){return"string"==typeof t}function u(t){return"symbol"==typeof t}function c(t){return void 0===t}function l(t){return"[object RegExp]"===v(t)}function f(t){return"object"==typeof t&&null!==t}function p(t){return"[object Date]"===v(t)}function h(t){return"[object Error]"===v(t)||t instanceof Error}function d(t){return"function"==typeof t}function y(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function v(t){return Object.prototype.toString.call(t)}e.isArray=r,e.isBoolean=n,e.isNull=i,e.isNullOrUndefined=o,e.isNumber=a,e.isString=s,e.isSymbol=u,e.isUndefined=c,e.isRegExp=l,e.isObject=f,e.isDate=p,e.isError=h,e.isFunction=d,e.isPrimitive=y,e.isBuffer=t.isBuffer}).call(e,r(3).Buffer)},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(u.call(this,t),c.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(t)}function i(){this.allowHalfOpen||this._writableState.ended||e.nextTick(this.end.bind(this))}function o(t,e){for(var r=0,n=t.length;r<n;r++)e(t[r],r)}t.exports=n;var a=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},s=r(44);s.inherits=r(45);var u=r(42),c=r(48);s.inherits(n,u),o(a(c.prototype),function(t){n.prototype[t]||(n.prototype[t]=c.prototype[t])})}).call(e,r(2))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(47);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){h(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(47);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void O.call(this)):new o(t)}function a(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function s(t,r,n,i){var o=!0;if(!(E.isBuffer(n)||E.isString(n)||E.isNullOrUndefined(n)||r.objectMode)){var a=new TypeError("Invalid non-string/buffer chunk");t.emit("error",a),e.nextTick(function(){i(a)}),o=!1}return o}function u(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&E.isString(e)&&(e=new w(e,r)),e}function c(t,e,r,i,o){r=u(e,r,i),E.isBuffer(r)&&(i="buffer");var a=e.objectMode?1:r.length;e.length+=a;var s=e.length<e.highWaterMark;return s||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):l(t,e,!1,a,r,i,o),s}function l(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 f(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function p(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function h(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(p(n),r)f(t,n,i,r,o);else{var a=g(t,n);a||n.corked||n.bufferProcessing||!n.buffer.length||v(t,n),i?e.nextTick(function(){d(t,n,a,o)}):d(t,n,a,o)}}function d(t,e,r,n){r||y(t,e),e.pendingcb--,n(),m(t,e)}function y(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function v(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,l(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,a=i.encoding,s=i.callback,u=e.objectMode?1:o.length;if(l(t,e,!1,u,o,a,s),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function g(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function m(t,e){var r=g(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function _(t,r,n){r.ending=!0,m(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(3).Buffer;o.WritableState=i;var E=r(44);E.inherits=r(45);var O=r(39);E.inherits(o,O),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return E.isFunction(e)&&(r=e,e=null),E.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),E.isFunction(r)||(r=function(){}),n.ended?a(this,n,r):s(this,n,t,r)&&(n.pendingcb++,i=c(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||v(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;E.isFunction(t)?(r=t,t=null,e=null):E.isFunction(e)&&(r=e,e=null),E.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||_(this,n,r)}}).call(e,r(2))},function(t,e,r){function n(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function a(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var s=r(3).Buffer,u=s.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},c=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=i)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},c.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},c.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},function(t,e,r){function n(t,e){this.afterTransform=function(t,r){return i(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,u.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);s.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){u.isFunction(this._flush)?this._flush(function(t){a(e,t)}):a(e)})}function a(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var s=r(47),u=r(44);u.inherits=r(45),u.inherits(o,s),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,s.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;u.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){ -return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(50),o=r(44);o.inherits=r(45),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(48)},function(t,e,r){t.exports=r(47)},function(t,e,r){t.exports=r(50)},function(t,e,r){t.exports=r(51)},function(t,e,r){function n(){o.call(this);var t=this;this.name="WebJackPort";var e={queue:[],socket:null,flushTo:function(e){null===this.socket&&(this.socket=e,t.emit("open")),this.queue.length&&(this.queue.forEach(function(t){this.socket.write(t)},this),this.queue.length=0)}},r=new i.Connection({raw:!0});e.flushTo(r),r.listen(function(e){t.emit("data",e)}),a.set(this,e)}Object.assign&&Map||r(57);var i=r(58),o=r(11).EventEmitter,a=new Map;n.prototype=Object.create(o.prototype,{constructor:{value:n}}),n.prototype.write=function(t){var e=a.get(this);null===e.socket?e.queue.push(t):e.socket.send(t)},t.exports=n},function(t,e,r){var n,i;(function(o){!function(o,a){n=a,i="function"==typeof n?n.call(e,r,e,t):n,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";function t(t){var e=[];for(var r in t)e.push(r);return e}var e,r=function(t){try{t()}catch(t){return!1}return!0},n=function(t,e){try{var r=function(){t.apply(this,arguments)};return!!r.__proto__&&(Object.setPrototypeOf(r,t),r.prototype=Object.create(t.prototype,{constructor:{value:t}}),e(r))}catch(t){return!1}},i=function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}},a=function(){var t=!1;if(String.prototype.startsWith)try{"/a/".startsWith(/a/)}catch(e){t=!0}return t},s=new Function("return this;"),u=s(),c=u.isFinite,l=!!Object.defineProperty&&i(),f=a(),p=Function.call.bind(String.prototype.indexOf),h=Function.call.bind(Object.prototype.toString),d=Function.call.bind(Object.prototype.hasOwnProperty),y=function(){},v=u.Symbol||{},g=v.species||"@@species",b={string:function(t){return"[object String]"===h(t)},regex:function(t){return"[object RegExp]"===h(t)},symbol:function(t){return"function"==typeof u.Symbol&&"symbol"==typeof t}},m=function(t,e,r,n){!n&&e in t||(l?Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:r}):t[e]=r)},_={getter:function(t,e,r){if(!l)throw new TypeError("getters require true ES5 support");Object.defineProperty(t,e,{configurable:!0,enumerable:!1,get:r})},proxy:function(t,e,r){if(!l)throw new TypeError("getters require true ES5 support");var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,{configurable:n.configurable,enumerable:n.enumerable,get:function(){return t[e]},set:function(r){t[e]=r}})},redefine:function(t,e,r){if(l){var n=Object.getOwnPropertyDescriptor(t,e);n.value=r,Object.defineProperty(t,e,n)}else t[e]=r}},w=function(t,e){Object.keys(e).forEach(function(r){var n=e[r];m(t,r,n,!1)})},E=Object.create||function(t,e){function r(){}r.prototype=t;var n=new r;return"undefined"!=typeof e&&w(n,e),n},O=b.symbol(v.iterator)?v.iterator:"_es6-shim iterator_";u.Set&&"function"==typeof(new u.Set)["@@iterator"]&&(O="@@iterator");var j=function(t,e){e||(e=function(){return this});var r={};r[O]=e,w(t,r),!t[O]&&b.symbol(O)&&(t[O]=e)},S=function(t){var e=h(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]"===h(t.callee)),r},T=Function.call.bind(Function.apply),C={Call:function(t,e){var r=arguments.length>2?arguments[2]:[];if(!C.IsCallable(t))throw new TypeError(t+" is not a function");return T(t,e,r)},RequireObjectCoercible:function(t,e){if(null==t)throw new TypeError(e||"Cannot call method on "+t)},TypeIsObject:function(t){return null!=t&&Object(t)===t},ToObject:function(t,e){return C.RequireObjectCoercible(t,e),Object(t)},IsCallable:function(t){return"function"==typeof t&&"[object Function]"===h(t)},ToInt32:function(t){return C.ToNumber(t)>>0},ToUint32:function(t){return C.ToNumber(t)>>>0},ToNumber:function(t){if("[object Symbol]"===h(t))throw new TypeError("Cannot convert a Symbol value to a number");return+t},ToInteger:function(t){var e=C.ToNumber(t);return Number.isNaN(e)?0:0!==e&&Number.isFinite(e)?(e>0?1:-1)*Math.floor(Math.abs(e)):e},ToLength:function(t){var e=C.ToInteger(t);return e<=0?0:e>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:e},SameValue:function(t,e){return t===e?0!==t||1/t===1/e:Number.isNaN(t)&&Number.isNaN(e)},SameValueZero:function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)},IsIterable:function(t){return C.TypeIsObject(t)&&("undefined"!=typeof t[O]||S(t))},GetIterator:function(t){if(S(t))return new e(t,"value");var r=t[O];if(!C.IsCallable(r))throw new TypeError("value is not an iterable");var n=r.call(t);if(!C.TypeIsObject(n))throw new TypeError("bad iterator");return n},IteratorNext:function(t){var e=arguments.length>1?t.next(arguments[1]):t.next();if(!C.TypeIsObject(e))throw new TypeError("bad iterator");return e},Construct:function(t,e){var r;r=C.IsCallable(t[g])?t[g]():E(t.prototype||null),w(r,{_es6construct:!0});var n=C.Call(t,r,e);return C.TypeIsObject(n)?n:r},CreateHTML:function(t,e,r,n){var i=String(t),o="<"+e;if(""!==r){var a=String(n),s=a.replace(/"/g,""");o+=" "+r+'="'+s+'"'}var u=o+">",c=u+i;return c+"</"+e+">"}},x=function(t){if(!C.TypeIsObject(t))throw new TypeError("bad object");return t._es6construct||(t.constructor&&C.IsCallable(t.constructor[g])&&(t=t.constructor[g](t)),w(t,{_es6construct:!0})),t},P=function(){function t(t){var e=Math.floor(t),r=t-e;return r<.5?e:r>.5?e+1:e%2?e+1:e}function e(e,r,n){var i,o,a,s,u,c,l,f=(1<<r-1)-1;for(e!==e?(o=(1<<r)-1,a=Math.pow(2,n-1),i=0):e===1/0||e===-(1/0)?(o=(1<<r)-1,a=0,i=e<0?1:0):0===e?(o=0,a=0,i=1/e===-(1/0)?1:0):(i=e<0,e=Math.abs(e),e>=Math.pow(2,1-f)?(o=Math.min(Math.floor(Math.log(e)/Math.LN2),1023),a=t(e/Math.pow(2,o)*Math.pow(2,n)),a/Math.pow(2,n)>=2&&(o+=1,a=1),o>f?(o=(1<<r)-1,a=0):(o+=f,a-=Math.pow(2,n))):(o=0,a=t(e/Math.pow(2,1-f-n)))),u=[],s=n;s;s-=1)u.push(a%2?1:0),a=Math.floor(a/2);for(s=r;s;s-=1)u.push(o%2?1:0),o=Math.floor(o/2);for(u.push(i?1:0),u.reverse(),c=u.join(""),l=[];c.length;)l.push(parseInt(c.slice(0,8),2)),c=c.slice(8);return l}function r(t,e,r){var n,i,o,a,s,u,c,l,f=[];for(n=t.length;n;n-=1)for(o=t[n-1],i=8;i;i-=1)f.push(o%2?1:0),o>>=1;return f.reverse(),a=f.join(""),s=(1<<e-1)-1,u=parseInt(a.slice(0,1),2)?-1:1,c=parseInt(a.slice(1,1+e),2),l=parseInt(a.slice(1+e),2),c===(1<<e)-1?0!==l?NaN:u*(1/0):c>0?u*Math.pow(2,c-s)*(1+l/Math.pow(2,r)):0!==l?u*Math.pow(2,-(s-1))*(l/Math.pow(2,r)):u<0?-0:0}function n(t){return r(t,8,23)}function i(t){return e(t,8,23)}var o={toFloat32:function(t){return n(i(t))}};if("undefined"!=typeof Float32Array){var a=new Float32Array(1);o.toFloat32=function(t){return a[0]=t,a[0]}}return o}();if(w(String,{fromCodePoint:function(t){for(var e,r=[],n=0,i=arguments.length;n<i;n++){if(e=Number(arguments[n]),!C.SameValue(e,C.ToInteger(e))||e<0||e>1114111)throw new RangeError("Invalid code point "+e);e<65536?r.push(String.fromCharCode(e)):(e-=65536,r.push(String.fromCharCode((e>>10)+55296)),r.push(String.fromCharCode(e%1024+56320)))}return r.join("")},raw:function(t){var e=C.ToObject(t,"bad callSite"),r=e.raw,n=C.ToObject(r,"bad raw value"),i=n.length,o=C.ToLength(i);if(o<=0)return"";for(var a,s,u,c,l=[],f=0;f<o&&(a=String(f),s=n[a],u=String(s),l.push(u),!(f+1>=o));)s=f+1<arguments.length?arguments[f+1]:"",c=String(s),l.push(c),f++;return l.join("")}}),1!==String.fromCodePoint.length){var R=Function.apply.bind(String.fromCodePoint);m(String,"fromCodePoint",function(t){return R(this,arguments)},!0)}var A=function t(e,r){if(r<1)return"";if(r%2)return t(e,r-1)+e;var n=t(e,r/2);return n+n},k=1/0,I={repeat:function(t){C.RequireObjectCoercible(this);var e=String(this);if(t=C.ToInteger(t),t<0||t>=k)throw new RangeError("repeat count must be less than infinity and not overflow maximum string size");return A(e,t)},startsWith:function(t){C.RequireObjectCoercible(this);var e=String(this);if(b.regex(t))throw new TypeError('Cannot call method "startsWith" with a regex');t=String(t);var r=arguments.length>1?arguments[1]:void 0,n=Math.max(C.ToInteger(r),0);return e.slice(n,n+t.length)===t},endsWith:function(t){C.RequireObjectCoercible(this);var e=String(this);if(b.regex(t))throw new TypeError('Cannot call method "endsWith" with a regex');t=String(t);var r=e.length,n=arguments.length>1?arguments[1]:void 0,i="undefined"==typeof n?r:C.ToInteger(n),o=Math.min(Math.max(i,0),r);return e.slice(o-t.length,o)===t},includes:function(t){var e=arguments.length>1?arguments[1]:void 0;return p(this,t,e)!==-1},codePointAt:function(t){C.RequireObjectCoercible(this);var e=String(this),r=C.ToInteger(t),n=e.length;if(r>=0&&r<n){var i=e.charCodeAt(r),o=r+1===n;if(i<55296||i>56319||o)return i;var a=e.charCodeAt(r+1);return a<56320||a>57343?i:1024*(i-55296)+(a-56320)+65536}}};w(String.prototype,I);var M=1!==" ".trim().length;if(M){delete String.prototype.trim;var N=["\t\n\v\f\r "," \u2028","\u2029\ufeff"].join(""),F=new RegExp("(^["+N+"]+)|(["+N+"]+$)","g");w(String.prototype,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(F,"")}})}var B=function(t){C.RequireObjectCoercible(t),this._s=String(t),this._i=0};B.prototype.next=function(){var t=this._s,e=this._i;if("undefined"==typeof t||e>=t.length)return this._s=void 0,{value:void 0,done:!0};var r,n,i=t.charCodeAt(e);return i<55296||i>56319||e+1===t.length?n=1:(r=t.charCodeAt(e+1),n=r<56320||r>57343?1:2),this._i=e+n,{value:t.substr(e,n),done:!1}},j(B.prototype),j(String.prototype,function(){return new B(this)}),f||(m(String.prototype,"startsWith",I.startsWith,!0),m(String.prototype,"endsWith",I.endsWith,!0));var L={from:function(t){var e=arguments.length>1?arguments[1]:void 0,r=C.ToObject(t,"bad iterable");if("undefined"!=typeof e&&!C.IsCallable(e))throw new TypeError("Array.from: when provided, the second argument must be a function");var n,i,o,a,s=arguments.length>2,u=s?arguments[2]:void 0,c=C.IsIterable(r);if(c){o=0,i=C.IsCallable(this)?Object(new this):[];var l,f=c?C.GetIterator(r):null;do l=C.IteratorNext(f),l.done||(a=l.value,e?i[o]=s?e.call(u,a,o):e(a,o):i[o]=a,o+=1);while(!l.done);n=o}else for(n=C.ToLength(r.length),i=C.IsCallable(this)?Object(new this(n)):new Array(n),o=0;o<n;++o)a=r[o],e?i[o]=s?e.call(u,a,o):e(a,o):i[o]=a;return i.length=n,i},of:function(){return Array.from(arguments)}};w(Array,L);var D=function(){try{return 0===Array.from({length:-1}).length}catch(t){return!1}};D()||m(Array,"from",L.from,!0);var U=function(t){return{value:t,done:0===arguments.length}};e=function(t,e){this.i=0,this.array=t,this.kind=e},w(e.prototype,{next:function(){var t=this.i,r=this.array;if(!(this instanceof e))throw new TypeError("Not an ArrayIterator");if("undefined"!=typeof r)for(var n=C.ToLength(r.length);t<n;t++){var i,o=this.kind;return"key"===o?i=t:"value"===o?i=r[t]:"entry"===o&&(i=[t,r[t]]),this.i=t+1,{value:i,done:!1}}return this.array=void 0,{value:void 0,done:!0}}}),j(e.prototype);var W=function(t,e){this.object=t,this.array=null,this.kind=e};w(W.prototype,{next:function(){var e,r=this.array;if(!(this instanceof W))throw new TypeError("Not an ObjectIterator");for(null===r&&(r=this.array=t(this.object));C.ToLength(r.length)>0;)if(e=r.shift(),e in this.object)return U("key"===this.kind?e:"value"===this.kind?this.object[e]:[e,this.object[e]]);return U()}}),j(W.prototype);var z={copyWithin:function(t,e){var r=arguments[2],n=C.ToObject(this),i=C.ToLength(n.length);t=C.ToInteger(t),e=C.ToInteger(e);var o=t<0?Math.max(i+t,0):Math.min(t,i),a=e<0?Math.max(i+e,0):Math.min(e,i);r="undefined"==typeof r?i:C.ToInteger(r);var s=r<0?Math.max(i+r,0):Math.min(r,i),u=Math.min(s-a,i-o),c=1;for(a<o&&o<a+u&&(c=-1,a+=u-1,o+=u-1);u>0;)d(n,a)?n[o]=n[a]:delete n[a],a+=c,o+=c,u-=1;return n},fill:function(t){var e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=C.ToObject(this),i=C.ToLength(n.length);e=C.ToInteger("undefined"==typeof e?0:e),r=C.ToInteger("undefined"==typeof r?i:r);for(var o=e<0?Math.max(i+e,0):Math.min(e,i),a=r<0?i+r:r,s=o;s<i&&s<a;++s)n[s]=t;return n},find:function(t){var e=C.ToObject(this),r=C.ToLength(e.length);if(!C.IsCallable(t))throw new TypeError("Array#find: predicate must be a function");for(var n,i=arguments.length>1?arguments[1]:null,o=0;o<r;o++)if(n=e[o],i){if(t.call(i,n,o,e))return n}else if(t(n,o,e))return n},findIndex:function(t){var e=C.ToObject(this),r=C.ToLength(e.length);if(!C.IsCallable(t))throw new TypeError("Array#findIndex: predicate must be a function");for(var n=arguments.length>1?arguments[1]:null,i=0;i<r;i++)if(n){if(t.call(n,e[i],i,e))return i}else if(t(e[i],i,e))return i;return-1},keys:function(){return new e(this,"key")},values:function(){return new e(this,"value")},entries:function(){return new e(this,"entry")}};Array.prototype.keys&&!C.IsCallable([1].keys().next)&&delete Array.prototype.keys,Array.prototype.entries&&!C.IsCallable([1].entries().next)&&delete Array.prototype.entries,Array.prototype.keys&&Array.prototype.entries&&!Array.prototype.values&&Array.prototype[O]&&(w(Array.prototype,{values:Array.prototype[O]}),b.symbol(v.unscopables)&&(Array.prototype[v.unscopables].values=!0)),w(Array.prototype,z),j(Array.prototype,function(){return this.values()}),Object.getPrototypeOf&&j(Object.getPrototypeOf([].values()));var q=Math.pow(2,53)-1;w(Number,{MAX_SAFE_INTEGER:q,MIN_SAFE_INTEGER:-q,EPSILON:2.220446049250313e-16,parseInt:u.parseInt,parseFloat:u.parseFloat,isFinite:function(t){return"number"==typeof t&&c(t)},isInteger:function(t){return Number.isFinite(t)&&C.ToInteger(t)===t},isSafeInteger:function(t){return Number.isInteger(t)&&Math.abs(t)<=Number.MAX_SAFE_INTEGER},isNaN:function(t){return t!==t}}),[,1].find(function(t,e){return 0===e})||m(Array.prototype,"find",z.find,!0),0!==[,1].findIndex(function(t,e){return 0===e})&&m(Array.prototype,"findIndex",z.findIndex,!0),l&&w(Object,{assign:function(t,e){if(!C.TypeIsObject(t))throw new TypeError("target must be an object");return Array.prototype.reduce.call(arguments,function(t,e){return Object.keys(Object(e)).reduce(function(t,r){return t[r]=e[r],t},t)})},is:function(t,e){return C.SameValue(t,e)},setPrototypeOf:function(t,e){var r,n=function(t,e){if(!C.TypeIsObject(t))throw new TypeError("cannot set prototype on a non-object");if(null!==e&&!C.TypeIsObject(e))throw new TypeError("can only set prototype to an object or null"+e)},i=function(t,e){return n(t,e),r.call(t,e),t};try{r=t.getOwnPropertyDescriptor(t.prototype,e).set,r.call({},null)}catch(n){if(t.prototype!=={}[e])return;r=function(t){this[e]=t},i.polyfill=i(i({},null),t.prototype)instanceof t}return i}(Object,"__proto__")}),Object.setPrototypeOf&&Object.getPrototypeOf&&null!==Object.getPrototypeOf(Object.setPrototypeOf({},null))&&null===Object.getPrototypeOf(Object.create(null))&&!function(){var t=Object.create(null),e=Object.getPrototypeOf,r=Object.setPrototypeOf;Object.getPrototypeOf=function(r){var n=e(r);return n===t?null:n},Object.setPrototypeOf=function(e,n){return null===n&&(n=t),r(e,n)},Object.setPrototypeOf.polyfill=!1}();var H=function(){try{return Object.keys("foo"),!0}catch(t){return!1}}();if(!H){var V=Object.keys;m(Object,"keys",function(t){return V(C.ToObject(t))},!0)}if(Object.getOwnPropertyNames){var $=function(){try{return Object.getOwnPropertyNames("foo"),!0}catch(t){return!1}}();if(!$){var G=Object.getOwnPropertyNames;m(Object,"getOwnPropertyNames",function(t){return G(C.ToObject(t))},!0)}}if(!RegExp.prototype.flags&&l){var Y=function(){if(!C.TypeIsObject(this))throw new TypeError("Method called on incompatible type: must be an object.");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t};_.getter(RegExp.prototype,"flags",Y)}var X=function(){try{return"/a/i"===String(new RegExp(/a/g,"i"))}catch(t){return!1}}();if(!X&&l){var Q=RegExp,J=function t(e,r){return b.regex(e)&&b.string(r)?new t(e.source,r):new Q(e,r)};m(J,"toString",Q.toString.bind(Q),!0),Object.setPrototypeOf&&Object.setPrototypeOf(Q,J),Object.getOwnPropertyNames(Q).forEach(function(t){"$input"!==t&&(t in y||_.proxy(Q,t,J))}),J.prototype=Q.prototype,_.redefine(Q.prototype,"constructor",J),RegExp=J,_.redefine(u,"RegExp",J)}var Z={acosh:function(t){var e=Number(t);return Number.isNaN(e)||t<1?NaN:1===e?0:e===1/0?e:Math.log(e/Math.E+Math.sqrt(e+1)*Math.sqrt(e-1)/Math.E)+1},asinh:function(t){return t=Number(t),0!==t&&c(t)?t<0?-Math.asinh(-t):Math.log(t+Math.sqrt(t*t+1)):t},atanh:function(t){return t=Number(t),Number.isNaN(t)||t<-1||t>1?NaN:t===-1?-(1/0):1===t?1/0:0===t?t:.5*Math.log((1+t)/(1-t))},cbrt:function(t){if(t=Number(t),0===t)return t;var e,r=t<0;return r&&(t=-t),e=Math.pow(t,1/3),r?-e:e},clz32:function(t){t=Number(t);var e=C.ToUint32(t);return 0===e?32:32-e.toString(2).length},cosh:function(t){return t=Number(t),0===t?1:Number.isNaN(t)?NaN:c(t)?(t<0&&(t=-t),t>21?Math.exp(t)/2:(Math.exp(t)+Math.exp(-t))/2):1/0},expm1:function(t){var e=Number(t);if(e===-(1/0))return-1;if(!c(e)||0===t)return e;if(Math.abs(e)>.5)return Math.exp(e)-1;for(var r=e,n=0,i=1;n+r!==n;)n+=r,i+=1,r*=e/i;return n},hypot:function(t,e){var r=!1,n=!0,i=!1,o=[];if(Array.prototype.every.call(arguments,function(t){var e=Number(t);return Number.isNaN(e)?r=!0:e===1/0||e===-(1/0)?i=!0:0!==e&&(n=!1),!i&&(r||o.push(Math.abs(e)),!0)}),i)return 1/0;if(r)return NaN;if(n)return 0;o.sort(function(t,e){return e-t});var a=o[0],s=o.map(function(t){return t/a}),u=s.reduce(function(t,e){return t+e*e},0);return a*Math.sqrt(u)},log2:function(t){return Math.log(t)*Math.LOG2E},log10:function(t){return Math.log(t)*Math.LOG10E},log1p:function(t){var e=Number(t);return e<-1||Number.isNaN(e)?NaN:0===e||e===1/0?e:e===-1?-(1/0):1+e-1===0?e:e*(Math.log(1+e)/(1+e-1))},sign:function(t){var e=+t;return 0===e?e:Number.isNaN(e)?e:e<0?-1:1},sinh:function(t){var e=Number(t);return c(t)&&0!==t?Math.abs(e)<1?(Math.expm1(e)-Math.expm1(-e))/2:(Math.exp(e-1)-Math.exp(-e-1))*Math.E/2:t},tanh:function(t){var e=Number(t);if(Number.isNaN(t)||0===e)return e;if(e===1/0)return 1;if(e===-(1/0))return-1;var r=Math.expm1(e),n=Math.expm1(-e);return r===1/0?1:n===1/0?-1:(r-n)/(Math.exp(e)+Math.exp(-e))},trunc:function(t){var e=Number(t);return e<0?-Math.floor(-e):Math.floor(e)},imul:function(t,e){t=C.ToUint32(t),e=C.ToUint32(e);var r=t>>>16&65535,n=65535&t,i=e>>>16&65535,o=65535&e;return n*o+(r*o+n*i<<16>>>0)|0},fround:function(t){if(0===t||t===1/0||t===-(1/0)||Number.isNaN(t))return t;var e=Number(t);return P.toFloat32(e)}};w(Math,Z),m(Math,"tanh",Z.tanh,Math.tanh(-2e-17)!==-2e-17),m(Math,"acosh",Z.acosh,Math.acosh(Number.MAX_VALUE)===1/0),m(Math,"sinh",Z.sinh,Math.sinh(-2e-17)!==-2e-17);var K=Math.expm1(10);m(Math,"expm1",Z.expm1,K>22025.465794806718||K<22025.465794806718);var tt=0===Math.round(.5-Number.EPSILON/4)&&1===Math.round(-.5+Number.EPSILON/3.99),et=Math.round;m(Math,"round",function(t){return-.5<=t&&t<.5&&0!==t?Math.sign(0*t):et(t)},!tt),Math.imul(4294967295,5)!==-5&&(Math.imul=Z.imul);var rt=function(){var t,e;C.IsPromise=function(t){return!!C.TypeIsObject(t)&&(!!t._promiseConstructor&&"undefined"!=typeof t._status)};var r,n=function(t){if(!C.IsCallable(t))throw new TypeError("bad promise constructor");var e=this,r=function(t,r){e.resolve=t,e.reject=r};if(e.promise=C.Construct(t,[r]),!e.promise._es6construct)throw new TypeError("bad promise constructor");if(!C.IsCallable(e.resolve)||!C.IsCallable(e.reject))throw new TypeError("bad promise constructor")},i=u.setTimeout;"undefined"!=typeof window&&C.IsCallable(window.postMessage)&&(r=function(){var t=[],e="zero-timeout-message",r=function(r){t.push(r),window.postMessage(e,"*")},n=function(r){if(r.source===window&&r.data===e){if(r.stopPropagation(),0===t.length)return;var n=t.shift();n()}};return window.addEventListener("message",n,!0),r});var a=function(){var t=u.Promise;return t&&t.resolve&&function(e){return t.resolve().then(e)}},s=C.IsCallable(u.setImmediate)?u.setImmediate.bind(u):"object"==typeof o&&o.nextTick?o.nextTick:a()||(C.IsCallable(r)?r():function(t){i(t,0)}),c=function(t,e){if(!C.TypeIsObject(t))return!1;var r=e.resolve,n=e.reject;try{var i=t.then;if(!C.IsCallable(i))return!1;i.call(t,r,n)}catch(t){n(t)}return!0},l=function(t,e){t.forEach(function(t){s(function(){var r=t.handler,n=t.capability,i=n.resolve,o=n.reject;try{var a=r(e);if(a===n.promise)throw new TypeError("self resolution");var s=c(a,n);s||i(a)}catch(t){o(t)}})})},f=function(t,e,r){return function(i){if(i===t)return r(new TypeError("self resolution"));var o=t._promiseConstructor,a=new n(o),s=c(i,a);return s?a.promise.then(e,r):e(i)}};t=function(t){var e=this;if(e=x(e),!e._promiseConstructor)throw new TypeError("bad promise");if("undefined"!=typeof e._status)throw new TypeError("promise already initialized");if(!C.IsCallable(t))throw new TypeError("not a valid resolver");e._status="unresolved",e._resolveReactions=[],e._rejectReactions=[];var r=function(t){if("unresolved"===e._status){var r=e._resolveReactions;e._result=t,e._resolveReactions=void 0,e._rejectReactions=void 0,e._status="has-resolution",l(r,t)}},n=function(t){if("unresolved"===e._status){var r=e._rejectReactions;e._result=t,e._resolveReactions=void 0,e._rejectReactions=void 0,e._status="has-rejection",l(r,t)}};try{t(r,n)}catch(t){n(t)}return e},e=t.prototype;var p=function(t,e,r,n){var i=!1;return function(o){if(!i&&(i=!0,e[t]=o,0===--n.count)){var a=r.resolve;a(e)}}};return m(t,g,function(t){var r=this,n=r.prototype||e;return t=t||E(n),w(t,{_status:void 0,_result:void 0,_resolveReactions:void 0,_rejectReactions:void 0,_promiseConstructor:void 0}),t._promiseConstructor=r,t}),w(t,{all:function(t){var e=this,r=new n(e),i=r.resolve,o=r.reject;try{if(!C.IsIterable(t))throw new TypeError("bad iterable");for(var a=C.GetIterator(t),s=[],u={count:1},c=0;;c++){var l=C.IteratorNext(a);if(l.done)break;var f=e.resolve(l.value),h=p(c,s,r,u);u.count++,f.then(h,r.reject)}0===--u.count&&i(s)}catch(t){o(t)}return r.promise},race:function(t){var e=this,r=new n(e),i=r.resolve,o=r.reject;try{if(!C.IsIterable(t))throw new TypeError("bad iterable");for(var a=C.GetIterator(t);;){var s=C.IteratorNext(a);if(s.done)break;var u=e.resolve(s.value);u.then(i,o)}}catch(t){o(t)}return r.promise},reject:function(t){var e=this,r=new n(e),i=r.reject;return i(t),r.promise},resolve:function(t){var e=this;if(C.IsPromise(t)){var r=t._promiseConstructor;if(r===e)return t}var i=new n(e),o=i.resolve;return o(t),i.promise}}),w(e,{catch:function(t){return this.then(void 0,t)},then:function(t,e){var r=this;if(!C.IsPromise(r))throw new TypeError("not a promise");var i=this.constructor,o=new n(i);C.IsCallable(e)||(e=function(t){throw t}),C.IsCallable(t)||(t=function(t){return t});var a=f(r,t,e),s={capability:o,handler:a},u={capability:o,handler:e};switch(r._status){case"unresolved":r._resolveReactions.push(s),r._rejectReactions.push(u);break;case"has-resolution":l([s],r._result);break;case"has-rejection":l([u],r._result);break;default:throw new TypeError("unexpected")}return o.promise}}),t}();u.Promise&&(delete u.Promise.accept,delete u.Promise.defer,delete u.Promise.prototype.chain),w(u,{Promise:rt});var nt=n(u.Promise,function(t){return t.resolve(42)instanceof t}),it=function(){try{return u.Promise.reject(42).then(null,5).then(null,y),!0}catch(t){return!1}}(),ot=function(){try{Promise.call(3,y)}catch(t){return!0}return!1}();nt&&it&&ot||(Promise=rt,m(u,"Promise",rt,!0));var at=function(t){var e=Object.keys(t.reduce(function(t,e){return t[e]=!0,t},{}));return t.join(":")===e.join(":")},st=at(["z","a","bb"]),ut=at(["z",1,"a","3",2]);if(l){var ct=function(t){if(!st)return null;var e=typeof t;return"string"===e?"$"+t:"number"===e?ut?t:"n"+t:null},lt=function(){return Object.create?Object.create(null):{}},ft={Map:function(){function t(t,e){this.key=t,this.value=e,this.next=null,this.prev=null}function e(t,e){this.head=t._head,this.i=this.head,this.kind=e}function r(e){var r=this;if(!C.TypeIsObject(r))throw new TypeError("Map does not accept arguments when called as a function");if(r=x(r),!r._es6map)throw new TypeError("bad map");var n=new t(null,null);if(n.next=n.prev=n,w(r,{_head:n,_storage:lt(),_size:0}),"undefined"!=typeof e&&null!==e){var i=C.GetIterator(e),o=r.set;if(!C.IsCallable(o))throw new TypeError("bad map");for(;;){var a=C.IteratorNext(i);if(a.done)break;var s=a.value;if(!C.TypeIsObject(s))throw new TypeError("expected iterable of pairs");o.call(r,s[0],s[1])}}return r}var n={};t.prototype.isRemoved=function(){return this.key===n},e.prototype={next:function(){var t,e=this.i,r=this.kind,n=this.head;if("undefined"==typeof this.i)return{value:void 0,done:!0};for(;e.isRemoved()&&e!==n;)e=e.prev;for(;e.next!==n;)if(e=e.next,!e.isRemoved())return t="key"===r?e.key:"value"===r?e.value:[e.key,e.value],this.i=e,{value:t,done:!1};return this.i=void 0,{value:void 0,done:!0}}},j(e.prototype);var i=r.prototype;return m(r,g,function(t){var e=this,r=e.prototype||i;return t=t||E(r),w(t,{_es6map:!0}),t}),_.getter(r.prototype,"size",function(){if("undefined"==typeof this._size)throw new TypeError("size method called on incompatible Map");return this._size}),w(r.prototype,{get:function(t){var e=ct(t);if(null!==e){var r=this._storage[e];return r?r.value:void 0}for(var n=this._head,i=n;(i=i.next)!==n;)if(C.SameValueZero(i.key,t))return i.value},has:function(t){var e=ct(t);if(null!==e)return"undefined"!=typeof this._storage[e];for(var r=this._head,n=r;(n=n.next)!==r;)if(C.SameValueZero(n.key,t))return!0;return!1},set:function(e,r){var n,i=this._head,o=i,a=ct(e);if(null!==a){if("undefined"!=typeof this._storage[a])return this._storage[a].value=r,this;n=this._storage[a]=new t(e,r),o=i.prev}for(;(o=o.next)!==i;)if(C.SameValueZero(o.key,e))return o.value=r,this;return n=n||new t(e,r),C.SameValue(-0,e)&&(n.key=0),n.next=this._head,n.prev=this._head.prev,n.prev.next=n,n.next.prev=n,this._size+=1,this},delete:function(t){var e=this._head,r=e,i=ct(t);if(null!==i){if("undefined"==typeof this._storage[i])return!1;r=this._storage[i].prev,delete this._storage[i]}for(;(r=r.next)!==e;)if(C.SameValueZero(r.key,t))return r.key=r.value=n,r.prev.next=r.next,r.next.prev=r.prev,this._size-=1,!0;return!1},clear:function(){this._size=0,this._storage=lt();for(var t=this._head,e=t,r=e.next;(e=r)!==t;)e.key=e.value=n,r=e.next,e.next=e.prev=t;t.next=t.prev=t},keys:function(){return new e(this,"key")},values:function(){return new e(this,"value")},entries:function(){return new e(this,"key+value")},forEach:function(t){for(var e=arguments.length>1?arguments[1]:null,r=this.entries(),n=r.next();!n.done;n=r.next())e?t.call(e,n.value[1],n.value[0],this):t(n.value[1],n.value[0],this)}}),j(r.prototype,function(){return this.entries()}),r}(),Set:function(){var t=function(t){var e=this;if(!C.TypeIsObject(e))throw new TypeError("Set does not accept arguments when called as a function");if(e=x(e),!e._es6set)throw new TypeError("bad set");if(w(e,{"[[SetData]]":null,_storage:lt()}),"undefined"!=typeof t&&null!==t){var r=C.GetIterator(t),n=e.add;if(!C.IsCallable(n))throw new TypeError("bad set");for(;;){var i=C.IteratorNext(r);if(i.done)break;var o=i.value;n.call(e,o)}}return e},e=t.prototype;m(t,g,function(t){var r=this,n=r.prototype||e;return t=t||E(n),w(t,{_es6set:!0}),t});var r=function(t){if(!t["[[SetData]]"]){var e=t["[[SetData]]"]=new ft.Map;Object.keys(t._storage).forEach(function(t){t=36===t.charCodeAt(0)?t.slice(1):"n"===t.charAt(0)?+t.slice(1):+t,e.set(t,t)}),t._storage=null}};return _.getter(t.prototype,"size",function(){if("undefined"==typeof this._storage)throw new TypeError("size method called on incompatible Set");return r(this),this["[[SetData]]"].size}),w(t.prototype,{has:function(t){var e;return this._storage&&null!==(e=ct(t))?!!this._storage[e]:(r(this),this["[[SetData]]"].has(t))},add:function(t){var e;return this._storage&&null!==(e=ct(t))?(this._storage[e]=!0,this):(r(this),this["[[SetData]]"].set(t,t),this)},delete:function(t){var e;if(this._storage&&null!==(e=ct(t))){var n=d(this._storage,e);return delete this._storage[e]&&n}return r(this),this["[[SetData]]"].delete(t)},clear:function(){this._storage?this._storage=lt():this["[[SetData]]"].clear()},values:function(){return r(this),this["[[SetData]]"].values()},entries:function(){return r(this),this["[[SetData]]"].entries()},forEach:function(t){var e=arguments.length>1?arguments[1]:null,n=this;r(n),this["[[SetData]]"].forEach(function(r,i){e?t.call(e,i,i,n):t(i,i,n)})}}),m(t,"keys",t.values,!0),j(t.prototype,function(){return this.values()}),t}()};w(u,ft),(u.Map||u.Set)&&("function"!=typeof u.Map.prototype.clear||0!==(new u.Set).size||0!==(new u.Map).size||"function"!=typeof u.Map.prototype.keys||"function"!=typeof u.Set.prototype.keys||"function"!=typeof u.Map.prototype.forEach||"function"!=typeof u.Set.prototype.forEach||r(u.Map)||r(u.Set)||!n(u.Map,function(t){var e=new t([]);return e.set(42,42),e instanceof t}))&&(u.Map=ft.Map,u.Set=ft.Set),u.Set.prototype.keys!==u.Set.prototype.values&&m(u.Set.prototype,"keys",u.Set.prototype.values,!0),j(Object.getPrototypeOf((new u.Map).keys())),j(Object.getPrototypeOf((new u.Set).keys()))}u.Reflect||m(u,"Reflect",{});var pt=u.Reflect,ht=function(t){if(!C.TypeIsObject(t))throw new TypeError("target must be an object")};if(w(u.Reflect,{apply:function(){return C.Call.apply(null,arguments)},construct:function(t,e){if(!C.IsCallable(t))throw new TypeError("First argument must be callable.");return C.Construct(t,e)},deleteProperty:function(t,e){if(ht(t),l){var r=Object.getOwnPropertyDescriptor(t,e);if(r&&!r.configurable)return!1}return delete t[e]},enumerate:function(t){return ht(t),new W(t,"key")},has:function(t,e){return ht(t),e in t}}),Object.getOwnPropertyNames&&w(u.Reflect,{ownKeys:function(t){ht(t);var e=Object.getOwnPropertyNames(t);return C.IsCallable(Object.getOwnPropertySymbols)&&e.push.apply(e,Object.getOwnPropertySymbols(t)),e}}),Object.preventExtensions&&w(u.Reflect,{isExtensible:function(t){return ht(t),Object.isExtensible(t)},preventExtensions:function(t){return ht(t),vt(function(){Object.preventExtensions(t)})}}),l){var dt=function(t,e,r){var n=Object.getOwnPropertyDescriptor(t,e);if(!n){var i=Object.getPrototypeOf(t);if(null===i)return;return dt(i,e,r)}return"value"in n?n.value:n.get?n.get.call(r):void 0},yt=function(t,e,r,n){var i=Object.getOwnPropertyDescriptor(t,e);if(!i){var o=Object.getPrototypeOf(t);if(null!==o)return yt(o,e,r,n);i={value:void 0,writable:!0,enumerable:!0,configurable:!0}}if("value"in i){if(!i.writable)return!1;if(!C.TypeIsObject(n))return!1;var a=Object.getOwnPropertyDescriptor(n,e);return a?pt.defineProperty(n,e,{value:r}):pt.defineProperty(n,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}return!!i.set&&(i.set.call(n,r),!0)},vt=function(t){try{t()}catch(t){return!1}return!0};w(u.Reflect,{defineProperty:function(t,e,r){return ht(t),vt(function(){Object.defineProperty(t,e,r)})},getOwnPropertyDescriptor:function(t,e){return ht(t),Object.getOwnPropertyDescriptor(t,e)},get:function(t,e){ht(t);var r=arguments.length>2?arguments[2]:t;return dt(t,e,r)},set:function(t,e,r){ht(t);var n=arguments.length>3?arguments[3]:t;return yt(t,e,r,n)}})}if(Object.getPrototypeOf){var gt=Object.getPrototypeOf;w(u.Reflect,{getPrototypeOf:function(t){return ht(t),gt(t)}})}if(Object.setPrototypeOf){var bt=function(t,e){for(;e;){if(t===e)return!0;e=pt.getPrototypeOf(e)}return!1};w(u.Reflect,{setPrototypeOf:function(t,e){if(ht(t),null!==e&&!C.TypeIsObject(e))throw new TypeError("proto must be an object or null");return e===pt.getPrototypeOf(t)||!(pt.isExtensible&&!pt.isExtensible(t))&&(!bt(t,e)&&(Object.setPrototypeOf(t,e),!0))}})}if("Invalid Date"!==String(new Date(NaN))){var mt=Date.prototype.toString,_t=function(){var t=+this;return t!==t?"Invalid Date":mt.call(this)};m(_t,"toString",mt.toString,!0),m(Date.prototype,"toString",_t,!0)}var wt={anchor:function(t){return C.CreateHTML(this,"a","name",t)},big:function(){return C.CreateHTML(this,"big","","")},blink:function(){return C.CreateHTML(this,"blink","","")},bold:function(){ -return C.CreateHTML(this,"b","","")},fixed:function(){return C.CreateHTML(this,"tt","","")},fontcolor:function(t){return C.CreateHTML(this,"font","color",t)},fontsize:function(t){return C.CreateHTML(this,"font","size",t)},italics:function(){return C.CreateHTML(this,"i","","")},link:function(t){return C.CreateHTML(this,"a","href",t)},small:function(){return C.CreateHTML(this,"small","","")},strike:function(){return C.CreateHTML(this,"strike","","")},sub:function(){return C.CreateHTML(this,"sub","","")},sup:function(){return C.CreateHTML(this,"sup","","")}};return w(String.prototype,wt),Object.keys(wt).forEach(function(t){var e=String.prototype[t],r=!1;if(C.IsCallable(e)){var n=e.call("",' " '),i=[].concat(n.match(/"/g)).length;r=n!==n.toLowerCase()||i>2}else r=!0;r&&m(String.prototype,t,wt[t],!0)}),u})}).call(e,r(2))},function(t,e,r){var n={};!function(e){t.exports=n}(e),function(){var t=!1,e=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(r){function n(){!t&&this.init&&this.init.apply(this,arguments)}var i=this.prototype;t=!0;var o=new this;t=!1;for(var a in r)o[a]="function"==typeof r[a]&&"function"==typeof i[a]&&e.test(r[a])?function(t,e){return function(){var r=this._super;this._super=i[t];var n=e.apply(this,arguments);return this._super=r,n}}(a,r[a]):r[a];return n.prototype=o,n.prototype.constructor=n,n.extend=arguments.callee,n}}(),n.Decoder=Class.extend({init:function(t){function e(t){for(var e=Math.max.apply(null,t),r=0;r<t.length;r++)t[r]/=e}function r(t){for(var e=0,r=0;r<t.length;r++)e+=t[r];return e}function n(t,e){for(var r=e;r<t.length-e;r++){for(var n=-e;n<=e;n++)t[r]+=t[r+n];t[r]/=2*e+1,E&&(O+=t[r]+"\n")}}function i(t){var i,o,a=t,s=[];e(a);for(var u=T.c,c=0;c<a.length;c++)h[u]=a[c]*m[u],d[u]=a[c]*g[u],y[u]=a[c]*_[u],v[u]=a[c]*b[u],i=Math.sqrt(Math.pow(r(h),2)+Math.pow(r(d),2)),o=Math.sqrt(Math.pow(r(y),2)+Math.pow(r(v),2)),a[c]=o-i,u++,u==f/2&&(u=0);T.c=u,n(a,1);for(var c=1;c<a.length;c++){if(a[c]*a[c-1]<0||0==a[c-1]){var l=Math.round((T.t-T.lastTransition)/f);T.lastTransition=T.t,s.push(l)}T.t++}return T.t++,s}function o(t,e){if(T.bitCounter+e>8)throw"byteBuffer too small";for(var r=0;r<e;r++)T.bitCounter++,T.byteBuffer>>>=1,t&&(T.byteBuffer|=128),8==T.bitCounter&&(T.wordBuffer.push(T.byteBuffer),T.byteBuffer=0)}function a(t){var e="";t.length&&(t.forEach(function(t){e+=String.fromCharCode(t)}),t.length=0),j(e)}var s,u,c,l,f,p,h,d,y,v,g,b,m,_,w=this,E=t.debug,O="",j=t.onReceive,S=t.sampleRate,T={current:0,PREAMBLE:1,START:2,DATA:3,STOP:4,bitCounter:0,byteBuffer:0,wordBuffer:[],lastTransition:0,lastBitState:0,t:0,c:0};w.setProfile=function(t){u=t.baud,c=t.freqLow,l=t.freqHigh,f=Math.ceil(S/u),p=Math.ceil(40*S/1e3/f),h=new Float32Array(f/2),d=new Float32Array(f/2),y=new Float32Array(f/2),v=new Float32Array(f/2),g=new Float32Array(f/2),b=new Float32Array(f/2),m=new Float32Array(f/2),_=new Float32Array(f/2),function(){for(var t=2*Math.PI*(c/S),e=2*Math.PI*(l/S),r=0;r<f/2;r++)g[r]=Math.sin(t*r),b[r]=Math.sin(e*r),m[r]=Math.cos(t*r),_[r]=Math.cos(e*r)}(),s="undefined"!=typeof t.raw&&t.raw},w.setProfile(t);var C=s?j:a;w.decode=function(t){for(var e=i(t),r=T.PREAMBLE,n=0;n<e.length;n++){var a=e[n];switch(T.current){case T.PREAMBLE:a>=12&&a<=p+20&&(r=T.START,T.lastBitState=0,T.byteBuffer=0,T.wordBuffer=[]);break;case T.START:E&&console.log("START"),T.bitCounter=0,1==a?r=T.DATA:a>1&&a<=9?(r=9==a?T.STOP:T.DATA,o(0,a-1)):r=T.PREAMBLE;break;case T.DATA:E&&console.log("DATA");var s=a+T.bitCounter,u=1^T.lastBitState;s>11?r=T.PREAMBLE:11==s?(o(1,a-3),r=T.START,E&&console.log(">emit< "+T.wordBuffer[0].toString(2)),C(T.wordBuffer),T.wordBuffer=[]):10==s?(o(1,a-2),r=T.PREAMBLE,E&&console.log("|emit| "+T.wordBuffer[0].toString(2)),C(T.wordBuffer)):9==s?(o(1,a-1),r=T.START):8==s?(o(u,a),r=T.STOP,T.lastBitState=u):(o(u,a),r=T.DATA,T.lastBitState=u),0==a&&(r=T.PREAMBLE,E&&console.log("#demod error#"));break;case T.STOP:E&&console.log(" STOP"),1==a?r=T.START:3==a?(r=T.START,E&&console.log(">>emit<< "+T.wordBuffer[0].toString(2)),C(T.wordBuffer),T.wordBuffer=[]):a>=2?(r=T.PREAMBLE,E&&console.log("||emit|| "+T.wordBuffer[0].toString(2)),C(T.wordBuffer)):r=T.PREAMBLE;break;default:r=T.PREAMBLE,T.bitCounter=0,T.byteBuffer=0}T.current=r}}}}),n.Encoder=Class.extend({init:function(t){function e(t){for(var e=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);if(n<=127)e.push(n);else if(n<=2047)e.push(192|n>>>6),e.push(128|63&n);else if(n<=65535)e.push(224|n>>>12),e.push(128|n>>>6&63),e.push(128|63&n);else{for(var i=4;n>>>6*i;)i++;for(e.push(65280>>>i&255|n>>>6*--i);i--;)e[idx++]=128|n>>>6*i&63}}return e}var r,i,o,a,s,u,c,l,f,p,h=this,d=44100,y=t.sampleRate;h.setProfile=function(t){r=t.baud,i=t.freqLow,o=t.freqHigh,a=Math.ceil(d/r),s=Math.ceil(40*d/1e3/a),u=t.softmodem?1:2,c=new Float32Array(a),l=new Float32Array(a),f="undefined"!=typeof t.raw&&t.raw,p=t.softmodem,function(){for(var t=2*Math.PI*i/d,e=2*Math.PI*o/d,r=0;r<a;r++)c.set([Math.cos(t*r)],r),l.set([Math.cos(e*r)],r)}(),console.log("new encoder profile: ",t)},h.setProfile(t),h.modulate=function(r){function i(t,e){for(var r=0;r<e;r++)v.set(t?l:c,g),g+=a}var o=f?r:e(r),h=(s+10*o.length+u)*a,v=new Float32Array(h),g=0;i(1,s);for(var b=0;b<o.length;b++)for(var m=o[b]<<1|512,_=0;_<10;_++,m>>=1)i(1&m,1);i(1,1),p||i(0,1),t.debug&&console.log("gen. audio length: "+v.length);var w=new n.Resampler({inRate:d,outRate:y,inputBuffer:v});w.resample(v.length);var E=w.outputBuffer();return t.debug&&console.log("resampled audio length: "+E.length),E}}}),n.Profiles={SoftModem:{baud:1225,freqLow:4900,freqHigh:7350,echoCancellation:!1,softmodem:!0},SoftModemLowFrequencies:{baud:1225,freqLow:2450,freqHigh:4900,echoCancellation:!0,softmodem:!0},Browser:{baud:1225,freqLow:19600,freqHigh:20825,echoCancellation:!1,softmodem:!1}},n.Resampler=Class.extend({init:function(t){function e(t){var e=0;if(t>0){var r=s,n=0,i=0,c=0,e=0;for(r-=1,t-=1,c=Math.floor(r);c<t;)i=r%1,n=1-i,o[e++]=d[c]*n+d[c+1]*i,r+=a,c=Math.floor(r);u[0]=d[c++],s=r%1}return e}function r(){var t=0;if(bufferLength>0){var e=0,r=0,n=0,i=0,l=!c;c=!1;var f=0;do{for(l?(e=a,r=0):(e=s,r=u[0],l=!0);e>0&&n<bufferLength;){if(i=1+n-f,!(e>=i)){r+=d[n]*e,f+=e,e=0;break}r+=d[n++]*i,f=n,e-=i}if(!(e<=0)){s=e,u[0]=r,c=!0;break}o[t++]=r/a}while(n<bufferLength)}return t}function n(t){return t}function i(){var t=Math.ceil(d.length*h/p/1.0000004768371582)+1;try{o=new Float32Array(t),u=new Float32Array(1)}catch(t){o=[],u=[]}}var o,a,s,u,c,l,f=this,p=+t.inRate,h=+t.outRate,d=t.inputBuffer;if("object"!=typeof d)throw new Error("inputBuffer is not an object.");if(!(d instanceof Array||d instanceof Float32Array||d instanceof Float64Array))throw new Error("inputBuffer is not an array or a float32 or a float64 array.");if(!(p>0&&h>0))throw new Error("Invalid settings specified for the resampler.");p==h?(l=n,a=1,o=d):(i(),a=p/h,p<h?(l=e,s=1):(l=r,c=!1,s=0)),f.resample=function(t){return l(t)},f.outputBuffer=function(){return o}}}),n.Connection=Class.extend({init:function(t){function e(t,e){return"undefined"==typeof t?e:t}function r(t){var e=t.inputBuffer,r=e.getChannelData(0);console.log("-- audioprocess data ("+r.length+" samples) --"),a||(l.onReceive=s,a=new n.Decoder(l)),a.decode(r)}function i(t){var e=t.getAudioTracks();console.log("Using audio device: "+e[0].label),console.log("-- samplerate ("+l.sampleRate+") --"),t.active||console.log("Stream not active"),audioSource=c.createMediaStreamSource(t),decoderNode=c.createScriptProcessor(8192,1,1),audioSource.connect(decoderNode),decoderNode.addEventListener("audioprocess",r),decoderNode.connect(c.destination)}function o(t){console.log("navigator.getUserMedia error: ",t)}var a,s,u=this,t=e(t,n.Profiles.SoftModem),c="undefined"==typeof t.audioCtx?new AudioContext:t.audioCtx,l=u.options={sampleRate:c.sampleRate,baud:e(t.baud,1225),freqLow:e(t.freqLow,4900),freqHigh:e(t.freqHigh,7350),debug:e(t.debug,!1),softmodem:e(t.softmodem,!0),raw:e(t.raw,!1),echoCancellation:e(t.echoCancellation,!1)},f=new n.Encoder(l);navigator=t.navigator||navigator,navigator.mediaDevices.getUserMedia({audio:{optional:[{echoCancellation:l.echoCancellation}]},video:!1}).then(i,o),u.history={sent:[],received:[]};var p=[],h=!1;u.send=function(t){function e(t){var r=c.createBufferSource();r.buffer=t,r.connect(c.destination),h=!0,r.start(0),r.onended=function(){h=!1,p.length&&e(p.shift())}}var r=f.modulate(t),n=c.createBuffer(1,r.length,l.sampleRate);n.copyToChannel(r,0),h?p.push(n):e(n),u.history.sent.push(t)},u.listen=function(t){s=function(e){t(e),u.history.received.push(e)}},u.validateJSON=function(t){var e;try{e=JSON.parse(t)}catch(t){return!1}return e},u.setProfile=function(t){f.setProfile(t),"object"==typeof a&&a.setProfile(t)}}})}]); \ No newline at end of file +var Demo=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){r(1),t.exports=r(1)},function(t,e,r){"use strict";function n(t){u=new o(new a(t),s)}var i=r(2),o=i.Board,a=r(57),s={reportVersionTimeout:2500,skipCapabilities:!0},u=new o(new a,s),c=107,l=105,f=122;$(document).ready(function(t){function e(){var t=u.firmware.name+"-"+u.firmware.version.major+"."+u.firmware.version.minor;console.log(t),r.appends("Firmware: "+t)}var r=t(".webjack-log");r.appends=function(t){this.append(t+"<br>"),this.scrollTop(this[0].scrollHeight)},u.sysexResponse(c,function(t){}),u.sysexResponse(l,function(t){}),u.sysexResponse(f,function(t){});var n=t("#digital")[0],i=t("#analog")[0];n.disabled=!0,i.disabled=!0,u.on("ready",function(){e(),r.appends("READY! Press 'Query Capabilities' to enable analogRead."),n.disabled=!1,u.queryAnalogMapping(function(t){i.disabled=!1})}),t("#capab").click(function(){u.queryCapabilities(function(){r.appends("Received capabilities."),u.queryAnalogMapping(function(t){r.appends("Received analog mapping. Ready to read."),i.disabled=!1})})}),t("#firmware").click(function(){u.queryFirmware(function(){e()})}),n.onclick=function(){if(u.isReady){var e=t("#pin").val(),r="0"==t("#state").val()?u.LOW:u.HIGH;console.log("digitalWrite("+e+","+r+")"),u.pinMode(e,u.MODES.OUTPUT),u.digitalWrite(e,r)}},i.onclick=function(){if(u.isReady){var e=t("#apin").val();console.log("analogRead("+e+")"),u.setSamplingInterval(200),u.analogRead(e,function(t){console.log("Received analog value: "+t),r.appends("Analog Pin "+e+": "+t)})}},t("#reset").click(function(){u.reset()})}),t.exports={board:u,setOptions:n}},function(t,e,r){(function(e,n,i){function o(t,e,r){function n(){i.isReady=!0,i.emit("ready"),"function"==typeof r&&r()}if("function"!=typeof e&&"undefined"!=typeof e||(r=e,e={}),!(this instanceof o))return new o(t,e,r);u.call(this);var i=this,a={reportVersionTimeout:5e3,samplingInterval:19,serialport:{baudRate:57600,bufferSize:1}},s=Object.assign({},a,e);this.isReady=!1,this.MODES={INPUT:0,OUTPUT:1,ANALOG:2,PWM:3,SERVO:4,SHIFT:5,I2C:6,ONEWIRE:7,STEPPER:8,SERIAL:10,IGNORE:127,PING_READ:117,UNKOWN:16},this.I2C_MODES={WRITE:0,READ:1,CONTINUOUS_READ:2,STOP_READING:3},this.STEPPER={TYPE:{DRIVER:1,TWO_WIRE:2,FOUR_WIRE:4},RUNSTATE:{STOP:0,ACCEL:1,DECEL:2,RUN:3},DIRECTION:{CCW:0,CW:1}},this.SERIAL_MODES={CONTINUOUS_READ:0,STOP_READING:1},this.SERIAL_PORT_IDs={HW_SERIAL0:0,HW_SERIAL1:1,HW_SERIAL2:2,HW_SERIAL3:3,SW_SERIAL0:8,SW_SERIAL1:9,SW_SERIAL2:16,SW_SERIAL3:17,DEFAULT:8},this.SERIAL_PIN_TYPES={RES_RX0:0,RES_TX0:1,RES_RX1:2,RES_TX1:3,RES_RX2:4,RES_TX2:5,RES_RX3:6,RES_TX3:7},this.HIGH=1,this.LOW=0,this.pins=[],this.analogPins=[],this.version={},this.firmware={},this.currentBuffer=[],this.versionReceived=!1,this.name="Firmata",this.settings=s,"object"==typeof t?this.transport=t:this.transport=new f.SerialPort(t,s.serialport),this.sp=this.transport,this.transport.on("close",function(){this.emit("close")}.bind(this)),this.transport.on("disconnect",function(){this.emit("disconnect")}.bind(this)),this.transport.on("open",function(){this.emit("open"),this.emit("connect")}.bind(this)),this.transport.on("error",function(t){this.isReady||"function"!=typeof r?this.emit("error",t):r(t)}.bind(this)),this.transport.on("data",function(t){for(var e,r,n,i,o,a,s=0;s<t.length;s++)e=t[s],0===this.currentBuffer.length&&0===e||(this.currentBuffer.push(e),i=this.currentBuffer[0],o=this.currentBuffer[this.currentBuffer.length-1],i===et&&o===m?(a=st[this.currentBuffer[1]],a&&this.versionReceived&&(a(this),this.currentBuffer.length=0)):i===et&&s>0?(r=this.currentBuffer[s],r>127&&(this.currentBuffer.length=0,this.currentBuffer.push(r))):i!==et&&(n=i<et?i&et:i,n!==H&&n!==y&&n!==b&&(this.currentBuffer.length=0)),3===this.currentBuffer.length&&i!==et&&(n=i<et?i&et:i,at[n]?((this.versionReceived||i===H)&&(this.versionReceived=!0,at[n](this)),this.currentBuffer.length=0):this.currentBuffer.length=0))}.bind(this)),this.reportVersionTimeoutId=setTimeout(function(){this.versionReceived===!1&&(this.reportVersion(function(){}),this.queryFirmware(function(){}))}.bind(this),s.reportVersionTimeout),this.once("reportversion",function(){clearTimeout(this.reportVersionTimeoutId),this.versionReceived=!0,this.once("queryfirmware",function(){if(void 0!==e.samplingInterval&&this.setSamplingInterval(e.samplingInterval),s.skipCapabilities){if(this.analogPins=s.analogPins||this.analogPins,this.pins=s.pins||this.pins,!this.pins.length)for(var t=0;t<(s.pinCount||ot);t++){var r=this.analogPins.indexOf(t);r<0&&(r=127),this.pins.push({supportedModes:[],analogChannel:r})}n()}else this.queryCapabilities(function(){this.queryAnalogMapping(n)})})})}function a(t,e){var r=p.get(t);if(!r)throw new Error("I2C is not enabled for this board. To enable, call the i2cConfig() method.");if(e[1]===O){var n=e[2];r[n]||(r[n]={stopTX:!0}),e[3]&j&&(e[3]|=Number(!r[n].stopTX)<<6)}t.transport.write(new i(e))}Object.assign&&Map||r(8);var s=r(9),u=r(12).EventEmitter,c=r(13),l=r(14),f=null,p=new Map;try{f=r(e.browser||parseFloat(e.versions.nw)>=.13?15:n.IS_TEST_MODE?!function(){var t=new Error('Cannot find module "../test/MockSerialPort"');throw t.code="MODULE_NOT_FOUND",t}():16)}catch(t){}if(null==f)throw console.log("It looks like serialport didn't compile properly. This is a common problem and its fix is well documented here https://github.com/voodootikigod/node-serialport#to-install"),"Missing serialport dependency";var h=105,d=106,y=224,v=107,g=108,b=144,m=247,_=111,w=120,E=119,O=118,j=24,S=65,T=115,C=16,x=67,P=8,R=1,A=69,k=68,I=66,M=64,N=60,F=32,B=244,L=109,D=110,U=117,W=121,z=192,q=208,H=249,V=122,$=112,G=96,Y=16,X=32,Q=48,J=64,Z=80,K=96,tt=112,et=240,rt=114,nt=113,it=255,ot=128,at={};at[H]=function(t){t.version.major=t.currentBuffer[1],t.version.minor=t.currentBuffer[2],t.emit("reportversion")},at[y]=function(t){var e=t.currentBuffer[1]|t.currentBuffer[2]<<7,r=15&t.currentBuffer[0];t.pins[t.analogPins[r]]&&(t.pins[t.analogPins[r]].value=e),t.emit("analog-read-"+r,e),t.emit("analog-read",{pin:r,value:e})},at[b]=function(t){for(var e=15&t.currentBuffer[0],r=t.currentBuffer[1]|t.currentBuffer[2]<<7,n=0;n<8;n++){var i=8*e+n,o=t.pins[i];o&&o.mode===t.MODES.INPUT&&(o.value=r>>(7&n)&1,t.emit("digital-read-"+i,o.value),t.emit("digital-read",{pin:i,value:o.value}))}};var st={};st[W]=function(t){for(var e=t.currentBuffer.length-2,r=new i(Math.round((e-4)/2)),n=0,o=0,a=4;a<e;a+=2)n=127&t.currentBuffer[a]|(127&t.currentBuffer[a+1])<<7,r.writeUInt8(n,o++);t.firmware={name:r.toString(),version:{major:t.currentBuffer[2],minor:t.currentBuffer[3]}},t.emit("queryfirmware")},st[g]=function(t){function e(t){return r.reduce(function(e,r,n){return t&1<<r&&e.push(r),e},[])}var r=Object.keys(t.MODES).map(function(e){return t.MODES[e]}),n=0;if(!t.pins.length)for(var i=2,o=0;i<t.currentBuffer.length-1;i++)127!==t.currentBuffer[i]?(0===o&&(n|=1<<t.currentBuffer[i]),o^=1):(t.pins.push({supportedModes:e(n),mode:void 0,value:0,report:1}),n=0,o=0);t.emit("capability-query")},st[D]=function(t){var e=t.currentBuffer[2];t.pins[e].mode=t.currentBuffer[3],t.pins[e].state=t.currentBuffer[4],t.currentBuffer.length>6&&(t.pins[e].state|=t.currentBuffer[5]<<7),t.currentBuffer.length>7&&(t.pins[e].state|=t.currentBuffer[6]<<14),t.emit("pin-state-"+e)},st[d]=function(t){for(var e,r=0,n=2;n<t.currentBuffer.length-1;n++)e=t.currentBuffer[n],t.pins[r].analogChannel=e,127!==e&&t.analogPins.push(r),r++;t.emit("analog-mapping-query")},st[E]=function(t){for(var e=[],r=127&t.currentBuffer[2]|(127&t.currentBuffer[3])<<7,n=127&t.currentBuffer[4]|(127&t.currentBuffer[5])<<7,i=6,o=t.currentBuffer.length-1;i<o;i+=2)e.push(t.currentBuffer[i]|t.currentBuffer[i+1]<<7);t.emit("I2C-reply-"+r+"-"+n,e)},st[T]=function(t){var e=t.currentBuffer[2];st[e]&&st[e](t)},st[I]=function(t){var e=t.currentBuffer[3],r=t.currentBuffer.slice(4,t.currentBuffer.length-1);t.emit("1-wire-search-reply-"+e,l.readDevices(r))},st[A]=function(t){var e=t.currentBuffer[3],r=t.currentBuffer.slice(4,t.currentBuffer.length-1);t.emit("1-wire-search-alarms-reply-"+e,l.readDevices(r))},st[x]=function(t){var e=t.currentBuffer.slice(4,t.currentBuffer.length-1),r=c.from7BitArray(e),n=r[1]<<8|r[0];t.emit("1-wire-read-reply-"+n,r.slice(2))},st[nt]=function(t){var e=new i(t.currentBuffer.slice(2,-1)).toString("utf8").replace(/\0/g,"");t.emit("string",e)},st[U]=function(t){var e=127&t.currentBuffer[2]|(127&t.currentBuffer[3])<<7,r=[127&t.currentBuffer[4]|(127&t.currentBuffer[5])<<7,127&t.currentBuffer[6]|(127&t.currentBuffer[7])<<7,127&t.currentBuffer[8]|(127&t.currentBuffer[9])<<7,127&t.currentBuffer[10]|(127&t.currentBuffer[11])<<7],n=(r[0]<<24)+(r[1]<<16)+(r[2]<<8)+r[3];t.emit("ping-read-"+e,n)},st[rt]=function(t){var e=t.currentBuffer[2];t.emit("stepper-done-"+e,!0)},st[G]=function(t){var e=240&t.currentBuffer[2],r=15&t.currentBuffer[2],n=[];if(e===J){for(var i=3,o=t.currentBuffer.length;i<o-1;i+=2)n.push(t.currentBuffer[i+1]<<7|t.currentBuffer[i]);t.emit("serial-data-"+r,n)}},s.inherits(o,u),o.prototype.reportVersion=function(t){this.once("reportversion",t),this.transport.write(new i([H]))},o.prototype.queryFirmware=function(t){this.once("queryfirmware",t),this.transport.write(new i([et,W,m]))},o.prototype.analogRead=function(t,e){this.reportAnalogPin(t,1),this.addListener("analog-read-"+t,e)},o.prototype.analogWrite=function(t,e){var r=[];this.pins[t].value=e,t>15?(r[0]=et,r[1]=_,r[2]=t,r[3]=127&e,r[4]=e>>7&127,e>16384&&(r[r.length]=e>>14&127),e>2097152&&(r[r.length]=e>>21&127),e>268435456&&(r[r.length]=e>>28&127),r[r.length]=m):r.push(y|t,127&e,e>>7&127),this.transport.write(new i(r))},o.prototype.pwmWrite=o.prototype.analogWrite,o.prototype.servoConfig=function(t,e,r){var n;if("object"==typeof t&&null!==t&&(n=t,t=n.pin,e=n.min,r=n.max),"undefined"==typeof t)throw new Error("servoConfig: pin must be specified");if("undefined"==typeof e)throw new Error("servoConfig: min must be specified");if("undefined"==typeof r)throw new Error("servoConfig: max must be specified");var o=[et,$,t,127&e,e>>7&127,127&r,r>>7&127,m];this.pins[t].mode=this.MODES.SERVO,this.transport.write(new i(o))},o.prototype.servoWrite=function(t,e){this.analogWrite.apply(this,arguments)},o.prototype.pinMode=function(t,e){this.pins[t].mode=e,this.transport.write(new i([B,t,e]))},o.prototype.digitalWrite=function(t,e){var r,n=Math.floor(t/8),o=0;this.pins[t].value=e;for(var a=0;a<8;a++)r=this.pins[8*n+a],r&&r.value&&(o|=1<<a);this.transport.write(new i([b|n,127&o,o>>7&127]))},o.prototype.digitalRead=function(t,e){this.reportDigitalPin(t,1),this.addListener("digital-read-"+t,e)},o.prototype.queryCapabilities=function(t){this.once("capability-query",t),this.transport.write(new i([et,v,m]))},o.prototype.queryAnalogMapping=function(t){this.once("analog-mapping-query",t),this.transport.write(new i([et,h,m]))},o.prototype.queryPinState=function(t,e){this.once("pin-state-"+t,e),this.transport.write(new i([et,L,t,m]))},o.prototype.sendString=function(t){var e=new i(t+"\0","utf8"),r=[];r.push(et),r.push(nt);for(var n=0,o=e.length;n<o;n++)r.push(127&e[n]),r.push(e[n]>>7&127);r.push(m),this.transport.write(r)},o.prototype.sendI2CConfig=function(t){return this.i2cConfig(t)},o.prototype.i2cConfig=function(t){var e,r=p.get(this);return r||(r={},p.set(this,r)),"number"==typeof t?e=t:"object"==typeof t&&null!==t&&(e=Number(t.delay),"undefined"!=typeof t.address&&(r[t.address]||(r[t.address]={stopTX:!0}),t.settings,Object.assign(r[t.address],t.settings))),r.delay=e=e||0,a(this,[et,w,255&e,e>>8&255,m]),this},o.prototype.sendI2CWriteRequest=function(t,e){var r=[];e=e||[],r.push(et,O,t,this.I2C_MODES.WRITE<<3);for(var n=0,i=e.length;n<i;n++)r.push(127&e[n],e[n]>>7&127);r.push(m),a(this,r)},o.prototype.i2cWrite=function(t,e,r){var n,o=[et,O,t,this.I2C_MODES.WRITE<<3];if(3===arguments.length&&!Array.isArray(e)&&!Array.isArray(r))return this.i2cWriteReg(t,e,r);2===arguments.length&&(Array.isArray(e)?(r=e.slice(),e=r.shift()):r=[]),n=new i([e].concat(r));for(var s=0,u=n.length;s<u;s++)o.push(127&n[s],n[s]>>7&127);return o.push(m),a(this,o),this},o.prototype.i2cWriteReg=function(t,e,r){return a(this,[et,O,t,this.I2C_MODES.WRITE<<3,127&e,e>>7&127,127&r,r>>7&127,m]),this},o.prototype.sendI2CReadRequest=function(t,e,r){a(this,[et,O,t,this.I2C_MODES.READ<<3,127&e,e>>7&127,m]),this.once("I2C-reply-"+t+"-0",r)},o.prototype.i2cRead=function(t,e,r,n){3===arguments.length&&"number"==typeof e&&"function"==typeof r&&(n=r,r=e,e=null);var i="I2C-reply-"+t+"-",o=[et,O,t,this.I2C_MODES.CONTINUOUS_READ<<3];return null!==e?o.push(127&e,e>>7&127):e=0,i+=e,o.push(127&r,r>>7&127,m),this.on(i,n),a(this,o),this},o.prototype.i2cReadOnce=function(t,e,r,n){3===arguments.length&&"number"==typeof e&&"function"==typeof r&&(n=r,r=e,e=null);var i="I2C-reply-"+t+"-",o=[et,O,t,this.I2C_MODES.READ<<3];return null!==e?o.push(127&e,e>>7&127):e=0,i+=e,o.push(127&r,r>>7&127,m),this.once(i,n),a(this,o),this},o.prototype.sendOneWireConfig=function(t,e){this.transport.write(new i([et,T,S,t,e?1:0,m]))},o.prototype.sendOneWireSearch=function(t,e){this._sendOneWireSearch(M,"1-wire-search-reply-"+t,t,e)},o.prototype.sendOneWireAlarmsSearch=function(t,e){this._sendOneWireSearch(k,"1-wire-search-alarms-reply-"+t,t,e)},o.prototype._sendOneWireSearch=function(t,e,r,n){this.transport.write(new i([et,T,t,r,m]));var o=setTimeout(function(){n(new Error("1-Wire device search timeout - are you running ConfigurableFirmata?"))},5e3);this.once(e,function(t){clearTimeout(o),n(null,t)})},o.prototype.sendOneWireRead=function(t,e,r,n){var i=Math.floor(255*Math.random()),o=setTimeout(function(){n(new Error("1-Wire device read timeout - are you running ConfigurableFirmata?"))},5e3);this._sendOneWireRequest(t,P,e,r,i,null,null,"1-wire-read-reply-"+i,function(t){clearTimeout(o),n(null,t)})},o.prototype.sendOneWireReset=function(t){this._sendOneWireRequest(t,R)},o.prototype.sendOneWireWrite=function(t,e,r){this._sendOneWireRequest(t,F,e,null,null,null,Array.isArray(r)?r:[r])},o.prototype.sendOneWireDelay=function(t,e){this._sendOneWireRequest(t,C,null,null,null,e)},o.prototype.sendOneWireWriteAndRead=function(t,e,r,n,i){var o=Math.floor(255*Math.random()),a=setTimeout(function(){i(new Error("1-Wire device read timeout - are you running ConfigurableFirmata?"))},5e3);this._sendOneWireRequest(t,F|P,e,n,o,null,Array.isArray(r)?r:[r],"1-wire-read-reply-"+o,function(t){clearTimeout(a),i(null,t)})},o.prototype._sendOneWireRequest=function(t,e,r,n,o,a,s,u,l){var f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];(r||n||o||a||s)&&(e|=N),r&&f.splice.apply(f,[0,8].concat(r)),n&&(f[8]=255&n,f[9]=n>>8&255),o&&(f[10]=255&o,f[11]=o>>8&255),a&&(f[12]=255&a,f[13]=a>>8&255,f[14]=a>>16&255,f[15]=a>>24&255),s&&s.forEach(function(t){f.push(t)});var p=[et,T,e,t];p=p.concat(c.to7BitArray(f)),p.push(m),this.transport.write(new i(p)),u&&l&&this.once(u,l)},o.prototype.setSamplingInterval=function(t){var e=t<10?10:t>65535?65535:t;this.settings.samplingInterval=e,this.transport.write(new i([et,V,127&e,e>>7&127,m]))},o.prototype.getSamplingInterval=function(t){return this.settings.samplingInterval},o.prototype.reportAnalogPin=function(t,e){0!==e&&1!==e||(this.pins[this.analogPins[t]].report=e,this.transport.write(new i([z|t,e])))},o.prototype.reportDigitalPin=function(t,e){var r=Math.floor(t/8);0!==e&&1!==e||(this.pins[t].report=e,this.transport.write(new i([q|r,e])))},o.prototype.pingRead=function(t,e){if(this.pins[t.pin].supportedModes.indexOf(U)===-1)throw new Error("Please upload PingFirmata to the board");var r=t.pin,n=t.value,o=t.pulseOut||0,a=t.timeout||1e6,s=[o>>24&255,o>>16&255,o>>8&255,255&o],u=[a>>24&255,a>>16&255,a>>8&255,255&a],c=[et,U,r,n,127&s[0],s[0]>>7&127,127&s[1],s[1]>>7&127,127&s[2],s[2]>>7&127,127&s[3],s[3]>>7&127,127&u[0],u[0]>>7&127,127&u[1],u[1]>>7&127,127&u[2],u[2]>>7&127,127&u[3],u[3]>>7&127,m];this.transport.write(new i(c)),this.once("ping-read-"+r,e)},o.prototype.stepperConfig=function(t,e,r,n,o,a,s){var u=[et,rt,0,t,e,127&r,r>>7&127,n,o];e===this.STEPPER.TYPE.FOUR_WIRE&&u.push(a,s),u.push(m),this.transport.write(new i(u))},o.prototype.stepperStep=function(t,e,r,n,o,a,s){"function"==typeof o&&(s=o,o=0,a=0);var u=[et,rt,1,t,e,127&r,r>>7&127,r>>14&127,127&n,n>>7&127];(o>0||a>0)&&u.push(127&o,o>>7&127,127&a,a>>7&127),u.push(m),this.transport.write(new i(u)),this.once("stepper-done-"+t,s)},o.prototype.serialConfig=function(t){var e,r,n,o;if("object"==typeof t&&null!==t&&(e=t.portId,r=t.baud,n=t.rxPin,o=t.txPin),"undefined"==typeof e)throw new Error("portId must be specified, see SERIAL_PORT_IDs for options.");r=r||57600;var a=[et,G,Y|e,127&r,r>>7&127,r>>14&127];if(e>7&&"undefined"!=typeof n&&"undefined"!=typeof o)a.push(n),a.push(o);else if(e>7)throw new Error("Both RX and TX pins must be defined when using Software Serial.");a.push(m),this.transport.write(new i(a))},o.prototype.serialWrite=function(t,e){for(var r=[et,G,X|t],n=0,o=e.length;n<o;n++)r.push(127&e[n]),r.push(e[n]>>7&127);r.push(m),r.length>0&&this.transport.write(new i(r))},o.prototype.serialRead=function(t,e,r){var n=[et,G,Q|t,this.SERIAL_MODES.CONTINUOUS_READ];2===arguments.length&&"function"==typeof e?r=e:(n.push(127&e),n.push(e>>7&127)),n.push(m),this.transport.write(new i(n)),this.on("serial-data-"+t,r)},o.prototype.serialStop=function(t){var e=[et,G,Q|t,this.SERIAL_MODES.STOP_READING,m];this.transport.write(new i(e)),this.removeAllListeners("serial-data-"+t)},o.prototype.serialClose=function(t){var e=[et,G,Z|t,m];this.transport.write(new i(e))},o.prototype.serialFlush=function(t){var e=[et,G,K|t,m];this.transport.write(new i(e))},o.prototype.serialListen=function(t){if(!(t<8)){var e=[et,G,tt|t,m];this.transport.write(new i(e))}},o.prototype.sysexResponse=function(t,e){if(o.SYSEX_RESPONSE[t])throw new Error(t+" is not an available SYSEX_RESPONSE byte");return o.SYSEX_RESPONSE[t]=function(t){e(t.currentBuffer.slice(2,-1))},this},o.prototype.sysexCommand=function(t){if(!t.length)throw new Error("Sysex Command cannot be empty");var e=t.slice();return e.unshift(et),e.push(m),this.transport.write(new i(e)),this},o.prototype.reset=function(){this.transport.write(new i([it]))},o.isAcceptablePort=function(t){var e=/usb|acm|^com/i;return!!e.test(t.comName)},o.requestPort=function(t){f.list(function(e,r){var n=r.find(function(t){if(o.isAcceptablePort(t))return t});n?t(null,n):t(new Error("No Acceptable Port Found"),null)})},o.Board=o,o.SYSEX_RESPONSE=st,o.MIDI_RESPONSE=at,o.encode=function(t){for(var e=[],r=t.length,n=0;n<r;n++)e.push(127&t[n],t[n]>>7&127);return e},o.decode=function(t){var e=[];if(t.length%2!==0)throw new Error("Board.decode(data) called with odd number of data bytes");for(;t.length;){var r=t.shift(),n=t.shift();e.push(r|n<<7)}return e},n.IS_TEST_MODE&&(o.test={i2cPeripheralSettings:function(t){return p.get(t)},get i2cActive(){return p}}),t.exports=o}).call(e,r(3),function(){return this}(),r(4).Buffer)},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===n||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){y&&h&&(y=!1,h.length?d=h.concat(d):v=-1,d.length&&s())}function s(){if(!y){var t=i(a);y=!0;for(var e=d.length;e;){for(h=d,d=[];++v<e;)h&&h[v].run();v=-1,e=d.length}h=null,y=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var l,f,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(t){l=r}try{f="function"==typeof clearTimeout?clearTimeout:n}catch(t){f=n}}();var h,d=[],y=!1,v=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];d.push(new u(t,e)),1!==d.length||y||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e,r){(function(t,n){"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,r){if(o()<r)throw new RangeError("Invalid typed array length");return t.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(r),e.__proto__=t.prototype):(null===e&&(e=new t(r)),e.length=r),e}function t(e,r,n){if(!(t.TYPED_ARRAY_SUPPORT||this instanceof t))return new t(e,r,n);if("number"==typeof e){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return s(this,e,r,n)}function s(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?h(t,e,r,n):"string"==typeof e?f(t,e,r):d(t,e)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,e,r,n){return u(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}function l(e,r){if(u(r),e=a(e,r<0?0:0|y(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)e[n]=0;return e}function f(e,r,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|g(r,n);e=a(e,i);var o=e.write(r,n);return o!==i&&(e=e.slice(0,o)),e}function p(t,e){var r=e.length<0?0:0|y(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function h(e,r,n,i){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(i||0))throw new RangeError("'length' is out of bounds");return r=void 0===n&&void 0===i?new Uint8Array(r):void 0===i?new Uint8Array(r,n):new Uint8Array(r,n,i),t.TYPED_ARRAY_SUPPORT?(e=r,e.__proto__=t.prototype):e=p(e,r),e}function d(e,r){if(t.isBuffer(r)){var n=0|y(r.length);return e=a(e,n),0===e.length?e:(r.copy(e,0,0,n),e)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||Q(r.length)?a(e,0):p(e,r);if("Buffer"===r.type&&K(r.data))return p(e,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function v(e){return+e!=e&&(e=0),t.alloc(+e)}function g(e,r){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(i)return V(e).length;r=(""+r).toLowerCase(),i=!0}}function b(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,r<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return P(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return k(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:w(e,r,n,i,o);if("number"==typeof r)return r&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):w(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){function o(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,u=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"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}var c;if(i){var l=-1;for(c=r;c<s;c++)if(o(t,c)===o(e,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===u)return l*a}else l!==-1&&(c-=c-l),l=-1}else for(r+u>s&&(r=s-u),c=r;c>=0;c--){for(var f=!0,p=0;p<u;p++)if(o(t,c+p)!==o(e,p)){f=!1;break}if(f)return c}return-1}function E(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(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<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function O(t,e,r,n){return X(V(e,t.length-r),t,r,n)}function j(t,e,r,n){return X($(e),t,r,n)}function S(t,e,r,n){return j(t,e,r,n)}function T(t,e,r,n){return X(Y(e),t,r,n)}function C(t,e,r,n){return X(G(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?J.fromByteArray(t):J.fromByteArray(t.slice(e,r))}function P(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o=t[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=r){var u,c,l,f;switch(s){case 1:o<128&&(a=o);break;case 2:u=t[i+1],128===(192&u)&&(f=(31&o)<<6|63&u,f>127&&(a=f));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(f=(15&o)<<12|(63&u)<<6|63&c,f>2047&&(f<55296||f>57343)&&(a=f));break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l,f>65535&&f<1114112&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return R(n)}function R(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return r}function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function k(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function I(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=H(t[o]);return i}function M(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function N(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function F(e,r,n,i,o,a){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function B(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function L(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function D(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 U(t,e,r,n,i){return i||D(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(t,e,r,n,23,4),r+4}function W(t,e,r,n,i){return i||D(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(t,e,r,n,52,8),r+8}function z(t){if(t=q(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function q(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return t<16?"0"+t.toString(16):t.toString(16)}function V(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&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=(i-55296<<10|r-56320)+65536}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 $(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function G(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function Y(t){return J.toByteArray(z(t))}function X(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Q(t){return t!==t}var J=r(5),Z=r(6),K=r(7);e.Buffer=t,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=o(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,r){return s(null,t,e,r)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,r){return c(null,t,e,r)},t.allocUnsafe=function(t){return l(null,t)},t.allocUnsafeSlow=function(t){return l(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,r){if(!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(e===r)return 0;for(var n=e.length,i=r.length,o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!K(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!t.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i},t.byteLength=g,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)m(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?P(this,0,t):b.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){ +var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(e,r,n,i,o){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,i>>>=0,o>>>=0,this===e)return 0;for(var a=o-i,s=n-r,u=Math.min(a,s),c=this.slice(i,o),l=e.slice(r,n),f=0;f<u;++f)if(c[f]!==l[f]){a=c[f],s=l[f];break}return a<s?-1:s<a?1:0},t.prototype.includes=function(t,e,r){return this.indexOf(t,e,r)!==-1},t.prototype.indexOf=function(t,e,r){return _(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return _(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(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 E(this,t,e,r);case"utf8":case"utf-8":return O(this,t,e,r);case"ascii":return j(this,t,e,r);case"latin1":case"binary":return S(this,t,e,r);case"base64":return T(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<e&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=this.subarray(e,r),i.__proto__=t.prototype;else{var o=r-e;i=new t(o,void 0);for(var a=0;a<o;++a)i[a]=this[a+e]}return i},t.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},t.prototype.readUInt8=function(t,e){return e||N(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||N(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||N(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||N(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return e||N(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(t,e){e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(t,e){return e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||N(t,4,this.length),Z.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||N(t,4,this.length),Z.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||N(t,8,this.length),Z.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||N(t,8,this.length),Z.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;F(this,t,e,r,i,0)}var o=1,a=0;for(this[e]=255&t;++a<r&&(o*=256);)this[e+a]=t/o&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;F(this,t,e,r,i,0)}var o=r-1,a=1;for(this[e+o]=255&t;--o>=0&&(a*=256);)this[e+o]=t/a&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},t.prototype.writeUInt16LE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):B(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):B(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):L(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):L(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);F(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);F(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},t.prototype.writeInt8=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):B(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):B(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):L(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r|=0,n||F(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):L(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return W(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return W(this,t,e,!1,r)},t.prototype.copy=function(e,r,n,i){if(n||(n=0),i||0===i||(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o,a=i-n;if(this===e&&n<r&&r<i)for(o=a-1;o>=0;--o)e[o+r]=this[o+n];else if(a<1e3||!t.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+r]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),r);return a},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=r;a<n;++a)this[a]=e;else{var s=t.isBuffer(e)?e:V(new t(e,i).toString()),u=s.length;for(a=0;a<n-r;++a)this[a+r]=s[a%u]}return this};var et=/[^+\/0-9A-Za-z-_]/g}).call(e,r(4).Buffer,function(){return this}())},function(t,e){"use strict";function r(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-r(t)}function i(t){var e,n,i,o,a,s,u=t.length;a=r(t),s=new l(3*u/4-a),i=a>0?u-4:u;var f=0;for(e=0,n=0;e<i;e+=4,n+=3)o=c[t.charCodeAt(e)]<<18|c[t.charCodeAt(e+1)]<<12|c[t.charCodeAt(e+2)]<<6|c[t.charCodeAt(e+3)],s[f++]=o>>16&255,s[f++]=o>>8&255,s[f++]=255&o;return 2===a?(o=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,s[f++]=255&o):1===a&&(o=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,s[f++]=o>>8&255,s[f++]=255&o),s}function o(t){return u[t>>18&63]+u[t>>12&63]+u[t>>6&63]+u[63&t]}function a(t,e,r){for(var n,i=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(o(n));return i.join("")}function s(t){for(var e,r=t.length,n=r%3,i="",o=[],s=16383,c=0,l=r-n;c<l;c+=s)o.push(a(t,c,c+s>l?l:c+s));return 1===n?(e=t[r-1],i+=u[e>>2],i+=u[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=u[e>>10],i+=u[e>>4&63],i+=u[e<<2&63],i+="="),o.push(i),o.join("")}e.byteLength=n,e.toByteArray=i,e.fromByteArray=s;for(var u=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,h=f.length;p<h;++p)u[p]=f[p],c[f.charCodeAt(p)]=p;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,p=r?-1:1,h=t[e+f];for(f+=p,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,n),o-=c}return(h?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-1,d=n?1:-1,y=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=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),e+=a+f>=1?p/u:p*Math.pow(2,1-f),e*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):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+h]=255&s,h+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[r+h]=255&a,h+=d,a/=256,c-=8);t[r+h-d]|=128*y}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){var n,i;(function(o,a){!function(o,a){n=a,i="function"==typeof n?n.call(e,r,e,t):n,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";var t,e=Function.call.bind(Function.apply),r=Function.call.bind(Function.call),n=Array.isArray,i=function(t){return function(){return!e(t,this,arguments)}},s=function(t){try{return t(),!1}catch(t){return!0}},u=function(t){try{return t()}catch(t){return!1}},c=i(s),l=function(){return!s(function(){Object.defineProperty({},"x",{get:function(){}})})},f=!!Object.defineProperty&&l(),p="foo"===function(){}.name,h=Function.call.bind(Array.prototype.forEach),d=Function.call.bind(Array.prototype.reduce),y=Function.call.bind(Array.prototype.filter),v=Function.call.bind(Array.prototype.some),g=function(t,e,r,n){!n&&e in t||(f?Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:r}):t[e]=r)},b=function(t,e){h(Object.keys(e),function(r){var n=e[r];g(t,r,n,!1)})},m=Object.create||function(t,e){var r=function(){};r.prototype=t;var n=new r;return"undefined"!=typeof e&&Object.keys(e).forEach(function(t){Q.defineByDescriptor(n,t,e[t])}),n},_=function(t,e){return!!Object.setPrototypeOf&&u(function(){var r=function e(r){var n=new t(r);return Object.setPrototypeOf(n,e.prototype),n};return Object.setPrototypeOf(r,t),r.prototype=m(t.prototype,{constructor:{value:r}}),e(r)})},w=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof o)return o;throw new Error("unable to locate global object")},E=w(),O=E.isFinite,j=Function.call.bind(String.prototype.indexOf),S=Function.call.bind(Object.prototype.toString),T=Function.call.bind(Array.prototype.concat),C=Function.call.bind(String.prototype.slice),x=Function.call.bind(Array.prototype.push),P=Function.apply.bind(Array.prototype.push),R=Function.call.bind(Array.prototype.shift),A=Math.max,k=Math.min,I=Math.floor,M=Math.abs,N=Math.log,F=Math.sqrt,B=Function.call.bind(Object.prototype.hasOwnProperty),L=function(){},D=E.Symbol||{},U=D.species||"@@species",W=Number.isNaN||function(t){return t!==t},z=Number.isFinite||function(t){return"number"==typeof t&&O(t)},q=function(t){return"[object Arguments]"===S(t)},H=function(t){return null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==S(t)&&"[object Function]"===S(t.callee)},V=q(arguments)?q:H,$={primitive:function(t){return null===t||"function"!=typeof t&&"object"!=typeof t},object:function(t){return null!==t&&"object"==typeof t},string:function(t){return"[object String]"===S(t)},regex:function(t){return"[object RegExp]"===S(t)},symbol:function(t){return"function"==typeof E.Symbol&&"symbol"==typeof t}},G=$.symbol(D.iterator)?D.iterator:"_es6-shim iterator_";E.Set&&"function"==typeof(new E.Set)["@@iterator"]&&(G="@@iterator"),E.Reflect||g(E,"Reflect",{});var Y=E.Reflect,X={Call:function(t,r){var n=arguments.length>2?arguments[2]:[];if(!X.IsCallable(t))throw new TypeError(t+" is not a function");return e(t,r,n)},RequireObjectCoercible:function(t,e){if(null==t)throw new TypeError(e||"Cannot call method on "+t)},TypeIsObject:function(t){return null!=t&&Object(t)===t},ToObject:function(t,e){return X.RequireObjectCoercible(t,e),Object(t)},IsCallable:function(t){return"function"==typeof t&&"[object Function]"===S(t)},IsConstructor:function(t){return X.IsCallable(t)},ToInt32:function(t){return X.ToNumber(t)>>0},ToUint32:function(t){return X.ToNumber(t)>>>0},ToNumber:function(t){if("[object Symbol]"===S(t))throw new TypeError("Cannot convert a Symbol value to a number");return+t},ToInteger:function(t){var e=X.ToNumber(t);return W(e)?0:0!==e&&z(e)?(e>0?1:-1)*I(M(e)):e},ToLength:function(t){var e=X.ToInteger(t);return e<=0?0:e>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:e},SameValue:function(t,e){return t===e?0!==t||1/t===1/e:W(t)&&W(e)},SameValueZero:function(t,e){return t===e||W(t)&&W(e)},IsIterable:function(t){return X.TypeIsObject(t)&&("undefined"!=typeof t[G]||V(t))},GetIterator:function(e){if(V(e))return new t(e,"value");var n=X.GetMethod(e,G);if(!X.IsCallable(n))throw new TypeError("value is not an iterable");var i=r(n,e);if(!X.TypeIsObject(i))throw new TypeError("bad iterator");return i},GetMethod:function(t,e){var r=X.ToObject(t)[e];if(void 0!==r&&null!==r){if(!X.IsCallable(r))throw new TypeError("Method not callable: "+e);return r}},IteratorComplete:function(t){return!!t.done},IteratorClose:function(t,e){var n=X.GetMethod(t,"return");if(void 0!==n){var i,o;try{i=r(n,t)}catch(t){o=t}if(!e){if(o)throw o;if(!X.TypeIsObject(i))throw new TypeError("Iterator's return method returned a non-object.")}}},IteratorNext:function(t){var e=arguments.length>1?t.next(arguments[1]):t.next();if(!X.TypeIsObject(e))throw new TypeError("bad iterator");return e},IteratorStep:function(t){var e=X.IteratorNext(t),r=X.IteratorComplete(e);return!r&&e},Construct:function(t,e,r,n){var i="undefined"==typeof r?t:r;if(!n)return Y.construct(t,e,i);var o=i.prototype;X.TypeIsObject(o)||(o=Object.prototype);var a=m(o),s=X.Call(t,a,e);return X.TypeIsObject(s)?s:a},SpeciesConstructor:function(t,e){var r=t.constructor;if(void 0===r)return e;if(!X.TypeIsObject(r))throw new TypeError("Bad constructor");var n=r[U];if(void 0===n||null===n)return e;if(!X.IsConstructor(n))throw new TypeError("Bad @@species");return n},CreateHTML:function(t,e,r,n){var i=String(t),o="<"+e;if(""!==r){var a=String(n),s=a.replace(/"/g,""");o+=" "+r+'="'+s+'"'}var u=o+">",c=u+i;return c+"</"+e+">"}},Q={getter:function(t,e,r){if(!f)throw new TypeError("getters require true ES5 support");Object.defineProperty(t,e,{configurable:!0,enumerable:!1,get:r})},proxy:function(t,e,r){if(!f)throw new TypeError("getters require true ES5 support");var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,{configurable:n.configurable,enumerable:n.enumerable,get:function(){return t[e]},set:function(r){t[e]=r}})},redefine:function(t,e,r){if(f){var n=Object.getOwnPropertyDescriptor(t,e);n.value=r,Object.defineProperty(t,e,n)}else t[e]=r},defineByDescriptor:function(t,e,r){f?Object.defineProperty(t,e,r):"value"in r&&(t[e]=r.value)},preserveToString:function(t,e){e&&X.IsCallable(e.toString)&&g(t,"toString",e.toString.bind(e),!0)}},J=function(t,e,r){Q.preserveToString(e,t),Object.setPrototypeOf&&Object.setPrototypeOf(t,e),f?h(Object.getOwnPropertyNames(t),function(n){n in L||r[n]||Q.proxy(t,n,e)}):h(Object.keys(t),function(n){n in L||r[n]||(e[n]=t[n])}),e.prototype=t.prototype,Q.redefine(t.prototype,"constructor",e)},Z=function(){return this},K=function(t){f&&!B(t,U)&&Q.getter(t,U,Z)},tt=function(t,e,r){var n=t[e];g(t,e,r,!0),Q.preserveToString(t[e],n)},et=function(t,e){var r=e||function(){return this};g(t,G,r),!t[G]&&$.symbol(G)&&(t[G]=r)},rt=function(t,e,r){f?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r},nt=function(t,e,r){if(rt(t,e,r),!X.SameValue(t[e],r))throw new TypeError("property is nonconfigurable")},it=function(t,e,r,n){if(!X.TypeIsObject(t))throw new TypeError("Constructor requires `new`: "+e.name);var i=e.prototype;X.TypeIsObject(i)||(i=r);var o=m(i);for(var a in n)if(B(n,a)){var s=n[a];g(o,a,s,!0)}return o};if(String.fromCodePoint&&1!==String.fromCodePoint.length){var ot=String.fromCodePoint;tt(String,"fromCodePoint",function(t){return e(ot,this,arguments)})}var at={fromCodePoint:function(t){for(var e,r=[],n=0,i=arguments.length;n<i;n++){if(e=Number(arguments[n]),!X.SameValue(e,X.ToInteger(e))||e<0||e>1114111)throw new RangeError("Invalid code point "+e);e<65536?x(r,String.fromCharCode(e)):(e-=65536,x(r,String.fromCharCode((e>>10)+55296)),x(r,String.fromCharCode(e%1024+56320)))}return r.join("")},raw:function(t){var e=X.ToObject(t,"bad callSite"),r=X.ToObject(e.raw,"bad raw value"),n=r.length,i=X.ToLength(n);if(i<=0)return"";for(var o,a,s,u,c=[],l=0;l<i&&(o=String(l),s=String(r[o]),x(c,s),!(l+1>=i));)a=l+1<arguments.length?arguments[l+1]:"",u=String(a),x(c,u),l+=1;return c.join("")}};String.raw&&"xy"!==String.raw({raw:{0:"x",1:"y",length:2}})&&tt(String,"raw",at.raw),b(String,at);var st=function t(e,r){if(r<1)return"";if(r%2)return t(e,r-1)+e;var n=t(e,r/2);return n+n},ut=1/0,ct={repeat:function(t){X.RequireObjectCoercible(this);var e=String(this),r=X.ToInteger(t);if(r<0||r>=ut)throw new RangeError("repeat count must be less than infinity and not overflow maximum string size");return st(e,r)},startsWith:function(t){X.RequireObjectCoercible(this);var e=String(this);if($.regex(t))throw new TypeError('Cannot call method "startsWith" with a regex');var r=String(t),n=arguments.length>1?arguments[1]:void 0,i=A(X.ToInteger(n),0);return C(e,i,i+r.length)===r},endsWith:function(t){X.RequireObjectCoercible(this);var e=String(this);if($.regex(t))throw new TypeError('Cannot call method "endsWith" with a regex');var r=String(t),n=e.length,i=arguments.length>1?arguments[1]:void 0,o="undefined"==typeof i?n:X.ToInteger(i),a=k(A(o,0),n);return C(e,a-r.length,a)===r},includes:function(t){if($.regex(t))throw new TypeError('"includes" does not accept a RegExp');var e;return arguments.length>1&&(e=arguments[1]),j(this,t,e)!==-1},codePointAt:function(t){X.RequireObjectCoercible(this);var e=String(this),r=X.ToInteger(t),n=e.length;if(r>=0&&r<n){var i=e.charCodeAt(r),o=r+1===n;if(i<55296||i>56319||o)return i;var a=e.charCodeAt(r+1);return a<56320||a>57343?i:1024*(i-55296)+(a-56320)+65536}}};if(String.prototype.includes&&"a".includes("a",1/0)!==!1&&tt(String.prototype,"includes",ct.includes),String.prototype.startsWith&&String.prototype.endsWith){var lt=s(function(){"/a/".startsWith(/a/)}),ft="abc".startsWith("a",1/0)===!1;lt&&ft||(tt(String.prototype,"startsWith",ct.startsWith),tt(String.prototype,"endsWith",ct.endsWith))}b(String.prototype,ct);var pt=["\t\n\v\f\r "," \u2028","\u2029\ufeff"].join(""),ht=new RegExp("(^["+pt+"]+)|(["+pt+"]+$)","g"),dt=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(ht,"")},yt=[" ","",""].join(""),vt=new RegExp("["+yt+"]","g"),gt=/^[\-+]0x[0-9a-f]+$/i,bt=yt.trim().length!==yt.length;g(String.prototype,"trim",dt,bt);var mt=function(t){X.RequireObjectCoercible(t),this._s=String(t),this._i=0};mt.prototype.next=function(){var t=this._s,e=this._i;if("undefined"==typeof t||e>=t.length)return this._s=void 0,{value:void 0,done:!0};var r,n,i=t.charCodeAt(e);return i<55296||i>56319||e+1===t.length?n=1:(r=t.charCodeAt(e+1),n=r<56320||r>57343?1:2),this._i=e+n,{value:t.substr(e,n),done:!1}},et(mt.prototype),et(String.prototype,function(){return new mt(this)});var _t={from:function(t){var e,n,i=this,o=arguments.length>1?arguments[1]:void 0;if(void 0===o)e=!1;else{if(!X.IsCallable(o))throw new TypeError("Array.from: when provided, the second argument must be a function");n=arguments.length>2?arguments[2]:void 0,e=!0}var a,s,u,c="undefined"!=typeof(V(t)||X.GetMethod(t,G));if(c){s=X.IsConstructor(i)?Object(new i):[];var l,f,p=X.GetIterator(t);for(u=0;;){if(l=X.IteratorStep(p),l===!1)break;f=l.value;try{e&&(f=void 0===n?o(f,u):r(o,n,f,u)),s[u]=f}catch(t){throw X.IteratorClose(p,!0),t}u+=1}a=u}else{var h=X.ToObject(t);a=X.ToLength(h.length),s=X.IsConstructor(i)?Object(new i(a)):new Array(a);var d;for(u=0;u<a;++u)d=h[u],e&&(d=void 0!==n?r(o,n,d,u):o(d,u)),s[u]=d}return s.length=a,s},of:function(){for(var t=arguments.length,e=this,r=n(e)||!X.IsCallable(e)?new Array(t):X.Construct(e,[t]),i=0;i<t;++i)nt(r,i,arguments[i]);return r.length=t,r}};b(Array,_t),K(Array);var wt=function(t){return{value:t,done:0===arguments.length}};t=function(t,e){this.i=0,this.array=t,this.kind=e},b(t.prototype,{next:function(){var e=this.i,r=this.array;if(!(this instanceof t))throw new TypeError("Not an ArrayIterator");if("undefined"!=typeof r)for(var n=X.ToLength(r.length);e<n;e++){var i,o=this.kind;return"key"===o?i=e:"value"===o?i=r[e]:"entry"===o&&(i=[e,r[e]]),this.i=e+1,{value:i,done:!1}}return this.array=void 0,{value:void 0,done:!0}}}),et(t.prototype);var Et=function(t){var e=[];for(var r in t)x(e,r);return e},Ot=function(t,e){b(this,{object:t,array:Et(t),kind:e})};b(Ot.prototype,{next:function(){var t,e=this.array;if(!(this instanceof Ot))throw new TypeError("Not an ObjectIterator");for(;e.length>0;)if(t=R(e),t in this.object)return wt("key"===this.kind?t:"value"===this.kind?this.object[t]:[t,this.object[t]]);return wt()}}),et(Ot.prototype);var jt=Array.of===_t.of||function(){var t=function(t){this.length=t};t.prototype=[];var e=Array.of.apply(t,[1,2]);return e instanceof t&&2===e.length}();jt||tt(Array,"of",_t.of);var St={copyWithin:function(t,e){var r=arguments[2],n=X.ToObject(this),i=X.ToLength(n.length),o=X.ToInteger(t),a=X.ToInteger(e),s=o<0?A(i+o,0):k(o,i),u=a<0?A(i+a,0):k(a,i);r="undefined"==typeof r?i:X.ToInteger(r);var c=r<0?A(i+r,0):k(r,i),l=k(c-u,i-s),f=1;for(u<s&&s<u+l&&(f=-1,u+=l-1,s+=l-1);l>0;)B(n,u)?n[s]=n[u]:delete n[u],u+=f,s+=f,l-=1;return n},fill:function(t){var e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=X.ToObject(this),i=X.ToLength(n.length);e=X.ToInteger("undefined"==typeof e?0:e),r=X.ToInteger("undefined"==typeof r?i:r);for(var o=e<0?A(i+e,0):k(e,i),a=r<0?i+r:r,s=o;s<i&&s<a;++s)n[s]=t;return n},find:function(t){var e=X.ToObject(this),n=X.ToLength(e.length);if(!X.IsCallable(t))throw new TypeError("Array#find: predicate must be a function");for(var i,o=arguments.length>1?arguments[1]:null,a=0;a<n;a++)if(i=e[a],o){if(r(t,o,i,a,e))return i}else if(t(i,a,e))return i},findIndex:function(t){var e=X.ToObject(this),n=X.ToLength(e.length);if(!X.IsCallable(t))throw new TypeError("Array#findIndex: predicate must be a function");for(var i=arguments.length>1?arguments[1]:null,o=0;o<n;o++)if(i){if(r(t,i,e[o],o,e))return o}else if(t(e[o],o,e))return o;return-1},keys:function(){return new t(this,"key")},values:function(){return new t(this,"value")},entries:function(){return new t(this,"entry")}};if(Array.prototype.keys&&!X.IsCallable([1].keys().next)&&delete Array.prototype.keys,Array.prototype.entries&&!X.IsCallable([1].entries().next)&&delete Array.prototype.entries,Array.prototype.keys&&Array.prototype.entries&&!Array.prototype.values&&Array.prototype[G]&&(b(Array.prototype,{values:Array.prototype[G]}),$.symbol(D.unscopables)&&(Array.prototype[D.unscopables].values=!0)),p&&Array.prototype.values&&"values"!==Array.prototype.values.name){var Tt=Array.prototype.values;tt(Array.prototype,"values",function(){return r(Tt,this)}),g(Array.prototype,G,Array.prototype.values,!0)}b(Array.prototype,St),et(Array.prototype,function(){return this.values()}),Object.getPrototypeOf&&et(Object.getPrototypeOf([].values()));var Ct=function(){return u(function(){return 0===Array.from({length:-1}).length})}(),xt=function(){var t=Array.from([0].entries());return 1===t.length&&n(t[0])&&0===t[0][0]&&0===t[0][1]}();Ct&&xt||tt(Array,"from",_t.from);var Pt=function(){return u(function(){return Array.from([0],void 0)})}();if(!Pt){var Rt=Array.from;tt(Array,"from",function(t){return arguments.length>0&&"undefined"!=typeof arguments[1]?e(Rt,this,arguments):r(Rt,this,t)})}var At=function(t,e){var n={length:-1};return n[e?4294967294:0]=!0,u(function(){r(t,n,function(){throw new RangeError("should not reach here")},[])})};if(!At(Array.prototype.forEach)){var kt=Array.prototype.forEach;tt(Array.prototype,"forEach",function(t){return e(kt,this.length>=0?this:[],arguments)},!0)}if(!At(Array.prototype.map)){var It=Array.prototype.map;tt(Array.prototype,"map",function(t){return e(It,this.length>=0?this:[],arguments)},!0)}if(!At(Array.prototype.filter)){var Mt=Array.prototype.filter;tt(Array.prototype,"filter",function(t){return e(Mt,this.length>=0?this:[],arguments)},!0)}if(!At(Array.prototype.some)){var Nt=Array.prototype.some;tt(Array.prototype,"some",function(t){return e(Nt,this.length>=0?this:[],arguments)},!0)}if(!At(Array.prototype.every)){var Ft=Array.prototype.every;tt(Array.prototype,"every",function(t){return e(Ft,this.length>=0?this:[],arguments)},!0)}if(!At(Array.prototype.reduce)){var Bt=Array.prototype.reduce;tt(Array.prototype,"reduce",function(t){return e(Bt,this.length>=0?this:[],arguments)},!0)}if(!At(Array.prototype.reduceRight,!0)){var Lt=Array.prototype.reduceRight;tt(Array.prototype,"reduceRight",function(t){return e(Lt,this.length>=0?this:[],arguments)},!0)}var Dt=8!==Number("0o10"),Ut=2!==Number("0b10"),Wt=v(yt,function(t){return 0===Number(t+0+t)});if(Dt||Ut||Wt){var zt=Number,qt=/^0b[01]+$/i,Ht=/^0o[0-7]+$/i,Vt=qt.test.bind(qt),$t=Ht.test.bind(Ht),Gt=function(t){var e;if("function"==typeof t.valueOf&&(e=t.valueOf(),$.primitive(e)))return e;if("function"==typeof t.toString&&(e=t.toString(),$.primitive(e)))return e;throw new TypeError("No default value")},Yt=vt.test.bind(vt),Xt=gt.test.bind(gt),Qt=function(){var t=function(e){var n;n=arguments.length>0?$.primitive(e)?e:Gt(e,"number"):0,"string"==typeof n&&(n=r(dt,n),Vt(n)?n=parseInt(C(n,2),2):$t(n)?n=parseInt(C(n,2),8):(Yt(n)||Xt(n))&&(n=NaN));var i=this,o=u(function(){return zt.prototype.valueOf.call(i),!0});return i instanceof t&&!o?new zt(n):zt(n)};return t}();J(zt,Qt,{}),Number=Qt,Q.redefine(E,"Number",Qt)}var Jt=Math.pow(2,53)-1;b(Number,{MAX_SAFE_INTEGER:Jt,MIN_SAFE_INTEGER:-Jt,EPSILON:2.220446049250313e-16,parseInt:E.parseInt,parseFloat:E.parseFloat,isFinite:z,isInteger:function(t){return z(t)&&X.ToInteger(t)===t},isSafeInteger:function(t){return Number.isInteger(t)&&M(t)<=Number.MAX_SAFE_INTEGER},isNaN:W}),g(Number,"parseInt",E.parseInt,Number.parseInt!==E.parseInt),[,1].find(function(t,e){return 0===e})||tt(Array.prototype,"find",St.find),0!==[,1].findIndex(function(t,e){return 0===e})&&tt(Array.prototype,"findIndex",St.findIndex);var Zt=Function.bind.call(Function.bind,Object.prototype.propertyIsEnumerable),Kt=function(){for(var t=Number(this),e=arguments.length,r=e-t,n=new Array(r<0?0:r),i=t;i<e;++i)n[i-t]=arguments[i];return n},te=function(t){return function(e,r){return e[r]=t[r],e}},ee=function(t,e){var r,n=Object.keys(Object(e));return X.IsCallable(Object.getOwnPropertySymbols)&&(r=y(Object.getOwnPropertySymbols(Object(e)),Zt(e))),d(T(n,r||[]),te(e),t)},re={assign:function(t,r){var n=X.ToObject(t,"Cannot convert undefined or null to object");return d(e(Kt,1,arguments),ee,n)},is:function(t,e){return X.SameValue(t,e)}},ne=Object.assign&&Object.preventExtensions&&function(){var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch(e){return"y"===t[1]}}();if(ne&&tt(Object,"assign",re.assign),b(Object,re),f){var ie={setPrototypeOf:function(t,e){var n,i=function(t,e){if(!X.TypeIsObject(t))throw new TypeError("cannot set prototype on a non-object");if(null!==e&&!X.TypeIsObject(e))throw new TypeError("can only set prototype to an object or null"+e)},o=function(t,e){return i(t,e),r(n,t,e),t};try{n=t.getOwnPropertyDescriptor(t.prototype,e).set,r(n,{},null)}catch(r){if(t.prototype!=={}[e])return;n=function(t){this[e]=t},o.polyfill=o(o({},null),t.prototype)instanceof t}return o}(Object,"__proto__")};b(Object,ie)}Object.setPrototypeOf&&Object.getPrototypeOf&&null!==Object.getPrototypeOf(Object.setPrototypeOf({},null))&&null===Object.getPrototypeOf(Object.create(null))&&!function(){var t=Object.create(null),e=Object.getPrototypeOf,r=Object.setPrototypeOf;Object.getPrototypeOf=function(r){var n=e(r);return n===t?null:n},Object.setPrototypeOf=function(e,n){var i=null===n?t:n;return r(e,i)},Object.setPrototypeOf.polyfill=!1}();var oe=!s(function(){Object.keys("foo")});if(!oe){var ae=Object.keys;tt(Object,"keys",function(t){return ae(X.ToObject(t))})}if(Object.getOwnPropertyNames){var se=!s(function(){Object.getOwnPropertyNames("foo")});if(!se){var ue="object"==typeof window?Object.getOwnPropertyNames(window):[],ce=Object.getOwnPropertyNames;tt(Object,"getOwnPropertyNames",function(t){var e=X.ToObject(t);if("[object Window]"===S(e))try{return ce(e)}catch(t){return T([],ue)}return ce(e)})}}if(Object.getOwnPropertyDescriptor){var le=!s(function(){Object.getOwnPropertyDescriptor("foo","bar")});if(!le){var fe=Object.getOwnPropertyDescriptor;tt(Object,"getOwnPropertyDescriptor",function(t,e){return fe(X.ToObject(t),e)})}}if(Object.seal){var pe=!s(function(){Object.seal("foo")});if(!pe){var he=Object.seal;tt(Object,"seal",function(t){return $.object(t)?he(t):t})}}if(Object.isSealed){var de=!s(function(){Object.isSealed("foo")});if(!de){var ye=Object.isSealed;tt(Object,"isSealed",function(t){return!$.object(t)||ye(t)})}}if(Object.freeze){var ve=!s(function(){Object.freeze("foo")});if(!ve){var ge=Object.freeze;tt(Object,"freeze",function(t){return $.object(t)?ge(t):t})}}if(Object.isFrozen){var be=!s(function(){Object.isFrozen("foo")});if(!be){var me=Object.isFrozen;tt(Object,"isFrozen",function(t){return!$.object(t)||me(t)})}}if(Object.preventExtensions){var _e=!s(function(){Object.preventExtensions("foo")});if(!_e){var we=Object.preventExtensions;tt(Object,"preventExtensions",function(t){return $.object(t)?we(t):t})}}if(Object.isExtensible){var Ee=!s(function(){Object.isExtensible("foo")});if(!Ee){var Oe=Object.isExtensible;tt(Object,"isExtensible",function(t){return!!$.object(t)&&Oe(t)})}}if(Object.getPrototypeOf){var je=!s(function(){Object.getPrototypeOf("foo"); +});if(!je){var Se=Object.getPrototypeOf;tt(Object,"getPrototypeOf",function(t){return Se(X.ToObject(t))})}}var Te=f&&function(){var t=Object.getOwnPropertyDescriptor(RegExp.prototype,"flags");return t&&X.IsCallable(t.get)}();if(f&&!Te){var Ce=function(){if(!X.TypeIsObject(this))throw new TypeError("Method called on incompatible type: must be an object.");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t};Q.getter(RegExp.prototype,"flags",Ce)}var xe=u(function(){return"/a/i"===String(new RegExp(/a/g,"i"))});if(!xe&&f){var Pe=RegExp,Re=function(){return function t(e,r){var n=this instanceof t;return!n&&($.regex(e)||e&&e.constructor===t)?e:$.regex(e)&&$.string(r)?new t(e.source,r):new Pe(e,r)}}();J(Pe,Re,{$input:!0}),RegExp=Re,Q.redefine(E,"RegExp",Re)}if(f){var Ae={input:"$_",lastMatch:"$&",lastParen:"$+",leftContext:"$`",rightContext:"$'"};h(Object.keys(Ae),function(t){t in RegExp&&!(Ae[t]in RegExp)&&Q.getter(RegExp,Ae[t],function(){return RegExp[t]})})}K(RegExp);var ke=1/Number.EPSILON,Ie=function(t){return t+ke-ke},Me=Math.pow(2,-23),Ne=Math.pow(2,127)*(2-Me),Fe=Math.pow(2,-126),Be=Number.prototype.clz;delete Number.prototype.clz;var Le={acosh:function(t){var e=Number(t);return Number.isNaN(e)||t<1?NaN:1===e?0:e===1/0?e:N(e/Math.E+F(e+1)*F(e-1)/Math.E)+1},asinh:function(t){var e=Number(t);return 0!==e&&O(e)?e<0?-Math.asinh(-e):N(e+F(e*e+1)):e},atanh:function(t){var e=Number(t);return Number.isNaN(e)||e<-1||e>1?NaN:e===-1?-(1/0):1===e?1/0:0===e?e:.5*N((1+e)/(1-e))},cbrt:function(t){var e=Number(t);if(0===e)return e;var r,n=e<0;return n&&(e=-e),e===1/0?r=1/0:(r=Math.exp(N(e)/3),r=(e/(r*r)+2*r)/3),n?-r:r},clz32:function(t){var e=Number(t),n=X.ToUint32(e);return 0===n?32:Be?r(Be,n):31-I(N(n+.5)*Math.LOG2E)},cosh:function(t){var e=Number(t);return 0===e?1:Number.isNaN(e)?NaN:O(e)?(e<0&&(e=-e),e>21?Math.exp(e)/2:(Math.exp(e)+Math.exp(-e))/2):1/0},expm1:function(t){var e=Number(t);if(e===-(1/0))return-1;if(!O(e)||0===e)return e;if(M(e)>.5)return Math.exp(e)-1;for(var r=e,n=0,i=1;n+r!==n;)n+=r,i+=1,r*=e/i;return n},hypot:function(t,e){for(var r=0,n=0,i=0;i<arguments.length;++i){var o=M(Number(arguments[i]));n<o?(r*=n/o*(n/o),r+=1,n=o):r+=o>0?o/n*(o/n):o}return n===1/0?1/0:n*F(r)},log2:function(t){return N(t)*Math.LOG2E},log10:function(t){return N(t)*Math.LOG10E},log1p:function(t){var e=Number(t);return e<-1||Number.isNaN(e)?NaN:0===e||e===1/0?e:e===-1?-(1/0):1+e-1===0?e:e*(N(1+e)/(1+e-1))},sign:function(t){var e=Number(t);return 0===e?e:Number.isNaN(e)?e:e<0?-1:1},sinh:function(t){var e=Number(t);return O(e)&&0!==e?M(e)<1?(Math.expm1(e)-Math.expm1(-e))/2:(Math.exp(e-1)-Math.exp(-e-1))*Math.E/2:e},tanh:function(t){var e=Number(t);if(Number.isNaN(e)||0===e)return e;if(e===1/0)return 1;if(e===-(1/0))return-1;var r=Math.expm1(e),n=Math.expm1(-e);return r===1/0?1:n===1/0?-1:(r-n)/(Math.exp(e)+Math.exp(-e))},trunc:function(t){var e=Number(t);return e<0?-I(-e):I(e)},imul:function(t,e){var r=X.ToUint32(t),n=X.ToUint32(e),i=r>>>16&65535,o=65535&r,a=n>>>16&65535,s=65535&n;return o*s+(i*s+o*a<<16>>>0)|0},fround:function(t){var e=Number(t);if(0===e||e===1/0||e===-(1/0)||W(e))return e;var r=Math.sign(e),n=M(e);if(n<Fe)return r*Ie(n/Fe/Me)*Fe*Me;var i=(1+Me/Number.EPSILON)*n,o=i-(i-n);return o>Ne||W(o)?r*(1/0):r*o}};b(Math,Le),g(Math,"log1p",Le.log1p,Math.log1p(-1e-17)!==-1e-17),g(Math,"asinh",Le.asinh,Math.asinh(-1e7)!==-Math.asinh(1e7)),g(Math,"tanh",Le.tanh,Math.tanh(-2e-17)!==-2e-17),g(Math,"acosh",Le.acosh,Math.acosh(Number.MAX_VALUE)===1/0),g(Math,"cbrt",Le.cbrt,Math.abs(1-Math.cbrt(1e-300)/1e-100)/Number.EPSILON>8),g(Math,"sinh",Le.sinh,Math.sinh(-2e-17)!==-2e-17);var De=Math.expm1(10);g(Math,"expm1",Le.expm1,De>22025.465794806718||De<22025.465794806718);var Ue=Math.round,We=0===Math.round(.5-Number.EPSILON/4)&&1===Math.round(-.5+Number.EPSILON/3.99),ze=ke+1,qe=2*ke-1,He=[ze,qe].every(function(t){return Math.round(t)===t});g(Math,"round",function(t){var e=I(t),r=e===-1?-0:e+1;return t-e<.5?e:r},!We||!He),Q.preserveToString(Math.round,Ue);var Ve=Math.imul;Math.imul(4294967295,5)!==-5&&(Math.imul=Le.imul,Q.preserveToString(Math.imul,Ve)),2!==Math.imul.length&&tt(Math,"imul",function(t,r){return e(Ve,Math,arguments)});var $e=function(){var t=E.setTimeout;if("function"==typeof t||"object"==typeof t){X.IsPromise=function(t){return!!X.TypeIsObject(t)&&"undefined"!=typeof t._promise};var e,n=function(t){if(!X.IsConstructor(t))throw new TypeError("Bad promise constructor");var e=this,r=function(t,r){if(void 0!==e.resolve||void 0!==e.reject)throw new TypeError("Bad Promise implementation!");e.resolve=t,e.reject=r};if(e.promise=new t(r),!X.IsCallable(e.resolve)||!X.IsCallable(e.reject))throw new TypeError("Bad promise constructor")};"undefined"!=typeof window&&X.IsCallable(window.postMessage)&&(e=function(){var t=[],e="zero-timeout-message",r=function(r){x(t,r),window.postMessage(e,"*")},n=function(r){if(r.source===window&&r.data===e){if(r.stopPropagation(),0===t.length)return;var n=R(t);n()}};return window.addEventListener("message",n,!0),r});var i,o=function(){var t=E.Promise;return t&&t.resolve&&function(e){return t.resolve().then(e)}},s=X.IsCallable(E.setImmediate)?E.setImmediate.bind(E):"object"==typeof a&&a.nextTick?a.nextTick:o()||(X.IsCallable(e)?e():function(e){t(e,0)}),u=1,c=2,l=3,f=4,p=5,d=function(t,e){var r,n,i=t.capabilities,o=t.handler,a=!1;if(o===u)r=e;else if(o===c)r=e,a=!0;else try{r=o(e)}catch(t){r=t,a=!0}(n=a?i.reject:i.resolve)(r)},y=function(t,e){h(t,function(t){s(function(){d(t,e)})})},v=function(t,e){var r=t._promise,n=r.fulfillReactions;r.result=e,r.fulfillReactions=void 0,r.rejectReactions=void 0,r.state=f,y(n,e)},g=function(t,e){var r=t._promise,n=r.rejectReactions;r.result=e,r.fulfillReactions=void 0,r.rejectReactions=void 0,r.state=p,y(n,e)},m=function(t){var e=!1,r=function(r){var n;if(!e){if(e=!0,r===t)return g(t,new TypeError("Self resolution"));if(!X.TypeIsObject(r))return v(t,r);try{n=r.then}catch(e){return g(t,e)}return X.IsCallable(n)?void s(function(){_(t,r,n)}):v(t,r)}},n=function(r){if(!e)return e=!0,g(t,r)};return{resolve:r,reject:n}},_=function(t,e,n){var i=m(t),o=i.resolve,a=i.reject;try{r(n,e,o,a)}catch(t){a(t)}},w=function(t){if(!X.TypeIsObject(t))throw new TypeError("Promise is not object");var e=t[U];return void 0!==e&&null!==e?e:t},O=function(){var t=function(e){if(!(this instanceof t))throw new TypeError('Constructor Promise requires "new"');if(this&&this._promise)throw new TypeError("Bad construction");if(!X.IsCallable(e))throw new TypeError("not a valid resolver");var r=it(this,t,i,{_promise:{result:void 0,state:l,fulfillReactions:[],rejectReactions:[]}}),n=m(r),o=n.reject;try{e(n.resolve,o)}catch(t){o(t)}return r};return t}();i=O.prototype;var j=function(t,e,r,n){var i=!1;return function(o){if(!i&&(i=!0,e[t]=o,0===--n.count)){var a=r.resolve;a(e)}}},S=function(t,e,r){for(var n,i,o=t.iterator,a=[],s={count:1},u=0;;){try{if(n=X.IteratorStep(o),n===!1){t.done=!0;break}i=n.value}catch(e){throw t.done=!0,e}a[u]=void 0;var c=e.resolve(i),l=j(u,a,r,s);s.count+=1,c.then(l,r.reject),u+=1}if(0===--s.count){var f=r.resolve;f(a)}return r.promise},T=function(t,e,r){for(var n,i,o,a=t.iterator;;){try{if(n=X.IteratorStep(a),n===!1){t.done=!0;break}i=n.value}catch(e){throw t.done=!0,e}o=e.resolve(i),o.then(r.resolve,r.reject)}return r.promise};return b(O,{all:function(t){var e,r,i=w(this),o=new n(i);try{return e=X.GetIterator(t),r={iterator:e,done:!1},S(r,i,o)}catch(t){var a=t;if(r&&!r.done)try{X.IteratorClose(e,!0)}catch(t){a=t}var s=o.reject;return s(a),o.promise}},race:function(t){var e,r,i=w(this),o=new n(i);try{return e=X.GetIterator(t),r={iterator:e,done:!1},T(r,i,o)}catch(t){var a=t;if(r&&!r.done)try{X.IteratorClose(e,!0)}catch(t){a=t}var s=o.reject;return s(a),o.promise}},reject:function(t){var e=this,r=new n(e),i=r.reject;return i(t),r.promise},resolve:function(t){var e=this;if(X.IsPromise(t)){var r=t.constructor;if(r===e)return t}var i=new n(e),o=i.resolve;return o(t),i.promise}}),b(i,{catch:function(t){return this.then(void 0,t)},then:function(t,e){var r=this;if(!X.IsPromise(r))throw new TypeError("not a promise");var i,o=X.SpeciesConstructor(r,O),a=new n(o),h={capabilities:a,handler:X.IsCallable(t)?t:u},y={capabilities:a,handler:X.IsCallable(e)?e:c},v=r._promise;if(v.state===l)x(v.fulfillReactions,h),x(v.rejectReactions,y);else if(v.state===f)i=v.result,s(function(){d(h,i)});else{if(v.state!==p)throw new TypeError("unexpected Promise state");i=v.result,s(function(){d(y,i)})}return a.promise}}),O}}();if(E.Promise&&(delete E.Promise.accept,delete E.Promise.defer,delete E.Promise.prototype.chain),"function"==typeof $e){b(E,{Promise:$e});var Ge=_(E.Promise,function(t){return t.resolve(42).then(function(){})instanceof t}),Ye=!s(function(){E.Promise.reject(42).then(null,5).then(null,L)}),Xe=s(function(){E.Promise.call(3,L)}),Qe=function(t){var e=t.resolve(5);e.constructor={};var r=t.resolve(e);return e===r}(E.Promise);Ge&&Ye&&Xe&&!Qe||(Promise=$e,tt(E,"Promise",$e)),K(Promise)}var Je=function(t){var e=Object.keys(d(t,function(t,e){return t[e]=!0,t},{}));return t.join(":")===e.join(":")},Ze=Je(["z","a","bb"]),Ke=Je(["z",1,"a","3",2]);if(f){var tr=function(t){if(!Ze)return null;var e=typeof t;return"undefined"===e||null===t?"^"+String(t):"string"===e?"$"+t:"number"===e?Ke?t:"n"+t:"boolean"===e?"b"+t:null},er=function(){return Object.create?Object.create(null):{}},rr=function(t,e,i){if(n(i)||$.string(i))h(i,function(t){e.set(t[0],t[1])});else if(i instanceof t)r(t.prototype.forEach,i,function(t,r){e.set(r,t)});else{var o,a;if(null!==i&&"undefined"!=typeof i){if(a=e.set,!X.IsCallable(a))throw new TypeError("bad map");o=X.GetIterator(i)}if("undefined"!=typeof o)for(;;){var s=X.IteratorStep(o);if(s===!1)break;var u=s.value;try{if(!X.TypeIsObject(u))throw new TypeError("expected iterable of pairs");r(a,e,u[0],u[1])}catch(t){throw X.IteratorClose(o,!0),t}}}},nr=function(t,e,i){if(n(i)||$.string(i))h(i,function(t){e.add(t)});else if(i instanceof t)r(t.prototype.forEach,i,function(t){e.add(t)});else{var o,a;if(null!==i&&"undefined"!=typeof i){if(a=e.add,!X.IsCallable(a))throw new TypeError("bad set");o=X.GetIterator(i)}if("undefined"!=typeof o)for(;;){var s=X.IteratorStep(o);if(s===!1)break;var u=s.value;try{r(a,e,u)}catch(t){throw X.IteratorClose(o,!0),t}}}},ir={Map:function(){var t={},e=function(t,e){this.key=t,this.value=e,this.next=null,this.prev=null};e.prototype.isRemoved=function(){return this.key===t};var n=function(t){return!!t._es6map},i=function(t,e){if(!X.TypeIsObject(t)||!n(t))throw new TypeError("Method Map.prototype."+e+" called on incompatible receiver "+String(t))},o=function(t,e){i(t,"[[MapIterator]]"),this.head=t._head,this.i=this.head,this.kind=e};o.prototype={next:function(){var t,e=this.i,r=this.kind,n=this.head;if("undefined"==typeof this.i)return{value:void 0,done:!0};for(;e.isRemoved()&&e!==n;)e=e.prev;for(;e.next!==n;)if(e=e.next,!e.isRemoved())return t="key"===r?e.key:"value"===r?e.value:[e.key,e.value],this.i=e,{value:t,done:!1};return this.i=void 0,{value:void 0,done:!0}}},et(o.prototype);var a,s=function t(){if(!(this instanceof t))throw new TypeError('Constructor Map requires "new"');if(this&&this._es6map)throw new TypeError("Bad construction");var r=it(this,t,a,{_es6map:!0,_head:null,_storage:er(),_size:0}),n=new e(null,null);return n.next=n.prev=n,r._head=n,arguments.length>0&&rr(t,r,arguments[0]),r};return a=s.prototype,Q.getter(a,"size",function(){if("undefined"==typeof this._size)throw new TypeError("size method called on incompatible Map");return this._size}),b(a,{get:function(t){i(this,"get");var e=tr(t);if(null!==e){var r=this._storage[e];return r?r.value:void 0}for(var n=this._head,o=n;(o=o.next)!==n;)if(X.SameValueZero(o.key,t))return o.value},has:function(t){i(this,"has");var e=tr(t);if(null!==e)return"undefined"!=typeof this._storage[e];for(var r=this._head,n=r;(n=n.next)!==r;)if(X.SameValueZero(n.key,t))return!0;return!1},set:function(t,r){i(this,"set");var n,o=this._head,a=o,s=tr(t);if(null!==s){if("undefined"!=typeof this._storage[s])return this._storage[s].value=r,this;n=this._storage[s]=new e(t,r),a=o.prev}for(;(a=a.next)!==o;)if(X.SameValueZero(a.key,t))return a.value=r,this;return n=n||new e(t,r),X.SameValue(-0,t)&&(n.key=0),n.next=this._head,n.prev=this._head.prev,n.prev.next=n,n.next.prev=n,this._size+=1,this},delete:function(e){i(this,"delete");var r=this._head,n=r,o=tr(e);if(null!==o){if("undefined"==typeof this._storage[o])return!1;n=this._storage[o].prev,delete this._storage[o]}for(;(n=n.next)!==r;)if(X.SameValueZero(n.key,e))return n.key=n.value=t,n.prev.next=n.next,n.next.prev=n.prev,this._size-=1,!0;return!1},clear:function(){i(this,"clear"),this._size=0,this._storage=er();for(var e=this._head,r=e,n=r.next;(r=n)!==e;)r.key=r.value=t,n=r.next,r.next=r.prev=e;e.next=e.prev=e},keys:function(){return i(this,"keys"),new o(this,"key")},values:function(){return i(this,"values"),new o(this,"value")},entries:function(){return i(this,"entries"),new o(this,"key+value")},forEach:function(t){i(this,"forEach");for(var e=arguments.length>1?arguments[1]:null,n=this.entries(),o=n.next();!o.done;o=n.next())e?r(t,e,o.value[1],o.value[0],this):t(o.value[1],o.value[0],this)}}),et(a,a.entries),s}(),Set:function(){var t,e=function(t){return t._es6set&&"undefined"!=typeof t._storage},n=function(t,r){if(!X.TypeIsObject(t)||!e(t))throw new TypeError("Set.prototype."+r+" called on incompatible receiver "+String(t))},i=function e(){if(!(this instanceof e))throw new TypeError('Constructor Set requires "new"');if(this&&this._es6set)throw new TypeError("Bad construction");var r=it(this,e,t,{_es6set:!0,"[[SetData]]":null,_storage:er()});if(!r._es6set)throw new TypeError("bad set");return arguments.length>0&&nr(e,r,arguments[0]),r};t=i.prototype;var o=function(t){if(!t["[[SetData]]"]){var e=t["[[SetData]]"]=new ir.Map;h(Object.keys(t._storage),function(t){var r=t;if("^null"===r)r=null;else if("^undefined"===r)r=void 0;else{var n=r.charAt(0);r="$"===n?C(r,1):"n"===n?+C(r,1):"b"===n?"btrue"===r:+r}e.set(r,r)}),t._storage=null}};return Q.getter(i.prototype,"size",function(){return n(this,"size"),o(this),this["[[SetData]]"].size}),b(i.prototype,{has:function(t){n(this,"has");var e;return this._storage&&null!==(e=tr(t))?!!this._storage[e]:(o(this),this["[[SetData]]"].has(t))},add:function(t){n(this,"add");var e;return this._storage&&null!==(e=tr(t))?(this._storage[e]=!0,this):(o(this),this["[[SetData]]"].set(t,t),this)},delete:function(t){n(this,"delete");var e;if(this._storage&&null!==(e=tr(t))){var r=B(this._storage,e);return delete this._storage[e]&&r}return o(this),this["[[SetData]]"].delete(t)},clear:function(){n(this,"clear"),this._storage?this._storage=er():this["[[SetData]]"].clear()},values:function(){return n(this,"values"),o(this),this["[[SetData]]"].values()},entries:function(){return n(this,"entries"),o(this),this["[[SetData]]"].entries()},forEach:function(t){n(this,"forEach");var e=arguments.length>1?arguments[1]:null,i=this;o(i),this["[[SetData]]"].forEach(function(n,o){e?r(t,e,o,o,i):t(o,o,i)})}}),g(i.prototype,"keys",i.prototype.values,!0),et(i.prototype,i.prototype.values),i}()};if(E.Map||E.Set){var or=u(function(){return 2===new Map([[1,2]]).get(1)});if(!or){var ar=E.Map;E.Map=function t(){if(!(this instanceof t))throw new TypeError('Constructor Map requires "new"');var e=new ar;return arguments.length>0&&rr(t,e,arguments[0]),Object.setPrototypeOf(e,E.Map.prototype),g(e,"constructor",t,!0),e},E.Map.prototype=m(ar.prototype),Q.preserveToString(E.Map,ar)}var sr=new Map,ur=function(t){return t.delete(0),t.delete(-0),t.set(0,3),t.get(-0,4),3===t.get(0)&&4===t.get(-0)}(sr),cr=sr.set(1,2)===sr;if(!ur||!cr){var lr=Map.prototype.set;tt(Map.prototype,"set",function(t,e){return r(lr,this,0===t?0:t,e),this})}if(!ur){var fr=Map.prototype.get,pr=Map.prototype.has;b(Map.prototype,{get:function(t){return r(fr,this,0===t?0:t)},has:function(t){return r(pr,this,0===t?0:t)}},!0),Q.preserveToString(Map.prototype.get,fr),Q.preserveToString(Map.prototype.has,pr)}var hr=new Set,dr=function(t){return t.delete(0),t.add(-0),!t.has(0)}(hr),yr=hr.add(1)===hr;if(!dr||!yr){var vr=Set.prototype.add;Set.prototype.add=function(t){return r(vr,this,0===t?0:t),this},Q.preserveToString(Set.prototype.add,vr)}if(!dr){var gr=Set.prototype.has;Set.prototype.has=function(t){return r(gr,this,0===t?0:t)},Q.preserveToString(Set.prototype.has,gr);var br=Set.prototype.delete;Set.prototype.delete=function(t){return r(br,this,0===t?0:t)},Q.preserveToString(Set.prototype.delete,br)}var mr=_(E.Map,function(t){var e=new t([]);return e.set(42,42),e instanceof t}),_r=Object.setPrototypeOf&&!mr,wr=function(){try{return!(E.Map()instanceof E.Map)}catch(t){return t instanceof TypeError}}();if(0!==E.Map.length||_r||!wr){var Er=E.Map;E.Map=function t(){if(!(this instanceof t))throw new TypeError('Constructor Map requires "new"');var e=new Er;return arguments.length>0&&rr(t,e,arguments[0]),Object.setPrototypeOf(e,t.prototype),g(e,"constructor",t,!0),e},E.Map.prototype=Er.prototype,Q.preserveToString(E.Map,Er)}var Or=_(E.Set,function(t){var e=new t([]);return e.add(42,42),e instanceof t}),jr=Object.setPrototypeOf&&!Or,Sr=function(){try{return!(E.Set()instanceof E.Set)}catch(t){return t instanceof TypeError}}();if(0!==E.Set.length||jr||!Sr){var Tr=E.Set;E.Set=function t(){if(!(this instanceof t))throw new TypeError('Constructor Set requires "new"');var e=new Tr;return arguments.length>0&&nr(t,e,arguments[0]),Object.setPrototypeOf(e,t.prototype),g(e,"constructor",t,!0),e},E.Set.prototype=Tr.prototype,Q.preserveToString(E.Set,Tr)}var Cr=!u(function(){return(new Map).keys().next().done});if(("function"!=typeof E.Map.prototype.clear||0!==(new E.Set).size||0!==(new E.Map).size||"function"!=typeof E.Map.prototype.keys||"function"!=typeof E.Set.prototype.keys||"function"!=typeof E.Map.prototype.forEach||"function"!=typeof E.Set.prototype.forEach||c(E.Map)||c(E.Set)||"function"!=typeof(new E.Map).keys().next||Cr||!mr)&&(delete E.Map,delete E.Set,b(E,{Map:ir.Map,Set:ir.Set},!0)),E.Set.prototype.keys!==E.Set.prototype.values&&g(E.Set.prototype,"keys",E.Set.prototype.values,!0),et(Object.getPrototypeOf((new E.Map).keys())),et(Object.getPrototypeOf((new E.Set).keys())),p&&"has"!==E.Set.prototype.has.name){var xr=E.Set.prototype.has;tt(E.Set.prototype,"has",function(t){return r(xr,this,t)})}}b(E,ir),K(E.Map),K(E.Set)}var Pr=function(t){if(!X.TypeIsObject(t))throw new TypeError("target must be an object")},Rr={apply:function(){return e(X.Call,null,arguments)},construct:function(t,e){if(!X.IsConstructor(t))throw new TypeError("First argument must be a constructor.");var r=arguments.length<3?t:arguments[2];if(!X.IsConstructor(r))throw new TypeError("new.target must be a constructor.");return X.Construct(t,e,r,"internal")},deleteProperty:function(t,e){if(Pr(t),f){var r=Object.getOwnPropertyDescriptor(t,e);if(r&&!r.configurable)return!1}return delete t[e]},enumerate:function(t){return Pr(t),new Ot(t,"key")},has:function(t,e){return Pr(t),e in t}};Object.getOwnPropertyNames&&Object.assign(Rr,{ownKeys:function(t){Pr(t);var e=Object.getOwnPropertyNames(t);return X.IsCallable(Object.getOwnPropertySymbols)&&P(e,Object.getOwnPropertySymbols(t)),e}});var Ar=function(t){return!s(t)};if(Object.preventExtensions&&Object.assign(Rr,{isExtensible:function(t){return Pr(t),Object.isExtensible(t)},preventExtensions:function(t){return Pr(t),Ar(function(){Object.preventExtensions(t)})}}),f){var kr=function(t,e,n){var i=Object.getOwnPropertyDescriptor(t,e);if(!i){var o=Object.getPrototypeOf(t);if(null===o)return;return kr(o,e,n)}return"value"in i?i.value:i.get?r(i.get,n):void 0},Ir=function(t,e,n,i){var o=Object.getOwnPropertyDescriptor(t,e);if(!o){var a=Object.getPrototypeOf(t);if(null!==a)return Ir(a,e,n,i);o={value:void 0,writable:!0,enumerable:!0,configurable:!0}}if("value"in o){if(!o.writable)return!1;if(!X.TypeIsObject(i))return!1;var s=Object.getOwnPropertyDescriptor(i,e);return s?Y.defineProperty(i,e,{value:n}):Y.defineProperty(i,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}return!!o.set&&(r(o.set,i,n),!0)};Object.assign(Rr,{defineProperty:function(t,e,r){return Pr(t),Ar(function(){Object.defineProperty(t,e,r)})},getOwnPropertyDescriptor:function(t,e){return Pr(t),Object.getOwnPropertyDescriptor(t,e)},get:function(t,e){Pr(t);var r=arguments.length>2?arguments[2]:t;return kr(t,e,r)},set:function(t,e,r){Pr(t);var n=arguments.length>3?arguments[3]:t;return Ir(t,e,r,n)}})}if(Object.getPrototypeOf){var Mr=Object.getPrototypeOf;Rr.getPrototypeOf=function(t){return Pr(t),Mr(t)}}if(Object.setPrototypeOf&&Rr.getPrototypeOf){var Nr=function(t,e){for(var r=e;r;){if(t===r)return!0;r=Rr.getPrototypeOf(r)}return!1};Object.assign(Rr,{setPrototypeOf:function(t,e){if(Pr(t),null!==e&&!X.TypeIsObject(e))throw new TypeError("proto must be an object or null");return e===Y.getPrototypeOf(t)||!(Y.isExtensible&&!Y.isExtensible(t))&&(!Nr(t,e)&&(Object.setPrototypeOf(t,e),!0))}})}var Fr=function(t,e){if(X.IsCallable(E.Reflect[t])){var r=u(function(){return E.Reflect[t](1),E.Reflect[t](NaN),E.Reflect[t](!0),!0});r&&tt(E.Reflect,t,e)}else g(E.Reflect,t,e)};if(Object.keys(Rr).forEach(function(t){Fr(t,Rr[t])}),p&&"getPrototypeOf"!==E.Reflect.getPrototypeOf.name){var Br=E.Reflect.getPrototypeOf;tt(E.Reflect,"getPrototypeOf",function(t){return r(Br,E.Reflect,t)})}if(E.Reflect.setPrototypeOf&&u(function(){return E.Reflect.setPrototypeOf(1,{}),!0})&&tt(E.Reflect,"setPrototypeOf",Rr.setPrototypeOf),E.Reflect.defineProperty&&(u(function(){var t=!E.Reflect.defineProperty(1,"test",{value:1}),e="function"!=typeof Object.preventExtensions||!E.Reflect.defineProperty(Object.preventExtensions({}),"test",{});return t&&e})||tt(E.Reflect,"defineProperty",Rr.defineProperty)),E.Reflect.construct&&(u(function(){var t=function(){};return E.Reflect.construct(function(){},[],t)instanceof t})||tt(E.Reflect,"construct",Rr.construct)),"Invalid Date"!==String(new Date(NaN))){var Lr=Date.prototype.toString,Dr=function(){var t=+this;return t!==t?"Invalid Date":r(Lr,this)};tt(Date.prototype,"toString",Dr)}var Ur={anchor:function(t){return X.CreateHTML(this,"a","name",t)},big:function(){return X.CreateHTML(this,"big","","")},blink:function(){return X.CreateHTML(this,"blink","","")},bold:function(){return X.CreateHTML(this,"b","","")},fixed:function(){return X.CreateHTML(this,"tt","","")},fontcolor:function(t){return X.CreateHTML(this,"font","color",t)},fontsize:function(t){return X.CreateHTML(this,"font","size",t)},italics:function(){return X.CreateHTML(this,"i","","")},link:function(t){return X.CreateHTML(this,"a","href",t)},small:function(){return X.CreateHTML(this,"small","","")},strike:function(){return X.CreateHTML(this,"strike","","")},sub:function(){return X.CreateHTML(this,"sub","","")},sup:function(){return X.CreateHTML(this,"sup","","")}};h(Object.keys(Ur),function(t){var e=String.prototype[t],n=!1;if(X.IsCallable(e)){var i=r(e,"",' " '),o=T([],i.match(/"/g)).length;n=i!==i.toLowerCase()||o>2}else n=!0;n&&tt(String.prototype,t,Ur[t])});var Wr=function(){if(!$.symbol(D.iterator))return!1;var t="object"==typeof JSON&&"function"==typeof JSON.stringify?JSON.stringify:null;if(!t)return!1;if("undefined"!=typeof t(D()))return!0;if("[null]"!==t([D()]))return!0;var e={a:D()};return e[D()]=!0,"{}"!==t(e)}(),zr=u(function(){return!$.symbol(D.iterator)||"{}"===JSON.stringify(Object(D()))&&"[{}]"===JSON.stringify([Object(D())])});if(Wr||!zr){var qr=JSON.stringify;tt(JSON,"stringify",function(t){if("symbol"!=typeof t){var e;arguments.length>1&&(e=arguments[1]);var i=[t];if(n(e))i.push(e);else{var o=(X.IsCallable(e)?e:null,function(t,n){var i=e?r(e,this,t,n):n;if("symbol"!=typeof i)return $.symbol(i)?te({})(i):i});i.push(o)}return arguments.length>2&&i.push(arguments[2]),qr.apply(this,i)}})}return E})}).call(e,function(){return this}(),r(3))},function(t,e,r){(function(t,n){function i(t,r){var n={seen:[],stylize:a};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),u(n,t,n.depth)}function o(t,e){var r=i.styles[e];return r?"["+i.colors[r][0]+"m"+t+"["+i.colors[r][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function u(t,r,n){if(t.customInspect&&r&&T(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return m(i)||(i=u(t,i,n)),i}var o=c(t,r);if(o)return o;var a=Object.keys(r),y=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),S(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(r);if(0===a.length){if(T(r)){var v=r.name?": "+r.name:"";return t.stylize("[Function"+v+"]","special")}if(E(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(j(r))return t.stylize(Date.prototype.toString.call(r),"date");if(S(r))return l(r)}var g="",b=!1,_=["{","}"];if(d(r)&&(b=!0,_=["[","]"]),T(r)){var w=r.name?": "+r.name:"";g=" [Function"+w+"]"}if(E(r)&&(g=" "+RegExp.prototype.toString.call(r)),j(r)&&(g=" "+Date.prototype.toUTCString.call(r)),S(r)&&(g=" "+l(r)),0===a.length&&(!b||0==r.length))return _[0]+g+_[1];if(n<0)return E(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special");t.seen.push(r);var O;return O=b?f(t,r,n,y,a):a.map(function(e){return p(t,r,n,y,e,b)}),t.seen.pop(),h(O,g,_)}function c(t,e){if(w(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return b(e)?t.stylize(""+e,"number"):y(e)?t.stylize(""+e,"boolean"):v(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i){for(var o=[],a=0,s=e.length;a<s;++a)A(e,String(a))?o.push(p(t,e,r,n,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(p(t,e,r,n,i,!0))}),o}function p(t,e,r,n,i,o){var a,s,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?s=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(s=t.stylize("[Setter]","special")),A(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(c.value)<0?(s=v(r)?u(t,c.value,null):u(t,c.value,r-1),s.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")),w(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.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 h(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function d(t){return Array.isArray(t)}function y(t){return"boolean"==typeof t}function v(t){return null===t}function g(t){return null==t}function b(t){return"number"==typeof t}function m(t){return"string"==typeof t}function _(t){return"symbol"==typeof t}function w(t){return void 0===t}function E(t){return O(t)&&"[object RegExp]"===x(t)}function O(t){return"object"==typeof t&&null!==t}function j(t){return O(t)&&"[object Date]"===x(t)}function S(t){return O(t)&&("[object Error]"===x(t)||t instanceof Error)}function T(t){return"function"==typeof t}function C(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function x(t){return Object.prototype.toString.call(t)}function P(t){return t<10?"0"+t.toString(10):t.toString(10)}function R(){var t=new Date,e=[P(t.getHours()),P(t.getMinutes()),P(t.getSeconds())].join(":");return[t.getDate(),N[t.getMonth()],e].join(" ")}function A(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var k=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(i(arguments[r]));return e.join(" ")}for(var r=1,n=arguments,o=n.length,a=String(t).replace(k,function(t){if("%%"===t)return"%";if(r>=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(t){return"[Circular]"}default:return t}}),s=n[r];r<o;s=n[++r])a+=v(s)||!O(s)?" "+s:" "+i(s);return a},e.deprecate=function(r,i){function o(){if(!a){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),a=!0}return r.apply(this,arguments)}if(w(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(n.noDeprecation===!0)return r;var a=!1;return o};var I,M={};e.debuglog=function(t){if(w(I)&&(I=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!M[t])if(new RegExp("\\b"+t+"\\b","i").test(I)){var r=n.pid;M[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else M[t]=function(){};return M[t]},e.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=y,e.isNull=v,e.isNullOrUndefined=g,e.isNumber=b,e.isString=m,e.isSymbol=_,e.isUndefined=w,e.isRegExp=E,e.isObject=O,e.isDate=j,e.isError=S,e.isFunction=T,e.isPrimitive=C,e.isBuffer=r(10);var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.log=function(){console.log("%s - %s",R(),e.format.apply(e,arguments))},e.inherits=r(11),e._extend=function(t,e){if(!e||!O(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(3))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,i,s,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}if(r=this._events[t],a(r))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(o(r))for(s=Array.prototype.slice.call(arguments,1),c=r.slice(),i=c.length,u=0;u<i;u++)c[u].apply(this,s);return!0},r.prototype.addListener=function(t,e){var i;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e, +o(this._events[t])&&!this._events[t].warned&&(i=a(this._maxListeners)?r.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){function r(){this.removeListener(t,r),i||(i=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var i=!1;return r.listener=e,this.on(t,r),this},r.prototype.removeListener=function(t,e){var r,i,a,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],a=r.length,i=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){i=s;break}if(i<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},r.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],n(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},r.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},r.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},r.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e){t.exports={to7BitArray:function(t){var e=0,r=0,n=[];return t.forEach(function(t){0===e?(n.push(127&t),e++,r=t>>7):(n.push(t<<e&127|r),6===e?(n.push(t>>1),e=0):(e++,r=t>>8-e))}),e>0&&n.push(r),n},from7BitArray:function(t){for(var e=7*t.length>>3,r=[],n=0;n<e;n++){var i=n<<3,o=parseInt(i/7,10),a=i%7;r[n]=t[o]>>a|t[o+1]<<7-a&255}return r}}},function(t,e,r){var n=r(13),i={crc8:function(t){for(var e=0,r=0;r<t.length;r++)for(var n=t[r],i=8;i;i--){var o=1&(e^n);e>>=1,o&&(e^=140),n>>=1}return e},readDevices:function(t){for(var e=n.from7BitArray(t),r=[],o=0;o<e.length;o+=8){var a=e.slice(o,o+8);if(8===a.length){var s=i.crc8(a.slice(0,7));s!==a[7]&&console.error("ROM invalid!"),r.push(a)}}return r}};t.exports=i},function(t,e,r){(function(e,n){"use strict";function i(t){switch(t.dataBits){case 7:t.dataBits="seven";break;case 8:t.dataBits="eight"}switch(t.stopBits){case 1:t.stopBits="one";break;case 2:t.stopBits="two"}switch(t.parity){case"none":t.parity="no"}return t}function o(t,r,n,o){l.call(this);var a=this,s=Array.prototype.slice.call(arguments);o=s.pop(),"function"!=typeof o&&(o=null),r="function"!=typeof r&&r||{},n=void 0===n||null===n||n,o=o||function(t){t&&a.emit("error",t)};var u;if(r.baudRate=r.baudRate||r.baudrate||v.baudrate,r.dataBits=r.dataBits||r.databits||v.databits,p.indexOf(r.dataBits)===-1)return u=new Error('Invalid "databits": '+r.dataBits),void o(u);if(r.stopBits=r.stopBits||r.stopbits||v.stopbits,h.indexOf(r.stopBits)===-1)return u=new Error('Invalid "stopbits": '+r.stopbits),void o(u);if(r.parity=r.parity||v.parity,d.indexOf(r.parity)===-1)return u=new Error('Invalid "parity": '+r.parity),void o(u);if(!t)return u=new Error("Invalid port specified: "+t),void o(u);if(r.rtscts=v.rtscts,r.flowControl||r.flowcontrol){var c=r.flowControl||r.flowcontrol;if("boolean"==typeof c)r.rtscts=!0;else{var f=c.every(function(t){var e=t.toUpperCase(),n=y.indexOf(e);if(n<0){var i=new Error('Invalid "flowControl": '+e+". Valid options: "+y.join(", "));return o(i),!1}switch(n){case 0:r.rtscts=!0}return!0});if(!f)return}}if(r.bufferSize=r.bufferSize||r.buffersize||v.buffersize,r.serial=r.serial||"undefined"!=typeof chrome&&chrome.serial,!r.serial)throw new Error("No access to serial ports. Try loading as a Chrome Application.");this.options=i(r),this.options.serial.onReceiveError.addListener(function(t){switch(t.error){case"disconnected":case"device_lost":case"system_error":u=new Error("Disconnected"),a.options.disconnectedCallback?a.options.disconnectedCallback(u):a.emit("disconnect",u),a.connectionId>=0&&a.close();break;case"timeout":}}),this.path=t,n&&e.nextTick(function(){a.open(o)})}function a(t){"undefined"!=typeof chrome&&chrome.serial?chrome.serial.getDevices(function(e){for(var r=new Array(e.length),n=0;n<e.length;n++)r[n]={comName:e[n].path,manufacturer:e[n].displayName,serialNumber:"",pnpId:"",locationId:"",vendorId:"0x"+(e[n].vendorId||0).toString(16),productId:"0x"+(e[n].productId||0).toString(16)};t(chrome.runtime.lastError,r)}):t(new Error("No access to serial ports. Try loading as a Chrome Application."),null)}function s(t){for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n<t.length;n++)r[n]=t.charCodeAt(n);return e}function u(t){for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n<t.length;n++)r[n]=t[n];return e}function c(t){for(var e=new n(t.byteLength),r=new Uint8Array(t),i=0;i<e.length;++i)e[i]=r[i];return e}var l=r(12).EventEmitter,f=r(9),p=[7,8],h=[1,2],d=["none","even","mark","odd","space"],y=["RTSCTS"],v={baudrate:9600,parity:"none",rtscts:!1,databits:8,stopbits:1,buffersize:256};f.inherits(o,l),o.prototype.connectionId=-1,o.prototype.open=function(t){var e={bitrate:parseInt(this.options.baudRate,10),dataBits:this.options.dataBits,parityBit:this.options.parity,stopBits:this.options.stopBits,ctsFlowControl:this.options.rtscts};this.options.serial.connect(this.path,e,this.proxy("onOpen",t))},o.prototype.onOpen=function(t,e){return chrome.runtime.lastError?void("function"==typeof t?t(chrome.runtime.lastError):this.emit("error",chrome.runtime.lastError)):(this.connectionId=e.connectionId,this.connectionId===-1?void this.emit("error",new Error("Could not open port.")):(this.emit("open",e),this._reader=this.proxy("onRead"),this.options.serial.onReceive.addListener(this._reader),void("function"==typeof t&&t(chrome.runtime.lastError,e))))},o.prototype.onRead=function(t){t&&this.connectionId===t.connectionId&&(this.options.dataCallback?this.options.dataCallback(c(t.data)):this.emit("data",c(t.data)))},o.prototype.write=function(t,e){if(this.connectionId<0){var r=new Error("Serialport not open.");return void("function"==typeof e?e(r):this.emit("error",r))}"string"==typeof t&&(t=s(t)),t instanceof ArrayBuffer==!1&&(t=u(t)),this.options.serial.send(this.connectionId,t,function(t){"function"==typeof e&&e(chrome.runtime.lastError,t)})},o.prototype.close=function(t){if(this.connectionId<0){var e=new Error("Serialport not open.");return void("function"==typeof t?t(e):this.emit("error",e))}this.options.serial.disconnect(this.connectionId,this.proxy("onClose",t))},o.prototype.onClose=function(t,e){this.connectionId=-1,this.emit("close"),this.removeAllListeners(),this._reader&&(this.options.serial.onReceive.removeListener(this._reader),this._reader=null),"function"==typeof t&&t(chrome.runtime.lastError,e)},o.prototype.flush=function(t){if(this.connectionId<0){var e=new Error("Serialport not open.");return void("function"==typeof t?t(e):this.emit("error",e))}var r=this;this.options.serial.flush(this.connectionId,function(e){return chrome.runtime.lastError?void("function"==typeof t?t(chrome.runtime.lastError,e):r.emit("error",chrome.runtime.lastError)):void t(null,e)})},o.prototype.drain=function(t){if(this.connectionId<0){var e=new Error("Serialport not open.");return void("function"==typeof t?t(e):this.emit("error",e))}"function"==typeof t&&t()},o.prototype.proxy=function(){for(var t=this,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=e.splice(0,1)[0],i=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e.concat(r);t[n].apply(t,o)};return i},o.prototype.set=function(t,e){this.options.serial.setControlSignals(this.connectionId,t,function(t){e(chrome.runtime.lastError,t)})},t.exports={SerialPort:o,list:a,buffer2ArrayBuffer:u,used:[]}}).call(e,r(3),r(4).Buffer)},function(t,e,r){(function(e,n){"use strict";function i(t){return j.forEach(function(e){var r=e.toLowerCase();if(t.hasOwnProperty(r)){var n=t[r];delete t[r],t[e]=n}}),t}function o(t,r,n,o){var a=Array.prototype.slice.call(arguments);if(o=a.pop(),"function"!=typeof o&&(o=null),r="function"!=typeof r&&r||{},void 0!==n&&null!==n||(n=!0),p.Stream.call(this),o=o||function(t){t&&(this._events.error?this.emit("error",t):d.emit("error",t))}.bind(this),!t)return o(new Error("Invalid port specified: "+t));this.path=t;var u=i(r),c=s({},E,u);if(y.indexOf(c.dataBits)===-1)return o(new Error('Invalid "databits": '+c.dataBits));if(v.indexOf(c.stopBits)===-1)return o(new Error('Invalid "stopbits": '+c.stopbits));if(g.indexOf(c.parity)===-1)return o(new Error('Invalid "parity": '+c.parity));var l=c.flowControl;if(l===!0)c.rtscts=!0;else if(Array.isArray(l))for(var f=l.length-1;f>=0;f--){var h=l[f].toLowerCase();if(!(b.indexOf(h)>-1))return o(new Error("Invalid flowControl option: "+h));c[h]=!0}c.dataCallback=r.dataCallback||function(t){c.parser(this,t)}.bind(this),c.disconnectedCallback=r.disconnectedCallback||function(t){this.closing||(t||(t=new Error("Disconnected")),this.emit("disconnect",t))}.bind(this),this.fd=null,this.paused=!0,this.opening=!1,this.closing=!1,"win32"!==e.platform&&(this.bufferSize=c.bufferSize,this.readable=!0,this.reading=!1),this.options=c,n&&e.nextTick(function(){this.open(o)}.bind(this))}var a=r(17)("serialport"),s=r(20).getPolyfill(),u=r(31),c=r(39),l=r(12).EventEmitter,f=r(37),p=r(40),h=r(9),d=new l;d.parsers=c,d.list=u.list;var y=[5,6,7,8],v=[1,1.5,2],g=["none","even","mark","odd","space"],b=["xon","xoff","xany","rtscts"],m=["brk","cts","dtr","dts","rts"],_=40960,w=128,E={baudRate:9600,parity:"none",xon:!1,xoff:!1,xany:!1,rtscts:!1,hupcl:!0,dataBits:8,stopBits:1,bufferSize:65536,parser:c.raw,platformOptions:u.platformOptions},O={brk:!1,cts:!1,dtr:!0,dts:!1,rts:!0},j=["baudRate","dataBits","stopBits","bufferSize","platformOptions","flowControl"];d.SerialPort=o,h.inherits(o,p.Stream),o.prototype._error=function(t,e){e?e(t):this.emit("error",t)},o.prototype.open=function(t){if(this.isOpen())return this._error(new Error("Port is already open"),t);if(this.opening)return this._error(new Error("Port is opening"),t);this.paused=!0,this.readable=!0,this.reading=!1,this.opening=!0;var r=this;u.open(this.path,this.options,function(n,i){return n?(a("SerialPortBinding.open had an error",n),r._error(n,t)):(r.fd=i,r.paused=!1,r.opening=!1,"win32"!==e.platform&&(r.serialPoller=new u.SerialportPoller(r.fd,function(t){t?r.disconnected(t):r._read()}),r.serialPoller.start()),r.emit("open"),void(t&&t()))})},o.prototype.update=function(t,e){if(!this.isOpen())return a("update attempted, but port is not open"),this._error(new Error("Port is not open"),e);var r=i(t),n=s({},E,r);this.options.baudRate=n.baudRate,u.update(this.fd,this.options,function(t){return t?this._error(t,e):(this.emit("open"),void(e&&e()))}.bind(this))},o.prototype.isOpen=function(){return null!==this.fd&&!this.closing},o.prototype.write=function(t,e){if(!this.isOpen())return a("write attempted, but port is not open"),this._error(new Error("Port is not open"),e);n.isBuffer(t)||(t=new n(t)),a("write data: "+JSON.stringify(t));var r=this;u.write(this.fd,t,function(t,n){e?e(t,n):t&&r.emit("error",t)})},"win32"!==e.platform&&(o.prototype._read=function(){function t(t,r,o,a){if(e.reading=!1,t)t.code&&"EAGAIN"===t.code?!e.closing&&e.isOpen()&&e.serialPoller.start():!t.code||"EBADF"!==t.code&&"ENXIO"!==t.code&&t.errno!==-1&&"UNKNOWN"!==t.code?(e.fd=null,e.readable=!1,e.emit("error",t)):e.disconnected(t);else if(e.pool.used-=a-r,0===r)e.isOpen()&&e.serialPoller.start();else{var s=e.pool.slice(i,i+r);if(e.paused)return void(e.buffer=n.concat([e.buffer,s]));if(e._emitData(s),!e.readable)return;e._read()}}var e=this;if(e.readable&&!e.paused&&!e.reading&&!this.closing){e.reading=!0,(!e.pool||e.pool.length-e.pool.used<w)&&(e.pool=new n(_),e.pool.used=0);var r=Math.min(e.pool.length-e.pool.used,~~e.bufferSize),i=e.pool.used;f.read(e.fd,e.pool,e.pool.used,r,null,function(n,i){var o=e.pool,a=r;t(n,i,o,a)}),e.pool.used+=r}},o.prototype._emitData=function(t){this.options.dataCallback(t)},o.prototype.pause=function(){var t=this;t.paused=!0},o.prototype.resume=function(){var t=this;if(t.paused=!1,t.buffer){var e=t.buffer;t.buffer=null,t._emitData(e)}this.isOpen()&&t._read()}),o.prototype.disconnected=function(t){var r=this,n=r.fd;r.options.disconnectedCallback?r.options.disconnectedCallback(t):r.emit("disconnect",t),r.paused=!0,r.closing=!0,r.emit("close"),n=r.fd;try{u.close(n,function(t){a(t?"Disconnect completed with error: "+JSON.stringify(t):"Disconnect completed.")})}catch(t){a("Disconnect completed with an exception: "+JSON.stringify(t))}r.removeAllListeners(),r.closing=!1,r.fd=null,"win32"!==e.platform&&(r.readable=!1,r.serialPoller.close())},o.prototype.close=function(t){var r=this,n=r.fd;if(r.closing)return a("close attempted, but port is already closing"),this._error(new Error("Port is not open"),t);if(!this.isOpen())return a("close attempted, but port is not open"),this._error(new Error("Port is not open"),t);r.closing=!0,"win32"!==e.platform&&(r.readable=!1,r.serialPoller.close());try{u.close(n,function(e){return r.closing=!1,e?(a("SerialPortBinding.close had an error",e),r._error(e,t)):(r.fd=null,r.emit("close"),t&&t(),void r.removeAllListeners())})}catch(e){return this.closing=!1,a("SerialPortBinding.close had an throwing error",e),this._error(e,t)}},o.prototype.flush=function(t){var e=this,r=e.fd;return this.isOpen()?void u.flush(r,function(r,n){t?t(r,n):r&&e.emit("error",r)}):(a("flush attempted, but port is not open"),this._error(new Error("Port is not open"),t))},o.prototype.set=function(t,e){if(!this.isOpen())return a("set attempted, but port is not open"),this._error(new Error("Port is not open"),e);t=t||{},e||"function"!=typeof t||(e=t,t={});for(var r={},n=m.length-1;n>=0;n--){var i=m[n];void 0!==t[i]?r[i]=t[i]:r[i]=O[i]}u.set(this.fd,r,function(t,r){return t?(a("SerialPortBinding.set had an error",t),this._error(t,e)):void(e&&e(null,r))}.bind(this))},o.prototype.drain=function(t){var e=this,r=this.fd;return this.isOpen()?void u.drain(r,function(r,n){t?t(r,n):r&&e.emit("error",r)}):(a("drain attempted, but port is not open"),this._error(new Error("Port is not open"),t))},t.exports=d}).call(e,r(3),r(4).Buffer)},function(t,e,r){function n(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function i(){var t=arguments,r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),!r)return t;var n="color: "+this.color;t=[t[0],n,"color: inherit"].concat(Array.prototype.slice.call(t,1));var i=0,o=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(i++,"%c"===t&&(o=i))}),t.splice(o,0,n),t}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function s(){var t;try{t=e.storage.debug}catch(t){}return t}function u(){try{return window.localStorage}catch(t){}}e=t.exports=r(18),e.log=o,e.formatArgs=i,e.save=a,e.load=s,e.useColors=n,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){return JSON.stringify(t)},e.enable(s())},function(t,e,r){function n(){return e.colors[l++%e.colors.length]}function i(t){function r(){}function i(){var t=i,r=+new Date,o=r-(c||r);t.diff=o,t.prev=c,t.curr=r,c=r,null==t.useColors&&(t.useColors=e.useColors()),null==t.color&&t.useColors&&(t.color=n());var a=Array.prototype.slice.call(arguments);a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&(a=["%o"].concat(a));var s=0;a[0]=a[0].replace(/%([a-z%])/g,function(r,n){if("%%"===r)return r;s++;var i=e.formatters[n];if("function"==typeof i){var o=a[s];r=i.call(t,o),a.splice(s,1),s--}return r}),"function"==typeof e.formatArgs&&(a=e.formatArgs.apply(t,a));var u=i.log||e.log||console.log.bind(console);u.apply(t,a)}r.enabled=!1,i.enabled=!0;var o=e.enabled(t)?i:r;return o.namespace=t,o}function o(t){e.save(t);for(var r=(t||"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&(t=r[i].replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function a(){e.enable("")}function s(t){var r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1}function u(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=i,e.coerce=u,e.disable=a,e.enable=o,e.enabled=s,e.humanize=r(19),e.names=[],e.skips=[],e.formatters={};var c,l=0},function(t,e){function r(t){if(t=""+t,!(t.length>1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*l;case"days":case"day":case"d":return r*c;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*s;case"seconds":case"second":case"secs":case"sec":case"s":return r*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function n(t){return t>=c?Math.round(t/c)+"d":t>=u?Math.round(t/u)+"h":t>=s?Math.round(t/s)+"m":t>=a?Math.round(t/a)+"s":t+"ms"}function i(t){return o(t,c,"day")||o(t,u,"hour")||o(t,s,"minute")||o(t,a,"second")||t+" ms"}function o(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+r:Math.ceil(t/e)+" "+r+"s"}var a=1e3,s=60*a,u=60*s,c=24*u,l=365.25*c;t.exports=function(t,e){return e=e||{},"string"==typeof t?r(t):e.long?i(t):n(t)}},function(t,e,r){"use strict";var n=r(21),i=r(25),o=r(29),a=r(30),s=o();n(s,{implementation:i,getPolyfill:o,shim:a}),t.exports=s},function(t,e,r){"use strict";var n=r(22),i=r(24),o="function"==typeof Symbol&&"symbol"==typeof Symbol(),a=Object.prototype.toString,s=function(t){return"function"==typeof t&&"[object Function]"===a.call(t)},u=function(){var t={};try{Object.defineProperty(t,"x",{enumerable:!1,value:t});for(var e in t)return!1;return t.x===t}catch(t){return!1}},c=Object.defineProperty&&u(),l=function(t,e,r,n){(!(e in t)||s(n)&&n())&&(c?Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},f=function(t,e){var r=arguments.length>2?arguments[2]:{},a=n(e);o&&(a=a.concat(Object.getOwnPropertySymbols(e))),i(a,function(n){l(t,n,e[n],r[n])})};f.supportsDescriptors=!!c,t.exports=f},function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Array.prototype.slice,a=r(23),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},p={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!p["$"+t]&&n.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{f(window[t])}catch(t){return!0}}catch(t){return!0}return!1}(),d=function(t){if("undefined"==typeof window||!h)return f(t);try{return f(t)}catch(t){return!1}},y=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===i.call(t),o=a(t),s=e&&"[object String]"===i.call(t),f=[];if(!e&&!r&&!o)throw new TypeError("Object.keys called on a non-object");var p=c&&r;if(s&&t.length>0&&!n.call(t,0))for(var h=0;h<t.length;++h)f.push(String(h));if(o&&t.length>0)for(var y=0;y<t.length;++y)f.push(String(y));else for(var v in t)p&&"prototype"===v||!n.call(t,v)||f.push(String(v));if(u)for(var g=d(t),b=0;b<l.length;++b)g&&"constructor"===l[b]||!n.call(t,l[b])||f.push(l[b]);return f};y.shim=function(){if(Object.keys){var t=function(){return 2===(Object.keys(arguments)||"").length}(1,2);if(!t){var e=Object.keys;Object.keys=function(t){return e(a(t)?o.call(t):t)}}}else Object.keys=y;return Object.keys||y},t.exports=y},function(t,e){"use strict";var r=Object.prototype.toString;t.exports=function(t){var e=r.call(t),n="[object Arguments]"===e;return n||(n="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===r.call(t.callee)),n}},function(t,e){var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString;t.exports=function(t,e,i){if("[object Function]"!==n.call(e))throw new TypeError("iterator must be a function");var o=t.length;if(o===+o)for(var a=0;a<o;a++)e.call(i,t[a],a,t);else for(var s in t)r.call(t,s)&&e.call(i,t[s],s,t)}},function(t,e,r){"use strict";var n=r(22),i=r(26),o=function(t){return"undefined"!=typeof t&&null!==t},a=r(28)(),s=Object,u=i.call(Function.call,Array.prototype.push),c=i.call(Function.call,Object.prototype.propertyIsEnumerable),l=a?Object.getOwnPropertySymbols:null;t.exports=function(t,e){if(!o(t))throw new TypeError("target must be an object");var r,i,f,p,h,d,y,v=s(t);for(r=1;r<arguments.length;++r){i=s(arguments[r]),p=n(i);var g=a&&(Object.getOwnPropertySymbols||l);if(g)for(h=g(i),f=0;f<h.length;++f)y=h[f],c(i,y)&&u(p,y);for(f=0;f<p.length;++f)y=p[f],d=i[y],c(i,y)&&(v[y]=d)}return v}},function(t,e,r){var n=r(27);t.exports=Function.prototype.bind||n},function(t,e){var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,i=Object.prototype.toString,o="[object Function]";t.exports=function(t){var e=this;if("function"!=typeof e||i.call(e)!==o)throw new TypeError(r+e);for(var a,s=n.call(arguments,1),u=function(){if(this instanceof a){var r=e.apply(this,s.concat(n.call(arguments)));return Object(r)===r?r:this}return e.apply(t,s.concat(n.call(arguments)))},c=Math.max(0,e.length-s.length),l=[],f=0;f<c;f++)l.push("$"+f);if(a=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(u),e.prototype){var p=function(){};p.prototype=e.prototype,a.prototype=new p,p.prototype=null}return a}},function(t,e,r){"use strict";var n=r(22);t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;var i=42;t[e]=i;for(e in t)return!1;if(0!==n(t).length)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(t,e);if(a.value!==i||a.enumerable!==!0)return!1}return!0}},function(t,e,r){"use strict";var n=r(25),i=function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),r={},n=0;n<e.length;++n)r[e[n]]=e[n];var i=Object.assign({},r),o="";for(var a in i)o+=a;return t!==o},o=function(){if(!Object.assign||!Object.preventExtensions)return!1;var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch(e){return"y"===t[1]}return!1};t.exports=function(){return Object.assign?i()?n:o()?n:Object.assign:n}},function(t,e,r){"use strict";var n=r(21),i=r(29);t.exports=function(){var t=i();return n(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t}},function(t,e,r){(function(e){"use strict";function n(t){return t=t||function(t){t&&this.emit("error",t)}.bind(this),o(t)}var i=r(32)("serialport.node"),o=r(33),a="win32"!==e.platform&&"darwin"!==e.platform,s={};"win32"!==e.platform&&(s={vmin:1,vtime:0}),t.exports={close:i.close,drain:i.drain,flush:i.flush,list:a?n:i.list,open:i.open,SerialportPoller:i.SerialportPoller,set:i.set,update:i.update,write:i.write,platformOptions:s}}).call(e,r(3))},function(t,e){t.exports=bindings},function(t,e,r){"use strict";function n(t){var e,r=t.split("\n").reduce(function(t,e){if(!e||""===e.trim())return t;var r=e.split("=").map(function(t){return t.trim()});return t[r[0].toLowerCase()]=r[1],t},{});r.devlinks&&r.devlinks.split(" ").forEach(function(t){t.indexOf("/by-id/")!==-1&&(e=t.substring(t.lastIndexOf("/")+1))});var n=r.id_vendor_id;n&&"0x"!==n.substring(0,2)&&(n="0x"+n);var i=r.id_model_id;return i&&"0x"!==i.substring(0,2)&&(i="0x"+i),{comName:r.devname,manufacturer:r.id_vendor,serialNumber:r.id_serial,pnpId:e,vendorId:n,productId:i}}function i(t){return!!/(tty(S|ACM|USB|AMA|MFD)|rfcomm)/.test(t)&&c.statAsync(t).then(function(t){return t.isCharacterDevice()})}function o(t){var e="udevadm info --query=property -p $(udevadm info -q path -n "+t+")";return u.execAsync(e).then(n)}function a(t){var e="/dev";c.readdirAsync(e).catch(function(t){if(34===t.errno)return[];throw t}).map(function(t){return l.join(e,t)}).filter(i).map(o).asCallback(t)}var s=r(34),u=s.promisifyAll(r(36)),c=s.promisifyAll(r(37)),l=r(38);t.exports=a},function(t,e,r){(function(e,r,n){!function(e){t.exports=e()}(function(){var t,i,o;return function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var u="function"==typeof _dereq_&&_dereq_;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[a]={exports:{}};e[a][0].call(l.exports,function(t){var r=e[a][1][t];return i(r?r:t)},l,l.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(t,e,r){"use strict";e.exports=function(t){function e(t){var e=new r(t),n=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),n}var r=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,r,n){"use strict";function i(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new l(16),this._normalQueue=new l(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=c}function o(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()}function a(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}var u;try{throw new Error}catch(t){u=t}var c=t("./schedule"),l=t("./queue"),f=t("./util");i.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},i.prototype.hasCustomScheduler=function(){return this._customScheduler},i.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},i.prototype.disableTrampolineIfNecessary=function(){f.hasDevTools&&(this._trampolineEnabled=!1)},i.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},i.prototype.fatalError=function(t,r){r?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},i.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},f.hasDevTools?(i.prototype.invokeLater=function(t,e,r){this._trampolineEnabled?o.call(this,t,e,r):this._schedule(function(){setTimeout(function(){t.call(e,r)},100)})},i.prototype.invoke=function(t,e,r){this._trampolineEnabled?a.call(this,t,e,r):this._schedule(function(){t.call(e,r)})},i.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(i.prototype.invokeLater=o,i.prototype.invoke=a,i.prototype.settlePromises=s),i.prototype.invokeFirst=function(t,e,r){this._normalQueue.unshift(t,e,r),this._queueTick()},i.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var r=t.shift(),n=t.shift();e.call(r,n)}else e._settlePromises()}},i.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},i.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},i.prototype._reset=function(){this._isTickUsed=!1},r.exports=i,r.exports.firstLineError=u},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i=!1,o=function(t,e){this._reject(e)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=function(t,e){0===(50397184&this._bitField)&&this._resolveCallback(e.target)},u=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=n.propagateFromFunction(),t.prototype._boundValue=n.boundValueFunction());var c=r(o),l=new t(e);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(c),c instanceof t){var p={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:c};f._then(e,a,void 0,l,p),c._then(s,u,void 0,l,p),l._setOnCancel(c)}else l._resolveCallback(f);return l},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=this._bitField&-2097153},t.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},t.bind=function(e,r){return t.resolve(r).bind(e)}}},{}],4:[function(t,e,r){"use strict";function n(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=n,e.exports=o},{"./promise":22}],5:[function(t,e,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}e.exports=function(e){function r(t,r){var n;if(null!=t&&(n=t[r]),"function"!=typeof n){var i="Object "+s.classString(t)+" has no method '"+s.toString(r)+"'";throw new e.TypeError(i)}return n}function n(t){var e=this.pop(),n=r(t,e);return n.apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}var a,s=t("./util"),u=s.canEvaluate;s.isIdentifier;e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(n,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e,r="number"==typeof t;if(r)e=o;else if(u){var n=a(t);e=null!==n?n:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){var o=t("./util"),a=o.tryCatch,s=o.errorObj,u=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var r=t._cancellationParent;if(null==r||!r._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=r}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--; +},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),u.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var r=0;r<t.length;++r)this._doInvokeOnCancel(t[r],e);else if(void 0!==t)if("function"==typeof t){if(!e){var n=a(t).call(this._boundValue());n===s&&(this._attachExtraTrace(n.e),u.throwLater(n.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,r){"use strict";e.exports=function(e){function r(t,r,s){return function(u){var c=s._boundValue();t:for(var l=0;l<t.length;++l){var f=t[l];if(f===Error||null!=f&&f.prototype instanceof Error){if(u instanceof f)return o(r).call(c,u)}else if("function"==typeof f){var p=o(f).call(c,u);if(p===a)return p;if(p)return o(r).call(c,u)}else if(n.isObject(u)){for(var h=i(f),d=0;d<h.length;++d){var y=h[d];if(f[y]!=u[y])continue t}return o(r).call(c,u)}}return e}}var n=t("./util"),i=t("./es5").keys,o=n.tryCatch,a=n.errorObj;return r}},{"./es5":13,"./util":36}],8:[function(t,e,r){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(n())}function r(){if(i)return new e}function n(){var t=o.length-1;if(t>=0)return o[t]}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=r,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var r=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,u=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=u,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=n,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,r,n){"use strict";r.exports=function(r,n){function i(t,e){return{promise:e}}function o(){return!1}function a(t,e,r){var n=this;try{t(e,r,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+D.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?D.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function u(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function f(t,e){if(0!==(1&e)){this._cancellationParent=t;var r=t._branchesRemainingToCancel;void 0===r&&(r=0),t._branchesRemainingToCancel=r+1}0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!==(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof r?t.isFulfilled()?t.value():void 0:t}function d(){this._trace=new k(this._peekContext())}function y(t,e){if(U(t)){var r=this._trace;if(void 0!==r&&e&&(r=r._parent),void 0!==r)r.attachExtraTrace(t);else if(!t.__stackCleaned__){var n=j(t);D.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),D.notEnumerableProp(t,"__stackCleaned__",!0)}}}function v(t,e,r,n,i){if(void 0===t&&null!==e&&Q){if(void 0!==i&&i._returnedNonUndefined())return;if(0===(65535&n._bitField))return;r&&(r+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),u=E(s),c=u.length-1;c>=0;--c){var l=u[c];if(!z.test(l)){var f=l.match(q);f&&(o="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(u.length>0)for(var p=u[0],c=0;c<s.length;++c)if(s[c]===p){c>0&&(a="\n"+s[c-1]);break}}var h="a promise was created in a "+r+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(h,!0,e)}}function g(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),b(r)}function b(t,e,n){if(at.warnings){var i,o=new L(t);if(e)n._attachExtraTrace(o);else if(at.longStackTraces&&(i=r._peekContext()))i.attachExtraTrace(o);else{var a=j(o);o.stack=a.message+"\n"+a.stack.join("\n")}et("warning",o)||S(o,"",!0)}}function m(t,e){for(var r=0;r<e.length-1;++r)e[r].push("From previous event:"),e[r]=e[r].join("\n");return r<e.length&&(e[r]=e[r].join("\n")),t+"\n"+e.join("\n")}function _(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function w(t){for(var e=t[0],r=1;r<t.length;++r){for(var n=t[r],i=e.length-1,o=e[i],a=-1,s=n.length-1;s>=0;--s)if(n[s]===o){a=s;break}for(var s=a;s>=0;--s){var u=n[s];if(e[i]!==u)break;e.pop(),i--}e=n}}function E(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=" (No stack trace)"===n||H.test(n),o=i&&nt(n);i&&!o&&($&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function O(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r<e.length;++r){var n=e[r];if(" (No stack trace)"===n||H.test(n))break}return r>0&&(e=e.slice(r)),e}function j(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?O(t):[" (No stack trace)"],{message:r,stack:E(e)}}function S(t,e,r){if("undefined"!=typeof console){var n;if(D.isObject(t)){var i=t.stack;n=e+V(i,t)}else n=e+String(t);"function"==typeof N?N(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function T(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){B.throwLater(t)}"unhandledRejection"===t?et(t,r,n)||i||S(r,"Unhandled rejection "):et(t,n)}function C(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():D.toString(t);var r=/\[object [a-zA-Z0-9$_]+\]/;if(r.test(e))try{var n=JSON.stringify(t);e=n}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){var e=41;return t.length<e?t:t.substr(0,e-3)+"..."}function P(){return"function"==typeof ot}function R(t){var e=t.match(it);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function A(t,e){if(P()){for(var r,n,i=t.stack.split("\n"),o=e.stack.split("\n"),a=-1,s=-1,u=0;u<i.length;++u){var c=R(i[u]);if(c){r=c.fileName,a=c.line;break}}for(var u=0;u<o.length;++u){var c=R(o[u]);if(c){n=c.fileName,s=c.line;break}}a<0||s<0||!r||!n||r!==n||a>=s||(nt=function(t){if(W.test(t))return!0;var e=R(t);return!!(e&&e.fileName===r&&a<=e.line&&e.line<=s)})}}function k(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);ot(this,k),e>32&&this.uncycle()}var I,M,N,F=r._getDomain,B=r._async,L=t("./errors").Warning,D=t("./util"),U=D.canAttachTrace,W=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,z=/\((?:timers\.js):\d+:\d+\)/,q=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,H=null,V=null,$=!1,G=!(0==D.env("BLUEBIRD_DEBUG")),Y=!(0==D.env("BLUEBIRD_WARNINGS")||!G&&!D.env("BLUEBIRD_WARNINGS")),X=!(0==D.env("BLUEBIRD_LONG_STACK_TRACES")||!G&&!D.env("BLUEBIRD_LONG_STACK_TRACES")),Q=0!=D.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(Y||!!D.env("BLUEBIRD_W_FORGOTTEN_RETURN"));r.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=t._bitField&-1048577|524288},r.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),B.invokeLater(this._notifyUnhandledRejection,this,void 0))},r.prototype._notifyUnhandledRejectionIsHandled=function(){T("rejectionHandled",I,void 0,this)},r.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},r.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},r.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),T("unhandledRejection",M,t,this)}},r.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},r.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},r.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},r.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},r.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},r.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},r.prototype._warn=function(t,e,r){return b(t,e,r||this)},r.onPossiblyUnhandledRejection=function(t){var e=F();M="function"==typeof t?null===e?t:D.domainBind(e,t):void 0},r.onUnhandledRejectionHandled=function(t){var e=F();I="function"==typeof t?null===e?t:D.domainBind(e,t):void 0};var J=function(){};r.longStackTraces=function(){if(B.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!at.longStackTraces&&P()){var t=r.prototype._captureStackTrace,e=r.prototype._attachExtraTrace;at.longStackTraces=!0,J=function(){if(B.haveItemsQueued()&&!at.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");r.prototype._captureStackTrace=t,r.prototype._attachExtraTrace=e,n.deactivateLongStackTraces(),B.enableTrampoline(),at.longStackTraces=!1},r.prototype._captureStackTrace=d,r.prototype._attachExtraTrace=y,n.activateLongStackTraces(),B.disableTrampolineIfNecessary()}},r.hasLongStackTraces=function(){return at.longStackTraces&&P()};var Z=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return D.global.dispatchEvent(t),function(t,e){var r=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!D.global.dispatchEvent(r)}}if("function"==typeof Event){var t=new Event("CustomEvent");return D.global.dispatchEvent(t),function(t,e){var r=new Event(t.toLowerCase(),{cancelable:!0});return r.detail=e,!D.global.dispatchEvent(r)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),D.global.dispatchEvent(t),function(t,e){var r=document.createEvent("CustomEvent");return r.initCustomEvent(t.toLowerCase(),!1,!0,e),!D.global.dispatchEvent(r)}}catch(t){}return function(){return!1}}(),K=function(){return D.isNode?function(){return e.emit.apply(e,arguments)}:D.global?function(t){var e="on"+t.toLowerCase(),r=D.global[e];return!!r&&(r.apply(D.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),tt={promiseCreated:i,promiseFulfilled:i,promiseRejected:i,promiseResolved:i,promiseCancelled:i,promiseChained:function(t,e,r){return{promise:e,child:r}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,r){return{reason:e,promise:r}},rejectionHandled:i},et=function(t){var e=!1;try{e=K.apply(null,arguments)}catch(t){B.throwLater(t),e=!0}var r=!1;try{r=Z(t,tt[t].apply(null,arguments))}catch(t){B.throwLater(t),r=!0}return r||e};r.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?r.longStackTraces():!t.longStackTraces&&r.hasLongStackTraces()&&J()),"warnings"in t){var e=t.warnings;at.warnings=!!e,Q=at.warnings,D.isObject(e)&&"wForgottenReturn"in e&&(Q=!!e.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!at.cancellation){if(B.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");r.prototype._clearCancellationData=l,r.prototype._propagateFrom=f,r.prototype._onCancel=u,r.prototype._setOnCancel=c,r.prototype._attachCancellationCallback=s,r.prototype._execute=a,rt=f,at.cancellation=!0}"monitoring"in t&&(t.monitoring&&!at.monitoring?(at.monitoring=!0,r.prototype._fireEvent=et):!t.monitoring&&at.monitoring&&(at.monitoring=!1,r.prototype._fireEvent=o))},r.prototype._fireEvent=o,r.prototype._execute=function(t,e,r){try{t(e,r)}catch(t){return t}},r.prototype._onCancel=function(){},r.prototype._setOnCancel=function(t){},r.prototype._attachCancellationCallback=function(t){},r.prototype._captureStackTrace=function(){},r.prototype._attachExtraTrace=function(){},r.prototype._clearCancellationData=function(){},r.prototype._propagateFrom=function(t,e){};var rt=p,nt=function(){return!1},it=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;D.inherits(k,Error),n.CapturedTrace=k,k.prototype.uncycle=function(){var t=this._length;if(!(t<2)){for(var e=[],r={},n=0,i=this;void 0!==i;++n)e.push(i),i=i._parent;t=this._length=n;for(var n=t-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(var n=0;n<t;++n){var a=e[n].stack,s=r[a];if(void 0!==s&&s!==n){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var u=n>0?e[n-1]:this;s<t-1?(u._parent=e[s+1],u._parent.uncycle(),u._length=u._parent._length+1):(u._parent=void 0,u._length=1);for(var c=u._length+1,l=n-2;l>=0;--l)e[l]._length=c,c++;return}}}},k.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=j(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(E(i.stack.split("\n"))),i=i._parent;w(n),_(n),D.notEnumerableProp(t,"stack",m(r,n)),D.notEnumerableProp(t,"__stackCleaned__",!0)}};var ot=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():C(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,H=t,V=e;var r=Error.captureStackTrace;return nt=function(t){return W.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n=new Error;if("string"==typeof n.stack&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0)return H=/@/,V=e,$=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(t){i="stack"in t}return"stack"in n||!i||"number"!=typeof Error.stackTraceLimit?(V=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?C(e):e.toString()},null):(H=t,V=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(N=function(t){console.warn(t)},D.isNode&&e.stderr.isTTY?N=function(t,e){var r=e?"[33m":"[31m";console.warn(r+t+"[0m\n")}:D.isNode||"string"!=typeof(new Error).stack||(N=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var at={warnings:Y,longStackTraces:!1,cancellation:!1,monitoring:!1};return X&&r.longStackTraces(),{longStackTraces:function(){return at.longStackTraces},warnings:function(){return at.warnings},cancellation:function(){return at.cancellation},monitoring:function(){return at.monitoring},propagateFromFunction:function(){return rt},boundValueFunction:function(){return h},checkForgottenReturns:v,setBounds:A,warn:b,deprecated:g,CapturedTrace:k,fireDomEvent:Z,fireGlobalEvent:K}}},{"./errors":12,"./util":36}],10:[function(t,e,r){"use strict";e.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(r){return r instanceof t&&r.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:r},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(r,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:t},void 0);var e=arguments[1],n=function(){throw e};return this.caught(t,n)},t.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof t&&r.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:r},void 0);var n=arguments[1];n instanceof t&&n.suppressUnhandledRejections();var i=function(){return n};return this.caught(r,i)}}},{}],11:[function(t,e,r){"use strict";e.exports=function(t,e){function r(){return o(this)}function n(t,r){return i(t,r,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(r,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,n){return i(t,n,e,0)._then(r,void 0,void 0,t,void 0)},t.mapSeries=n}},{}],12:[function(t,e,r){"use strict";function n(t,e){function r(n){return this instanceof r?(f(this,"message","string"==typeof n?n:e),f(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new r(n)}return l(r,Error),r}function i(t){return this instanceof i?(f(this,"name","OperationalError"),f(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(f(this,"message",t.message),f(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,a,s=t("./es5"),u=s.freeze,c=t("./util"),l=c.inherits,f=c.notEnumerableProp,p=n("Warning","warning"),h=n("CancellationError","cancellation error"),d=n("TimeoutError","timeout error"),y=n("AggregateError","aggregate error");try{o=TypeError,a=RangeError}catch(t){o=n("TypeError","type error"),a=n("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),g=0;g<v.length;++g)"function"==typeof Array.prototype[v[g]]&&(y.prototype[v[g]]=Array.prototype[v[g]]);s.defineProperty(y.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),y.prototype.isOperational=!0;var b=0;y.prototype.toString=function(){var t=Array(4*b+1).join(" "),e="\n"+t+"AggregateError of:\n";b++,t=Array(4*b+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];n=i.join("\n"),e+=n+"\n"}return b--,e},l(i,Error);var m=Error.__BluebirdErrorTypes__;m||(m=u({CancellationError:h,TimeoutError:d,OperationalError:i,RejectionError:i,AggregateError:y}),s.defineProperty(Error,"__BluebirdErrorTypes__",{value:m,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:a,CancellationError:m.CancellationError,OperationalError:m.OperationalError,TimeoutError:m.TimeoutError,AggregateError:m.AggregateError,Warning:p}},{"./es5":13,"./util":36}],13:[function(t,e,r){var n=function(){"use strict";return void 0===this}();if(n)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(t,e){var r=Object.getOwnPropertyDescriptor(t,e);return!(r&&!r.writable&&!r.set)}};else{var i={}.hasOwnProperty,o={}.toString,a={}.constructor.prototype,s=function(t){var e=[];for(var r in t)i.call(t,r)&&e.push(r);return e},u=function(t,e){return{value:t[e]}},c=function(t,e,r){return t[e]=r.value,t},l=function(t){return t},f=function(t){try{return Object(t).constructor.prototype}catch(t){return a}},p=function(t){try{return"[object Array]"===o.call(t)}catch(t){return!1}};e.exports={isArray:p,keys:s,names:s,defineProperty:c,getDescriptor:u,freeze:l,getPrototypeOf:f,isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.map;t.prototype.filter=function(t,n){return r(this,t,n,e)},t.filter=function(t,n,i){return r(t,n,i,e)}}},{}],15:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function i(t){this.finallyHandler=t}function o(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function a(){return u.call(this,this.promise._target()._settledValue())}function s(t){if(!o(this,t))return f.e=t,f}function u(t){var n=this.promise,u=this.handler;if(!this.called){this.called=!0;var c=this.isFinallyHandler()?u.call(n._boundValue()):u.call(n._boundValue(),t);if(void 0!==c){n._setReturnedNonUndefined();var p=r(c,n);if(p instanceof e){if(null!=this.cancelPromise){if(p._isCancelled()){var h=new l("late cancellation observer");return n._attachExtraTrace(h),f.e=h,f}p.isPending()&&p._attachCancellationCallback(new i(this))}return p._then(a,s,void 0,this,void 0)}}}return n.isRejected()?(o(this),f.e=t,f):(o(this),t)}var c=t("./util"),l=e.CancellationError,f=c.errorObj;return n.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,r,i){return"function"!=typeof t?this.then():this._then(r,i,void 0,new n(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,u,u)},e.prototype.tap=function(t){return this._passThrough(t,1,u)},n}},{"./util":36}],16:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function s(t,r,n){for(var o=0;o<r.length;++o){n._pushContext();var a=h(r[o])(t);if(n._popContext(),a===p){n._pushContext();var s=e.reject(p.e);return n._popContext(),s}var u=i(a,n);if(u instanceof e)return u}return null}function u(t,r,i,o){if(a.cancellation()){var s=new e(n),u=this._finallyPromise=new e(n);this._promise=s.lastly(function(){return u}),s._captureStackTrace(),s._setOnCancel(this)}else{var c=this._promise=new e(n);c._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(d):d,this._yieldedPromise=null,this._cancellationPhase=!1}var c=t("./errors"),l=c.TypeError,f=t("./util"),p=f.errorObj,h=f.tryCatch,d=[];f.inherits(u,o),u.prototype._isResolved=function(){return null===this._promise},u.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},u.prototype._promiseCancelled=function(){if(!this._isResolved()){var t,r="undefined"!=typeof this._generator.return;if(r)this._promise._pushContext(),t=h(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var n=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=n,this._promise._attachExtraTrace(n),this._promise._pushContext(),t=h(this._generator.throw).call(this._generator,n),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},u.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=h(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=h(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},u.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},u.prototype.promise=function(){return this._promise},u.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},u.prototype._continue=function(t){var r=this._promise;if(t===p)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(t.e,!1);var n=t.value;if(t.done===!0)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(!(o instanceof e)&&(o=s(o,this._yieldHandlers,this._promise),null===o))return void this._promiseRejected(new l("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",n)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var a=o._bitField;0===(50397184&a)?(this._yieldedPromise=o,o._proxy(this,null)):0!==(33554432&a)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!==(16777216&a)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new l("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(e).yieldHandler,n=u,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new n(void 0,void 0,r,i),a=o.promise();return o._generator=e,o._promiseFulfilled(void 0),a}},e.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new l("expecting a function but got "+f.classString(t));d.push(t)},e.spawn=function(t){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return r("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new u(t,this),i=n.promise();return n._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){var s=t("./util");s.canEvaluate,s.tryCatch,s.errorObj;e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var n}var i=[].slice.call(arguments);t&&i.pop();var n=new r(i).promise();return void 0!==t?n.spread(t):n}}},{"./util":36}],18:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function s(t,e,r,n){this.constructor$(t),this._promise._captureStackTrace();var i=c();this._callback=null===i?e:l.domainBind(i,e),this._preservedValues=n===o?new Array(this.length()):null,this._limit=r,this._inFlight=0,this._queue=[],h.invoke(this._asyncInit,this,void 0)}function u(t,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+l.classString(r));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+l.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+l.classString(i.concurrency)));a=i.concurrency}return a="number"==typeof a&&isFinite(a)&&a>=1?a:0,new s(t,r,a,o).promise()}var c=e._getDomain,l=t("./util"),f=l.tryCatch,p=l.errorObj,h=e._async;l.inherits(s,r),s.prototype._asyncInit=function(){this._init$(void 0,-2)},s.prototype._init=function(){},s.prototype._promiseFulfilled=function(t,r){var n=this._values,o=this.length(),s=this._preservedValues,u=this._limit;if(r<0){if(r=r*-1-1,n[r]=t,u>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(u>=1&&this._inFlight>=u)return n[r]=t,this._queue.push(r),!1;null!==s&&(s[r]=t);var c=this._promise,l=this._callback,h=c._boundValue();c._pushContext();var d=f(l).call(h,t,r,o),y=c._popContext();if(a.checkForgottenReturns(d,y,null!==s?"Promise.filter":"Promise.map",c),d===p)return this._reject(d.e),!0;var v=i(d,this._promise);if(v instanceof e){v=v._target();var g=v._bitField;if(0===(50397184&g))return u>=1&&this._inFlight++,n[r]=v,v._proxy(this,(r+1)*-1),!1;if(0===(33554432&g))return 0!==(16777216&g)?(this._reject(v._reason()),!0):(this._cancel(),!0);d=v._value()}n[r]=d}var b=++this._totalResolved;return b>=o&&(null!==s?this._filter(n,s):this._resolve(n),!0)},s.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var n=t.pop();this._promiseFulfilled(r[n],n)}},s.prototype._filter=function(t,e){for(var r=e.length,n=new Array(r),i=0,o=0;o<r;++o)t[o]&&(n[i++]=e[o]);n.length=i,this._resolve(n)},s.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return u(this,t,e,null)},e.map=function(t,e,r,n){return u(t,e,r,n)}}},{"./util":36}],19:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o){var a=t("./util"),s=a.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+a.classString(t));return function(){var n=new e(r);n._captureStackTrace(),n._pushContext();var i=s(t).apply(this,arguments),a=n._popContext();return o.checkForgottenReturns(i,a,"Promise.method",n),n._resolveFromSyncValue(i),n}},e.attempt=e.try=function(t){if("function"!=typeof t)return i("expecting a function but got "+a.classString(t));var n=new e(r);n._captureStackTrace(),n._pushContext();var u;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];u=a.isArray(c)?s(t).apply(l,c):s(t).call(l,c)}else u=s(t)();var f=n._popContext();return o.checkForgottenReturns(u,f,"Promise.try",n),n._resolveFromSyncValue(u),n},e.prototype._resolveFromSyncValue=function(t){t===a.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,r){"use strict";function n(t){return t instanceof Error&&l.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(n(t)){e=new c(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var r=l.keys(t),i=0;i<r.length;++i){var o=r[i];f.test(o)||(e[o]=t[o])}return e}return a.markAsOriginatingFromRejection(t),t}function o(t,e){return function(r,n){if(null!==t){if(r){var o=i(s(r));t._attachExtraTrace(o),t._reject(o)}else if(e){var a=[].slice.call(arguments,1);t._fulfill(a)}else t._fulfill(n);t=null}}}var a=t("./util"),s=a.maybeWrapAsError,u=t("./errors"),c=u.OperationalError,l=t("./es5"),f=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,r){"use strict";e.exports=function(e){function r(t,e){var r=this;if(!o.isArray(t))return n.call(r,t,e);var i=s(e).apply(r._boundValue(),[null].concat(t));i===u&&a.throwLater(i.e)}function n(t,e){var r=this,n=r._boundValue(),i=void 0===t?s(e).call(n,null):s(e).call(n,null,t);i===u&&a.throwLater(i.e)}function i(t,e){var r=this;if(!t){var n=new Error(t+"");n.cause=t,t=n}var i=s(e).call(r._boundValue(),t);i===u&&a.throwLater(i.e)}var o=t("./util"),a=e._async,s=o.tryCatch,u=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=n;void 0!==e&&Object(e).spread&&(o=r),this._then(o,i,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,r,n){"use strict";r.exports=function(){function n(){}function i(t,e){if("function"!=typeof e)throw new m("expecting a function but got "+d.classString(e));if(t.constructor!==o)throw new m("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function o(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==w&&(i(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function a(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function u(t){var e=new o(w);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t} +var c,l=function(){return new m("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},f=function(){return new o.PromiseInspection(this._target())},p=function(t){return o.reject(new m(t))},h={},d=t("./util");c=d.isNode?function(){var t=e.domain;return void 0===t&&(t=null),t}:function(){return null},d.notEnumerableProp(o,"_getDomain",c);var y=t("./es5"),v=t("./async"),g=new v;y.defineProperty(o,"_async",{value:g});var b=t("./errors"),m=o.TypeError=b.TypeError;o.RangeError=b.RangeError;var _=o.CancellationError=b.CancellationError;o.TimeoutError=b.TimeoutError,o.OperationalError=b.OperationalError,o.RejectionError=b.OperationalError,o.AggregateError=b.AggregateError;var w=function(){},E={},O={},j=t("./thenables")(o,w),S=t("./promise_array")(o,w,j,p,n),T=t("./context")(o),C=T.create,x=t("./debuggability")(o,T),P=(x.CapturedTrace,t("./finally")(o,j)),R=t("./catch_filter")(O),A=t("./nodeback"),k=d.errorObj,I=d.tryCatch;return o.prototype.toString=function(){return"[object Promise]"},o.prototype.caught=o.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),i=0;for(r=0;r<e-1;++r){var o=arguments[r];if(!d.isObject(o))return p("expecting an object but got A catch statement predicate "+d.classString(o));n[i++]=o}return n.length=i,t=arguments[r],this.then(void 0,R(n,t,this))}return this.then(void 0,t)},o.prototype.reflect=function(){return this._then(f,f,void 0,this,void 0)},o.prototype.then=function(t,e){if(x.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+d.classString(t);arguments.length>1&&(r+=", "+d.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},o.prototype.done=function(t,e){var r=this._then(t,e,void 0,void 0,void 0);r._setIsFinal()},o.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+d.classString(t)):this.all()._then(t,void 0,void 0,E,void 0)},o.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new S(this).promise()},o.prototype.error=function(t){return this.caught(d.originatesFromRejection,t)},o.getNewLibraryCopy=r.exports,o.is=function(t){return t instanceof o},o.fromNode=o.fromCallback=function(t){var e=new o(w);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=I(t)(A(e,r));return n===k&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},o.all=function(t){return new S(t).promise()},o.cast=function(t){var e=j(t);return e instanceof o||(e=new o(w),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(t){var e=new o(w);return e._captureStackTrace(),e._rejectCallback(t,!0),e},o.setScheduler=function(t){if("function"!=typeof t)throw new m("expecting a function but got "+d.classString(t));return g.setScheduler(t)},o.prototype._then=function(t,e,r,n,i){var a=void 0!==i,s=a?i:new o(w),u=this._target(),l=u._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!==(2097152&this._bitField)&&(n=0!==(50397184&l)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var f=c();if(0!==(50397184&l)){var p,h,y=u._settlePromiseCtx;0!==(33554432&l)?(h=u._rejectionHandler0,p=t):0!==(16777216&l)?(h=u._fulfillmentHandler0,p=e,u._unsetRejectionIsUnhandled()):(y=u._settlePromiseLateCancellationObserver,h=new _("late cancellation observer"),u._attachExtraTrace(h),p=e),g.invoke(y,u,{handler:null===f?p:"function"==typeof p&&d.domainBind(f,p),promise:s,receiver:n,value:h})}else u._addCallbacks(t,e,s,n,f);return s},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},o.prototype._setLength=function(t){this._bitField=this._bitField&-65536|65535&t},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){g.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==h)return void 0===e&&this._isBound()?this._boundValue():e},o.prototype._promiseAt=function(t){return this[4*t-4+2]},o.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},o.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,r,n,i,null)},o.prototype._migrateCallbackAt=function(t,e){var r=t._fulfillmentHandlerAt(e),n=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(r,n,i,o,null)},o.prototype._addCallbacks=function(t,e,r,n,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=r,this._receiver0=n,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:d.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:d.domainBind(i,e));else{var a=4*o-4;this[a+2]=r,this[a+3]=n,"function"==typeof t&&(this[a+0]=null===i?t:d.domainBind(i,t)),"function"==typeof e&&(this[a+1]=null===i?e:d.domainBind(i,e))}return this._setLength(o+1),o},o.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},o.prototype._resolveCallback=function(t,e){if(0===(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var r=j(t,this);if(!(r instanceof o))return this._fulfill(t);e&&this._propagateFrom(r,2);var n=r._target();if(n===this)return void this._reject(l());var i=n._bitField;if(0===(50397184&i)){var a=this._length();a>0&&n._migrateCallback0(this);for(var s=1;s<a;++s)n._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(n)}else if(0!==(33554432&i))this._fulfill(n._value());else if(0!==(16777216&i))this._reject(n._reason());else{var u=new _("late cancellation observer");n._attachExtraTrace(u),this._reject(u)}}},o.prototype._rejectCallback=function(t,e,r){var n=d.ensureErrorObject(t),i=n===t;if(!i&&!r&&x.warnings()){var o="a promise was rejected with a non-error: "+d.classString(t);this._warn(o,!0)}this._attachExtraTrace(n,!!e&&i),this._reject(t)},o.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,r)});r=!1,this._popContext(),void 0!==n&&e._rejectCallback(n,!0)},o.prototype._settlePromiseFromHandler=function(t,e,r,n){var i=n._bitField;if(0===(65536&i)){n._pushContext();var o;e===E?r&&"number"==typeof r.length?o=I(t).apply(this._boundValue(),r):(o=k,o.e=new m("cannot .spread() a non-array: "+d.classString(r))):o=I(t).call(e,r);var a=n._popContext();i=n._bitField,0===(65536&i)&&(o===O?n._reject(r):o===k?n._rejectCallback(o.e,!1):(x.checkForgottenReturns(o,a,"",n,this),n._resolveCallback(o)))}},o.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},o.prototype._followee=function(){return this._rejectionHandler0},o.prototype._setFollowee=function(t){this._rejectionHandler0=t},o.prototype._settlePromise=function(t,e,r,i){var a=t instanceof o,s=this._bitField,u=0!==(134217728&s);0!==(65536&s)?(a&&t._invokeInternalOnCancel(),r instanceof P&&r.isFinallyHandler()?(r.cancelPromise=t,I(e).call(r,i)===k&&t._reject(k.e)):e===f?t._fulfill(f.call(r)):r instanceof n?r._promiseCancelled(t):a||t instanceof S?t._cancel():r.cancel()):"function"==typeof e?a?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,i,t)):e.call(r,i,t):r instanceof n?r._isResolved()||(0!==(33554432&s)?r._promiseFulfilled(i,t):r._promiseRejected(i,t)):a&&(u&&t._setAsyncGuaranteed(),0!==(33554432&s)?t._fulfill(i):t._reject(i))},o.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,i=t.value;"function"==typeof e?r instanceof o?this._settlePromiseFromHandler(e,n,i,r):e.call(n,i,r):r instanceof o&&r._reject(i)},o.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},o.prototype._settlePromise0=function(t,e,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,t,i,e)},o.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},o.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var r=l();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!==(134217728&e)?this._settlePromises():g.settlePromises(this))}},o.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?g.fatalError(t,d.isNode):void((65535&e)>0?g.settlePromises(this):this._ensurePossibleRejectionHandled())},o.prototype._fulfillPromises=function(t,e){for(var r=1;r<t;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},o.prototype._rejectPromises=function(t,e){for(var r=1;r<t;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},o.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!==(16842752&t)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,t),this._rejectPromises(e,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,t),this._fulfillPromises(e,n)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var t=this._bitField;return 0!==(33554432&t)?this._rejectionHandler0:0!==(16777216&t)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){x.deprecated("Promise.defer","new Promise");var t=new o(w);return{promise:t,resolve:a,reject:s}},d.notEnumerableProp(o,"_makeSelfResolutionError",l),t("./method")(o,w,j,p,x),t("./bind")(o,w,j,x),t("./cancel")(o,S,p,x),t("./direct_resolve")(o),t("./synchronous_inspection")(o),t("./join")(o,S,j,w,g,c),o.Promise=o,o.version="3.4.6",t("./map.js")(o,S,p,j,w,x),t("./call_get.js")(o),t("./using.js")(o,p,j,C,w,x),t("./timers.js")(o,w,x),t("./generators.js")(o,p,w,j,n,x),t("./nodeify.js")(o),t("./promisify.js")(o,w),t("./props.js")(o,S,j,p),t("./race.js")(o,w,j,p),t("./reduce.js")(o,S,p,j,w,x),t("./settle.js")(o,S,x),t("./some.js")(o,S,p),t("./filter.js")(o,w),t("./each.js")(o,w),t("./any.js")(o),d.toFastProperties(o),d.toFastProperties(o.prototype),u({a:1}),u({b:2}),u({c:3}),u(1),u(function(){}),u(void 0),u(!1),u(new o(w)),x.setBounds(v.firstLineError,d.lastLineError),o}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o){function a(t){switch(t){case-2:return[];case-3:return{}}}function s(t){var n=this._promise=new e(r);t instanceof e&&n._propagateFrom(t,3),n._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var u=t("./util");u.isArray;return u.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function t(r,o){var s=n(this._values,this._promise);if(s instanceof e){s=s._target();var c=s._bitField;if(this._values=s,0===(50397184&c))return this._promise._setAsyncGuaranteed(),s._then(t,this._reject,void 0,this,o);if(0===(33554432&c))return 0!==(16777216&c)?this._reject(s._reason()):this._cancel();s=s._value()}if(s=u.asArray(s),null===s){var l=i("expecting an array or an iterable object but got "+u.classString(s)).reason();return void this._promise._rejectCallback(l,!1)}return 0===s.length?void(o===-5?this._resolveEmptyArray():this._resolve(a(o))):void this._iterate(s)},s.prototype._iterate=function(t){var r=this.getActualLength(t.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,a=null,s=0;s<r;++s){var u=n(t[s],i);u instanceof e?(u=u._target(),a=u._bitField):a=null,o?null!==a&&u.suppressUnhandledRejections():null!==a?0===(50397184&a)?(u._proxy(this,s),this._values[s]=u):o=0!==(33554432&a)?this._promiseFulfilled(u._value(),s):0!==(16777216&a)?this._promiseRejected(u._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(u,s)}o||i._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;return r>=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var r=0;r<t.length;++r)t[r]instanceof e&&t[r].cancel()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},{"./util":36}],24:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t){return!E.test(t)}function i(t){try{return t.__isPromisified__===!0}catch(t){return!1}}function o(t,e,r){var n=h.getDataPropertyOrDefault(t,e+r,_);return!!n&&i(n)}function a(t,e,r){for(var n=0;n<t.length;n+=2){var i=t[n];if(r.test(i))for(var o=i.replace(r,""),a=0;a<t.length;a+=2)if(t[a]===o)throw new b("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function s(t,e,r,n){for(var s=h.inheritedDataKeys(t),u=[],c=0;c<s.length;++c){var l=s[c],f=t[l],p=n===O||O(l,f,t);"function"!=typeof f||i(f)||o(t,l,e)||!n(l,f,t,p)||u.push(l,f)}return a(u,e,r),u}function u(t,n,i,o,a,s){function u(){var i=n;n===p&&(i=this);var o=new e(r);o._captureStackTrace();var a="string"==typeof l&&this!==c?this[l]:t,u=d(o,s);try{a.apply(i,y(arguments,u))}catch(t){o._rejectCallback(v(t),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var c=function(){return this}(),l=t;return"string"==typeof l&&(t=o),h.notEnumerableProp(u,"__isPromisified__",!0),u}function c(t,e,r,n,i){for(var o=new RegExp(j(e)+"$"),a=s(t,e,o,r),u=0,c=a.length;u<c;u+=2){var l=a[u],f=a[u+1],d=l+e;if(n===S)t[d]=S(l,p,l,f,e,i);else{var y=n(f,function(){return S(l,p,l,f,e,i)});h.notEnumerableProp(y,"__isPromisified__",!0),t[d]=y}}return h.toFastProperties(t),t}function l(t,e,r){return S(t,e,void 0,t,null,r)}var f,p={},h=t("./util"),d=t("./nodeback"),y=h.withAppended,v=h.maybeWrapAsError,g=h.canEvaluate,b=t("./errors").TypeError,m="Async",_={__isPromisified__:!0},w=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],E=new RegExp("^(?:"+w.join("|")+")$"),O=function(t){return h.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},j=function(t){return t.replace(/([$])/,"\\$")},S=g?f:u;e.promisify=function(t,e){if("function"!=typeof t)throw new b("expecting a function but got "+h.classString(t));if(i(t))return t;e=Object(e);var r=void 0===e.context?p:e.context,o=!!e.multiArgs,a=l(t,r,o);return h.copyDescriptors(t,a,n),a},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new b("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var r=!!e.multiArgs,n=e.suffix;"string"!=typeof n&&(n=m);var i=e.filter;"function"!=typeof i&&(i=O);var o=e.promisifier;if("function"!=typeof o&&(o=S),!h.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=h.inheritedDataKeys(t),s=0;s<a.length;++s){var u=t[a[s]];"constructor"!==a[s]&&h.isClass(u)&&(c(u.prototype,n,i,o,r),c(u,n,i,o,r))}return c(t,n,i,o,r)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){function o(t){var e,r=!1;if(void 0!==s&&t instanceof s)e=f(t),r=!0;else{var n=l.keys(t),i=n.length;e=new Array(2*i);for(var o=0;o<i;++o){var a=n[o];e[o]=t[a],e[o+i]=a}}this.constructor$(e),this._isMap=r,this._init$(void 0,-3)}function a(t){var r,a=n(t);return c(a)?(r=a instanceof e?a._then(e.props,void 0,void 0,void 0,void 0):new o(a).promise(),a instanceof e&&r._propagateFrom(a,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var s,u=t("./util"),c=u.isObject,l=t("./es5");"function"==typeof Map&&(s=Map);var f=function(){function t(t,n){this[e]=t,this[e+r]=n,e++}var e=0,r=0;return function(n){r=n.size,e=0;var i=new Array(2*n.size);return n.forEach(t,i),i}}(),p=function(t){for(var e=new s,r=t.length/2|0,n=0;n<r;++n){var i=t[r+n],o=t[n];e.set(i,o)}return e};u.inherits(o,r),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){this._values[e]=t;var r=++this._totalResolved;if(r>=this._length){var n;if(this._isMap)n=p(this._values);else{n={};for(var i=this.length(),o=0,a=this.length();o<a;++o)n[this._values[o+i]]=this._values[o]}return this._resolve(n),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return a(this)},e.props=function(t){return a(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,r){"use strict";function n(t,e,r,n,i){for(var o=0;o<i;++o)r[o+n]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1);var r=this._front+e&this._capacity-1;this[r]=t,this._length=e+1},i.prototype._unshiftOne=function(t){var e=this._capacity;this._checkCapacity(this.length()+1);var r=this._front,n=(r-1&e-1^e)-e;this[n]=t,this._front=n,this._length=this.length()+1},i.prototype.unshift=function(t,e,r){this._unshiftOne(r),this._unshiftOne(e),this._unshiftOne(t)},i.prototype.push=function(t,e,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(t),this._pushOne(e),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=r,this._length=n},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t;var r=this._front,i=this._length,o=r+i&e-1;n(this,0,this,e,o)},e.exports=i},{}],27:[function(t,e,r){"use strict";e.exports=function(e,r,n,i){function o(t,o){var u=n(t);if(u instanceof e)return s(u);if(t=a.asArray(t),null===t)return i("expecting an array or an iterable object but got "+a.classString(t));var c=new e(r);void 0!==o&&c._propagateFrom(o,3);for(var l=c._fulfill,f=c._reject,p=0,h=t.length;p<h;++p){var d=t[p];(void 0!==d||p in t)&&e.cast(d)._then(l,f,void 0,c,null)}return c}var a=t("./util"),s=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function s(t,r,n,i){this.constructor$(t);var a=p();this._fn=null===a?r:h.domainBind(a,r),void 0!==n&&(n=e.resolve(n),n._attachCancellationCallback(this)),this._initialValue=n,this._currentCancellable=null,i===o?this._eachValues=Array(this._length):0===i?this._eachValues=null:this._eachValues=void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function u(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function c(t,e,r,i){if("function"!=typeof e)return n("expecting a function but got "+h.classString(e));var o=new s(t,e,r,i);return o.promise()}function l(t){this.accum=t,this.array._gotAccum(t);var r=i(this.value,this.array._promise);return r instanceof e?(this.array._currentCancellable=r,r._then(f,void 0,void 0,this,void 0)):f.call(this,r)}function f(t){var r=this.array,n=r._promise,i=d(r._fn);n._pushContext();var o;o=void 0!==r._eachValues?i.call(n._boundValue(),t,this.index,this.length):i.call(n._boundValue(),this.accum,t,this.index,this.length),o instanceof e&&(r._currentCancellable=o);var s=n._popContext();return a.checkForgottenReturns(o,s,void 0!==r._eachValues?"Promise.each":"Promise.reduce",n),o}var p=e._getDomain,h=t("./util"),d=h.tryCatch;h.inherits(s,r),s.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},s.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},s.prototype._init=function(){},s.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},s.prototype.shouldCopyValues=function(){return!1},s.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},s.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},s.prototype._iterate=function(t){this._values=t;var r,n,i=t.length;if(void 0!==this._initialValue?(r=this._initialValue,n=0):(r=e.resolve(t[0]),n=1),this._currentCancellable=r,!r.isRejected())for(;n<i;++n){var o={accum:null,value:t[n],index:n,length:i,array:this};r=r._then(l,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(u,u,void 0,r,this)},e.prototype.reduce=function(t,e){return c(this,t,e,null)},e.reduce=function(t,e,r,n){return c(t,e,r,n)}}},{"./util":36}],29:[function(t,i,o){"use strict";var a,s=t("./util"),u=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},c=s.getNativePromise();if(s.isNode&&"undefined"==typeof MutationObserver){var l=r.setImmediate,f=e.nextTick;a=s.isRecentNode?function(t){l.call(r,t)}:function(t){f.call(e,t)}}else if("function"==typeof c&&"function"==typeof c.resolve){var p=c.resolve();a=function(t){p.then(t)}}else a="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof n?function(t){n(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:u:function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div"),i=new MutationObserver(function(){t.classList.toggle("foo"),r=!1});i.observe(n,e);var o=function(){r||(r=!0,n.classList.toggle("foo"))};return function(r){var n=new MutationObserver(function(){n.disconnect(),r()});n.observe(t,e),o()}}();i.exports=a},{"./util":36}],30:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.constructor$(t)}var o=e.PromiseInspection,a=t("./util");a.inherits(i,r),i.prototype._promiseResolved=function(t,e){this._values[t]=e;var r=++this._totalResolved;return r>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var r=new o;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},i.prototype._promiseRejected=function(t,e){var r=new o;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},e.settle=function(t){return n.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||e<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new i(t),o=r.promise();return r.setHowMany(e),r.init(),o}var a=t("./util"),s=t("./errors").RangeError,u=t("./errors").AggregateError,c=a.isArray,l={};a.inherits(i,r),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=c(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(l),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new u,e=this.length();e<this._values.length;++e)this._values[e]!==l&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new s(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,r){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!==(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!==(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0===(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!==(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!==(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536===(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!==(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,r){"use strict";e.exports=function(e,r){function n(t,n){if(l(t)){if(t instanceof e)return t;var i=o(t);if(i===c){n&&n._pushContext();var u=e.reject(i.e);return n&&n._popContext(),u}if("function"==typeof i){if(a(t)){var u=new e(r);return t._then(u._fulfill,u._reject,void 0,u,null),u}return s(t,i,n)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(t){return c.e=t,c}}function a(t){try{return f.call(t,"_promise0")}catch(t){return!1}}function s(t,n,i){function o(t){s&&(s._resolveCallback(t),s=null)}function a(t){s&&(s._rejectCallback(t,f,!0),s=null)}var s=new e(r),l=s;i&&i._pushContext(),s._captureStackTrace(),i&&i._popContext();var f=!0,p=u.tryCatch(n).call(t,o,a);return f=!1,s&&p===c&&(s._rejectCallback(p.e,!0,!0),s=null),l}var u=t("./util"),c=u.errorObj,l=u.isObject,f={}.hasOwnProperty;return n}},{"./util":36}],34:[function(t,e,r){"use strict";e.exports=function(e,r,n){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function a(t){throw clearTimeout(this.handle),t}var s=t("./util"),u=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var c=function(t){return l(+this).thenReturn(t)},l=e.delay=function(t,o){var a,s;return void 0!==o?(a=e.resolve(o)._then(c,null,null,t,void 0),n.cancellation()&&o instanceof e&&a._setOnCancel(o)):(a=new e(r),s=setTimeout(function(){a._fulfill()},+t),n.cancellation()&&a._setOnCancel(new i(s)),a._captureStackTrace()),a._setAsyncGuaranteed(),a};e.prototype.delay=function(t){return l(t,this)};var f=function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new u("operation timed out"):new u(e),s.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()};e.prototype.timeout=function(t,e){t=+t;var r,s,u=new i(setTimeout(function(){r.isPending()&&f(r,e,s)},t));return n.cancellation()?(s=this.then(),r=s._then(o,a,void 0,u,void 0),r._setOnCancel(u)):r=this._then(o,a,void 0,u,void 0),r}}},{"./util":36}],35:[function(t,e,r){"use strict";e.exports=function(e,r,n,i,o,a){function s(t){setTimeout(function(){throw t},0)}function u(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()), +e}function c(t,r){function i(){if(a>=c)return l._fulfill();var o=u(t[a++]);if(o instanceof e&&o._isDisposable()){try{o=n(o._getDisposer().tryDispose(r),t.promise)}catch(t){return s(t)}if(o instanceof e)return o._then(i,s,null,null,null)}i()}var a=0,c=t.length,l=new e(o);return i(),l}function l(t,e,r){this._data=t,this._promise=e,this._context=r}function f(t,e,r){this.constructor$(t,e,r)}function p(t){return l.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function h(t){this.length=t,this.promise=null,this[t-1]=null}var d=t("./util"),y=t("./errors").TypeError,v=t("./util").inherits,g=d.errorObj,b=d.tryCatch,m={};l.prototype.data=function(){return this._data},l.prototype.promise=function(){return this._promise},l.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():m},l.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==m?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},l.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(f,l),f.prototype.doDispose=function(t,e){var r=this.data();return r.call(t,t,e)},h.prototype._resultCancelled=function(){for(var t=this.length,r=0;r<t;++r){var n=this[r];n instanceof e&&n.cancel()}},e.using=function(){var t=arguments.length;if(t<2)return r("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return r("expecting a function but got "+d.classString(i));var o,s=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,s=!1):(o=arguments,t--);for(var u=new h(t),f=0;f<t;++f){var y=o[f];if(l.isDisposer(y)){var v=y;y=y.promise(),y._setDisposable(v)}else{var m=n(y);m instanceof e&&(y=m._then(p,null,null,{resources:u,index:f},void 0))}u[f]=y}for(var _=new Array(u.length),f=0;f<_.length;++f)_[f]=e.resolve(u[f]).reflect();var w=e.all(_).then(function(t){for(var e=0;e<t.length;++e){var r=t[e];if(r.isRejected())return g.e=r.error(),g;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}E._pushContext(),i=b(i);var n=s?i.apply(void 0,t):i(t),o=E._popContext();return a.checkForgottenReturns(n,o,"Promise.using",E),n}),E=w.lastly(function(){var t=new e.PromiseInspection(w);return c(u,t)});return u.promise=E,E._setOnCancel(u),E},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=this._bitField&-131073,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new f(t,this,i());throw new y}}},{"./errors":12,"./util":36}],36:[function(t,n,i){"use strict";function o(){try{var t=A;return A=null,t.apply(this,arguments)}catch(t){return R.e=t,R}}function a(t){return A=t,o}function s(t){return null==t||t===!0||t===!1||"string"==typeof t||"number"==typeof t}function u(t){return"function"==typeof t||"object"==typeof t&&null!==t}function c(t){return s(t)?new Error(b(t)):t}function l(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;r<n;++r)i[r]=t[r];return i[r]=e,i}function f(t,e,r){if(!x.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function p(t,e,r){if(s(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return x.defineProperty(t,e,n),t}function h(t){throw t}function d(t){try{if("function"==typeof t){var e=x.names(t.prototype),r=x.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=N.test(t+"")&&x.names(t).length>0;if(r||n||i)return!0}return!1}catch(t){return!1}}function y(t){function e(){}e.prototype=t;for(var r=8;r--;)new e;return t}function v(t){return F.test(t)}function g(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=e+i+r;return n}function b(t){try{return t+""}catch(t){return"[no string representation]"}}function m(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function _(t){try{p(t,"isOperational",!0)}catch(t){}}function w(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||t.isOperational===!0)}function E(t){return m(t)&&x.propertyIsWritable(t,"stack")}function O(t){return{}.toString.call(t)}function j(t,e,r){for(var n=x.names(t),i=0;i<n.length;++i){var o=n[i];if(r(o))try{x.defineProperty(e,o,x.getDescriptor(t,o))}catch(t){}}}function S(t,r){return U?e.env[t]:r}function T(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}function C(t,e){return t.bind(e)}var x=t("./es5"),P="undefined"==typeof navigator,R={e:{}},A,k="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof r?r:void 0!==this?this:null,I=function(t,e){function r(){this.constructor=t,this.constructor$=e;for(var r in e.prototype)n.call(e.prototype,r)&&"$"!==r.charAt(r.length-1)&&(this[r+"$"]=e.prototype[r])}var n={}.hasOwnProperty;return r.prototype=e.prototype,t.prototype=new r,t.prototype},M=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1};if(x.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var n=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=r(t)}catch(t){return n}for(var a=0;a<o.length;++a){var s=o[a];if(!i[s]){i[s]=!0;var u=Object.getOwnPropertyDescriptor(t,s);null!=u&&null==u.get&&null==u.set&&n.push(s)}}t=x.getPrototypeOf(t)}return n}}var n={}.hasOwnProperty;return function(r){if(e(r))return[];var i=[];t:for(var o in r)if(n.call(r,o))i.push(o);else{for(var a=0;a<t.length;++a)if(n.call(t[a],o))continue t;i.push(o)}return i}}(),N=/this\s*\.\s*\S+\s*=/,F=/^[a-z$_][a-z$_0-9]*$/i,B=function(){return"stack"in new Error?function(t){return E(t)?t:new Error(b(t))}:function(t){if(E(t))return t;try{throw new Error(b(t))}catch(t){return t}}}(),L=function(t){return x.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var D="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,r=[],n=t[Symbol.iterator]();!(e=n.next()).done;)r.push(e.value);return r};L=function(t){return x.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?D(t):null}}var U="undefined"!=typeof e&&"[object process]"===O(e).toLowerCase(),W={isClass:d,isIdentifier:v,inheritedDataKeys:M,getDataPropertyOrDefault:f,thrower:h,isArray:x.isArray,asArray:L,notEnumerableProp:p,isPrimitive:s,isObject:u,isError:m,canEvaluate:P,errorObj:R,tryCatch:a,inherits:I,withAppended:l,maybeWrapAsError:c,toFastProperties:y,filledRange:g,toString:b,canAttachTrace:E,ensureErrorObject:B,originatesFromRejection:w,markAsOriginatingFromRejection:_,classString:O,copyDescriptors:j,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:U,env:S,global:k,getNativePromise:T,domainBind:C};W.isRecentNode=W.isNode&&function(){var t=e.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),W.isNode&&W.toFastProperties(e);try{throw new Error}catch(t){W.lastLineError=t}n.exports=W},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)}).call(e,r(3),function(){return this}(),r(35).setImmediate)},function(t,e,r){(function(t,n){function i(t,e){this._id=t,this._clearFn=e}var o=r(3).nextTick,a=Function.prototype.apply,s=Array.prototype.slice,u={},c=0;e.setTimeout=function(){return new i(a.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(a.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,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))},e.setImmediate="function"==typeof t?t:function(t){var r=c++,n=!(arguments.length<2)&&s.call(arguments,1);return u[r]=!0,o(function(){u[r]&&(n?t.apply(null,n):t.call(null),e.clearImmediate(r))}),r},e.clearImmediate="function"==typeof n?n:function(t){delete u[t]}}).call(e,r(35).setImmediate,r(35).clearImmediate)},function(t,e){t.exports=child_process},function(t,e){t.exports=fs},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<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}var i=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,o=function(t){return i.exec(t).slice(1)};e.resolve=function(){for(var e="",i=!1,o=arguments.length-1;o>=-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 e=r(n(e.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+e||"."},e.normalize=function(t){var i=e.isAbsolute(t),o="/"===a(t,-1);return t=r(n(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&o&&(t+="/"),(i?"/":"")+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<t.length&&""===t[e];e++);for(var r=t.length-1;r>=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<a;u++)if(i[u]!==o[u]){s=u;break}for(var c=[],u=s;u<i.length;u++)c.push("..");return c=c.concat(o.slice(s)),c.join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){var e=o(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},e.basename=function(t,e){var r=o(t)[2];return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},e.extname=function(t){return o(t)[3]};var a="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(e,r(3))},function(t,e,r){(function(e){"use strict";t.exports={raw:function(t,e){t.emit("data",e)},readline:function(t,e){"undefined"!=typeof t&&null!==t||(t="\r"),"undefined"!=typeof e&&null!==e||(e="utf8");var r="";return function(n,i){r+=i.toString(e);var o=r.split(t);r=o.pop(),o.forEach(function(t){n.emit("data",t)})}},byteLength:function(t){var r=new e(0);return function(n,i){for(r=e.concat([r,i]);r.length>=t;){var o=r.slice(0,t);r=r.slice(t),n.emit("data",o)}}},byteDelimiter:function(t){"[object Array]"!==Object.prototype.toString.call(t)&&(t=[t]);var e=[],r=0;return function(n,i){for(var o=0;o<i.length;o++)e[e.length]=i[o],e[e.length-1]===t[r]&&r++,r===t.length&&(n.emit("data",e),e=[],r=0)}}}}).call(e,r(4).Buffer)},function(t,e,r){function n(){i.call(this)}t.exports=n;var i=r(12).EventEmitter,o=r(41);o(n,i),n.Readable=r(42),n.Writable=r(53),n.Duplex=r(54),n.Transform=r(55),n.PassThrough=r(56),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&c.pause&&c.pause()}function n(){c.readable&&c.resume&&c.resume()}function o(){l||(l=!0,t.end())}function a(){l||(l=!0,"function"==typeof t.destroy&&t.destroy())}function s(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){c.removeListener("data",r),t.removeListener("drain",n),c.removeListener("end",o),c.removeListener("close",a),c.removeListener("error",s),t.removeListener("error",s),c.removeListener("end",u),c.removeListener("close",u),t.removeListener("close",u)}var c=this;c.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(c.on("end",o),c.on("close",a));var l=!1;return c.on("error",s),t.on("error",s),c.on("end",u),c.on("close",u),t.on("close",u),t.emit("pipe",c),t}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){(function(n){e=t.exports=r(43),e.Stream=r(40),e.Readable=e,e.Writable=r(49),e.Duplex=r(48),e.Transform=r(51),e.PassThrough=r(52),n.browser||"disable"!==n.env.READABLE_STREAM||(t.exports=r(40))}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e){var n=r(48);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],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.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(x||(x=r(50).StringDecoder),this.decoder=new x(t.encoding),this.encoding=t.encoding)}function i(t){r(48);return this instanceof i?(this._readableState=new n(t,this),this.readable=!0,void T.call(this)):new i(t)}function o(t,e,r,n,i){var o=c(e,r);if(o)t.emit("error",o);else if(C.isNullOrUndefined(r))e.reading=!1,e.ended||l(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&i){var s=new Error("stream.unshift() after end event");t.emit("error",s)}else!e.decoder||i||n||(r=e.decoder.write(r)),i||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&f(t)),h(t,e);else i||(e.reading=!1);return a(e)}function a(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function s(t){if(t>=R)t=R;else{t--;for(var e=1;e<32;e<<=1)t|=t>>e;t++}return t}function u(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||C.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:t<=0?0:(t>e.highWaterMark&&(e.highWaterMark=s(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function c(t,e){var r=null;return C.isBuffer(e)||C.isString(e)||C.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function l(t,e){if(e.decoder&&!e.ended){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,f(t)}function f(t){var r=t._readableState;r.needReadable=!1,r.emittedReadable||(P("emitReadable",r.flowing),r.emittedReadable=!0,r.sync?e.nextTick(function(){p(t)}):p(t))}function p(t){P("emit readable"),t.emit("readable"),b(t)}function h(t,r){r.readingMore||(r.readingMore=!0,e.nextTick(function(){d(t,r)}))}function d(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(P("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function y(t){return function(){var e=t._readableState;P("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&S.listenerCount(t,"data")&&(e.flowing=!0,b(t))}}function v(t,r){r.resumeScheduled||(r.resumeScheduled=!0,e.nextTick(function(){g(t,r)}))}function g(t,e){e.resumeScheduled=!1,t.emit("resume"),b(t),e.flowing&&!e.reading&&t.read(0)}function b(t){var e=t._readableState;if(P("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function m(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,a=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(a)r=n.shift();else if(!t||t>=i)r=o?n.join(""):j.concat(n,i),n.length=0;else if(t<n[0].length){var s=n[0];r=s.slice(0,t),n[0]=s.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new j(t);for(var u=0,c=0,l=n.length;c<l&&u<t;c++){var s=n[0],f=Math.min(t-u,s.length);o?r+=s.slice(0,f):s.copy(r,u,0,f),f<s.length?n[0]=s.slice(f):n.shift(),u+=f}}return r}function _(t){var r=t._readableState;if(r.length>0)throw new Error("endReadable called on non-empty stream");r.endEmitted||(r.ended=!0,e.nextTick(function(){r.endEmitted||0!==r.length||(r.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function w(t,e){for(var r=0,n=t.length;r<n;r++)e(t[r],r)}function E(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}t.exports=i;var O=r(44),j=r(4).Buffer;i.ReadableState=n;var S=r(12).EventEmitter;S.listenerCount||(S.listenerCount=function(t,e){return t.listeners(e).length});var T=r(40),C=r(45);C.inherits=r(46);var x,P=r(47);P=P&&P.debuglog?P.debuglog("stream"):function(){},C.inherits(i,T),i.prototype.push=function(t,e){var r=this._readableState;return C.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new j(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(t){return x||(x=r(50).StringDecoder),this._readableState.decoder=new x(t),this._readableState.encoding=t,this};var R=8388608;i.prototype.read=function(t){P("read",t);var e=this._readableState,r=t;if((!C.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return P("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?_(this):f(this),null;if(t=u(t,e),0===t&&e.ended)return 0===e.length&&_(this),null;var n=e.needReadable;P("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,P("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,P("reading or ended",n)),n&&(P("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=u(r,e));var i;return i=t>0?m(t,e):null,C.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),r!==t&&e.ended&&0===e.length&&_(this),C.isNull(i)||this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,r){function n(t){P("onunpipe"),t===f&&o()}function i(){P("onend"),t.end()}function o(){P("cleanup"),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("drain",v),t.removeListener("error",s),t.removeListener("unpipe",n),f.removeListener("end",i),f.removeListener("end",o),f.removeListener("data",a),!p.awaitDrain||t._writableState&&!t._writableState.needDrain||v()}function a(e){P("ondata");var r=t.write(e);!1===r&&(P("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,f.pause())}function s(e){P("onerror",e),l(),t.removeListener("error",s),0===S.listenerCount(t,"error")&&t.emit("error",e)}function u(){t.removeListener("finish",c),l()}function c(){P("onfinish"),t.removeListener("close",u),l()}function l(){P("unpipe"),f.unpipe(t)}var f=this,p=this._readableState;switch(p.pipesCount){case 0:p.pipes=t;break;case 1:p.pipes=[p.pipes,t];break;default:p.pipes.push(t)}p.pipesCount+=1,P("pipe count=%d opts=%j",p.pipesCount,r);var h=(!r||r.end!==!1)&&t!==e.stdout&&t!==e.stderr,d=h?i:o;p.endEmitted?e.nextTick(d):f.once("end",d),t.on("unpipe",n);var v=y(f);return t.on("drain",v),f.on("data",a),t._events&&t._events.error?O(t._events.error)?t._events.error.unshift(s):t._events.error=[s,t._events.error]:t.on("error",s),t.once("close",u),t.once("finish",c),t.emit("pipe",f),p.flowing||(P("pipe resume"),f.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}var i=E(e.pipes,t);return i===-1?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,r){var n=T.prototype.on.call(this,t,r);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&f(this,i);else{var o=this;e.nextTick(function(){P("readable nexttick read 0"),o.read(0)})}}return n},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(P("resume"),t.flowing=!0,t.reading||(P("resume read 0"),this.read(0)),v(this,t)),this},i.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(P("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(P("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)C.isFunction(t[i])&&C.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return w(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){P("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=m}).call(e,r(3))},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e,r){(function(t){function r(t){return Array.isArray?Array.isArray(t):"[object Array]"===v(t)}function n(t){return"boolean"==typeof t}function i(t){return null===t}function o(t){return null==t}function a(t){return"number"==typeof t}function s(t){return"string"==typeof t}function u(t){return"symbol"==typeof t}function c(t){return void 0===t}function l(t){return"[object RegExp]"===v(t)}function f(t){return"object"==typeof t&&null!==t}function p(t){return"[object Date]"===v(t)}function h(t){return"[object Error]"===v(t)||t instanceof Error}function d(t){return"function"==typeof t}function y(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function v(t){return Object.prototype.toString.call(t)}e.isArray=r,e.isBoolean=n,e.isNull=i,e.isNullOrUndefined=o,e.isNumber=a,e.isString=s,e.isSymbol=u,e.isUndefined=c,e.isRegExp=l,e.isObject=f,e.isDate=p,e.isError=h,e.isFunction=d,e.isPrimitive=y,e.isBuffer=t.isBuffer}).call(e,r(4).Buffer)},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e){},function(t,e,r){(function(e){function n(t){return this instanceof n?(u.call(this,t),c.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(t)}function i(){this.allowHalfOpen||this._writableState.ended||e.nextTick(this.end.bind(this))}function o(t,e){for(var r=0,n=t.length;r<n;r++)e(t[r],r)}t.exports=n;var a=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},s=r(45);s.inherits=r(46);var u=r(43),c=r(49);s.inherits(n,u),o(a(c.prototype),function(t){n.prototype[t]||(n.prototype[t]=c.prototype[t])})}).call(e,r(3))},function(t,e,r){(function(e){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(t,e){var n=r(48);t=t||{};var i=t.highWaterMark,o=t.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!t.objectMode,e instanceof n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=t.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){h(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(t){var e=r(48);return this instanceof o||this instanceof e?(this._writableState=new i(t,this),this.writable=!0,void O.call(this)):new o(t)}function a(t,r,n){var i=new Error("write after end");t.emit("error",i),e.nextTick(function(){n(i)})}function s(t,r,n,i){var o=!0;if(!(E.isBuffer(n)||E.isString(n)||E.isNullOrUndefined(n)||r.objectMode)){var a=new TypeError("Invalid non-string/buffer chunk");t.emit("error",a),e.nextTick(function(){i(a)}),o=!1}return o}function u(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&E.isString(e)&&(e=new w(e,r)),e}function c(t,e,r,i,o){r=u(e,r,i),E.isBuffer(r)&&(i="buffer");var a=e.objectMode?1:r.length;e.length+=a;var s=e.length<e.highWaterMark;return s||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):l(t,e,!1,a,r,i,o),s}function l(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 f(t,r,n,i,o){n?e.nextTick(function(){r.pendingcb--,o(i)}):(r.pendingcb--,o(i)),t._writableState.errorEmitted=!0,t.emit("error",i)}function p(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function h(t,r){var n=t._writableState,i=n.sync,o=n.writecb;if(p(n),r)f(t,n,i,r,o);else{var a=g(t,n);a||n.corked||n.bufferProcessing||!n.buffer.length||v(t,n),i?e.nextTick(function(){d(t,n,a,o)}):d(t,n,a,o)}}function d(t,e,r,n){r||y(t,e),e.pendingcb--,n(),m(t,e)}function y(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function v(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,l(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,a=i.encoding,s=i.callback,u=e.objectMode?1:o.length;if(l(t,e,!1,u,o,a,s),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function g(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function b(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function m(t,e){var r=g(t,e);return r&&(0===e.pendingcb?(b(t,e),e.finished=!0,t.emit("finish")):b(t,e)),r}function _(t,r,n){r.ending=!0,m(t,r),n&&(r.finished?e.nextTick(n):t.once("finish",n)),r.ended=!0}t.exports=o;var w=r(4).Buffer;o.WritableState=i;var E=r(45);E.inherits=r(46);var O=r(40);E.inherits(o,O),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return E.isFunction(e)&&(r=e,e=null),E.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),E.isFunction(r)||(r=function(){}),n.ended?a(this,n,r):s(this,n,t,r)&&(n.pendingcb++,i=c(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||v(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;E.isFunction(t)?(r=t,t=null,e=null):E.isFunction(e)&&(r=e,e=null),E.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||_(this,n,r)}}).call(e,r(3))},function(t,e,r){function n(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function a(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var s=r(4).Buffer,u=s.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},c=e.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=i)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},c.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},c.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},function(t,e,r){function n(t,e){this.afterTransform=function(t,r){return i(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,u.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);s.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){u.isFunction(this._flush)?this._flush(function(t){a(e,t)}):a(e)})}function a(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}t.exports=o;var s=r(48),u=r(45);u.inherits=r(46),u.inherits(o,s),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,s.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;u.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0, +this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}t.exports=n;var i=r(51),o=r(45);o.inherits=r(46),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(49)},function(t,e,r){t.exports=r(48)},function(t,e,r){t.exports=r(51)},function(t,e,r){t.exports=r(52)},function(t,e,r){function n(t){o.call(this);var e=this;this.name="WebJackPort";var r={queue:[],socket:null,flushTo:function(t){null===this.socket&&(this.socket=t,e.emit("open")),this.queue.length&&(this.queue.forEach(function(t){this.socket.write(t)},this),this.queue.length=0)}};t=t||{},t.profile=t.profile||{},t.profile.raw=!0;var n=new i.Connection(t.profile);r.flushTo(n),n.listen(function(t){e.emit("data",t)}),a.set(this,r)}Object.assign&&Map||r(58);var i=r(59),o=r(12).EventEmitter,a=new Map;n.prototype=Object.create(o.prototype,{constructor:{value:n}}),n.prototype.write=function(t){var e=a.get(this);null===e.socket?e.queue.push(t):e.socket.send(t)},t.exports=n},function(t,e,r){var n,i;(function(o){!function(o,a){n=a,i="function"==typeof n?n.call(e,r,e,t):n,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";function t(t){var e=[];for(var r in t)e.push(r);return e}var e,r=function(t){try{t()}catch(t){return!1}return!0},n=function(t,e){try{var r=function(){t.apply(this,arguments)};return!!r.__proto__&&(Object.setPrototypeOf(r,t),r.prototype=Object.create(t.prototype,{constructor:{value:t}}),e(r))}catch(t){return!1}},i=function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}},a=function(){var t=!1;if(String.prototype.startsWith)try{"/a/".startsWith(/a/)}catch(e){t=!0}return t},s=new Function("return this;"),u=s(),c=u.isFinite,l=!!Object.defineProperty&&i(),f=a(),p=Function.call.bind(String.prototype.indexOf),h=Function.call.bind(Object.prototype.toString),d=Function.call.bind(Object.prototype.hasOwnProperty),y=function(){},v=u.Symbol||{},g=v.species||"@@species",b={string:function(t){return"[object String]"===h(t)},regex:function(t){return"[object RegExp]"===h(t)},symbol:function(t){return"function"==typeof u.Symbol&&"symbol"==typeof t}},m=function(t,e,r,n){!n&&e in t||(l?Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:r}):t[e]=r)},_={getter:function(t,e,r){if(!l)throw new TypeError("getters require true ES5 support");Object.defineProperty(t,e,{configurable:!0,enumerable:!1,get:r})},proxy:function(t,e,r){if(!l)throw new TypeError("getters require true ES5 support");var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,{configurable:n.configurable,enumerable:n.enumerable,get:function(){return t[e]},set:function(r){t[e]=r}})},redefine:function(t,e,r){if(l){var n=Object.getOwnPropertyDescriptor(t,e);n.value=r,Object.defineProperty(t,e,n)}else t[e]=r}},w=function(t,e){Object.keys(e).forEach(function(r){var n=e[r];m(t,r,n,!1)})},E=Object.create||function(t,e){function r(){}r.prototype=t;var n=new r;return"undefined"!=typeof e&&w(n,e),n},O=b.symbol(v.iterator)?v.iterator:"_es6-shim iterator_";u.Set&&"function"==typeof(new u.Set)["@@iterator"]&&(O="@@iterator");var j=function(t,e){e||(e=function(){return this});var r={};r[O]=e,w(t,r),!t[O]&&b.symbol(O)&&(t[O]=e)},S=function(t){var e=h(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]"===h(t.callee)),r},T=Function.call.bind(Function.apply),C={Call:function(t,e){var r=arguments.length>2?arguments[2]:[];if(!C.IsCallable(t))throw new TypeError(t+" is not a function");return T(t,e,r)},RequireObjectCoercible:function(t,e){if(null==t)throw new TypeError(e||"Cannot call method on "+t)},TypeIsObject:function(t){return null!=t&&Object(t)===t},ToObject:function(t,e){return C.RequireObjectCoercible(t,e),Object(t)},IsCallable:function(t){return"function"==typeof t&&"[object Function]"===h(t)},ToInt32:function(t){return C.ToNumber(t)>>0},ToUint32:function(t){return C.ToNumber(t)>>>0},ToNumber:function(t){if("[object Symbol]"===h(t))throw new TypeError("Cannot convert a Symbol value to a number");return+t},ToInteger:function(t){var e=C.ToNumber(t);return Number.isNaN(e)?0:0!==e&&Number.isFinite(e)?(e>0?1:-1)*Math.floor(Math.abs(e)):e},ToLength:function(t){var e=C.ToInteger(t);return e<=0?0:e>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:e},SameValue:function(t,e){return t===e?0!==t||1/t===1/e:Number.isNaN(t)&&Number.isNaN(e)},SameValueZero:function(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)},IsIterable:function(t){return C.TypeIsObject(t)&&("undefined"!=typeof t[O]||S(t))},GetIterator:function(t){if(S(t))return new e(t,"value");var r=t[O];if(!C.IsCallable(r))throw new TypeError("value is not an iterable");var n=r.call(t);if(!C.TypeIsObject(n))throw new TypeError("bad iterator");return n},IteratorNext:function(t){var e=arguments.length>1?t.next(arguments[1]):t.next();if(!C.TypeIsObject(e))throw new TypeError("bad iterator");return e},Construct:function(t,e){var r;r=C.IsCallable(t[g])?t[g]():E(t.prototype||null),w(r,{_es6construct:!0});var n=C.Call(t,r,e);return C.TypeIsObject(n)?n:r},CreateHTML:function(t,e,r,n){var i=String(t),o="<"+e;if(""!==r){var a=String(n),s=a.replace(/"/g,""");o+=" "+r+'="'+s+'"'}var u=o+">",c=u+i;return c+"</"+e+">"}},x=function(t){if(!C.TypeIsObject(t))throw new TypeError("bad object");return t._es6construct||(t.constructor&&C.IsCallable(t.constructor[g])&&(t=t.constructor[g](t)),w(t,{_es6construct:!0})),t},P=function(){function t(t){var e=Math.floor(t),r=t-e;return r<.5?e:r>.5?e+1:e%2?e+1:e}function e(e,r,n){var i,o,a,s,u,c,l,f=(1<<r-1)-1;for(e!==e?(o=(1<<r)-1,a=Math.pow(2,n-1),i=0):e===1/0||e===-(1/0)?(o=(1<<r)-1,a=0,i=e<0?1:0):0===e?(o=0,a=0,i=1/e===-(1/0)?1:0):(i=e<0,e=Math.abs(e),e>=Math.pow(2,1-f)?(o=Math.min(Math.floor(Math.log(e)/Math.LN2),1023),a=t(e/Math.pow(2,o)*Math.pow(2,n)),a/Math.pow(2,n)>=2&&(o+=1,a=1),o>f?(o=(1<<r)-1,a=0):(o+=f,a-=Math.pow(2,n))):(o=0,a=t(e/Math.pow(2,1-f-n)))),u=[],s=n;s;s-=1)u.push(a%2?1:0),a=Math.floor(a/2);for(s=r;s;s-=1)u.push(o%2?1:0),o=Math.floor(o/2);for(u.push(i?1:0),u.reverse(),c=u.join(""),l=[];c.length;)l.push(parseInt(c.slice(0,8),2)),c=c.slice(8);return l}function r(t,e,r){var n,i,o,a,s,u,c,l,f=[];for(n=t.length;n;n-=1)for(o=t[n-1],i=8;i;i-=1)f.push(o%2?1:0),o>>=1;return f.reverse(),a=f.join(""),s=(1<<e-1)-1,u=parseInt(a.slice(0,1),2)?-1:1,c=parseInt(a.slice(1,1+e),2),l=parseInt(a.slice(1+e),2),c===(1<<e)-1?0!==l?NaN:u*(1/0):c>0?u*Math.pow(2,c-s)*(1+l/Math.pow(2,r)):0!==l?u*Math.pow(2,-(s-1))*(l/Math.pow(2,r)):u<0?-0:0}function n(t){return r(t,8,23)}function i(t){return e(t,8,23)}var o={toFloat32:function(t){return n(i(t))}};if("undefined"!=typeof Float32Array){var a=new Float32Array(1);o.toFloat32=function(t){return a[0]=t,a[0]}}return o}();if(w(String,{fromCodePoint:function(t){for(var e,r=[],n=0,i=arguments.length;n<i;n++){if(e=Number(arguments[n]),!C.SameValue(e,C.ToInteger(e))||e<0||e>1114111)throw new RangeError("Invalid code point "+e);e<65536?r.push(String.fromCharCode(e)):(e-=65536,r.push(String.fromCharCode((e>>10)+55296)),r.push(String.fromCharCode(e%1024+56320)))}return r.join("")},raw:function(t){var e=C.ToObject(t,"bad callSite"),r=e.raw,n=C.ToObject(r,"bad raw value"),i=n.length,o=C.ToLength(i);if(o<=0)return"";for(var a,s,u,c,l=[],f=0;f<o&&(a=String(f),s=n[a],u=String(s),l.push(u),!(f+1>=o));)s=f+1<arguments.length?arguments[f+1]:"",c=String(s),l.push(c),f++;return l.join("")}}),1!==String.fromCodePoint.length){var R=Function.apply.bind(String.fromCodePoint);m(String,"fromCodePoint",function(t){return R(this,arguments)},!0)}var A=function t(e,r){if(r<1)return"";if(r%2)return t(e,r-1)+e;var n=t(e,r/2);return n+n},k=1/0,I={repeat:function(t){C.RequireObjectCoercible(this);var e=String(this);if(t=C.ToInteger(t),t<0||t>=k)throw new RangeError("repeat count must be less than infinity and not overflow maximum string size");return A(e,t)},startsWith:function(t){C.RequireObjectCoercible(this);var e=String(this);if(b.regex(t))throw new TypeError('Cannot call method "startsWith" with a regex');t=String(t);var r=arguments.length>1?arguments[1]:void 0,n=Math.max(C.ToInteger(r),0);return e.slice(n,n+t.length)===t},endsWith:function(t){C.RequireObjectCoercible(this);var e=String(this);if(b.regex(t))throw new TypeError('Cannot call method "endsWith" with a regex');t=String(t);var r=e.length,n=arguments.length>1?arguments[1]:void 0,i="undefined"==typeof n?r:C.ToInteger(n),o=Math.min(Math.max(i,0),r);return e.slice(o-t.length,o)===t},includes:function(t){var e=arguments.length>1?arguments[1]:void 0;return p(this,t,e)!==-1},codePointAt:function(t){C.RequireObjectCoercible(this);var e=String(this),r=C.ToInteger(t),n=e.length;if(r>=0&&r<n){var i=e.charCodeAt(r),o=r+1===n;if(i<55296||i>56319||o)return i;var a=e.charCodeAt(r+1);return a<56320||a>57343?i:1024*(i-55296)+(a-56320)+65536}}};w(String.prototype,I);var M=1!==" ".trim().length;if(M){delete String.prototype.trim;var N=["\t\n\v\f\r "," \u2028","\u2029\ufeff"].join(""),F=new RegExp("(^["+N+"]+)|(["+N+"]+$)","g");w(String.prototype,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(F,"")}})}var B=function(t){C.RequireObjectCoercible(t),this._s=String(t),this._i=0};B.prototype.next=function(){var t=this._s,e=this._i;if("undefined"==typeof t||e>=t.length)return this._s=void 0,{value:void 0,done:!0};var r,n,i=t.charCodeAt(e);return i<55296||i>56319||e+1===t.length?n=1:(r=t.charCodeAt(e+1),n=r<56320||r>57343?1:2),this._i=e+n,{value:t.substr(e,n),done:!1}},j(B.prototype),j(String.prototype,function(){return new B(this)}),f||(m(String.prototype,"startsWith",I.startsWith,!0),m(String.prototype,"endsWith",I.endsWith,!0));var L={from:function(t){var e=arguments.length>1?arguments[1]:void 0,r=C.ToObject(t,"bad iterable");if("undefined"!=typeof e&&!C.IsCallable(e))throw new TypeError("Array.from: when provided, the second argument must be a function");var n,i,o,a,s=arguments.length>2,u=s?arguments[2]:void 0,c=C.IsIterable(r);if(c){o=0,i=C.IsCallable(this)?Object(new this):[];var l,f=c?C.GetIterator(r):null;do l=C.IteratorNext(f),l.done||(a=l.value,e?i[o]=s?e.call(u,a,o):e(a,o):i[o]=a,o+=1);while(!l.done);n=o}else for(n=C.ToLength(r.length),i=C.IsCallable(this)?Object(new this(n)):new Array(n),o=0;o<n;++o)a=r[o],e?i[o]=s?e.call(u,a,o):e(a,o):i[o]=a;return i.length=n,i},of:function(){return Array.from(arguments)}};w(Array,L);var D=function(){try{return 0===Array.from({length:-1}).length}catch(t){return!1}};D()||m(Array,"from",L.from,!0);var U=function(t){return{value:t,done:0===arguments.length}};e=function(t,e){this.i=0,this.array=t,this.kind=e},w(e.prototype,{next:function(){var t=this.i,r=this.array;if(!(this instanceof e))throw new TypeError("Not an ArrayIterator");if("undefined"!=typeof r)for(var n=C.ToLength(r.length);t<n;t++){var i,o=this.kind;return"key"===o?i=t:"value"===o?i=r[t]:"entry"===o&&(i=[t,r[t]]),this.i=t+1,{value:i,done:!1}}return this.array=void 0,{value:void 0,done:!0}}}),j(e.prototype);var W=function(t,e){this.object=t,this.array=null,this.kind=e};w(W.prototype,{next:function(){var e,r=this.array;if(!(this instanceof W))throw new TypeError("Not an ObjectIterator");for(null===r&&(r=this.array=t(this.object));C.ToLength(r.length)>0;)if(e=r.shift(),e in this.object)return U("key"===this.kind?e:"value"===this.kind?this.object[e]:[e,this.object[e]]);return U()}}),j(W.prototype);var z={copyWithin:function(t,e){var r=arguments[2],n=C.ToObject(this),i=C.ToLength(n.length);t=C.ToInteger(t),e=C.ToInteger(e);var o=t<0?Math.max(i+t,0):Math.min(t,i),a=e<0?Math.max(i+e,0):Math.min(e,i);r="undefined"==typeof r?i:C.ToInteger(r);var s=r<0?Math.max(i+r,0):Math.min(r,i),u=Math.min(s-a,i-o),c=1;for(a<o&&o<a+u&&(c=-1,a+=u-1,o+=u-1);u>0;)d(n,a)?n[o]=n[a]:delete n[a],a+=c,o+=c,u-=1;return n},fill:function(t){var e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=C.ToObject(this),i=C.ToLength(n.length);e=C.ToInteger("undefined"==typeof e?0:e),r=C.ToInteger("undefined"==typeof r?i:r);for(var o=e<0?Math.max(i+e,0):Math.min(e,i),a=r<0?i+r:r,s=o;s<i&&s<a;++s)n[s]=t;return n},find:function(t){var e=C.ToObject(this),r=C.ToLength(e.length);if(!C.IsCallable(t))throw new TypeError("Array#find: predicate must be a function");for(var n,i=arguments.length>1?arguments[1]:null,o=0;o<r;o++)if(n=e[o],i){if(t.call(i,n,o,e))return n}else if(t(n,o,e))return n},findIndex:function(t){var e=C.ToObject(this),r=C.ToLength(e.length);if(!C.IsCallable(t))throw new TypeError("Array#findIndex: predicate must be a function");for(var n=arguments.length>1?arguments[1]:null,i=0;i<r;i++)if(n){if(t.call(n,e[i],i,e))return i}else if(t(e[i],i,e))return i;return-1},keys:function(){return new e(this,"key")},values:function(){return new e(this,"value")},entries:function(){return new e(this,"entry")}};Array.prototype.keys&&!C.IsCallable([1].keys().next)&&delete Array.prototype.keys,Array.prototype.entries&&!C.IsCallable([1].entries().next)&&delete Array.prototype.entries,Array.prototype.keys&&Array.prototype.entries&&!Array.prototype.values&&Array.prototype[O]&&(w(Array.prototype,{values:Array.prototype[O]}),b.symbol(v.unscopables)&&(Array.prototype[v.unscopables].values=!0)),w(Array.prototype,z),j(Array.prototype,function(){return this.values()}),Object.getPrototypeOf&&j(Object.getPrototypeOf([].values()));var q=Math.pow(2,53)-1;w(Number,{MAX_SAFE_INTEGER:q,MIN_SAFE_INTEGER:-q,EPSILON:2.220446049250313e-16,parseInt:u.parseInt,parseFloat:u.parseFloat,isFinite:function(t){return"number"==typeof t&&c(t)},isInteger:function(t){return Number.isFinite(t)&&C.ToInteger(t)===t},isSafeInteger:function(t){return Number.isInteger(t)&&Math.abs(t)<=Number.MAX_SAFE_INTEGER},isNaN:function(t){return t!==t}}),[,1].find(function(t,e){return 0===e})||m(Array.prototype,"find",z.find,!0),0!==[,1].findIndex(function(t,e){return 0===e})&&m(Array.prototype,"findIndex",z.findIndex,!0),l&&w(Object,{assign:function(t,e){if(!C.TypeIsObject(t))throw new TypeError("target must be an object");return Array.prototype.reduce.call(arguments,function(t,e){return Object.keys(Object(e)).reduce(function(t,r){return t[r]=e[r],t},t)})},is:function(t,e){return C.SameValue(t,e)},setPrototypeOf:function(t,e){var r,n=function(t,e){if(!C.TypeIsObject(t))throw new TypeError("cannot set prototype on a non-object");if(null!==e&&!C.TypeIsObject(e))throw new TypeError("can only set prototype to an object or null"+e)},i=function(t,e){return n(t,e),r.call(t,e),t};try{r=t.getOwnPropertyDescriptor(t.prototype,e).set,r.call({},null)}catch(n){if(t.prototype!=={}[e])return;r=function(t){this[e]=t},i.polyfill=i(i({},null),t.prototype)instanceof t}return i}(Object,"__proto__")}),Object.setPrototypeOf&&Object.getPrototypeOf&&null!==Object.getPrototypeOf(Object.setPrototypeOf({},null))&&null===Object.getPrototypeOf(Object.create(null))&&!function(){var t=Object.create(null),e=Object.getPrototypeOf,r=Object.setPrototypeOf;Object.getPrototypeOf=function(r){var n=e(r);return n===t?null:n},Object.setPrototypeOf=function(e,n){return null===n&&(n=t),r(e,n)},Object.setPrototypeOf.polyfill=!1}();var H=function(){try{return Object.keys("foo"),!0}catch(t){return!1}}();if(!H){var V=Object.keys;m(Object,"keys",function(t){return V(C.ToObject(t))},!0)}if(Object.getOwnPropertyNames){var $=function(){try{return Object.getOwnPropertyNames("foo"),!0}catch(t){return!1}}();if(!$){var G=Object.getOwnPropertyNames;m(Object,"getOwnPropertyNames",function(t){return G(C.ToObject(t))},!0)}}if(!RegExp.prototype.flags&&l){var Y=function(){if(!C.TypeIsObject(this))throw new TypeError("Method called on incompatible type: must be an object.");var t="";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.unicode&&(t+="u"),this.sticky&&(t+="y"),t};_.getter(RegExp.prototype,"flags",Y)}var X=function(){try{return"/a/i"===String(new RegExp(/a/g,"i"))}catch(t){return!1}}();if(!X&&l){var Q=RegExp,J=function t(e,r){return b.regex(e)&&b.string(r)?new t(e.source,r):new Q(e,r)};m(J,"toString",Q.toString.bind(Q),!0),Object.setPrototypeOf&&Object.setPrototypeOf(Q,J),Object.getOwnPropertyNames(Q).forEach(function(t){"$input"!==t&&(t in y||_.proxy(Q,t,J))}),J.prototype=Q.prototype,_.redefine(Q.prototype,"constructor",J),RegExp=J,_.redefine(u,"RegExp",J)}var Z={acosh:function(t){var e=Number(t);return Number.isNaN(e)||t<1?NaN:1===e?0:e===1/0?e:Math.log(e/Math.E+Math.sqrt(e+1)*Math.sqrt(e-1)/Math.E)+1},asinh:function(t){return t=Number(t),0!==t&&c(t)?t<0?-Math.asinh(-t):Math.log(t+Math.sqrt(t*t+1)):t},atanh:function(t){return t=Number(t),Number.isNaN(t)||t<-1||t>1?NaN:t===-1?-(1/0):1===t?1/0:0===t?t:.5*Math.log((1+t)/(1-t))},cbrt:function(t){if(t=Number(t),0===t)return t;var e,r=t<0;return r&&(t=-t),e=Math.pow(t,1/3),r?-e:e},clz32:function(t){t=Number(t);var e=C.ToUint32(t);return 0===e?32:32-e.toString(2).length},cosh:function(t){return t=Number(t),0===t?1:Number.isNaN(t)?NaN:c(t)?(t<0&&(t=-t),t>21?Math.exp(t)/2:(Math.exp(t)+Math.exp(-t))/2):1/0},expm1:function(t){var e=Number(t);if(e===-(1/0))return-1;if(!c(e)||0===t)return e;if(Math.abs(e)>.5)return Math.exp(e)-1;for(var r=e,n=0,i=1;n+r!==n;)n+=r,i+=1,r*=e/i;return n},hypot:function(t,e){var r=!1,n=!0,i=!1,o=[];if(Array.prototype.every.call(arguments,function(t){var e=Number(t);return Number.isNaN(e)?r=!0:e===1/0||e===-(1/0)?i=!0:0!==e&&(n=!1),!i&&(r||o.push(Math.abs(e)),!0)}),i)return 1/0;if(r)return NaN;if(n)return 0;o.sort(function(t,e){return e-t});var a=o[0],s=o.map(function(t){return t/a}),u=s.reduce(function(t,e){return t+e*e},0);return a*Math.sqrt(u)},log2:function(t){return Math.log(t)*Math.LOG2E},log10:function(t){return Math.log(t)*Math.LOG10E},log1p:function(t){var e=Number(t);return e<-1||Number.isNaN(e)?NaN:0===e||e===1/0?e:e===-1?-(1/0):1+e-1===0?e:e*(Math.log(1+e)/(1+e-1))},sign:function(t){var e=+t;return 0===e?e:Number.isNaN(e)?e:e<0?-1:1},sinh:function(t){var e=Number(t);return c(t)&&0!==t?Math.abs(e)<1?(Math.expm1(e)-Math.expm1(-e))/2:(Math.exp(e-1)-Math.exp(-e-1))*Math.E/2:t},tanh:function(t){var e=Number(t);if(Number.isNaN(t)||0===e)return e;if(e===1/0)return 1;if(e===-(1/0))return-1;var r=Math.expm1(e),n=Math.expm1(-e);return r===1/0?1:n===1/0?-1:(r-n)/(Math.exp(e)+Math.exp(-e))},trunc:function(t){var e=Number(t);return e<0?-Math.floor(-e):Math.floor(e)},imul:function(t,e){t=C.ToUint32(t),e=C.ToUint32(e);var r=t>>>16&65535,n=65535&t,i=e>>>16&65535,o=65535&e;return n*o+(r*o+n*i<<16>>>0)|0},fround:function(t){if(0===t||t===1/0||t===-(1/0)||Number.isNaN(t))return t;var e=Number(t);return P.toFloat32(e)}};w(Math,Z),m(Math,"tanh",Z.tanh,Math.tanh(-2e-17)!==-2e-17),m(Math,"acosh",Z.acosh,Math.acosh(Number.MAX_VALUE)===1/0),m(Math,"sinh",Z.sinh,Math.sinh(-2e-17)!==-2e-17);var K=Math.expm1(10);m(Math,"expm1",Z.expm1,K>22025.465794806718||K<22025.465794806718);var tt=0===Math.round(.5-Number.EPSILON/4)&&1===Math.round(-.5+Number.EPSILON/3.99),et=Math.round;m(Math,"round",function(t){return-.5<=t&&t<.5&&0!==t?Math.sign(0*t):et(t)},!tt),Math.imul(4294967295,5)!==-5&&(Math.imul=Z.imul);var rt=function(){var t,e;C.IsPromise=function(t){return!!C.TypeIsObject(t)&&(!!t._promiseConstructor&&"undefined"!=typeof t._status)};var r,n=function(t){if(!C.IsCallable(t))throw new TypeError("bad promise constructor");var e=this,r=function(t,r){e.resolve=t,e.reject=r};if(e.promise=C.Construct(t,[r]),!e.promise._es6construct)throw new TypeError("bad promise constructor");if(!C.IsCallable(e.resolve)||!C.IsCallable(e.reject))throw new TypeError("bad promise constructor")},i=u.setTimeout;"undefined"!=typeof window&&C.IsCallable(window.postMessage)&&(r=function(){var t=[],e="zero-timeout-message",r=function(r){t.push(r),window.postMessage(e,"*")},n=function(r){if(r.source===window&&r.data===e){if(r.stopPropagation(),0===t.length)return;var n=t.shift();n()}};return window.addEventListener("message",n,!0),r});var a=function(){var t=u.Promise;return t&&t.resolve&&function(e){return t.resolve().then(e)}},s=C.IsCallable(u.setImmediate)?u.setImmediate.bind(u):"object"==typeof o&&o.nextTick?o.nextTick:a()||(C.IsCallable(r)?r():function(t){i(t,0)}),c=function(t,e){if(!C.TypeIsObject(t))return!1;var r=e.resolve,n=e.reject;try{var i=t.then;if(!C.IsCallable(i))return!1;i.call(t,r,n)}catch(t){n(t)}return!0},l=function(t,e){t.forEach(function(t){s(function(){var r=t.handler,n=t.capability,i=n.resolve,o=n.reject;try{var a=r(e);if(a===n.promise)throw new TypeError("self resolution");var s=c(a,n);s||i(a)}catch(t){o(t)}})})},f=function(t,e,r){return function(i){if(i===t)return r(new TypeError("self resolution"));var o=t._promiseConstructor,a=new n(o),s=c(i,a);return s?a.promise.then(e,r):e(i)}};t=function(t){var e=this;if(e=x(e),!e._promiseConstructor)throw new TypeError("bad promise");if("undefined"!=typeof e._status)throw new TypeError("promise already initialized");if(!C.IsCallable(t))throw new TypeError("not a valid resolver");e._status="unresolved",e._resolveReactions=[],e._rejectReactions=[];var r=function(t){if("unresolved"===e._status){var r=e._resolveReactions;e._result=t,e._resolveReactions=void 0,e._rejectReactions=void 0,e._status="has-resolution",l(r,t)}},n=function(t){if("unresolved"===e._status){var r=e._rejectReactions;e._result=t,e._resolveReactions=void 0,e._rejectReactions=void 0,e._status="has-rejection",l(r,t)}};try{t(r,n)}catch(t){n(t)}return e},e=t.prototype;var p=function(t,e,r,n){var i=!1;return function(o){if(!i&&(i=!0,e[t]=o,0===--n.count)){var a=r.resolve;a(e)}}};return m(t,g,function(t){var r=this,n=r.prototype||e;return t=t||E(n),w(t,{_status:void 0,_result:void 0,_resolveReactions:void 0,_rejectReactions:void 0,_promiseConstructor:void 0}),t._promiseConstructor=r,t}),w(t,{all:function(t){var e=this,r=new n(e),i=r.resolve,o=r.reject;try{if(!C.IsIterable(t))throw new TypeError("bad iterable");for(var a=C.GetIterator(t),s=[],u={count:1},c=0;;c++){var l=C.IteratorNext(a);if(l.done)break;var f=e.resolve(l.value),h=p(c,s,r,u);u.count++,f.then(h,r.reject)}0===--u.count&&i(s)}catch(t){o(t)}return r.promise},race:function(t){var e=this,r=new n(e),i=r.resolve,o=r.reject;try{if(!C.IsIterable(t))throw new TypeError("bad iterable");for(var a=C.GetIterator(t);;){var s=C.IteratorNext(a);if(s.done)break;var u=e.resolve(s.value);u.then(i,o)}}catch(t){o(t)}return r.promise},reject:function(t){var e=this,r=new n(e),i=r.reject;return i(t),r.promise},resolve:function(t){var e=this;if(C.IsPromise(t)){var r=t._promiseConstructor;if(r===e)return t}var i=new n(e),o=i.resolve;return o(t),i.promise}}),w(e,{catch:function(t){return this.then(void 0,t)},then:function(t,e){var r=this;if(!C.IsPromise(r))throw new TypeError("not a promise");var i=this.constructor,o=new n(i);C.IsCallable(e)||(e=function(t){throw t}),C.IsCallable(t)||(t=function(t){return t});var a=f(r,t,e),s={capability:o,handler:a},u={capability:o,handler:e};switch(r._status){case"unresolved":r._resolveReactions.push(s),r._rejectReactions.push(u);break;case"has-resolution":l([s],r._result);break;case"has-rejection":l([u],r._result);break;default:throw new TypeError("unexpected")}return o.promise}}),t}();u.Promise&&(delete u.Promise.accept,delete u.Promise.defer,delete u.Promise.prototype.chain),w(u,{Promise:rt});var nt=n(u.Promise,function(t){return t.resolve(42)instanceof t}),it=function(){try{return u.Promise.reject(42).then(null,5).then(null,y),!0}catch(t){return!1}}(),ot=function(){try{Promise.call(3,y)}catch(t){return!0}return!1}();nt&&it&&ot||(Promise=rt,m(u,"Promise",rt,!0));var at=function(t){var e=Object.keys(t.reduce(function(t,e){return t[e]=!0,t},{}));return t.join(":")===e.join(":")},st=at(["z","a","bb"]),ut=at(["z",1,"a","3",2]);if(l){var ct=function(t){if(!st)return null;var e=typeof t;return"string"===e?"$"+t:"number"===e?ut?t:"n"+t:null},lt=function(){return Object.create?Object.create(null):{}},ft={Map:function(){function t(t,e){this.key=t,this.value=e,this.next=null,this.prev=null}function e(t,e){this.head=t._head,this.i=this.head,this.kind=e}function r(e){var r=this;if(!C.TypeIsObject(r))throw new TypeError("Map does not accept arguments when called as a function");if(r=x(r),!r._es6map)throw new TypeError("bad map");var n=new t(null,null);if(n.next=n.prev=n,w(r,{_head:n,_storage:lt(),_size:0}),"undefined"!=typeof e&&null!==e){var i=C.GetIterator(e),o=r.set;if(!C.IsCallable(o))throw new TypeError("bad map");for(;;){var a=C.IteratorNext(i);if(a.done)break;var s=a.value;if(!C.TypeIsObject(s))throw new TypeError("expected iterable of pairs");o.call(r,s[0],s[1])}}return r}var n={};t.prototype.isRemoved=function(){return this.key===n},e.prototype={next:function(){var t,e=this.i,r=this.kind,n=this.head;if("undefined"==typeof this.i)return{value:void 0,done:!0};for(;e.isRemoved()&&e!==n;)e=e.prev;for(;e.next!==n;)if(e=e.next,!e.isRemoved())return t="key"===r?e.key:"value"===r?e.value:[e.key,e.value],this.i=e,{value:t,done:!1};return this.i=void 0,{value:void 0,done:!0}}},j(e.prototype);var i=r.prototype;return m(r,g,function(t){var e=this,r=e.prototype||i;return t=t||E(r),w(t,{_es6map:!0}),t}),_.getter(r.prototype,"size",function(){if("undefined"==typeof this._size)throw new TypeError("size method called on incompatible Map");return this._size}),w(r.prototype,{get:function(t){var e=ct(t);if(null!==e){var r=this._storage[e];return r?r.value:void 0}for(var n=this._head,i=n;(i=i.next)!==n;)if(C.SameValueZero(i.key,t))return i.value},has:function(t){var e=ct(t);if(null!==e)return"undefined"!=typeof this._storage[e];for(var r=this._head,n=r;(n=n.next)!==r;)if(C.SameValueZero(n.key,t))return!0;return!1},set:function(e,r){var n,i=this._head,o=i,a=ct(e);if(null!==a){if("undefined"!=typeof this._storage[a])return this._storage[a].value=r,this;n=this._storage[a]=new t(e,r),o=i.prev}for(;(o=o.next)!==i;)if(C.SameValueZero(o.key,e))return o.value=r,this;return n=n||new t(e,r),C.SameValue(-0,e)&&(n.key=0),n.next=this._head,n.prev=this._head.prev,n.prev.next=n,n.next.prev=n,this._size+=1,this},delete:function(t){var e=this._head,r=e,i=ct(t);if(null!==i){if("undefined"==typeof this._storage[i])return!1;r=this._storage[i].prev,delete this._storage[i]}for(;(r=r.next)!==e;)if(C.SameValueZero(r.key,t))return r.key=r.value=n,r.prev.next=r.next,r.next.prev=r.prev,this._size-=1,!0;return!1},clear:function(){this._size=0,this._storage=lt();for(var t=this._head,e=t,r=e.next;(e=r)!==t;)e.key=e.value=n,r=e.next,e.next=e.prev=t;t.next=t.prev=t},keys:function(){return new e(this,"key")},values:function(){return new e(this,"value")},entries:function(){return new e(this,"key+value")},forEach:function(t){for(var e=arguments.length>1?arguments[1]:null,r=this.entries(),n=r.next();!n.done;n=r.next())e?t.call(e,n.value[1],n.value[0],this):t(n.value[1],n.value[0],this)}}),j(r.prototype,function(){return this.entries()}),r}(),Set:function(){var t=function(t){var e=this;if(!C.TypeIsObject(e))throw new TypeError("Set does not accept arguments when called as a function");if(e=x(e),!e._es6set)throw new TypeError("bad set");if(w(e,{"[[SetData]]":null,_storage:lt()}),"undefined"!=typeof t&&null!==t){var r=C.GetIterator(t),n=e.add;if(!C.IsCallable(n))throw new TypeError("bad set");for(;;){var i=C.IteratorNext(r);if(i.done)break;var o=i.value;n.call(e,o)}}return e},e=t.prototype;m(t,g,function(t){var r=this,n=r.prototype||e;return t=t||E(n),w(t,{_es6set:!0}),t});var r=function(t){if(!t["[[SetData]]"]){var e=t["[[SetData]]"]=new ft.Map;Object.keys(t._storage).forEach(function(t){t=36===t.charCodeAt(0)?t.slice(1):"n"===t.charAt(0)?+t.slice(1):+t,e.set(t,t)}),t._storage=null}};return _.getter(t.prototype,"size",function(){if("undefined"==typeof this._storage)throw new TypeError("size method called on incompatible Set");return r(this),this["[[SetData]]"].size}),w(t.prototype,{has:function(t){var e;return this._storage&&null!==(e=ct(t))?!!this._storage[e]:(r(this),this["[[SetData]]"].has(t))},add:function(t){var e;return this._storage&&null!==(e=ct(t))?(this._storage[e]=!0,this):(r(this),this["[[SetData]]"].set(t,t),this)},delete:function(t){var e;if(this._storage&&null!==(e=ct(t))){var n=d(this._storage,e);return delete this._storage[e]&&n}return r(this),this["[[SetData]]"].delete(t)},clear:function(){this._storage?this._storage=lt():this["[[SetData]]"].clear()},values:function(){return r(this),this["[[SetData]]"].values()},entries:function(){return r(this),this["[[SetData]]"].entries()},forEach:function(t){var e=arguments.length>1?arguments[1]:null,n=this;r(n),this["[[SetData]]"].forEach(function(r,i){e?t.call(e,i,i,n):t(i,i,n)})}}),m(t,"keys",t.values,!0),j(t.prototype,function(){return this.values()}),t}()};w(u,ft),(u.Map||u.Set)&&("function"!=typeof u.Map.prototype.clear||0!==(new u.Set).size||0!==(new u.Map).size||"function"!=typeof u.Map.prototype.keys||"function"!=typeof u.Set.prototype.keys||"function"!=typeof u.Map.prototype.forEach||"function"!=typeof u.Set.prototype.forEach||r(u.Map)||r(u.Set)||!n(u.Map,function(t){var e=new t([]);return e.set(42,42),e instanceof t}))&&(u.Map=ft.Map,u.Set=ft.Set),u.Set.prototype.keys!==u.Set.prototype.values&&m(u.Set.prototype,"keys",u.Set.prototype.values,!0),j(Object.getPrototypeOf((new u.Map).keys())),j(Object.getPrototypeOf((new u.Set).keys()))}u.Reflect||m(u,"Reflect",{});var pt=u.Reflect,ht=function(t){if(!C.TypeIsObject(t))throw new TypeError("target must be an object")};if(w(u.Reflect,{apply:function(){return C.Call.apply(null,arguments)},construct:function(t,e){if(!C.IsCallable(t))throw new TypeError("First argument must be callable.");return C.Construct(t,e)},deleteProperty:function(t,e){if(ht(t),l){var r=Object.getOwnPropertyDescriptor(t,e);if(r&&!r.configurable)return!1}return delete t[e]},enumerate:function(t){return ht(t),new W(t,"key")},has:function(t,e){return ht(t),e in t}}),Object.getOwnPropertyNames&&w(u.Reflect,{ownKeys:function(t){ht(t);var e=Object.getOwnPropertyNames(t);return C.IsCallable(Object.getOwnPropertySymbols)&&e.push.apply(e,Object.getOwnPropertySymbols(t)),e}}),Object.preventExtensions&&w(u.Reflect,{isExtensible:function(t){return ht(t),Object.isExtensible(t)},preventExtensions:function(t){return ht(t),vt(function(){Object.preventExtensions(t)})}}),l){var dt=function(t,e,r){var n=Object.getOwnPropertyDescriptor(t,e);if(!n){var i=Object.getPrototypeOf(t);if(null===i)return;return dt(i,e,r)}return"value"in n?n.value:n.get?n.get.call(r):void 0},yt=function(t,e,r,n){var i=Object.getOwnPropertyDescriptor(t,e);if(!i){var o=Object.getPrototypeOf(t);if(null!==o)return yt(o,e,r,n);i={value:void 0,writable:!0,enumerable:!0,configurable:!0}}if("value"in i){if(!i.writable)return!1;if(!C.TypeIsObject(n))return!1;var a=Object.getOwnPropertyDescriptor(n,e);return a?pt.defineProperty(n,e,{value:r}):pt.defineProperty(n,e,{value:r,writable:!0,enumerable:!0,configurable:!0})}return!!i.set&&(i.set.call(n,r),!0)},vt=function(t){try{t()}catch(t){return!1}return!0};w(u.Reflect,{defineProperty:function(t,e,r){return ht(t),vt(function(){Object.defineProperty(t,e,r)})},getOwnPropertyDescriptor:function(t,e){return ht(t),Object.getOwnPropertyDescriptor(t,e)},get:function(t,e){ht(t);var r=arguments.length>2?arguments[2]:t;return dt(t,e,r)},set:function(t,e,r){ht(t);var n=arguments.length>3?arguments[3]:t;return yt(t,e,r,n)}})}if(Object.getPrototypeOf){var gt=Object.getPrototypeOf;w(u.Reflect,{getPrototypeOf:function(t){return ht(t),gt(t)}})}if(Object.setPrototypeOf){var bt=function(t,e){for(;e;){if(t===e)return!0;e=pt.getPrototypeOf(e)}return!1};w(u.Reflect,{setPrototypeOf:function(t,e){if(ht(t),null!==e&&!C.TypeIsObject(e))throw new TypeError("proto must be an object or null");return e===pt.getPrototypeOf(t)||!(pt.isExtensible&&!pt.isExtensible(t))&&(!bt(t,e)&&(Object.setPrototypeOf(t,e),!0))}})}if("Invalid Date"!==String(new Date(NaN))){var mt=Date.prototype.toString,_t=function(){var t=+this;return t!==t?"Invalid Date":mt.call(this)};m(_t,"toString",mt.toString,!0),m(Date.prototype,"toString",_t,!0)}var wt={anchor:function(t){return C.CreateHTML(this,"a","name",t); +},big:function(){return C.CreateHTML(this,"big","","")},blink:function(){return C.CreateHTML(this,"blink","","")},bold:function(){return C.CreateHTML(this,"b","","")},fixed:function(){return C.CreateHTML(this,"tt","","")},fontcolor:function(t){return C.CreateHTML(this,"font","color",t)},fontsize:function(t){return C.CreateHTML(this,"font","size",t)},italics:function(){return C.CreateHTML(this,"i","","")},link:function(t){return C.CreateHTML(this,"a","href",t)},small:function(){return C.CreateHTML(this,"small","","")},strike:function(){return C.CreateHTML(this,"strike","","")},sub:function(){return C.CreateHTML(this,"sub","","")},sup:function(){return C.CreateHTML(this,"sup","","")}};return w(String.prototype,wt),Object.keys(wt).forEach(function(t){var e=String.prototype[t],r=!1;if(C.IsCallable(e)){var n=e.call("",' " '),i=[].concat(n.match(/"/g)).length;r=n!==n.toLowerCase()||i>2}else r=!0;r&&m(String.prototype,t,wt[t],!0)}),u})}).call(e,r(3))},function(t,e,r){var n={};!function(e){t.exports=n}(e),function(){var t=!1,e=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(r){function n(){!t&&this.init&&this.init.apply(this,arguments)}var i=this.prototype;t=!0;var o=new this;t=!1;for(var a in r)o[a]="function"==typeof r[a]&&"function"==typeof i[a]&&e.test(r[a])?function(t,e){return function(){var r=this._super;this._super=i[t];var n=e.apply(this,arguments);return this._super=r,n}}(a,r[a]):r[a];return n.prototype=o,n.prototype.constructor=n,n.extend=arguments.callee,n}}(),n.Decoder=Class.extend({init:function(t){function e(t){for(var e=Math.max.apply(null,t),r=0;r<t.length;r++)t[r]/=e}function r(t){for(var e=0,r=0;r<t.length;r++)e+=t[r];return e}function n(t,e){for(var r=e;r<t.length-e;r++){for(var n=-e;n<=e;n++)t[r]+=t[r+n];t[r]/=2*e+1,E&&(O+=t[r]+"\n")}}function i(t){var i,o,a=t,s=[];e(a);for(var u=T.c,c=0;c<a.length;c++)h[u]=a[c]*m[u],d[u]=a[c]*g[u],y[u]=a[c]*_[u],v[u]=a[c]*b[u],i=Math.sqrt(Math.pow(r(h),2)+Math.pow(r(d),2)),o=Math.sqrt(Math.pow(r(y),2)+Math.pow(r(v),2)),a[c]=o-i,u++,u==f/2&&(u=0);T.c=u,n(a,1);for(var c=1;c<a.length;c++){if(a[c]*a[c-1]<0||0==a[c-1]){var l=Math.round((T.t-T.lastTransition)/f);T.lastTransition=T.t,s.push(l)}T.t++}return T.t++,s}function o(t,e){if(T.bitCounter+e>8)throw"byteBuffer too small";for(var r=0;r<e;r++)T.bitCounter++,T.byteBuffer>>>=1,t&&(T.byteBuffer|=128),8==T.bitCounter&&(T.wordBuffer.push(T.byteBuffer),T.byteBuffer=0)}function a(t){var e="";t.length&&(t.forEach(function(t){e+=String.fromCharCode(t)}),t.length=0),j(e)}var s,u,c,l,f,p,h,d,y,v,g,b,m,_,w=this,E=t.debug,O="",j=t.onReceive,S=t.sampleRate,T={current:0,PREAMBLE:1,START:2,DATA:3,STOP:4,bitCounter:0,byteBuffer:0,wordBuffer:[],lastTransition:0,lastBitState:0,t:0,c:0};w.setProfile=function(t){u=t.baud,c=t.freqLow,l=t.freqHigh,f=Math.ceil(S/u),p=Math.ceil(40*S/1e3/f),h=new Float32Array(f/2),d=new Float32Array(f/2),y=new Float32Array(f/2),v=new Float32Array(f/2),g=new Float32Array(f/2),b=new Float32Array(f/2),m=new Float32Array(f/2),_=new Float32Array(f/2),function(){for(var t=2*Math.PI*(c/S),e=2*Math.PI*(l/S),r=0;r<f/2;r++)g[r]=Math.sin(t*r),b[r]=Math.sin(e*r),m[r]=Math.cos(t*r),_[r]=Math.cos(e*r)}(),s="undefined"!=typeof t.raw&&t.raw},w.setProfile(t);var C=s?j:a;w.decode=function(t){for(var e=i(t),r=T.PREAMBLE,n=0;n<e.length;n++){var a=e[n];switch(T.current){case T.PREAMBLE:a>=12&&a<=p+20&&(r=T.START,T.lastBitState=0,T.byteBuffer=0,T.wordBuffer=[]);break;case T.START:E&&console.log("START"),T.bitCounter=0,1==a?r=T.DATA:a>1&&a<=9?(r=9==a?T.STOP:T.DATA,o(0,a-1)):r=T.PREAMBLE;break;case T.DATA:E&&console.log("DATA");var s=a+T.bitCounter,u=1^T.lastBitState;s>11?r=T.PREAMBLE:11==s?(o(1,a-3),r=T.START,E&&console.log(">emit< "+T.wordBuffer[0].toString(2)),C(T.wordBuffer),T.wordBuffer=[]):10==s?(o(1,a-2),r=T.PREAMBLE,E&&console.log("|emit| "+T.wordBuffer[0].toString(2)),C(T.wordBuffer)):9==s?(o(1,a-1),r=T.START):8==s?(o(u,a),r=T.STOP,T.lastBitState=u):(o(u,a),r=T.DATA,T.lastBitState=u),0==a&&(r=T.PREAMBLE,E&&console.log("#demod error#"));break;case T.STOP:E&&console.log(" STOP"),1==a?r=T.START:3==a?(r=T.START,E&&console.log(">>emit<< "+T.wordBuffer[0].toString(2)),C(T.wordBuffer),T.wordBuffer=[]):a>=2?(r=T.PREAMBLE,E&&console.log("||emit|| "+T.wordBuffer[0].toString(2)),C(T.wordBuffer)):r=T.PREAMBLE;break;default:r=T.PREAMBLE,T.bitCounter=0,T.byteBuffer=0}T.current=r}}}}),n.Encoder=Class.extend({init:function(t){function e(t){for(var e=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);if(n<=127)e.push(n);else if(n<=2047)e.push(192|n>>>6),e.push(128|63&n);else if(n<=65535)e.push(224|n>>>12),e.push(128|n>>>6&63),e.push(128|63&n);else{for(var i=4;n>>>6*i;)i++;for(e.push(65280>>>i&255|n>>>6*--i);i--;)e[idx++]=128|n>>>6*i&63}}return e}var r,i,o,a,s,u,c,l,f,p,h=this,d=44100,y=t.sampleRate;h.setProfile=function(t){r=t.baud,i=t.freqLow,o=t.freqHigh,a=Math.ceil(d/r),s=Math.ceil(40*d/1e3/a),u=t.softmodem?1:2,c=new Float32Array(a),l=new Float32Array(a),f="undefined"!=typeof t.raw&&t.raw,p=t.softmodem,function(){for(var t=2*Math.PI*i/d,e=2*Math.PI*o/d,r=0;r<a;r++)c.set([Math.cos(t*r)],r),l.set([Math.cos(e*r)],r)}(),console.log("new encoder profile: ",t)},h.setProfile(t),h.modulate=function(r){function i(t,e){for(var r=0;r<e;r++)v.set(t?l:c,g),g+=a}var o=f?r:e(r),h=(s+10*o.length+u)*a,v=new Float32Array(h),g=0;i(1,s);for(var b=0;b<o.length;b++)for(var m=o[b]<<1|512,_=0;_<10;_++,m>>=1)i(1&m,1);i(1,1),p||i(0,1),t.debug&&console.log("gen. audio length: "+v.length);var w=new n.Resampler({inRate:d,outRate:y,inputBuffer:v});w.resample(v.length);var E=w.outputBuffer();return t.debug&&console.log("resampled audio length: "+E.length),E}}}),n.Profiles={SoftModem:{baud:1225,freqLow:4900,freqHigh:7350,echoCancellation:!1,softmodem:!0},SoftModemLowFrequencies:{baud:1225,freqLow:2450,freqHigh:4900,echoCancellation:!0,softmodem:!0},Browser:{baud:1225,freqLow:19600,freqHigh:20825,echoCancellation:!1,softmodem:!1}},n.Resampler=Class.extend({init:function(t){function e(t){var e=0;if(t>0){var r=s,n=0,i=0,c=0,e=0;for(r-=1,t-=1,c=Math.floor(r);c<t;)i=r%1,n=1-i,o[e++]=d[c]*n+d[c+1]*i,r+=a,c=Math.floor(r);u[0]=d[c++],s=r%1}return e}function r(){var t=0;if(bufferLength>0){var e=0,r=0,n=0,i=0,l=!c;c=!1;var f=0;do{for(l?(e=a,r=0):(e=s,r=u[0],l=!0);e>0&&n<bufferLength;){if(i=1+n-f,!(e>=i)){r+=d[n]*e,f+=e,e=0;break}r+=d[n++]*i,f=n,e-=i}if(!(e<=0)){s=e,u[0]=r,c=!0;break}o[t++]=r/a}while(n<bufferLength)}return t}function n(t){return t}function i(){var t=Math.ceil(d.length*h/p/1.0000004768371582)+1;try{o=new Float32Array(t),u=new Float32Array(1)}catch(t){o=[],u=[]}}var o,a,s,u,c,l,f=this,p=+t.inRate,h=+t.outRate,d=t.inputBuffer;if("object"!=typeof d)throw new Error("inputBuffer is not an object.");if(!(d instanceof Array||d instanceof Float32Array||d instanceof Float64Array))throw new Error("inputBuffer is not an array or a float32 or a float64 array.");if(!(p>0&&h>0))throw new Error("Invalid settings specified for the resampler.");p==h?(l=n,a=1,o=d):(i(),a=p/h,p<h?(l=e,s=1):(l=r,c=!1,s=0)),f.resample=function(t){return l(t)},f.outputBuffer=function(){return o}}}),n.Connection=Class.extend({init:function(t){function e(t,e){return"undefined"==typeof t?e:t}function r(t){var e=t.inputBuffer,r=e.getChannelData(0);console.log("-- audioprocess data ("+r.length+" samples) --"),a||(l.onReceive=s,a=new n.Decoder(l)),a.decode(r)}function i(t){var e=t.getAudioTracks();console.log("Using audio device: "+e[0].label),console.log("-- samplerate ("+l.sampleRate+") --"),t.active||console.log("Stream not active"),audioSource=c.createMediaStreamSource(t),decoderNode=c.createScriptProcessor(8192,1,1),audioSource.connect(decoderNode),decoderNode.addEventListener("audioprocess",r),decoderNode.connect(c.destination)}function o(t){console.log("navigator.getUserMedia error: ",t)}var a,s,u=this,t=e(t,n.Profiles.SoftModem),c="undefined"==typeof t.audioCtx?new AudioContext:t.audioCtx,l=u.options={sampleRate:c.sampleRate,baud:e(t.baud,1225),freqLow:e(t.freqLow,4900),freqHigh:e(t.freqHigh,7350),debug:e(t.debug,!1),softmodem:e(t.softmodem,!0),raw:e(t.raw,!1),echoCancellation:e(t.echoCancellation,!1)},f=new n.Encoder(l);navigator=t.navigator||navigator,navigator.mediaDevices.getUserMedia({audio:{optional:[{echoCancellation:l.echoCancellation}]},video:!1}).then(i,o),u.history={sent:[],received:[]};var p=[],h=!1;u.send=function(t){function e(t){var r=c.createBufferSource();r.buffer=t,r.connect(c.destination),h=!0,r.start(0),r.onended=function(){h=!1,p.length&&e(p.shift())}}var r=f.modulate(t),n=c.createBuffer(1,r.length,l.sampleRate);n.copyToChannel(r,0),h?p.push(n):e(n),u.history.sent.push(t)},u.listen=function(t){s=function(e){t(e),u.history.received.push(e)}},u.validateJSON=function(t){var e;try{e=JSON.parse(t)}catch(t){return!1}return e},u.setProfile=function(t){f.setProfile(t),"object"==typeof a&&a.setProfile(t)}}})}]); \ No newline at end of file diff --git a/example/jquery.min.js b/example/jquery.min.js index f6a6a99..4c5be4c 100644 --- a/example/jquery.min.js +++ b/example/jquery.min.js @@ -1,4 +1,4 @@ -/*! jQuery v3.1.0 | (c) jQuery Foundation | jquery.org/license */ -!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.0",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null!=a?a<0?this[a+this.length]:this[a]:f.call(this)},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=r.isArray(d)))?(e?(e=!1,f=c&&r.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"label"in b&&b.disabled===a||"form"in b&&b.disabled===a||"form"in b&&b.disabled===!1&&(b.isDisabled===a||b.isDisabled!==!a&&("label"in b||!ea(b))!==a)}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function ra(){}ra.prototype=d.filters=d.pseudos,d.setFilters=new ra,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=Q.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function sa(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e)}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d<e;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i<f;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;e<f;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i<e&&ya(a.slice(i,e)),e<f&&ya(a=a.slice(e)),e<f&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(_,aa),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=V.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(_,aa),$.test(j[0].type)&&qa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&sa(j),!a)return G.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||$.test(a)&&qa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){if(r.isFunction(b))return r.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return r.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(C.test(b))return r.filter(b,a,c);b=r.filter(b,a)}return r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType})}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b<d;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;b<d;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/\S+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){r.each(b,function(b,c){r.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==r.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return r.each(arguments,function(a,b){var c;while((c=r.inArray(b,f,c))>-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b<f)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,M,e),g(f,c,N,e)):(f++,j.call(a,g(f,c,M,e),g(f,c,N,e),g(f,c,M,c.notifyWith))):(d!==M&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R),a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0, -r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},T=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function U(){this.expando=r.expando+U.uid++}U.uid=1,U.prototype={cache:function(a){var b=a[this.expando];return b||(b={},T(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){r.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(K)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var V=new U,W=new U,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Y=/[A-Z]/g;function Z(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Y,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:X.test(c)?JSON.parse(c):c)}catch(e){}W.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return W.hasData(a)||V.hasData(a)},data:function(a,b,c){return W.access(a,b,c)},removeData:function(a,b){W.remove(a,b)},_data:function(a,b,c){return V.access(a,b,c)},_removeData:function(a,b){V.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=W.get(f),1===f.nodeType&&!V.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),Z(f,d,e[d])));V.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){W.set(this,a)}):S(this,function(b){var c;if(f&&void 0===b){if(c=W.get(f,a),void 0!==c)return c;if(c=Z(f,a),void 0!==c)return c}else this.each(function(){W.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=V.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var $=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,_=new RegExp("^(?:([+-])=|)("+$+")([a-z%]*)$","i"),aa=["Top","Right","Bottom","Left"],ba=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},ca=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function da(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&_.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var ea={};function fa(a){var b,c=a.ownerDocument,d=a.nodeName,e=ea[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),ea[d]=e,e)}function ga(a,b){for(var c,d,e=[],f=0,g=a.length;f<g;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=V.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&ba(d)&&(e[f]=fa(d))):"none"!==c&&(e[f]="none",V.set(d,"display",c)));for(f=0;f<g;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ga(this,!0)},hide:function(){return ga(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ba(this)?r(this).show():r(this).hide()})}});var ha=/^(?:checkbox|radio)$/i,ia=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ja=/^$|\/(?:java|ecma)script/i,ka={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ka.optgroup=ka.option,ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead,ka.th=ka.td;function la(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function ma(a,b){for(var c=0,d=a.length;c<d;c++)V.set(a[c],"globalEval",!b||V.get(b[c],"globalEval"))}var na=/<|&#?\w+;/;function oa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;n<o;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(na.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ia.exec(f)||["",""])[1].toLowerCase(),i=ka[h]||ka._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=la(l.appendChild(f),"script"),j&&ma(g),c){k=0;while(f=g[k++])ja.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var pa=d.documentElement,qa=/^key/,ra=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,sa=/^([^.]*)(?:\.(.+)|)/;function ta(){return!0}function ua(){return!1}function va(){try{return d.activeElement}catch(a){}}function wa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)wa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ua;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(pa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c<arguments.length;c++)i[c]=arguments[c];if(b.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,b)!==!1){h=r.event.handlers.call(this,b,j),c=0;while((f=h[c++])&&!b.isPropagationStopped()){b.currentTarget=f.elem,d=0;while((g=f.handlers[d++])&&!b.isImmediatePropagationStopped())b.rnamespace&&!b.rnamespace.test(g.namespace)||(b.handleObj=g,b.data=g.data,e=((r.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(b.result=e)===!1&&(b.preventDefault(),b.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,b),b.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;c<h;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?r(e,this).index(i)>-1:r.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},addProp:function(a,b){Object.defineProperty(r.Event.prototype,a,{enumerable:!0,configurable:!0,get:r.isFunction(b)?function(){if(this.originalEvent)return b(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[r.expando]?a:new r.Event(a)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==va()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===va()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&r.nodeName(this,"input"))return this.click(),!1},_default:function(a){return r.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},r.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},r.Event=function(a,b){return this instanceof r.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ta:ua,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,b&&r.extend(this,b),this.timeStamp=a&&a.timeStamp||r.now(),void(this[r.expando]=!0)):new r.Event(a,b)},r.Event.prototype={constructor:r.Event,isDefaultPrevented:ua,isPropagationStopped:ua,isImmediatePropagationStopped:ua,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ta,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ta,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ta,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&qa.test(a.type)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&ra.test(a.type)?1&b?1:2&b?3:4&b?2:0:a.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){r.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||r.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),r.fn.extend({on:function(a,b,c,d){return wa(this,a,b,c,d)},one:function(a,b,c,d){return wa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,r(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=ua),this.each(function(){r.event.remove(this,a,c,b)})}});var xa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ya=/<script|<style|<link/i,za=/checked\s*(?:[^=]|=\s*.checked.)/i,Aa=/^true\/(.*)/,Ba=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ca(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Da(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ea(a){var b=Aa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)r.event.add(b,e,j[e][c])}W.hasData(a)&&(h=W.access(a),i=r.extend({},h),W.set(b,i))}}function Ga(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ha.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ha(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&za.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(m&&(e=oa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(la(e,"script"),Da),i=h.length;l<m;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,la(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Ea),l=0;l<i;l++)j=h[l],ja.test(j.type||"")&&!V.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Ba,""),k))}return a}function Ia(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(la(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&ma(la(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(xa,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=la(h),f=la(a),d=0,e=f.length;d<e;d++)Ga(f[d],g[d]);if(b)if(c)for(f=f||la(a),g=g||la(h),d=0,e=f.length;d<e;d++)Fa(f[d],g[d]);else Fa(a,h);return g=la(h,"script"),g.length>0&&ma(g,!i&&la(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(la(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!ya.test(a)&&!ka[(ia.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(la(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(la(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var Ja=/^margin/,Ka=new RegExp("^("+$+")(?!px)[a-z%]+$","i"),La=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",pa.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,pa.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Ma(a,b,c){var d,e,f,g,h=a.style;return c=c||La(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&Ka.test(g)&&Ja.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Na(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Oa=/^(none|table(?!-c[ea]).+)/,Pa={position:"absolute",visibility:"hidden",display:"block"},Qa={letterSpacing:"0",fontWeight:"400"},Ra=["Webkit","Moz","ms"],Sa=d.createElement("div").style;function Ta(a){if(a in Sa)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ra.length;while(c--)if(a=Ra[c]+b,a in Sa)return a}function Ua(a,b,c){var d=_.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Va(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;f<4;f+=2)"margin"===c&&(g+=r.css(a,c+aa[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+aa[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+aa[f]+"Width",!0,e))):(g+=r.css(a,"padding"+aa[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+aa[f]+"Width",!0,e)));return g}function Wa(a,b,c){var d,e=!0,f=La(a),g="border-box"===r.css(a,"boxSizing",!1,f);if(a.getClientRects().length&&(d=a.getBoundingClientRect()[b]),d<=0||null==d){if(d=Ma(a,b,f),(d<0||null==d)&&(d=a.style[b]),Ka.test(d))return d;e=g&&(o.boxSizingReliable()||d===a.style[b]),d=parseFloat(d)||0}return d+Va(a,b,c||(g?"border":"content"),e,f)+"px"}r.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ma(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=a.style;return b=r.cssProps[h]||(r.cssProps[h]=Ta(h)||h),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=_.exec(c))&&e[1]&&(c=da(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b);return b=r.cssProps[h]||(r.cssProps[h]=Ta(h)||h),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Ma(a,b,d)),"normal"===e&&b in Qa&&(e=Qa[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){if(c)return!Oa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?Wa(a,b,d):ca(a,Pa,function(){return Wa(a,b,d)})},set:function(a,c,d){var e,f=d&&La(a),g=d&&Va(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=_.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Ua(a,c,g)}}}),r.cssHooks.marginLeft=Na(o.reliableMarginLeft,function(a,b){if(b)return(parseFloat(Ma(a,"marginLeft"))||a.getBoundingClientRect().left-ca(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+aa[d]+b]=f[d]||f[d-2]||f[0];return e}},Ja.test(a)||(r.cssHooks[a+b].set=Ua)}),r.fn.extend({css:function(a,b){return S(this,function(a,b,c){var d,e,f={},g=0;if(r.isArray(b)){for(d=La(a),e=b.length;g<e;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function Xa(a,b,c,d,e){return new Xa.prototype.init(a,b,c,d,e)}r.Tween=Xa,Xa.prototype={constructor:Xa,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Xa.propHooks[this.prop];return a&&a.get?a.get(this):Xa.propHooks._default.get(this)},run:function(a){var b,c=Xa.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Xa.propHooks._default.set(this),this}},Xa.prototype.init.prototype=Xa.prototype,Xa.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Xa.propHooks.scrollTop=Xa.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Xa.prototype.init,r.fx.step={};var Ya,Za,$a=/^(?:toggle|show|hide)$/,_a=/queueHooks$/;function ab(){Za&&(a.requestAnimationFrame(ab),r.fx.tick())}function bb(){return a.setTimeout(function(){Ya=void 0}),Ya=r.now()}function cb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=aa[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function db(a,b,c){for(var d,e=(gb.tweeners[b]||[]).concat(gb.tweeners["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function eb(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&ba(a),q=V.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],$a.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=V.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ga([a],!0),j=a.style.display||j,k=r.css(a,"display"),ga([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"===k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=V.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ga([a],!0),m.done(function(){p||ga([a]),V.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=db(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function fb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],r.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function gb(a,b,c){var d,e,f=0,g=gb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Ya||bb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:Ya||bb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(fb(k,j.opts.specialEasing);f<g;f++)if(d=gb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,db,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}r.Animation=r.extend(gb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return da(c.elem,a,_.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(K);for(var c,d=0,e=a.length;d<e;d++)c=a[d],gb.tweeners[c]=gb.tweeners[c]||[],gb.tweeners[c].unshift(b)},prefilters:[eb],prefilter:function(a,b){b?gb.prefilters.unshift(a):gb.prefilters.push(a)}}),r.speed=function(a,b,c){var e=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off||d.hidden?e.duration=0:e.duration="number"==typeof e.duration?e.duration:e.duration in r.fx.speeds?r.fx.speeds[e.duration]:r.fx.speeds._default,null!=e.queue&&e.queue!==!0||(e.queue="fx"),e.old=e.complete,e.complete=function(){r.isFunction(e.old)&&e.old.call(this),e.queue&&r.dequeue(this,e.queue)},e},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ba).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=gb(this,r.extend({},a),f);(e||V.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=V.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&_a.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=V.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(cb(b,!0),a,d,e)}}),r.each({slideDown:cb("show"),slideUp:cb("hide"),slideToggle:cb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(Ya=r.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||r.fx.stop(),Ya=void 0},r.fx.timer=function(a){r.timers.push(a),a()?r.fx.start():r.timers.pop()},r.fx.interval=13,r.fx.start=function(){Za||(Za=a.requestAnimationFrame?a.requestAnimationFrame(ab):a.setInterval(r.fx.tick,r.fx.interval))},r.fx.stop=function(){a.cancelAnimationFrame?a.cancelAnimationFrame(Za):a.clearInterval(Za),Za=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var hb,ib=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return S(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?hb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K); -if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),hb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ib[b]||r.find.attr;ib[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=ib[g],ib[g]=e,e=null!=c(a,b,d)?g:null,ib[g]=f),e}});var jb=/^(?:input|select|textarea|button)$/i,kb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):jb.test(a.nodeName)||kb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});var lb=/[\t\r\n\f]/g;function mb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,mb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,mb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,mb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=mb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(c)+" ").replace(lb," ").indexOf(b)>-1)return!0;return!1}});var nb=/\r/g,ob=/[\x20\t\r\n\f]+/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(nb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:r.trim(r.text(a)).replace(ob," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i<h;i++)if(c=d[i],(c.selected||i===e)&&!c.disabled&&(!c.parentNode.disabled||!r.nodeName(c.parentNode,"optgroup"))){if(b=r(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ha.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,""),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Qb=[],Rb=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Qb.pop()||r.expando+"_"+rb++;return this[a]=!0,a}}),r.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Rb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rb.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Rb,"$1"+e):b.jsonp!==!1&&(b.url+=(sb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||r.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?r(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Qb.push(e)),g&&r.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=B.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=oa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.fn.load=function(a,b,c){var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=r.trim(a.slice(h)),a=a.slice(0,h)),r.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&r.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?r("<div>").append(r.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){r.fn[b]=function(a){return this.on(b,a)}}),r.expr.pseudos.animated=function(a){return r.grep(r.timers,function(b){return a===b.elem}).length};function Sb(a){return r.isWindow(a)?a:9===a.nodeType&&a.defaultView}r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),d.width||d.height?(e=f.ownerDocument,c=Sb(e),b=e.documentElement,{top:d.top+c.pageYOffset-b.clientTop,left:d.left+c.pageXOffset-b.clientLeft}):d):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),r.nodeName(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||pa})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return S(this,function(a,d,e){var f=Sb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Na(o.pixelPosition,function(a,c){if(c)return c=Ma(a,b),Ka.test(c)?r(a).position()[b]+"px":c})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return S(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var Tb=a.jQuery,Ub=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=Ub),b&&a.jQuery===r&&(a.jQuery=Tb),r},b||(a.jQuery=a.$=r),r}); +/*! jQuery v3.1.1 | (c) jQuery Foundation | jquery.org/license */ +!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=r.isArray(d)))?(e?(e=!1,f=c&&r.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function ra(){}ra.prototype=d.filters=d.pseudos,d.setFilters=new ra,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=Q.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function sa(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e);return!1}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}return!1}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d<e;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i<f;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;e<f;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i<e&&ya(a.slice(i,e)),e<f&&ya(a=a.slice(e)),e<f&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):C.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b<d;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;b<d;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/[^\x20\t\r\n\f]+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){r.each(b,function(b,c){r.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==r.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return r.each(arguments,function(a,b){var c;while((c=r.inArray(b,f,c))>-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b<f)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,M,e),g(f,c,N,e)):(f++,j.call(a,g(f,c,M,e),g(f,c,N,e),g(f,c,M,c.notifyWith))):(d!==M&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R), +a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},T=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function U(){this.expando=r.expando+U.uid++}U.uid=1,U.prototype={cache:function(a){var b=a[this.expando];return b||(b={},T(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){r.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(K)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var V=new U,W=new U,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Y=/[A-Z]/g;function Z(a){return"true"===a||"false"!==a&&("null"===a?null:a===+a+""?+a:X.test(a)?JSON.parse(a):a)}function $(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Y,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c=Z(c)}catch(e){}W.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return W.hasData(a)||V.hasData(a)},data:function(a,b,c){return W.access(a,b,c)},removeData:function(a,b){W.remove(a,b)},_data:function(a,b,c){return V.access(a,b,c)},_removeData:function(a,b){V.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=W.get(f),1===f.nodeType&&!V.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),$(f,d,e[d])));V.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){W.set(this,a)}):S(this,function(b){var c;if(f&&void 0===b){if(c=W.get(f,a),void 0!==c)return c;if(c=$(f,a),void 0!==c)return c}else this.each(function(){W.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=V.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var _=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,aa=new RegExp("^(?:([+-])=|)("+_+")([a-z%]*)$","i"),ba=["Top","Right","Bottom","Left"],ca=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},da=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function ea(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&aa.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var fa={};function ga(a){var b,c=a.ownerDocument,d=a.nodeName,e=fa[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),fa[d]=e,e)}function ha(a,b){for(var c,d,e=[],f=0,g=a.length;f<g;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=V.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&ca(d)&&(e[f]=ga(d))):"none"!==c&&(e[f]="none",V.set(d,"display",c)));for(f=0;f<g;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ha(this,!0)},hide:function(){return ha(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ca(this)?r(this).show():r(this).hide()})}});var ia=/^(?:checkbox|radio)$/i,ja=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ka=/^$|\/(?:java|ecma)script/i,la={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};la.optgroup=la.option,la.tbody=la.tfoot=la.colgroup=la.caption=la.thead,la.th=la.td;function ma(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function na(a,b){for(var c=0,d=a.length;c<d;c++)V.set(a[c],"globalEval",!b||V.get(b[c],"globalEval"))}var oa=/<|&#?\w+;/;function pa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;n<o;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(oa.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ja.exec(f)||["",""])[1].toLowerCase(),i=la[h]||la._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=ma(l.appendChild(f),"script"),j&&na(g),c){k=0;while(f=g[k++])ka.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var qa=d.documentElement,ra=/^key/,sa=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ta=/^([^.]*)(?:\.(.+)|)/;function ua(){return!0}function va(){return!1}function wa(){try{return d.activeElement}catch(a){}}function xa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)xa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=va;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(qa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c<arguments.length;c++)i[c]=arguments[c];if(b.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,b)!==!1){h=r.event.handlers.call(this,b,j),c=0;while((f=h[c++])&&!b.isPropagationStopped()){b.currentTarget=f.elem,d=0;while((g=f.handlers[d++])&&!b.isImmediatePropagationStopped())b.rnamespace&&!b.rnamespace.test(g.namespace)||(b.handleObj=g,b.data=g.data,e=((r.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(b.result=e)===!1&&(b.preventDefault(),b.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,b),b.result}},handlers:function(a,b){var c,d,e,f,g,h=[],i=b.delegateCount,j=a.target;if(i&&j.nodeType&&!("click"===a.type&&a.button>=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c<i;c++)d=b[c],e=d.selector+" ",void 0===g[e]&&(g[e]=d.needsContext?r(e,this).index(j)>-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i<b.length&&h.push({elem:j,handlers:b.slice(i)}),h},addProp:function(a,b){Object.defineProperty(r.Event.prototype,a,{enumerable:!0,configurable:!0,get:r.isFunction(b)?function(){if(this.originalEvent)return b(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[r.expando]?a:new r.Event(a)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==wa()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===wa()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&r.nodeName(this,"input"))return this.click(),!1},_default:function(a){return r.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},r.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},r.Event=function(a,b){return this instanceof r.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ua:va,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,b&&r.extend(this,b),this.timeStamp=a&&a.timeStamp||r.now(),void(this[r.expando]=!0)):new r.Event(a,b)},r.Event.prototype={constructor:r.Event,isDefaultPrevented:va,isPropagationStopped:va,isImmediatePropagationStopped:va,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ua,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ua,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ua,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&ra.test(a.type)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&sa.test(a.type)?1&b?1:2&b?3:4&b?2:0:a.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){r.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||r.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),r.fn.extend({on:function(a,b,c,d){return xa(this,a,b,c,d)},one:function(a,b,c,d){return xa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,r(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=va),this.each(function(){r.event.remove(this,a,c,b)})}});var ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,za=/<script|<style|<link/i,Aa=/checked\s*(?:[^=]|=\s*.checked.)/i,Ba=/^true\/(.*)/,Ca=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Da(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Ea(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Fa(a){var b=Ba.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ga(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)r.event.add(b,e,j[e][c])}W.hasData(a)&&(h=W.access(a),i=r.extend({},h),W.set(b,i))}}function Ha(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ia.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ia(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&Aa.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ia(f,b,c,d)});if(m&&(e=pa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(ma(e,"script"),Ea),i=h.length;l<m;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,ma(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Fa),l=0;l<i;l++)j=h[l],ka.test(j.type||"")&&!V.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Ca,""),k))}return a}function Ja(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(ma(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&na(ma(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(ya,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=ma(h),f=ma(a),d=0,e=f.length;d<e;d++)Ha(f[d],g[d]);if(b)if(c)for(f=f||ma(a),g=g||ma(h),d=0,e=f.length;d<e;d++)Ga(f[d],g[d]);else Ga(a,h);return g=ma(h,"script"),g.length>0&&na(g,!i&&ma(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ja(this,a,!0)},remove:function(a){return Ja(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.appendChild(a)}})},prepend:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(ma(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!za.test(a)&&!la[(ja.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(ma(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ia(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(ma(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var Ka=/^margin/,La=new RegExp("^("+_+")(?!px)[a-z%]+$","i"),Ma=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",qa.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,qa.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Na(a,b,c){var d,e,f,g,h=a.style;return c=c||Ma(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&La.test(g)&&Ka.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Oa(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Pa=/^(none|table(?!-c[ea]).+)/,Qa={position:"absolute",visibility:"hidden",display:"block"},Ra={letterSpacing:"0",fontWeight:"400"},Sa=["Webkit","Moz","ms"],Ta=d.createElement("div").style;function Ua(a){if(a in Ta)return a;var b=a[0].toUpperCase()+a.slice(1),c=Sa.length;while(c--)if(a=Sa[c]+b,a in Ta)return a}function Va(a,b,c){var d=aa.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Wa(a,b,c,d,e){var f,g=0;for(f=c===(d?"border":"content")?4:"width"===b?1:0;f<4;f+=2)"margin"===c&&(g+=r.css(a,c+ba[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+ba[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+ba[f]+"Width",!0,e))):(g+=r.css(a,"padding"+ba[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+ba[f]+"Width",!0,e)));return g}function Xa(a,b,c){var d,e=!0,f=Ma(a),g="border-box"===r.css(a,"boxSizing",!1,f);if(a.getClientRects().length&&(d=a.getBoundingClientRect()[b]),d<=0||null==d){if(d=Na(a,b,f),(d<0||null==d)&&(d=a.style[b]),La.test(d))return d;e=g&&(o.boxSizingReliable()||d===a.style[b]),d=parseFloat(d)||0}return d+Wa(a,b,c||(g?"border":"content"),e,f)+"px"}r.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Na(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=a.style;return b=r.cssProps[h]||(r.cssProps[h]=Ua(h)||h),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=aa.exec(c))&&e[1]&&(c=ea(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b);return b=r.cssProps[h]||(r.cssProps[h]=Ua(h)||h),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Na(a,b,d)),"normal"===e&&b in Ra&&(e=Ra[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){if(c)return!Pa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?Xa(a,b,d):da(a,Qa,function(){return Xa(a,b,d)})},set:function(a,c,d){var e,f=d&&Ma(a),g=d&&Wa(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=aa.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Va(a,c,g)}}}),r.cssHooks.marginLeft=Oa(o.reliableMarginLeft,function(a,b){if(b)return(parseFloat(Na(a,"marginLeft"))||a.getBoundingClientRect().left-da(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+ba[d]+b]=f[d]||f[d-2]||f[0];return e}},Ka.test(a)||(r.cssHooks[a+b].set=Va)}),r.fn.extend({css:function(a,b){return S(this,function(a,b,c){var d,e,f={},g=0;if(r.isArray(b)){for(d=Ma(a),e=b.length;g<e;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function Ya(a,b,c,d,e){return new Ya.prototype.init(a,b,c,d,e)}r.Tween=Ya,Ya.prototype={constructor:Ya,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Ya.propHooks[this.prop];return a&&a.get?a.get(this):Ya.propHooks._default.get(this)},run:function(a){var b,c=Ya.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ya.propHooks._default.set(this),this}},Ya.prototype.init.prototype=Ya.prototype,Ya.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Ya.propHooks.scrollTop=Ya.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Ya.prototype.init,r.fx.step={};var Za,$a,_a=/^(?:toggle|show|hide)$/,ab=/queueHooks$/;function bb(){$a&&(a.requestAnimationFrame(bb),r.fx.tick())}function cb(){return a.setTimeout(function(){Za=void 0}),Za=r.now()}function db(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ba[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function eb(a,b,c){for(var d,e=(hb.tweeners[b]||[]).concat(hb.tweeners["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function fb(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&ca(a),q=V.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],_a.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=V.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ha([a],!0),j=a.style.display||j,k=r.css(a,"display"),ha([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"===k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=V.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ha([a],!0),m.done(function(){p||ha([a]),V.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=eb(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function gb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],r.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function hb(a,b,c){var d,e,f=0,g=hb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Za||cb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:Za||cb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(gb(k,j.opts.specialEasing);f<g;f++)if(d=hb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,eb,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}r.Animation=r.extend(hb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return ea(c.elem,a,aa.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(K);for(var c,d=0,e=a.length;d<e;d++)c=a[d],hb.tweeners[c]=hb.tweeners[c]||[],hb.tweeners[c].unshift(b)},prefilters:[fb],prefilter:function(a,b){b?hb.prefilters.unshift(a):hb.prefilters.push(a)}}),r.speed=function(a,b,c){var e=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off||d.hidden?e.duration=0:"number"!=typeof e.duration&&(e.duration in r.fx.speeds?e.duration=r.fx.speeds[e.duration]:e.duration=r.fx.speeds._default),null!=e.queue&&e.queue!==!0||(e.queue="fx"),e.old=e.complete,e.complete=function(){r.isFunction(e.old)&&e.old.call(this),e.queue&&r.dequeue(this,e.queue)},e},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ca).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=hb(this,r.extend({},a),f);(e||V.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=V.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&ab.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=V.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(db(b,!0),a,d,e)}}),r.each({slideDown:db("show"),slideUp:db("hide"),slideToggle:db("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(Za=r.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||r.fx.stop(),Za=void 0},r.fx.timer=function(a){r.timers.push(a),a()?r.fx.start():r.timers.pop()},r.fx.interval=13,r.fx.start=function(){$a||($a=a.requestAnimationFrame?a.requestAnimationFrame(bb):a.setInterval(r.fx.tick,r.fx.interval))},r.fx.stop=function(){a.cancelAnimationFrame?a.cancelAnimationFrame($a):a.clearInterval($a),$a=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var ib,jb=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return S(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?ib:void 0)), +void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),ib={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=jb[b]||r.find.attr;jb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=jb[g],jb[g]=e,e=null!=c(a,b,d)?g:null,jb[g]=f),e}});var kb=/^(?:input|select|textarea|button)$/i,lb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):kb.test(a.nodeName)||lb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function mb(a){var b=a.match(K)||[];return b.join(" ")}function nb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,nb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,nb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,nb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=nb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(nb(c))+" ").indexOf(b)>-1)return!0;return!1}});var ob=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(ob,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:mb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d<i;d++)if(c=e[d],(c.selected||d===f)&&!c.disabled&&(!c.parentNode.disabled||!r.nodeName(c.parentNode,"optgroup"))){if(b=r(c).val(),g)return b;h.push(b)}return h},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ia.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,"$1"),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Qb=[],Rb=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Qb.pop()||r.expando+"_"+rb++;return this[a]=!0,a}}),r.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Rb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rb.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Rb,"$1"+e):b.jsonp!==!1&&(b.url+=(sb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||r.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?r(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Qb.push(e)),g&&r.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=B.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=pa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.fn.load=function(a,b,c){var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=mb(a.slice(h)),a=a.slice(0,h)),r.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&r.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?r("<div>").append(r.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){r.fn[b]=function(a){return this.on(b,a)}}),r.expr.pseudos.animated=function(a){return r.grep(r.timers,function(b){return a===b.elem}).length};function Sb(a){return r.isWindow(a)?a:9===a.nodeType&&a.defaultView}r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),d.width||d.height?(e=f.ownerDocument,c=Sb(e),b=e.documentElement,{top:d.top+c.pageYOffset-b.clientTop,left:d.left+c.pageXOffset-b.clientLeft}):d):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),r.nodeName(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||qa})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return S(this,function(a,d,e){var f=Sb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Oa(o.pixelPosition,function(a,c){if(c)return c=Na(a,b),La.test(c)?r(a).position()[b]+"px":c})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return S(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var Tb=a.jQuery,Ub=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=Ub),b&&a.jQuery===r&&(a.jQuery=Tb),r},b||(a.jQuery=a.$=r),r}); diff --git a/example/slow/index.html b/example/slow/index.html new file mode 100644 index 0000000..2b137fc --- /dev/null +++ b/example/slow/index.html @@ -0,0 +1,81 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta content="text/html;charset=UTF-8" http-equiv="Content-Type"/> + <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> + <title>WebJack</title> + + <script src="../adapter.js"></script> + <script src="../jquery.min.js"></script> + <script src="../bundle.js" type="text/javascript"></script> + <script src="slow.js" type="text/javascript"></script> + + <link href="../examples.css" rel="stylesheet"> + +</head> +<body> + <h1>WebJack-Firmata Slow Baud Rate Demo</h1> + <a href="https://github.com/publiclab/webjack-firmata" target="_blank">WebJack-Firmata</a> is a transport layer for <a href="https://github.com/firmata/firmata.js" target="_blank">Firmata.js</a> and is based on <a href="https://github.com/publiclab/webjack" target="_blank">WebJack</a>, a JavaScript library that uses an audio modem to communicate with an Arduino µC via headphone jack. Firmata is a RPC like protocol, that defines a serial interface to read from or write to a microcontroller's pins. This demo allows web browsers to control an Arduino via headphone jack.<br><br> + To run the demo, upload this modified version of the <a href="https://github.com/publiclab/webjack-firmata/blob/master/sketches/StandardFirmataWebJack/StandardFirmataWebJack.ino" target="_blank">StandardFirmata</a> sketch. You will also need additional <a href="https://github.com/arms22/SoftModem#hardware" target="_blank">hardware</a>. + + <h2>Slow Baud Rate Demo</h2> + <p>In this demo, we communicate at 36 baud -- slow enough for the human ear to easily hear each bit.</p> + + <h2>Commands</h2> + <button id="capab">Query Capabilities</button> + <button id="firmware">Query Firmware</button> + + <div class="connected"> + <button id="digital">digitalWrite</button> + <select id="pin"> + <option>0</option> + <option>1</option> + <option>2</option> + <option>4</option> + <option>5</option> + <option>6</option> + <option>7</option> + <option>8</option> + <option>9</option> + <option>10</option> + <option>12</option> + <option selected>13</option> + </select> + <select id="state"> + <option value="0">LOW</option> + <option value="1" selected>HIGH</option> + </select> + </div> + + <div class="connected"> + <button id="analog">analogRead</button> + <select id="apin"> + <option value="0">A0</option> + <option value="1">A1</option> + <option value="2">A2</option> + <option value="3">A3</option> + <option value="4">A4</option> + <option value="5">A5</option> + </select> + </div> + + <form class="serial" action="javascript:void(0);"> + <input type="text" class="serialWrite"> + <button class="serialWriteSend connected">SerialWrite</button> + </form> + + <button id="reset">Reset</button> + + <h2>Log</h2> + <div class="webjack-log"></div> + + <p class="hint"><i>WebJack is in an early development stage. If it does not work, try to:</i> + <ul> + <li>use an other browser <i>(Safari will not work, sorry)</i></li> + <li>pump up the volume</li> + <li>reload the site several times</li> + <li>reset the Arduino<br> + </ul> + </p> +</body> +</html> diff --git a/example/slow/slow.js b/example/slow/slow.js new file mode 100644 index 0000000..6606667 --- /dev/null +++ b/example/slow/slow.js @@ -0,0 +1,11 @@ +$(document).ready(function() { + + Demo.setOptions({ + baud : 36, + freqLow : 4900, + freqHigh : 7350, + echoCancellation : false, + softmodem : true + }); + +});