From 41fea3c4343c826507d267285b5acee38fbec97d Mon Sep 17 00:00:00 2001 From: Rizky Date: Mon, 19 Aug 2024 21:39:56 +0700 Subject: [PATCH] fix --- app/srv/core/main.js | 2 +- app/web/src/nova/prod/root.tsx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/srv/core/main.js b/app/srv/core/main.js index 4cc9da05..c21db4d3 100644 --- a/app/srv/core/main.js +++ b/app/srv/core/main.js @@ -128,7 +128,7 @@ return ${h.trim()} `):" "+vw(o[0]):"as no adapter specified";throw new Q("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:wp};function vp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gn(null,e)}function du(e){return vp(e),e.headers=Fe.from(e.headers),e.data=Os.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),fu.getAdapter(e.adapter||ro.adapter)(e).then(function(r){return vp(e),r.data=Os.call(e,e.transformResponse,r),r.headers=Fe.from(r.headers),r},function(r){return Ts(r)||(vp(e),r&&r.response&&(r.response.data=Os.call(e,e.transformResponse,r.response),r.response.headers=Fe.from(r.response.headers))),Promise.reject(r)})}y();w();_();y();w();_();var pu="1.7.2";var xp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{xp[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var xw={};xp.transitional=function(t,n,r){function i(o,s){return"[Axios v"+pu+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,l)=>{if(t===!1)throw new Q(i(s," has been removed"+(n?" in "+n:"")),Q.ERR_DEPRECATED);return n&&!xw[s]&&(xw[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,l):!0}};function JR(e,t,n){if(typeof e!="object")throw new Q("options must be an object",Q.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let o=r[i],s=t[o];if(s){let l=e[o],u=l===void 0||s(l,o,e);if(u!==!0)throw new Q("option "+o+" must be "+u,Q.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Q("Unknown option "+o,Q.ERR_BAD_OPTION)}}var mu={assertOptions:JR,validators:xp};var xr=mu.validators,so=class{constructor(t){this.defaults=t,this.interceptors={request:new lp,response:new lp}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;let o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=nn(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&mu.assertOptions(r,{silentJSONParsing:xr.transitional(xr.boolean),forcedJSONParsing:xr.transitional(xr.boolean),clarifyTimeoutError:xr.transitional(xr.boolean)},!1),i!=null&&(I.isFunction(i)?n.paramsSerializer={serialize:i}:mu.assertOptions(i,{encode:xr.function,serialize:xr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&I.merge(o.common,o[n.method]);o&&I.forEach(["delete","get","head","post","put","patch","common"],h=>{delete o[h]}),n.headers=Fe.concat(s,o);let l=[],u=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(u=u&&S.synchronous,l.unshift(S.fulfilled,S.rejected))});let c=[];this.interceptors.response.forEach(function(S){c.push(S.fulfilled,S.rejected)});let a,p=0,f;if(!u){let h=[du.bind(this),void 0];for(h.unshift.apply(h,l),h.push.apply(h,c),f=h.length,a=Promise.resolve(n);p{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o,s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,l){r.reason||(r.reason=new gn(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new e(function(i){t=i}),cancel:t}}},Sw=Sp;y();w();_();function kp(e){return function(n){return e.apply(null,n)}}y();w();_();function bp(e){return I.isObject(e)&&e.isAxiosError===!0}y();w();_();var Ep={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ep).forEach(([e,t])=>{Ep[t]=e});var kw=Ep;function bw(e){let t=new Ps(e),n=bs(Ps.prototype.request,t);return I.extend(n,Ps.prototype,t,{allOwnKeys:!0}),I.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return bw(nn(e,i))},n}var De=bw(ro);De.Axios=Ps;De.CanceledError=gn;De.CancelToken=Sw;De.isCancel=Ts;De.VERSION=pu;De.toFormData=vr;De.AxiosError=Q;De.Cancel=De.CanceledError;De.all=function(t){return Promise.all(t)};De.spread=kp;De.isAxiosError=bp;De.mergeConfig=nn;De.AxiosHeaders=Fe;De.formToJSON=e=>su(I.isHTMLForm(e)?new FormData(e):e);De.getAdapter=fu.getAdapter;De.HttpStatusCode=kw;De.default=De;var hu=De;var{Axios:z5,AxiosError:F5,CanceledError:U5,isCancel:B5,CancelToken:$5,VERSION:H5,all:V5,Cancel:W5,isAxiosError:G5,spread:Z5,toFormData:K5,AxiosHeaders:q5,HttpStatusCode:X5,formToJSON:Q5,getAdapter:J5,mergeConfig:Y5}=hu;BigInt.prototype.toJSON=function(){return"BigInt::"+this.toString()};var YR=typeof window<"u"?window:null,Ew=typeof global<"u"?global:void 0,gu=async(e,t,n,r)=>{let i={...n},o=null,s=!1,l=null,u=[];if(Array.isArray(t))for(let f of t)f instanceof File&&(u.push(f),s=!0),typeof f=="function"&&(l=f);else t instanceof File&&(s=!0,u.push(t));if(!s)o=JSON.stringify(t),i["content-type"]="aplication/json";else{let f=new FormData;for(let d of u)f.append(d.name,d);o=f,delete i["content-type"],i.enctype="multipart/form-data;"}let c=new URL(e);if(YR!==null){let f=new URL(location.href),d="";if(c.host===f.host||Ew&&typeof Ew.server_hook=="function"?d=c.toString():d=`${f.protocol}//${f.host}/_proxy/${encodeURIComponent(c.toString())}`,d){if(l)return(await hu({method:t?"post":void 0,url:d,data:o,onUploadProgress:l})).data;{let S=await(await fetch(d,t?{method:"POST",body:o,headers:i}:void 0)).text();if(r===!1)return S;try{return JSON.parse(S,Rw)}catch{return S}}}}let p=await(await fetch(c,t?{method:"POST",body:o,headers:i}:void 0)).text();try{return JSON.parse(p,Rw)}catch{return p}},Rw=(e,t)=>typeof t=="string"&&t.startsWith("BigInt::")?BigInt(t.substring(8)):t;y();w();_();var Rp=Z(tp()),Cw=async(e,t)=>{let n=(0,Rp.default)(e,"/");await new Promise(r=>{let i=document,o=i.createElement("script");o.onload=async()=>{r()},localStorage.getItem("api-ts-"+n)||localStorage.setItem("api-ts-"+n,Date.now().toString());let s=localStorage.getItem("api-ts-"+n),l=new URL(n),u=new URL(location.href);u.hash="",l.hash="";let c="";l.host!==u.host&&(c="&remote=1"),u.pathname="";let a=(0,Rp.default)(u.toString(),"/");t?o.src=`${a}/_prasi/load.js?url=${n}&v3&dev=1${c}`:o.src=`${a}/_prasi/load.js?url=${n}&v3${c}`,o.onerror=()=>{r()},document.querySelector(`script[src="${o.src}"]`)?r():i.body.appendChild(o)})};var Ls={},Ow=e=>{jn.prasiApi||(jn.prasiApi={});try{let t=new URL(e),n=`${t.protocol}//${t.host}`;return jn.prasiApi[n]||Ls[n]||(Ls[n]=Cw(n,location.hostname.includes("prasi"))),new Proxy({},{get:(r,i)=>{if(i==="_url")return(s,l)=>{let u=new URL(n);u.pathname=s.split("/").filter(p=>p).join("/");let c=new URL(location.href),a="";return u.host===c.host||l===!1?a=u.toString():a=`${c.protocol}//${c.host}/_proxy/${encodeURIComponent(u.toString())}`,a};let o=s=>function(...l){return new Promise(async(u,c)=>{try{let a=jn.prasiApi[n];if(!a&&Ls&&typeof Ls[n]=="object"&&(await Ls[n],a=jn.prasiApi[n]),a){if(s==="_raw"){let d=l[0],h=`${n}${d}`,S=await Iw(h,l.slice(1));u(S);return}if(a.apiEntry||(a.apiEntry={}),a.apiEntry&&!a.apiEntry[s]){c(`API ${s.toString()} not found, existing API: - ${Object.keys(a.apiEntry||{}).join(` - - `)}`);return}let p=a.apiEntry[s].url,f=a.apiEntry[s].args;if(p&&f){if(l.length>0&&f.length>0)for(let[S,k]of Object.entries(l)){let m=f[parseInt(S)];f&&f.includes(m)&&k&&typeof k!="string"&&typeof k!="number"||(p=p.replace(`:${m}?`,k+""),p=p.replace(`:${m}`,k+""))}let d=`${n}${p}`,h=await Iw(d,l);u(h)}else console.error(`API Not Found: ${s.toString()}`)}else c("Failed to load API [Proxy]: "+n)}catch(a){c(a)}})};return i==="then"?new Proxy({},{get:(s,l)=>o(l)}):o(i)}})}catch{return null}},Iw=async(e,t)=>await gu(e,t,{"content-type":"application/json"});y();w();_();var Yv=Z(Nw());y();w();_();function po(e){let t=e.length;for(;--t>=0;)e[t]=0}var iC=0,yv=1,oC=2,sC=3,lC=258,Xp=29,qs=256,Bs=qs+1+Xp,uo=30,Qp=19,_v=2*Bs+1,Jr=15,Cp=16,aC=7,Jp=256,wv=16,vv=17,xv=18,Bp=new Uint8Array([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]),Su=new Uint8Array([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]),uC=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Sv=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),cC=512,Bn=new Array((Bs+2)*2);po(Bn);var zs=new Array(uo*2);po(zs);var $s=new Array(cC);po($s);var Hs=new Array(lC-sC+1);po(Hs);var Yp=new Array(Xp);po(Yp);var ku=new Array(uo);po(ku);function Ip(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}var kv,bv,Ev;function Op(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var Rv=e=>e<256?$s[e]:$s[256+(e>>>7)],Vs=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},xt=(e,t,n)=>{e.bi_valid>Cp-n?(e.bi_buf|=t<>Cp-e.bi_valid,e.bi_valid+=n-Cp):(e.bi_buf|=t<{xt(e,n[t*2],n[t*2+1])},Cv=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},fC=e=>{e.bi_valid===16?(Vs(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},dC=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,u=t.stat_desc.max_length,c,a,p,f,d,h,S=0;for(f=0;f<=Jr;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<_v;c++)a=e.heap[c],f=n[n[a*2+1]*2+1]+1,f>u&&(f=u,S++),n[a*2+1]=f,!(a>r)&&(e.bl_count[f]++,d=0,a>=l&&(d=s[a-l]),h=n[a*2],e.opt_len+=h*(f+d),o&&(e.static_len+=h*(i[a*2+1]+d)));if(S!==0){do{for(f=u-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[u]--,S-=2}while(S>0);for(f=u;f!==0;f--)for(a=e.bl_count[f];a!==0;)p=e.heap[--c],!(p>r)&&(n[p*2+1]!==f&&(e.opt_len+=(f-n[p*2+1])*n[p*2],n[p*2+1]=f),a--)}},Iv=(e,t,n)=>{let r=new Array(Jr+1),i=0,o,s;for(o=1;o<=Jr;o++)i=i+n[o-1]<<1,r[o]=i;for(s=0;s<=t;s++){let l=e[s*2+1];l!==0&&(e[s*2]=Cv(r[l]++,l))}},pC=()=>{let e,t,n,r,i,o=new Array(Jr+1);for(n=0,r=0;r>=7;r{let t;for(t=0;t{e.bi_valid>8?Vs(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Pw=(e,t,n,r)=>{let i=t*2,o=n*2;return e[i]{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i{let r,i,o=0,s,l;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?_n(e,i,t):(s=Hs[i],_n(e,s+qs+1,t),l=Bp[s],l!==0&&(i-=Yp[s],xt(e,i,l)),r--,s=Rv(r),_n(e,s,n),l=Su[s],l!==0&&(r-=ku[s],xt(e,r,l)));while(o{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,s,l,u=-1,c;for(e.heap_len=0,e.heap_max=_v,s=0;s>1;s>=1;s--)Tp(e,n,s);c=o;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Tp(e,n,1),l=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=l,n[c*2]=n[s*2]+n[l*2],e.depth[c]=(e.depth[s]>=e.depth[l]?e.depth[s]:e.depth[l])+1,n[s*2+1]=n[l*2+1]=c,e.heap[1]=c++,Tp(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],dC(e,t),Iv(n,u,e.bl_count)},Dw=(e,t,n)=>{let r,i=-1,o,s=t[0*2+1],l=0,u=7,c=4;for(s===0&&(u=138,c=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=s,s=t[(r+1)*2+1],!(++l{let r,i=-1,o,s=t[0*2+1],l=0,u=7,c=4;for(s===0&&(u=138,c=3),r=0;r<=n;r++)if(o=s,s=t[(r+1)*2+1],!(++l{let t;for(Dw(e,e.dyn_ltree,e.l_desc.max_code),Dw(e,e.dyn_dtree,e.d_desc.max_code),$p(e,e.bl_desc),t=Qp-1;t>=3&&e.bl_tree[Sv[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},hC=(e,t,n,r)=>{let i;for(xt(e,t-257,5),xt(e,n-1,5),xt(e,r-4,4),i=0;i{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return 0;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return 1;for(n=32;n{jw||(pC(),jw=!0),e.l_desc=new Op(e.dyn_ltree,kv),e.d_desc=new Op(e.dyn_dtree,bv),e.bl_desc=new Op(e.bl_tree,Ev),e.bi_buf=0,e.bi_valid=0,Ov(e)},Av=(e,t,n,r)=>{xt(e,(iC<<1)+(r?1:0),3),Tv(e),Vs(e,n),Vs(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},_C=e=>{xt(e,yv<<1,3),_n(e,Jp,Bn),fC(e)},wC=(e,t,n,r)=>{let i,o,s=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=gC(e)),$p(e,e.l_desc),$p(e,e.d_desc),s=mC(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?Av(e,t,n,r):e.strategy===4||o===i?(xt(e,(yv<<1)+(r?1:0),3),Lw(e,Bn,zs)):(xt(e,(oC<<1)+(r?1:0),3),hC(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),Lw(e,e.dyn_ltree,e.dyn_dtree)),Ov(e),r&&Tv(e)},vC=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Hs[n]+qs+1)*2]++,e.dyn_dtree[Rv(t)*2]++),e.sym_next===e.sym_end),xC=yC,SC=Av,kC=wC,bC=vC,EC=_C,RC={_tr_init:xC,_tr_stored_block:SC,_tr_flush_block:kC,_tr_tally:bC,_tr_align:EC},CC=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,s=0;for(;n!==0;){s=n>2e3?2e3:n,n-=s;do i=i+t[r++]|0,o=o+i|0;while(--s);i%=65521,o%=65521}return i|o<<16|0},Ws=CC,IC=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},OC=new Uint32Array(IC()),TC=(e,t,n,r)=>{let i=OC,o=r+n;e^=-1;for(let s=r;s>>8^i[(e^t[s])&255];return e^-1},We=TC,ti={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"},ii={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_MEM_ERROR:-4,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},{_tr_init:AC,_tr_stored_block:Hp,_tr_flush_block:NC,_tr_tally:br,_tr_align:PC}=RC,{Z_NO_FLUSH:Er,Z_PARTIAL_FLUSH:LC,Z_FULL_FLUSH:DC,Z_FINISH:Wt,Z_BLOCK:zw,Z_OK:et,Z_STREAM_END:Fw,Z_STREAM_ERROR:wn,Z_DATA_ERROR:MC,Z_BUF_ERROR:Ap,Z_DEFAULT_COMPRESSION:jC,Z_FILTERED:zC,Z_HUFFMAN_ONLY:yu,Z_RLE:FC,Z_FIXED:UC,Z_DEFAULT_STRATEGY:BC,Z_UNKNOWN:$C,Z_DEFLATED:Ru}=ii,HC=9,VC=15,WC=8,GC=29,ZC=256,Vp=ZC+1+GC,KC=30,qC=19,XC=2*Vp+1,QC=15,se=3,kr=258,vn=kr+se+1,JC=32,co=42,em=57,Wp=69,Gp=73,Zp=91,Kp=103,Yr=113,Ms=666,dt=1,mo=2,ni=3,ho=4,YC=3,ei=(e,t)=>(e.msg=ti[t],t),Uw=e=>e*2-(e>4?9:0),Sr=e=>{let t=e.length;for(;--t>=0;)e[t]=0},e3=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},t3=(e,t,n)=>(t<{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,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,t.pending===0&&(t.pending_out=0))},At=(e,t)=>{NC(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Tt(e.strm)},ce=(e,t)=>{e.pending_buf[e.pending++]=t},Ds=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},qp=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Ws(e.adler,t,i,n):e.state.wrap===2&&(e.adler=We(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Nv=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,s=e.prev_length,l=e.nice_match,u=e.strstart>e.w_size-vn?e.strstart-(e.w_size-vn):0,c=e.window,a=e.w_mask,p=e.prev,f=e.strstart+kr,d=c[r+s-1],h=c[r+s];e.prev_length>=e.good_match&&(n>>=2),l>e.lookahead&&(l=e.lookahead);do if(i=t,!(c[i+s]!==h||c[i+s-1]!==d||c[i]!==c[r]||c[++i]!==c[r+1])){r+=2,i++;do;while(c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&rs){if(e.match_start=t,s=o,o>=l)break;d=c[r+s-1],h=c[r+s]}}while((t=p[t&a])>u&&--n!==0);return s<=e.lookahead?s:e.lookahead},fo=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-vn)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),e3(e),r+=t),e.strm.avail_in===0)break;if(n=qp(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=se)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Rr(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Rr(e,e.ins_h,e.window[i+se-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,s=0,l=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Tt(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(qp(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(s===0);return l-=e.strm.avail_in,l&&(l>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=l&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart),e.strstart+=l,e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(qp(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===Wt)&&t!==Er&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,s=t===Wt&&e.strm.avail_in===0&&r===i?1:0,Hp(e,e.block_start,r,s),e.block_start+=r,Tt(e.strm)),s?ni:dt)},Np=(e,t)=>{let n,r;for(;;){if(e.lookahead=se&&(e.ins_h=Rr(e,e.ins_h,e.window[e.strstart+se-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-vn&&(e.match_length=Nv(e,n)),e.match_length>=se)if(r=br(e,e.strstart-e.match_start,e.match_length-se),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=se){e.match_length--;do e.strstart++,e.ins_h=Rr(e,e.ins_h,e.window[e.strstart+se-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Rr(e,e.ins_h,e.window[e.strstart+1]);else r=br(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(At(e,!1),e.strm.avail_out===0))return dt}return e.insert=e.strstart{let n,r,i;for(;;){if(e.lookahead=se&&(e.ins_h=Rr(e,e.ins_h,e.window[e.strstart+se-1]),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=se-1,n!==0&&e.prev_length4096)&&(e.match_length=se-1)),e.prev_length>=se&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-se,r=br(e,e.strstart-1-e.prev_match,e.prev_length-se),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=Rr(e,e.ins_h,e.window[e.strstart+se-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=se-1,e.strstart++,r&&(At(e,!1),e.strm.avail_out===0))return dt}else if(e.match_available){if(r=br(e,0,e.window[e.strstart-1]),r&&At(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return dt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=br(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let n,r,i,o,s=e.window;for(;;){if(e.lookahead<=kr){if(fo(e),e.lookahead<=kr&&t===Er)return dt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=se&&e.strstart>0&&(i=e.strstart-1,r=s[i],r===s[++i]&&r===s[++i]&&r===s[++i])){o=e.strstart+kr;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]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=se?(n=br(e,1,e.match_length-se),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=br(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(At(e,!1),e.strm.avail_out===0))return dt}return e.insert=0,t===Wt?(At(e,!0),e.strm.avail_out===0?ni:ho):e.sym_next&&(At(e,!1),e.strm.avail_out===0)?dt:mo},r3=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(fo(e),e.lookahead===0)){if(t===Er)return dt;break}if(e.match_length=0,n=br(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(At(e,!1),e.strm.avail_out===0))return dt}return e.insert=0,t===Wt?(At(e,!0),e.strm.avail_out===0?ni:ho):e.sym_next&&(At(e,!1),e.strm.avail_out===0)?dt:mo};function yn(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var js=[new yn(0,0,0,0,Pv),new yn(4,4,8,4,Np),new yn(4,5,16,8,Np),new yn(4,6,32,32,Np),new yn(4,4,16,16,lo),new yn(8,16,32,32,lo),new yn(8,16,128,128,lo),new yn(8,32,128,256,lo),new yn(32,128,258,1024,lo),new yn(32,258,258,4096,lo)],i3=e=>{e.window_size=2*e.w_size,Sr(e.head),e.max_lazy_match=js[e.level].max_lazy,e.good_match=js[e.level].good_length,e.nice_match=js[e.level].nice_length,e.max_chain_length=js[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=se-1,e.match_available=0,e.ins_h=0};function o3(){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=Ru,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 Uint16Array(XC*2),this.dyn_dtree=new Uint16Array((2*KC+1)*2),this.bl_tree=new Uint16Array((2*qC+1)*2),Sr(this.dyn_ltree),Sr(this.dyn_dtree),Sr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(QC+1),this.heap=new Uint16Array(2*Vp+1),Sr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Vp+1),Sr(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Xs=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.status!==co&&t.status!==em&&t.status!==Wp&&t.status!==Gp&&t.status!==Zp&&t.status!==Kp&&t.status!==Yr&&t.status!==Ms?1:0},Lv=e=>{if(Xs(e))return ei(e,wn);e.total_in=e.total_out=0,e.data_type=$C;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?em:t.wrap?co:Yr,e.adler=t.wrap===2?0:1,t.last_flush=-2,AC(t),et},Dv=e=>{let t=Lv(e);return t===et&&i3(e.state),t},s3=(e,t)=>Xs(e)||e.state.wrap!==2?wn:(e.state.gzhead=t,et),Mv=(e,t,n,r,i,o)=>{if(!e)return wn;let s=1;if(t===jC&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>HC||n!==Ru||r<8||r>15||t<0||t>9||o<0||o>UC||r===8&&s!==1)return ei(e,wn);r===8&&(r=9);let l=new o3;return e.state=l,l.strm=e,l.status=co,l.wrap=s,l.gzhead=null,l.w_bits=r,l.w_size=1<Mv(e,t,Ru,VC,WC,BC),a3=(e,t)=>{if(Xs(e)||t>zw||t<0)return e?ei(e,wn):wn;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Ms&&t!==Wt)return ei(e,e.avail_out===0?Ap:wn);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Tt(e),e.avail_out===0)return n.last_flush=-1,et}else if(e.avail_in===0&&Uw(t)<=Uw(r)&&t!==Wt)return ei(e,Ap);if(n.status===Ms&&e.avail_in!==0)return ei(e,Ap);if(n.status===co&&n.wrap===0&&(n.status=Yr),n.status===co){let i=Ru+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=yu||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=JC),i+=31-i%31,Ds(n,i),n.strstart!==0&&(Ds(n,e.adler>>>16),Ds(n,e.adler&65535)),e.adler=1,n.status=Yr,Tt(e),n.pending!==0)return n.last_flush=-1,et}if(n.status===em){if(e.adler=0,ce(n,31),ce(n,139),ce(n,8),n.gzhead)ce(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),ce(n,n.gzhead.time&255),ce(n,n.gzhead.time>>8&255),ce(n,n.gzhead.time>>16&255),ce(n,n.gzhead.time>>24&255),ce(n,n.level===9?2:n.strategy>=yu||n.level<2?4:0),ce(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(ce(n,n.gzhead.extra.length&255),ce(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=We(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Wp;else if(ce(n,0),ce(n,0),ce(n,0),ce(n,0),ce(n,0),ce(n,n.level===9?2:n.strategy>=yu||n.level<2?4:0),ce(n,YC),n.status=Yr,Tt(e),n.pending!==0)return n.last_flush=-1,et}if(n.status===Wp){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let l=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+l),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=We(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=l,Tt(e),n.pending!==0)return n.last_flush=-1,et;i=0,o-=l}let s=new Uint8Array(n.gzhead.extra);n.pending_buf.set(s.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=We(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Gp}if(n.status===Gp){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=We(e.adler,n.pending_buf,n.pending-i,i)),Tt(e),n.pending!==0)return n.last_flush=-1,et;i=0}n.gzindexi&&(e.adler=We(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Zp}if(n.status===Zp){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=We(e.adler,n.pending_buf,n.pending-i,i)),Tt(e),n.pending!==0)return n.last_flush=-1,et;i=0}n.gzindexi&&(e.adler=We(e.adler,n.pending_buf,n.pending-i,i))}n.status=Kp}if(n.status===Kp){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Tt(e),n.pending!==0))return n.last_flush=-1,et;ce(n,e.adler&255),ce(n,e.adler>>8&255),e.adler=0}if(n.status=Yr,Tt(e),n.pending!==0)return n.last_flush=-1,et}if(e.avail_in!==0||n.lookahead!==0||t!==Er&&n.status!==Ms){let i=n.level===0?Pv(n,t):n.strategy===yu?r3(n,t):n.strategy===FC?n3(n,t):js[n.level].func(n,t);if((i===ni||i===ho)&&(n.status=Ms),i===dt||i===ni)return e.avail_out===0&&(n.last_flush=-1),et;if(i===mo&&(t===LC?PC(n):t!==zw&&(Hp(n,0,0,!1),t===DC&&(Sr(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Tt(e),e.avail_out===0))return n.last_flush=-1,et}return t!==Wt?et:n.wrap<=0?Fw:(n.wrap===2?(ce(n,e.adler&255),ce(n,e.adler>>8&255),ce(n,e.adler>>16&255),ce(n,e.adler>>24&255),ce(n,e.total_in&255),ce(n,e.total_in>>8&255),ce(n,e.total_in>>16&255),ce(n,e.total_in>>24&255)):(Ds(n,e.adler>>>16),Ds(n,e.adler&65535)),Tt(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?et:Fw)},u3=e=>{if(Xs(e))return wn;let t=e.state.status;return e.state=null,t===Yr?ei(e,MC):et},c3=(e,t)=>{let n=t.length;if(Xs(e))return wn;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==co||r.lookahead)return wn;if(i===1&&(e.adler=Ws(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Sr(r.head),r.strstart=0,r.block_start=0,r.insert=0);let u=new Uint8Array(r.w_size);u.set(t.subarray(n-r.w_size,n),0),t=u,n=r.w_size}let o=e.avail_in,s=e.next_in,l=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,fo(r);r.lookahead>=se;){let u=r.strstart,c=r.lookahead-(se-1);do r.ins_h=Rr(r,r.ins_h,r.window[u+se-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++;while(--c);r.strstart=u,r.lookahead=se-1,fo(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=se-1,r.match_available=0,e.next_in=s,e.input=l,e.avail_in=o,r.wrap=i,et},f3=l3,d3=Mv,p3=Dv,m3=Lv,h3=s3,g3=a3,y3=u3,_3=c3,w3="pako deflate (from Nodeca project)",Fs={deflateInit:f3,deflateInit2:d3,deflateReset:p3,deflateResetKeep:m3,deflateSetHeader:h3,deflate:g3,deflateEnd:y3,deflateSetDictionary:_3,deflateInfo:w3},v3=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),x3=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(let r in n)v3(n,r)&&(e[r]=n[r])}}return e},S3=e=>{let t=0;for(let r=0,i=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Gs[254]=Gs[254]=1;var k3=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,s=e.length,l=0;for(i=0;i>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t},b3=(e,t)=>{if(t<65534&&e.subarray&&jv)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{let n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,o=new Array(n*2);for(i=0,r=0;r4){o[i++]=65533,r+=l-1;continue}for(s&=l===2?31:l===3?15:7;l>1&&r1){o[i++]=65533;continue}s<65536?o[i++]=s:(s-=65536,o[i++]=55296|s>>10&1023,o[i++]=56320|s&1023)}return b3(o,i)},R3=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Gs[e[n]]>t?n:t},Zs={string2buf:k3,buf2string:E3,utf8border:R3};function C3(){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}var zv=C3,Fv=Object.prototype.toString,{Z_NO_FLUSH:I3,Z_SYNC_FLUSH:O3,Z_FULL_FLUSH:T3,Z_FINISH:A3,Z_OK:bu,Z_STREAM_END:N3,Z_DEFAULT_COMPRESSION:P3,Z_DEFAULT_STRATEGY:L3,Z_DEFLATED:D3}=ii;function Qs(e){this.options=Cu.assign({level:P3,method:D3,chunkSize:16384,windowBits:15,memLevel:8,strategy:L3},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zv,this.strm.avail_out=0;let n=Fs.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==bu)throw new Error(ti[n]);if(t.header&&Fs.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=Zs.string2buf(t.dictionary):Fv.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Fs.deflateSetDictionary(this.strm,r),n!==bu)throw new Error(ti[n]);this._dict_set=!0}}Qs.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?A3:I3,typeof e=="string"?n.input=Zs.string2buf(e):Fv.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===O3||o===T3)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Fs.deflate(n,o),i===N3)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Fs.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===bu;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};Qs.prototype.onData=function(e){this.chunks.push(e)};Qs.prototype.onEnd=function(e){e===bu&&(this.result=Cu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function tm(e,t){let n=new Qs(t);if(n.push(e,!0),n.err)throw n.msg||ti[n.err];return n.result}function M3(e,t){return t=t||{},t.raw=!0,tm(e,t)}function j3(e,t){return t=t||{},t.gzip=!0,tm(e,t)}var z3=Qs,F3=tm,U3=M3,B3=j3,$3=ii,H3={Deflate:z3,deflate:F3,deflateRaw:U3,gzip:B3,constants:$3},_u=16209,V3=16191,W3=function(t,n){let r,i,o,s,l,u,c,a,p,f,d,h,S,k,m,g,v,x,N,L,P,D,V,z,G=t.state;r=t.next_in,V=t.input,i=r+(t.avail_in-5),o=t.next_out,z=t.output,s=o-(n-t.avail_out),l=o+(t.avail_out-257),u=G.dmax,c=G.wsize,a=G.whave,p=G.wnext,f=G.window,d=G.hold,h=G.bits,S=G.lencode,k=G.distcode,m=(1<>>24,d>>>=x,h-=x,x=v>>>16&255,x===0)z[o++]=v&65535;else if(x&16){N=v&65535,x&=15,x&&(h>>=x,h-=x),h<15&&(d+=V[r++]<>>24,d>>>=x,h-=x,x=v>>>16&255,x&16){if(L=v&65535,x&=15,hu){t.msg="invalid distance too far back",G.mode=_u;break e}if(d>>>=x,h-=x,x=o-s,L>x){if(x=L-x,x>a&&G.sane){t.msg="invalid distance too far back",G.mode=_u;break e}if(P=0,D=f,p===0){if(P+=c-x,x2;)z[o++]=D[P++],z[o++]=D[P++],z[o++]=D[P++],N-=3;N&&(z[o++]=D[P++],N>1&&(z[o++]=D[P++]))}else{P=o-L;do z[o++]=z[P++],z[o++]=z[P++],z[o++]=z[P++],N-=3;while(N>2);N&&(z[o++]=z[P++],N>1&&(z[o++]=z[P++]))}}else if(x&64){t.msg="invalid distance code",G.mode=_u;break e}else{v=k[(v&65535)+(d&(1<>3,r-=N,h-=N<<3,d&=(1<{let u=l.bits,c=0,a=0,p=0,f=0,d=0,h=0,S=0,k=0,m=0,g=0,v,x,N,L,P,D=null,V,z=new Uint16Array(ao+1),G=new Uint16Array(ao+1),Ge=null,ui,O,B;for(c=0;c<=ao;c++)z[c]=0;for(a=0;a=1&&z[f]===0;f--);if(d>f&&(d=f),f===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,l.bits=1,0;for(p=1;p0&&(e===Hw||f!==1))return-1;for(G[1]=0,c=1;cBw||e===Vw&&m>$w)return 1;for(;;){ui=c-S,s[a]+1=V?(O=Ge[s[a]-V],B=D[s[a]-V]):(O=96,B=0),v=1<>S)+x]=ui<<24|O<<16|B|0;while(x!==0);for(v=1<>=1;if(v!==0?(g&=v-1,g+=v):g=0,a++,--z[c]===0){if(c===f)break;c=t[n+s[a]]}if(c>d&&(g&L)!==N){for(S===0&&(S=d),P+=p,h=c-S,k=1<Bw||e===Vw&&m>$w)return 1;N=g&L,i[N]=d<<24|h<<16|P-o|0}}return g!==0&&(i[P+g]=c-S<<24|64<<16|0),l.bits=d,0},Us=X3,Q3=0,Uv=1,Bv=2,{Z_FINISH:Ww,Z_BLOCK:J3,Z_TREES:wu,Z_OK:ri,Z_STREAM_END:Y3,Z_NEED_DICT:eI,Z_STREAM_ERROR:Gt,Z_DATA_ERROR:$v,Z_MEM_ERROR:Hv,Z_BUF_ERROR:tI,Z_DEFLATED:Gw}=ii,Iu=16180,Zw=16181,Kw=16182,qw=16183,Xw=16184,Qw=16185,Jw=16186,Yw=16187,ev=16188,tv=16189,Eu=16190,Un=16191,Lp=16192,nv=16193,Dp=16194,rv=16195,iv=16196,ov=16197,sv=16198,vu=16199,xu=16200,lv=16201,av=16202,uv=16203,cv=16204,fv=16205,Mp=16206,dv=16207,pv=16208,be=16209,Vv=16210,Wv=16211,nI=852,rI=592,iI=15,oI=iI,mv=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function sI(){this.strm=null,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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var oi=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.modeWv?1:0},Gv=e=>{if(oi(e))return Gt;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Iu,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(nI),t.distcode=t.distdyn=new Int32Array(rI),t.sane=1,t.back=-1,ri},Zv=e=>{if(oi(e))return Gt;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Gv(e)},Kv=(e,t)=>{let n;if(oi(e))return Gt;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Gt:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Zv(e))},qv=(e,t)=>{if(!e)return Gt;let n=new sI;e.state=n,n.strm=e,n.window=null,n.mode=Iu;let r=Kv(e,t);return r!==ri&&(e.state=null),r},lI=e=>qv(e,oI),hv=!0,jp,zp,aI=e=>{if(hv){jp=new Int32Array(512),zp=new Int32Array(32);let t=0;for(;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(Us(Uv,e.lens,0,288,jp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Us(Bv,e.lens,0,32,zp,0,e.work,{bits:5}),hv=!1}e.lencode=jp,e.lenbits=9,e.distcode=zp,e.distbits=5},Xv=(e,t,n,r)=>{let i,o=e.state;return o.window===null&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,i,o,s,l,u,c,a,p,f,d,h,S,k=0,m,g,v,x,N,L,P,D,V=new Uint8Array(4),z,G,Ge=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(oi(e)||!e.output||!e.input&&e.avail_in!==0)return Gt;n=e.state,n.mode===Un&&(n.mode=Lp),s=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,a=n.bits,p=l,f=u,D=ri;e:for(;;)switch(n.mode){case Iu:if(n.wrap===0){n.mode=Lp;break}for(;a<16;){if(l===0)break e;l--,c+=r[o++]<>>8&255,n.check=We(n.check,V,2,0),c=0,a=0,n.mode=Zw;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=be;break}if((c&15)!==Gw){e.msg="unknown compression method",n.mode=be;break}if(c>>>=4,a-=4,P=(c&15)+8,n.wbits===0&&(n.wbits=P),P>15||P>n.wbits){e.msg="invalid window size",n.mode=be;break}n.dmax=1<>8&1),n.flags&512&&n.wrap&4&&(V[0]=c&255,V[1]=c>>>8&255,n.check=We(n.check,V,2,0)),c=0,a=0,n.mode=Kw;case Kw:for(;a<32;){if(l===0)break e;l--,c+=r[o++]<>>8&255,V[2]=c>>>16&255,V[3]=c>>>24&255,n.check=We(n.check,V,4,0)),c=0,a=0,n.mode=qw;case qw:for(;a<16;){if(l===0)break e;l--,c+=r[o++]<>8),n.flags&512&&n.wrap&4&&(V[0]=c&255,V[1]=c>>>8&255,n.check=We(n.check,V,2,0)),c=0,a=0,n.mode=Xw;case Xw:if(n.flags&1024){for(;a<16;){if(l===0)break e;l--,c+=r[o++]<>>8&255,n.check=We(n.check,V,2,0)),c=0,a=0}else n.head&&(n.head.extra=null);n.mode=Qw;case Qw:if(n.flags&1024&&(d=n.length,d>l&&(d=l),d&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+d),P)),n.flags&512&&n.wrap&4&&(n.check=We(n.check,r,d,o)),l-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=Jw;case Jw:if(n.flags&2048){if(l===0)break e;d=0;do P=r[o+d++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P));while(P&&d>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Un;break;case tv:for(;a<32;){if(l===0)break e;l--,c+=r[o++]<>>=a&7,a-=a&7,n.mode=Mp;break}for(;a<3;){if(l===0)break e;l--,c+=r[o++]<>>=1,a-=1,c&3){case 0:n.mode=nv;break;case 1:if(aI(n),n.mode=vu,t===wu){c>>>=2,a-=2;break e}break;case 2:n.mode=iv;break;case 3:e.msg="invalid block type",n.mode=be}c>>>=2,a-=2;break;case nv:for(c>>>=a&7,a-=a&7;a<32;){if(l===0)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=be;break}if(n.length=c&65535,c=0,a=0,n.mode=Dp,t===wu)break e;case Dp:n.mode=rv;case rv:if(d=n.length,d){if(d>l&&(d=l),d>u&&(d=u),d===0)break e;i.set(r.subarray(o,o+d),s),l-=d,o+=d,u-=d,s+=d,n.length-=d;break}n.mode=Un;break;case iv:for(;a<14;){if(l===0)break e;l--,c+=r[o++]<>>=5,a-=5,n.ndist=(c&31)+1,c>>>=5,a-=5,n.ncode=(c&15)+4,c>>>=4,a-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=be;break}n.have=0,n.mode=ov;case ov:for(;n.have>>=3,a-=3}for(;n.have<19;)n.lens[Ge[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,z={bits:n.lenbits},D=Us(Q3,n.lens,0,19,n.lencode,0,n.work,z),n.lenbits=z.bits,D){e.msg="invalid code lengths set",n.mode=be;break}n.have=0,n.mode=sv;case sv:for(;n.have>>24,g=k>>>16&255,v=k&65535,!(m<=a);){if(l===0)break e;l--,c+=r[o++]<>>=m,a-=m,n.lens[n.have++]=v;else{if(v===16){for(G=m+2;a>>=m,a-=m,n.have===0){e.msg="invalid bit length repeat",n.mode=be;break}P=n.lens[n.have-1],d=3+(c&3),c>>>=2,a-=2}else if(v===17){for(G=m+3;a>>=m,a-=m,P=0,d=3+(c&7),c>>>=3,a-=3}else{for(G=m+7;a>>=m,a-=m,P=0,d=11+(c&127),c>>>=7,a-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=be;break}for(;d--;)n.lens[n.have++]=P}}if(n.mode===be)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=be;break}if(n.lenbits=9,z={bits:n.lenbits},D=Us(Uv,n.lens,0,n.nlen,n.lencode,0,n.work,z),n.lenbits=z.bits,D){e.msg="invalid literal/lengths set",n.mode=be;break}if(n.distbits=6,n.distcode=n.distdyn,z={bits:n.distbits},D=Us(Bv,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,z),n.distbits=z.bits,D){e.msg="invalid distances set",n.mode=be;break}if(n.mode=vu,t===wu)break e;case vu:n.mode=xu;case xu:if(l>=6&&u>=258){e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=a,W3(e,f),s=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,a=n.bits,n.mode===Un&&(n.back=-1);break}for(n.back=0;k=n.lencode[c&(1<>>24,g=k>>>16&255,v=k&65535,!(m<=a);){if(l===0)break e;l--,c+=r[o++]<>x)],m=k>>>24,g=k>>>16&255,v=k&65535,!(x+m<=a);){if(l===0)break e;l--,c+=r[o++]<>>=x,a-=x,n.back+=x}if(c>>>=m,a-=m,n.back+=m,n.length=v,g===0){n.mode=fv;break}if(g&32){n.back=-1,n.mode=Un;break}if(g&64){e.msg="invalid literal/length code",n.mode=be;break}n.extra=g&15,n.mode=lv;case lv:if(n.extra){for(G=n.extra;a>>=n.extra,a-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=av;case av:for(;k=n.distcode[c&(1<>>24,g=k>>>16&255,v=k&65535,!(m<=a);){if(l===0)break e;l--,c+=r[o++]<>x)],m=k>>>24,g=k>>>16&255,v=k&65535,!(x+m<=a);){if(l===0)break e;l--,c+=r[o++]<>>=x,a-=x,n.back+=x}if(c>>>=m,a-=m,n.back+=m,g&64){e.msg="invalid distance code",n.mode=be;break}n.offset=v,n.extra=g&15,n.mode=uv;case uv:if(n.extra){for(G=n.extra;a>>=n.extra,a-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=be;break}n.mode=cv;case cv:if(u===0)break e;if(d=f-u,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=be;break}d>n.wnext?(d-=n.wnext,h=n.wsize-d):h=n.wnext-d,d>n.length&&(d=n.length),S=n.window}else S=i,h=s-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do i[s++]=S[h++];while(--d);n.length===0&&(n.mode=xu);break;case fv:if(u===0)break e;i[s++]=n.length,u--,n.mode=xu;break;case Mp:if(n.wrap){for(;a<32;){if(l===0)break e;l--,c|=r[o++]<{if(oi(e))return Gt;let t=e.state;return t.window&&(t.window=null),e.state=null,ri},fI=(e,t)=>{if(oi(e))return Gt;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,ri):Gt},dI=(e,t)=>{let n=t.length,r,i,o;return oi(e)||(r=e.state,r.wrap!==0&&r.mode!==Eu)?Gt:r.mode===Eu&&(i=1,i=Ws(i,t,n,0),i!==r.check)?$v:(o=Xv(e,t,n,n),o?(r.mode=Vv,Hv):(r.havedict=1,ri))},pI=Zv,mI=Kv,hI=Gv,gI=lI,yI=qv,_I=uI,wI=cI,vI=fI,xI=dI,SI="pako inflate (from Nodeca project)",$n={inflateReset:pI,inflateReset2:mI,inflateResetKeep:hI,inflateInit:gI,inflateInit2:yI,inflate:_I,inflateEnd:wI,inflateGetHeader:vI,inflateSetDictionary:xI,inflateInfo:SI};function kI(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var bI=kI,Qv=Object.prototype.toString,{Z_NO_FLUSH:EI,Z_FINISH:RI,Z_OK:Ks,Z_STREAM_END:Fp,Z_NEED_DICT:Up,Z_STREAM_ERROR:CI,Z_DATA_ERROR:gv,Z_MEM_ERROR:II}=ii;function Js(e){this.options=Cu.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zv,this.strm.avail_out=0;let n=$n.inflateInit2(this.strm,t.windowBits);if(n!==Ks)throw new Error(ti[n]);if(this.header=new bI,$n.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Zs.string2buf(t.dictionary):Qv.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=$n.inflateSetDictionary(this.strm,t.dictionary),n!==Ks)))throw new Error(ti[n])}Js.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,o,s,l;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?RI:EI,Qv.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=$n.inflate(n,s),o===Up&&i&&(o=$n.inflateSetDictionary(n,i),o===Ks?o=$n.inflate(n,s):o===gv&&(o=Up));n.avail_in>0&&o===Fp&&n.state.wrap>0&&e[n.next_in]!==0;)$n.inflateReset(n),o=$n.inflate(n,s);switch(o){case CI:case gv:case Up:case II:return this.onEnd(o),this.ended=!0,!1}if(l=n.avail_out,n.next_out&&(n.avail_out===0||o===Fp))if(this.options.to==="string"){let u=Zs.utf8border(n.output,n.next_out),c=n.next_out-u,a=Zs.buf2string(n.output,u);n.next_out=c,n.avail_out=r-c,c&&n.output.set(n.output.subarray(u,u+c),0),this.onData(a)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===Ks&&l===0)){if(o===Fp)return o=$n.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};Js.prototype.onData=function(e){this.chunks.push(e)};Js.prototype.onEnd=function(e){e===Ks&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Cu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function nm(e,t){let n=new Js(t);if(n.push(e),n.err)throw n.msg||ti[n.err];return n.result}function OI(e,t){return t=t||{},t.raw=!0,nm(e,t)}var TI=Js,AI=nm,NI=OI,PI=nm,LI=ii,DI={Inflate:TI,inflate:AI,inflateRaw:NI,ungzip:PI,constants:LI},{Deflate:MI,deflate:jI,deflateRaw:zI,gzip:FI}=H3,{Inflate:UI,inflate:BI,inflateRaw:$I,ungzip:HI}=DI,VI=MI,WI=jI,GI=zI,ZI=FI,KI=UI,qI=BI,XI=$I,QI=HI,JI=ii,Jv={Deflate:VI,deflate:WI,deflateRaw:GI,gzip:ZI,Inflate:KI,inflate:qI,inflateRaw:XI,ungzip:QI,constants:JI};var Hn={tables:{},columns:{},rels:{}},ex=e=>{let t="";return new Proxy({},{get(n,r){return r==="_batch"?{update:async i=>si({name:t,action:"batch_update",table:"",params:{batch:i}},e),upsert:async i=>si({name:t,action:"batch_upsert",table:"",params:{arg:i}},e)}:r==="_schema"?{tables:async()=>(Hn.tables[e]||(Hn.tables[e]=si({name:t,action:"schema_tables",table:"",params:[]},e)),await Hn.tables[e]),columns:async i=>(Hn.columns[e+"_"+i]||(Hn.columns[e+"_"+i]=si({name:t,action:"schema_columns",table:i,params:[]},e)),await Hn.columns[e+"_"+i]),rels:async i=>(Hn.rels[e+"_"+i]||(Hn.rels[e+"_"+i]=si({name:t,action:"schema_rels",table:i,params:[]},e)),await Hn.rels[e+"_"+i])}:r.startsWith("$")?(...i)=>{let o=Jv.gzip(JSON.stringify(i));return si({name:t,action:"query",table:r,params:btoa(o.reduce((s,l)=>s+String.fromCharCode(l),""))},e)}:new Proxy({},{get(i,o){return async(...s)=>(r==="query"&&(r=o,o="query"),await si({name:t,action:o,table:r,params:s},e))}})}})},rm={},si=async(e,t)=>{let n=new URL(t);n.pathname="/_dbs";let r=e||{};r.table&&(n.pathname+=`/${r.table}`);let i=n.toString();typeof localStorage<"u"&&localStorage.mlsid&&(r.mlsid=localStorage.mlsid);let o=(0,Yv.default)({...r,dburl:t}),s=!1;typeof location<"u"&&n.hostname!==location.hostname&&window.isEditor&&["prasi.avolut.com","localhost:4550","127.0.0.1:4550"].includes(location.host)&&(s=!0);let l=async()=>{let u=await gu(i,r,{"content-type":"application/json"},!1);try{if(typeof u=="string")return JSON.parse(u)}catch{}return u};if(s){let u=await fs(`editor-db-cache-${o}`);return u?rm[o]||(l().then(c=>{Hr(`editor-db-cache-${o}`,c)}),rm[o]=!0):(u=await l(),rm[o]=!0,Hr(`editor-db-cache-${o}`,u)),u}return await l()};y();w();_();y();w();_();y();w();_();var tx=Z(Pa());var nx=e=>{let{item:t,item_comp:n,ids:r}=e,i=$i(n);if(rx(i,r),t.id&&(i.id=t.id),i.hidden=t.hidden,i.component){if(i.component.props&&t.component&&t.component.props)for(let o of Object.keys(i.component.props)){let s=t.component.props[o],l=i.component.props[o];s&&(l.value=s.value,l.valueBuilt=s.valueBuilt,l.jsxCalledBy=s.jsxCalledBy,l.content=s.content)}i.component.instances=t.component?.instances,i.component.style=t.component?.style}for(let o of Object.keys(t))delete t[o];for(let[o,s]of Object.entries(i))t[o]=s},rx=(e,t)=>{if(e.originalId=e.id,t[e.id]||(t[e.id]=(0,tx.createId)()),e.id=t[e.id],e.childs)for(let n of e.childs)rx(n,t)};y();w();_();var ix=e=>{let t=Object.entries(e.item_comp.component?.props||{}).sort((n,r)=>n[1].idx-r[1].idx);for(let[n,r]of t){let i=$i(r),o=e.item.component?.props;o&&o[n]&&(i.value=o[n].value,i.valueBuilt=o[n].valueBuilt,o[n].content&&(i.content=o[n].content)),i&&e.each(n,i)}};y();w();_();var Ou=e=>{let t={};for(let[n,r]of Object.entries(e))if(n==="childs"){if(t.childs=[],r&&Array.isArray(r))for(let i of r)i.type==="item"&&i.component?t.childs.push(i):t.childs.push({name:i.name,id:i.id,originalId:i.originalId})}else t[n]=r;return t};var ox=(e,t)=>{let{item:n}=t;if(n.type==="item"&&n.component?.id&&t.parent?.item.id){let r=e.comps[n.component.id];if(e.on?.visit_component&&e.on.visit_component(n,t.root||t.item),!r)return;if(r){let i;if(e.mode==="page"?(n.component.instances||(n.component.instances={}),i=n.component.instances):i=t.parent?.root_instances,i){let s=i[n.id];i[n.id]||(i[n.id]={},s=i[n.id]),nx({item:n,item_comp:r,ids:s})}let o={item:Ou(n),jsx_prop:t.jsx_prop,parent:{id:t.parent.item.id,comp_id:t.parent?.comp?.component?.id,instance_id:t.parent?.instance_id},instances:i};if(e.on?.visit&&e.on.visit(o,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[n.id]=o),ix({item:n,item_comp:r,instance:i?i[n.id]:{},each(s,l){let u=n.component?.id;l.meta?.type==="content-element"&&u&&l.content&&(l.content.name=s,go({...e},{item:l.content,root:t.root||l.content,is_root:!1,jsx_prop:{is_root:!0,comp_id:u,name:s},parent:{item:o.item,instance_id:n.id,comp:r,root_instances:i}}))}}),n.childs)for(let s of Object.values(n.childs))s?.name?.startsWith("jsx:")||s&&Object.keys(s).length>3&&go({...e,mode:"comp"},{item:s,is_root:!1,root:t.root||t.item,parent:{item:n,instance_id:n.id,root_instances:i,comp:r}})}}};var go=(e,t)=>{let n=t.item;if(n.type==="item"&&n.component?.id&&t.ignore_first_component!==!0){ox(e,t);return}let r={item:Ou(n),parent:{id:t.parent?.item.id||"root",instance_id:t.parent?.instance_id,comp_id:t.parent?.comp?.component?.id}};if(t.jsx_prop&&(r.jsx_prop=t.jsx_prop),e.on?.visit&&e.on.visit(r,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[r.item.id]=r),n.childs){for(let[i,o]of Object.entries(n.childs))if(o.id){let s={item:o,is_root:!1,root:t.root||t.item,parent:{item:r.item,instance_id:t.parent?.instance_id,comp:t.parent?.comp,root_instances:t.parent?.root_instances}};t.jsx_prop&&(s.jsx_prop={...t.jsx_prop,is_root:!1}),go(e,s)}}};var li={route:null,promise:null},YI=()=>{if(li.promise)return li.promise;li.promise=new Promise(async e=>{li.route&&e(li.route);let t=await fetch(F.url`_prasi/route`);t.headers.get("content-encoding")||fetch(F.url`_prasi/compress/only-gz`),li.route=await t.json(),e(li.route)})},sx=async()=>{let e=La(),t=[];try{let n=await YI();if(n&&n.site&&n.urls){n.layout&&(F.layout.id=n.layout.id,F.layout.root=n.layout.root,F.layout.meta={},F.layout.root&&(await ai(F.layout.root.childs),Ys(F.layout.meta,F.layout.root))),F.site=n.site,F.site.code={mode:"vsc"},await eO(),F.site.api=Ow(F.site.api_url),F.site.db=ex(F.site.api_url);let r=window;r.serverurl=F.site.api_url,r.db=F.site.db,r.api=F.site.api;for(let i of n.urls)e.insert(i.url,i),t.push(i)}}catch{}return{router:e,pages:t}},eO=()=>new Promise(e=>{let t=document,n=t.createElement("script");n.onload=async()=>{e()};let r=F.site.api_url;r==="*"&&(r=`${location.protocol}//${location.host}`,F.site.api_url=r),r=(0,im.default)(r,"/"),localStorage.getItem("api-ts-"+r)||localStorage.setItem("api-ts-"+r,Date.now().toString());let i=new URL(location.href);if(i.pathname="",!r||!["prasi.avolut.com"].includes(i.hostname)&&i.port!=="4550"){i.hash="";let o=(0,im.default)(i.toString(),"/");n.src=`${o}/_prasi/load.js?url=${o}&v3`,F.site.api_url=`${i.protocol}//${i.host}`}else n.src=`${r}/_prasi/load.js?url=${r}&v3`;n.onerror=()=>{e()},document.querySelector(`script[src="${n.src}"]`)?e():t.body.appendChild(n)}),Ys=(e,t)=>{for(let n of t.childs)go({set_meta:!0,comps:F.comp.list,meta:e,mode:"page"},{item:n})};var tO=new Qr({structuredClone:!0}),Tu={debug:!!localStorage.getItem("prasi-ws-debug"),reconnectTimeout:1e3,id_client:"",id_site:"",ws:null};var Au=e=>{Tu.ws&&nO(Tu.ws,{type:"preview",mode:"listen",data:{...e,client_id:Tu.id_client}})},nO=(e,t)=>{let n=tO.pack(t);Tu.debug&&console.log("%c\u2B06","color:blue",rO(n.length,0),t),e.send(n)};function rO(e,t){if(e==0)return"0 Bytes";var n=1024,r=t||2,i=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,o)).toFixed(r))+" "+i[o]}var ai=async(e,t)=>{let n=F.comp;for(let i of e)i&&i.type!=="text"&&Nu(i,t);let r=Object.keys(n.pending);if(r.length>0){Au({type:"comp",ids:r});try{let i=await(await fetch(F.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[...r]})})).json();for(let[o,s]of Object.entries(i))delete n.pending[o],n.list[o]=s,await Hr(`comp-${o}`,s);if(Object.keys(n.pending).length>0){console.error(`Warning: component not found: ${Object.keys(n.pending)}`);return}await ai(Object.values(i))}catch(i){console.error(i)}}},Nu=(e,t)=>{let n=F.comp;if(e.type==="item"){let r=e.component?.id;if(r){if(!n.list[r]&&!n.pending[r]&&(n.pending[r]=[]),n.pending[r]&&(n.pending[r].find(i=>i.id===e.id)||n.pending[r].push(e)),n.pending[r]&&n.list[r]){for(let i of n.pending[r])for(let o of Object.values(i.component?.props||{}))o.content&&Nu(o.content,t);delete n.pending[r]}if(e.component?.props)for(let i of Object.values(e.component?.props||{}))i.content&&Nu(i.content,t)}}if(e.childs)for(let r of e.childs){let i=r;i&&i.type!=="text"&&Nu(i,t)}};y();w();_();var Pu={},lx=e=>(typeof Pu[e]=="object"||(Pu[e]=new Promise(async t=>{let n=!1,r=await fs(`page-${e}`);r&&(t(r),n=!0);let i=await(await fetch(F.url`_prasi/page/${e}`)).json();!i.root&&i.content_tree&&(i.root=i.content_tree,delete i.content_tree),n||t(i)})),Pu[e]),iO=e=>new Promise(async t=>{let n={},r=[...new Set(e)],i=!0;for(let s of r){let l=await fs(`page-${s}`);if(l)n[s]=l;else{i=!1;break}}i&&t(n);let o=await(await fetch(F.url`_prasi/pages`,{method:"POST",body:JSON.stringify({ids:r})})).json();i||t(o)}),ax=async e=>{let t=e.map(r=>F.route.router?.lookup(r)).filter(r=>r&&r.id);return await iO(t.map(r=>r?.id))};y();w();_();var fx=Z(ux()),dx=()=>{let e=F;if(e.site.id){if(!e.mode&&e.site.responsive)if(e.site.responsive!=="mobile-only"&&e.site.responsive!=="desktop-only"){let t=(0,fx.default)();e.mode=t.device.type==="mobile"?"mobile":"desktop"}else e.site.responsive==="mobile-only"?e.mode="mobile":e.site.responsive==="desktop-only"&&(e.mode="desktop");localStorage.getItem("prasi-editor-mode")&&(e.mode=localStorage.getItem("prasi-editor-mode"))}};y();w();_();var Oe=window;var Vn=Z(me()),sm=()=>location.hostname.split(".").length===4||location.hostname==="prasi.app"||location.hostname==="prasi.avolut.com"||location.hostname.includes("ngrok")||location.hostname==="localhost"||location.hostname==="127.0.0.1"||location.hostname==="10.0.2.2",mx=()=>{let e=pr({page_id:""}),[t,n]=(0,px.useState)({}),r=()=>n({});Oe.prasiContext.render=r;let i=sd.Provider,o=sm()&&location.pathname.startsWith("/prod");if(F.route.status!=="ready"||F.route.router?.ctx.rootNode.children.size===0)return F.route.status!=="loading"&&(F.route.status="loading",sx().then(async({router:f,pages:d})=>{dx(),F.route.status="ready",F.route.router=f,F.route.pages=d;let h=Oe._prasi.basepath,S=`${h.endsWith("/")?h:`${h}/`}_prasi/code/index.js`,k=new URL(location.href);S.startsWith("/")&&(S=`${k.protocol}//${k.host}${S}`);let m=new Function("callback",`import("${S}").then(callback)`);await new Promise(g=>{m(v=>{for(let[x,N]of Object.entries(v))Oe[x]=N;g()})}),r()})),(0,Vn.jsx)(ds,{});let s=F.route.router;if(!s)return(0,Vn.jsx)(md,{children:"Failed to create Router"});let l="";if(o){let f=location.pathname.split("/");pd(f[3])&&(l=f[3])}let u=null,c=null;if(Oe._prasi.page_id)s.insert(F.pathname,{id:Oe._prasi.page_id,url:F.pathname}),u={id:Oe._prasi.page_id,url:"",params:Oe._prasi.params},Oe._prasi.routed={page_id:Oe._prasi.page_id,params:Oe._prasi.params},delete Oe._prasi.page_id,delete Oe._prasi.params;else{if(u=s.lookup(F.pathname),l){let f=F.route.pages.find(d=>l===d.id);c=f,f&&(u=f)}u&&Oe._prasi.routed&&Oe._prasi.routed.page_id===u.id&&Oe._prasi.routed.params&&(u.params=Oe._prasi.routed.params)}if(!u)return console.error("Page Not Found:",u,F),(0,Vn.jsx)(md,{children:"Page Not Found"});u.id!==e.page_id&&(F.init_local_effect={},Au({type:"page",id:u.id})),Oe.params=u.params||{},F.page.id=u.id,F.page.url=u.url;let a=F.page.cache[u.id];if(a)F.page.root=a.root,F.page.meta=a.meta;else return lx(u.id).then(async({root:f})=>{if(u){let d={id:u.id,url:u.url,root:f,meta:{}};await ai(f.childs,!0),Ys(d.meta,f),F.page.cache[d.id]=d,r()}}).catch(()=>{r()}),(0,Vn.jsx)(ds,{note:"Loading page"});let p="";return F.page.root.responsive==="mobile"&&(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||(p=css` + - `)}`);return}let p=a.apiEntry[s].url,f=a.apiEntry[s].args;if(p&&f){if(l.length>0&&f.length>0)for(let[S,k]of Object.entries(l)){let m=f[parseInt(S)];f&&f.includes(m)&&k&&typeof k!="string"&&typeof k!="number"||(p=p.replace(`:${m}?`,k+""),p=p.replace(`:${m}`,k+""))}let d=`${n}${p}`,h=await Iw(d,l);u(h)}else console.error(`API Not Found: ${s.toString()}`)}else c("Failed to load API [Proxy]: "+n)}catch(a){c(a)}})};return i==="then"?new Proxy({},{get:(s,l)=>o(l)}):o(i)}})}catch{return null}},Iw=async(e,t)=>await gu(e,t,{"content-type":"application/json"});y();w();_();var Yv=Z(Nw());y();w();_();function po(e){let t=e.length;for(;--t>=0;)e[t]=0}var iC=0,yv=1,oC=2,sC=3,lC=258,Xp=29,qs=256,Bs=qs+1+Xp,uo=30,Qp=19,_v=2*Bs+1,Jr=15,Cp=16,aC=7,Jp=256,wv=16,vv=17,xv=18,Bp=new Uint8Array([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]),Su=new Uint8Array([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]),uC=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Sv=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),cC=512,Bn=new Array((Bs+2)*2);po(Bn);var zs=new Array(uo*2);po(zs);var $s=new Array(cC);po($s);var Hs=new Array(lC-sC+1);po(Hs);var Yp=new Array(Xp);po(Yp);var ku=new Array(uo);po(ku);function Ip(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}var kv,bv,Ev;function Op(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var Rv=e=>e<256?$s[e]:$s[256+(e>>>7)],Vs=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},xt=(e,t,n)=>{e.bi_valid>Cp-n?(e.bi_buf|=t<>Cp-e.bi_valid,e.bi_valid+=n-Cp):(e.bi_buf|=t<{xt(e,n[t*2],n[t*2+1])},Cv=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},fC=e=>{e.bi_valid===16?(Vs(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},dC=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,u=t.stat_desc.max_length,c,a,p,f,d,h,S=0;for(f=0;f<=Jr;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,c=e.heap_max+1;c<_v;c++)a=e.heap[c],f=n[n[a*2+1]*2+1]+1,f>u&&(f=u,S++),n[a*2+1]=f,!(a>r)&&(e.bl_count[f]++,d=0,a>=l&&(d=s[a-l]),h=n[a*2],e.opt_len+=h*(f+d),o&&(e.static_len+=h*(i[a*2+1]+d)));if(S!==0){do{for(f=u-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[u]--,S-=2}while(S>0);for(f=u;f!==0;f--)for(a=e.bl_count[f];a!==0;)p=e.heap[--c],!(p>r)&&(n[p*2+1]!==f&&(e.opt_len+=(f-n[p*2+1])*n[p*2],n[p*2+1]=f),a--)}},Iv=(e,t,n)=>{let r=new Array(Jr+1),i=0,o,s;for(o=1;o<=Jr;o++)i=i+n[o-1]<<1,r[o]=i;for(s=0;s<=t;s++){let l=e[s*2+1];l!==0&&(e[s*2]=Cv(r[l]++,l))}},pC=()=>{let e,t,n,r,i,o=new Array(Jr+1);for(n=0,r=0;r>=7;r{let t;for(t=0;t{e.bi_valid>8?Vs(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Pw=(e,t,n,r)=>{let i=t*2,o=n*2;return e[i]{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i{let r,i,o=0,s,l;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?_n(e,i,t):(s=Hs[i],_n(e,s+qs+1,t),l=Bp[s],l!==0&&(i-=Yp[s],xt(e,i,l)),r--,s=Rv(r),_n(e,s,n),l=Su[s],l!==0&&(r-=ku[s],xt(e,r,l)));while(o{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,s,l,u=-1,c;for(e.heap_len=0,e.heap_max=_v,s=0;s>1;s>=1;s--)Tp(e,n,s);c=o;do s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Tp(e,n,1),l=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=l,n[c*2]=n[s*2]+n[l*2],e.depth[c]=(e.depth[s]>=e.depth[l]?e.depth[s]:e.depth[l])+1,n[s*2+1]=n[l*2+1]=c,e.heap[1]=c++,Tp(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],dC(e,t),Iv(n,u,e.bl_count)},Dw=(e,t,n)=>{let r,i=-1,o,s=t[0*2+1],l=0,u=7,c=4;for(s===0&&(u=138,c=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=s,s=t[(r+1)*2+1],!(++l{let r,i=-1,o,s=t[0*2+1],l=0,u=7,c=4;for(s===0&&(u=138,c=3),r=0;r<=n;r++)if(o=s,s=t[(r+1)*2+1],!(++l{let t;for(Dw(e,e.dyn_ltree,e.l_desc.max_code),Dw(e,e.dyn_dtree,e.d_desc.max_code),$p(e,e.bl_desc),t=Qp-1;t>=3&&e.bl_tree[Sv[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},hC=(e,t,n,r)=>{let i;for(xt(e,t-257,5),xt(e,n-1,5),xt(e,r-4,4),i=0;i{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return 0;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return 1;for(n=32;n{jw||(pC(),jw=!0),e.l_desc=new Op(e.dyn_ltree,kv),e.d_desc=new Op(e.dyn_dtree,bv),e.bl_desc=new Op(e.bl_tree,Ev),e.bi_buf=0,e.bi_valid=0,Ov(e)},Av=(e,t,n,r)=>{xt(e,(iC<<1)+(r?1:0),3),Tv(e),Vs(e,n),Vs(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},_C=e=>{xt(e,yv<<1,3),_n(e,Jp,Bn),fC(e)},wC=(e,t,n,r)=>{let i,o,s=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=gC(e)),$p(e,e.l_desc),$p(e,e.d_desc),s=mC(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?Av(e,t,n,r):e.strategy===4||o===i?(xt(e,(yv<<1)+(r?1:0),3),Lw(e,Bn,zs)):(xt(e,(oC<<1)+(r?1:0),3),hC(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),Lw(e,e.dyn_ltree,e.dyn_dtree)),Ov(e),r&&Tv(e)},vC=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Hs[n]+qs+1)*2]++,e.dyn_dtree[Rv(t)*2]++),e.sym_next===e.sym_end),xC=yC,SC=Av,kC=wC,bC=vC,EC=_C,RC={_tr_init:xC,_tr_stored_block:SC,_tr_flush_block:kC,_tr_tally:bC,_tr_align:EC},CC=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,s=0;for(;n!==0;){s=n>2e3?2e3:n,n-=s;do i=i+t[r++]|0,o=o+i|0;while(--s);i%=65521,o%=65521}return i|o<<16|0},Ws=CC,IC=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},OC=new Uint32Array(IC()),TC=(e,t,n,r)=>{let i=OC,o=r+n;e^=-1;for(let s=r;s>>8^i[(e^t[s])&255];return e^-1},We=TC,ti={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"},ii={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_MEM_ERROR:-4,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},{_tr_init:AC,_tr_stored_block:Hp,_tr_flush_block:NC,_tr_tally:br,_tr_align:PC}=RC,{Z_NO_FLUSH:Er,Z_PARTIAL_FLUSH:LC,Z_FULL_FLUSH:DC,Z_FINISH:Wt,Z_BLOCK:zw,Z_OK:et,Z_STREAM_END:Fw,Z_STREAM_ERROR:wn,Z_DATA_ERROR:MC,Z_BUF_ERROR:Ap,Z_DEFAULT_COMPRESSION:jC,Z_FILTERED:zC,Z_HUFFMAN_ONLY:yu,Z_RLE:FC,Z_FIXED:UC,Z_DEFAULT_STRATEGY:BC,Z_UNKNOWN:$C,Z_DEFLATED:Ru}=ii,HC=9,VC=15,WC=8,GC=29,ZC=256,Vp=ZC+1+GC,KC=30,qC=19,XC=2*Vp+1,QC=15,se=3,kr=258,vn=kr+se+1,JC=32,co=42,em=57,Wp=69,Gp=73,Zp=91,Kp=103,Yr=113,Ms=666,dt=1,mo=2,ni=3,ho=4,YC=3,ei=(e,t)=>(e.msg=ti[t],t),Uw=e=>e*2-(e>4?9:0),Sr=e=>{let t=e.length;for(;--t>=0;)e[t]=0},e3=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},t3=(e,t,n)=>(t<{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,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,t.pending===0&&(t.pending_out=0))},At=(e,t)=>{NC(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Tt(e.strm)},ce=(e,t)=>{e.pending_buf[e.pending++]=t},Ds=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},qp=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Ws(e.adler,t,i,n):e.state.wrap===2&&(e.adler=We(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Nv=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,s=e.prev_length,l=e.nice_match,u=e.strstart>e.w_size-vn?e.strstart-(e.w_size-vn):0,c=e.window,a=e.w_mask,p=e.prev,f=e.strstart+kr,d=c[r+s-1],h=c[r+s];e.prev_length>=e.good_match&&(n>>=2),l>e.lookahead&&(l=e.lookahead);do if(i=t,!(c[i+s]!==h||c[i+s-1]!==d||c[i]!==c[r]||c[++i]!==c[r+1])){r+=2,i++;do;while(c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&rs){if(e.match_start=t,s=o,o>=l)break;d=c[r+s-1],h=c[r+s]}}while((t=p[t&a])>u&&--n!==0);return s<=e.lookahead?s:e.lookahead},fo=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-vn)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),e3(e),r+=t),e.strm.avail_in===0)break;if(n=qp(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=se)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Rr(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Rr(e,e.ins_h,e.window[i+se-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,s=0,l=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Tt(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(qp(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(s===0);return l-=e.strm.avail_in,l&&(l>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=l&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart),e.strstart+=l,e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(qp(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===Wt)&&t!==Er&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,s=t===Wt&&e.strm.avail_in===0&&r===i?1:0,Hp(e,e.block_start,r,s),e.block_start+=r,Tt(e.strm)),s?ni:dt)},Np=(e,t)=>{let n,r;for(;;){if(e.lookahead=se&&(e.ins_h=Rr(e,e.ins_h,e.window[e.strstart+se-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-vn&&(e.match_length=Nv(e,n)),e.match_length>=se)if(r=br(e,e.strstart-e.match_start,e.match_length-se),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=se){e.match_length--;do e.strstart++,e.ins_h=Rr(e,e.ins_h,e.window[e.strstart+se-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Rr(e,e.ins_h,e.window[e.strstart+1]);else r=br(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(At(e,!1),e.strm.avail_out===0))return dt}return e.insert=e.strstart{let n,r,i;for(;;){if(e.lookahead=se&&(e.ins_h=Rr(e,e.ins_h,e.window[e.strstart+se-1]),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=se-1,n!==0&&e.prev_length4096)&&(e.match_length=se-1)),e.prev_length>=se&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-se,r=br(e,e.strstart-1-e.prev_match,e.prev_length-se),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=Rr(e,e.ins_h,e.window[e.strstart+se-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=se-1,e.strstart++,r&&(At(e,!1),e.strm.avail_out===0))return dt}else if(e.match_available){if(r=br(e,0,e.window[e.strstart-1]),r&&At(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return dt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=br(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let n,r,i,o,s=e.window;for(;;){if(e.lookahead<=kr){if(fo(e),e.lookahead<=kr&&t===Er)return dt;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=se&&e.strstart>0&&(i=e.strstart-1,r=s[i],r===s[++i]&&r===s[++i]&&r===s[++i])){o=e.strstart+kr;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]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=se?(n=br(e,1,e.match_length-se),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=br(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(At(e,!1),e.strm.avail_out===0))return dt}return e.insert=0,t===Wt?(At(e,!0),e.strm.avail_out===0?ni:ho):e.sym_next&&(At(e,!1),e.strm.avail_out===0)?dt:mo},r3=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(fo(e),e.lookahead===0)){if(t===Er)return dt;break}if(e.match_length=0,n=br(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(At(e,!1),e.strm.avail_out===0))return dt}return e.insert=0,t===Wt?(At(e,!0),e.strm.avail_out===0?ni:ho):e.sym_next&&(At(e,!1),e.strm.avail_out===0)?dt:mo};function yn(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var js=[new yn(0,0,0,0,Pv),new yn(4,4,8,4,Np),new yn(4,5,16,8,Np),new yn(4,6,32,32,Np),new yn(4,4,16,16,lo),new yn(8,16,32,32,lo),new yn(8,16,128,128,lo),new yn(8,32,128,256,lo),new yn(32,128,258,1024,lo),new yn(32,258,258,4096,lo)],i3=e=>{e.window_size=2*e.w_size,Sr(e.head),e.max_lazy_match=js[e.level].max_lazy,e.good_match=js[e.level].good_length,e.nice_match=js[e.level].nice_length,e.max_chain_length=js[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=se-1,e.match_available=0,e.ins_h=0};function o3(){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=Ru,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 Uint16Array(XC*2),this.dyn_dtree=new Uint16Array((2*KC+1)*2),this.bl_tree=new Uint16Array((2*qC+1)*2),Sr(this.dyn_ltree),Sr(this.dyn_dtree),Sr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(QC+1),this.heap=new Uint16Array(2*Vp+1),Sr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Vp+1),Sr(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Xs=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.status!==co&&t.status!==em&&t.status!==Wp&&t.status!==Gp&&t.status!==Zp&&t.status!==Kp&&t.status!==Yr&&t.status!==Ms?1:0},Lv=e=>{if(Xs(e))return ei(e,wn);e.total_in=e.total_out=0,e.data_type=$C;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?em:t.wrap?co:Yr,e.adler=t.wrap===2?0:1,t.last_flush=-2,AC(t),et},Dv=e=>{let t=Lv(e);return t===et&&i3(e.state),t},s3=(e,t)=>Xs(e)||e.state.wrap!==2?wn:(e.state.gzhead=t,et),Mv=(e,t,n,r,i,o)=>{if(!e)return wn;let s=1;if(t===jC&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>HC||n!==Ru||r<8||r>15||t<0||t>9||o<0||o>UC||r===8&&s!==1)return ei(e,wn);r===8&&(r=9);let l=new o3;return e.state=l,l.strm=e,l.status=co,l.wrap=s,l.gzhead=null,l.w_bits=r,l.w_size=1<Mv(e,t,Ru,VC,WC,BC),a3=(e,t)=>{if(Xs(e)||t>zw||t<0)return e?ei(e,wn):wn;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Ms&&t!==Wt)return ei(e,e.avail_out===0?Ap:wn);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Tt(e),e.avail_out===0)return n.last_flush=-1,et}else if(e.avail_in===0&&Uw(t)<=Uw(r)&&t!==Wt)return ei(e,Ap);if(n.status===Ms&&e.avail_in!==0)return ei(e,Ap);if(n.status===co&&n.wrap===0&&(n.status=Yr),n.status===co){let i=Ru+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=yu||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=JC),i+=31-i%31,Ds(n,i),n.strstart!==0&&(Ds(n,e.adler>>>16),Ds(n,e.adler&65535)),e.adler=1,n.status=Yr,Tt(e),n.pending!==0)return n.last_flush=-1,et}if(n.status===em){if(e.adler=0,ce(n,31),ce(n,139),ce(n,8),n.gzhead)ce(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),ce(n,n.gzhead.time&255),ce(n,n.gzhead.time>>8&255),ce(n,n.gzhead.time>>16&255),ce(n,n.gzhead.time>>24&255),ce(n,n.level===9?2:n.strategy>=yu||n.level<2?4:0),ce(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(ce(n,n.gzhead.extra.length&255),ce(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=We(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Wp;else if(ce(n,0),ce(n,0),ce(n,0),ce(n,0),ce(n,0),ce(n,n.level===9?2:n.strategy>=yu||n.level<2?4:0),ce(n,YC),n.status=Yr,Tt(e),n.pending!==0)return n.last_flush=-1,et}if(n.status===Wp){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let l=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+l),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=We(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=l,Tt(e),n.pending!==0)return n.last_flush=-1,et;i=0,o-=l}let s=new Uint8Array(n.gzhead.extra);n.pending_buf.set(s.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=We(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Gp}if(n.status===Gp){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=We(e.adler,n.pending_buf,n.pending-i,i)),Tt(e),n.pending!==0)return n.last_flush=-1,et;i=0}n.gzindexi&&(e.adler=We(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Zp}if(n.status===Zp){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=We(e.adler,n.pending_buf,n.pending-i,i)),Tt(e),n.pending!==0)return n.last_flush=-1,et;i=0}n.gzindexi&&(e.adler=We(e.adler,n.pending_buf,n.pending-i,i))}n.status=Kp}if(n.status===Kp){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Tt(e),n.pending!==0))return n.last_flush=-1,et;ce(n,e.adler&255),ce(n,e.adler>>8&255),e.adler=0}if(n.status=Yr,Tt(e),n.pending!==0)return n.last_flush=-1,et}if(e.avail_in!==0||n.lookahead!==0||t!==Er&&n.status!==Ms){let i=n.level===0?Pv(n,t):n.strategy===yu?r3(n,t):n.strategy===FC?n3(n,t):js[n.level].func(n,t);if((i===ni||i===ho)&&(n.status=Ms),i===dt||i===ni)return e.avail_out===0&&(n.last_flush=-1),et;if(i===mo&&(t===LC?PC(n):t!==zw&&(Hp(n,0,0,!1),t===DC&&(Sr(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Tt(e),e.avail_out===0))return n.last_flush=-1,et}return t!==Wt?et:n.wrap<=0?Fw:(n.wrap===2?(ce(n,e.adler&255),ce(n,e.adler>>8&255),ce(n,e.adler>>16&255),ce(n,e.adler>>24&255),ce(n,e.total_in&255),ce(n,e.total_in>>8&255),ce(n,e.total_in>>16&255),ce(n,e.total_in>>24&255)):(Ds(n,e.adler>>>16),Ds(n,e.adler&65535)),Tt(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?et:Fw)},u3=e=>{if(Xs(e))return wn;let t=e.state.status;return e.state=null,t===Yr?ei(e,MC):et},c3=(e,t)=>{let n=t.length;if(Xs(e))return wn;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==co||r.lookahead)return wn;if(i===1&&(e.adler=Ws(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Sr(r.head),r.strstart=0,r.block_start=0,r.insert=0);let u=new Uint8Array(r.w_size);u.set(t.subarray(n-r.w_size,n),0),t=u,n=r.w_size}let o=e.avail_in,s=e.next_in,l=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,fo(r);r.lookahead>=se;){let u=r.strstart,c=r.lookahead-(se-1);do r.ins_h=Rr(r,r.ins_h,r.window[u+se-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++;while(--c);r.strstart=u,r.lookahead=se-1,fo(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=se-1,r.match_available=0,e.next_in=s,e.input=l,e.avail_in=o,r.wrap=i,et},f3=l3,d3=Mv,p3=Dv,m3=Lv,h3=s3,g3=a3,y3=u3,_3=c3,w3="pako deflate (from Nodeca project)",Fs={deflateInit:f3,deflateInit2:d3,deflateReset:p3,deflateResetKeep:m3,deflateSetHeader:h3,deflate:g3,deflateEnd:y3,deflateSetDictionary:_3,deflateInfo:w3},v3=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),x3=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(let r in n)v3(n,r)&&(e[r]=n[r])}}return e},S3=e=>{let t=0;for(let r=0,i=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Gs[254]=Gs[254]=1;var k3=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,s=e.length,l=0;for(i=0;i>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t},b3=(e,t)=>{if(t<65534&&e.subarray&&jv)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{let n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,o=new Array(n*2);for(i=0,r=0;r4){o[i++]=65533,r+=l-1;continue}for(s&=l===2?31:l===3?15:7;l>1&&r1){o[i++]=65533;continue}s<65536?o[i++]=s:(s-=65536,o[i++]=55296|s>>10&1023,o[i++]=56320|s&1023)}return b3(o,i)},R3=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Gs[e[n]]>t?n:t},Zs={string2buf:k3,buf2string:E3,utf8border:R3};function C3(){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}var zv=C3,Fv=Object.prototype.toString,{Z_NO_FLUSH:I3,Z_SYNC_FLUSH:O3,Z_FULL_FLUSH:T3,Z_FINISH:A3,Z_OK:bu,Z_STREAM_END:N3,Z_DEFAULT_COMPRESSION:P3,Z_DEFAULT_STRATEGY:L3,Z_DEFLATED:D3}=ii;function Qs(e){this.options=Cu.assign({level:P3,method:D3,chunkSize:16384,windowBits:15,memLevel:8,strategy:L3},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zv,this.strm.avail_out=0;let n=Fs.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==bu)throw new Error(ti[n]);if(t.header&&Fs.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=Zs.string2buf(t.dictionary):Fv.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Fs.deflateSetDictionary(this.strm,r),n!==bu)throw new Error(ti[n]);this._dict_set=!0}}Qs.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?A3:I3,typeof e=="string"?n.input=Zs.string2buf(e):Fv.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===O3||o===T3)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Fs.deflate(n,o),i===N3)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Fs.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===bu;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};Qs.prototype.onData=function(e){this.chunks.push(e)};Qs.prototype.onEnd=function(e){e===bu&&(this.result=Cu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function tm(e,t){let n=new Qs(t);if(n.push(e,!0),n.err)throw n.msg||ti[n.err];return n.result}function M3(e,t){return t=t||{},t.raw=!0,tm(e,t)}function j3(e,t){return t=t||{},t.gzip=!0,tm(e,t)}var z3=Qs,F3=tm,U3=M3,B3=j3,$3=ii,H3={Deflate:z3,deflate:F3,deflateRaw:U3,gzip:B3,constants:$3},_u=16209,V3=16191,W3=function(t,n){let r,i,o,s,l,u,c,a,p,f,d,h,S,k,m,g,v,x,N,L,P,D,V,z,G=t.state;r=t.next_in,V=t.input,i=r+(t.avail_in-5),o=t.next_out,z=t.output,s=o-(n-t.avail_out),l=o+(t.avail_out-257),u=G.dmax,c=G.wsize,a=G.whave,p=G.wnext,f=G.window,d=G.hold,h=G.bits,S=G.lencode,k=G.distcode,m=(1<>>24,d>>>=x,h-=x,x=v>>>16&255,x===0)z[o++]=v&65535;else if(x&16){N=v&65535,x&=15,x&&(h>>=x,h-=x),h<15&&(d+=V[r++]<>>24,d>>>=x,h-=x,x=v>>>16&255,x&16){if(L=v&65535,x&=15,hu){t.msg="invalid distance too far back",G.mode=_u;break e}if(d>>>=x,h-=x,x=o-s,L>x){if(x=L-x,x>a&&G.sane){t.msg="invalid distance too far back",G.mode=_u;break e}if(P=0,D=f,p===0){if(P+=c-x,x2;)z[o++]=D[P++],z[o++]=D[P++],z[o++]=D[P++],N-=3;N&&(z[o++]=D[P++],N>1&&(z[o++]=D[P++]))}else{P=o-L;do z[o++]=z[P++],z[o++]=z[P++],z[o++]=z[P++],N-=3;while(N>2);N&&(z[o++]=z[P++],N>1&&(z[o++]=z[P++]))}}else if(x&64){t.msg="invalid distance code",G.mode=_u;break e}else{v=k[(v&65535)+(d&(1<>3,r-=N,h-=N<<3,d&=(1<{let u=l.bits,c=0,a=0,p=0,f=0,d=0,h=0,S=0,k=0,m=0,g=0,v,x,N,L,P,D=null,V,z=new Uint16Array(ao+1),G=new Uint16Array(ao+1),Ge=null,ui,O,B;for(c=0;c<=ao;c++)z[c]=0;for(a=0;a=1&&z[f]===0;f--);if(d>f&&(d=f),f===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,l.bits=1,0;for(p=1;p0&&(e===Hw||f!==1))return-1;for(G[1]=0,c=1;cBw||e===Vw&&m>$w)return 1;for(;;){ui=c-S,s[a]+1=V?(O=Ge[s[a]-V],B=D[s[a]-V]):(O=96,B=0),v=1<>S)+x]=ui<<24|O<<16|B|0;while(x!==0);for(v=1<>=1;if(v!==0?(g&=v-1,g+=v):g=0,a++,--z[c]===0){if(c===f)break;c=t[n+s[a]]}if(c>d&&(g&L)!==N){for(S===0&&(S=d),P+=p,h=c-S,k=1<Bw||e===Vw&&m>$w)return 1;N=g&L,i[N]=d<<24|h<<16|P-o|0}}return g!==0&&(i[P+g]=c-S<<24|64<<16|0),l.bits=d,0},Us=X3,Q3=0,Uv=1,Bv=2,{Z_FINISH:Ww,Z_BLOCK:J3,Z_TREES:wu,Z_OK:ri,Z_STREAM_END:Y3,Z_NEED_DICT:eI,Z_STREAM_ERROR:Gt,Z_DATA_ERROR:$v,Z_MEM_ERROR:Hv,Z_BUF_ERROR:tI,Z_DEFLATED:Gw}=ii,Iu=16180,Zw=16181,Kw=16182,qw=16183,Xw=16184,Qw=16185,Jw=16186,Yw=16187,ev=16188,tv=16189,Eu=16190,Un=16191,Lp=16192,nv=16193,Dp=16194,rv=16195,iv=16196,ov=16197,sv=16198,vu=16199,xu=16200,lv=16201,av=16202,uv=16203,cv=16204,fv=16205,Mp=16206,dv=16207,pv=16208,be=16209,Vv=16210,Wv=16211,nI=852,rI=592,iI=15,oI=iI,mv=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function sI(){this.strm=null,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 Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var oi=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.modeWv?1:0},Gv=e=>{if(oi(e))return Gt;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=Iu,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(nI),t.distcode=t.distdyn=new Int32Array(rI),t.sane=1,t.back=-1,ri},Zv=e=>{if(oi(e))return Gt;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Gv(e)},Kv=(e,t)=>{let n;if(oi(e))return Gt;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Gt:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Zv(e))},qv=(e,t)=>{if(!e)return Gt;let n=new sI;e.state=n,n.strm=e,n.window=null,n.mode=Iu;let r=Kv(e,t);return r!==ri&&(e.state=null),r},lI=e=>qv(e,oI),hv=!0,jp,zp,aI=e=>{if(hv){jp=new Int32Array(512),zp=new Int32Array(32);let t=0;for(;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(Us(Uv,e.lens,0,288,jp,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Us(Bv,e.lens,0,32,zp,0,e.work,{bits:5}),hv=!1}e.lencode=jp,e.lenbits=9,e.distcode=zp,e.distbits=5},Xv=(e,t,n,r)=>{let i,o=e.state;return o.window===null&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,i,o,s,l,u,c,a,p,f,d,h,S,k=0,m,g,v,x,N,L,P,D,V=new Uint8Array(4),z,G,Ge=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(oi(e)||!e.output||!e.input&&e.avail_in!==0)return Gt;n=e.state,n.mode===Un&&(n.mode=Lp),s=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,a=n.bits,p=l,f=u,D=ri;e:for(;;)switch(n.mode){case Iu:if(n.wrap===0){n.mode=Lp;break}for(;a<16;){if(l===0)break e;l--,c+=r[o++]<>>8&255,n.check=We(n.check,V,2,0),c=0,a=0,n.mode=Zw;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=be;break}if((c&15)!==Gw){e.msg="unknown compression method",n.mode=be;break}if(c>>>=4,a-=4,P=(c&15)+8,n.wbits===0&&(n.wbits=P),P>15||P>n.wbits){e.msg="invalid window size",n.mode=be;break}n.dmax=1<>8&1),n.flags&512&&n.wrap&4&&(V[0]=c&255,V[1]=c>>>8&255,n.check=We(n.check,V,2,0)),c=0,a=0,n.mode=Kw;case Kw:for(;a<32;){if(l===0)break e;l--,c+=r[o++]<>>8&255,V[2]=c>>>16&255,V[3]=c>>>24&255,n.check=We(n.check,V,4,0)),c=0,a=0,n.mode=qw;case qw:for(;a<16;){if(l===0)break e;l--,c+=r[o++]<>8),n.flags&512&&n.wrap&4&&(V[0]=c&255,V[1]=c>>>8&255,n.check=We(n.check,V,2,0)),c=0,a=0,n.mode=Xw;case Xw:if(n.flags&1024){for(;a<16;){if(l===0)break e;l--,c+=r[o++]<>>8&255,n.check=We(n.check,V,2,0)),c=0,a=0}else n.head&&(n.head.extra=null);n.mode=Qw;case Qw:if(n.flags&1024&&(d=n.length,d>l&&(d=l),d&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+d),P)),n.flags&512&&n.wrap&4&&(n.check=We(n.check,r,d,o)),l-=d,o+=d,n.length-=d),n.length))break e;n.length=0,n.mode=Jw;case Jw:if(n.flags&2048){if(l===0)break e;d=0;do P=r[o+d++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P));while(P&&d>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Un;break;case tv:for(;a<32;){if(l===0)break e;l--,c+=r[o++]<>>=a&7,a-=a&7,n.mode=Mp;break}for(;a<3;){if(l===0)break e;l--,c+=r[o++]<>>=1,a-=1,c&3){case 0:n.mode=nv;break;case 1:if(aI(n),n.mode=vu,t===wu){c>>>=2,a-=2;break e}break;case 2:n.mode=iv;break;case 3:e.msg="invalid block type",n.mode=be}c>>>=2,a-=2;break;case nv:for(c>>>=a&7,a-=a&7;a<32;){if(l===0)break e;l--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=be;break}if(n.length=c&65535,c=0,a=0,n.mode=Dp,t===wu)break e;case Dp:n.mode=rv;case rv:if(d=n.length,d){if(d>l&&(d=l),d>u&&(d=u),d===0)break e;i.set(r.subarray(o,o+d),s),l-=d,o+=d,u-=d,s+=d,n.length-=d;break}n.mode=Un;break;case iv:for(;a<14;){if(l===0)break e;l--,c+=r[o++]<>>=5,a-=5,n.ndist=(c&31)+1,c>>>=5,a-=5,n.ncode=(c&15)+4,c>>>=4,a-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=be;break}n.have=0,n.mode=ov;case ov:for(;n.have>>=3,a-=3}for(;n.have<19;)n.lens[Ge[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,z={bits:n.lenbits},D=Us(Q3,n.lens,0,19,n.lencode,0,n.work,z),n.lenbits=z.bits,D){e.msg="invalid code lengths set",n.mode=be;break}n.have=0,n.mode=sv;case sv:for(;n.have>>24,g=k>>>16&255,v=k&65535,!(m<=a);){if(l===0)break e;l--,c+=r[o++]<>>=m,a-=m,n.lens[n.have++]=v;else{if(v===16){for(G=m+2;a>>=m,a-=m,n.have===0){e.msg="invalid bit length repeat",n.mode=be;break}P=n.lens[n.have-1],d=3+(c&3),c>>>=2,a-=2}else if(v===17){for(G=m+3;a>>=m,a-=m,P=0,d=3+(c&7),c>>>=3,a-=3}else{for(G=m+7;a>>=m,a-=m,P=0,d=11+(c&127),c>>>=7,a-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=be;break}for(;d--;)n.lens[n.have++]=P}}if(n.mode===be)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=be;break}if(n.lenbits=9,z={bits:n.lenbits},D=Us(Uv,n.lens,0,n.nlen,n.lencode,0,n.work,z),n.lenbits=z.bits,D){e.msg="invalid literal/lengths set",n.mode=be;break}if(n.distbits=6,n.distcode=n.distdyn,z={bits:n.distbits},D=Us(Bv,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,z),n.distbits=z.bits,D){e.msg="invalid distances set",n.mode=be;break}if(n.mode=vu,t===wu)break e;case vu:n.mode=xu;case xu:if(l>=6&&u>=258){e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=l,n.hold=c,n.bits=a,W3(e,f),s=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,l=e.avail_in,c=n.hold,a=n.bits,n.mode===Un&&(n.back=-1);break}for(n.back=0;k=n.lencode[c&(1<>>24,g=k>>>16&255,v=k&65535,!(m<=a);){if(l===0)break e;l--,c+=r[o++]<>x)],m=k>>>24,g=k>>>16&255,v=k&65535,!(x+m<=a);){if(l===0)break e;l--,c+=r[o++]<>>=x,a-=x,n.back+=x}if(c>>>=m,a-=m,n.back+=m,n.length=v,g===0){n.mode=fv;break}if(g&32){n.back=-1,n.mode=Un;break}if(g&64){e.msg="invalid literal/length code",n.mode=be;break}n.extra=g&15,n.mode=lv;case lv:if(n.extra){for(G=n.extra;a>>=n.extra,a-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=av;case av:for(;k=n.distcode[c&(1<>>24,g=k>>>16&255,v=k&65535,!(m<=a);){if(l===0)break e;l--,c+=r[o++]<>x)],m=k>>>24,g=k>>>16&255,v=k&65535,!(x+m<=a);){if(l===0)break e;l--,c+=r[o++]<>>=x,a-=x,n.back+=x}if(c>>>=m,a-=m,n.back+=m,g&64){e.msg="invalid distance code",n.mode=be;break}n.offset=v,n.extra=g&15,n.mode=uv;case uv:if(n.extra){for(G=n.extra;a>>=n.extra,a-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=be;break}n.mode=cv;case cv:if(u===0)break e;if(d=f-u,n.offset>d){if(d=n.offset-d,d>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=be;break}d>n.wnext?(d-=n.wnext,h=n.wsize-d):h=n.wnext-d,d>n.length&&(d=n.length),S=n.window}else S=i,h=s-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do i[s++]=S[h++];while(--d);n.length===0&&(n.mode=xu);break;case fv:if(u===0)break e;i[s++]=n.length,u--,n.mode=xu;break;case Mp:if(n.wrap){for(;a<32;){if(l===0)break e;l--,c|=r[o++]<{if(oi(e))return Gt;let t=e.state;return t.window&&(t.window=null),e.state=null,ri},fI=(e,t)=>{if(oi(e))return Gt;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,ri):Gt},dI=(e,t)=>{let n=t.length,r,i,o;return oi(e)||(r=e.state,r.wrap!==0&&r.mode!==Eu)?Gt:r.mode===Eu&&(i=1,i=Ws(i,t,n,0),i!==r.check)?$v:(o=Xv(e,t,n,n),o?(r.mode=Vv,Hv):(r.havedict=1,ri))},pI=Zv,mI=Kv,hI=Gv,gI=lI,yI=qv,_I=uI,wI=cI,vI=fI,xI=dI,SI="pako inflate (from Nodeca project)",$n={inflateReset:pI,inflateReset2:mI,inflateResetKeep:hI,inflateInit:gI,inflateInit2:yI,inflate:_I,inflateEnd:wI,inflateGetHeader:vI,inflateSetDictionary:xI,inflateInfo:SI};function kI(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var bI=kI,Qv=Object.prototype.toString,{Z_NO_FLUSH:EI,Z_FINISH:RI,Z_OK:Ks,Z_STREAM_END:Fp,Z_NEED_DICT:Up,Z_STREAM_ERROR:CI,Z_DATA_ERROR:gv,Z_MEM_ERROR:II}=ii;function Js(e){this.options=Cu.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new zv,this.strm.avail_out=0;let n=$n.inflateInit2(this.strm,t.windowBits);if(n!==Ks)throw new Error(ti[n]);if(this.header=new bI,$n.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Zs.string2buf(t.dictionary):Qv.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=$n.inflateSetDictionary(this.strm,t.dictionary),n!==Ks)))throw new Error(ti[n])}Js.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,o,s,l;if(this.ended)return!1;for(t===~~t?s=t:s=t===!0?RI:EI,Qv.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=$n.inflate(n,s),o===Up&&i&&(o=$n.inflateSetDictionary(n,i),o===Ks?o=$n.inflate(n,s):o===gv&&(o=Up));n.avail_in>0&&o===Fp&&n.state.wrap>0&&e[n.next_in]!==0;)$n.inflateReset(n),o=$n.inflate(n,s);switch(o){case CI:case gv:case Up:case II:return this.onEnd(o),this.ended=!0,!1}if(l=n.avail_out,n.next_out&&(n.avail_out===0||o===Fp))if(this.options.to==="string"){let u=Zs.utf8border(n.output,n.next_out),c=n.next_out-u,a=Zs.buf2string(n.output,u);n.next_out=c,n.avail_out=r-c,c&&n.output.set(n.output.subarray(u,u+c),0),this.onData(a)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===Ks&&l===0)){if(o===Fp)return o=$n.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};Js.prototype.onData=function(e){this.chunks.push(e)};Js.prototype.onEnd=function(e){e===Ks&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Cu.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function nm(e,t){let n=new Js(t);if(n.push(e),n.err)throw n.msg||ti[n.err];return n.result}function OI(e,t){return t=t||{},t.raw=!0,nm(e,t)}var TI=Js,AI=nm,NI=OI,PI=nm,LI=ii,DI={Inflate:TI,inflate:AI,inflateRaw:NI,ungzip:PI,constants:LI},{Deflate:MI,deflate:jI,deflateRaw:zI,gzip:FI}=H3,{Inflate:UI,inflate:BI,inflateRaw:$I,ungzip:HI}=DI,VI=MI,WI=jI,GI=zI,ZI=FI,KI=UI,qI=BI,XI=$I,QI=HI,JI=ii,Jv={Deflate:VI,deflate:WI,deflateRaw:GI,gzip:ZI,Inflate:KI,inflate:qI,inflateRaw:XI,ungzip:QI,constants:JI};var Hn={tables:{},columns:{},rels:{}},ex=e=>{let t="";return new Proxy({},{get(n,r){return r==="_batch"?{update:async i=>si({name:t,action:"batch_update",table:"",params:{batch:i}},e),upsert:async i=>si({name:t,action:"batch_upsert",table:"",params:{arg:i}},e)}:r==="_schema"?{tables:async()=>(Hn.tables[e]||(Hn.tables[e]=si({name:t,action:"schema_tables",table:"",params:[]},e)),await Hn.tables[e]),columns:async i=>(Hn.columns[e+"_"+i]||(Hn.columns[e+"_"+i]=si({name:t,action:"schema_columns",table:i,params:[]},e)),await Hn.columns[e+"_"+i]),rels:async i=>(Hn.rels[e+"_"+i]||(Hn.rels[e+"_"+i]=si({name:t,action:"schema_rels",table:i,params:[]},e)),await Hn.rels[e+"_"+i])}:r.startsWith("$")?(...i)=>{let o=Jv.gzip(JSON.stringify(i));return si({name:t,action:"query",table:r,params:btoa(o.reduce((s,l)=>s+String.fromCharCode(l),""))},e)}:new Proxy({},{get(i,o){return async(...s)=>(r==="query"&&(r=o,o="query"),await si({name:t,action:o,table:r,params:s},e))}})}})},rm={},si=async(e,t)=>{let n=new URL(t);n.pathname="/_dbs";let r=e||{};r.table&&(n.pathname+=`/${r.table}`);let i=n.toString();typeof localStorage<"u"&&localStorage.mlsid&&(r.mlsid=localStorage.mlsid);let o=(0,Yv.default)({...r,dburl:t}),s=!1;typeof location<"u"&&n.hostname!==location.hostname&&window.isEditor&&["prasi.avolut.com","localhost:4550","127.0.0.1:4550"].includes(location.host)&&(s=!0);let l=async()=>{let u=await gu(i,r,{"content-type":"application/json"},!1);try{if(typeof u=="string")return JSON.parse(u)}catch{}return u};if(s){let u=await fs(`editor-db-cache-${o}`);return u?rm[o]||(l().then(c=>{Hr(`editor-db-cache-${o}`,c)}),rm[o]=!0):(u=await l(),rm[o]=!0,Hr(`editor-db-cache-${o}`,u)),u}return await l()};y();w();_();y();w();_();y();w();_();var tx=Z(Pa());var nx=e=>{let{item:t,item_comp:n,ids:r}=e,i=$i(n);if(rx(i,r),t.id&&(i.id=t.id),i.hidden=t.hidden,i.component){if(i.component.props&&t.component&&t.component.props)for(let o of Object.keys(i.component.props)){let s=t.component.props[o],l=i.component.props[o];s&&(l.value=s.value,l.valueBuilt=s.valueBuilt,l.jsxCalledBy=s.jsxCalledBy,l.content=s.content)}i.component.instances=t.component?.instances,i.component.style=t.component?.style}for(let o of Object.keys(t))delete t[o];for(let[o,s]of Object.entries(i))t[o]=s},rx=(e,t)=>{if(e.originalId=e.id,t[e.id]||(t[e.id]=(0,tx.createId)()),e.id=t[e.id],e.childs)for(let n of e.childs)rx(n,t)};y();w();_();var ix=e=>{let t=Object.entries(e.item_comp.component?.props||{}).sort((n,r)=>n[1].idx-r[1].idx);for(let[n,r]of t){let i=$i(r),o=e.item.component?.props;o&&o[n]&&(i.value=o[n].value,i.valueBuilt=o[n].valueBuilt,o[n].content&&(i.content=o[n].content)),i&&e.each(n,i)}};y();w();_();var Ou=e=>{let t={};for(let[n,r]of Object.entries(e))if(n==="childs"){if(t.childs=[],r&&Array.isArray(r))for(let i of r)i.type==="item"&&i.component?t.childs.push(i):t.childs.push({name:i.name,id:i.id,originalId:i.originalId})}else t[n]=r;return t};var ox=(e,t)=>{let{item:n}=t;if(n.type==="item"&&n.component?.id&&t.parent?.item.id){let r=e.comps[n.component.id];if(e.on?.visit_component&&e.on.visit_component(n,t.root||t.item),!r)return;if(r){let i;if(e.mode==="page"?(n.component.instances||(n.component.instances={}),i=n.component.instances):i=t.parent?.root_instances,i){let s=i[n.id];i[n.id]||(i[n.id]={},s=i[n.id]),nx({item:n,item_comp:r,ids:s})}let o={item:Ou(n),jsx_prop:t.jsx_prop,parent:{id:t.parent.item.id,comp_id:t.parent?.comp?.component?.id,instance_id:t.parent?.instance_id},instances:i};if(e.on?.visit&&e.on.visit(o,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[n.id]=o),ix({item:n,item_comp:r,instance:i?i[n.id]:{},each(s,l){let u=n.component?.id;l.meta?.type==="content-element"&&u&&l.content&&(l.content.name=s,go({...e},{item:l.content,root:t.root||l.content,is_root:!1,jsx_prop:{is_root:!0,comp_id:u,name:s},parent:{item:o.item,instance_id:n.id,comp:r,root_instances:i}}))}}),n.childs)for(let s of Object.values(n.childs))s?.name?.startsWith("jsx:")||s&&Object.keys(s).length>3&&go({...e,mode:"comp"},{item:s,is_root:!1,root:t.root||t.item,parent:{item:n,instance_id:n.id,root_instances:i,comp:r}})}}};var go=(e,t)=>{let n=t.item;if(n.type==="item"&&n.component?.id&&t.ignore_first_component!==!0){ox(e,t);return}let r={item:Ou(n),parent:{id:t.parent?.item.id||"root",instance_id:t.parent?.instance_id,comp_id:t.parent?.comp?.component?.id}};if(t.jsx_prop&&(r.jsx_prop=t.jsx_prop),e.on?.visit&&e.on.visit(r,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[r.item.id]=r),n.childs){for(let[i,o]of Object.entries(n.childs))if(o.id){let s={item:o,is_root:!1,root:t.root||t.item,parent:{item:r.item,instance_id:t.parent?.instance_id,comp:t.parent?.comp,root_instances:t.parent?.root_instances}};t.jsx_prop&&(s.jsx_prop={...t.jsx_prop,is_root:!1}),go(e,s)}}};var li={route:null,promise:null},YI=()=>{if(li.promise)return li.promise;li.promise=new Promise(async e=>{li.route&&e(li.route);let t=await fetch(F.url`_prasi/route`);t.headers.get("content-encoding")||fetch(F.url`_prasi/compress/only-gz`),li.route=await t.json(),e(li.route)})},sx=async()=>{let e=La(),t=[];try{let n=await YI();if(n&&n.site&&n.urls){n.layout&&(F.layout.id=n.layout.id,F.layout.root=n.layout.root,F.layout.meta={},F.layout.root&&(await ai(F.layout.root.childs),Ys(F.layout.meta,F.layout.root))),F.site=n.site,F.site.code={mode:"vsc"},await eO(),F.site.api=Ow(F.site.api_url),F.site.db=ex(F.site.api_url);let r=window;r.serverurl=F.site.api_url,r.db=F.site.db,r.api=F.site.api;for(let i of n.urls)e.insert(i.url,i),t.push(i)}}catch{}return{router:e,pages:t}},eO=()=>new Promise(e=>{let t=document,n=t.createElement("script");n.onload=async()=>{e()};let r=F.site.api_url;r==="*"&&(r=`${location.protocol}//${location.host}`,F.site.api_url=r),r=(0,im.default)(r,"/"),localStorage.getItem("api-ts-"+r)||localStorage.setItem("api-ts-"+r,Date.now().toString());let i=new URL(location.href);if(i.pathname="",!r||!["prasi.avolut.com"].includes(i.hostname)&&i.port!=="4550"){i.hash="";let o=(0,im.default)(i.toString(),"/");n.src=`${o}/_prasi/load.js?url=${o}&v3`,F.site.api_url=`${i.protocol}//${i.host}`}else n.src=`${r}/_prasi/load.js?url=${r}&v3`;n.onerror=()=>{e()},document.querySelector(`script[src="${n.src}"]`)?e():t.body.appendChild(n)}),Ys=(e,t)=>{for(let n of t.childs)go({set_meta:!0,comps:F.comp.list,meta:e,mode:"page"},{item:n})};var tO=new Qr({structuredClone:!0}),Tu={debug:!!localStorage.getItem("prasi-ws-debug"),reconnectTimeout:1e3,id_client:"",id_site:"",ws:null};var Au=e=>{Tu.ws&&nO(Tu.ws,{type:"preview",mode:"listen",data:{...e,client_id:Tu.id_client}})},nO=(e,t)=>{let n=tO.pack(t);Tu.debug&&console.log("%c\u2B06","color:blue",rO(n.length,0),t),e.send(n)};function rO(e,t){if(e==0)return"0 Bytes";var n=1024,r=t||2,i=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],o=Math.floor(Math.log(e)/Math.log(n));return parseFloat((e/Math.pow(n,o)).toFixed(r))+" "+i[o]}var ai=async(e,t)=>{let n=F.comp;for(let i of e)i&&i.type!=="text"&&Nu(i,t);let r=Object.keys(n.pending);if(r.length>0){Au({type:"comp",ids:r});try{let i=await(await fetch(F.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[...r]})})).json();for(let[o,s]of Object.entries(i))delete n.pending[o],n.list[o]=s,await Hr(`comp-${o}`,s);if(Object.keys(n.pending).length>0){console.error(`Warning: component not found: ${Object.keys(n.pending)}`);return}await ai(Object.values(i))}catch(i){console.error(i)}}},Nu=(e,t)=>{let n=F.comp;if(e.type==="item"){let r=e.component?.id;if(r){if(!n.list[r]&&!n.pending[r]&&(n.pending[r]=[]),n.pending[r]&&(n.pending[r].find(i=>i.id===e.id)||n.pending[r].push(e)),n.pending[r]&&n.list[r]){for(let i of n.pending[r])for(let o of Object.values(i.component?.props||{}))o.content&&Nu(o.content,t);delete n.pending[r]}if(e.component?.props)for(let i of Object.values(e.component?.props||{}))i.content&&Nu(i.content,t)}}if(e.childs)for(let r of e.childs){let i=r;i&&i.type!=="text"&&Nu(i,t)}};y();w();_();var Pu={},lx=e=>(typeof Pu[e]=="object"||(Pu[e]=new Promise(async t=>{let n=!1,r=await fs(`page-${e}`);r&&(t(r),n=!0);let i=await(await fetch(F.url`_prasi/page/${e}`)).json();!i.root&&i.content_tree&&(i.root=i.content_tree,delete i.content_tree),n||t(i)})),Pu[e]),iO=e=>new Promise(async t=>{let n={},r=[...new Set(e)],i=!0;for(let s of r){let l=await fs(`page-${s}`);if(l)n[s]=l;else{i=!1;break}}i&&t(n);let o=await(await fetch(F.url`_prasi/pages`,{method:"POST",body:JSON.stringify({ids:r})})).json();i||t(o)}),ax=async e=>{let t=e.map(r=>F.route.router?.lookup(r)).filter(r=>r&&r.id);return await iO(t.map(r=>r?.id))};y();w();_();var fx=Z(ux()),dx=()=>{let e=F;if(e.site.id){if(!e.mode&&e.site.responsive)if(e.site.responsive!=="mobile-only"&&e.site.responsive!=="desktop-only"){let t=(0,fx.default)();e.mode=t.device.type==="mobile"?"mobile":"desktop"}else e.site.responsive==="mobile-only"?e.mode="mobile":e.site.responsive==="desktop-only"&&(e.mode="desktop");localStorage.getItem("prasi-editor-mode")&&(e.mode=localStorage.getItem("prasi-editor-mode"))}};y();w();_();var Oe=window;var Vn=Z(me()),sm=()=>location.hostname.split(".").length===4||location.hostname==="prasi.app"||location.hostname==="prasi.avolut.com"||location.hostname.includes("ngrok")||location.hostname==="localhost"||location.hostname==="127.0.0.1"||location.hostname==="10.0.2.2",mx=()=>{let e=pr({page_id:""}),[t,n]=(0,px.useState)({}),r=()=>n({});Oe.prasiContext.render=r;let i=sd.Provider,o=sm()&&location.pathname.startsWith("/prod");if(F.route.status!=="ready"||F.route.router?.ctx.rootNode.children.size===0)return F.route.status!=="loading"&&(F.route.status="loading",sx().then(async({router:f,pages:d})=>{dx(),F.route.status="ready",F.route.router=f,F.route.pages=d;let h=Oe._prasi.basepath,S=`${h.endsWith("/")?h:`${h}/`}_prasi/code/index.js`,k=new URL(location.href);S.startsWith("/")&&(S=`${k.protocol}//${k.host}${S}`);let m=new Function("callback",`import("${S}").then(callback)`);await new Promise(g=>{m(v=>{for(let[x,N]of Object.entries(v))Oe[x]=N;g()})}),r()})),(0,Vn.jsx)(ds,{});let s=F.route.router;if(!s)return(0,Vn.jsx)(md,{children:"Failed to create Router"});let l="";if(o){let f=location.pathname.split("/");pd(f[3])&&(l=f[3])}let u=null,c=null;if(Oe._prasi.page_id)s.insert(F.pathname,{id:Oe._prasi.page_id,url:F.pathname}),u={id:Oe._prasi.page_id,url:"",params:Oe._prasi.params},Oe._prasi.routed={page_id:Oe._prasi.page_id,params:Oe._prasi.params},delete Oe._prasi.page_id,delete Oe._prasi.params;else{if(u=s.lookup(F.pathname),l){let f=F.route.pages.find(d=>l===d.id);c=f,f&&(u=f)}u&&Oe._prasi.routed&&Oe._prasi.routed.page_id===u.id&&Oe._prasi.routed.params&&(u.params=Oe._prasi.routed.params)}if(!u)return console.error("Page Not Found:",u,F),(0,Vn.jsx)(md,{children:"Page Not Found"});u.id!==e.page_id&&(F.init_local_effect={},Au({type:"page",id:u.id})),Oe.params=u.params||{},F.page.id=u.id,F.page.url=u.url;let a=F.page.cache[u.id];if(a)F.page.root=a.root,F.page.meta=a.meta;else return lx(u.id).then(async({root:f})=>{if(u){let d={id:u.id,url:u.url,root:f,meta:{}};await ai(f.childs,!0),Ys(d.meta,f),F.page.cache[d.id]=d,r()}}).catch(()=>{r()}),(0,Vn.jsx)(ds,{note:"Loading page"});let p="";return F.page.root.responsive==="mobile"&&(F.mode="mobile",/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||(p=css` @media (min-width: 768px) { border-left: 1px solid #ccc; border-right: 1px solid #ccc; diff --git a/app/web/src/nova/prod/root.tsx b/app/web/src/nova/prod/root.tsx index 0cc18e5c..d7e2d8b6 100644 --- a/app/web/src/nova/prod/root.tsx +++ b/app/web/src/nova/prod/root.tsx @@ -178,6 +178,8 @@ export const Root = () => { let mobileCSS = ""; if (base.page.root.responsive === "mobile") { + base.mode = "mobile"; + if ( !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( navigator.userAgent