text: module.exports=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="/build/",e(0)}([function(t,e,r){(function(e){"use strict";function n(t,r){var n=t.webtaskContext,u=["AUTH0_DOMAIN","AUTH0_GLOBAL_CLIENT_ID","AUTH0_GLOBAL_CLIENT_SECRET","PAPERTRAIL_HOST","PAPERTRAIL_PORT"],l=u.filter(function(t){return!n.data[t]});return l.length?r.status(400).send({message:"Missing settings: "+l.join(", ")}):void t.webtaskContext.read("history",{},function(u,l){var c="undefined"==typeof l?null:l.checkpointId,h=new o({domain:n.data.AUTH0_DOMAIN,clientID:n.data.AUTH0_GLOBAL_CLIENT_ID,clientSecret:n.data.AUTH0_GLOBAL_CLIENT_SECRET}),p=new i.Logger({transports:[new i.transports.Papertrail({host:n.data.PAPERTRAIL_HOST,port:n.data.PAPERTRAIL_PORT})]});s.waterfall([function(t){h.getAccessToken(function(e){return e&&console.log("Error authenticating:",e),t(e)})},function(t){var r=function n(r){console.log("Downloading logs from: "+(r.checkpointId||"Start")+"."),r.logs=r.logs||[],h.getLogs({take:200,from:r.checkpointId},function(i,o){return i?t(i):o&&o.length?(o.forEach(function(t){return r.logs.push(t)}),r.checkpointId=r.logs[r.logs.length-1]._id,e(function(){return n(r)})):(console.log("Total logs: "+r.logs.length+"."),t(null,r))})};r({checkpointId:c})},function(t,e){var r=parseInt(n.data.LOG_LEVEL)||0,i=function(t){return f[t.type]?f[t.type].level>=r:!0},o=n.data.LOG_TYPES&&n.data.LOG_TYPES.split(",")||[],s=function(t){return o&&o.length?t.type&&o.indexOf(t.type)>=0:!0};t.logs=t.logs.filter(function(t){return"sapi"!==t.type&&"fapi"!==t.type}).filter(i).filter(s),console.log("Filtered logs on log level '"+r+"': "+t.logs.length+"."),n.data.LOG_TYPES&&console.log("Filtered logs on '"+n.data.LOG_TYPES+"': "+t.logs.length+"."),e(null,t)},function(t,e){console.log("Uploading blobs..."),s.eachLimit(t.logs,5,function(t,e){var r=a(t.date),n=r.format("YYYY/MM/DD")+"/"+r.format("HH")+"/"+t._id+".json";console.log("Uploading "+n+"."),p.info(JSON.stringify(t),e)},function(r){return r?e(r):(console.log("Upload complete."),e(null,t))})}],function(e,n){return e?(console.log("Job failed."),t.webtaskContext.write("history",JSON.stringify({checkpointId:c}),{},function(t){return t?r.status(500).send(t):void r.status(500).send({error:e})})):(console.log("Job complete."),t.webtaskContext.write("history",JSON.stringify({checkpointId:n.checkpointId,totalLogsProcessed:n.logs.length}),{},function(t){return t?r.status(500).send(t):void r.sendStatus(200)}))})})}var i=r(3),o=r(4),s=r(5),a=r(6),u=(r(7),r(8)),l=r(9),c=u();r(12).Papertrail;var f={s:{event:"Success Login",level:1},seacft:{event:"Success Exchange",level:1},feacft:{event:"Failed Exchange",level:3},f:{event:"Failed Login",level:3},w:{event:"Warnings During Login",level:2},du:{event:"Deleted User",level:1},fu:{event:"Failed Login (invalid email/username)",level:3},fp:{event:"Failed Login (wrong password)",level:3},fc:{event:"Failed by Connector",level:3},fco:{event:"Failed by CORS",level:3},con:{event:"Connector Online",level:1},coff:{event:"Connector Offline",level:3},fcpro:{event:"Failed Connector Provisioning",level:4},ss:{event:"Success Signup",level:1},fs:{event:"Failed Signup",level:3},cs:{event:"Code Sent",level:0},cls:{event:"Code/Link Sent",level:0},sv:{event:"Success Verification Email",level:0},fv:{event:"Failed Verification Email",level:0},scp:{event:"Success Change Password",level:1},fcp:{event:"Failed Change Password",level:3},sce:{event:"Success Change Email",level:1},fce:{event:"Failed Change Email",level:3},scu:{event:"Success Change Username",level:1},fcu:{event:"Failed Change Username",level:3},scpn:{event:"Success Change Phone Number",level:1},fcpn:{event:"Failed Change Phone Number",level:3},svr:{event:"Success Verification Email Request",level:0},fvr:{event:"Failed Verification Email Request",level:3},scpr:{event:"Success Change Password Request",level:0},fcpr:{event:"Failed Change Password Request",level:3},fn:{event:"Failed Sending Notification",level:3},sapi:{event:"API Operation"},fapi:{event:"Failed API Operation"},limit_wc:{event:"Blocked Account",level:4},limit_ui:{event:"Too Many Calls to /userinfo",level:4},api_limit:{event:"Rate Limit On API",level:4},sdu:{event:"Successful User Deletion",level:1},fdu:{event:"Failed User Deletion",level:3}};c.get("/",n),c.post("/",n),t.exports=l.fromExpress(c)}).call(e,r(1).setImmediate)},function(t,e,r){(function(t,n){function i(t,e){this._id=t,this._clearFn=e}var o=r(2).nextTick,s=Function.prototype.apply,a=Array.prototype.slice,u={},l=0;e.setTimeout=function(){return new i(s.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(s.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=l++,n=arguments.length<2?!1:a.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(1).setImmediate,r(1).clearImmediate)},function(t,e){function r(){l=!1,s.length?u=s.concat(u):c=-1,u.length&&n()}function n(){if(!l){var t=setTimeout(r);l=!0;for(var e=u.length;e;){for(s=u,u=[];++c<e;)s&&s[c].run();c=-1,e=u.length}s=null,l=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function o(){}var s,a=t.exports={},u=[],l=!1,c=-1;a.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];u.push(new i(t,e)),1!==u.length||l||setTimeout(n,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=o,a.addListener=o,a.once=o,a.off=o,a.removeListener=o,a.removeAllListeners=o,a.emit=o,a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(t,e){t.exports=require("winston")},function(t,e){t.exports=require("auth0@0.8.2")},function(t,e){t.exports=require("async")},function(t,e){t.exports=require("moment")},function(t,e){t.exports=require("useragent")},function(t,e){t.exports=require("express")},function(t,e,r){function n(t){return function(e,r,n){var i=s(r.x_wt.jtn);return r.originalUrl=r.url,r.url=r.url.replace(i,"/"),r.webtaskContext=a(e),t(r,n)}}function i(t){var e;return t.ext("onRequest",function(t,r){var n=s(t.x_wt.jtn);t.setUrl(t.url.replace(n,"/")),t.webtaskContext=e}),function(r,n,i){var o=t._dispatch();e=a(r),o(n,i)}}function o(t){return function(e,r,n){var i=s(r.x_wt.jtn);return r.originalUrl=r.url,r.url=r.url.replace(i,"/"),r.webtaskContext=a(e),t.emit("request",r,n)}}function s(t){var e="^/api/run/[^/]+/",r="(?:[^/?#]*/?)?";return new RegExp(e+(t?r:""))}function a(t){function e(t,e,n){var i=r(10);"function"==typeof e&&(n=e,e={}),n(i.preconditionFailed("Storage is not available in this context"))}function n(e,n,i){var o=r(10),s=r(11);"function"==typeof n&&(i=n,n={}),s({uri:t.secrets.EXT_STORAGE_URL,method:"GET",headers:n.headers||{},qs:{path:e},json:!0},function(t,e,r){return t?i(o.wrap(t,502)):404===e.statusCode&&Object.hasOwnProperty.call(n,"defaultValue")?i(null,n.defaultValue):e.statusCode>=400?i(o.create(e.statusCode,r&&r.message)):void i(null,r)})}function i(t,e,n,i){var o=r(10);"function"==typeof n&&(i=n,n={}),i(o.preconditionFailed("Storage is not available in this context"))}function o(e,n,i,o){var s=r(10),a=r(11);"function"==typeof i&&(o=i,i={}),a({uri:t.secrets.EXT_STORAGE_URL,method:"PUT",headers:i.headers||{},qs:{path:e},body:n},function(t,e,r){return t?o(s.wrap(t,502)):e.statusCode>=400?o(s.create(e.statusCode,r&&r.message)):void o(null)})}return t.read=t.secrets.EXT_STORAGE_URL?n:e,t.write=t.secrets.EXT_STORAGE_URL?o:i,t}e.fromConnect=e.fromExpress=n,e.fromHapi=i,e.fromServer=e.fromRestify=o},function(t,e){t.exports=require("boom")},function(t,e){t.exports=require("request")},function(t,e,r){var n=r(13),i=r(14),o=r(15),s=r(16).Produce,a=r(23),u=r(3),l=e.Papertrail=function(t){function e(){function t(){u.stream.on("error",r),u.stream.on("end",e)}if(!u._shutdown&&!u._erroring)try{if(u.disableTls)u.stream=i.createConnection(u.port,u.host,a),u.stream.setKeepAlive(!0,u._KEEPALIVE_INTERVAL),t();else{var n=i.createConnection(u.port,u.host,function(){n.setKeepAlive(!0,u._KEEPALIVE_INTERVAL),u.stream=o.connect({socket:n,rejectUnauthorized:!1},a),t()});n.on("error",r)}}catch(s){r(s)}}function r(t){u._erroring=!0,u.emit("error",t),setTimeout(function(){u.currentRetries++,u.totalRetries++,u.connectionDelay<u.maxDelayBetweenReconnection&&u.currentRetries>=u.attemptsBeforeDecay&&(u.connectionDelay=2*u.connectionDelay,u.currentRetries=0),u.loggingEnabled&&u.totalRetries>=u.maximumAttempts&&(u.loggingEnabled=!1,u.emit("error",new Error("Max entries eclipsed, disabling buffering"))),u._erroring=!1,e()},u.connectionDelay)}function a(){u.loggingEnabled=!0,u.currentRetries=0,u.totalRetries=0,u.connectionDelay=t.connectionDelay||1e3,u.emit("connect","Connected to Papertrail at "+u.host+":"+u.port),u.buffer.length>0&&(u.stream.write(u.buffer),u.buffer="")}var u=this;if(u._KEEPALIVE_INTERVAL=15e3,t=t||{},u.name="Papertrail",u.level=t.level||"info",u.host=t.host,u.port=t.port,u.disableTls="boolean"==typeof t.disableTls?t.disableTls:!1,u.hostname=t.hostname||n.hostname(),u.program=t.program||"default",u.facility=t.facility||"daemon",u.colorize=t.colorize||!1,u.logFormat=t.logFormat||function(t,e){return t+" "+e},u.attemptsBeforeDecay=t.attemptsBeforeDecay||5,u.maximumAttempts=t.maximumAttempts||25,u.connectionDelay=t.connectionDelay||1e3,u.handleExceptions=t.handleExceptions||!1,u.maxDelayBetweenReconnection=t.maxDelayBetweenReconnection||6e4,u.maxBufferSize=t.maxBufferSize||1048576,u.inlineMeta=t.inlineMeta||!1,u.producer=new s({facility:u.facility}),u.currentRetries=0,u.totalRetries=0,u.buffer="",u.loggingEnabled=!0,u._shutdown=!1,!u.host||!u.port)throw new Error("Missing required parameters: host and port");e()};a.inherits(l,u.Transport),u.transports.Papertrail=l,l.prototype.log=function(t,e,r,n){var i=this;if("function"!=typeof r||n||(n=r,r=!1),r&&"object"==typeof r&&0===Object.keys(r).length&&!a.isError(r)&&(r=!1),!this.loggingEnabled)return n(null,!0);var o=e;"string"!=typeof o&&(o=a.inspect(o,!1,null,i.colorize)),r&&("object"!=typeof r?o+=" "+r:r&&(o+=this.inlineMeta?" "+a.inspect(r,!1,null,i.colorize).replace(/[\n\t]\s*/gm," "):"\n"+a.inspect(r,!1,null,i.colorize))),this.sendMessage(this.hostname,this.program,t,o),n(null,!0)},l.prototype.sendMessage=function(t,e,r,n){var i=this,o=[],s="",a="";o=n?n.split("\n"):[""];for(var l=0;l<o.length&&(0!==o[l].length||l!=o.length-1);l++)1==l&&(a="    "),s+=i.producer.produce({severity:r,host:t,appName:e,date:new Date,message:i.logFormat(i.colorize?u.config.colorize(r):r,a+o[l])})+"\r\n";this.stream&&this.stream.writable?this.stream.write(s):this.loggingEnabled&&this.buffer.length<this.maxBufferSize&&(this.buffer+=s)},l.prototype.close=function(){var t=this;t._shutdown=!0,t.stream?t.stream.end():t.on("connect",function(){t.close()})}},function(t,e){t.exports=require("os")},function(t,e){t.exports=require("net")},function(t,e){t.exports=require("tls")},function(t,e,r){var n=r(17),i=r(18);e.Produce=n,e.Parse=i},function(t,e,r){function n(t){return"number"!=typeof t?t:t=10>t?"0"+t:t}function i(t){t instanceof Date||(t=new Date(Date()));var e=n(t.getHours()),r=n(t.getMinutes()),i=n(t.getSeconds()),o=t.getMonth(),s=t.getDate();return 10>s&&(s=" "+s),c[o]+" "+s+" "+e+":"+r+":"+i}function o(t){t instanceof Date||(t=new Date(Date()));for(var e,r=Math.abs(t.getTimezoneOffset()),i=0;r>=60;)i++,r-=60;return e=t.getTimezoneOffset()<0?"+"+n(i)+":"+n(r):t.getTimezoneOffset()>0?"-"+n(i)+":"+n(r):"Z",formattedDate=t.getUTCFullYear()+"-"+n(t.getUTCMonth()+1)+"-"+n(t.getUTCDate())+"T"+n(t.getUTCHours())+":"+n(t.getUTCMinutes())+":"+n(t.getUTCSeconds())+"."+n(t.getUTCMilliseconds())+e,formattedDate}function s(t){var e={};return"string"!=typeof t.facility||t.facility.match(/^\d+$/)?parseInt(t.facility,10)&&parseInt(t.facility,10)<24&&(e.facility=parseInt(t.facility,10)):e.facility=u[t.facility.toLowerCase()],"string"!=typeof t.severity||t.severity.match(/^\d+$/)?parseInt(t.severity,10)&&parseInt(t.severity,10)<8&&(e.severity=parseInt(t.severity,10)):e.severity=l[t.severity.toLowerCase()],isNaN(e.severity)||isNaN(e.facility)?!1:(e.prival=8*e.facility+e.severity,e.str=t.version?"<"+e.prival+">"+t.version:"<"+e.prival+">",e.str)}function a(t){if("object"!=typeof t)return!1;var e="";for(var r in t){sdElement=t[r],e+="["+r;for(var n in sdElement)sdElement[n]=sdElement[n].toString().replace(/(\]|\\|")/g,"\\$1"),e+=" "+n+'="'+sdElement[n]+'"';e+="]"}return e}var u={kern:0,user:1,mail:2,daemon:3,auth:4,syslog:5,lpr:6,news:7,uucp:8,clock:9,sec:10,ftp:11,ntp:12,audit:13,alert:14,local0:16,local1:17,local2:18,local3:19,local4:20,local5:21,local6:22,local7:23},l={emerg:0,emergency:0,alert:1,crit:2,critical:2,err:3,error:3,warn:4,warning:4,notice:5,info:6,information:6,informational:6,debug:7},c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],f=function(t){t&&"object"==typeof t&&t.type?this.type=t.type.match(/bsd|3164/i)?"RFC3164":"RFC5424":t&&"string"==typeof t?this.type=t.match(/bsd|3164/i)?"RFC3164":"RFC5424":this.type="RFC5424",t&&t.facility&&u[t.facility]&&(this.facility=t.facility),t&&t.pid&&parseInt(t.pid,10)&&(this.pid=t.pid),t&&t.host&&(this.host=t.host.replace(/\s+/g,"")),t&&t.appName&&(this.appName=t.appName.replace(/\s+/g,"")),t&&t.msgID&&(this.msgID=t.msgID.replace(/\s+/g,""))};f.prototype.produce=function(t,e){t.time instanceof Date&&!t.date&&(t.date=t.time);var r=[];if(!t.date instanceof Date&&(t.date=new Date(Date())),t.facility||(t.facility=this.facility),"RFC5424"==this.type){if(t.hasOwnProperty("prival")&&t.prival>=0&&t.prival<=191)var n="<"+t.prival+">1";else var n=s({facility:t.facility,severity:t.severity,version:1});if(n===!1)return!1;r.push(n),r.push(o(t.date)),r.push(t.host||this.host||"-"),r.push(t.appName||this.appName||"-"),r.push(t.pid||this.pid||"-"),r.push(t.msgID||this.msgID||"-"),t.structuredData?r.push(a(t.structuredData)||"-"):r.push("-"),t.message||(t.message="-")}else if(t.timestamp=i(t.date),r.push(s({facility:t.facility,severity:t.severity})+t.timestamp),r.push(t.host||this.host),r.push(),t.appName||this.appName){var u=t.appName||this.appName,l=t.pid||this.pid;parseInt(l,10)?r.push(u+"["+l+"]:"):r.push(u+":")}var c=r.filter(function(t){return t}).map(function(t){return String(t).trim()}).join(" ");return c+=" "+t.message||"",r.push(c),e?e(c):c},f.prototype.debug=function(t,e){return t.severity="debug",this.produce(t,e)},f.prototype.info=function(t,e){return t.severity="info",this.produce(t,e)},f.prototype.notice=function(t,e){return t.severity="notice",this.produce(t,e)},f.prototype.warn=function(t,e){return t.severity="warn",this.produce(t,e)},f.prototype.crit=function(t,e){return t.severity="crit",this.produce(t,e)},f.prototype.alert=function(t,e){return t.severity="alert",this.produce(t,e)},f.prototype.emergency=function(t,e){return t.severity="emergency",this.produce(t,e)},t.exports=f},function(t,e,r){(function(e){var r=["kern","user","mail","daemon","auth","syslog","lpr","news","uucp","clock","sec","ftp","ntp","audit","alert","clock","local0","local1","local2","local3","local4","local5","local6","local7"],n=["emerg","alert","crit","err","warn","notice","info","debug"],o={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},s={hashAlgorithm:[null,"SHA1","SHA256"],keyBlobType:{C:"PKIX Certificate",P:"OpenPGP KeyID",K:"Public Key",N:"No key information",U:"Unknown"}},a=function(){};a.prototype.parse=function(t,r){if("function"==typeof e&&e.isBuffer(t))t=t.toString("utf8",0);else if("string"!=typeof t)return t;var n={originalMessage:t},o=t.split(" ");if(o.length<2)return n;var s=this.decodePri(o[0]);if(s)for(var a in s)n[a]=s[a];var u;if(o[0].match(/^(<\d+>\d)$/)){if(o.shift(),u=o.shift(),n.type="RFC5424",n.time=this.parseTimeStamp(u),n.host=this.decideValue(o.shift()),n.appName=this.decideValue(o.shift()),n.pid=this.decideValue(o.shift()),n.msgID=this.decideValue(o.shift()),"-"!==o[0]){var l=0;for(i=o.length-1;i>-1;i--)if("]"===o[i].substr(-1)){l=i,l++;break}if(0!==l){var c=o.splice(0,l).join(" ");n.structuredData=this.parseStructure(c),n.structuredData.ssign?n.structuredData.signedBlock=this.parseSignedBlock(n.structuredData):n.structuredData["ssign-cert"]&&(n.structuredData.signedBlock=this.parseSignedCertificate(n.structuredData))}}else o.shift();n.message=o.join(" ")}else o[0].match(/^(<\d+>\d+:)$/)?(n.type="RFC3164",u=o.splice(0,1).join(" ").replace(/^(<\d+>)/,""),n.time=this.parseBsdTime(u),n.message=o.join(" ")):o[0].match(/^(<\d+>\w+)/)&&(n.type="RFC3164",""===o[1]&&o.splice(1,1),u=o.splice(0,3).join(" ").replace(/^(<\d+>)/,""),n.time=this.parseBsdTime(u),n.host=o.shift(),n.message=o.join(" "));return r?void r(n):n},a.prototype.decideValue=function(t){return"-"===t?null:t},a.prototype.decodePri=function(t){if("string"==typeof t){var e=t.match(/^<(\d+)>/);if(!e)return!1;var i={prival:parseInt(e[1],10)};if(e[2]&&(i.versio=parseInt(e[2],10)),i.prival&&i.prival>=0&&i.prival<=191)i.facilityID=parseInt(i.prival/8,10),i.severityID=i.prival-8*i.facilityID,i.facilityID<24&&i.severityID<8&&(i.facility=r[i.facilityID],i.severity=n[i.severityID]);else if(i.prival>=191)return!1;return i}},a.prototype.parseTimeStamp=function(t){if("string"==typeof t){var e;return(e=this.parse8601(t))?e:(e=this.parseRfc3339(t))?e:(e=this.parseBsdTime(t),e?e:e)}},a.prototype.parseRfc3339=function(t){var e,r,n,i=1,o=t.split("T");if(o.length<2)return!1;var s=o[0].split("-"),a=o[1].split(":"),u=a[a.length-1];if(offsetFieldIdentifier=u.charAt(u.length-1),"Z"===offsetFieldIdentifier)e=0,a[a.length-1]=u.substr(0,u.length-2);else{if(-1!=u[u.length-1].indexOf("+")?(r="+",i=1):(r="-",i=-1),n=u.split(r),n.length<2)return!1;a[a.length-1]=n[0],n=n[1].split(":"),e=60*n[0]+n[1],e=60*e*1e3}var l=new Date(Date.UTC(s[0],s[1]-1,s[2],a[0],a[1],a[2])+e*i);return l},a.prototype.parseBsdTime=function(t){var e,r=t.match(/(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+(\d{1,2})\s+(\d{2}):(\d{2}):(\d{2})/);return r&&(currDate=new Date,e=new Date(currDate.getUTCFullYear(),o[r[1]],r[2],r[3],r[4],r[5])),e},a.prototype.parse8601=function(t){var e=new Date(Date.parse(t));if("Invalid Date"!==e.toString())return e},a.prototype.parseStructure=function(t){for(var e={},r=0,n=!1,i="",o="",s="",a=0;a<t.length;a++){var u=t[a];switch(r){case 0:r="["===u?1:0;break;case 1:" "!=u?i+=u:(e[i]={},r=2);break;case 2:"="===u?(e[i][o]="",r=3):"]"===u?(i="",r=0):" "!=u&&(o+=u);break;case 3:r='"'===u?4:null;break;case 4:"\\"!==u||n?'"'!==u||n?(s+=u,n=!1):(e[i][o]=s,o="",s="",r=2):n=!0}}return e},a.prototype.parseSignedBlock=function(t){if("object"!=typeof t)return!1;var r={},n={};if(t.structuredData&&t.structuredData.ssign)r=t.structuredData.ssign;else if(t.ssign)r=t.ssign;else{if(!t.VER)return!1;r=t}var i=r.VER.match(/^(\d{2})(\d|\w)(\d)$/);if(null!==i&&(n.version=i[1],n.hashAlgorithm=parseInt(i[2],10),n.hashAlgoString=s.hashAlgorithm[n.hashAlgorithm],n.sigScheme=parseInt(i[3],10)),n.rebootSessionID=parseInt(r.RSID,10),n.signatureGroup=parseInt(r.SG,10),n.signaturePriority=parseInt(r.SPRI,10),n.globalBlockCount=parseInt(r.GBC,10),n.firstMsgNumber=parseInt(r.FMN,10),n.msgCount=parseInt(r.CNT,10),n.hashBlock=r.HB.split(/\s/),"function"==typeof e){for(var o in n.hashBlock)n.hashBlock[o]=new e(n.hashBlock[o],encoding="base64");n.thisSignature=new e(r.SIGN,encoding="base64")}else n.thisSignature=r.SIGN;return n},a.prototype.parseSignedCertificate=function(t){if("object"!=typeof t)return!1;var r={},n={};if(t.structuredData&&t.structuredData["ssign-cert"])r=t.structuredData["ssign-cert"];else if(t["ssign-cert"])r=t["ssign-cert"];else{if(!t.VER)return!1;r=t}var i=r.VER.match(/^(\d{2})(\d|\w)(\d)$/);null!==i&&(n.version=i[1],n.hashAlgorithm=parseInt(i[2],10),n.hashAlgoString=s.hashAlgorithm[n.hashAlgorithm],n.sigScheme=parseInt(i[3],10)),n.rebootSessionID=parseInt(r.RSID,10),n.signatureGroup=parseInt(r.SG,10),n.signaturePriority=parseInt(r.SPRI,10),n.totalPayloadLength=parseInt(r.TPBL,10),n.payloadIndex=parseInt(r.INDEX,10),n.fragmentLength=parseInt(r.FLEN,10);var o=r.FRAG.split(/\s/);return n.payloadTimestamp=this.parseTimeStamp(o[0]),n.payloadType=o[1],n.payloadName=s.keyBlobType[o[1]],"function"==typeof e?(n.keyBlob=new e(o[2],encoding="base64"),n.thisSignature=new e(r.SIGN,encoding="base64")):(n.keyBlob=o[2],n.thisSignature=r.SIGN),n},t.exports=new a}).call(e,r(19).Buffer)},function(t,e,r){(function(t,n){/*!
  	 * The buffer module from node.js, for the browser.
  	 *
  	 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
  	 * @license  MIT
  	 */
  "use strict";function i(){function t(){}try{var e=new Uint8Array(1);return e.foo=function(){return 42},e.constructor=t,42===e.foo()&&e.constructor===t&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(r){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(e){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof e?s(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):u(this,e)):arguments.length>1?new t(e,arguments[1]):new t(e)}function s(e,r){if(e=d(e,0>r?0:0|v(r)),!t.TYPED_ARRAY_SUPPORT)for(var n=0;r>n;n++)e[n]=0;return e}function a(t,e,r){"string"==typeof r&&""!==r||(r="utf8");var n=0|m(e,r);return t=d(t,n),t.write(e,r),t}function u(e,r){if(t.isBuffer(r))return l(e,r);if($(r))return c(e,r);if(null==r)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(r.buffer instanceof ArrayBuffer)return f(e,r);if(r instanceof ArrayBuffer)return h(e,r)}return r.length?p(e,r):g(e,r)}function l(t,e){var r=0|v(e.length);return t=d(t,r),e.copy(t,0,0,r),t}function c(t,e){var r=0|v(e.length);t=d(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function f(t,e){var r=0|v(e.length);t=d(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function h(e,r){return t.TYPED_ARRAY_SUPPORT?(r.byteLength,e=t._augment(new Uint8Array(r))):e=f(e,new Uint8Array(r)),e}function p(t,e){var r=0|v(e.length);t=d(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function g(t,e){var r,n=0;"Buffer"===e.type&&$(e.data)&&(r=e.data,n=0|v(r.length)),t=d(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function d(e,r){t.TYPED_ARRAY_SUPPORT?(e=t._augment(new Uint8Array(r)),e.__proto__=t.prototype):(e.length=r,e._isBuffer=!0);var n=0!==r&&r<=t.poolSize>>>1;return n&&(e.parent=Z),e}function v(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function y(e,r){if(!(this instanceof y))return new y(e,r);var n=new t(e,r);return delete n.parent,n}function m(t,e){"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(t).length;default:if(n)return j(t).length;e=(""+e).toLowerCase(),n=!0}}function w(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return U(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return D(this,e,r);case"binary":return B(this,e,r);case"base64":return _(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}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 Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function I(t,e,r,n){return H(j(e,t.length-r),t,r,n)}function T(t,e,r,n){return H(V(e),t,r,n)}function b(t,e,r,n){return T(t,e,r,n)}function R(t,e,r,n){return H(J(e),t,r,n)}function A(t,e,r,n){return H(z(e,t.length-r),t,r,n)}function _(t,e,r){return 0===e&&r===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var o=t[i],s=null,a=o>239?4:o>223?3:o>191?2:1;if(r>=i+a){var u,l,c,f;switch(a){case 1:128>o&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(f=(31&o)<<6|63&u,f>127&&(s=f));break;case 3:u=t[i+1],l=t[i+2],128===(192&u)&&128===(192&l)&&(f=(15&o)<<12|(63&u)<<6|63&l,f>2047&&(55296>f||f>57343)&&(s=f));break;case 4:u=t[i+1],l=t[i+2],c=t[i+3],128===(192&u)&&128===(192&l)&&128===(192&c)&&(f=(15&o)<<18|(63&u)<<12|(63&l)<<6|63&c,f>65535&&1114112>f&&(s=f))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return P(n)}function P(t){var e=t.length;if(W>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=W));return r}function D(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function B(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function U(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=G(t[o]);return i}function L(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 C(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function x(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(r>o||s>r)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function O(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function F(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function k(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function Y(t,e,r,n,i){return i||k(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,i){return i||k(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(t,e,r,n,52,8),r+8}function M(t){if(t=q(t).replace(tt,""),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 G(t){return 16>t?"0"+t.toString(16):t.toString(16)}function j(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(56320>r){(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,128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))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 V(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function z(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function J(t){return K.toByteArray(M(t))}function H(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}var K=r(20),X=r(21),$=r(22);e.Buffer=t,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50,t.poolSize=8192;var Z={};t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:i(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),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,s=Math.min(n,i);s>o&&e[o]===r[o];)++o;return o!==s&&(n=e[o],i=r[o]),i>n?-1:n>i?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!$(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new t(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;n++)r+=e[n].length;var i=new t(r),o=0;for(n=0;n<e.length;n++){var s=e[n];s.copy(i,o),o+=s.length}return i},t.byteLength=m,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):w.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0: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){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:t.compare(this,e)},t.prototype.indexOf=function(e,r){function n(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r>>=0,0===this.length)return-1;if(r>=this.length)return-1;if(0>r&&(r=Math.max(this.length+r,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,r);if(t.isBuffer(e))return n(this,e,r);if("number"==typeof e)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,r):n(this,[e],r);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},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))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return E(this,t,e,r);case"utf8":case"utf-8":return I(this,t,e,r);case"ascii":return T(this,t,e,r);case"binary":return b(this,t,e,r);case"base64":return R(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var W=4096;t.prototype.slice=function(e,r){var n=this.length;e=~~e,r=void 0===r?n:~~r,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>r?(r+=n,0>r&&(r=0)):r>n&&(r=n),e>r&&(r=e);var i;if(t.TYPED_ARRAY_SUPPORT)i=t._augment(this.subarray(e,r));else{var o=r-e;i=new t(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+e]}return i.length&&(i.parent=this.parent||this),i},t.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||C(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|t,e=0|e,r||C(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||C(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||C(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||C(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|t,e=0|e,r||C(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|t,e=0|e,r||C(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||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){e||C(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||C(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||C(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||C(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||C(t,4,this.length),X.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),X.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),X.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),X.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||x(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||x(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(e,r,n){return e=+e,r=0|r,n||x(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|r,n||x(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):O(this,e,r,!0),r+2},t.prototype.writeUInt16BE=function(e,r,n){return e=+e,r=0|r,n||x(this,e,r,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):O(this,e,r,!1),r+2},t.prototype.writeUInt32LE=function(e,r,n){return e=+e,r=0|r,n||x(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):F(this,e,r,!0),r+4},t.prototype.writeUInt32BE=function(e,r,n){return e=+e,r=0|r,n||x(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):F(this,e,r,!1),r+4},t.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}var o=0,s=1,a=0>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>0)-a&255;return e+r},t.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=(t/s>>0)-a&255;return e+r},t.prototype.writeInt8=function(e,r,n){return e=+e,r=0|r,n||x(this,e,r,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[r]=255&e,r+1},t.prototype.writeInt16LE=function(e,r,n){return e=+e,r=0|r,n||x(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):O(this,e,r,!0),r+2},t.prototype.writeInt16BE=function(e,r,n){return e=+e,r=0|r,n||x(this,e,r,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):O(this,e,r,!1),r+2},t.prototype.writeInt32LE=function(e,r,n){return e=+e,r=0|r,n||x(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):F(this,e,r,!0),r+4},t.prototype.writeInt32BE=function(e,r,n){return e=+e,r=0|r,n||x(this,e,r,4,2147483647,-2147483648),0>e&&(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):F(this,e,r,!1),r+4},t.prototype.writeFloatLE=function(t,e,r){return Y(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return Y(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return N(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&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>r)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)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,s=i-n;if(this===e&&r>n&&i>r)for(o=s-1;o>=0;o--)e[o+r]=this[o+n];else if(1e3>s||!t.TYPED_ARRAY_SUPPORT)for(o=0;s>o;o++)e[o+r]=this[o+n];else e._set(this.subarray(n,n+s),r);return s},t.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=j(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var e=new Uint8Array(this.length),r=0,n=e.length;n>r;r+=1)e[r]=this[r];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Q=t.prototype;t._augment=function(e){return e.constructor=t,e._isBuffer=!0,e._set=e.set,e.get=Q.get,e.set=Q.set,e.write=Q.write,e.toString=Q.toString,e.toLocaleString=Q.toString,e.toJSON=Q.toJSON,e.equals=Q.equals,e.compare=Q.compare,e.indexOf=Q.indexOf,e.copy=Q.copy,e.slice=Q.slice,e.readUIntLE=Q.readUIntLE,e.readUIntBE=Q.readUIntBE,e.readUInt8=Q.readUInt8,e.readUInt16LE=Q.readUInt16LE,e.readUInt16BE=Q.readUInt16BE,e.readUInt32LE=Q.readUInt32LE,e.readUInt32BE=Q.readUInt32BE,e.readIntLE=Q.readIntLE,e.readIntBE=Q.readIntBE,e.readInt8=Q.readInt8,e.readInt16LE=Q.readInt16LE,e.readInt16BE=Q.readInt16BE,e.readInt32LE=Q.readInt32LE,e.readInt32BE=Q.readInt32BE,e.readFloatLE=Q.readFloatLE,e.readFloatBE=Q.readFloatBE,e.readDoubleLE=Q.readDoubleLE,e.readDoubleBE=Q.readDoubleBE,e.writeUInt8=Q.writeUInt8,e.writeUIntLE=Q.writeUIntLE,e.writeUIntBE=Q.writeUIntBE,e.writeUInt16LE=Q.writeUInt16LE,e.writeUInt16BE=Q.writeUInt16BE,e.writeUInt32LE=Q.writeUInt32LE,e.writeUInt32BE=Q.writeUInt32BE,e.writeIntLE=Q.writeIntLE,e.writeIntBE=Q.writeIntBE,e.writeInt8=Q.writeInt8,e.writeInt16LE=Q.writeInt16LE,e.writeInt16BE=Q.writeInt16BE,e.writeInt32LE=Q.writeInt32LE,e.writeInt32BE=Q.writeInt32BE,e.writeFloatLE=Q.writeFloatLE,e.writeFloatBE=Q.writeFloatBE,e.writeDoubleLE=Q.writeDoubleLE,e.writeDoubleBE=Q.writeDoubleBE,e.fill=Q.fill,e.inspect=Q.inspect,e.toArrayBuffer=Q.toArrayBuffer,e};var tt=/[^+\/0-9A-Za-z-_]/g}).call(e,r(19).Buffer,function(){return this}())},function(t,e){t.exports=require("base64-js")},function(t,e){t.exports=require("ieee754")},function(t,e){t.exports=require("isarray")},function(t,e){t.exports=require("util")}]);