sliccy 5.51.1 → 5.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui/assets/{account-store-DihPYbSu.js → account-store-BEd2eXpL.js} +2 -2
- package/dist/ui/assets/{account-store-Rjr1QNQh.js → account-store-CVQamxPl.js} +1 -1
- package/dist/ui/assets/{adobe-CuAsI_Dl.js → adobe-2UAeb5_e.js} +1 -1
- package/dist/ui/assets/{adobe-DI4eUD79.js → adobe-B3y96_tq.js} +1 -1
- package/dist/ui/assets/{adobe-oauth-state-BKG2mof4.js → adobe-oauth-state-B2GR2EuT.js} +1 -1
- package/dist/ui/assets/{agent-message-to-chat-BQPD-MpM.js → agent-message-to-chat-DURgKzqR.js} +1 -1
- package/dist/ui/assets/{apps-DvM_9MAX.js → apps-CiMlXwca.js} +1 -1
- package/dist/ui/assets/{azure-openai-B5wE3WOQ.js → azure-openai-CIREDZXx.js} +1 -1
- package/dist/ui/assets/{azure-openai-BAU5WqDh.js → azure-openai-DRbH56bV.js} +1 -1
- package/dist/ui/assets/{cerebras-2ozNg3zT.js → cerebras-CyuAJDlC.js} +1 -1
- package/dist/ui/assets/{cerebras-CmMY7-HQ.js → cerebras-DZg-Ww2X.js} +1 -1
- package/dist/ui/assets/clipboard-q_jmL4NJ.js +1 -0
- package/dist/ui/assets/{connect-surface-BZ41PeLx.js → connect-surface-BJ1iWxH_.js} +1 -1
- package/dist/ui/assets/dip-DXrMfyds.js +1 -0
- package/dist/ui/assets/{dist-CvPsQIyX.js → dist-DFzsFC8H.js} +1 -1
- package/dist/ui/assets/{dist-BAxl1rTB.js → dist-DJpO1eIK.js} +1 -1
- package/dist/ui/assets/{ensure-speech-assets-DRv91z_3.js → ensure-speech-assets-CrPHb2Ga.js} +1 -1
- package/dist/ui/assets/esp8266-Bh2fjnAC.js +1 -0
- package/dist/ui/assets/{esptool-operations-CJE2vVFx.js → esptool-operations-CjMJFEOa.js} +2 -2
- package/dist/ui/assets/{fs-DrS7sm_e.js → fs-CSz3RS5t.js} +2 -2
- package/dist/ui/assets/{fs-Bu1PL0P3.js → fs-D7O_S_7g.js} +1 -1
- package/dist/ui/assets/{github-DgDtC4LP.js → github-0P9ybzye.js} +2 -2
- package/dist/ui/assets/{github-GiMGDq1Q.js → github-DaWxbGlU.js} +1 -1
- package/dist/ui/assets/{github-copilot-jhIWm6zU.js → github-copilot-BhuLFtEh.js} +1 -1
- package/dist/ui/assets/{github-copilot-NdrQMatL.js → github-copilot-DpKRfSpw.js} +1 -1
- package/dist/ui/assets/{hear-DddFHB4_.js → hear-C8x9jA_O.js} +1 -1
- package/dist/ui/assets/{js-realm-worker-BLUWcrcK.js → js-realm-worker-Ch8qkx8Z.js} +4 -4
- package/dist/ui/assets/{kernel-worker-Dbum-WZ4.js → kernel-worker-ClSeDLLp.js} +351 -351
- package/dist/ui/assets/{kokoro-engine-D_AD4Zcg.js → kokoro-engine-JPoZ1u5R.js} +1 -1
- package/dist/ui/assets/{lick-ws-bridge-oo7YlgrQ.js → lick-ws-bridge-BRj-3Ibe.js} +1 -1
- package/dist/ui/assets/{lick-ws-bridge-Cfu6u0ED.js → lick-ws-bridge-C82rvr1W.js} +1 -1
- package/dist/ui/assets/{local-llm-CQc4J2Dc.js → local-llm-yoQhHRlq.js} +1 -1
- package/dist/ui/assets/{main-Beb_zJEY.js → main-jjoYTf4M.js} +4 -4
- package/dist/ui/assets/{mount-B32EUD36.js → mount-BOHBQ9EB.js} +1 -1
- package/dist/ui/assets/{mount-BIA5bjul.js → mount-DrRpvrM_.js} +2 -2
- package/dist/ui/assets/{new-session-C_b8oP95.js → new-session-BbDxncsC.js} +2 -2
- package/dist/ui/assets/{oauth-bootstrap-DPe9Mxsu.js → oauth-bootstrap-GadwsbHv.js} +2 -2
- package/dist/ui/assets/{openai-codex-Dutilqfr.js → openai-codex-oiPOk53Z.js} +1 -1
- package/dist/ui/assets/{openai-codex-DAepVddq.js → openai-codex-oihXgRlW.js} +1 -1
- package/dist/ui/assets/{page-follower-tray-B27BSYqK.js → page-follower-tray-OeIv1G5r.js} +1 -1
- package/dist/ui/assets/{panel-rpc-handlers-4kSPPOAC.js → panel-rpc-handlers-CsoG_Hk1.js} +2 -2
- package/dist/ui/assets/{provider-BarBDR_Y.js → provider-FghoSQzB.js} +2 -2
- package/dist/ui/assets/{provider-Dp6ajVzM.js → provider-iU9STopu.js} +1 -1
- package/dist/ui/assets/{provider-settings-mSS8FUjQ.js → provider-settings-GODuYtKp.js} +1 -1
- package/dist/ui/assets/provider-store-access-DGbAP-Xh.js +1 -0
- package/dist/ui/assets/provider-store-access-DsxnZ4uK.js +1 -0
- package/dist/ui/assets/{providers-BvRDQChl.js → providers-6dx06Qi0.js} +2 -2
- package/dist/ui/assets/{providers-M-JnxDEF.js → providers-DP6Q3MgF.js} +1 -1
- package/dist/ui/assets/{quick-llm-Cw55s3AE.js → quick-llm-BGqvOzMA.js} +1 -1
- package/dist/ui/assets/session-freezer-C-O5pBkf.js +1 -0
- package/dist/ui/assets/{speak-0G_5dAEo.js → speak-saIewYPP.js} +1 -1
- package/dist/ui/assets/{sprinkle-manager-3XQX_9oX.js → sprinkle-manager-B7k3Db43.js} +1 -1
- package/dist/ui/assets/{store-CkF-lqzJ.js → store-DGFgG-JP.js} +1 -1
- package/dist/ui/assets/{sudo-Cwq4oR5F.js → sudo-BQi_HS1I.js} +1 -1
- package/dist/ui/assets/{transformers-env-Dr08ok5B.js → transformers-env-JkX2ZGqP.js} +1 -1
- package/dist/ui/assets/{tray-leader-CKU23d8l.js → tray-leader-BWIXioaC.js} +1 -1
- package/dist/ui/assets/{tray-leave-runtime-O9XjwL9L.js → tray-leave-runtime-DduNvcIM.js} +1 -1
- package/dist/ui/assets/{upgrade-detection-CsrSgKL8.js → upgrade-detection-CP4iMztj.js} +1 -1
- package/dist/ui/assets/{voice-reply-CN2is9Ta.js → voice-reply-SatR5nH7.js} +1 -1
- package/dist/ui/assets/{wc-attach-2hOnG_FV.js → wc-attach-CAwutRcc.js} +2 -2
- package/dist/ui/assets/{wc-extension-BKE1Es1y.js → wc-extension-wrrO15ZD.js} +2 -2
- package/dist/ui/assets/{wc-follower-CLYq0D0Q.js → wc-follower-BIygduKy.js} +3 -3
- package/dist/ui/assets/{wc-live-CUNsO49C.js → wc-live--8aB_MDr.js} +5 -5
- package/dist/ui/assets/{wc-nav-erdubFc-.js → wc-nav-ClVwIoL_.js} +2 -2
- package/dist/ui/assets/{wc-onboarding-C2JO-Ole.js → wc-onboarding-DuK0_rrQ.js} +2 -2
- package/dist/ui/assets/{wc-placeholder-65MNIEoX.js → wc-placeholder-DQ5wxsQY.js} +3 -3
- package/dist/ui/assets/{wc-settings-BhgR1hNB.js → wc-settings-DcDB8uQd.js} +3 -3
- package/dist/ui/assets/{wc-shell-BF08FXv-.js → wc-shell-DscaNM5-.js} +3 -3
- package/dist/ui/assets/{wc-sprinkles-DwdCHt-5.js → wc-sprinkles-BRp4tFvi.js} +2 -2
- package/dist/ui/assets/{wc-tray-C6q7a-0E.js → wc-tray-QdYi2dyT.js} +2 -2
- package/dist/ui/assets/{whisper-engine-CY9vQD4C.js → whisper-engine-CjKPz-nL.js} +1 -1
- package/dist/ui/assets/{xai-grok-vaddJMwT.js → xai-grok-CTwn3V-u.js} +1 -1
- package/dist/ui/assets/{xai-grok-BvGB5uOY.js → xai-grok-lJuuHMcu.js} +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/ui/packages/webapp/index.html +3 -3
- package/package.json +1 -1
- package/dist/ui/assets/clipboard-5VqPriRY.js +0 -1
- package/dist/ui/assets/dip-_qy5Ok1I.js +0 -1
- package/dist/ui/assets/esp8266-vZ_WY27L.js +0 -1
- package/dist/ui/assets/provider-store-access-CmgVdbe-.js +0 -1
- package/dist/ui/assets/provider-store-access-D-jco4pi.js +0 -1
- package/dist/ui/assets/session-freezer-CZG1jRcz.js +0 -1
|
@@ -37,14 +37,14 @@ let r=t(),i=n(),a=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbo
|
|
|
37
37
|
*/
|
|
38
38
|
(function(){var e=`input is invalid type`,n=typeof window==`object`,i=n?window:{};i.JS_SHA256_NO_WINDOW&&(n=!1);var a=!n&&typeof self==`object`,o=!i.JS_SHA256_NO_NODE_JS&&typeof process==`object`&&process.versions&&process.versions.node&&process.type!=`renderer`;o?i=globalThis:a&&(i=self);var s=!i.JS_SHA256_NO_COMMON_JS&&typeof t==`object`&&t.exports,c=typeof define==`function`&&define.amd,l=!i.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<`u`,u=`0123456789abcdef`.split(``),d=[-2147483648,8388608,32768,128],f=[24,16,8,0],p=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],m=[`hex`,`array`,`digest`,`arrayBuffer`],g=[];(i.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)===`[object Array]`}),l&&(i.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e==`object`&&e.buffer&&e.buffer.constructor===ArrayBuffer});var _=function(e,t){return function(n){return new S(t,!0).update(n)[e]()}},v=function(e){var t=_(`hex`,e);o&&(t=y(t,e)),t.create=function(){return new S(e)},t.update=function(e){return t.create().update(e)};for(var n=0;n<m.length;++n){var r=m[n];t[r]=_(r,e)}return t},y=function(t,n){var a=h(),o=r().Buffer,s=n?`sha224`:`sha256`,c=o.from&&!i.JS_SHA256_NO_BUFFER_FROM?o.from:function(e){return new o(e)};return function(n){if(typeof n==`string`)return a.createHash(s).update(n,`utf8`).digest(`hex`);if(n==null)throw Error(e);return n.constructor===ArrayBuffer&&(n=new Uint8Array(n)),Array.isArray(n)||ArrayBuffer.isView(n)||n.constructor===o?a.createHash(s).update(c(n)).digest(`hex`):t(n)}},b=function(e,t){return function(n,r){return new C(n,t,!0).update(r)[e]()}},x=function(e){var t=b(`hex`,e);t.create=function(t){return new C(t,e)},t.update=function(e,n){return t.create(e).update(n)};for(var n=0;n<m.length;++n){var r=m[n];t[r]=b(r,e)}return t};function S(e,t){t?(g[0]=g[16]=g[1]=g[2]=g[3]=g[4]=g[5]=g[6]=g[7]=g[8]=g[9]=g[10]=g[11]=g[12]=g[13]=g[14]=g[15]=0,this.blocks=g):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}S.prototype.update=function(t){if(!this.finalized){var n,r=typeof t;if(r!==`string`){if(r===`object`){if(t===null)throw Error(e);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw Error(e)}else throw Error(e);n=!0}for(var i,a=0,o,s=t.length,c=this.blocks;a<s;){if(this.hashed&&(this.hashed=!1,c[0]=this.block,this.block=c[16]=c[1]=c[2]=c[3]=c[4]=c[5]=c[6]=c[7]=c[8]=c[9]=c[10]=c[11]=c[12]=c[13]=c[14]=c[15]=0),n)for(o=this.start;a<s&&o<64;++a)c[o>>>2]|=t[a]<<f[o++&3];else for(o=this.start;a<s&&o<64;++a)i=t.charCodeAt(a),i<128?c[o>>>2]|=i<<f[o++&3]:i<2048?(c[o>>>2]|=(192|i>>>6)<<f[o++&3],c[o>>>2]|=(128|i&63)<<f[o++&3]):i<55296||i>=57344?(c[o>>>2]|=(224|i>>>12)<<f[o++&3],c[o>>>2]|=(128|i>>>6&63)<<f[o++&3],c[o>>>2]|=(128|i&63)<<f[o++&3]):(i=65536+((i&1023)<<10|t.charCodeAt(++a)&1023),c[o>>>2]|=(240|i>>>18)<<f[o++&3],c[o>>>2]|=(128|i>>>12&63)<<f[o++&3],c[o>>>2]|=(128|i>>>6&63)<<f[o++&3],c[o>>>2]|=(128|i&63)<<f[o++&3]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.block=c[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes%=4294967296),this}},S.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>>2]|=d[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},S.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=this.blocks,l,u,d,f,m,h,g,_,v,y,b;for(l=16;l<64;++l)m=c[l-15],u=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,m=c[l-2],d=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,c[l]=c[l-16]+u+c[l-7]+d<<0;for(b=t&n,l=0;l<64;l+=4)this.first?(this.is224?(_=300032,m=c[0]-1413257819,s=m-150054599<<0,r=m+24177077<<0):(_=704751109,m=c[0]-210244248,s=m-1521486534<<0,r=m+143694565<<0),this.first=!1):(u=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),d=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),_=e&t,f=_^e&n^b,g=i&a^~i&o,m=s+d+g+p[l]+c[l],h=u+f,s=r+m<<0,r=m+h<<0),u=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),d=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),v=r&e,f=v^r&t^_,g=s&i^~s&a,m=o+d+g+p[l+1]+c[l+1],h=u+f,o=n+m<<0,n=m+h<<0,u=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),d=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),y=n&r,f=y^n&e^v,g=o&s^~o&i,m=a+d+g+p[l+2]+c[l+2],h=u+f,a=t+m<<0,t=m+h<<0,u=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),d=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=t&n,f=b^t&r^y,g=a&o^~a&s,m=i+d+g+p[l+3]+c[l+3],h=u+f,i=e+m<<0,e=m+h<<0,this.chromeBugWorkAround=!0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+i<<0,this.h5=this.h5+a<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0},S.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=u[e>>>28&15]+u[e>>>24&15]+u[e>>>20&15]+u[e>>>16&15]+u[e>>>12&15]+u[e>>>8&15]+u[e>>>4&15]+u[e&15]+u[t>>>28&15]+u[t>>>24&15]+u[t>>>20&15]+u[t>>>16&15]+u[t>>>12&15]+u[t>>>8&15]+u[t>>>4&15]+u[t&15]+u[n>>>28&15]+u[n>>>24&15]+u[n>>>20&15]+u[n>>>16&15]+u[n>>>12&15]+u[n>>>8&15]+u[n>>>4&15]+u[n&15]+u[r>>>28&15]+u[r>>>24&15]+u[r>>>20&15]+u[r>>>16&15]+u[r>>>12&15]+u[r>>>8&15]+u[r>>>4&15]+u[r&15]+u[i>>>28&15]+u[i>>>24&15]+u[i>>>20&15]+u[i>>>16&15]+u[i>>>12&15]+u[i>>>8&15]+u[i>>>4&15]+u[i&15]+u[a>>>28&15]+u[a>>>24&15]+u[a>>>20&15]+u[a>>>16&15]+u[a>>>12&15]+u[a>>>8&15]+u[a>>>4&15]+u[a&15]+u[o>>>28&15]+u[o>>>24&15]+u[o>>>20&15]+u[o>>>16&15]+u[o>>>12&15]+u[o>>>8&15]+u[o>>>4&15]+u[o&15];return this.is224||(c+=u[s>>>28&15]+u[s>>>24&15]+u[s>>>20&15]+u[s>>>16&15]+u[s>>>12&15]+u[s>>>8&15]+u[s>>>4&15]+u[s&15]),c},S.prototype.toString=S.prototype.hex,S.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,i=this.h4,a=this.h5,o=this.h6,s=this.h7,c=[e>>>24&255,e>>>16&255,e>>>8&255,e&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255,n>>>24&255,n>>>16&255,n>>>8&255,n&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,a>>>24&255,a>>>16&255,a>>>8&255,a&255,o>>>24&255,o>>>16&255,o>>>8&255,o&255];return this.is224||c.push(s>>>24&255,s>>>16&255,s>>>8&255,s&255),c},S.prototype.array=S.prototype.digest,S.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function C(t,n,r){var i,a=typeof t;if(a===`string`){var o=[],s=t.length,c=0,u;for(i=0;i<s;++i)u=t.charCodeAt(i),u<128?o[c++]=u:u<2048?(o[c++]=192|u>>>6,o[c++]=128|u&63):u<55296||u>=57344?(o[c++]=224|u>>>12,o[c++]=128|u>>>6&63,o[c++]=128|u&63):(u=65536+((u&1023)<<10|t.charCodeAt(++i)&1023),o[c++]=240|u>>>18,o[c++]=128|u>>>12&63,o[c++]=128|u>>>6&63,o[c++]=128|u&63);t=o}else if(a===`object`){if(t===null)throw Error(e);if(l&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!l||!ArrayBuffer.isView(t)))throw Error(e)}else throw Error(e);t.length>64&&(t=new S(n,!0).update(t).array());var d=[],f=[];for(i=0;i<64;++i){var p=t[i]||0;d[i]=92^p,f[i]=54^p}S.call(this,n,r),this.update(f),this.oKeyPad=d,this.inner=!0,this.sharedMemory=r}C.prototype=new S,C.prototype.finalize=function(){if(S.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();S.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),S.prototype.finalize.call(this)}};var w=v();w.sha256=w,w.sha224=v(!0),w.sha256.hmac=x(),w.sha224.hmac=x(!0),s?t.exports=w:(i.sha256=w.sha256,i.sha224=w.sha224,c&&define(function(){return w}))})()})),y=g(),b=_(),x=v()
|
|
39
39
|
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
|
|
40
|
-
;function S(e){let t=e.length;for(;--t>=0;)e[t]=0}const C=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]),w=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]),T=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),D=Array(288*2);S(D);const O=Array(60);S(O);const k=Array(512);S(k);const A=Array(256);S(A);const j=Array(29);S(j);const ee=Array(30);S(ee);function te(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}let ne,re,ie;function ae(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const oe=e=>e<256?k[e]:k[256+(e>>>7)],M=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},N=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,M(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},P=(e,t,n)=>{N(e,n[t*2],n[t*2+1])},se=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},ce=e=>{e.bi_valid===16?(M(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)},le=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=15;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<573;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},ue=(e,t,n)=>{let r=Array(16),i=0,a,o;for(a=1;a<=15;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let t=e[o*2+1];t!==0&&(e[o*2]=se(r[t]++,t))}},de=()=>{let e,t,n,r,i,a=Array(16);for(n=0,r=0;r<28;r++)for(j[r]=n,e=0;e<1<<C[r];e++)A[n++]=r;for(A[n-1]=r,i=0,r=0;r<16;r++)for(ee[r]=i,e=0;e<1<<w[r];e++)k[i++]=r;for(i>>=7;r<30;r++)for(ee[r]=i<<7,e=0;e<1<<w[r]-7;e++)k[256+i++]=r;for(t=0;t<=15;t++)a[t]=0;for(e=0;e<=143;)D[e*2+1]=8,e++,a[8]++;for(;e<=255;)D[e*2+1]=9,e++,a[9]++;for(;e<=279;)D[e*2+1]=7,e++,a[7]++;for(;e<=287;)D[e*2+1]=8,e++,a[8]++;for(ue(D,287,a),e=0;e<30;e++)O[e*2+1]=5,O[e*2]=se(e,5);ne=new te(D,C,257,286,15),re=new te(O,w,0,30,15),ie=new te([],T,0,19,7)},fe=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[t*2]=0;for(t=0;t<30;t++)e.dyn_dtree[t*2]=0;for(t=0;t<19;t++)e.bl_tree[t*2]=0;e.dyn_ltree[256*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},pe=e=>{e.bi_valid>8?M(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},me=(e,t,n,r)=>{let i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},he=(e,t,n)=>{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&me(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!me(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},ge=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?P(e,i,t):(o=A[i],P(e,o+256+1,t),s=C[o],s!==0&&(i-=j[o],N(e,i,s)),r--,o=oe(r),P(e,o,n),s=w[o],s!==0&&(r-=ee[o],N(e,r,s)));while(a<e.sym_next);P(e,256,t)},_e=(e,t)=>{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=573,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)he(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],he(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,he(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],le(e,t),ue(n,c,e.bl_count)},ve=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[34]++:e.bl_tree[36]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[32]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},ye=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do P(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(P(e,17,e.bl_tree),N(e,s-3,3)):(P(e,18,e.bl_tree),N(e,s-11,7)):(a!==i&&(P(e,a,e.bl_tree),s--),P(e,16,e.bl_tree),N(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},be=e=>{let t;for(ve(e,e.dyn_ltree,e.l_desc.max_code),ve(e,e.dyn_dtree,e.d_desc.max_code),_e(e,e.bl_desc),t=18;t>=3&&e.bl_tree[E[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},xe=(e,t,n,r)=>{let i;for(N(e,t-257,5),N(e,n-1,5),N(e,r-4,4),i=0;i<r;i++)N(e,e.bl_tree[E[i]*2+1],3);ye(e,e.dyn_ltree,t-1),ye(e,e.dyn_dtree,n-1)},Se=e=>{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[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return 1;for(n=32;n<256;n++)if(e.dyn_ltree[n*2]!==0)return 1;return 0};let Ce=!1;const we=e=>{Ce||=(de(),!0),e.l_desc=new ae(e.dyn_ltree,ne),e.d_desc=new ae(e.dyn_dtree,re),e.bl_desc=new ae(e.bl_tree,ie),e.bi_buf=0,e.bi_valid=0,fe(e)},F=(e,t,n,r)=>{N(e,0+ +!!r,3),pe(e),M(e,n),M(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n};var Te={_tr_init:we,_tr_stored_block:F,_tr_flush_block:(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=Se(e)),_e(e,e.l_desc),_e(e,e.d_desc),o=be(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?F(e,t,n,r):e.strategy===4||a===i?(N(e,2+ +!!r,3),ge(e,D,O)):(N(e,4+ +!!r,3),xe(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),ge(e,e.dyn_ltree,e.dyn_dtree)),fe(e),r&&pe(e)},_tr_tally:(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[(A[n]+256+1)*2]++,e.dyn_dtree[oe(t)*2]++),e.sym_next===e.sym_end),_tr_align:e=>{N(e,2,3),P(e,256,D),ce(e)}},Ee=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0};const I=new Uint32Array((()=>{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})());var L=(e,t,n,r)=>{let i=I,a=r+n;e^=-1;for(let n=r;n<a;n++)e=e>>>8^i[(e^t[n])&255];return e^-1},De={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`},Oe={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};const{_tr_init:ke,_tr_stored_block:Ae,_tr_flush_block:je,_tr_tally:R,_tr_align:Me}=Te,{Z_NO_FLUSH:Ne,Z_PARTIAL_FLUSH:Pe,Z_FULL_FLUSH:Fe,Z_FINISH:z,Z_BLOCK:Ie,Z_OK:B,Z_STREAM_END:Le,Z_STREAM_ERROR:V,Z_DATA_ERROR:Re,Z_BUF_ERROR:ze,Z_DEFAULT_COMPRESSION:Be,Z_FILTERED:Ve,Z_HUFFMAN_ONLY:He,Z_RLE:Ue,Z_FIXED:We,Z_DEFAULT_STRATEGY:Ge,Z_UNKNOWN:Ke,Z_DEFLATED:qe}=Oe,Je=(e,t)=>(e.msg=De[t],t),Ye=e=>e*2-(e>4?9:0),Xe=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Ze=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)};let Qe=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const H=e=>{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))},U=(e,t)=>{je(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,H(e.strm)},W=(e,t)=>{e.pending_buf[e.pending++]=t},$e=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},et=(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=Ee(e.adler,t,i,n):e.state.wrap===2&&(e.adler=L(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},tt=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+258,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,l[i+o]!==m||l[i+o-1]!==p||l[i]!==l[r]||l[++i]!==l[r+1])continue;r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=258-(f-r),r=f-258,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},nt=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)&&(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),Ze(e),r+=t),e.strm.avail_in===0)break;if(n=et(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Qe(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Qe(e,e.ins_h,e.window[i+3-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<3)););}while(e.lookahead<262&&e.strm.avail_in!==0)},rt=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==z||t===Ne||r!==i+e.strm.avail_in)))break;o=+(t===z&&r===i+e.strm.avail_in),Ae(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,H(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&&(et(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(o===0);return s-=e.strm.avail_in,s&&(s>=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<=s&&(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-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?4:t!==Ne&&t!==z&&e.strm.avail_in===0&&e.strstart===e.block_start?2:(a=e.window_size-e.strstart,e.strm.avail_in>a&&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++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(et(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===z)&&t!==Ne&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=+(t===z&&e.strm.avail_in===0&&r===i),Ae(e,e.block_start,r,o),e.block_start+=r,H(e.strm)),o?3:1)},it=(e,t)=>{let n,r;for(;;){if(e.lookahead<262){if(nt(e),e.lookahead<262&&t===Ne)return 1;if(e.lookahead===0)break}if(n=0,e.lookahead>=3&&(e.ins_h=Qe(e,e.ins_h,e.window[e.strstart+3-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-262&&(e.match_length=tt(e,n)),e.match_length>=3)if(r=R(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do e.strstart++,e.ins_h=Qe(e,e.ins_h,e.window[e.strstart+3-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=Qe(e,e.ins_h,e.window[e.strstart+1]);else r=R(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(U(e,!1),e.strm.avail_out===0))return 1}return e.insert=e.strstart<2?e.strstart:2,t===z?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2},at=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<262){if(nt(e),e.lookahead<262&&t===Ne)return 1;if(e.lookahead===0)break}if(n=0,e.lookahead>=3&&(e.ins_h=Qe(e,e.ins_h,e.window[e.strstart+3-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=2,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=tt(e,n),e.match_length<=5&&(e.strategy===Ve||e.match_length===3&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=R(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=Qe(e,e.ins_h,e.window[e.strstart+3-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=2,e.strstart++,r&&(U(e,!1),e.strm.avail_out===0))return 1}else if(e.match_available){if(r=R(e,0,e.window[e.strstart-1]),r&&U(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=R(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<2?e.strstart:2,t===z?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2},ot=(e,t)=>{let n,r,i,a,o=e.window;for(;;){if(e.lookahead<=258){if(nt(e),e.lookahead<=258&&t===Ne)return 1;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+258;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=258-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=R(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=R(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(U(e,!1),e.strm.avail_out===0))return 1}return e.insert=0,t===z?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2},st=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(nt(e),e.lookahead===0)){if(t===Ne)return 1;break}if(e.match_length=0,n=R(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(U(e,!1),e.strm.avail_out===0))return 1}return e.insert=0,t===z?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2};function G(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const ct=[new G(0,0,0,0,rt),new G(4,4,8,4,it),new G(4,5,16,8,it),new G(4,6,32,32,it),new G(4,4,16,16,at),new G(8,16,32,32,at),new G(8,16,128,128,at),new G(8,32,128,256,at),new G(32,128,258,1024,at),new G(32,258,258,4096,at)],lt=e=>{e.window_size=2*e.w_size,Xe(e.head),e.max_lazy_match=ct[e.level].max_lazy,e.good_match=ct[e.level].good_length,e.nice_match=ct[e.level].nice_length,e.max_chain_length=ct[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0};function ut(){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=qe,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(573*2),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Xe(this.dyn_ltree),Xe(this.dyn_dtree),Xe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Xe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Xe(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}const dt=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.status!==42&&t.status!==57&&t.status!==69&&t.status!==73&&t.status!==91&&t.status!==103&&t.status!==113&&t.status!==666)},ft=e=>{if(dt(e))return Je(e,V);e.total_in=e.total_out=0,e.data_type=Ke;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?57:t.wrap?42:113,e.adler=t.wrap===2?0:1,t.last_flush=-2,ke(t),B},pt=e=>{let t=ft(e);return t===B&<(e.state),t},mt=(e,t)=>dt(e)||e.state.wrap!==2?V:(e.state.gzhead=t,B),ht=(e,t,n,r,i,a)=>{if(!e)return V;let o=1;if(t===Be&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>9||n!==qe||r<8||r>15||t<0||t>9||a<0||a>We||r===8&&o!==1)return Je(e,V);r===8&&(r=9);let s=new ut;return e.state=s,s.strm=e,s.status=42,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=a,s.method=n,pt(e)};var gt={deflateInit:(e,t)=>ht(e,t,qe,15,8,Ge),deflateInit2:ht,deflateReset:pt,deflateResetKeep:ft,deflateSetHeader:mt,deflate:(e,t)=>{if(dt(e)||t>Ie||t<0)return e?Je(e,V):V;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===666&&t!==z)return Je(e,e.avail_out===0?ze:V);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(H(e),e.avail_out===0)return n.last_flush=-1,B}else if(e.avail_in===0&&Ye(t)<=Ye(r)&&t!==z)return Je(e,ze);if(n.status===666&&e.avail_in!==0)return Je(e,ze);if(n.status===42&&n.wrap===0&&(n.status=113),n.status===42){let t=qe+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=He||n.level<2?0:n.level<6?1:n.level===6?2:3,t|=r<<6,n.strstart!==0&&(t|=32),t+=31-t%31,$e(n,t),n.strstart!==0&&($e(n,e.adler>>>16),$e(n,e.adler&65535)),e.adler=1,n.status=113,H(e),n.pending!==0)return n.last_flush=-1,B}if(n.status===57){if(e.adler=0,W(n,31),W(n,139),W(n,8),n.gzhead)W(n,+!!n.gzhead.text+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),W(n,n.gzhead.time&255),W(n,n.gzhead.time>>8&255),W(n,n.gzhead.time>>16&255),W(n,n.gzhead.time>>24&255),W(n,n.level===9?2:n.strategy>=He||n.level<2?4:0),W(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(W(n,n.gzhead.extra.length&255),W(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=L(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(W(n,0),W(n,0),W(n,0),W(n,0),W(n,0),W(n,n.level===9?2:n.strategy>=He||n.level<2?4:0),W(n,3),n.status=113,H(e),n.pending!==0)return n.last_flush=-1,B}if(n.status===69){if(n.gzhead.extra){let t=n.pending,r=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=L(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,H(e),n.pending!==0)return n.last_flush=-1,B;t=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=L(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=73}if(n.status===73){if(n.gzhead.name){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=L(e.adler,n.pending_buf,n.pending-t,t)),H(e),n.pending!==0)return n.last_flush=-1,B;t=0}r=n.gzindex<n.gzhead.name.length?n.gzhead.name.charCodeAt(n.gzindex++)&255:0,W(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=L(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=91}if(n.status===91){if(n.gzhead.comment){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=L(e.adler,n.pending_buf,n.pending-t,t)),H(e),n.pending!==0)return n.last_flush=-1,B;t=0}r=n.gzindex<n.gzhead.comment.length?n.gzhead.comment.charCodeAt(n.gzindex++)&255:0,W(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=L(e.adler,n.pending_buf,n.pending-t,t))}n.status=103}if(n.status===103){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(H(e),n.pending!==0))return n.last_flush=-1,B;W(n,e.adler&255),W(n,e.adler>>8&255),e.adler=0}if(n.status=113,H(e),n.pending!==0)return n.last_flush=-1,B}if(e.avail_in!==0||n.lookahead!==0||t!==Ne&&n.status!==666){let r=n.level===0?rt(n,t):n.strategy===He?st(n,t):n.strategy===Ue?ot(n,t):ct[n.level].func(n,t);if((r===3||r===4)&&(n.status=666),r===1||r===3)return e.avail_out===0&&(n.last_flush=-1),B;if(r===2&&(t===Pe?Me(n):t!==Ie&&(Ae(n,0,0,!1),t===Fe&&(Xe(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),H(e),e.avail_out===0))return n.last_flush=-1,B}return t===z?n.wrap<=0?Le:(n.wrap===2?(W(n,e.adler&255),W(n,e.adler>>8&255),W(n,e.adler>>16&255),W(n,e.adler>>24&255),W(n,e.total_in&255),W(n,e.total_in>>8&255),W(n,e.total_in>>16&255),W(n,e.total_in>>24&255)):($e(n,e.adler>>>16),$e(n,e.adler&65535)),H(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending===0?Le:B):B},deflateEnd:e=>{if(dt(e))return V;let t=e.state.status;return e.state=null,t===113?Je(e,Re):B},deflateSetDictionary:(e,t)=>{let n=t.length;if(dt(e))return V;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==42||r.lookahead)return V;if(i===1&&(e.adler=Ee(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Xe(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}let a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,nt(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do r.ins_h=Qe(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++;while(--t);r.strstart=e,r.lookahead=2,nt(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,B},deflateInfo:`pako deflate (from Nodeca project)`};const _t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var vt={assign:function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!=`object`)throw TypeError(n+`must be non-object`);for(let t in n)_t(n,t)&&(e[t]=n[t])}}return e},flattenChunks:e=>{let t=0;for(let n=0,r=e.length;n<r;n++)t+=e[n].length;let n=new Uint8Array(t);for(let t=0,r=0,i=e.length;t<i;t++){let i=e[t];n.set(i,r),r+=i.length}return n}};let yt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{yt=!1}const bt=new Uint8Array(256);for(let e=0;e<256;e++)bt[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;bt[254]=bt[254]=1;var xt=e=>{if(typeof TextEncoder==`function`&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};const St=(e,t)=>{if(t<65534&&e.subarray&&yt)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n=``;for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n};var Ct={string2buf:xt,buf2string:(e,t)=>{let n=t||e.length;if(typeof TextDecoder==`function`&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,a=Array(n*2);for(i=0,r=0;r<n;){let t=e[r++];if(t<128){a[i++]=t;continue}let o=bt[t];if(o>4){a[i++]=65533,r+=o-1;continue}for(t&=o===2?31:o===3?15:7;o>1&&r<n;)t=t<<6|e[r++]&63,o--;if(o>1){a[i++]=65533;continue}t<65536?a[i++]=t:(t-=65536,a[i++]=55296|t>>10&1023,a[i++]=56320|t&1023)}return St(a,i)},utf8border:(e,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+bt[e[n]]>t?n:t}};function wt(){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 Tt=wt;const Et=Object.prototype.toString,{Z_NO_FLUSH:Dt,Z_SYNC_FLUSH:Ot,Z_FULL_FLUSH:kt,Z_FINISH:At,Z_OK:jt,Z_STREAM_END:Mt,Z_DEFAULT_COMPRESSION:Nt,Z_DEFAULT_STRATEGY:Pt,Z_DEFLATED:Ft}=Oe;function It(e){this.options=vt.assign({level:Nt,method:Ft,chunkSize:16384,windowBits:15,memLevel:8,strategy:Pt},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 Tt,this.strm.avail_out=0;let n=gt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==jt)throw Error(De[n]);if(t.header&>.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e=typeof t.dictionary==`string`?Ct.string2buf(t.dictionary):Et.call(t.dictionary)===`[object ArrayBuffer]`?new Uint8Array(t.dictionary):t.dictionary,n=gt.deflateSetDictionary(this.strm,e),n!==jt)throw Error(De[n]);this._dict_set=!0}}It.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;for(a=t===~~t?t:t===!0?At:Dt,typeof e==`string`?n.input=Ct.string2buf(e):Et.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),(a===Ot||a===kt)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=gt.deflate(n,a),i===Mt)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=gt.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===jt;if(n.avail_out===0){this.onData(n.output);continue}if(a>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},It.prototype.onData=function(e){this.chunks.push(e)},It.prototype.onEnd=function(e){e===jt&&(this.result=vt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Lt(e,t){let n=new It(t);if(n.push(e,!0),n.err)throw n.msg||De[n.err];return n.result}function Rt(e,t){return t||={},t.raw=!0,Lt(e,t)}function zt(e,t){return t||={},t.gzip=!0,Lt(e,t)}var Bt={Deflate:It,deflate:Lt,deflateRaw:Rt,gzip:zt,constants:Oe};const Vt=16209;var Ht=function(e,t){let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E=e.state;n=e.next_in,w=e.input,r=n+(e.avail_in-5),i=e.next_out,T=e.output,a=i-(t-e.avail_out),o=i+(e.avail_out-257),s=E.dmax,c=E.wsize,l=E.whave,u=E.wnext,d=E.window,f=E.hold,p=E.bits,m=E.lencode,h=E.distcode,g=(1<<E.lenbits)-1,_=(1<<E.distbits)-1;top:do{p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=m[f&g];dolen:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y===0)T[i++]=v&65535;else if(y&16){b=v&65535,y&=15,y&&(p<y&&(f+=w[n++]<<p,p+=8),b+=f&(1<<y)-1,f>>>=y,p-=y),p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=h[f&_];dodist:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y&16){if(x=v&65535,y&=15,p<y&&(f+=w[n++]<<p,p+=8,p<y&&(f+=w[n++]<<p,p+=8)),x+=f&(1<<y)-1,x>s){e.msg=`invalid distance too far back`,E.mode=Vt;break top}if(f>>>=y,p-=y,y=i-a,x>y){if(y=x-y,y>l&&E.sane){e.msg=`invalid distance too far back`,E.mode=Vt;break top}if(S=0,C=d,u===0){if(S+=c-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}else if(u<y){if(S+=c+u-y,y-=u,y<b){b-=y;do T[i++]=d[S++];while(--y);if(S=0,u<b){y=u,b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}}else if(S+=u-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}for(;b>2;)T[i++]=C[S++],T[i++]=C[S++],T[i++]=C[S++],b-=3;b&&(T[i++]=C[S++],b>1&&(T[i++]=C[S++]))}else{S=i-x;do T[i++]=T[S++],T[i++]=T[S++],T[i++]=T[S++],b-=3;while(b>2);b&&(T[i++]=T[S++],b>1&&(T[i++]=T[S++]))}}else if(y&64){e.msg=`invalid distance code`,E.mode=Vt;break top}else{v=h[(v&65535)+(f&(1<<y)-1)];continue dodist}break}}else if(!(y&64)){v=m[(v&65535)+(f&(1<<y)-1)];continue dolen}else if(y&32){E.mode=16191;break top}else{e.msg=`invalid literal/length code`,E.mode=Vt;break top}break}}while(n<r&&i<o);b=p>>3,n-=b,p-=b<<3,f&=(1<<p)-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?5+(r-n):5-(n-r),e.avail_out=i<o?257+(o-i):257-(i-o),E.hold=f,E.bits=p};const Ut=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Wt=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Gt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Kt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var qt=(e,t,n,r,i,a,o,s)=>{let c=s.bits,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0,y,b,x,S,C,w=null,T,E=new Uint16Array(16),D=new Uint16Array(16),O=null,k,A,j;for(l=0;l<=15;l++)E[l]=0;for(u=0;u<r;u++)E[t[n+u]]++;for(p=c,f=15;f>=1&&E[f]===0;f--);if(p>f&&(p=f),f===0)return i[a++]=20971520,i[a++]=20971520,s.bits=1,0;for(d=1;d<f&&E[d]===0;d++);for(p<d&&(p=d),g=1,l=1;l<=15;l++)if(g<<=1,g-=E[l],g<0)return-1;if(g>0&&(e===0||f!==1))return-1;for(D[1]=0,l=1;l<15;l++)D[l+1]=D[l]+E[l];for(u=0;u<r;u++)t[n+u]!==0&&(o[D[t[n+u]]++]=u);if(e===0?(w=O=o,T=20):e===1?(w=Ut,O=Wt,T=257):(w=Gt,O=Kt,T=0),v=0,u=0,l=d,C=a,m=p,h=0,x=-1,_=1<<p,S=_-1,e===1&&_>852||e===2&&_>592)return 1;for(;;){k=l-h,o[u]+1<T?(A=0,j=o[u]):o[u]>=T?(A=O[o[u]-T],j=w[o[u]-T]):(A=96,j=0),y=1<<l-h,b=1<<m,d=b;do b-=y,i[C+(v>>h)+b]=k<<24|A<<16|j|0;while(b!==0);for(y=1<<l-1;v&y;)y>>=1;if(y===0?v=0:(v&=y-1,v+=y),u++,--E[l]===0){if(l===f)break;l=t[n+o[u]]}if(l>p&&(v&S)!==x){for(h===0&&(h=p),C+=d,m=l-h,g=1<<m;m+h<f&&(g-=E[m+h],!(g<=0));)m++,g<<=1;if(_+=1<<m,e===1&&_>852||e===2&&_>592)return 1;x=v&S,i[x]=p<<24|m<<16|C-a|0}}return v!==0&&(i[C+v]=l-h<<24|4194304),s.bits=p,0};const{Z_FINISH:Jt,Z_BLOCK:Yt,Z_TREES:Xt,Z_OK:Zt,Z_STREAM_END:Qt,Z_NEED_DICT:$t,Z_STREAM_ERROR:K,Z_DATA_ERROR:en,Z_MEM_ERROR:tn,Z_BUF_ERROR:nn,Z_DEFLATED:rn}=Oe,an=16180,on=16181,sn=16182,cn=16183,ln=16184,un=16185,dn=16186,fn=16187,pn=16188,mn=16189,hn=16190,q=16191,gn=16192,_n=16193,vn=16194,yn=16195,bn=16196,xn=16197,Sn=16198,Cn=16199,wn=16200,Tn=16201,En=16202,Dn=16203,On=16204,kn=16205,An=16206,jn=16207,Mn=16208,J=16209,Nn=16210,Pn=16211,Fn=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function In(){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}const Ln=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.mode<an||t.mode>Pn)},Rn=e=>{if(Ln(e))return K;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=an,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(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Zt},zn=e=>{if(Ln(e))return K;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Rn(e)},Bn=(e,t)=>{let n;if(Ln(e))return K;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?K:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,zn(e))},Vn=(e,t)=>{if(!e)return K;let n=new In;e.state=n,n.strm=e,n.window=null,n.mode=an;let r=Bn(e,t);return r!==Zt&&(e.state=null),r},Hn=e=>Vn(e,15);let Un=!0,Wn,Gn;const Kn=e=>{if(Un){Wn=new Int32Array(512),Gn=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(qt(1,e.lens,0,288,Wn,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;qt(2,e.lens,0,32,Gn,0,e.work,{bits:5}),Un=!1}e.lencode=Wn,e.lenbits=9,e.distcode=Gn,e.distbits=5},qn=(e,t,n,r)=>{let i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0};var Y={inflateReset:zn,inflateReset2:Bn,inflateResetKeep:Rn,inflateInit:Hn,inflateInit2:Vn,inflate:(e,t)=>{let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g=0,_,v,y,b,x,S,C,w,T=new Uint8Array(4),E,D,O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ln(e)||!e.output||!e.input&&e.avail_in!==0)return K;n=e.state,n.mode===q&&(n.mode=gn),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,d=s,f=c,w=Zt;inf_leave:for(;;)switch(n.mode){case an:if(n.wrap===0){n.mode=gn;break}for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,T[0]=l&255,T[1]=l>>>8&255,n.check=L(n.check,T,2,0),l=0,u=0,n.mode=on;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg=`incorrect header check`,n.mode=J;break}if((l&15)!==rn){e.msg=`unknown compression method`,n.mode=J;break}if(l>>>=4,u-=4,C=(l&15)+8,n.wbits===0&&(n.wbits=C),C>15||C>n.wbits){e.msg=`invalid window size`,n.mode=J;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?mn:q,l=0,u=0;break;case on:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==rn){e.msg=`unknown compression method`,n.mode=J;break}if(n.flags&57344){e.msg=`unknown header flags set`,n.mode=J;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=L(n.check,T,2,0)),l=0,u=0,n.mode=sn;case sn:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,T[2]=l>>>16&255,T[3]=l>>>24&255,n.check=L(n.check,T,4,0)),l=0,u=0,n.mode=cn;case cn:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=L(n.check,T,2,0)),l=0,u=0,n.mode=ln;case ln:if(n.flags&1024){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=L(n.check,T,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=un;case un:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+p),C)),n.flags&512&&n.wrap&4&&(n.check=L(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break inf_leave;n.length=0,n.mode=dn;case dn:if(n.flags&2048){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=L(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.name=null);n.length=0,n.mode=fn;case fn:if(n.flags&4096){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=L(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.comment=null);n.mode=pn;case pn:if(n.flags&512){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg=`header crc mismatch`,n.mode=J;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=q;break;case mn:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=Fn(l),l=0,u=0,n.mode=hn;case hn:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,$t;e.adler=n.check=1,n.mode=q;case q:if(t===Yt||t===Xt)break inf_leave;case gn:if(n.last){l>>>=u&7,u-=u&7,n.mode=An;break}for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,--u,l&3){case 0:n.mode=_n;break;case 1:if(Kn(n),n.mode=Cn,t===Xt){l>>>=2,u-=2;break inf_leave}break;case 2:n.mode=bn;break;case 3:e.msg=`invalid block type`,n.mode=J}l>>>=2,u-=2;break;case _n:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if((l&65535)!=(l>>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=J;break}if(n.length=l&65535,l=0,u=0,n.mode=vn,t===Xt)break inf_leave;case vn:n.mode=yn;case yn:if(p=n.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break inf_leave;i.set(r.subarray(a,a+p),o),s-=p,a+=p,c-=p,o+=p,n.length-=p;break}n.mode=q;break;case bn:for(;u<14;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg=`too many length or distance symbols`,n.mode=J;break}n.have=0,n.mode=xn;case xn:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.lens[O[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[O[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},w=qt(0,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid code lengths set`,n.mode=J;break}n.have=0,n.mode=Sn;case Sn:for(;n.have<n.nlen+n.ndist;){for(;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(y<16)l>>>=_,u-=_,n.lens[n.have++]=y;else{if(y===16){for(D=_+2;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(l>>>=_,u-=_,n.have===0){e.msg=`invalid bit length repeat`,n.mode=J;break}C=n.lens[n.have-1],p=3+(l&3),l>>>=2,u-=2}else if(y===17){for(D=_+3;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=3+(l&7),l>>>=3,u-=3}else{for(D=_+7;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=11+(l&127),l>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=J;break}for(;p--;)n.lens[n.have++]=C}}if(n.mode===J)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=J;break}if(n.lenbits=9,E={bits:n.lenbits},w=qt(1,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid literal/lengths set`,n.mode=J;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},w=qt(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,w){e.msg=`invalid distances set`,n.mode=J;break}if(n.mode=Cn,t===Xt)break inf_leave;case Cn:n.mode=wn;case wn:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,Ht(e,f),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===q&&(n.back=-1);break}for(n.back=0;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(v&&!(v&240)){for(b=_,x=v,S=y;g=n.lencode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,n.length=y,v===0){n.mode=kn;break}if(v&32){n.back=-1,n.mode=q;break}if(v&64){e.msg=`invalid literal/length code`,n.mode=J;break}n.extra=v&15,n.mode=Tn;case Tn:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=En;case En:for(;g=n.distcode[l&(1<<n.distbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(!(v&240)){for(b=_,x=v,S=y;g=n.distcode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,v&64){e.msg=`invalid distance code`,n.mode=J;break}n.offset=y,n.extra=v&15,n.mode=Dn;case Dn:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=J;break}n.mode=On;case On:if(c===0)break inf_leave;if(p=f-c,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=J;break}p>n.wnext?(p-=n.wnext,m=n.wsize-p):m=n.wnext-p,p>n.length&&(p=n.length),h=n.window}else h=i,m=o-n.offset,p=n.length;p>c&&(p=c),c-=p,n.length-=p;do i[o++]=h[m++];while(--p);n.length===0&&(n.mode=wn);break;case kn:if(c===0)break inf_leave;i[o++]=n.length,c--,n.mode=wn;break;case An:if(n.wrap){for(;u<32;){if(s===0)break inf_leave;s--,l|=r[a++]<<u,u+=8}if(f-=c,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?L(n.check,i,f,o-f):Ee(n.check,i,f,o-f)),f=c,n.wrap&4&&(n.flags?l:Fn(l))!==n.check){e.msg=`incorrect data check`,n.mode=J;break}l=0,u=0}n.mode=jn;case jn:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg=`incorrect length check`,n.mode=J;break}l=0,u=0}n.mode=Mn;case Mn:w=Qt;break inf_leave;case J:w=en;break inf_leave;case Nn:return tn;case Pn:default:return K}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||f!==e.avail_out&&n.mode<J&&(n.mode<An||t!==Jt))&&qn(e,e.output,e.next_out,f-e.avail_out),d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?L(n.check,i,f,e.next_out-f):Ee(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===q?128:0)+(n.mode===Cn||n.mode===vn?256:0),(d===0&&f===0||t===Jt)&&w===Zt&&(w=nn),w},inflateEnd:e=>{if(Ln(e))return K;let t=e.state;return t.window&&=null,e.state=null,Zt},inflateGetHeader:(e,t)=>{if(Ln(e))return K;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,Zt):K},inflateSetDictionary:(e,t)=>{let n=t.length,r,i,a;return Ln(e)||(r=e.state,r.wrap!==0&&r.mode!==hn)?K:r.mode===hn&&(i=1,i=Ee(i,t,n,0),i!==r.check)?en:(a=qn(e,t,n,n),a?(r.mode=Nn,tn):(r.havedict=1,Zt))},inflateInfo:`pako inflate (from Nodeca project)`};function Jn(){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 Yn=Jn;const Xn=Object.prototype.toString,{Z_NO_FLUSH:Zn,Z_FINISH:Qn,Z_OK:$n,Z_STREAM_END:er,Z_NEED_DICT:tr,Z_STREAM_ERROR:nr,Z_DATA_ERROR:rr,Z_MEM_ERROR:ir}=Oe;function ar(e){this.options=vt.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 Tt,this.strm.avail_out=0;let n=Y.inflateInit2(this.strm,t.windowBits);if(n!==$n||(this.header=new Yn,Y.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary==`string`?t.dictionary=Ct.string2buf(t.dictionary):Xn.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Y.inflateSetDictionary(this.strm,t.dictionary),n!==$n))))throw Error(De[n])}ar.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,o,s;if(this.ended)return!1;for(o=t===~~t?t:t===!0?Qn:Zn,Xn.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),a=Y.inflate(n,o),a===tr&&i&&(a=Y.inflateSetDictionary(n,i),a===$n?a=Y.inflate(n,o):a===rr&&(a=tr));n.avail_in>0&&a===er&&n.state.wrap>0&&e[n.next_in]!==0;)Y.inflateReset(n),a=Y.inflate(n,o);switch(a){case nr:case rr:case tr:case ir:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===er))if(this.options.to===`string`){let e=Ct.utf8border(n.output,n.next_out),t=n.next_out-e,i=Ct.buf2string(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===$n&&s===0)){if(a===er)return a=Y.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},ar.prototype.onData=function(e){this.chunks.push(e)},ar.prototype.onEnd=function(e){e===$n&&(this.options.to===`string`?this.result=this.chunks.join(``):this.result=vt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function or(e,t){let n=new ar(t);if(n.push(e),n.err)throw n.msg||De[n.err];return n.result}function sr(e,t){return t||={},t.raw=!0,or(e,t)}var cr={Inflate:ar,inflate:or,inflateRaw:sr,ungzip:or,constants:Oe};const{Deflate:lr,deflate:ur,deflateRaw:dr,gzip:fr}=Bt,{Inflate:pr,inflate:mr,inflateRaw:hr,ungzip:gr}=cr;var _r=ur,vr=dr,yr=fr,br=mr,xr=hr,Sr=gr;function Cr(e){let t=[],n={},r=[],i=(e,t)=>{if(e in n){let r=n[e];Array.isArray(r)?r.push(String(t)):n[e]=[String(r),String(t)]}else n[e]=t},a=2;for(;a<e.length;){let n=e[a];if(n===`--`){r.push(...e.slice(a+1));break}if(n.startsWith(`--`)){let t=n.slice(2),r=t.indexOf(`=`);if(r!==-1){i(t.slice(0,r),t.slice(r+1)),a++;continue}let o=e[a+1];if(o!==void 0&&!o.startsWith(`-`)){i(t,o),a+=2;continue}i(t,!0),a++;continue}if(n.startsWith(`-`)&&n.length>1){for(let e of n.slice(1))i(e,!0);a++;continue}t.push(n),a++}return{positional:t,flags:n,subcommand:t.length>0&&/^[a-z][\w-]*$/i.test(t[0])?t[0]:null,passthrough:r}}function wr(e){let t=[...e];return Object.defineProperty(t,"parseFlags",{value:()=>Cr(t),enumerable:!1,writable:!1,configurable:!1}),t}function Tr(e){let t=e=>{if(typeof e==`string`)return e;if(e instanceof Error)return e.message;if(e==null)return String(e);try{return JSON.stringify(e)}catch{return String(e)}},n=(e,t,n)=>t===void 0?`${e(`Error:`)} ${n}\n`:t===``?`${e(n)}\n`:`${e(`${t}:`)} ${n}\n`,r=(t,n)=>t===void 0?`${e.color.yellow(`Warning:`)} ${n}\n`:t===``?`${e.color.yellow(n)}\n`:`${e.color.yellow(`${t}:`)} ${n}\n`;return{die(r,i){let a=typeof i==`number`?i:i?.exitCode??1,o=typeof i==`object`&&i&&`prefix`in i?i.prefix:void 0,s=t(r);throw e.writeStderr(n(e.color.red,o,s)),e.exit(a),Error(`unreachable`)},out(t){if(typeof t==`string`){e.writeStdout(t.endsWith(`
|
|
40
|
+
;function S(e){let t=e.length;for(;--t>=0;)e[t]=0}const C=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]),w=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]),T=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),D=Array(288*2);S(D);const O=Array(60);S(O);const k=Array(512);S(k);const A=Array(256);S(A);const j=Array(29);S(j);const ee=Array(30);S(ee);function te(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}let ne,re,ie;function ae(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const oe=e=>e<256?k[e]:k[256+(e>>>7)],M=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},N=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,M(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},P=(e,t,n)=>{N(e,n[t*2],n[t*2+1])},se=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},ce=e=>{e.bi_valid===16?(M(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)},le=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=15;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<573;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},ue=(e,t,n)=>{let r=Array(16),i=0,a,o;for(a=1;a<=15;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let t=e[o*2+1];t!==0&&(e[o*2]=se(r[t]++,t))}},de=()=>{let e,t,n,r,i,a=Array(16);for(n=0,r=0;r<28;r++)for(j[r]=n,e=0;e<1<<C[r];e++)A[n++]=r;for(A[n-1]=r,i=0,r=0;r<16;r++)for(ee[r]=i,e=0;e<1<<w[r];e++)k[i++]=r;for(i>>=7;r<30;r++)for(ee[r]=i<<7,e=0;e<1<<w[r]-7;e++)k[256+i++]=r;for(t=0;t<=15;t++)a[t]=0;for(e=0;e<=143;)D[e*2+1]=8,e++,a[8]++;for(;e<=255;)D[e*2+1]=9,e++,a[9]++;for(;e<=279;)D[e*2+1]=7,e++,a[7]++;for(;e<=287;)D[e*2+1]=8,e++,a[8]++;for(ue(D,287,a),e=0;e<30;e++)O[e*2+1]=5,O[e*2]=se(e,5);ne=new te(D,C,257,286,15),re=new te(O,w,0,30,15),ie=new te([],T,0,19,7)},fe=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[t*2]=0;for(t=0;t<30;t++)e.dyn_dtree[t*2]=0;for(t=0;t<19;t++)e.bl_tree[t*2]=0;e.dyn_ltree[256*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},pe=e=>{e.bi_valid>8?M(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},me=(e,t,n,r)=>{let i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},he=(e,t,n)=>{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&me(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!me(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},ge=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?P(e,i,t):(o=A[i],P(e,o+256+1,t),s=C[o],s!==0&&(i-=j[o],N(e,i,s)),r--,o=oe(r),P(e,o,n),s=w[o],s!==0&&(r-=ee[o],N(e,r,s)));while(a<e.sym_next);P(e,256,t)},_e=(e,t)=>{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=573,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)he(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],he(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,he(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],le(e,t),ue(n,c,e.bl_count)},ve=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[34]++:e.bl_tree[36]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[32]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},ye=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do P(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(P(e,17,e.bl_tree),N(e,s-3,3)):(P(e,18,e.bl_tree),N(e,s-11,7)):(a!==i&&(P(e,a,e.bl_tree),s--),P(e,16,e.bl_tree),N(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},be=e=>{let t;for(ve(e,e.dyn_ltree,e.l_desc.max_code),ve(e,e.dyn_dtree,e.d_desc.max_code),_e(e,e.bl_desc),t=18;t>=3&&e.bl_tree[E[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},xe=(e,t,n,r)=>{let i;for(N(e,t-257,5),N(e,n-1,5),N(e,r-4,4),i=0;i<r;i++)N(e,e.bl_tree[E[i]*2+1],3);ye(e,e.dyn_ltree,t-1),ye(e,e.dyn_dtree,n-1)},Se=e=>{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[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return 1;for(n=32;n<256;n++)if(e.dyn_ltree[n*2]!==0)return 1;return 0};let Ce=!1;const we=e=>{Ce||=(de(),!0),e.l_desc=new ae(e.dyn_ltree,ne),e.d_desc=new ae(e.dyn_dtree,re),e.bl_desc=new ae(e.bl_tree,ie),e.bi_buf=0,e.bi_valid=0,fe(e)},F=(e,t,n,r)=>{N(e,0+ +!!r,3),pe(e),M(e,n),M(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n};var Te={_tr_init:we,_tr_stored_block:F,_tr_flush_block:(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=Se(e)),_e(e,e.l_desc),_e(e,e.d_desc),o=be(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?F(e,t,n,r):e.strategy===4||a===i?(N(e,2+ +!!r,3),ge(e,D,O)):(N(e,4+ +!!r,3),xe(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),ge(e,e.dyn_ltree,e.dyn_dtree)),fe(e),r&&pe(e)},_tr_tally:(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[(A[n]+256+1)*2]++,e.dyn_dtree[oe(t)*2]++),e.sym_next===e.sym_end),_tr_align:e=>{N(e,2,3),P(e,256,D),ce(e)}},Ee=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0};const I=new Uint32Array((()=>{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})());var L=(e,t,n,r)=>{let i=I,a=r+n;e^=-1;for(let n=r;n<a;n++)e=e>>>8^i[(e^t[n])&255];return e^-1},De={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`},Oe={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};const{_tr_init:ke,_tr_stored_block:Ae,_tr_flush_block:je,_tr_tally:Me,_tr_align:Ne}=Te,{Z_NO_FLUSH:Pe,Z_PARTIAL_FLUSH:Fe,Z_FULL_FLUSH:Ie,Z_FINISH:R,Z_BLOCK:Le,Z_OK:z,Z_STREAM_END:Re,Z_STREAM_ERROR:B,Z_DATA_ERROR:ze,Z_BUF_ERROR:Be,Z_DEFAULT_COMPRESSION:Ve,Z_FILTERED:He,Z_HUFFMAN_ONLY:Ue,Z_RLE:We,Z_FIXED:Ge,Z_DEFAULT_STRATEGY:Ke,Z_UNKNOWN:qe,Z_DEFLATED:Je}=Oe,Ye=(e,t)=>(e.msg=De[t],t),Xe=e=>e*2-(e>4?9:0),V=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Ze=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)};let Qe=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const H=e=>{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))},U=(e,t)=>{je(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,H(e.strm)},W=(e,t)=>{e.pending_buf[e.pending++]=t},$e=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},et=(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=Ee(e.adler,t,i,n):e.state.wrap===2&&(e.adler=L(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},tt=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+258,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,l[i+o]!==m||l[i+o-1]!==p||l[i]!==l[r]||l[++i]!==l[r+1])continue;r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=258-(f-r),r=f-258,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},nt=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-262)&&(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),Ze(e),r+=t),e.strm.avail_in===0)break;if(n=et(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Qe(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Qe(e,e.ins_h,e.window[i+3-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<3)););}while(e.lookahead<262&&e.strm.avail_in!==0)},rt=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==R||t===Pe||r!==i+e.strm.avail_in)))break;o=+(t===R&&r===i+e.strm.avail_in),Ae(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,H(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&&(et(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(o===0);return s-=e.strm.avail_in,s&&(s>=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<=s&&(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-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?4:t!==Pe&&t!==R&&e.strm.avail_in===0&&e.strstart===e.block_start?2:(a=e.window_size-e.strstart,e.strm.avail_in>a&&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++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(et(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===R)&&t!==Pe&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=+(t===R&&e.strm.avail_in===0&&r===i),Ae(e,e.block_start,r,o),e.block_start+=r,H(e.strm)),o?3:1)},it=(e,t)=>{let n,r;for(;;){if(e.lookahead<262){if(nt(e),e.lookahead<262&&t===Pe)return 1;if(e.lookahead===0)break}if(n=0,e.lookahead>=3&&(e.ins_h=Qe(e,e.ins_h,e.window[e.strstart+3-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-262&&(e.match_length=tt(e,n)),e.match_length>=3)if(r=Me(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do e.strstart++,e.ins_h=Qe(e,e.ins_h,e.window[e.strstart+3-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=Qe(e,e.ins_h,e.window[e.strstart+1]);else r=Me(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(U(e,!1),e.strm.avail_out===0))return 1}return e.insert=e.strstart<2?e.strstart:2,t===R?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2},at=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<262){if(nt(e),e.lookahead<262&&t===Pe)return 1;if(e.lookahead===0)break}if(n=0,e.lookahead>=3&&(e.ins_h=Qe(e,e.ins_h,e.window[e.strstart+3-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=2,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=tt(e,n),e.match_length<=5&&(e.strategy===He||e.match_length===3&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=Me(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=Qe(e,e.ins_h,e.window[e.strstart+3-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=2,e.strstart++,r&&(U(e,!1),e.strm.avail_out===0))return 1}else if(e.match_available){if(r=Me(e,0,e.window[e.strstart-1]),r&&U(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=Me(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<2?e.strstart:2,t===R?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2},ot=(e,t)=>{let n,r,i,a,o=e.window;for(;;){if(e.lookahead<=258){if(nt(e),e.lookahead<=258&&t===Pe)return 1;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+258;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=258-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=Me(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Me(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(U(e,!1),e.strm.avail_out===0))return 1}return e.insert=0,t===R?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2},st=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(nt(e),e.lookahead===0)){if(t===Pe)return 1;break}if(e.match_length=0,n=Me(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(U(e,!1),e.strm.avail_out===0))return 1}return e.insert=0,t===R?(U(e,!0),e.strm.avail_out===0?3:4):e.sym_next&&(U(e,!1),e.strm.avail_out===0)?1:2};function G(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const ct=[new G(0,0,0,0,rt),new G(4,4,8,4,it),new G(4,5,16,8,it),new G(4,6,32,32,it),new G(4,4,16,16,at),new G(8,16,32,32,at),new G(8,16,128,128,at),new G(8,32,128,256,at),new G(32,128,258,1024,at),new G(32,258,258,4096,at)],lt=e=>{e.window_size=2*e.w_size,V(e.head),e.max_lazy_match=ct[e.level].max_lazy,e.good_match=ct[e.level].good_length,e.nice_match=ct[e.level].nice_length,e.max_chain_length=ct[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0};function ut(){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=Je,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(573*2),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(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}const dt=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.status!==42&&t.status!==57&&t.status!==69&&t.status!==73&&t.status!==91&&t.status!==103&&t.status!==113&&t.status!==666)},ft=e=>{if(dt(e))return Ye(e,B);e.total_in=e.total_out=0,e.data_type=qe;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?57:t.wrap?42:113,e.adler=t.wrap===2?0:1,t.last_flush=-2,ke(t),z},pt=e=>{let t=ft(e);return t===z&<(e.state),t},mt=(e,t)=>dt(e)||e.state.wrap!==2?B:(e.state.gzhead=t,z),ht=(e,t,n,r,i,a)=>{if(!e)return B;let o=1;if(t===Ve&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>9||n!==Je||r<8||r>15||t<0||t>9||a<0||a>Ge||r===8&&o!==1)return Ye(e,B);r===8&&(r=9);let s=new ut;return e.state=s,s.strm=e,s.status=42,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+3-1)/3),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=a,s.method=n,pt(e)};var gt={deflateInit:(e,t)=>ht(e,t,Je,15,8,Ke),deflateInit2:ht,deflateReset:pt,deflateResetKeep:ft,deflateSetHeader:mt,deflate:(e,t)=>{if(dt(e)||t>Le||t<0)return e?Ye(e,B):B;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===666&&t!==R)return Ye(e,e.avail_out===0?Be:B);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(H(e),e.avail_out===0)return n.last_flush=-1,z}else if(e.avail_in===0&&Xe(t)<=Xe(r)&&t!==R)return Ye(e,Be);if(n.status===666&&e.avail_in!==0)return Ye(e,Be);if(n.status===42&&n.wrap===0&&(n.status=113),n.status===42){let t=Je+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=Ue||n.level<2?0:n.level<6?1:n.level===6?2:3,t|=r<<6,n.strstart!==0&&(t|=32),t+=31-t%31,$e(n,t),n.strstart!==0&&($e(n,e.adler>>>16),$e(n,e.adler&65535)),e.adler=1,n.status=113,H(e),n.pending!==0)return n.last_flush=-1,z}if(n.status===57){if(e.adler=0,W(n,31),W(n,139),W(n,8),n.gzhead)W(n,+!!n.gzhead.text+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),W(n,n.gzhead.time&255),W(n,n.gzhead.time>>8&255),W(n,n.gzhead.time>>16&255),W(n,n.gzhead.time>>24&255),W(n,n.level===9?2:n.strategy>=Ue||n.level<2?4:0),W(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(W(n,n.gzhead.extra.length&255),W(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=L(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(W(n,0),W(n,0),W(n,0),W(n,0),W(n,0),W(n,n.level===9?2:n.strategy>=Ue||n.level<2?4:0),W(n,3),n.status=113,H(e),n.pending!==0)return n.last_flush=-1,z}if(n.status===69){if(n.gzhead.extra){let t=n.pending,r=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=L(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,H(e),n.pending!==0)return n.last_flush=-1,z;t=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=L(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=73}if(n.status===73){if(n.gzhead.name){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=L(e.adler,n.pending_buf,n.pending-t,t)),H(e),n.pending!==0)return n.last_flush=-1,z;t=0}r=n.gzindex<n.gzhead.name.length?n.gzhead.name.charCodeAt(n.gzindex++)&255:0,W(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=L(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=91}if(n.status===91){if(n.gzhead.comment){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=L(e.adler,n.pending_buf,n.pending-t,t)),H(e),n.pending!==0)return n.last_flush=-1,z;t=0}r=n.gzindex<n.gzhead.comment.length?n.gzhead.comment.charCodeAt(n.gzindex++)&255:0,W(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=L(e.adler,n.pending_buf,n.pending-t,t))}n.status=103}if(n.status===103){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(H(e),n.pending!==0))return n.last_flush=-1,z;W(n,e.adler&255),W(n,e.adler>>8&255),e.adler=0}if(n.status=113,H(e),n.pending!==0)return n.last_flush=-1,z}if(e.avail_in!==0||n.lookahead!==0||t!==Pe&&n.status!==666){let r=n.level===0?rt(n,t):n.strategy===Ue?st(n,t):n.strategy===We?ot(n,t):ct[n.level].func(n,t);if((r===3||r===4)&&(n.status=666),r===1||r===3)return e.avail_out===0&&(n.last_flush=-1),z;if(r===2&&(t===Fe?Ne(n):t!==Le&&(Ae(n,0,0,!1),t===Ie&&(V(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),H(e),e.avail_out===0))return n.last_flush=-1,z}return t===R?n.wrap<=0?Re:(n.wrap===2?(W(n,e.adler&255),W(n,e.adler>>8&255),W(n,e.adler>>16&255),W(n,e.adler>>24&255),W(n,e.total_in&255),W(n,e.total_in>>8&255),W(n,e.total_in>>16&255),W(n,e.total_in>>24&255)):($e(n,e.adler>>>16),$e(n,e.adler&65535)),H(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending===0?Re:z):z},deflateEnd:e=>{if(dt(e))return B;let t=e.state.status;return e.state=null,t===113?Ye(e,ze):z},deflateSetDictionary:(e,t)=>{let n=t.length;if(dt(e))return B;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==42||r.lookahead)return B;if(i===1&&(e.adler=Ee(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(V(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}let a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,nt(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do r.ins_h=Qe(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++;while(--t);r.strstart=e,r.lookahead=2,nt(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,z},deflateInfo:`pako deflate (from Nodeca project)`};const _t=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var vt={assign:function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!=`object`)throw TypeError(n+`must be non-object`);for(let t in n)_t(n,t)&&(e[t]=n[t])}}return e},flattenChunks:e=>{let t=0;for(let n=0,r=e.length;n<r;n++)t+=e[n].length;let n=new Uint8Array(t);for(let t=0,r=0,i=e.length;t<i;t++){let i=e[t];n.set(i,r),r+=i.length}return n}};let yt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{yt=!1}const bt=new Uint8Array(256);for(let e=0;e<256;e++)bt[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;bt[254]=bt[254]=1;var xt=e=>{if(typeof TextEncoder==`function`&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t};const St=(e,t)=>{if(t<65534&&e.subarray&&yt)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n=``;for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n};var Ct={string2buf:xt,buf2string:(e,t)=>{let n=t||e.length;if(typeof TextDecoder==`function`&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,a=Array(n*2);for(i=0,r=0;r<n;){let t=e[r++];if(t<128){a[i++]=t;continue}let o=bt[t];if(o>4){a[i++]=65533,r+=o-1;continue}for(t&=o===2?31:o===3?15:7;o>1&&r<n;)t=t<<6|e[r++]&63,o--;if(o>1){a[i++]=65533;continue}t<65536?a[i++]=t:(t-=65536,a[i++]=55296|t>>10&1023,a[i++]=56320|t&1023)}return St(a,i)},utf8border:(e,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+bt[e[n]]>t?n:t}};function wt(){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 Tt=wt;const Et=Object.prototype.toString,{Z_NO_FLUSH:Dt,Z_SYNC_FLUSH:Ot,Z_FULL_FLUSH:kt,Z_FINISH:At,Z_OK:jt,Z_STREAM_END:Mt,Z_DEFAULT_COMPRESSION:Nt,Z_DEFAULT_STRATEGY:Pt,Z_DEFLATED:Ft}=Oe;function It(e){this.options=vt.assign({level:Nt,method:Ft,chunkSize:16384,windowBits:15,memLevel:8,strategy:Pt},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 Tt,this.strm.avail_out=0;let n=gt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==jt)throw Error(De[n]);if(t.header&>.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e=typeof t.dictionary==`string`?Ct.string2buf(t.dictionary):Et.call(t.dictionary)===`[object ArrayBuffer]`?new Uint8Array(t.dictionary):t.dictionary,n=gt.deflateSetDictionary(this.strm,e),n!==jt)throw Error(De[n]);this._dict_set=!0}}It.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;for(a=t===~~t?t:t===!0?At:Dt,typeof e==`string`?n.input=Ct.string2buf(e):Et.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),(a===Ot||a===kt)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=gt.deflate(n,a),i===Mt)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=gt.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===jt;if(n.avail_out===0){this.onData(n.output);continue}if(a>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},It.prototype.onData=function(e){this.chunks.push(e)},It.prototype.onEnd=function(e){e===jt&&(this.result=vt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Lt(e,t){let n=new It(t);if(n.push(e,!0),n.err)throw n.msg||De[n.err];return n.result}function Rt(e,t){return t||={},t.raw=!0,Lt(e,t)}function zt(e,t){return t||={},t.gzip=!0,Lt(e,t)}var Bt={Deflate:It,deflate:Lt,deflateRaw:Rt,gzip:zt,constants:Oe};const Vt=16209;var Ht=function(e,t){let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E=e.state;n=e.next_in,w=e.input,r=n+(e.avail_in-5),i=e.next_out,T=e.output,a=i-(t-e.avail_out),o=i+(e.avail_out-257),s=E.dmax,c=E.wsize,l=E.whave,u=E.wnext,d=E.window,f=E.hold,p=E.bits,m=E.lencode,h=E.distcode,g=(1<<E.lenbits)-1,_=(1<<E.distbits)-1;top:do{p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=m[f&g];dolen:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y===0)T[i++]=v&65535;else if(y&16){b=v&65535,y&=15,y&&(p<y&&(f+=w[n++]<<p,p+=8),b+=f&(1<<y)-1,f>>>=y,p-=y),p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=h[f&_];dodist:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y&16){if(x=v&65535,y&=15,p<y&&(f+=w[n++]<<p,p+=8,p<y&&(f+=w[n++]<<p,p+=8)),x+=f&(1<<y)-1,x>s){e.msg=`invalid distance too far back`,E.mode=Vt;break top}if(f>>>=y,p-=y,y=i-a,x>y){if(y=x-y,y>l&&E.sane){e.msg=`invalid distance too far back`,E.mode=Vt;break top}if(S=0,C=d,u===0){if(S+=c-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}else if(u<y){if(S+=c+u-y,y-=u,y<b){b-=y;do T[i++]=d[S++];while(--y);if(S=0,u<b){y=u,b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}}else if(S+=u-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}for(;b>2;)T[i++]=C[S++],T[i++]=C[S++],T[i++]=C[S++],b-=3;b&&(T[i++]=C[S++],b>1&&(T[i++]=C[S++]))}else{S=i-x;do T[i++]=T[S++],T[i++]=T[S++],T[i++]=T[S++],b-=3;while(b>2);b&&(T[i++]=T[S++],b>1&&(T[i++]=T[S++]))}}else if(y&64){e.msg=`invalid distance code`,E.mode=Vt;break top}else{v=h[(v&65535)+(f&(1<<y)-1)];continue dodist}break}}else if(!(y&64)){v=m[(v&65535)+(f&(1<<y)-1)];continue dolen}else if(y&32){E.mode=16191;break top}else{e.msg=`invalid literal/length code`,E.mode=Vt;break top}break}}while(n<r&&i<o);b=p>>3,n-=b,p-=b<<3,f&=(1<<p)-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?5+(r-n):5-(n-r),e.avail_out=i<o?257+(o-i):257-(i-o),E.hold=f,E.bits=p};const Ut=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Wt=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Gt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Kt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var qt=(e,t,n,r,i,a,o,s)=>{let c=s.bits,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0,y,b,x,S,C,w=null,T,E=new Uint16Array(16),D=new Uint16Array(16),O=null,k,A,j;for(l=0;l<=15;l++)E[l]=0;for(u=0;u<r;u++)E[t[n+u]]++;for(p=c,f=15;f>=1&&E[f]===0;f--);if(p>f&&(p=f),f===0)return i[a++]=20971520,i[a++]=20971520,s.bits=1,0;for(d=1;d<f&&E[d]===0;d++);for(p<d&&(p=d),g=1,l=1;l<=15;l++)if(g<<=1,g-=E[l],g<0)return-1;if(g>0&&(e===0||f!==1))return-1;for(D[1]=0,l=1;l<15;l++)D[l+1]=D[l]+E[l];for(u=0;u<r;u++)t[n+u]!==0&&(o[D[t[n+u]]++]=u);if(e===0?(w=O=o,T=20):e===1?(w=Ut,O=Wt,T=257):(w=Gt,O=Kt,T=0),v=0,u=0,l=d,C=a,m=p,h=0,x=-1,_=1<<p,S=_-1,e===1&&_>852||e===2&&_>592)return 1;for(;;){k=l-h,o[u]+1<T?(A=0,j=o[u]):o[u]>=T?(A=O[o[u]-T],j=w[o[u]-T]):(A=96,j=0),y=1<<l-h,b=1<<m,d=b;do b-=y,i[C+(v>>h)+b]=k<<24|A<<16|j|0;while(b!==0);for(y=1<<l-1;v&y;)y>>=1;if(y===0?v=0:(v&=y-1,v+=y),u++,--E[l]===0){if(l===f)break;l=t[n+o[u]]}if(l>p&&(v&S)!==x){for(h===0&&(h=p),C+=d,m=l-h,g=1<<m;m+h<f&&(g-=E[m+h],!(g<=0));)m++,g<<=1;if(_+=1<<m,e===1&&_>852||e===2&&_>592)return 1;x=v&S,i[x]=p<<24|m<<16|C-a|0}}return v!==0&&(i[C+v]=l-h<<24|4194304),s.bits=p,0};const{Z_FINISH:Jt,Z_BLOCK:Yt,Z_TREES:Xt,Z_OK:Zt,Z_STREAM_END:Qt,Z_NEED_DICT:$t,Z_STREAM_ERROR:K,Z_DATA_ERROR:en,Z_MEM_ERROR:tn,Z_BUF_ERROR:nn,Z_DEFLATED:rn}=Oe,an=16180,on=16181,sn=16182,cn=16183,ln=16184,un=16185,dn=16186,fn=16187,pn=16188,mn=16189,hn=16190,q=16191,gn=16192,_n=16193,vn=16194,yn=16195,bn=16196,xn=16197,Sn=16198,Cn=16199,wn=16200,Tn=16201,En=16202,Dn=16203,On=16204,kn=16205,An=16206,jn=16207,Mn=16208,J=16209,Nn=16210,Pn=16211,Fn=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function In(){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}const Ln=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.mode<an||t.mode>Pn)},Rn=e=>{if(Ln(e))return K;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=an,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(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Zt},zn=e=>{if(Ln(e))return K;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Rn(e)},Bn=(e,t)=>{let n;if(Ln(e))return K;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?K:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,zn(e))},Vn=(e,t)=>{if(!e)return K;let n=new In;e.state=n,n.strm=e,n.window=null,n.mode=an;let r=Bn(e,t);return r!==Zt&&(e.state=null),r},Hn=e=>Vn(e,15);let Un=!0,Wn,Gn;const Kn=e=>{if(Un){Wn=new Int32Array(512),Gn=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(qt(1,e.lens,0,288,Wn,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;qt(2,e.lens,0,32,Gn,0,e.work,{bits:5}),Un=!1}e.lencode=Wn,e.lenbits=9,e.distcode=Gn,e.distbits=5},qn=(e,t,n,r)=>{let i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0};var Y={inflateReset:zn,inflateReset2:Bn,inflateResetKeep:Rn,inflateInit:Hn,inflateInit2:Vn,inflate:(e,t)=>{let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g=0,_,v,y,b,x,S,C,w,T=new Uint8Array(4),E,D,O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ln(e)||!e.output||!e.input&&e.avail_in!==0)return K;n=e.state,n.mode===q&&(n.mode=gn),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,d=s,f=c,w=Zt;inf_leave:for(;;)switch(n.mode){case an:if(n.wrap===0){n.mode=gn;break}for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,T[0]=l&255,T[1]=l>>>8&255,n.check=L(n.check,T,2,0),l=0,u=0,n.mode=on;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg=`incorrect header check`,n.mode=J;break}if((l&15)!==rn){e.msg=`unknown compression method`,n.mode=J;break}if(l>>>=4,u-=4,C=(l&15)+8,n.wbits===0&&(n.wbits=C),C>15||C>n.wbits){e.msg=`invalid window size`,n.mode=J;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?mn:q,l=0,u=0;break;case on:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==rn){e.msg=`unknown compression method`,n.mode=J;break}if(n.flags&57344){e.msg=`unknown header flags set`,n.mode=J;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=L(n.check,T,2,0)),l=0,u=0,n.mode=sn;case sn:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,T[2]=l>>>16&255,T[3]=l>>>24&255,n.check=L(n.check,T,4,0)),l=0,u=0,n.mode=cn;case cn:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=L(n.check,T,2,0)),l=0,u=0,n.mode=ln;case ln:if(n.flags&1024){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=L(n.check,T,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=un;case un:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+p),C)),n.flags&512&&n.wrap&4&&(n.check=L(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break inf_leave;n.length=0,n.mode=dn;case dn:if(n.flags&2048){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=L(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.name=null);n.length=0,n.mode=fn;case fn:if(n.flags&4096){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=L(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.comment=null);n.mode=pn;case pn:if(n.flags&512){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg=`header crc mismatch`,n.mode=J;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=q;break;case mn:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=Fn(l),l=0,u=0,n.mode=hn;case hn:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,$t;e.adler=n.check=1,n.mode=q;case q:if(t===Yt||t===Xt)break inf_leave;case gn:if(n.last){l>>>=u&7,u-=u&7,n.mode=An;break}for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,--u,l&3){case 0:n.mode=_n;break;case 1:if(Kn(n),n.mode=Cn,t===Xt){l>>>=2,u-=2;break inf_leave}break;case 2:n.mode=bn;break;case 3:e.msg=`invalid block type`,n.mode=J}l>>>=2,u-=2;break;case _n:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if((l&65535)!=(l>>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=J;break}if(n.length=l&65535,l=0,u=0,n.mode=vn,t===Xt)break inf_leave;case vn:n.mode=yn;case yn:if(p=n.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break inf_leave;i.set(r.subarray(a,a+p),o),s-=p,a+=p,c-=p,o+=p,n.length-=p;break}n.mode=q;break;case bn:for(;u<14;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg=`too many length or distance symbols`,n.mode=J;break}n.have=0,n.mode=xn;case xn:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.lens[O[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[O[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},w=qt(0,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid code lengths set`,n.mode=J;break}n.have=0,n.mode=Sn;case Sn:for(;n.have<n.nlen+n.ndist;){for(;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(y<16)l>>>=_,u-=_,n.lens[n.have++]=y;else{if(y===16){for(D=_+2;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(l>>>=_,u-=_,n.have===0){e.msg=`invalid bit length repeat`,n.mode=J;break}C=n.lens[n.have-1],p=3+(l&3),l>>>=2,u-=2}else if(y===17){for(D=_+3;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=3+(l&7),l>>>=3,u-=3}else{for(D=_+7;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=11+(l&127),l>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=J;break}for(;p--;)n.lens[n.have++]=C}}if(n.mode===J)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=J;break}if(n.lenbits=9,E={bits:n.lenbits},w=qt(1,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid literal/lengths set`,n.mode=J;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},w=qt(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,w){e.msg=`invalid distances set`,n.mode=J;break}if(n.mode=Cn,t===Xt)break inf_leave;case Cn:n.mode=wn;case wn:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,Ht(e,f),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===q&&(n.back=-1);break}for(n.back=0;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(v&&!(v&240)){for(b=_,x=v,S=y;g=n.lencode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,n.length=y,v===0){n.mode=kn;break}if(v&32){n.back=-1,n.mode=q;break}if(v&64){e.msg=`invalid literal/length code`,n.mode=J;break}n.extra=v&15,n.mode=Tn;case Tn:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=En;case En:for(;g=n.distcode[l&(1<<n.distbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(!(v&240)){for(b=_,x=v,S=y;g=n.distcode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,v&64){e.msg=`invalid distance code`,n.mode=J;break}n.offset=y,n.extra=v&15,n.mode=Dn;case Dn:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=J;break}n.mode=On;case On:if(c===0)break inf_leave;if(p=f-c,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=J;break}p>n.wnext?(p-=n.wnext,m=n.wsize-p):m=n.wnext-p,p>n.length&&(p=n.length),h=n.window}else h=i,m=o-n.offset,p=n.length;p>c&&(p=c),c-=p,n.length-=p;do i[o++]=h[m++];while(--p);n.length===0&&(n.mode=wn);break;case kn:if(c===0)break inf_leave;i[o++]=n.length,c--,n.mode=wn;break;case An:if(n.wrap){for(;u<32;){if(s===0)break inf_leave;s--,l|=r[a++]<<u,u+=8}if(f-=c,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?L(n.check,i,f,o-f):Ee(n.check,i,f,o-f)),f=c,n.wrap&4&&(n.flags?l:Fn(l))!==n.check){e.msg=`incorrect data check`,n.mode=J;break}l=0,u=0}n.mode=jn;case jn:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg=`incorrect length check`,n.mode=J;break}l=0,u=0}n.mode=Mn;case Mn:w=Qt;break inf_leave;case J:w=en;break inf_leave;case Nn:return tn;case Pn:default:return K}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||f!==e.avail_out&&n.mode<J&&(n.mode<An||t!==Jt))&&qn(e,e.output,e.next_out,f-e.avail_out),d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?L(n.check,i,f,e.next_out-f):Ee(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===q?128:0)+(n.mode===Cn||n.mode===vn?256:0),(d===0&&f===0||t===Jt)&&w===Zt&&(w=nn),w},inflateEnd:e=>{if(Ln(e))return K;let t=e.state;return t.window&&=null,e.state=null,Zt},inflateGetHeader:(e,t)=>{if(Ln(e))return K;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,Zt):K},inflateSetDictionary:(e,t)=>{let n=t.length,r,i,a;return Ln(e)||(r=e.state,r.wrap!==0&&r.mode!==hn)?K:r.mode===hn&&(i=1,i=Ee(i,t,n,0),i!==r.check)?en:(a=qn(e,t,n,n),a?(r.mode=Nn,tn):(r.havedict=1,Zt))},inflateInfo:`pako inflate (from Nodeca project)`};function Jn(){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 Yn=Jn;const Xn=Object.prototype.toString,{Z_NO_FLUSH:Zn,Z_FINISH:Qn,Z_OK:$n,Z_STREAM_END:er,Z_NEED_DICT:tr,Z_STREAM_ERROR:nr,Z_DATA_ERROR:rr,Z_MEM_ERROR:ir}=Oe;function ar(e){this.options=vt.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 Tt,this.strm.avail_out=0;let n=Y.inflateInit2(this.strm,t.windowBits);if(n!==$n||(this.header=new Yn,Y.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary==`string`?t.dictionary=Ct.string2buf(t.dictionary):Xn.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=Y.inflateSetDictionary(this.strm,t.dictionary),n!==$n))))throw Error(De[n])}ar.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,o,s;if(this.ended)return!1;for(o=t===~~t?t:t===!0?Qn:Zn,Xn.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),a=Y.inflate(n,o),a===tr&&i&&(a=Y.inflateSetDictionary(n,i),a===$n?a=Y.inflate(n,o):a===rr&&(a=tr));n.avail_in>0&&a===er&&n.state.wrap>0&&e[n.next_in]!==0;)Y.inflateReset(n),a=Y.inflate(n,o);switch(a){case nr:case rr:case tr:case ir:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===er))if(this.options.to===`string`){let e=Ct.utf8border(n.output,n.next_out),t=n.next_out-e,i=Ct.buf2string(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(a===$n&&s===0)){if(a===er)return a=Y.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},ar.prototype.onData=function(e){this.chunks.push(e)},ar.prototype.onEnd=function(e){e===$n&&(this.options.to===`string`?this.result=this.chunks.join(``):this.result=vt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function or(e,t){let n=new ar(t);if(n.push(e),n.err)throw n.msg||De[n.err];return n.result}function sr(e,t){return t||={},t.raw=!0,or(e,t)}var cr={Inflate:ar,inflate:or,inflateRaw:sr,ungzip:or,constants:Oe};const{Deflate:lr,deflate:ur,deflateRaw:dr,gzip:fr}=Bt,{Inflate:pr,inflate:mr,inflateRaw:hr,ungzip:gr}=cr;var _r=ur,vr=dr,yr=fr,br=mr,xr=hr,Sr=gr;function Cr(e){let t=[],n={},r=[],i=(e,t)=>{if(e in n){let r=n[e];Array.isArray(r)?r.push(String(t)):n[e]=[String(r),String(t)]}else n[e]=t},a=2;for(;a<e.length;){let n=e[a];if(n===`--`){r.push(...e.slice(a+1));break}if(n.startsWith(`--`)){let t=n.slice(2),r=t.indexOf(`=`);if(r!==-1){i(t.slice(0,r),t.slice(r+1)),a++;continue}let o=e[a+1];if(o!==void 0&&!o.startsWith(`-`)){i(t,o),a+=2;continue}i(t,!0),a++;continue}if(n.startsWith(`-`)&&n.length>1){for(let e of n.slice(1))i(e,!0);a++;continue}t.push(n),a++}return{positional:t,flags:n,subcommand:t.length>0&&/^[a-z][\w-]*$/i.test(t[0])?t[0]:null,passthrough:r}}function wr(e){let t=[...e];return Object.defineProperty(t,"parseFlags",{value:()=>Cr(t),enumerable:!1,writable:!1,configurable:!1}),t}function Tr(e){let t=e=>{if(typeof e==`string`)return e;if(e instanceof Error)return e.message;if(e==null)return String(e);try{return JSON.stringify(e)}catch{return String(e)}},n=(e,t,n)=>t===void 0?`${e(`Error:`)} ${n}\n`:t===``?`${e(n)}\n`:`${e(`${t}:`)} ${n}\n`,r=(t,n)=>t===void 0?`${e.color.yellow(`Warning:`)} ${n}\n`:t===``?`${e.color.yellow(n)}\n`:`${e.color.yellow(`${t}:`)} ${n}\n`;return{die(r,i){let a=typeof i==`number`?i:i?.exitCode??1,o=typeof i==`object`&&i&&`prefix`in i?i.prefix:void 0,s=t(r);throw e.writeStderr(n(e.color.red,o,s)),e.exit(a),Error(`unreachable`)},out(t){if(typeof t==`string`){e.writeStdout(t.endsWith(`
|
|
41
41
|
`)?t:`${t}\n`);return}try{e.writeStdout(`${JSON.stringify(t,null,2)}\n`)}catch{e.writeStdout(`${String(t)}\n`)}},warn(n,i){let a=typeof i==`object`&&i&&`prefix`in i?i.prefix:void 0;e.writeStderr(r(a,t(n)))},help(t){throw e.writeStdout(t.endsWith(`
|
|
42
42
|
`)?t:`${t}\n`),e.exit(0),Error(`unreachable`)}}}const Er={reset:`\x1B[0m`,green:`\x1B[32m`,red:`\x1B[31m`,yellow:`\x1B[33m`,gray:`\x1B[90m`,bold:`\x1B[1m`,cyan:`\x1B[36m`,dim:`\x1B[2m`};function Dr(e){let t=e.isTTY&&!e.noColor,n=e=>n=>t?`${e}${n}${Er.reset}`:String(n);return{enabled:t,green:n(Er.green),red:n(Er.red),yellow:n(Er.yellow),gray:n(Er.gray),bold:n(Er.bold),cyan:n(Er.cyan),dim:n(Er.dim)}}const Or={ms:1,s:1e3,m:6e4,h:36e5,d:864e5,w:6048e5,M:26298e5,y:315576e5};function kr(e){if(typeof e==`number`&&Number.isFinite(e))return Math.trunc(e);if(typeof e!=`string`)throw TypeError(`time.parseDuration: spec must be string or number`);let t=e.trim(),n=/^([0-9]+(?:\.[0-9]+)?)\s*(ms|s|m|h|d|w|M|y)?$/.exec(t);if(!n)throw RangeError(`time.parseDuration: unrecognized spec "${e}"`);let r=Number(n[1]),i=n[2]??`ms`;return Math.trunc(r*Or[i])}function Ar(e){return e<10?`0${e}`:String(e)}const jr={parseDuration:kr,ago(e,t=new Date){return new Date(t.getTime()-kr(e))},range(e,t=new Date){let n=new Date(t.getTime());return{start:new Date(n.getTime()-kr(e)),end:n}},future(e,t=new Date){let n=new Date(t.getTime());return{start:n,end:new Date(n.getTime()+kr(e))}},gmailDate(e,t=new Date){let n=new Date(t.getTime()-kr(e));return`${n.getFullYear()}/${Ar(n.getMonth()+1)}/${Ar(n.getDate())}`}},Mr=/\u001b\[[0-9;]*m/g;function Nr(e){return e.replace(Mr,``)}function Pr(e){return Nr(e).length}function Fr(e,t){let n=String(e??``);return t<=0?``:Pr(n)<=t?n:t<=1?n.slice(0,t):`${Nr(n).slice(0,t-1)}…`}function Ir(e,t){let n=String(e??``),r=Pr(n);return r===t?n:r>t?Fr(n,t):n+` `.repeat(t-r)}function Lr(e,t){if(!e.length)return``;let n=Math.max(...e.map(e=>e.length)),r=[];for(let i=0;i<n;i++)if(t&&t[i]!==void 0)r[i]=t[i];else{let t=0;for(let n of e){let e=i<n.length?String(n[i]??``):``;t=Math.max(t,Pr(e))}r[i]=t}return e.map(e=>r.map((t,n)=>Ir(n<e.length?String(e[n]??``):``,t)).join(` `).replace(/\s+$/,``)).join(`
|
|
43
43
|
`)}function Rr(e){return e instanceof Date?e:new Date(e)}function zr(e,t=`short`){let n=Rr(e);if(Number.isNaN(n.getTime()))return String(e);if(t===`iso`)return n.toISOString();if(t===`locale`)return new Intl.DateTimeFormat(void 0,{dateStyle:`medium`}).format(n);if(t===`human`){let e=Date.now()-n.getTime(),t=Math.abs(e);if(t<6e4)return e>=0?`just now`:`in a moment`;let r=(t,n)=>e>=0?`${t} ${n}${t===1?``:`s`} ago`:`in ${t} ${n}${t===1?``:`s`}`;return t<36e5?r(Math.round(t/6e4),`minute`):t<864e5?r(Math.round(t/36e5),`hour`):t<26298e5?r(Math.round(t/864e5),`day`):t<315576e5?r(Math.round(t/26298e5),`month`):r(Math.round(t/315576e5),`year`)}return`${n.getFullYear()}-${Ar(n.getMonth()+1)}-${Ar(n.getDate())}`}const Br={trunc:Fr,col:Ir,table:Lr,date:zr},Vr=async(e,t,n)=>{let r=Math.max(1,Math.trunc(e)||1),i=Array(t.length),a=0,o=[],s=async()=>{for(;;){let e=a++;if(e>=t.length)return;i[e]=await n(t[e],e)}};for(let e=0;e<Math.min(r,t.length);e++)o.push(s());return await Promise.all(o),i};function Hr(e,t){let n=[];for(let r of e)r===``||r===`.`||(r===`..`?n.length>0&&n[n.length-1]!==`..`?n.pop():t&&n.push(`..`):n.push(r));return n}function Ur(e){if(e.length===0)return`.`;let t=e.charCodeAt(0)===47,n=e.charCodeAt(e.length-1)===47,r=Hr(e.split(`/`),!t).join(`/`);return r.length===0&&!t&&(r=`.`),r.length>0&&n&&(r+=`/`),(t?`/`:``)+r}function Wr(...e){let t=e.filter(e=>typeof e==`string`&&e.length>0).join(`/`);return t.length===0?`.`:Ur(t)}function Gr(e){if(e.length===0)return`.`;let t=e.charCodeAt(0)===47,n=-1,r=!0;for(let t=e.length-1;t>=1;t--)if(e.charCodeAt(t)===47){if(!r){n=t;break}}else r=!1;return n===-1?t?`/`:`.`:t&&n===1?`//`:e.slice(0,n)}function Kr(e,t){let n=0,r=-1,i=!0;for(let t=e.length-1;t>=0;t--)if(e.charCodeAt(t)===47){if(!i){n=t+1;break}}else r===-1&&(i=!1,r=t+1);let a=r===-1?``:e.slice(n,r);return t&&a.endsWith(t)&&a!==t?a.slice(0,a.length-t.length):a}function qr(e){let t=Kr(e),n=t.lastIndexOf(`.`);return n<=0?``:t.slice(n)}function Jr(...e){let t=``,n=!1;for(let r=e.length-1;r>=0&&!n;r--){let i=e[r];typeof i!=`string`||i.length===0||(t=t.length>0?`${i}/${t}`:i,n=i.charCodeAt(0)===47)}n||(t=t.length>0?`/${t}`:`/`);let r=Hr(t.split(`/`),!1).join(`/`);return r.length>0?`/${r}`:`/`}function Yr(e,t){let n=Jr(e),r=Jr(t);if(n===r)return``;let i=n.split(`/`).filter(Boolean),a=r.split(`/`).filter(Boolean),o=0;for(;o<i.length&&o<a.length&&i[o]===a[o];)o++;return[...i.slice(o).map(()=>`..`),...a.slice(o)].join(`/`)}function Xr(e){let t=e.charCodeAt(0)===47?`/`:``,n=Kr(e),r=qr(e),i=r?n.slice(0,n.length-r.length):n,a=Gr(e);return a===`.`&&t===``&&(a=``),{root:t,dir:a,base:n,ext:r,name:i}}function Zr(e){let t=e.dir||e.root||``,n=e.base||`${e.name||``}${e.ext||``}`;return t?t===e.root?`${t}${n}`:`${t}/${n}`:n}const Qr={sep:`/`,delimiter:`:`,basename:Kr,dirname:Gr,extname:qr,isAbsolute:e=>e.length>0&&e.charCodeAt(0)===47,join:Wr,normalize:Ur,resolve:Jr,relative:Yr,parse:Xr,format:Zr},$r=65536,ei={md5:y.md5,sha1:b.sha1,sha256:x.sha256};function ti(e,t){let n=globalThis.Buffer;if(!n)throw Error(`crypto.createHash: Buffer is unavailable in this environment`);return t?n.from(e,t):n.from(e)}function ni(e,t){return typeof e==`string`?t===`hex`||t===`base64`||t===`base64url`||t===`latin1`||t===`binary`?new Uint8Array(ti(e,t===`binary`?`latin1`:t)):e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function ri(e){let t=ei[String(e).toLowerCase().replace(`-`,``)];if(!t)throw Error(`Digest method not supported: ${e}`);let n=t.create(),r=!1,i={update(e,t){if(r)throw Error(`Digest already called`);return n.update(ni(e,t)),i},digest(e){r=!0;let t=ti(n.array());return e?t.toString(e):t}};return i}function ii(){let e=globalThis.crypto;if(!e||typeof e.getRandomValues!=`function`)throw Error(`crypto: globalThis.crypto is unavailable in this environment`);return e}function ai(e){return ii().getRandomValues(e)}function oi(e){for(let t=0;t<e.length;t+=$r){let n=Math.min(t+$r,e.length);ai(e.subarray(t,n))}}function si(e){return e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}const X=Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));function ci(){let e=ii();if(typeof e.randomUUID==`function`)return e.randomUUID();let t=ai(new Uint8Array(16));return t[6]=t[6]&15|64,t[8]=t[8]&63|128,`${X[t[0]]}${X[t[1]]}${X[t[2]]}${X[t[3]]}-${X[t[4]]}${X[t[5]]}-${X[t[6]]}${X[t[7]]}-${X[t[8]]}${X[t[9]]}-${X[t[10]]}${X[t[11]]}${X[t[12]]}${X[t[13]]}${X[t[14]]}${X[t[15]]}`}const li={randomFillSync(e,t=0,n){let r=si(e),i=t,a=n===void 0?r.length:i+n;return oi(r.subarray(i,a)),e},randomBytes(e){let t=globalThis.Buffer,n=t&&typeof t.allocUnsafe==`function`?t.allocUnsafe(e):new Uint8Array(e);return oi(si(n)),n},randomUUID:ci,getRandomValues(e){return ai(e)},createHash:ri,get webcrypto(){return ii()},get subtle(){return ii().subtle}};var Z=class extends Error{actual;expected;operator;generatedMessage;code;constructor(e={}){let t=!e.message;super(e.message||`${ui(e.actual)} ${e.operator||`!=`} ${ui(e.expected)}`),this.name=`AssertionError`,this.actual=e.actual,this.expected=e.expected,this.operator=e.operator||``,this.generatedMessage=t,this.code=`ERR_ASSERTION`}};function ui(e){if(typeof e==`string`)return JSON.stringify(e);if(e==null)return String(e);if(typeof e==`object`)try{return JSON.stringify(e)}catch{return String(e)}return String(e)}function Q(e,t){return e instanceof Error?e:typeof e==`string`?new Z({message:e}):t()}function di(e,t,n,r){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!pi(e[i],t[i],n,r))return!1;return!0}function fi(e,t,n,r){let i=Object.keys(e);if(i.length!==Object.keys(t).length)return!1;for(let a of i){if(!Object.prototype.hasOwnProperty.call(t,a))return!1;let i=e[a],o=t[a];if(!pi(i,o,n,r))return!1}return!0}function pi(e,t,n,r){if((n?Object.is(e,t):e===t)||!n&&e==t)return!0;if(typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;let i=e,a=t;return n&&Object.getPrototypeOf(i)!==Object.getPrototypeOf(a)?!1:r.get(i)===a?!0:(r.set(i,a),Array.isArray(e)===Array.isArray(t)?Array.isArray(e)&&Array.isArray(t)?di(e,t,n,r):fi(i,a,n,r):!1)}function mi(e,t){try{if(e instanceof t)return!0}catch{}try{return!!t(e)}catch{return!1}}function hi(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(r instanceof RegExp){if(typeof t!=`string`||!r.test(t))return!1}else if(t!==r)return!1}return!0}function gi(e,t){if(t===void 0)return!0;if(t instanceof RegExp){let n=e instanceof Error?e.message:String(e);return t.test(n)}return typeof t==`function`?mi(e,t):t&&typeof t==`object`?!e||typeof e!=`object`?!1:hi(e,t):!1}function _i(e){let t=(e,t)=>{if(!e)throw Q(t,()=>new Z({message:`The expression evaluated to a falsy value`,actual:e,expected:!0,operator:`==`}))},n=((e,n)=>t(e,n)),r=(e,t,n)=>{if(!Object.is(e,t))throw Q(n,()=>new Z({actual:e,expected:t,operator:`strictEqual`}))},i=(t,n,i)=>{if(e){r(t,n,i);return}if(t!=n)throw Q(i,()=>new Z({actual:t,expected:n,operator:`==`}))},a=(e,t,n)=>{if(Object.is(e,t))throw Q(n,()=>new Z({actual:e,expected:t,operator:`notStrictEqual`}))},o=(t,n,r)=>{if(e){a(t,n,r);return}if(t==n)throw Q(r,()=>new Z({actual:t,expected:n,operator:`!=`}))},s=(e,t,n)=>{if(!pi(e,t,!0,new WeakMap))throw Q(n,()=>new Z({actual:e,expected:t,operator:`deepStrictEqual`}))},c=(t,n,r)=>{if(e){s(t,n,r);return}if(!pi(t,n,!1,new WeakMap))throw Q(r,()=>new Z({actual:t,expected:n,operator:`deepEqual`}))},l=(e,t,n)=>{if(pi(e,t,!0,new WeakMap))throw Q(n,()=>new Z({actual:e,expected:t,operator:`notDeepStrictEqual`}))};return n.ok=t,n.equal=i,n.notEqual=o,n.strictEqual=r,n.notStrictEqual=a,n.deepEqual=c,n.deepStrictEqual=s,n.notDeepEqual=(t,n,r)=>{if(e){l(t,n,r);return}if(pi(t,n,!1,new WeakMap))throw Q(r,()=>new Z({actual:t,expected:n,operator:`notDeepEqual`}))},n.notDeepStrictEqual=l,n.throws=(e,t,n)=>{let r,i=!1;try{e()}catch(e){r=e,i=!0}if(!i)throw Q(typeof t==`string`?t:n,()=>new Z({message:`Missing expected exception`,operator:`throws`}));if(!(typeof t==`string`||t instanceof Error)&&!gi(r,t))throw Q(n,()=>new Z({message:`Got unwanted exception`,actual:r,operator:`throws`}))},n.doesNotThrow=(e,t)=>{try{e()}catch(e){throw Q(t,()=>new Z({message:`Got unwanted exception`,actual:e,operator:`doesNotThrow`}))}},n.fail=e=>{throw Q(e,()=>new Z({message:`Failed`,operator:`fail`}))},n.AssertionError=Z,n}const vi=_i(!0);vi.strict=vi;const yi=_i(!1);yi.strict=vi;const bi=Symbol.for(`nodejs.util.inspect.custom`),xi=Symbol.for(`nodejs.util.promisify.custom`);function Si(e){return`'${e.replace(/\\/g,`\\\\`).replace(/'/g,`\\'`).replace(/\n/g,`\\n`)}'`}function Ci(e){if(e===null)return`null`;let t=typeof e;if(t===`string`)return Si(e);if(t===`number`)return Object.is(e,-0)?`-0`:String(e);if(t===`bigint`)return`${String(e)}n`;if(t===`boolean`||t===`undefined`)return String(e);if(t===`symbol`)return e.toString();if(t===`function`){let t=e.name;return t?`[Function: ${t}]`:`[Function (anonymous)]`}return null}function wi(e){return e instanceof RegExp?e.toString():e instanceof Date?Number.isNaN(e.getTime())?`Invalid Date`:e.toISOString():e instanceof Error?e.stack||`${e.name}: ${e.message}`:null}function Ti(e,t,n){if(Array.isArray(e))return e.length===0?`[]`:`[ ${e.map(e=>Ei(e,t+1,n)).join(`, `)} ]`;if(e instanceof Map){let r=[...e].map(([e,r])=>`${Ei(e,t+1,n)} => ${Ei(r,t+1,n)}`);return`Map(${e.size}) {${r.length?` ${r.join(`, `)} `:``}}`}if(e instanceof Set){let r=[...e].map(e=>Ei(e,t+1,n));return`Set(${e.size}) {${r.length?` ${r.join(`, `)} `:``}}`}let r=Object.keys(e),i=e.constructor?e.constructor.name:``,a=i&&i!==`Object`?`${i} `:``;return r.length===0?`${a}{}`:`${a}{ ${r.map(r=>`${/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(r)?r:Si(r)}: ${Ei(e[r],t+1,n)}`).join(`, `)} }`}function Ei(e,t,n){let r=Ci(e);if(r!==null)return r;let i=e,a=wi(i);if(a!==null)return a;let o=i[bi];if(typeof o==`function`)try{return String(o.call(i,n.maxDepth,n.opts))}catch{}if(n.seen.has(e))return`[Circular *1]`;if(n.maxDepth!==null&&t>n.maxDepth)return Array.isArray(e)?`[Array]`:`[Object]`;n.seen.add(e);try{return Ti(i,t,n)}finally{n.seen.delete(e)}}function Di(e,t={}){let n=t.depth===void 0?2:t.depth;return Ei(e,0,{seen:new Set,maxDepth:n,opts:t})}function Oi(e,t,n,r){if(e===`%%`)return`%`;if(n.i>=t.length)return e;let i=t[n.i];switch(e){case`%s`:return n.i++,typeof i==`string`?i:typeof i==`bigint`?`${String(i)}n`:i==null||typeof i==`number`||typeof i==`boolean`?String(i):Di(i,{depth:r.depth===void 0?2:r.depth});case`%d`:return n.i++,typeof i==`bigint`?`${String(i)}n`:Number.isNaN(Number(i))?`NaN`:String(Number(i));case`%i`:return n.i++,typeof i==`bigint`?`${String(i)}n`:String(Number.parseInt(i,10));case`%f`:return n.i++,String(typeof i==`bigint`?i:Number.parseFloat(i));case`%j`:n.i++;try{return JSON.stringify(i)??`undefined`}catch{return`[Circular]`}case`%o`:return n.i++,Di(i,{depth:4});case`%O`:return n.i++,Di(i,{depth:null});case`%c`:return n.i++,``;default:return e}}function ki(e,...t){let n=t[0];if(typeof n!=`string`)return t.map(e=>typeof e==`string`?e:Di(e)).join(` `);let r={i:1},i=n.replace(/%[sdifjoOc%]/g,n=>Oi(n,t,r,e));for(;r.i<t.length;r.i++){let e=t[r.i];i+=` ${typeof e==`string`?e:Di(e)}`}return i}function Ai(...e){return ki({},...e)}function ji(e,t){if(e==null)throw TypeError(`The constructor to "inherits" must not be null or undefined`);if(t==null)throw TypeError(`The super constructor to "inherits" must not be null or undefined`);if(t.prototype===void 0)throw TypeError(`The super constructor to "inherits" must have a prototype`);e.super_=t,Object.setPrototypeOf(e.prototype,t.prototype)}function Mi(e){if(typeof e!=`function`)throw TypeError(`The "original" argument must be of type function`);let t=e[xi];if(t){if(typeof t!=`function`)throw TypeError(`The [util.promisify.custom] property must be of type function`);return t}function n(...t){return new Promise((n,r)=>{e.call(this,...t,(e,...t)=>{if(e){r(e);return}n(t.length>1?t:t[0])})})}return Object.setPrototypeOf(n,Object.getPrototypeOf(e)),Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)),n}const Ni=Di;Ni.custom=bi;const Pi=Mi;Pi.custom=xi;const Fi={format:Ai,formatWithOptions:ki,inspect:Ni,inherits:ji,promisify:Pi};function Ii(e){return typeof e==`string`?new Uint8Array(ti(e,`utf8`)):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}function Li(e){let t={};return e&&(typeof e.level==`number`&&(t.level=e.level),typeof e.windowBits==`number`&&(t.windowBits=e.windowBits),typeof e.memLevel==`number`&&(t.memLevel=e.memLevel),typeof e.strategy==`number`&&(t.strategy=e.strategy)),t}function Ri(e,t,n){return ti(e(Ii(t),Li(n)))}function zi(e,t,n,r){let i=typeof n==`function`?n:r,a=typeof n==`function`?void 0:n;if(typeof i!=`function`)throw TypeError(`zlib: callback is required`);let o;try{o=Ri(e,t,a)}catch(e){queueMicrotask(()=>i(e instanceof Error?e:Error(String(e))));return}queueMicrotask(()=>i(null,o))}const Bi={gzipSync:(e,t)=>Ri(yr,e,t),gunzipSync:(e,t)=>Ri(Sr,e,t),deflateSync:(e,t)=>Ri(_r,e,t),inflateSync:(e,t)=>Ri(br,e,t),deflateRawSync:(e,t)=>Ri(vr,e,t),inflateRawSync:(e,t)=>Ri(xr,e,t),gzip:(e,t,n)=>zi(yr,e,t,n),gunzip:(e,t,n)=>zi(Sr,e,t,n),deflate:(e,t,n)=>zi(_r,e,t,n),inflate:(e,t,n)=>zi(br,e,t,n),deflateRaw:(e,t,n)=>zi(vr,e,t,n),inflateRaw:(e,t,n)=>zi(xr,e,t,n),constants:{Z_NO_FLUSH:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1}},Vi={tmpdir:()=>`/tmp`,homedir:()=>`/home/user`,platform:()=>`linux`,arch:()=>`x64`,EOL:`
|
|
44
44
|
`,cpus:()=>[{model:`virtual`,speed:0}],hostname:()=>`slicc`,type:()=>`Linux`,release:()=>`0.0.0`};function Hi(e){let t=typeof e==`string`?e:e.href;if(!t.startsWith(`file://`))throw TypeError(`fileURLToPath: not a file URL`);let n=t.slice(7);return decodeURIComponent(n)}function Ui(e){let t=e.split(`/`).map(e=>encodeURIComponent(e)).join(`/`);return new URL(`file://${t}`)}const Wi={URL:globalThis.URL,URLSearchParams:globalThis.URLSearchParams,fileURLToPath:Hi,pathToFileURL:Ui};var Gi=class{_events=new Map;on(e,t){let n=this._events.get(e);return n?n.push(t):this._events.set(e,[t]),this}addListener(e,t){return this.on(e,t)}off(e,t){let n=this._events.get(e);if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1),n.length===0&&this._events.delete(e)}return this}removeListener(e,t){return this.off(e,t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};return this.on(e,n)}emit(e,...t){let n=this._events.get(e);if(!n||n.length===0)return!1;for(let e of[...n])e(...t);return!0}removeAllListeners(e){return e===void 0?this._events.clear():this._events.delete(e),this}listenerCount(e){return this._events.get(e)?.length??0}listeners(e){return[...this._events.get(e)??[]]}};const Ki=Object.assign(Gi,{EventEmitter:Gi,default:Gi});var qi=class{_events=new Map;writable=!0;readable=!0;on(e,t){let n=this._events.get(e);return n?n.push(t):this._events.set(e,[t]),this}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};return this.on(e,n)}off(e,t){let n=this._events.get(e);if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}return this}emit(e,...t){let n=this._events.get(e);if(!n||n.length===0)return!1;for(let e of[...n])e(...t);return!0}pipe(e){return e}removeListener(e,t){return this.off(e,t)}removeAllListeners(){return this._events.clear(),this}},Ji=class extends qi{read(){return null}destroy(){return this}},Yi=class extends qi{write(e,t,n){return n&&queueMicrotask(n),!0}end(e){return e&&queueMicrotask(e),this}destroy(){return this}},Xi=class extends qi{write(e,t,n){return n&&queueMicrotask(n),!0}end(e){return e&&queueMicrotask(e),this}read(){return null}destroy(){return this}};const Zi={Readable:Ji,Writable:Yi,Transform:Xi,PassThrough:class extends Xi{},Stream:qi};let Qi=1;function $i(e){if(typeof e==`string`)return e;if(ArrayBuffer.isView(e)){let t=e;return new TextDecoder().decode(new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}return e==null?``:String(e)}function ea(e,t){return t===void 0||t===`utf8`||t===`utf-8`?e:t===`buffer`||t===null?ti(e):ti(e).toString(t)}function ta(e,t){if(e.length===0)return ea(``,t);if(typeof e[0]==`string`)return e.join(``);let n=globalThis.Buffer;return n?n.concat(e):e[0]}function na(e,t,n){t.length>0&&e.emit(`data`,ea(t,n)),e.readable=!1,e.emit(`end`)}function ra(e){let t=e=>{typeof e==`function`&&queueMicrotask(e)};return{writable:!0,write(n,r,i){return e.stdin.write($i(n)),t(typeof r==`function`?r:i),!0},end(n,r,i){n!==void 0&&typeof n!=`function`&&e.stdin.write($i(n)),e.stdin.end(),this.writable=!1,t(typeof n==`function`?n:typeof r==`function`?r:i)}}}var ia=class extends Gi{stdout;stderr;stdin;pid;exitCode=null;signalCode=null;killed=!1;spawnfile;spawnargs;handle;constructor(e,t,n,r){super(),this.handle=e,this.pid=Qi++,this.spawnfile=n,this.spawnargs=r,this.stdout=new Ji,this.stderr=new Ji,this.stdin=ra(e),e.done.then(e=>this.finish(e,t),e=>this.emit(`error`,e instanceof Error?e:Error(String(e))))}finish(e,t){na(this.stdout,e.stdout,t),na(this.stderr,e.stderr,t),this.exitCode=e.exitCode;let n=this.killed?null:e.exitCode,r=this.killed?this.signalCode:null;this.emit(`exit`,n,r),this.emit(`close`,n,r)}kill(e=`SIGTERM`){return this.killed=!0,this.signalCode=e,this.handle.kill(e).catch(()=>{}),!0}};function aa(e){let t=(t,n,r,i,a)=>{let o=e.start(t),s=new ia(o,r,i,a);return n.input!==void 0&&s.stdin.write($i(n.input)),queueMicrotask(()=>o.stdin.end()),s},n=(e,t,n,r)=>{if(typeof r!=`function`)return;let i=[],a=[];e.stdout.on(`data`,e=>i.push(e)),e.stderr.on(`data`,e=>a.push(e)),e.once(`error`,e=>r(e,ta(i,t),ta(a,t))),e.once(`close`,(o,s)=>{let c=ta(i,t),l=ta(a,t);if(o===0){r(null,c,l);return}r(Object.assign(Error(`Command failed: ${n}\n${$i(l)}`),{code:o===null?void 0:o,killed:e.killed,signal:s??null,cmd:n}),c,l)})},r=(e,r,i)=>{let a=typeof r==`function`?r:i,o=r&&typeof r==`object`?r:{},s=o.encoding===void 0?`utf8`:o.encoding,c=t(e,o,s,e,[]);return n(c,s,e,a),c},i=(e,r,i,a)=>{let o=[],s={},c;Array.isArray(r)?(o=r,typeof i==`function`?c=i:(s=i??{},c=typeof a==`function`?a:void 0)):typeof r==`function`?c=r:r&&typeof r==`object`&&(s=r,c=typeof i==`function`?i:void 0);let l=s.encoding===void 0?`utf8`:s.encoding,u=[e,...o],d=t(u,s,l,e,o);return n(d,l,u.join(` `),c),d},a=(e,n,r)=>{let i=[],a={};Array.isArray(n)?(i=n,a=r??{}):n&&typeof n==`object`&&(a=n);let o=a.encoding===void 0?`buffer`:a.encoding;return t(a.shell?`${e}${i.length?` ${i.join(` `)}`:``}`:[e,...i],a,o,e,i)},o=(e,t)=>new Promise((n,i)=>{r(e,t,(e,t,r)=>{if(e){i(Object.assign(e,{stdout:t,stderr:r}));return}n({stdout:t,stderr:r})})}),s=(e,t,n)=>new Promise((r,a)=>{i(e,Array.isArray(t)?t:[],Array.isArray(t)?n:t,(e,t,n)=>{if(e){a(Object.assign(e,{stdout:t,stderr:n}));return}r({stdout:t,stderr:n})})}),c=e=>()=>{throw Error(`child_process.${e} is not available in the browser realm`)},l=(e,t)=>{Object.defineProperty(e,xi,{value:t,enumerable:!1,configurable:!0})};return l(r,o),l(i,s),{exec:r,execFile:i,spawn:a,execSync:c(`execSync`),spawnSync:c(`spawnSync`),execFileSync:c(`execFileSync`),fork:c(`fork`),ChildProcess:ia}}const oa=new Set([`child_process`,`events`,`fs`,`fs/promises`,`os`,`path`,`stream`,`url`,`crypto`,`process`,`buffer`,`assert`,`assert/strict`,`util`]),sa=new Set([...new Set(`assert.assert/strict.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.dns/promises.domain.events.fs.fs/promises.http.http2.https.inspector.inspector/promises.module.net.os.path.path/posix.path/win32.perf_hooks.process.punycode.querystring.readline.readline/promises.repl.stream.stream/consumers.stream/promises.stream/web.string_decoder.sys.timers.timers/promises.tls.trace_events.tty.url.util.util/types.v8.vm.wasi.worker_threads.zlib`.split(`.`))].filter(e=>!oa.has(e)));var ca=class{port;nextId=1;pending=new Map;eventSubscribers=new Map;handler;disposed=!1;constructor(e){this.port=e,this.handler=e=>{let t=e.data;if(t?.type===`realm-rpc-res`){let t=e.data,n=this.pending.get(t.id);if(!n)return;this.pending.delete(t.id),typeof t.error==`string`?n.reject(Error(t.error)):n.resolve(t.result);return}if(t?.type===`realm-event`){let t=e.data,n=this.eventSubscribers.get(t.channel);if(!n)return;for(let e of[...n])try{e(t.payload)}catch{}}},e.addEventListener(`message`,this.handler),e.start?.()}get pendingCount(){return this.pending.size}call(e,t,n=[]){if(this.disposed)return Promise.reject(Error(`realm-rpc: client disposed`));let r=this.nextId++,i={type:`realm-rpc-req`,id:r,channel:e,op:t,args:n};return new Promise((e,t)=>{this.pending.set(r,{resolve:e,reject:t}),this.port.postMessage(i)})}onEvent(e,t){if(this.disposed)return()=>{};let n=this.eventSubscribers.get(e);return n||(n=new Set,this.eventSubscribers.set(e,n)),n.add(t),()=>{let n=this.eventSubscribers.get(e);n&&(n.delete(t),n.size===0&&this.eventSubscribers.delete(e))}}dispose(){if(this.disposed)return;this.disposed=!0,this.port.removeEventListener(`message`,this.handler);let e=Error(`realm-rpc: client disposed`);for(let t of this.pending.values())t.reject(e);this.pending.clear(),this.eventSubscribers.clear()}};const la=new Set([`bcrypt`,`better-sqlite3`,`canvas`,`cpu-features`,`fsevents`,`leveldown`,`libxmljs`,`libxmljs2`,`node-gyp-build`,`node-sass`,`puppeteer`,`robotjs`,`sass-embedded`,`sharp`,`snappy`,`sqlite3`,`tree-sitter`,`usb`]),ua={sharp:` Use the built-in 'convert' shell command for image work.`,canvas:` Use the built-in 'convert' / OffscreenCanvas for image work.`,"better-sqlite3":` Use the built-in 'sqlite3' shell command (sql.js WASM).`,sqlite3:` Use the built-in 'sqlite3' shell command (sql.js WASM).`,bcrypt:` Use crypto.subtle.digest() with PBKDF2 / Argon2 in pure JS.`,puppeteer:` Use the built-in browser-automation shell commands.`};function da(e,t){let n=ua[t]??``;return Error(`require('${e}'): '${t}' is a Node native module (C++ bindings) — it cannot run in the browser sandbox.${n}`)}function fa(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t<0?``:t===0?`/`:e.substring(0,t)}function pa(e){return/^[A-Za-z0-9_\-./:@]+$/.test(e)?e:`'`+e.replace(/'/g,`'\\''`)+`'`}function ma(e,t){return e===``?t:e===`/`?`/${t}`:`${e}/${t}`}function ha(e){let t=fa(e.argv[1]??``),n=ma(t,`references`),r=ma(t,`assets`),i=ma(t,`.config`);async function a(){let t;try{t=await e.fs.exists(i)}catch{return null}if(!t)return null;let n;try{n=await e.fs.readFile(i)}catch{return null}let r=typeof n==`string`?n:String(n);if(!r.trim())return null;let a;try{a=JSON.parse(r)}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`skill.config(): failed to parse ${i}: ${t}`)}if(a&&typeof a==`object`&&!Array.isArray(a))return a;throw Error(`skill.config(): ${i} must contain a JSON object`)}async function o(t){let n=await a();if(t===void 0)return n;if(typeof t!=`object`||!t||Array.isArray(t))throw TypeError(`skill.config(updates): updates must be a plain object`);let r={...n??{},...t};return await e.fs.writeFile(i,JSON.stringify(r,null,2)+`
|
|
45
|
-
`),r}async function s(t){if(typeof t!=`string`||!t.trim())throw TypeError(`skill.token(providerId): providerId must be a non-empty string`);let n=`oauth-token ${pa(t)}`,{stdout:r,stderr:i,exitCode:a}=await e.exec(n);if(a!==0){let e=i.trim()||`oauth-token exited with code ${a}`;throw Error(`skill.token('${t}'): ${e}`)}return r.replace(/\r?\n+$/,``)}return Object.freeze({dir:t,refs:n,assets:r,config:o,token:s})}function $(e){if(!e||e===`/`)return`/`;e.startsWith(`/`)||(e=`/`+e);let t=e.split(`/`),n=[];for(let e of t)e===``||e===`.`||(e===`..`?n.pop():n.push(e));return`/`+n.join(`/`)}function ga(e){let t=$(e);if(t===`/`)return`/`;let n=t.lastIndexOf(`/`);return n===0?`/`:t.slice(0,n)}function _a(e){return Object.assign(Error(`ENOENT: no such file or directory, '${e}'`),{code:`ENOENT`})}function va(e){return Object.assign(Error(`ENOSYNC: file too large for sync access, '${e}' — use async readFile() instead`),{code:`ENOSYNC`})}function ya(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var ba=class{tree=new Map;initialPaths=new Set;initialContent=new Map;initialIsDirectory=new Map;mkdtempCounter=0;constructor(e){this.tree.set(`/`,{content:new Uint8Array,isDirectory:!0}),this.initialPaths.add(`/`),this.initialIsDirectory.set(`/`,!0);for(let t of e.entries){let e=$(t.path);this.tree.set(e,{content:t.content,isDirectory:t.isDirectory,truncated:t.truncated}),this.initialPaths.add(e),this.initialIsDirectory.set(e,t.isDirectory),t.isDirectory||this.initialContent.set(e,t.content)}for(let t of e.entries){let e=ga($(t.path));for(;e!==`/`&&!this.tree.has(e);)this.tree.set(e,{content:new Uint8Array,isDirectory:!0}),this.initialPaths.add(e),this.initialIsDirectory.set(e,!0),e=ga(e)}}ensureParentDirs(e){let t=ga(e);t!==`/`&&(this.tree.has(t)||this.mkdir(t,!0))}readFile(e){let t=$(e),n=this.tree.get(t);if(!n||n.isDirectory)throw _a(t);if(n.truncated)throw va(t);return n.content}writeFile(e,t){let n=$(e);this.ensureParentDirs(n),this.tree.set(n,{content:t,isDirectory:!1})}exists(e){let t=$(e);return this.tree.has(t)}stat(e){let t=$(e),n=this.tree.get(t);if(!n)throw _a(t);return{isFile:!n.isDirectory,isDirectory:n.isDirectory,size:n.isDirectory?0:n.content.byteLength}}readdir(e){let t=$(e);if(!this.tree.get(t)?.isDirectory)throw _a(t);let n=t===`/`?`/`:t+`/`,r=new Set;for(let e of this.tree.keys()){if(e===t||e===`/`||!e.startsWith(n))continue;let i=e.slice(n.length).split(`/`)[0];i&&r.add(i)}return Array.from(r)}mkdir(e,t){let n=$(e);if(this.tree.has(n)){if(this.tree.get(n).isDirectory)return;throw Object.assign(Error(`EEXIST: file already exists, '${n}'`),{code:`EEXIST`})}let r=ga(n);if(r!==`/`&&!this.tree.has(r)){if(!t)throw _a(n);this.mkdir(r,!0)}this.tree.set(n,{content:new Uint8Array,isDirectory:!0})}rm(e,t){let n=$(e),r=this.tree.get(n);if(!r)throw _a(n);if(r.isDirectory){let e=n===`/`?`/`:n+`/`,r=Array.from(this.tree.keys()).filter(t=>t!==n&&t.startsWith(e));if(r.length>0&&!t)throw Object.assign(Error(`ENOTEMPTY: directory not empty, '${n}'`),{code:`ENOTEMPTY`});for(let e of r)this.tree.delete(e)}this.tree.delete(n)}copyFile(e,t){let n=$(e),r=this.tree.get(n);if(!r||r.isDirectory)throw _a(n);let i=$(t);this.ensureParentDirs(i),this.tree.set(i,{content:r.content.slice(),isDirectory:!1})}rename(e,t){let n=$(e),r=this.tree.get(n);if(!r)throw _a(n);let i=$(t);if(r.isDirectory){let e=n===`/`?`/`:n+`/`,t=Array.from(this.tree.keys()).filter(t=>t!==n&&t.startsWith(e));this.ensureParentDirs(i),this.tree.set(i,r),this.tree.delete(n);for(let e of t){let t=this.tree.get(e),r=i+e.slice(n.length);this.tree.set(r,t),this.tree.delete(e)}return}this.ensureParentDirs(i),this.tree.set(i,r),this.tree.delete(n)}unlink(e){let t=$(e),n=this.tree.get(t);if(!n)throw _a(t);if(n.isDirectory)throw Object.assign(Error(`EISDIR: illegal operation on a directory, unlink '${t}'`),{code:`EISDIR`});this.tree.delete(t)}mkdtemp(e){for(let t=0;t<100;t++){let t=`_${String(this.mkdtempCounter).padStart(6,`0`)}`;this.mkdtempCounter++;let n=$(e+t);if(!this.tree.has(n))return this.mkdir(n,!0),n}throw Error(`mkdtemp: failed to create unique directory after 100 attempts`)}getMutations(){let e=[],t=[],n=[];for(let[r,i]of this.tree.entries()){if(r===`/`)continue;if(!this.initialPaths.has(r)){e.push({path:r,content:i.content,isDirectory:i.isDirectory});continue}let a=this.initialIsDirectory.get(r);if(a!==void 0&&a!==i.isDirectory){n.push(r),e.push({path:r,content:i.content,isDirectory:i.isDirectory});continue}if(!i.isDirectory){let e=this.initialContent.get(r);e&&!ya(e,i.content)&&t.push({path:r,content:i.content})}}for(let e of this.initialPaths)e!==`/`&&(this.tree.has(e)||n.push(e));return{created:e,modified:t,deleted:n}}};function xa(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t<0?``:t===0?`/`:e.substring(0,t)}var Sa=class extends Error{code;constructor(e){super(`Process exited with code ${e}`),this.code=e,this.name=`NodeExitError`}};function Ca(e){if(typeof e==`string`)return e;if(e==null)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}async function wa(e,t){let n;try{n=await e.call(`vfs`,`snapshot`,[t])}catch{n={entries:[]}}return new ba(n)}function Ta(e){return{usbBridge:
|
|
45
|
+
`),r}async function s(t){if(typeof t!=`string`||!t.trim())throw TypeError(`skill.token(providerId): providerId must be a non-empty string`);let n=`oauth-token ${pa(t)}`,{stdout:r,stderr:i,exitCode:a}=await e.exec(n);if(a!==0){let e=i.trim()||`oauth-token exited with code ${a}`;throw Error(`skill.token('${t}'): ${e}`)}return r.replace(/\r?\n+$/,``)}return Object.freeze({dir:t,refs:n,assets:r,config:o,token:s})}function $(e){if(!e||e===`/`)return`/`;e.startsWith(`/`)||(e=`/`+e);let t=e.split(`/`),n=[];for(let e of t)e===``||e===`.`||(e===`..`?n.pop():n.push(e));return`/`+n.join(`/`)}function ga(e){let t=$(e);if(t===`/`)return`/`;let n=t.lastIndexOf(`/`);return n===0?`/`:t.slice(0,n)}function _a(e){return Object.assign(Error(`ENOENT: no such file or directory, '${e}'`),{code:`ENOENT`})}function va(e){return Object.assign(Error(`ENOSYNC: file too large for sync access, '${e}' — use async readFile() instead`),{code:`ENOSYNC`})}function ya(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var ba=class{tree=new Map;initialPaths=new Set;initialContent=new Map;initialIsDirectory=new Map;mkdtempCounter=0;touched=!1;constructor(e){this.loadSnapshot(e)}loadSnapshot(e){this.tree=new Map,this.initialPaths=new Set,this.initialContent=new Map,this.initialIsDirectory=new Map,this.tree.set(`/`,{content:new Uint8Array,isDirectory:!0}),this.initialPaths.add(`/`),this.initialIsDirectory.set(`/`,!0);for(let t of e.entries){let e=$(t.path);this.tree.set(e,{content:t.content,isDirectory:t.isDirectory,truncated:t.truncated}),this.initialPaths.add(e),this.initialIsDirectory.set(e,t.isDirectory),t.isDirectory||this.initialContent.set(e,t.content)}for(let t of e.entries){let e=ga($(t.path));for(;e!==`/`&&!this.tree.has(e);)this.tree.set(e,{content:new Uint8Array,isDirectory:!0}),this.initialPaths.add(e),this.initialIsDirectory.set(e,!0),e=ga(e)}}wasUsed(){return this.touched}applySnapshot(e){this.loadSnapshot(e)}applySnapshotPreservingMutations(e){let t=this.getMutations();this.loadSnapshot(e);for(let e of t.deleted){if(this.tree.get(e)?.isDirectory){let t=e===`/`?`/`:e+`/`;for(let n of Array.from(this.tree.keys()))n!==e&&n.startsWith(t)&&this.tree.delete(n)}this.tree.delete(e)}for(let e of t.created)this.ensureParentDirs(e.path),this.tree.set(e.path,{content:e.content,isDirectory:e.isDirectory});for(let e of t.modified)this.ensureParentDirs(e.path),this.tree.set(e.path,{content:e.content,isDirectory:!1})}resetBaseline(){this.initialPaths=new Set,this.initialContent=new Map,this.initialIsDirectory=new Map;for(let[e,t]of this.tree.entries())this.initialPaths.add(e),this.initialIsDirectory.set(e,t.isDirectory),t.isDirectory||this.initialContent.set(e,t.content)}ensureParentDirs(e){let t=ga(e);t!==`/`&&(this.tree.has(t)||this.mkdir(t,!0))}readFile(e){this.touched=!0;let t=$(e),n=this.tree.get(t);if(!n||n.isDirectory)throw _a(t);if(n.truncated)throw va(t);return n.content}writeFile(e,t){this.touched=!0;let n=$(e);this.ensureParentDirs(n),this.tree.set(n,{content:t,isDirectory:!1})}exists(e){this.touched=!0;let t=$(e);return this.tree.has(t)}stat(e){this.touched=!0;let t=$(e),n=this.tree.get(t);if(!n)throw _a(t);return{isFile:!n.isDirectory,isDirectory:n.isDirectory,size:n.isDirectory?0:n.content.byteLength}}readdir(e){this.touched=!0;let t=$(e);if(!this.tree.get(t)?.isDirectory)throw _a(t);let n=t===`/`?`/`:t+`/`,r=new Set;for(let e of this.tree.keys()){if(e===t||e===`/`||!e.startsWith(n))continue;let i=e.slice(n.length).split(`/`)[0];i&&r.add(i)}return Array.from(r)}mkdir(e,t){this.touched=!0;let n=$(e);if(this.tree.has(n)){if(this.tree.get(n).isDirectory)return;throw Object.assign(Error(`EEXIST: file already exists, '${n}'`),{code:`EEXIST`})}let r=ga(n);if(r!==`/`&&!this.tree.has(r)){if(!t)throw _a(n);this.mkdir(r,!0)}this.tree.set(n,{content:new Uint8Array,isDirectory:!0})}rm(e,t){this.touched=!0;let n=$(e),r=this.tree.get(n);if(!r)throw _a(n);if(r.isDirectory){let e=n===`/`?`/`:n+`/`,r=Array.from(this.tree.keys()).filter(t=>t!==n&&t.startsWith(e));if(r.length>0&&!t)throw Object.assign(Error(`ENOTEMPTY: directory not empty, '${n}'`),{code:`ENOTEMPTY`});for(let e of r)this.tree.delete(e)}this.tree.delete(n)}copyFile(e,t){this.touched=!0;let n=$(e),r=this.tree.get(n);if(!r||r.isDirectory)throw _a(n);let i=$(t);this.ensureParentDirs(i),this.tree.set(i,{content:r.content.slice(),isDirectory:!1})}rename(e,t){this.touched=!0;let n=$(e),r=this.tree.get(n);if(!r)throw _a(n);let i=$(t);if(r.isDirectory){let e=n===`/`?`/`:n+`/`,t=Array.from(this.tree.keys()).filter(t=>t!==n&&t.startsWith(e));this.ensureParentDirs(i),this.tree.set(i,r),this.tree.delete(n);for(let e of t){let t=this.tree.get(e),r=i+e.slice(n.length);this.tree.set(r,t),this.tree.delete(e)}return}this.ensureParentDirs(i),this.tree.set(i,r),this.tree.delete(n)}unlink(e){this.touched=!0;let t=$(e),n=this.tree.get(t);if(!n)throw _a(t);if(n.isDirectory)throw Object.assign(Error(`EISDIR: illegal operation on a directory, unlink '${t}'`),{code:`EISDIR`});this.tree.delete(t)}mkdtemp(e){this.touched=!0;for(let t=0;t<100;t++){let t=`_${String(this.mkdtempCounter).padStart(6,`0`)}`;this.mkdtempCounter++;let n=$(e+t);if(!this.tree.has(n))return this.mkdir(n,!0),n}throw Error(`mkdtemp: failed to create unique directory after 100 attempts`)}getMutations(){let e=[],t=[],n=[];for(let[r,i]of this.tree.entries()){if(r===`/`)continue;if(!this.initialPaths.has(r)){e.push({path:r,content:i.content,isDirectory:i.isDirectory});continue}let a=this.initialIsDirectory.get(r);if(a!==void 0&&a!==i.isDirectory){n.push(r),e.push({path:r,content:i.content,isDirectory:i.isDirectory});continue}if(!i.isDirectory){let e=this.initialContent.get(r);e&&!ya(e,i.content)&&t.push({path:r,content:i.content})}}for(let e of this.initialPaths)e!==`/`&&(this.tree.has(e)||n.push(e));return{created:e,modified:t,deleted:n}}};function xa(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t<0?``:t===0?`/`:e.substring(0,t)}var Sa=class extends Error{code;constructor(e){super(`Process exited with code ${e}`),this.code=e,this.name=`NodeExitError`}};function Ca(e){if(typeof e==`string`)return e;if(e==null)return String(e);try{return JSON.stringify(e)}catch{return String(e)}}async function wa(e,t){let n;try{n=await e.call(`vfs`,`snapshot`,[t])}catch{n={entries:[]}}return new ba(n)}function Ta(e){return{usbBridge:ho(e),serialBridge:_o(e),hidBridge:yo(e)}}async function Ea(e,t){let n=[],r=[],i=e=>{n.push(typeof e==`string`?e:String(e))},a=e=>{r.push(typeof e==`string`?e:String(e))},o=ka(i,a),{processShim:s,getDidCallProcessExit:c}=Aa(e,i,a),l=!!e.env?.NO_COLOR,u=Dr({isTTY:!l,noColor:l}),d=Tr({writeStdout:i,writeStderr:a,exit:e=>{throw new Sa(e)},color:u}),f=new ca(t),p=Ra(f,w),h=await wa(f,e.cwd);Object.assign(p,za(h,e.cwd));let g=Ma(f,h,e.cwd),_=Fa(g,{cwd:e.cwd}),v=ha({argv:e.argv,fs:p,exec:g}),y=Qa(f),{usbBridge:b,serialBridge:x,hidBridge:S}=Ta(f),C=m({fetch:w});async function w(e,t){let n=e instanceof Request?e.url:e instanceof URL?e.toString():String(e),r=await f.call(`fetch`,`request`,[n,Za(t,e)]),i=r.body.byteLength===0?null:r.body.buffer.slice(r.body.byteOffset,r.body.byteOffset+r.body.byteLength),a=new Response(i,{status:r.status,statusText:r.statusText,headers:r.headers});return Object.defineProperty(a,"url",{value:r.url||n}),a}let T=Ia({exec:g,agent:_,skill:v,http:C,browser:y,usb:b,serial:x,hid:S,cli:d,color:u}),E=e.filename,D=xa(E),O=await Ha(f,e.code,e.cwd,E),k=Wa({graph:O,fsBridge:p,processShim:s,childProcess:aa(g),nodeConsole:o,sliccyModules:T}).require,A={exports:{},filename:e.filename},j=O.entrySource!==void 0,ee=O.entrySource??e.code,te=globalThis;te.__slicc_compileWasm=e=>f.call(`wasm`,`compile`,[e]);let ne=await Xa(ee,{process:s,console:o,require:k,module:A,exports:A.exports,fetch:w,__dirname:D,__filename:E},a,j);await Da(f,h,a),c()||await Oa(f),delete te.__slicc_compileWasm,f.dispose(),t.postMessage({type:`realm-done`,stdout:n.join(``),stderr:r.join(``),exitCode:ne})}async function Da(e,t,n){let r=t.getMutations();if(r.created.length||r.modified.length||r.deleted.length)try{await e.call(`vfs`,`flushWrites`,[r])}catch(e){n(`[sync-fs] flush failed: ${e instanceof Error?e.message:String(e)}\n`)}}async function Oa(e){let t=Date.now()+1e3,n=0;do await new Promise(e=>setTimeout(e,0)),n++;while(e.pendingCount>0&&n<50&&Date.now()<t)}function ka(e,t){return{log:(...t)=>e(`${t.map(Ca).join(` `)}
|
|
46
46
|
`),info:(...t)=>e(`${t.map(Ca).join(` `)}
|
|
47
47
|
`),warn:(...e)=>t(`${e.map(Ca).join(` `)}
|
|
48
48
|
`),error:(...e)=>t(`${e.map(Ca).join(` `)}
|
|
49
|
-
`)}}function Aa(e,t,n){let r=!!e.env?.NO_COLOR,i=
|
|
50
|
-
`:``}${e}`);try{return await s(...a),0}catch(e){return e instanceof Sa?e.code:(n(`${e instanceof Error?e.stack??e.message:String(e)}\n`),1)}}function
|
|
49
|
+
`)}}function Aa(e,t,n){let r=!!e.env?.NO_COLOR,i=La(e.stdin??``),a=wr(e.argv),o=!1;return{processShim:{argv:a,env:e.env,cwd:()=>e.cwd,exit:e=>{throw o=!0,new Sa(Number.isFinite(e)?Number(e):0)},stdin:i,stdout:{write:t,isTTY:!r},stderr:{write:n,isTTY:!r}},getDidCallProcessExit:()=>o}}function ja(e){return e===`SIGKILL`?137:e===`SIGINT`?130:143}function Ma(e,t,n){let r=async()=>{if(!t?.wasUsed())return;let n=t.getMutations();(n.created.length||n.modified.length||n.deleted.length)&&await e.call(`vfs`,`flushWrites`,[n]),t.resetBaseline()},i=async(r=!1)=>{if(t?.wasUsed())try{let i=await e.call(`vfs`,`snapshot`,[n]);r?t.applySnapshotPreservingMutations(i):t.applySnapshot(i)}catch{}},a=async t=>{await r();try{return await e.call(`exec`,`run`,[t])}finally{await i()}},o=async t=>{await r();try{return await e.call(`exec`,`spawn`,[t])}finally{await i()}},s=1,c=Object.assign(a,{spawn:o,start:(t,n)=>{let a=s++,o=[],c=!1,l=!1,u=!1,d,f,p=new Promise((e,t)=>{d=e,f=t}),m=()=>{if(c||u||l)return;l=!0;let s=o.length>0?o.join(``):n?.stdin,p={};s!==void 0&&(p.stdin=s),n?.stdinKind!==void 0&&(p.stdinKind=n.stdinKind),n?.args!==void 0&&(p.args=n.args),(async()=>{try{if(await r(),u){await i(!0);return}c=!0;let n=await e.call(`exec`,`start`,[a,t,p]);await i(!0),d(n)}catch(e){await i(!0),f(e)}})()};return{kill:t=>c?e.call(`exec`,`kill`,[a,t]):(u=!0,d({stdout:``,stderr:``,exitCode:ja(t)}),Promise.resolve(!0)),stdin:{write:e=>{!c&&!u&&o.push(e)},end:()=>m()},done:p}}});return c.exec=c,c}function Na(e){let t=new TextEncoder().encode(e),n=``;for(let e=0;e<t.length;e++)n+=String.fromCharCode(t[e]);return btoa(n)}function Pa(e,t,n){let r=[];t.model&&r.push(`--model`,String(t.model)),t.thinking&&r.push(`--thinking`,String(t.thinking)),t.schema&&r.push(`--schema-b64`,Na(JSON.stringify(t.schema)));let i=t.readOnly===void 0?`/workspace/`:Array.isArray(t.readOnly)?t.readOnly.join(`,`):String(t.readOnly),a=t.cwd===void 0?n||`.`:String(t.cwd),o=t.allowedCommands===void 0?`*`:String(t.allowedCommands);return[`agent`,...r,`--read-only`,i,a,o,String(e)]}function Fa(e,t){let n=t.cwd,r=async(t,r)=>{let i=r??{},a=await e.spawn(Pa(t,i,n)),o=typeof a.exitCode==`number`?a.exitCode:0;return{finalText:String(a.stdout??``).replace(/\n+$/,``),exitCode:o,stderr:String(a.stderr??``).replace(/\n+$/,``)}},i=(async(e,t)=>{let n=t??{},i=await r(e,n);if(i.exitCode!==0)throw Error(`agent: exited with code ${i.exitCode}${i.stderr?`: ${i.stderr}`:``}`);if(n.schema)try{return JSON.parse(i.finalText)}catch{throw Error(`agent: schema response was not valid JSON (exit ${i.exitCode}): ${i.finalText.slice(0,200)}`)}return i.finalText});return i.spawn=r,i}function Ia(e){return{...e,time:jr,fmt:Br,pool:Vr}}function La(e){let t=!1;return{isTTY:!1,read(){return t?null:(t=!0,e)},toString(){return e},[Symbol.asyncIterator](){return{async next(){return t?{value:void 0,done:!0}:(t=!0,{value:e,done:!1})}}}}}function Ra(e,t){function n(e){if(e instanceof Uint8Array)return e;if(ArrayBuffer.isView(e)){let t=e;return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}return e instanceof ArrayBuffer?new Uint8Array(e):new TextEncoder().encode(typeof e==`string`?e:String(e))}async function r(t,n){let r=typeof n==`string`?n:n?.encoding;if(r===null||r===`buffer`){let n=await e.call(`vfs`,`readFileBinary`,[t]),r=globalThis.Buffer;return r?r.from(n instanceof Uint8Array?n:new Uint8Array(n)):n}return e.call(`vfs`,`readFile`,[t])}async function i(t,r){return typeof r==`string`?e.call(`vfs`,`writeFile`,[t,r]):e.call(`vfs`,`writeFileBinary`,[t,n(r)])}async function a(t,r){let i=new Uint8Array;if(await e.call(`vfs`,`exists`,[t])){let n=await e.call(`vfs`,`readFileBinary`,[t]);i=n instanceof Uint8Array?n:new Uint8Array(n)}let a=n(r),o=new Uint8Array(i.byteLength+a.byteLength);o.set(i),o.set(a,i.byteLength),await e.call(`vfs`,`writeFileBinary`,[t,o])}async function o(t,n,r){let i=await e.call(`vfs`,`stat`,[t]);if(i.isFile){let r=await e.call(`vfs`,`readFileBinary`,[t]);await e.call(`vfs`,`writeFileBinary`,[n,r]);return}if(!i.isDirectory||!r?.recursive)throw Error(`cp: '${t}' is a directory (use {recursive: true})`);await c(n);let a=await e.call(`vfs`,`readDir`,[t]);for(let e of a)await o(`${t}/${e}`,`${n}/${e}`,r)}async function s(t,n){if(n?.force&&!await e.call(`vfs`,`exists`,[t]))return!0;if((await e.call(`vfs`,`stat`,[t])).isFile)return e.call(`vfs`,`rm`,[t]);if(!n?.recursive)throw Error(`rm: '${t}' is a directory (use {recursive: true})`);let r=await e.call(`vfs`,`readDir`,[t]);for(let e of r)await s(`${t}/${e}`,n);return e.call(`vfs`,`rm`,[t])}async function c(t){await e.call(`vfs`,`mkdir`,[t])}async function l(t){for(let n=0;n<5;n++){let n=`${t}${Math.random().toString(36).slice(2,10)+Math.random().toString(36).slice(2,6)}`;if(!await e.call(`vfs`,`exists`,[n]))return await e.call(`vfs`,`mkdir`,[n]),n}throw Error(`mkdtemp: failed to create unique directory after 5 attempts`)}async function u(t,n){try{await e.call(`vfs`,`rename`,[t,n])}catch{let r=await e.call(`vfs`,`readFileBinary`,[t]);await e.call(`vfs`,`writeFileBinary`,[n,r]),await e.call(`vfs`,`rm`,[t])}}async function d(t){if(!await e.call(`vfs`,`exists`,[t]))throw Object.assign(Error(`ENOENT: no such file or directory, access '${t}'`),{code:`ENOENT`})}let f={readFile:r,readFileBinary:t=>e.call(`vfs`,`readFileBinary`,[t]),writeFile:i,writeFileBinary:(t,n)=>e.call(`vfs`,`writeFileBinary`,[t,n]),appendFile:a,cp:o,rm:s,readDir:t=>e.call(`vfs`,`readDir`,[t]),readdir:t=>e.call(`vfs`,`readDir`,[t]),exists:t=>e.call(`vfs`,`exists`,[t]),stat:t=>e.call(`vfs`,`stat`,[t]),mkdir:(t,n)=>e.call(`vfs`,`mkdir`,[t]),mkdtemp:l,rename:u,access:d,unlink:t=>e.call(`vfs`,`rm`,[t]),rmdir:t=>e.call(`vfs`,`rm`,[t]),copyFile:async(t,n)=>{let r=await e.call(`vfs`,`readFileBinary`,[t]);await e.call(`vfs`,`writeFileBinary`,[n,r])},fetchToFile:async(n,r)=>{let i=await t(n);if(!i.ok)throw Error(`fetch ${i.status} ${i.statusText}`);let a=new Uint8Array(await i.arrayBuffer());return await e.call(`vfs`,`writeFileBinary`,[r,a]),a.byteLength},promises:null};return f.promises=f,f}function za(e,t){function n(e){return e.startsWith(`/`)?e:t+(t.endsWith(`/`)?``:`/`)+e}return{readFileSync(t,r){let i=typeof r==`string`?r:r?.encoding,a=e.readFile(n(t));if(i===`utf8`||i===`utf-8`)return new TextDecoder().decode(a);let o=globalThis.Buffer;return o?o.from(a):a},writeFileSync(t,r){let i;i=typeof r==`string`?new TextEncoder().encode(r):r instanceof Uint8Array?r:ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new TextEncoder().encode(String(r)),e.writeFile(n(t),i)},existsSync(t){return e.exists(n(t))},mkdirSync(t,r){e.mkdir(n(t),r?.recursive)},statSync(t){let r=e.stat(n(t));return{isFile:()=>r.isFile,isDirectory:()=>r.isDirectory,size:r.size}},readdirSync(t){return e.readdir(n(t))},rmSync(t,r){let i=n(t);r?.force&&!e.exists(i)||e.rm(i,r?.recursive)},copyFileSync(t,r){e.copyFile(n(t),n(r))},mkdtempSync(t){return e.mkdtemp(n(t))},unlinkSync(t){e.unlink(n(t))},renameSync(t,r){e.rename(n(t),n(r))}}}function Ba(e,t){return e?.startsWith(`/`)?xa(e):t}function Va(e){return e.includes(`require`)||e.includes(`import`)}async function Ha(e,t,n,r){return Va(t)?e.call(`module`,`buildGraph`,[t,Ba(r,n),r]):{files:[],entryMap:{},edges:{},errors:{}}}function Ua(e){if(typeof e!=`object`||!e)return;let t=e;if(t.__esModule&&!Object.prototype.hasOwnProperty.call(t,`default`)&&Object.isExtensible(t))try{Object.defineProperty(t,"default",{value:t,enumerable:!1,configurable:!0})}catch{}}function Wa(e){let{graph:t,fsBridge:n,processShim:r,childProcess:i,nodeConsole:a,sliccyModules:o}=e,s=new Map(t.files.map(e=>[e.path,e.cjsSource])),c=new Map(t.files.map(e=>[e.path,e.kind])),l=new Map,u=e=>{if(typeof e==`string`&&e.startsWith(`sliccy:`))return{hit:!0,value:qa(e,o)};let t=e.startsWith(`node:`)?e.slice(5):e,a=Ga(t,n,r,i);if(a.hit)return a;if(la.has(t))throw da(e,t);if(sa.has(t))throw Ya(e,t);return{hit:!1}},d=(e,n)=>{let r=u(n);if(r.hit)return r.value;let i=e?.[n];if(i)return f(i);throw n in t.errors?Error(t.errors[n]):Ka(n)};function f(e){let n=l.get(e);if(n)return n.exports;let i=s.get(e);if(i===void 0)throw Error(`Cannot find module '${e}'`);let o={exports:{}};l.set(e,o);let u=n=>d(t.edges[e],n),f=xa(e);return Function(`module`,`exports`,`require`,`__dirname`,`__filename`,`process`,`console`,`Buffer`,`global`,i)(o,o.exports,u,f,e,r,a,globalThis.Buffer,globalThis),c.get(e)===`cjs`&&Ua(o.exports),o.exports}return{require:e=>d(t.entryMap,e)}}function Ga(e,t,n,r){return e===`fs`||e===`fs/promises`?{hit:!0,value:t}:e===`path`?{hit:!0,value:Qr}:e===`crypto`?{hit:!0,value:li}:e===`child_process`?{hit:!0,value:r}:e===`process`?{hit:!0,value:n}:e===`buffer`?{hit:!0,value:{Buffer:globalThis.Buffer}}:e===`assert`?{hit:!0,value:yi}:e===`assert/strict`?{hit:!0,value:vi}:e===`util`?{hit:!0,value:Fi}:e===`events`?{hit:!0,value:Ki}:e===`os`?{hit:!0,value:Vi}:e===`stream`?{hit:!0,value:Zi}:e===`url`?{hit:!0,value:Wi}:e===`zlib`?{hit:!0,value:Bi}:{hit:!1}}function Ka(e){if(e.startsWith(`.`)||e.startsWith(`/`)||e.startsWith(`node:`))return Error(`Cannot find module '${e}'`);let t=e.startsWith(`@`)?e.split(`/`).slice(0,2).join(`/`):e.split(`/`)[0];return Error(`Cannot find module '${e}' (run: ipk install ${t})`)}function qa(e,t){let n=e.slice(7);if(n===``)throw Error(`require('sliccy:'): empty sliccy: module name`);if(!Object.prototype.hasOwnProperty.call(t,n))throw Error(`require('${e}'): unknown sliccy: module '${n}'. Known names: ${Object.keys(t).sort().join(`, `)}`);return t[n]}const Ja={http:` Use fetch() instead.`,https:` Use fetch() instead.`,crypto:` Use globalThis.crypto (Web Crypto API) instead.`};function Ya(e,t){return Error(`require('${e}'): Node built-in '${t}' is not available in the browser environment.${Ja[t]||``}`)}async function Xa(e,t,n,r){let i=Object.keys(t),a=i.map(e=>t[e]),o=Object.getPrototypeOf(async function(){}).constructor,s=new o(...i,`${r?`"use strict";
|
|
50
|
+
`:``}${e}`);try{return await s(...a),0}catch(e){return e instanceof Sa?e.code:(n(`${e instanceof Error?e.stack??e.message:String(e)}\n`),1)}}function Za(e,t){if(!e&&!(t instanceof Request))return;let n=t instanceof Request?t:null,r=(e?.method??n?.method??`GET`).toUpperCase(),i={};if(e?.headers)if(e.headers instanceof Headers)e.headers.forEach((e,t)=>{i[t]=e});else if(Array.isArray(e.headers))for(let[t,n]of e.headers)i[t]=n;else Object.assign(i,e.headers);else n&&n.headers.forEach((e,t)=>{i[t]=e});let a;return e?.body!==void 0&&e?.body!==null&&e?.body!==``&&(a=typeof e.body==`string`?e.body:String(e.body)),{method:r,headers:i,body:a}}function Qa(e){return{findTab:t=>e.call(`browser`,`findTab`,[so(t)]),ensureTab:(t,n={})=>e.call(`browser`,`ensureTab`,[t,co(n)]),eval:(t,n)=>e.call(`browser`,`eval`,[$a(t),eo(n,!1)]),evalAsync:(t,n)=>e.call(`browser`,`evalAsync`,[$a(t),eo(n,!0)]),cookie:(t,n)=>e.call(`browser`,`cookie`,[$a(t),n]),localStorage:(t,n)=>e.call(`browser`,`localStorage`,[$a(t),n]),fetch:(t,n,r={})=>oo(n,r).then(n=>e.call(`browser`,`evalAsync`,[$a(t),n])),websocket:lo(e)}}function $a(e){if(typeof e==`string`)return e;if(e&&typeof e==`object`&&typeof e.targetId==`string`)return e.targetId;throw TypeError(`browser: expected a tab handle or targetId string`)}function eo(e,t){if(typeof e==`function`)return`(${e.toString()})()`;if(typeof e==`string`)return e;throw TypeError(`browser.eval/evalAsync: source must be a function or string`)}function to(e){let t=``,n=32768;for(let r=0;r<e.length;r+=n)t+=String.fromCharCode(...Array.from(e.subarray(r,r+n)));return btoa(t)}async function no(e){let t=[];for(let[n,r]of e.entries()){if(typeof r==`string`){t.push({name:n,value:r});continue}let e=new Uint8Array(await r.arrayBuffer());t.push({name:n,file:{data:to(e),filename:typeof r.name==`string`?r.name:`blob`,type:r.type||``}})}return{kind:`formdata`,entries:t}}async function ro(e,t){let n=()=>Object.keys(t).some(e=>e.toLowerCase()===`content-type`);return typeof e==`string`?{body:e}:e instanceof URLSearchParams?(n()||(t[`Content-Type`]=`application/x-www-form-urlencoded;charset=UTF-8`),{body:e.toString()}):e instanceof Blob?{descriptor:{kind:`blob`,data:to(new Uint8Array(await e.arrayBuffer())),type:e.type||``}}:e instanceof ArrayBuffer?{descriptor:{kind:`bytes`,data:to(new Uint8Array(e))}}:ArrayBuffer.isView(e)?{descriptor:{kind:`bytes`,data:to(new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}}:e instanceof FormData?{descriptor:await no(e)}:(n()||(t[`Content-Type`]=`application/json`),{body:JSON.stringify(e)})}function io(e){return e?`const __b64 = (s) => { const bin = atob(s); const n = bin.length; const u = new Uint8Array(n); for (let i = 0; i < n; i++) u[i] = bin.charCodeAt(i); return u; };const __body = `+JSON.stringify(e)+`;if (__body.kind === 'bytes') { __init.body = __b64(__body.data); }else if (__body.kind === 'blob') { __init.body = new Blob([__b64(__body.data)], { type: __body.type }); }else if (__body.kind === 'formdata') { const __fd = new FormData(); for (const e of __body.entries) { if (e.file) { __fd.append(e.name, new Blob([__b64(e.file.data)], { type: e.file.type }), e.file.filename); } else { __fd.append(e.name, e.value); } } __init.body = __fd; }`:``}function ao(e){return`const h = {};r.headers.forEach((v, k) => { h[k] = v; });const ct = r.headers.get('content-type') || '';const __rt = `+JSON.stringify(e??null)+`;const __ctl = ct.toLowerCase();const __binPrefixes = ['image/','audio/','video/','application/octet-stream','application/pdf','application/protobuf','application/x-protobuf','application/wasm','application/zip'];const __isXml = __ctl.indexOf('+xml') !== -1 || __ctl.indexOf('application/xml') === 0 || __ctl.indexOf('text/xml') === 0;const __isBinary = __rt === 'binary' || (__rt !== 'text' && __rt !== 'json' && !__isXml && __binPrefixes.some((p) => __ctl.indexOf(p) === 0));if (__isBinary) {const __u = new Uint8Array(await r.arrayBuffer());let __s = ''; const __cs = 0x8000;for (let __i = 0; __i < __u.length; __i += __cs) { __s += String.fromCharCode.apply(null, __u.subarray(__i, __i + __cs)); }return { ok: r.ok, status: r.status, headers: h, body: btoa(__s), bodyEncoding: 'base64' };}const t = await r.text();let b;const __jsonWanted = __rt === 'json' || (__rt !== 'text' && ct.indexOf('application/json') !== -1);if (__jsonWanted) { if (!t) { b = null; } else { try { b = JSON.parse(t); } catch (e) { b = t; } } }else { b = t; }return { ok: r.ok, status: r.status, headers: h, body: b };`}async function oo(e,t={}){let n={},r=t.headers??{};for(let[e,t]of Object.entries(r))typeof t==`string`&&(n[e]=t);let i=typeof t.method==`string`?t.method:`GET`,a=t.credentials===`same-origin`||t.credentials===`omit`?t.credentials:`include`,o=t.body,{body:s,descriptor:c}=o==null?{}:await ro(o,n),l={method:i,credentials:a,headers:n};s!==void 0&&(l.body=s);for(let e of[`mode`,`cache`,`redirect`,`referrer`,`referrerPolicy`,`integrity`,`keepalive`]){let n=t[e];n!==void 0&&(l[e]=n)}let u=io(c),d=ao(t.responseType);return`(async () => {const __init = `+JSON.stringify(l)+`;`+u+`const r = await fetch(`+JSON.stringify(e)+`, __init);`+d+`})()`}function so(e){let t={};return e.domain!==void 0&&(t.domain=e.domain),e.urlMatch!==void 0&&(t.urlMatch=e.urlMatch instanceof RegExp?e.urlMatch.source:e.urlMatch),t}function co(e){return e.matchUrl===void 0?{}:{matchUrl:e.matchUrl instanceof RegExp?e.matchUrl.source:e.matchUrl}}function lo(e){function t(t){return{...t,async update(n){let r={};return n.urlMatch!==void 0&&(r.urlMatch=n.urlMatch===null?null:n.urlMatch instanceof RegExp?n.urlMatch.source:n.urlMatch),n.filter!==void 0&&(r.filter=n.filter),e.call(`browser`,`wsUpdate`,[t.id,r])},async close(){return e.call(`browser`,`wsClose`,[t.id])}}}return{on(n,r={}){let i=$a(n),a=r.urlMatch===void 0?void 0:r.urlMatch instanceof RegExp?r.urlMatch.source:r.urlMatch,o,s={filter(e){if(typeof e==`function`||typeof e==`string`)throw TypeError(`browser.websocket: filter must be a declarative JSON object, not a function or string`);return o=e,s},async forward(n){return t(await e.call(`browser`,`wsObserve`,[{targetId:i,urlMatch:a,filter:o,forward:n}]))}};return s},async list(){return e.call(`browser`,`wsList`,[])}}}function uo(e){if(e instanceof Uint8Array)return e;if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(e instanceof ArrayBuffer)return new Uint8Array(e);throw TypeError(`expected an ArrayBuffer or typed array`)}function fo(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function po(e){return e==null?[]:Array.isArray(e)?e:[e]}function mo(e,t){let n=t.handle,r=e=>({status:e.status,data:fo(e.bytes)});return{...t,open:()=>e.call(`usb`,`open`,[n]),close:()=>e.call(`usb`,`close`,[n]),reset:()=>e.call(`usb`,`reset`,[n]),selectConfiguration:t=>e.call(`usb`,`selectConfig`,[n,t]),claimInterface:t=>e.call(`usb`,`claim`,[n,t]),releaseInterface:t=>e.call(`usb`,`release`,[n,t]),controlTransferIn:async(t,i)=>r(await e.call(`usb`,`controlIn`,[n,t,i])),controlTransferOut:(t,r)=>e.call(`usb`,`controlOut`,[n,t,uo(r)]),transferIn:async(t,i)=>r(await e.call(`usb`,`transferIn`,[n,t,i])),transferOut:(t,r)=>e.call(`usb`,`transferOut`,[n,t,uo(r)])}}function ho(e){return{list:async()=>(await e.call(`usb`,`list`,[])).map(t=>mo(e,t)),request:async t=>mo(e,await e.call(`usb`,`request`,[po(t)]))}}function go(e,t){let n=t.handle;return{...t,open:t=>e.call(`serial`,`open`,[n,t]),close:()=>e.call(`serial`,`close`,[n]),read:(t={})=>e.call(`serial`,`read`,[n,{maxBytes:t.maxBytes??t.bytes,until:t.until?uo(t.until):void 0,timeoutMs:t.timeoutMs}]),write:t=>e.call(`serial`,`write`,[n,uo(t)]),getSignals:()=>e.call(`serial`,`getSignals`,[n]),setSignals:t=>e.call(`serial`,`setSignals`,[n,t])}}function _o(e){return{list:async()=>(await e.call(`serial`,`list`,[])).map(t=>go(e,t)),request:async t=>go(e,await e.call(`serial`,`request`,[po(t)]))}}function vo(e,t){let n=t.handle,r=new Set,i=new Set,a=!1,o=null,s=e=>{let t=e;if(!t||t.handle!==n)return;let i={reportId:t.reportId,data:fo(t.bytes)};for(let e of[...r])try{e(i)}catch{}},c=()=>{a||(a=!0,o=e.onEvent?e.onEvent(`hid-input-report`,s):null,e.call(`hid`,`subscribeInputReports`,[n]).catch(()=>{a=!1,o?.(),o=null}))},l=()=>{!a||r.size>0||(a=!1,o?.(),o=null,e.call(`hid`,`unsubscribeInputReports`,[n]).catch(()=>{}))};return{...t,open:()=>e.call(`hid`,`open`,[n]),close:()=>e.call(`hid`,`close`,[n]),sendReport:(t,r)=>e.call(`hid`,`sendReport`,[n,t,uo(r)]),sendFeatureReport:(t,r)=>e.call(`hid`,`sendFeatureReport`,[n,t,uo(r)]),receiveFeatureReport:async t=>fo((await e.call(`hid`,`receiveFeatureReport`,[n,t])).bytes),addEventListener(e,t){if(e===`inputreport`)r.add(t),c();else if(e===`disconnect`)i.add(t);else throw TypeError(`hid device: unknown event type '${String(e)}'`)},removeEventListener(e,t){e===`inputreport`?(r.delete(t),l()):e===`disconnect`&&i.delete(t)},onInputReport(e){r.add(e),c()}}}function yo(e){return{list:async()=>(await e.call(`hid`,`list`,[])).map(t=>vo(e,t)),request:async t=>{let n=(await e.call(`hid`,`request`,[po(t)]))[0];if(!n)throw Error(`No device selected.`);return vo(e,n)}}}const bo={postMessage:(e,t)=>t?self.postMessage(e,t):self.postMessage(e),addEventListener:(e,t)=>self.addEventListener(e,t),removeEventListener:(e,t)=>self.removeEventListener(e,t)};self.addEventListener(`message`,e=>{if(e.data?.type!==`realm-init`)return;let t=e.data;t.kind===`js`&&Ea(t,bo).catch(e=>{let t={type:`realm-error`,message:e instanceof Error?e.message:String(e)};self.postMessage(t)})});
|