-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsonc.min.js
5 lines (5 loc) · 20.6 KB
/
jsonc.min.js
1
2
3
4
5
/*! JSONC.js v1.6.1 | Date:2015-10-26 | License: https://raw.github.com/tcorral/JSONC/master/LICENSE| (c) 2013
//@ sourceMappingURL=jsonc.min.map
*/
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){var b="";var c,d,e,f,g,h,i;var j=0;a=Base64._utf8_encode(a);while(j<a.length)c=a.charCodeAt(j++),d=a.charCodeAt(j++),e=a.charCodeAt(j++),f=c>>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,isNaN(d)?h=i=64:isNaN(e)&&(i=64),b=b+this._keyStr.charAt(f)+this._keyStr.charAt(g)+this._keyStr.charAt(h)+this._keyStr.charAt(i);return b},decode:function(a){var b="";var c,d,e;var f,g,h,i;var j=0;a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(j<a.length)f=this._keyStr.indexOf(a.charAt(j++)),g=this._keyStr.indexOf(a.charAt(j++)),h=this._keyStr.indexOf(a.charAt(j++)),i=this._keyStr.indexOf(a.charAt(j++)),c=f<<2|g>>4,d=(15&g)<<4|h>>2,e=(3&h)<<6|i,b+=String.fromCharCode(c),64!=h&&(b+=String.fromCharCode(d)),64!=i&&(b+=String.fromCharCode(e));return b=Base64._utf8_decode(b)},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");var b="";for(var c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(192|d>>6),b+=String.fromCharCode(128|63&d)):(b+=String.fromCharCode(224|d>>12),b+=String.fromCharCode(128|63&d>>6),b+=String.fromCharCode(128|63&d))}return b},_utf8_decode:function(a){var b="";var c=0;var d=c1=c2=0;while(c<a.length)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):d>191&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&c2),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&c2)<<6|63&c3),c+=3);return b}};void function(a,b){"object"==typeof module?module.exports=b():"function"==typeof define?define(b):a.crc32=b()}(this,function(){"use strict";var a=[],b=3988292384;function c(){var c,d,e;for(d=0;256>d;d+=1){for(c=d,e=0;8>e;e+=1)1&c?c=b^c>>>1:c>>>=1;a[d]=c>>>0}}function d(a){return Array.prototype.map.call(a,function(a){return a.charCodeAt(0)})}function e(a){var c=-1,d,e,f,g;for(d=0,f=a.length;f>d;d+=1){for(g=255&(c^a[d]),e=0;8>e;e+=1)1===(1&g)?g=g>>>1^b:g>>>=1;c=c>>>8^g}return-1^c}function f(b,c){var d,e,g;if("undefined"!=typeof f.crc&&c&&b||(f.crc=-1,b)){for(d=f.crc,e=0,g=b.length;g>e;e+=1)d=d>>>8^a[255&(d^b[e])];return f.crc=d,-1^d}}c();var g=function(a,b){var a="string"==typeof a?d(a):a,c=b?e(a):f(a);return(c>>>0).toString(16)};return g.direct=e,g.table=f,g}),function(a){var b=32768,c=0,d=1,e=2,f=6,g=!1,h=32768,i=8192,j=2*b,k=3,l=258,m=16,n=8192,o=15,p=n,q=1<<o,r=q-1,s=b-1,t=0,u=4096,v=l+k+1,w=b-v,x=1,y=15,z=7,A=29,B=256,C=256,D=B+1+A,E=30,F=19,G=16,H=17,I=18,J=2*D+1,K=parseInt((o+k-1)/k,10),L,M,N,O,P=null,Q,R,S,T,U,V,W,X,Y,Z,$,_,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb;n>h&&console.error("error: INBUFSIZ is too small"),b<<1>1<<m&&console.error("error: WSIZE is too large"),o>m-1&&console.error("error: HASH_BITS is too large"),(8>o||258!==l)&&console.error("error: Code too clever");function Ob(){this.fc=0,this.dl=0}function Pb(){this.dyn_tree=null,this.static_tree=null,this.extra_bits=null,this.extra_base=0,this.elems=0,this.max_length=0,this.max_code=0}function Qb(a,b,c,d){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d}function Rb(){this.next=null,this.len=0,this.ptr=[],this.off=0}var Sb=[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];var Tb=[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];var Ub=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];var Vb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var Wb=[new Qb(0,0,0,0),new Qb(4,4,8,4),new Qb(4,5,16,8),new Qb(4,6,32,32),new Qb(4,4,16,16),new Qb(8,16,32,32),new Qb(8,16,128,128),new Qb(8,32,128,256),new Qb(32,128,258,1024),new Qb(32,258,258,4096)];function Xb(a){var b;if(a?1>a?a=1:a>9&&(a=9):a=f,kb=a,O=!1,gb=!1,null===P){for(L=M=N=null,P=[],T=[],U=[],V=[],W=[],nb=[],b=0;J>b;b++)nb[b]=new Ob;for(ob=[],b=0;2*E+1>b;b++)ob[b]=new Ob;for(pb=[],b=0;D+2>b;b++)pb[b]=new Ob;for(qb=[],b=0;E>b;b++)qb[b]=new Ob;for(rb=[],b=0;2*F+1>b;b++)rb[b]=new Ob;sb=new Pb,tb=new Pb,ub=new Pb,vb=[],wb=[],zb=[],Ab=[],Bb=[],Cb=[],Db=[],Eb=[]}}function Yb(){L=M=N=null,P=null,T=null,U=null,V=null,W=null,nb=null,ob=null,pb=null,qb=null,rb=null,sb=null,tb=null,ub=null,vb=null,wb=null,zb=null,Ab=null,Bb=null,Cb=null,Db=null,Eb=null}function Zb(a){a.next=L,L=a}function $b(){var a;return null!==L?(a=L,L=L.next):a=new Rb,a.next=null,a.len=a.off=0,a}function _b(a){return W[b+a]}function ac(a,c){return W[b+a]=c}function bc(a){P[R+Q++]=a,R+Q===i&&Hc()}function cc(a){a&=65535,i-2>R+Q?(P[R+Q++]=255&a,P[R+Q++]=a>>>8):(bc(255&a),bc(a>>>8))}function dc(){$=($<<K^255&T[eb+k-1])&r,_=_b($),W[eb&s]=_,ac($,eb)}function ec(a,b){Ec(b[a].fc,b[a].dl)}function fc(a){return 255&(256>a?Bb[a]:Bb[256+(a>>7)])}function gc(a,b,c){return a[b].fc<a[c].fc||a[b].fc===a[c].fc&&zb[b]<=zb[c]}function hc(a,b,c){var d;for(d=0;c>d&&Nb<Mb.length;d++)a[b+d]=255&Mb[Nb++];return d}function ic(){var a;for(a=0;q>a;a++)W[b+a]=0;if(jb=Wb[kb].max_lazy,lb=Wb[kb].good_length,g||(mb=Wb[kb].nice_length),ib=Wb[kb].max_chain,eb=0,Z=0,hb=hc(T,0,2*b),0>=hb)return gb=!0,hb=0,void 0;gb=!1;while(v>hb&&!gb)kc();for($=0,a=0;k-1>a;a++)$=($<<K^255&T[a])&r}function jc(a){var b=ib;var c=eb;var d;var e;var f=db;var h=eb>w?eb-w:t;var i=eb+l;var j=T[c+f-1];var k=T[c+f];var m,n;db>=lb&&(b>>=2);do if(d=a,T[d+f]===k&&T[d+f-1]===j&&T[d]===T[c]&&T[++d]===T[c+1]){c+=2,d++;while(i>c){for(n=!1,m=0;8>m;m+=1)if(c+=1,d+=1,T[c]!==T[d]){n=!0;break}if(n)break}if(e=l-(i-c),c=i-l,e>f){if(fb=a,f=e,g){if(e>=l)break}else if(e>=mb)break;j=T[c+f-1],k=T[c+f]}}while((a=W[a&s])>h&&0!==--b);return f}function kc(){var a,c;var d=j-hb-eb;if(-1===d)d--;else if(eb>=b+w){for(a=0;b>a;a++)T[a]=T[a+b];for(fb-=b,eb-=b,Z-=b,a=0;q>a;a++)c=_b(a),ac(a,c>=b?c-b:t);for(a=0;b>a;a++)c=W[a],W[a]=c>=b?c-b:t;d+=b}gb||(a=hc(T,eb+hb,d),0>=a?gb=!0:hb+=a)}function lc(){while(0!==hb&&null===M){var a;if(dc(),_!==t&&w>=eb-_&&(cb=jc(_),cb>hb&&(cb=hb)),cb>=k)if(a=Bc(eb-fb,cb-k),hb-=cb,jb>=cb){cb--;do eb++,dc();while(0!==--cb);eb++}else eb+=cb,cb=0,$=255&T[eb],$=($<<K^255&T[eb+1])&r;else a=Bc(0,255&T[eb]),hb--,eb++;a&&(Ac(0),Z=eb);while(v>hb&&!gb)kc()}}function mc(){while(0!==hb&&null===M){if(dc(),db=cb,ab=fb,cb=k-1,_!==t&&jb>db&&w>=eb-_&&(cb=jc(_),cb>hb&&(cb=hb),cb===k&&eb-fb>u&&cb--),db>=k&&db>=cb){var a;a=Bc(eb-1-ab,db-k),hb-=db-1,db-=2;do eb++,dc();while(0!==--db);bb=!1,cb=k-1,eb++,a&&(Ac(0),Z=eb)}else bb?(Bc(0,255&T[eb-1])&&(Ac(0),Z=eb),eb++,hb--):(bb=!0,eb++,hb--);while(v>hb&&!gb)kc()}}function nc(){gb||(X=0,Y=0,qc(),ic(),M=null,Q=0,R=0,3>=kb?(db=k-1,cb=0):(cb=k-1,bb=!1),S=!1)}function oc(a,b,c){var d;return O||(nc(),O=!0,0!==hb)?(d=pc(a,b,c),d===c?c:S?d:(3>=kb?lc():mc(),0===hb&&(bb&&Bc(0,255&T[eb-1]),Ac(1),S=!0),d+pc(a,d+b,c-d))):(S=!0,0)}function pc(a,b,c){var d,e,f;d=0;while(null!==M&&c>d){for(e=c-d,e>M.len&&(e=M.len),f=0;e>f;f++)a[b+d+f]=M.ptr[M.off+f];if(M.off+=e,M.len-=e,d+=e,0===M.len){var g;g=M,M=M.next,Zb(g)}}if(d===c)return d;if(Q>R){for(e=c-d,e>Q-R&&(e=Q-R),f=0;e>f;f++)a[b+d+f]=P[R+f];R+=e,d+=e,Q===R&&(Q=R=0)}return d}function qc(){var a;var b;var c;var d;var e;if(0===qb[0].dl){for(sb.dyn_tree=nb,sb.static_tree=pb,sb.extra_bits=Sb,sb.extra_base=B+1,sb.elems=D,sb.max_length=y,sb.max_code=0,tb.dyn_tree=ob,tb.static_tree=qb,tb.extra_bits=Tb,tb.extra_base=0,tb.elems=E,tb.max_length=y,tb.max_code=0,ub.dyn_tree=rb,ub.static_tree=null,ub.extra_bits=Ub,ub.extra_base=0,ub.elems=F,ub.max_length=z,ub.max_code=0,c=0,d=0;A-1>d;d++)for(Cb[d]=c,a=0;a<1<<Sb[d];a++)Ab[c++]=d;for(Ab[c-1]=d,e=0,d=0;16>d;d++)for(Db[d]=e,a=0;a<1<<Tb[d];a++)Bb[e++]=d;for(e>>=7;E>d;d++)for(Db[d]=e<<7,a=0;a<1<<Tb[d]-7;a++)Bb[256+e++]=d;for(b=0;y>=b;b++)vb[b]=0;a=0;while(143>=a)pb[a++].dl=8,vb[8]++;while(255>=a)pb[a++].dl=9,vb[9]++;while(279>=a)pb[a++].dl=7,vb[7]++;while(287>=a)pb[a++].dl=8,vb[8]++;for(uc(pb,D+1),a=0;E>a;a++)qb[a].dl=5,qb[a].fc=Fc(a,5);rc()}}function rc(){var a;for(a=0;D>a;a++)nb[a].fc=0;for(a=0;E>a;a++)ob[a].fc=0;for(a=0;F>a;a++)rb[a].fc=0;nb[C].fc=1,Kb=Lb=0,Fb=Gb=Hb=0,Ib=0,Jb=1}function sc(a,b){var c=wb[b],d=b<<1;while(xb>=d){if(xb>d&&gc(a,wb[d+1],wb[d])&&d++,gc(a,c,wb[d]))break;wb[b]=wb[d],b=d,d<<=1}wb[b]=c}function tc(a){var b=a.dyn_tree;var c=a.extra_bits;var d=a.extra_base;var e=a.max_code;var f=a.max_length;var g=a.static_tree;var h;var i,j;var k;var l;var m;var n=0;for(k=0;y>=k;k++)vb[k]=0;for(b[wb[yb]].dl=0,h=yb+1;J>h;h++)i=wb[h],k=b[b[i].dl].dl+1,k>f&&(k=f,n++),b[i].dl=k,i>e||(vb[k]++,l=0,i>=d&&(l=c[i-d]),m=b[i].fc,Kb+=m*(k+l),null!==g&&(Lb+=m*(g[i].dl+l)));if(0!==n){do{k=f-1;while(0===vb[k])k--;vb[k]--,vb[k+1]+=2,vb[f]--,n-=2}while(n>0);for(k=f;0!==k;k--){i=vb[k];while(0!==i)j=wb[--h],j>e||(b[j].dl!==k&&(Kb+=(k-b[j].dl)*b[j].fc,b[j].fc=k),i--)}}}function uc(a,b){var c=[];var d=0;var e;var f;for(e=1;y>=e;e++)d=d+vb[e-1]<<1,c[e]=d;for(f=0;b>=f;f++){var g=a[f].dl;0!==g&&(a[f].fc=Fc(c[g]++,g))}}function vc(a){var b=a.dyn_tree;var c=a.static_tree;var d=a.elems;var e,f;var g=-1;var h=d;for(xb=0,yb=J,e=0;d>e;e++)0!==b[e].fc?(wb[++xb]=g=e,zb[e]=0):b[e].dl=0;while(2>xb){var i=wb[++xb]=2>g?++g:0;b[i].fc=1,zb[i]=0,Kb--,null!==c&&(Lb-=c[i].dl)}for(a.max_code=g,e=xb>>1;e>=1;e--)sc(b,e);do e=wb[x],wb[x]=wb[xb--],sc(b,x),f=wb[x],wb[--yb]=e,wb[--yb]=f,b[h].fc=b[e].fc+b[f].fc,zb[h]=zb[e]>zb[f]+1?zb[e]:zb[f]+1,b[e].dl=b[f].dl=h,wb[x]=h++,sc(b,x);while(xb>=2);wb[--yb]=wb[x],tc(a),uc(b,g)}function wc(a,b){var c,d=-1,e,f=a[0].dl,g=0,h=7,i=4;for(0===f&&(h=138,i=3),a[b+1].dl=65535,c=0;b>=c;c++)e=f,f=a[c+1].dl,++g<h&&e===f||(i>g?rb[e].fc+=g:0!==e?(e!==d&&rb[e].fc++,rb[G].fc++):10>=g?rb[H].fc++:rb[I].fc++,g=0,d=e,0===f?(h=138,i=3):e===f?(h=6,i=3):(h=7,i=4))}function xc(a,b){var c;var d=-1;var e;var f=a[0].dl;var g=0;var h=7;var i=4;for(0===f&&(h=138,i=3),c=0;b>=c;c++)if(e=f,f=a[c+1].dl,!(++g<h&&e===f)){if(i>g){do ec(e,rb);while(0!==--g)}else 0!==e?(e!==d&&(ec(e,rb),g--),ec(G,rb),Ec(g-3,2)):10>=g?(ec(H,rb),Ec(g-3,3)):(ec(I,rb),Ec(g-11,7));g=0,d=e,0===f?(h=138,i=3):e===f?(h=6,i=3):(h=7,i=4)}}function yc(){var a;for(wc(nb,sb.max_code),wc(ob,tb.max_code),vc(ub),a=F-1;a>=3;a--)if(0!==rb[Vb[a]].dl)break;return Kb+=3*(a+1)+5+5+4,a}function zc(a,b,c){var d;for(Ec(a-257,5),Ec(b-1,5),Ec(c-4,4),d=0;c>d;d++)Ec(rb[Vb[d]].dl,3);xc(nb,a-1),xc(ob,b-1)}function Ac(a){var b,f,g,h,i;if(h=eb-Z,Eb[Hb]=Ib,vc(sb),vc(tb),g=yc(),b=Kb+3+7>>3,f=Lb+3+7>>3,b>=f&&(b=f),b>=h+4&&Z>=0)for(Ec((c<<1)+a,3),Gc(),cc(h),cc(~h),i=0;h>i;i++)bc(T[Z+i]);else f===b?(Ec((d<<1)+a,3),Cc(pb,qb)):(Ec((e<<1)+a,3),zc(sb.max_code+1,tb.max_code+1,g+1),Cc(nb,ob));rc(),0!==a&&Gc()}function Bc(a,b){if(V[Fb++]=b,0===a?nb[b].fc++:(a--,nb[Ab[b]+B+1].fc++,ob[fc(a)].fc++,U[Gb++]=a,Ib|=Jb),Jb<<=1,0===(7&Fb)&&(Eb[Hb++]=Ib,Ib=0,Jb=1),kb>2&&0===(4095&Fb)){var c=8*Fb;var d=eb-Z;var e;for(e=0;E>e;e++)c+=ob[e].fc*(5+Tb[e]);if(c>>=3,Gb<parseInt(Fb/2,10)&&c<parseInt(d/2,10))return!0}return Fb===n-1||Gb===p}function Cc(a,b){var c;var d;var e=0;var f=0;var g=0;var h=0;var i;var j;if(0!==Fb)do 0===(7&e)&&(h=Eb[g++]),d=255&V[e++],0===(1&h)?ec(d,a):(i=Ab[d],ec(i+B+1,a),j=Sb[i],0!==j&&(d-=Cb[i],Ec(d,j)),c=U[f++],i=fc(c),ec(i,b),j=Tb[i],0!==j&&(c-=Db[i],Ec(c,j))),h>>=1;while(Fb>e);ec(C,a)}var Dc=16;function Ec(a,b){Y>Dc-b?(X|=a<<Y,cc(X),X=a>>Dc-Y,Y+=b-Dc):(X|=a<<Y,Y+=b)}function Fc(a,b){var c=0;do c|=1&a,a>>=1,c<<=1;while(--b>0);return c>>1}function Gc(){Y>8?cc(X):Y>0&&bc(X),X=0,Y=0}function Hc(){var a,b;if(0!==Q){for(a=$b(),null===M?M=N=a:N=N.next=a,a.len=Q-R,b=0;b<a.len;b++)a.ptr[b]=P[R+b];Q=R=0}}function Ic(a,b){var c,d,e;Mb=a,Nb=0,"undefined"==typeof b&&(b=f),Xb(b),e=[];do c=oc(e,e.length,1024);while(c>0);return Mb=null,e}a.deflate=Ic,a.DEFAULT_LEVEL=f}(deflate="undefined"==typeof deflate?{}:deflate),function(a){var b=32768,c=0,d=1,e=2,f=9,g=6,h,i,j=null,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],A=[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],B=[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,99,99],C=[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],D=[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],E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function F(){this.next=null,this.list=null}function G(){this.e=0,this.b=0,this.n=0,this.t=null}function H(a,b,c,d,e,f){this.BMAX=16,this.N_MAX=288,this.status=0,this.root=null,this.m=0;var g;var h=[];var i;var j;var k;var l;var m;var n;var o;var p=[];var q;var r;var s;var t=new G;var u=[];var v=[];var w;var x=[];var y;var z;var A;var B;var C;for(C=this.root=null,m=0;m<this.BMAX+1;m++)h[m]=0;for(m=0;m<this.BMAX+1;m++)p[m]=0;for(m=0;m<this.BMAX;m++)u[m]=null;for(m=0;m<this.N_MAX;m++)v[m]=0;for(m=0;m<this.BMAX+1;m++)x[m]=0;i=b>256?a[256]:this.BMAX,q=a,r=0,m=b;do h[q[r]]++,r++;while(--m>0);if(h[0]===b)return this.root=null,this.m=0,this.status=0,void 0;for(n=1;n<=this.BMAX;n++)if(0!==h[n])break;for(o=n,n>f&&(f=n),m=this.BMAX;0!==m;m--)if(0!==h[m])break;for(k=m,f>m&&(f=m),z=1<<n;m>n;n++,z<<=1)if((z-=h[n])<0)return this.status=2,this.m=f,void 0;if((z-=h[m])<0)return this.status=2,this.m=f,void 0;h[m]+=z,x[1]=n=0,q=h,r=1,y=2;while(--m>0)x[y++]=n+=q[r++];q=a,r=0,m=0;do 0!==(n=q[r++])&&(v[x[n]++]=m);while(++m<b);for(b=x[k],x[0]=m=0,q=v,r=0,l=-1,w=p[0]=0,s=null,A=0,null;k>=o;o++){g=h[o];while(g-->0){while(o>w+p[1+l]){if(w+=p[1+l],l++,A=(A=k-w)>f?f:A,(j=1<<(n=o-w))>g+1){j-=g+1,y=o;while(++n<A){if((j<<=1)<=h[++y])break;j-=h[y]}}for(w+n>i&&i>w&&(n=i-w),A=1<<n,p[1+l]=n,s=[],B=0;A>B;B++)s[B]=new G;C=C?C.next=new F:this.root=new F,C.next=null,C.list=s,u[l]=s,l>0&&(x[l]=m,t.b=p[l],t.e=16+n,t.t=s,n=(m&(1<<w)-1)>>w-p[l],u[l-1][n].e=t.e,u[l-1][n].b=t.b,u[l-1][n].n=t.n,u[l-1][n].t=t.t)}for(t.b=o-w,r>=b?t.e=99:q[r]<c?(t.e=q[r]<256?16:15,t.n=q[r++]):(t.e=e[q[r]-c],t.n=d[q[r++]-c]),j=1<<o-w,n=m>>w;A>n;n+=j)s[n].e=t.e,s[n].b=t.b,s[n].n=t.n,s[n].t=t.t;for(n=1<<o-1;0!==(m&n);n>>=1)m^=n;m^=n;while((m&(1<<w)-1)!==x[l])w-=p[l],l--}}this.m=p[1],this.status=0!==z&&1!==k?1:0}function I(){return x.length===y?-1:255&x[y++]}function J(a){while(a>o)n|=I()<<o,o+=8}function K(a){return n&z[a]}function L(a){n>>=a,o-=a}function M(a,c,d){var e;var f;var g;if(0===d)return 0;for(g=0;;){J(v),f=t.list[K(v)],e=f.e;while(e>16){if(99===e)return-1;L(f.b),e-=16,J(e),f=f.t[K(e)],e=f.e}if(L(f.b),16!==e){if(15===e)break;J(e),r=f.n+K(e),L(e),J(w),f=u.list[K(w)],e=f.e;while(e>16){if(99===e)return-1;L(f.b),e-=16,J(e),f=f.t[K(e)],e=f.e}L(f.b),J(e),s=i-f.n-K(e),L(e);while(r>0&&d>g)r--,s&=b-1,i&=b-1,a[c+g++]=h[i++]=h[s++];if(g===d)return d}else if(i&=b-1,a[c+g++]=h[i++]=f.n,g===d)return d}return p=-1,g}function N(a,c,d){var e;if(e=7&o,L(e),J(16),e=K(16),L(16),J(16),e!==(65535&~n))return-1;L(16),r=e,e=0;while(r>0&&d>e)r--,i&=b-1,J(8),a[c+e++]=h[i++]=K(8),L(8);return 0===r&&(p=-1),e}function O(a,b,c){if(!j){var d;var e=[];var f;for(d=0;144>d;d++)e[d]=8;for(null;256>d;d++)e[d]=9;for(null;280>d;d++)e[d]=7;for(null;288>d;d++)e[d]=8;if(l=7,f=new H(e,288,257,A,B,l),0!==f.status)return console.error("HufBuild error: "+f.status),-1;for(j=f.root,l=f.m,d=0;30>d;d++)e[d]=5;if(m=5,f=new H(e,30,0,C,D,m),f.status>1)return j=null,console.error("HufBuild error: "+f.status),-1;k=f.root,m=f.m}return t=j,u=k,v=l,w=m,M(a,b,c)}function P(a,b,c){var d;var e;var h;var i;var j;var k;var l;var m;var n=[];var o;for(d=0;316>d;d++)n[d]=0;if(J(5),l=257+K(5),L(5),J(5),m=1+K(5),L(5),J(4),k=4+K(4),L(4),l>286||m>30)return-1;for(e=0;k>e;e++)J(3),n[E[e]]=K(3),L(3);for(null;19>e;e++)n[E[e]]=0;if(v=7,o=new H(n,19,19,null,null,v),0!==o.status)return-1;t=o.root,v=o.m,i=l+m,d=h=0;while(i>d)if(J(v),j=t.list[K(v)],e=j.b,L(e),e=j.n,16>e)n[d++]=h=e;else if(16===e){if(J(2),e=3+K(2),L(2),d+e>i)return-1;while(e-->0)n[d++]=h}else if(17===e){if(J(3),e=3+K(3),L(3),d+e>i)return-1;while(e-->0)n[d++]=0;h=0}else{if(J(7),e=11+K(7),L(7),d+e>i)return-1;while(e-->0)n[d++]=0;h=0}if(v=f,o=new H(n,l,257,A,B,v),0===v&&(o.status=1),0!==o.status&&1!==o.status)return-1;for(t=o.root,v=o.m,d=0;m>d;d++)n[d]=n[d+l];return w=g,o=new H(n,m,0,C,D,w),u=o.root,w=o.m,0===w&&l>257?-1:0!==o.status?-1:M(a,b,c)}function Q(){h||(h=[]),i=0,n=0,o=0,p=-1,q=!1,r=s=0,t=null}function R(a,f,g){var j,k;j=0;while(g>j){if(q&&-1===p)return j;if(r>0){if(p!==c)while(r>0&&g>j)r--,s&=b-1,i&=b-1,a[f+j++]=h[i++]=h[s++];else{while(r>0&&g>j)r--,i&=b-1,J(8),a[f+j++]=h[i++]=K(8),L(8);0===r&&(p=-1)}if(j===g)return j}if(-1===p){if(q)break;J(1),0!==K(1)&&(q=!0),L(1),J(2),p=K(2),L(2),t=null,r=0}switch(p){case c:k=N(a,f+j,g-j);break;case d:k=t?M(a,f+j,g-j):O(a,f+j,g-j);break;case e:k=t?M(a,f+j,g-j):P(a,f+j,g-j);break;default:k=-1}if(-1===k)return q?0:-1;j+=k}return j}function S(a){var b=[],c;Q(),x=a,y=0;do c=R(b,b.length,1024);while(c>0);return x=null,b}a.inflate=S}(deflate="undefined"==typeof deflate?{}:deflate),function(a){"use strict";var b=a.crc32,c=a.deflate,d=31,e=139,f={deflate:8},g={FTEXT:1,FHCRC:2,FEXTRA:4,FNAME:8,FCOMMENT:16},h={fat:0,amiga:1,vmz:2,unix:3,"vm/cms":4,atari:5,hpfs:6,macintosh:7,"z-system":8,cplm:9,"tops-20":10,ntfs:11,qdos:12,acorn:13,vfat:14,vms:15,beos:16,tandem:17,theos:18},i="unix",j=6;function k(a,b){b.push(255&a)}function l(a,b){b.push(255&a),b.push(a>>>8)}function m(a,b){l(65535&a,b),l(a>>>16,b)}function n(a,b){var c,d=a.length;for(c=0;d>c;c+=1)k(a.charCodeAt(c),b)}function o(a){return a.shift()}function p(a){return a.shift()|a.shift()<<8}function q(a){var b=p(a),c=p(a);return c>32768?(c-=32768,(c<<16|b)+32768*Math.pow(2,16)):c<<16|b}function r(a){var b=[];while(0!==a[0])b.push(String.fromCharCode(a.shift()));return a.shift(),b.join("")}function s(a,b){var c,d=[];for(c=0;b>c;c+=1)d.push(a.shift());return d}function t(a,l){var o=0,p,q,r=[];return l||(l={}),p=l.level||j,"string"==typeof a&&(a=Array.prototype.map.call(a,function(a){return a.charCodeAt(0)})),k(d,r),k(e,r),k(f.deflate,r),l.name&&(o|=g.FNAME),k(o,r),m(l.timestamp||parseInt(Date.now()/1e3,10),r),1===p?k(4,r):9===p?k(2,r):k(0,r),k(h[i],r),l.name&&(n(l.name.substring(l.name.lastIndexOf("/")+1),r),k(0,r)),c.deflate(a,p).forEach(function(a){k(a,r)}),m(parseInt(b(a),16),r),m(a.length,r),r}function u(a,i){var j=Array.prototype.slice.call(a,0),k,l,m,n,t,u,v,w,x,y;if(o(j)!==d||o(j)!==e)throw"Not a GZIP file";if(k=o(j),k=Object.keys(f).some(function(a){return l=a,f[a]===k}),!k)throw"Unsupported compression method";if(m=o(j),n=q(j),t=o(j),k=o(j),Object.keys(h).some(function(a){return h[a]===k?(v=a,!0):void 0}),m&g.FEXTRA&&(k=p(j),s(j,k)),m&g.FNAME&&r(j),m&g.FCOMMENT&&r(j),m&g.FHCRC&&p(j),"deflate"===l&&(y=c.inflate(j.splice(0,j.length-8))),m&g.FTEXT&&(y=Array.prototype.map.call(y,function(a){return String.fromCharCode(a)}).join("")),w=q(j),w!==parseInt(b(y),16))throw"Checksum does not match";if(x=q(j),x!==y.length)throw"Size of decompressed file not correct";return y}a.gzip={zip:t,unzip:u,get DEFAULT_LEVEL(){return j}}}(this),function(){var a,b={},c,d=-1,e={}.toString;a=this,c="object"==typeof exports&&"object"==typeof module&&"object"==typeof module.exports&&"function"==typeof require;function f(a,b){var c,d=a.length;for(c=0;d>c;c++)if(a[c][1]===b)return!0;return!1}function g(a){var b,c=a.length,d=[];for(b=0;c>b;b++)f(d,a[b][1])||d.push(a[b]);return d}function h(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function i(a){return"[object Object]"===e.call(a)}function j(a){return"[object Array]"===e.call(a)}function k(a){var b={},c,d=a.length,e;for(c=0;d>c;c++)e=a[c],b[e[0]]=e[1];return b}function l(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=_!?()*",e=[],f=a;b=b||d.length,c=c||0;while(f>=b)e.push(d.charCodeAt(f%b+c)),f=Math.floor(f/b-1);return e.push(d.charCodeAt(f+c)),e.reverse()}function m(a){return String.fromCharCode.apply(String,a)}function n(a,b){var c,e,h;for(e in a)a.hasOwnProperty(e)&&(h=a[e],(i(h)||j(h))&&(b=b.concat(g(n(h,b)))),isNaN(Number(e))&&(f(b,e)||(d+=1,c=[],c.push(m(l(d)),e),b.push(c))));return b}function o(a,c){var d,e;for(d=0,e=a.length;e>d;d++)a[d]=b.compress(a[d],c)}function p(a,b){var c,d,e,f,i,j;for(b=n(a,b),b=g(b),c=k(b),e=JSON.stringify(a),f=b.length,i=0;f>i;i++)d=b[i],e=e.replace(new RegExp(h('"'+d[1]+'"'),"g"),'"'+d[0]+'"');return j=JSON.parse(e),j._=c,j}function q(a){var c,d;for(c=0,d=a.length;d>c;c++)a[c]=b.decompress(a[c])}function r(a){var b,c,d;b=JSON.parse(JSON.stringify(a._)),delete a._,c=JSON.stringify(a);for(d in b)b.hasOwnProperty(d)&&(c=c.replace(new RegExp('"'+d+'"',"g"),'"'+b[d]+'"'));return c}b.compress=function(a,b){b||(d=-1);var c=b||[],e;return j(a)?(o(a,c),e=a):e=p(a,c),e},b.pack=function(a,c){var d=JSON.stringify(c?b.compress(a):a);return Base64.encode(String.fromCharCode.apply(String,gzip.zip(d,{level:9})))},b.decompress=function(a){var b,c=JSON.parse(JSON.stringify(a));return j(c)?q(c):b=r(c),b?JSON.parse(b):c};function s(a){var b=0,c=a.length,d=[];for(;c>b;b++)d.push(a.charCodeAt(b));return d}b.unpack=function(a,c){var d=s(Base64.decode(a)),e=String.fromCharCode.apply(String,gzip.unzip(d,{level:9})),f=JSON.parse(e);return c?b.decompress(f):f},a.JSONC=b,c?module.exports=b:"undefined"!=typeof define&&define("jsoncomp",[],function(){return b})}.call(this);
//# sourceMappingURL=jsonc.min.map