UNPKG

394 kBJavaScriptView Raw
1!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).AppInfoParser=t()}}(function(){return function(){return function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var f=new Error("Cannot find module '"+a+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[a]={exports:{}};e[a][0].call(l.exports,function(t){return i(e[a][1][t]||t)},l,l.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}}()({1:[function(t,e,r){"use strict";function n(t){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var i=f(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?u(t):e}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var l=t("./zip"),c=t("./utils"),h=c.mapInfoResource,p=c.findApkIconPath,d=c.getBase64FromBuffer,g=/^androidmanifest\.xml$/,y=/^resources\.arsc$/,b=t("./xml-parser/manifest"),v=t("./resource-finder"),w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(c,l);var e,r,n,f=a(c);function c(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),u(e=f.call(this,t))instanceof c?e:s(e,new c(t))}return e=c,(r=[{key:"parse",value:function(){var t=this;return new Promise(function(e,r){t.getEntries([g,y]).then(function(r){if(!r[g])throw new Error("AndroidManifest.xml can't be found.");var n,i=t._parseManifest(r[g]);if(r[y]){n=t._parseResourceMap(r[y]),i=h(i,n);var o=p(i);o?t.getEntry(o).then(function(t){i.icon=t?d(t):null,e(i)}).catch(function(t){i.icon=null,e(i),console.warn("[Warning] failed to parse icon: ",t)}):(i.icon=null,e(i))}else e(i)}).catch(function(t){r(t)})})}},{key:"_parseManifest",value:function(t){try{return new b(t,{ignore:["application.activity","application.service","application.receiver","application.provider","permission-group"]}).parse()}catch(t){throw new Error("Parse AndroidManifest.xml error: ",t)}}},{key:"_parseResourceMap",value:function(t){try{return(new v).processResourceTable(t)}catch(t){throw new Error("Parser resources.arsc error: "+t)}}}])&&i(e.prototype,r),n&&i(e,n),c}();e.exports=w},{"./resource-finder":4,"./utils":5,"./xml-parser/manifest":7,"./zip":8}],2:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var i=t("./apk"),o=t("./ipa"),a=["ipa","apk"],s=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e)throw new Error("Param miss: file(file's path in Node, instance of File or Blob in browser).");var r=(e.name||e).split("."),n=r[r.length-1].toLowerCase();if(!a.includes(n))throw new Error("Unsupported file type, only support .ipa or .apk file.");switch(this.file=e,n){case"ipa":this.parser=new o(this.file);break;case"apk":this.parser=new i(this.file)}}var e,r,s;return e=t,(r=[{key:"parse",value:function(){return this.parser.parse()}}])&&n(e.prototype,r),s&&n(e,s),t}();e.exports=s},{"./apk":1,"./ipa":3}],3:[function(t,e,r){"use strict";function n(t){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var r,n=c(t);if(e){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?l(t):e}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function c(t){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=t("plist").parse,p=t("bplist-parser").parseBuffer,d=t("cgbi-to-png"),g=t("./zip"),y=t("./utils"),b=y.findIpaIconPath,v=y.getBase64FromBuffer,w=y.isBrowser,m=new RegExp("payload/.+?.app/info.plist$","i"),_=/payload\/.+?\.app\/embedded.mobileprovision/,E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(c,g);var e,r,n,o=u(c);function c(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),l(e=o.call(this,t))instanceof c?e:f(e,new c(t))}return e=c,(r=[{key:"parse",value:function(){var t=this;return new Promise(function(e,r){t.getEntries([m,_]).then(function(n){if(!n[m])throw new Error("Info.plist can't be found.");var o=t._parsePlist(n[m]),a=t._parseProvision(n[_]);o.mobileProvision=a;var s=new RegExp(b(o).toLowerCase());t.getEntry(s).then(function(t){try{o.icon=t?v(d.revert(t)):null}catch(e){w()?o.icon=t?v(window.btoa(String.fromCharCode.apply(String,i(t)))):null:(o.icon=null,console.warn("[Warning] failed to parse icon: ",e))}e(o)}).catch(function(t){r(t)})}).catch(function(t){r(t)})})}},{key:"_parsePlist",value:function(t){var e,r=t[0];if(60===r||"<"===r||239===r)e=h(t.toString());else{if(98!==r)throw new Error("Unknown plist buffer type.");e=p(t)[0]}return e}},{key:"_parseProvision",value:function(t){var e={};if(t){var r=t.toString("utf-8"),n=r.indexOf("<?xml"),i=r.indexOf("</plist>");(r=r.slice(n,i+8))&&(e=h(r))}return e}}])&&a(e.prototype,r),n&&a(e,n),c}();e.exports=E},{"./utils":5,"./zip":8,"bplist-parser":15,"cgbi-to-png":24,plist:74}],4:[function(t,e,r){"use strict";var n=t("bytebuffer");function i(){this.valueStringPool=null,this.typeStringPool=null,this.keyStringPool=null,this.package_id=0,this.responseMap={},this.entryMap={}}i.readBytes=function(t,e){for(var r=new Uint8Array(e),i=0;i<e;i++)r[i]=t.readUint8();return n.wrap(r,"binary",!0)},i.prototype.processResourceTable=function(t){var e,r,i=n.wrap(t,"binary",!0),o=i.readShort(),a=i.readShort(),s=i.readInt(),u=i.readInt();if(2!=o)throw new Error("No RES_TABLE_TYPE found!");if(s!=i.limit)throw new Error("The buffer size not matches to the resource table size.");i.offset=a;for(var f=0,l=0;;){var c,h,p;try{c=i.offset,h=i.readShort(),i.readShort(),p=i.readInt()}catch(t){break}if(1==h)0==f&&(e=new n(p),i.offset=c,i.prependTo(e),(r=n.wrap(e,"binary",!0)).LE(),this.valueStringPool=this.processStringPool(r)),f++;else{if(512!=h)throw new Error("Unsupported type");e=new n(p),i.offset=c,i.prependTo(e),(r=n.wrap(e,"binary",!0)).LE(),this.processPackage(r),l++}if(i.offset=c+p,!i.remaining())break}if(1!=f)throw new Error("More than 1 string pool found!");if(l!=u)throw new Error("Real package count not equals the declared count.");return this.responseMap},i.prototype.processPackage=function(t){t.readShort();var e=t.readShort(),r=(t.readInt(),t.readInt());this.package_id=r;for(var n=0;n<256;++n)t.readUint8();var o=t.readInt(),a=(t.readInt(),t.readInt());t.readInt();if(o!=e)throw new Error("TypeStrings must immediately following the package structure header.");var s=t.offset;t.offset=o;var u=i.readBytes(t,t.limit-t.offset);t.offset=s,this.typeStringPool=this.processStringPool(u),t.offset=a;t.readShort(),t.readShort();var f=t.readInt();s=t.offset,t.offset=a;var l=i.readBytes(t,t.limit-t.offset);t.offset=s,this.keyStringPool=this.processStringPool(l);var c;for(t.offset=a+f;;){var h=t.offset;try{var p=t.readShort(),d=(t.readShort(),t.readInt())}catch(t){break}if(514==p?(t.offset=h,c=i.readBytes(t,d),this.processTypeSpec(c),0):513==p&&(t.offset=h,c=i.readBytes(t,d),this.processType(c),0),0==d)break;if(t.offset=h+d,!t.remaining())break}},i.prototype.processType=function(t){t.readShort();var e=t.readShort(),r=(t.readInt(),t.readByte()),n=(t.readByte(),t.readShort(),t.readInt()),i=t.readInt(),o={};t.readInt();if(t.offset=e,e+4*n!=i)throw new Error("HeaderSize, entryCount and entriesStart are not valid.");for(var a=new Array(n),s=0;s<n;++s)a[s]=t.readInt();for(s=0;s<n;++s)if(-1!=a[s]){var u,f,l,c,h=this.package_id<<24|r<<16|s;t.offset;try{t.readShort(),u=t.readShort(),f=t.readInt()}catch(t){break}if(0==(1&u)){t.readShort(),t.readByte(),l=t.readByte(),c=t.readInt();var p=Number(h).toString(16),d=this.keyStringPool[f],g=null;0;var y=parseInt(p,16),b=this.entryMap[y];if(null==b&&(b=[]),b.push(d),this.entryMap[y]=b,3==l)g=this.valueStringPool[c];else if(1==l){Number(c).toString(16);o[p]=c}else g=""+c;this.putIntoMap("@"+p,g)}else{t.readInt();for(var v=t.readInt(),w=0;w<v;++w){t.readInt();t.readShort(),t.readByte(),l=t.readByte(),c=t.readInt()}0}}for(var m in o){var _=this.responseMap["@"+Number(o[m]).toString(16).toUpperCase()];if(null!=_&&Object.keys(_).length<1e3)for(var E in _)this.putIntoMap("@"+m,E)}},i.prototype.processStringPool=function(t){t.readShort(),t.readShort(),t.readInt();for(var e,r,o=t.readInt(),a=(t.readInt(),t.readInt()),s=t.readInt(),u=(t.readInt(),0!=(256&a)),f=new Array(o),l=0;l<o;++l)f[l]=t.readInt();var c=new Array(o);for(l=0;l<o;++l){var h=s+f[l];if(t.offset=h,c[l]="",u){0!=(128&(e=t.readUint8()))&&(e=((127&e)<<8)+t.readUint8());var p=t.readUint8();if(0!=(128&p)&&(p=((127&p)<<8)+t.readUint8()),p>0){r=i.readBytes(t,p);try{c[l]=n.wrap(r,"utf8",!0).toString("utf8")}catch(t){0}}else c[l]=""}else if(0!=(32768&(e=t.readUint16()))&&(e=((32767&e)<<16)+t.readUint16()),e>0){var d=2*e;r=i.readBytes(t,d);try{c[l]=n.wrap(r,"utf8",!0).toString("utf8")}catch(t){0}}0}return c},i.prototype.processTypeSpec=function(t){t.readShort(),t.readShort(),t.readInt(),t.readByte(),t.readByte(),t.readShort();var e=t.readInt();for(var r=new Array(e),n=0;n<e;++n)r[n]=t.readInt()},i.prototype.putIntoMap=function(t,e){null==this.responseMap[t.toUpperCase()]&&(this.responseMap[t.toUpperCase()]=[]),this.responseMap[t.toUpperCase()].push(e)},e.exports=i},{bytebuffer:22}],5:[function(t,e,r){"use strict";function n(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function i(t){return"array"===n(t)}function o(t){return"object"===n(t)}function a(t){return null===t||["boolean","number","string","undefined"].includes(n(t))}e.exports={isArray:i,isObject:o,isPrimitive:a,isBrowser:function(){return"undefined"!=typeof window&&"undefined"!=typeof document},mapInfoResource:function(t,e){return r(t),t;function r(t){for(var f in t)i(t[f])?n(t[f]):o(t[f])?r(t[f]):a(t[f])&&s(t[f])&&(t[f]=e[u(t[f])])}function n(t){for(var f=t.length,l=0;l<f;l++)i(t[l])?n(t[l]):o(t[l])?r(t[l]):a(t[l])&&s(t[l])&&(t[l]=e[u(t[l])])}function s(t){return!!t&&("string"!=typeof t&&(t=t.toString()),0===t.indexOf("resourceId:"))}function u(t){return"@"+t.replace("resourceId:0x","").toUpperCase()}},findApkIconPath:function(t){if(!t.application.icon||!t.application.icon.splice)return"";var e={mdpi:48,hdpi:72,xhdpi:96,xxdpi:144,xxxhdpi:192},r={},n={dpi:120,icon:""},i=function(i){t.application.icon.some(function(t){if(t&&-1!==t.indexOf(i))return r["application-icon-"+e[i]]=t,!0}),r["application-icon-"+e[i]]&&e[i]>=n.dpi&&(n.dpi=e[i],n.icon=r["application-icon-"+e[i]])};for(var o in e)i(o);return 0!==Object.keys(r).length&&n.icon||(n.dpi=120,n.icon=t.application.icon[0]||"",r["applicataion-icon-120"]=n.icon),n.icon},findIpaIconPath:function(t){return t.CFBundleIcons&&t.CFBundleIcons.CFBundlePrimaryIcon&&t.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles&&t.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles.length?t.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles[t.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles.length-1]:t.CFBundleIconFiles&&t.CFBundleIconFiles.length?t.CFBundleIconFiles[t.CFBundleIconFiles.length-1]:".app/Icon.png"},getBase64FromBuffer:function(t){return"data:image/png;base64,"+t.toString("base64")},decodeNullUnicode:function(t){return"string"==typeof t&&(t=t.replace(/\u0000/g,"")),t}}},{}],6:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var i=1,o=2,a=4,s=0,u=1,f=3,l=256,c=257,h=258,p=259,d=260,g=384,y=1,b=256,v=1,w=0,m=1,_=4,E=5,x=3,k=0,I=2,S=5,T=6,A=18,N=30,L=28,D=31,M=29,O=16,U=17,B=0,C=1,R=3,z=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.buffer=e,this.cursor=0,this.strings=[],this.resources=[],this.document=null,this.parent=null,this.stack=[],this.debug=r.debug||!1}var e,r,z;return e=t,(r=[{key:"readU8",value:function(){this.debug&&console.group("readU8"),this.debug&&console.debug("cursor:",this.cursor);var t=this.buffer[this.cursor];return this.debug&&console.debug("value:",t),this.cursor+=1,this.debug&&console.groupEnd(),t}},{key:"readU16",value:function(){this.debug&&console.group("readU16"),this.debug&&console.debug("cursor:",this.cursor);var t=this.buffer.readUInt16LE(this.cursor);return this.debug&&console.debug("value:",t),this.cursor+=2,this.debug&&console.groupEnd(),t}},{key:"readS32",value:function(){this.debug&&console.group("readS32"),this.debug&&console.debug("cursor:",this.cursor);var t=this.buffer.readInt32LE(this.cursor);return this.debug&&console.debug("value:",t),this.cursor+=4,this.debug&&console.groupEnd(),t}},{key:"readU32",value:function(){this.debug&&console.group("readU32"),this.debug&&console.debug("cursor:",this.cursor);var t=this.buffer.readUInt32LE(this.cursor);return this.debug&&console.debug("value:",t),this.cursor+=4,this.debug&&console.groupEnd(),t}},{key:"readLength8",value:function(){this.debug&&console.group("readLength8");var t=this.readU8();return 128&t&&(t=(127&t)<<8,t+=this.readU8()),this.debug&&console.debug("length:",t),this.debug&&console.groupEnd(),t}},{key:"readLength16",value:function(){this.debug&&console.group("readLength16");var t=this.readU16();return 32768&t&&(t=(32767&t)<<16,t+=this.readU16()),this.debug&&console.debug("length:",t),this.debug&&console.groupEnd(),t}},{key:"readDimension",value:function(){this.debug&&console.group("readDimension");var t={value:null,unit:null,rawUnit:null},e=this.readU32(),r=255&t.value;switch(t.value=e>>8,t.rawUnit=r,r){case E:t.unit="mm";break;case k:t.unit="px";break;case v:t.unit="dp";break;case I:t.unit="sp";break;case x:t.unit="pt";break;case _:t.unit="in"}return this.debug&&console.groupEnd(),t}},{key:"readFraction",value:function(){this.debug&&console.group("readFraction");var t={value:null,type:null,rawType:null},e=this.readU32(),r=15&e;switch(t.value=this.convertIntToFloat(e>>4),t.rawType=r,r){case w:t.type="%";break;case m:t.type="%p"}return this.debug&&console.groupEnd(),t}},{key:"readHex24",value:function(){this.debug&&console.group("readHex24");var t=(16777215&this.readU32()).toString(16);return this.debug&&console.groupEnd(),t}},{key:"readHex32",value:function(){this.debug&&console.group("readHex32");var t=this.readU32().toString(16);return this.debug&&console.groupEnd(),t}},{key:"readTypedValue",value:function(){this.debug&&console.group("readTypedValue");var t={value:null,type:null,rawType:null},e=this.cursor,r=this.readU16();this.readU8();var n=this.readU8();switch(0===r&&(r=8),t.rawType=n,n){case O:t.value=this.readS32(),t.type="int_dec";break;case U:t.value=this.readS32(),t.type="int_hex";break;case R:var i=this.readS32();t.value=i>0?this.strings[i]:"",t.type="string";break;case C:var o=this.readU32();t.value="resourceId:0x".concat(o.toString(16)),t.type="reference";break;case A:t.value=0!==this.readS32(),t.type="boolean";break;case B:this.readU32(),t.value=null,t.type="null";break;case M:t.value=this.readHex24(),t.type="rgb8";break;case D:t.value=this.readHex24(),t.type="rgb4";break;case L:t.value=this.readHex32(),t.type="argb8";break;case N:t.value=this.readHex32(),t.type="argb4";break;case S:t.value=this.readDimension(),t.type="dimension";break;case T:t.value=this.readFraction(),t.type="fraction";break;default:var a=n.toString(16);console.debug("Not sure what to do with typed value of type 0x".concat(a,", falling back to reading an uint32.")),t.value=this.readU32(),t.type="unknown"}var s=e+r;if(this.cursor!==s){var u=n.toString(16),f=s-this.cursor;console.debug("Cursor is off by ".concat(f," bytes at ").concat(this.cursor," at supposed end of typed value of type 0x").concat(u,". The typed value started at offset ").concat(e," and is supposed to end at offset ").concat(s,". Ignoring the rest of the value.")),this.cursor=s}return this.debug&&console.groupEnd(),t}},{key:"convertIntToFloat",value:function(t){var e=new ArrayBuffer(4);return new Int32Array(e)[0]=t,new Float32Array(e)[0]}},{key:"readString",value:function(t){switch(this.debug&&console.group("readString",t),t){case"utf-8":var e=this.readLength8(t);this.debug&&console.debug("stringLength:",e);var r=this.readLength8(t);this.debug&&console.debug("byteLength:",r);var n=this.buffer.toString(t,this.cursor,this.cursor+=r);return this.debug&&console.debug("value:",n),this.debug&&console.groupEnd(),n;case"ucs2":return e=this.readLength16(t),this.debug&&console.debug("stringLength:",e),r=2*e,this.debug&&console.debug("byteLength:",r),n=this.buffer.toString(t,this.cursor,this.cursor+=r),this.debug&&console.debug("value:",n),this.debug&&console.groupEnd(),n;default:throw new Error("Unsupported encoding '".concat(t,"'"))}}},{key:"readChunkHeader",value:function(){this.debug&&console.group("readChunkHeader");var t={startOffset:this.cursor,chunkType:this.readU16(),headerSize:this.readU16(),chunkSize:this.readU32()};return this.debug&&console.debug("startOffset:",t.startOffset),this.debug&&console.debug("chunkType:",t.chunkType),this.debug&&console.debug("headerSize:",t.headerSize),this.debug&&console.debug("chunkSize:",t.chunkSize),this.debug&&console.groupEnd(),t}},{key:"readStringPool",value:function(t){if(this.debug&&console.group("readStringPool"),t.stringCount=this.readU32(),this.debug&&console.debug("stringCount:",t.stringCount),t.styleCount=this.readU32(),this.debug&&console.debug("styleCount:",t.styleCount),t.flags=this.readU32(),this.debug&&console.debug("flags:",t.flags),t.stringsStart=this.readU32(),this.debug&&console.debug("stringsStart:",t.stringsStart),t.stylesStart=this.readU32(),this.debug&&console.debug("stylesStart:",t.stylesStart),t.chunkType!==u)throw new Error("Invalid string pool header");for(var e=[],r=0,n=t.stringCount;r<n;++r)this.debug&&console.debug("offset:",r),e.push(this.readU32());var i=(t.flags&y)===y;this.debug&&console.debug("sorted:",i);var o=(t.flags&b)===b?"utf-8":"ucs2";this.debug&&console.debug("encoding:",o);var a=t.startOffset+t.stringsStart;this.cursor=a;for(var s=0,f=t.stringCount;s<f;++s)this.debug&&console.debug("string:",s),this.debug&&console.debug("offset:",e[s]),this.cursor=a+e[s],this.strings.push(this.readString(o));return this.cursor=t.startOffset+t.chunkSize,this.debug&&console.groupEnd(),null}},{key:"readResourceMap",value:function(t){this.debug&&console.group("readResourceMap");for(var e=Math.floor((t.chunkSize-t.headerSize)/4),r=0;r<e;++r)this.resources.push(this.readU32());return this.debug&&console.groupEnd(),null}},{key:"readXmlNamespaceStart",value:function(){return this.debug&&console.group("readXmlNamespaceStart"),this.readU32(),this.readU32(),this.readS32(),this.readS32(),this.debug&&console.groupEnd(),null}},{key:"readXmlNamespaceEnd",value:function(){return this.debug&&console.group("readXmlNamespaceEnd"),this.readU32(),this.readU32(),this.readS32(),this.readS32(),this.debug&&console.groupEnd(),null}},{key:"readXmlElementStart",value:function(){this.debug&&console.group("readXmlElementStart");var t={namespaceURI:null,nodeType:i,nodeName:null,attributes:[],childNodes:[]};this.readU32(),this.readU32();var e=this.readS32(),r=this.readS32();e>0&&(t.namespaceURI=this.strings[e]),t.nodeName=this.strings[r],this.readU16(),this.readU16();var n=this.readU16();this.readU16(),this.readU16(),this.readU16();for(var o=0;o<n;++o)t.attributes.push(this.readXmlAttribute());return this.document?(this.parent.childNodes.push(t),this.parent=t):this.document=this.parent=t,this.stack.push(t),this.debug&&console.groupEnd(),t}},{key:"readXmlAttribute",value:function(){this.debug&&console.group("readXmlAttribute");var t={namespaceURI:null,nodeType:o,nodeName:null,name:null,value:null,typedValue:null},e=this.readS32(),r=this.readS32(),n=this.readS32();return e>0&&(t.namespaceURI=this.strings[e]),t.nodeName=t.name=this.strings[r],n>0&&("versionName"===t.name&&(this.strings[n]=this.strings[n].replace(/[^\d\w-.]/g,"")),t.value=this.strings[n]),t.typedValue=this.readTypedValue(),this.debug&&console.groupEnd(),t}},{key:"readXmlElementEnd",value:function(){return this.debug&&console.group("readXmlCData"),this.readU32(),this.readU32(),this.readS32(),this.readS32(),this.stack.pop(),this.parent=this.stack[this.stack.length-1],this.debug&&console.groupEnd(),null}},{key:"readXmlCData",value:function(){this.debug&&console.group("readXmlCData");var t={namespaceURI:null,nodeType:a,nodeName:"#cdata",data:null,typedValue:null};this.readU32(),this.readU32();var e=this.readS32();return e>0&&(t.data=this.strings[e]),t.typedValue=this.readTypedValue(),this.parent.childNodes.push(t),this.debug&&console.groupEnd(),t}},{key:"readNull",value:function(t){return this.debug&&console.group("readNull"),this.cursor+=t.chunkSize-t.headerSize,this.debug&&console.groupEnd(),null}},{key:"parse",value:function(){if(this.debug&&console.group("BinaryXmlParser.parse"),this.readChunkHeader().chunkType!==f)throw new Error("Invalid XML header");for(;this.cursor<this.buffer.length;){this.debug&&console.group("chunk");var t=this.cursor,e=this.readChunkHeader();switch(e.chunkType){case u:this.readStringPool(e);break;case g:this.readResourceMap(e);break;case l:this.readXmlNamespaceStart(e);break;case c:this.readXmlNamespaceEnd(e);break;case h:this.readXmlElementStart(e);break;case p:this.readXmlElementEnd(e);break;case d:this.readXmlCData(e);break;case s:this.readNull(e);break;default:throw new Error("Unsupported chunk type '".concat(e.chunkType,"'"))}var r=t+e.chunkSize;if(this.cursor!==r){var n=r-this.cursor,i=e.chunkType.toString(16);console.debug("Cursor is off by ".concat(n," bytes at ").concat(this.cursor," at supposed end of chunk of type 0x").concat(i,". The chunk started at offset ").concat(t," and is supposed to end at offset ").concat(r,". Ignoring the rest of the chunk.")),this.cursor=r}this.debug&&console.groupEnd()}return this.debug&&console.groupEnd(),this.document}}])&&n(e.prototype,r),z&&n(e,z),t}();e.exports=z},{}],7:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var i=t("./binary"),o=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.buffer=e,this.xmlParser=new i(this.buffer,r)}var e,r,o;return e=t,(r=[{key:"collapseAttributes",value:function(t){for(var e=Object.create(null),r=0,n=Array.from(t.attributes);r<n.length;r++){var i=n[r];e[i.name]=i.typedValue.value}return e}},{key:"parseIntents",value:function(t,e){var r=this;return e.intentFilters=[],e.metaData=[],t.childNodes.forEach(function(t){switch(t.nodeName){case"intent-filter":var n=r.collapseAttributes(t);n.actions=[],n.categories=[],n.data=[],t.childNodes.forEach(function(t){switch(t.nodeName){case"action":n.actions.push(r.collapseAttributes(t));break;case"category":n.categories.push(r.collapseAttributes(t));break;case"data":n.data.push(r.collapseAttributes(t))}}),e.intentFilters.push(n);break;case"meta-data":e.metaData.push(r.collapseAttributes(t))}})}},{key:"parseApplication",value:function(t){var e=this,r=this.collapseAttributes(t);return r.activities=[],r.activityAliases=[],r.launcherActivities=[],r.services=[],r.receivers=[],r.providers=[],r.usesLibraries=[],r.metaData=[],t.childNodes.forEach(function(t){switch(t.nodeName){case"activity":var n=e.collapseAttributes(t);e.parseIntents(t,n),r.activities.push(n),e.isLauncherActivity(n)&&r.launcherActivities.push(n);break;case"activity-alias":var i=e.collapseAttributes(t);e.parseIntents(t,i),r.activityAliases.push(i),e.isLauncherActivity(i)&&r.launcherActivities.push(i);break;case"service":var o=e.collapseAttributes(t);e.parseIntents(t,o),r.services.push(o);break;case"receiver":var a=e.collapseAttributes(t);e.parseIntents(t,a),r.receivers.push(a);break;case"provider":var s=e.collapseAttributes(t);s.grantUriPermissions=[],s.metaData=[],s.pathPermissions=[],t.childNodes.forEach(function(t){switch(t.nodeName){case"grant-uri-permission":s.grantUriPermissions.push(e.collapseAttributes(t));break;case"meta-data":s.metaData.push(e.collapseAttributes(t));break;case"path-permission":s.pathPermissions.push(e.collapseAttributes(t))}}),r.providers.push(s);break;case"uses-library":r.usesLibraries.push(e.collapseAttributes(t));break;case"meta-data":r.metaData.push(e.collapseAttributes(t))}}),r}},{key:"isLauncherActivity",value:function(t){return t.intentFilters.some(function(t){return!!t.actions.some(function(t){return"android.intent.action.MAIN"===t.name})&&t.categories.some(function(t){return"android.intent.category.LAUNCHER"===t.name})})}},{key:"parse",value:function(){var t=this,e=this.xmlParser.parse(),r=this.collapseAttributes(e);return r.usesPermissions=[],r.usesPermissionsSDK23=[],r.permissions=[],r.permissionTrees=[],r.permissionGroups=[],r.instrumentation=null,r.usesSdk=null,r.usesConfiguration=null,r.usesFeatures=[],r.supportsScreens=null,r.compatibleScreens=[],r.supportsGlTextures=[],r.application=Object.create(null),e.childNodes.forEach(function(e){switch(e.nodeName){case"uses-permission":r.usesPermissions.push(t.collapseAttributes(e));break;case"uses-permission-sdk-23":r.usesPermissionsSDK23.push(t.collapseAttributes(e));break;case"permission":r.permissions.push(t.collapseAttributes(e));break;case"permission-tree":r.permissionTrees.push(t.collapseAttributes(e));break;case"permission-group":r.permissionGroups.push(t.collapseAttributes(e));break;case"instrumentation":r.instrumentation=t.collapseAttributes(e);break;case"uses-sdk":r.usesSdk=t.collapseAttributes(e);break;case"uses-configuration":r.usesConfiguration=t.collapseAttributes(e);break;case"uses-feature":r.usesFeatures.push(t.collapseAttributes(e));break;case"supports-screens":r.supportsScreens=t.collapseAttributes(e);break;case"compatible-screens":e.childNodes.forEach(function(e){return r.compatibleScreens.push(t.collapseAttributes(e))});break;case"supports-gl-texture":r.supportsGlTextures.push(t.collapseAttributes(e));break;case"application":r.application=t.parseApplication(e)}}),r}}])&&n(e.prototype,r),o&&n(e,o),t}();e.exports=o},{"./binary":6}],8:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var i=t("isomorphic-unzip"),o=t("./utils"),a=o.isBrowser,s=o.decodeNullUnicode,u=function(){function e(r){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),a()){if(!(r instanceof window.Blob||void 0!==r.size))throw new Error("Param error: [file] must be an instance of Blob or File in browser.");this.file=r}else{if("string"!=typeof r)throw new Error("Param error: [file] must be file path in Node.");this.file=t("path").resolve(r)}this.unzip=new i(this.file)}var r,o,u;return r=e,(o=[{key:"getEntries",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"buffer";return t=t.map(function(t){return s(t)}),new Promise(function(n,i){e.unzip.getBuffer(t,{type:r},function(t,e){t?i(t):n(e)})})}},{key:"getEntry",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"buffer";return t=s(t),new Promise(function(n,i){e.unzip.getBuffer([t],{type:r},function(e,r){e?i(e):n(r[t])})})}}])&&n(r.prototype,o),u&&n(r,u),e}();e.exports=u},{"./utils":5,"isomorphic-unzip":60,path:73}],9:[function(t,e,r){(function(r){(function(){"use strict";var n=t("object-assign");function i(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function o(t){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var a=t("util/"),s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,f="foo"===function(){}.name;function l(t){return Object.prototype.toString.call(t)}function c(t){return!o(t)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var h=e.exports=v,p=/\s*function\s+([^\(\s]*)\s*/;function d(t){if(a.isFunction(t)){if(f)return t.name;var e=t.toString().match(p);return e&&e[1]}}function g(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function y(t){if(f||!a.isFunction(t))return a.inspect(t);var e=d(t);return"[Function"+(e?": "+e:"")+"]"}function b(t,e,r,n,i){throw new h.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function v(t,e){t||b(t,!0,e,"==",h.ok)}function w(t,e,r,n){if(t===e)return!0;if(o(t)&&o(e))return 0===i(t,e);if(a.isDate(t)&&a.isDate(e))return t.getTime()===e.getTime();if(a.isRegExp(t)&&a.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(c(t)&&c(e)&&l(t)===l(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var s=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==s&&s===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null===t||void 0===t||null===e||void 0===e)return!1;if(a.isPrimitive(t)||a.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=m(t),o=m(e);if(i&&!o||!i&&o)return!1;if(i)return t=u.call(t),e=u.call(e),w(t,e,r);var s,f,l=x(t),c=x(e);if(l.length!==c.length)return!1;for(l.sort(),c.sort(),f=l.length-1;f>=0;f--)if(l[f]!==c[f])return!1;for(f=l.length-1;f>=0;f--)if(s=l[f],!w(t[s],e[s],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function m(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function E(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&b(i,r,"Missing expected exception"+n);var o="string"==typeof n,s=!t&&a.isError(i),u=!t&&i&&!r;if((s&&o&&_(i,r)||u)&&b(i,r,"Got unwanted exception"+n),t&&i&&r&&!_(i,r)||!t&&i)throw i}h.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=g(y((e=this).actual),128)+" "+e.operator+" "+g(y(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var i=n.stack,o=d(r),a=i.indexOf("\n"+o);if(a>=0){var s=i.indexOf("\n",a+1);i=i.substring(s+1)}this.stack=i}}},a.inherits(h.AssertionError,Error),h.fail=b,h.ok=v,h.equal=function(t,e,r){t!=e&&b(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&b(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){w(t,e,!1)||b(t,e,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,r){w(t,e,!0)||b(t,e,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,r){w(t,e,!1)&&b(t,e,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,r,n){w(e,r,!0)&&b(e,r,n,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,r){t!==e&&b(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&b(t,e,r,"!==",h.notStrictEqual)},h.throws=function(t,e,r){E(!0,t,e,r)},h.doesNotThrow=function(t,e,r){E(!1,t,e,r)},h.ifError=function(t){if(t)throw t},h.strict=n(function t(e,r){e||b(e,!0,r,"==",t)},h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var x=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":61,"util/":12}],10:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],11:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],12:[function(t,e,r){(function(e,n){(function(){var i=/%[sdj%]/g;r.format=function(t){if(!b(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(s(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(t).replace(i,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}}),u=n[r];r<o;u=n[++r])g(u)||!m(u)?a+=" "+u:a+=" "+s(u);return a},r.deprecate=function(t,i){if(v(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),o=!0}return t.apply(this,arguments)}};var o,a={};function s(t,e){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,t,n.depth)}function u(t,e){var r=s.styles[e];return r?"["+s.colors[r][0]+"m"+t+"["+s.colors[r][1]+"m":t}function f(t,e){return t}function l(t,e,n){if(t.customInspect&&e&&x(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return b(i)||(i=l(t,i,n)),i}var o=function(t,e){if(v(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(y(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,e);if(o)return o;var a=Object.keys(e),s=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),E(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(e);if(0===a.length){if(x(e)){var u=e.name?": "+e.name:"";return t.stylize("[Function"+u+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(_(e))return t.stylize(Date.prototype.toString.call(e),"date");if(E(e))return c(e)}var f,m="",k=!1,I=["{","}"];(p(e)&&(k=!0,I=["[","]"]),x(e))&&(m=" [Function"+(e.name?": "+e.name:"")+"]");return w(e)&&(m=" "+RegExp.prototype.toString.call(e)),_(e)&&(m=" "+Date.prototype.toUTCString.call(e)),E(e)&&(m=" "+c(e)),0!==a.length||k&&0!=e.length?n<0?w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),f=k?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a<s;++a)T(e,String(a))?o.push(h(t,e,r,n,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(t,e,r,n,i,!0))}),o}(t,e,n,s,a):a.map(function(r){return h(t,e,n,s,r,k)}),t.seen.pop(),function(t,e,r){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(f,m,I)):I[0]+m+I[1]}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),T(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=g(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function v(t){return void 0===t}function w(t){return m(t)&&"[object RegExp]"===k(t)}function m(t){return"object"==typeof t&&null!==t}function _(t){return m(t)&&"[object Date]"===k(t)}function E(t){return m(t)&&("[object Error]"===k(t)||t instanceof Error)}function x(t){return"function"==typeof t}function k(t){return Object.prototype.toString.call(t)}function I(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(v(o)&&(o=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!a[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var n=e.pid;a[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else a[t]=function(){};return a[t]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=y,r.isString=b,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=v,r.isRegExp=w,r.isObject=m,r.isDate=_,r.isError=E,r.isFunction=x,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t("./support/isBuffer");var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){var t,e;console.log("%s - %s",(t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":"),[t.getDate(),S[t.getMonth()],e].join(" ")),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!m(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":11,_process:78,inherits:10}],13:[function(t,e,r){"use strict";r.byteLength=function(t){var e=f(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){var e,r,n=f(t),a=n[0],s=n[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),l=0,c=s>0?a-4:a;for(r=0;r<c;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[l++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=0,s=r-i;a<s;a+=16383)o.push(l(t,a,a+16383>s?s:a+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function f(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var i,o,a=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],14:[function(t,e,r){var n=function(t){"use strict";var e=1e7,r=7,i=9007199254740992,o=p(i),a="0123456789abcdefghijklmnopqrstuvwxyz",s="function"==typeof BigInt;function u(t,e,r,n){return void 0===t?u[0]:void 0!==e&&(10!=+e||r)?q(t,e,r,n):G(t)}function f(t,e){this.value=t,this.sign=e,this.isSmall=!1}function l(t){this.value=t,this.sign=t<0,this.isSmall=!0}function c(t){this.value=t}function h(t){return-i<t&&t<i}function p(t){return t<1e7?[t]:t<1e14?[t%1e7,Math.floor(t/1e7)]:[t%1e7,Math.floor(t/1e7)%1e7,Math.floor(t/1e14)]}function d(t){g(t);var r=t.length;if(r<4&&L(t,o)<0)switch(r){case 0:return 0;case 1:return t[0];case 2:return t[0]+t[1]*e;default:return t[0]+(t[1]+t[2]*e)*e}return t}function g(t){for(var e=t.length;0===t[--e];);t.length=e+1}function y(t){for(var e=new Array(t),r=-1;++r<t;)e[r]=0;return e}function b(t){return t>0?Math.floor(t):Math.ceil(t)}function v(t,r){var n,i,o=t.length,a=r.length,s=new Array(o),u=0,f=e;for(i=0;i<a;i++)u=(n=t[i]+r[i]+u)>=f?1:0,s[i]=n-u*f;for(;i<o;)u=(n=t[i]+u)===f?1:0,s[i++]=n-u*f;return u>0&&s.push(u),s}function w(t,e){return t.length>=e.length?v(t,e):v(e,t)}function m(t,r){var n,i,o=t.length,a=new Array(o),s=e;for(i=0;i<o;i++)n=t[i]-s+r,r=Math.floor(n/s),a[i]=n-r*s,r+=1;for(;r>0;)a[i++]=r%s,r=Math.floor(r/s);return a}function _(t,r){var n,i,o=t.length,a=r.length,s=new Array(o),u=0,f=e;for(n=0;n<a;n++)(i=t[n]-u-r[n])<0?(i+=f,u=1):u=0,s[n]=i;for(n=a;n<o;n++){if(!((i=t[n]-u)<0)){s[n++]=i;break}i+=f,s[n]=i}for(;n<o;n++)s[n]=t[n];return g(s),s}function E(t,r,n){var i,o,a=t.length,s=new Array(a),u=-r,c=e;for(i=0;i<a;i++)o=t[i]+u,u=Math.floor(o/c),o%=c,s[i]=o<0?o+c:o;return"number"==typeof(s=d(s))?(n&&(s=-s),new l(s)):new f(s,n)}function x(t,r){var n,i,o,a,s=t.length,u=r.length,f=y(s+u),l=e;for(o=0;o<s;++o){a=t[o];for(var c=0;c<u;++c)n=a*r[c]+f[o+c],i=Math.floor(n/l),f[o+c]=n-i*l,f[o+c+1]+=i}return g(f),f}function k(t,r){var n,i,o=t.length,a=new Array(o),s=e,u=0;for(i=0;i<o;i++)n=t[i]*r+u,u=Math.floor(n/s),a[i]=n-u*s;for(;u>0;)a[i++]=u%s,u=Math.floor(u/s);return a}function I(t,e){for(var r=[];e-- >0;)r.push(0);return r.concat(t)}function S(t,r,n){return new f(t<e?k(r,t):x(r,p(t)),n)}function T(t){var r,n,i,o,a=t.length,s=y(a+a),u=e;for(i=0;i<a;i++){n=0-(o=t[i])*o;for(var f=i;f<a;f++)r=o*t[f]*2+s[i+f]+n,n=Math.floor(r/u),s[i+f]=r-n*u;s[i+a]=n}return g(s),s}function A(t,r){var n,i,o,a,s=t.length,u=y(s),f=e;for(o=0,n=s-1;n>=0;--n)o=(a=o*f+t[n])-(i=b(a/r))*r,u[n]=0|i;return[u,0|o]}function N(t,r){var n,i=G(r);if(s)return[new c(t.value/i.value),new c(t.value%i.value)];var o,a=t.value,h=i.value;if(0===h)throw new Error("Cannot divide by zero");if(t.isSmall)return i.isSmall?[new l(b(a/h)),new l(a%h)]:[u[0],t];if(i.isSmall){if(1===h)return[t,u[0]];if(-1==h)return[t.negate(),u[0]];var v=Math.abs(h);if(v<e){o=d((n=A(a,v))[0]);var w=n[1];return t.sign&&(w=-w),"number"==typeof o?(t.sign!==i.sign&&(o=-o),[new l(o),new l(w)]):[new f(o,t.sign!==i.sign),new l(w)]}h=p(v)}var m=L(a,h);if(-1===m)return[u[0],t];if(0===m)return[u[t.sign===i.sign?1:-1],u[0]];o=(n=a.length+h.length<=200?function(t,r){var n,i,o,a,s,u,f,l=t.length,c=r.length,h=e,p=y(r.length),g=r[c-1],b=Math.ceil(h/(2*g)),v=k(t,b),w=k(r,b);for(v.length<=l&&v.push(0),w.push(0),g=w[c-1],i=l-c;i>=0;i--){for(n=h-1,v[i+c]!==g&&(n=Math.floor((v[i+c]*h+v[i+c-1])/g)),o=0,a=0,u=w.length,s=0;s<u;s++)o+=n*w[s],f=Math.floor(o/h),a+=v[i+s]-(o-f*h),o=f,a<0?(v[i+s]=a+h,a=-1):(v[i+s]=a,a=0);for(;0!==a;){for(n-=1,o=0,s=0;s<u;s++)(o+=v[i+s]-h+w[s])<0?(v[i+s]=o+h,o=0):(v[i+s]=o,o=1);a+=o}p[i]=n}return v=A(v,b)[0],[d(p),d(v)]}(a,h):function(t,r){for(var n,i,o,a,s,u=t.length,f=r.length,l=[],c=[],h=e;u;)if(c.unshift(t[--u]),g(c),L(c,r)<0)l.push(0);else{o=c[(i=c.length)-1]*h+c[i-2],a=r[f-1]*h+r[f-2],i>f&&(o=(o+1)*h),n=Math.ceil(o/a);do{if(L(s=k(r,n),c)<=0)break;n--}while(n);l.push(n),c=_(c,s)}return l.reverse(),[d(l),d(c)]}(a,h))[0];var E=t.sign!==i.sign,x=n[1],I=t.sign;return"number"==typeof o?(E&&(o=-o),o=new l(o)):o=new f(o,E),"number"==typeof x?(I&&(x=-x),x=new l(x)):x=new f(x,I),[o,x]}function L(t,e){if(t.length!==e.length)return t.length>e.length?1:-1;for(var r=t.length-1;r>=0;r--)if(t[r]!==e[r])return t[r]>e[r]?1:-1;return 0}function D(t){var e=t.abs();return!e.isUnit()&&(!!(e.equals(2)||e.equals(3)||e.equals(5))||!(e.isEven()||e.isDivisibleBy(3)||e.isDivisibleBy(5))&&(!!e.lesser(49)||void 0))}function M(t,e){for(var r,i,o,a=t.prev(),s=a,u=0;s.isEven();)s=s.divide(2),u++;t:for(i=0;i<e.length;i++)if(!t.lesser(e[i])&&!(o=n(e[i]).modPow(s,t)).isUnit()&&!o.equals(a)){for(r=u-1;0!=r;r--){if((o=o.square().mod(t)).isUnit())return!1;if(o.equals(a))continue t}return!1}return!0}f.prototype=Object.create(u.prototype),l.prototype=Object.create(u.prototype),c.prototype=Object.create(u.prototype),f.prototype.add=function(t){var e=G(t);if(this.sign!==e.sign)return this.subtract(e.negate());var r=this.value,n=e.value;return e.isSmall?new f(m(r,Math.abs(n)),this.sign):new f(w(r,n),this.sign)},f.prototype.plus=f.prototype.add,l.prototype.add=function(t){var e=G(t),r=this.value;if(r<0!==e.sign)return this.subtract(e.negate());var n=e.value;if(e.isSmall){if(h(r+n))return new l(r+n);n=p(Math.abs(n))}return new f(m(n,Math.abs(r)),r<0)},l.prototype.plus=l.prototype.add,c.prototype.add=function(t){return new c(this.value+G(t).value)},c.prototype.plus=c.prototype.add,f.prototype.subtract=function(t){var e=G(t);if(this.sign!==e.sign)return this.add(e.negate());var r=this.value,n=e.value;return e.isSmall?E(r,Math.abs(n),this.sign):function(t,e,r){var n;return L(t,e)>=0?n=_(t,e):(n=_(e,t),r=!r),"number"==typeof(n=d(n))?(r&&(n=-n),new l(n)):new f(n,r)}(r,n,this.sign)},f.prototype.minus=f.prototype.subtract,l.prototype.subtract=function(t){var e=G(t),r=this.value;if(r<0!==e.sign)return this.add(e.negate());var n=e.value;return e.isSmall?new l(r-n):E(n,Math.abs(r),r>=0)},l.prototype.minus=l.prototype.subtract,c.prototype.subtract=function(t){return new c(this.value-G(t).value)},c.prototype.minus=c.prototype.subtract,f.prototype.negate=function(){return new f(this.value,!this.sign)},l.prototype.negate=function(){var t=this.sign,e=new l(-this.value);return e.sign=!t,e},c.prototype.negate=function(){return new c(-this.value)},f.prototype.abs=function(){return new f(this.value,!1)},l.prototype.abs=function(){return new l(Math.abs(this.value))},c.prototype.abs=function(){return new c(this.value>=0?this.value:-this.value)},f.prototype.multiply=function(t){var r,n,i,o=G(t),a=this.value,s=o.value,l=this.sign!==o.sign;if(o.isSmall){if(0===s)return u[0];if(1===s)return this;if(-1===s)return this.negate();if((r=Math.abs(s))<e)return new f(k(a,r),l);s=p(r)}return n=a.length,i=s.length,new f(-.012*n-.012*i+15e-6*n*i>0?function t(e,r){var n=Math.max(e.length,r.length);if(n<=30)return x(e,r);n=Math.ceil(n/2);var i=e.slice(n),o=e.slice(0,n),a=r.slice(n),s=r.slice(0,n),u=t(o,s),f=t(i,a),l=w(w(u,I(_(_(t(w(o,i),w(s,a)),u),f),n)),I(f,2*n));return g(l),l}(a,s):x(a,s),l)},f.prototype.times=f.prototype.multiply,l.prototype._multiplyBySmall=function(t){return h(t.value*this.value)?new l(t.value*this.value):S(Math.abs(t.value),p(Math.abs(this.value)),this.sign!==t.sign)},f.prototype._multiplyBySmall=function(t){return 0===t.value?u[0]:1===t.value?this:-1===t.value?this.negate():S(Math.abs(t.value),this.value,this.sign!==t.sign)},l.prototype.multiply=function(t){return G(t)._multiplyBySmall(this)},l.prototype.times=l.prototype.multiply,c.prototype.multiply=function(t){return new c(this.value*G(t).value)},c.prototype.times=c.prototype.multiply,f.prototype.square=function(){return new f(T(this.value),!1)},l.prototype.square=function(){var t=this.value*this.value;return h(t)?new l(t):new f(T(p(Math.abs(this.value))),!1)},c.prototype.square=function(t){return new c(this.value*this.value)},f.prototype.divmod=function(t){var e=N(this,t);return{quotient:e[0],remainder:e[1]}},c.prototype.divmod=l.prototype.divmod=f.prototype.divmod,f.prototype.divide=function(t){return N(this,t)[0]},c.prototype.over=c.prototype.divide=function(t){return new c(this.value/G(t).value)},l.prototype.over=l.prototype.divide=f.prototype.over=f.prototype.divide,f.prototype.mod=function(t){return N(this,t)[1]},c.prototype.mod=c.prototype.remainder=function(t){return new c(this.value%G(t).value)},l.prototype.remainder=l.prototype.mod=f.prototype.remainder=f.prototype.mod,f.prototype.pow=function(t){var e,r,n,i=G(t),o=this.value,a=i.value;if(0===a)return u[1];if(0===o)return u[0];if(1===o)return u[1];if(-1===o)return i.isEven()?u[1]:u[-1];if(i.sign)return u[0];if(!i.isSmall)throw new Error("The exponent "+i.toString()+" is too large.");if(this.isSmall&&h(e=Math.pow(o,a)))return new l(b(e));for(r=this,n=u[1];!0&a&&(n=n.times(r),--a),0!==a;)a/=2,r=r.square();return n},l.prototype.pow=f.prototype.pow,c.prototype.pow=function(t){var e=G(t),r=this.value,n=e.value,i=BigInt(0),o=BigInt(1),a=BigInt(2);if(n===i)return u[1];if(r===i)return u[0];if(r===o)return u[1];if(r===BigInt(-1))return e.isEven()?u[1]:u[-1];if(e.isNegative())return new c(i);for(var s=this,f=u[1];(n&o)===o&&(f=f.times(s),--n),n!==i;)n/=a,s=s.square();return f},f.prototype.modPow=function(t,e){if(t=G(t),(e=G(e)).isZero())throw new Error("Cannot take modPow with modulus 0");var r=u[1],n=this.mod(e);for(t.isNegative()&&(t=t.multiply(u[-1]),n=n.modInv(e));t.isPositive();){if(n.isZero())return u[0];t.isOdd()&&(r=r.multiply(n).mod(e)),t=t.divide(2),n=n.square().mod(e)}return r},c.prototype.modPow=l.prototype.modPow=f.prototype.modPow,f.prototype.compareAbs=function(t){var e=G(t),r=this.value,n=e.value;return e.isSmall?1:L(r,n)},l.prototype.compareAbs=function(t){var e=G(t),r=Math.abs(this.value),n=e.value;return e.isSmall?r===(n=Math.abs(n))?0:r>n?1:-1:-1},c.prototype.compareAbs=function(t){var e=this.value,r=G(t).value;return(e=e>=0?e:-e)===(r=r>=0?r:-r)?0:e>r?1:-1},f.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=G(t),r=this.value,n=e.value;return this.sign!==e.sign?e.sign?1:-1:e.isSmall?this.sign?-1:1:L(r,n)*(this.sign?-1:1)},f.prototype.compareTo=f.prototype.compare,l.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=G(t),r=this.value,n=e.value;return e.isSmall?r==n?0:r>n?1:-1:r<0!==e.sign?r<0?-1:1:r<0?1:-1},l.prototype.compareTo=l.prototype.compare,c.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=this.value,r=G(t).value;return e===r?0:e>r?1:-1},c.prototype.compareTo=c.prototype.compare,f.prototype.equals=function(t){return 0===this.compare(t)},c.prototype.eq=c.prototype.equals=l.prototype.eq=l.prototype.equals=f.prototype.eq=f.prototype.equals,f.prototype.notEquals=function(t){return 0!==this.compare(t)},c.prototype.neq=c.prototype.notEquals=l.prototype.neq=l.prototype.notEquals=f.prototype.neq=f.prototype.notEquals,f.prototype.greater=function(t){return this.compare(t)>0},c.prototype.gt=c.prototype.greater=l.prototype.gt=l.prototype.greater=f.prototype.gt=f.prototype.greater,f.prototype.lesser=function(t){return this.compare(t)<0},c.prototype.lt=c.prototype.lesser=l.prototype.lt=l.prototype.lesser=f.prototype.lt=f.prototype.lesser,f.prototype.greaterOrEquals=function(t){return this.compare(t)>=0},c.prototype.geq=c.prototype.greaterOrEquals=l.prototype.geq=l.prototype.greaterOrEquals=f.prototype.geq=f.prototype.greaterOrEquals,f.prototype.lesserOrEquals=function(t){return this.compare(t)<=0},c.prototype.leq=c.prototype.lesserOrEquals=l.prototype.leq=l.prototype.lesserOrEquals=f.prototype.leq=f.prototype.lesserOrEquals,f.prototype.isEven=function(){return 0==(1&this.value[0])},l.prototype.isEven=function(){return 0==(1&this.value)},c.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},f.prototype.isOdd=function(){return 1==(1&this.value[0])},l.prototype.isOdd=function(){return 1==(1&this.value)},c.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},f.prototype.isPositive=function(){return!this.sign},l.prototype.isPositive=function(){return this.value>0},c.prototype.isPositive=l.prototype.isPositive,f.prototype.isNegative=function(){return this.sign},l.prototype.isNegative=function(){return this.value<0},c.prototype.isNegative=l.prototype.isNegative,f.prototype.isUnit=function(){return!1},l.prototype.isUnit=function(){return 1===Math.abs(this.value)},c.prototype.isUnit=function(){return this.abs().value===BigInt(1)},f.prototype.isZero=function(){return!1},l.prototype.isZero=function(){return 0===this.value},c.prototype.isZero=function(){return this.value===BigInt(0)},f.prototype.isDivisibleBy=function(t){var e=G(t);return!e.isZero()&&(!!e.isUnit()||(0===e.compareAbs(2)?this.isEven():this.mod(e).isZero()))},c.prototype.isDivisibleBy=l.prototype.isDivisibleBy=f.prototype.isDivisibleBy,f.prototype.isPrime=function(t){var e=D(this);if(void 0!==e)return e;var r=this.abs(),i=r.bitLength();if(i<=64)return M(r,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var o=Math.log(2)*i.toJSNumber(),a=Math.ceil(!0===t?2*Math.pow(o,2):o),s=[],u=0;u<a;u++)s.push(n(u+2));return M(r,s)},c.prototype.isPrime=l.prototype.isPrime=f.prototype.isPrime,f.prototype.isProbablePrime=function(t,e){var r=D(this);if(void 0!==r)return r;for(var i=this.abs(),o=void 0===t?5:t,a=[],s=0;s<o;s++)a.push(n.randBetween(2,i.minus(2),e));return M(i,a)},c.prototype.isProbablePrime=l.prototype.isProbablePrime=f.prototype.isProbablePrime,f.prototype.modInv=function(t){for(var e,r,i,o=n.zero,a=n.one,s=G(t),u=this.abs();!u.isZero();)e=s.divide(u),r=o,i=s,o=a,s=u,a=r.subtract(e.multiply(a)),u=i.subtract(e.multiply(u));if(!s.isUnit())throw new Error(this.toString()+" and "+t.toString()+" are not co-prime");return-1===o.compare(0)&&(o=o.add(t)),this.isNegative()?o.negate():o},c.prototype.modInv=l.prototype.modInv=f.prototype.modInv,f.prototype.next=function(){var t=this.value;return this.sign?E(t,1,this.sign):new f(m(t,1),this.sign)},l.prototype.next=function(){var t=this.value;return t+1<i?new l(t+1):new f(o,!1)},c.prototype.next=function(){return new c(this.value+BigInt(1))},f.prototype.prev=function(){var t=this.value;return this.sign?new f(m(t,1),!0):E(t,1,this.sign)},l.prototype.prev=function(){var t=this.value;return t-1>-i?new l(t-1):new f(o,!0)},c.prototype.prev=function(){return new c(this.value-BigInt(1))};for(var O=[1];2*O[O.length-1]<=e;)O.push(2*O[O.length-1]);var U=O.length,B=O[U-1];function C(t){return Math.abs(t)<=e}function R(t,e,r){e=G(e);for(var i=t.isNegative(),o=e.isNegative(),a=i?t.not():t,s=o?e.not():e,u=0,f=0,l=null,c=null,h=[];!a.isZero()||!s.isZero();)u=(l=N(a,B))[1].toJSNumber(),i&&(u=B-1-u),f=(c=N(s,B))[1].toJSNumber(),o&&(f=B-1-f),a=l[0],s=c[0],h.push(r(u,f));for(var p=0!==r(i?1:0,o?1:0)?n(-1):n(0),d=h.length-1;d>=0;d-=1)p=p.multiply(B).add(n(h[d]));return p}f.prototype.shiftLeft=function(t){var e=G(t).toJSNumber();if(!C(e))throw new Error(String(e)+" is too large for shifting.");if(e<0)return this.shiftRight(-e);var r=this;if(r.isZero())return r;for(;e>=U;)r=r.multiply(B),e-=U-1;return r.multiply(O[e])},c.prototype.shiftLeft=l.prototype.shiftLeft=f.prototype.shiftLeft,f.prototype.shiftRight=function(t){var e,r=G(t).toJSNumber();if(!C(r))throw new Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var n=this;r>=U;){if(n.isZero()||n.isNegative()&&n.isUnit())return n;n=(e=N(n,B))[1].isNegative()?e[0].prev():e[0],r-=U-1}return(e=N(n,O[r]))[1].isNegative()?e[0].prev():e[0]},c.prototype.shiftRight=l.prototype.shiftRight=f.prototype.shiftRight,f.prototype.not=function(){return this.negate().prev()},c.prototype.not=l.prototype.not=f.prototype.not,f.prototype.and=function(t){return R(this,t,function(t,e){return t&e})},c.prototype.and=l.prototype.and=f.prototype.and,f.prototype.or=function(t){return R(this,t,function(t,e){return t|e})},c.prototype.or=l.prototype.or=f.prototype.or,f.prototype.xor=function(t){return R(this,t,function(t,e){return t^e})},c.prototype.xor=l.prototype.xor=f.prototype.xor;var z=1<<30,j=(e&-e)*(e&-e)|z;function F(t){var r=t.value,n="number"==typeof r?r|z:"bigint"==typeof r?r|BigInt(z):r[0]+r[1]*e|j;return n&-n}function P(t,e){return t=G(t),e=G(e),t.greater(e)?t:e}function Z(t,e){return t=G(t),e=G(e),t.lesser(e)?t:e}function X(t,e){if(t=G(t).abs(),e=G(e).abs(),t.equals(e))return t;if(t.isZero())return e;if(e.isZero())return t;for(var r,n,i=u[1];t.isEven()&&e.isEven();)r=Z(F(t),F(e)),t=t.divide(r),e=e.divide(r),i=i.multiply(r);for(;t.isEven();)t=t.divide(F(t));do{for(;e.isEven();)e=e.divide(F(e));t.greater(e)&&(n=e,e=t,t=n),e=e.subtract(t)}while(!e.isZero());return i.isUnit()?t:t.multiply(i)}f.prototype.bitLength=function(){var t=this;return t.compareTo(n(0))<0&&(t=t.negate().subtract(n(1))),0===t.compareTo(n(0))?n(0):n(function t(e,r){if(r.compareTo(e)<=0){var i=t(e,r.square(r)),o=i.p,a=i.e,s=o.multiply(r);return s.compareTo(e)<=0?{p:s,e:2*a+1}:{p:o,e:2*a}}return{p:n(1),e:0}}(t,n(2)).e).add(n(1))},c.prototype.bitLength=l.prototype.bitLength=f.prototype.bitLength;var q=function(t,e,r,n){r=r||a,t=String(t),n||(t=t.toLowerCase(),r=r.toLowerCase());var i,o=t.length,s=Math.abs(e),u={};for(i=0;i<r.length;i++)u[r[i]]=i;for(i=0;i<o;i++){if("-"!==(c=t[i])&&(c in u&&u[c]>=s)){if("1"===c&&1===s)continue;throw new Error(c+" is not a valid digit in base "+e+".")}}e=G(e);var f=[],l="-"===t[0];for(i=l?1:0;i<t.length;i++){var c;if((c=t[i])in u)f.push(G(u[c]));else{if("<"!==c)throw new Error(c+" is not a valid character");var h=i;do{i++}while(">"!==t[i]&&i<t.length);f.push(G(t.slice(h+1,i)))}}return H(f,e,l)};function H(t,e,r){var n,i=u[0],o=u[1];for(n=t.length-1;n>=0;n--)i=i.add(t[n].times(o)),o=o.times(e);return r?i.negate():i}function W(t,e){if((e=n(e)).isZero()){if(t.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(e.equals(-1)){if(t.isZero())return{value:[0],isNegative:!1};if(t.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-t.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var r=Array.apply(null,Array(t.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return r.unshift([1]),{value:[].concat.apply([],r),isNegative:!1}}var i=!1;if(t.isNegative()&&e.isPositive()&&(i=!0,t=t.abs()),e.isUnit())return t.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(t.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:i};for(var o,a=[],s=t;s.isNegative()||s.compareAbs(e)>=0;){s=(o=s.divmod(e)).quotient;var u=o.remainder;u.isNegative()&&(u=e.minus(u).abs(),s=s.next()),a.push(u.toJSNumber())}return a.push(s.toJSNumber()),{value:a.reverse(),isNegative:i}}function V(t,e,r){var n=W(t,e);return(n.isNegative?"-":"")+n.value.map(function(t){return function(t,e){return t<(e=e||a).length?e[t]:"<"+t+">"}(t,r)}).join("")}function K(t){if(h(+t)){var e=+t;if(e===b(e))return s?new c(BigInt(e)):new l(e);throw new Error("Invalid integer: "+t)}var n="-"===t[0];n&&(t=t.slice(1));var i=t.split(/e/i);if(i.length>2)throw new Error("Invalid integer: "+i.join("e"));if(2===i.length){var o=i[1];if("+"===o[0]&&(o=o.slice(1)),(o=+o)!==b(o)||!h(o))throw new Error("Invalid integer: "+o+" is not a valid exponent.");var a=i[0],u=a.indexOf(".");if(u>=0&&(o-=a.length-u-1,a=a.slice(0,u)+a.slice(u+1)),o<0)throw new Error("Cannot include negative exponent part for integers");t=a+=new Array(o+1).join("0")}if(!/^([0-9][0-9]*)$/.test(t))throw new Error("Invalid integer: "+t);if(s)return new c(BigInt(n?"-"+t:t));for(var p=[],d=t.length,y=r,v=d-y;d>0;)p.push(+t.slice(v,d)),(v-=y)<0&&(v=0),d-=y;return g(p),new f(p,n)}function G(t){return"number"==typeof t?function(t){if(s)return new c(BigInt(t));if(h(t)){if(t!==b(t))throw new Error(t+" is not an integer.");return new l(t)}return K(t.toString())}(t):"string"==typeof t?K(t):"bigint"==typeof t?new c(t):t}f.prototype.toArray=function(t){return W(this,t)},l.prototype.toArray=function(t){return W(this,t)},c.prototype.toArray=function(t){return W(this,t)},f.prototype.toString=function(t,e){if(void 0===t&&(t=10),10!==t)return V(this,t,e);for(var r,n=this.value,i=n.length,o=String(n[--i]);--i>=0;)r=String(n[i]),o+="0000000".slice(r.length)+r;return(this.sign?"-":"")+o},l.prototype.toString=function(t,e){return void 0===t&&(t=10),10!=t?V(this,t,e):String(this.value)},c.prototype.toString=l.prototype.toString,c.prototype.toJSON=f.prototype.toJSON=l.prototype.toJSON=function(){return this.toString()},f.prototype.valueOf=function(){return parseInt(this.toString(),10)},f.prototype.toJSNumber=f.prototype.valueOf,l.prototype.valueOf=function(){return this.value},l.prototype.toJSNumber=l.prototype.valueOf,c.prototype.valueOf=c.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var Y=0;Y<1e3;Y++)u[Y]=G(Y),Y>0&&(u[-Y]=G(-Y));return u.one=u[1],u.zero=u[0],u.minusOne=u[-1],u.max=P,u.min=Z,u.gcd=X,u.lcm=function(t,e){return t=G(t).abs(),e=G(e).abs(),t.divide(X(t,e)).multiply(e)},u.isInstance=function(t){return t instanceof f||t instanceof l||t instanceof c},u.randBetween=function(t,r,n){t=G(t),r=G(r);var i=n||Math.random,o=Z(t,r),a=P(t,r).subtract(o).add(1);if(a.isSmall)return o.add(Math.floor(i()*a));for(var s=W(a,e).value,f=[],l=!0,c=0;c<s.length;c++){var h=l?s[c]:e,p=b(i()*h);f.push(p),p<h&&(l=!1)}return o.add(u.fromArray(f,e,!1))},u.fromArray=function(t,e,r){return H(t.map(G),G(e||10),r)},u}();void 0!==e&&e.hasOwnProperty("exports")&&(e.exports=n)},{}],15:[function(t,e,r){(function(e){(function(){"use strict";const n=t("fs"),i=t("big-integer"),o=!1;r.maxObjectSize=1e8,r.maxObjectCount=32768;const a=9783072e5,s=r.UID=function(t){this.UID=t},u=(r.parseFile=function(t,r){return new Promise(function(i,o){function a(t){let e,n=null;try{e=u(t),i(e)}catch(t){o(n=t)}finally{r&&r(n,e)}}if(e.isBuffer(t))return a(t);n.readFile(t,function(t,e){if(t)return o(t),r(t);a(e)})})},r.parseBuffer=function(t){if("bplist"!==t.slice(0,"bplist".length).toString("utf8"))throw new Error("Invalid binary plist. Expected 'bplist' at offset 0.");const n=t.slice(t.length-32,t.length),u=n.readUInt8(6);o&&console.log("offsetSize: "+u);const c=n.readUInt8(7);o&&console.log("objectRefSize: "+c);const h=l(n,8);o&&console.log("numObjects: "+h);const p=l(n,16);o&&console.log("topObject: "+p);const d=l(n,24);if(o&&console.log("offsetTableOffset: "+d),h>r.maxObjectCount)throw new Error("maxObjectCount exceeded");const g=[];for(let e=0;e<h;e++){const r=t.slice(d+e*u,d+(e+1)*u);g[e]=f(r,0),o&&console.log("Offset for Object #"+e+" is "+g[e]+" ["+g[e].toString(16)+"]")}return[function n(u){const l=g[u],h=t[l],p=(240&h)>>4,d=15&h;switch(p){case 0:return function(){switch(d){case 0:return null;case 8:return!1;case 9:return!0;case 15:return null;default:throw new Error("Unhandled simple type 0x"+p.toString(16))}}();case 1:return function(){const e=Math.pow(2,d);if(4==d){const r=t.slice(l+1,l+1+e),n=function(t){let e,r="";for(e=0;e<t.length&&0==t[e];e++);for(;e<t.length;e++){const n="00"+t[e].toString(16);r+=n.substr(n.length-2)}return r}(r);return i(n,16)}if(3==d)return t.readInt32BE(l+1);if(e<r.maxObjectSize)return f(t.slice(l+1,l+1+e));throw new Error("To little heap space available! Wanted to read "+e+" bytes, but only "+r.maxObjectSize+" are available.")}();case 8:return function(){const e=d+1;if(e<r.maxObjectSize)return new s(f(t.slice(l+1,l+1+e)));throw new Error("To little heap space available! Wanted to read "+e+" bytes, but only "+r.maxObjectSize+" are available.")}();case 2:return function(){const e=Math.pow(2,d);if(!(e<r.maxObjectSize))throw new Error("To little heap space available! Wanted to read "+e+" bytes, but only "+r.maxObjectSize+" are available.");{const r=t.slice(l+1,l+1+e);if(4===e)return r.readFloatBE(0);if(8===e)return r.readDoubleBE(0)}}();case 3:return function(){3!=d&&console.error("Unknown date type :"+d+". Parsing anyway...");const e=t.slice(l+1,l+9);return new Date(a+1e3*e.readDoubleBE(0))}();case 4:return function(){let e=1,n=d;if(15==d){const r=t[l+1],i=(240&r)/16;1!=i&&console.error("0x4: UNEXPECTED LENGTH-INT TYPE! "+i);const o=15&r,a=Math.pow(2,o);e=2+a,n=f(t.slice(l+2,l+2+a))}if(n<r.maxObjectSize)return t.slice(l+e,l+e+n);throw new Error("To little heap space available! Wanted to read "+n+" bytes, but only "+r.maxObjectSize+" are available.")}();case 5:return y();case 6:return y(!0);case 10:return function(){let e=d,i=1;if(15==d){const r=t[l+1],n=(240&r)/16;1!=n&&console.error("0xa: UNEXPECTED LENGTH-INT TYPE! "+n);const o=15&r,a=Math.pow(2,o);i=2+a,e=f(t.slice(l+2,l+2+a))}if(e*c>r.maxObjectSize)throw new Error("To little heap space available!");const o=[];for(let r=0;r<e;r++){const e=f(t.slice(l+i+r*c,l+i+(r+1)*c));o[r]=n(e)}return o}();case 13:return function(){let e=d,i=1;if(15==d){const r=t[l+1],n=(240&r)/16;1!=n&&console.error("0xD: UNEXPECTED LENGTH-INT TYPE! "+n);const o=15&r,a=Math.pow(2,o);i=2+a,e=f(t.slice(l+2,l+2+a))}if(2*e*c>r.maxObjectSize)throw new Error("To little heap space available!");o&&console.log("Parsing dictionary #"+u);const a={};for(let r=0;r<e;r++){const s=f(t.slice(l+i+r*c,l+i+(r+1)*c)),h=f(t.slice(l+i+e*c+r*c,l+i+e*c+(r+1)*c)),p=n(s),d=n(h);o&&console.log(" DICT #"+u+": Mapped "+p+" to "+d),a[p]=d}return a}();default:throw new Error("Unhandled type 0x"+p.toString(16))}function y(n){n=n||0;let i="utf8",o=d,a=1;if(15==d){const e=t[l+1],r=(240&e)/16;1!=r&&console.err("UNEXPECTED LENGTH-INT TYPE! "+r);const n=15&e,i=Math.pow(2,n);a=2+i,o=f(t.slice(l+2,l+2+i))}if((o*=n+1)<r.maxObjectSize){let r=e.from(t.slice(l+a,l+a+o));return n&&(r=function(t){const e=t.length;for(let r=0;r<e;r+=2){const e=t[r];t[r]=t[r+1],t[r+1]=e}return t}(r),i="ucs2"),r.toString(i)}throw new Error("To little heap space available! Wanted to read "+o+" bytes, but only "+r.maxObjectSize+" are available.")}}(p)]});function f(t,e){let r=0;for(let n=e=e||0;n<t.length;n++)r<<=8,r|=255&t[n];return r}function l(t,e){return t.slice(e,e+8).readUInt32BE(4,8)}}).call(this)}).call(this,t("buffer").Buffer)},{"big-integer":14,buffer:20,fs:19}],16:[function(t,e,r){},{}],17:[function(t,e,r){(function(e,n){(function(){"use strict";var i=t("assert"),o=t("pako/lib/zlib/zstream"),a=t("pako/lib/zlib/deflate.js"),s=t("pako/lib/zlib/inflate.js"),u=t("pako/lib/zlib/constants");for(var f in u)r[f]=u[f];r.NONE=0,r.DEFLATE=1,r.INFLATE=2,r.GZIP=3,r.GUNZIP=4,r.DEFLATERAW=5,r.INFLATERAW=6,r.UNZIP=7;function l(t){if("number"!=typeof t||t<r.DEFLATE||t>r.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}l.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,i(this.init_done,"close before init"),i(this.mode<=r.UNZIP),this.mode===r.DEFLATE||this.mode===r.GZIP||this.mode===r.DEFLATERAW?a.deflateEnd(this.strm):this.mode!==r.INFLATE&&this.mode!==r.GUNZIP&&this.mode!==r.INFLATERAW&&this.mode!==r.UNZIP||s.inflateEnd(this.strm),this.mode=r.NONE,this.dictionary=null)},l.prototype.write=function(t,e,r,n,i,o,a){return this._write(!0,t,e,r,n,i,o,a)},l.prototype.writeSync=function(t,e,r,n,i,o,a){return this._write(!1,t,e,r,n,i,o,a)},l.prototype._write=function(t,o,a,s,u,f,l,c){if(i.equal(arguments.length,8),i(this.init_done,"write before init"),i(this.mode!==r.NONE,"already finalized"),i.equal(!1,this.write_in_progress,"write already in progress"),i.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,i.equal(!1,void 0===o,"must provide flush value"),this.write_in_progress=!0,o!==r.Z_NO_FLUSH&&o!==r.Z_PARTIAL_FLUSH&&o!==r.Z_SYNC_FLUSH&&o!==r.Z_FULL_FLUSH&&o!==r.Z_FINISH&&o!==r.Z_BLOCK)throw new Error("Invalid flush value");if(null==a&&(a=n.alloc(0),u=0,s=0),this.strm.avail_in=u,this.strm.input=a,this.strm.next_in=s,this.strm.avail_out=c,this.strm.output=f,this.strm.next_out=l,this.flush=o,!t)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return e.nextTick(function(){h._process(),h._after()}),this},l.prototype._afterSync=function(){var t=this.strm.avail_out,e=this.strm.avail_in;return this.write_in_progress=!1,[e,t]},l.prototype._process=function(){var t=null;switch(this.mode){case r.DEFLATE:case r.GZIP:case r.DEFLATERAW:this.err=a.deflate(this.strm,this.flush);break;case r.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;if(31!==this.strm.input[t]){this.mode=r.INFLATE;break}if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break;case 1:if(null===t)break;139===this.strm.input[t]?(this.gzip_id_bytes_read=2,this.mode=r.GUNZIP):this.mode=r.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case r.INFLATE:case r.GUNZIP:case r.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===r.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===r.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===r.Z_DATA_ERROR&&(this.err=r.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===r.GUNZIP&&this.err===r.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},l.prototype._checkError=function(){switch(this.err){case r.Z_OK:case r.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===r.Z_FINISH)return this._error("unexpected end of file"),!1;break;case r.Z_STREAM_END:break;case r.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},l.prototype._after=function(){if(this._checkError()){var t=this.strm.avail_out,e=this.strm.avail_in;this.write_in_progress=!1,this.callback(e,t),this.pending_close&&this.close()}},l.prototype._error=function(t){this.strm.msg&&(t=this.strm.msg),this.onerror(t,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},l.prototype.init=function(t,e,n,o,a){i(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),i(t>=8&&t<=15,"invalid windowBits"),i(e>=-1&&e<=9,"invalid compression level"),i(n>=1&&n<=9,"invalid memlevel"),i(o===r.Z_FILTERED||o===r.Z_HUFFMAN_ONLY||o===r.Z_RLE||o===r.Z_FIXED||o===r.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(e,t,n,o,a),this._setDictionary()},l.prototype.params=function(){throw new Error("deflateParams Not supported")},l.prototype.reset=function(){this._reset(),this._setDictionary()},l.prototype._init=function(t,e,n,i,u){switch(this.level=t,this.windowBits=e,this.memLevel=n,this.strategy=i,this.flush=r.Z_NO_FLUSH,this.err=r.Z_OK,this.mode!==r.GZIP&&this.mode!==r.GUNZIP||(this.windowBits+=16),this.mode===r.UNZIP&&(this.windowBits+=32),this.mode!==r.DEFLATERAW&&this.mode!==r.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new o,this.mode){case r.DEFLATE:case r.GZIP:case r.DEFLATERAW:this.err=a.deflateInit2(this.strm,this.level,r.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case r.INFLATE:case r.GUNZIP:case r.INFLATERAW:case r.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==r.Z_OK&&this._error("Init error"),this.dictionary=u,this.write_in_progress=!1,this.init_done=!0},l.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=r.Z_OK,this.mode){case r.DEFLATE:case r.DEFLATERAW:this.err=a.deflateSetDictionary(this.strm,this.dictionary)}this.err!==r.Z_OK&&this._error("Failed to set dictionary")}},l.prototype._reset=function(){switch(this.err=r.Z_OK,this.mode){case r.DEFLATE:case r.DEFLATERAW:case r.GZIP:this.err=a.deflateReset(this.strm);break;case r.INFLATE:case r.INFLATERAW:case r.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==r.Z_OK&&this._error("Failed to reset stream")},r.Zlib=l}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{_process:78,assert:9,buffer:20,"pako/lib/zlib/constants":64,"pako/lib/zlib/deflate.js":66,"pako/lib/zlib/inflate.js":68,"pako/lib/zlib/zstream":72}],18:[function(t,e,r){(function(e){(function(){"use strict";var n=t("buffer").Buffer,i=t("stream").Transform,o=t("./binding"),a=t("util"),s=t("assert").ok,u=t("buffer").kMaxLength,f="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";o.Z_MIN_WINDOWBITS=8,o.Z_MAX_WINDOWBITS=15,o.Z_DEFAULT_WINDOWBITS=15,o.Z_MIN_CHUNK=64,o.Z_MAX_CHUNK=1/0,o.Z_DEFAULT_CHUNK=16384,o.Z_MIN_MEMLEVEL=1,o.Z_MAX_MEMLEVEL=9,o.Z_DEFAULT_MEMLEVEL=8,o.Z_MIN_LEVEL=-1,o.Z_MAX_LEVEL=9,o.Z_DEFAULT_LEVEL=o.Z_DEFAULT_COMPRESSION;for(var l=Object.keys(o),c=0;c<l.length;c++){var h=l[c];h.match(/^Z/)&&Object.defineProperty(r,h,{enumerable:!0,value:o[h],writable:!1})}for(var p={Z_OK:o.Z_OK,Z_STREAM_END:o.Z_STREAM_END,Z_NEED_DICT:o.Z_NEED_DICT,Z_ERRNO:o.Z_ERRNO,Z_STREAM_ERROR:o.Z_STREAM_ERROR,Z_DATA_ERROR:o.Z_DATA_ERROR,Z_MEM_ERROR:o.Z_MEM_ERROR,Z_BUF_ERROR:o.Z_BUF_ERROR,Z_VERSION_ERROR:o.Z_VERSION_ERROR},d=Object.keys(p),g=0;g<d.length;g++){var y=d[g];p[p[y]]=y}function b(t,e,r){var i=[],o=0;function a(){for(var e;null!==(e=t.read());)i.push(e),o+=e.length;t.once("readable",a)}function s(){var e,a=null;o>=u?a=new RangeError(f):e=n.concat(i,o),i=[],t.close(),r(a,e)}t.on("error",function(e){t.removeListener("end",s),t.removeListener("readable",a),r(e)}),t.on("end",s),t.end(e),a()}function v(t,e){if("string"==typeof e&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return t._processChunk(e,r)}function w(t){if(!(this instanceof w))return new w(t);T.call(this,t,o.DEFLATE)}function m(t){if(!(this instanceof m))return new m(t);T.call(this,t,o.INFLATE)}function _(t){if(!(this instanceof _))return new _(t);T.call(this,t,o.GZIP)}function E(t){if(!(this instanceof E))return new E(t);T.call(this,t,o.GUNZIP)}function x(t){if(!(this instanceof x))return new x(t);T.call(this,t,o.DEFLATERAW)}function k(t){if(!(this instanceof k))return new k(t);T.call(this,t,o.INFLATERAW)}function I(t){if(!(this instanceof I))return new I(t);T.call(this,t,o.UNZIP)}function S(t){return t===o.Z_NO_FLUSH||t===o.Z_PARTIAL_FLUSH||t===o.Z_SYNC_FLUSH||t===o.Z_FULL_FLUSH||t===o.Z_FINISH||t===o.Z_BLOCK}function T(t,e){var a=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||r.Z_DEFAULT_CHUNK,i.call(this,t),t.flush&&!S(t.flush))throw new Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!S(t.finishFlush))throw new Error("Invalid flush flag: "+t.finishFlush);if(this._flushFlag=t.flush||o.Z_NO_FLUSH,this._finishFlushFlag=void 0!==t.finishFlush?t.finishFlush:o.Z_FINISH,t.chunkSize&&(t.chunkSize<r.Z_MIN_CHUNK||t.chunkSize>r.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<r.Z_MIN_WINDOWBITS||t.windowBits>r.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<r.Z_MIN_LEVEL||t.level>r.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<r.Z_MIN_MEMLEVEL||t.memLevel>r.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=r.Z_FILTERED&&t.strategy!=r.Z_HUFFMAN_ONLY&&t.strategy!=r.Z_RLE&&t.strategy!=r.Z_FIXED&&t.strategy!=r.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!n.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new o.Zlib(e);var s=this;this._hadError=!1,this._handle.onerror=function(t,e){A(s),s._hadError=!0;var n=new Error(t);n.errno=e,n.code=r.codes[e],s.emit("error",n)};var u=r.Z_DEFAULT_COMPRESSION;"number"==typeof t.level&&(u=t.level);var f=r.Z_DEFAULT_STRATEGY;"number"==typeof t.strategy&&(f=t.strategy),this._handle.init(t.windowBits||r.Z_DEFAULT_WINDOWBITS,u,t.memLevel||r.Z_DEFAULT_MEMLEVEL,f,t.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=f,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!a._handle},configurable:!0,enumerable:!0})}function A(t,r){r&&e.nextTick(r),t._handle&&(t._handle.close(),t._handle=null)}function N(t){t.emit("close")}Object.defineProperty(r,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),r.Deflate=w,r.Inflate=m,r.Gzip=_,r.Gunzip=E,r.DeflateRaw=x,r.InflateRaw=k,r.Unzip=I,r.createDeflate=function(t){return new w(t)},r.createInflate=function(t){return new m(t)},r.createDeflateRaw=function(t){return new x(t)},r.createInflateRaw=function(t){return new k(t)},r.createGzip=function(t){return new _(t)},r.createGunzip=function(t){return new E(t)},r.createUnzip=function(t){return new I(t)},r.deflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new w(e),t,r)},r.deflateSync=function(t,e){return v(new w(e),t)},r.gzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new _(e),t,r)},r.gzipSync=function(t,e){return v(new _(e),t)},r.deflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new x(e),t,r)},r.deflateRawSync=function(t,e){return v(new x(e),t)},r.unzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new I(e),t,r)},r.unzipSync=function(t,e){return v(new I(e),t)},r.inflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new m(e),t,r)},r.inflateSync=function(t,e){return v(new m(e),t)},r.gunzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new E(e),t,r)},r.gunzipSync=function(t,e){return v(new E(e),t)},r.inflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new k(e),t,r)},r.inflateRawSync=function(t,e){return v(new k(e),t)},a.inherits(T,i),T.prototype.params=function(t,n,i){if(t<r.Z_MIN_LEVEL||t>r.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+t);if(n!=r.Z_FILTERED&&n!=r.Z_HUFFMAN_ONLY&&n!=r.Z_RLE&&n!=r.Z_FIXED&&n!=r.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==t||this._strategy!==n){var a=this;this.flush(o.Z_SYNC_FLUSH,function(){s(a._handle,"zlib binding closed"),a._handle.params(t,n),a._hadError||(a._level=t,a._strategy=n,i&&i())})}else e.nextTick(i)},T.prototype.reset=function(){return s(this._handle,"zlib binding closed"),this._handle.reset()},T.prototype._flush=function(t){this._transform(n.alloc(0),"",t)},T.prototype.flush=function(t,r){var i=this,a=this._writableState;("function"==typeof t||void 0===t&&!r)&&(r=t,t=o.Z_FULL_FLUSH),a.ended?r&&e.nextTick(r):a.ending?r&&this.once("end",r):a.needDrain?r&&this.once("drain",function(){return i.flush(t,r)}):(this._flushFlag=t,this.write(n.alloc(0),"",r))},T.prototype.close=function(t){A(this,t),e.nextTick(N,this)},T.prototype._transform=function(t,e,r){var i,a=this._writableState,s=(a.ending||a.ended)&&(!t||a.length===t.length);return null===t||n.isBuffer(t)?this._handle?(s?i=this._finishFlushFlag:(i=this._flushFlag,t.length>=a.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),void this._processChunk(t,i,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},T.prototype._processChunk=function(t,e,r){var i=t&&t.length,o=this._chunkSize-this._offset,a=0,l=this,c="function"==typeof r;if(!c){var h,p=[],d=0;this.on("error",function(t){h=t}),s(this._handle,"zlib binding closed");do{var g=this._handle.writeSync(e,t,a,i,this._buffer,this._offset,o)}while(!this._hadError&&v(g[0],g[1]));if(this._hadError)throw h;if(d>=u)throw A(this),new RangeError(f);var y=n.concat(p,d);return A(this),y}s(this._handle,"zlib binding closed");var b=this._handle.write(e,t,a,i,this._buffer,this._offset,o);function v(u,f){if(this&&(this.buffer=null,this.callback=null),!l._hadError){var h=o-f;if(s(h>=0,"have should not go down"),h>0){var g=l._buffer.slice(l._offset,l._offset+h);l._offset+=h,c?l.push(g):(p.push(g),d+=g.length)}if((0===f||l._offset>=l._chunkSize)&&(o=l._chunkSize,l._offset=0,l._buffer=n.allocUnsafe(l._chunkSize)),0===f){if(a+=i-u,i=u,!c)return!0;var y=l._handle.write(e,t,a,i,l._buffer,l._offset,l._chunkSize);return y.callback=v,void(y.buffer=t)}if(!c)return!1;r()}}b.buffer=t,b.callback=v},a.inherits(w,T),a.inherits(m,T),a.inherits(_,T),a.inherits(E,T),a.inherits(x,T),a.inherits(k,T),a.inherits(I,T)}).call(this)}).call(this,t("_process"))},{"./binding":17,_process:78,assert:9,buffer:20,stream:94,util:102}],19:[function(t,e,r){arguments[4][16][0].apply(r,arguments)},{dup:16}],20:[function(t,e,r){(function(e){(function(){"use strict";var e=t("base64-js"),n=t("ieee754");r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50;var i=2147483647;function o(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return s(t,e,r)}function s(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|h(t,e),n=o(r),i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return l(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(j(t,ArrayBuffer)||t&&j(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return n.__proto__=a.prototype,n}(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return a.from(n,e,r);var i=function(t){if(a.isBuffer(t)){var e=0|c(t.length),r=o(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}if(void 0!==t.length)return"number"!=typeof t.length||F(t.length)?o(0):l(t);if("Buffer"===t.type&&Array.isArray(t.data))return l(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return u(t),o(t<0?0:0|c(t))}function l(t){for(var e=t.length<0?0:0|c(t.length),r=o(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function c(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function h(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||j(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return C(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return R(t).length;default:if(i)return n?-1:C(t).length;e=(""+e).toLowerCase(),i=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),F(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function f(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=r;o<s;o++)if(f(t,o)===f(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var c=!0,h=0;h<u;h++)if(f(t,o+h)!==f(e,h)){c=!1;break}if(c)return o}return-1}function y(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(F(s))return a;t[r+a]=s}return a}function b(t,e,r,n){return z(C(e,t.length-r),t,r,n)}function v(t,e,r,n){return z(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return v(t,e,r,n)}function m(t,e,r,n){return z(R(e),t,r,n)}function _(t,e,r,n){return z(function(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}(e,t.length-r),t,r,n)}function E(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function x(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,u,f=t[i],l=null,c=f>239?4:f>223?3:f>191?2:1;if(i+c<=r)switch(c){case 1:f<128&&(l=f);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&f)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&f)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&f)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,c=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=c}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=k));return r}(n)}r.kMaxLength=i,a.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(t,e,r){return s(t,e,r)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)}(t,e,r)},a.allocUnsafe=function(t){return f(t)},a.allocUnsafeSlow=function(t){return f(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if(j(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),j(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},a.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}},a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=a.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(j(o,Uint8Array)&&(o=a.from(o)),!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},a.byteLength=h,a.prototype._isBuffer=!0,a.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)p(this,e,e+1);return this},a.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)p(this,e,e+3),p(this,e+1,e+2);return this},a.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)p(this,e,e+7),p(this,e+1,e+6),p(this,e+2,e+5),p(this,e+3,e+4);return this},a.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?x(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},a.prototype.compare=function(t,e,r,n,i){if(j(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,s=r-e,u=Math.min(o,s),f=this.slice(n,i),l=t.slice(e,r),c=0;c<u;++c)if(f[c]!==l[c]){o=f[c],s=l[c];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return d(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return d(this,t,e,r,!1)},a.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 y(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return m(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function I(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 S(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 T(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+=B(t[o]);return i}function A(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 L(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}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 M(t,e,r,i,o){return e=+e,r>>>=0,o||D(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function O(t,e,r,i,o){return e=+e,r>>>=0,o||D(t,0,r,8),n.write(t,e,r,i,52,8),r+8}a.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=a.prototype,n},a.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},a.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},a.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.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 n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.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 o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||N(t,4,this.length),n.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),n.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),n.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),n.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},a.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,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},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(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},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(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},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return M(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return M(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return O(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return O(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(e,r,n);else if(this===t&&r<e&&e<n)for(var o=i-1;o>=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=a.isBuffer(t)?t:a.from(t,n),u=s.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=s[o%u]}return this};var U=/[^+/0-9A-Za-z-_]/g;function B(t){return t<16?"0"+t.toString(16):t.toString(16)}function C(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>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=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function R(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(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 j(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function F(t){return t!=t}}).call(this)}).call(this,t("buffer").Buffer)},{"base64-js":13,buffer:20,ieee754:52}],21:[function(t,e,r){(function(t){(function(){e.exports=new function(){var e,r=!1,n=this;n._DeArray=function(t,e,r){return[t.slice(e,e+r)]},n._EnArray=function(t,e,r,n){for(var i=0;i<r;t[e+i]=n[i]?n[i]:0,i++);},n._DeChar=function(t,e){return String.fromCharCode(t[e])},n._EnChar=function(t,e,r){t[e]=r.charCodeAt(0)},n._DeInt=function(t,n){var i,o,a,s=r?e.len-1:0,u=r?-1:1,f=s+u*e.len;for(i=0,o=s,a=1;o!=f;i+=t[n+o]*a,o+=u,a*=256);return e.bSigned&&i&Math.pow(2,8*e.len-1)&&(i-=Math.pow(2,8*e.len)),i},n._EnInt=function(t,n,i){var o,a=r?e.len-1:0,s=r?-1:1,u=a+s*e.len;for(i=i<e.min?e.min:i>e.max?e.max:i,o=a;o!=u;t[n+o]=255&i,o+=s,i>>=8);},n._DeString=function(t,e,r){for(var n=new Array(r),i=0;i<r;n[i]=String.fromCharCode(t[e+i]),i++);return n.join("")},n._EnString=function(t,e,r,n){for(var i,o=0;o<r;t[e+o]=(i=n.charCodeAt(o))?i:0,o++);},n._DeNullString=function(t,e,r,i){var o=n._DeString(t,e,r,i);return o.substring(0,o.length-1)},n._De754=function(t,n){var i,o,a,s,u,f,l,c,h,p;for(l=e.mLen,h=(p=(1<<(c=8*e.len-e.mLen-1))-1)>>1,s=r?0:e.len-1,u=r?1:-1,i=t[n+s],s+=u,o=i&(1<<-(f=-7))-1,i>>=-f,f+=c;f>0;o=256*o+t[n+s],s+=u,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=l;f>0;a=256*a+t[n+s],s+=u,f-=8);switch(o){case 0:o=1-h;break;case p:return a?NaN:1/0*(i?-1:1);default:a+=Math.pow(2,l),o-=h}return(i?-1:1)*a*Math.pow(2,o-l)},n._En754=function(t,n,i){var o,a,s,u,f,l,c,h,p,d;for(c=e.mLen,p=(d=(1<<(h=8*e.len-e.mLen-1))-1)>>1,o=i<0?1:0,i=Math.abs(i),isNaN(i)||i==1/0?(s=isNaN(i)?1:0,a=d):(a=Math.floor(Math.log(i)/Math.LN2),i*(l=Math.pow(2,-a))<1&&(a--,l*=2),(i+=a+p>=1?e.rt/l:e.rt*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=d?(s=0,a=d):a+p>=1?(s=(i*l-1)*Math.pow(2,c),a+=p):(s=i*Math.pow(2,p-1)*Math.pow(2,c),a=0)),u=r?e.len-1:0,f=r?-1:1;c>=8;t[n+u]=255&s,u+=f,s/=256,c-=8);for(a=a<<c|s,h+=c;h>0;t[n+u]=255&a,u+=f,a/=256,h-=8);t[n+u-f]|=128*o},n._sPattern="(\\d+)?([AxcbBhHsSfdiIlL])(\\(([a-zA-Z0-9]+)\\))?",n._lenLut={A:1,x:1,c:1,b:1,B:1,h:2,H:2,s:1,S:1,f:4,d:8,i:4,I:4,l:4,L:4},n._elLut={A:{en:n._EnArray,de:n._DeArray},s:{en:n._EnString,de:n._DeString},S:{en:n._EnString,de:n._DeNullString},c:{en:n._EnChar,de:n._DeChar},b:{en:n._EnInt,de:n._DeInt,len:1,bSigned:!0,min:-Math.pow(2,7),max:Math.pow(2,7)-1},B:{en:n._EnInt,de:n._DeInt,len:1,bSigned:!1,min:0,max:Math.pow(2,8)-1},h:{en:n._EnInt,de:n._DeInt,len:2,bSigned:!0,min:-Math.pow(2,15),max:Math.pow(2,15)-1},H:{en:n._EnInt,de:n._DeInt,len:2,bSigned:!1,min:0,max:Math.pow(2,16)-1},i:{en:n._EnInt,de:n._DeInt,len:4,bSigned:!0,min:-Math.pow(2,31),max:Math.pow(2,31)-1},I:{en:n._EnInt,de:n._DeInt,len:4,bSigned:!1,min:0,max:Math.pow(2,32)-1},l:{en:n._EnInt,de:n._DeInt,len:4,bSigned:!0,min:-Math.pow(2,31),max:Math.pow(2,31)-1},L:{en:n._EnInt,de:n._DeInt,len:4,bSigned:!1,min:0,max:Math.pow(2,32)-1},f:{en:n._En754,de:n._De754,len:4,mLen:23,rt:Math.pow(2,-24)-Math.pow(2,-77)},d:{en:n._En754,de:n._De754,len:8,mLen:52,rt:0}},n._UnpackSeries=function(t,r,n,i){for(var o=e.de,a=[],s=0;s<t;a.push(o(n,i+s*r)),s++);return a},n._PackSeries=function(t,r,n,i,o,a){for(var s=e.en,u=0;u<t;s(n,i+u*r,o[a+u]),u++);},n._zip=function(t,e){for(var r={},n=0;n<t.length;n++)r[t[n]]=e[n];return r},n.unpack=function(t,n,i){r="<"!=t.charAt(0),i=i||0;for(var o,a,s,u=new RegExp(this._sPattern,"g"),f=[],l=[];o=u.exec(t);){if(a=void 0==o[1]||""==o[1]?1:parseInt(o[1]),"S"===o[2]){for(a=0;0!==n[i+a];)a++;a++}if(i+a*(s=this._lenLut[o[2]])>n.length)return;switch(o[2]){case"A":case"s":case"S":l.push(this._elLut[o[2]].de(n,i,a));break;case"c":case"b":case"B":case"h":case"H":case"i":case"I":case"l":case"L":case"f":case"d":e=this._elLut[o[2]],l.push(this._UnpackSeries(a,s,n,i))}f.push(o[4]),i+=a*s}return l=Array.prototype.concat.apply([],l),-1!==f.indexOf(void 0)?l:this._zip(f,l)},n.packTo=function(t,n,i,o){r="<"!=t.charAt(0);for(var a,s,u,f,l=new RegExp(this._sPattern,"g"),c=0;a=l.exec(t);){if(s=void 0==a[1]||""==a[1]?1:parseInt(a[1]),"S"===a[2]&&(s=o[c].length+1),i+s*(u=this._lenLut[a[2]])>n.length)return!1;switch(a[2]){case"A":case"s":case"S":if(c+1>o.length)return!1;this._elLut[a[2]].en(n,i,s,o[c]),c+=1;break;case"c":case"b":case"B":case"h":case"H":case"i":case"I":case"l":case"L":case"f":case"d":if(e=this._elLut[a[2]],c+s>o.length)return!1;this._PackSeries(s,u,n,i,o,c),c+=s;break;case"x":for(f=0;f<s;f++)n[i+f]=0}i+=s*u}return n},n.pack=function(e,r){return this.packTo(e,new t(this.calcLength(e,r)),0,r)},n.calcLength=function(t,e){for(var r,n=new RegExp(this._sPattern,"g"),i=0,o=0;r=n.exec(t);){var a=(void 0==r[1]||""==r[1]?1:parseInt(r[1]))*this._lenLut[r[2]];"S"===r[2]&&(a=e[o].length+1),i+=a,o++}return i}}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:20}],22:[function(t,e,r){var n,i;n=this,i=function(t){"use strict";var e=function(t,r,i){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===r&&(r=e.DEFAULT_ENDIAN),void 0===i&&(i=e.DEFAULT_NOASSERT),!i){if((t|=0)<0)throw RangeError("Illegal capacity");r=!!r,i=!!i}this.buffer=0===t?n:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=r,this.noAssert=i};e.VERSION="5.0.1",e.LITTLE_ENDIAN=!0,e.BIG_ENDIAN=!1,e.DEFAULT_CAPACITY=16,e.DEFAULT_ENDIAN=e.BIG_ENDIAN,e.DEFAULT_NOASSERT=!1,e.Long=t||null;var r=e.prototype;r.__isByteBuffer__,Object.defineProperty(r,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var n=new ArrayBuffer(0),i=String.fromCharCode;function o(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function a(){var t=[],e=[];return function(){if(0===arguments.length)return e.join("")+i.apply(String,t);t.length+arguments.length>1024&&(e.push(i.apply(String,t)),t.length=0),Array.prototype.push.apply(t,arguments)}}function s(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,f=u>>1,l=-7,c=r?i-1:0,h=r?-1:1,p=t[e+c];for(c+=h,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+t[e+c],c+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+c],c+=h,l-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=f}return(p?-1:1)*a*Math.pow(2,o-n)}function u(t,e,r,n,i,o){var a,s,u,f=8*o-i-1,l=(1<<f)-1,c=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=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+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=l?(s=0,a=l):a+c>=1?(s=(e*u-1)*Math.pow(2,i),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;t[r+p]=255&a,p+=d,a/=256,f-=8);t[r+p-d]|=128*g}e.accessor=function(){return Uint8Array},e.allocate=function(t,r,n){return new e(t,r,n)},e.concat=function(t,r,n,i){"boolean"!=typeof r&&"string"==typeof r||(i=n,n=r,r=void 0);for(var o,a=0,s=0,u=t.length;s<u;++s)e.isByteBuffer(t[s])||(t[s]=e.wrap(t[s],r)),(o=t[s].limit-t[s].offset)>0&&(a+=o);if(0===a)return new e(0,n,i);var f,l=new e(a,n,i);for(s=0;s<u;)(o=(f=t[s++]).limit-f.offset)<=0||(l.view.set(f.view.subarray(f.offset,f.limit),l.offset),l.offset+=o);return l.limit=l.offset,l.offset=0,l},e.isByteBuffer=function(t){return!0===(t&&t.__isByteBuffer__)},e.type=function(){return ArrayBuffer},e.wrap=function(t,n,i,o){if("string"!=typeof n&&(o=i,i=n,n=void 0),"string"==typeof t)switch(void 0===n&&(n="utf8"),n){case"base64":return e.fromBase64(t,i);case"hex":return e.fromHex(t,i);case"binary":return e.fromBinary(t,i);case"utf8":return e.fromUTF8(t,i);case"debug":return e.fromDebug(t,i);default:throw Error("Unsupported encoding: "+n)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var a;if(e.isByteBuffer(t))return(a=r.clone.call(t)).markedOffset=-1,a;if(t instanceof Uint8Array)a=new e(0,i,o),t.length>0&&(a.buffer=t.buffer,a.offset=t.byteOffset,a.limit=t.byteOffset+t.byteLength,a.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)a=new e(0,i,o),t.byteLength>0&&(a.buffer=t,a.offset=0,a.limit=t.byteLength,a.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");(a=new e(t.length,i,o)).limit=t.length;for(var s=0;s<t.length;++s)a.view[s]=t[s]}return a},r.writeBitSet=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if(!(t instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e,o=t.length,a=o>>3,s=0;for(e+=this.writeVarint32(o,e);a--;)n=1&!!t[s++]|(1&!!t[s++])<<1|(1&!!t[s++])<<2|(1&!!t[s++])<<3|(1&!!t[s++])<<4|(1&!!t[s++])<<5|(1&!!t[s++])<<6|(1&!!t[s++])<<7,this.writeByte(n,e++);if(s<o){var u=0;for(n=0;s<o;)n|=(1&!!t[s++])<<u++;this.writeByte(n,e++)}return r?(this.offset=e,this):e-i},r.readBitSet=function(t){var e=void 0===t;e&&(t=this.offset);var r,n=this.readVarint32(t),i=n.value,o=i>>3,a=0,s=[];for(t+=n.length;o--;)r=this.readByte(t++),s[a++]=!!(1&r),s[a++]=!!(2&r),s[a++]=!!(4&r),s[a++]=!!(8&r),s[a++]=!!(16&r),s[a++]=!!(32&r),s[a++]=!!(64&r),s[a++]=!!(128&r);if(a<i){var u=0;for(r=this.readByte(t++);a<i;)s[a++]=!!(r>>u++&1)}return e&&(this.offset=t),s},r.readBytes=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+"+t+") <= "+this.buffer.byteLength)}var n=this.slice(e,e+t);return r&&(this.offset+=t),n},r.writeBytes=r.append,r.writeInt8=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=1,this.view[e]=t,r&&(this.offset+=1),this},r.writeByte=r.writeInt8,r.readInt8=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return 128==(128&r)&&(r=-(255-r+1)),e&&(this.offset+=1),r},r.readByte=r.readInt8,r.writeUint8=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=1;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=1,this.view[e]=t,r&&(this.offset+=1),this},r.writeUInt8=r.writeUint8,r.readUint8=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r=this.view[t];return e&&(this.offset+=1),r},r.readUInt8=r.readUint8,r.writeInt16=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),r&&(this.offset+=2),this},r.writeShort=r.writeInt16,r.readInt16=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t],r|=this.view[t+1]<<8):(r=this.view[t]<<8,r|=this.view[t+1]),32768==(32768&r)&&(r=-(65535-r+1)),e&&(this.offset+=2),r},r.readShort=r.readInt16,r.writeUint16=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=2;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=2,this.littleEndian?(this.view[e+1]=(65280&t)>>>8,this.view[e]=255&t):(this.view[e]=(65280&t)>>>8,this.view[e+1]=255&t),r&&(this.offset+=2),this},r.writeUInt16=r.writeUint16,r.readUint16=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+2>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+2) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t],r|=this.view[t+1]<<8):(r=this.view[t]<<8,r|=this.view[t+1]),e&&(this.offset+=2),r},r.readUInt16=r.readUint16,r.writeInt32=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),r&&(this.offset+=4),this},r.writeInt=r.writeInt32,r.readInt32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0),r|=0,e&&(this.offset+=4),r},r.readInt=r.readInt32,r.writeUint32=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,this.littleEndian?(this.view[e+3]=t>>>24&255,this.view[e+2]=t>>>16&255,this.view[e+1]=t>>>8&255,this.view[e]=255&t):(this.view[e]=t>>>24&255,this.view[e+1]=t>>>16&255,this.view[e+2]=t>>>8&255,this.view[e+3]=255&t),r&&(this.offset+=4),this},r.writeUInt32=r.writeUint32,r.readUint32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=0;return this.littleEndian?(r=this.view[t+2]<<16,r|=this.view[t+1]<<8,r|=this.view[t],r+=this.view[t+3]<<24>>>0):(r=this.view[t+1]<<16,r|=this.view[t+2]<<8,r|=this.view[t+3],r+=this.view[t]<<24>>>0),e&&(this.offset+=4),r},r.readUInt32=r.readUint32,t&&(r.writeInt64=function(e,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var o=e.low,a=e.high;return this.littleEndian?(this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o,r+=4,this.view[r+3]=a>>>24&255,this.view[r+2]=a>>>16&255,this.view[r+1]=a>>>8&255,this.view[r]=255&a):(this.view[r]=a>>>24&255,this.view[r+1]=a>>>16&255,this.view[r+2]=a>>>8&255,this.view[r+3]=255&a,r+=4,this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o),n&&(this.offset+=8),this},r.writeLong=r.writeInt64,r.readInt64=function(e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var o=new t(n,i,!1);return r&&(this.offset+=8),o},r.readLong=r.readInt64,r.writeUint64=function(e,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"==typeof e)e=t.fromNumber(e);else if("string"==typeof e)e=t.fromString(e);else if(!(e&&e instanceof t))throw TypeError("Illegal value: "+e+" (not an integer or Long)");if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e)),r+=8;var i=this.buffer.byteLength;r>i&&this.resize((i*=2)>r?i:r),r-=8;var o=e.low,a=e.high;return this.littleEndian?(this.view[r+3]=o>>>24&255,this.view[r+2]=o>>>16&255,this.view[r+1]=o>>>8&255,this.view[r]=255&o,r+=4,this.view[r+3]=a>>>24&255,this.view[r+2]=a>>>16&255,this.view[r+1]=a>>>8&255,this.view[r]=255&a):(this.view[r]=a>>>24&255,this.view[r+1]=a>>>16&255,this.view[r+2]=a>>>8&255,this.view[r+3]=255&a,r+=4,this.view[r]=o>>>24&255,this.view[r+1]=o>>>16&255,this.view[r+2]=o>>>8&255,this.view[r+3]=255&o),n&&(this.offset+=8),this},r.writeUInt64=r.writeUint64,r.readUint64=function(e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+8) <= "+this.buffer.byteLength)}var n=0,i=0;this.littleEndian?(n=this.view[e+2]<<16,n|=this.view[e+1]<<8,n|=this.view[e],n+=this.view[e+3]<<24>>>0,e+=4,i=this.view[e+2]<<16,i|=this.view[e+1]<<8,i|=this.view[e],i+=this.view[e+3]<<24>>>0):(i=this.view[e+1]<<16,i|=this.view[e+2]<<8,i|=this.view[e+3],i+=this.view[e]<<24>>>0,e+=4,n=this.view[e+1]<<16,n|=this.view[e+2]<<8,n|=this.view[e+3],n+=this.view[e]<<24>>>0);var o=new t(n,i,!0);return r&&(this.offset+=8),o},r.readUInt64=r.readUint64),r.writeFloat32=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=4;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=4,u(this.view,t,e,this.littleEndian,23,4),r&&(this.offset+=4),this},r.writeFloat=r.writeFloat32,r.readFloat32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=s(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),r},r.readFloat=r.readFloat32,r.writeFloat64=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof t)throw TypeError("Illegal value: "+t+" (not a number)");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}e+=8;var n=this.buffer.byteLength;return e>n&&this.resize((n*=2)>e?n:e),e-=8,u(this.view,t,e,this.littleEndian,52,8),r&&(this.offset+=8),this},r.writeDouble=r.writeFloat64,r.readFloat64=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=s(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),r},r.readDouble=r.readFloat64,e.MAX_VARINT32_BYTES=5,e.calculateVarint32=function(t){return(t>>>=0)<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},e.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},e.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},r.writeVarint32=function(t,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=e.calculateVarint32(t);r+=o;var a=this.buffer.byteLength;for(r>a&&this.resize((a*=2)>r?a:r),r-=o,t>>>=0;t>=128;)i=127&t|128,this.view[r++]=i,t>>>=7;return this.view[r++]=t,n?(this.offset=r,this):o},r.writeVarint32ZigZag=function(t,r){return this.writeVarint32(e.zigZagEncode32(t),r)},r.readVarint32=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=0,i=0;do{if(!this.noAssert&&t>this.limit){var o=Error("Truncated");throw o.truncated=!0,o}r=this.view[t++],n<5&&(i|=(127&r)<<7*n),++n}while(0!=(128&r));return i|=0,e?(this.offset=t,i):{value:i,length:n}},r.readVarint32ZigZag=function(t){var r=this.readVarint32(t);return"object"==typeof r?r.value=e.zigZagDecode32(r.value):r=e.zigZagDecode32(r),r},t&&(e.MAX_VARINT64_BYTES=10,e.calculateVarint64=function(e){"number"==typeof e?e=t.fromNumber(e):"string"==typeof e&&(e=t.fromString(e));var r=e.toInt()>>>0,n=e.shiftRightUnsigned(28).toInt()>>>0,i=e.shiftRightUnsigned(56).toInt()>>>0;return 0==i?0==n?r<16384?r<128?1:2:r<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:i<128?9:10},e.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},e.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},r.writeVarint64=function(r,n){var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof r)r=t.fromNumber(r);else if("string"==typeof r)r=t.fromString(r);else if(!(r&&r instanceof t))throw TypeError("Illegal value: "+r+" (not an integer or Long)");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof r?r=t.fromNumber(r,!1):"string"==typeof r?r=t.fromString(r,!1):!1!==r.unsigned&&(r=r.toSigned());var o=e.calculateVarint64(r),a=r.toInt()>>>0,s=r.shiftRightUnsigned(28).toInt()>>>0,u=r.shiftRightUnsigned(56).toInt()>>>0;n+=o;var f=this.buffer.byteLength;switch(n>f&&this.resize((f*=2)>n?f:n),n-=o,o){case 10:this.view[n+9]=u>>>7&1;case 9:this.view[n+8]=9!==o?128|u:127&u;case 8:this.view[n+7]=8!==o?s>>>21|128:s>>>21&127;case 7:this.view[n+6]=7!==o?s>>>14|128:s>>>14&127;case 6:this.view[n+5]=6!==o?s>>>7|128:s>>>7&127;case 5:this.view[n+4]=5!==o?128|s:127&s;case 4:this.view[n+3]=4!==o?a>>>21|128:a>>>21&127;case 3:this.view[n+2]=3!==o?a>>>14|128:a>>>14&127;case 2:this.view[n+1]=2!==o?a>>>7|128:a>>>7&127;case 1:this.view[n]=1!==o?128|a:127&a}return i?(this.offset+=o,this):o},r.writeVarint64ZigZag=function(t,r){return this.writeVarint64(e.zigZagEncode64(t),r)},r.readVarint64=function(e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,i=0,o=0,a=0,s=0;if(i=127&(s=this.view[e++]),128&s&&(i|=(127&(s=this.view[e++]))<<7,(128&s||this.noAssert&&void 0===s)&&(i|=(127&(s=this.view[e++]))<<14,(128&s||this.noAssert&&void 0===s)&&(i|=(127&(s=this.view[e++]))<<21,(128&s||this.noAssert&&void 0===s)&&(o=127&(s=this.view[e++]),(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[e++]))<<7,(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[e++]))<<14,(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[e++]))<<21,(128&s||this.noAssert&&void 0===s)&&(a=127&(s=this.view[e++]),(128&s||this.noAssert&&void 0===s)&&(a|=(127&(s=this.view[e++]))<<7,128&s||this.noAssert&&void 0===s))))))))))throw Error("Buffer overrun");var u=t.fromBits(i|o<<28,o>>>4|a<<24,!1);return r?(this.offset=e,u):{value:u,length:e-n}},r.readVarint64ZigZag=function(r){var n=this.readVarint64(r);return n&&n.value instanceof t?n.value=e.zigZagDecode64(n.value):n=e.zigZagDecode64(n),n}),r.writeCString=function(t,e){var r=void 0===e;r&&(e=this.offset);var n,i=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(n=0;n<i;++n)if(0===t.charCodeAt(n))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}i=l.calculateUTF16asUTF8(o(t))[1],e+=i+1;var a=this.buffer.byteLength;return e>a&&this.resize((a*=2)>e?a:e),e-=i+1,l.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),this.view[e++]=0,r?(this.offset=e,this):i},r.readCString=function(t){var e=void 0===t;if(e&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=t,i=-1;return l.decodeUTF8toUTF16(function(){if(0===i)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return 0===(i=this.view[t++])?null:i}.bind(this),r=a(),!0),e?(this.offset=t,r()):{string:r(),length:t-n}},r.writeIString=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e;n=l.calculateUTF16asUTF8(o(t),this.noAssert)[1],e+=4+n;var a=this.buffer.byteLength;if(e>a&&this.resize((a*=2)>e?a:e),e-=4+n,this.littleEndian?(this.view[e+3]=n>>>24&255,this.view[e+2]=n>>>16&255,this.view[e+1]=n>>>8&255,this.view[e]=255&n):(this.view[e]=n>>>24&255,this.view[e+1]=n>>>16&255,this.view[e+2]=n>>>8&255,this.view[e+3]=255&n),e+=4,l.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),e!==i+4+n)throw RangeError("Illegal range: Truncated data, "+e+" == "+(e+4+n));return r?(this.offset=e,this):e-i},r.readIString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=t,i=this.readUint32(t),o=this.readUTF8String(i,e.METRICS_BYTES,t+=4);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},e.METRICS_CHARS="c",e.METRICS_BYTES="b",r.writeUTF8String=function(t,e){var r,n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var i=e;r=l.calculateUTF16asUTF8(o(t))[1],e+=r;var a=this.buffer.byteLength;return e>a&&this.resize((a*=2)>e?a:e),e-=r,l.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),n?(this.offset=e,this):e-i},r.writeString=r.writeUTF8String,e.calculateUTF8Chars=function(t){return l.calculateUTF16asUTF8(o(t))[0]},e.calculateUTF8Bytes=function(t){return l.calculateUTF16asUTF8(o(t))[1]},e.calculateString=e.calculateUTF8Bytes,r.readUTF8String=function(t,r,n){"number"==typeof r&&(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),void 0===r&&(r=e.METRICS_CHARS),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal length: "+t+" (not an integer)");if(t|=0,"number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var o,s=0,u=n;if(r===e.METRICS_CHARS){if(o=a(),l.decodeUTF8(function(){return s<t&&n<this.limit?this.view[n++]:null}.bind(this),function(t){++s,l.UTF8toUTF16(t,o)}),s!==t)throw RangeError("Illegal range: Truncated data, "+s+" == "+t);return i?(this.offset=n,o()):{string:o(),length:n-u}}if(r===e.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+t>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+"+t+") <= "+this.buffer.byteLength)}var f=n+t;if(l.decodeUTF8toUTF16(function(){return n<f?this.view[n++]:null}.bind(this),o=a(),this.noAssert),n!==f)throw RangeError("Illegal range: Truncated data, "+n+" == "+f);return i?(this.offset=n,o()):{string:o(),length:n-u}}throw TypeError("Unsupported metrics: "+r)},r.readString=r.readUTF8String,r.writeVString=function(t,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,a,s=r;i=l.calculateUTF16asUTF8(o(t),this.noAssert)[1],a=e.calculateVarint32(i),r+=a+i;var u=this.buffer.byteLength;if(r>u&&this.resize((u*=2)>r?u:r),r-=a+i,r+=this.writeVarint32(i,r),l.encodeUTF16toUTF8(o(t),function(t){this.view[r++]=t}.bind(this)),r!==s+i+a)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+i+a));return n?(this.offset=r,this):r-s},r.readVString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=t,i=this.readVarint32(t),o=this.readUTF8String(i.value,e.METRICS_BYTES,t+=i.length);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},r.append=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;n+=o;var a=this.buffer.byteLength;return n>a&&this.resize((a*=2)>n?a:n),n-=o,this.view.set(t.view.subarray(t.offset,t.limit),n),t.offset+=o,i&&(this.offset+=o),this},r.appendTo=function(t,e){return t.append(this,e),this},r.assert=function(t){return this.noAssert=!t,this},r.capacity=function(){return this.buffer.byteLength},r.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},r.clone=function(t){var r=new e(0,this.littleEndian,this.noAssert);return t?(r.buffer=new ArrayBuffer(this.buffer.byteLength),r.view=new Uint8Array(r.buffer)):(r.buffer=this.buffer,r.view=this.view),r.offset=this.offset,r.markedOffset=this.markedOffset,r.limit=this.limit,r},r.compact=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}if(0===t&&e===this.buffer.byteLength)return this;var r=e-t;if(0===r)return this.buffer=n,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var i=new ArrayBuffer(r),o=new Uint8Array(i);return o.set(this.view.subarray(t,e)),this.buffer=i,this.view=o,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=r,this},r.copy=function(t,r){if(void 0===t&&(t=this.offset),void 0===r&&(r=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,t<0||t>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+r+" <= "+this.buffer.byteLength)}if(t===r)return new e(0,this.littleEndian,this.noAssert);var n=r-t,i=new e(n,this.littleEndian,this.noAssert);return i.offset=0,i.limit=n,i.markedOffset>=0&&(i.markedOffset-=t),this.copyTo(i,0,t,r),i},r.copyTo=function(t,r,n,i){var o,a;if(!this.noAssert&&!e.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(r=(a=void 0===r)?t.offset:0|r,n=(o=void 0===n)?this.offset:0|n,i=void 0===i?this.limit:0|i,r<0||r>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+r+" <= "+t.buffer.byteLength);if(n<0||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var s=i-n;return 0===s?t:(t.ensureCapacity(r+s),t.view.set(this.view.subarray(n,i),r),o&&(this.offset+=s),a&&(t.offset+=s),this)},r.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},r.fill=function(t,e,r){var n=void 0===e;if(n&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),void 0===e&&(e=this.offset),void 0===r&&(r=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal begin: Not an integer");if(e>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,e<0||e>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+r+" <= "+this.buffer.byteLength)}if(e>=r)return this;for(;e<r;)this.view[e++]=t;return n&&(this.offset=e),this},r.flip=function(){return this.limit=this.offset,this.offset=0,this},r.mark=function(t){if(t=void 0===t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},r.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},r.LE=function(t){return this.littleEndian=void 0===t||!!t,this},r.BE=function(t){return this.littleEndian=void 0!==t&&!t,this},r.prepend=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;var a=o-n;if(a>0){var s=new ArrayBuffer(this.buffer.byteLength+a),u=new Uint8Array(s);u.set(this.view.subarray(n,this.buffer.byteLength),o),this.buffer=s,this.view=u,this.offset+=a,this.markedOffset>=0&&(this.markedOffset+=a),this.limit+=a,n+=a}else new Uint8Array(this.buffer);return this.view.set(t.view.subarray(t.offset,t.limit),n-o),t.offset=t.limit,i&&(this.offset-=o),this},r.prependTo=function(t,e){return t.prepend(this,e),this},r.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},r.remaining=function(){return this.limit-this.offset},r.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},r.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if((t|=0)<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength<t){var e=new ArrayBuffer(t),r=new Uint8Array(e);r.set(this.view),this.buffer=e,this.view=r}return this},r.reverse=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}return t===e?this:(Array.prototype.reverse.call(this.view.subarray(t,e)),this)},r.skip=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal length: "+t+" (not an integer)");t|=0}var e=this.offset+t;if(!this.noAssert&&(e<0||e>this.buffer.byteLength))throw RangeError("Illegal length: 0 <= "+this.offset+" + "+t+" <= "+this.buffer.byteLength);return this.offset=e,this},r.slice=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var r=this.clone();return r.offset=t,r.limit=e,r},r.toBuffer=function(t){var e=this.offset,r=this.limit;if(!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: Not an integer");if(e>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal limit: Not an integer");if(r>>>=0,e<0||e>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+e+" <= "+r+" <= "+this.buffer.byteLength)}if(!t&&0===e&&r===this.buffer.byteLength)return this.buffer;if(e===r)return n;var i=new ArrayBuffer(r-e);return new Uint8Array(i).set(new Uint8Array(this.buffer).subarray(e,r),0),i},r.toArrayBuffer=r.toBuffer,r.toString=function(t,e,r){if(void 0===t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(r=e=t="utf8"),t){case"utf8":return this.toUTF8(e,r);case"base64":return this.toBase64(e,r);case"hex":return this.toHex(e,r);case"binary":return this.toBinary(e,r);case"debug":return this.toDebug();case"columns":return this.toColumns();default:throw Error("Unsupported encoding: "+t)}};var f=function(){for(var t={},e=[65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47],r=[],n=0,i=e.length;n<i;++n)r[e[n]]=n;return t.encode=function(t,r){for(var n,i;null!==(n=t());)r(e[n>>2&63]),i=(3&n)<<4,null!==(n=t())?(r(e[63&((i|=n>>4&15)|n>>4&15)]),i=(15&n)<<2,null!==(n=t())?(r(e[63&(i|n>>6&3)]),r(e[63&n])):(r(e[63&i]),r(61))):(r(e[63&i]),r(61),r(61))},t.decode=function(t,e){var n,i,o;function a(t){throw Error("Illegal character code: "+t)}for(;null!==(n=t());)if(void 0===(i=r[n])&&a(n),null!==(n=t())&&(void 0===(o=r[n])&&a(n),e(i<<2>>>0|(48&o)>>4),null!==(n=t()))){if(void 0===(i=r[n])){if(61===n)break;a(n)}if(e((15&o)<<4>>>0|(60&i)>>2),null!==(n=t())){if(void 0===(o=r[n])){if(61===n)break;a(n)}e((3&i)<<6>>>0|o)}}},t.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)},t}();r.toBase64=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity||t>e)throw RangeError("begin, end");var r;return f.encode(function(){return t<e?this.view[t++]:null}.bind(this),r=a()),r()},e.fromBase64=function(t,r){if("string"!=typeof t)throw TypeError("str");var n=new e(t.length/4*3,r),i=0;return f.decode(o(t),function(t){n.view[i++]=t}),n.limit=i,n},e.btoa=function(t){return e.fromBinary(t).toBase64()},e.atob=function(t){return e.fromBase64(t).toBinary()},r.toBinary=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var r=[],n=[];t<e;)r.push(this.view[t++]),r.length>=1024&&(n.push(String.fromCharCode.apply(String,r)),r=[]);return n.join("")+String.fromCharCode.apply(String,r)},e.fromBinary=function(t,r){if("string"!=typeof t)throw TypeError("str");for(var n,i=0,o=t.length,a=new e(o,r);i<o;){if((n=t.charCodeAt(i))>255)throw RangeError("illegal char code: "+n);a.view[i++]=n}return a.limit=o,a},r.toDebug=function(t){for(var e,r=-1,n=this.buffer.byteLength,i="",o="",a="";r<n;){if(-1!==r&&(i+=(e=this.view[r])<16?"0"+e.toString(16).toUpperCase():e.toString(16).toUpperCase(),t&&(o+=e>32&&e<127?String.fromCharCode(e):".")),++r,t&&r>0&&r%16==0&&r!==n){for(;i.length<51;)i+=" ";a+=i+o+"\n",i=o=""}r===this.offset&&r===this.limit?i+=r===this.markedOffset?"!":"|":r===this.offset?i+=r===this.markedOffset?"[":"<":r===this.limit?i+=r===this.markedOffset?"]":">":i+=r===this.markedOffset?"'":t||0!==r&&r!==n?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";a+=i+o+"\n"}return t?a:i},e.fromDebug=function(t,r,n){for(var i,o,a=t.length,s=new e((a+1)/3|0,r,n),u=0,f=0,l=!1,c=!1,h=!1,p=!1,d=!1;u<a;){switch(i=t.charAt(u++)){case"!":if(!n){if(c||h||p){d=!0;break}c=h=p=!0}s.offset=s.markedOffset=s.limit=f,l=!1;break;case"|":if(!n){if(c||p){d=!0;break}c=p=!0}s.offset=s.limit=f,l=!1;break;case"[":if(!n){if(c||h){d=!0;break}c=h=!0}s.offset=s.markedOffset=f,l=!1;break;case"<":if(!n){if(c){d=!0;break}c=!0}s.offset=f,l=!1;break;case"]":if(!n){if(p||h){d=!0;break}p=h=!0}s.limit=s.markedOffset=f,l=!1;break;case">":if(!n){if(p){d=!0;break}p=!0}s.limit=f,l=!1;break;case"'":if(!n){if(h){d=!0;break}h=!0}s.markedOffset=f,l=!1;break;case" ":l=!1;break;default:if(!n&&l){d=!0;break}if(o=parseInt(i+t.charAt(u++),16),!n&&(isNaN(o)||o<0||o>255))throw TypeError("Illegal str: Not a debug encoded string");s.view[f++]=o,l=!0}if(d)throw TypeError("Illegal str: Invalid symbol at "+u)}if(!n){if(!c||!p)throw TypeError("Illegal str: Missing offset or limit");if(f<s.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+f+" < "+a)}return s},r.toHex=function(t,e){if(t=void 0===t?this.offset:t,e=void 0===e?this.limit:e,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}for(var r,n=new Array(e-t);t<e;)(r=this.view[t++])<16?n.push("0",r.toString(16)):n.push(r.toString(16));return n.join("")},e.fromHex=function(t,r,n){if(!n){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if(t.length%2!=0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var i,o=t.length,a=new e(o/2|0,r),s=0,u=0;s<o;s+=2){if(i=parseInt(t.substring(s,s+2),16),!n&&(!isFinite(i)||i<0||i>255))throw TypeError("Illegal str: Contains non-hex characters");a.view[u++]=i}return a.limit=u,a};var l=function(){var t={MAX_CODEPOINT:1114111,encodeUTF8:function(t,e){var r=null;for("number"==typeof t&&(r=t,t=function(){return null});null!==r||null!==(r=t());)r<128?e(127&r):r<2048?(e(r>>6&31|192),e(63&r|128)):r<65536?(e(r>>12&15|224),e(r>>6&63|128),e(63&r|128)):(e(r>>18&7|240),e(r>>12&63|128),e(r>>6&63|128),e(63&r|128)),r=null},decodeUTF8:function(t,e){for(var r,n,i,o,a=function(t){t=t.slice(0,t.indexOf(null));var e=Error(t.toString());throw e.name="TruncatedError",e.bytes=t,e};null!==(r=t());)if(0==(128&r))e(r);else if(192==(224&r))null===(n=t())&&a([r,n]),e((31&r)<<6|63&n);else if(224==(240&r))(null===(n=t())||null===(i=t()))&&a([r,n,i]),e((15&r)<<12|(63&n)<<6|63&i);else{if(240!=(248&r))throw RangeError("Illegal starting byte: "+r);(null===(n=t())||null===(i=t())||null===(o=t()))&&a([r,n,i,o]),e((7&r)<<18|(63&n)<<12|(63&i)<<6|63&o)}},UTF16toUTF8:function(t,e){for(var r,n=null;null!==(r=null!==n?n:t());)r>=55296&&r<=57343&&null!==(n=t())&&n>=56320&&n<=57343?(e(1024*(r-55296)+n-56320+65536),n=null):e(r);null!==n&&e(n)},UTF8toUTF16:function(t,e){var r=null;for("number"==typeof t&&(r=t,t=function(){return null});null!==r||null!==(r=t());)r<=65535?e(r):(e(55296+((r-=65536)>>10)),e(r%1024+56320)),r=null},encodeUTF16toUTF8:function(e,r){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,r)})},decodeUTF8toUTF16:function(e,r){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,r)})},calculateCodePoint:function(t){return t<128?1:t<2048?2:t<65536?3:4},calculateUTF8:function(t){for(var e,r=0;null!==(e=t());)r+=e<128?1:e<2048?2:e<65536?3:4;return r},calculateUTF16asUTF8:function(e){var r=0,n=0;return t.UTF16toUTF8(e,function(t){++r,n+=t<128?1:t<2048?2:t<65536?3:4}),[r,n]}};return t}();return r.toUTF8=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,t<0||t>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+e+" <= "+this.buffer.byteLength)}var r;try{l.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),r=a())}catch(r){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return r()},e.fromUTF8=function(t,r,n){if(!n&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var i=new e(l.calculateUTF16asUTF8(o(t),!0)[1],r,n),a=0;return l.encodeUTF16toUTF8(o(t),function(t){i.view[a++]=t}),i.limit=a,i},e},"function"==typeof t&&"object"==typeof e&&e&&e.exports?e.exports=function(){var e;try{e=t("long")}catch(t){}return i(e)}():(n.dcodeIO=n.dcodeIO||{}).ByteBuffer=i(n.dcodeIO.Long)},{long:23}],23:[function(t,e,r){var n,i;n=this,i=function(){"use strict";function t(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var r={},n={};function i(t,e){var i,o,s;return e?(s=0<=(t>>>=0)&&t<256)&&(o=n[t])?o:(i=a(t,(0|t)<0?-1:0,!0),s&&(n[t]=i),i):(s=-128<=(t|=0)&&t<128)&&(o=r[t])?o:(i=a(t,t<0?-1:0,!1),s&&(r[t]=i),i)}function o(t,e){if(isNaN(t)||!isFinite(t))return e?g:d;if(e){if(t<0)return g;if(t>=c)return m}else{if(t<=-h)return _;if(t+1>=h)return w}return t<0?o(-t,e).neg():a(t%l|0,t/l|0,e)}function a(e,r,n){return new t(e,r,n)}t.fromInt=i,t.fromNumber=o,t.fromBits=a;var s=Math.pow;function u(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return d;if("number"==typeof e?(r=e,e=!1):e=!!e,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return u(t.substring(1),e,r).neg();for(var i=o(s(r,8)),a=d,f=0;f<t.length;f+=8){var l=Math.min(8,t.length-f),c=parseInt(t.substring(f,f+l),r);if(l<8){var h=o(s(r,l));a=a.mul(h).add(o(c))}else a=(a=a.mul(i)).add(o(c))}return a.unsigned=e,a}function f(e){return e instanceof t?e:"number"==typeof e?o(e):"string"==typeof e?u(e):a(e.low,e.high,e.unsigned)}t.fromString=u,t.fromValue=f;var l=4294967296,c=l*l,h=c/2,p=i(1<<24),d=i(0);t.ZERO=d;var g=i(0,!0);t.UZERO=g;var y=i(1);t.ONE=y;var b=i(1,!0);t.UONE=b;var v=i(-1);t.NEG_ONE=v;var w=a(-1,2147483647,!1);t.MAX_VALUE=w;var m=a(-1,-1,!0);t.MAX_UNSIGNED_VALUE=m;var _=a(0,-2147483648,!1);t.MIN_VALUE=_;var E=t.prototype;return E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*l+(this.low>>>0):this.high*l+(this.low>>>0)},E.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(_)){var e=o(t),r=this.div(e),n=r.mul(e).sub(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=o(s(t,6),this.unsigned),a=this,u="";;){var f=a.div(i),l=(a.sub(f.mul(i)).toInt()>>>0).toString(t);if((a=f).isZero())return l+u;for(;l.length<6;)l="0"+l;u=""+l+u}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(_)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<<e);e--);return 0!=this.high?e+33:e+1},E.isZero=function(){return 0===this.high&&0===this.low},E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return 1==(1&this.low)},E.isEven=function(){return 0==(1&this.low)},E.equals=function(t){return e(t)||(t=f(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},E.eq=E.equals,E.notEquals=function(t){return!this.eq(t)},E.neq=E.notEquals,E.lessThan=function(t){return this.comp(t)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(t){return this.comp(t)<=0},E.lte=E.lessThanOrEqual,E.greaterThan=function(t){return this.comp(t)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(t){return this.comp(t)>=0},E.gte=E.greaterThanOrEqual,E.compare=function(t){if(e(t)||(t=f(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(_)?_:this.not().add(y)},E.neg=E.negate,E.add=function(t){e(t)||(t=f(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,u=65535&t.high,l=t.low>>>16,c=0,h=0,p=0,d=0;return p+=(d+=o+(65535&t.low))>>>16,h+=(p+=i+l)>>>16,c+=(h+=n+u)>>>16,c+=r+s,a((p&=65535)<<16|(d&=65535),(c&=65535)<<16|(h&=65535),this.unsigned)},E.subtract=function(t){return e(t)||(t=f(t)),this.add(t.neg())},E.sub=E.subtract,E.multiply=function(t){if(this.isZero())return d;if(e(t)||(t=f(t)),t.isZero())return d;if(this.eq(_))return t.isOdd()?_:d;if(t.eq(_))return this.isOdd()?_:d;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(p)&&t.lt(p))return o(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,s=65535&this.low,u=t.high>>>16,l=65535&t.high,c=t.low>>>16,h=65535&t.low,g=0,y=0,b=0,v=0;return b+=(v+=s*h)>>>16,y+=(b+=i*h)>>>16,b&=65535,y+=(b+=s*c)>>>16,g+=(y+=n*h)>>>16,y&=65535,g+=(y+=i*c)>>>16,y&=65535,g+=(y+=s*l)>>>16,g+=r*h+n*c+i*l+s*u,a((b&=65535)<<16|(v&=65535),(g&=65535)<<16|(y&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(t){if(e(t)||(t=f(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?g:d;var r,n,i;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return g;if(t.gt(this.shru(1)))return b;i=g}else{if(this.eq(_))return t.eq(y)||t.eq(v)?_:t.eq(_)?y:(r=this.shr(1).div(t).shl(1)).eq(d)?t.isNegative()?y:v:(n=this.sub(t.mul(r)),i=r.add(n.div(t)));else if(t.eq(_))return this.unsigned?g:d;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();i=d}for(n=this;n.gte(t);){r=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),u=a<=48?1:s(2,a-48),l=o(r),c=l.mul(t);c.isNegative()||c.gt(n);)c=(l=o(r-=u,this.unsigned)).mul(t);l.isZero()&&(l=y),i=i.add(l),n=n.sub(c)}return i},E.div=E.divide,E.modulo=function(t){return e(t)||(t=f(t)),this.sub(this.div(t).mul(t))},E.mod=E.modulo,E.not=function(){return a(~this.low,~this.high,this.unsigned)},E.and=function(t){return e(t)||(t=f(t)),a(this.low&t.low,this.high&t.high,this.unsigned)},E.or=function(t){return e(t)||(t=f(t)),a(this.low|t.low,this.high|t.high,this.unsigned)},E.xor=function(t){return e(t)||(t=f(t)),a(this.low^t.low,this.high^t.high,this.unsigned)},E.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):a(0,this.low<<t-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):a(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0===(t&=63))return this;var r=this.high;return t<32?a(this.low>>>t|r<<32-t,r>>>t,this.unsigned):a(32===t?r:r>>>t-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},E.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},E.toBytesLE=function(){var t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24&255,255&t,t>>>8&255,t>>>16&255,t>>>24&255]},E.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24&255,t>>>16&255,t>>>8&255,255&t,e>>>24&255,e>>>16&255,e>>>8&255,255&e]},t},"function"==typeof t&&"object"==typeof e&&e&&e.exports?e.exports=i():(n.dcodeIO=n.dcodeIO||{}).Long=i()},{}],24:[function(t,e,r){(function(r){(function(){"use strict";(function(){var n,i,o,a,s,u,f,l=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1};s=t("stream-to-buffer"),n=t("bufferpack"),u=t("streamifier"),f=t("zlib"),i=t("crc"),o=["CgBI","iDOT"],e.exports=function(t,e){return s(t,function(t,r){var n;if(t)return e(t);try{return n=a(r),e(null,u.createReadStream(n))}catch(t){return e(t)}})},e.exports.revert=a=function(t){let e,a,s,u,c,h,p,d,g,y,b,v,w,m,_,E=!1,x=0,k=[],I=new r(0),S=t.slice(0,8);if(x+=8,"iVBORw0KGgo="!==S.toString("base64"))throw new Error("not a png file");for(;x<t.length;){u={};let S=t.slice(x,x+4);x+=4,u.length=n.unpack("L>",S,0)[0],S=t.slice(x,x+4),x+=4,u.type=S.toString(),u.data=S=t.slice(x,x+u.length),x+=u.length;let T=t.slice(x,x+4);if(x+=4,u.crc=n.unpack("L>",T,0)[0],"CgBI"===u.type&&(E=!0),e=u.type,!(l.call(o,e)>=0))if("IHDR"===u.type&&(a=n.unpack("L>",S)[0],s=n.unpack("L>",S,4)[0]),"IDAT"===u.type&&E)I=r.concat([I,S]);else{if("IEND"===u.type&&E){c=f.inflateRawSync(I),h=new r(c.length);let t=0;for(d=p=0,g=s-1;0<=g?p<=g:p>=g;d=0<=g?++p:--p)for(h[t]=c[t],t++,v=b=0,y=a-1;0<=y?b<=y:b>=y;v=0<=y?++b:--b)h[t+0]=c[t+2],h[t+1]=c[t+1],h[t+2]=c[t+0],h[t+3]=c[t+3],t+=4;w=f.deflateSync(h),m=i.crc32("IDAT"),m=((m=i.crc32(w,m))+4294967296)%4294967296,_={type:"IDAT",length:w.length,data:w,crc:m},k.push(_)}k.push(u)}}let T=S;for(let t=0,e=k.length;t<e;t++)u=k[t],T=r.concat([T,n.pack("L>",[u.length])]),T=r.concat([T,new r(u.type)]),u.length>0&&(T=r.concat([T,new r(u.data)])),T=r.concat([T,n.pack("L>",[u.crc])]);return T}}).call(this)}).call(this)}).call(this,t("buffer").Buffer)},{buffer:20,bufferpack:21,crc:50,"stream-to-buffer":95,streamifier:97,zlib:18}],25:[function(t,e,r){(function(t){(function(){function e(t){return Object.prototype.toString.call(t)}r.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},r.isBoolean=function(t){return"boolean"==typeof t},r.isNull=function(t){return null===t},r.isNullOrUndefined=function(t){return null==t},r.isNumber=function(t){return"number"==typeof t},r.isString=function(t){return"string"==typeof t},r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=function(t){return void 0===t},r.isRegExp=function(t){return"[object RegExp]"===e(t)},r.isObject=function(t){return"object"==typeof t&&null!==t},r.isDate=function(t){return"[object Date]"===e(t)},r.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},r.isFunction=function(t){return"function"==typeof t},r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t.isBuffer}).call(this)}).call(this,{isBuffer:t("../../is-buffer/index.js")})},{"../../is-buffer/index.js":54}],26:[function(t,e,r){"use strict";e.exports=t("./es6/crc1").default},{"./es6/crc1":37}],27:[function(t,e,r){"use strict";e.exports=t("./es6/crc16").default},{"./es6/crc16":38}],28:[function(t,e,r){"use strict";e.exports=t("./es6/crc16ccitt").default},{"./es6/crc16ccitt":39}],29:[function(t,e,r){"use strict";e.exports=t("./es6/crc16kermit").default},{"./es6/crc16kermit":40}],30:[function(t,e,r){"use strict";e.exports=t("./es6/crc16modbus").default},{"./es6/crc16modbus":41}],31:[function(t,e,r){"use strict";e.exports=t("./es6/crc16xmodem").default},{"./es6/crc16xmodem":42}],32:[function(t,e,r){"use strict";e.exports=t("./es6/crc24").default},{"./es6/crc24":43}],33:[function(t,e,r){"use strict";e.exports=t("./es6/crc32").default},{"./es6/crc32":44}],34:[function(t,e,r){"use strict";e.exports=t("./es6/crc8").default},{"./es6/crc8":45}],35:[function(t,e,r){"use strict";e.exports=t("./es6/crc81wire").default},{"./es6/crc81wire":46}],36:[function(t,e,r){"use strict";e.exports=t("./es6/crcjam").default},{"./es6/crcjam":47}],37:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("buffer"),i=o(t("./create_buffer"));function o(t){return t&&t.__esModule?t:{default:t}}var a=(0,o(t("./define_crc")).default)("crc1",function(t,e){n.Buffer.isBuffer(t)||(t=(0,i.default)(t));for(var r=~~e,o=0,a=0;a<t.length;a++){o+=t[a]}return(r+=o%256)%256});r.default=a},{"./create_buffer":48,"./define_crc":49,buffer:20}],38:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("buffer"),i=a(t("./create_buffer")),o=a(t("./define_crc"));function a(t){return t&&t.__esModule?t:{default:t}}var s=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,o.default)("crc-16",function(t,e){n.Buffer.isBuffer(t)||(t=(0,i.default)(t));for(var r=~~e,o=0;o<t.length;o++){var a=t[o];r=65535&(s[255&(r^a)]^r>>8)}return r});r.default=u},{"./create_buffer":48,"./define_crc":49,buffer:20}],39:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("buffer"),i=a(t("./create_buffer")),o=a(t("./define_crc"));function a(t){return t&&t.__esModule?t:{default:t}}var s=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,o.default)("ccitt",function(t,e){n.Buffer.isBuffer(t)||(t=(0,i.default)(t));for(var r=void 0!==e?~~e:65535,o=0;o<t.length;o++){var a=t[o];r=65535&(s[255&(r>>8^a)]^r<<8)}return r});r.default=u},{"./create_buffer":48,"./define_crc":49,buffer:20}],40:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("buffer"),i=a(t("./create_buffer")),o=a(t("./define_crc"));function a(t){return t&&t.__esModule?t:{default:t}}var s=[0,4489,8978,12955,17956,22445,25910,29887,35912,40385,44890,48851,51820,56293,59774,63735,4225,264,13203,8730,22181,18220,30135,25662,40137,36160,49115,44626,56045,52068,63999,59510,8450,12427,528,5017,26406,30383,17460,21949,44362,48323,36440,40913,60270,64231,51324,55797,12675,8202,4753,792,30631,26158,21685,17724,48587,44098,40665,36688,64495,60006,55549,51572,16900,21389,24854,28831,1056,5545,10034,14011,52812,57285,60766,64727,34920,39393,43898,47859,21125,17164,29079,24606,5281,1320,14259,9786,57037,53060,64991,60502,39145,35168,48123,43634,25350,29327,16404,20893,9506,13483,1584,6073,61262,65223,52316,56789,43370,47331,35448,39921,29575,25102,20629,16668,13731,9258,5809,1848,65487,60998,56541,52564,47595,43106,39673,35696,33800,38273,42778,46739,49708,54181,57662,61623,2112,6601,11090,15067,20068,24557,28022,31999,38025,34048,47003,42514,53933,49956,61887,57398,6337,2376,15315,10842,24293,20332,32247,27774,42250,46211,34328,38801,58158,62119,49212,53685,10562,14539,2640,7129,28518,32495,19572,24061,46475,41986,38553,34576,62383,57894,53437,49460,14787,10314,6865,2904,32743,28270,23797,19836,50700,55173,58654,62615,32808,37281,41786,45747,19012,23501,26966,30943,3168,7657,12146,16123,54925,50948,62879,58390,37033,33056,46011,41522,23237,19276,31191,26718,7393,3432,16371,11898,59150,63111,50204,54677,41258,45219,33336,37809,27462,31439,18516,23005,11618,15595,3696,8185,63375,58886,54429,50452,45483,40994,37561,33584,31687,27214,22741,18780,15843,11370,7921,3960];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,o.default)("kermit",function(t,e){n.Buffer.isBuffer(t)||(t=(0,i.default)(t));for(var r=void 0!==e?~~e:0,o=0;o<t.length;o++){var a=t[o];r=65535&(s[255&(r^a)]^r>>8)}return r});r.default=u},{"./create_buffer":48,"./define_crc":49,buffer:20}],41:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("buffer"),i=a(t("./create_buffer")),o=a(t("./define_crc"));function a(t){return t&&t.__esModule?t:{default:t}}var s=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,o.default)("crc-16-modbus",function(t,e){n.Buffer.isBuffer(t)||(t=(0,i.default)(t));for(var r=void 0!==e?~~e:65535,o=0;o<t.length;o++){var a=t[o];r=65535&(s[255&(r^a)]^r>>8)}return r});r.default=u},{"./create_buffer":48,"./define_crc":49,buffer:20}],42:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("buffer"),i=o(t("./create_buffer"));function o(t){return t&&t.__esModule?t:{default:t}}var a=(0,o(t("./define_crc")).default)("xmodem",function(t,e){n.Buffer.isBuffer(t)||(t=(0,i.default)(t));for(var r=void 0!==e?~~e:0,o=0;o<t.length;o++){var a=r>>>8&255;a^=255&t[o],r=r<<8&65535,r^=a^=a>>>4,r^=a=a<<5&65535,r^=a=a<<7&65535}return r});r.default=a},{"./create_buffer":48,"./define_crc":49,buffer:20}],43:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("buffer"),i=a(t("./create_buffer")),o=a(t("./define_crc"));function a(t){return t&&t.__esModule?t:{default:t}}var s=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,o.default)("crc-24",function(t,e){n.Buffer.isBuffer(t)||(t=(0,i.default)(t));for(var r=void 0!==e?~~e:11994318,o=0;o<t.length;o++){var a=t[o];r=16777215&(s[255&(r>>16^a)]^r<<8)}return r});r.default=u},{"./create_buffer":48,"./define_crc":49,buffer:20}],44:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("buffer"),i=a(t("./create_buffer")),o=a(t("./define_crc"));function a(t){return t&&t.__esModule?t:{default:t}}var s=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,o.default)("crc-32",function(t,e){n.Buffer.isBuffer(t)||(t=(0,i.default)(t));for(var r=0===e?0:-1^~~e,o=0;o<t.length;o++){var a=t[o];r=s[255&(r^a)]^r>>>8}return-1^r});r.default=u},{"./create_buffer":48,"./define_crc":49,buffer:20}],45:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("buffer"),i=a(t("./create_buffer")),o=a(t("./define_crc"));function a(t){return t&&t.__esModule?t:{default:t}}var s=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,o.default)("crc-8",function(t,e){n.Buffer.isBuffer(t)||(t=(0,i.default)(t));for(var r=~~e,o=0;o<t.length;o++){var a=t[o];r=255&s[255&(r^a)]}return r});r.default=u},{"./create_buffer":48,"./define_crc":49,buffer:20}],46:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("buffer"),i=a(t("./create_buffer")),o=a(t("./define_crc"));function a(t){return t&&t.__esModule?t:{default:t}}var s=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,o.default)("dallas-1-wire",function(t,e){n.Buffer.isBuffer(t)||(t=(0,i.default)(t));for(var r=~~e,o=0;o<t.length;o++){var a=t[o];r=255&s[255&(r^a)]}return r});r.default=u},{"./create_buffer":48,"./define_crc":49,buffer:20}],47:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("buffer"),i=a(t("./create_buffer")),o=a(t("./define_crc"));function a(t){return t&&t.__esModule?t:{default:t}}var s=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];"undefined"!=typeof Int32Array&&(s=new Int32Array(s));var u=(0,o.default)("jam",function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;n.Buffer.isBuffer(t)||(t=(0,i.default)(t));for(var r=0===e?0:~~e,o=0;o<t.length;o++){var a=t[o];r=s[255&(r^a)]^r>>>8}return r});r.default=u},{"./create_buffer":48,"./define_crc":49,buffer:20}],48:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("buffer"),i=n.Buffer.from&&n.Buffer.alloc&&n.Buffer.allocUnsafe&&n.Buffer.allocUnsafeSlow?n.Buffer.from:function(t){return new n.Buffer(t)};r.default=i},{buffer:20}],49:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t,e){var r=function(t,r){return e(t,r)>>>0};return r.signed=e,r.unsigned=r,r.model=t,r}},{}],50:[function(t,e,r){"use strict";e.exports={crc1:t("./crc1"),crc8:t("./crc8"),crc81wire:t("./crc8_1wire"),crc16:t("./crc16"),crc16ccitt:t("./crc16_ccitt"),crc16modbus:t("./crc16_modbus"),crc16xmodem:t("./crc16_xmodem"),crc16kermit:t("./crc16_kermit"),crc24:t("./crc24"),crc32:t("./crc32"),crcjam:t("./crcjam")}},{"./crc1":26,"./crc16":27,"./crc16_ccitt":28,"./crc16_kermit":29,"./crc16_modbus":30,"./crc16_xmodem":31,"./crc24":32,"./crc32":33,"./crc8":34,"./crc8_1wire":35,"./crcjam":36}],51:[function(t,e,r){var n=Object.create||function(t){var e=function(){};return e.prototype=t,new e},i=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return r},o=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function a(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=a,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._maxListeners=void 0;var s,u=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),s=0===f.x}catch(t){s=!1}function l(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function c(t,e,r,i){var o,a,s;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((a=t._events)?(a.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),s=a[e]):(a=t._events=n(null),t._eventsCount=0),s){if("function"==typeof s?s=a[e]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),!s.warned&&(o=l(t))&&o>0&&s.length>o){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else s=a[e]=r,++t._eventsCount;return t}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e<t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}function p(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=o.call(h,n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(!n)return[];var i=n[e];return i?"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):y(i,i.length):[]}function g(t){var e=this._events;if(e){var r=e[t];if("function"==typeof r)return 1;if(r)return r.length}return 0}function y(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}s?Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||t!=t)throw new TypeError('"defaultMaxListeners" must be a positive number');u=t}}):a.defaultMaxListeners=u,a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(t){var e,r,n,i,o,a,s="error"===t;if(a=this._events)s=s&&null==a.error;else if(!s)return!1;if(s){if(arguments.length>1&&(e=arguments[1]),e instanceof Error)throw e;var u=new Error('Unhandled "error" event. ('+e+")");throw u.context=e,u}if(!(r=a[t]))return!1;var f="function"==typeof r;switch(n=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var n=t.length,i=y(t,n),o=0;o<n;++o)i[o].call(r)}(r,f,this);break;case 2:!function(t,e,r,n){if(e)t.call(r,n);else for(var i=t.length,o=y(t,i),a=0;a<i;++a)o[a].call(r,n)}(r,f,this,arguments[1]);break;case 3:!function(t,e,r,n,i){if(e)t.call(r,n,i);else for(var o=t.length,a=y(t,o),s=0;s<o;++s)a[s].call(r,n,i)}(r,f,this,arguments[1],arguments[2]);break;case 4:!function(t,e,r,n,i,o){if(e)t.call(r,n,i,o);else for(var a=t.length,s=y(t,a),u=0;u<a;++u)s[u].call(r,n,i,o)}(r,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),o=1;o<n;o++)i[o-1]=arguments[o];!function(t,e,r,n){if(e)t.apply(r,n);else for(var i=t.length,o=y(t,i),a=0;a<i;++a)o[a].apply(r,n)}(r,f,this,i)}return!0},a.prototype.addListener=function(t,e){return c(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return c(this,t,e,!0)},a.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,p(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,p(this,t,e)),this},a.prototype.removeListener=function(t,e){var r,i,o,a,s;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=n(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(o=-1,a=r.length-1;a>=0;a--)if(r[a]===e||r[a].listener===e){s=r[a].listener,o=a;break}if(o<0)return this;0===o?r.shift():function(t,e){for(var r=e,n=r+1,i=t.length;n<i;r+=1,n+=1)t[r]=t[n];t.pop()}(r,o),1===r.length&&(i[t]=r[0]),i.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.removeAllListeners=function(t){var e,r,o;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=n(null):delete r[t]),this;if(0===arguments.length){var a,s=i(r);for(o=0;o<s.length;++o)"removeListener"!==(a=s[o])&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=n(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(e)for(o=e.length-1;o>=0;o--)this.removeListener(t,e[o]);return this},a.prototype.listeners=function(t){return d(this,t,!0)},a.prototype.rawListeners=function(t){return d(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},a.prototype.listenerCount=g,a.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],52:[function(t,e,r){r.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,f=u>>1,l=-7,c=r?i-1:0,h=r?-1:1,p=t[e+c];for(c+=h,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+t[e+c],c+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+c],c+=h,l-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=f}return(p?-1:1)*a*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var a,s,u,f=8*o-i-1,l=(1<<f)-1,c=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=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+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=l?(s=0,a=l):a+c>=1?(s=(e*u-1)*Math.pow(2,i),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;t[r+p]=255&a,p+=d,a/=256,f-=8);t[r+p-d]|=128*g}},{}],53:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],54:[function(t,e,r){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}e.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],55:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],56:[function(t,e,r){var n=t("buffer").Buffer;e.exports=function(t,e){if("undefined"==typeof Blob||!(t instanceof Blob))throw new Error("first argument must be a Blob");if("function"!=typeof e)throw new Error("second argument must be a function");var r=new FileReader;r.addEventListener("loadend",function t(i){r.removeEventListener("loadend",t,!1),i.error?e(i.error):e(null,new n(r.result))},!1),r.readAsArrayBuffer(t)}},{buffer:20}],57:[function(t,e,r){e.exports='function inflate(a){"use strict";function w(){function m(a,b,d,h,m,n,o,p,q,r,s){var t,u,w,x,z,A,B,C,E,F,G,H,I,D=0,y=d;do e[a[b+D]]++,D++,y--;while(0!==y);if(e[0]==d)return o[0]=-1,p[0]=0,c;for(B=p[0],z=1;v>=z&&0===e[z];z++);for(A=z,z>B&&(B=z),y=v;0!==y&&0===e[y];y--);for(w=y,B>y&&(B=y),p[0]=B,H=1<<z;y>z;z++,H<<=1)if((H-=e[z])<0)return g;if((H-=e[y])<0)return g;for(e[y]+=H,l[1]=z=0,D=1,G=2;0!==--y;)l[G]=z+=e[D],G++,D++;y=0,D=0;do 0!==(z=a[b+D])&&(s[l[z]++]=y),D++;while(++y<d);for(d=l[w],l[0]=y=0,D=0,x=-1,F=-B,j[0]=0,E=0,I=0;w>=A;A++)for(t=e[A];0!==t--;){for(;A>F+B;){if(x++,F+=B,I=w-F,I=I>B?B:I,(u=1<<(z=A-F))>t+1&&(u-=t+1,G=A,I>z))for(;++z<I&&!((u<<=1)<=e[++G]);)u-=e[G];if(I=1<<z,r[0]+I>k)return g;j[x]=E=r[0],r[0]+=I,0!==x?(l[x]=y,f[0]=z,f[1]=B,z=y>>>F-B,f[2]=E-j[x-1]-z,q.set(f,3*(j[x-1]+z))):o[0]=E}for(f[1]=A-F,D>=d?f[0]=192:s[D]<h?(f[0]=s[D]<256?0:96,f[2]=s[D++]):(f[0]=n[s[D]-h]+16+64,f[2]=m[s[D++]-h]),u=1<<A-F,z=y>>>F;I>z;z+=u)q.set(f,3*(E+z));for(z=1<<A-1;0!==(y&z);z>>>=1)y^=z;for(y^=z,C=(1<<F)-1;(y&C)!=l[x];)x--,F-=B,C=(1<<F)-1}return 0!==H&&1!=w?i:c}function n(a){var c;for(b||(b=[],d=[],e=new Int32Array(v+1),f=[],j=new Int32Array(v),l=new Int32Array(v+1)),d.length<a&&(d=[]),c=0;a>c;c++)d[c]=0;for(c=0;v+1>c;c++)e[c]=0;for(c=0;3>c;c++)f[c]=0;j.set(e.subarray(0,v),0),l.set(e.subarray(0,v+1),0)}var b,d,e,f,j,l,a=this;a.inflate_trees_bits=function(a,c,e,f,h){var j;return n(19),b[0]=0,j=m(a,0,19,19,null,null,e,c,f,b,d),j==g?h.msg="oversubscribed dynamic bit lengths tree":(j==i||0===c[0])&&(h.msg="incomplete dynamic bit lengths tree",j=g),j},a.inflate_trees_dynamic=function(a,e,f,j,k,l,o,p,q){var v;return n(288),b[0]=0,v=m(f,0,a,257,r,s,l,j,p,b,d),v!=c||0===j[0]?(v==g?q.msg="oversubscribed literal/length tree":v!=h&&(q.msg="incomplete literal/length tree",v=g),v):(n(288),v=m(f,a,e,0,t,u,o,k,p,b,d),v!=c||0===k[0]&&a>257?(v==g?q.msg="oversubscribed distance tree":v==i?(q.msg="incomplete distance tree",v=g):v!=h&&(q.msg="empty distance tree with lengths",v=g),v):c)}}function H(){function u(a,b,e,f,h,i,k,l){var m,n,o,p,y,z,A,B,s=l.next_in_index,t=l.avail_in,q=k.bitb,r=k.bitk,u=k.write,v=u<k.read?k.read-u-1:k.end-u,w=j[a],x=j[b];do{for(;20>r;)t--,q|=(255&l.read_byte(s++))<<r,r+=8;if(m=q&w,n=e,o=f,B=3*(o+m),0!==(p=n[B]))for(;;){if(q>>=n[B+1],r-=n[B+1],0!==(16&p)){for(p&=15,y=n[B+2]+(q&j[p]),q>>=p,r-=p;15>r;)t--,q|=(255&l.read_byte(s++))<<r,r+=8;for(m=q&x,n=h,o=i,B=3*(o+m),p=n[B];;){if(q>>=n[B+1],r-=n[B+1],0!==(16&p)){for(p&=15;p>r;)t--,q|=(255&l.read_byte(s++))<<r,r+=8;if(z=n[B+2]+(q&j[p]),q>>=p,r-=p,v-=y,u>=z)A=u-z,u-A>0&&2>u-A?(k.window[u++]=k.window[A++],k.window[u++]=k.window[A++],y-=2):(k.window.set(k.window.subarray(A,A+2),u),u+=2,A+=2,y-=2);else{A=u-z;do A+=k.end;while(0>A);if(p=k.end-A,y>p){if(y-=p,u-A>0&&p>u-A){do k.window[u++]=k.window[A++];while(0!==--p)}else k.window.set(k.window.subarray(A,A+p),u),u+=p,A+=p,p=0;A=0}}if(u-A>0&&y>u-A){do k.window[u++]=k.window[A++];while(0!==--y)}else k.window.set(k.window.subarray(A,A+y),u),u+=y,A+=y,y=0;break}if(0!==(64&p))return l.msg="invalid distance code",y=l.avail_in-t,y=y>r>>3?r>>3:y,t+=y,s-=y,r-=y<<3,k.bitb=q,k.bitk=r,l.avail_in=t,l.total_in+=s-l.next_in_index,l.next_in_index=s,k.write=u,g;m+=n[B+2],m+=q&j[p],B=3*(o+m),p=n[B]}break}if(0!==(64&p))return 0!==(32&p)?(y=l.avail_in-t,y=y>r>>3?r>>3:y,t+=y,s-=y,r-=y<<3,k.bitb=q,k.bitk=r,l.avail_in=t,l.total_in+=s-l.next_in_index,l.next_in_index=s,k.write=u,d):(l.msg="invalid literal/length code",y=l.avail_in-t,y=y>r>>3?r>>3:y,t+=y,s-=y,r-=y<<3,k.bitb=q,k.bitk=r,l.avail_in=t,l.total_in+=s-l.next_in_index,l.next_in_index=s,k.write=u,g);if(m+=n[B+2],m+=q&j[p],B=3*(o+m),0===(p=n[B])){q>>=n[B+1],r-=n[B+1],k.window[u++]=n[B+2],v--;break}}else q>>=n[B+1],r-=n[B+1],k.window[u++]=n[B+2],v--}while(v>=258&&t>=10);return y=l.avail_in-t,y=y>r>>3?r>>3:y,t+=y,s-=y,r-=y<<3,k.bitb=q,k.bitk=r,l.avail_in=t,l.total_in+=s-l.next_in_index,l.next_in_index=s,k.write=u,c}var b,h,q,s,a=this,e=0,i=0,k=0,l=0,m=0,n=0,o=0,p=0,r=0,t=0;a.init=function(a,c,d,e,f,g){b=x,o=a,p=c,q=d,r=e,s=f,t=g,h=null},a.proc=function(a,v,w){var H,I,J,N,O,P,Q,K=0,L=0,M=0;for(M=v.next_in_index,N=v.avail_in,K=a.bitb,L=a.bitk,O=a.write,P=O<a.read?a.read-O-1:a.end-O;;)switch(b){case x:if(P>=258&&N>=10&&(a.bitb=K,a.bitk=L,v.avail_in=N,v.total_in+=M-v.next_in_index,v.next_in_index=M,a.write=O,w=u(o,p,q,r,s,t,a,v),M=v.next_in_index,N=v.avail_in,K=a.bitb,L=a.bitk,O=a.write,P=O<a.read?a.read-O-1:a.end-O,w!=c)){b=w==d?E:G;break}k=o,h=q,i=r,b=y;case y:for(H=k;H>L;){if(0===N)return a.bitb=K,a.bitk=L,v.avail_in=N,v.total_in+=M-v.next_in_index,v.next_in_index=M,a.write=O,a.inflate_flush(v,w);w=c,N--,K|=(255&v.read_byte(M++))<<L,L+=8}if(I=3*(i+(K&j[H])),K>>>=h[I+1],L-=h[I+1],J=h[I],0===J){l=h[I+2],b=D;break}if(0!==(16&J)){m=15&J,e=h[I+2],b=z;break}if(0===(64&J)){k=J,i=I/3+h[I+2];break}if(0!==(32&J)){b=E;break}return b=G,v.msg="invalid literal/length code",w=g,a.bitb=K,a.bitk=L,v.avail_in=N,v.total_in+=M-v.next_in_index,v.next_in_index=M,a.write=O,a.inflate_flush(v,w);case z:for(H=m;H>L;){if(0===N)return a.bitb=K,a.bitk=L,v.avail_in=N,v.total_in+=M-v.next_in_index,v.next_in_index=M,a.write=O,a.inflate_flush(v,w);w=c,N--,K|=(255&v.read_byte(M++))<<L,L+=8}e+=K&j[H],K>>=H,L-=H,k=p,h=s,i=t,b=A;case A:for(H=k;H>L;){if(0===N)return a.bitb=K,a.bitk=L,v.avail_in=N,v.total_in+=M-v.next_in_index,v.next_in_index=M,a.write=O,a.inflate_flush(v,w);w=c,N--,K|=(255&v.read_byte(M++))<<L,L+=8}if(I=3*(i+(K&j[H])),K>>=h[I+1],L-=h[I+1],J=h[I],0!==(16&J)){m=15&J,n=h[I+2],b=B;break}if(0===(64&J)){k=J,i=I/3+h[I+2];break}return b=G,v.msg="invalid distance code",w=g,a.bitb=K,a.bitk=L,v.avail_in=N,v.total_in+=M-v.next_in_index,v.next_in_index=M,a.write=O,a.inflate_flush(v,w);case B:for(H=m;H>L;){if(0===N)return a.bitb=K,a.bitk=L,v.avail_in=N,v.total_in+=M-v.next_in_index,v.next_in_index=M,a.write=O,a.inflate_flush(v,w);w=c,N--,K|=(255&v.read_byte(M++))<<L,L+=8}n+=K&j[H],K>>=H,L-=H,b=C;case C:for(Q=O-n;0>Q;)Q+=a.end;for(;0!==e;){if(0===P&&(O==a.end&&0!==a.read&&(O=0,P=O<a.read?a.read-O-1:a.end-O),0===P&&(a.write=O,w=a.inflate_flush(v,w),O=a.write,P=O<a.read?a.read-O-1:a.end-O,O==a.end&&0!==a.read&&(O=0,P=O<a.read?a.read-O-1:a.end-O),0===P)))return a.bitb=K,a.bitk=L,v.avail_in=N,v.total_in+=M-v.next_in_index,v.next_in_index=M,a.write=O,a.inflate_flush(v,w);a.window[O++]=a.window[Q++],P--,Q==a.end&&(Q=0),e--}b=x;break;case D:if(0===P&&(O==a.end&&0!==a.read&&(O=0,P=O<a.read?a.read-O-1:a.end-O),0===P&&(a.write=O,w=a.inflate_flush(v,w),O=a.write,P=O<a.read?a.read-O-1:a.end-O,O==a.end&&0!==a.read&&(O=0,P=O<a.read?a.read-O-1:a.end-O),0===P)))return a.bitb=K,a.bitk=L,v.avail_in=N,v.total_in+=M-v.next_in_index,v.next_in_index=M,a.write=O,a.inflate_flush(v,w);w=c,a.window[O++]=l,P--,b=x;break;case E:if(L>7&&(L-=8,N++,M--),a.write=O,w=a.inflate_flush(v,w),O=a.write,P=O<a.read?a.read-O-1:a.end-O,a.read!=a.write)return a.bitb=K,a.bitk=L,v.avail_in=N,v.total_in+=M-v.next_in_index,v.next_in_index=M,a.write=O,a.inflate_flush(v,w);b=F;case F:return w=d,a.bitb=K,a.bitk=L,v.avail_in=N,v.total_in+=M-v.next_in_index,v.next_in_index=M,a.write=O,a.inflate_flush(v,w);case G:return w=g,a.bitb=K,a.bitk=L,v.avail_in=N,v.total_in+=M-v.next_in_index,v.next_in_index=M,a.write=O,a.inflate_flush(v,w);default:return w=f,a.bitb=K,a.bitk=L,v.avail_in=N,v.total_in+=M-v.next_in_index,v.next_in_index=M,a.write=O,a.inflate_flush(v,w)}},a.free=function(){}}function T(a,b){var o,e=this,h=J,l=0,m=0,n=0,p=[0],q=[0],r=new H,s=0,t=new Int32Array(3*k),u=0,v=new w;e.bitk=0,e.bitb=0,e.window=new Uint8Array(b),e.end=b,e.read=0,e.write=0,e.reset=function(a,b){b&&(b[0]=u),h==P&&r.free(a),h=J,e.bitk=0,e.bitb=0,e.read=e.write=0},e.reset(a,null),e.inflate_flush=function(a,b){var f=a.next_out_index,g=e.read,d=(g<=e.write?e.write:e.end)-g;return d>a.avail_out&&(d=a.avail_out),0!==d&&b==i&&(b=c),a.avail_out-=d,a.total_out+=d,a.next_out.set(e.window.subarray(g,g+d),f),f+=d,g+=d,g==e.end&&(g=0,e.write==e.end&&(e.write=0),d=e.write-g,d>a.avail_out&&(d=a.avail_out),0!==d&&b==i&&(b=c),a.avail_out-=d,a.total_out+=d,a.next_out.set(e.window.subarray(g,g+d),f),f+=d,g+=d),a.next_out_index=f,e.read=g,b},e.proc=function(a,b){for(var i,B,C,D,E,F,G,H,T,U,V,W,x=a.next_in_index,y=a.avail_in,k=e.bitb,u=e.bitk,z=e.write,A=z<e.read?e.read-z-1:e.end-z;;)switch(h){case J:for(;3>u;){if(0===y)return e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);b=c,y--,k|=(255&a.read_byte(x++))<<u,u+=8}switch(i=7&k,s=1&i,i>>>1){case 0:k>>>=3,u-=3,i=7&u,k>>>=i,u-=i,h=K;break;case 1:C=[],D=[],E=[[]],F=[[]],w.inflate_trees_fixed(C,D,E,F),r.init(C[0],D[0],E[0],0,F[0],0),k>>>=3,u-=3,h=P;break;case 2:k>>>=3,u-=3,h=M;break;case 3:return k>>>=3,u-=3,h=S,a.msg="invalid block type",b=g,e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b)}break;case K:for(;32>u;){if(0===y)return e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);b=c,y--,k|=(255&a.read_byte(x++))<<u,u+=8}if((65535&~k>>>16)!=(65535&k))return h=S,a.msg="invalid stored block lengths",b=g,e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);l=65535&k,k=u=0,h=0!==l?L:0!==s?Q:J;break;case L:if(0===y)return e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);if(0===A&&(z==e.end&&0!==e.read&&(z=0,A=z<e.read?e.read-z-1:e.end-z),0===A&&(e.write=z,b=e.inflate_flush(a,b),z=e.write,A=z<e.read?e.read-z-1:e.end-z,z==e.end&&0!==e.read&&(z=0,A=z<e.read?e.read-z-1:e.end-z),0===A)))return e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);if(b=c,i=l,i>y&&(i=y),i>A&&(i=A),e.window.set(a.read_buf(x,i),z),x+=i,y-=i,z+=i,A-=i,0!==(l-=i))break;h=0!==s?Q:J;break;case M:for(;14>u;){if(0===y)return e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);b=c,y--,k|=(255&a.read_byte(x++))<<u,u+=8}if(m=i=16383&k,(31&i)>29||(31&i>>5)>29)return h=S,a.msg="too many length or distance symbols",b=g,e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);if(i=258+(31&i)+(31&i>>5),!o||o.length<i)o=[];else for(B=0;i>B;B++)o[B]=0;k>>>=14,u-=14,n=0,h=N;case N:for(;4+(m>>>10)>n;){for(;3>u;){if(0===y)return e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);b=c,y--,k|=(255&a.read_byte(x++))<<u,u+=8}o[I[n++]]=7&k,k>>>=3,u-=3}for(;19>n;)o[I[n++]]=0;if(p[0]=7,i=v.inflate_trees_bits(o,p,q,t,a),i!=c)return b=i,b==g&&(o=null,h=S),e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);n=0,h=O;case O:for(;;){if(i=m,n>=258+(31&i)+(31&i>>5))break;for(i=p[0];i>u;){if(0===y)return e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);b=c,y--,k|=(255&a.read_byte(x++))<<u,u+=8}if(i=t[3*(q[0]+(k&j[i]))+1],H=t[3*(q[0]+(k&j[i]))+2],16>H)k>>>=i,u-=i,o[n++]=H;else{for(B=18==H?7:H-14,G=18==H?11:3;i+B>u;){if(0===y)return e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);b=c,y--,k|=(255&a.read_byte(x++))<<u,u+=8}if(k>>>=i,u-=i,G+=k&j[B],k>>>=B,u-=B,B=n,i=m,B+G>258+(31&i)+(31&i>>5)||16==H&&1>B)return o=null,h=S,a.msg="invalid bit length repeat",b=g,e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);H=16==H?o[B-1]:0;do o[B++]=H;while(0!==--G);n=B}}if(q[0]=-1,T=[],U=[],V=[],W=[],T[0]=9,U[0]=6,i=m,i=v.inflate_trees_dynamic(257+(31&i),1+(31&i>>5),o,T,U,V,W,t,a),i!=c)return i==g&&(o=null,h=S),b=i,e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);r.init(T[0],U[0],t,V[0],t,W[0]),h=P;case P:if(e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,(b=r.proc(e,a,b))!=d)return e.inflate_flush(a,b);if(b=c,r.free(a),x=a.next_in_index,y=a.avail_in,k=e.bitb,u=e.bitk,z=e.write,A=z<e.read?e.read-z-1:e.end-z,0===s){h=J;break}h=Q;case Q:if(e.write=z,b=e.inflate_flush(a,b),z=e.write,A=z<e.read?e.read-z-1:e.end-z,e.read!=e.write)return e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);h=R;case R:return b=d,e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);case S:return b=g,e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b);default:return b=f,e.bitb=k,e.bitk=u,a.avail_in=y,a.total_in+=x-a.next_in_index,a.next_in_index=x,e.write=z,e.inflate_flush(a,b)}},e.free=function(a){e.reset(a,null),e.window=null,t=null},e.set_dictionary=function(a,b,c){e.window.set(a.subarray(b,b+c),0),e.read=e.write=c},e.sync_point=function(){return h==K?1:0}}function fb(){function b(a){return a&&a.istate?(a.total_in=a.total_out=0,a.msg=null,a.istate.mode=bb,a.istate.blocks.reset(a,null),c):f}var a=this;a.mode=0,a.method=0,a.was=[0],a.need=0,a.marker=0,a.wbits=0,a.inflateEnd=function(b){return a.blocks&&a.blocks.free(b),a.blocks=null,c},a.inflateInit=function(d,e){return d.msg=null,a.blocks=null,8>e||e>15?(a.inflateEnd(d),f):(a.wbits=e,d.istate.blocks=new T(d,1<<e),b(d),c)},a.inflate=function(a,b){var h,j;if(!a||!a.istate||!a.next_in)return f;for(b=b==m?i:c,h=i;;)switch(a.istate.mode){case W:if(0===a.avail_in)return h;if(h=b,a.avail_in--,a.total_in++,(15&(a.istate.method=a.read_byte(a.next_in_index++)))!=V){a.istate.mode=db,a.msg="unknown compression method",a.istate.marker=5;break}if((a.istate.method>>4)+8>a.istate.wbits){a.istate.mode=db,a.msg="invalid window size",a.istate.marker=5;break}a.istate.mode=X;case X:if(0===a.avail_in)return h;if(h=b,a.avail_in--,a.total_in++,j=255&a.read_byte(a.next_in_index++),0!==((a.istate.method<<8)+j)%31){a.istate.mode=db,a.msg="incorrect header check",a.istate.marker=5;break}if(0===(j&U)){a.istate.mode=bb;break}a.istate.mode=Y;case Y:if(0===a.avail_in)return h;h=b,a.avail_in--,a.total_in++,a.istate.need=4278190080&(255&a.read_byte(a.next_in_index++))<<24,a.istate.mode=Z;case Z:if(0===a.avail_in)return h;h=b,a.avail_in--,a.total_in++,a.istate.need+=16711680&(255&a.read_byte(a.next_in_index++))<<16,a.istate.mode=$;case $:if(0===a.avail_in)return h;h=b,a.avail_in--,a.total_in++,a.istate.need+=65280&(255&a.read_byte(a.next_in_index++))<<8,a.istate.mode=_;case _:return 0===a.avail_in?h:(h=b,a.avail_in--,a.total_in++,a.istate.need+=255&a.read_byte(a.next_in_index++),a.istate.mode=ab,e);case ab:return a.istate.mode=db,a.msg="need dictionary",a.istate.marker=0,f;case bb:if(h=a.istate.blocks.proc(a,h),h==g){a.istate.mode=db,a.istate.marker=0;break}if(h==c&&(h=b),h!=d)return h;h=b,a.istate.blocks.reset(a,a.istate.was),a.istate.mode=cb;case cb:return d;case db:return g;default:return f}},a.inflateSetDictionary=function(a,b,d){var e=0,g=d;return a&&a.istate&&a.istate.mode==ab?(g>=1<<a.istate.wbits&&(g=(1<<a.istate.wbits)-1,e=d-g),a.istate.blocks.set_dictionary(b,e,g),a.istate.mode=bb,c):f},a.inflateSync=function(a){var d,e,h,j,k;if(!a||!a.istate)return f;if(a.istate.mode!=db&&(a.istate.mode=db,a.istate.marker=0),0===(d=a.avail_in))return i;for(e=a.next_in_index,h=a.istate.marker;0!==d&&4>h;)a.read_byte(e)==eb[h]?h++:h=0!==a.read_byte(e)?0:4-h,e++,d--;return a.total_in+=e-a.next_in_index,a.next_in_index=e,a.avail_in=d,a.istate.marker=h,4!=h?g:(j=a.total_in,k=a.total_out,b(a),a.total_in=j,a.total_out=k,a.istate.mode=bb,c)},a.inflateSyncPoint=function(a){return a&&a.istate&&a.istate.blocks?a.istate.blocks.sync_point():f}}function gb(){}function hb(){var a=this,b=new gb,e=512,f=l,g=new Uint8Array(e),h=!1;b.inflateInit(),b.next_out=g,a.append=function(a,j){var k,p,l=[],m=0,n=0,o=0;if(0!==a.length){b.next_in_index=0,b.next_in=a,b.avail_in=a.length;do{if(b.next_out_index=0,b.avail_out=e,0!==b.avail_in||h||(b.next_in_index=0,h=!0),k=b.inflate(f),h&&k===i){if(0!==b.avail_in)throw new Error("inflating: bad input")}else if(k!==c&&k!==d)throw new Error("inflating: "+b.msg);if((h||k===d)&&b.avail_in===a.length)throw new Error("inflating: bad input");b.next_out_index&&(b.next_out_index===e?l.push(new Uint8Array(g)):l.push(new Uint8Array(g.subarray(0,b.next_out_index)))),o+=b.next_out_index,j&&b.next_in_index>0&&b.next_in_index!=m&&(j(b.next_in_index),m=b.next_in_index)}while(b.avail_in>0||0===b.avail_out);return p=new Uint8Array(o),l.forEach(function(a){p.set(a,n),n+=a.length}),p}},a.flush=function(){b.inflateEnd()}}var x,y,z,A,B,C,D,E,F,G,I,J,K,L,M,N,O,P,Q,R,S,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,ib,b=15,c=0,d=1,e=2,f=-2,g=-3,h=-4,i=-5,j=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],k=1440,l=0,m=4,n=9,o=5,p=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],q=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],r=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],t=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],v=15;w.inflate_trees_fixed=function(a,b,d,e){return a[0]=n,b[0]=o,d[0]=p,e[0]=q,c},x=0,y=1,z=2,A=3,B=4,C=5,D=6,E=7,F=8,G=9,I=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],J=0,K=1,L=2,M=3,N=4,O=5,P=6,Q=7,R=8,S=9,U=32,V=8,W=0,X=1,Y=2,Z=3,$=4,_=5,ab=6,bb=7,cb=12,db=13,eb=[0,0,255,255],gb.prototype={inflateInit:function(a){var c=this;return c.istate=new fb,a||(a=b),c.istate.inflateInit(c,a)},inflate:function(a){var b=this;return b.istate?b.istate.inflate(b,a):f},inflateEnd:function(){var b,a=this;return a.istate?(b=a.istate.inflateEnd(a),a.istate=null,b):f},inflateSync:function(){var a=this;return a.istate?a.istate.inflateSync(a):f},inflateSetDictionary:function(a,b){var c=this;return c.istate?c.istate.inflateSetDictionary(c,a,b):f},read_byte:function(a){var b=this;return b.next_in.subarray(a,a+1)[0]},read_buf:function(a,b){var c=this;return c.next_in.subarray(a,a+b)}},ib=a.zip||a,ib.Inflater=ib._jzlib_Inflater=hb}!function(a){"use strict";function d(){inflate(a),postMessage({type:"importScripts"})}function e(b){var d=a[b.codecClass],e=b.sn;if(c[e])throw Error("duplicated sn");c[e]={codec:new d(b.options),crcInput:"input"===b.crcType,crcOutput:"output"===b.crcType,crc:new j},postMessage({type:"newTask",sn:e})}function g(a){var i,j,k,m,n,o,p,b=a.sn,d=a.type,g=a.data,h=c[b];if(!h&&a.codecClass&&(e(a),h=c[b]),i="append"===d,j=f(),i)try{k=h.codec.append(g,function(a){postMessage({type:"progress",sn:b,loaded:a})})}catch(l){throw delete c[b],l}else delete c[b],k=h.codec.flush();m=f()-j,j=f(),g&&h.crcInput&&h.crc.append(g),k&&h.crcOutput&&h.crc.append(k),n=f()-j,o={type:d,sn:b,codecTime:m,crcTime:n},p=[],k&&(o.data=k,p.push(k.buffer)),i||!h.crcInput&&!h.crcOutput||(o.crc=h.crc.get());try{postMessage(o,p)}catch(q){postMessage(o)}}function h(a,b,c){var d={type:a,sn:b,error:i(c)};postMessage(d)}function i(a){return{message:a.message,stack:a.stack}}function j(){this.crc=-1}function k(){}var b,c,f;if(a.zWorkerInitialized)throw new Error("z-worker.js should be run only once");a.zWorkerInitialized=!0,addEventListener("message",function(a){var c=a.data,d=c.type,e=c.sn,f=b[d];if(f)try{f(c)}catch(g){h(d,e,g)}postMessage({type:"echo",originalType:d,sn:e})}),b={importScripts:d,newTask:e,append:g,flush:g},c={},f=a.performance?a.performance.now.bind(a.performance):Date.now,j.prototype.append=function(a){var d,e,b=0|this.crc,c=this.table;for(d=0,e=0|a.length;e>d;d++)b=b>>>8^c[255&(b^a[d])];this.crc=b},j.prototype.get=function(){return~this.crc},j.prototype.table=function(){var a,b,c,d=[];for(a=0;256>a;a++){for(c=a,b=0;8>b;b++)1&c?c=3988292384^c>>>1:c>>>=1;d[a]=c}return d}(),a.NOOP=k,k.prototype.append=function(a){return a},k.prototype.flush=function(){}}(this);'},{}],58:[function(t,e,r){var n,i=t("./z-worker"),o=URL.createObjectURL(new Blob([i],{type:"text/javascript"})),a="File format is not recognized.",s="CRC failed.",u="File contains encrypted entry.",f="File is using Zip64 (4gb+ file size).",l="Error while reading zip file.",c="Error while writing zip file.",h="Error while writing file data.",p="Error while reading file data.",d="File already exists.",g=524288,y="text/plain";try{n=0===new Blob([new DataView(new ArrayBuffer(0))]).size}catch(t){n=void 0}var b={};function v(){this.crc=-1}function w(){}function m(t,e){var r,n;return r=new ArrayBuffer(t),n=new Uint8Array(r),e&&n.set(e,0),{buffer:r,array:n,view:new DataView(r)}}function _(){}function E(t){var e,r=this;r.size=0,r.init=function(n,i){var o=new Blob([t],{type:y});(e=new k(o)).init(function(){r.size=e.size,n()},i)},r.readUint8Array=function(t,r,n,i){e.readUint8Array(t,r,n,i)}}function x(t){var e,r=this;r.size=0,r.init=function(n){for(var i=t.length;"="==t.charAt(i-1);)i--;e=t.indexOf(",")+1,r.size=Math.floor(.75*(i-e)),n()},r.readUint8Array=function(r,n,i){var o,a=m(n),s=4*Math.floor(r/3),u=4*Math.ceil((r+n)/3),f=atob(t.substring(s+e,u+e)),l=r-3*Math.floor(s/4);for(o=l;o<l+n;o++)a.array[o-l]=f.charCodeAt(o);i(a.array)}}function k(t){var e=this;e.size=0,e.init=function(r){e.size=t.size,r()},e.readUint8Array=function(e,r,n,i){var o=new FileReader;o.onload=function(t){n(new Uint8Array(t.target.result))},o.onerror=i;try{o.readAsArrayBuffer(function(t,e,r){if(e<0||r<0||e+r>t.size)throw new RangeError("offset:"+e+", length:"+r+", size:"+t.size);return t.slice?t.slice(e,e+r):t.webkitSlice?t.webkitSlice(e,e+r):t.mozSlice?t.mozSlice(e,e+r):t.msSlice?t.msSlice(e,e+r):void 0}(t,e,r))}catch(t){i(t)}}}function I(){}function S(t){var e;this.init=function(t){e=new Blob([],{type:y}),t()},this.writeUint8Array=function(t,r){e=new Blob([e,n?t:t.buffer],{type:y}),r()},this.getData=function(r,n){var i=new FileReader;i.onload=function(t){r(t.target.result)},i.onerror=n,i.readAsText(e,t)}}function T(t){var e="",r="";this.init=function(r){e+="data:"+(t||"")+";base64,",r()},this.writeUint8Array=function(t,n){var i,o=r.length,a=r;for(r="",i=0;i<3*Math.floor((o+t.length)/3)-o;i++)a+=String.fromCharCode(t[i]);for(;i<t.length;i++)r+=String.fromCharCode(t[i]);a.length>2?e+=btoa(a):r=a,n()},this.getData=function(t){t(e+btoa(r))}}function A(t){var e;this.init=function(r){e=new Blob([],{type:t}),r()},this.writeUint8Array=function(r,i){e=new Blob([e,n?r:r.buffer],{type:t}),i()},this.getData=function(t){t(e)}}function N(t,e,r,n,i,o,a,s,u,f){var l,c,h,p=0,d=e.sn;function y(){t.removeEventListener("message",b,!1),s(c,h)}function b(e){var r=e.data,i=r.data,s=r.error;if(s)return s.toString=function(){return"Error: "+this.message},void u(s);if(r.sn===d)switch("number"==typeof r.codecTime&&(t.codecTime+=r.codecTime),"number"==typeof r.crcTime&&(t.crcTime+=r.crcTime),r.type){case"append":i?(c+=i.length,n.writeUint8Array(i,function(){v()},f)):v();break;case"flush":h=r.crc,i?(c+=i.length,n.writeUint8Array(i,function(){y()},f)):y();break;case"progress":a&&a(l+r.loaded,o);break;case"importScripts":case"newTask":case"echo":break;default:console.warn("zip.js:launchWorkerProcess: unknown message: ",r)}}function v(){(l=p*g)<=o?r.readUint8Array(i+l,Math.min(g,o-l),function(r){a&&a(l,o);var n=0===l?e:{sn:d};n.type="append",n.data=r;try{t.postMessage(n,[r.buffer])}catch(e){t.postMessage(n)}p++},u):t.postMessage({sn:d,type:"flush"})}c=0,t.addEventListener("message",b,!1),v()}function L(t,e,r,n,i,o,a,s,u,f){var l,c=0,h=0,p="input"===o,d="output"===o,y=new v;!function o(){var b;if((l=c*g)<i)e.readUint8Array(n+l,Math.min(g,i-l),function(e){var n;try{n=t.append(e,function(t){a&&a(l+t,i)})}catch(t){return void u(t)}n?(h+=n.length,r.writeUint8Array(n,function(){c++,setTimeout(o,1)},f),d&&y.append(n)):(c++,setTimeout(o,1)),p&&y.append(e),a&&a(l,i)},u);else{try{b=t.flush()}catch(t){return void u(t)}b?(d&&y.append(b),h+=b.length,r.writeUint8Array(b,function(){s(h,y.get())},f)):s(h,y.get())}}()}function D(t,e,r,n,i,o,a,s,u,f,l){b.useWebWorkers&&a?N(t,{sn:e,codecClass:"NOOP",crcType:"input"},r,n,i,o,u,s,f,l):L(new w,r,n,i,o,"input",u,s,f,l)}function M(t){var e,r,n="",i=["Ç","ü","é","â","ä","à","å","ç","ê","ë","è","ï","î","ì","Ä","Å","É","æ","Æ","ô","ö","ò","û","ù","ÿ","Ö","Ü","ø","£","Ø","×","ƒ","á","í","ó","ú","ñ","Ñ","ª","º","¿","®","¬","½","¼","¡","«","»","_","_","_","¦","¦","Á","Â","À","©","¦","¦","+","+","¢","¥","+","+","-","-","+","-","+","ã","Ã","+","+","-","-","¦","-","+","¤","ð","Ð","Ê","Ë","È","i","Í","Î","Ï","+","+","_","_","¦","Ì","_","Ó","ß","Ô","Ò","õ","Õ","µ","þ","Þ","Ú","Û","Ù","ý","Ý","¯","´","­","±","_","¾","¶","§","÷","¸","°","¨","·","¹","³","²","_"," "];for(e=0;e<t.length;e++)n+=(r=255&t.charCodeAt(e))>127?i[r-128]:String.fromCharCode(r);return n}function O(t){return decodeURIComponent(escape(t))}function U(t){var e,r="";for(e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return r}function B(t,e,r,n,i){t.version=e.view.getUint16(r,!0),t.bitFlag=e.view.getUint16(r+2,!0),t.compressionMethod=e.view.getUint16(r+4,!0),t.lastModDateRaw=e.view.getUint32(r+6,!0),t.lastModDate=function(t){var e=(4294901760&t)>>16,r=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&r)>>11,(2016&r)>>5,2*(31&r),0)}catch(t){}}(t.lastModDateRaw),1!=(1&t.bitFlag)?((n||8!=(8&t.bitFlag))&&(t.crc32=e.view.getUint32(r+10,!0),t.compressedSize=e.view.getUint32(r+14,!0),t.uncompressedSize=e.view.getUint32(r+18,!0)),4294967295!==t.compressedSize&&4294967295!==t.uncompressedSize?(t.filenameLength=e.view.getUint16(r+22,!0),t.extraFieldLength=e.view.getUint16(r+24,!0)):i(f)):i(u)}function C(t,e,r){var n=0;function i(){}i.prototype.getData=function(e,i,o,u){var f=this;function l(t,n){u&&!function(t){var e=m(4);return e.view.setUint32(0,t),f.crc32==e.view.getUint32(0)}(n)?r(s):e.getData(function(t){i(t)})}function c(t){r(t||p)}function d(t){r(t||h)}t.readUint8Array(f.offset,30,function(i){var s,h=m(i.length,i);1347093252==h.view.getUint32(0)?(B(f,h,4,!1,r),s=f.offset+30+f.filenameLength+f.extraFieldLength,e.init(function(){0===f.compressionMethod?D(f._worker,n++,t,e,s,f.compressedSize,u,l,o,c,d):function(t,e,r,n,i,o,a,s,u,f,l){var c=a?"output":"none";b.useWebWorkers?N(t,{sn:e,codecClass:"Inflater",crcType:c},r,n,i,o,u,s,f,l):L(new b.Inflater,r,n,i,o,c,u,s,f,l)}(f._worker,n++,t,e,s,f.compressedSize,u,l,o,c,d)},d)):r(a)},c)};var o={getEntries:function(e){var n=this._worker;!function(e){var n=22;if(t.size<n)r(a);else{var i=n+65536;o(n,function(){o(Math.min(i,t.size),function(){r(a)})})}function o(i,o){t.readUint8Array(t.size-i,i,function(t){for(var r=t.length-n;r>=0;r--)if(80===t[r]&&75===t[r+1]&&5===t[r+2]&&6===t[r+3])return void e(new DataView(t.buffer,r,n));o()},function(){r(l)})}}(function(o){var s,u;s=o.getUint32(16,!0),u=o.getUint16(8,!0),s<0||s>=t.size?r(a):t.readUint8Array(s,t.size-s,function(t){var o,s,f,l,c=0,h=[],p=m(t.length,t);for(o=0;o<u;o++){if((s=new i)._worker=n,1347092738!=p.view.getUint32(c))return void r(a);B(s,p,c+6,!0,r),s.commentLength=p.view.getUint16(c+32,!0),s.directory=16==(16&p.view.getUint8(c+38)),s.offset=p.view.getUint32(c+42,!0),f=U(p.array.subarray(c+46,c+46+s.filenameLength)),s.filename=2048==(2048&s.bitFlag)?O(f):M(f),s.directory||"/"!=s.filename.charAt(s.filename.length-1)||(s.directory=!0),l=U(p.array.subarray(c+46+s.filenameLength+s.extraFieldLength,c+46+s.filenameLength+s.extraFieldLength+s.commentLength)),s.comment=2048==(2048&s.bitFlag)?O(l):M(l),h.push(s),c+=46+s.filenameLength+s.extraFieldLength+s.commentLength}e(h)},function(){r(l)})})},close:function(t){this._worker&&(this._worker.terminate(),this._worker=null),t&&t()},_worker:null};b.useWebWorkers?F("inflater",function(t){o._worker=t,e(o)},function(t){r(t)}):e(o)}function R(t){return unescape(encodeURIComponent(t))}function z(t){var e,r=[];for(e=0;e<t.length;e++)r.push(t.charCodeAt(e));return r}function j(t,e,r,n){var i={},o=[],a=0,s=0;function u(t){r(t||c)}function f(t){r(t||p)}var l={add:function(e,l,c,h,p){var g,y,v,w=this._worker;function _(e,r){var n=m(16);a+=e||0,n.view.setUint32(0,1347094280),void 0!==r&&(g.view.setUint32(10,r,!0),n.view.setUint32(4,r,!0)),l&&(n.view.setUint32(8,e,!0),g.view.setUint32(14,e,!0),n.view.setUint32(12,l.size,!0),g.view.setUint32(18,l.size,!0)),t.writeUint8Array(n.array,function(){a+=16,c()},u)}function E(){var c,E;(p=p||{},e=e.trim(),p.directory&&"/"!=e.charAt(e.length-1)&&(e+="/"),i.hasOwnProperty(e))?r(d):(y=z(R(e)),o.push(e),c=function(){l?n||0===p.level?D(w,s++,l,t,0,l.size,!0,_,h,f,u):function(t,e,r,n,i,o,a,s,u){b.useWebWorkers?N(t,{sn:e,options:{level:i},codecClass:"Deflater",crcType:"input"},r,n,0,r.size,a,o,s,u):L(new b.Deflater,r,n,0,r.size,"input",a,o,s,u)}(w,s++,l,t,p.level,_,h,f,u):_()},v=p.lastModDate||new Date,g=m(26),i[e]={headerArray:g.array,directory:p.directory,filename:y,offset:a,comment:z(R(p.comment||""))},g.view.setUint32(0,335546376),p.version&&g.view.setUint8(0,p.version),n||0===p.level||p.directory||g.view.setUint16(4,2048),g.view.setUint16(6,(v.getHours()<<6|v.getMinutes())<<5|v.getSeconds()/2,!0),g.view.setUint16(8,(v.getFullYear()-1980<<4|v.getMonth()+1)<<5|v.getDate(),!0),g.view.setUint16(22,y.length,!0),(E=m(30+y.length)).view.setUint32(0,1347093252),E.array.set(g.array,4),E.array.set(y,30),a+=E.array.length,t.writeUint8Array(E.array,c,u))}l?l.init(E,f):E()},close:function(e){this._worker&&(this._worker.terminate(),this._worker=null);var r,n,s,f=0,l=0;for(n=0;n<o.length;n++)f+=46+(s=i[o[n]]).filename.length+s.comment.length;for(r=m(f+22),n=0;n<o.length;n++)s=i[o[n]],r.view.setUint32(l,1347092738),r.view.setUint16(l+4,5120),r.array.set(s.headerArray,l+6),r.view.setUint16(l+32,s.comment.length,!0),s.directory&&r.view.setUint8(l+38,16),r.view.setUint32(l+42,s.offset,!0),r.array.set(s.filename,l+46),r.array.set(s.comment,l+46+s.filename.length),l+=46+s.filename.length+s.comment.length;r.view.setUint32(l,1347093766),r.view.setUint16(l+8,o.length,!0),r.view.setUint16(l+10,o.length,!0),r.view.setUint32(l+12,f,!0),r.view.setUint32(l+16,a,!0),t.writeUint8Array(r.array,function(){t.getData(e)},u)},_worker:null};b.useWebWorkers?F("deflater",function(t){l._worker=t,e(l)},function(t){r(t)}):e(l)}function F(t,e,r){if(null===b.workerScripts||null===b.workerScriptsPath){var n=new Worker(o);n.codecTime=n.crcTime=0,n.postMessage({type:"importScripts",scripts:["inflate.js"]}),n.addEventListener("message",function t(o){var a=o.data;if(a.error)return n.terminate(),void r(a.error);"importScripts"===a.type&&(n.removeEventListener("message",t),n.removeEventListener("error",i),e(n))}),n.addEventListener("error",i)}else r(new Error("Either zip.workerScripts or zip.workerScriptsPath may be set, not both."));function i(t){n.terminate(),r(t)}}function P(t){console.error(t)}v.prototype.append=function(t){for(var e=0|this.crc,r=this.table,n=0,i=0|t.length;n<i;n++)e=e>>>8^r[255&(e^t[n])];this.crc=e},v.prototype.get=function(){return~this.crc},v.prototype.table=function(){var t,e,r,n=[];for(t=0;t<256;t++){for(r=t,e=0;e<8;e++)1&r?r=r>>>1^3988292384:r>>>=1;n[t]=r}return n}(),w.prototype.append=function(t,e){return t},w.prototype.flush=function(){},E.prototype=new _,E.prototype.constructor=E,x.prototype=new _,x.prototype.constructor=x,k.prototype=new _,k.prototype.constructor=k,I.prototype.getData=function(t){t(this.data)},S.prototype=new I,S.prototype.constructor=S,T.prototype=new I,T.prototype.constructor=T,A.prototype=new I,A.prototype.constructor=A;var Z={Reader:_,Writer:I,BlobReader:k,Data64URIReader:x,TextReader:E,BlobWriter:A,Data64URIWriter:T,TextWriter:S,createReader:function(t,e,r){r=r||P,t.init(function(){C(t,e,r)},r)},createWriter:function(t,e,r,n){r=r||P,n=!!n,t.init(function(){j(t,e,r,n)},r)},useWebWorkers:!0,workerScriptsPath:null,workerScripts:null};for(var X in Z)b[X]=Z[X];e.exports=b},{"./z-worker":57}],59:[function(t,e,r){function n(t){return t?Array.prototype.slice.call(t):[]}function i(t,e){return!!e&&(e=e.toLowerCase(),Object.prototype.toString.call(t).toLowerCase()==="[object "+e+"]")}function o(t){return"function"==typeof t}function a(t){return"string"==typeof t}function s(t){return i(t,"regexp")}function u(t,e){return 0===t.indexOf(e)}e.exports={toArray:n,extend:function(t){var e=n(arguments);if(1==e.length)return t;e.shift();for(var r=0,i=e.length;r<i;r++)for(var o in e[r])e[r].hasOwnProperty(o)&&(t[o]=e[r][o]);return t},startWith:u,isResouces:function(t){return u(t,"resourceId:")},transKeyToMatchResourceMap:function(t){return"@"+t.replace("resourceId:0x","").toUpperCase()},castLogger:function(t,e){console.log(t+" cost: "+(Date.now()-e)+"ms")},isTypeOf:i,isArray:function(t){return i(t,"array")},isFunction:o,isString:a,isDefined:function(t){return!(void 0===t)},isObject:function(t){return"object"==typeof t},isReg:s,isThisWhatYouNeed:function(t,e){return o(t)?t(e):a(t)?e.toLowerCase().indexOf(t.toLowerCase())>-1:!!s(t)&&t.test(e.toLowerCase())}}},{}],60:[function(t,e,r){var n=t("./lib/browser/zip"),i=t("./lib/browser/blob-to-buffer"),o=t("./lib/utils");function a(t){if(!(t instanceof Blob))throw new Error("Invalid input, expect the first param to be a File/Blob.");if(!(this instanceof a))return new a(t);this.file=t}a.prototype.destroy=function(){this.file=null},a.prototype.getBuffer=function(t,e,r){if(!o.isArray(t)||!o.isFunction(r))return r(new Error("getBuffer: invalid param, expect first param to be an Array and the second param to be a callback function"));o.isFunction(e)&&(r=e,e={}),t=t.map(function(t){return"string"==typeof t&&(t=t.split("\0").join("")),t});var n=e&&e.multiple||!1;this.getEntries(function(s,u){if(s)return r(s);var f={};u.forEach(function(e){return t.some(function(t){if(o.isThisWhatYouNeed(t,e.filename)){if(n){var r={fileName:t,buffer:e};f[t]?f[t].push(r):f[t]=[r]}else f[t]=e;return!0}})}),function(t,e,r){var n={},o=[],s=0;for(var u in t)o.push({name:u,entry:t[u]});o.length||r(null,{},o.length);function f(t,e){s++,n[t]=e}o.forEach(function(t){var u,l;u=t.name,l=t.entry,a.getEntryData(l,function(t,a){if(t)return r(t);"blob"===e.type?(f(u,a),s>=o.length&&r(null,n,o.length)):i(a,function(t,e){if(t)return console.error(t),r(t);f(u,e),s>=o.length&&r(null,n,o.length)})})})}(f,e,function(t,e){r(t,e,u.length)})})},a.prototype.getEntries=function(t){n.createReader(new n.BlobReader(this.file),function(e){e.getEntries(function(e){t(null,e,e.length)})},t)},a.getEntryData=function(t,e){var r=new n.BlobWriter;t.getData(r,function(r){e(null,r,t.length)})},e.exports=a},{"./lib/browser/blob-to-buffer":56,"./lib/browser/zip":58,"./lib/utils":59}],61:[function(t,e,r){"use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,a,s=function(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var f in r=Object(arguments[u]))i.call(r,f)&&(s[f]=r[f]);if(n){a=n(r);for(var l=0;l<a.length;l++)o.call(r,a[l])&&(s[a[l]]=r[a[l]])}}return s}},{}],62:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(t[n]=r[n])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){var e,r,n,i,o,a;for(n=0,e=0,r=t.length;e<r;e++)n+=t[e].length;for(a=new Uint8Array(n),i=0,e=0,r=t.length;e<r;e++)o=t[e],a.set(o,i),i+=o.length;return a}},a={arraySet:function(t,e,r,n,i){for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){return[].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,o)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,a))},r.setTyped(n)},{}],63:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}},{}],64:[function(t,e,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],65:[function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var o=n,a=i+r;t^=-1;for(var s=i;s<a;s++)t=t>>>8^o[255&(t^e[s])];return-1^t}},{}],66:[function(t,e,r){"use strict";var n,i=t("../utils/common"),o=t("./trees"),a=t("./adler32"),s=t("./crc32"),u=t("./messages"),f=0,l=1,c=3,h=4,p=5,d=0,g=1,y=-2,b=-3,v=-5,w=-1,m=1,_=2,E=3,x=4,k=0,I=2,S=8,T=9,A=15,N=8,L=286,D=30,M=19,O=2*L+1,U=15,B=3,C=258,R=C+B+1,z=32,j=42,F=69,P=73,Z=91,X=103,q=113,H=666,W=1,V=2,K=3,G=4,Y=3;function J(t,e){return t.msg=u[e],e}function $(t){return(t<<1)-(t>4?9:0)}function Q(t){for(var e=t.length;--e>=0;)t[e]=0}function tt(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function et(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,tt(t.strm)}function rt(t,e){t.pending_buf[t.pending++]=e}function nt(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function it(t,e){var r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-R?t.strstart-(t.w_size-R):0,f=t.window,l=t.w_mask,c=t.prev,h=t.strstart+C,p=f[o+a-1],d=f[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(f[(r=e)+a]===d&&f[r+a-1]===p&&f[r]===f[o]&&f[++r]===f[o+1]){o+=2,r++;do{}while(f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&o<h);if(n=C-(h-o),o=h-C,n>a){if(t.match_start=e,a=n,n>=s)break;p=f[o+a-1],d=f[o+a]}}}while((e=c[e&l])>u&&0!=--i);return a<=t.lookahead?a:t.lookahead}function ot(t){var e,r,n,o,u,f,l,c,h,p,d=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-R)){i.arraySet(t.window,t.window,d,d,0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--r);e=r=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--r);o+=d}if(0===t.strm.avail_in)break;if(f=t.strm,l=t.window,c=t.strstart+t.lookahead,h=o,p=void 0,(p=f.avail_in)>h&&(p=h),r=0===p?0:(f.avail_in-=p,i.arraySet(l,f.input,f.next_in,p,c),1===f.state.wrap?f.adler=a(f.adler,l,p,c):2===f.state.wrap&&(f.adler=s(f.adler,l,p,c)),f.next_in+=p,f.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=B)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+B-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<B)););}while(t.lookahead<R&&0!==t.strm.avail_in)}function at(t,e){for(var r,n;;){if(t.lookahead<R){if(ot(t),t.lookahead<R&&e===f)return W;if(0===t.lookahead)break}if(r=0,t.lookahead>=B&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+B-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-R&&(t.match_length=it(t,r)),t.match_length>=B)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-B),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=B){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+B-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(et(t,!1),0===t.strm.avail_out))return W}return t.insert=t.strstart<B-1?t.strstart:B-1,e===h?(et(t,!0),0===t.strm.avail_out?K:G):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?W:V}function st(t,e){for(var r,n,i;;){if(t.lookahead<R){if(ot(t),t.lookahead<R&&e===f)return W;if(0===t.lookahead)break}if(r=0,t.lookahead>=B&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+B-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=B-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-R&&(t.match_length=it(t,r),t.match_length<=5&&(t.strategy===m||t.match_length===B&&t.strstart-t.match_start>4096)&&(t.match_length=B-1)),t.prev_length>=B&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-B,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-B),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+B-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=B-1,t.strstart++,n&&(et(t,!1),0===t.strm.avail_out))return W}else if(t.match_available){if((n=o._tr_tally(t,0,t.window[t.strstart-1]))&&et(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return W}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<B-1?t.strstart:B-1,e===h?(et(t,!0),0===t.strm.avail_out?K:G):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?W:V}function ut(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function ft(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=I,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?j:q,t.adler=2===e.wrap?0:1,e.last_flush=f,o._tr_init(e),d):J(t,y)}function lt(t){var e,r=ft(t);return r===d&&((e=t.state).window_size=2*e.w_size,Q(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=B-1,e.match_available=0,e.ins_h=0),r}function ct(t,e,r,n,o,a){if(!t)return y;var s=1;if(e===w&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),o<1||o>T||r!==S||n<8||n>15||e<0||e>9||a<0||a>x)return J(t,y);8===n&&(n=9);var u=new function(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=S,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*O),this.dyn_dtree=new i.Buf16(2*(2*D+1)),this.bl_tree=new i.Buf16(2*(2*M+1)),Q(this.dyn_ltree),Q(this.dyn_dtree),Q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(U+1),this.heap=new i.Buf16(2*L+1),Q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*L+1),Q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0};return t.state=u,u.strm=t,u.wrap=s,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+B-1)/B),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=a,u.method=r,lt(t)}n=[new ut(0,0,0,0,function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(ot(t),0===t.lookahead&&e===f)return W;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,et(t,!1),0===t.strm.avail_out))return W;if(t.strstart-t.block_start>=t.w_size-R&&(et(t,!1),0===t.strm.avail_out))return W}return t.insert=0,e===h?(et(t,!0),0===t.strm.avail_out?K:G):(t.strstart>t.block_start&&(et(t,!1),t.strm.avail_out),W)}),new ut(4,4,8,4,at),new ut(4,5,16,8,at),new ut(4,6,32,32,at),new ut(4,4,16,16,st),new ut(8,16,32,32,st),new ut(8,16,128,128,st),new ut(8,32,128,256,st),new ut(32,128,258,1024,st),new ut(32,258,258,4096,st)],r.deflateInit=function(t,e){return ct(t,e,S,A,N,k)},r.deflateInit2=ct,r.deflateReset=lt,r.deflateResetKeep=ft,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?y:(t.state.gzhead=e,d):y},r.deflate=function(t,e){var r,i,a,u;if(!t||!t.state||e>p||e<0)return t?J(t,y):y;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===H&&e!==h)return J(t,0===t.avail_out?v:y);if(i.strm=t,r=i.last_flush,i.last_flush=e,i.status===j)if(2===i.wrap)t.adler=0,rt(i,31),rt(i,139),rt(i,8),i.gzhead?(rt(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),rt(i,255&i.gzhead.time),rt(i,i.gzhead.time>>8&255),rt(i,i.gzhead.time>>16&255),rt(i,i.gzhead.time>>24&255),rt(i,9===i.level?2:i.strategy>=_||i.level<2?4:0),rt(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(rt(i,255&i.gzhead.extra.length),rt(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=F):(rt(i,0),rt(i,0),rt(i,0),rt(i,0),rt(i,0),rt(i,9===i.level?2:i.strategy>=_||i.level<2?4:0),rt(i,Y),i.status=q);else{var b=S+(i.w_bits-8<<4)<<8;b|=(i.strategy>=_||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(b|=z),b+=31-b%31,i.status=q,nt(i,b),0!==i.strstart&&(nt(i,t.adler>>>16),nt(i,65535&t.adler)),t.adler=1}if(i.status===F)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),tt(t),a=i.pending,i.pending!==i.pending_buf_size));)rt(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=P)}else i.status=P;if(i.status===P)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),tt(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,rt(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=Z)}else i.status=Z;if(i.status===Z)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),tt(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,rt(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=X)}else i.status=X;if(i.status===X&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&tt(t),i.pending+2<=i.pending_buf_size&&(rt(i,255&t.adler),rt(i,t.adler>>8&255),t.adler=0,i.status=q)):i.status=q),0!==i.pending){if(tt(t),0===t.avail_out)return i.last_flush=-1,d}else if(0===t.avail_in&&$(e)<=$(r)&&e!==h)return J(t,v);if(i.status===H&&0!==t.avail_in)return J(t,v);if(0!==t.avail_in||0!==i.lookahead||e!==f&&i.status!==H){var w=i.strategy===_?function(t,e){for(var r;;){if(0===t.lookahead&&(ot(t),0===t.lookahead)){if(e===f)return W;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(et(t,!1),0===t.strm.avail_out))return W}return t.insert=0,e===h?(et(t,!0),0===t.strm.avail_out?K:G):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?W:V}(i,e):i.strategy===E?function(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=C){if(ot(t),t.lookahead<=C&&e===f)return W;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=B&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=t.strstart+C;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<a);t.match_length=C-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=B?(r=o._tr_tally(t,1,t.match_length-B),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(et(t,!1),0===t.strm.avail_out))return W}return t.insert=0,e===h?(et(t,!0),0===t.strm.avail_out?K:G):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?W:V}(i,e):n[i.level].func(i,e);if(w!==K&&w!==G||(i.status=H),w===W||w===K)return 0===t.avail_out&&(i.last_flush=-1),d;if(w===V&&(e===l?o._tr_align(i):e!==p&&(o._tr_stored_block(i,0,0,!1),e===c&&(Q(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),tt(t),0===t.avail_out))return i.last_flush=-1,d}return e!==h?d:i.wrap<=0?g:(2===i.wrap?(rt(i,255&t.adler),rt(i,t.adler>>8&255),rt(i,t.adler>>16&255),rt(i,t.adler>>24&255),rt(i,255&t.total_in),rt(i,t.total_in>>8&255),rt(i,t.total_in>>16&255),rt(i,t.total_in>>24&255)):(nt(i,t.adler>>>16),nt(i,65535&t.adler)),tt(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?d:g)},r.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==j&&e!==F&&e!==P&&e!==Z&&e!==X&&e!==q&&e!==H?J(t,y):(t.state=null,e===q?J(t,b):d):y},r.deflateSetDictionary=function(t,e){var r,n,o,s,u,f,l,c,h=e.length;if(!t||!t.state)return y;if(2===(s=(r=t.state).wrap)||1===s&&r.status!==j||r.lookahead)return y;for(1===s&&(t.adler=a(t.adler,e,h,0)),r.wrap=0,h>=r.w_size&&(0===s&&(Q(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new i.Buf8(r.w_size),i.arraySet(c,e,h-r.w_size,r.w_size,0),e=c,h=r.w_size),u=t.avail_in,f=t.next_in,l=t.input,t.avail_in=h,t.next_in=0,t.input=e,ot(r);r.lookahead>=B;){n=r.strstart,o=r.lookahead-(B-1);do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+B-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=B-1,ot(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=B-1,r.match_available=0,t.next_in=f,t.input=l,t.avail_in=u,r.wrap=s,d},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":62,"./adler32":63,"./crc32":65,"./messages":70,"./trees":71}],67:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n,i,o,a,s,u,f,l,c,h,p,d,g,y,b,v,w,m,_,E,x,k,I,S;r=t.state,n=t.next_in,I=t.input,i=n+(t.avail_in-5),o=t.next_out,S=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),u=r.dmax,f=r.wsize,l=r.whave,c=r.wnext,h=r.window,p=r.hold,d=r.bits,g=r.lencode,y=r.distcode,b=(1<<r.lenbits)-1,v=(1<<r.distbits)-1;t:do{d<15&&(p+=I[n++]<<d,d+=8,p+=I[n++]<<d,d+=8),w=g[p&b];e:for(;;){if(p>>>=m=w>>>24,d-=m,0===(m=w>>>16&255))S[o++]=65535&w;else{if(!(16&m)){if(0==(64&m)){w=g[(65535&w)+(p&(1<<m)-1)];continue e}if(32&m){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}_=65535&w,(m&=15)&&(d<m&&(p+=I[n++]<<d,d+=8),_+=p&(1<<m)-1,p>>>=m,d-=m),d<15&&(p+=I[n++]<<d,d+=8,p+=I[n++]<<d,d+=8),w=y[p&v];r:for(;;){if(p>>>=m=w>>>24,d-=m,!(16&(m=w>>>16&255))){if(0==(64&m)){w=y[(65535&w)+(p&(1<<m)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(E=65535&w,d<(m&=15)&&(p+=I[n++]<<d,(d+=8)<m&&(p+=I[n++]<<d,d+=8)),(E+=p&(1<<m)-1)>u){t.msg="invalid distance too far back",r.mode=30;break t}if(p>>>=m,d-=m,E>(m=o-a)){if((m=E-m)>l&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(x=0,k=h,0===c){if(x+=f-m,m<_){_-=m;do{S[o++]=h[x++]}while(--m);x=o-E,k=S}}else if(c<m){if(x+=f+c-m,(m-=c)<_){_-=m;do{S[o++]=h[x++]}while(--m);if(x=0,c<_){_-=m=c;do{S[o++]=h[x++]}while(--m);x=o-E,k=S}}}else if(x+=c-m,m<_){_-=m;do{S[o++]=h[x++]}while(--m);x=o-E,k=S}for(;_>2;)S[o++]=k[x++],S[o++]=k[x++],S[o++]=k[x++],_-=3;_&&(S[o++]=k[x++],_>1&&(S[o++]=k[x++]))}else{x=o-E;do{S[o++]=S[x++],S[o++]=S[x++],S[o++]=S[x++],_-=3}while(_>2);_&&(S[o++]=S[x++],_>1&&(S[o++]=S[x++]))}break}}break}}while(n<i&&o<s);n-=_=d>>3,p&=(1<<(d-=_<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=o<s?s-o+257:257-(o-s),r.hold=p,r.bits=d}},{}],68:[function(t,e,r){"use strict";var n=t("../utils/common"),i=t("./adler32"),o=t("./crc32"),a=t("./inffast"),s=t("./inftrees"),u=0,f=1,l=2,c=4,h=5,p=6,d=0,g=1,y=2,b=-2,v=-3,w=-4,m=-5,_=8,E=1,x=2,k=3,I=4,S=5,T=6,A=7,N=8,L=9,D=10,M=11,O=12,U=13,B=14,C=15,R=16,z=17,j=18,F=19,P=20,Z=21,X=22,q=23,H=24,W=25,V=26,K=27,G=28,Y=29,J=30,$=31,Q=32,tt=852,et=592,rt=15;function nt(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function it(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=E,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(tt),e.distcode=e.distdyn=new n.Buf32(et),e.sane=1,e.back=-1,d):b}function ot(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,it(t)):b}function at(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?b:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,ot(t))):b}function st(t,e){var r,i;return t?(i=new function(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0},t.state=i,i.window=null,(r=at(t,e))!==d&&(t.state=null),r):b}var ut,ft,lt=!0;function ct(t){if(lt){var e;for(ut=new n.Buf32(512),ft=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(f,t.lens,0,288,ut,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(l,t.lens,0,32,ft,0,t.work,{bits:5}),lt=!1}t.lencode=ut,t.lenbits=9,t.distcode=ft,t.distbits=5}function ht(t,e,r,i){var o,a=t.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new n.Buf8(a.wsize)),i>=a.wsize?(n.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,e,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}r.inflateReset=ot,r.inflateReset2=at,r.inflateResetKeep=it,r.inflateInit=function(t){return st(t,rt)},r.inflateInit2=st,r.inflate=function(t,e){var r,tt,et,rt,it,ot,at,st,ut,ft,lt,pt,dt,gt,yt,bt,vt,wt,mt,_t,Et,xt,kt,It,St=0,Tt=new n.Buf8(4),At=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return b;(r=t.state).mode===O&&(r.mode=U),it=t.next_out,et=t.output,at=t.avail_out,rt=t.next_in,tt=t.input,ot=t.avail_in,st=r.hold,ut=r.bits,ft=ot,lt=at,xt=d;t:for(;;)switch(r.mode){case E:if(0===r.wrap){r.mode=U;break}for(;ut<16;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}if(2&r.wrap&&35615===st){r.check=0,Tt[0]=255&st,Tt[1]=st>>>8&255,r.check=o(r.check,Tt,2,0),st=0,ut=0,r.mode=x;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&st)<<8)+(st>>8))%31){t.msg="incorrect header check",r.mode=J;break}if((15&st)!==_){t.msg="unknown compression method",r.mode=J;break}if(ut-=4,Et=8+(15&(st>>>=4)),0===r.wbits)r.wbits=Et;else if(Et>r.wbits){t.msg="invalid window size",r.mode=J;break}r.dmax=1<<Et,t.adler=r.check=1,r.mode=512&st?D:O,st=0,ut=0;break;case x:for(;ut<16;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}if(r.flags=st,(255&r.flags)!==_){t.msg="unknown compression method",r.mode=J;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=J;break}r.head&&(r.head.text=st>>8&1),512&r.flags&&(Tt[0]=255&st,Tt[1]=st>>>8&255,r.check=o(r.check,Tt,2,0)),st=0,ut=0,r.mode=k;case k:for(;ut<32;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}r.head&&(r.head.time=st),512&r.flags&&(Tt[0]=255&st,Tt[1]=st>>>8&255,Tt[2]=st>>>16&255,Tt[3]=st>>>24&255,r.check=o(r.check,Tt,4,0)),st=0,ut=0,r.mode=I;case I:for(;ut<16;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}r.head&&(r.head.xflags=255&st,r.head.os=st>>8),512&r.flags&&(Tt[0]=255&st,Tt[1]=st>>>8&255,r.check=o(r.check,Tt,2,0)),st=0,ut=0,r.mode=S;case S:if(1024&r.flags){for(;ut<16;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}r.length=st,r.head&&(r.head.extra_len=st),512&r.flags&&(Tt[0]=255&st,Tt[1]=st>>>8&255,r.check=o(r.check,Tt,2,0)),st=0,ut=0}else r.head&&(r.head.extra=null);r.mode=T;case T:if(1024&r.flags&&((pt=r.length)>ot&&(pt=ot),pt&&(r.head&&(Et=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,tt,rt,pt,Et)),512&r.flags&&(r.check=o(r.check,tt,pt,rt)),ot-=pt,rt+=pt,r.length-=pt),r.length))break t;r.length=0,r.mode=A;case A:if(2048&r.flags){if(0===ot)break t;pt=0;do{Et=tt[rt+pt++],r.head&&Et&&r.length<65536&&(r.head.name+=String.fromCharCode(Et))}while(Et&&pt<ot);if(512&r.flags&&(r.check=o(r.check,tt,pt,rt)),ot-=pt,rt+=pt,Et)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=N;case N:if(4096&r.flags){if(0===ot)break t;pt=0;do{Et=tt[rt+pt++],r.head&&Et&&r.length<65536&&(r.head.comment+=String.fromCharCode(Et))}while(Et&&pt<ot);if(512&r.flags&&(r.check=o(r.check,tt,pt,rt)),ot-=pt,rt+=pt,Et)break t}else r.head&&(r.head.comment=null);r.mode=L;case L:if(512&r.flags){for(;ut<16;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}if(st!==(65535&r.check)){t.msg="header crc mismatch",r.mode=J;break}st=0,ut=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=O;break;case D:for(;ut<32;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}t.adler=r.check=nt(st),st=0,ut=0,r.mode=M;case M:if(0===r.havedict)return t.next_out=it,t.avail_out=at,t.next_in=rt,t.avail_in=ot,r.hold=st,r.bits=ut,y;t.adler=r.check=1,r.mode=O;case O:if(e===h||e===p)break t;case U:if(r.last){st>>>=7&ut,ut-=7&ut,r.mode=K;break}for(;ut<3;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}switch(r.last=1&st,ut-=1,3&(st>>>=1)){case 0:r.mode=B;break;case 1:if(ct(r),r.mode=P,e===p){st>>>=2,ut-=2;break t}break;case 2:r.mode=z;break;case 3:t.msg="invalid block type",r.mode=J}st>>>=2,ut-=2;break;case B:for(st>>>=7&ut,ut-=7&ut;ut<32;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}if((65535&st)!=(st>>>16^65535)){t.msg="invalid stored block lengths",r.mode=J;break}if(r.length=65535&st,st=0,ut=0,r.mode=C,e===p)break t;case C:r.mode=R;case R:if(pt=r.length){if(pt>ot&&(pt=ot),pt>at&&(pt=at),0===pt)break t;n.arraySet(et,tt,rt,pt,it),ot-=pt,rt+=pt,at-=pt,it+=pt,r.length-=pt;break}r.mode=O;break;case z:for(;ut<14;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}if(r.nlen=257+(31&st),st>>>=5,ut-=5,r.ndist=1+(31&st),st>>>=5,ut-=5,r.ncode=4+(15&st),st>>>=4,ut-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=J;break}r.have=0,r.mode=j;case j:for(;r.have<r.ncode;){for(;ut<3;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}r.lens[At[r.have++]]=7&st,st>>>=3,ut-=3}for(;r.have<19;)r.lens[At[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,kt={bits:r.lenbits},xt=s(u,r.lens,0,19,r.lencode,0,r.work,kt),r.lenbits=kt.bits,xt){t.msg="invalid code lengths set",r.mode=J;break}r.have=0,r.mode=F;case F:for(;r.have<r.nlen+r.ndist;){for(;bt=(St=r.lencode[st&(1<<r.lenbits)-1])>>>16&255,vt=65535&St,!((yt=St>>>24)<=ut);){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}if(vt<16)st>>>=yt,ut-=yt,r.lens[r.have++]=vt;else{if(16===vt){for(It=yt+2;ut<It;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}if(st>>>=yt,ut-=yt,0===r.have){t.msg="invalid bit length repeat",r.mode=J;break}Et=r.lens[r.have-1],pt=3+(3&st),st>>>=2,ut-=2}else if(17===vt){for(It=yt+3;ut<It;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}ut-=yt,Et=0,pt=3+(7&(st>>>=yt)),st>>>=3,ut-=3}else{for(It=yt+7;ut<It;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}ut-=yt,Et=0,pt=11+(127&(st>>>=yt)),st>>>=7,ut-=7}if(r.have+pt>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=J;break}for(;pt--;)r.lens[r.have++]=Et}}if(r.mode===J)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=J;break}if(r.lenbits=9,kt={bits:r.lenbits},xt=s(f,r.lens,0,r.nlen,r.lencode,0,r.work,kt),r.lenbits=kt.bits,xt){t.msg="invalid literal/lengths set",r.mode=J;break}if(r.distbits=6,r.distcode=r.distdyn,kt={bits:r.distbits},xt=s(l,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,kt),r.distbits=kt.bits,xt){t.msg="invalid distances set",r.mode=J;break}if(r.mode=P,e===p)break t;case P:r.mode=Z;case Z:if(ot>=6&&at>=258){t.next_out=it,t.avail_out=at,t.next_in=rt,t.avail_in=ot,r.hold=st,r.bits=ut,a(t,lt),it=t.next_out,et=t.output,at=t.avail_out,rt=t.next_in,tt=t.input,ot=t.avail_in,st=r.hold,ut=r.bits,r.mode===O&&(r.back=-1);break}for(r.back=0;bt=(St=r.lencode[st&(1<<r.lenbits)-1])>>>16&255,vt=65535&St,!((yt=St>>>24)<=ut);){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}if(bt&&0==(240&bt)){for(wt=yt,mt=bt,_t=vt;bt=(St=r.lencode[_t+((st&(1<<wt+mt)-1)>>wt)])>>>16&255,vt=65535&St,!(wt+(yt=St>>>24)<=ut);){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}st>>>=wt,ut-=wt,r.back+=wt}if(st>>>=yt,ut-=yt,r.back+=yt,r.length=vt,0===bt){r.mode=V;break}if(32&bt){r.back=-1,r.mode=O;break}if(64&bt){t.msg="invalid literal/length code",r.mode=J;break}r.extra=15&bt,r.mode=X;case X:if(r.extra){for(It=r.extra;ut<It;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}r.length+=st&(1<<r.extra)-1,st>>>=r.extra,ut-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=q;case q:for(;bt=(St=r.distcode[st&(1<<r.distbits)-1])>>>16&255,vt=65535&St,!((yt=St>>>24)<=ut);){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}if(0==(240&bt)){for(wt=yt,mt=bt,_t=vt;bt=(St=r.distcode[_t+((st&(1<<wt+mt)-1)>>wt)])>>>16&255,vt=65535&St,!(wt+(yt=St>>>24)<=ut);){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}st>>>=wt,ut-=wt,r.back+=wt}if(st>>>=yt,ut-=yt,r.back+=yt,64&bt){t.msg="invalid distance code",r.mode=J;break}r.offset=vt,r.extra=15&bt,r.mode=H;case H:if(r.extra){for(It=r.extra;ut<It;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}r.offset+=st&(1<<r.extra)-1,st>>>=r.extra,ut-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=J;break}r.mode=W;case W:if(0===at)break t;if(pt=lt-at,r.offset>pt){if((pt=r.offset-pt)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=J;break}pt>r.wnext?(pt-=r.wnext,dt=r.wsize-pt):dt=r.wnext-pt,pt>r.length&&(pt=r.length),gt=r.window}else gt=et,dt=it-r.offset,pt=r.length;pt>at&&(pt=at),at-=pt,r.length-=pt;do{et[it++]=gt[dt++]}while(--pt);0===r.length&&(r.mode=Z);break;case V:if(0===at)break t;et[it++]=r.length,at--,r.mode=Z;break;case K:if(r.wrap){for(;ut<32;){if(0===ot)break t;ot--,st|=tt[rt++]<<ut,ut+=8}if(lt-=at,t.total_out+=lt,r.total+=lt,lt&&(t.adler=r.check=r.flags?o(r.check,et,lt,it-lt):i(r.check,et,lt,it-lt)),lt=at,(r.flags?st:nt(st))!==r.check){t.msg="incorrect data check",r.mode=J;break}st=0,ut=0}r.mode=G;case G:if(r.wrap&&r.flags){for(;ut<32;){if(0===ot)break t;ot--,st+=tt[rt++]<<ut,ut+=8}if(st!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=J;break}st=0,ut=0}r.mode=Y;case Y:xt=g;break t;case J:xt=v;break t;case $:return w;case Q:default:return b}return t.next_out=it,t.avail_out=at,t.next_in=rt,t.avail_in=ot,r.hold=st,r.bits=ut,(r.wsize||lt!==t.avail_out&&r.mode<J&&(r.mode<K||e!==c))&&ht(t,t.output,t.next_out,lt-t.avail_out)?(r.mode=$,w):(ft-=t.avail_in,lt-=t.avail_out,t.total_in+=ft,t.total_out+=lt,r.total+=lt,r.wrap&&lt&&(t.adler=r.check=r.flags?o(r.check,et,lt,t.next_out-lt):i(r.check,et,lt,t.next_out-lt)),t.data_type=r.bits+(r.last?64:0)+(r.mode===O?128:0)+(r.mode===P||r.mode===C?256:0),(0===ft&&0===lt||e===c)&&xt===d&&(xt=m),xt)},r.inflateEnd=function(t){if(!t||!t.state)return b;var e=t.state;return e.window&&(e.window=null),t.state=null,d},r.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?b:(r.head=e,e.done=!1,d):b},r.inflateSetDictionary=function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&r.mode!==M?b:r.mode===M&&i(1,e,n,0)!==r.check?v:ht(t,e,n,n)?(r.mode=$,w):(r.havedict=1,d):b},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":62,"./adler32":63,"./crc32":65,"./inffast":67,"./inftrees":69}],69:[function(t,e,r){"use strict";var n=t("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(t,e,r,u,f,l,c,h){var p,d,g,y,b,v,w,m,_,E=h.bits,x=0,k=0,I=0,S=0,T=0,A=0,N=0,L=0,D=0,M=0,O=null,U=0,B=new n.Buf16(16),C=new n.Buf16(16),R=null,z=0;for(x=0;x<=15;x++)B[x]=0;for(k=0;k<u;k++)B[e[r+k]]++;for(T=E,S=15;S>=1&&0===B[S];S--);if(T>S&&(T=S),0===S)return f[l++]=20971520,f[l++]=20971520,h.bits=1,0;for(I=1;I<S&&0===B[I];I++);for(T<I&&(T=I),L=1,x=1;x<=15;x++)if(L<<=1,(L-=B[x])<0)return-1;if(L>0&&(0===t||1!==S))return-1;for(C[1]=0,x=1;x<15;x++)C[x+1]=C[x]+B[x];for(k=0;k<u;k++)0!==e[r+k]&&(c[C[e[r+k]]++]=k);if(0===t?(O=R=c,v=19):1===t?(O=i,U-=257,R=o,z-=257,v=256):(O=a,R=s,v=-1),M=0,k=0,x=I,b=l,A=T,N=0,g=-1,y=(D=1<<T)-1,1===t&&D>852||2===t&&D>592)return 1;for(;;){w=x-N,c[k]<v?(m=0,_=c[k]):c[k]>v?(m=R[z+c[k]],_=O[U+c[k]]):(m=96,_=0),p=1<<x-N,I=d=1<<A;do{f[b+(M>>N)+(d-=p)]=w<<24|m<<16|_|0}while(0!==d);for(p=1<<x-1;M&p;)p>>=1;if(0!==p?(M&=p-1,M+=p):M=0,k++,0==--B[x]){if(x===S)break;x=e[r+c[k]]}if(x>T&&(M&y)!==g){for(0===N&&(N=T),b+=I,L=1<<(A=x-N);A+N<S&&!((L-=B[A+N])<=0);)A++,L<<=1;if(D+=1<<A,1===t&&D>852||2===t&&D>592)return 1;f[g=M&y]=T<<24|A<<16|b-l|0}}return 0!==M&&(f[b+M]=x-N<<24|64<<16|0),h.bits=T,0}},{"../utils/common":62}],70:[function(t,e,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],71:[function(t,e,r){"use strict";var n=t("../utils/common"),i=4,o=0,a=1,s=2;function u(t){for(var e=t.length;--e>=0;)t[e]=0}var f=0,l=1,c=2,h=29,p=256,d=p+1+h,g=30,y=19,b=2*d+1,v=15,w=16,m=7,_=256,E=16,x=17,k=18,I=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],S=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],N=new Array(2*(d+2));u(N);var L=new Array(2*g);u(L);var D=new Array(512);u(D);var M=new Array(256);u(M);var O=new Array(h);u(O);var U,B,C,R=new Array(g);function z(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function j(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function F(t){return t<256?D[t]:D[256+(t>>>7)]}function P(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function Z(t,e,r){t.bi_valid>w-r?(t.bi_buf|=e<<t.bi_valid&65535,P(t,t.bi_buf),t.bi_buf=e>>w-t.bi_valid,t.bi_valid+=r-w):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function X(t,e,r){Z(t,r[2*e],r[2*e+1])}function q(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function H(t,e,r){var n,i,o=new Array(v+1),a=0;for(n=1;n<=v;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=q(o[s]++,s))}}function W(t){var e;for(e=0;e<d;e++)t.dyn_ltree[2*e]=0;for(e=0;e<g;e++)t.dyn_dtree[2*e]=0;for(e=0;e<y;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*_]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function V(t){t.bi_valid>8?P(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function K(t,e,r,n){var i=2*e,o=2*r;return t[i]<t[o]||t[i]===t[o]&&n[e]<=n[r]}function G(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&K(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!K(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function Y(t,e,r){var n,i,o,a,s=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],i=t.pending_buf[t.l_buf+s],s++,0===n?X(t,i,e):(X(t,(o=M[i])+p+1,e),0!==(a=I[o])&&Z(t,i-=O[o],a),X(t,o=F(--n),r),0!==(a=S[o])&&Z(t,n-=R[o],a))}while(s<t.last_lit);X(t,_,e)}function J(t,e){var r,n,i,o=e.dyn_tree,a=e.stat_desc.static_tree,s=e.stat_desc.has_stree,u=e.stat_desc.elems,f=-1;for(t.heap_len=0,t.heap_max=b,r=0;r<u;r++)0!==o[2*r]?(t.heap[++t.heap_len]=f=r,t.depth[r]=0):o[2*r+1]=0;for(;t.heap_len<2;)o[2*(i=t.heap[++t.heap_len]=f<2?++f:0)]=1,t.depth[i]=0,t.opt_len--,s&&(t.static_len-=a[2*i+1]);for(e.max_code=f,r=t.heap_len>>1;r>=1;r--)G(t,o,r);i=u;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],G(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,G(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,a,s,u=e.dyn_tree,f=e.max_code,l=e.stat_desc.static_tree,c=e.stat_desc.has_stree,h=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,d=e.stat_desc.max_length,g=0;for(o=0;o<=v;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<b;r++)(o=u[2*u[2*(n=t.heap[r])+1]+1]+1)>d&&(o=d,g++),u[2*n+1]=o,n>f||(t.bl_count[o]++,a=0,n>=p&&(a=h[n-p]),s=u[2*n],t.opt_len+=s*(o+a),c&&(t.static_len+=s*(l[2*n+1]+a)));if(0!==g){do{for(o=d-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[d]--,g-=2}while(g>0);for(o=d;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>f||(u[2*i+1]!==o&&(t.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(t,e),H(o,f,t.bl_count)}function $(t,e,r){var n,i,o=-1,a=e[1],s=0,u=7,f=4;for(0===a&&(u=138,f=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s<u&&i===a||(s<f?t.bl_tree[2*i]+=s:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[2*E]++):s<=10?t.bl_tree[2*x]++:t.bl_tree[2*k]++,s=0,o=i,0===a?(u=138,f=3):i===a?(u=6,f=3):(u=7,f=4))}function Q(t,e,r){var n,i,o=-1,a=e[1],s=0,u=7,f=4;for(0===a&&(u=138,f=3),n=0;n<=r;n++)if(i=a,a=e[2*(n+1)+1],!(++s<u&&i===a)){if(s<f)do{X(t,i,t.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(X(t,i,t.bl_tree),s--),X(t,E,t.bl_tree),Z(t,s-3,2)):s<=10?(X(t,x,t.bl_tree),Z(t,s-3,3)):(X(t,k,t.bl_tree),Z(t,s-11,7));s=0,o=i,0===a?(u=138,f=3):i===a?(u=6,f=3):(u=7,f=4)}}u(R);var tt=!1;function et(t,e,r,i){Z(t,(f<<1)+(i?1:0),3),function(t,e,r,i){V(t),i&&(P(t,r),P(t,~r)),n.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r,!0)}r._tr_init=function(t){tt||(function(){var t,e,r,n,i,o=new Array(v+1);for(r=0,n=0;n<h-1;n++)for(O[n]=r,t=0;t<1<<I[n];t++)M[r++]=n;for(M[r-1]=n,i=0,n=0;n<16;n++)for(R[n]=i,t=0;t<1<<S[n];t++)D[i++]=n;for(i>>=7;n<g;n++)for(R[n]=i<<7,t=0;t<1<<S[n]-7;t++)D[256+i++]=n;for(e=0;e<=v;e++)o[e]=0;for(t=0;t<=143;)N[2*t+1]=8,t++,o[8]++;for(;t<=255;)N[2*t+1]=9,t++,o[9]++;for(;t<=279;)N[2*t+1]=7,t++,o[7]++;for(;t<=287;)N[2*t+1]=8,t++,o[8]++;for(H(N,d+1,o),t=0;t<g;t++)L[2*t+1]=5,L[2*t]=q(t,5);U=new z(N,I,p+1,d,v),B=new z(L,S,0,g,v),C=new z(new Array(0),T,0,y,m)}(),tt=!0),t.l_desc=new j(t.dyn_ltree,U),t.d_desc=new j(t.dyn_dtree,B),t.bl_desc=new j(t.bl_tree,C),t.bi_buf=0,t.bi_valid=0,W(t)},r._tr_stored_block=et,r._tr_flush_block=function(t,e,r,n){var u,f,h=0;t.level>0?(t.strm.data_type===s&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return o;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return a;for(e=32;e<p;e++)if(0!==t.dyn_ltree[2*e])return a;return o}(t)),J(t,t.l_desc),J(t,t.d_desc),h=function(t){var e;for($(t,t.dyn_ltree,t.l_desc.max_code),$(t,t.dyn_dtree,t.d_desc.max_code),J(t,t.bl_desc),e=y-1;e>=3&&0===t.bl_tree[2*A[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),u=t.opt_len+3+7>>>3,(f=t.static_len+3+7>>>3)<=u&&(u=f)):u=f=r+5,r+4<=u&&-1!==e?et(t,e,r,n):t.strategy===i||f===u?(Z(t,(l<<1)+(n?1:0),3),Y(t,N,L)):(Z(t,(c<<1)+(n?1:0),3),function(t,e,r,n){var i;for(Z(t,e-257,5),Z(t,r-1,5),Z(t,n-4,4),i=0;i<n;i++)Z(t,t.bl_tree[2*A[i]+1],3);Q(t,t.dyn_ltree,e-1),Q(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),Y(t,t.dyn_ltree,t.dyn_dtree)),W(t),n&&V(t)},r._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(M[r]+p+1)]++,t.dyn_dtree[2*F(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){Z(t,l<<1,3),X(t,_,N),function(t){16===t.bi_valid?(P(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":62}],72:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],73:[function(t,e,r){(function(t){(function(){function e(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}r.resolve=function(){for(var r="",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&&(r=a+"/"+r,i="/"===a.charAt(0))}return r=e(n(r.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(t){var o=r.isAbsolute(t),a="/"===i(t,-1);return(t=e(n(t.split("/"),function(t){return!!t}),!o).join("/"))||o||(t="."),t&&a&&(t+="/"),(o?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){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=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var i=n(t.split("/")),o=n(e.split("/")),a=Math.min(i.length,o.length),s=a,u=0;u<a;u++)if(i[u]!==o[u]){s=u;break}var f=[];for(u=s;u<i.length;u++)f.push("..");return(f=f.concat(o.slice(s))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,i=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!i){n=o;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":t.slice(0,n)},r.basename=function(t,e){var r=function(t){"string"!=typeof t&&(t+="");var e,r=0,n=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){r=e+1;break}}else-1===n&&(i=!1,n=e+1);return-1===n?"":t.slice(r,n)}(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,r=0,n=-1,i=!0,o=0,a=t.length-1;a>=0;--a){var s=t.charCodeAt(a);if(47!==s)-1===n&&(i=!1,n=a+1),46===s?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){r=a+1;break}}return-1===e||-1===n||0===o||1===o&&e===n-1&&e===r+1?"":t.slice(e,n)};var i="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this)}).call(this,t("_process"))},{_process:78}],74:[function(t,e,r){var n=t("./lib/parse");Object.keys(n).forEach(function(t){r[t]=n[t]});var i=t("./lib/build");Object.keys(i).forEach(function(t){r[t]=i[t]})},{"./lib/build":75,"./lib/parse":76}],75:[function(t,e,r){(function(e){(function(){var n=t("base64-js"),i=t("xmlbuilder");r.build=function(t,r){var o={version:"1.0",encoding:"UTF-8"},s={pubid:"-//Apple//DTD PLIST 1.0//EN",sysid:"http://www.apple.com/DTDs/PropertyList-1.0.dtd"},u=i.create("plist");u.dec(o.version,o.encoding,o.standalone),u.dtd(s.pubid,s.sysid),u.att("version","1.0"),function t(r,i){var o,s,u,f=a(r);if("Undefined"!=f)if(Array.isArray(r))for(i=i.ele("array"),s=0;s<r.length;s++)t(r[s],i);else if(e.isBuffer(r))i.ele("data").raw(r.toString("base64"));else if("Object"==f)for(u in i=i.ele("dict"),r)r.hasOwnProperty(u)&&(i.ele("key").txt(u),t(r[u],i));else"Number"==f?(o=r%1==0?"integer":"real",i.ele(o).txt(r.toString())):"Date"==f?i.ele("date").txt(function(t){function e(t){return t<10?"0"+t:t}return t.getUTCFullYear()+"-"+e(t.getUTCMonth()+1)+"-"+e(t.getUTCDate())+"T"+e(t.getUTCHours())+":"+e(t.getUTCMinutes())+":"+e(t.getUTCSeconds())+"Z"}(new Date(r))):"Boolean"==f?i.ele(r?"true":"false"):"String"==f?i.ele("string").txt(r):"ArrayBuffer"==f?i.ele("data").raw(n.fromByteArray(r)):r&&r.buffer&&"ArrayBuffer"==a(r.buffer)&&i.ele("data").raw(n.fromByteArray(new Uint8Array(r.buffer),i))}(t,u),r||(r={});return r.pretty=!1!==r.pretty,u.end(r)};var o=Object.prototype.toString;function a(t){var e=o.call(t).match(/\[object (.*)\]/);return e?e[1]:e}}).call(this)}).call(this,{isBuffer:t("../../is-buffer/index.js")})},{"../../is-buffer/index.js":54,"base64-js":13,xmlbuilder:124}],76:[function(t,e,r){(function(e){(function(){var n=t("xmldom").DOMParser;r.parse=function(t){var r=(new n).parseFromString(t);f("plist"===r.documentElement.nodeName,"malformed document. First element should be <plist>");var a=function t(r){var n,a,l,c,h,p;if(!r)return null;if("plist"===r.nodeName){if(c=[],u(r))return c;for(n=0;n<r.childNodes.length;n++)s(r.childNodes[n])||c.push(t(r.childNodes[n]));return c}if("dict"===r.nodeName){if(a={},l=null,p=0,u(r))return a;for(n=0;n<r.childNodes.length;n++)s(r.childNodes[n])||(p%2==0?(f("key"===r.childNodes[n].nodeName,"Missing key while parsing <dict/>."),l=t(r.childNodes[n])):(f("key"!==r.childNodes[n].nodeName,'Unexpected key "'+t(r.childNodes[n])+'" while parsing <dict/>.'),a[l]=t(r.childNodes[n])),p+=1);if(p%2==1)throw new Error('Missing value for "'+l+'" while parsing <dict/>');return a}if("array"===r.nodeName){if(c=[],u(r))return c;for(n=0;n<r.childNodes.length;n++)s(r.childNodes[n])||null!=(h=t(r.childNodes[n]))&&c.push(h);return c}if("#text"===r.nodeName);else{if("key"===r.nodeName)return u(r)?"":r.childNodes[0].nodeValue;if("string"===r.nodeName){if(h="",u(r))return h;for(n=0;n<r.childNodes.length;n++){var d=r.childNodes[n].nodeType;d!==i&&d!==o||(h+=r.childNodes[n].nodeValue)}return h}if("integer"===r.nodeName)return f(!u(r),'Cannot parse "" as integer.'),parseInt(r.childNodes[0].nodeValue,10);if("real"===r.nodeName){for(f(!u(r),'Cannot parse "" as real.'),h="",n=0;n<r.childNodes.length;n++)r.childNodes[n].nodeType===i&&(h+=r.childNodes[n].nodeValue);return parseFloat(h)}if("data"===r.nodeName){if(h="",u(r))return e.from(h,"base64");for(n=0;n<r.childNodes.length;n++)r.childNodes[n].nodeType===i&&(h+=r.childNodes[n].nodeValue.replace(/\s+/g,""));return e.from(h,"base64")}if("date"===r.nodeName)return f(!u(r),'Cannot parse "" as Date.'),new Date(r.childNodes[0].nodeValue);if("true"===r.nodeName)return!0;if("false"===r.nodeName)return!1}}(r.documentElement);1==a.length&&(a=a[0]);return a};var i=3,o=4,a=8;function s(t){return t.nodeType===i||t.nodeType===a||t.nodeType===o}function u(t){return!t.childNodes||0===t.childNodes.length}function f(t,e){if(!t)throw new Error(e)}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:20,xmldom:125}],77:[function(t,e,r){(function(t){(function(){"use strict";void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return t.nextTick(function(){e.apply(null,o)})}}}:e.exports=t}).call(this)}).call(this,t("_process"))},{_process:78}],78:[function(t,e,r){var n,i,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var f,l=[],c=!1,h=-1;function p(){c&&f&&(c=!1,f.length?l=f.concat(l):h=-1,l.length&&d())}function d(){if(!c){var t=u(p);c=!0;for(var e=l.length;e;){for(f=l,l=[];++h<e;)f&&f[h].run();h=-1,e=l.length}f=null,c=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function y(){}o.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];l.push(new g(t,e)),1!==l.length||c||u(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],79:[function(t,e,r){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":80}],80:[function(t,e,r){"use strict";var n=t("process-nextick-args"),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=c;var o=Object.create(t("core-util-is"));o.inherits=t("inherits");var a=t("./_stream_readable"),s=t("./_stream_writable");o.inherits(c,a);for(var u=i(s.prototype),f=0;f<u.length;f++){var l=u[f];c.prototype[l]||(c.prototype[l]=s.prototype[l])}function c(t){if(!(this instanceof c))return new c(t);a.call(this,t),s.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),c.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},{"./_stream_readable":82,"./_stream_writable":84,"core-util-is":25,inherits:53,"process-nextick-args":77}],81:[function(t,e,r){"use strict";e.exports=o;var n=t("./_stream_transform"),i=Object.create(t("core-util-is"));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=t("inherits"),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},{"./_stream_transform":83,"core-util-is":25,inherits:53}],82:[function(t,e,r){(function(r,n){(function(){"use strict";var i=t("process-nextick-args");e.exports=w;var o,a=t("isarray");w.ReadableState=v;t("events").EventEmitter;var s=function(t,e){return t.listeners(e).length},u=t("./internal/streams/stream"),f=t("safe-buffer").Buffer,l=n.Uint8Array||function(){};var c=Object.create(t("core-util-is"));c.inherits=t("inherits");var h=t("util"),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,g=t("./internal/streams/BufferList"),y=t("./internal/streams/destroy");c.inherits(w,u);var b=["error","close","destroy","pause","resume"];function v(e,r){o=o||t("./_stream_duplex"),e=e||{};var n=r instanceof o;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=t("string_decoder/").StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function w(e){if(o=o||t("./_stream_duplex"),!(this instanceof w))return new w(e);this._readableState=new v(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function m(t,e,r,n,i){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,k(t)}(t,a)):(i||(o=function(t,e){var r;n=e,f.isBuffer(n)||n instanceof l||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===f.prototype||(e=function(t){return f.from(t)}(e)),n?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?_(t,a,e,!1):S(t,a)):_(t,a,e,!1))):n||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(a)}function _(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),S(t,e)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),w.prototype.destroy=y.destroy,w.prototype._undestroy=y.undestroy,w.prototype._destroy=function(t,e){this.push(null),e(t)},w.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=f.from(t,e),e=""),r=!0),m(this,t,e,!1,r)},w.prototype.unshift=function(t){return m(this,t,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(e){return d||(d=t("string_decoder/").StringDecoder),this._readableState.decoder=new d(e),this._readableState.encoding=e,this};var E=8388608;function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(I,t):I(t))}function I(t){p("emit readable"),t.emit("readable"),L(t)}function S(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(T,t,e))}function T(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 A(t){p("readable nexttick read 0"),t.read(0)}function N(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0)}function L(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function D(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=f.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0===(t-=a)){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function M(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(O,e,t))}function O(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function U(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}w.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(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?M(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&M(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(n=t>0?D(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&M(this)),null!==n&&this.emit("data",n),n},w.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:w;function f(e,r){p("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),t.removeListener("close",b),t.removeListener("finish",v),t.removeListener("drain",c),t.removeListener("error",y),t.removeListener("unpipe",f),n.removeListener("end",l),n.removeListener("end",w),n.removeListener("data",g),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}function l(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",f);var c=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,L(t))}}(n);t.on("drain",c);var h=!1;var d=!1;function g(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==U(o.pipes,t))&&!h&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,d=!0),n.pause())}function y(e){p("onerror",e),w(),t.removeListener("error",y),0===s(t,"error")&&t.emit("error",e)}function b(){t.removeListener("finish",v),w()}function v(){p("onfinish"),t.removeListener("close",b),w()}function w(){p("unpipe"),n.unpipe(t)}return n.on("data",g),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",y),t.once("close",b),t.once("finish",v),t.emit("pipe",n),o.flowing||(p("pipe resume"),n.resume()),t},w.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var a=U(e.pipes,t);return-1===a?this:(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},w.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&k(this):i.nextTick(A,this))}return r},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(N,t,e))}(this,t)),this},w.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},w.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",function(){if(p("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(p("wrapped data"),r.decoder&&(i=r.decoder.write(i)),!r.objectMode||null!==i&&void 0!==i)&&((r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause())))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<b.length;o++)t.on(b[o],this.emit.bind(this,b[o]));return this._read=function(e){p("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=D}).call(this)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":80,"./internal/streams/BufferList":85,"./internal/streams/destroy":86,"./internal/streams/stream":87,_process:78,"core-util-is":25,events:51,inherits:53,isarray:55,"process-nextick-args":77,"safe-buffer":88,"string_decoder/":89,util:16}],83:[function(t,e,r){"use strict";e.exports=o;var n=t("./_stream_duplex"),i=Object.create(t("core-util-is"));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),this._transformState={afterTransform:function(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){s(t,e,r)}):s(this,null,null)}function s(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=t("inherits"),i.inherits(o,n),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("_transform() is 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;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},{"./_stream_duplex":80,"core-util-is":25,inherits:53}],84:[function(t,e,r){(function(r,n,i){(function(){"use strict";var o=t("process-nextick-args");function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}e.exports=v;var s,u=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?i:o.nextTick;v.WritableState=b;var f=Object.create(t("core-util-is"));f.inherits=t("inherits");var l={deprecate:t("util-deprecate")},c=t("./internal/streams/stream"),h=t("safe-buffer").Buffer,p=n.Uint8Array||function(){};var d,g=t("./internal/streams/destroy");function y(){}function b(e,r){s=s||t("./_stream_duplex"),e=e||{};var n=r instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,f=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(f||0===f)?f:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(k,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),k(t,e))}(t,r,n,e,i);else{var a=E(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(t,r),n?u(m,t,r,a,i):m(t,r,a,i)}}(r,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function v(e){if(s=s||t("./_stream_duplex"),!(d.call(v,this)||this instanceof s))return new v(e);this._writableState=new b(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),c.call(this)}function w(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 m(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),k(t,e)}function _(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,w(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,l=r.encoding,c=r.callback;if(w(t,e,!1,e.objectMode?1:f.length,f,l,c),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function x(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),k(t,e)})}function k(t,e){var r=E(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(x,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}f.inherits(v,c),b.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(b.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===v&&(t&&t._writableState instanceof b)}})):d=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=t,h.isBuffer(n)||n instanceof p);return s&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=y),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(n,a),i=!1),i}(this,i,t,r))&&(i.pendingcb++,a=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else w(t,e,!1,s,n,i,o);return u}(this,i,s,t,e,r)),a},v.prototype.cork=function(){this._writableState.corked++},v.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||_(this,t))},v.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!==t&&void 0!==t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,k(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=g.destroy,v.prototype._undestroy=g.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("timers").setImmediate)},{"./_stream_duplex":80,"./internal/streams/destroy":86,"./internal/streams/stream":87,_process:78,"core-util-is":25,inherits:53,"process-nextick-args":77,"safe-buffer":88,timers:98,"util-deprecate":99}],85:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=t("util");e.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,o=n.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=o,i=s,e.copy(r,i),s+=a.data.length,a=a.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},{"safe-buffer":88,util:16}],86:[function(t,e,r){"use strict";var n=t("process-nextick-args");function i(t,e){t.emit("error",e)}e.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(n.nextTick(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":77}],87:[function(t,e,r){e.exports=t("events").EventEmitter},{events:51}],88:[function(t,e,r){var n=t("buffer"),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,r),r.Buffer=a),o(i,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},{buffer:20}],89:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=n.isEncoding||function(t){switch((t=""+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}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=f,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=l,this.end=c,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function f(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}r.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=a(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":88}],90:[function(t,e,r){e.exports=t("./readable").PassThrough},{"./readable":91}],91:[function(t,e,r){(r=e.exports=t("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":80,"./lib/_stream_passthrough.js":81,"./lib/_stream_readable.js":82,"./lib/_stream_transform.js":83,"./lib/_stream_writable.js":84}],92:[function(t,e,r){e.exports=t("./readable").Transform},{"./readable":91}],93:[function(t,e,r){e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":84}],94:[function(t,e,r){e.exports=i;var n=t("events").EventEmitter;function i(){n.call(this)}t("inherits")(i,n),i.Readable=t("readable-stream/readable.js"),i.Writable=t("readable-stream/writable.js"),i.Duplex=t("readable-stream/duplex.js"),i.Transform=t("readable-stream/transform.js"),i.PassThrough=t("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,t.end())}function u(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(l(),0===n.listenerCount(this,"error"))throw t}function l(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("error",f),t.on("error",f),r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t}},{events:51,inherits:53,"readable-stream/duplex.js":79,"readable-stream/passthrough.js":90,"readable-stream/readable.js":91,"readable-stream/transform.js":92,"readable-stream/writable.js":93}],95:[function(t,e,r){e.exports=t("stream-to").buffer},{"stream-to":96}],96:[function(t,e,r){(function(t){(function(){function e(t,e){var r=[];function n(t){r.push(t)}function i(){e(null,r),o()}function o(){r=null,t.removeListener("data",n),t.removeListener("end",i),t.removeListener("error",e),t.removeListener("error",o),t.removeListener("close",o)}return t.on("data",n),t.once("end",i),t.once("error",e),t.once("error",o),t.once("close",o),t}r.array=e,r.buffer=function(r,n){return e(r,function(e,r){e||!r?n(e):n(null,t.concat(r))}),r}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:20}],97:[function(t,e,r){(function(r){(function(){"use strict";var n=t("util"),i=t("stream");e.exports.createReadStream=function(t,e){return new o(t,e)};var o=function(t,e){t instanceof r||"string"==typeof t?(e=e||{},i.Readable.call(this,{highWaterMark:e.highWaterMark,encoding:e.encoding})):i.Readable.call(this,{objectMode:!0}),this._object=t};n.inherits(o,i.Readable),o.prototype._read=function(){this.push(this._object),this._object=null}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:20,stream:94,util:102}],98:[function(t,e,r){(function(e,n){(function(){var i=t("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},u=0;function f(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new f(o.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new f(o.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},f.prototype.unref=f.prototype.ref=function(){},f.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},r.setImmediate="function"==typeof e?e:function(t){var e=u++,n=!(arguments.length<2)&&a.call(arguments,1);return s[e]=!0,i(function(){s[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))}),e},r.clearImmediate="function"==typeof n?n:function(t){delete s[t]}}).call(this)}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":78,timers:98}],99:[function(t,e,r){(function(t){(function(){function r(e){try{if(!t.localStorage)return!1}catch(t){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],100:[function(t,e,r){arguments[4][10][0].apply(r,arguments)},{dup:10}],101:[function(t,e,r){arguments[4][11][0].apply(r,arguments)},{dup:11}],102:[function(t,e,r){(function(e,n){(function(){var i=/%[sdj%]/g;r.format=function(t){if(!b(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(s(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(t).replace(i,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}}),u=n[r];r<o;u=n[++r])g(u)||!m(u)?a+=" "+u:a+=" "+s(u);return a},r.deprecate=function(t,i){if(v(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),o=!0}return t.apply(this,arguments)}};var o,a={};function s(t,e){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,t,n.depth)}function u(t,e){var r=s.styles[e];return r?"["+s.colors[r][0]+"m"+t+"["+s.colors[r][1]+"m":t}function f(t,e){return t}function l(t,e,n){if(t.customInspect&&e&&x(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return b(i)||(i=l(t,i,n)),i}var o=function(t,e){if(v(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(y(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,e);if(o)return o;var a=Object.keys(e),s=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),E(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(e);if(0===a.length){if(x(e)){var u=e.name?": "+e.name:"";return t.stylize("[Function"+u+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(_(e))return t.stylize(Date.prototype.toString.call(e),"date");if(E(e))return c(e)}var f,m="",k=!1,I=["{","}"];(p(e)&&(k=!0,I=["[","]"]),x(e))&&(m=" [Function"+(e.name?": "+e.name:"")+"]");return w(e)&&(m=" "+RegExp.prototype.toString.call(e)),_(e)&&(m=" "+Date.prototype.toUTCString.call(e)),E(e)&&(m=" "+c(e)),0!==a.length||k&&0!=e.length?n<0?w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),f=k?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a<s;++a)T(e,String(a))?o.push(h(t,e,r,n,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(t,e,r,n,i,!0))}),o}(t,e,n,s,a):a.map(function(r){return h(t,e,n,s,r,k)}),t.seen.pop(),function(t,e,r){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(f,m,I)):I[0]+m+I[1]}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),T(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=g(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return"number"==typeof t}function b(t){return"string"==typeof t}function v(t){return void 0===t}function w(t){return m(t)&&"[object RegExp]"===k(t)}function m(t){return"object"==typeof t&&null!==t}function _(t){return m(t)&&"[object Date]"===k(t)}function E(t){return m(t)&&("[object Error]"===k(t)||t instanceof Error)}function x(t){return"function"==typeof t}function k(t){return Object.prototype.toString.call(t)}function I(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(v(o)&&(o=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!a[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var n=e.pid;a[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else a[t]=function(){};return a[t]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=y,r.isString=b,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=v,r.isRegExp=w,r.isObject=m,r.isDate=_,r.isError=E,r.isFunction=x,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t("./support/isBuffer");var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){var t,e;console.log("%s - %s",(t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":"),[t.getDate(),S[t.getMonth()],e].join(" ")),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!m(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":101,_process:78,inherits:100}],103:[function(t,e,r){(function(){var t,r,n,i,o,a,s=[].slice,u={}.hasOwnProperty;t=function(){var t,e,r,n,o,a;if(a=arguments[0],o=2<=arguments.length?s.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(t=0,r=o.length;t<r;t++)if(null!=(n=o[t]))for(e in n)u.call(n,e)&&(a[e]=n[e]);return a},i=function(t){return!!t&&"[object Function]"===Object.prototype.toString.call(t)},o=function(t){var e;return!!t&&("function"==(e=typeof t)||"object"===e)},r=function(t){return i(Array.isArray)?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)},n=function(t){var e;if(r(t))return!t.length;for(e in t)if(u.call(t,e))return!1;return!0},a=function(t){var e,r;return o(t)&&(r=Object.getPrototypeOf(t))&&(e=r.constructor)&&"function"==typeof e&&e instanceof e&&Function.prototype.toString.call(e)===Function.prototype.toString.call(Object)},e.exports.assign=t,e.exports.isFunction=i,e.exports.isObject=o,e.exports.isArray=r,e.exports.isEmpty=n,e.exports.isPlainObject=a}).call(this)},{}],104:[function(t,e,r){(function(){e.exports=function(){function t(t,e,r){if(this.options=t.options,this.stringify=t.stringify,null==e)throw new Error("Missing attribute name of element "+t.name);if(null==r)throw new Error("Missing attribute value for attribute "+e+" of element "+t.name);this.name=this.stringify.attName(e),this.value=this.stringify.attValue(r)}return t.prototype.clone=function(){return Object.create(this)},t.prototype.toString=function(t){return this.options.writer.set(t).attribute(this)},t}()}).call(this)},{}],105:[function(t,e,r){(function(){var r,n={}.hasOwnProperty;r=t("./XMLNode"),e.exports=function(t){function e(t,r){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(r)}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,r),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(t){return this.options.writer.set(t).cdata(this)},e}()}).call(this)},{"./XMLNode":116}],106:[function(t,e,r){(function(){var r,n={}.hasOwnProperty;r=t("./XMLNode"),e.exports=function(t){function e(t,r){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing comment text");this.text=this.stringify.comment(r)}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,r),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(t){return this.options.writer.set(t).comment(this)},e}()}).call(this)},{"./XMLNode":116}],107:[function(t,e,r){(function(){var r,n={}.hasOwnProperty;r=t("./XMLNode"),e.exports=function(t){function e(t,r,n,i,o,a){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing DTD element name");if(null==n)throw new Error("Missing DTD attribute name");if(!i)throw new Error("Missing DTD attribute type");if(!o)throw new Error("Missing DTD attribute default");if(0!==o.indexOf("#")&&(o="#"+o),!o.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(a&&!o.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(r),this.attributeName=this.stringify.attName(n),this.attributeType=this.stringify.dtdAttType(i),this.defaultValue=this.stringify.dtdAttDefault(a),this.defaultValueType=o}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,r),e.prototype.toString=function(t){return this.options.writer.set(t).dtdAttList(this)},e}()}).call(this)},{"./XMLNode":116}],108:[function(t,e,r){(function(){var r,n={}.hasOwnProperty;r=t("./XMLNode"),e.exports=function(t){function e(t,r,n){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing DTD element name");n||(n="(#PCDATA)"),Array.isArray(n)&&(n="("+n.join(",")+")"),this.name=this.stringify.eleName(r),this.value=this.stringify.dtdElementValue(n)}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,r),e.prototype.toString=function(t){return this.options.writer.set(t).dtdElement(this)},e}()}).call(this)},{"./XMLNode":116}],109:[function(t,e,r){(function(){var r,n,i={}.hasOwnProperty;n=t("./Utility").isObject,r=t("./XMLNode"),e.exports=function(t){function e(t,r,i,o){if(e.__super__.constructor.call(this,t),null==i)throw new Error("Missing entity name");if(null==o)throw new Error("Missing entity value");if(this.pe=!!r,this.name=this.stringify.eleName(i),n(o)){if(!o.pubID&&!o.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(o.pubID&&!o.sysID)throw new Error("System identifier is required for a public external entity");if(null!=o.pubID&&(this.pubID=this.stringify.dtdPubID(o.pubID)),null!=o.sysID&&(this.sysID=this.stringify.dtdSysID(o.sysID)),null!=o.nData&&(this.nData=this.stringify.dtdNData(o.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(o)}return function(t,e){for(var r in e)i.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,r),e.prototype.toString=function(t){return this.options.writer.set(t).dtdEntity(this)},e}()}).call(this)},{"./Utility":103,"./XMLNode":116}],110:[function(t,e,r){(function(){var r,n={}.hasOwnProperty;r=t("./XMLNode"),e.exports=function(t){function e(t,r,n){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing notation name");if(!n.pubID&&!n.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(r),null!=n.pubID&&(this.pubID=this.stringify.dtdPubID(n.pubID)),null!=n.sysID&&(this.sysID=this.stringify.dtdSysID(n.sysID))}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,r),e.prototype.toString=function(t){return this.options.writer.set(t).dtdNotation(this)},e}()}).call(this)},{"./XMLNode":116}],111:[function(t,e,r){(function(){var r,n,i={}.hasOwnProperty;n=t("./Utility").isObject,r=t("./XMLNode"),e.exports=function(t){function e(t,r,i,o){var a;e.__super__.constructor.call(this,t),n(r)&&(r=(a=r).version,i=a.encoding,o=a.standalone),r||(r="1.0"),this.version=this.stringify.xmlVersion(r),null!=i&&(this.encoding=this.stringify.xmlEncoding(i)),null!=o&&(this.standalone=this.stringify.xmlStandalone(o))}return function(t,e){for(var r in e)i.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,r),e.prototype.toString=function(t){return this.options.writer.set(t).declaration(this)},e}()}).call(this)},{"./Utility":103,"./XMLNode":116}],112:[function(t,e,r){(function(){var r,n,i,o,a,s,u={}.hasOwnProperty;s=t("./Utility").isObject,a=t("./XMLNode"),r=t("./XMLDTDAttList"),i=t("./XMLDTDEntity"),n=t("./XMLDTDElement"),o=t("./XMLDTDNotation"),e.exports=function(t){function e(t,r,n){var i,o;e.__super__.constructor.call(this,t),this.documentObject=t,s(r)&&(r=(i=r).pubID,n=i.sysID),null==n&&(n=(o=[r,n])[0],r=o[1]),null!=r&&(this.pubID=this.stringify.dtdPubID(r)),null!=n&&(this.sysID=this.stringify.dtdSysID(n))}return function(t,e){for(var r in e)u.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,a),e.prototype.element=function(t,e){var r;return r=new n(this,t,e),this.children.push(r),this},e.prototype.attList=function(t,e,n,i,o){var a;return a=new r(this,t,e,n,i,o),this.children.push(a),this},e.prototype.entity=function(t,e){var r;return r=new i(this,!1,t,e),this.children.push(r),this},e.prototype.pEntity=function(t,e){var r;return r=new i(this,!0,t,e),this.children.push(r),this},e.prototype.notation=function(t,e){var r;return r=new o(this,t,e),this.children.push(r),this},e.prototype.toString=function(t){return this.options.writer.set(t).docType(this)},e.prototype.ele=function(t,e){return this.element(t,e)},e.prototype.att=function(t,e,r,n,i){return this.attList(t,e,r,n,i)},e.prototype.ent=function(t,e){return this.entity(t,e)},e.prototype.pent=function(t,e){return this.pEntity(t,e)},e.prototype.not=function(t,e){return this.notation(t,e)},e.prototype.up=function(){return this.root()||this.documentObject},e}()}).call(this)},{"./Utility":103,"./XMLDTDAttList":107,"./XMLDTDElement":108,"./XMLDTDEntity":109,"./XMLDTDNotation":110,"./XMLNode":116}],113:[function(t,e,r){(function(){var r,n,i,o,a={}.hasOwnProperty;o=t("./Utility").isPlainObject,r=t("./XMLNode"),i=t("./XMLStringifier"),n=t("./XMLStringWriter"),e.exports=function(t){function e(t){e.__super__.constructor.call(this,null),t||(t={}),t.writer||(t.writer=new n),this.options=t,this.stringify=new i(t),this.isDocument=!0}return function(t,e){for(var r in e)a.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,r),e.prototype.end=function(t){var e;return t?o(t)&&(e=t,t=this.options.writer.set(e)):t=this.options.writer,t.document(this)},e.prototype.toString=function(t){return this.options.writer.set(t).document(this)},e}()}).call(this)},{"./Utility":103,"./XMLNode":116,"./XMLStringWriter":120,"./XMLStringifier":121}],114:[function(t,e,r){(function(){var r,n,i,o,a,s,u,f,l,c,h,p,d,g,y,b,v,w,m,_={}.hasOwnProperty;m=t("./Utility"),v=m.isObject,b=m.isFunction,w=m.isPlainObject,c=t("./XMLElement"),n=t("./XMLCData"),i=t("./XMLComment"),p=t("./XMLRaw"),y=t("./XMLText"),h=t("./XMLProcessingInstruction"),f=t("./XMLDeclaration"),l=t("./XMLDocType"),o=t("./XMLDTDAttList"),s=t("./XMLDTDEntity"),a=t("./XMLDTDElement"),u=t("./XMLDTDNotation"),r=t("./XMLAttribute"),g=t("./XMLStringifier"),d=t("./XMLStringWriter"),e.exports=function(){function t(t,e,r){var n;t||(t={}),t.writer?w(t.writer)&&(n=t.writer,t.writer=new d(n)):t.writer=new d(t),this.options=t,this.writer=t.writer,this.stringify=new g(t),this.onDataCallback=e||function(){},this.onEndCallback=r||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return t.prototype.node=function(t,e,r){var n;if(null==t)throw new Error("Missing node name");if(this.root&&-1===this.currentLevel)throw new Error("Document can only have one root node");return this.openCurrent(),t=t.valueOf(),null==e&&(e={}),e=e.valueOf(),v(e)||(r=(n=[e,r])[0],e=n[1]),this.currentNode=new c(this,t,e),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=r&&this.text(r),this},t.prototype.element=function(t,e,r){return this.currentNode&&this.currentNode instanceof l?this.dtdElement.apply(this,arguments):this.node(t,e,r)},t.prototype.attribute=function(t,e){var n,i;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(null!=t&&(t=t.valueOf()),v(t))for(n in t)_.call(t,n)&&(i=t[n],this.attribute(n,i));else b(e)&&(e=e.apply()),this.options.skipNullAttributes&&null==e||(this.currentNode.attributes[t]=new r(this,t,e));return this},t.prototype.text=function(t){var e;return this.openCurrent(),e=new y(this,t),this.onData(this.writer.text(e,this.currentLevel+1)),this},t.prototype.cdata=function(t){var e;return this.openCurrent(),e=new n(this,t),this.onData(this.writer.cdata(e,this.currentLevel+1)),this},t.prototype.comment=function(t){var e;return this.openCurrent(),e=new i(this,t),this.onData(this.writer.comment(e,this.currentLevel+1)),this},t.prototype.raw=function(t){var e;return this.openCurrent(),e=new p(this,t),this.onData(this.writer.raw(e,this.currentLevel+1)),this},t.prototype.instruction=function(t,e){var r,n,i,o,a;if(this.openCurrent(),null!=t&&(t=t.valueOf()),null!=e&&(e=e.valueOf()),Array.isArray(t))for(r=0,o=t.length;r<o;r++)n=t[r],this.instruction(n);else if(v(t))for(n in t)_.call(t,n)&&(i=t[n],this.instruction(n,i));else b(e)&&(e=e.apply()),a=new h(this,t,e),this.onData(this.writer.processingInstruction(a,this.currentLevel+1));return this},t.prototype.declaration=function(t,e,r){var n;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return n=new f(this,t,e,r),this.onData(this.writer.declaration(n,this.currentLevel+1)),this},t.prototype.doctype=function(t,e,r){if(this.openCurrent(),null==t)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new l(this,e,r),this.currentNode.rootNodeName=t,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},t.prototype.dtdElement=function(t,e){var r;return this.openCurrent(),r=new a(this,t,e),this.onData(this.writer.dtdElement(r,this.currentLevel+1)),this},t.prototype.attList=function(t,e,r,n,i){var a;return this.openCurrent(),a=new o(this,t,e,r,n,i),this.onData(this.writer.dtdAttList(a,this.currentLevel+1)),this},t.prototype.entity=function(t,e){var r;return this.openCurrent(),r=new s(this,!1,t,e),this.onData(this.writer.dtdEntity(r,this.currentLevel+1)),this},t.prototype.pEntity=function(t,e){var r;return this.openCurrent(),r=new s(this,!0,t,e),this.onData(this.writer.dtdEntity(r,this.currentLevel+1)),this},t.prototype.notation=function(t,e){var r;return this.openCurrent(),r=new u(this,t,e),this.onData(this.writer.dtdNotation(r,this.currentLevel+1)),this},t.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},t.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},t.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},t.prototype.openNode=function(t){if(!t.isOpen)return!this.root&&0===this.currentLevel&&t instanceof c&&(this.root=t),this.onData(this.writer.openNode(t,this.currentLevel)),t.isOpen=!0},t.prototype.closeNode=function(t){if(!t.isClosed)return this.onData(this.writer.closeNode(t,this.currentLevel)),t.isClosed=!0},t.prototype.onData=function(t){return this.documentStarted=!0,this.onDataCallback(t)},t.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},t.prototype.ele=function(){return this.element.apply(this,arguments)},t.prototype.nod=function(t,e,r){return this.node(t,e,r)},t.prototype.txt=function(t){return this.text(t)},t.prototype.dat=function(t){return this.cdata(t)},t.prototype.com=function(t){return this.comment(t)},t.prototype.ins=function(t,e){return this.instruction(t,e)},t.prototype.dec=function(t,e,r){return this.declaration(t,e,r)},t.prototype.dtd=function(t,e,r){return this.doctype(t,e,r)},t.prototype.e=function(t,e,r){return this.element(t,e,r)},t.prototype.n=function(t,e,r){return this.node(t,e,r)},t.prototype.t=function(t){return this.text(t)},t.prototype.d=function(t){return this.cdata(t)},t.prototype.c=function(t){return this.comment(t)},t.prototype.r=function(t){return this.raw(t)},t.prototype.i=function(t,e){return this.instruction(t,e)},t.prototype.att=function(){return this.currentNode&&this.currentNode instanceof l?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},t.prototype.a=function(){return this.currentNode&&this.currentNode instanceof l?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},t.prototype.ent=function(t,e){return this.entity(t,e)},t.prototype.pent=function(t,e){return this.pEntity(t,e)},t.prototype.not=function(t,e){return this.notation(t,e)},t}()}).call(this)},{"./Utility":103,"./XMLAttribute":104,"./XMLCData":105,"./XMLComment":106,"./XMLDTDAttList":107,"./XMLDTDElement":108,"./XMLDTDEntity":109,"./XMLDTDNotation":110,"./XMLDeclaration":111,"./XMLDocType":112,"./XMLElement":115,"./XMLProcessingInstruction":117,"./XMLRaw":118,"./XMLStringWriter":120,"./XMLStringifier":121,"./XMLText":122}],115:[function(t,e,r){(function(){var r,n,i,o,a,s={}.hasOwnProperty;a=t("./Utility"),o=a.isObject,i=a.isFunction,n=t("./XMLNode"),r=t("./XMLAttribute"),e.exports=function(t){function e(t,r,n){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing element name");this.name=this.stringify.eleName(r),this.attributes={},null!=n&&this.attribute(n),t.isDocument&&(this.isRoot=!0,this.documentObject=t,t.rootObject=this)}return function(t,e){for(var r in e)s.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,n),e.prototype.clone=function(){var t,e,r,n;for(e in(r=Object.create(this)).isRoot&&(r.documentObject=null),r.attributes={},n=this.attributes)s.call(n,e)&&(t=n[e],r.attributes[e]=t.clone());return r.children=[],this.children.forEach(function(t){var e;return(e=t.clone()).parent=r,r.children.push(e)}),r},e.prototype.attribute=function(t,e){var n,a;if(null!=t&&(t=t.valueOf()),o(t))for(n in t)s.call(t,n)&&(a=t[n],this.attribute(n,a));else i(e)&&(e=e.apply()),this.options.skipNullAttributes&&null==e||(this.attributes[t]=new r(this,t,e));return this},e.prototype.removeAttribute=function(t){var e,r,n;if(null==t)throw new Error("Missing attribute name");if(t=t.valueOf(),Array.isArray(t))for(r=0,n=t.length;r<n;r++)e=t[r],delete this.attributes[e];else delete this.attributes[t];return this},e.prototype.toString=function(t){return this.options.writer.set(t).element(this)},e.prototype.att=function(t,e){return this.attribute(t,e)},e.prototype.a=function(t,e){return this.attribute(t,e)},e}()}).call(this)},{"./Utility":103,"./XMLAttribute":104,"./XMLNode":116}],116:[function(t,e,r){(function(){var r,n,i,o,a,s,u,f,l,c,h,p,d={}.hasOwnProperty;p=t("./Utility"),h=p.isObject,c=p.isFunction,l=p.isEmpty,a=null,r=null,n=null,i=null,o=null,u=null,f=null,s=null,e.exports=function(){function e(e){this.parent=e,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],a||(a=t("./XMLElement"),r=t("./XMLCData"),n=t("./XMLComment"),i=t("./XMLDeclaration"),o=t("./XMLDocType"),u=t("./XMLRaw"),f=t("./XMLText"),s=t("./XMLProcessingInstruction"))}return e.prototype.element=function(t,e,r){var n,i,o,a,s,u,f,p,g,y;if(u=null,null==e&&(e={}),e=e.valueOf(),h(e)||(r=(g=[e,r])[0],e=g[1]),null!=t&&(t=t.valueOf()),Array.isArray(t))for(o=0,f=t.length;o<f;o++)i=t[o],u=this.element(i);else if(c(t))u=this.element(t.apply());else if(h(t)){for(s in t)if(d.call(t,s))if(y=t[s],c(y)&&(y=y.apply()),h(y)&&l(y)&&(y=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===s.indexOf(this.stringify.convertAttKey))u=this.attribute(s.substr(this.stringify.convertAttKey.length),y);else if(!this.options.separateArrayItems&&Array.isArray(y))for(a=0,p=y.length;a<p;a++)i=y[a],(n={})[s]=i,u=this.element(n);else h(y)?(u=this.element(s)).element(y):u=this.element(s,y)}else u=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===t.indexOf(this.stringify.convertTextKey)?this.text(r):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===t.indexOf(this.stringify.convertCDataKey)?this.cdata(r):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===t.indexOf(this.stringify.convertCommentKey)?this.comment(r):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===t.indexOf(this.stringify.convertRawKey)?this.raw(r):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===t.indexOf(this.stringify.convertPIKey)?this.instruction(t.substr(this.stringify.convertPIKey.length),r):this.node(t,e,r);if(null==u)throw new Error("Could not create any elements with: "+t);return u},e.prototype.insertBefore=function(t,e,r){var n,i,o;if(this.isRoot)throw new Error("Cannot insert elements at root level");return i=this.parent.children.indexOf(this),o=this.parent.children.splice(i),n=this.parent.element(t,e,r),Array.prototype.push.apply(this.parent.children,o),n},e.prototype.insertAfter=function(t,e,r){var n,i,o;if(this.isRoot)throw new Error("Cannot insert elements at root level");return i=this.parent.children.indexOf(this),o=this.parent.children.splice(i+1),n=this.parent.element(t,e,r),Array.prototype.push.apply(this.parent.children,o),n},e.prototype.remove=function(){var t;if(this.isRoot)throw new Error("Cannot remove the root element");return t=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[t,t-t+1].concat([])),this.parent},e.prototype.node=function(t,e,r){var n,i;return null!=t&&(t=t.valueOf()),e||(e={}),e=e.valueOf(),h(e)||(r=(i=[e,r])[0],e=i[1]),n=new a(this,t,e),null!=r&&n.text(r),this.children.push(n),n},e.prototype.text=function(t){var e;return e=new f(this,t),this.children.push(e),this},e.prototype.cdata=function(t){var e;return e=new r(this,t),this.children.push(e),this},e.prototype.comment=function(t){var e;return e=new n(this,t),this.children.push(e),this},e.prototype.commentBefore=function(t){var e,r;return e=this.parent.children.indexOf(this),r=this.parent.children.splice(e),this.parent.comment(t),Array.prototype.push.apply(this.parent.children,r),this},e.prototype.commentAfter=function(t){var e,r;return e=this.parent.children.indexOf(this),r=this.parent.children.splice(e+1),this.parent.comment(t),Array.prototype.push.apply(this.parent.children,r),this},e.prototype.raw=function(t){var e;return e=new u(this,t),this.children.push(e),this},e.prototype.instruction=function(t,e){var r,n,i,o,a;if(null!=t&&(t=t.valueOf()),null!=e&&(e=e.valueOf()),Array.isArray(t))for(o=0,a=t.length;o<a;o++)r=t[o],this.instruction(r);else if(h(t))for(r in t)d.call(t,r)&&(n=t[r],this.instruction(r,n));else c(e)&&(e=e.apply()),i=new s(this,t,e),this.children.push(i);return this},e.prototype.instructionBefore=function(t,e){var r,n;return r=this.parent.children.indexOf(this),n=this.parent.children.splice(r),this.parent.instruction(t,e),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.instructionAfter=function(t,e){var r,n;return r=this.parent.children.indexOf(this),n=this.parent.children.splice(r+1),this.parent.instruction(t,e),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.declaration=function(t,e,r){var n,o;return n=this.document(),o=new i(n,t,e,r),n.children[0]instanceof i?n.children[0]=o:n.children.unshift(o),n.root()||n},e.prototype.doctype=function(t,e){var r,n,i,a,s,u,f,l,c;for(r=this.document(),n=new o(r,t,e),i=a=0,u=(l=r.children).length;a<u;i=++a)if(l[i]instanceof o)return r.children[i]=n,n;for(i=s=0,f=(c=r.children).length;s<f;i=++s)if(c[i].isRoot)return r.children.splice(i,0,n),n;return r.children.push(n),n},e.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},e.prototype.root=function(){var t;for(t=this;t;){if(t.isDocument)return t.rootObject;if(t.isRoot)return t;t=t.parent}},e.prototype.document=function(){var t;for(t=this;t;){if(t.isDocument)return t;t=t.parent}},e.prototype.end=function(t){return this.document().end(t)},e.prototype.prev=function(){var t;if((t=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[t-1]},e.prototype.next=function(){var t;if(-1===(t=this.parent.children.indexOf(this))||t===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[t+1]},e.prototype.importDocument=function(t){var e;return(e=t.root().clone()).parent=this,e.isRoot=!1,this.children.push(e),this},e.prototype.ele=function(t,e,r){return this.element(t,e,r)},e.prototype.nod=function(t,e,r){return this.node(t,e,r)},e.prototype.txt=function(t){return this.text(t)},e.prototype.dat=function(t){return this.cdata(t)},e.prototype.com=function(t){return this.comment(t)},e.prototype.ins=function(t,e){return this.instruction(t,e)},e.prototype.doc=function(){return this.document()},e.prototype.dec=function(t,e,r){return this.declaration(t,e,r)},e.prototype.dtd=function(t,e){return this.doctype(t,e)},e.prototype.e=function(t,e,r){return this.element(t,e,r)},e.prototype.n=function(t,e,r){return this.node(t,e,r)},e.prototype.t=function(t){return this.text(t)},e.prototype.d=function(t){return this.cdata(t)},e.prototype.c=function(t){return this.comment(t)},e.prototype.r=function(t){return this.raw(t)},e.prototype.i=function(t,e){return this.instruction(t,e)},e.prototype.u=function(){return this.up()},e.prototype.importXMLBuilder=function(t){return this.importDocument(t)},e}()}).call(this)},{"./Utility":103,"./XMLCData":105,"./XMLComment":106,"./XMLDeclaration":111,"./XMLDocType":112,"./XMLElement":115,"./XMLProcessingInstruction":117,"./XMLRaw":118,"./XMLText":122}],117:[function(t,e,r){(function(){var r,n={}.hasOwnProperty;r=t("./XMLNode"),e.exports=function(t){function e(t,r,n){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(r),n&&(this.value=this.stringify.insValue(n))}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,r),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(t){return this.options.writer.set(t).processingInstruction(this)},e}()}).call(this)},{"./XMLNode":116}],118:[function(t,e,r){(function(){var r,n={}.hasOwnProperty;r=t("./XMLNode"),e.exports=function(t){function e(t,r){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing raw text");this.value=this.stringify.raw(r)}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,r),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(t){return this.options.writer.set(t).raw(this)},e}()}).call(this)},{"./XMLNode":116}],119:[function(t,e,r){(function(){var r,n,i,o,a,s,u,f,l,c,h,p,d,g={}.hasOwnProperty;u=t("./XMLDeclaration"),f=t("./XMLDocType"),r=t("./XMLCData"),n=t("./XMLComment"),l=t("./XMLElement"),h=t("./XMLRaw"),p=t("./XMLText"),c=t("./XMLProcessingInstruction"),i=t("./XMLDTDAttList"),o=t("./XMLDTDElement"),a=t("./XMLDTDEntity"),s=t("./XMLDTDNotation"),d=t("./XMLWriterBase"),e.exports=function(t){function e(t,r){e.__super__.constructor.call(this,r),this.stream=t}return function(t,e){for(var r in e)g.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,d),e.prototype.document=function(t){var e,r,i,o,a,s,l,h;for(r=0,o=(s=t.children).length;r<o;r++)(e=s[r]).isLastRootNode=!1;for(t.children[t.children.length-1].isLastRootNode=!0,h=[],i=0,a=(l=t.children).length;i<a;i++)switch(e=l[i],!1){case!(e instanceof u):h.push(this.declaration(e));break;case!(e instanceof f):h.push(this.docType(e));break;case!(e instanceof n):h.push(this.comment(e));break;case!(e instanceof c):h.push(this.processingInstruction(e));break;default:h.push(this.element(e))}return h},e.prototype.attribute=function(t){return this.stream.write(" "+t.name+'="'+t.value+'"')},e.prototype.cdata=function(t,e){return this.stream.write(this.space(e)+"<![CDATA["+t.text+"]]>"+this.endline(t))},e.prototype.comment=function(t,e){return this.stream.write(this.space(e)+"\x3c!-- "+t.text+" --\x3e"+this.endline(t))},e.prototype.declaration=function(t,e){return this.stream.write(this.space(e)),this.stream.write('<?xml version="'+t.version+'"'),null!=t.encoding&&this.stream.write(' encoding="'+t.encoding+'"'),null!=t.standalone&&this.stream.write(' standalone="'+t.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(t))},e.prototype.docType=function(t,e){var u,f,l,h;if(e||(e=0),this.stream.write(this.space(e)),this.stream.write("<!DOCTYPE "+t.root().name),t.pubID&&t.sysID?this.stream.write(' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'):t.sysID&&this.stream.write(' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(t)),f=0,l=(h=t.children).length;f<l;f++)switch(u=h[f],!1){case!(u instanceof i):this.dtdAttList(u,e+1);break;case!(u instanceof o):this.dtdElement(u,e+1);break;case!(u instanceof a):this.dtdEntity(u,e+1);break;case!(u instanceof s):this.dtdNotation(u,e+1);break;case!(u instanceof r):this.cdata(u,e+1);break;case!(u instanceof n):this.comment(u,e+1);break;case!(u instanceof c):this.processingInstruction(u,e+1);break;default:throw new Error("Unknown DTD node type: "+u.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(t))},e.prototype.element=function(t,e){var i,o,a,s,u,f,d,y;for(u in e||(e=0),y=this.space(e),this.stream.write(y+"<"+t.name),f=t.attributes)g.call(f,u)&&(i=f[u],this.attribute(i));if(0===t.children.length||t.children.every(function(t){return""===t.value}))this.allowEmpty?this.stream.write("></"+t.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&1===t.children.length&&null!=t.children[0].value)this.stream.write(">"),this.stream.write(t.children[0].value),this.stream.write("</"+t.name+">");else{for(this.stream.write(">"+this.newline),a=0,s=(d=t.children).length;a<s;a++)switch(o=d[a],!1){case!(o instanceof r):this.cdata(o,e+1);break;case!(o instanceof n):this.comment(o,e+1);break;case!(o instanceof l):this.element(o,e+1);break;case!(o instanceof h):this.raw(o,e+1);break;case!(o instanceof p):this.text(o,e+1);break;case!(o instanceof c):this.processingInstruction(o,e+1);break;default:throw new Error("Unknown XML node type: "+o.constructor.name)}this.stream.write(y+"</"+t.name+">")}return this.stream.write(this.endline(t))},e.prototype.processingInstruction=function(t,e){return this.stream.write(this.space(e)+"<?"+t.target),t.value&&this.stream.write(" "+t.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(t))},e.prototype.raw=function(t,e){return this.stream.write(this.space(e)+t.value+this.endline(t))},e.prototype.text=function(t,e){return this.stream.write(this.space(e)+t.value+this.endline(t))},e.prototype.dtdAttList=function(t,e){return this.stream.write(this.space(e)+"<!ATTLIST "+t.elementName+" "+t.attributeName+" "+t.attributeType),"#DEFAULT"!==t.defaultValueType&&this.stream.write(" "+t.defaultValueType),t.defaultValue&&this.stream.write(' "'+t.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(t))},e.prototype.dtdElement=function(t,e){return this.stream.write(this.space(e)+"<!ELEMENT "+t.name+" "+t.value),this.stream.write(this.spacebeforeslash+">"+this.endline(t))},e.prototype.dtdEntity=function(t,e){return this.stream.write(this.space(e)+"<!ENTITY"),t.pe&&this.stream.write(" %"),this.stream.write(" "+t.name),t.value?this.stream.write(' "'+t.value+'"'):(t.pubID&&t.sysID?this.stream.write(' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'):t.sysID&&this.stream.write(' SYSTEM "'+t.sysID+'"'),t.nData&&this.stream.write(" NDATA "+t.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(t))},e.prototype.dtdNotation=function(t,e){return this.stream.write(this.space(e)+"<!NOTATION "+t.name),t.pubID&&t.sysID?this.stream.write(' PUBLIC "'+t.pubID+'" "'+t.sysID+'"'):t.pubID?this.stream.write(' PUBLIC "'+t.pubID+'"'):t.sysID&&this.stream.write(' SYSTEM "'+t.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(t))},e.prototype.endline=function(t){return t.isLastRootNode?"":this.newline},e}()}).call(this)},{"./XMLCData":105,"./XMLComment":106,"./XMLDTDAttList":107,"./XMLDTDElement":108,"./XMLDTDEntity":109,"./XMLDTDNotation":110,"./XMLDeclaration":111,"./XMLDocType":112,"./XMLElement":115,"./XMLProcessingInstruction":117,"./XMLRaw":118,"./XMLText":122,"./XMLWriterBase":123}],120:[function(t,e,r){(function(){var r,n,i,o,a,s,u,f,l,c,h,p,d,g={}.hasOwnProperty;u=t("./XMLDeclaration"),f=t("./XMLDocType"),r=t("./XMLCData"),n=t("./XMLComment"),l=t("./XMLElement"),h=t("./XMLRaw"),p=t("./XMLText"),c=t("./XMLProcessingInstruction"),i=t("./XMLDTDAttList"),o=t("./XMLDTDElement"),a=t("./XMLDTDEntity"),s=t("./XMLDTDNotation"),d=t("./XMLWriterBase"),e.exports=function(t){function e(t){e.__super__.constructor.call(this,t)}return function(t,e){for(var r in e)g.call(e,r)&&(t[r]=e[r]);function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype}(e,d),e.prototype.document=function(t){var e,r,i,o,a;for(this.textispresent=!1,o="",r=0,i=(a=t.children).length;r<i;r++)e=a[r],o+=function(){switch(!1){case!(e instanceof u):return this.declaration(e);case!(e instanceof f):return this.docType(e);case!(e instanceof n):return this.comment(e);case!(e instanceof c):return this.processingInstruction(e);default:return this.element(e,0)}}.call(this);return this.pretty&&o.slice(-this.newline.length)===this.newline&&(o=o.slice(0,-this.newline.length)),o},e.prototype.attribute=function(t){return" "+t.name+'="'+t.value+'"'},e.prototype.cdata=function(t,e){return this.space(e)+"<![CDATA["+t.text+"]]>"+this.newline},e.prototype.comment=function(t,e){return this.space(e)+"\x3c!-- "+t.text+" --\x3e"+this.newline},e.prototype.declaration=function(t,e){var r;return r=this.space(e),r+='<?xml version="'+t.version+'"',null!=t.encoding&&(r+=' encoding="'+t.encoding+'"'),null!=t.standalone&&(r+=' standalone="'+t.standalone+'"'),r+=this.spacebeforeslash+"?>",r+=this.newline},e.prototype.docType=function(t,e){var u,f,l,h,p;if(e||(e=0),h=this.space(e),h+="<!DOCTYPE "+t.root().name,t.pubID&&t.sysID?h+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(h+=' SYSTEM "'+t.sysID+'"'),t.children.length>0){for(h+=" [",h+=this.newline,f=0,l=(p=t.children).length;f<l;f++)u=p[f],h+=function(){switch(!1){case!(u instanceof i):return this.dtdAttList(u,e+1);case!(u instanceof o):return this.dtdElement(u,e+1);case!(u instanceof a):return this.dtdEntity(u,e+1);case!(u instanceof s):return this.dtdNotation(u,e+1);case!(u instanceof r):return this.cdata(u,e+1);case!(u instanceof n):return this.comment(u,e+1);case!(u instanceof c):return this.processingInstruction(u,e+1);default:throw new Error("Unknown DTD node type: "+u.constructor.name)}}.call(this);h+="]"}return h+=this.spacebeforeslash+">",h+=this.newline},e.prototype.element=function(t,e){var i,o,a,s,u,f,d,y,b,v,w,m,_;for(d in e||(e=0),_=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),y="",y+=(m=this.space(e))+"<"+t.name,b=t.attributes)g.call(b,d)&&(i=b[d],y+=this.attribute(i));if(0===t.children.length||t.children.every(function(t){return""===t.value}))this.allowEmpty?y+="></"+t.name+">"+this.newline:y+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&1===t.children.length&&null!=t.children[0].value)y+=">",y+=t.children[0].value,y+="</"+t.name+">"+this.newline;else{if(this.dontprettytextnodes)for(a=0,u=(v=t.children).length;a<u;a++)if(null!=(o=v[a]).value){this.textispresent++,_=!0;break}for(this.textispresent&&(this.newline="",this.pretty=!1,m=this.space(e)),y+=">"+this.newline,s=0,f=(w=t.children).length;s<f;s++)o=w[s],y+=function(){switch(!1){case!(o instanceof r):return this.cdata(o,e+1);case!(o instanceof n):return this.comment(o,e+1);case!(o instanceof l):return this.element(o,e+1);case!(o instanceof h):return this.raw(o,e+1);case!(o instanceof p):return this.text(o,e+1);case!(o instanceof c):return this.processingInstruction(o,e+1);default:throw new Error("Unknown XML node type: "+o.constructor.name)}}.call(this);_&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),y+=m+"</"+t.name+">"+this.newline}return y},e.prototype.processingInstruction=function(t,e){var r;return r=this.space(e)+"<?"+t.target,t.value&&(r+=" "+t.value),r+=this.spacebeforeslash+"?>"+this.newline},e.prototype.raw=function(t,e){return this.space(e)+t.value+this.newline},e.prototype.text=function(t,e){return this.space(e)+t.value+this.newline},e.prototype.dtdAttList=function(t,e){var r;return r=this.space(e)+"<!ATTLIST "+t.elementName+" "+t.attributeName+" "+t.attributeType,"#DEFAULT"!==t.defaultValueType&&(r+=" "+t.defaultValueType),t.defaultValue&&(r+=' "'+t.defaultValue+'"'),r+=this.spacebeforeslash+">"+this.newline},e.prototype.dtdElement=function(t,e){return this.space(e)+"<!ELEMENT "+t.name+" "+t.value+this.spacebeforeslash+">"+this.newline},e.prototype.dtdEntity=function(t,e){var r;return r=this.space(e)+"<!ENTITY",t.pe&&(r+=" %"),r+=" "+t.name,t.value?r+=' "'+t.value+'"':(t.pubID&&t.sysID?r+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(r+=' SYSTEM "'+t.sysID+'"'),t.nData&&(r+=" NDATA "+t.nData)),r+=this.spacebeforeslash+">"+this.newline},e.prototype.dtdNotation=function(t,e){var r;return r=this.space(e)+"<!NOTATION "+t.name,t.pubID&&t.sysID?r+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.pubID?r+=' PUBLIC "'+t.pubID+'"':t.sysID&&(r+=' SYSTEM "'+t.sysID+'"'),r+=this.spacebeforeslash+">"+this.newline},e.prototype.openNode=function(t,e){var r,n,i,o;if(e||(e=0),t instanceof l){for(n in i=this.space(e)+"<"+t.name,o=t.attributes)g.call(o,n)&&(r=o[n],i+=this.attribute(r));return i+=(t.children?">":"/>")+this.newline}return i=this.space(e)+"<!DOCTYPE "+t.rootNodeName,t.pubID&&t.sysID?i+=' PUBLIC "'+t.pubID+'" "'+t.sysID+'"':t.sysID&&(i+=' SYSTEM "'+t.sysID+'"'),i+=(t.children?" [":">")+this.newline},e.prototype.closeNode=function(t,e){switch(e||(e=0),!1){case!(t instanceof l):return this.space(e)+"</"+t.name+">"+this.newline;case!(t instanceof f):return this.space(e)+"]>"+this.newline}},e}()}).call(this)},{"./XMLCData":105,"./XMLComment":106,"./XMLDTDAttList":107,"./XMLDTDElement":108,"./XMLDTDEntity":109,"./XMLDTDNotation":110,"./XMLDeclaration":111,"./XMLDocType":112,"./XMLElement":115,"./XMLProcessingInstruction":117,"./XMLRaw":118,"./XMLText":122,"./XMLWriterBase":123}],121:[function(t,e,r){(function(){var t=function(t,e){return function(){return t.apply(e,arguments)}},r={}.hasOwnProperty;e.exports=function(){function e(e){var n,i,o;for(n in this.assertLegalChar=t(this.assertLegalChar,this),e||(e={}),this.noDoubleEncoding=e.noDoubleEncoding,i=e.stringify||{})r.call(i,n)&&(o=i[n],this[n]=o)}return e.prototype.eleName=function(t){return t=""+t||"",this.assertLegalChar(t)},e.prototype.eleText=function(t){return t=""+t||"",this.assertLegalChar(this.elEscape(t))},e.prototype.cdata=function(t){return t=(t=""+t||"").replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(t)},e.prototype.comment=function(t){if((t=""+t||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+t);return this.assertLegalChar(t)},e.prototype.raw=function(t){return""+t||""},e.prototype.attName=function(t){return""+t||""},e.prototype.attValue=function(t){return t=""+t||"",this.attEscape(t)},e.prototype.insTarget=function(t){return""+t||""},e.prototype.insValue=function(t){if((t=""+t||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+t);return t},e.prototype.xmlVersion=function(t){if(!(t=""+t||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+t);return t},e.prototype.xmlEncoding=function(t){if(!(t=""+t||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+t);return t},e.prototype.xmlStandalone=function(t){return t?"yes":"no"},e.prototype.dtdPubID=function(t){return""+t||""},e.prototype.dtdSysID=function(t){return""+t||""},e.prototype.dtdElementValue=function(t){return""+t||""},e.prototype.dtdAttType=function(t){return""+t||""},e.prototype.dtdAttDefault=function(t){return null!=t?""+t||"":t},e.prototype.dtdEntityValue=function(t){return""+t||""},e.prototype.dtdNData=function(t){return""+t||""},e.prototype.convertAttKey="@",e.prototype.convertPIKey="?",e.prototype.convertTextKey="#text",e.prototype.convertCDataKey="#cdata",e.prototype.convertCommentKey="#comment",e.prototype.convertRawKey="#raw",e.prototype.assertLegalChar=function(t){var e;if(e=t.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+t+" at index "+e.index);return t},e.prototype.elEscape=function(t){var e;return e=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")},e.prototype.attEscape=function(t){var e;return e=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,t.replace(e,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")},e}()}).call(this)},{}],122:[function(t,e,r){(function(){var r,n={}.hasOwnProperty;r=t("./XMLNode"),e.exports=function(t){function e(t,r){if(e.__super__.constructor.call(this,t),null==r)throw new Error("Missing element text");this.value=this.stringify.eleText(r)}return function(t,e){for(var r in e)n.call(e,r)&&(t[r]=e[r]);function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype}(e,r),e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(t){return this.options.writer.set(t).text(this)},e}()}).call(this)},{"./XMLNode":116}],123:[function(t,e,r){(function(){var t={}.hasOwnProperty;e.exports=function(){function e(e){var r,n,i,o,a,s,u,f,l;for(r in e||(e={}),this.pretty=e.pretty||!1,this.allowEmpty=null!=(n=e.allowEmpty)&&n,this.pretty?(this.indent=null!=(i=e.indent)?i:" ",this.newline=null!=(o=e.newline)?o:"\n",this.offset=null!=(a=e.offset)?a:0,this.dontprettytextnodes=null!=(s=e.dontprettytextnodes)?s:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=null!=(u=e.spacebeforeslash)?u:"",!0===this.spacebeforeslash&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,f=e.writer||{})t.call(f,r)&&(l=f[r],this[r]=l)}return e.prototype.set=function(e){var r,n,i;for(r in e||(e={}),"pretty"in e&&(this.pretty=e.pretty),"allowEmpty"in e&&(this.allowEmpty=e.allowEmpty),this.pretty?(this.indent="indent"in e?e.indent:" ",this.newline="newline"in e?e.newline:"\n",this.offset="offset"in e?e.offset:0,this.dontprettytextnodes="dontprettytextnodes"in e?e.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in e?e.spacebeforeslash:"",!0===this.spacebeforeslash&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,n=e.writer||{})t.call(n,r)&&(i=n[r],this[r]=i);return this},e.prototype.space=function(t){var e;return this.pretty&&(e=(t||0)+this.offset+1)>0?new Array(e).join(this.indent):""},e}()}).call(this)},{}],124:[function(t,e,r){(function(){var r,n,i,o,a,s,u;u=t("./Utility"),a=u.assign,s=u.isFunction,r=t("./XMLDocument"),n=t("./XMLDocumentCB"),o=t("./XMLStringWriter"),i=t("./XMLStreamWriter"),e.exports.create=function(t,e,n,i){var o,s;if(null==t)throw new Error("Root element needs a name");return i=a({},e,n,i),s=(o=new r(i)).element(t),i.headless||(o.declaration(i),null==i.pubID&&null==i.sysID||o.doctype(i)),s},e.exports.begin=function(t,e,i){var o;return s(t)&&(e=(o=[t,e])[0],i=o[1],t={}),e?new n(t,e,i):new r(t)},e.exports.stringWriter=function(t){return new o(t)},e.exports.streamWriter=function(t,e){return new i(t,e)}}).call(this)},{"./Utility":103,"./XMLDocument":113,"./XMLDocumentCB":114,"./XMLStreamWriter":119,"./XMLStringWriter":120}],125:[function(t,e,r){function n(t){this.options=t||{locator:{}}}function i(){this.cdata=!1}function o(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}function a(t){if(t)return"\n@"+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function s(t,e,r){return"string"==typeof t?t.substr(e,r):t.length>=e+r||e?new java.lang.String(t,e,r)+"":t}function u(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}n.prototype.parseFromString=function(t,e){var r=this.options,n=new c,o=r.domBuilder||new i,s=r.errorHandler,u=r.locator,l=r.xmlns||{},h=/\/x?html?$/.test(e),p=h?f.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),n.errorHandler=function(t,e,r){if(!t){if(e instanceof i)return e;t=e}var n={},o=t instanceof Function;function s(e){var i=t[e];!i&&o&&(i=2==t.length?function(r){t(e,r)}:t),n[e]=i&&function(t){i("[xmldom "+e+"]\t"+t+a(r))}||function(){}}return r=r||{},s("warning"),s("error"),s("fatalError"),n}(s,o,u),n.domBuilder=r.domBuilder||o,h&&(l[""]="http://www.w3.org/1999/xhtml"),l.xml=l.xml||"http://www.w3.org/XML/1998/namespace",t&&"string"==typeof t?n.parse(t,l,p):n.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new p).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,r,n){var i=this.doc,a=i.createElementNS(t,r||e),s=n.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var f=0;f<s;f++){t=n.getURI(f);var l=n.getValue(f),c=(r=n.getQName(f),i.createAttributeNS(t,r));this.locator&&o(n.getLocator(f),c),c.value=c.nodeValue=l,a.setAttributeNode(c)}},endElement:function(t,e,r){var n=this.currentElement;n.tagName;this.currentElement=n.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var r=this.doc.createProcessingInstruction(t,e);this.locator&&o(this.locator,r),u(this,r)},ignorableWhitespace:function(t,e,r){},characters:function(t,e,r){if(t=s.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(t);else n=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(t)&&this.doc.appendChild(n),this.locator&&o(this.locator,n)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){(this.locator=t)&&(t.lineNumber=0)},comment:function(t,e,r){t=s.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&o(this.locator,n),u(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var i=n.createDocumentType(t,e,r);this.locator&&o(this.locator,i),u(this,i)}},warning:function(t){console.warn("[xmldom warning]\t"+t,a(this.locator))},error:function(t){console.error("[xmldom error]\t"+t,a(this.locator))},fatalError:function(t){throw new h(t,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){i.prototype[t]=function(){return null}});var f=t("./entities"),l=t("./sax"),c=l.XMLReader,h=l.ParseError,p=r.DOMImplementation=t("./dom").DOMImplementation;r.XMLSerializer=t("./dom").XMLSerializer,r.DOMParser=n,r.__DOMHandler=i},{"./dom":126,"./entities":127,"./sax":128}],126:[function(t,e,r){function n(t,e){for(var r in t)e[r]=t[r]}function i(t,e){var r=t.prototype;if(!(r instanceof e)){function i(){}i.prototype=e.prototype,n(r,i=new i),t.prototype=r=i}r.constructor!=t&&("function"!=typeof t&&console.error("unknow Class:"+t),r.constructor=t)}var o="http://www.w3.org/1999/xhtml",a={},s=a.ELEMENT_NODE=1,u=a.ATTRIBUTE_NODE=2,f=a.TEXT_NODE=3,l=a.CDATA_SECTION_NODE=4,c=a.ENTITY_REFERENCE_NODE=5,h=a.ENTITY_NODE=6,p=a.PROCESSING_INSTRUCTION_NODE=7,d=a.COMMENT_NODE=8,g=a.DOCUMENT_NODE=9,y=a.DOCUMENT_TYPE_NODE=10,b=a.DOCUMENT_FRAGMENT_NODE=11,v=a.NOTATION_NODE=12,w={},m={},_=(w.INDEX_SIZE_ERR=(m[1]="Index size error",1),w.DOMSTRING_SIZE_ERR=(m[2]="DOMString size error",2),w.HIERARCHY_REQUEST_ERR=(m[3]="Hierarchy request error",3)),E=(w.WRONG_DOCUMENT_ERR=(m[4]="Wrong document",4),w.INVALID_CHARACTER_ERR=(m[5]="Invalid character",5),w.NO_DATA_ALLOWED_ERR=(m[6]="No data allowed",6),w.NO_MODIFICATION_ALLOWED_ERR=(m[7]="No modification allowed",7),w.NOT_FOUND_ERR=(m[8]="Not found",8)),x=(w.NOT_SUPPORTED_ERR=(m[9]="Not supported",9),w.INUSE_ATTRIBUTE_ERR=(m[10]="Attribute in use",10));w.INVALID_STATE_ERR=(m[11]="Invalid state",11),w.SYNTAX_ERR=(m[12]="Syntax error",12),w.INVALID_MODIFICATION_ERR=(m[13]="Invalid modification",13),w.NAMESPACE_ERR=(m[14]="Invalid namespace",14),w.INVALID_ACCESS_ERR=(m[15]="Invalid access",15);function k(t,e){if(e instanceof Error)var r=e;else r=this,Error.call(this,m[t]),this.message=m[t],Error.captureStackTrace&&Error.captureStackTrace(this,k);return r.code=t,e&&(this.message=this.message+": "+e),r}function I(){}function S(t,e){this._node=t,this._refresh=e,T(this)}function T(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!=e){var r=t._refresh(t._node);nt(t,"length",r.length),n(r,t),t._inc=e}}function A(){}function N(t,e){for(var r=t.length;r--;)if(t[r]===e)return r}function L(t,e,r,n){if(n?e[N(e,n)]=r:e[e.length++]=r,t){r.ownerElement=t;var i=t.ownerDocument;i&&(n&&R(i,t,n),function(t,e,r){t&&t._inc++,"http://www.w3.org/2000/xmlns/"==r.namespaceURI&&(e._nsMap[r.prefix?r.localName:""]=r.value)}(i,t,r))}}function D(t,e,r){var n=N(e,r);if(!(n>=0))throw k(E,new Error(t.tagName+"@"+r));for(var i=e.length-1;n<i;)e[n]=e[++n];if(e.length=i,t){var o=t.ownerDocument;o&&(R(o,t,r),r.ownerElement=null)}}function M(t){if(this._features={},t)for(var e in t)this._features=t[e]}function O(){}function U(t){return("<"==t?"&lt;":">"==t&&"&gt;")||"&"==t&&"&amp;"||'"'==t&&"&quot;"||"&#"+t.charCodeAt()+";"}function B(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(B(t,e))return!0}while(t=t.nextSibling)}function C(){}function R(t,e,r,n){t&&t._inc++,"http://www.w3.org/2000/xmlns/"==r.namespaceURI&&delete e._nsMap[r.prefix?r.localName:""]}function z(t,e,r){if(t&&t._inc){t._inc++;var n=e.childNodes;if(r)n[n.length++]=r;else{for(var i=e.firstChild,o=0;i;)n[o++]=i,i=i.nextSibling;n.length=o}}}function j(t,e){var r=e.previousSibling,n=e.nextSibling;return r?r.nextSibling=n:t.firstChild=n,n?n.previousSibling=r:t.lastChild=r,z(t.ownerDocument,t),e}function F(t,e,r){var n=e.parentNode;if(n&&n.removeChild(e),e.nodeType===b){var i=e.firstChild;if(null==i)return e;var o=e.lastChild}else i=o=e;var a=r?r.previousSibling:t.lastChild;i.previousSibling=a,o.nextSibling=r,a?a.nextSibling=i:t.firstChild=i,null==r?t.lastChild=o:r.previousSibling=o;do{i.parentNode=t}while(i!==o&&(i=i.nextSibling));return z(t.ownerDocument||t,t),e.nodeType==b&&(e.firstChild=e.lastChild=null),e}function P(){this._nsMap={}}function Z(){}function X(){}function q(){}function H(){}function W(){}function V(){}function K(){}function G(){}function Y(){}function J(){}function $(){}function Q(){}function tt(t,e){var r=[],n=9==this.nodeType&&this.documentElement||this,i=n.prefix,o=n.namespaceURI;if(o&&null==i&&null==(i=n.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return rt(this,r,t,e,a),r.join("")}function et(t,e,r){var n=t.prefix||"",i=t.namespaceURI;if(!n&&!i)return!1;if("xml"===n&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=r.length;o--;){var a=r[o];if(a.prefix==n)return a.namespace!=i}return!0}function rt(t,e,r,n,i){if(n){if(!(t=n(t)))return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case s:i||(i=[]);i.length;var a=t.attributes,h=a.length,v=t.firstChild,w=t.tagName;r=o===t.namespaceURI||r,e.push("<",w);for(var m=0;m<h;m++){"xmlns"==(_=a.item(m)).prefix?i.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&i.push({prefix:"",namespace:_.value})}for(m=0;m<h;m++){var _;if(et(_=a.item(m),0,i)){var E=_.prefix||"",x=_.namespaceURI,k=E?" xmlns:"+E:" xmlns";e.push(k,'="',x,'"'),i.push({prefix:E,namespace:x})}rt(_,e,r,n,i)}if(et(t,0,i)){E=t.prefix||"",x=t.namespaceURI,k=E?" xmlns:"+E:" xmlns";e.push(k,'="',x,'"'),i.push({prefix:E,namespace:x})}if(v||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(w)){if(e.push(">"),r&&/^script$/i.test(w))for(;v;)v.data?e.push(v.data):rt(v,e,r,n,i),v=v.nextSibling;else for(;v;)rt(v,e,r,n,i),v=v.nextSibling;e.push("</",w,">")}else e.push("/>");return;case g:case b:for(v=t.firstChild;v;)rt(v,e,r,n,i),v=v.nextSibling;return;case u:return e.push(" ",t.name,'="',t.value.replace(/[&"]/g,U),'"');case f:return e.push(t.data.replace(/[<&]/g,U).replace(/]]>/g,"]]&gt;"));case l:return e.push("<![CDATA[",t.data,"]]>");case d:return e.push("\x3c!--",t.data,"--\x3e");case y:var I=t.publicId,S=t.systemId;if(e.push("<!DOCTYPE ",t.name),I)e.push(" PUBLIC ",I),S&&"."!=S&&e.push(" ",S),e.push(">");else if(S&&"."!=S)e.push(" SYSTEM ",S,">");else{var T=t.internalSubset;T&&e.push(" [",T,"]"),e.push(">")}return;case p:return e.push("<?",t.target," ",t.data,"?>");case c:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function nt(t,e,r){t[e]=r}k.prototype=Error.prototype,n(w,k),I.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,e){for(var r=[],n=0;n<this.length;n++)rt(this[n],r,t,e);return r.join("")}},S.prototype.item=function(t){return T(this),this[t]},i(S,I),A.prototype={length:0,item:I.prototype.item,getNamedItem:function(t){for(var e=this.length;e--;){var r=this[e];if(r.nodeName==t)return r}},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!=this._ownerElement)throw new k(x);var r=this.getNamedItem(t.nodeName);return L(this._ownerElement,this,t,r),r},setNamedItemNS:function(t){var e,r=t.ownerElement;if(r&&r!=this._ownerElement)throw new k(x);return e=this.getNamedItemNS(t.namespaceURI,t.localName),L(this._ownerElement,this,t,e),e},removeNamedItem:function(t){var e=this.getNamedItem(t);return D(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var r=this.getNamedItemNS(t,e);return D(this._ownerElement,this,r),r},getNamedItemNS:function(t,e){for(var r=this.length;r--;){var n=this[r];if(n.localName==e&&n.namespaceURI==t)return n}return null}},M.prototype={hasFeature:function(t,e){var r=this._features[t.toLowerCase()];return!(!r||e&&!(e in r))},createDocument:function(t,e,r){var n=new C;if(n.implementation=this,n.childNodes=new I,n.doctype=r,r&&n.appendChild(r),e){var i=n.createElementNS(t,e);n.appendChild(i)}return n},createDocumentType:function(t,e,r){var n=new V;return n.name=t,n.nodeName=t,n.publicId=e,n.systemId=r,n}},O.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(t,e){return F(this,t,e)},replaceChild:function(t,e){this.insertBefore(t,e),e&&this.removeChild(e)},removeChild:function(t){return j(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(t){return function t(e,r,n){var i=new r.constructor;for(var o in r){var a=r[o];"object"!=typeof a&&a!=i[o]&&(i[o]=a)}r.childNodes&&(i.childNodes=new I);i.ownerDocument=e;switch(i.nodeType){case s:var f=r.attributes,l=i.attributes=new A,c=f.length;l._ownerElement=i;for(var h=0;h<c;h++)i.setAttributeNode(t(e,f.item(h),!0));break;case u:n=!0}if(n)for(var p=r.firstChild;p;)i.appendChild(t(e,p,n)),p=p.nextSibling;return i}(this.ownerDocument||this,this,t)},normalize:function(){for(var t=this.firstChild;t;){var e=t.nextSibling;e&&e.nodeType==f&&t.nodeType==f?(this.removeChild(e),t.appendData(e.data)):(t.normalize(),t=e)}},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(t){for(var e=this;e;){var r=e._nsMap;if(r)for(var n in r)if(r[n]==t)return n;e=e.nodeType==u?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&t in r)return r[t];e=e.nodeType==u?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)}},n(a,O),n(a,O.prototype),C.prototype={nodeName:"#document",nodeType:g,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==b){for(var r=t.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,e),r=n}return t}return null==this.documentElement&&t.nodeType==s&&(this.documentElement=t),F(this,t,e),t.ownerDocument=this,t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),j(this,t)},importNode:function(t,e){return function t(e,r,n){var i;switch(r.nodeType){case s:(i=r.cloneNode(!1)).ownerDocument=e;case b:break;case u:n=!0}i||(i=r.cloneNode(!1));i.ownerDocument=e;i.parentNode=null;if(n)for(var o=r.firstChild;o;)i.appendChild(t(e,o,n)),o=o.nextSibling;return i}(this,t,e)},getElementById:function(t){var e=null;return B(this.documentElement,function(r){if(r.nodeType==s&&r.getAttribute("id")==t)return e=r,!0}),e},getElementsByClassName:function(t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return new S(this,function(t){var r=[];return B(t.documentElement,function(n){n!==t&&n.nodeType==s&&e.test(n.getAttribute("class"))&&r.push(n)}),r})},createElement:function(t){var e=new P;return e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.childNodes=new I,(e.attributes=new A)._ownerElement=e,e},createDocumentFragment:function(){var t=new J;return t.ownerDocument=this,t.childNodes=new I,t},createTextNode:function(t){var e=new q;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new H;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new W;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new $;return r.ownerDocument=this,r.tagName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){var e=new Z;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new Y;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var r=new P,n=e.split(":"),i=r.attributes=new A;return r.childNodes=new I,r.ownerDocument=this,r.nodeName=e,r.tagName=e,r.namespaceURI=t,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=e,i._ownerElement=r,r},createAttributeNS:function(t,e){var r=new Z,n=e.split(":");return r.ownerDocument=this,r.nodeName=e,r.name=e,r.namespaceURI=t,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=e,r}},i(C,O),P.prototype={nodeType:s,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var r=this.ownerDocument.createAttribute(t);r.value=r.nodeValue=""+e,this.setAttributeNode(r)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===b?this.insertBefore(t,null):function(t,e){var r=e.parentNode;if(r){var n=t.lastChild;r.removeChild(e),n=t.lastChild}return n=t.lastChild,e.parentNode=t,e.previousSibling=n,e.nextSibling=null,n?n.nextSibling=e:t.firstChild=e,t.lastChild=e,z(t.ownerDocument,t,e),e}(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);r&&this.removeAttributeNode(r)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);return r&&r.value||""},setAttributeNS:function(t,e,r){var n=this.ownerDocument.createAttributeNS(t,e);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new S(this,function(e){var r=[];return B(e,function(n){n===e||n.nodeType!=s||"*"!==t&&n.tagName!=t||r.push(n)}),r})},getElementsByTagNameNS:function(t,e){return new S(this,function(r){var n=[];return B(r,function(i){i===r||i.nodeType!==s||"*"!==t&&i.namespaceURI!==t||"*"!==e&&i.localName!=e||n.push(i)}),n})}},C.prototype.getElementsByTagName=P.prototype.getElementsByTagName,C.prototype.getElementsByTagNameNS=P.prototype.getElementsByTagNameNS,i(P,O),Z.prototype.nodeType=u,i(Z,O),X.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(m[_])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,r){r=this.data.substring(0,t)+r+this.data.substring(t+e),this.nodeValue=this.data=r,this.length=r.length}},i(X,O),q.prototype={nodeName:"#text",nodeType:f,splitText:function(t){var e=this.data,r=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},i(q,X),H.prototype={nodeName:"#comment",nodeType:d},i(H,X),W.prototype={nodeName:"#cdata-section",nodeType:l},i(W,X),V.prototype.nodeType=y,i(V,O),K.prototype.nodeType=v,i(K,O),G.prototype.nodeType=h,i(G,O),Y.prototype.nodeType=c,i(Y,O),J.prototype.nodeName="#document-fragment",J.prototype.nodeType=b,i(J,O),$.prototype.nodeType=p,i($,O),Q.prototype.serializeToString=function(t,e,r){return tt.call(t,e,r)},O.prototype.toString=tt;try{if(Object.defineProperty){Object.defineProperty(S.prototype,"length",{get:function(){return T(this),this.$$length}}),Object.defineProperty(O.prototype,"textContent",{get:function(){return function t(e){switch(e.nodeType){case s:case b:var r=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&r.push(t(e)),e=e.nextSibling;return r.join("");default:return e.nodeValue}}(this)},set:function(t){switch(this.nodeType){case s:case b:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),nt=function(t,e,r){t["$$"+e]=r}}}catch(t){}r.Node=O,r.DOMException=k,r.DOMImplementation=M,r.XMLSerializer=Q},{}],127:[function(t,e,r){r.entityMap={lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},{}],128:[function(t,e,r){var n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),o=new RegExp("^"+n.source+i.source+"*(?::"+n.source+i.source+"*)?$"),a=0,s=1,u=2,f=3,l=4,c=5,h=6,p=7;function d(t,e){this.message=t,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,d)}function g(){}function y(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function b(t,e,r,n,i,o){function d(t,e,n){t in r.attributeNames&&o.fatalError("Attribute "+t+" redefined"),r.addValue(t,e,n)}for(var g,y=++e,b=a;;){var v=t.charAt(y);switch(v){case"=":if(b===s)g=t.slice(e,y),b=f;else{if(b!==u)throw new Error("attribute equal must after attrName");b=f}break;case"'":case'"':if(b===f||b===s){if(b===s&&(o.warning('attribute value must after "="'),g=t.slice(e,y)),e=y+1,!((y=t.indexOf(v,e))>0))throw new Error("attribute value no end '"+v+"' match");d(g,w=t.slice(e,y).replace(/&#?\w+;/g,i),e-1),b=c}else{if(b!=l)throw new Error('attribute value must after "="');d(g,w=t.slice(e,y).replace(/&#?\w+;/g,i),e),o.warning('attribute "'+g+'" missed start quot('+v+")!!"),e=y+1,b=c}break;case"/":switch(b){case a:r.setTagName(t.slice(e,y));case c:case h:case p:b=p,r.closed=!0;case l:case s:case u:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),b==a&&r.setTagName(t.slice(e,y)),y;case">":switch(b){case a:r.setTagName(t.slice(e,y));case c:case h:case p:break;case l:case s:"/"===(w=t.slice(e,y)).slice(-1)&&(r.closed=!0,w=w.slice(0,-1));case u:b===u&&(w=g),b==l?(o.warning('attribute "'+w+'" missed quot(")!'),d(g,w.replace(/&#?\w+;/g,i),e)):("http://www.w3.org/1999/xhtml"===n[""]&&w.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+w+'" missed value!! "'+w+'" instead!!'),d(w,w,e));break;case f:throw new Error("attribute value missed!!")}return y;case"€":v=" ";default:if(v<=" ")switch(b){case a:r.setTagName(t.slice(e,y)),b=h;break;case s:g=t.slice(e,y),b=u;break;case l:var w=t.slice(e,y).replace(/&#?\w+;/g,i);o.warning('attribute "'+w+'" missed quot(")!!'),d(g,w,e);case c:b=h}else switch(b){case u:r.tagName;"http://www.w3.org/1999/xhtml"===n[""]&&g.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+g+'" missed value!! "'+g+'" instead2!!'),d(g,g,e),e=y,b=s;break;case c:o.warning('attribute space is required"'+g+'"!!');case h:b=s,e=y;break;case f:b=l,e=y;break;case p:throw new Error("elements closed character '/' and '>' must be connected to")}}y++}}function v(t,e,r){for(var n=t.tagName,i=null,o=t.length;o--;){var a=t[o],s=a.qName,u=a.value;if((h=s.indexOf(":"))>0)var f=a.prefix=s.slice(0,h),l=s.slice(h+1),c="xmlns"===f&&l;else l=s,f=null,c="xmlns"===s&&"";a.localName=l,!1!==c&&(null==i&&(i={},_(r,r={})),r[c]=i[c]=u,a.uri="http://www.w3.org/2000/xmlns/",e.startPrefixMapping(c,u))}for(o=t.length;o--;){(f=(a=t[o]).prefix)&&("xml"===f&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==f&&(a.uri=r[f||""]))}var h;(h=n.indexOf(":"))>0?(f=t.prefix=n.slice(0,h),l=t.localName=n.slice(h+1)):(f=null,l=t.localName=n);var p=t.uri=r[f||""];if(e.startElement(p,l,n,t),!t.closed)return t.currentNSMap=r,t.localNSMap=i,!0;if(e.endElement(p,l,n),i)for(f in i)e.endPrefixMapping(f)}function w(t,e,r,n,i){if(/^(?:script|textarea)$/i.test(r)){var o=t.indexOf("</"+r+">",e),a=t.substring(e+1,o);if(/[&<]/.test(a))return/^script$/i.test(r)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,n),i.characters(a,0,a.length),o)}return e+1}function m(t,e,r,n){var i=n[r];return null==i&&((i=t.lastIndexOf("</"+r+">"))<e&&(i=t.lastIndexOf("</"+r)),n[r]=i),i<e}function _(t,e){for(var r in t)e[r]=t[r]}function E(t,e,r,n){switch(t.charAt(e+2)){case"-":return"-"===t.charAt(e+3)?(i=t.indexOf("--\x3e",e+4))>e?(r.comment(t,e+4,i-e-4),i+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==t.substr(e+3,6)){var i=t.indexOf("]]>",e+9);return r.startCDATA(),r.characters(t,e+9,i-e-9),r.endCDATA(),i+3}var o=function(t,e){var r,n=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=e,i.exec(t);for(;r=i.exec(t);)if(n.push(r),r[1])return n}(t,e),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],u=!1,f=!1;a>3&&(/^public$/i.test(o[2][0])?(u=o[3][0],f=a>4&&o[4][0]):/^system$/i.test(o[2][0])&&(f=o[3][0]));var l=o[a-1];return r.startDTD(s,u,f),r.endDTD(),l.index+l[0].length}}return-1}function x(t,e,r){var n=t.indexOf("?>",e);if(n){var i=t.substring(e,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return r.processingInstruction(i[1],i[2]),n+2}return-1}return-1}function k(){this.attributeNames={}}d.prototype=new Error,d.prototype.name=d.name,g.prototype={parse:function(t,e,r){var n=this.domBuilder;n.startDocument(),_(e,e={}),function(t,e,r,n,i){function o(t){var e=t.slice(1,-1);return e in r?r[e]:"#"===e.charAt(0)?function(t){if(t>65535){var e=55296+((t-=65536)>>10),r=56320+(1023&t);return String.fromCharCode(e,r)}return String.fromCharCode(t)}(parseInt(e.substr(1).replace("x","0x"))):(i.error("entity not found:"+t),t)}function a(e){if(e>g){var r=t.substring(g,e).replace(/&#?\w+;/g,o);c&&s(g),n.characters(r,0,e-g),g=e}}function s(e,r){for(;e>=f&&(r=l.exec(t));)u=r.index,f=u+r[0].length,c.lineNumber++;c.columnNumber=e-u+1}var u=0,f=0,l=/.*(?:\r\n?|\n)|.*$/g,c=n.locator,h=[{currentNSMap:e}],p={},g=0;for(;;){try{var _=t.indexOf("<",g);if(_<0){if(!t.substr(g).match(/^\s*$/)){var I=n.doc,S=I.createTextNode(t.substr(g));I.appendChild(S),n.currentElement=S}return}switch(_>g&&a(_),t.charAt(_+1)){case"/":var T=t.indexOf(">",_+3),A=t.substring(_+2,T),N=h.pop();T<0?(A=t.substring(_+2).replace(/[\s<].*/,""),i.error("end tag name: "+A+" is not complete:"+N.tagName),T=_+1+A.length):A.match(/\s</)&&(A=A.replace(/[\s<].*/,""),i.error("end tag name: "+A+" maybe not complete"),T=_+1+A.length);var L=N.localNSMap,D=N.tagName==A,M=D||N.tagName&&N.tagName.toLowerCase()==A.toLowerCase();if(M){if(n.endElement(N.uri,N.localName,A),L)for(var O in L)n.endPrefixMapping(O);D||i.fatalError("end tag name: "+A+" is not match the current start tagName:"+N.tagName)}else h.push(N);T++;break;case"?":c&&s(_),T=x(t,_,n);break;case"!":c&&s(_),T=E(t,_,n,i);break;default:c&&s(_);var U=new k,B=h[h.length-1].currentNSMap,T=b(t,_,U,B,o,i),C=U.length;if(!U.closed&&m(t,T,U.tagName,p)&&(U.closed=!0,r.nbsp||i.warning("unclosed xml attribute")),c&&C){for(var R=y(c,{}),z=0;z<C;z++){var j=U[z];s(j.offset),j.locator=y(c,{})}n.locator=R,v(U,n,B)&&h.push(U),n.locator=c}else v(U,n,B)&&h.push(U);"http://www.w3.org/1999/xhtml"!==U.uri||U.closed?T++:T=w(t,T,U.tagName,o,n)}}catch(t){if(t instanceof d)throw t;i.error("element parse error: "+t),T=-1}T>g?g=T:a(Math.max(_,g)+1)}}(t,e,r,n,this.errorHandler),n.endDocument()}},k.prototype={setTagName:function(t){if(!o.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,r){if(!o.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:r}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},r.XMLReader=g,r.ParseError=d},{}]},{},[2])(2)});
2//# sourceMappingURL=./dist/app-info-parser.mini.js.map
\No newline at end of file