filer/dist/filer.min.js

6 lines
142 KiB
JavaScript
Raw Normal View History

/*! filer 0.0.6 2014-05-21 */
(function(t,e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Filer||(t.Filer=e())})(this,function(){var t,e,n;(function(r){function i(t,e){return w.call(t,e)}function o(t,e){var n,r,i,o,s,a,c,u,f,l,h=e&&e.split("/"),p=m.map,d=p&&p["*"]||{};if(t&&"."===t.charAt(0))if(e){for(h=h.slice(0,h.length-1),t=h.concat(t.split("/")),u=0;t.length>u;u+=1)if(l=t[u],"."===l)t.splice(u,1),u-=1;else if(".."===l){if(1===u&&(".."===t[2]||".."===t[0]))break;u>0&&(t.splice(u-1,2),u-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((h||d)&&p){for(n=t.split("/"),u=n.length;u>0;u-=1){if(r=n.slice(0,u).join("/"),h)for(f=h.length;f>0;f-=1)if(i=p[h.slice(0,f).join("/")],i&&(i=i[r])){o=i,s=u;break}if(o)break;!a&&d&&d[r]&&(a=d[r],c=u)}!o&&a&&(o=a,s=c),o&&(n.splice(0,s,o),t=n.join("/"))}return t}function s(t,e){return function(){return p.apply(r,E.call(arguments,0).concat([t,e]))}}function a(t){return function(e){return o(e,t)}}function c(t){return function(e){y[t]=e}}function u(t){if(i(v,t)){var e=v[t];delete v[t],b[t]=!0,h.apply(r,e)}if(!i(y,t)&&!i(b,t))throw Error("No "+t);return y[t]}function f(t){var e,n=t?t.indexOf("!"):-1;return n>-1&&(e=t.substring(0,n),t=t.substring(n+1,t.length)),[e,t]}function l(t){return function(){return m&&m.config&&m.config[t]||{}}}var h,p,d,g,y={},v={},m={},b={},w=Object.prototype.hasOwnProperty,E=[].slice;d=function(t,e){var n,r=f(t),i=r[0];return t=r[1],i&&(i=o(i,e),n=u(i)),i?t=n&&n.normalize?n.normalize(t,a(e)):o(t,e):(t=o(t,e),r=f(t),i=r[0],t=r[1],i&&(n=u(i))),{f:i?i+"!"+t:t,n:t,pr:i,p:n}},g={require:function(t){return s(t)},exports:function(t){var e=y[t];return e!==void 0?e:y[t]={}},module:function(t){return{id:t,uri:"",exports:y[t],config:l(t)}}},h=function(t,e,n,o){var a,f,l,h,p,m,w=[];if(o=o||t,"function"==typeof n){for(e=!e.length&&n.length?["require","exports","module"]:e,p=0;e.length>p;p+=1)if(h=d(e[p],o),f=h.f,"require"===f)w[p]=g.require(t);else if("exports"===f)w[p]=g.exports(t),m=!0;else if("module"===f)a=w[p]=g.module(t);else if(i(y,f)||i(v,f)||i(b,f))w[p]=u(f);else{if(!h.p)throw Error(t+" missing "+f);h.p.load(h.n,s(o,!0),c(f),{}),w[p]=y[f]}l=n.apply(y[t],w),t&&(a&&a.exports!==r&&a.exports!==y[t]?y[t]=a.exports:l===r&&m||(y[t]=l))}else t&&(y[t]=n)},t=e=p=function(t,e,n,i,o){return"string"==typeof t?g[t]?g[t](e):u(d(t,e).f):(t.splice||(m=t,e.splice?(t=e,e=n,n=null):t=r),e=e||function(){},"function"==typeof n&&(n=i,i=o),i?h(r,t,e,n):setTimeout(function(){h(r,t,e,n)},4),p)},p.config=function(t){return m=t,m.deps&&p(m.deps,m.callback),p},n=function(t,e,n){e.splice||(n=e,e=[]),i(y,t)||i(v,t)||(v[t]=[t,e,n])},n.amd={jQuery:!0}})(),n("build/almond",function(){}),n("nodash",["require"],function(){function t(t,e){return p.call(t,e)}function e(t){return null==t?0:t.length===+t.length?t.length:y(t).length}function n(t){return t}function r(t,e,n){var r,i;if(null!=t)if(u&&t.forEach===u)t.forEach(e,n);else if(t.length===+t.length){for(r=0,i=t.length;i>r;r++)if(e.call(n,t[r],r,t)===g)return}else{var o=o(t);for(r=0,i=o.length;i>r;r++)if(e.call(n,t[o[r]],o[r],t)===g)return}}function i(t,e,i){e||(e=n);var o=!1;return null==t?o:l&&t.some===l?t.some(e,i):(r(t,function(t,n,r){return o||(o=e.call(i,t,n,r))?g:void 0}),!!o)}function o(t,e){return null==t?!1:f&&t.indexOf===f?-1!=t.indexOf(e):i(t,function(t){return t===e})}function s(t){this.value=t}function a(t){return t&&"object"==typeof t&&!Array.isArray(t)&&p.call(t,"__wrapped__")?t:new s(t)}var c=Array.prototype,u=c.forEach,f=c.indexOf,l=c.some,h=Object.prototype,p=h.hasOwnProperty,d=Object.keys,g={},y=d||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var n=[];for(var r in e)t(e,r)&&n.push(r);return n};return s.prototype.has=function(e){return t(this.value,e)},s.prototype.contains=function(t){return o(this.value,t)},s.prototype.size=function(){return e(this.value)},a}),n("src/path",[],function(){function t(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function e(){for(var
}var i,o,s,a,u,f,l,h,p,d={},g=k?new Uint16Array(2*n.length):[],y=0,v=0,m=new(k?Uint32Array:Array)(286),b=new(k?Uint32Array:Array)(30),A=e.w;if(!k){for(s=0;285>=s;)m[s++]=0;for(s=0;29>=s;)b[s++]=0}for(m[256]=1,i=0,o=n.length;o>i;++i){for(s=u=0,a=3;a>s&&i+s!==o;++s)u=u<<8|n[i+s];if(d[u]===w&&(d[u]=[]),f=d[u],!(v-->0)){for(;f.length>0&&i-f[0]>32768;)f.shift();if(i+3>=o){for(h&&r(h,-1),s=0,a=o-i;a>s;++s)p=n[i+s],g[y++]=p,++m[p];break}f.length>0?(l=c(n,i,f),h?h.length<l.length?(p=n[i-1],g[y++]=p,++m[p],r(l,0)):r(h,-1):A>l.length?h=l:r(l,0)):h?r(h,-1):(p=n[i],g[y++]=p,++m[p])}f.push(i)}return g[y++]=256,m[256]++,e.L=m,e.K=b,k?g.subarray(0,y):g}function c(t,e,n){var r,i,o,a,c,u,f=0,l=t.length;a=0,u=n.length;t:for(;u>a;a++){if(r=n[u-a-1],o=3,f>3){for(c=f;c>3;c--)if(t[r+c-1]!==t[e+c-1])continue t;o=f}for(;258>o&&l>e+o&&t[r+o]===t[e+o];)++o;if(o>f&&(i=r,f=o),258===o)break}return new s(f,e-i)}function u(t,e){var n,i,o,s,a,c=t.length,u=new r(572),l=new(k?Uint8Array:Array)(c);if(!k)for(s=0;c>s;s++)l[s]=0;for(s=0;c>s;++s)t[s]>0&&u.push(s,t[s]);if(n=Array(u.length/2),i=new(k?Uint32Array:Array)(u.length/2),1===n.length)return l[u.pop().index]=1,l;for(s=0,a=u.length/2;a>s;++s)n[s]=u.pop(),i[s]=n[s].value;for(o=f(i,i.length,e),s=0,a=n.length;a>s;++s)l[n[s].index]=o[s];return l}function f(t,e,n){function r(t){var n=p[t][d[t]];n===e?(r(t+1),r(t+1)):--l[n],++d[t]}var i,o,s,a,c,u=new(k?Uint16Array:Array)(n),f=new(k?Uint8Array:Array)(n),l=new(k?Uint8Array:Array)(e),h=Array(n),p=Array(n),d=Array(n),g=(1<<n)-e,y=1<<n-1;for(u[n-1]=e,o=0;n>o;++o)y>g?f[o]=0:(f[o]=1,g-=y),g<<=1,u[n-2-o]=(0|u[n-1-o]/2)+e;for(u[0]=f[0],h[0]=Array(u[0]),p[0]=Array(u[0]),o=1;n>o;++o)u[o]>2*u[o-1]+f[o]&&(u[o]=2*u[o-1]+f[o]),h[o]=Array(u[o]),p[o]=Array(u[o]);for(i=0;e>i;++i)l[i]=n;for(s=0;u[n-1]>s;++s)h[n-1][s]=t[s],p[n-1][s]=s;for(i=0;n>i;++i)d[i]=0;for(1===f[n-1]&&(--l[0],++d[n-1]),o=n-2;o>=0;--o){for(a=i=0,c=d[o+1],s=0;u[o]>s;s++)a=h[o+1][c]+h[o+1][c+1],a>t[i]?(h[o][s]=a,p[o][s]=e,c+=2):(h[o][s]=t[i],p[o][s]=i,++i);d[o]=0,1===f[o]&&r(o)}return l}function l(t){var e,n,r,i,o=new(k?Uint16Array:Array)(t.length),s=[],a=[],c=0;for(e=0,n=t.length;n>e;e++)s[t[e]]=(0|s[t[e]])+1;for(e=1,n=16;n>=e;e++)a[e]=c,c+=0|s[e],c<<=1;for(e=0,n=t.length;n>e;e++)for(c=a[t[e]],a[t[e]]+=1,r=o[e]=0,i=t[e];i>r;r++)o[e]=o[e]<<1|1&c,c>>>=1;return o}function h(e,n){switch(this.l=[],this.m=32768,this.e=this.g=this.c=this.q=0,this.input=k?new Uint8Array(e):e,this.s=!1,this.n=L,this.B=!1,(n||!(n={}))&&(n.index&&(this.c=n.index),n.bufferSize&&(this.m=n.bufferSize),n.bufferType&&(this.n=n.bufferType),n.resize&&(this.B=n.resize)),this.n){case F:this.b=32768,this.a=new(k?Uint8Array:Array)(32768+this.m+258);break;case L:this.b=0,this.a=new(k?Uint8Array:Array)(this.m),this.f=this.J,this.t=this.H,this.o=this.I;break;default:t(Error("invalid inflate mode"))}}function p(e,n){for(var r,i=e.g,o=e.e,s=e.input,a=e.c;n>o;)r=s[a++],r===w&&t(Error("input buffer is broken")),i|=r<<o,o+=8;return r=i&(1<<n)-1,e.g=i>>>n,e.e=o-n,e.c=a,r}function d(t,e){for(var n,r,i,o=t.g,s=t.e,a=t.input,c=t.c,u=e[0],f=e[1];f>s&&(n=a[c++],n!==w);)o|=n<<s,s+=8;return r=u[o&(1<<f)-1],i=r>>>16,t.g=o>>i,t.e=s-i,t.c=c,65535&r}function g(t){function e(t,e,n){var r,i,o,s;for(s=0;t>s;)switch(r=d(this,e)){case 16:for(o=3+p(this,2);o--;)n[s++]=i;break;case 17:for(o=3+p(this,3);o--;)n[s++]=0;i=0;break;case 18:for(o=11+p(this,7);o--;)n[s++]=0;i=0;break;default:i=n[s++]=r}return n}var n,r,o,s,a=p(t,5)+257,c=p(t,5)+1,u=p(t,4)+4,f=new(k?Uint8Array:Array)(V.length);for(s=0;u>s;++s)f[V[s]]=p(t,3);n=i(f),r=new(k?Uint8Array:Array)(a),o=new(k?Uint8Array:Array)(c),t.o(i(e.call(t,a,n,r)),i(e.call(t,c,n,o)))}function y(t){if("string"==typeof t){var e,n,r=t.split("");for(e=0,n=r.length;n>e;e++)r[e]=(255&r[e].charCodeAt(0))>>>0;t=r}for(var i,o=1,s=0,a=t.length,c=0;a>0;){i=a>1024?1024:a,a-=i;do o+=t[c++],s+=o;while(--i);o%=65521,s%=65521}return(s<<16|o)>>>0}function v(e,n){var r,i;switch(this.input=e,this.c=0,(n||!(n={}))&&(n.index&&(this.c=n.index),n.verify&&(this.M=n.verify)),r=e[this.c++],i=e[this.c++],15&r){case re:this.method=re;break;default:t(Error("unsupp
var s=h(o,p("gbk"));if(null!==s){var a=n(s,190)+129,c=s%190,f=63>c?64:65;return r.emit(a,c+f)}if(null===s&&!t)return u(o);s=g(o);var l=n(n(n(s,10),126),10);s-=10*126*10*l;var d=n(n(s,10),126);s-=126*10*d;var y=n(s,10),v=s-10*y;return r.emit(l+129,d+48,y+129,v+48)}}function A(t){var n=t.fatal,r=!1,i=0;this.decode=function(t){var o=t.get();if(o===B&&0===i)return z;if(o===B&&0!==i)return i=0,c(n);if(t.offset(1),126===i)return i=0,123===o?(r=!0,null):125===o?(r=!1,null):126===o?126:10===o?null:(t.offset(-1),c(n));if(0!==i){var s=i;i=0;var a=null;return e(o,33,126)&&(a=l(190*(s-1)+(o+63),p("gbk"))),10===o&&(r=!1),null===a?c(n):a}return 126===o?(i=126,null):r?e(o,32,127)?(i=o,null):(10===o&&(r=!1),c(n)):e(o,0,127)?o:c(n)}}function k(t){t.fatal;var r=!1;this.encode=function(t,i){var o=i.get();if(o===z)return B;if(i.offset(1),e(o,0,127)&&r)return i.offset(-1),r=!1,t.emit(126,125);if(126===o)return t.emit(126,126);if(e(o,0,127))return t.emit(o);if(!r)return i.offset(-1),r=!0,t.emit(126,123);var s=h(o,p("gbk"));if(null===s)return u(o);var a=n(s,190)+1,c=s%190-63;return e(a,33,126)&&e(c,33,126)?t.emit(a,c):u(o)}}function _(t){var n=t.fatal,r=0,i=null;this.decode=function(t){if(null!==i){var o=i;return i=null,o}var s=t.get();if(s===B&&0===r)return z;if(s===B&&0!==r)return r=0,c(n);if(t.offset(1),0!==r){var a=r,u=null;r=0;var f=127>s?64:98;if((e(s,64,126)||e(s,161,254))&&(u=157*(a-129)+(s-f)),1133===u)return i=772,202;if(1135===u)return i=780,202;if(1164===u)return i=772,234;if(1166===u)return i=780,234;var h=null===u?null:l(u,p("big5"));return null===u&&t.offset(-1),null===h?c(n):h}return e(s,0,127)?s:e(s,129,254)?(r=s,null):c(n)}}function x(t){t.fatal,this.encode=function(t,r){var i=r.get();if(i===z)return B;if(r.offset(1),e(i,0,127))return t.emit(i);var o=h(i,p("big5"));if(null===o)return u(i);var s=n(o,157)+129,a=o%157,c=63>a?64:98;return t.emit(s,a+c)}}function S(t){var n=t.fatal,r=0,i=0;this.decode=function(t){var o=t.get();if(o===B)return 0===r&&0===i?z:(r=0,i=0,c(n));t.offset(1);var s,a;return 0!==i?(s=i,i=0,a=null,e(s,161,254)&&e(o,161,254)&&(a=l(94*(s-161)+o-161,p("jis0212"))),e(o,161,254)||t.offset(-1),null===a?c(n):a):142===r&&e(o,161,223)?(r=0,65377+o-161):143===r&&e(o,161,254)?(r=0,i=o,null):0!==r?(s=r,r=0,a=null,e(s,161,254)&&e(o,161,254)&&(a=l(94*(s-161)+o-161,p("jis0208"))),e(o,161,254)||t.offset(-1),null===a?c(n):a):e(o,0,127)?o:142===o||143===o||e(o,161,254)?(r=o,null):c(n)}}function O(t){t.fatal,this.encode=function(t,r){var i=r.get();if(i===z)return B;if(r.offset(1),e(i,0,127))return t.emit(i);if(165===i)return t.emit(92);if(8254===i)return t.emit(126);if(e(i,65377,65439))return t.emit(142,i-65377+161);var o=h(i,p("jis0208"));if(null===o)return u(i);var s=n(o,94)+161,a=o%94+161;return t.emit(s,a)}}function I(t){var n=t.fatal,r={ASCII:0,escape_start:1,escape_middle:2,escape_final:3,lead:4,trail:5,Katakana:6},i=r.ASCII,o=!1,s=0;this.decode=function(t){var a=t.get();switch(a!==B&&t.offset(1),i){default:case r.ASCII:return 27===a?(i=r.escape_start,null):e(a,0,127)?a:a===B?z:c(n);case r.escape_start:return 36===a||40===a?(s=a,i=r.escape_middle,null):(a!==B&&t.offset(-1),i=r.ASCII,c(n));case r.escape_middle:var u=s;return s=0,36!==u||64!==a&&66!==a?36===u&&40===a?(i=r.escape_final,null):40!==u||66!==a&&74!==a?40===u&&73===a?(i=r.Katakana,null):(a===B?t.offset(-1):t.offset(-2),i=r.ASCII,c(n)):(i=r.ASCII,null):(o=!1,i=r.lead,null);case r.escape_final:return 68===a?(o=!0,i=r.lead,null):(a===B?t.offset(-2):t.offset(-3),i=r.ASCII,c(n));case r.lead:return 10===a?(i=r.ASCII,c(n,10)):27===a?(i=r.escape_start,null):a===B?z:(s=a,i=r.trail,null);case r.trail:if(i=r.lead,a===B)return c(n);var f=null,h=94*(s-33)+a-33;return e(s,33,126)&&e(a,33,126)&&(f=o===!1?l(h,p("jis0208")):l(h,p("jis0212"))),null===f?c(n):f;case r.Katakana:return 27===a?(i=r.escape_start,null):e(a,33,95)?65377+a-33:a===B?z:c(n)}}}function T(t){t.fatal;var r={ASCII:0,lead:1,Katakana:2},i=r.ASCII;this.encode=function(t,o){var s=o.get();if(s===z)return B;if(o.offset(1),(e(s,0,127)||165===s||8254===s)&&i!==r.ASCII)return o.offset(-1),i=r.ASCII,t.emit(27,40,66);if(
else for(T=0;m>T;++T)e[n++]=e[i++]=E[T];if(A=t.a.extraField)if(b)e.set(A,n),e.set(A,i),n+=0,i+=0;else for(T=0;w>T;++T)e[n++]=e[i++]=A[T];if(k=t.a.comment)if(b)e.set(k,i),i+=w;else for(T=0;w>T;++T)e[i++]=k[T];if(b)e.set(t.buffer,n),n+=t.buffer.length;else for(T=0,D=t.buffer.length;D>T;++T)e[n++]=t.buffer[T]}if(e[s++]=M[0],e[s++]=M[1],e[s++]=M[2],e[s++]=M[3],e[s++]=0,e[s++]=0,e[s++]=0,e[s++]=0,e[s++]=255&I,e[s++]=255&I>>8,e[s++]=255&I,e[s++]=255&I>>8,e[s++]=255&F,e[s++]=255&F>>8,e[s++]=255&F>>16,e[s++]=255&F>>24,e[s++]=255&R,e[s++]=255&R>>8,e[s++]=255&R>>16,e[s++]=255&R>>24,w=this.d?this.d.length:0,e[s++]=255&w,e[s++]=255&w>>8,this.d)if(b)e.set(this.d,s);else for(T=0,D=w;D>T;++T)e[s++]=this.d[T];return e},t("Zlib.Zip",h),t("Zlib.Zip.prototype.addFile",h.prototype.m),t("Zlib.Zip.prototype.compress",h.prototype.g),t("Zlib.Zip.prototype.setPassword",h.prototype.q),g("Zlib.Zip.CompressionMethod",{STORE:0,DEFLATE:8}),g("Zlib.Zip.OperatingSystem",{MSDOS:0,UNIX:3,MACINTOSH:7})}.call(this),n("zip",function(){}),function(){function t(t){throw t}function e(t,e){var n=t.split("."),r=g;!(n[0]in r)&&r.execScript&&r.execScript("var "+n[0]);for(var i;n.length&&(i=n.shift());)n.length||e===d?r=r[i]?r[i]:r[i]={}:r[i]=e}function n(t){var e,n,r,i,o,s,a,c,u,f,l=t.length,h=0,p=Number.POSITIVE_INFINITY;for(c=0;l>c;++c)t[c]>h&&(h=t[c]),p>t[c]&&(p=t[c]);for(e=1<<h,n=new(y?Uint32Array:Array)(e),r=1,i=0,o=2;h>=r;){for(c=0;l>c;++c)if(t[c]===r){for(s=0,a=i,u=0;r>u;++u)s=s<<1|1&a,a>>=1;for(f=r<<16|c,u=s;e>u;u+=o)n[u]=f;++i}++r,i<<=1,o<<=1}return[n,h,p]}function r(e,n){switch(this.l=[],this.m=32768,this.d=this.f=this.c=this.t=0,this.input=y?new Uint8Array(e):e,this.u=!1,this.n=S,this.L=!1,(n||!(n={}))&&(n.index&&(this.c=n.index),n.bufferSize&&(this.m=n.bufferSize),n.bufferType&&(this.n=n.bufferType),n.resize&&(this.L=n.resize)),this.n){case x:this.a=32768,this.b=new(y?Uint8Array:Array)(32768+this.m+258);break;case S:this.a=0,this.b=new(y?Uint8Array:Array)(this.m),this.e=this.X,this.B=this.S,this.q=this.W;break;default:t(Error("invalid inflate mode"))}}function i(e,n){for(var r,i=e.f,o=e.d,s=e.input,a=e.c,c=s.length;n>o;)a>=c&&t(Error("input buffer is broken")),i|=s[a++]<<o,o+=8;return r=i&(1<<n)-1,e.f=i>>>n,e.d=o-n,e.c=a,r}function o(t,e){for(var n,r,i=t.f,o=t.d,s=t.input,a=t.c,c=s.length,u=e[0],f=e[1];f>o&&!(a>=c);)i|=s[a++]<<o,o+=8;return n=u[i&(1<<f)-1],r=n>>>16,t.f=i>>r,t.d=o-r,t.c=a,65535&n}function s(t){function e(t,e,n){var r,s,a,c=this.K;for(a=0;t>a;)switch(r=o(this,e)){case 16:for(s=3+i(this,2);s--;)n[a++]=c;break;case 17:for(s=3+i(this,3);s--;)n[a++]=0;c=0;break;case 18:for(s=11+i(this,7);s--;)n[a++]=0;c=0;break;default:c=n[a++]=r}return this.K=c,n}var r,s,a,c,u=i(t,5)+257,f=i(t,5)+1,l=i(t,4)+4,h=new(y?Uint8Array:Array)(D.length);for(c=0;l>c;++c)h[D[c]]=i(t,3);if(!y)for(c=l,l=h.length;l>c;++c)h[D[c]]=0;r=n(h),s=new(y?Uint8Array:Array)(u),a=new(y?Uint8Array:Array)(f),t.K=0,t.q(n(e.call(t,u,r,s)),n(e.call(t,f,r,a)))}function a(t){t=t||{},this.files=[],this.v=t.comment}function c(t,e){e=e||{},this.input=y&&t instanceof Array?new Uint8Array(t):t,this.c=0,this.ca=e.verify||!1,this.j=e.password}function u(t,e){this.input=t,this.offset=e}function f(t,e){this.input=t,this.offset=e}function l(e){var n,r,i,o,s=[],a={};if(!e.i){if(e.o===d){var c,f=e.input;if(!e.D)t:{var l,h=e.input;for(l=h.length-12;l>0;--l)if(h[l]===Z[0]&&h[l+1]===Z[1]&&h[l+2]===Z[2]&&h[l+3]===Z[3]){e.D=l;break t}t(Error("End of Central Directory Record not found"))}c=e.D,(f[c++]!==Z[0]||f[c++]!==Z[1]||f[c++]!==Z[2]||f[c++]!==Z[3])&&t(Error("invalid signature")),e.ia=f[c++]|f[c++]<<8,e.ka=f[c++]|f[c++]<<8,e.la=f[c++]|f[c++]<<8,e.ba=f[c++]|f[c++]<<8,e.R=(f[c++]|f[c++]<<8|f[c++]<<16|f[c++]<<24)>>>0,e.o=(f[c++]|f[c++]<<8|f[c++]<<16|f[c++]<<24)>>>0,e.w=f[c++]|f[c++]<<8,e.v=y?f.subarray(c,c+e.w):f.slice(c,c+e.w)}for(n=e.o,i=0,o=e.ba;o>i;++i)r=new u(e.input,n),r.parse(),n+=r.length,s[i]=r,a[r.filename]=i;e.R<n-e.o&&t(Error("invalid file header size")),e.i=s,e.G=a}}function h(t,e,n){return n^=t.s(e),t.k(e,n),n}var p,d=void 0,g=this,y="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16
}function p(e){if(e)o(e);else{var r=Date.now();n(t,A,y,{mtime:r,ctime:r},g)}}function d(e){e?o(e):(v[E]=new Me(b.id,ve),t.put(y.data,v,p))}function g(t){t?o(t):o(null,b)}e=he(e);var y,v,m,b,w,E=de(e),A=pe(e),k=0;Ee==E?le(r).contains(xe)?o(new Ce.EISDIR("the named file is a directory and O_WRITE is set")):i(t,e,f):i(t,A,s)}function f(t,e,r,i,o,s){function a(t){t?s(t):s(null,o)}function c(r){if(r)s(r);else{var i=Date.now();n(t,e.path,l,{mtime:i,ctime:i},a)}}function u(e){e?s(e):t.put(l.id,l,c)}function f(n,a){if(n)s(n);else{l=a;var c=new Uint8Array(o),f=r.subarray(i,i+o);c.set(f),e.position=o,l.size=o,l.version+=1,t.put(l.data,c,u)}}var l;t.get(e.id,f)}function l(t,e,r,i,o,s,a){function c(t){t?a(t):a(null,o)}function u(r){if(r)a(r);else{var i=Date.now();n(t,e.path,p,{mtime:i,ctime:i},c)}}function f(e){e?a(e):t.put(p.id,p,u)}function l(n,c){if(n)a(n);else{d=c;var u=void 0!==s&&null!==s?s:e.position,l=Math.max(d.length,u+o),h=new Uint8Array(l);d&&h.set(d);var g=r.subarray(i,i+o);h.set(g,u),void 0===s&&(e.position+=o),p.size=l,p.version+=1,t.put(p.data,h,f)}}function h(e,n){e?a(e):(p=n,t.get(p.data,l))}var p,d;t.get(e.id,h)}function h(t,e,n,r,i,o,s){function a(t,a){if(t)s(t);else{f=a;var c=void 0!==o&&null!==o?o:e.position;i=c+i>n.length?i-c:i;var u=f.subarray(c,c+i);n.set(u,r),void 0===o&&(e.position+=i),s(null,i)}}function c(e,n){e?s(e):(u=n,t.get(u.data,a))}var u,f;t.get(e.id,c)}function p(t,n,r){n=he(n),de(n),i(t,n,e(r))}function d(t,n,r){t.get(n.id,e(r))}function g(t,n,r){function o(e,n){e?r(e):(a=n,t.get(a.data,s))}function s(n,i){n?r(n):(c=i,le(c).has(u)?t.get(c[u].id,e(r)):r(new Ce.ENOENT("a component of the path does not name an existing file")))}n=he(n);var a,c,u=de(n),f=pe(n);Ee==u?i(t,n,e(r)):i(t,f,o)}function y(t,e,r,o){function s(e){e?o(e):n(t,r,b,{ctime:Date.now()},o)}function a(e,n){e?o(e):(b=n,b.nlinks+=1,t.put(b.id,b,s))}function c(e){e?o(e):t.get(m[w].id,a)}function u(e,n){e?o(e):(m=n,le(m).has(w)?o(new Ce.EEXIST("newpath resolves to an existing file")):(m[w]=y[p],t.put(v.data,m,c)))}function f(e,n){e?o(e):(v=n,t.get(v.data,u))}function l(e,n){e?o(e):(y=n,le(y).has(p)?i(t,E,f):o(new Ce.ENOENT("a component of either path prefix does not exist")))}function h(e,n){e?o(e):(g=n,t.get(g.data,l))}e=he(e);var p=de(e),d=pe(e);r=he(r);var g,y,v,m,b,w=de(r),E=pe(r);i(t,d,h)}function v(t,e,r){function o(e){e?r(e):(delete l[p],t.put(f.data,l,function(){var e=Date.now();n(t,d,f,{mtime:e,ctime:e},r)}))}function s(e){e?r(e):t.delete(h.data,o)}function a(i,a){i?r(i):(h=a,h.nlinks-=1,1>h.nlinks?t.delete(h.id,s):t.put(h.id,h,function(){n(t,e,h,{ctime:Date.now()},o)}))}function c(e,n){e?r(e):(l=n,le(l).has(p)?t.get(l[p].id,a):r(new Ce.ENOENT("a component of the path does not name an existing file")))}function u(e,n){e?r(e):(f=n,t.get(f.data,c))}e=he(e);var f,l,h,p=de(e),d=pe(e);i(t,d,u)}function m(t,e,n){function r(t,e){if(t)n(t);else{a=e;var r=Object.keys(a);n(null,r)}}function o(e,i){e?n(e):(s=i,t.get(s.data,r))}e=he(e),de(e);var s,a;i(t,e,o)}function b(t,e,r,o){function s(e,n){e?o(e):(l=n,t.get(l.data,a))}function a(t,e){t?o(t):(h=e,le(h).has(d)?o(new Ce.EEXIST):c())}function c(){p=new Be(void 0,be),p.nlinks+=1,p.size=e.length,p.data=e,t.put(p.id,p,f)}function u(e){if(e)o(e);else{var r=Date.now();n(t,g,l,{mtime:r,ctime:r},o)}}function f(e){e?o(e):(h[d]=new Me(p.id,be),t.put(l.data,h,u))}r=he(r);var l,h,p,d=de(r),g=pe(r);Ee==d?o(new Ce.EEXIST):i(t,g,s)}function w(t,e,n){function r(e,r){e?n(e):(a=r,t.get(a.data,o))}function o(e,r){e?n(e):(c=r,le(c).has(u)?t.get(c[u].id,s):n(new Ce.ENOENT("a component of the path does not name an existing file")))}function s(t,e){t?n(t):e.mode!=be?n(new Ce.EINVAL("path not a symbolic link")):n(null,e.data)}e=he(e);var a,c,u=de(e),f=pe(e);i(t,f,r)}function E(t,e,r,o){function s(e,n){e?o(e):n.mode==me?o(new Ce.EISDIR):(f=n,t.get(f.data,a))}function a(e,n){if(e)o(e);else{var i=new Uint8Array(r);n&&i.set(n.subarray(0,r)),t.put(f.data,i,u)}}function c(r){if(r)o(r);else{var i=Date.now();n(t,e,f,{mtime:i,ctime:i},o)}}function u(e){e?o(e):(f.size=r,f.version+=1,t.put(f.id,f,c))}e=he(e);var f;0>r?o(ne