(function(e,t){functionr(e,t,r){if(4!==t.length)thrownewh.exception.invalid("invalid aes block size");varn=e.c[r],a=t[0]^n[0],i=t[r?3:1]^n[1],s=t[2]^n[2];t=t[r?1:3]^n[3];varo,c,u,f,l=n.length/4-2,d=4,p=[0,0,0,0];o=e.n[r],e=o[0];varg=o[1],m=o[2],y=o[3],b=o[4];for(f=0;l>f;f++)o=e[a>>>24]^g[255&i>>16]^m[255&s>>8]^y[255&t]^n[d],c=e[i>>>24]^g[255&s>>16]^m[255&t>>8]^y[255&a]^n[d+1],u=e[s>>>24]^g[255&t>>16]^m[255&a>>8]^y[255&i]^n[d+2],t=e[t>>>24]^g[255&a>>16]^m[255&i>>8]^y[255&s]^n[d+3],d+=4,a=o,i=c,s=u;for(f=0;4>f;f++)p[r?3&-f:f]=b[a>>>24]<<24^b[255&i>>16]<<16^b[255&s>>8]<<8^b[255&t]^n[d++],o=a,a=i,i=s,s=t,t=o;returnp}functionn(e,t){varr,n,a,i=t.slice(0),s=e.u,o=e.c,c=s[0],u=s[1],h=s[2],f=s[3],l=s[4],d=s[5],p=s[6],g=s[7];for(r=0;64>r;r++)16>r?n=i[r]:(n=i[15&r+1],a=i[15&r+14],n=i[15&r]=0|(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(a>>>17^a>>>19^a>>>10^a<<15^a<<13)+i[15&r]+i[15&r+9]),n=n+g+(l>>>6^l>>>11^l>>>25^l<<26^l<<21^l<<7)+(p^l&(d^p))+o[r],g=p,p=d,d=l,l=0|f+n,f=h,h=u,u=c,c=0|n+(u&h^f&(u^h))+(u>>>2^u>>>13^u>>>22^u<<30^u<<19^u<<10);s[0]=0|s[0]+c,s[1]=0|s[1]+u,s[2]=0|s[2]+h,s[3]=0|s[3]+f,s[4]=0|s[4]+l,s[5]=0|s[5]+d,s[6]=0|s[6]+p,s[7]=0|s[7]+g}functiona(e,t){varr,n=h.random.F[e],a=[];for(rinn)n.hasOwnProperty(r)&&a.push(n[r]);for(r=0;a.length>r;r++)a[r](t)}functioni(e){e.c=s(e).concat(s(e)),e.H=newh.cipher.aes(e.c)}functions(e){for(vart=0;4>t&&(e.h[t]=0|e.h[t]+1,!e.h[t]);t++);returne.H.encrypt(e.h)}this.AeroGear={},AeroGear.Core=function(){if(thisinstanceofAeroGear.Core)throw"Invalid instantiation of base class AeroGear.Core";this.add=function(e){vart,r,n=this[this.collectionName]||{};if(this[this.collectionName]=n,!e)returnthis;if("string"==typeofe)n[e]=AeroGear[this.lib].adapters[this.type](e,this.config);elseif(AeroGear.isArray(e))for(t=0;e.length>t;t++)r=e[t],"string"==typeofr?n[r]=AeroGear[this.lib].adapters[this.type](r,this.config):r.name&&(r.settings=AeroGear.extend(r.settings||{},this.config),r.settings.recordId=r.settings.recordId||r.recordId,n[r.name]=AeroGear[this.lib].adapters[r.type||this.type](r.name,r.settings));else{if(!e.name)returnthis;e.settings=AeroGear.extend(e.settings||{},this.config),e.settings.recordId=e.settings.recordId||e.recordId,n[e.name]=AeroGear[this.lib].adapters[e.type||this.type](e.name,e.settings)}returnthis[this.collectionName]=n,this},this.remove=function(e){vart,r,n=this[this.collectionName]||{};if("string"==typeofe)deleten[e];elseif(AeroGear.isArray(e))for(t=0;e.length>t;t++)r=e[t],"string"==typeofr?deleten[r]:deleten[r.name];elsee&&deleten[e.name];returnthis[this.collectionName]=n,this}},AeroGear.isArray=function(e){return"[object Array]"==={}.toString.call(e)},AeroGear.extend=function(e,t){varr;for(rint)e[r]=t[r];returne},function(){functione(e,t,r){varn=t&&r||0,a=0;for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,function(e){16>a&&(t[n+a++]=g[e])});16>a;)t[n+a++]=0;returnt}functiont(e,t){varr=t||0,n=p;returnn[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]}functionr(e,r,n){vara=r&&n||0,i=r||[];e=e||{};vars=null!=e.clockseq?e.clockseq:v,o=null!=e.msecs?e.msecs:(newDate).getTime(),c=null!=e.nsecs?e.nsecs:x+1,u=o-A+(c-x)/1e4;if(0>u&&null==e.clockseq&&(s=16383&s+1),(0>u||o>A)&&null==e.nsecs&&(c=0),c>=1e4)throwError("uuid.v1(): Can't create more than 10M uuids/sec");A=o,x=c,v=s,o+=122192928e5;varh=(1e4*(268435455&o)+c)%4294967296;i[a++]=255&h>>>24,i[a++]=255&h>>>16,i[a++]=255&h>>>8,i[a++]=255&h;varf=268435455&1e4*(o/4294967296);i[a++]=255&f>>>8,i[a++]=255&f,i[a++]=16|15&f>>>24,i[a++]=255&f>>>16,i[a++]=128|s>>>8,i[a++]=255&s;for(varl=e.node||b,d=0;6>d;d++)i[a+d]=l[d];returnr?r:t(i)}functionn(e,r,n){vara=r&&n||0;"string"==typeofe&&(r="binary"==e?newd(16):null,e=null),e=e||{};vari=e.random||(e.rng||l)();if(i[6]=64|15&i[6],i[8]=128|63&i[8],r)for(vars=0;16>s;s++)r[a+s]=i[s];returnr||t(i)}vara,i,s,o=this,c=Array(16);if(a=function(){for(vare,e,t=c,r=0,r=0;16>r;r++)0==(3&r)&&(e=4294967296*Math.random()),t[r]=255&e>>>