-
-
Notifications
You must be signed in to change notification settings - Fork 162
/
Copy pathmain.js
19 lines (19 loc) · 202 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=33)}([function(e,t){e.exports=require("uxp")},function(e,t,n){"use strict";(function(e){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var r=n(35),i=n(36),o=n(22);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return u(this,e,t,n)}function u(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|d(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(c(t),e=s(e,t<0?0:0|d(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|d(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return L(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;o<s;o++)if(u(e,o)===u(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var f=!0,h=0;h<l;h++)if(u(e,o+h)!==u(t,h)){f=!1;break}if(f)return o}return-1}function w(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function _(e,t,n,r){return Z(B(t,e.length-n),e,n,r)}function v(e,t,n,r){return Z(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return v(e,t,n,r)}function E(e,t,n,r){return Z(j(t),e,n,r)}function k(e,t,n,r){return Z(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,l,u=e[i],c=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=n)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return u(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return f(null,e)},l.allocUnsafeSlow=function(e){return f(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},l.byteLength=p,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):g.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),u=this.slice(r,i),c=e.slice(t,n),f=0;f<s;++f)if(u[f]!==c[f]){o=u[f],a=c[f];break}return o<a?-1:a<o?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function L(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function T(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=M(e[o]);return i}function I(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function R(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function F(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function D(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function z(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function N(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function U(e,t,n,r,o){return o||N(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,o){return o||N(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;n=new l(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||F(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||F(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):z(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);F(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);F(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):z(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||F(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return U(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return U(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},l.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=l.isBuffer(e)?e:B(new l(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var C=/[^+\/0-9A-Za-z-_]/g;function M(e){return e<16?"0"+e.toString(16):e.toString(16)}function B(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function j(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(C,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Z(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(3))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,u=[],c=!1,f=-1;function h(){c&&l&&(c=!1,l.length?u=l.concat(u):f=-1,u.length&&d())}function d(){if(!c){var e=s(h);c=!0;for(var t=u.length;t;){for(l=u,u=[];++f<t;)l&&l[f].run();f=-1,t=u.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new p(e,t)),1!==u.length||c||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(11),i=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=Object.create(n(7));o.inherits=n(5);var a=n(24),s=n(16);o.inherits(f,a);for(var l=i(s.prototype),u=0;u<l.length;u++){var c=l[u];f.prototype[c]||(f.prototype[c]=s.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);a.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t){e.exports=require("application")},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(1).Buffer)},function(e,t,n){"use strict";const r=n(0).storage.localFileSystem;let i=n(6);const{Artboard:o}=n(20);e.exports=class{static uuidv4(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0,n="x"==e?t:3&t|8;return n.toString(16)}))}static debugLog(e){console.log("io.proto.sync",e)}static async exportOptions(){const e=await r.getDataFolder();let t=null,n={scale:1,singleLayer:!1,prefix:!0,interactions:!0,advancedOptions:!0};try{t=await e.getEntry(i.activeDocument.guid+".json");const r=await t.read();n=JSON.parse(r)}catch(r){this.debugLog(r),t=await e.createEntry(i.activeDocument.guid+".json",{overwrite:!0}),await t.write(JSON.stringify(n))}return n}static findArtboards(e){let t=[];return e.forEach((e,n)=>{let r=this.getSelectedArtboard(e);if(null===r)return;t.find(e=>e.guid==r.guid)||t.push(r)}),t}static getSelectedArtboard(e){return null===e?null:this.isArtboard(e)?e:this.getSelectedArtboard(e.parent)}static isArtboard(e){return e instanceof o}static layerHasChildren(e){return"SymbolInstance"===e.constructor.name||"Group"===e.constructor.name||"RepeatGrid"===e.constructor.name}static getIsGroup(e,t,n){return!this.layerHasChildren(e)||t||e.mask||n&&(!n||"@"===e.name[0])?"0":"1"}static getLayerOpacity(e,t){if(this.layerHasChildren(e))return t&&"@"===e.name[0]?"0":e.opacity}}},function(e,t,n){e.exports=i;var r=n(10).EventEmitter;function i(){r.call(this)}n(5)(i,r),i.Readable=n(15),i.Writable=n(46),i.Duplex=n(47),i.Transform=n(48),i.PassThrough=n(49),i.Stream=i,i.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function u(e){if(c(),0===r.listenerCount(this,"error"))throw e}function c(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",u),e.removeListener("error",u),n.removeListener("end",c),n.removeListener("close",c),e.removeListener("close",c)}return n.on("error",u),e.on("error",u),n.on("end",c),n.on("close",c),e.on("close",c),e.emit("pipe",n),e}},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,n,r){var i,o,a,s;if(u(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),a=o[t]),void 0===a)a=o[t]=n,++e._eventsCount;else if("function"==typeof a?a=o[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,s=l,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function p(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function g(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");l=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var u=l.length,c=m(l,u);for(n=0;n<u;++n)o(c[n],this,t)}return!0},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){return u(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,o,a;if(u(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,r)}));case 4:return t.nextTick((function(){e.call(null,n,r,i)}));default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return t.nextTick((function(){e.apply(null,o)}))}}}:e.exports=t}).call(this,n(2))},function(e,t,n){var r=n(1),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)i(n,r)&&(e[r]=n[r])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){var t,n,r,i,o,a;for(r=0,t=0,n=e.length;t<n;t++)r+=e[t].length;for(a=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)o=e[t],a.set(o,i),i+=o.length;return a}},a={arraySet:function(e,t,n,r,i){for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(r)},function(e,t,n){"use strict";e.exports=class{constructor(e=300){this.name="Default",this.width=e,this.formTypes={Loading:"loading",LayersNotSelected:"layersNotSelected",GetConfirmDialog:"getConfirmDialog"}}constructForm(e){let t="";switch(e){case"getConfirmDialog":this.width=330,t=this.getConfirmDialog();break;case"loading":t=this.getLoaderHtml();break;case"exportOptions":this.width=330,t=this.getOptionsHtml();break;default:t=""}return t=`\n ${this.getStyles()}\n <dialog id="dialog">\n <form method="dialog">\n ${t}\n </form>\n </dialog>`,t}getNoSelectedArtboardsHtml(){return'\n <style>\n .div-left {\n width: 48px;\n }\n .div-wrapper {\n height: 80px;\n }\n </style>\n <div class="div-wrapper">\n <div class="div-left">\n <img id="logo" src="./assets/images/warning.png" width="48" height="42" />\n </div>\n <div class="div-right">\n <h2 class="title-warning-icon">No artboards selected</h2>\n <p>Please select at least one artboard to export to Proto.io</p>\n </div>\n </div>\n <footer>\n <button id="ok" type = "submit" uxp-variant="cta">Ok, got it</button>\n </footer>\n '}getDialogStyle(){return"\n <style>\n h1{\n align-items: center;\n justify-content: space-between;\n display: flex;\n flex-direction: row;\n }\n #header{\n color: #323232;\n }\n #dialog form {\n width: 359px;\n h2eight: 151px;\n }\n .group{\n padding: 6px;\n }\n .icon {\n border-radius: 4px;\n width: 24px;\n height: 24px;\n }\n .group .border-area-text{ \n display: flex; \n flex-direction: row; \n justify-content: flex-start;\n flex-wrap: wrap; \n }\n .small-title{\n margin-bottom: 7px;\n }\n .text-msg{\n margin-bottom: 5px;\n }\n #cancel{\n margin-top: 20px\n }\n </style>\n "}getLoaderHtml(){return`\n ${this.getDialogStyle()} \n \n <div class="group">\n <div class="row">\n <img id="logo" src="./assets/images/[email protected]" class="icon" />\n <h1 class = 'border-area-text'>Export Artboards</h1>\n </div>\n \n <hr/ >\n \n <div> \n <div class = "row small-title">\n <h2 id="header">Exporting</h2>\n </div>\n <p id="msg"class="text-msg div-right">artboard 1 of 10</p>\n <div id="outer-loader">\n <div id="inner-loader"></div>\n </div> \n </div>\n </div>\n <footer>\n <button id="cancel" type="submit" uxp-variant = "cta">Cancel</button>\n </footer>\n `}getPanel(){return`\n ${this.getPanelStyles()} \n <form method = "dialog" id = "mainpanel" name = "pluginPanel" xmlns="http://www.w3.org/1999/html"> \n\n <div class="group-section">\n <span class="title">EXPORT</span>\n </div>\n \n <div class="group-area">\n <span class="title">Select artboards to export</span>\n </div>\n \n <div class="section-area">\n <span id="countOfSelections" class="primary-font">No artboards selected</span>\n </div>\n \n <hr class="line-space"/>\n \n <div class="row flex start group-section">\n <span class="title">Export Density</span>\n <div class="tooltip group-area row">\n <img class="tooltip group-areaa img2" id = "logo" src = "./assets/images/info.svg"/> \n <div class="tooltip-text">\n <div class="tip-for-scale">Increase density for higher resolution images</div> \n </div>\n </div>\n </div>\n \n <label class = "row flex start drop-down" style="height: 20px">\n <select id = "scale">\n <option value="1" selected>1x</option>\n <option value="2">2x</option>\n <option value="3">3x</option>\n </select>\n </label>\n\n <div class="row flex start">\n <span class="title">Prototype Interactions</span>\n <div class="tooltip group-section row">\n <img class="tooltip img2" id = "logo" src = "./assets/images/info.svg"/> \n <div class="tooltip-text">\n <div class="tip-for-flows">Prototype interactions that are supported in Proto.io will be transferred.</div> \n </div>\n </div>\n </div>\n <div class="group-section">\n <label for='interactions' class="row border-area-text ">\n <input type="checkbox" id="interactions" name="interactions" class="checkbox-item"/>\n <label class="checkText">\n <span class="primary-font">Include interactions</span>\n </label>\n </label>\n </div> \n \n <div class="advanced">\n <label for='advanced' class="row">\n <img style="" id = "arrow" src = "./assets/images/arrow.svg"/> \n <input type="checkbox" id="advanced" name="advancedSettings" style="display: none"/>\n <label class="radioText">\n <span id="c1ountOfSelections" class="title">Advanced Settings</span>\n </label>\n </label>\n </div> \n \n <div id="radiosButtonsCollection" class="group-area" style="display: none">\n <label for='singlelayer' class="row flex border-area-text">\n <input type="radio" id="singlelayer" name="singleLayer" class="radio" value="single-layer"/> \n <span for="exportArtboardsOption" class=" radioText primary-font">Export each artboard as a single image</span>\n </label>\n \n <label for='multilayer' class="row border-area-text" id="radio-selected">\n <input type="radio" id="multilayer" checked="true" name="singleLayer" class="checkbox-item" value="multiple-layers"/>\n <span id="c1ountOfSelections" class="radioText primary-font">Export each layer as an individual image</span>\n </label>\n \n <div class="prefix-area" id="prefixedOption">\n <label for='prefix' class="row border-area-text">\n <input type="checkbox" id="prefix" name="useprefix"/>\n <label>\n <span class="checkText primary-font">Export groups prefixed with '@' as single images</span>\n </label>\n </label>\n \n </div>\n </div>\n \n <hr class="line-space"/>\n \n <a class="row new-tip" style="text-decoration: none" href="https://protoio.zendesk.com/hc/en-us/articles/360041064031">\n <img src = "./assets/images/tip-icon.svg"/>\n <span class="hyperlink">Tips for best performance</span>\n </a>\n \n <button id = "export" type = "submit" uxp-variant = "cta">Export</button>\n \n \n </form>\n `}g2etPanel(){return`\n ${this.getStylesPanel()} \n <form method = "dialog" id = "mainpanel" name = "pluginPanel" xmlns="http://www.w3.org/1999/html">\n \n <div class="group-area">\n <span class="main-title basicFont">EXPORT</span>\n </div>\n \n <div class="group-area">\n <span class="title basicFont">Select artboards to export</span>\n <span id="countOfSelections" class="checkText secondaryFont span-space" >No artboards selected</span>\n </div>\n \n \n <hr class="line-space"/>\n \n <div class="group-area" style="margin-top: 20px">\n <div class="r2ow start flex">\n <span class="title basicFont" style="margin-bottom: 5px">Export Density</span>\n <div class="tooltip group-area" >\n <img class="img1" id = "logo" src = "assets/images/info.svg"/> \n <div class="tooltip-text border-area-text" style="width:139px"> \n <div class="tip-for-scale"><span>Increase density for </span><span>higher resolution images</span></div>\n </div>\n </div>\n </div>\n <label class = "row flex start" style="height: 20px">\n <select id = "scale" style="margin-left: 2px">\n <option value="1" selected>1x</option>\n <option value="2">2x</option>\n <option value="3">3x</option>\n </select>\n </label>\n </div>\n \n <div class="group-area" style="margin-top: 20px">\n <div class="row">\n <span class="title basicFont">Prototype Interactions</span>\n <div class="tooltip group-area">\n <img class="img2" id = "logo" src = "./assets/images/info.svg"/> \n <div class="tooltip-text" style="width:180px;">\n <div class="tip-for-flows">Prototype interactions that are supported in Proto.io will be transferred.</div> \n </div>\n </div>\n </div>\n <label for='interactions' class="row border-area-text">\n <input type="checkbox" id="interactions" name="interactions" class="checkBox"/>\n <span class="checkText secondaryFont">Include interactions</span>\n </label>\n </div>\n \n <div class="group-area" style="margin-top:22px;">\n <div class="group-area">\n <label for='advanced' class="row border-area-text">\n <img style="margin-left: 5px;margin-right: 4px" id = "arrow" src = "./assets/images/arrow.svg"/> \n <input type="checkbox" id="advanced" name="advancedSettings" class="checkBox" style="display: none"/>\n <span class="checkText basicFont">Advanced Settings</span>\n </label>\n </div>\n \n <div id="radiosButtonsCollection" class="group-area" style="display: none">\n <label for='singlelayer' class="row border-area-text">\n <input type="radio" id="singlelayer" name="singleLayer" value="true"/>\n <span for="exportArtboardsOption" class=" checkText secondaryFont">Export each artboard as a single image</span>\n </label>\n \n <label for='multilayer' class="row border-area-text" id="radio-selected">\n <input type="radio" id="multilayer" checked="true" name="singleLayer" value="false"/>\n <span id="c1ountOfSelections" class="checkText secondaryFont">Export each layer as an individual image</span>\n </label>\n \n <div class="g2roup-area" style = "margin-left:20px;margin-top:6px;" id="prefixedOption">\n <label for='prefix' class="row border-area-text">\n <input type="checkbox" id="prefix" name="useprefix" class="checkBox"/>\n <span class="checkText secondaryFont">Export groups prefixed with '@' as single images</span>\n </label>\n </div>\n \n </div>\n </div>\n \n <hr />\n\n <a class="row new-tip group-area tip" href="https://protoio.zendesk.com/hc/en-us/articles/360041064031">\n <img src = "./assets/images/tip-icon.svg"/>\n <span class="hyperlink">Tips for best performance</span>\n </a>\n \n <button id = "export" type = "submit" uxp-variant = "cta">Export</button>\n \n \n \n </form>\n `}getPanelStyles(){return"\n <style>\n #export{\n display: block;\n width: 100%;\n margin: 0px;\n }\n .advanced {\n margin-bottom: 10px;\n }\n .title{\n color: rgb(142, 142, 142);\n font-family: SFUIText-Regular;\n font-size: 10px;\n font-weight: normal;\n }\n .primary-font{\n color: rgb(63, 63, 63);\n font-family: SFUIText-Regular;\n font-size: 11px;\n font-weight: normal;\n }\n .group-section{\n margin: 0px 0px 10px 0px; \n }\n .group-section img{\n margin-left: 8px;\n }\n .group-area{\n margin: 0px 0px 5px 0px;\n position:relative;\n }\n .group-area .row input{\n border-radius: 2px;\n margin-bottom: auto;\n margin-top: 6px;\n margin-left: 5px;\n box-shadow: 0 0 0 3px #222;\n content: '';\n }\n .prefix-area{\n margin-left:12px;\n margin-top: 3px;\n }\n .prefix-area label{\n margin-left:2px\n }\n .section-area{\n margin: 0px 0px 12px 0px;\n }\n label{\n margin-left: -5px;\n }\n label span{\n margin-left: 3px;\n }\n img{\n margin-left: 6px;\n }\n a{\n justify-content: center; \n margin-top: 10px;\n margin-bottom: 12px;\n }\n .check-box{\n margin: 0px 0px 3px 0px;\n } \n .line-space{\n margin-bottom: 20px;\n }\n .drop-down{\n margin-top: 8px;\n margin-bottom: 20px;\n margin-left: -6.5px;\n }\n .border-area-text{ \n display: flex; \n flex-direction: row; \n justify-content: flex-start;\n flex-wrap: wrap; \n }\n .checkText { \n line-height: 0.1px; \n margin-left: 2px;\n flex-shrink: 1;\n flex-basis: 1px;\n flex-grow:1;\n } \n .radioText{\n line-height: 0.1px; \n margin-left: 5px;\n flex-shrink: 1;\n flex-basis: 1px;\n flex-grow:1;\n }\n /* style for toolitp (on hover)*/\n .tooltip {\n width: 10px;\n height: 10px;\n margin: 0px auto 0px 6px;\n }\n .tooltip img{\n width: 11px;\n height: 11px; \n margin: 0px auto 0px -1px;\n }\n .tooltip .tooltip-text{ \n visibility: hidden;\n color: #F2F2F2;\n font-family: SFUIText-Regular;\n font-size: 10px;\n display: flex; \n flex-direction: row; \n justify-content: flex-start;\n flex-wrap: wrap;\n } \n .tooltip-text .tip-for-flows {\n line-height: 12px;\n margin: 4px;\n padding: 8px;\n background-color: #2C2C2C;\n border-radius: 4px;\n width:165px;\n /* Position the tooltip */\n position: relative;\n top:-35px;\n left:-130px;\n z-index: 1;\n }\n .tooltip-text .tip-for-scale {\n line-height: 12px;\n margin: 4px;\n padding: 8px;\n background-color: #2C2C2C;\n border-radius: 4px;\n width:150px;\n /* Position the tooltip */\n position: relative;\n top:-30px;\n left:-80px;\n z-index: 1;\n }\n /* show tooltip on hover */\n .tooltip:hover .tooltip-text {\n visibility: visible;\n } \n .hyperlink{\n color: rgb(142, 142, 142);\n font-family: SFUIText-Regular;\n font-size: 10px;\n font-weight: normal;\n margin-left: 5px;\n }\n .new-tip{\n border-radius: 3px;\n border: 1px solid rgb(221, 221, 221);\n height: 24px;\n \n }\n </style> "}getStyles(){return`<style>\n #dialog form {\n width: ${this.width}px;\n }\n\n #outer-loader {\n margin-left: 7px;\n background: #d3d3d3;\n border-radius: 3px;\n }\n \n #inner-loader {\n background: #2680EB;\n height: 5px;\n width: 0%;\n border-radius: 3px;\n }\n \n h2 {\n color: black;\n }\n \n .div-wrapper {\n width: 100%;\n display: flex;\n }\n \n .div-left {\n flex-shrink:0;\n width: 56px;\n margin-right: 5px;\n }\n \n .div-right {\n flex-grow: 1;\n }\n\n .title-app-icon {\n padding-top: 4px;\n }\n\n .title-error-icon {\n padding-top: 2px;\n }\n\n .title-warning-icon {\n padding-top: 4px;\n }\n\n .content-in-row {\n flex-direction: row;\n }\n\n .flex-content-center {\n align-self: center;\n }\n\n .title-header {\n display: flex;\n height: 42px;\n }\n details {\n border: 1px solid #aaa;\n border-radius: 4px;\n padding: .5em .5em 0;\n}\n\nsummary {\n font-weight: bold;\n margin: -.5em -.5em 0;\n padding: .5em;\n}\n\ndetails[open] {\n padding: .5em;\n}\n\ndetails[open] summary {\n border-bottom: 1px solid #aaa;\n margin-bottom: .5em;\n}\n </style>\n `}}},function(e,t,n){(t=e.exports=n(24)).Stream=t,t.Readable=t,t.Writable=n(16),t.Duplex=n(4),t.Transform=n(28),t.PassThrough=n(45)},function(e,t,n){"use strict";(function(t,r,i){var o=n(11);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=b;var s,l=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:o.nextTick;b.WritableState=y;var u=Object.create(n(7));u.inherits=n(5);var c={deprecate:n(44)},f=n(25),h=n(12).Buffer,d=i.Uint8Array||function(){};var p,g=n(26);function m(){}function y(e,t){s=s||n(4),e=e||{};var r=t instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,u=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(u||0===u)?u:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(k,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),k(e,t))}(e,n,r,t,i);else{var a=x(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||v(e,n),r?l(_,e,n,a,i):_(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function b(e){if(s=s||n(4),!(p.call(b,this)||this instanceof s))return new b(e);this._writableState=new y(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function w(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function _(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),k(e,t)}function v(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),o=t.corkedRequestsFree;o.entry=n;for(var s=0,l=!0;n;)i[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;i.allBuffers=l,w(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,c=n.encoding,f=n.callback;if(w(e,t,!1,t.objectMode?1:u.length,u,c,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function x(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),k(e,t)}))}function k(e,t){var n=x(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(E,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}u.inherits(b,f),y.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!p.call(this,e)||this===b&&(e&&e._writableState instanceof y)}})):p=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=e,h.isBuffer(r)||r instanceof d);return s&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=m),i.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),o.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,i,o){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else w(e,t,!1,s,r,i,o);return l}(this,i,s,e,t,n)),a},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},b.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,k(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(2),n(23).setImmediate,n(3))},function(e,t,n){(function(e){var r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},i=/%[sdj%]/g;t.format=function(e){if(!y(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,a=String(e).replace(i,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),l=r[n];n<o;l=r[++n])g(l)||!_(l)?a+=" "+l:a+=" "+s(l);return a},t.deprecate=function(n,r){if(void 0!==e&&!0===e.noDeprecation)return n;if(void 0===e)return function(){return t.deprecate(n,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(e.throwDeprecation)throw new Error(r);e.traceDeprecation?console.trace(r):console.error(r),i=!0}return n.apply(this,arguments)}};var o,a={};function s(e,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&t._extend(r,n),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=l),c(r,e,r.depth)}function l(e,t){var n=s.styles[t];return n?"["+s.colors[n][0]+"m"+e+"["+s.colors[n][1]+"m":e}function u(e,t){return e}function c(e,n,r){if(e.customInspect&&n&&E(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return y(i)||(i=c(e,i,r)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(y(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(m(t))return e.stylize(""+t,"number");if(p(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(e,n);if(o)return o;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),x(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(E(n)){var l=n.name?": "+n.name:"";return e.stylize("[Function"+l+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(v(n))return e.stylize(Date.prototype.toString.call(n),"date");if(x(n))return f(n)}var u,_="",k=!1,S=["{","}"];(d(n)&&(k=!0,S=["[","]"]),E(n))&&(_=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(_=" "+RegExp.prototype.toString.call(n)),v(n)&&(_=" "+Date.prototype.toUTCString.call(n)),x(n)&&(_=" "+f(n)),0!==a.length||k&&0!=n.length?r<0?w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special"):(e.seen.push(n),u=k?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)O(t,String(a))?o.push(h(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(h(e,t,n,r,i,!0))})),o}(e,n,r,s,a):a.map((function(t){return h(e,n,r,s,t,k)})),e.seen.pop(),function(e,t,n){if(e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1];return n[0]+t+" "+e.join(", ")+" "+n[1]}(u,_,S)):S[0]+_+S[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,i,o){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),O(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(l.value)<0?(s=g(n)?c(e,l.value,null):c(e,l.value,n-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function g(e){return null===e}function m(e){return"number"==typeof e}function y(e){return"string"==typeof e}function b(e){return void 0===e}function w(e){return _(e)&&"[object RegExp]"===k(e)}function _(e){return"object"==typeof e&&null!==e}function v(e){return _(e)&&"[object Date]"===k(e)}function x(e){return _(e)&&("[object Error]"===k(e)||e instanceof Error)}function E(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(n){if(b(o)&&(o=e.env.NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=e.pid;a[n]=function(){var e=t.format.apply(t,arguments);console.error("%s %d: %s",n,r,e)}}else a[n]=function(){};return a[n]},t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=p,t.isNull=g,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=y,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=w,t.isObject=_,t.isDate=v,t.isError=x,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=n(53);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function L(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",L(),t.format.apply(t,arguments))},t.inherits=n(54),t._extend=function(e,t){if(!t||!_(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var T="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(T&&e[T]){var t;if("function"!=typeof(t=e[T]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,T,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,i)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),T&&Object.defineProperty(t,T,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},t.promisify.custom=T,t.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function n(){for(var n=[],r=0;r<arguments.length;r++)n.push(arguments[r]);var i=n.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,a=function(){return i.apply(o,arguments)};t.apply(this,n).then((function(t){e.nextTick(a,null,t)}),(function(t){e.nextTick(I,t,a)}))}return Object.setPrototypeOf(n,Object.getPrototypeOf(t)),Object.defineProperties(n,r(t)),n}}).call(this,n(2))},function(e,t,n){"use strict";n(0).storage.localFileSystem,n(6),n(14),n(19);const r=n(8),i=n(21),{Artboard:o}=n(20);n(71);e.exports=class{constructor(e,t,n,r,i,o,a){this.selection=e,this.documentRoot=t,this.singleLayer=n,this.isOperationCancelled=o,this.allItemsForExport=[],this.exportWithPrefix=r,this.useInteractions=i,this.artboardsGlobalBoundX,this.artboardsGlobalBoundY,this.layerFileName=[],this.artboardFileName=[],this.maxLayerNameCharLength=a}createCommonLayerObject(e){let t=i.removeEmojisFromLayerName(e.name),n=i.escapeFilename(t+"~"+e.guid+".png");return{id:""+e.guid,name:""+t,fileName:n,size:"",position:"",path:"",pathID:"",hidden:e.visible?"0":"1",flow:this.useInteractions?this.getInteraction(e):"",opacity:""}}createChildNodeObject(e){let t=this.createCommonLayerObject(e);return t.isGroup="",t.isHotspot="",t.opacity="",t}createItemsForSingleLayer(e,t,n){let r=[],i={position:{x:"0",y:"0"},size:n},o=this.createItemObject(e,i,"","","layer");r.push(o),this.artboardFileName.push(o.fileName);let a=t.filter(e=>e.flow.length>0);if(0!==a.length)for(let e=0;e<a.length;e++)r.push(a[e]);return r}createArtboardObject(e){let t={position:{x:e.globalBounds.x,y:e.globalBounds.y},size:{width:e.globalBounds.width,height:e.globalBounds.height}};this.artboardsGlobalBoundX=t.position.x,this.artboardsGlobalBoundY=t.position.y,this.allItemsForExport=[],this.layerFileName=[];let n=this.isOperationCancelled?"":this.getArtboardChildren(e,this.documentRoot);if(this.isOperationCancelled)return;let r=this.singleLayer?this.createItemsForSingleLayer(e,n,t.size):n;return this.createItemObject(e,t,"","","artboard",r)}createItemObject(e,t,n,i,o,a){const s={id:e.guid,position:t.position,size:t.size,flow:this.useInteractions?this.getInteraction(e):""};return void 0!==o&&"artboard"===o.toLowerCase()?(s.items=a,s.title=e.name,s.backgroundColor=this.colorToRGBA(e.fill,e.fillEnabled)):(s.name=r.layerHasChildren(e)&&""===e.name?"group":e.name,s.fileName=this.getLayerFileName(e,e.name),s.path=n,s.pathID=i,s.hidden=e.visible?"0":"1",s.isHotspot=!(!this.singleLayer||0===s.flow.length||r.isArtboard(e)),s.isGroup=r.getIsGroup(e,this.singleLayer,this.exportWithPrefix),s.opacity=r.getLayerOpacity(e,this.exportWithPrefix)),s}getLayerFileName(e,t){if(r.layerHasChildren(e)&&!e.mask&&(!this.exportWithPrefix||this.exportWithPrefix&&"@"!==t[0]))return"";let n=i.formatLayerNameBasedOnOS(t,e.guid,this.maxLayerNameCharLength);return i.escapeFilename(n)}getArtboardChildren(e,t,n,i,o){let a=[];void 0===i&&(i=""),void 0===o&&(o="");let s=[],l=n?"forEachRight":"forEach";return e.children[l]((e,n)=>{if(!e.visible)return;let l=this.getLayerBounds(e),u=this.createItemObject(e,l,i,o);if(e.mask)return a.push(u),this.allItemsForExport.push(e),void this.layerFileName.push(u.fileName);if(r.layerHasChildren(e)){const n=i+"/"+u.name,r=o+"/"+e.guid;if(this.exportWithPrefix&&"@"===e.name[0])return a.push(u),this.allItemsForExport.push(e),void this.layerFileName.push(u.fileName);e.children.length>0&&(s=this.getArtboardChildren(e,t,e.mask?u:null,n,r),a.push(...s)),a.push(u)}else this.allItemsForExport.push(e),this.layerFileName.push(u.fileName),a.push(u)}),a}colorToRGBA(e,t){if(null===e)return"rgba(0,0,0,0)";return"rgba("+e.r+","+e.g+","+e.b+","+((t?e.a:0)/255).toFixed(2)+")"}getLayerBounds(e){return{size:{width:e.globalDrawBounds.width.toFixed(2),height:e.globalDrawBounds.height.toFixed(2)},position:{x:(e.globalDrawBounds.x-this.artboardsGlobalBoundX).toFixed(2),y:(e.globalDrawBounds.y-this.artboardsGlobalBoundY).toFixed(2)}}}getInteraction(e){let t=[];return t=e.triggeredInteractions.map(e=>{let t={destinationArtboardID:"",triggerName:e.trigger.type,actionName:e.action.type,transitionName:"",transitionDuration:"",transitionEasing:"",triggerTimeDelay:e.trigger.type?1e3*e.trigger.delay:""};if("goBack"===e.action.type||"speak"===e.action.type)return t;t.destinationArtboardID=this.getInteractionDestinationID(e);const n=this.fixInteractionName(e.action.transition.type,e.action.transition.fromSide);return t.transitionDuration=1e3*e.action.transition.duration,t.transitionEasing=e.action.transition.easing,t.transitionName=n.fromSide,t}),t}getInteractionDestinationID(e){let t=null,n=null;return e.action.destination?n="destination":e.action.overlay&&(n="overlay"),n&&(t=e.action[n].guid),t}fixInteractionName(e,t){let n;return n="push"===e||"slide"===e?e+t:e,{fromSide:n}}getSelectedArtboard(e){return null===e?null:e instanceof o?e:this.getSelectedArtboard(e.parent)}}},function(e){e.exports=JSON.parse('{"id":"81facf1f","name":"Proto.io","version":"1.0.1","description":"The Proto.io plugin for Adobe XD syncs your designs to Proto.io enabling you to create and share playable prototypes.","icons":[{"width":24,"height":24,"path":"assets/images/[email protected]"},{"width":48,"height":48,"path":"assets/images/[email protected]"},{"width":96,"height":96,"path":"assets/images/[email protected]"},{"width":144,"height":144,"path":"assets/images/[email protected]"},{"width":192,"height":192,"path":"assets/images/[email protected]"}],"host":{"app":"XD","minVersion":"21.0"},"uiEntryPoints":[{"type":"panel","label":"Our Panel","panelId":"ourPanels"}]}')},function(e,t){e.exports=require("scenegraph")},function(e,t,n){"use strict";(function(t){var r=n(37);const i=n(0).storage.localFileSystem,o=(n(0).storage.FileSystemProvider,n(0).storage.formats),a=n(8),s=n(38),l=n(64);let u=n(6);const c=n(19),f=n(70);e.exports=class{static removeEmojisFromLayerName(e){e=e.replace(new RegExp(["\ud83c[\udf00-\udfff]","\ud83d[\udc00-\ude4f]","\ud83d[\ude80-\udeff]"].join("|"),"g"),"?");try{encodeURIComponent(e)}catch(t){e="?"}return e}static getFileNameMaxLength(e){let t=200;return f.platform().match(/(^win[0-9][0-9])$/)&&(t=255-e.length),t}static formatLayerNameBasedOnOS(e,t,n){const r="~"+t+".png";let i=n-r.length,o=e;return e.length>i&&(o=e.substr(0,i)),o+r}static escapeFilename(e){e||(e=""),e=r.foldMaintaining(e),e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=this.removeEmojisFromLayerName(e)).replace(/(\r\n|\n|\r)/gm," ")).replace(/[^\x00-\x7F]/g,"-")).replace(/\\/g,"-")).replace(/[/]/g,"-")).replace(/:/g,"-")).replace(/[?]/g,"-")).replace(/[*]/g,"-")).replace(/[<]/g,"-")).replace(/[>]/g,"-")).replace(/[""]/g,"-")).replace(/[|]/g,"-")).replace(/[#]/g,"-");try{e=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"?")}catch(e){}return e.trim()}static async createZipFile(e,n,r){return new Promise(async i=>{if(n)try{const n=new s.ZipFile,u=await r.getEntries();for(let e=0;e<u.length;e++){const r=u[e];if(r.isFile)try{const e=await r.read({format:o.binary}),i=t.from(e);await n.addBuffer(i,r.name)}catch(e){a.debugLog(e)}}await n.end();const c=await l.buffer(n.outputStream);e.write(c,{format:o.binary}),document.querySelector("#dialog").close(),i()}catch(e){i()}else i()})}static async exportRendition(e,t){const n=await e.map(async e=>{const n=await t.createFile(e.guid+".png");let r={};return r.node=e,r.outputFile=n,r.type="png",r.scale=1,r}),r=await Promise.all(n);await u.createRenditions(r)}static async createTempFolderForRenditions(){const e=await i.getTemporaryFolder();let t,n=a.uuidv4();try{t=await e.getEntry(n),await this.deleteTempFolderForRenditions(t)}catch(e){a.debugLog("FileHelper.createTempFolderForRenditions "+e)}return t=await e.createFolder(n),console.log("create folder done"),t}static async deleteTempFolderForRenditions(e){const t=await e.getEntries();for(let e=0;e<t.length;e++){let n=t[e];n.isFile&&await n.delete()}await e.delete(),console.log("Folder Deleted")}static async renditionsCreation(e,t,n,r){const i=[{node:e,outputFile:await t.createEntry(r,{overwrite:!0}),type:u.RenditionType.PNG,scale:n,background:e.fillEnabled&&"RootNode"===e.parent.constructor.name?e.fill:null}];try{const e=await Promise.all(i);await u.createRenditions(e)}catch(e){a.debugLog("Rendition Error: "+e)}}static async createJsonFile(e,t){const n={info:{pluginId:"adobexd",about:"Proto.io Adobe XD Export",version:c.version},screens:e};let r=await t.createEntry("info.json");return await r.write(JSON.stringify(n)),n}}}).call(this,n(1).Buffer)},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(39),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(3))},function(e,t,n){"use strict";(function(t,r){var i=n(11);e.exports=w;var o,a=n(22);w.ReadableState=b;n(10).EventEmitter;var s=function(e,t){return e.listeners(t).length},l=n(25),u=n(12).Buffer,c=t.Uint8Array||function(){};var f=Object.create(n(7));f.inherits=n(5);var h=n(41),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var p,g=n(42),m=n(26);f.inherits(w,l);var y=["error","close","destroy","pause","resume"];function b(e,t){e=e||{};var r=t instanceof(o=o||n(4));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=n(27).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function w(e){if(o=o||n(4),!(this instanceof w))return new w(e);this._readableState=new b(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function _(e,t,n,r,i){var o,a=e._readableState;null===t?(a.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,E(e)}(e,a)):(i||(o=function(e,t){var n;r=t,u.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),r?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):v(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?v(e,a,t,!1):S(e,a)):v(e,a,t,!1))):r||(a.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(a)}function v(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&E(e)),S(e,t)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),w.prototype.destroy=m.destroy,w.prototype._undestroy=m.undestroy,w.prototype._destroy=function(e,t){this.push(null),t(e)},w.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=u.from(e,t),t=""),n=!0),_(this,e,t,!1,n)},w.prototype.unshift=function(e){return _(this,e,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(e){return p||(p=n(27).StringDecoder),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};function x(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(k,e):k(e))}function k(e){d("emit readable"),e.emit("readable"),T(e)}function S(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(A,e,t))}function A(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function L(e){d("readable nexttick read 0"),e.read(0)}function O(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),T(e),t.flowing&&!t.reading&&e.read(0)}function T(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function I(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;e-=i.length;for(;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=u.allocUnsafe(e),r=t.head,i=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function R(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(F,t,e))}function F(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function D(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}w.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?R(this):E(this),null;if(0===(e=x(e,t))&&t.ended)return 0===t.length&&R(this),null;var r,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=x(n,t))),null===(r=e>0?I(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&R(this)),null!==r&&this.emit("data",r),r},w.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t);var l=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?c:w;function u(t,r){d("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),e.removeListener("close",y),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",m),e.removeListener("unpipe",u),n.removeListener("end",c),n.removeListener("end",w),n.removeListener("data",g),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||f())}function c(){d("onend"),e.end()}o.endEmitted?i.nextTick(l):n.once("end",l),e.on("unpipe",u);var f=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,T(e))}}(n);e.on("drain",f);var h=!1;var p=!1;function g(t){d("ondata"),p=!1,!1!==e.write(t)||p||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==D(o.pipes,e))&&!h&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function m(t){d("onerror",t),w(),e.removeListener("error",m),0===s(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",b),w()}function b(){d("onfinish"),e.removeListener("close",y),w()}function w(){d("unpipe"),n.unpipe(e)}return n.on("data",g),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",m),e.once("close",y),e.once("finish",b),e.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),e},w.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var a=D(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},w.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&E(this):i.nextTick(L,this))}return n},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(O,e,t))}(this,e)),this},w.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(d("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){(d("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<y.length;o++)e.on(y[o],this.emit.bind(this,y[o]));return this._read=function(t){d("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=I}).call(this,n(3),n(2))},function(e,t,n){e.exports=n(10).EventEmitter},function(e,t,n){"use strict";var r=n(11);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(i,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";var r=n(12).Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var i=a(t[r]);if(i>=0)return i>0&&(e.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=a(t[r]))>=0)return i>0&&(e.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=a(t[r]))>=0)return i>0&&(2===i?i=0:e.lastNeed=i-3),i;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";e.exports=a;var r=n(4),i=Object.create(n(7));function o(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);r.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){l(e,t,n)})):l(this,null,null)}function l(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=n(5),i.inherits(a,r),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},a.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},function(e,t,n){"use strict";(function(t){var r=n(52);
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <[email protected]> <http://feross.org>
* @license MIT
*/function i(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0}function o(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var a=n(17),s=Object.prototype.hasOwnProperty,l=Array.prototype.slice,u="foo"===function(){}.name;function c(e){return Object.prototype.toString.call(e)}function f(e){return!o(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var h=e.exports=b,d=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(a.isFunction(e)){if(u)return e.name;var t=e.toString().match(d);return t&&t[1]}}function g(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function m(e){if(u||!a.isFunction(e))return a.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function y(e,t,n,r,i){throw new h.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function b(e,t){e||y(e,!0,t,"==",h.ok)}function w(e,t,n,r){if(e===t)return!0;if(o(e)&&o(t))return 0===i(e,t);if(a.isDate(e)&&a.isDate(t))return e.getTime()===t.getTime();if(a.isRegExp(e)&&a.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(f(e)&&f(t)&&c(e)===c(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var s=(r=r||{actual:[],expected:[]}).actual.indexOf(e);return-1!==s&&s===r.expected.indexOf(t)||(r.actual.push(e),r.expected.push(t),function(e,t,n,r){if(null==e||null==t)return!1;if(a.isPrimitive(e)||a.isPrimitive(t))return e===t;if(n&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=_(e),o=_(t);if(i&&!o||!i&&o)return!1;if(i)return e=l.call(e),t=l.call(t),w(e,t,n);var s,u,c=E(e),f=E(t);if(c.length!==f.length)return!1;for(c.sort(),f.sort(),u=c.length-1;u>=0;u--)if(c[u]!==f[u])return!1;for(u=c.length-1;u>=0;u--)if(s=c[u],!w(e[s],t[s],n,r))return!1;return!0}(e,t,n,r))}return n?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function v(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function x(e,t,n,r){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),e&&!i&&y(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!e&&i&&!n;if((!e&&a.isError(i)&&o&&v(i,n)||s)&&y(i,n,"Got unwanted exception"+r),e&&i&&n&&!v(i,n)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return g(m(e.actual),128)+" "+e.operator+" "+g(m(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||y;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var r=n.stack,i=p(t),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(h.AssertionError,Error),h.fail=y,h.ok=b,h.equal=function(e,t,n){e!=t&&y(e,t,n,"==",h.equal)},h.notEqual=function(e,t,n){e==t&&y(e,t,n,"!=",h.notEqual)},h.deepEqual=function(e,t,n){w(e,t,!1)||y(e,t,n,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,n){w(e,t,!0)||y(e,t,n,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,n){w(e,t,!1)&&y(e,t,n,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,n,r){w(t,n,!0)&&y(t,n,r,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,n){e!==t&&y(e,t,n,"===",h.strictEqual)},h.notStrictEqual=function(e,t,n){e===t&&y(e,t,n,"!==",h.notStrictEqual)},h.throws=function(e,t,n){x(!0,e,t,n)},h.doesNotThrow=function(e,t,n){x(!1,e,t,n)},h.ifError=function(e){if(e)throw e},h.strict=r((function e(t,n){t||y(t,!0,n,"==",e)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var E=Object.keys||function(e){var t=[];for(var n in e)s.call(e,n)&&t.push(n);return t}}).call(this,n(3))},function(e,t,n){"use strict";e.exports=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+t[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}},function(e,t,n){"use strict";var r=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();e.exports=function(e,t,n,i){var o=r,a=i+n;e^=-1;for(var s=i;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}},function(e,t,n){var r=n(66);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}e.exports=r(i),e.exports.strict=r(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},function(e,t,n){const r=n(0).storage.localFileSystem;n(0).storage.localFileSystem;r.isFileSystemProvider;const i=n(14),o=n(34),a=(n(18),n(8));let s,l,u,c,f,h,d,p,g=n(6);let m=[];async function y(){const e=(new i).getPanel();s=document.createElement("div"),s.innerHTML=e;const t=await r.getDataFolder();let n=await a.exportOptions(),y=await t.getEntry(g.activeDocument.guid+".json");c=n.singleLayer,u=n.prefix,d=n.interactions;const b=document.querySelector("#interactions");b.checked=!!d;const w=document.querySelector("#scale");w.value=""+n.scale;const _=document.querySelector("#prefix");_.checked=!!u;const v=document.querySelector("#radiosButtonsCollection"),x=document.querySelector("#singlelayer"),E=(document.querySelector("#multilayer"),document.querySelector("#prefixedOption"));x.checked=!!c,E.style.display=c?"none":"block",b.addEventListener("change",async()=>{d=!!b.checked}),_.addEventListener("change",async()=>{u=!!_.checked});const k=document.querySelector("#advanced"),S=document.querySelector("#arrow");k.addEventListener("change",async()=>{l=!!k.checked,"./assets/images/arrow_open.svg"===S.src?(S.src="./assets/images/arrow.svg",v.style.display="none"):(S.src="./assets/images/arrow_open.svg",v.style.display="block")});let A=document.getElementsByTagName("input");for(let e=0;e<A.length;e++)"radio"===A[e].type&&(A[e].onchange=function(){c="single-layer"===this.value,E.style.display=c?"none":"block"});s.querySelector("#export").addEventListener("click",async()=>{const e={scale:w.value,singleLayer:c,prefix:u,interactions:d};p=e.scale,await y.write(JSON.stringify(e)),await async function(e,t,n){const r=new o(e,t,c,u,d,p);await r.exportArtboards(n)}(f,h,m)})}e.exports={panels:{ourPanels:{show:function(e){s||(y(),e.node.appendChild(s))},update:async function(e,t){f=e,h=t;let n=function(e){return m=a.findArtboards(e.items),m.length}(e);const r=document.querySelector("#countOfSelections");let i;i=n>1?"artboards":"artboard",r.innerHTML=n.toString()+" "+i+" selected ";const o=s.querySelector("#export");0===n?(o.disabled=!0,r.innerHTML="No artboards selected"):o.disabled=!1}}}}},function(e,t,n){"use strict";const r=n(0).storage.localFileSystem,i=n(14),o=n(18),a=n(8),s=n(21);let l=n(6);const{confirm:u,alert:c}=n(76);e.exports=class{constructor(e,t,n,r,i,o){this.selection=e,this.documentRoot=t,this.syncDialog=null,this.confirmDialog=null,this.i=0,this.singleLayer=n,this.exportWithPrefix=r,this.singArray=[],this.useInteractions=i,this.scale=o,this.progressDialog=null,this.overwrite=null}async showConfirm(e){let t;switch((await u("'"+e+".protoio' already exists. Do you want to replace it?","A file with the same name already exists in the folder. Replacing it will overwrite the current contents.",["Cancel","Replace"])).which){case 0:t=!1;break;case 1:t=!0}return t}async showSuccesAlert(){await c("Successfully exported",["Your .protoio file has been successfully exported. Upload it into a Proto.io Editor to continue prototyping in Proto.io!"])}progressModal(){let e;if(!e){e=document.createElement("dialog");const t=new i;e.innerHTML=t.constructForm(t.formTypes.Loading)}document.appendChild(e);const t=document.querySelector("#inner-loader");document.querySelector("#msg");return document.querySelector("#header").innerHTML="Exporting",t.style.width="2%",t.style.display="block",document.querySelector("#dialog")}sortSelectedArtboards(e,t){let n=[];for(let r=0;r<t.length;r++){-1!==e.findIndex(e=>e.guid===t[r].guid)&&n.push(t[r])}return n}async exportArtboards(e){const t=new o(this.selection,this.documentRoot,this.singleLayer,this.exportWithPrefix,this.useInteractions,!1),n=this.documentRoot.children;let i=a.findArtboards(n);e=this.sortSelectedArtboards(e,i);const u=await r.getFolder();if(!u)return;let c=null,f=l.activeDocument.name;try{c=await u.createFile(f+".protoio")}catch(e){if(a.debugLog("Exporter.zipFile "+e),!await this.showConfirm(f))return}c=await u.createFile(f+".protoio",{types:["protoio"],overwrite:!0});let h=e.length;this.syncDialog=this.progressModal(),this.syncDialog.showModal();document.querySelector("#cancel").addEventListener("click",async()=>{t.isOperationCancelled=!0,document.querySelector("#dialog").close()});const d=await s.createTempFolderForRenditions();t.maxLayerNameCharLength=s.getFileNameMaxLength(d.nativePath);const p=document.querySelector("#inner-loader"),g=document.querySelector("#msg");let m=0,y=[],b=1/e.length*90;for(let n=0;n<e.length;n++){m+=b,p.style.width=m+"%",g.innerHTML=`Artboard ${n+1} of ${h}`;let r=t.createArtboardObject(e[n]);if(t.isOperationCancelled)break;y.push(r);const i=parseInt(this.scale);if(this.singleLayer)await s.renditionsCreation(e[n],d,i,t.artboardFileName[n]);else for(let e=0;e<t.allItemsForExport.length&&!t.isOperationCancelled;e++)await s.renditionsCreation(t.allItemsForExport[e],d,i,t.layerFileName[e])}if(t.isOperationCancelled)return;let w=await s.createJsonFile(y.reverse(),d);console.log("Create Zip"),g.innerHTML="Creating zip...",p.style.width="95%",await s.createZipFile(c,w,d),p.style.width="100%",await s.deleteTempFolderForRenditions(d),await this.showSuccesAlert()}async exportSelectedItems(){const e=new o(this.selection,this.documentRoot,this.singleLayer,this.exportWithPrefix);e.allItemsForExport=[];let t=await a.exportOptions();const n=parseInt(t.scale);if(0===this.selection.items.length)return void this.showOurDialog();const i=await r.getFolder(),l=await i.createFolder("plugin Assets");this.selection.items.forEach((function(t){e.getArtboardChildren(t)}));for(var u=0;u<e.allItemsForExport.length;u++)await s.renditionsCreation(e.allItemsForExport[u],l,n)}}},function(e,t,n){"use strict";t.byteLength=function(e){var t=u(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=u(e),a=r[0],s=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),c=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[c++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(c(e,a,a+16383>s?s:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=a.length;s<l;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,u=l>>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=u}return(d?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*l-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[n+d]=255&a,d+=p,a/=256,u-=8);e[n+d-p]|=128*g}},function(e,t){class n{static foldReplacing(e="",t=""){return this._fold(e,()=>t)}static foldMaintaining(e=""){return this._fold(e,e=>e)}static _fold(e,t){if(null===e)return"";if("number"==typeof e)return""+e;if("string"!=typeof e)throw new Error("Invalid input data type");return e.split("").map(e=>{if(e.charCodeAt(0)<128)return e;{const n=this.mapping.get(e.charCodeAt(0));return void 0===n?t(e):n}}).join("")}}n.mapping=new Map([[192,"A"],[193,"A"],[194,"A"],[195,"A"],[196,"A"],[197,"A"],[256,"A"],[258,"A"],[260,"A"],[399,"A"],[461,"A"],[478,"A"],[480,"A"],[506,"A"],[512,"A"],[514,"A"],[550,"A"],[570,"A"],[7424,"A"],[7680,"A"],[7840,"A"],[7842,"A"],[7844,"A"],[7846,"A"],[7848,"A"],[7850,"A"],[7852,"A"],[7854,"A"],[7856,"A"],[7858,"A"],[7860,"A"],[7862,"A"],[9398,"A"],[65313,"A"],[224,"a"],[225,"a"],[226,"a"],[227,"a"],[228,"a"],[229,"a"],[257,"a"],[259,"a"],[261,"a"],[462,"a"],[479,"a"],[481,"a"],[507,"a"],[513,"a"],[515,"a"],[551,"a"],[592,"a"],[601,"a"],[602,"a"],[7567,"a"],[7573,"a"],[7681,"a"],[7834,"a"],[7841,"a"],[7843,"a"],[7845,"a"],[7847,"a"],[7849,"a"],[7851,"a"],[7853,"a"],[7855,"a"],[7857,"a"],[7859,"a"],[7861,"a"],[7863,"a"],[8336,"a"],[8340,"a"],[9424,"a"],[11365,"a"],[11375,"a"],[65345,"a"],[42802,"AA"],[198,"AE"],[482,"AE"],[508,"AE"],[7425,"AE"],[42804,"AO"],[42806,"AU"],[42808,"AV"],[42810,"AV"],[42812,"AY"],[9372,"(a)"],[42803,"aa"],[230,"ae"],[483,"ae"],[509,"ae"],[7426,"ae"],[42805,"ao"],[42807,"au"],[42809,"av"],[42811,"av"],[42813,"ay"],[385,"B"],[386,"B"],[579,"B"],[665,"B"],[7427,"B"],[7682,"B"],[7684,"B"],[7686,"B"],[9399,"B"],[65314,"B"],[384,"b"],[387,"b"],[595,"b"],[7532,"b"],[7552,"b"],[7683,"b"],[7685,"b"],[7687,"b"],[9425,"b"],[65346,"b"],[9373,"(b)"],[199,"C"],[262,"C"],[264,"C"],[266,"C"],[268,"C"],[391,"C"],[571,"C"],[663,"C"],[7428,"C"],[7688,"C"],[9400,"C"],[65315,"C"],[231,"c"],[263,"c"],[265,"c"],[267,"c"],[269,"c"],[392,"c"],[572,"c"],[597,"c"],[7689,"c"],[8580,"c"],[9426,"c"],[42814,"c"],[42815,"c"],[65347,"c"],[9374,"(c)"],[208,"D"],[270,"D"],[272,"D"],[393,"D"],[394,"D"],[395,"D"],[7429,"D"],[7430,"D"],[7690,"D"],[7692,"D"],[7694,"D"],[7696,"D"],[7698,"D"],[9401,"D"],[42873,"D"],[65316,"D"],[240,"d"],[271,"d"],[273,"d"],[396,"d"],[545,"d"],[598,"d"],[599,"d"],[7533,"d"],[7553,"d"],[7569,"d"],[7691,"d"],[7693,"d"],[7695,"d"],[7697,"d"],[7699,"d"],[9427,"d"],[42874,"d"],[65348,"d"],[452,"DZ"],[497,"DZ"],[453,"Dz"],[498,"Dz"],[9375,"(d)"],[568,"db"],[454,"dz"],[499,"dz"],[675,"dz"],[677,"dz"],[200,"E"],[201,"E"],[202,"E"],[203,"E"],[274,"E"],[276,"E"],[278,"E"],[280,"E"],[282,"E"],[398,"E"],[400,"E"],[516,"E"],[518,"E"],[552,"E"],[582,"E"],[7431,"E"],[7700,"E"],[7702,"E"],[7704,"E"],[7706,"E"],[7708,"E"],[7864,"E"],[7866,"E"],[7868,"E"],[7870,"E"],[7872,"E"],[7874,"E"],[7876,"E"],[7878,"E"],[9402,"E"],[11387,"E"],[65317,"E"],[232,"e"],[233,"e"],[234,"e"],[235,"e"],[275,"e"],[277,"e"],[279,"e"],[281,"e"],[283,"e"],[477,"e"],[517,"e"],[519,"e"],[553,"e"],[583,"e"],[600,"e"],[603,"e"],[604,"e"],[605,"e"],[606,"e"],[666,"e"],[7432,"e"],[7570,"e"],[7571,"e"],[7572,"e"],[7701,"e"],[7703,"e"],[7705,"e"],[7707,"e"],[7709,"e"],[7865,"e"],[7867,"e"],[7869,"e"],[7871,"e"],[7873,"e"],[7875,"e"],[7877,"e"],[7879,"e"],[8337,"e"],[9428,"e"],[11384,"e"],[65349,"e"],[9376,"(e)"],[401,"F"],[7710,"F"],[9403,"F"],[42800,"F"],[42875,"F"],[43003,"F"],[65318,"F"],[402,"f"],[7534,"f"],[7554,"f"],[7711,"f"],[7835,"f"],[9429,"f"],[42876,"f"],[65350,"f"],[9377,"(f)"],[64256,"ff"],[64259,"ffi"],[64260,"ffl"],[64257,"fi"],[64258,"fl"],[284,"G"],[286,"G"],[288,"G"],[290,"G"],[403,"G"],[484,"G"],[485,"G"],[486,"G"],[487,"G"],[500,"G"],[610,"G"],[667,"G"],[7712,"G"],[9404,"G"],[42877,"G"],[42878,"G"],[65319,"G"],[285,"g"],[287,"g"],[289,"g"],[291,"g"],[501,"g"],[608,"g"],[609,"g"],[7543,"g"],[7545,"g"],[7555,"g"],[7713,"g"],[9430,"g"],[42879,"g"],[65351,"g"],[9378,"(g)"],[292,"H"],[294,"H"],[542,"H"],[668,"H"],[7714,"H"],[7716,"H"],[7718,"H"],[7720,"H"],[7722,"H"],[9405,"H"],[11367,"H"],[11381,"H"],[65320,"H"],[293,"h"],[295,"h"],[543,"h"],[613,"h"],[614,"h"],[686,"h"],[687,"h"],[7715,"h"],[7717,"h"],[7719,"h"],[7721,"h"],[7723,"h"],[7830,"h"],[9431,"h"],[11368,"h"],[11382,"h"],[65352,"h"],[502,"HV"],[9379,"(h)"],[405,"hv"],[204,"I"],[205,"I"],[206,"I"],[207,"I"],[296,"I"],[298,"I"],[300,"I"],[302,"I"],[304,"I"],[406,"I"],[407,"I"],[463,"I"],[520,"I"],[522,"I"],[618,"I"],[7547,"I"],[7724,"I"],[7726,"I"],[7880,"I"],[7882,"I"],[9406,"I"],[43006,"I"],[65321,"I"],[236,"i"],[237,"i"],[238,"i"],[239,"i"],[297,"i"],[299,"i"],[301,"i"],[303,"i"],[305,"i"],[464,"i"],[521,"i"],[523,"i"],[616,"i"],[7433,"i"],[7522,"i"],[7548,"i"],[7574,"i"],[7725,"i"],[7727,"i"],[7881,"i"],[7883,"i"],[8305,"i"],[9432,"i"],[65353,"i"],[306,"IJ"],[9380,"(i)"],[307,"ij"],[308,"J"],[584,"J"],[7434,"J"],[9407,"J"],[65322,"J"],[309,"j"],[496,"j"],[567,"j"],[585,"j"],[607,"j"],[644,"j"],[669,"j"],[9433,"j"],[11388,"j"],[65354,"j"],[9381,"(j)"],[310,"K"],[408,"K"],[488,"K"],[7435,"K"],[7728,"K"],[7730,"K"],[7732,"K"],[9408,"K"],[11369,"K"],[42816,"K"],[42818,"K"],[42820,"K"],[65323,"K"],[311,"k"],[409,"k"],[489,"k"],[670,"k"],[7556,"k"],[7729,"k"],[7731,"k"],[7733,"k"],[9434,"k"],[11370,"k"],[42817,"k"],[42819,"k"],[42821,"k"],[65355,"k"],[9382,"(k)"],[313,"L"],[315,"L"],[317,"L"],[319,"L"],[321,"L"],[573,"L"],[671,"L"],[7436,"L"],[7734,"L"],[7736,"L"],[7738,"L"],[7740,"L"],[9409,"L"],[11360,"L"],[11362,"L"],[42822,"L"],[42824,"L"],[42880,"L"],[65324,"L"],[314,"l"],[316,"l"],[318,"l"],[320,"l"],[322,"l"],[410,"l"],[564,"l"],[619,"l"],[620,"l"],[621,"l"],[7557,"l"],[7735,"l"],[7737,"l"],[7739,"l"],[7741,"l"],[9435,"l"],[11361,"l"],[42823,"l"],[42825,"l"],[42881,"l"],[65356,"l"],[455,"LJ"],[7930,"LL"],[456,"Lj"],[9383,"(l)"],[457,"lj"],[7931,"ll"],[682,"ls"],[683,"lz"],[412,"M"],[7437,"M"],[7742,"M"],[7744,"M"],[7746,"M"],[9410,"M"],[11374,"M"],[43005,"M"],[43007,"M"],[65325,"M"],[623,"m"],[624,"m"],[625,"m"],[7535,"m"],[7558,"m"],[7743,"m"],[7745,"m"],[7747,"m"],[9436,"m"],[65357,"m"],[9384,"(m)"],[209,"N"],[323,"N"],[325,"N"],[327,"N"],[330,"N"],[413,"N"],[504,"N"],[544,"N"],[628,"N"],[7438,"N"],[7748,"N"],[7750,"N"],[7752,"N"],[7754,"N"],[9411,"N"],[65326,"N"],[241,"n"],[324,"n"],[326,"n"],[328,"n"],[329,"n"],[331,"n"],[414,"n"],[505,"n"],[565,"n"],[626,"n"],[627,"n"],[7536,"n"],[7559,"n"],[7749,"n"],[7751,"n"],[7753,"n"],[7755,"n"],[8319,"n"],[9437,"n"],[65358,"n"],[458,"NJ"],[459,"Nj"],[9385,"(n)"],[460,"nj"],[210,"O"],[211,"O"],[212,"O"],[213,"O"],[214,"O"],[216,"O"],[332,"O"],[334,"O"],[336,"O"],[390,"O"],[415,"O"],[416,"O"],[465,"O"],[490,"O"],[492,"O"],[510,"O"],[524,"O"],[526,"O"],[554,"O"],[556,"O"],[558,"O"],[560,"O"],[7439,"O"],[7440,"O"],[7756,"O"],[7758,"O"],[7760,"O"],[7762,"O"],[7884,"O"],[7886,"O"],[7888,"O"],[7890,"O"],[7892,"O"],[7894,"O"],[7896,"O"],[7898,"O"],[7900,"O"],[7902,"O"],[7904,"O"],[7906,"O"],[9412,"O"],[42826,"O"],[42828,"O"],[65327,"O"],[242,"o"],[243,"o"],[244,"o"],[245,"o"],[246,"o"],[248,"o"],[333,"o"],[335,"o"],[337,"o"],[417,"o"],[466,"o"],[491,"o"],[493,"o"],[511,"o"],[525,"o"],[527,"o"],[555,"o"],[557,"o"],[559,"o"],[561,"o"],[596,"o"],[629,"o"],[7446,"o"],[7447,"o"],[7575,"o"],[7757,"o"],[7759,"o"],[7761,"o"],[7763,"o"],[7885,"o"],[7887,"o"],[7889,"o"],[7891,"o"],[7893,"o"],[7895,"o"],[7897,"o"],[7899,"o"],[7901,"o"],[7903,"o"],[7905,"o"],[7907,"o"],[8338,"o"],[9438,"o"],[11386,"o"],[42827,"o"],[42829,"o"],[65359,"o"],[338,"OE"],[630,"OE"],[42830,"OO"],[546,"OU"],[7445,"OU"],[9386,"(o)"],[339,"oe"],[7444,"oe"],[42831,"oo"],[547,"ou"],[420,"P"],[7448,"P"],[7764,"P"],[7766,"P"],[9413,"P"],[11363,"P"],[42832,"P"],[42834,"P"],[42836,"P"],[65328,"P"],[421,"p"],[7537,"p"],[7549,"p"],[7560,"p"],[7765,"p"],[7767,"p"],[9439,"p"],[42833,"p"],[42835,"p"],[42837,"p"],[43004,"p"],[65360,"p"],[9387,"(p)"],[586,"Q"],[9414,"Q"],[42838,"Q"],[42840,"Q"],[65329,"Q"],[312,"q"],[587,"q"],[672,"q"],[9440,"q"],[42839,"q"],[42841,"q"],[65361,"q"],[9388,"(q)"],[569,"qp"],[340,"R"],[342,"R"],[344,"R"],[528,"R"],[530,"R"],[588,"R"],[640,"R"],[641,"R"],[7449,"R"],[7450,"R"],[7768,"R"],[7770,"R"],[7772,"R"],[7774,"R"],[9415,"R"],[11364,"R"],[42842,"R"],[42882,"R"],[65330,"R"],[341,"r"],[343,"r"],[345,"r"],[529,"r"],[531,"r"],[589,"r"],[636,"r"],[637,"r"],[638,"r"],[639,"r"],[7523,"r"],[7538,"r"],[7539,"r"],[7561,"r"],[7769,"r"],[7771,"r"],[7773,"r"],[7775,"r"],[9441,"r"],[42843,"r"],[42883,"r"],[65362,"r"],[9389,"(r)"],[346,"S"],[348,"S"],[350,"S"],[352,"S"],[536,"S"],[7776,"S"],[7778,"S"],[7780,"S"],[7782,"S"],[7784,"S"],[9416,"S"],[42801,"S"],[42885,"S"],[65331,"S"],[347,"s"],[349,"s"],[351,"s"],[353,"s"],[383,"s"],[537,"s"],[575,"s"],[642,"s"],[7540,"s"],[7562,"s"],[7777,"s"],[7779,"s"],[7781,"s"],[7783,"s"],[7785,"s"],[7836,"s"],[7837,"s"],[9442,"s"],[42884,"s"],[65363,"s"],[7838,"SS"],[9390,"(s)"],[223,"ss"],[64262,"st"],[354,"T"],[356,"T"],[358,"T"],[428,"T"],[430,"T"],[538,"T"],[574,"T"],[7451,"T"],[7786,"T"],[7788,"T"],[7790,"T"],[7792,"T"],[9417,"T"],[42886,"T"],[65332,"T"],[355,"t"],[357,"t"],[359,"t"],[427,"t"],[429,"t"],[539,"t"],[566,"t"],[647,"t"],[648,"t"],[7541,"t"],[7787,"t"],[7789,"t"],[7791,"t"],[7793,"t"],[7831,"t"],[9443,"t"],[11366,"t"],[65364,"t"],[222,"TH"],[42854,"TH"],[42792,"TZ"],[9391,"(t)"],[680,"tc"],[254,"th"],[7546,"th"],[42855,"th"],[678,"ts"],[42793,"tz"],[217,"U"],[218,"U"],[219,"U"],[220,"U"],[360,"U"],[362,"U"],[364,"U"],[366,"U"],[368,"U"],[370,"U"],[431,"U"],[467,"U"],[469,"U"],[471,"U"],[473,"U"],[475,"U"],[532,"U"],[534,"U"],[580,"U"],[7452,"U"],[7550,"U"],[7794,"U"],[7796,"U"],[7798,"U"],[7800,"U"],[7802,"U"],[7908,"U"],[7910,"U"],[7912,"U"],[7914,"U"],[7916,"U"],[7918,"U"],[7920,"U"],[9418,"U"],[65333,"U"],[249,"u"],[250,"u"],[251,"u"],[252,"u"],[361,"u"],[363,"u"],[365,"u"],[367,"u"],[369,"u"],[371,"u"],[432,"u"],[468,"u"],[470,"u"],[472,"u"],[474,"u"],[476,"u"],[533,"u"],[535,"u"],[649,"u"],[7524,"u"],[7577,"u"],[7795,"u"],[7797,"u"],[7799,"u"],[7801,"u"],[7803,"u"],[7909,"u"],[7911,"u"],[7913,"u"],[7915,"u"],[7917,"u"],[7919,"u"],[7921,"u"],[9444,"u"],[65365,"u"],[9392,"(u)"],[7531,"ue"],[434,"V"],[581,"V"],[7456,"V"],[7804,"V"],[7806,"V"],[7932,"V"],[9419,"V"],[42846,"V"],[42856,"V"],[65334,"V"],[651,"v"],[652,"v"],[7525,"v"],[7564,"v"],[7805,"v"],[7807,"v"],[9445,"v"],[11377,"v"],[11380,"v"],[42847,"v"],[65366,"v"],[42848,"VY"],[9393,"(v)"],[42849,"vy"],[372,"W"],[503,"W"],[7457,"W"],[7808,"W"],[7810,"W"],[7812,"W"],[7814,"W"],[7816,"W"],[9420,"W"],[11378,"W"],[65335,"W"],[373,"w"],[447,"w"],[653,"w"],[7809,"w"],[7811,"w"],[7813,"w"],[7815,"w"],[7817,"w"],[7832,"w"],[9446,"w"],[11379,"w"],[65367,"w"],[9394,"(w)"],[7818,"X"],[7820,"X"],[9421,"X"],[65336,"X"],[7565,"x"],[7819,"x"],[7821,"x"],[8339,"x"],[9447,"x"],[65368,"x"],[9395,"(x)"],[221,"Y"],[374,"Y"],[376,"Y"],[435,"Y"],[562,"Y"],[590,"Y"],[655,"Y"],[7822,"Y"],[7922,"Y"],[7924,"Y"],[7926,"Y"],[7928,"Y"],[7934,"Y"],[9422,"Y"],[65337,"Y"],[253,"y"],[255,"y"],[375,"y"],[436,"y"],[563,"y"],[591,"y"],[654,"y"],[7823,"y"],[7833,"y"],[7923,"y"],[7925,"y"],[7927,"y"],[7929,"y"],[7935,"y"],[9448,"y"],[65369,"y"],[9396,"(y)"],[377,"Z"],[379,"Z"],[381,"Z"],[437,"Z"],[540,"Z"],[548,"Z"],[7458,"Z"],[7824,"Z"],[7826,"Z"],[7828,"Z"],[9423,"Z"],[11371,"Z"],[42850,"Z"],[65338,"Z"],[378,"z"],[380,"z"],[382,"z"],[438,"z"],[541,"z"],[549,"z"],[576,"z"],[656,"z"],[657,"z"],[7542,"z"],[7566,"z"],[7825,"z"],[7827,"z"],[7829,"z"],[9449,"z"],[11372,"z"],[42851,"z"],[65370,"z"],[9397,"(z)"],[8304,"0"],[8320,"0"],[9450,"0"],[9471,"0"],[65296,"0"],[185,"1"],[8321,"1"],[9312,"1"],[9461,"1"],[10102,"1"],[10112,"1"],[10122,"1"],[65297,"1"],[9352,"1."],[9332,"(1)"],[178,"2"],[8322,"2"],[9313,"2"],[9462,"2"],[10103,"2"],[10113,"2"],[10123,"2"],[65298,"2"],[9353,"2."],[9333,"(2)"],[179,"3"],[8323,"3"],[9314,"3"],[9463,"3"],[10104,"3"],[10114,"3"],[10124,"3"],[65299,"3"],[9354,"3."],[9334,"(3)"],[8308,"4"],[8324,"4"],[9315,"4"],[9464,"4"],[10105,"4"],[10115,"4"],[10125,"4"],[65300,"4"],[9355,"4."],[9335,"(4)"],[8309,"5"],[8325,"5"],[9316,"5"],[9465,"5"],[10106,"5"],[10116,"5"],[10126,"5"],[65301,"5"],[9356,"5."],[9336,"(5)"],[8310,"6"],[8326,"6"],[9317,"6"],[9466,"6"],[10107,"6"],[10117,"6"],[10127,"6"],[65302,"6"],[9357,"6."],[9337,"(6)"],[8311,"7"],[8327,"7"],[9318,"7"],[9467,"7"],[10108,"7"],[10118,"7"],[10128,"7"],[65303,"7"],[9358,"7."],[9338,"(7)"],[8312,"8"],[8328,"8"],[9319,"8"],[9468,"8"],[10109,"8"],[10119,"8"],[10129,"8"],[65304,"8"],[9359,"8."],[9339,"(8)"],[8313,"9"],[8329,"9"],[9320,"9"],[9469,"9"],[10110,"9"],[10120,"9"],[10130,"9"],[65305,"9"],[9360,"9."],[9340,"(9)"],[9321,"10"],[9470,"10"],[10111,"10"],[10121,"10"],[10131,"10"],[9361,"10."],[9341,"(10)"],[9322,"11"],[9451,"11"],[9362,"11."],[9342,"(11)"],[9323,"12"],[9452,"12"],[9363,"12."],[9343,"(12)"],[9324,"13"],[9453,"13"],[9364,"13."],[9344,"(13)"],[9325,"14"],[9454,"14"],[9365,"14."],[9345,"(14)"],[9326,"15"],[9455,"15"],[9366,"15."],[9346,"(15)"],[9327,"16"],[9456,"16"],[9367,"16."],[9347,"(16)"],[9328,"17"],[9457,"17"],[9368,"17."],[9348,"(17)"],[9329,"18"],[9458,"18"],[9369,"18."],[9349,"(18)"],[9330,"19"],[9459,"19"],[9370,"19."],[9350,"(19)"],[9331,"20"],[9460,"20"],[9371,"20."],[9351,"(20)"],[171,'"'],[187,'"'],[8220,'"'],[8221,'"'],[8222,'"'],[8243,'"'],[8246,'"'],[10077,'"'],[10078,'"'],[10094,'"'],[10095,'"'],[65282,'"'],[8216,"'"],[8217,"'"],[8218,"'"],[8219,"'"],[8242,"'"],[8245,"'"],[8249,"'"],[8250,"'"],[10075,"'"],[10076,"'"],[65287,"'"],[8208,"-"],[8209,"-"],[8210,"-"],[8211,"-"],[8212,"-"],[8315,"-"],[8331,"-"],[65293,"-"],[8261,"["],[10098,"["],[65339,"["],[8262,"]"],[10099,"]"],[65341,"]"],[8317,"("],[8333,"("],[10088,"("],[10090,"("],[65288,"("],[11816,"(("],[8318,")"],[8334,")"],[10089,")"],[10091,")"],[65289,")"],[11817,"))"],[10092,"<"],[10096,"<"],[65308,"<"],[10093,">"],[10097,">"],[65310,">"],[10100,"{"],[65371,"{"],[10101,"}"],[65373,"}"],[8314,"+"],[8330,"+"],[65291,"+"],[8316,"="],[8332,"="],[65309,"="],[65281,"!"],[8252,"!!"],[8265,"!?"],[65283,"#"],[65284,"$"],[8274,"%"],[65285,"%"],[65286,"&"],[8270,"*"],[65290,"*"],[65292,","],[65294,"."],[8260,"/"],[65295,"/"],[65306,":"],[8271,";"],[65307,";"],[65311,"?"],[8263,"??"],[8264,"?!"],[65312,"@"],[65340,"\\"],[8248,"^"],[65342,"^"],[65343,"_"],[8275,"~"],[65374,"~"]]),e.exports=n},function(e,t,n){(function(e,r){var i=n(40),o=n(9).Transform,a=n(9).PassThrough,s=n(50),l=n(17),u=n(10).EventEmitter,c=n(63);function f(){this.outputStream=new a,this.entries=[],this.outputStreamCursor=0,this.ended=!1,this.allDone=!1,this.forceZip64Eocd=!1}t.ZipFile=f,t.dateToDosDateTime=T,l.inherits(f,u),f.prototype.addFile=function(e,t,n){var r=this;t=w(t,!1),null==n&&(n={});var o=new v(t,!1,n);r.entries.push(o),i.stat(e,(function(t,a){return t?r.emit("error",t):a.isFile()?(o.uncompressedSize=a.size,null==n.mtime&&o.setLastModDate(a.mtime),null==n.mode&&o.setFileAttributesMode(a.mode),o.setFileDataPumpFunction((function(){var t=i.createReadStream(e);o.state=v.FILE_DATA_IN_PROGRESS,t.on("error",(function(e){r.emit("error",e)})),p(r,o,t)})),void g(r)):r.emit("error",new Error("not a file: "+e))}))},f.prototype.addReadStream=function(e,t,n){var r=this;null==n&&(n={});var i=new v(t=w(t,!1),!1,n);r.entries.push(i),i.setFileDataPumpFunction((function(){i.state=v.FILE_DATA_IN_PROGRESS,p(r,i,e)})),g(r)},f.prototype.addBuffer=function(t,n,r){var i=this;if(n=w(n,!1),t.length>1073741823)throw new Error("buffer too large: "+t.length+" > 1073741823");if(null==r&&(r={}),null!=r.size)throw new Error("options.size not allowed");var o=new v(n,!1,r);function a(t){o.compressedSize=t.length,o.setFileDataPumpFunction((function(){d(i,t),d(i,o.getDataDescriptor()),o.state=v.FILE_DATA_DONE,e((function(){g(i)}))})),g(i)}o.uncompressedSize=t.length,o.crc32=c.unsigned(t),o.crcAndFileSizeKnown=!0,i.entries.push(o),o.compress?s.deflateRaw(t,(function(e,t){a(t)})):a(t)},f.prototype.addEmptyDirectory=function(e,t){var n=this;if(e=w(e,!0),null==t&&(t={}),null!=t.size)throw new Error("options.size not allowed");if(null!=t.compress)throw new Error("options.compress not allowed");var r=new v(e,!0,t);n.entries.push(r),r.setFileDataPumpFunction((function(){d(n,r.getDataDescriptor()),r.state=v.FILE_DATA_DONE,g(n)})),g(n)};var h=U([80,75,5,6]);function d(e,t){e.outputStream.write(t),e.outputStreamCursor+=t.length}function p(e,t,n){var r=new F,i=new R,o=t.compress?new s.DeflateRaw:new a,l=new R;n.pipe(r).pipe(i).pipe(o).pipe(l).pipe(e.outputStream,{end:!1}),l.on("end",(function(){if(t.crc32=r.crc32,null==t.uncompressedSize)t.uncompressedSize=i.byteCount;else if(t.uncompressedSize!==i.byteCount)return e.emit("error",new Error("file data stream has unexpected number of bytes"));t.compressedSize=l.byteCount,e.outputStreamCursor+=t.compressedSize,d(e,t.getDataDescriptor()),t.state=v.FILE_DATA_DONE,g(e)}))}function g(e){if(!e.allDone){if(e.ended&&null!=e.finalSizeCallback){var t=function(e){for(var t=0,n=0,r=0;r<e.entries.length;r++){var i=e.entries[r];if(i.compress)return-1;if(i.state>=v.READY_TO_PUMP_FILE_DATA){if(null==i.uncompressedSize)return-1}else if(null==i.uncompressedSize)return null;i.relativeOffsetOfLocalHeader=t;var o=i.useZip64Format();t+=x+i.utf8FileName.length,t+=i.uncompressedSize,i.crcAndFileSizeKnown||(t+=o?A:S),n+=L+i.utf8FileName.length+i.fileComment.length,o&&(n+=O)}var a=0;(e.forceZip64Eocd||e.entries.length>=65535||n>=65535||t>=4294967295)&&(a+=m+y);return a+=b+e.comment.length,t+n+a}(e);null!=t&&(e.finalSizeCallback(t),e.finalSizeCallback=null)}var n=function(){for(var t=0;t<e.entries.length;t++){var n=e.entries[t];if(n.state<v.FILE_DATA_DONE)return n}return null}();if(null!=n){if(n.state<v.READY_TO_PUMP_FILE_DATA)return;if(n.state===v.FILE_DATA_IN_PROGRESS)return;n.relativeOffsetOfLocalHeader=e.outputStreamCursor;var i=n.getLocalFileHeader();d(e,i),n.doFileDataPump()}else e.ended&&(e.offsetOfStartOfCentralDirectory=e.outputStreamCursor,e.entries.forEach((function(t){var n=t.getCentralDirectoryRecord();d(e,n)})),d(e,function(e,t){var n=!1,i=e.entries.length;(e.forceZip64Eocd||e.entries.length>=65535)&&(i=65535,n=!0);var o=e.outputStreamCursor-e.offsetOfStartOfCentralDirectory,a=o;(e.forceZip64Eocd||o>=4294967295)&&(a=4294967295,n=!0);var s=e.offsetOfStartOfCentralDirectory;(e.forceZip64Eocd||e.offsetOfStartOfCentralDirectory>=4294967295)&&(s=4294967295,n=!0);if(t)return n?m+y+b:b;var l=N(b+e.comment.length);if(l.writeUInt32LE(101010256,0),l.writeUInt16LE(0,4),l.writeUInt16LE(0,6),l.writeUInt16LE(i,8),l.writeUInt16LE(i,10),l.writeUInt32LE(a,12),l.writeUInt32LE(s,16),l.writeUInt16LE(e.comment.length,20),e.comment.copy(l,22),!n)return l;var u=N(m);u.writeUInt32LE(101075792,0),I(u,m-12,4),u.writeUInt16LE(k,12),u.writeUInt16LE(E,14),u.writeUInt32LE(0,16),u.writeUInt32LE(0,20),I(u,e.entries.length,24),I(u,e.entries.length,32),I(u,o,40),I(u,e.offsetOfStartOfCentralDirectory,48);var c=N(y);return c.writeUInt32LE(117853008,0),c.writeUInt32LE(0,4),I(c,e.outputStreamCursor,8),c.writeUInt32LE(1,16),r.concat([u,c,l])}(e)),e.outputStream.end(),e.allDone=!0)}}f.prototype.end=function(e,t){if("function"==typeof e&&(t=e,e=null),null==e&&(e={}),!this.ended){if(this.ended=!0,this.finalSizeCallback=t,this.forceZip64Eocd=!!e.forceZip64Format,e.comment){if("string"==typeof e.comment?this.comment=function(e){if(/^[\x20-\x7e]*$/.test(e))return U(e,"utf-8");if(null==z){z={};for(var t=0;t<D.length;t++)z[D[t]]=t}var n=N(e.length);for(t=0;t<e.length;t++){var r=z[e[t]];if(null==r)throw new Error("character not encodable in CP437: "+JSON.stringify(e[t]));n[t]=r}return n}(e.comment):this.comment=e.comment,this.comment.length>65535)throw new Error("comment is too large");if(P(this.comment,h))throw new Error("comment contains end of central directory record signature")}else this.comment=_;g(this)}};var m=56,y=20,b=22;function w(e,t){if(""===e)throw new Error("empty metadataPath");if(e=e.replace(/\\/g,"/"),/^[a-zA-Z]:/.test(e)||/^\//.test(e))throw new Error("absolute path: "+e);if(-1!==e.split("/").indexOf(".."))throw new Error("invalid relative path: "+e);var n=/\/$/.test(e);if(t)n||(e+="/");else if(n)throw new Error("file path cannot end with '/': "+e);return e}var _=N(0);function v(e,t,n){if(this.utf8FileName=U(e),this.utf8FileName.length>65535)throw new Error("utf8 file name too long. "+utf8FileName.length+" > 65535");if(this.isDirectory=t,this.state=v.WAITING_FOR_METADATA,this.setLastModDate(null!=n.mtime?n.mtime:new Date),null!=n.mode?this.setFileAttributesMode(n.mode):this.setFileAttributesMode(t?16893:33204),t?(this.crcAndFileSizeKnown=!0,this.crc32=0,this.uncompressedSize=0,this.compressedSize=0):(this.crcAndFileSizeKnown=!1,this.crc32=null,this.uncompressedSize=null,this.compressedSize=null,null!=n.size&&(this.uncompressedSize=n.size)),t?this.compress=!1:(this.compress=!0,null!=n.compress&&(this.compress=!!n.compress)),this.forceZip64Format=!!n.forceZip64Format,n.fileComment){if("string"==typeof n.fileComment?this.fileComment=U(n.fileComment,"utf-8"):this.fileComment=n.fileComment,this.fileComment.length>65535)throw new Error("fileComment is too large")}else this.fileComment=_}v.WAITING_FOR_METADATA=0,v.READY_TO_PUMP_FILE_DATA=1,v.FILE_DATA_IN_PROGRESS=2,v.FILE_DATA_DONE=3,v.prototype.setLastModDate=function(e){var t=T(e);this.lastModFileTime=t.time,this.lastModFileDate=t.date},v.prototype.setFileAttributesMode=function(e){if((65535&e)!==e)throw new Error("invalid mode. expected: 0 <= "+e+" <= 65535");this.externalFileAttributes=e<<16>>>0},v.prototype.setFileDataPumpFunction=function(e){this.doFileDataPump=e,this.state=v.READY_TO_PUMP_FILE_DATA},v.prototype.useZip64Format=function(){return this.forceZip64Format||null!=this.uncompressedSize&&this.uncompressedSize>4294967294||null!=this.compressedSize&&this.compressedSize>4294967294||null!=this.relativeOffsetOfLocalHeader&&this.relativeOffsetOfLocalHeader>4294967294};var x=30,E=45,k=831;v.prototype.getLocalFileHeader=function(){var e=0,t=0,n=0;this.crcAndFileSizeKnown&&(e=this.crc32,t=this.compressedSize,n=this.uncompressedSize);var i=N(x),o=2048;return this.crcAndFileSizeKnown||(o|=8),i.writeUInt32LE(67324752,0),i.writeUInt16LE(20,4),i.writeUInt16LE(o,6),i.writeUInt16LE(this.getCompressionMethod(),8),i.writeUInt16LE(this.lastModFileTime,10),i.writeUInt16LE(this.lastModFileDate,12),i.writeUInt32LE(e,14),i.writeUInt32LE(t,18),i.writeUInt32LE(n,22),i.writeUInt16LE(this.utf8FileName.length,26),i.writeUInt16LE(0,28),r.concat([i,this.utf8FileName])};var S=16,A=24;v.prototype.getDataDescriptor=function(){return this.crcAndFileSizeKnown?_:this.useZip64Format()?((e=N(A)).writeUInt32LE(134695760,0),e.writeUInt32LE(this.crc32,4),I(e,this.compressedSize,8),I(e,this.uncompressedSize,16),e):((e=N(S)).writeUInt32LE(134695760,0),e.writeUInt32LE(this.crc32,4),e.writeUInt32LE(this.compressedSize,8),e.writeUInt32LE(this.uncompressedSize,12),e);var e};var L=46,O=28;function T(e){var t=0;t|=31&e.getDate(),t|=(e.getMonth()+1&15)<<5,t|=(e.getFullYear()-1980&127)<<9;var n=0;return n|=Math.floor(e.getSeconds()/2),n|=(63&e.getMinutes())<<5,{date:t,time:n|=(31&e.getHours())<<11}}function I(e,t,n){var r=Math.floor(t/4294967296),i=t%4294967296;e.writeUInt32LE(i,n),e.writeUInt32LE(r,n+4)}function R(e){o.call(this,e),this.byteCount=0}function F(e){o.call(this,e),this.crc32=0}v.prototype.getCentralDirectoryRecord=function(){var e=N(L),t=2048;this.crcAndFileSizeKnown||(t|=8);var n,i,o=this.compressedSize,a=this.uncompressedSize,s=this.relativeOffsetOfLocalHeader;return this.useZip64Format()?(o=4294967295,a=4294967295,s=4294967295,n=E,(i=N(O)).writeUInt16LE(1,0),i.writeUInt16LE(O-4,2),I(i,this.uncompressedSize,4),I(i,this.compressedSize,12),I(i,this.relativeOffsetOfLocalHeader,20)):(n=20,i=_),e.writeUInt32LE(33639248,0),e.writeUInt16LE(k,4),e.writeUInt16LE(n,6),e.writeUInt16LE(t,8),e.writeUInt16LE(this.getCompressionMethod(),10),e.writeUInt16LE(this.lastModFileTime,12),e.writeUInt16LE(this.lastModFileDate,14),e.writeUInt32LE(this.crc32,16),e.writeUInt32LE(o,20),e.writeUInt32LE(a,24),e.writeUInt16LE(this.utf8FileName.length,28),e.writeUInt16LE(i.length,30),e.writeUInt16LE(this.fileComment.length,32),e.writeUInt16LE(0,34),e.writeUInt16LE(0,36),e.writeUInt32LE(this.externalFileAttributes,38),e.writeUInt32LE(s,42),r.concat([e,this.utf8FileName,i,this.fileComment])},v.prototype.getCompressionMethod=function(){return this.compress?8:0},l.inherits(R,o),R.prototype._transform=function(e,t,n){this.byteCount+=e.length,n(null,e)},l.inherits(F,o),F.prototype._transform=function(e,t,n){this.crc32=c.unsigned(e,this.crc32),n(null,e)};var D="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";if(256!==D.length)throw new Error("assertion failure");var z=null;function N(e){N=function(e){return r.allocUnsafe(e)};try{return N(e)}catch(t){return(N=function(e){return new r(e)})(e)}}function U(e,t){U=function(e,t){return r.from(e,t)};try{return U(e,t)}catch(n){return(U=function(e,t){return new r(e,t)})(e,t)}}function P(e,t){P=function(e,t){return e.includes(t)};try{return P(e,t)}catch(n){return(P=function(e,t){for(var n=0;n<=e.length-t.length;n++)for(var r=0;;r++){if(r===t.length)return!0;if(e[n+r]!==t[r])break}return!1})(e,t)}}}).call(this,n(23).setImmediate,n(1).Buffer)},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,a,s,l=1,u={},c=!1,f=e.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(e);h=h&&h.setTimeout?h:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){o.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(p,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),h.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return u[l]=i,r(l),l++},h.clearImmediate=d}function d(e){delete u[e]}function p(e){if(c)setTimeout(p,0,e);else{var t=u[e];if(t){c=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{d(e),c=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(3),n(2))},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(12).Buffer,i=n(43);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,i,o=r.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=o,i=s,t.copy(n,i),s+=a.data.length,a=a.next;return o},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},function(e,t){},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(3))},function(e,t,n){"use strict";e.exports=o;var r=n(28),i=Object.create(n(7));function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}i.inherits=n(5),i.inherits(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(16)},function(e,t,n){e.exports=n(4)},function(e,t,n){e.exports=n(15).Transform},function(e,t,n){e.exports=n(15).PassThrough},function(e,t,n){"use strict";(function(e){var r=n(1).Buffer,i=n(9).Transform,o=n(51),a=n(17),s=n(29).ok,l=n(1).kMaxLength,u="Cannot create final Buffer. It would be larger than 0x"+l.toString(16)+" bytes";o.Z_MIN_WINDOWBITS=8,o.Z_MAX_WINDOWBITS=15,o.Z_DEFAULT_WINDOWBITS=15,o.Z_MIN_CHUNK=64,o.Z_MAX_CHUNK=1/0,o.Z_DEFAULT_CHUNK=16384,o.Z_MIN_MEMLEVEL=1,o.Z_MAX_MEMLEVEL=9,o.Z_DEFAULT_MEMLEVEL=8,o.Z_MIN_LEVEL=-1,o.Z_MAX_LEVEL=9,o.Z_DEFAULT_LEVEL=o.Z_DEFAULT_COMPRESSION;for(var c=Object.keys(o),f=0;f<c.length;f++){var h=c[f];h.match(/^Z/)&&Object.defineProperty(t,h,{enumerable:!0,value:o[h],writable:!1})}for(var d={Z_OK:o.Z_OK,Z_STREAM_END:o.Z_STREAM_END,Z_NEED_DICT:o.Z_NEED_DICT,Z_ERRNO:o.Z_ERRNO,Z_STREAM_ERROR:o.Z_STREAM_ERROR,Z_DATA_ERROR:o.Z_DATA_ERROR,Z_MEM_ERROR:o.Z_MEM_ERROR,Z_BUF_ERROR:o.Z_BUF_ERROR,Z_VERSION_ERROR:o.Z_VERSION_ERROR},p=Object.keys(d),g=0;g<p.length;g++){var m=p[g];d[d[m]]=m}function y(e,t,n){var i=[],o=0;function a(){for(var t;null!==(t=e.read());)i.push(t),o+=t.length;e.once("readable",a)}function s(){var t,a=null;o>=l?a=new RangeError(u):t=r.concat(i,o),i=[],e.close(),n(a,t)}e.on("error",(function(t){e.removeListener("end",s),e.removeListener("readable",a),n(t)})),e.on("end",s),e.end(t),a()}function b(e,t){if("string"==typeof t&&(t=r.from(t)),!r.isBuffer(t))throw new TypeError("Not a string or buffer");var n=e._finishFlushFlag;return e._processChunk(t,n)}function w(e){if(!(this instanceof w))return new w(e);L.call(this,e,o.DEFLATE)}function _(e){if(!(this instanceof _))return new _(e);L.call(this,e,o.INFLATE)}function v(e){if(!(this instanceof v))return new v(e);L.call(this,e,o.GZIP)}function x(e){if(!(this instanceof x))return new x(e);L.call(this,e,o.GUNZIP)}function E(e){if(!(this instanceof E))return new E(e);L.call(this,e,o.DEFLATERAW)}function k(e){if(!(this instanceof k))return new k(e);L.call(this,e,o.INFLATERAW)}function S(e){if(!(this instanceof S))return new S(e);L.call(this,e,o.UNZIP)}function A(e){return e===o.Z_NO_FLUSH||e===o.Z_PARTIAL_FLUSH||e===o.Z_SYNC_FLUSH||e===o.Z_FULL_FLUSH||e===o.Z_FINISH||e===o.Z_BLOCK}function L(e,n){var a=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,i.call(this,e),e.flush&&!A(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!A(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||o.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:o.Z_FINISH,e.chunkSize&&(e.chunkSize<t.Z_MIN_CHUNK||e.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<t.Z_MIN_WINDOWBITS||e.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<t.Z_MIN_LEVEL||e.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<t.Z_MIN_MEMLEVEL||e.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!r.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new o.Zlib(n);var s=this;this._hadError=!1,this._handle.onerror=function(e,n){O(s),s._hadError=!0;var r=new Error(e);r.errno=n,r.code=t.codes[n],s.emit("error",r)};var l=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(l=e.level);var u=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(u=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,l,e.memLevel||t.Z_DEFAULT_MEMLEVEL,u,e.dictionary),this._buffer=r.allocUnsafe(this._chunkSize),this._offset=0,this._level=l,this._strategy=u,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!a._handle},configurable:!0,enumerable:!0})}function O(t,n){n&&e.nextTick(n),t._handle&&(t._handle.close(),t._handle=null)}function T(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(d),writable:!1}),t.Deflate=w,t.Inflate=_,t.Gzip=v,t.Gunzip=x,t.DeflateRaw=E,t.InflateRaw=k,t.Unzip=S,t.createDeflate=function(e){return new w(e)},t.createInflate=function(e){return new _(e)},t.createDeflateRaw=function(e){return new E(e)},t.createInflateRaw=function(e){return new k(e)},t.createGzip=function(e){return new v(e)},t.createGunzip=function(e){return new x(e)},t.createUnzip=function(e){return new S(e)},t.deflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new w(t),e,n)},t.deflateSync=function(e,t){return b(new w(t),e)},t.gzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new v(t),e,n)},t.gzipSync=function(e,t){return b(new v(t),e)},t.deflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new E(t),e,n)},t.deflateRawSync=function(e,t){return b(new E(t),e)},t.unzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new S(t),e,n)},t.unzipSync=function(e,t){return b(new S(t),e)},t.inflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new _(t),e,n)},t.inflateSync=function(e,t){return b(new _(t),e)},t.gunzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new x(t),e,n)},t.gunzipSync=function(e,t){return b(new x(t),e)},t.inflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),y(new k(t),e,n)},t.inflateRawSync=function(e,t){return b(new k(t),e)},a.inherits(L,i),L.prototype.params=function(n,r,i){if(n<t.Z_MIN_LEVEL||n>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+n);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==n||this._strategy!==r){var a=this;this.flush(o.Z_SYNC_FLUSH,(function(){s(a._handle,"zlib binding closed"),a._handle.params(n,r),a._hadError||(a._level=n,a._strategy=r,i&&i())}))}else e.nextTick(i)},L.prototype.reset=function(){return s(this._handle,"zlib binding closed"),this._handle.reset()},L.prototype._flush=function(e){this._transform(r.alloc(0),"",e)},L.prototype.flush=function(t,n){var i=this,a=this._writableState;("function"==typeof t||void 0===t&&!n)&&(n=t,t=o.Z_FULL_FLUSH),a.ended?n&&e.nextTick(n):a.ending?n&&this.once("end",n):a.needDrain?n&&this.once("drain",(function(){return i.flush(t,n)})):(this._flushFlag=t,this.write(r.alloc(0),"",n))},L.prototype.close=function(t){O(this,t),e.nextTick(T,this)},L.prototype._transform=function(e,t,n){var i,a=this._writableState,s=(a.ending||a.ended)&&(!e||a.length===e.length);return null===e||r.isBuffer(e)?this._handle?(s?i=this._finishFlushFlag:(i=this._flushFlag,e.length>=a.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),void this._processChunk(e,i,n)):n(new Error("zlib binding closed")):n(new Error("invalid input"))},L.prototype._processChunk=function(e,t,n){var i=e&&e.length,o=this._chunkSize-this._offset,a=0,c=this,f="function"==typeof n;if(!f){var h,d=[],p=0;this.on("error",(function(e){h=e})),s(this._handle,"zlib binding closed");do{var g=this._handle.writeSync(t,e,a,i,this._buffer,this._offset,o)}while(!this._hadError&&b(g[0],g[1]));if(this._hadError)throw h;if(p>=l)throw O(this),new RangeError(u);var m=r.concat(d,p);return O(this),m}s(this._handle,"zlib binding closed");var y=this._handle.write(t,e,a,i,this._buffer,this._offset,o);function b(l,u){if(this&&(this.buffer=null,this.callback=null),!c._hadError){var h=o-u;if(s(h>=0,"have should not go down"),h>0){var g=c._buffer.slice(c._offset,c._offset+h);c._offset+=h,f?c.push(g):(d.push(g),p+=g.length)}if((0===u||c._offset>=c._chunkSize)&&(o=c._chunkSize,c._offset=0,c._buffer=r.allocUnsafe(c._chunkSize)),0===u){if(a+=i-l,i=l,!f)return!0;var m=c._handle.write(t,e,a,i,c._buffer,c._offset,c._chunkSize);return m.callback=b,void(m.buffer=e)}if(!f)return!1;n()}}y.buffer=e,y.callback=b},a.inherits(w,L),a.inherits(_,L),a.inherits(v,L),a.inherits(x,L),a.inherits(E,L),a.inherits(k,L),a.inherits(S,L)}).call(this,n(2))},function(e,t,n){"use strict";(function(e,r){var i=n(29),o=n(55),a=n(56),s=n(59),l=n(62);for(var u in l)t[u]=l[u];t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7;function c(e){if("number"!=typeof e||e<t.DEFLATE||e>t.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}c.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,i(this.init_done,"close before init"),i(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?a.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||s.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},c.prototype.write=function(e,t,n,r,i,o,a){return this._write(!0,e,t,n,r,i,o,a)},c.prototype.writeSync=function(e,t,n,r,i,o,a){return this._write(!1,e,t,n,r,i,o,a)},c.prototype._write=function(n,o,a,s,l,u,c,f){if(i.equal(arguments.length,8),i(this.init_done,"write before init"),i(this.mode!==t.NONE,"already finalized"),i.equal(!1,this.write_in_progress,"write already in progress"),i.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,i.equal(!1,void 0===o,"must provide flush value"),this.write_in_progress=!0,o!==t.Z_NO_FLUSH&&o!==t.Z_PARTIAL_FLUSH&&o!==t.Z_SYNC_FLUSH&&o!==t.Z_FULL_FLUSH&&o!==t.Z_FINISH&&o!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==a&&(a=e.alloc(0),l=0,s=0),this.strm.avail_in=l,this.strm.input=a,this.strm.next_in=s,this.strm.avail_out=f,this.strm.output=u,this.strm.next_out=c,this.flush=o,!n)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return r.nextTick((function(){h._process(),h._after()})),this},c.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},c.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=a.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},c.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},c.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},c.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},c.prototype.init=function(e,n,r,o,a){i(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),i(e>=8&&e<=15,"invalid windowBits"),i(n>=-1&&n<=9,"invalid compression level"),i(r>=1&&r<=9,"invalid memlevel"),i(o===t.Z_FILTERED||o===t.Z_HUFFMAN_ONLY||o===t.Z_RLE||o===t.Z_FIXED||o===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(n,e,r,o,a),this._setDictionary()},c.prototype.params=function(){throw new Error("deflateParams Not supported")},c.prototype.reset=function(){this._reset(),this._setDictionary()},c.prototype._init=function(e,n,r,i,l){switch(this.level=e,this.windowBits=n,this.memLevel=r,this.strategy=i,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new o,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=a.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=l,this.write_in_progress=!1,this.init_done=!0},c.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=a.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},c.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=a.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=c}).call(this,n(1).Buffer,n(2))},function(e,t,n){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,l=a(e),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))i.call(n,c)&&(l[c]=n[c]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(l[s[f]]=n[s[f]])}}return l}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(e,t,n){"use strict";var r,i=n(13),o=n(57),a=n(30),s=n(31),l=n(58);function u(e,t){return e.msg=l[t],t}function c(e){return(e<<1)-(e>4?9:0)}function f(e){for(var t=e.length;--t>=0;)e[t]=0}function h(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function d(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,h(e.strm)}function p(e,t){e.pending_buf[e.pending++]=t}function g(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function m(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,u=e.window,c=e.w_mask,f=e.prev,h=e.strstart+258,d=u[o+a-1],p=u[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(u[(n=t)+a]===p&&u[n+a-1]===d&&u[n]===u[o]&&u[++n]===u[o+1]){o+=2,n++;do{}while(u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&o<h);if(r=258-(h-o),o=h-258,r>a){if(e.match_start=t,a=r,r>=s)break;d=u[o+a-1],p=u[o+a]}}}while((t=f[t&c])>l&&0!=--i);return a<=e.lookahead?a:e.lookahead}function y(e){var t,n,r,o,l,u,c,f,h,d,p=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=p+(p-262)){i.arraySet(e.window,e.window,p,p,0),e.match_start-=p,e.strstart-=p,e.block_start-=p,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=p?r-p:0}while(--n);t=n=p;do{r=e.prev[--t],e.prev[t]=r>=p?r-p:0}while(--n);o+=p}if(0===e.strm.avail_in)break;if(u=e.strm,c=e.window,f=e.strstart+e.lookahead,h=o,d=void 0,(d=u.avail_in)>h&&(d=h),n=0===d?0:(u.avail_in-=d,i.arraySet(c,u.input,u.next_in,d,f),1===u.state.wrap?u.adler=a(u.adler,c,d,f):2===u.state.wrap&&(u.adler=s(u.adler,c,d,f)),u.next_in+=d,u.total_in+=d,d),e.lookahead+=n,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function b(e,t){for(var n,r;;){if(e.lookahead<262){if(y(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=m(e,n)),e.match_length>=3)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(d(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(d(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}function w(e,t){for(var n,r,i;;){if(e.lookahead<262){if(y(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=m(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(d(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=o._tr_tally(e,0,e.window[e.strstart-1]))&&d(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(d(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}function _(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function v(){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=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),f(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 x(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):u(e,-2)}function E(e){var t,n=x(e);return 0===n&&((t=e.state).window_size=2*t.w_size,f(t.head),t.max_lazy_match=r[t.level].max_lazy,t.good_match=r[t.level].good_length,t.nice_match=r[t.level].nice_length,t.max_chain_length=r[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n}function k(e,t,n,r,o,a){if(!e)return-2;var s=1;if(-1===t&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),o<1||o>9||8!==n||r<8||r>15||t<0||t>9||a<0||a>4)return u(e,-2);8===r&&(r=9);var l=new v;return e.state=l,l.strm=e,l.wrap=s,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=o+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new i.Buf8(2*l.w_size),l.head=new i.Buf16(l.hash_size),l.prev=new i.Buf16(l.w_size),l.lit_bufsize=1<<o+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new i.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=t,l.strategy=a,l.method=n,E(e)}r=[new _(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(y(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,d(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(d(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(d(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(d(e,!1),e.strm.avail_out),1)})),new _(4,4,8,4,b),new _(4,5,16,8,b),new _(4,6,32,32,b),new _(4,4,16,16,w),new _(8,16,32,32,w),new _(8,16,128,128,w),new _(8,32,128,256,w),new _(32,128,258,1024,w),new _(32,258,258,4096,w)],t.deflateInit=function(e,t){return k(e,t,8,15,8,0)},t.deflateInit2=k,t.deflateReset=E,t.deflateResetKeep=x,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?-2:(e.state.gzhead=t,0):-2},t.deflate=function(e,t){var n,i,a,l;if(!e||!e.state||t>5||t<0)return e?u(e,-2):-2;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return u(e,0===e.avail_out?-5:-2);if(i.strm=e,n=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,p(i,31),p(i,139),p(i,8),i.gzhead?(p(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),p(i,255&i.gzhead.time),p(i,i.gzhead.time>>8&255),p(i,i.gzhead.time>>16&255),p(i,i.gzhead.time>>24&255),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(p(i,255&i.gzhead.extra.length),p(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(p(i,0),p(i,0),p(i,0),p(i,0),p(i,0),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,3),i.status=113);else{var m=8+(i.w_bits-8<<4)<<8;m|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(m|=32),m+=31-m%31,i.status=113,g(i,m),0!==i.strstart&&(g(i,e.adler>>>16),g(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),h(e),a=i.pending,i.pending!==i.pending_buf_size));)p(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),h(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,p(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),h(e),a=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,p(i,l)}while(0!==l);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&h(e),i.pending+2<=i.pending_buf_size&&(p(i,255&e.adler),p(i,e.adler>>8&255),e.adler=0,i.status=113)):i.status=113),0!==i.pending){if(h(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&c(t)<=c(n)&&4!==t)return u(e,-5);if(666===i.status&&0!==e.avail_in)return u(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var b=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(y(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(d(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(d(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var n,r,i,a,s=e.window;;){if(e.lookahead<=258){if(y(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){a=e.strstart+258;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<a);e.match_length=258-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(d(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(d(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==b&&4!==b||(i.status=666),1===b||3===b)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===b&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(f(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),h(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(p(i,255&e.adler),p(i,e.adler>>8&255),p(i,e.adler>>16&255),p(i,e.adler>>24&255),p(i,255&e.total_in),p(i,e.total_in>>8&255),p(i,e.total_in>>16&255),p(i,e.total_in>>24&255)):(g(i,e.adler>>>16),g(i,65535&e.adler)),h(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?u(e,-2):(e.state=null,113===t?u(e,-3):0):-2},t.deflateSetDictionary=function(e,t){var n,r,o,s,l,u,c,h,d=t.length;if(!e||!e.state)return-2;if(2===(s=(n=e.state).wrap)||1===s&&42!==n.status||n.lookahead)return-2;for(1===s&&(e.adler=a(e.adler,t,d,0)),n.wrap=0,d>=n.w_size&&(0===s&&(f(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new i.Buf8(n.w_size),i.arraySet(h,t,d-n.w_size,n.w_size,0),t=h,d=n.w_size),l=e.avail_in,u=e.next_in,c=e.input,e.avail_in=d,e.next_in=0,e.input=t,y(n);n.lookahead>=3;){r=n.strstart,o=n.lookahead-2;do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--o);n.strstart=r,n.lookahead=2,y(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=u,e.input=c,e.avail_in=l,n.wrap=s,0},t.deflateInfo="pako deflate (from Nodeca project)"},function(e,t,n){"use strict";var r=n(13);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=[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],a=[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],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],l=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);i(u);var c=new Array(60);i(c);var f=new Array(512);i(f);var h=new Array(256);i(h);var d=new Array(29);i(d);var p,g,m,y=new Array(30);function b(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function w(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function _(e){return e<256?f[e]:f[256+(e>>>7)]}function v(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function x(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,v(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function E(e,t,n){x(e,n[2*t],n[2*t+1])}function k(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function S(e,t,n){var r,i,o=new Array(16),a=0;for(r=1;r<=15;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=k(o[s]++,s))}}function A(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function L(e){e.bi_valid>8?v(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function O(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function T(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&O(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!O(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function I(e,t,n){var r,i,s,l,u=0;if(0!==e.last_lit)do{r=e.pending_buf[e.d_buf+2*u]<<8|e.pending_buf[e.d_buf+2*u+1],i=e.pending_buf[e.l_buf+u],u++,0===r?E(e,i,t):(E(e,(s=h[i])+256+1,t),0!==(l=o[s])&&x(e,i-=d[s],l),E(e,s=_(--r),n),0!==(l=a[s])&&x(e,r-=y[s],l))}while(u<e.last_lit);E(e,256,t)}function R(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<l;n++)0!==o[2*n]?(e.heap[++e.heap_len]=u=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=u,n=e.heap_len>>1;n>=1;n--)T(e,o,n);i=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],T(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,T(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,g=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=l[2*l[2*(r=e.heap[n])+1]+1]+1)>p&&(o=p,g++),l[2*r+1]=o,r>u||(e.bl_count[o]++,a=0,r>=d&&(a=h[r-d]),s=l[2*r],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(c[2*r+1]+a)));if(0!==g){do{for(o=p-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[p]--,g-=2}while(g>0);for(o=p;0!==o;o--)for(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>u||(l[2*i+1]!==o&&(e.opt_len+=(o-l[2*i+1])*l[2*i],l[2*i+1]=o),r--)}}(e,t),S(o,u,e.bl_count)}function F(e,t,n){var r,i,o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<l&&i===a||(s<u?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,o=i,0===a?(l=138,u=3):i===a?(l=6,u=3):(l=7,u=4))}function D(e,t,n){var r,i,o=-1,a=t[1],s=0,l=7,u=4;for(0===a&&(l=138,u=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<l&&i===a)){if(s<u)do{E(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==o&&(E(e,i,e.bl_tree),s--),E(e,16,e.bl_tree),x(e,s-3,2)):s<=10?(E(e,17,e.bl_tree),x(e,s-3,3)):(E(e,18,e.bl_tree),x(e,s-11,7));s=0,o=i,0===a?(l=138,u=3):i===a?(l=6,u=3):(l=7,u=4)}}i(y);var z=!1;function N(e,t,n,i){x(e,0+(i?1:0),3),function(e,t,n,i){L(e),i&&(v(e,n),v(e,~n)),r.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}t._tr_init=function(e){z||(!function(){var e,t,n,r,i,l=new Array(16);for(n=0,r=0;r<28;r++)for(d[r]=n,e=0;e<1<<o[r];e++)h[n++]=r;for(h[n-1]=r,i=0,r=0;r<16;r++)for(y[r]=i,e=0;e<1<<a[r];e++)f[i++]=r;for(i>>=7;r<30;r++)for(y[r]=i<<7,e=0;e<1<<a[r]-7;e++)f[256+i++]=r;for(t=0;t<=15;t++)l[t]=0;for(e=0;e<=143;)u[2*e+1]=8,e++,l[8]++;for(;e<=255;)u[2*e+1]=9,e++,l[9]++;for(;e<=279;)u[2*e+1]=7,e++,l[7]++;for(;e<=287;)u[2*e+1]=8,e++,l[8]++;for(S(u,287,l),e=0;e<30;e++)c[2*e+1]=5,c[2*e]=k(e,5);p=new b(u,o,257,286,15),g=new b(c,a,0,30,15),m=new b(new Array(0),s,0,19,7)}(),z=!0),e.l_desc=new w(e.dyn_ltree,p),e.d_desc=new w(e.dyn_dtree,g),e.bl_desc=new w(e.bl_tree,m),e.bi_buf=0,e.bi_valid=0,A(e)},t._tr_stored_block=N,t._tr_flush_block=function(e,t,n,r){var i,o,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),R(e,e.l_desc),R(e,e.d_desc),a=function(e){var t;for(F(e,e.dyn_ltree,e.l_desc.max_code),F(e,e.dyn_dtree,e.d_desc.max_code),R(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*l[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?N(e,t,n,r):4===e.strategy||o===i?(x(e,2+(r?1:0),3),I(e,u,c)):(x(e,4+(r?1:0),3),function(e,t,n,r){var i;for(x(e,t-257,5),x(e,n-1,5),x(e,r-4,4),i=0;i<r;i++)x(e,e.bl_tree[2*l[i]+1],3);D(e,e.dyn_ltree,t-1),D(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),I(e,e.dyn_ltree,e.dyn_dtree)),A(e),r&&L(e)},t._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(h[n]+256+1)]++,e.dyn_dtree[2*_(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){x(e,2,3),E(e,256,u),function(e){16===e.bi_valid?(v(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},function(e,t,n){"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"}},function(e,t,n){"use strict";var r=n(13),i=n(30),o=n(31),a=n(60),s=n(61);function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):-2}function f(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,c(e)):-2}function h(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,f(e))):-2}function d(e,t){var n,r;return e?(r=new u,e.state=r,r.window=null,0!==(n=h(e,t))&&(e.state=null),n):-2}var p,g,m=!0;function y(e){if(m){var t;for(p=new r.Buf32(512),g=new r.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,p,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,g,0,e.work,{bits:5}),m=!1}e.lencode=p,e.lenbits=9,e.distcode=g,e.distbits=5}function b(e,t,n,i){var o,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new r.Buf8(a.wsize)),i>=a.wsize?(r.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),r.arraySet(a.window,t,n-i,o,a.wnext),(i-=o)?(r.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0}t.inflateReset=f,t.inflateReset2=h,t.inflateResetKeep=c,t.inflateInit=function(e){return d(e,15)},t.inflateInit2=d,t.inflate=function(e,t){var n,u,c,f,h,d,p,g,m,w,_,v,x,E,k,S,A,L,O,T,I,R,F,D,z=0,N=new r.Buf8(4),U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),h=e.next_out,c=e.output,p=e.avail_out,f=e.next_in,u=e.input,d=e.avail_in,g=n.hold,m=n.bits,w=d,_=p,R=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap){n.mode=13;break}for(;m<16;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}if(2&n.wrap&&35615===g){n.check=0,N[0]=255&g,N[1]=g>>>8&255,n.check=o(n.check,N,2,0),g=0,m=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&g)<<8)+(g>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&g)){e.msg="unknown compression method",n.mode=30;break}if(m-=4,I=8+(15&(g>>>=4)),0===n.wbits)n.wbits=I;else if(I>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<I,e.adler=n.check=1,n.mode=512&g?10:12,g=0,m=0;break;case 2:for(;m<16;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}if(n.flags=g,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=g>>8&1),512&n.flags&&(N[0]=255&g,N[1]=g>>>8&255,n.check=o(n.check,N,2,0)),g=0,m=0,n.mode=3;case 3:for(;m<32;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}n.head&&(n.head.time=g),512&n.flags&&(N[0]=255&g,N[1]=g>>>8&255,N[2]=g>>>16&255,N[3]=g>>>24&255,n.check=o(n.check,N,4,0)),g=0,m=0,n.mode=4;case 4:for(;m<16;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}n.head&&(n.head.xflags=255&g,n.head.os=g>>8),512&n.flags&&(N[0]=255&g,N[1]=g>>>8&255,n.check=o(n.check,N,2,0)),g=0,m=0,n.mode=5;case 5:if(1024&n.flags){for(;m<16;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}n.length=g,n.head&&(n.head.extra_len=g),512&n.flags&&(N[0]=255&g,N[1]=g>>>8&255,n.check=o(n.check,N,2,0)),g=0,m=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((v=n.length)>d&&(v=d),v&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,u,f,v,I)),512&n.flags&&(n.check=o(n.check,u,v,f)),d-=v,f+=v,n.length-=v),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===d)break e;v=0;do{I=u[f+v++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I))}while(I&&v<d);if(512&n.flags&&(n.check=o(n.check,u,v,f)),d-=v,f+=v,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===d)break e;v=0;do{I=u[f+v++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I))}while(I&&v<d);if(512&n.flags&&(n.check=o(n.check,u,v,f)),d-=v,f+=v,I)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;m<16;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}if(g!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}g=0,m=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;m<32;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}e.adler=n.check=l(g),g=0,m=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=h,e.avail_out=p,e.next_in=f,e.avail_in=d,n.hold=g,n.bits=m,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last){g>>>=7&m,m-=7&m,n.mode=27;break}for(;m<3;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}switch(n.last=1&g,m-=1,3&(g>>>=1)){case 0:n.mode=14;break;case 1:if(y(n),n.mode=20,6===t){g>>>=2,m-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}g>>>=2,m-=2;break;case 14:for(g>>>=7&m,m-=7&m;m<32;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}if((65535&g)!=(g>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&g,g=0,m=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(v=n.length){if(v>d&&(v=d),v>p&&(v=p),0===v)break e;r.arraySet(c,u,f,v,h),d-=v,f+=v,p-=v,h+=v,n.length-=v;break}n.mode=12;break;case 17:for(;m<14;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}if(n.nlen=257+(31&g),g>>>=5,m-=5,n.ndist=1+(31&g),g>>>=5,m-=5,n.ncode=4+(15&g),g>>>=4,m-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;m<3;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}n.lens[U[n.have++]]=7&g,g>>>=3,m-=3}for(;n.have<19;)n.lens[U[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,F={bits:n.lenbits},R=s(0,n.lens,0,19,n.lencode,0,n.work,F),n.lenbits=F.bits,R){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;S=(z=n.lencode[g&(1<<n.lenbits)-1])>>>16&255,A=65535&z,!((k=z>>>24)<=m);){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}if(A<16)g>>>=k,m-=k,n.lens[n.have++]=A;else{if(16===A){for(D=k+2;m<D;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}if(g>>>=k,m-=k,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}I=n.lens[n.have-1],v=3+(3&g),g>>>=2,m-=2}else if(17===A){for(D=k+3;m<D;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}m-=k,I=0,v=3+(7&(g>>>=k)),g>>>=3,m-=3}else{for(D=k+7;m<D;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}m-=k,I=0,v=11+(127&(g>>>=k)),g>>>=7,m-=7}if(n.have+v>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;v--;)n.lens[n.have++]=I}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,F={bits:n.lenbits},R=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,F),n.lenbits=F.bits,R){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,F={bits:n.distbits},R=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,F),n.distbits=F.bits,R){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(d>=6&&p>=258){e.next_out=h,e.avail_out=p,e.next_in=f,e.avail_in=d,n.hold=g,n.bits=m,a(e,_),h=e.next_out,c=e.output,p=e.avail_out,f=e.next_in,u=e.input,d=e.avail_in,g=n.hold,m=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;S=(z=n.lencode[g&(1<<n.lenbits)-1])>>>16&255,A=65535&z,!((k=z>>>24)<=m);){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}if(S&&0==(240&S)){for(L=k,O=S,T=A;S=(z=n.lencode[T+((g&(1<<L+O)-1)>>L)])>>>16&255,A=65535&z,!(L+(k=z>>>24)<=m);){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}g>>>=L,m-=L,n.back+=L}if(g>>>=k,m-=k,n.back+=k,n.length=A,0===S){n.mode=26;break}if(32&S){n.back=-1,n.mode=12;break}if(64&S){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&S,n.mode=22;case 22:if(n.extra){for(D=n.extra;m<D;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}n.length+=g&(1<<n.extra)-1,g>>>=n.extra,m-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;S=(z=n.distcode[g&(1<<n.distbits)-1])>>>16&255,A=65535&z,!((k=z>>>24)<=m);){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}if(0==(240&S)){for(L=k,O=S,T=A;S=(z=n.distcode[T+((g&(1<<L+O)-1)>>L)])>>>16&255,A=65535&z,!(L+(k=z>>>24)<=m);){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}g>>>=L,m-=L,n.back+=L}if(g>>>=k,m-=k,n.back+=k,64&S){e.msg="invalid distance code",n.mode=30;break}n.offset=A,n.extra=15&S,n.mode=24;case 24:if(n.extra){for(D=n.extra;m<D;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}n.offset+=g&(1<<n.extra)-1,g>>>=n.extra,m-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===p)break e;if(v=_-p,n.offset>v){if((v=n.offset-v)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}v>n.wnext?(v-=n.wnext,x=n.wsize-v):x=n.wnext-v,v>n.length&&(v=n.length),E=n.window}else E=c,x=h-n.offset,v=n.length;v>p&&(v=p),p-=v,n.length-=v;do{c[h++]=E[x++]}while(--v);0===n.length&&(n.mode=21);break;case 26:if(0===p)break e;c[h++]=n.length,p--,n.mode=21;break;case 27:if(n.wrap){for(;m<32;){if(0===d)break e;d--,g|=u[f++]<<m,m+=8}if(_-=p,e.total_out+=_,n.total+=_,_&&(e.adler=n.check=n.flags?o(n.check,c,_,h-_):i(n.check,c,_,h-_)),_=p,(n.flags?g:l(g))!==n.check){e.msg="incorrect data check",n.mode=30;break}g=0,m=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;m<32;){if(0===d)break e;d--,g+=u[f++]<<m,m+=8}if(g!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}g=0,m=0}n.mode=29;case 29:R=1;break e;case 30:R=-3;break e;case 31:return-4;case 32:default:return-2}return e.next_out=h,e.avail_out=p,e.next_in=f,e.avail_in=d,n.hold=g,n.bits=m,(n.wsize||_!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&b(e,e.output,e.next_out,_-e.avail_out)?(n.mode=31,-4):(w-=e.avail_in,_-=e.avail_out,e.total_in+=w,e.total_out+=_,n.total+=_,n.wrap&&_&&(e.adler=n.check=n.flags?o(n.check,c,_,e.next_out-_):i(n.check,c,_,e.next_out-_)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),(0===w&&0===_||4===t)&&0===R&&(R=-5),R)},t.inflateEnd=function(e){if(!e||!e.state)return-2;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?-2:(n.head=t,t.done=!1,0):-2},t.inflateSetDictionary=function(e,t){var n,r=t.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&i(1,t,r,0)!==n.check?-3:b(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0):-2},t.inflateInfo="pako inflate (from Nodeca project)"},function(e,t,n){"use strict";e.exports=function(e,t){var n,r,i,o,a,s,l,u,c,f,h,d,p,g,m,y,b,w,_,v,x,E,k,S,A;n=e.state,r=e.next_in,S=e.input,i=r+(e.avail_in-5),o=e.next_out,A=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),l=n.dmax,u=n.wsize,c=n.whave,f=n.wnext,h=n.window,d=n.hold,p=n.bits,g=n.lencode,m=n.distcode,y=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{p<15&&(d+=S[r++]<<p,p+=8,d+=S[r++]<<p,p+=8),w=g[d&y];t:for(;;){if(d>>>=_=w>>>24,p-=_,0===(_=w>>>16&255))A[o++]=65535&w;else{if(!(16&_)){if(0==(64&_)){w=g[(65535&w)+(d&(1<<_)-1)];continue t}if(32&_){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}v=65535&w,(_&=15)&&(p<_&&(d+=S[r++]<<p,p+=8),v+=d&(1<<_)-1,d>>>=_,p-=_),p<15&&(d+=S[r++]<<p,p+=8,d+=S[r++]<<p,p+=8),w=m[d&b];n:for(;;){if(d>>>=_=w>>>24,p-=_,!(16&(_=w>>>16&255))){if(0==(64&_)){w=m[(65535&w)+(d&(1<<_)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(x=65535&w,p<(_&=15)&&(d+=S[r++]<<p,(p+=8)<_&&(d+=S[r++]<<p,p+=8)),(x+=d&(1<<_)-1)>l){e.msg="invalid distance too far back",n.mode=30;break e}if(d>>>=_,p-=_,x>(_=o-a)){if((_=x-_)>c&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(E=0,k=h,0===f){if(E+=u-_,_<v){v-=_;do{A[o++]=h[E++]}while(--_);E=o-x,k=A}}else if(f<_){if(E+=u+f-_,(_-=f)<v){v-=_;do{A[o++]=h[E++]}while(--_);if(E=0,f<v){v-=_=f;do{A[o++]=h[E++]}while(--_);E=o-x,k=A}}}else if(E+=f-_,_<v){v-=_;do{A[o++]=h[E++]}while(--_);E=o-x,k=A}for(;v>2;)A[o++]=k[E++],A[o++]=k[E++],A[o++]=k[E++],v-=3;v&&(A[o++]=k[E++],v>1&&(A[o++]=k[E++]))}else{E=o-x;do{A[o++]=A[E++],A[o++]=A[E++],A[o++]=A[E++],v-=3}while(v>2);v&&(A[o++]=A[E++],v>1&&(A[o++]=A[E++]))}break}}break}}while(r<i&&o<s);r-=v=p>>3,d&=(1<<(p-=v<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r<i?i-r+5:5-(r-i),e.avail_out=o<s?s-o+257:257-(o-s),n.hold=d,n.bits=p}},function(e,t,n){"use strict";var r=n(13),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,n,l,u,c,f,h){var d,p,g,m,y,b,w,_,v,x=h.bits,E=0,k=0,S=0,A=0,L=0,O=0,T=0,I=0,R=0,F=0,D=null,z=0,N=new r.Buf16(16),U=new r.Buf16(16),P=null,C=0;for(E=0;E<=15;E++)N[E]=0;for(k=0;k<l;k++)N[t[n+k]]++;for(L=x,A=15;A>=1&&0===N[A];A--);if(L>A&&(L=A),0===A)return u[c++]=20971520,u[c++]=20971520,h.bits=1,0;for(S=1;S<A&&0===N[S];S++);for(L<S&&(L=S),I=1,E=1;E<=15;E++)if(I<<=1,(I-=N[E])<0)return-1;if(I>0&&(0===e||1!==A))return-1;for(U[1]=0,E=1;E<15;E++)U[E+1]=U[E]+N[E];for(k=0;k<l;k++)0!==t[n+k]&&(f[U[t[n+k]]++]=k);if(0===e?(D=P=f,b=19):1===e?(D=i,z-=257,P=o,C-=257,b=256):(D=a,P=s,b=-1),F=0,k=0,E=S,y=c,O=L,T=0,g=-1,m=(R=1<<L)-1,1===e&&R>852||2===e&&R>592)return 1;for(;;){w=E-T,f[k]<b?(_=0,v=f[k]):f[k]>b?(_=P[C+f[k]],v=D[z+f[k]]):(_=96,v=0),d=1<<E-T,S=p=1<<O;do{u[y+(F>>T)+(p-=d)]=w<<24|_<<16|v|0}while(0!==p);for(d=1<<E-1;F&d;)d>>=1;if(0!==d?(F&=d-1,F+=d):F=0,k++,0==--N[E]){if(E===A)break;E=t[n+f[k]]}if(E>L&&(F&m)!==g){for(0===T&&(T=L),y+=S,I=1<<(O=E-T);O+T<A&&!((I-=N[O+T])<=0);)O++,I<<=1;if(R+=1<<O,1===e&&R>852||2===e&&R>592)return 1;u[g=F&m]=L<<24|O<<16|y-c|0}}return 0!==F&&(u[y+F]=E-T<<24|64<<16|0),h.bits=L,0}},function(e,t,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(e,t,n){var r=n(1).Buffer,i=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function o(e){if(r.isBuffer(e))return e;var t="function"==typeof r.alloc&&"function"==typeof r.from;if("number"==typeof e)return t?r.alloc(e):new r(e);if("string"==typeof e)return t?r.from(e):new r(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function a(e){var t=o(4);return t.writeInt32BE(e,0),t}function s(e,t){e=o(e),r.isBuffer(t)&&(t=t.readUInt32BE(0));for(var n=-1^~~t,a=0;a<e.length;a++)n=i[255&(n^e[a])]^n>>>8;return-1^n}function l(){return a(s.apply(null,arguments))}"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),l.signed=function(){return s.apply(null,arguments)},l.unsigned=function(){return s.apply(null,arguments)>>>0},e.exports=l},function(e,t,n){"use strict";const r=n(65),i=n(69);class o extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}}async function a(e,t){if(!e)return Promise.reject(new Error("Expected a stream"));t={maxBuffer:1/0,...t};const{maxBuffer:n}=t;let a;return await new Promise((s,l)=>{const u=e=>{e&&(e.bufferedData=a.getBufferedValue()),l(e)};a=r(e,i(t),e=>{e?u(e):s()}),a.on("data",()=>{a.getBufferedLength()>n&&u(new o)})}),a.getBufferedValue()}e.exports=a,e.exports.default=a,e.exports.buffer=(e,t)=>a(e,{...t,encoding:"buffer"}),e.exports.array=(e,t)=>a(e,{...t,array:!0}),e.exports.MaxBufferError=o},function(e,t,n){(function(t){var r=n(32),i=n(67),o=n(68),a=function(){},s=/^v?\.0/.test(t.version),l=function(e){return"function"==typeof e},u=function(e,t,n,u){u=r(u);var c=!1;e.on("close",(function(){c=!0})),i(e,{readable:t,writable:n},(function(e){if(e)return u(e);c=!0,u()}));var f=!1;return function(t){if(!c&&!f)return f=!0,function(e){return!!s&&(!!o&&((e instanceof(o.ReadStream||a)||e instanceof(o.WriteStream||a))&&l(e.close)))}(e)?e.close(a):function(e){return e.setHeader&&l(e.abort)}(e)?e.abort():l(e.destroy)?e.destroy():void u(t||new Error("stream was destroyed"))}},c=function(e){e()},f=function(e,t){return e.pipe(t)};e.exports=function(){var e,t=Array.prototype.slice.call(arguments),n=l(t[t.length-1]||a)&&t.pop()||a;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r=t.map((function(i,o){var a=o<t.length-1;return u(i,a,o>0,(function(t){e||(e=t),t&&r.forEach(c),a||(r.forEach(c),n(e))}))}));return t.reduce(f)}}).call(this,n(2))},function(e,t){e.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}}},function(e,t,n){(function(t){var r=n(32),i=function(){},o=function(e,n,a){if("function"==typeof n)return o(e,null,n);n||(n={}),a=r(a||i);var s=e._writableState,l=e._readableState,u=n.readable||!1!==n.readable&&e.readable,c=n.writable||!1!==n.writable&&e.writable,f=!1,h=function(){e.writable||d()},d=function(){c=!1,u||a.call(e)},p=function(){u=!1,c||a.call(e)},g=function(t){a.call(e,t?new Error("exited with error code: "+t):null)},m=function(t){a.call(e,t)},y=function(){t.nextTick(b)},b=function(){if(!f)return(!u||l&&l.ended&&!l.destroyed)&&(!c||s&&s.ended&&!s.destroyed)?void 0:a.call(e,new Error("premature close"))},w=function(){e.req.on("finish",d)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?c&&!s&&(e.on("end",h),e.on("close",h)):(e.on("complete",d),e.on("abort",y),e.req?w():e.on("request",w)),function(e){return e.stdio&&Array.isArray(e.stdio)&&3===e.stdio.length}(e)&&e.on("exit",g),e.on("end",p),e.on("finish",d),!1!==n.error&&e.on("error",m),e.on("close",y),function(){f=!0,e.removeListener("complete",d),e.removeListener("abort",y),e.removeListener("request",w),e.req&&e.req.removeListener("finish",d),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",d),e.removeListener("exit",g),e.removeListener("end",p),e.removeListener("error",m),e.removeListener("close",y)}};e.exports=o}).call(this,n(2))},function(e,t){},function(e,t,n){"use strict";(function(t){const{PassThrough:r}=n(9);e.exports=e=>{e={...e};const{array:n}=e;let{encoding:i}=e;const o="buffer"===i;let a=!1;n?a=!(i||o):i=i||"utf8",o&&(i=null);const s=new r({objectMode:a});i&&s.setEncoding(i);let l=0;const u=[];return s.on("data",e=>{u.push(e),a?l=u.length:l+=e.length}),s.getBufferedValue=()=>n?u:o?t.concat(u,l):u.join(""),s.getBufferedLength=()=>l,s}}).call(this,n(1).Buffer)},function(e,t){e.exports=require("os")},function(e,t,n){e.exports=n(72)},function(e,t,n){var r=n(73),i=n(74),o=r.generate((function(e){this.defineProperties({writable:!0},{thisArg:e.thisArg,emitter:e.emitter,$:e.$||window.$&&window.$.noConflict()||window.jQuery.noConflict()}),this.parseInteractions(e.interactions)}));o.actions={},o.registerAction=function(e,t){o.actions[e]=t},o.registerActions=function(e){for(var t in e)o.registerAction(e[t])},o.definePrototype({parseInteractions:function(e){var t,n,r=this;for(t in e)(n=e[t]).$=n.$||r.$,(o.actions[n.event]||i(n.event)).call(r.thisArg,r.emitter,n)}}),window&&(window.Interactions=o),e.exports=o},function(e,t,n){var r;!function(){function i(e,t){if(typeof e!==t)throw new TypeError("Expected '"+t+"' but instead found '"+typeof e+"'")}function o(e){var t,n;return!(!e||"object"!=typeof e||!(1===(n=(t=Object.getOwnPropertyNames(e).sort()).length)&&("get"===t[0]&&"function"==typeof e.get||"set"===t[0]&&"function"==typeof e.set)||2===n&&"get"===t[0]&&"function"==typeof e.get&&"set"===t[1]&&"function"==typeof e.set))}function a(e,t,n){var r,i,a,s={},l=n||t,u=n&&t;for(n=l&&"object"==typeof l?l:{},t=u&&"object"==typeof u?u:{},a=(i=Object.getOwnPropertyNames(n)).length,r=0;r<a;r++)o(n[i[r]])?s[i[r]]={configurable:!!t.configurable,enumerable:!!t.enumerable,get:n[i[r]].get,set:n[i[r]].set}:s[i[r]]={configurable:!!t.configurable,enumerable:!!t.enumerable,writable:!!t.writable,value:n[i[r]]};return Object.defineProperties(e,s),e}var s={defineProperties:function(e,t){return a(this,e,t),this},getProto:function(){return Object.getPrototypeOf(this)},getSuper:function(){return Object.getPrototypeOf(this.constructor.prototype)}},l={isGeneration:function(e){i(e,"function");return this.prototype.isPrototypeOf(e.prototype)},isCreation:function(e){return e instanceof this},generate:function(e){i(e,"function");return a(e,{configurable:!1,enumerable:!1,writable:!1},{prototype:Object.create(this.prototype)}),a(e,{configurable:!1,enumerable:!1,writable:!1},l),a(e.prototype,{configurable:!1,enumerable:!1,writable:!1},{constructor:e,generator:e}),e},definePrototype:function(e,t){return a(this.prototype,e,t),this}};function u(){}a(u,{configurable:!1,enumerable:!1,writable:!1},{prototype:u.prototype}),a(u.prototype,{configurable:!1,enumerable:!1,writable:!1},s),a(u,{configurable:!1,enumerable:!1,writable:!1},l),a(u,{configurable:!1,enumerable:!1,writable:!1},{isGenerator:function(e){return this.isGeneration(e)},toGenerator:function(e,t){return console.warn("Generator.toGenerator is depreciated please use Generator.generateFrom"),this.generateFrom(e,t)},generateFrom:function(e,t){return i(e,"function"),i(t,"function"),a(t,{configurable:!1,enumerable:!1,writable:!1},{prototype:Object.create(e.prototype)}),a(t,{configurable:!1,enumerable:!1,writable:!1},l),a(t.prototype,{configurable:!1,enumerable:!1,writable:!1},{constructor:t,generator:t}),a(t.prototype,{configurable:!1,enumerable:!1,writable:!1},s),t}}),Object.freeze(u),Object.freeze(u.prototype),void 0===(r=function(){return u}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){var r=n(75);function i(e,t){return function(n){return t.action.call(e,n,t.$(this))}}e.exports=function(e){return function(t,n){var o=this;void 0!==n.$?n.target?n.$(t).on(e,n.target,i(o,n)):n.$(t).on(e,i(o,n)):void 0===(t=n.emitter||t).querySelectorAll||void 0===n.target?t.addEventListener(e,(function(e){!1===n.action.call(o,e,t)&&(e.preventDefault(),e.stopPropagation())})):r(t,n.target,e,(function(e){!1===n.action.call(o,e,t)&&(e.preventDefault(),e.stopPropagation())}))}}},function(e,t){e.exports=function(e,t,n,r){var i=e.querySelectorAll(t);return i.length?n?[].forEach.call(i,r?function(e){e.addEventListener(n,r,!1)}:n):i[0]:null}},function(e,t,n){const{getManifest:r,getNearestIcon:i}=n(77);let o;async function a({title:e,icon:t="plugin-icon",msgs:n,prompt:a,multiline:s=!1,render:l,template:u,isError:c=!1,buttons:f=[{label:"Done",variant:"cta",type:"submit"}]}={},h=370,d="auto",p=14){let g=Array.isArray(n)?n:[n];try{o||(o=await r())}catch(e){}let m=!1;"plugin-icon"===t&&o.icons&&(m=!0,t=i(o,p=24));const y=document.createElement("dialog");y.innerHTML=`\n<style>\n #form {\n width: ${h}px;\n }\n .h1 {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n }\n .h1 img {\n width: ${p}px;\n height: ${p}px;\n flex: 0 0 ${p}px;\n padding: 0;\n margin-right: 10px;\n }\n img.plugin-icon {\n border-radius: 4px;\n overflow: hidden;\n }\n .list {\n display: flex;\n flex-direction: row;\n }\n .list .margin {\n margin-bottom: 0;\n margin-left: 0;\n }\n .list span {\n flex: 0 0 auto;\n border: 1px solid transparent;\n }\n .list .bullet {\n text-align: center;\n }\n .list + .list {\n margin-top: 0;\n }\n textarea {\n height: 200px;\n }\n .container {\n zoverflow-x: hidden;\n overflow-y: auto;\n height: ${"auto"===d?d:d+"px"};\n }\n</style>\n<form method="dialog" id="form">\n <h2 class="h1">\n ${t?`<img ${m?`class="plugin-icon" title="${o.name}"`:""} src="${t}" />`:""}\n <span ${c?'class="color-red"':""}>${e}</span>\n </h2>\n <hr />\n <div class="container">\n ${!l&&(u?u():g.map(e=>function e(t){if(Array.isArray(t))return t.map(t=>e(t)).join("");if("string"!=typeof t)return e(""+t);let n=t;n="##"===n.substr(0,2)?`<h3>${n.substr(2).trim().toUpperCase()}</h3>`:"#"===n.substr(0,1)?`<h2>${n.substr(1).trim()}</h2>`:"* "===n.substr(0,2)?`<p class="list"><span class="bullet margin">•</span><span class="margin">${n.substr(2).trim()}</span></p>`:"----"===n.substr(0,4)?'<hr class="small"/>'+n.substr(5).trim():"---"===n.substr(0,3)?"<hr/>"+n.substr(4).trim():`<p>${n.trim()}</p>`;const r=/\[([^\]]*)\]\(([^\)]*)\)/,i=t.match(r);if(i){const e=i[1];n=`<p><a href="${i[2]}">${n.replace(r,e).replace(/\<\|?p\>/g,"")}</a></p>`}return n}(e)).join("")+(a?`<label>${s?`<textarea id="prompt" placeholder="${a}"></textarea>`:`<input type="text" id="prompt" placeholder="${a}" />`}</label>`:""))}\n </div>\n <footer>\n ${f.map(({label:e,type:t,variant:n}={},r)=>`<button id="btn${r}" type="${t}" uxp-variant="${n}">${e}</button>`).join("")}\n </footer>\n</form>\n `,l&&y.querySelector(".container").appendChild(l());let b=-1,w=-1,_=-1;y.querySelector("form").onsubmit=()=>y.close("ok"),f.forEach(({type:e,variant:t}={},n)=>{const r=y.querySelector("#btn"+n);"submit"!==e&&"cta"!==t||(b=n),"reset"===e&&(w=n),r.onclick=e=>{e.preventDefault(),_=n,y.close(n===w?"reasonCanceled":"ok")}});try{document.appendChild(y);return"reasonCanceled"===await y.showModal()?{which:w,value:""}:(-1===_&&(_=b),{which:_,value:a?y.querySelector("#prompt").value:""})}catch(e){return{which:w,value:""}}finally{y.remove()}}e.exports={createDialog:a,alert:async function(e,...t){return a({title:e,msgs:t})},error:async function(e,...t){return a({title:e,isError:!0,msgs:t})},confirm:async function(e,t,n=["Cancel","OK"]){return a({title:e,msgs:[t],buttons:[{label:n[0],type:"reset",variant:"primary"},{label:n[1],type:"submit",variant:"cta"}]})},warning:async function(e,t,n=["Cancel","OK"]){return a({title:e,msgs:[t],buttons:[{label:n[0],type:"submit",variant:"primary"},{label:n[1],type:"button",variant:"warning"}]})},prompt:async function(e,t,n,r=["Cancel","OK"],i=!1){return a({title:e,msgs:[t],prompt:n,multiline:i,buttons:[{label:r[0],type:"reset",variant:"primary"},{label:r[1],type:"submit",variant:"cta"}]})}}},function(e,t,n){let r;e.exports={getManifest:async function(){if(!r){const e=n(0).storage.localFileSystem,t=await e.getPluginFolder(),i=await t.getEntry("manifest.json");if(i){const e=await i.read();r=JSON.parse(e)}}return r},getNearestIcon:function(e,t){if(e&&e.icons){return e.icons.sort((e,t)=>{const n=e.width,r=t.width;return n<r?1:n>r?-1:0}).reduce((e,n)=>(e?n.width>=t&&(e=n):e=n,e)).path}}}}]);