@the-grid/ed-userhtml
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -0,3 +1,9 @@ | ||
## 0.2.0, 2016-08-23 | ||
* Read and write both `block.metadata.text` and `block.text` | ||
* Add UI to set `height`: saves to html, block, and metadata | ||
* Support link | ||
## 0.1.0, 2016-08-23 | ||
* Saves text to `block.text` (instead of `metadata`) |
@@ -1,2 +0,2 @@ | ||
!function t(e,r,n){function i(s,o){if(!r[s]){if(!e[s]){var h="function"==typeof require&&require;if(!o&&h)return h(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var f=r[s]={exports:{}};e[s][0].call(f.exports,function(t){var r=e[s][1][t];return i(r?r:t)},f,f.exports,t,e,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){"use strict";function n(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;r>e;++e)h[e]=t[e],u[t.charCodeAt(e)]=e;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63}function i(t){var e,r,n,i,a,s,o=t.length;if(o%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===t[o-2]?2:"="===t[o-1]?1:0,s=new f(3*o/4-a),n=a>0?o-4:o;var h=0;for(e=0,r=0;n>e;e+=4,r+=3)i=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],s[h++]=i>>16&255,s[h++]=i>>8&255,s[h++]=255&i;return 2===a?(i=u[t.charCodeAt(e)]<<2|u[t.charCodeAt(e+1)]>>4,s[h++]=255&i):1===a&&(i=u[t.charCodeAt(e)]<<10|u[t.charCodeAt(e+1)]<<4|u[t.charCodeAt(e+2)]>>2,s[h++]=i>>8&255,s[h++]=255&i),s}function a(t){return h[t>>18&63]+h[t>>12&63]+h[t>>6&63]+h[63&t]}function s(t,e,r){for(var n,i=[],s=e;r>s;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],i.push(a(n));return i.join("")}function o(t){for(var e,r=t.length,n=r%3,i="",a=[],o=16383,u=0,f=r-n;f>u;u+=o)a.push(s(t,u,u+o>f?f:u+o));return 1===n?(e=t[r-1],i+=h[e>>2],i+=h[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=h[e>>10],i+=h[e>>4&63],i+=h[e<<2&63],i+="="),a.push(i),a.join("")}r.toByteArray=i,r.fromByteArray=o;var h=[],u=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array;n()},{}],2:[function(t,e,r){(function(e){"use strict";function n(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function i(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(i()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=s.prototype):(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,r){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return o(this,t,e,r)}function o(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?_(t,e,r,n):"string"==typeof e?l(t,e,r):c(t,e)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number')}function u(t,e,r,n){return h(e),0>=e?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}function f(t,e){if(h(e),t=a(t,0>e?0:0|p(e)),!s.TYPED_ARRAY_SUPPORT)for(var r=0;e>r;++r)t[r]=0;return t}function l(t,e,r){if(("string"!=typeof r||""===r)&&(r="utf8"),!s.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|w(e,r);return t=a(t,n),t.write(e,r),t}function d(t,e){var r=0|p(e.length);t=a(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function _(t,e,r,n){if(e.byteLength,0>r||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),s.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=s.prototype):t=d(t,e),t}function c(t,e){if(s.isBuffer(e)){var r=0|p(e.length);return t=a(t,r),0===t.length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||J(e.length)?a(t,0):d(t,e);if("Buffer"===e.type&&Q(e.data))return d(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),s.alloc(+t)}function w(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":case void 0:return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Z(t).length;default:if(n)return H(t).length;e=(""+e).toLowerCase(),n=!0}}function v(t,e,r){var n=!1;if((void 0===e||0>e)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),0>=r)return"";if(r>>>=0,e>>>=0,e>=r)return"";for(t||(t="utf8");;)switch(t){case"hex":return U(this,e,r);case"utf8":case"utf-8":return R(this,e,r);case"ascii":return S(this,e,r);case"binary":return T(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n){function i(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,o=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,o/=2,r/=2}for(var h=-1,u=r;s>u;++u)if(i(t,u)===i(e,-1===h?0:u-h)){if(-1===h&&(h=u),u-h+1===o)return h*a}else-1!==h&&(u-=u-h),h=-1;return-1}function m(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var a=e.length;if(a%2!==0)throw new Error("Invalid hex string");n>a/2&&(n=a/2);for(var s=0;n>s;++s){var o=parseInt(e.substr(2*s,2),16);if(isNaN(o))return s;t[r+s]=o}return s}function A(t,e,r,n){return $(H(e,t.length-r),t,r,n)}function k(t,e,r,n){return $(V(e),t,r,n)}function z(t,e,r,n){return k(t,e,r,n)}function E(t,e,r,n){return $(Z(e),t,r,n)}function x(t,e,r,n){return $(X(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,r))}function R(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var a=t[i],s=null,o=a>239?4:a>223?3:a>191?2:1;if(r>=i+o){var h,u,f,l;switch(o){case 1:128>a&&(s=a);break;case 2:h=t[i+1],128===(192&h)&&(l=(31&a)<<6|63&h,l>127&&(s=l));break;case 3:h=t[i+1],u=t[i+2],128===(192&h)&&128===(192&u)&&(l=(15&a)<<12|(63&h)<<6|63&u,l>2047&&(55296>l||l>57343)&&(s=l));break;case 4:h=t[i+1],u=t[i+2],f=t[i+3],128===(192&h)&&128===(192&u)&&128===(192&f)&&(l=(15&a)<<18|(63&h)<<12|(63&u)<<6|63&f,l>65535&&1114112>l&&(s=l))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=o}return P(n)}function P(t){var e=t.length;if(W>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=W));return r}function S(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;++i)n+=String.fromCharCode(127&t[i]);return n}function T(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;++i)n+=String.fromCharCode(t[i]);return n}function U(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",a=e;r>a;++a)i+=q(t[a]);return i}function C(t,e,r){for(var n=t.slice(e,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function I(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function Y(t,e,r,n,i,a){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||a>e)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function O(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-r,2);a>i;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function L(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-r,4);a>i;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function D(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(0>r)throw new RangeError("Index out of range")}function M(t,e,r,n,i){return i||D(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,i){return i||D(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(t,e,r,n,52,8),r+8}function j(t){if(t=F(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function q(t){return 16>t?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],s=0;n>s;++s){if(r=t.charCodeAt(s),r>55295&&57344>r){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(56320>r){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,128>r){if((e-=1)<0)break;a.push(r)}else if(2048>r){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function V(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function X(t,e){for(var r,n,i,a=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,a.push(i),a.push(n);return a}function Z(t){return K.toByteArray(j(t))}function $(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t){return t!==t}var K=t("base64-js"),G=t("ieee754"),Q=t("isarray");r.Buffer=s,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:n(),r.kMaxLength=i(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,r){return o(null,t,e,r)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,r){return u(null,t,e,r)},s.allocUnsafe=function(t){return f(null,t)},s.allocUnsafeSlow=function(t){return f(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);a>i;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return n>r?-1:r>n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!Q(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},s.byteLength=w,s.prototype._isBuffer=!0,s.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;t>e;e+=2)y(this,e,e+1);return this},s.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;t>e;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?R(this,0,t):v.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,r,n,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),0>e||r>t.length||0>n||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 a=i-n,o=r-e,h=Math.min(a,o),u=this.slice(n,i),f=t.slice(e,r),l=0;h>l;++l)if(u[l]!==f[l]){a=u[l],o=f[l];break}return o>a?-1:a>o?1:0},s.prototype.indexOf=function(t,e,r){if("string"==typeof e?(r=e,e=0):e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:b(this,t,e,r);if("number"==typeof t)return s.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):b(this,[t],e,r);throw new TypeError("val must be string, number or Buffer")},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.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|e,isFinite(r)?(r=0|r,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&&(0>r||0>e)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return A(this,t,e,r);case"ascii":return k(this,t,e,r);case"binary":return z(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var W=4096;s.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),t>e&&(e=t);var n;if(s.TYPED_ARRAY_SUPPORT)n=this.subarray(t,e),n.__proto__=s.prototype;else{var i=e-t;n=new s(i,void 0);for(var a=0;i>a;++a)n[a]=this[a+t]}return n},s.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},s.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*e)),a},s.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),G.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),G.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),G.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),G.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;Y(this,t,e,r,i,0)}var a=1,s=0;for(this[e]=255&t;++s<r&&(a*=256);)this[e+s]=t/a&255;return e+r},s.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;Y(this,t,e,r,i,0)}var a=r-1,s=1;for(this[e+a]=255&t;--a>=0&&(s*=256);)this[e+a]=t/s&255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);Y(this,t,e,r,i-1,-i)}var a=0,s=1,o=0;for(this[e]=255&t;++a<r&&(s*=256);)0>t&&0===o&&0!==this[e+a-1]&&(o=1),this[e+a]=(t/s>>0)-o&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);Y(this,t,e,r,i-1,-i)}var a=r-1,s=1,o=0;for(this[e+a]=255&t;--a>=0&&(s*=256);)0>t&&0===o&&0!==this[e+a+1]&&(o=1),this[e+a]=(t/s>>0)-o&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):O(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):O(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,r){return M(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return M(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&r>n&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>n)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,a=n-r;if(this===t&&e>r&&n>e)for(i=a-1;i>=0;--i)t[i+e]=this[i+r];else if(1e3>a||!s.TYPED_ARRAY_SUPPORT)for(i=0;a>i;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),e);return a},s.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),1===t.length){var i=t.charCodeAt(0);256>i&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t=255&t);if(0>e||this.length<e||this.length<r)throw new RangeError("Out of range index");if(e>=r)return this;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var a;if("number"==typeof t)for(a=e;r>a;++a)this[a]=t;else{var o=s.isBuffer(t)?t:H(new s(t,n).toString()),h=o.length;for(a=0;r-e>a;++a)this[a+e]=o[a%h]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":1,ieee754:3,isarray:4}],3:[function(t,e,r){r.read=function(t,e,r,n,i){var a,s,o=8*i-n-1,h=(1<<o)-1,u=h>>1,f=-7,l=r?i-1:0,d=r?-1:1,_=t[e+l];for(l+=d,a=_&(1<<-f)-1,_>>=-f,f+=o;f>0;a=256*a+t[e+l],l+=d,f-=8);for(s=a&(1<<-f)-1,a>>=-f,f+=n;f>0;s=256*s+t[e+l],l+=d,f-=8);if(0===a)a=1-u;else{if(a===h)return s?NaN:(_?-1:1)*(1/0);s+=Math.pow(2,n),a-=u}return(_?-1:1)*s*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var s,o,h,u=8*a-i-1,f=(1<<u)-1,l=f>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,_=n?0:a-1,c=n?1:-1,p=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),e+=s+l>=1?d/h:d*Math.pow(2,1-l),e*h>=2&&(s++,h/=2),s+l>=f?(o=0,s=f):s+l>=1?(o=(e*h-1)*Math.pow(2,i),s+=l):(o=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+_]=255&o,_+=c,o/=256,i-=8);for(s=s<<i|o,u+=i;u>0;t[r+_]=255&s,_+=c,s/=256,u-=8);t[r+_-c]|=128*p}},{}],4:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],5:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.options=h.assign({level:v,method:b,chunkSize:16384,windowBits:15,memLevel:8,strategy:y,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=o.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==p)throw new Error(f[r]);if(e.header&&o.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(i="string"==typeof e.dictionary?u.string2buf(e.dictionary):"[object ArrayBuffer]"===d.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=o.deflateSetDictionary(this.strm,i),r!==p)throw new Error(f[r]);this._dict_set=!0}}function i(t,e){var r=new n(e);if(r.push(t,!0),r.err)throw r.msg;return r.result}function a(t,e){return e=e||{},e.raw=!0,i(t,e)}function s(t,e){return e=e||{},e.gzip=!0,i(t,e)}var o=t("./zlib/deflate"),h=t("./utils/common"),u=t("./utils/strings"),f=t("./zlib/messages"),l=t("./zlib/zstream"),d=Object.prototype.toString,_=0,c=4,p=0,g=1,w=2,v=-1,y=0,b=8;n.prototype.push=function(t,e){var r,n,i=this.strm,a=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:e===!0?c:_,"string"==typeof t?i.input=u.string2buf(t):"[object ArrayBuffer]"===d.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new h.Buf8(a),i.next_out=0,i.avail_out=a),r=o.deflate(i,n),r!==g&&r!==p)return this.onEnd(r),this.ended=!0,!1;(0===i.avail_out||0===i.avail_in&&(n===c||n===w))&&("string"===this.options.to?this.onData(u.buf2binstring(h.shrinkBuf(i.output,i.next_out))):this.onData(h.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&r!==g);return n===c?(r=o.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===p):n===w?(this.onEnd(p),i.avail_out=0,!0):!0},n.prototype.onData=function(t){this.chunks.push(t)},n.prototype.onEnd=function(t){t===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=n,r.deflate=i,r.deflateRaw=a,r.gzip=s},{"./utils/common":6,"./utils/strings":7,"./zlib/deflate":10,"./zlib/messages":11,"./zlib/zstream":13}],6:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;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)r.hasOwnProperty(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 i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)return void t.set(e.subarray(r,r+n),i);for(var a=0;n>a;a++)t[i+a]=e[r+a]},flattenChunks:function(t){var e,r,n,i,a,s;for(n=0,e=0,r=t.length;r>e;e++)n+=t[e].length;for(s=new Uint8Array(n),i=0,e=0,r=t.length;r>e;e++)a=t[e],s.set(a,i),i+=a.length;return s}},a={arraySet:function(t,e,r,n,i){for(var a=0;n>a;a++)t[i+a]=e[r+a]},flattenChunks:function(t){return[].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,a))},r.setTyped(n)},{}],7:[function(t,e,r){"use strict";function n(t,e){if(65537>e&&(t.subarray&&s||!t.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var r="",n=0;e>n;n++)r+=String.fromCharCode(t[n]);return r}var i=t("./common"),a=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(o){a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(o){s=!1}for(var h=new i.Buf8(256),u=0;256>u;u++)h[u]=u>=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;h[254]=h[254]=1,r.string2buf=function(t){var e,r,n,a,s,o=t.length,h=0;for(a=0;o>a;a++)r=t.charCodeAt(a),55296===(64512&r)&&o>a+1&&(n=t.charCodeAt(a+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),a++)),h+=128>r?1:2048>r?2:65536>r?3:4;for(e=new i.Buf8(h),s=0,a=0;h>s;a++)r=t.charCodeAt(a),55296===(64512&r)&&o>a+1&&(n=t.charCodeAt(a+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),a++)),128>r?e[s++]=r:2048>r?(e[s++]=192|r>>>6,e[s++]=128|63&r):65536>r?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e},r.buf2binstring=function(t){return n(t,t.length)},r.binstring2buf=function(t){for(var e=new i.Buf8(t.length),r=0,n=e.length;n>r;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,i,a,s,o=e||t.length,u=new Array(2*o);for(i=0,r=0;o>r;)if(a=t[r++],128>a)u[i++]=a;else if(s=h[a],s>4)u[i++]=65533,r+=s-1;else{for(a&=2===s?31:3===s?15:7;s>1&&o>r;)a=a<<6|63&t[r++],s--;s>1?u[i++]=65533:65536>a?u[i++]=a:(a-=65536,u[i++]=55296|a>>10&1023,u[i++]=56320|1023&a)}return n(u,i)},r.utf8border=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&128===(192&t[r]);)r--;return 0>r?e:0===r?e:r+h[t[r]]>e?r:e}},{"./common":6}],8:[function(t,e,r){"use strict";function n(t,e,r,n){for(var i=65535&t|0,a=t>>>16&65535|0,s=0;0!==r;){s=r>2e3?2e3:r,r-=s;do i=i+e[n++]|0,a=a+i|0;while(--s);i%=65521,a%=65521}return i|a<<16|0}e.exports=n},{}],9:[function(t,e,r){"use strict";function n(){for(var t,e=[],r=0;256>r;r++){t=r;for(var n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}function i(t,e,r,n){var i=a,s=n+r;t^=-1;for(var o=n;s>o;o++)t=t>>>8^i[255&(t^e[o])];return-1^t}var a=n();e.exports=i},{}],10:[function(t,e,r){"use strict";function n(t,e){return t.msg=I[e],e}function i(t){return(t<<1)-(t>4?9:0)}function a(t){for(var e=t.length;--e>=0;)t[e]=0}function s(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(S.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 o(t,e){T._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,s(t.strm)}function h(t,e){t.pending_buf[t.pending++]=e}function u(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function f(t,e,r,n){var i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,S.arraySet(e,t.input,t.next_in,i,r),1===t.state.wrap?t.adler=U(t.adler,e,i,r):2===t.state.wrap&&(t.adler=C(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)}function l(t,e){var r,n,i=t.max_chain_length,a=t.strstart,s=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-lt?t.strstart-(t.w_size-lt):0,u=t.window,f=t.w_mask,l=t.prev,d=t.strstart+ft,_=u[a+s-1],c=u[a+s];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do if(r=e,u[r+s]===c&&u[r+s-1]===_&&u[r]===u[a]&&u[++r]===u[a+1]){a+=2,r++;do;while(u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&d>a);if(n=ft-(d-a),a=d-ft,n>s){if(t.match_start=e,s=n,n>=o)break;_=u[a+s-1],c=u[a+s]}}while((e=l[e&f])>h&&0!==--i);return s<=t.lookahead?s:t.lookahead}function d(t){var e,r,n,i,a,s=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-lt)){S.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,r=t.hash_size,e=r;do n=t.head[--e],t.head[e]=n>=s?n-s:0;while(--r);r=s,e=r;do n=t.prev[--e],t.prev[e]=n>=s?n-s:0;while(--r);i+=s}if(0===t.strm.avail_in)break;if(r=f(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=r,t.lookahead+t.insert>=ut)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+ut-1])&t.hash_mask,t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<ut)););}while(t.lookahead<lt&&0!==t.strm.avail_in)}function _(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(d(t),0===t.lookahead&&e===Y)return bt;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,o(t,!1),0===t.strm.avail_out))return bt;if(t.strstart-t.block_start>=t.w_size-lt&&(o(t,!1),0===t.strm.avail_out))return bt}return t.insert=0,e===D?(o(t,!0),0===t.strm.avail_out?At:kt):t.strstart>t.block_start&&(o(t,!1),0===t.strm.avail_out)?bt:bt}function c(t,e){for(var r,n;;){if(t.lookahead<lt){if(d(t),t.lookahead<lt&&e===Y)return bt;if(0===t.lookahead)break}if(r=0,t.lookahead>=ut&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ut-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-lt&&(t.match_length=l(t,r)),t.match_length>=ut)if(n=T._tr_tally(t,t.strstart-t.match_start,t.match_length-ut),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ut){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ut-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=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(o(t,!1),0===t.strm.avail_out))return bt}return t.insert=t.strstart<ut-1?t.strstart:ut-1,e===D?(o(t,!0),0===t.strm.avail_out?At:kt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?bt:mt}function p(t,e){for(var r,n,i;;){if(t.lookahead<lt){if(d(t),t.lookahead<lt&&e===Y)return bt;if(0===t.lookahead)break}if(r=0,t.lookahead>=ut&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ut-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=ut-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-lt&&(t.match_length=l(t,r),t.match_length<=5&&(t.strategy===X||t.match_length===ut&&t.strstart-t.match_start>4096)&&(t.match_length=ut-1)),t.prev_length>=ut&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-ut,n=T._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-ut),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+ut-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=ut-1,t.strstart++,n&&(o(t,!1),0===t.strm.avail_out))return bt}else if(t.match_available){if(n=T._tr_tally(t,0,t.window[t.strstart-1]),n&&o(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return bt}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=T._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<ut-1?t.strstart:ut-1,e===D?(o(t,!0),0===t.strm.avail_out?At:kt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?bt:mt}function g(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=ft){if(d(t),t.lookahead<=ft&&e===Y)return bt;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=ut&&t.strstart>0&&(i=t.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){a=t.strstart+ft;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]&&a>i);t.match_length=ft-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ut?(r=T._tr_tally(t,1,t.match_length-ut),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(o(t,!1),0===t.strm.avail_out))return bt}return t.insert=0,e===D?(o(t,!0),0===t.strm.avail_out?At:kt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?bt:mt}function w(t,e){for(var r;;){if(0===t.lookahead&&(d(t),0===t.lookahead)){if(e===Y)return bt;break}if(t.match_length=0,r=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(o(t,!1),0===t.strm.avail_out))return bt}return t.insert=0,e===D?(o(t,!0),0===t.strm.avail_out?At:kt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?bt:mt}function v(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 y(t){t.window_size=2*t.w_size,a(t.head),t.max_lazy_match=P[t.level].max_lazy,t.good_match=P[t.level].good_length,t.nice_match=P[t.level].nice_length,t.max_chain_length=P[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ut-1,t.match_available=0,t.ins_h=0}function b(){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=Q,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 S.Buf16(2*ot),this.dyn_dtree=new S.Buf16(2*(2*at+1)),this.bl_tree=new S.Buf16(2*(2*st+1)),a(this.dyn_ltree),a(this.dyn_dtree),a(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new S.Buf16(ht+1),this.heap=new S.Buf16(2*it+1),a(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new S.Buf16(2*it+1),a(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}function m(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=G,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?_t:vt,t.adler=2===e.wrap?0:1,e.last_flush=Y,T._tr_init(e),N):n(t,F)}function A(t){var e=m(t);return e===N&&y(t.state),e}function k(t,e){return t&&t.state?2!==t.state.wrap?F:(t.state.gzhead=e,N):F}function z(t,e,r,i,a,s){if(!t)return F;var o=1;if(e===V&&(e=6),0>i?(o=0,i=-i):i>15&&(o=2,i-=16),1>a||a>W||r!==Q||8>i||i>15||0>e||e>9||0>s||s>J)return n(t,F);8===i&&(i=9);var h=new b;return t.state=h,h.strm=t,h.wrap=o,h.gzhead=null,h.w_bits=i,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=a+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+ut-1)/ut),h.window=new S.Buf8(2*h.w_size),h.head=new S.Buf16(h.hash_size),h.prev=new S.Buf16(h.w_size),h.lit_bufsize=1<<a+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new S.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=s,h.method=r,A(t)}function E(t,e){return z(t,e,Q,tt,et,K)}function x(t,e){var r,o,f,l;if(!t||!t.state||e>M||0>e)return t?n(t,F):F;if(o=t.state,!t.output||!t.input&&0!==t.avail_in||o.status===yt&&e!==D)return n(t,0===t.avail_out?H:F);if(o.strm=t,r=o.last_flush,o.last_flush=e,o.status===_t)if(2===o.wrap)t.adler=0,h(o,31),h(o,139),h(o,8),o.gzhead?(h(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),h(o,255&o.gzhead.time),h(o,o.gzhead.time>>8&255),h(o,o.gzhead.time>>16&255),h(o,o.gzhead.time>>24&255),h(o,9===o.level?2:o.strategy>=Z||o.level<2?4:0),h(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(h(o,255&o.gzhead.extra.length),h(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=C(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=ct):(h(o,0),h(o,0),h(o,0),h(o,0),h(o,0),h(o,9===o.level?2:o.strategy>=Z||o.level<2?4:0),h(o,zt),o.status=vt);else{var d=Q+(o.w_bits-8<<4)<<8,_=-1;_=o.strategy>=Z||o.level<2?0:o.level<6?1:6===o.level?2:3,d|=_<<6,0!==o.strstart&&(d|=dt),d+=31-d%31,o.status=vt,u(o,d),0!==o.strstart&&(u(o,t.adler>>>16),u(o,65535&t.adler)),t.adler=1}if(o.status===ct)if(o.gzhead.extra){for(f=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>f&&(t.adler=C(t.adler,o.pending_buf,o.pending-f,f)),s(t),f=o.pending,o.pending!==o.pending_buf_size));)h(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>f&&(t.adler=C(t.adler,o.pending_buf,o.pending-f,f)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=pt)}else o.status=pt;if(o.status===pt)if(o.gzhead.name){f=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>f&&(t.adler=C(t.adler,o.pending_buf,o.pending-f,f)),s(t),f=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,h(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>f&&(t.adler=C(t.adler,o.pending_buf,o.pending-f,f)),0===l&&(o.gzindex=0,o.status=gt)}else o.status=gt;if(o.status===gt)if(o.gzhead.comment){f=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>f&&(t.adler=C(t.adler,o.pending_buf,o.pending-f,f)),s(t),f=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,h(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>f&&(t.adler=C(t.adler,o.pending_buf,o.pending-f,f)),0===l&&(o.status=wt)}else o.status=wt;if(o.status===wt&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&s(t),o.pending+2<=o.pending_buf_size&&(h(o,255&t.adler),h(o,t.adler>>8&255),t.adler=0,o.status=vt)):o.status=vt),0!==o.pending){if(s(t),0===t.avail_out)return o.last_flush=-1,N}else if(0===t.avail_in&&i(e)<=i(r)&&e!==D)return n(t,H);if(o.status===yt&&0!==t.avail_in)return n(t,H);if(0!==t.avail_in||0!==o.lookahead||e!==Y&&o.status!==yt){var c=o.strategy===Z?w(o,e):o.strategy===$?g(o,e):P[o.level].func(o,e);if((c===At||c===kt)&&(o.status=yt),c===bt||c===At)return 0===t.avail_out&&(o.last_flush=-1),N;if(c===mt&&(e===O?T._tr_align(o):e!==M&&(T._tr_stored_block(o,0,0,!1),e===L&&(a(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),s(t),0===t.avail_out))return o.last_flush=-1,N}return e!==D?N:o.wrap<=0?j:(2===o.wrap?(h(o,255&t.adler),h(o,t.adler>>8&255),h(o,t.adler>>16&255),h(o,t.adler>>24&255),h(o,255&t.total_in),h(o,t.total_in>>8&255),h(o,t.total_in>>16&255),h(o,t.total_in>>24&255)):(u(o,t.adler>>>16),u(o,65535&t.adler)),s(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?N:j)}function B(t){var e;return t&&t.state?(e=t.state.status,e!==_t&&e!==ct&&e!==pt&&e!==gt&&e!==wt&&e!==vt&&e!==yt?n(t,F):(t.state=null,e===vt?n(t,q):N)):F}function R(t,e){var r,n,i,s,o,h,u,f,l=e.length;if(!t||!t.state)return F;if(r=t.state,s=r.wrap,2===s||1===s&&r.status!==_t||r.lookahead)return F;for(1===s&&(t.adler=U(t.adler,e,l,0)),r.wrap=0,l>=r.w_size&&(0===s&&(a(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new S.Buf8(r.w_size),S.arraySet(f,e,l-r.w_size,r.w_size,0),e=f,l=r.w_size),o=t.avail_in,h=t.next_in,u=t.input,t.avail_in=l,t.next_in=0,t.input=e,d(r);r.lookahead>=ut;){n=r.strstart,i=r.lookahead-(ut-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+ut-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++;while(--i);r.strstart=n,r.lookahead=ut-1,d(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ut-1,r.match_available=0,t.next_in=h,t.input=u,t.avail_in=o,r.wrap=s,N}var P,S=t("../utils/common"),T=t("./trees"),U=t("./adler32"),C=t("./crc32"),I=t("./messages"),Y=0,O=1,L=3,D=4,M=5,N=0,j=1,F=-2,q=-3,H=-5,V=-1,X=1,Z=2,$=3,J=4,K=0,G=2,Q=8,W=9,tt=15,et=8,rt=29,nt=256,it=nt+1+rt,at=30,st=19,ot=2*it+1,ht=15,ut=3,ft=258,lt=ft+ut+1,dt=32,_t=42,ct=69,pt=73,gt=91,wt=103,vt=113,yt=666,bt=1,mt=2,At=3,kt=4,zt=3;P=[new v(0,0,0,0,_),new v(4,4,8,4,c),new v(4,5,16,8,c),new v(4,6,32,32,c),new v(4,4,16,16,p),new v(8,16,32,32,p),new v(8,16,128,128,p),new v(8,32,128,256,p),new v(32,128,258,1024,p),new v(32,258,258,4096,p)],r.deflateInit=E,r.deflateInit2=z,r.deflateReset=A,r.deflateResetKeep=m,r.deflateSetHeader=k,r.deflate=x,r.deflateEnd=B,r.deflateSetDictionary=R,r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":6,"./adler32":8,"./crc32":9,"./messages":11,"./trees":12}],11:[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"}},{}],12:[function(t,e,r){"use strict";function n(t){for(var e=t.length;--e>=0;)t[e]=0}function i(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 a(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function s(t){return 256>t?ht[t]:ht[256+(t>>>7)]}function o(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function h(t,e,r){t.bi_valid>J-r?(t.bi_buf|=e<<t.bi_valid&65535,o(t,t.bi_buf),t.bi_buf=e>>J-t.bi_valid,t.bi_valid+=r-J):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function u(t,e,r){h(t,r[2*e],r[2*e+1])}function f(t,e){var r=0;do r|=1&t,t>>>=1,r<<=1;while(--e>0);return r>>>1}function l(t){16===t.bi_valid?(o(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)}function d(t,e){var r,n,i,a,s,o,h=e.dyn_tree,u=e.max_code,f=e.stat_desc.static_tree,l=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,_=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(a=0;$>=a;a++)t.bl_count[a]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;Z>r;r++)n=t.heap[r],a=h[2*h[2*n+1]+1]+1,a>c&&(a=c,p++),h[2*n+1]=a,n>u||(t.bl_count[a]++,s=0,n>=_&&(s=d[n-_]),o=h[2*n],t.opt_len+=o*(a+s),l&&(t.static_len+=o*(f[2*n+1]+s)));if(0!==p){do{for(a=c-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(a=c;0!==a;a--)for(n=t.bl_count[a];0!==n;)i=t.heap[--r],i>u||(h[2*i+1]!==a&&(t.opt_len+=(a-h[2*i+1])*h[2*i],h[2*i+1]=a),n--)}}function _(t,e,r){var n,i,a=new Array($+1),s=0;for(n=1;$>=n;n++)a[n]=s=s+r[n-1]<<1;for(i=0;e>=i;i++){var o=t[2*i+1];0!==o&&(t[2*i]=f(a[o]++,o))}}function c(){var t,e,r,n,a,s=new Array($+1);for(r=0,n=0;F-1>n;n++)for(ft[n]=r,t=0;t<1<<et[n];t++)ut[r++]=n;for(ut[r-1]=n,a=0,n=0;16>n;n++)for(lt[n]=a,t=0;t<1<<rt[n];t++)ht[a++]=n;for(a>>=7;V>n;n++)for(lt[n]=a<<7,t=0;t<1<<rt[n]-7;t++)ht[256+a++]=n;for(e=0;$>=e;e++)s[e]=0;for(t=0;143>=t;)st[2*t+1]=8,t++,s[8]++;for(;255>=t;)st[2*t+1]=9,t++,s[9]++;for(;279>=t;)st[2*t+1]=7,t++,s[7]++;for(;287>=t;)st[2*t+1]=8,t++,s[8]++;for(_(st,H+1,s),t=0;V>t;t++)ot[2*t+1]=5,ot[2*t]=f(t,5);dt=new i(st,et,q+1,H,$),_t=new i(ot,rt,0,V,$),ct=new i(new Array(0),nt,0,X,K)}function p(t){var e;for(e=0;H>e;e++)t.dyn_ltree[2*e]=0;for(e=0;V>e;e++)t.dyn_dtree[2*e]=0;for(e=0;X>e;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*G]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function g(t){t.bi_valid>8?o(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 w(t,e,r,n){g(t),n&&(o(t,r),o(t,~r)),U.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}function v(t,e,r,n){var i=2*e,a=2*r;return t[i]<t[a]||t[i]===t[a]&&n[e]<=n[r]}function y(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&v(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!v(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function b(t,e,r){var n,i,a,o,f=0;if(0!==t.last_lit)do n=t.pending_buf[t.d_buf+2*f]<<8|t.pending_buf[t.d_buf+2*f+1],i=t.pending_buf[t.l_buf+f],f++,0===n?u(t,i,e):(a=ut[i],u(t,a+q+1,e),o=et[a],0!==o&&(i-=ft[a],h(t,i,o)),n--,a=s(n),u(t,a,r),o=rt[a],0!==o&&(n-=lt[a],h(t,n,o)));while(f<t.last_lit);u(t,G,e)}function m(t,e){var r,n,i,a=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,h=e.stat_desc.elems,u=-1;for(t.heap_len=0,t.heap_max=Z,r=0;h>r;r++)0!==a[2*r]?(t.heap[++t.heap_len]=u=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)i=t.heap[++t.heap_len]=2>u?++u:0,a[2*i]=1,t.depth[i]=0,t.opt_len--,o&&(t.static_len-=s[2*i+1]);for(e.max_code=u,r=t.heap_len>>1;r>=1;r--)y(t,a,r);i=h;do r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],y(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,y(t,a,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],d(t,e),_(a,u,t.bl_count)}function A(t,e,r){var n,i,a=-1,s=e[1],o=0,h=7,u=4;for(0===s&&(h=138,u=3),e[2*(r+1)+1]=65535,n=0;r>=n;n++)i=s,s=e[2*(n+1)+1],++o<h&&i===s||(u>o?t.bl_tree[2*i]+=o:0!==i?(i!==a&&t.bl_tree[2*i]++,t.bl_tree[2*Q]++):10>=o?t.bl_tree[2*W]++:t.bl_tree[2*tt]++,o=0,a=i,0===s?(h=138,u=3):i===s?(h=6,u=3):(h=7,u=4))}function k(t,e,r){var n,i,a=-1,s=e[1],o=0,f=7,l=4;for(0===s&&(f=138,l=3),n=0;r>=n;n++)if(i=s,s=e[2*(n+1)+1],!(++o<f&&i===s)){if(l>o){do u(t,i,t.bl_tree);while(0!==--o)}else 0!==i?(i!==a&&(u(t,i,t.bl_tree),o--),u(t,Q,t.bl_tree),h(t,o-3,2)):10>=o?(u(t,W,t.bl_tree),h(t,o-3,3)):(u(t,tt,t.bl_tree),h(t,o-11,7));o=0,a=i,0===s?(f=138,l=3):i===s?(f=6,l=3):(f=7,l=4)}}function z(t){var e;for(A(t,t.dyn_ltree,t.l_desc.max_code),A(t,t.dyn_dtree,t.d_desc.max_code),m(t,t.bl_desc),e=X-1;e>=3&&0===t.bl_tree[2*it[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function E(t,e,r,n){var i;for(h(t,e-257,5),h(t,r-1,5),h(t,n-4,4),i=0;n>i;i++)h(t,t.bl_tree[2*it[i]+1],3);k(t,t.dyn_ltree,e-1),k(t,t.dyn_dtree,r-1)}function x(t){var e,r=4093624447;for(e=0;31>=e;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return I;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return Y;for(e=32;q>e;e++)if(0!==t.dyn_ltree[2*e])return Y;return I}function B(t){pt||(c(),pt=!0),t.l_desc=new a(t.dyn_ltree,dt),t.d_desc=new a(t.dyn_dtree,_t),t.bl_desc=new a(t.bl_tree,ct),t.bi_buf=0,t.bi_valid=0,p(t)}function R(t,e,r,n){h(t,(L<<1)+(n?1:0),3),w(t,e,r,!0)}function P(t){h(t,D<<1,3),u(t,G,st),l(t)}function S(t,e,r,n){var i,a,s=0;t.level>0?(t.strm.data_type===O&&(t.strm.data_type=x(t)),m(t,t.l_desc),m(t,t.d_desc),s=z(t),i=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,i>=a&&(i=a)):i=a=r+5,i>=r+4&&-1!==e?R(t,e,r,n):t.strategy===C||a===i?(h(t,(D<<1)+(n?1:0),3),b(t,st,ot)):(h(t,(M<<1)+(n?1:0),3),E(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),b(t,t.dyn_ltree,t.dyn_dtree)),p(t),n&&g(t)}function T(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*(ut[r]+q+1)]++,t.dyn_dtree[2*s(e)]++),t.last_lit===t.lit_bufsize-1}var U=t("../utils/common"),C=4,I=0,Y=1,O=2,L=0,D=1,M=2,N=3,j=258,F=29,q=256,H=q+1+F,V=30,X=19,Z=2*H+1,$=15,J=16,K=7,G=256,Q=16,W=17,tt=18,et=[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],rt=[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],nt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],it=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],at=512,st=new Array(2*(H+2));n(st);var ot=new Array(2*V);n(ot);var ht=new Array(at);n(ht);var ut=new Array(j-N+1);n(ut);var ft=new Array(F);n(ft);var lt=new Array(V);n(lt);var dt,_t,ct,pt=!1;r._tr_init=B,r._tr_stored_block=R,r._tr_flush_block=S,r._tr_tally=T,r._tr_align=P},{"../utils/common":6}],13:[function(t,e,r){"use strict";function n(){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}e.exports=n},{}],14:[function(t,e,r){e.exports=t("./lib/urlsafe-base64")},{"./lib/urlsafe-base64":15}],15:[function(t,e,r){(function(t){r.version="1.0.0",r.encode=function(t){return t.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},r.decode=function(e){return e+=Array(5-e.length%4).join("="),e=e.replace(/\-/g,"+").replace(/\_/g,"/"),new t(e,"base64")},r.validate=function(t){return/^[A-Za-z0-9\-_]+$/.test(t)}}).call(this,t("buffer").Buffer)},{buffer:2}],16:[function(t,e,r){function n(t){v&&(window.clearTimeout(v),v=null),g.textContent=t}function i(){g.textContent=""}function a(t){var e=f(t,{to:"string"}),r=window.btoa(e),n=l(r);return n}function s(t,e){c&&c.id&&window.parent.postMessage({topic:t,id:c.id,payload:e},"*")}function o(t){t&&(t.metadata||(t.metadata={}),t.metadata.widget="userhtml",c=t,t.hasOwnProperty("text")&&(p.value=t.text),u())}function h(t){if(c&&c.metadata){n("saving...");var e=t.target.value,r=a(e);c.text=e;var o=d+r;if(o.length>_)return void n("error: input too long");c.metadata.isBasedOnUrl=o,c.html='<iframe src="'+o+'"></iframe>',v=setTimeout(i,1e3),s("changed",c),u()}}function u(){p.style.height="auto";var t=p.scrollHeight;p.style.height=t-4+"px",t!==w&&(w=t,s("height",t))}var f=t("pako/lib/deflate").deflate,l=t("urlsafe-base64").encode,d="https://the-grid.github.io/ed-userhtml/?g=",_=2e3,c=null,p=document.getElementById("textarea"),g=document.getElementById("status"),w=0,v=null;p.addEventListener("input",h),window.addEventListener("message",function(t){switch(t.data.topic){case"setblock":var e=t.data.payload;o(e);break;case"focus":p.focus()}})},{"pako/lib/deflate":5,"urlsafe-base64":14}]},{},[16]); | ||
!function t(e,r,n){function i(s,o){if(!r[s]){if(!e[s]){var h="function"==typeof require&&require;if(!o&&h)return h(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var f=r[s]={exports:{}};e[s][0].call(f.exports,function(t){var r=e[s][1][t];return i(r?r:t)},f,f.exports,t,e,r,n)}return r[s].exports}for(var a="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){"use strict";function n(){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,r=t.length;r>e;++e)h[e]=t[e],u[t.charCodeAt(e)]=e;u["-".charCodeAt(0)]=62,u["_".charCodeAt(0)]=63}function i(t){var e,r,n,i,a,s,o=t.length;if(o%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===t[o-2]?2:"="===t[o-1]?1:0,s=new f(3*o/4-a),n=a>0?o-4:o;var h=0;for(e=0,r=0;n>e;e+=4,r+=3)i=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],s[h++]=i>>16&255,s[h++]=i>>8&255,s[h++]=255&i;return 2===a?(i=u[t.charCodeAt(e)]<<2|u[t.charCodeAt(e+1)]>>4,s[h++]=255&i):1===a&&(i=u[t.charCodeAt(e)]<<10|u[t.charCodeAt(e+1)]<<4|u[t.charCodeAt(e+2)]>>2,s[h++]=i>>8&255,s[h++]=255&i),s}function a(t){return h[t>>18&63]+h[t>>12&63]+h[t>>6&63]+h[63&t]}function s(t,e,r){for(var n,i=[],s=e;r>s;s+=3)n=(t[s]<<16)+(t[s+1]<<8)+t[s+2],i.push(a(n));return i.join("")}function o(t){for(var e,r=t.length,n=r%3,i="",a=[],o=16383,u=0,f=r-n;f>u;u+=o)a.push(s(t,u,u+o>f?f:u+o));return 1===n?(e=t[r-1],i+=h[e>>2],i+=h[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=h[e>>10],i+=h[e>>4&63],i+=h[e<<2&63],i+="="),a.push(i),a.join("")}r.toByteArray=i,r.fromByteArray=o;var h=[],u=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array;n()},{}],2:[function(t,e,r){(function(e){"use strict";function n(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function i(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(i()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=s.prototype):(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,r){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return f(this,t)}return o(this,t,e,r)}function o(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?_(t,e,r,n):"string"==typeof e?l(t,e,r):c(t,e)}function h(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number')}function u(t,e,r,n){return h(e),0>=e?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}function f(t,e){if(h(e),t=a(t,0>e?0:0|p(e)),!s.TYPED_ARRAY_SUPPORT)for(var r=0;e>r;++r)t[r]=0;return t}function l(t,e,r){if(("string"!=typeof r||""===r)&&(r="utf8"),!s.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|w(e,r);return t=a(t,n),t.write(e,r),t}function d(t,e){var r=0|p(e.length);t=a(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function _(t,e,r,n){if(e.byteLength,0>r||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),s.TYPED_ARRAY_SUPPORT?(t=e,t.__proto__=s.prototype):t=d(t,e),t}function c(t,e){if(s.isBuffer(e)){var r=0|p(e.length);return t=a(t,r),0===t.length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||J(e.length)?a(t,0):d(t,e);if("Buffer"===e.type&&Q(e.data))return d(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function p(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function g(t){return+t!=t&&(t=0),s.alloc(+t)}function w(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"binary":case"raw":case"raws":return r;case"utf8":case"utf-8":case void 0:return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Z(t).length;default:if(n)return H(t).length;e=(""+e).toLowerCase(),n=!0}}function v(t,e,r){var n=!1;if((void 0===e||0>e)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),0>=r)return"";if(r>>>=0,e>>>=0,e>=r)return"";for(t||(t="utf8");;)switch(t){case"hex":return U(this,e,r);case"utf8":case"utf-8":return R(this,e,r);case"ascii":return P(this,e,r);case"binary":return T(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n){function i(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,o=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,o/=2,r/=2}for(var h=-1,u=r;s>u;++u)if(i(t,u)===i(e,-1===h?0:u-h)){if(-1===h&&(h=u),u-h+1===o)return h*a}else-1!==h&&(u-=u-h),h=-1;return-1}function b(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var a=e.length;if(a%2!==0)throw new Error("Invalid hex string");n>a/2&&(n=a/2);for(var s=0;n>s;++s){var o=parseInt(e.substr(2*s,2),16);if(isNaN(o))return s;t[r+s]=o}return s}function A(t,e,r,n){return $(H(e,t.length-r),t,r,n)}function k(t,e,r,n){return $(V(e),t,r,n)}function z(t,e,r,n){return k(t,e,r,n)}function E(t,e,r,n){return $(Z(e),t,r,n)}function x(t,e,r,n){return $(X(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(e,r))}function R(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;r>i;){var a=t[i],s=null,o=a>239?4:a>223?3:a>191?2:1;if(r>=i+o){var h,u,f,l;switch(o){case 1:128>a&&(s=a);break;case 2:h=t[i+1],128===(192&h)&&(l=(31&a)<<6|63&h,l>127&&(s=l));break;case 3:h=t[i+1],u=t[i+2],128===(192&h)&&128===(192&u)&&(l=(15&a)<<12|(63&h)<<6|63&u,l>2047&&(55296>l||l>57343)&&(s=l));break;case 4:h=t[i+1],u=t[i+2],f=t[i+3],128===(192&h)&&128===(192&u)&&128===(192&f)&&(l=(15&a)<<18|(63&h)<<12|(63&u)<<6|63&f,l>65535&&1114112>l&&(s=l))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=o}return S(n)}function S(t){var e=t.length;if(W>=e)return String.fromCharCode.apply(String,t);for(var r="",n=0;e>n;)r+=String.fromCharCode.apply(String,t.slice(n,n+=W));return r}function P(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;++i)n+=String.fromCharCode(127&t[i]);return n}function T(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;++i)n+=String.fromCharCode(t[i]);return n}function U(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",a=e;r>a;++a)i+=q(t[a]);return i}function C(t,e,r){for(var n=t.slice(e,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function I(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function Y(t,e,r,n,i,a){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||a>e)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function L(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-r,2);a>i;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function M(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-r,4);a>i;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function O(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(0>r)throw new RangeError("Index out of range")}function D(t,e,r,n,i){return i||O(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),G.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,i){return i||O(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),G.write(t,e,r,n,52,8),r+8}function j(t){if(t=F(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function q(t){return 16>t?"0"+t.toString(16):t.toString(16)}function H(t,e){e=e||1/0;for(var r,n=t.length,i=null,a=[],s=0;n>s;++s){if(r=t.charCodeAt(s),r>55295&&57344>r){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(56320>r){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,128>r){if((e-=1)<0)break;a.push(r)}else if(2048>r){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function V(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}function X(t,e){for(var r,n,i,a=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,a.push(i),a.push(n);return a}function Z(t){return K.toByteArray(j(t))}function $(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t){return t!==t}var K=t("base64-js"),G=t("ieee754"),Q=t("isarray");r.Buffer=s,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:n(),r.kMaxLength=i(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,r){return o(null,t,e,r)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,r){return u(null,t,e,r)},s.allocUnsafe=function(t){return f(null,t)},s.allocUnsafeSlow=function(t){return f(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);a>i;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return n>r?-1:r>n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!Q(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},s.byteLength=w,s.prototype._isBuffer=!0,s.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;t>e;e+=2)y(this,e,e+1);return this},s.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;t>e;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?R(this,0,t):v.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,r,n,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),0>e||r>t.length||0>n||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 a=i-n,o=r-e,h=Math.min(a,o),u=this.slice(n,i),f=t.slice(e,r),l=0;h>l;++l)if(u[l]!==f[l]){a=u[l],o=f[l];break}return o>a?-1:a>o?1:0},s.prototype.indexOf=function(t,e,r){if("string"==typeof e?(r=e,e=0):e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:m(this,t,e,r);if("number"==typeof t)return s.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):m(this,[t],e,r);throw new TypeError("val must be string, number or Buffer")},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.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|e,isFinite(r)?(r=0|r,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&&(0>r||0>e)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return A(this,t,e,r);case"ascii":return k(this,t,e,r);case"binary":return z(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var W=4096;s.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),t>e&&(e=t);var n;if(s.TYPED_ARRAY_SUPPORT)n=this.subarray(t,e),n.__proto__=s.prototype;else{var i=e-t;n=new s(i,void 0);for(var a=0;i>a;++a)n[a]=this[a+t]}return n},s.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},s.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||I(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*e)),a},s.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),G.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),G.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),G.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),G.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;Y(this,t,e,r,i,0)}var a=1,s=0;for(this[e]=255&t;++s<r&&(a*=256);)this[e+s]=t/a&255;return e+r},s.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e=0|e,r=0|r,!n){var i=Math.pow(2,8*r)-1;Y(this,t,e,r,i,0)}var a=r-1,s=1;for(this[e+a]=255&t;--a>=0&&(s*=256);)this[e+a]=t/s&255;return e+r},s.prototype.writeUInt8=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);Y(this,t,e,r,i-1,-i)}var a=0,s=1,o=0;for(this[e]=255&t;++a<r&&(s*=256);)0>t&&0===o&&0!==this[e+a-1]&&(o=1),this[e+a]=(t/s>>0)-o&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);Y(this,t,e,r,i-1,-i)}var a=r-1,s=1,o=0;for(this[e+a]=255&t;--a>=0&&(s*=256);)0>t&&0===o&&0!==this[e+a+1]&&(o=1),this[e+a]=(t/s>>0)-o&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):L(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):L(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e=0|e,r||Y(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,r){return D(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return D(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&r>n&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>n)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,a=n-r;if(this===t&&e>r&&n>e)for(i=a-1;i>=0;--i)t[i+e]=this[i+r];else if(1e3>a||!s.TYPED_ARRAY_SUPPORT)for(i=0;a>i;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),e);return a},s.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),1===t.length){var i=t.charCodeAt(0);256>i&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t=255&t);if(0>e||this.length<e||this.length<r)throw new RangeError("Out of range index");if(e>=r)return this;e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0);var a;if("number"==typeof t)for(a=e;r>a;++a)this[a]=t;else{var o=s.isBuffer(t)?t:H(new s(t,n).toString()),h=o.length;for(a=0;r-e>a;++a)this[a+e]=o[a%h]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":1,ieee754:3,isarray:4}],3:[function(t,e,r){r.read=function(t,e,r,n,i){var a,s,o=8*i-n-1,h=(1<<o)-1,u=h>>1,f=-7,l=r?i-1:0,d=r?-1:1,_=t[e+l];for(l+=d,a=_&(1<<-f)-1,_>>=-f,f+=o;f>0;a=256*a+t[e+l],l+=d,f-=8);for(s=a&(1<<-f)-1,a>>=-f,f+=n;f>0;s=256*s+t[e+l],l+=d,f-=8);if(0===a)a=1-u;else{if(a===h)return s?NaN:(_?-1:1)*(1/0);s+=Math.pow(2,n),a-=u}return(_?-1:1)*s*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var s,o,h,u=8*a-i-1,f=(1<<u)-1,l=f>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,_=n?0:a-1,c=n?1:-1,p=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),e+=s+l>=1?d/h:d*Math.pow(2,1-l),e*h>=2&&(s++,h/=2),s+l>=f?(o=0,s=f):s+l>=1?(o=(e*h-1)*Math.pow(2,i),s+=l):(o=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+_]=255&o,_+=c,o/=256,i-=8);for(s=s<<i|o,u+=i;u>0;t[r+_]=255&s,_+=c,s/=256,u-=8);t[r+_-c]|=128*p}},{}],4:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],5:[function(t,e,r){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.options=h.assign({level:v,method:m,chunkSize:16384,windowBits:15,memLevel:8,strategy:y,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new l,this.strm.avail_out=0;var r=o.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==p)throw new Error(f[r]);if(e.header&&o.deflateSetHeader(this.strm,e.header),e.dictionary){var i;if(i="string"==typeof e.dictionary?u.string2buf(e.dictionary):"[object ArrayBuffer]"===d.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=o.deflateSetDictionary(this.strm,i),r!==p)throw new Error(f[r]);this._dict_set=!0}}function i(t,e){var r=new n(e);if(r.push(t,!0),r.err)throw r.msg;return r.result}function a(t,e){return e=e||{},e.raw=!0,i(t,e)}function s(t,e){return e=e||{},e.gzip=!0,i(t,e)}var o=t("./zlib/deflate"),h=t("./utils/common"),u=t("./utils/strings"),f=t("./zlib/messages"),l=t("./zlib/zstream"),d=Object.prototype.toString,_=0,c=4,p=0,g=1,w=2,v=-1,y=0,m=8;n.prototype.push=function(t,e){var r,n,i=this.strm,a=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:e===!0?c:_,"string"==typeof t?i.input=u.string2buf(t):"[object ArrayBuffer]"===d.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new h.Buf8(a),i.next_out=0,i.avail_out=a),r=o.deflate(i,n),r!==g&&r!==p)return this.onEnd(r),this.ended=!0,!1;(0===i.avail_out||0===i.avail_in&&(n===c||n===w))&&("string"===this.options.to?this.onData(u.buf2binstring(h.shrinkBuf(i.output,i.next_out))):this.onData(h.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&r!==g);return n===c?(r=o.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===p):n===w?(this.onEnd(p),i.avail_out=0,!0):!0},n.prototype.onData=function(t){this.chunks.push(t)},n.prototype.onEnd=function(t){t===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=n,r.deflate=i,r.deflateRaw=a,r.gzip=s},{"./utils/common":6,"./utils/strings":7,"./zlib/deflate":10,"./zlib/messages":11,"./zlib/zstream":13}],6:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;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)r.hasOwnProperty(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 i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)return void t.set(e.subarray(r,r+n),i);for(var a=0;n>a;a++)t[i+a]=e[r+a]},flattenChunks:function(t){var e,r,n,i,a,s;for(n=0,e=0,r=t.length;r>e;e++)n+=t[e].length;for(s=new Uint8Array(n),i=0,e=0,r=t.length;r>e;e++)a=t[e],s.set(a,i),i+=a.length;return s}},a={arraySet:function(t,e,r,n,i){for(var a=0;n>a;a++)t[i+a]=e[r+a]},flattenChunks:function(t){return[].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,a))},r.setTyped(n)},{}],7:[function(t,e,r){"use strict";function n(t,e){if(65537>e&&(t.subarray&&s||!t.subarray&&a))return String.fromCharCode.apply(null,i.shrinkBuf(t,e));for(var r="",n=0;e>n;n++)r+=String.fromCharCode(t[n]);return r}var i=t("./common"),a=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(o){a=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(o){s=!1}for(var h=new i.Buf8(256),u=0;256>u;u++)h[u]=u>=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;h[254]=h[254]=1,r.string2buf=function(t){var e,r,n,a,s,o=t.length,h=0;for(a=0;o>a;a++)r=t.charCodeAt(a),55296===(64512&r)&&o>a+1&&(n=t.charCodeAt(a+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),a++)),h+=128>r?1:2048>r?2:65536>r?3:4;for(e=new i.Buf8(h),s=0,a=0;h>s;a++)r=t.charCodeAt(a),55296===(64512&r)&&o>a+1&&(n=t.charCodeAt(a+1),56320===(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),a++)),128>r?e[s++]=r:2048>r?(e[s++]=192|r>>>6,e[s++]=128|63&r):65536>r?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e},r.buf2binstring=function(t){return n(t,t.length)},r.binstring2buf=function(t){for(var e=new i.Buf8(t.length),r=0,n=e.length;n>r;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,i,a,s,o=e||t.length,u=new Array(2*o);for(i=0,r=0;o>r;)if(a=t[r++],128>a)u[i++]=a;else if(s=h[a],s>4)u[i++]=65533,r+=s-1;else{for(a&=2===s?31:3===s?15:7;s>1&&o>r;)a=a<<6|63&t[r++],s--;s>1?u[i++]=65533:65536>a?u[i++]=a:(a-=65536,u[i++]=55296|a>>10&1023,u[i++]=56320|1023&a)}return n(u,i)},r.utf8border=function(t,e){var r;for(e=e||t.length,e>t.length&&(e=t.length),r=e-1;r>=0&&128===(192&t[r]);)r--;return 0>r?e:0===r?e:r+h[t[r]]>e?r:e}},{"./common":6}],8:[function(t,e,r){"use strict";function n(t,e,r,n){for(var i=65535&t|0,a=t>>>16&65535|0,s=0;0!==r;){s=r>2e3?2e3:r,r-=s;do i=i+e[n++]|0,a=a+i|0;while(--s);i%=65521,a%=65521}return i|a<<16|0}e.exports=n},{}],9:[function(t,e,r){"use strict";function n(){for(var t,e=[],r=0;256>r;r++){t=r;for(var n=0;8>n;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}function i(t,e,r,n){var i=a,s=n+r;t^=-1;for(var o=n;s>o;o++)t=t>>>8^i[255&(t^e[o])];return-1^t}var a=n();e.exports=i},{}],10:[function(t,e,r){"use strict";function n(t,e){return t.msg=I[e],e}function i(t){return(t<<1)-(t>4?9:0)}function a(t){for(var e=t.length;--e>=0;)t[e]=0}function s(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(P.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 o(t,e){T._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,s(t.strm)}function h(t,e){t.pending_buf[t.pending++]=e}function u(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function f(t,e,r,n){var i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,P.arraySet(e,t.input,t.next_in,i,r),1===t.state.wrap?t.adler=U(t.adler,e,i,r):2===t.state.wrap&&(t.adler=C(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)}function l(t,e){var r,n,i=t.max_chain_length,a=t.strstart,s=t.prev_length,o=t.nice_match,h=t.strstart>t.w_size-lt?t.strstart-(t.w_size-lt):0,u=t.window,f=t.w_mask,l=t.prev,d=t.strstart+ft,_=u[a+s-1],c=u[a+s];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do if(r=e,u[r+s]===c&&u[r+s-1]===_&&u[r]===u[a]&&u[++r]===u[a+1]){a+=2,r++;do;while(u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&d>a);if(n=ft-(d-a),a=d-ft,n>s){if(t.match_start=e,s=n,n>=o)break;_=u[a+s-1],c=u[a+s]}}while((e=l[e&f])>h&&0!==--i);return s<=t.lookahead?s:t.lookahead}function d(t){var e,r,n,i,a,s=t.w_size;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-lt)){P.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,r=t.hash_size,e=r;do n=t.head[--e],t.head[e]=n>=s?n-s:0;while(--r);r=s,e=r;do n=t.prev[--e],t.prev[e]=n>=s?n-s:0;while(--r);i+=s}if(0===t.strm.avail_in)break;if(r=f(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=r,t.lookahead+t.insert>=ut)for(a=t.strstart-t.insert,t.ins_h=t.window[a],t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[a+ut-1])&t.hash_mask,t.prev[a&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=a,a++,t.insert--,!(t.lookahead+t.insert<ut)););}while(t.lookahead<lt&&0!==t.strm.avail_in)}function _(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(d(t),0===t.lookahead&&e===Y)return mt;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,o(t,!1),0===t.strm.avail_out))return mt;if(t.strstart-t.block_start>=t.w_size-lt&&(o(t,!1),0===t.strm.avail_out))return mt}return t.insert=0,e===O?(o(t,!0),0===t.strm.avail_out?At:kt):t.strstart>t.block_start&&(o(t,!1),0===t.strm.avail_out)?mt:mt}function c(t,e){for(var r,n;;){if(t.lookahead<lt){if(d(t),t.lookahead<lt&&e===Y)return mt;if(0===t.lookahead)break}if(r=0,t.lookahead>=ut&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ut-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-lt&&(t.match_length=l(t,r)),t.match_length>=ut)if(n=T._tr_tally(t,t.strstart-t.match_start,t.match_length-ut),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=ut){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ut-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=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(o(t,!1),0===t.strm.avail_out))return mt}return t.insert=t.strstart<ut-1?t.strstart:ut-1,e===O?(o(t,!0),0===t.strm.avail_out?At:kt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?mt:bt}function p(t,e){for(var r,n,i;;){if(t.lookahead<lt){if(d(t),t.lookahead<lt&&e===Y)return mt;if(0===t.lookahead)break}if(r=0,t.lookahead>=ut&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+ut-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=ut-1,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-lt&&(t.match_length=l(t,r),t.match_length<=5&&(t.strategy===X||t.match_length===ut&&t.strstart-t.match_start>4096)&&(t.match_length=ut-1)),t.prev_length>=ut&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-ut,n=T._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-ut),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+ut-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=ut-1,t.strstart++,n&&(o(t,!1),0===t.strm.avail_out))return mt}else if(t.match_available){if(n=T._tr_tally(t,0,t.window[t.strstart-1]),n&&o(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return mt}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=T._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<ut-1?t.strstart:ut-1,e===O?(o(t,!0),0===t.strm.avail_out?At:kt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?mt:bt}function g(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=ft){if(d(t),t.lookahead<=ft&&e===Y)return mt;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=ut&&t.strstart>0&&(i=t.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){a=t.strstart+ft;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]&&a>i);t.match_length=ft-(a-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=ut?(r=T._tr_tally(t,1,t.match_length-ut),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(o(t,!1),0===t.strm.avail_out))return mt}return t.insert=0,e===O?(o(t,!0),0===t.strm.avail_out?At:kt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?mt:bt}function w(t,e){for(var r;;){if(0===t.lookahead&&(d(t),0===t.lookahead)){if(e===Y)return mt;break}if(t.match_length=0,r=T._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(o(t,!1),0===t.strm.avail_out))return mt}return t.insert=0,e===O?(o(t,!0),0===t.strm.avail_out?At:kt):t.last_lit&&(o(t,!1),0===t.strm.avail_out)?mt:bt}function v(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 y(t){t.window_size=2*t.w_size,a(t.head),t.max_lazy_match=S[t.level].max_lazy,t.good_match=S[t.level].good_length,t.nice_match=S[t.level].nice_length,t.max_chain_length=S[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ut-1,t.match_available=0,t.ins_h=0}function m(){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=Q,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 P.Buf16(2*ot),this.dyn_dtree=new P.Buf16(2*(2*at+1)),this.bl_tree=new P.Buf16(2*(2*st+1)),a(this.dyn_ltree),a(this.dyn_dtree),a(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new P.Buf16(ht+1),this.heap=new P.Buf16(2*it+1),a(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new P.Buf16(2*it+1),a(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}function b(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=G,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?_t:vt,t.adler=2===e.wrap?0:1,e.last_flush=Y,T._tr_init(e),N):n(t,F)}function A(t){var e=b(t);return e===N&&y(t.state),e}function k(t,e){return t&&t.state?2!==t.state.wrap?F:(t.state.gzhead=e,N):F}function z(t,e,r,i,a,s){if(!t)return F;var o=1;if(e===V&&(e=6),0>i?(o=0,i=-i):i>15&&(o=2,i-=16),1>a||a>W||r!==Q||8>i||i>15||0>e||e>9||0>s||s>J)return n(t,F);8===i&&(i=9);var h=new m;return t.state=h,h.strm=t,h.wrap=o,h.gzhead=null,h.w_bits=i,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=a+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+ut-1)/ut),h.window=new P.Buf8(2*h.w_size),h.head=new P.Buf16(h.hash_size),h.prev=new P.Buf16(h.w_size),h.lit_bufsize=1<<a+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new P.Buf8(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=s,h.method=r,A(t)}function E(t,e){return z(t,e,Q,tt,et,K)}function x(t,e){var r,o,f,l;if(!t||!t.state||e>D||0>e)return t?n(t,F):F;if(o=t.state,!t.output||!t.input&&0!==t.avail_in||o.status===yt&&e!==O)return n(t,0===t.avail_out?H:F);if(o.strm=t,r=o.last_flush,o.last_flush=e,o.status===_t)if(2===o.wrap)t.adler=0,h(o,31),h(o,139),h(o,8),o.gzhead?(h(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),h(o,255&o.gzhead.time),h(o,o.gzhead.time>>8&255),h(o,o.gzhead.time>>16&255),h(o,o.gzhead.time>>24&255),h(o,9===o.level?2:o.strategy>=Z||o.level<2?4:0),h(o,255&o.gzhead.os),o.gzhead.extra&&o.gzhead.extra.length&&(h(o,255&o.gzhead.extra.length),h(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(t.adler=C(t.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=ct):(h(o,0),h(o,0),h(o,0),h(o,0),h(o,0),h(o,9===o.level?2:o.strategy>=Z||o.level<2?4:0),h(o,zt),o.status=vt);else{var d=Q+(o.w_bits-8<<4)<<8,_=-1;_=o.strategy>=Z||o.level<2?0:o.level<6?1:6===o.level?2:3,d|=_<<6,0!==o.strstart&&(d|=dt),d+=31-d%31,o.status=vt,u(o,d),0!==o.strstart&&(u(o,t.adler>>>16),u(o,65535&t.adler)),t.adler=1}if(o.status===ct)if(o.gzhead.extra){for(f=o.pending;o.gzindex<(65535&o.gzhead.extra.length)&&(o.pending!==o.pending_buf_size||(o.gzhead.hcrc&&o.pending>f&&(t.adler=C(t.adler,o.pending_buf,o.pending-f,f)),s(t),f=o.pending,o.pending!==o.pending_buf_size));)h(o,255&o.gzhead.extra[o.gzindex]),o.gzindex++;o.gzhead.hcrc&&o.pending>f&&(t.adler=C(t.adler,o.pending_buf,o.pending-f,f)),o.gzindex===o.gzhead.extra.length&&(o.gzindex=0,o.status=pt)}else o.status=pt;if(o.status===pt)if(o.gzhead.name){f=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>f&&(t.adler=C(t.adler,o.pending_buf,o.pending-f,f)),s(t),f=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.name.length?255&o.gzhead.name.charCodeAt(o.gzindex++):0,h(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>f&&(t.adler=C(t.adler,o.pending_buf,o.pending-f,f)),0===l&&(o.gzindex=0,o.status=gt)}else o.status=gt;if(o.status===gt)if(o.gzhead.comment){f=o.pending;do{if(o.pending===o.pending_buf_size&&(o.gzhead.hcrc&&o.pending>f&&(t.adler=C(t.adler,o.pending_buf,o.pending-f,f)),s(t),f=o.pending,o.pending===o.pending_buf_size)){l=1;break}l=o.gzindex<o.gzhead.comment.length?255&o.gzhead.comment.charCodeAt(o.gzindex++):0,h(o,l)}while(0!==l);o.gzhead.hcrc&&o.pending>f&&(t.adler=C(t.adler,o.pending_buf,o.pending-f,f)),0===l&&(o.status=wt)}else o.status=wt;if(o.status===wt&&(o.gzhead.hcrc?(o.pending+2>o.pending_buf_size&&s(t),o.pending+2<=o.pending_buf_size&&(h(o,255&t.adler),h(o,t.adler>>8&255),t.adler=0,o.status=vt)):o.status=vt),0!==o.pending){if(s(t),0===t.avail_out)return o.last_flush=-1,N}else if(0===t.avail_in&&i(e)<=i(r)&&e!==O)return n(t,H);if(o.status===yt&&0!==t.avail_in)return n(t,H);if(0!==t.avail_in||0!==o.lookahead||e!==Y&&o.status!==yt){var c=o.strategy===Z?w(o,e):o.strategy===$?g(o,e):S[o.level].func(o,e);if((c===At||c===kt)&&(o.status=yt),c===mt||c===At)return 0===t.avail_out&&(o.last_flush=-1),N;if(c===bt&&(e===L?T._tr_align(o):e!==D&&(T._tr_stored_block(o,0,0,!1),e===M&&(a(o.head),0===o.lookahead&&(o.strstart=0,o.block_start=0,o.insert=0))),s(t),0===t.avail_out))return o.last_flush=-1,N}return e!==O?N:o.wrap<=0?j:(2===o.wrap?(h(o,255&t.adler),h(o,t.adler>>8&255),h(o,t.adler>>16&255),h(o,t.adler>>24&255),h(o,255&t.total_in),h(o,t.total_in>>8&255),h(o,t.total_in>>16&255),h(o,t.total_in>>24&255)):(u(o,t.adler>>>16),u(o,65535&t.adler)),s(t),o.wrap>0&&(o.wrap=-o.wrap),0!==o.pending?N:j)}function B(t){var e;return t&&t.state?(e=t.state.status,e!==_t&&e!==ct&&e!==pt&&e!==gt&&e!==wt&&e!==vt&&e!==yt?n(t,F):(t.state=null,e===vt?n(t,q):N)):F}function R(t,e){var r,n,i,s,o,h,u,f,l=e.length;if(!t||!t.state)return F;if(r=t.state,s=r.wrap,2===s||1===s&&r.status!==_t||r.lookahead)return F;for(1===s&&(t.adler=U(t.adler,e,l,0)),r.wrap=0,l>=r.w_size&&(0===s&&(a(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new P.Buf8(r.w_size),P.arraySet(f,e,l-r.w_size,r.w_size,0),e=f,l=r.w_size),o=t.avail_in,h=t.next_in,u=t.input,t.avail_in=l,t.next_in=0,t.input=e,d(r);r.lookahead>=ut;){n=r.strstart,i=r.lookahead-(ut-1);do r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+ut-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++;while(--i);r.strstart=n,r.lookahead=ut-1,d(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=ut-1,r.match_available=0,t.next_in=h,t.input=u,t.avail_in=o,r.wrap=s,N}var S,P=t("../utils/common"),T=t("./trees"),U=t("./adler32"),C=t("./crc32"),I=t("./messages"),Y=0,L=1,M=3,O=4,D=5,N=0,j=1,F=-2,q=-3,H=-5,V=-1,X=1,Z=2,$=3,J=4,K=0,G=2,Q=8,W=9,tt=15,et=8,rt=29,nt=256,it=nt+1+rt,at=30,st=19,ot=2*it+1,ht=15,ut=3,ft=258,lt=ft+ut+1,dt=32,_t=42,ct=69,pt=73,gt=91,wt=103,vt=113,yt=666,mt=1,bt=2,At=3,kt=4,zt=3;S=[new v(0,0,0,0,_),new v(4,4,8,4,c),new v(4,5,16,8,c),new v(4,6,32,32,c),new v(4,4,16,16,p),new v(8,16,32,32,p),new v(8,16,128,128,p),new v(8,32,128,256,p),new v(32,128,258,1024,p),new v(32,258,258,4096,p)],r.deflateInit=E,r.deflateInit2=z,r.deflateReset=A,r.deflateResetKeep=b,r.deflateSetHeader=k,r.deflate=x,r.deflateEnd=B,r.deflateSetDictionary=R,r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":6,"./adler32":8,"./crc32":9,"./messages":11,"./trees":12}],11:[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"}},{}],12:[function(t,e,r){"use strict";function n(t){for(var e=t.length;--e>=0;)t[e]=0}function i(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 a(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function s(t){return 256>t?ht[t]:ht[256+(t>>>7)]}function o(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function h(t,e,r){t.bi_valid>J-r?(t.bi_buf|=e<<t.bi_valid&65535,o(t,t.bi_buf),t.bi_buf=e>>J-t.bi_valid,t.bi_valid+=r-J):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function u(t,e,r){h(t,r[2*e],r[2*e+1])}function f(t,e){var r=0;do r|=1&t,t>>>=1,r<<=1;while(--e>0);return r>>>1}function l(t){16===t.bi_valid?(o(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)}function d(t,e){var r,n,i,a,s,o,h=e.dyn_tree,u=e.max_code,f=e.stat_desc.static_tree,l=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,_=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(a=0;$>=a;a++)t.bl_count[a]=0;for(h[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;Z>r;r++)n=t.heap[r],a=h[2*h[2*n+1]+1]+1,a>c&&(a=c,p++),h[2*n+1]=a,n>u||(t.bl_count[a]++,s=0,n>=_&&(s=d[n-_]),o=h[2*n],t.opt_len+=o*(a+s),l&&(t.static_len+=o*(f[2*n+1]+s)));if(0!==p){do{for(a=c-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(a=c;0!==a;a--)for(n=t.bl_count[a];0!==n;)i=t.heap[--r],i>u||(h[2*i+1]!==a&&(t.opt_len+=(a-h[2*i+1])*h[2*i],h[2*i+1]=a),n--)}}function _(t,e,r){var n,i,a=new Array($+1),s=0;for(n=1;$>=n;n++)a[n]=s=s+r[n-1]<<1;for(i=0;e>=i;i++){var o=t[2*i+1];0!==o&&(t[2*i]=f(a[o]++,o))}}function c(){var t,e,r,n,a,s=new Array($+1);for(r=0,n=0;F-1>n;n++)for(ft[n]=r,t=0;t<1<<et[n];t++)ut[r++]=n;for(ut[r-1]=n,a=0,n=0;16>n;n++)for(lt[n]=a,t=0;t<1<<rt[n];t++)ht[a++]=n;for(a>>=7;V>n;n++)for(lt[n]=a<<7,t=0;t<1<<rt[n]-7;t++)ht[256+a++]=n;for(e=0;$>=e;e++)s[e]=0;for(t=0;143>=t;)st[2*t+1]=8,t++,s[8]++;for(;255>=t;)st[2*t+1]=9,t++,s[9]++;for(;279>=t;)st[2*t+1]=7,t++,s[7]++;for(;287>=t;)st[2*t+1]=8,t++,s[8]++;for(_(st,H+1,s),t=0;V>t;t++)ot[2*t+1]=5,ot[2*t]=f(t,5);dt=new i(st,et,q+1,H,$),_t=new i(ot,rt,0,V,$),ct=new i(new Array(0),nt,0,X,K)}function p(t){var e;for(e=0;H>e;e++)t.dyn_ltree[2*e]=0;for(e=0;V>e;e++)t.dyn_dtree[2*e]=0;for(e=0;X>e;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*G]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function g(t){t.bi_valid>8?o(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 w(t,e,r,n){g(t),n&&(o(t,r),o(t,~r)),U.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}function v(t,e,r,n){var i=2*e,a=2*r;return t[i]<t[a]||t[i]===t[a]&&n[e]<=n[r]}function y(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&v(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!v(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function m(t,e,r){var n,i,a,o,f=0;if(0!==t.last_lit)do n=t.pending_buf[t.d_buf+2*f]<<8|t.pending_buf[t.d_buf+2*f+1],i=t.pending_buf[t.l_buf+f],f++,0===n?u(t,i,e):(a=ut[i],u(t,a+q+1,e),o=et[a],0!==o&&(i-=ft[a],h(t,i,o)),n--,a=s(n),u(t,a,r),o=rt[a],0!==o&&(n-=lt[a],h(t,n,o)));while(f<t.last_lit);u(t,G,e)}function b(t,e){var r,n,i,a=e.dyn_tree,s=e.stat_desc.static_tree,o=e.stat_desc.has_stree,h=e.stat_desc.elems,u=-1;for(t.heap_len=0,t.heap_max=Z,r=0;h>r;r++)0!==a[2*r]?(t.heap[++t.heap_len]=u=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)i=t.heap[++t.heap_len]=2>u?++u:0,a[2*i]=1,t.depth[i]=0,t.opt_len--,o&&(t.static_len-=s[2*i+1]);for(e.max_code=u,r=t.heap_len>>1;r>=1;r--)y(t,a,r);i=h;do r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],y(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,y(t,a,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],d(t,e),_(a,u,t.bl_count)}function A(t,e,r){var n,i,a=-1,s=e[1],o=0,h=7,u=4;for(0===s&&(h=138,u=3),e[2*(r+1)+1]=65535,n=0;r>=n;n++)i=s,s=e[2*(n+1)+1],++o<h&&i===s||(u>o?t.bl_tree[2*i]+=o:0!==i?(i!==a&&t.bl_tree[2*i]++,t.bl_tree[2*Q]++):10>=o?t.bl_tree[2*W]++:t.bl_tree[2*tt]++,o=0,a=i,0===s?(h=138,u=3):i===s?(h=6,u=3):(h=7,u=4))}function k(t,e,r){var n,i,a=-1,s=e[1],o=0,f=7,l=4;for(0===s&&(f=138,l=3),n=0;r>=n;n++)if(i=s,s=e[2*(n+1)+1],!(++o<f&&i===s)){if(l>o){do u(t,i,t.bl_tree);while(0!==--o)}else 0!==i?(i!==a&&(u(t,i,t.bl_tree),o--),u(t,Q,t.bl_tree),h(t,o-3,2)):10>=o?(u(t,W,t.bl_tree),h(t,o-3,3)):(u(t,tt,t.bl_tree),h(t,o-11,7));o=0,a=i,0===s?(f=138,l=3):i===s?(f=6,l=3):(f=7,l=4)}}function z(t){var e;for(A(t,t.dyn_ltree,t.l_desc.max_code),A(t,t.dyn_dtree,t.d_desc.max_code),b(t,t.bl_desc),e=X-1;e>=3&&0===t.bl_tree[2*it[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function E(t,e,r,n){var i;for(h(t,e-257,5),h(t,r-1,5),h(t,n-4,4),i=0;n>i;i++)h(t,t.bl_tree[2*it[i]+1],3);k(t,t.dyn_ltree,e-1),k(t,t.dyn_dtree,r-1)}function x(t){var e,r=4093624447;for(e=0;31>=e;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return I;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return Y;for(e=32;q>e;e++)if(0!==t.dyn_ltree[2*e])return Y;return I}function B(t){pt||(c(),pt=!0),t.l_desc=new a(t.dyn_ltree,dt),t.d_desc=new a(t.dyn_dtree,_t),t.bl_desc=new a(t.bl_tree,ct),t.bi_buf=0,t.bi_valid=0,p(t)}function R(t,e,r,n){h(t,(M<<1)+(n?1:0),3),w(t,e,r,!0)}function S(t){h(t,O<<1,3),u(t,G,st),l(t)}function P(t,e,r,n){var i,a,s=0;t.level>0?(t.strm.data_type===L&&(t.strm.data_type=x(t)),b(t,t.l_desc),b(t,t.d_desc),s=z(t),i=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,i>=a&&(i=a)):i=a=r+5,i>=r+4&&-1!==e?R(t,e,r,n):t.strategy===C||a===i?(h(t,(O<<1)+(n?1:0),3),m(t,st,ot)):(h(t,(D<<1)+(n?1:0),3),E(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),m(t,t.dyn_ltree,t.dyn_dtree)),p(t),n&&g(t)}function T(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*(ut[r]+q+1)]++,t.dyn_dtree[2*s(e)]++),t.last_lit===t.lit_bufsize-1}var U=t("../utils/common"),C=4,I=0,Y=1,L=2,M=0,O=1,D=2,N=3,j=258,F=29,q=256,H=q+1+F,V=30,X=19,Z=2*H+1,$=15,J=16,K=7,G=256,Q=16,W=17,tt=18,et=[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],rt=[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],nt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],it=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],at=512,st=new Array(2*(H+2));n(st);var ot=new Array(2*V);n(ot);var ht=new Array(at);n(ht);var ut=new Array(j-N+1);n(ut);var ft=new Array(F);n(ft);var lt=new Array(V);n(lt);var dt,_t,ct,pt=!1;r._tr_init=B,r._tr_stored_block=R,r._tr_flush_block=P,r._tr_tally=T,r._tr_align=S},{"../utils/common":6}],13:[function(t,e,r){"use strict";function n(){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}e.exports=n},{}],14:[function(t,e,r){e.exports=t("./lib/urlsafe-base64")},{"./lib/urlsafe-base64":15}],15:[function(t,e,r){(function(t){r.version="1.0.0",r.encode=function(t){return t.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},r.decode=function(e){return e+=Array(5-e.length%4).join("="),e=e.replace(/\-/g,"+").replace(/\_/g,"/"),new t(e,"base64")},r.validate=function(t){return/^[A-Za-z0-9\-_]+$/.test(t)}}).call(this,t("buffer").Buffer)},{buffer:2}],16:[function(t,e,r){function n(t){y&&(window.clearTimeout(y),y=null),g.textContent=t}function i(){g.textContent=""}function a(t){var e=f(t,{to:"string"}),r=window.btoa(e),n=l(r);return n}function s(t,e){c&&c.id&&window.parent.postMessage({topic:t,id:c.id,payload:e},"*")}function o(t){t&&(t.metadata||(t.metadata={}),t.metadata.widget="userhtml",c=t,(t.text||t.metadata.text)&&(p.value=t.text||t.metadata.text),(t.height||t.metadata.height)&&(w.value=t.height||t.metadata.height),u())}function h(t){if(c&&c.metadata){n("saving...");var e=p.value,r=parseInt(w.value,10);r=Math.min(5e3,Math.max(1,r));var o=a(e);c.text=e,c.metadata.text=e,c.height=r,c.metadata.height=r;var h=d+o;if(h.length>_)return void n("error: input too long");c.metadata.isBasedOnUrl=h,c.html='<iframe src="'+h+'" height="'+r+'"></iframe>',y=setTimeout(i,1e3),s("changed",c),u()}}function u(){p.style.height="auto";var t=p.scrollHeight;p.style.height=t+"px",t+=30,t!==v&&(v=t,s("height",t))}var f=t("pako/lib/deflate").deflate,l=t("urlsafe-base64").encode,d="https://the-grid.github.io/ed-userhtml/?g=",_=2e3,c=null,p=document.getElementById("textarea"),g=document.getElementById("status"),w=document.getElementById("height"),v=0,y=null;p.addEventListener("input",h),w.addEventListener("input",h),window.addEventListener("message",function(t){switch(t.data.topic){case"setblock":var e=t.data.payload;o(e);break;case"focus":p.focus()}})},{"pako/lib/deflate":5,"urlsafe-base64":14}]},{},[16]); |
{ | ||
"name": "@the-grid/ed-userhtml", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "Ed widget for user html", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,2 +10,3 @@ var deflate = require('pako/lib/deflate').deflate | ||
var status = document.getElementById('status') | ||
var heightInput = document.getElementById('height') | ||
var cachedHeight = 0 | ||
@@ -51,5 +52,8 @@ var hideStatusTimeout = null | ||
cachedBlock = block | ||
if (block.hasOwnProperty('text')) { | ||
textarea.value = block.text | ||
if (block.text || block.metadata.text) { | ||
textarea.value = block.text || block.metadata.text | ||
} | ||
if (block.height || block.metadata.height) { | ||
heightInput.value = block.height || block.metadata.height | ||
} | ||
resize() | ||
@@ -63,6 +67,12 @@ } | ||
var text = event.target.value | ||
var text = textarea.value | ||
var height = parseInt(heightInput.value, 10) | ||
height = Math.min(5000, Math.max(1, height)) | ||
var b64 = b64ify(text) | ||
cachedBlock.text = text | ||
cachedBlock.metadata.text = text | ||
cachedBlock.height = height | ||
cachedBlock.metadata.height = height | ||
var url = RUNNER + b64 | ||
@@ -74,3 +84,3 @@ if (url.length > MAX_URL_LENGTH) { | ||
cachedBlock.metadata.isBasedOnUrl = url | ||
cachedBlock.html = '<iframe src="'+url+'"></iframe>' | ||
cachedBlock.html = '<iframe src="'+url+'" height="'+height+'"></iframe>' | ||
@@ -83,2 +93,3 @@ hideStatusTimeout = setTimeout(hideStatus, 1000) | ||
textarea.addEventListener('input', fromEdit) | ||
heightInput.addEventListener('input', fromEdit) | ||
@@ -88,4 +99,4 @@ function resize () { | ||
var height = textarea.scrollHeight | ||
// Padding is 2px, so minus 4 | ||
textarea.style.height = (height - 4) + 'px' | ||
textarea.style.height = height + 'px' | ||
height += 30 | ||
if (height !== cachedHeight) { | ||
@@ -92,0 +103,0 @@ cachedHeight = height |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
107845
505