desi76-uis 0.1.5 → 0.1.6
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/public/_app/immutable/chunks/B4e8ldZ1.js +3 -0
- package/dist/public/_app/immutable/chunks/BfCevhbk.js +1 -0
- package/dist/public/_app/immutable/chunks/{pm0gKOHf.js → C9IY43YA.js} +1 -1
- package/dist/public/_app/immutable/chunks/D4tZZdj9.js +1 -0
- package/dist/public/_app/immutable/chunks/{Cr5YyIwe.js → D8_YqUUk.js} +1 -1
- package/dist/public/_app/immutable/chunks/DLvwgtLG.js +212 -0
- package/dist/public/_app/immutable/chunks/DYqz4rnT.js +11 -0
- package/dist/public/_app/immutable/chunks/DhFgaqj6.js +2 -0
- package/dist/public/_app/immutable/chunks/DsnmJJEf.js +1 -0
- package/dist/public/_app/immutable/chunks/DwPl7Vpi.js +1 -0
- package/dist/public/_app/immutable/chunks/ae-A5H-T.js +1 -0
- package/dist/public/_app/immutable/entry/app.DlIC4sED.js +2 -0
- package/dist/public/_app/immutable/entry/start.DgvYevaH.js +1 -0
- package/dist/public/_app/immutable/nodes/{0.BoCRNJg2.js → 0.dZi2Oe-h.js} +2 -2
- package/dist/public/_app/immutable/nodes/{1.BLJtiaWE.js → 1.TQMJOSdL.js} +1 -1
- package/dist/public/_app/immutable/nodes/2.zRk73zWM.js +1 -0
- package/dist/public/_app/immutable/nodes/3.DsPcrkB-.js +10 -0
- package/dist/public/_app/version.json +1 -1
- package/dist/public/desi76/catamaran.html +20 -20
- package/dist/public/desi76/stairs.html +58 -0
- package/dist/public/desi76/voila.html +20 -20
- package/dist/public/index.html +18 -18
- package/dist/public/pgdsvg/src_stairs.svg +5 -0
- package/dist/public/pgdsvg/stairs_height.svg +1 -0
- package/dist/public/pgdsvg/stairs_spiral.svg +1 -0
- package/dist/public/pgdsvg/stairs_top.svg +3 -0
- package/package.json +6 -6
- package/dist/public/_app/immutable/assets/_layout.BEc07bhm.css +0 -1
- package/dist/public/_app/immutable/assets/_page.BTCojHq8.css +0 -1
- package/dist/public/_app/immutable/assets/_page.DKegludn.css +0 -1
- package/dist/public/_app/immutable/chunks/BJ0Rqg4s.js +0 -1
- package/dist/public/_app/immutable/chunks/BMdDwoOW.js +0 -1
- package/dist/public/_app/immutable/chunks/CGdBQPRq.js +0 -1
- package/dist/public/_app/immutable/chunks/CWgYyrry.js +0 -1
- package/dist/public/_app/immutable/chunks/Ch8Sg1Yb.js +0 -7
- package/dist/public/_app/immutable/chunks/D21nCqkP.js +0 -3
- package/dist/public/_app/immutable/chunks/KsMQ8T7s.js +0 -212
- package/dist/public/_app/immutable/chunks/NZTpNUN0.js +0 -1
- package/dist/public/_app/immutable/chunks/jFB1Qau7.js +0 -1
- package/dist/public/_app/immutable/entry/app.rWHD6Emv.js +0 -2
- package/dist/public/_app/immutable/entry/start.DoneUc4T.js +0 -1
- package/dist/public/_app/immutable/nodes/2.BXQOtzzs.js +0 -1
- package/dist/public/_app/immutable/nodes/3.CjkLacQ9.js +0 -10
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import{ar as ea,C as ta,as as Ci,Z as or,D as ht,N as na,E as ra,P as as,a9 as sa,V as ia,X as oa,Y as us,_ as ar,M as en,at as aa,au as ua,$ as Ei,J as Fi,a0 as ca,av as ur,aw as Si,a4 as la,ad as cs,ax as jr,ay as ls,az as Wr,al as fa,aA as fs,j as da,aB as pa,aC as ha,aD as ma,aE as xa,L as Da,aF as ga,aG as wa,aH as ya,aI as ba,aJ as _a,aK as Aa,aL as va,aM as Ca}from"./CGdBQPRq.js";function Fl(t,e){return e}function Ea(t,e,n,r){for(var s=[],i=e.length,o=0;o<i;o++)ha(e[o].e,s,!0);var a=i>0&&s.length===0&&n!==null;if(a){var u=n.parentNode;ma(u),u.append(n),r.clear(),kt(t,e[0].prev,e[i-1].next)}xa(s,()=>{for(var l=0;l<i;l++){var c=e[l];a||(r.delete(c.k),kt(t,c.prev,c.next)),Da(c.e,!a)}})}function Sl(t,e,n,r,s,i=null){var o=t,a={flags:e,items:new Map,first:null},u=(e&Ci)!==0;if(u){var l=t;o=ht?or(na(l)):l.appendChild(ea())}ht&&ra();var c=null,m=!1,h=sa(()=>{var x=n();return da(x)?x:x==null?[]:Si(x)});ta(()=>{var x=as(h),y=x.length;if(m&&y===0)return;m=y===0;let f=!1;if(ht){var d=ia(o)===oa;d!==(y===0)&&(o=us(),or(o),ar(!1),f=!0)}if(ht){for(var p=null,D,g=0;g<y;g++){if(en.nodeType===aa&&en.data===ua){o=en,f=!0,ar(!1);break}var _=x[g],w=r(_,g);D=ki(en,a,p,null,_,w,g,s,e,n),a.items.set(w,D),p=D}y>0&&or(us())}ht||Fa(x,a,o,s,e,r,n),i!==null&&(y===0?c?Ei(c):c=Fi(()=>i(o)):c!==null&&ca(c,()=>{c=null})),f&&ar(!0),as(h)}),ht&&(o=en)}function Fa(t,e,n,r,s,i,o){var a=(s&pa)!==0,u=(s&(jr|Wr))!==0,l=t.length,c=e.items,m=e.first,h=m,x,y=null,f,d=[],p=[],D,g,_,w;if(a)for(w=0;w<l;w+=1)D=t[w],g=i(D,w),_=c.get(g),_!==void 0&&(_.a?.measure(),(f??=new Set).add(_));for(w=0;w<l;w+=1){if(D=t[w],g=i(D,w),_=c.get(g),_===void 0){var b=h?h.e.nodes_start:n;y=ki(b,e,y,y===null?e.first:y.next,D,g,w,r,s,o),c.set(g,y),d=[],p=[],h=y.next;continue}if(u&&Sa(_,D,w,s),(_.e.f&ur)!==0&&(Ei(_.e),a&&(_.a?.unfix(),(f??=new Set).delete(_))),_!==h){if(x!==void 0&&x.has(_)){if(d.length<p.length){var v=p[0],A;y=v.prev;var E=d[0],k=d[d.length-1];for(A=0;A<d.length;A+=1)ds(d[A],v,n);for(A=0;A<p.length;A+=1)x.delete(p[A]);kt(e,E.prev,k.next),kt(e,y,E),kt(e,k,v),h=v,y=k,w-=1,d=[],p=[]}else x.delete(_),ds(_,h,n),kt(e,_.prev,_.next),kt(e,_,y===null?e.first:y.next),kt(e,y,_),y=_;continue}for(d=[],p=[];h!==null&&h.k!==g;)(h.e.f&ur)===0&&(x??=new Set).add(h),p.push(h),h=h.next;if(h===null)continue;_=h}d.push(_),y=_,h=_.next}if(h!==null||x!==void 0){for(var F=x===void 0?[]:Si(x);h!==null;)(h.e.f&ur)===0&&F.push(h),h=h.next;var L=F.length;if(L>0){var M=(s&Ci)!==0&&l===0?n:null;if(a){for(w=0;w<L;w+=1)F[w].a?.measure();for(w=0;w<L;w+=1)F[w].a?.fix()}Ea(e,F,M,c)}}a&&la(()=>{if(f!==void 0)for(_ of f)_.a?.apply()}),cs.first=e.first&&e.first.e,cs.last=y&&y.e}function Sa(t,e,n,r){(r&jr)!==0&&ls(t.v,e),(r&Wr)!==0?ls(t.i,n):t.i=n}function ki(t,e,n,r,s,i,o,a,u,l){var c=(u&jr)!==0,m=(u&ga)===0,h=c?m?fa(s,!1,!1):fs(s):s,x=(u&Wr)===0?o:fs(o),y={i:x,v:h,k:i,a:null,e:null,prev:n,next:r};try{return y.e=Fi(()=>a(t,h,x,l),ht),y.e.prev=n&&n.e,y.e.next=r&&r.e,n===null?e.first=y:(n.next=y,n.e.next=y.e),r!==null&&(r.prev=y,r.e.prev=y.e),y}finally{}}function ds(t,e,n){for(var r=t.next?t.next.e.nodes_start:n,s=e?e.e.nodes_start:n,i=t.e.nodes_start;i!==r;){var o=wa(i);s.before(i),i=o}}function kt(t,e,n){e===null?t.first=n:(e.next=n,e.e.next=n&&n.e),n!==null&&(n.prev=e,n.e.prev=e&&e.e)}const ka=Symbol("is custom element"),Ta=Symbol("is html");function kl(t){if(ht){var e=!1,n=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var r=t.value;ps(t,"value",null),t.value=r}if(t.hasAttribute("checked")){var s=t.checked;ps(t,"checked",null),t.checked=s}}};t.__on_r=n,va(n),Ca()}}function Tl(t,e){var n=Hr(t);n.value===(n.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function Pl(t,e){var n=Hr(t);n.checked!==(n.checked=e)&&(t.checked=e)}function ps(t,e,n,r){var s=Hr(t);ht&&(s[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||s[e]!==(s[e]=n)&&(e==="loading"&&(t[ya]=n),n==null?t.removeAttribute(e):typeof n!="string"&&Pa(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function Hr(t){return t.__attributes??={[ka]:t.nodeName.includes("-"),[Ta]:t.namespaceURI===ba}}var hs=new Map;function Pa(t){var e=hs.get(t.nodeName);if(e)return e;hs.set(t.nodeName,e=[]);for(var n,r=t,s=Element.prototype;s!==r;){n=Aa(r);for(var i in n)n[i].set&&e.push(i);r=_a(r)}return e}const ln=15,Er=30,Fr=19,Ba=29,Rn=256,Yr=Rn+1+Ba,ms=2*Yr+1,tn=256,Ma=7,xs=16,Ds=17,gs=18,cr=8*2,Un=-1,Ia=1,bn=2,La=0,Yt=0,ws=1,$a=3,ke=4,ze=0,Ti=1,_n=2,Qe=-2,Oa=-3,Wt=-5;function Gn(t){return Zn(t.map(([e,n])=>new Array(e).fill(n,0,e)))}function Zn(t){return t.reduce((e,n)=>e.concat(Array.isArray(n)?Zn(n):n),[])}const ys=[0,1,2,3].concat(...Gn([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function ie(){const t=this;function e(s){const i=t.dyn_tree,o=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,u=t.stat_desc.extra_base,l=t.stat_desc.max_length;let c,m,h,x,y,f,d=0;for(x=0;x<=ln;x++)s.bl_count[x]=0;for(i[s.heap[s.heap_max]*2+1]=0,c=s.heap_max+1;c<ms;c++)m=s.heap[c],x=i[i[m*2+1]*2+1]+1,x>l&&(x=l,d++),i[m*2+1]=x,!(m>t.max_code)&&(s.bl_count[x]++,y=0,m>=u&&(y=a[m-u]),f=i[m*2],s.opt_len+=f*(x+y),o&&(s.static_len+=f*(o[m*2+1]+y)));if(d!==0){do{for(x=l-1;s.bl_count[x]===0;)x--;s.bl_count[x]--,s.bl_count[x+1]+=2,s.bl_count[l]--,d-=2}while(d>0);for(x=l;x!==0;x--)for(m=s.bl_count[x];m!==0;)h=s.heap[--c],!(h>t.max_code)&&(i[h*2+1]!=x&&(s.opt_len+=(x-i[h*2+1])*i[h*2],i[h*2+1]=x),m--)}}function n(s,i){let o=0;do o|=s&1,s>>>=1,o<<=1;while(--i>0);return o>>>1}function r(s,i,o){const a=[];let u=0,l,c,m;for(l=1;l<=ln;l++)a[l]=u=u+o[l-1]<<1;for(c=0;c<=i;c++)m=s[c*2+1],m!==0&&(s[c*2]=n(a[m]++,m))}t.build_tree=function(s){const i=t.dyn_tree,o=t.stat_desc.static_tree,a=t.stat_desc.elems;let u,l,c=-1,m;for(s.heap_len=0,s.heap_max=ms,u=0;u<a;u++)i[u*2]!==0?(s.heap[++s.heap_len]=c=u,s.depth[u]=0):i[u*2+1]=0;for(;s.heap_len<2;)m=s.heap[++s.heap_len]=c<2?++c:0,i[m*2]=1,s.depth[m]=0,s.opt_len--,o&&(s.static_len-=o[m*2+1]);for(t.max_code=c,u=Math.floor(s.heap_len/2);u>=1;u--)s.pqdownheap(i,u);m=a;do u=s.heap[1],s.heap[1]=s.heap[s.heap_len--],s.pqdownheap(i,1),l=s.heap[1],s.heap[--s.heap_max]=u,s.heap[--s.heap_max]=l,i[m*2]=i[u*2]+i[l*2],s.depth[m]=Math.max(s.depth[u],s.depth[l])+1,i[u*2+1]=i[l*2+1]=m,s.heap[1]=m++,s.pqdownheap(i,1);while(s.heap_len>=2);s.heap[--s.heap_max]=s.heap[1],e(s),r(i,t.max_code,s.bl_count)}}ie._length_code=[0,1,2,3,4,5,6,7].concat(...Gn([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));ie.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];ie.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];ie.d_code=function(t){return t<256?ys[t]:ys[256+(t>>>7)]};ie.extra_lbits=[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];ie.extra_dbits=[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];ie.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];ie.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function _e(t,e,n,r,s){const i=this;i.static_tree=t,i.extra_bits=e,i.extra_base=n,i.elems=r,i.max_length=s}const Na=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],Ra=Gn([[144,8],[112,9],[24,7],[8,8]]);_e.static_ltree=Zn(Na.map((t,e)=>[t,Ra[e]]));const Ua=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],Va=Gn([[30,5]]);_e.static_dtree=Zn(Ua.map((t,e)=>[t,Va[e]]));_e.static_l_desc=new _e(_e.static_ltree,ie.extra_lbits,Rn+1,Yr,ln);_e.static_d_desc=new _e(_e.static_dtree,ie.extra_dbits,0,Er,ln);_e.static_bl_desc=new _e(null,ie.extra_blbits,0,Fr,Ma);const qa=9,ja=8;function rt(t,e,n,r,s){const i=this;i.good_length=t,i.max_lazy=e,i.nice_length=n,i.max_chain=r,i.func=s}const Pi=0,In=1,Nt=2,Ke=[new rt(0,0,0,0,Pi),new rt(4,4,8,4,In),new rt(4,5,16,8,In),new rt(4,6,32,32,In),new rt(4,4,16,16,Nt),new rt(8,16,32,32,Nt),new rt(8,16,128,128,Nt),new rt(8,32,128,256,Nt),new rt(32,128,258,1024,Nt),new rt(32,258,258,4096,Nt)],An=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Re=0,vn=1,nn=2,Cn=3,Wa=32,lr=42,En=113,rn=666,fr=8,Ha=0,dr=1,Ya=2,ae=3,Ln=258,$e=Ln+ae+1;function bs(t,e,n,r){const s=t[e*2],i=t[n*2];return s<i||s==i&&r[e]<=r[n]}function Ga(){const t=this;let e,n,r,s,i,o,a,u,l,c,m,h,x,y,f,d,p,D,g,_,w,b,v,A,E,k,F,L,M,U,O,I,V;const N=new ie,le=new ie,R=new ie;t.depth=[];let de,j,G,Se,ge,pe;t.bl_count=[],t.heap=[],O=[],I=[],V=[];function lt(){l=2*i,m[x-1]=0;for(let C=0;C<x-1;C++)m[C]=0;k=Ke[F].max_lazy,M=Ke[F].good_length,U=Ke[F].nice_length,E=Ke[F].max_chain,w=0,p=0,v=0,D=A=ae-1,_=0,h=0}function tt(){let C;for(C=0;C<Yr;C++)O[C*2]=0;for(C=0;C<Er;C++)I[C*2]=0;for(C=0;C<Fr;C++)V[C*2]=0;O[tn*2]=1,t.opt_len=t.static_len=0,j=G=0}function yt(){N.dyn_tree=O,N.stat_desc=_e.static_l_desc,le.dyn_tree=I,le.stat_desc=_e.static_d_desc,R.dyn_tree=V,R.stat_desc=_e.static_bl_desc,ge=0,pe=0,Se=8,tt()}t.pqdownheap=function(C,P){const T=t.heap,B=T[P];let $=P<<1;for(;$<=t.heap_len&&($<t.heap_len&&bs(C,T[$+1],T[$],t.depth)&&$++,!bs(C,B,T[$],t.depth));)T[P]=T[$],P=$,$<<=1;T[P]=B};function bt(C,P){let T=-1,B,$=C[0*2+1],q=0,z=7,ve=4;$===0&&(z=138,ve=3),C[(P+1)*2+1]=65535;for(let Xe=0;Xe<=P;Xe++)B=$,$=C[(Xe+1)*2+1],!(++q<z&&B==$)&&(q<ve?V[B*2]+=q:B!==0?(B!=T&&V[B*2]++,V[xs*2]++):q<=10?V[Ds*2]++:V[gs*2]++,q=0,T=B,$===0?(z=138,ve=3):B==$?(z=6,ve=3):(z=7,ve=4))}function wn(){let C;for(bt(O,N.max_code),bt(I,le.max_code),R.build_tree(t),C=Fr-1;C>=3&&V[ie.bl_order[C]*2+1]===0;C--);return t.opt_len+=3*(C+1)+5+5+4,C}function He(C){t.pending_buf[t.pending++]=C}function ft(C){He(C&255),He(C>>>8&255)}function zt(C){He(C>>8&255),He(C&255&255)}function me(C,P){let T;const B=P;pe>cr-B?(T=C,ge|=T<<pe&65535,ft(ge),ge=T>>>cr-pe,pe+=B-cr):(ge|=C<<pe&65535,pe+=B)}function xe(C,P){const T=C*2;me(P[T]&65535,P[T+1]&65535)}function _t(C,P){let T,B=-1,$,q=C[0*2+1],z=0,ve=7,Xe=4;for(q===0&&(ve=138,Xe=3),T=0;T<=P;T++)if($=q,q=C[(T+1)*2+1],!(++z<ve&&$==q)){if(z<Xe)do xe($,V);while(--z!==0);else $!==0?($!=B&&(xe($,V),z--),xe(xs,V),me(z-3,2)):z<=10?(xe(Ds,V),me(z-3,3)):(xe(gs,V),me(z-11,7));z=0,B=$,q===0?(ve=138,Xe=3):$==q?(ve=6,Xe=3):(ve=7,Xe=4)}}function dt(C,P,T){let B;for(me(C-257,5),me(P-1,5),me(T-4,4),B=0;B<T;B++)me(V[ie.bl_order[B]*2+1],3);_t(O,C-1),_t(I,P-1)}function Ye(){pe==16?(ft(ge),ge=0,pe=0):pe>=8&&(He(ge&255),ge>>>=8,pe-=8)}function Ge(){me(dr<<1,3),xe(tn,_e.static_ltree),Ye(),1+Se+10-pe<9&&(me(dr<<1,3),xe(tn,_e.static_ltree),Ye()),Se=7}function we(C,P){let T,B,$;if(t.dist_buf[j]=C,t.lc_buf[j]=P&255,j++,C===0?O[P*2]++:(G++,C--,O[(ie._length_code[P]+Rn+1)*2]++,I[ie.d_code(C)*2]++),(j&8191)===0&&F>2){for(T=j*8,B=w-p,$=0;$<Er;$++)T+=I[$*2]*(5+ie.extra_dbits[$]);if(T>>>=3,G<Math.floor(j/2)&&T<Math.floor(B/2))return!0}return j==de-1}function nt(C,P){let T,B,$=0,q,z;if(j!==0)do T=t.dist_buf[$],B=t.lc_buf[$],$++,T===0?xe(B,C):(q=ie._length_code[B],xe(q+Rn+1,C),z=ie.extra_lbits[q],z!==0&&(B-=ie.base_length[q],me(B,z)),T--,q=ie.d_code(T),xe(q,P),z=ie.extra_dbits[q],z!==0&&(T-=ie.base_dist[q],me(T,z)));while($<j);xe(tn,C),Se=C[tn*2+1]}function Ze(){pe>8?ft(ge):pe>0&&He(ge&255),ge=0,pe=0}function rr(C,P,T){Ze(),Se=8,ft(P),ft(~P),t.pending_buf.set(u.subarray(C,C+P),t.pending),t.pending+=P}function yn(C,P,T){me((Ha<<1)+(T?1:0),3),rr(C,P)}function Qt(C,P,T){let B,$,q=0;F>0?(N.build_tree(t),le.build_tree(t),q=wn(),B=t.opt_len+3+7>>>3,$=t.static_len+3+7>>>3,$<=B&&(B=$)):B=$=P+5,P+4<=B&&C!=-1?yn(C,P,T):$==B?(me((dr<<1)+(T?1:0),3),nt(_e.static_ltree,_e.static_dtree)):(me((Ya<<1)+(T?1:0),3),dt(N.max_code+1,le.max_code+1,q+1),nt(O,I)),tt(),T&&Ze()}function At(C){Qt(p>=0?p:-1,w-p,C),p=w,e.flush_pending()}function sr(){let C,P,T,B;do{if(B=l-v-w,B===0&&w===0&&v===0)B=i;else if(B==-1)B--;else if(w>=i+i-$e){u.set(u.subarray(i,i+i),0),b-=i,w-=i,p-=i,C=x,T=C;do P=m[--T]&65535,m[T]=P>=i?P-i:0;while(--C!==0);C=i,T=C;do P=c[--T]&65535,c[T]=P>=i?P-i:0;while(--C!==0);B+=i}if(e.avail_in===0)return;C=e.read_buf(u,w+v,B),v+=C,v>=ae&&(h=u[w]&255,h=(h<<d^u[w+1]&255)&f)}while(v<$e&&e.avail_in!==0)}function Ko(C){let P=65535,T;for(P>r-5&&(P=r-5);;){if(v<=1){if(sr(),v===0&&C==Yt)return Re;if(v===0)break}if(w+=v,v=0,T=p+P,(w===0||w>=T)&&(v=w-T,w=T,At(!1),e.avail_out===0)||w-p>=i-$e&&(At(!1),e.avail_out===0))return Re}return At(C==ke),e.avail_out===0?C==ke?nn:Re:C==ke?Cn:vn}function ss(C){let P=E,T=w,B,$,q=A;const z=w>i-$e?w-(i-$e):0;let ve=U;const Xe=a,ir=w+Ln;let is=u[T+q-1],os=u[T+q];A>=M&&(P>>=2),ve>v&&(ve=v);do if(B=C,!(u[B+q]!=os||u[B+q-1]!=is||u[B]!=u[T]||u[++B]!=u[T+1])){T+=2,B++;do;while(u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&T<ir);if($=Ln-(ir-T),T=ir-Ln,$>q){if(b=C,q=$,$>=ve)break;is=u[T+q-1],os=u[T+q]}}while((C=c[C&Xe]&65535)>z&&--P!==0);return q<=v?q:v}function Jo(C){let P=0,T;for(;;){if(v<$e){if(sr(),v<$e&&C==Yt)return Re;if(v===0)break}if(v>=ae&&(h=(h<<d^u[w+(ae-1)]&255)&f,P=m[h]&65535,c[w&a]=m[h],m[h]=w),P!==0&&(w-P&65535)<=i-$e&&L!=bn&&(D=ss(P)),D>=ae)if(T=we(w-b,D-ae),v-=D,D<=k&&v>=ae){D--;do w++,h=(h<<d^u[w+(ae-1)]&255)&f,P=m[h]&65535,c[w&a]=m[h],m[h]=w;while(--D!==0);w++}else w+=D,D=0,h=u[w]&255,h=(h<<d^u[w+1]&255)&f;else T=we(0,u[w]&255),v--,w++;if(T&&(At(!1),e.avail_out===0))return Re}return At(C==ke),e.avail_out===0?C==ke?nn:Re:C==ke?Cn:vn}function zo(C){let P=0,T,B;for(;;){if(v<$e){if(sr(),v<$e&&C==Yt)return Re;if(v===0)break}if(v>=ae&&(h=(h<<d^u[w+(ae-1)]&255)&f,P=m[h]&65535,c[w&a]=m[h],m[h]=w),A=D,g=b,D=ae-1,P!==0&&A<k&&(w-P&65535)<=i-$e&&(L!=bn&&(D=ss(P)),D<=5&&(L==Ia||D==ae&&w-b>4096)&&(D=ae-1)),A>=ae&&D<=A){B=w+v-ae,T=we(w-1-g,A-ae),v-=A-1,A-=2;do++w<=B&&(h=(h<<d^u[w+(ae-1)]&255)&f,P=m[h]&65535,c[w&a]=m[h],m[h]=w);while(--A!==0);if(_=0,D=ae-1,w++,T&&(At(!1),e.avail_out===0))return Re}else if(_!==0){if(T=we(0,u[w-1]&255),T&&At(!1),w++,v--,e.avail_out===0)return Re}else _=1,w++,v--}return _!==0&&(T=we(0,u[w-1]&255),_=0),At(C==ke),e.avail_out===0?C==ke?nn:Re:C==ke?Cn:vn}function Qo(C){return C.total_in=C.total_out=0,C.msg=null,t.pending=0,t.pending_out=0,n=En,s=Yt,yt(),lt(),ze}t.deflateInit=function(C,P,T,B,$,q){return B||(B=fr),$||($=ja),q||(q=La),C.msg=null,P==Un&&(P=6),$<1||$>qa||B!=fr||T<9||T>15||P<0||P>9||q<0||q>bn?Qe:(C.dstate=t,o=T,i=1<<o,a=i-1,y=$+7,x=1<<y,f=x-1,d=Math.floor((y+ae-1)/ae),u=new Uint8Array(i*2),c=[],m=[],de=1<<$+6,t.pending_buf=new Uint8Array(de*4),r=de*4,t.dist_buf=new Uint16Array(de),t.lc_buf=new Uint8Array(de),F=P,L=q,Qo(C))},t.deflateEnd=function(){return n!=lr&&n!=En&&n!=rn?Qe:(t.lc_buf=null,t.dist_buf=null,t.pending_buf=null,m=null,c=null,u=null,t.dstate=null,n==En?Oa:ze)},t.deflateParams=function(C,P,T){let B=ze;return P==Un&&(P=6),P<0||P>9||T<0||T>bn?Qe:(Ke[F].func!=Ke[P].func&&C.total_in!==0&&(B=C.deflate(ws)),F!=P&&(F=P,k=Ke[F].max_lazy,M=Ke[F].good_length,U=Ke[F].nice_length,E=Ke[F].max_chain),L=T,B)},t.deflateSetDictionary=function(C,P,T){let B=T,$,q=0;if(!P||n!=lr)return Qe;if(B<ae)return ze;for(B>i-$e&&(B=i-$e,q=T-B),u.set(P.subarray(q,q+B),0),w=B,p=B,h=u[0]&255,h=(h<<d^u[1]&255)&f,$=0;$<=B-ae;$++)h=(h<<d^u[$+(ae-1)]&255)&f,c[$&a]=m[h],m[h]=$;return ze},t.deflate=function(C,P){let T,B,$,q,z;if(P>ke||P<0)return Qe;if(!C.next_out||!C.next_in&&C.avail_in!==0||n==rn&&P!=ke)return C.msg=An[_n-Qe],Qe;if(C.avail_out===0)return C.msg=An[_n-Wt],Wt;if(e=C,q=s,s=P,n==lr&&(B=fr+(o-8<<4)<<8,$=(F-1&255)>>1,$>3&&($=3),B|=$<<6,w!==0&&(B|=Wa),B+=31-B%31,n=En,zt(B)),t.pending!==0){if(e.flush_pending(),e.avail_out===0)return s=-1,ze}else if(e.avail_in===0&&P<=q&&P!=ke)return e.msg=An[_n-Wt],Wt;if(n==rn&&e.avail_in!==0)return C.msg=An[_n-Wt],Wt;if(e.avail_in!==0||v!==0||P!=Yt&&n!=rn){switch(z=-1,Ke[F].func){case Pi:z=Ko(P);break;case In:z=Jo(P);break;case Nt:z=zo(P);break}if((z==nn||z==Cn)&&(n=rn),z==Re||z==nn)return e.avail_out===0&&(s=-1),ze;if(z==vn){if(P==ws)Ge();else if(yn(0,0,!1),P==$a)for(T=0;T<x;T++)m[T]=0;if(e.flush_pending(),e.avail_out===0)return s=-1,ze}}return P!=ke?ze:Ti}}function Bi(){const t=this;t.next_in_index=0,t.next_out_index=0,t.avail_in=0,t.total_in=0,t.avail_out=0,t.total_out=0}Bi.prototype={deflateInit(t,e){const n=this;return n.dstate=new Ga,e||(e=ln),n.dstate.deflateInit(n,t,e)},deflate(t){const e=this;return e.dstate?e.dstate.deflate(e,t):Qe},deflateEnd(){const t=this;if(!t.dstate)return Qe;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):Qe},deflateSetDictionary(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):Qe},read_buf(t,e,n){const r=this;let s=r.avail_in;return s>n&&(s=n),s===0?0:(r.avail_in-=s,t.set(r.next_in.subarray(r.next_in_index,r.next_in_index+s),e),r.next_in_index+=s,r.total_in+=s,s)},flush_pending(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),e!==0&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,t.dstate.pending===0&&(t.dstate.pending_out=0))}};function Za(t){const e=this,n=new Bi,r=Xa(t&&t.chunkSize?t.chunkSize:64*1024),s=Yt,i=new Uint8Array(r);let o=t?t.level:Un;typeof o>"u"&&(o=Un),n.deflateInit(o),n.next_out=i,e.append=function(a,u){let l,c,m=0,h=0,x=0;const y=[];if(a.length){n.next_in_index=0,n.next_in=a,n.avail_in=a.length;do{if(n.next_out_index=0,n.avail_out=r,l=n.deflate(s),l!=ze)throw new Error("deflating: "+n.msg);n.next_out_index&&(n.next_out_index==r?y.push(new Uint8Array(i)):y.push(i.subarray(0,n.next_out_index))),x+=n.next_out_index,u&&n.next_in_index>0&&n.next_in_index!=m&&(u(n.next_in_index),m=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return y.length>1?(c=new Uint8Array(x),y.forEach(function(f){c.set(f,h),h+=f.length})):c=y[0]?new Uint8Array(y[0]):new Uint8Array,c}},e.flush=function(){let a,u,l=0,c=0;const m=[];do{if(n.next_out_index=0,n.avail_out=r,a=n.deflate(ke),a!=Ti&&a!=ze)throw new Error("deflating: "+n.msg);r-n.avail_out>0&&m.push(i.slice(0,n.next_out_index)),c+=n.next_out_index}while(n.avail_in>0||n.avail_out===0);return n.deflateEnd(),u=new Uint8Array(c),m.forEach(function(h){u.set(h,l),l+=h.length}),u}}function Xa(t){return t+5*(Math.floor(t/16383)+1)}const Ka=15,ee=0,xt=1,Ja=2,Pe=-2,oe=-3,_s=-4,Dt=-5,Ne=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Mi=1440,za=0,Qa=4,eu=9,tu=5,nu=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ru=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],su=[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],iu=[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,112,112],ou=[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],au=[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],vt=15;function Sr(){const t=this;let e,n,r,s,i,o;function a(l,c,m,h,x,y,f,d,p,D,g){let _,w,b,v,A,E,k,F,L,M,U,O,I,V,N;M=0,A=m;do r[l[c+M]]++,M++,A--;while(A!==0);if(r[0]==m)return f[0]=-1,d[0]=0,ee;for(F=d[0],E=1;E<=vt&&r[E]===0;E++);for(k=E,F<E&&(F=E),A=vt;A!==0&&r[A]===0;A--);for(b=A,F>A&&(F=A),d[0]=F,V=1<<E;E<A;E++,V<<=1)if((V-=r[E])<0)return oe;if((V-=r[A])<0)return oe;for(r[A]+=V,o[1]=E=0,M=1,I=2;--A!==0;)o[I]=E+=r[M],I++,M++;A=0,M=0;do(E=l[c+M])!==0&&(g[o[E]++]=A),M++;while(++A<m);for(m=o[b],o[0]=A=0,M=0,v=-1,O=-F,i[0]=0,U=0,N=0;k<=b;k++)for(_=r[k];_--!==0;){for(;k>O+F;){if(v++,O+=F,N=b-O,N=N>F?F:N,(w=1<<(E=k-O))>_+1&&(w-=_+1,I=k,E<N))for(;++E<N&&!((w<<=1)<=r[++I]);)w-=r[I];if(N=1<<E,D[0]+N>Mi)return oe;i[v]=U=D[0],D[0]+=N,v!==0?(o[v]=A,s[0]=E,s[1]=F,E=A>>>O-F,s[2]=U-i[v-1]-E,p.set(s,(i[v-1]+E)*3)):f[0]=U}for(s[1]=k-O,M>=m?s[0]=192:g[M]<h?(s[0]=g[M]<256?0:96,s[2]=g[M++]):(s[0]=y[g[M]-h]+16+64,s[2]=x[g[M++]-h]),w=1<<k-O,E=A>>>O;E<N;E+=w)p.set(s,(U+E)*3);for(E=1<<k-1;(A&E)!==0;E>>>=1)A^=E;for(A^=E,L=(1<<O)-1;(A&L)!=o[v];)v--,O-=F,L=(1<<O)-1}return V!==0&&b!=1?Dt:ee}function u(l){let c;for(e||(e=[],n=[],r=new Int32Array(vt+1),s=[],i=new Int32Array(vt),o=new Int32Array(vt+1)),n.length<l&&(n=[]),c=0;c<l;c++)n[c]=0;for(c=0;c<vt+1;c++)r[c]=0;for(c=0;c<3;c++)s[c]=0;i.set(r.subarray(0,vt),0),o.set(r.subarray(0,vt+1),0)}t.inflate_trees_bits=function(l,c,m,h,x){let y;return u(19),e[0]=0,y=a(l,0,19,19,null,null,m,c,h,e,n),y==oe?x.msg="oversubscribed dynamic bit lengths tree":(y==Dt||c[0]===0)&&(x.msg="incomplete dynamic bit lengths tree",y=oe),y},t.inflate_trees_dynamic=function(l,c,m,h,x,y,f,d,p){let D;return u(288),e[0]=0,D=a(m,0,l,257,su,iu,y,h,d,e,n),D!=ee||h[0]===0?(D==oe?p.msg="oversubscribed literal/length tree":D!=_s&&(p.msg="incomplete literal/length tree",D=oe),D):(u(288),D=a(m,l,c,0,ou,au,f,x,d,e,n),D!=ee||x[0]===0&&l>257?(D==oe?p.msg="oversubscribed distance tree":D==Dt?(p.msg="incomplete distance tree",D=oe):D!=_s&&(p.msg="empty distance tree with lengths",D=oe),D):ee)}}Sr.inflate_trees_fixed=function(t,e,n,r){return t[0]=eu,e[0]=tu,n[0]=nu,r[0]=ru,ee};const Fn=0,As=1,vs=2,Cs=3,Es=4,Fs=5,Ss=6,pr=7,ks=8,Sn=9;function uu(){const t=this;let e,n=0,r,s=0,i=0,o=0,a=0,u=0,l=0,c=0,m,h=0,x,y=0;function f(d,p,D,g,_,w,b,v){let A,E,k,F,L,M,U,O,I,V,N,le,R,de,j,G;U=v.next_in_index,O=v.avail_in,L=b.bitb,M=b.bitk,I=b.write,V=I<b.read?b.read-I-1:b.end-I,N=Ne[d],le=Ne[p];do{for(;M<20;)O--,L|=(v.read_byte(U++)&255)<<M,M+=8;if(A=L&N,E=D,k=g,G=(k+A)*3,(F=E[G])===0){L>>=E[G+1],M-=E[G+1],b.win[I++]=E[G+2],V--;continue}do{if(L>>=E[G+1],M-=E[G+1],(F&16)!==0){for(F&=15,R=E[G+2]+(L&Ne[F]),L>>=F,M-=F;M<15;)O--,L|=(v.read_byte(U++)&255)<<M,M+=8;A=L&le,E=_,k=w,G=(k+A)*3,F=E[G];do if(L>>=E[G+1],M-=E[G+1],(F&16)!==0){for(F&=15;M<F;)O--,L|=(v.read_byte(U++)&255)<<M,M+=8;if(de=E[G+2]+(L&Ne[F]),L>>=F,M-=F,V-=R,I>=de)j=I-de,I-j>0&&2>I-j?(b.win[I++]=b.win[j++],b.win[I++]=b.win[j++],R-=2):(b.win.set(b.win.subarray(j,j+2),I),I+=2,j+=2,R-=2);else{j=I-de;do j+=b.end;while(j<0);if(F=b.end-j,R>F){if(R-=F,I-j>0&&F>I-j)do b.win[I++]=b.win[j++];while(--F!==0);else b.win.set(b.win.subarray(j,j+F),I),I+=F,j+=F,F=0;j=0}}if(I-j>0&&R>I-j)do b.win[I++]=b.win[j++];while(--R!==0);else b.win.set(b.win.subarray(j,j+R),I),I+=R,j+=R,R=0;break}else if((F&64)===0)A+=E[G+2],A+=L&Ne[F],G=(k+A)*3,F=E[G];else return v.msg="invalid distance code",R=v.avail_in-O,R=M>>3<R?M>>3:R,O+=R,U-=R,M-=R<<3,b.bitb=L,b.bitk=M,v.avail_in=O,v.total_in+=U-v.next_in_index,v.next_in_index=U,b.write=I,oe;while(!0);break}if((F&64)===0){if(A+=E[G+2],A+=L&Ne[F],G=(k+A)*3,(F=E[G])===0){L>>=E[G+1],M-=E[G+1],b.win[I++]=E[G+2],V--;break}}else return(F&32)!==0?(R=v.avail_in-O,R=M>>3<R?M>>3:R,O+=R,U-=R,M-=R<<3,b.bitb=L,b.bitk=M,v.avail_in=O,v.total_in+=U-v.next_in_index,v.next_in_index=U,b.write=I,xt):(v.msg="invalid literal/length code",R=v.avail_in-O,R=M>>3<R?M>>3:R,O+=R,U-=R,M-=R<<3,b.bitb=L,b.bitk=M,v.avail_in=O,v.total_in+=U-v.next_in_index,v.next_in_index=U,b.write=I,oe)}while(!0)}while(V>=258&&O>=10);return R=v.avail_in-O,R=M>>3<R?M>>3:R,O+=R,U-=R,M-=R<<3,b.bitb=L,b.bitk=M,v.avail_in=O,v.total_in+=U-v.next_in_index,v.next_in_index=U,b.write=I,ee}t.init=function(d,p,D,g,_,w){e=Fn,l=d,c=p,m=D,h=g,x=_,y=w,r=null},t.proc=function(d,p,D){let g,_,w,b=0,v=0,A=0,E,k,F,L;for(A=p.next_in_index,E=p.avail_in,b=d.bitb,v=d.bitk,k=d.write,F=k<d.read?d.read-k-1:d.end-k;;)switch(e){case Fn:if(F>=258&&E>=10&&(d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,D=f(l,c,m,h,x,y,d,p),A=p.next_in_index,E=p.avail_in,b=d.bitb,v=d.bitk,k=d.write,F=k<d.read?d.read-k-1:d.end-k,D!=ee)){e=D==xt?pr:Sn;break}i=l,r=m,s=h,e=As;case As:for(g=i;v<g;){if(E!==0)D=ee;else return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);E--,b|=(p.read_byte(A++)&255)<<v,v+=8}if(_=(s+(b&Ne[g]))*3,b>>>=r[_+1],v-=r[_+1],w=r[_],w===0){o=r[_+2],e=Ss;break}if((w&16)!==0){a=w&15,n=r[_+2],e=vs;break}if((w&64)===0){i=w,s=_/3+r[_+2];break}if((w&32)!==0){e=pr;break}return e=Sn,p.msg="invalid literal/length code",D=oe,d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);case vs:for(g=a;v<g;){if(E!==0)D=ee;else return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);E--,b|=(p.read_byte(A++)&255)<<v,v+=8}n+=b&Ne[g],b>>=g,v-=g,i=c,r=x,s=y,e=Cs;case Cs:for(g=i;v<g;){if(E!==0)D=ee;else return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);E--,b|=(p.read_byte(A++)&255)<<v,v+=8}if(_=(s+(b&Ne[g]))*3,b>>=r[_+1],v-=r[_+1],w=r[_],(w&16)!==0){a=w&15,u=r[_+2],e=Es;break}if((w&64)===0){i=w,s=_/3+r[_+2];break}return e=Sn,p.msg="invalid distance code",D=oe,d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);case Es:for(g=a;v<g;){if(E!==0)D=ee;else return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);E--,b|=(p.read_byte(A++)&255)<<v,v+=8}u+=b&Ne[g],b>>=g,v-=g,e=Fs;case Fs:for(L=k-u;L<0;)L+=d.end;for(;n!==0;){if(F===0&&(k==d.end&&d.read!==0&&(k=0,F=k<d.read?d.read-k-1:d.end-k),F===0&&(d.write=k,D=d.inflate_flush(p,D),k=d.write,F=k<d.read?d.read-k-1:d.end-k,k==d.end&&d.read!==0&&(k=0,F=k<d.read?d.read-k-1:d.end-k),F===0)))return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);d.win[k++]=d.win[L++],F--,L==d.end&&(L=0),n--}e=Fn;break;case Ss:if(F===0&&(k==d.end&&d.read!==0&&(k=0,F=k<d.read?d.read-k-1:d.end-k),F===0&&(d.write=k,D=d.inflate_flush(p,D),k=d.write,F=k<d.read?d.read-k-1:d.end-k,k==d.end&&d.read!==0&&(k=0,F=k<d.read?d.read-k-1:d.end-k),F===0)))return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);D=ee,d.win[k++]=o,F--,e=Fn;break;case pr:if(v>7&&(v-=8,E++,A--),d.write=k,D=d.inflate_flush(p,D),k=d.write,F=k<d.read?d.read-k-1:d.end-k,d.read!=d.write)return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);e=ks;case ks:return D=xt,d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);case Sn:return D=oe,d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);default:return D=Pe,d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D)}},t.free=function(){}}const Ts=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Ht=0,hr=1,Ps=2,Bs=3,Ms=4,Is=5,kn=6,Tn=7,Ls=8,Lt=9;function cu(t,e){const n=this;let r=Ht,s=0,i=0,o=0,a;const u=[0],l=[0],c=new uu;let m=0,h=new Int32Array(Mi*3);const x=0,y=new Sr;n.bitk=0,n.bitb=0,n.win=new Uint8Array(e),n.end=e,n.read=0,n.write=0,n.reset=function(f,d){d&&(d[0]=x),r==kn&&c.free(f),r=Ht,n.bitk=0,n.bitb=0,n.read=n.write=0},n.reset(t,null),n.inflate_flush=function(f,d){let p,D,g;return D=f.next_out_index,g=n.read,p=(g<=n.write?n.write:n.end)-g,p>f.avail_out&&(p=f.avail_out),p!==0&&d==Dt&&(d=ee),f.avail_out-=p,f.total_out+=p,f.next_out.set(n.win.subarray(g,g+p),D),D+=p,g+=p,g==n.end&&(g=0,n.write==n.end&&(n.write=0),p=n.write-g,p>f.avail_out&&(p=f.avail_out),p!==0&&d==Dt&&(d=ee),f.avail_out-=p,f.total_out+=p,f.next_out.set(n.win.subarray(g,g+p),D),D+=p,g+=p),f.next_out_index=D,n.read=g,d},n.proc=function(f,d){let p,D,g,_,w,b,v,A;for(_=f.next_in_index,w=f.avail_in,D=n.bitb,g=n.bitk,b=n.write,v=b<n.read?n.read-b-1:n.end-b;;){let E,k,F,L,M,U,O,I;switch(r){case Ht:for(;g<3;){if(w!==0)d=ee;else return n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}switch(p=D&7,m=p&1,p>>>1){case 0:D>>>=3,g-=3,p=g&7,D>>>=p,g-=p,r=hr;break;case 1:E=[],k=[],F=[[]],L=[[]],Sr.inflate_trees_fixed(E,k,F,L),c.init(E[0],k[0],F[0],0,L[0],0),D>>>=3,g-=3,r=kn;break;case 2:D>>>=3,g-=3,r=Bs;break;case 3:return D>>>=3,g-=3,r=Lt,f.msg="invalid block type",d=oe,n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d)}break;case hr:for(;g<32;){if(w!==0)d=ee;else return n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}if((~D>>>16&65535)!=(D&65535))return r=Lt,f.msg="invalid stored block lengths",d=oe,n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);s=D&65535,D=g=0,r=s!==0?Ps:m!==0?Tn:Ht;break;case Ps:if(w===0||v===0&&(b==n.end&&n.read!==0&&(b=0,v=b<n.read?n.read-b-1:n.end-b),v===0&&(n.write=b,d=n.inflate_flush(f,d),b=n.write,v=b<n.read?n.read-b-1:n.end-b,b==n.end&&n.read!==0&&(b=0,v=b<n.read?n.read-b-1:n.end-b),v===0)))return n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);if(d=ee,p=s,p>w&&(p=w),p>v&&(p=v),n.win.set(f.read_buf(_,p),b),_+=p,w-=p,b+=p,v-=p,(s-=p)!==0)break;r=m!==0?Tn:Ht;break;case Bs:for(;g<14;){if(w!==0)d=ee;else return n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}if(i=p=D&16383,(p&31)>29||(p>>5&31)>29)return r=Lt,f.msg="too many length or distance symbols",d=oe,n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);if(p=258+(p&31)+(p>>5&31),!a||a.length<p)a=[];else for(A=0;A<p;A++)a[A]=0;D>>>=14,g-=14,o=0,r=Ms;case Ms:for(;o<4+(i>>>10);){for(;g<3;){if(w!==0)d=ee;else return n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}a[Ts[o++]]=D&7,D>>>=3,g-=3}for(;o<19;)a[Ts[o++]]=0;if(u[0]=7,p=y.inflate_trees_bits(a,u,l,h,f),p!=ee)return d=p,d==oe&&(a=null,r=Lt),n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);o=0,r=Is;case Is:for(;p=i,!(o>=258+(p&31)+(p>>5&31));){let V,N;for(p=u[0];g<p;){if(w!==0)d=ee;else return n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}if(p=h[(l[0]+(D&Ne[p]))*3+1],N=h[(l[0]+(D&Ne[p]))*3+2],N<16)D>>>=p,g-=p,a[o++]=N;else{for(A=N==18?7:N-14,V=N==18?11:3;g<p+A;){if(w!==0)d=ee;else return n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}if(D>>>=p,g-=p,V+=D&Ne[A],D>>>=A,g-=A,A=o,p=i,A+V>258+(p&31)+(p>>5&31)||N==16&&A<1)return a=null,r=Lt,f.msg="invalid bit length repeat",d=oe,n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);N=N==16?a[A-1]:0;do a[A++]=N;while(--V!==0);o=A}}if(l[0]=-1,M=[],U=[],O=[],I=[],M[0]=9,U[0]=6,p=i,p=y.inflate_trees_dynamic(257+(p&31),1+(p>>5&31),a,M,U,O,I,h,f),p!=ee)return p==oe&&(a=null,r=Lt),d=p,n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);c.init(M[0],U[0],h,O[0],h,I[0]),r=kn;case kn:if(n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,(d=c.proc(n,f,d))!=xt)return n.inflate_flush(f,d);if(d=ee,c.free(f),_=f.next_in_index,w=f.avail_in,D=n.bitb,g=n.bitk,b=n.write,v=b<n.read?n.read-b-1:n.end-b,m===0){r=Ht;break}r=Tn;case Tn:if(n.write=b,d=n.inflate_flush(f,d),b=n.write,v=b<n.read?n.read-b-1:n.end-b,n.read!=n.write)return n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);r=Ls;case Ls:return d=xt,n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);case Lt:return d=oe,n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d);default:return d=Pe,n.bitb=D,n.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,n.write=b,n.inflate_flush(f,d)}}},n.free=function(f){n.reset(f,null),n.win=null,h=null},n.set_dictionary=function(f,d,p){n.win.set(f.subarray(d,d+p),0),n.read=n.write=p},n.sync_point=function(){return r==hr?1:0}}const lu=32,fu=8,du=0,$s=1,Os=2,Ns=3,Rs=4,Us=5,mr=6,sn=7,Vs=12,Ct=13,pu=[0,0,255,255];function hu(){const t=this;t.mode=0,t.method=0,t.was=[0],t.need=0,t.marker=0,t.wbits=0;function e(n){return!n||!n.istate?Pe:(n.total_in=n.total_out=0,n.msg=null,n.istate.mode=sn,n.istate.blocks.reset(n,null),ee)}t.inflateEnd=function(n){return t.blocks&&t.blocks.free(n),t.blocks=null,ee},t.inflateInit=function(n,r){return n.msg=null,t.blocks=null,r<8||r>15?(t.inflateEnd(n),Pe):(t.wbits=r,n.istate.blocks=new cu(n,1<<r),e(n),ee)},t.inflate=function(n,r){let s,i;if(!n||!n.istate||!n.next_in)return Pe;const o=n.istate;for(r=r==Qa?Dt:ee,s=Dt;;)switch(o.mode){case du:if(n.avail_in===0)return s;if(s=r,n.avail_in--,n.total_in++,((o.method=n.read_byte(n.next_in_index++))&15)!=fu){o.mode=Ct,n.msg="unknown compression method",o.marker=5;break}if((o.method>>4)+8>o.wbits){o.mode=Ct,n.msg="invalid win size",o.marker=5;break}o.mode=$s;case $s:if(n.avail_in===0)return s;if(s=r,n.avail_in--,n.total_in++,i=n.read_byte(n.next_in_index++)&255,((o.method<<8)+i)%31!==0){o.mode=Ct,n.msg="incorrect header check",o.marker=5;break}if((i&lu)===0){o.mode=sn;break}o.mode=Os;case Os:if(n.avail_in===0)return s;s=r,n.avail_in--,n.total_in++,o.need=(n.read_byte(n.next_in_index++)&255)<<24&4278190080,o.mode=Ns;case Ns:if(n.avail_in===0)return s;s=r,n.avail_in--,n.total_in++,o.need+=(n.read_byte(n.next_in_index++)&255)<<16&16711680,o.mode=Rs;case Rs:if(n.avail_in===0)return s;s=r,n.avail_in--,n.total_in++,o.need+=(n.read_byte(n.next_in_index++)&255)<<8&65280,o.mode=Us;case Us:return n.avail_in===0?s:(s=r,n.avail_in--,n.total_in++,o.need+=n.read_byte(n.next_in_index++)&255,o.mode=mr,Ja);case mr:return o.mode=Ct,n.msg="need dictionary",o.marker=0,Pe;case sn:if(s=o.blocks.proc(n,s),s==oe){o.mode=Ct,o.marker=0;break}if(s==ee&&(s=r),s!=xt)return s;s=r,o.blocks.reset(n,o.was),o.mode=Vs;case Vs:return n.avail_in=0,xt;case Ct:return oe;default:return Pe}},t.inflateSetDictionary=function(n,r,s){let i=0,o=s;if(!n||!n.istate||n.istate.mode!=mr)return Pe;const a=n.istate;return o>=1<<a.wbits&&(o=(1<<a.wbits)-1,i=s-o),a.blocks.set_dictionary(r,i,o),a.mode=sn,ee},t.inflateSync=function(n){let r,s,i,o,a;if(!n||!n.istate)return Pe;const u=n.istate;if(u.mode!=Ct&&(u.mode=Ct,u.marker=0),(r=n.avail_in)===0)return Dt;for(s=n.next_in_index,i=u.marker;r!==0&&i<4;)n.read_byte(s)==pu[i]?i++:n.read_byte(s)!==0?i=0:i=4-i,s++,r--;return n.total_in+=s-n.next_in_index,n.next_in_index=s,n.avail_in=r,u.marker=i,i!=4?oe:(o=n.total_in,a=n.total_out,e(n),n.total_in=o,n.total_out=a,u.mode=sn,ee)},t.inflateSyncPoint=function(n){return!n||!n.istate||!n.istate.blocks?Pe:n.istate.blocks.sync_point()}}function Ii(){}Ii.prototype={inflateInit(t){const e=this;return e.istate=new hu,t||(t=Ka),e.istate.inflateInit(e,t)},inflate(t){const e=this;return e.istate?e.istate.inflate(e,t):Pe},inflateEnd(){const t=this;if(!t.istate)return Pe;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync(){const t=this;return t.istate?t.istate.inflateSync(t):Pe},inflateSetDictionary(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):Pe},read_byte(t){return this.next_in[t]},read_buf(t,e){return this.next_in.subarray(t,t+e)}};function mu(t){const e=this,n=new Ii,r=t&&t.chunkSize?Math.floor(t.chunkSize*2):128*1024,s=za,i=new Uint8Array(r);let o=!1;n.inflateInit(),n.next_out=i,e.append=function(a,u){const l=[];let c,m,h=0,x=0,y=0;if(a.length!==0){n.next_in_index=0,n.next_in=a,n.avail_in=a.length;do{if(n.next_out_index=0,n.avail_out=r,n.avail_in===0&&!o&&(n.next_in_index=0,o=!0),c=n.inflate(s),o&&c===Dt){if(n.avail_in!==0)throw new Error("inflating: bad input")}else if(c!==ee&&c!==xt)throw new Error("inflating: "+n.msg);if((o||c===xt)&&n.avail_in===a.length)throw new Error("inflating: bad input");n.next_out_index&&(n.next_out_index===r?l.push(new Uint8Array(i)):l.push(i.subarray(0,n.next_out_index))),y+=n.next_out_index,u&&n.next_in_index>0&&n.next_in_index!=h&&(u(n.next_in_index),h=n.next_in_index)}while(n.avail_in>0||n.avail_out===0);return l.length>1?(m=new Uint8Array(y),l.forEach(function(f){m.set(f,x),x+=f.length})):m=l[0]?new Uint8Array(l[0]):new Uint8Array,m}},e.flush=function(){n.inflateEnd()}}const Le=4294967295,Be=65535,qs=8,xu=0,Du=99,gu=67324752,Li=134695760,wu=Li,yu=33639248,bu=101010256,_u=101075792,Au=117853008,kr=22,$i=20,Oi=56,vu=kr+$i+Oi,Cu=1,Eu=39169,Fu=10,Su=1,Ni=21589,ku=6534,Tu=1,Pu=8,Bu=2048,Mu=16,Iu=16384,js=73,xr=420,Lu=20,Ws=45,Hs=51,Dr="/",Ys=new Date(2107,11,31),Gs=new Date(1980,0,1),ne=void 0,Mt="undefined",mn="function";class Zs{constructor(e){return class extends TransformStream{constructor(n,r){const s=new e(r);super({transform(i,o){o.enqueue(s.append(i))},flush(i){const o=s.flush();o&&i.enqueue(o)}})}}}}const $u=64;let Ri=2;try{typeof navigator!=Mt&&navigator.hardwareConcurrency&&(Ri=navigator.hardwareConcurrency)}catch{}const Ou={chunkSize:512*1024,maxWorkers:Ri,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:ne,CompressionStreamNative:typeof CompressionStream!=Mt&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=Mt&&DecompressionStream},Tt=Object.assign({},Ou);function Nu(){return Tt}function Ru(t){return Math.max(t.chunkSize,$u)}function Gr(t){const{baseURL:e,chunkSize:n,maxWorkers:r,terminateWorkerTimeout:s,useCompressionStream:i,useWebWorkers:o,Deflate:a,Inflate:u,CompressionStream:l,DecompressionStream:c,workerScripts:m}=t;if(Et("baseURL",e),Et("chunkSize",n),Et("maxWorkers",r),Et("terminateWorkerTimeout",s),Et("useCompressionStream",i),Et("useWebWorkers",o),a&&(Tt.CompressionStream=new Zs(a)),u&&(Tt.DecompressionStream=new Zs(u)),Et("CompressionStream",l),Et("DecompressionStream",c),m!==ne){const{deflate:h,inflate:x}=m;if((h||x)&&(Tt.workerScripts||(Tt.workerScripts={})),h){if(!Array.isArray(h))throw new Error("workerScripts.deflate must be an array");Tt.workerScripts.deflate=h}if(x){if(!Array.isArray(x))throw new Error("workerScripts.inflate must be an array");Tt.workerScripts.inflate=x}}}function Et(t,e){e!==ne&&(Tt[t]=e)}const gr={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin","cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot","wiz"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf","xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","xpdl"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot","ppa","pwz"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":["odm","otm"],"vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw","vsdx","vssx","vstx","vssm","vstm"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-director":["dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-latex":"latex","x-lyx":"lyx","x-lzx":"lzx","x-maker":["frm","fb","fbdoc"],"x-ms-wmd":"wmd","x-msdos-program":["com","exe","bat","dll"],"x-netcdf":["nc"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":["rpm","rpa"],"x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":["mathml","mml"],mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","application/x-ms-installer":"msi","x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-perfmon":["pma","pmc","pmr","pmw"],"ynd.ms-pkipko":"pko",gzip:["gz","tgz"],"smil+xml":["smi","smil"],"vnd.debian.binary-package":["deb","udeb"],"vnd.hzn-3d-crossword":"x3d","vnd.sqlite3":["db","sqlite","sqlite3","db-wal","sqlite-wal","db-shm","sqlite-shm"],"vnd.wap.sic":"sic","vnd.wap.slc":"slc","x-krita":["kra","krz"],"x-perl":["pm","pl"],yaml:["yaml","yml"]},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":"aifc","x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",aac:"aac",aiff:["aiff","aif","aff"],opus:"opus",wav:"wav"},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":"mmod","x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":"sd","x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":"val","x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},font:{otf:"otf",woff:"woff",woff2:"woff2"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe","jfif","jfif-tbnl","jif"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",avif:"avifs",heic:["heif","heic"],pjpeg:["pjpg"],"vnd.adobe.photoshop":"psd","x-adobe-dng":"dng","x-fuji-raf":"raf","x-icns":"icns","x-kodak-dcr":"dcr","x-kodak-k25":"k25","x-kodak-kdc":"kdc","x-minolta-mrw":"mrw","x-panasonic-raw":["raw","rw2","rwl"],"x-pentax-pef":["pef","ptx"],"x-sigma-x3f":"x3f","x-sony-arw":"arw","x-sony-sr2":"sr2","x-sony-srf":"srf"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":"x3dz","x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.usdz+zip":"usdz","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",plain:["txt","text","brf","conf","def","list","log","in","bas","diff","ksh"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:"tm","tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":"patch","x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas","pp","inc"],"x-pcs-gcd":"gcd","x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","h","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt",javascript:"js",json:"json",markdown:["md","markdown","mdown","markdn"],"vnd.wap.si":"si","vnd.wap.sl":"sl"},video:{avif:"avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv",mp2t:"ts"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","flr","wrz","xaf","xof"]}};(()=>{const t={};for(const e of Object.keys(gr))for(const n of Object.keys(gr[e])){const r=gr[e][n];if(typeof r=="string")t[r]=e+"/"+n;else for(let s=0;s<r.length;s++)t[r[s]]=e+"/"+n}return t})();const Ui=[];for(let t=0;t<256;t++){let e=t;for(let n=0;n<8;n++)e&1?e=e>>>1^3988292384:e=e>>>1;Ui[t]=e}class Tr{constructor(e){this.crc=e||-1}append(e){let n=this.crc|0;for(let r=0,s=e.length|0;r<s;r++)n=n>>>8^Ui[(n^e[r])&255];this.crc=n}get(){return~this.crc}}class Vi extends TransformStream{constructor(){let e;const n=new Tr;super({transform(r,s){n.append(r),s.enqueue(r)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,n.get()),e.value=r}}),e=this}}function $n(t){if(typeof TextEncoder==Mt){t=unescape(encodeURIComponent(t));const e=new Uint8Array(t.length);for(let n=0;n<e.length;n++)e[n]=t.charCodeAt(n);return e}else return new TextEncoder().encode(t)}const Ee={concat(t,e){if(t.length===0||e.length===0)return t.concat(e);const n=t[t.length-1],r=Ee.getPartial(n);return r===32?t.concat(e):Ee._shiftRight(e,r,n|0,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(e===0)return 0;const n=t[e-1];return(e-1)*32+Ee.getPartial(n)},clamp(t,e){if(t.length*32<e)return t;t=t.slice(0,Math.ceil(e/32));const n=t.length;return e=e&31,n>0&&e&&(t[n-1]=Ee.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial(t,e,n){return t===32?e:(n?e|0:e<<32-t)+t*1099511627776},getPartial(t){return Math.round(t/1099511627776)||32},_shiftRight(t,e,n,r){for(r===void 0&&(r=[]);e>=32;e-=32)r.push(n),n=0;if(e===0)return r.concat(t);for(let o=0;o<t.length;o++)r.push(n|t[o]>>>e),n=t[o]<<32-e;const s=t.length?t[t.length-1]:0,i=Ee.getPartial(s);return r.push(Ee.partial(e+i&31,e+i>32?n:r.pop(),1)),r}},Vn={bytes:{fromBits(t){const n=Ee.bitLength(t)/8,r=new Uint8Array(n);let s;for(let i=0;i<n;i++)(i&3)===0&&(s=t[i/4]),r[i]=s>>>24,s<<=8;return r},toBits(t){const e=[];let n,r=0;for(n=0;n<t.length;n++)r=r<<8|t[n],(n&3)===3&&(e.push(r),r=0);return n&3&&e.push(Ee.partial(8*(n&3),r)),e}}},qi={};qi.sha1=class{constructor(t){const e=this;e.blockSize=512,e._init=[1732584193,4023233417,2562383102,271733878,3285377520],e._key=[1518500249,1859775393,2400959708,3395469782],t?(e._h=t._h.slice(0),e._buffer=t._buffer.slice(0),e._length=t._length):e.reset()}reset(){const t=this;return t._h=t._init.slice(0),t._buffer=[],t._length=0,t}update(t){const e=this;typeof t=="string"&&(t=Vn.utf8String.toBits(t));const n=e._buffer=Ee.concat(e._buffer,t),r=e._length,s=e._length=r+Ee.bitLength(t);if(s>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const i=new Uint32Array(n);let o=0;for(let a=e.blockSize+r-(e.blockSize+r&e.blockSize-1);a<=s;a+=e.blockSize)e._block(i.subarray(16*o,16*(o+1))),o+=1;return n.splice(0,16*o),e}finalize(){const t=this;let e=t._buffer;const n=t._h;e=Ee.concat(e,[Ee.partial(1,1)]);for(let r=e.length+2;r&15;r++)e.push(0);for(e.push(Math.floor(t._length/4294967296)),e.push(t._length|0);e.length;)t._block(e.splice(0,16));return t.reset(),n}_f(t,e,n,r){if(t<=19)return e&n|~e&r;if(t<=39)return e^n^r;if(t<=59)return e&n|e&r|n&r;if(t<=79)return e^n^r}_S(t,e){return e<<t|e>>>32-t}_block(t){const e=this,n=e._h,r=Array(80);for(let l=0;l<16;l++)r[l]=t[l];let s=n[0],i=n[1],o=n[2],a=n[3],u=n[4];for(let l=0;l<=79;l++){l>=16&&(r[l]=e._S(1,r[l-3]^r[l-8]^r[l-14]^r[l-16]));const c=e._S(5,s)+e._f(l,i,o,a)+u+r[l]+e._key[Math.floor(l/20)]|0;u=a,a=o,o=e._S(30,i),i=s,s=c}n[0]=n[0]+s|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0}};const ji={};ji.aes=class{constructor(t){const e=this;e._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],e._tables[0][0][0]||e._precompute();const n=e._tables[0][4],r=e._tables[1],s=t.length;let i,o,a,u=1;if(s!==4&&s!==6&&s!==8)throw new Error("invalid aes key size");for(e._key=[o=t.slice(0),a=[]],i=s;i<4*s+28;i++){let l=o[i-1];(i%s===0||s===8&&i%s===4)&&(l=n[l>>>24]<<24^n[l>>16&255]<<16^n[l>>8&255]<<8^n[l&255],i%s===0&&(l=l<<8^l>>>24^u<<24,u=u<<1^(u>>7)*283)),o[i]=o[i-s]^l}for(let l=0;i;l++,i--){const c=o[l&3?i:i-4];i<=4||l<4?a[l]=c:a[l]=r[0][n[c>>>24]]^r[1][n[c>>16&255]]^r[2][n[c>>8&255]]^r[3][n[c&255]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],r=e[4],s=[],i=[];let o,a,u,l;for(let c=0;c<256;c++)i[(s[c]=c<<1^(c>>7)*283)^c]=c;for(let c=o=0;!n[c];c^=a||1,o=i[o]||1){let m=o^o<<1^o<<2^o<<3^o<<4;m=m>>8^m&255^99,n[c]=m,r[m]=c,l=s[u=s[a=s[c]]];let h=l*16843009^u*65537^a*257^c*16843008,x=s[m]*257^m*16843008;for(let y=0;y<4;y++)t[y][c]=x=x<<24^x>>>8,e[y][m]=h=h<<24^h>>>8}for(let c=0;c<5;c++)t[c]=t[c].slice(0),e[c]=e[c].slice(0)}_crypt(t,e){if(t.length!==4)throw new Error("invalid aes block size");const n=this._key[e],r=n.length/4-2,s=[0,0,0,0],i=this._tables[e],o=i[0],a=i[1],u=i[2],l=i[3],c=i[4];let m=t[0]^n[0],h=t[e?3:1]^n[1],x=t[2]^n[2],y=t[e?1:3]^n[3],f=4,d,p,D;for(let g=0;g<r;g++)d=o[m>>>24]^a[h>>16&255]^u[x>>8&255]^l[y&255]^n[f],p=o[h>>>24]^a[x>>16&255]^u[y>>8&255]^l[m&255]^n[f+1],D=o[x>>>24]^a[y>>16&255]^u[m>>8&255]^l[h&255]^n[f+2],y=o[y>>>24]^a[m>>16&255]^u[h>>8&255]^l[x&255]^n[f+3],f+=4,m=d,h=p,x=D;for(let g=0;g<4;g++)s[e?3&-g:g]=c[m>>>24]<<24^c[h>>16&255]<<16^c[x>>8&255]<<8^c[y&255]^n[f++],d=m,m=h,h=x,x=y,y=d;return s}};const Uu={getRandomValues(t){const e=new Uint32Array(t.buffer),n=r=>{let s=987654321;const i=4294967295;return function(){return s=36969*(s&65535)+(s>>16)&i,r=18e3*(r&65535)+(r>>16)&i,(((s<<16)+r&i)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,s;r<t.length;r+=4){const i=n((s||Math.random())*4294967296);s=i()*987654071,e[r/4]=i()*4294967296|0}return t}},Wi={};Wi.ctrGladman=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if((t>>24&255)===255){let e=t>>16&255,n=t>>8&255,r=t&255;e===255?(e=0,n===255?(n=0,r===255?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}incCounter(t){(t[0]=this.incWord(t[0]))===0&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let r;if(!(r=e.length))return[];const s=Ee.bitLength(e);for(let i=0;i<r;i+=4){this.incCounter(n);const o=t.encrypt(n);e[i]^=o[0],e[i+1]^=o[1],e[i+2]^=o[2],e[i+3]^=o[3]}return Ee.clamp(e,s)}};const qt={importKey(t){return new qt.hmacSha1(Vn.bytes.toBits(t))},pbkdf2(t,e,n,r){if(n=n||1e4,r<0||n<0)throw new Error("invalid params to pbkdf2");const s=(r>>5)+1<<2;let i,o,a,u,l;const c=new ArrayBuffer(s),m=new DataView(c);let h=0;const x=Ee;for(e=Vn.bytes.toBits(e),l=1;h<(s||1);l++){for(i=o=t.encrypt(x.concat(e,[l])),a=1;a<n;a++)for(o=t.encrypt(o),u=0;u<o.length;u++)i[u]^=o[u];for(a=0;h<(s||1)&&a<i.length;a++)m.setInt32(h,i[a]),h+=4}return c.slice(0,r/8)}};qt.hmacSha1=class{constructor(t){const e=this,n=e._hash=qi.sha1,r=[[],[]];e._baseHash=[new n,new n];const s=e._baseHash[0].blockSize/32;t.length>s&&(t=new n().update(t).finalize());for(let i=0;i<s;i++)r[0][i]=t[i]^909522486,r[1][i]=t[i]^1549556828;e._baseHash[0].update(r[0]),e._baseHash[1].update(r[1]),e._resultHash=new n(e._baseHash[0])}reset(){const t=this;t._resultHash=new t._hash(t._baseHash[0]),t._updated=!1}update(t){const e=this;e._updated=!0,e._resultHash.update(t)}digest(){const t=this,e=t._resultHash.finalize(),n=new t._hash(t._baseHash[1]).update(e).finalize();return t.reset(),n}encrypt(t){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(t),this.digest(t)}};const Vu=typeof crypto!=Mt&&typeof crypto.getRandomValues==mn,Hi="Invalid password",Yi="Invalid signature",Gi="zipjs-abort-check-password";function Zi(t){return Vu?crypto.getRandomValues(t):Uu.getRandomValues(t)}const Zt=16,qu="raw",Xi={name:"PBKDF2"},ju={name:"HMAC"},Wu="SHA-1",Hu=Object.assign({hash:ju},Xi),Pr=Object.assign({iterations:1e3,hash:{name:Wu}},Xi),Yu=["deriveBits"],fn=[8,12,16],on=[16,24,32],Ft=10,Gu=[0,0,0,0],Xn=typeof crypto!=Mt,xn=Xn&&crypto.subtle,Ki=Xn&&typeof xn!=Mt,ut=Vn.bytes,Zu=ji.aes,Xu=Wi.ctrGladman,Ku=qt.hmacSha1;let Xs=Xn&&Ki&&typeof xn.importKey==mn,Ks=Xn&&Ki&&typeof xn.deriveBits==mn;class Ju extends TransformStream{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:s,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(o=>this.resolveReady=o),password:Qi(e,n),signed:r,strength:s-1,pending:new Uint8Array})},async transform(o,a){const u=this,{password:l,strength:c,resolveReady:m,ready:h}=u;l?(await Qu(u,c,l,je(o,0,fn[c]+2)),o=je(o,fn[c]+2),i?a.error(new Error(Gi)):m()):await h;const x=new Uint8Array(o.length-Ft-(o.length-Ft)%Zt);a.enqueue(Ji(u,o,x,0,Ft,!0))},async flush(o){const{signed:a,ctr:u,hmac:l,pending:c,ready:m}=this;if(l&&u){await m;const h=je(c,0,c.length-Ft),x=je(c,c.length-Ft);let y=new Uint8Array;if(h.length){const f=pn(ut,h);l.update(f);const d=u.update(f);y=dn(ut,d)}if(a){const f=je(dn(ut,l.digest()),0,Ft);for(let d=0;d<Ft;d++)if(f[d]!=x[d])throw new Error(Yi)}o.enqueue(y)}}})}}class zu extends TransformStream{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:Qi(e,n),strength:r-1,pending:new Uint8Array})},async transform(i,o){const a=this,{password:u,strength:l,resolveReady:c,ready:m}=a;let h=new Uint8Array;u?(h=await ec(a,l,u),c()):await m;const x=new Uint8Array(h.length+i.length-i.length%Zt);x.set(h,0),o.enqueue(Ji(a,i,x,h.length,0))},async flush(i){const{ctr:o,hmac:a,pending:u,ready:l}=this;if(a&&o){await l;let c=new Uint8Array;if(u.length){const m=o.update(pn(ut,u));a.update(m),c=dn(ut,m)}s.signature=dn(ut,a.digest()).slice(0,Ft),i.enqueue(Zr(c,s.signature))}}}),s=this}}function Ji(t,e,n,r,s,i){const{ctr:o,hmac:a,pending:u}=t,l=e.length-s;u.length&&(e=Zr(u,e),n=rc(n,l-l%Zt));let c;for(c=0;c<=l-Zt;c+=Zt){const m=pn(ut,je(e,c,c+Zt));i&&a.update(m);const h=o.update(m);i||a.update(h),n.set(dn(ut,h),c+r)}return t.pending=je(e,c),n}async function Qu(t,e,n,r){const s=await zi(t,e,n,je(r,0,fn[e])),i=je(r,fn[e]);if(s[0]!=i[0]||s[1]!=i[1])throw new Error(Hi)}async function ec(t,e,n){const r=Zi(new Uint8Array(fn[e])),s=await zi(t,e,n,r);return Zr(r,s)}async function zi(t,e,n,r){t.password=null;const s=await tc(qu,n,Hu,!1,Yu),i=await nc(Object.assign({salt:r},Pr),s,8*(on[e]*2+2)),o=new Uint8Array(i),a=pn(ut,je(o,0,on[e])),u=pn(ut,je(o,on[e],on[e]*2)),l=je(o,on[e]*2);return Object.assign(t,{keys:{key:a,authentication:u,passwordVerification:l},ctr:new Xu(new Zu(a),Array.from(Gu)),hmac:new Ku(u)}),l}async function tc(t,e,n,r,s){if(Xs)try{return await xn.importKey(t,e,n,r,s)}catch{return Xs=!1,qt.importKey(e)}else return qt.importKey(e)}async function nc(t,e,n){if(Ks)try{return await xn.deriveBits(t,e,n)}catch{return Ks=!1,qt.pbkdf2(e,t.salt,Pr.iterations,n)}else return qt.pbkdf2(e,t.salt,Pr.iterations,n)}function Qi(t,e){return e===ne?$n(t):e}function Zr(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function rc(t,e){if(e&&e>t.length){const n=t;t=new Uint8Array(e),t.set(n,0)}return t}function je(t,e,n){return t.subarray(e,n)}function dn(t,e){return t.fromBits(e)}function pn(t,e){return t.toBits(e)}const Kt=12;class sc extends TransformStream{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){Object.assign(this,{password:e,passwordVerification:n}),eo(this,e)},transform(s,i){const o=this;if(o.password){const a=Js(o,s.subarray(0,Kt));if(o.password=null,a[Kt-1]!=o.passwordVerification)throw new Error(Hi);s=s.subarray(Kt)}r?i.error(new Error(Gi)):i.enqueue(Js(o,s))}})}}class ic extends TransformStream{constructor({password:e,passwordVerification:n}){super({start(){Object.assign(this,{password:e,passwordVerification:n}),eo(this,e)},transform(r,s){const i=this;let o,a;if(i.password){i.password=null;const u=Zi(new Uint8Array(Kt));u[Kt-1]=i.passwordVerification,o=new Uint8Array(r.length+u.length),o.set(zs(i,u),0),a=Kt}else o=new Uint8Array(r.length),a=0;o.set(zs(i,r),a),s.enqueue(o)}})}}function Js(t,e){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=to(t)^e[r],Xr(t,n[r]);return n}function zs(t,e){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=to(t)^e[r],Xr(t,e[r]);return n}function eo(t,e){const n=[305419896,591751049,878082192];Object.assign(t,{keys:n,crcKey0:new Tr(n[0]),crcKey2:new Tr(n[2])});for(let r=0;r<e.length;r++)Xr(t,e.charCodeAt(r))}function Xr(t,e){let[n,r,s]=t.keys;t.crcKey0.append([e]),n=~t.crcKey0.get(),r=Qs(Math.imul(Qs(r+no(n)),134775813)+1),t.crcKey2.append([r>>>24]),s=~t.crcKey2.get(),t.keys=[n,r,s]}function to(t){const e=t.keys[2]|2;return no(Math.imul(e,e^1)>>>8)}function no(t){return t&255}function Qs(t){return t&4294967295}const ei="deflate-raw";class oc extends TransformStream{constructor(e,{chunkSize:n,CompressionStream:r,CompressionStreamNative:s}){super({});const{compressed:i,encrypted:o,useCompressionStream:a,zipCrypto:u,signed:l,level:c}=e,m=this;let h,x,y=ro(super.readable);(!o||u)&&l&&(h=new Vi,y=ct(y,h)),i&&(y=io(y,a,{level:c,chunkSize:n},s,r)),o&&(u?y=ct(y,new ic(e)):(x=new zu(e),y=ct(y,x))),so(m,y,()=>{let f;o&&!u&&(f=x.signature),(!o||u)&&l&&(f=new DataView(h.value.buffer).getUint32(0)),m.signature=f})}}class ac extends TransformStream{constructor(e,{chunkSize:n,DecompressionStream:r,DecompressionStreamNative:s}){super({});const{zipCrypto:i,encrypted:o,signed:a,signature:u,compressed:l,useCompressionStream:c}=e;let m,h,x=ro(super.readable);o&&(i?x=ct(x,new sc(e)):(h=new Ju(e),x=ct(x,h))),l&&(x=io(x,c,{chunkSize:n},s,r)),(!o||i)&&a&&(m=new Vi,x=ct(x,m)),so(this,x,()=>{if((!o||i)&&a){const y=new DataView(m.value.buffer);if(u!=y.getUint32(0,!1))throw new Error(Yi)}})}}function ro(t){return ct(t,new TransformStream({transform(e,n){e&&e.length&&n.enqueue(e)}}))}function so(t,e,n){e=ct(e,new TransformStream({flush:n})),Object.defineProperty(t,"readable",{get(){return e}})}function io(t,e,n,r,s){try{const i=e&&r?r:s;t=ct(t,new i(ei,n))}catch{if(e)try{t=ct(t,new s(ei,n))}catch{return t}else return t}return t}function ct(t,e){return t.pipeThrough(e)}const uc="message",cc="start",lc="pull",ti="data",fc="ack",ni="close",oo="deflate",dc="inflate";class pc extends TransformStream{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith(oo)?i=oc:s.startsWith(dc)&&(i=ac);let o=0,a=0;const u=new i(e,n),l=super.readable,c=new TransformStream({transform(h,x){h&&h.length&&(a+=h.length,x.enqueue(h))},flush(){Object.assign(r,{inputSize:a})}}),m=new TransformStream({transform(h,x){h&&h.length&&(o+=h.length,x.enqueue(h))},flush(){const{signature:h}=u;Object.assign(r,{signature:h,outputSize:o,inputSize:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(c).pipeThrough(u).pipeThrough(m)}})}}class hc extends TransformStream{constructor(e){let n;super({transform:r,flush(s){n&&n.length&&s.enqueue(n)}});function r(s,i){if(n){const o=new Uint8Array(n.length+s.length);o.set(n),o.set(s,n.length),s=o,n=null}s.length>e?(i.enqueue(s.slice(0,e)),r(s.slice(e),i)):n=s}}}let ao=typeof Worker!=Mt;class wr{constructor(e,{readable:n,writable:r},{options:s,config:i,streamOptions:o,useWebWorkers:a,transferStreams:u,scripts:l},c){const{signal:m}=o;return Object.assign(e,{busy:!0,readable:n.pipeThrough(new hc(i.chunkSize)).pipeThrough(new mc(n,o),{signal:m}),writable:r,options:Object.assign({},s),scripts:l,transferStreams:u,terminate(){return new Promise(h=>{const{worker:x,busy:y}=e;x?(y?e.resolveTerminated=h:(x.terminate(),h()),e.interface=null):h()})},onTaskFinished(){const{resolveTerminated:h}=e;h&&(e.resolveTerminated=null,e.terminated=!0,e.worker.terminate(),h()),e.busy=!1,c(e)}}),(a&&ao?xc:uo)(e,i)}}class mc extends TransformStream{constructor(e,{onstart:n,onprogress:r,size:s,onend:i}){let o=0;super({async start(){n&&await yr(n,s)},async transform(a,u){o+=a.length,r&&await yr(r,o,s),u.enqueue(a)},async flush(){e.size=o,i&&await yr(i,o)}})}}async function yr(t,...e){try{await t(...e)}catch{}}function uo(t,e){return{run:()=>Dc(t,e)}}function xc(t,e){const{baseURL:n,chunkSize:r}=e;if(!t.interface){let s;try{s=yc(t.scripts[0],n,t)}catch{return ao=!1,uo(t,e)}Object.assign(t,{worker:s,interface:{run:()=>gc(t,{chunkSize:r})}})}return t.interface}async function Dc({options:t,readable:e,writable:n,onTaskFinished:r},s){try{const i=new pc(t,s);await e.pipeThrough(i).pipeTo(n,{preventClose:!0,preventAbort:!0});const{signature:o,inputSize:a,outputSize:u}=i;return{signature:o,inputSize:a,outputSize:u}}finally{r()}}async function gc(t,e){let n,r;const s=new Promise((h,x)=>{n=h,r=x});Object.assign(t,{reader:null,writer:null,resolveResult:n,rejectResult:r,result:s});const{readable:i,options:o,scripts:a}=t,{writable:u,closed:l}=wc(t.writable),c=On({type:cc,scripts:a.slice(1),options:o,config:e,readable:i,writable:u},t);c||Object.assign(t,{reader:i.getReader(),writer:u.getWriter()});const m=await s;return c||await u.getWriter().close(),await l,m}function wc(t){let e;const n=new Promise(s=>e=s);return{writable:new WritableStream({async write(s){const i=t.getWriter();await i.ready,await i.write(s),i.releaseLock()},close(){e()},abort(s){return t.getWriter().abort(s)}}),closed:n}}let ri=!0,si=!0;function yc(t,e,n){const r={type:"module"};let s,i;typeof t==mn&&(t=t());try{s=new URL(t,e)}catch{s=t}if(ri)try{i=new Worker(s)}catch{ri=!1,i=new Worker(s,r)}else i=new Worker(s,r);return i.addEventListener(uc,o=>bc(o,n)),i}function On(t,{worker:e,writer:n,onTaskFinished:r,transferStreams:s}){try{const{value:i,readable:o,writable:a}=t,u=[];if(i&&(i.byteLength<i.buffer.byteLength?t.value=i.buffer.slice(0,i.byteLength):t.value=i.buffer,u.push(t.value)),s&&si?(o&&u.push(o),a&&u.push(a)):t.readable=t.writable=null,u.length)try{return e.postMessage(t,u),!0}catch{si=!1,t.readable=t.writable=null,e.postMessage(t)}else e.postMessage(t)}catch(i){throw n&&n.releaseLock(),r(),i}}async function bc({data:t},e){const{type:n,value:r,messageId:s,result:i,error:o}=t,{reader:a,writer:u,resolveResult:l,rejectResult:c,onTaskFinished:m}=e;try{if(o){const{message:x,stack:y,code:f,name:d}=o,p=new Error(x);Object.assign(p,{stack:y,code:f,name:d}),h(p)}else{if(n==lc){const{value:x,done:y}=await a.read();On({type:ti,value:x,done:y,messageId:s},e)}n==ti&&(await u.ready,await u.write(new Uint8Array(r)),On({type:fc,messageId:s},e)),n==ni&&h(null,i)}}catch(x){On({type:ni,messageId:s},e),h(x)}function h(x,y){x?c(x):l(y),u&&u.releaseLock(),m()}}let Ut=[];const br=[];let ii=0;async function _c(t,e){const{options:n,config:r}=e,{transferStreams:s,useWebWorkers:i,useCompressionStream:o,codecType:a,compressed:u,signed:l,encrypted:c}=n,{workerScripts:m,maxWorkers:h}=r;e.transferStreams=s||s===ne;const x=!u&&!l&&!c&&!e.transferStreams;return e.useWebWorkers=!x&&(i||i===ne&&r.useWebWorkers),e.scripts=e.useWebWorkers&&m?m[a]:[],n.useCompressionStream=o||o===ne&&r.useCompressionStream,(await y()).run();async function y(){const d=Ut.find(p=>!p.busy);if(d)return oi(d),new wr(d,t,e,f);if(Ut.length<h){const p={indexWorker:ii};return ii++,Ut.push(p),new wr(p,t,e,f)}else return new Promise(p=>br.push({resolve:p,stream:t,workerOptions:e}))}function f(d){if(br.length){const[{resolve:p,stream:D,workerOptions:g}]=br.splice(0,1);p(new wr(d,D,g,f))}else d.worker?(oi(d),Ac(d,e)):Ut=Ut.filter(p=>p!=d)}}function Ac(t,e){const{config:n}=e,{terminateWorkerTimeout:r}=n;Number.isFinite(r)&&r>=0&&(t.terminated?t.terminated=!1:t.terminateTimeout=setTimeout(async()=>{Ut=Ut.filter(s=>s!=t);try{await t.terminate()}catch{}},r))}function oi(t){const{terminateTimeout:e}=t;e&&(clearTimeout(e),t.terminateTimeout=null)}function vc(t,e={}){const n=`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,r.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={bytes:{p(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)3&s||(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},m(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3&~n||(t.push(r),r=0);return 3&n&&t.push(_.h(8*(3&n),r)),t}}},P=class{constructor(e){const t=this;t.blockSize=512,t.k=[1732584193,4023233417,2562383102,271733878,3285377520],t.v=[1518500249,1859775393,2400959708,3395469782],e?(t.S=e.S.slice(0),t.C=e.C.slice(0),t.A=e.A):t.reset()}reset(){const e=this;return e.S=e.k.slice(0),e.C=[],e.A=0,e}update(e){const t=this;"string"==typeof e&&(e=I._.m(e));const n=t.C=_.concat(t.C,e),r=t.A,i=t.A=r+_.l(e);if(i>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}P(){const e=this;let t=e.C;const n=e.S;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.A/4294967296)),t.push(0|e.A);t.length;)e.I(t.splice(0,16));return e.reset(),n}D(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}V(e,t){return t<<e|t>>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.V(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.V(5,o)+n.D(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.V(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;i<e.length;i+=4){const e=n(4294967296*(s||r.random()));s=987654071*e(),t[i/4]=4294967296*e()|0}return e}},V={importKey:e=>new V.R(I.bytes.m(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.bytes.m(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;a<c.length;a++)o[a]^=c[a];for(f=0;(i||1)>d&&f<o.length;f++)h.setInt32(d,o[f]),d+=4}return w.slice(0,r/8)},R:class{constructor(e){const t=this,n=t.M=P,r=[[],[]];t.U=[new n,new n];const s=t.U[0].blockSize/32;e.length>s&&(e=(new n).update(e).P());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.P(),n=new e.M(e.U[1]).update(t).P();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.bytes,X=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i===0||8===i&&o%i===4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i===0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255&~(e>>24))e+=1<<24;else{let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.R;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u(e=>this.J=e),password:ie(e,n),signed:r,X:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u(e=>this.J=e),password:ie(e,n),X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.B(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.B(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,$:u,passwordVerification:w},Y:new Y(new X(l),e.from(F)),Z:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)})(e):t}function oe(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ce(e,t,n){return e.subarray(t,n)}function fe(e,t){return e.p(t)}function ae(e,t){return e.m(t)}class le extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;if(n.password){const t=we(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(B);e=e.subarray(12)}r?t.error(new s(M)):t.enqueue(we(n,e))}})}}class ue extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=U(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(he(n,t),0),s=12}else r=new i(e.length),s=0;r.set(he(n,e),s),t.enqueue(r)}})}}function we(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,n[r]);return n}function he(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,t[r]);return n}function de(e,n){const r=[305419896,591751049,878082192];t.assign(e,{keys:r,ee:new x(r[0]),te:new x(r[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,s,i]=e.keys;e.ee.append([t]),n=~e.ee.get(),s=be(r.imul(be(s+me(n)),134775813)+1),e.te.append([s>>>24]),i=~e.te.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e})}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}})}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u(e=>De.set(Be,e));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u(e=>t=e);Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}});const Oe=-2;function Te(t){return We(t.map(([t,n])=>new e(t).fill(n,0,t)))}function We(t){return t.reduce((t,n)=>t.concat(e.isArray(n)?We(n):n),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Le(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}He.ge=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.Se=e=>256>e?je[e]:je[256+(e>>>7)],He.ze=[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],He.Ce=[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],He.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He.Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le._e=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map((e,t)=>[e,Fe[t]]));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Ie=e,i.Pe=t,i.De=n,i.Ve=r,i.Re=s}Le.Be=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map((e,t)=>[e,qe[t]])),Le.Ee=new Le(Le._e,He.ze,257,286,15),Le.Me=new Le(Le.Be,He.Ce,0,30,15),Le.Ue=new Le(null,He.xe,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++i<o&&n==s||(c>i?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<<F&65535,Q(L),L=n>>>16-F,F+=r-16):(L|=e<<F&65535,F+=r)}function Y(e,t){const n=2*e;X(65535&t[n],65535&t[n+1])}function Z(e,t){let n,r,s=-1,i=e[1],o=0,c=7,f=4;for(0===i&&(c=138,f=3),n=0;t>=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!==--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ge[n]+256+1)]++,M[2*He.Se(t)]++),!(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.Ce[o]);if(s>>>=3,j<r.floor(W/2)&&s<r.floor(i/2))return!0}return W==T-1}function te(t,n){let r,s,i,o,c=0;if(0!==W)do{r=e.Ne[c],s=e.Oe[c],c++,0===r?Y(s,t):(i=He.ge[s],Y(i+256+1,t),o=He.ze[i],0!==o&&(s-=He.ke[i],X(s,o)),r--,i=He.Se(r),Y(i,n),o=He.Ce[i],0!==o&&(r-=He.ve[i],X(r,o)))}while(W>c);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*He.Ae[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le._e,Le.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He.Ae[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!==--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!==--e);s+=f}if(0===t.We)return;e=t.je(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<<g^255&u[C+1])&b)}while(Ze>A&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!==--r);return i>A?A:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i<e.ce&&$e(t,r[i+1],r[i],e.le)&&i++,!$e(t,s,r[i],e.le));)r[n]=r[i],n=i,i<<=1;r[n]=s},e.He=(t,S,x,W,j,G)=>(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.Fe=e,a=x,f=1<<a,l=f-1,m=j+7,y=1<<m,b=y-1,g=r.floor((m+3-1)/3),u=new i(2*f),h=[],d=[],T=1<<j+6,e.Ke=new i(4*T),s=4*T,e.Ne=new o(T),e.Oe=new i(T),D=S,V=G,(t=>(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=Xe,c=0,K.re=E,K.ie=Le.Ee,N.re=M,N.ie=Le.Me,O.re=U,O.ie=Le.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==Xe?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Re!=Je[t].Re&&0!==e.qe&&(r=e.Ye(1)),D!=t&&(D=t,P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve),V=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<<g^255&u[1])&b,s=0;i-3>=s;s++)p=(p<<g^255&u[s+2])&b,h[s&l]=d[p],d[p]=s;return 0},e.Ye=(r,i)=>{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.$e||!r.et&&0!==r.We||n==Ye&&4!=i)return r.Le=Qe[4],Oe;if(0===r.tt)return r.Le=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=Qe[7],-5;if(n==Ye&&0!==t.We)return r.Le=Qe[7],-5;if(0!==t.We||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C),0===r||(C-r&65535)>f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<<g^255&u[C+1])&b;else{v--;do{C++,p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C}while(0!==--v);C++}if(n&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 2:R=(e=>{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C),_=v,S=x,v=2,0!==s&&P>_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.tt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C)}while(0!==--_);if(z=0,v=2,C++,n&&(se(!1),0===t.tt))return 0}}return 0!==z&&(n=ee(0,255&u[C-1]),z=0),se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i)}if(2!=R&&3!=R||(n=Ye),0==R||2==R)return 0===t.tt&&(c=-1),0;if(1==R){if(1==i)X(2,3),Y(256,Le._e),$(),9>1+H+10-F&&(X(2,3),Y(256,Le._e),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach(e=>{f.set(e,l),l+=e.length})):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach(e=>{r.set(e,o),o+=e.length}),r}}tt.prototype={He(e,t){const n=this;return n.Fe=new et,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Oe},Qe(){const e=this;if(!e.Fe)return Oe;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Oe},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Oe},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[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],lt=[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,112,112],ut=[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],wt=[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];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<<k;g>k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!==--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g<o);for(o=i[m],i[0]=g=0,C=0,b=-1,A=-S,s[0]=0,x=0,P=0;m>=v;v++)for(p=n[v];0!==p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++k<P&&(y<<=1)>n[++_];)y-=n[_];if(P=1<<k,h[0]+P>1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]<c?(r[0]=256>d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<<v-A,k=g>>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<<v-1;0!==(g&k);k>>>=1)g^=k;for(g^=k,z=(1<<A)-1;(g&z)!=i[b];)b--,A-=S,z=(1<<A)-1}return 0!==I&&1!=m?it:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.length<o&&(t=[]),c=0;o>c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Le="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=st),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Le="oversubscribed distance tree":h==it?(w.Le="incomplete distance tree",h=st):-4!=h&&(w.Le="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=y<o.read?o.read-y-1:o.end-y,b=ot[e],g=ot[t];do{for(;20>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(f=w&b,a=n,l=r,z=3*(l+f),0!==(u=a[z]))for(;;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;for(f=w&g,a=s,l=i,z=3*(l+f),u=a[z];;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(v=a[z+2]+(w&ot[u]),w>>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!==--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!==--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(64&u)return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(64&u)return 32&u?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S;;)switch(t){case 0:if(z>=258&&v>=10&&(e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S,0!=m)){t=1==m?7:9;break}c=u,n=r,o=h,t=1;case 1:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<<A,A+=8}if(g=3*(o+(x&ot[b])),x>>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(16&k){a=15&k,i=n[g+2],t=2;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}if(32&k){t=7;break}return t=9,y.Le="invalid literal/length code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<<A,A+=8}i+=x&ot[b],x>>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<<A,A+=8}if(g=3*(o+(x&ot[b])),x>>=n[g+1],A-=n[g+1],k=n[g],16&k){a=15&k,l=n[g+2],t=4;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<<A,A+=8}l+=x&ot[b],x>>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);e.lt[S++]=e.lt[C++],z--,C==e.end&&(C=0),i--}t=0;break;case 6:if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,e.lt[S++]=f,z--,t=0;break;case 7:if(A>7&&(A-=8,v++,_--),e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,e.read!=e.write)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);t=8;case 8:return m=1,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 9:return m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);default:return m=rt,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m)}},e.ht=()=>{}}ht.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g;;){let S,z,C,x,A,_,I,P;switch(s){case 0:for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}switch(i=7&f,h=1&i,i>>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k&&(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k)))return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(t=0,i=o,i>b&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!==(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.length<i)r=[];else for(v=0;i>v;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}r[pt[a++]]=7&f,f>>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(i=d[3*(u[0]+(f&ot[i]))+1],w=d[3*(u[0]+(f&ot[i]))+2],16>w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(f>>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!==--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g,0===h){s=0;break}s=7;case 7:if(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);s=8;case 8:return t=1,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);case 9:return t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);default:return t=rt,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}}},n.ht=e=>{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):rt}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),rt):(e.zt=r,n.gt.kt=new yt(n,1<<r),t(n),0)),e.At=(e,t)=>{let n,r;if(!e||!e.gt||!e.et)return rt;const s=e.gt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=mt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=mt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Le="incorrect header check",s.marker=5;break}if(!(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=mt,e.Le="need dictionary",s.marker=0,rt;case 7:if(n=s.kt.ut(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case mt:return st;default:return rt}},e._t=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return rt;const i=e.gt;return s<1<<i.zt||(s=(1<<i.zt)-1,r=n-s),i.kt.yt(t,r,s),i.mode=7,0},e.It=e=>{let n,r,s,i,o;if(!e||!e.gt)return rt;const c=e.gt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.We))return it;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==bt[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?st:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Pt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t.At(0),c&&a===it){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach(e=>{l.set(e,w),w+=e.length})):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}kt.prototype={xt(e){const t=this;return t.gt=new gt,e||(e=15),t.gt.xt(t,e)},At(e){const t=this;return t.gt?t.gt.At(t,e):rt},Ct(){const e=this;if(!e.gt)return rt;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):rt},_t(e,t){const n=this;return n.gt?n.gt._t(n,e,t):rt},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};
|
|
2
|
-
`,r=()=>e.useDataURI?"data:text/javascript,"+encodeURIComponent(n):URL.createObjectURL(new Blob([n],{type:"text/javascript"}));t({workerScripts:{inflate:[r],deflate:[r]}})}const Cc="Writer iterator completed too soon",Ec="text/plain",Fc="Content-Type",Sc=64*1024,co="writable";class Kr{constructor(){this.size=0}init(){this.initialized=!0}}class lo extends Kr{get readable(){const e=this,{chunkSize:n=Sc}=e,r=new ReadableStream({start(){this.chunkOffset=0},async pull(s){const{offset:i=0,size:o,diskNumberStart:a}=r,{chunkOffset:u}=this,l=o===ne?n:Math.min(n,o-u),c=await Br(e,i+u,l,a);s.enqueue(c),u+n>o||o===ne&&!c.length&&l?s.close():this.chunkOffset+=n}});return r}}class kc extends lo{constructor(e){super(),Object.assign(this,{blob:e,size:e.size})}async readUint8Array(e,n){const r=this,s=e+n;let o=await(e||s<r.size?r.blob.slice(e,s):r.blob).arrayBuffer();return o.byteLength>n&&(o=o.slice(e,s)),new Uint8Array(o)}}class Tc extends Kr{constructor(e){super();const n=this,r=new TransformStream,s=[];e&&s.push([Fc,e]),Object.defineProperty(n,co,{get(){return r.writable}}),n.blob=new Response(r.readable,{headers:s}).blob()}getData(){return this.blob}}class Ce extends kc{constructor(e){super(new Blob([e],{type:Ec}))}}class Pc extends lo{constructor(e){super(),this.readers=e}async init(){const e=this,{readers:n}=e;e.lastDiskNumber=0,e.lastDiskOffset=0,await Promise.all(n.map(async(r,s)=>{await r.init(),s!=n.length-1&&(e.lastDiskOffset+=r.size),e.size+=r.size})),super.init()}async readUint8Array(e,n,r=0){const s=this,{readers:i}=this;let o,a=r;a==-1&&(a=i.length-1);let u=e;for(;u>=i[a].size;)u-=i[a].size,a++;const l=i[a],c=l.size;if(u+n<=c)o=await Br(l,u,n);else{const m=c-u;o=new Uint8Array(n),o.set(await Br(l,u,m)),o.set(await s.readUint8Array(e+m,n-m,r),m)}return s.lastDiskNumber=Math.max(a,s.lastDiskNumber),o}}class ai extends Kr{constructor(e,n=4294967295){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:n,availableSize:n});let s,i,o;const a=new WritableStream({async write(c){const{availableSize:m}=r;if(o)c.length>=m?(await u(c.slice(0,m)),await l(),r.diskOffset+=s.size,r.diskNumber++,o=null,await this.write(c.slice(m))):await u(c);else{const{value:h,done:x}=await e.next();if(x&&!h)throw new Error(Cc);s=h,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await hn(s),i=h.writable,o=i.getWriter(),await this.write(c)}},async close(){await o.ready,await l()}});Object.defineProperty(r,co,{get(){return a}});async function u(c){const m=c.length;m&&(await o.ready,await o.write(c),s.size+=m,r.size+=m,r.availableSize-=m)}async function l(){i.size=s.size,await o.close()}}}async function hn(t,e){if(t.init&&!t.initialized)await t.init(e);else return Promise.resolve()}function Bc(t){return Array.isArray(t)&&(t=new Pc(t)),t instanceof ReadableStream&&(t={readable:t}),t}function Mc(t){t.writable===ne&&typeof t.next==mn&&(t=new ai(t)),t instanceof WritableStream&&(t={writable:t});const{writable:e}=t;return e.size===ne&&(e.size=0),t instanceof ai||Object.assign(t,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),t}function Br(t,e,n,r){return t.readUint8Array(e,n,r)}const Ic="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");Ic.length==256;const Lc="filename",$c="rawFilename",Oc="comment",Nc="rawComment",Rc="uncompressedSize",Uc="compressedSize",Vc="offset",ui="diskNumberStart",fo="lastModDate",qc="rawLastModDate",po="lastAccessDate",ho="creationDate",mo="internalFileAttribute",xo="internalFileAttributes",Do="externalFileAttribute",go="externalFileAttributes",wo="msDosCompatible",Jr="zip64",yo="encrypted",bo="version",_o="versionMadeBy",Ao="zipCrypto",vo="directory",Co="executable",jc=[Lc,$c,Uc,Rc,fo,qc,Oc,Nc,po,ho,Vc,ui,ui,mo,xo,Do,go,wo,Jr,yo,bo,_o,Ao,vo,Co,"bitFlag","signature","filenameUTF8","commentUTF8","compressionMethod","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Eo{constructor(e){jc.forEach(n=>this[n]=e[n])}}const Wc="File already exists",Hc="Zip file comment exceeds 64KB",Yc="File entry comment exceeds 64KB",Gc="File entry name exceeds 64KB",ci="Version exceeds 65535",Zc="The strength must equal 1, 2, or 3",Xc="Extra field type exceeds 65535",Kc="Extra field data exceeds 64KB",zr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",Jc="Undefined uncompressed size",li=new Uint8Array([7,0,2,0,65,69,3,0,0]);let _r=0;const fi=[];class zc{constructor(e,n={}){e=Mc(e);const r=e.availableSize!==ne&&e.availableSize>0&&e.availableSize!==1/0&&e.maxSize!==ne&&e.maxSize>0&&e.maxSize!==1/0;Object.assign(this,{writer:e,addSplitZipSignature:r,options:n,config:Nu(),files:new Map,filenames:new Set,offset:n.offset===ne?e.writable.size:n.offset,pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async add(e="",n,r={}){const s=this,{pendingAddFileCalls:i,config:o}=s;_r<o.maxWorkers?_r++:await new Promise(u=>fi.push(u));let a;try{if(e=e.trim(),s.filenames.has(e))throw new Error(Wc);return s.filenames.add(e),a=Qc(s,e,n,r),i.add(a),await a}catch(u){throw s.filenames.delete(e),u}finally{i.delete(a);const u=fi.shift();u?u():_r--}}async close(e=new Uint8Array,n={}){const r=this,{pendingAddFileCalls:s,writer:i}=this,{writable:o}=i;for(;s.size;)await Promise.allSettled(Array.from(s));return await u0(this,e,n),X(r,n,"preventClose")||await o.getWriter().close(),i.getData?i.getData():o}}async function Qc(t,e,n,r){e=e.trim();const s=X(t,r,wo),i=X(t,r,_o,s?20:768),o=X(t,r,Co);if(i>Be)throw new Error(ci);let a=X(t,r,go,0);a===0&&(a=X(t,r,Do,0)),!r.directory&&e.endsWith(Dr)&&(r.directory=!0),X(t,r,vo)?(e.endsWith(Dr)||(e+=Dr),a===0&&(a=Mu,s||(a|=(Iu|js|xr)<<16))):!s&&a===0&&(o?a=(js|xr)<<16:a=xr<<16);const l=X(t,r,"encodeText",$n);let c=l(e);if(c===ne&&(c=$n(e)),J(c)>Be)throw new Error(Gc);const m=r.comment||"";let h=l(m);if(h===ne&&(h=$n(m)),J(h)>Be)throw new Error(Yc);const x=X(t,r,bo,Lu);if(x>Be)throw new Error(ci);const y=X(t,r,fo,new Date),f=X(t,r,po),d=X(t,r,ho);let p=X(t,r,xo,0);p===0&&(p=X(t,r,mo,0));const D=X(t,r,"passThrough");let g,_;D||(g=X(t,r,"password"),_=X(t,r,"rawPassword"));const w=X(t,r,"encryptionStrength",3),b=X(t,r,Ao),v=X(t,r,"extendedTimestamp",!0),A=X(t,r,"keepOrder",!0),E=X(t,r,"level"),k=X(t,r,"useWebWorkers"),F=X(t,r,"bufferedWrite"),L=X(t,r,"dataDescriptorSignature",!1),M=X(t,r,"signal"),U=X(t,r,"useUnicodeFileNames",!0),O=X(t,r,"useCompressionStream"),I=X(t,r,"compressionMethod");let V=X(t,r,"dataDescriptor",!0),N=X(t,r,Jr);if(!b&&(g!==ne||_!==ne)&&!(w>=1&&w<=3))throw new Error(Zc);let le=new Uint8Array;const{extraField:R}=r;if(R){let Ye=0,Ge=0;R.forEach(we=>Ye+=4+J(we)),le=new Uint8Array(Ye),R.forEach((we,nt)=>{if(nt>Be)throw new Error(Xc);if(J(we)>Be)throw new Error(Kc);De(le,new Uint16Array([nt]),Ge),De(le,new Uint16Array([J(we)]),Ge+2),De(le,we,Ge+4),Ge+=4+J(we)})}let de=0,j=0,G=0;if(D&&({uncompressedSize:G}=r,G===ne))throw new Error(Jc);const Se=N===!0;n&&(n=Bc(n),await hn(n),D?de=di(G):n.size===ne?(V=!0,(N||N===ne)&&(N=!0,G=de=Le+1)):(G=n.size,de=di(G)));const{diskOffset:ge,diskNumber:pe,maxSize:lt}=t.writer,tt=Se||G>Le,yt=Se||de>Le,bt=Se||t.offset+t.pendingEntriesSize-ge>Le,He=X(t,r,"supportZip64SplitFile",!0)&&Se||pe+Math.ceil(t.pendingEntriesSize/lt)>Be;if(bt||tt||yt||He){if(N===!1||!A)throw new Error(zr);N=!0}N=N||!1;const ft=X(t,r,yo),{signature:zt}=r;r=Object.assign({},r,{rawFilename:c,rawComment:h,version:x,versionMadeBy:i,lastModDate:y,lastAccessDate:f,creationDate:d,rawExtraField:le,zip64:N,zip64UncompressedSize:tt,zip64CompressedSize:yt,zip64Offset:bt,zip64DiskNumberStart:He,password:g,rawPassword:_,level:!O&&t.config.CompressionStream===ne&&t.config.CompressionStreamNative===ne?0:E,useWebWorkers:k,encryptionStrength:w,extendedTimestamp:v,zipCrypto:b,bufferedWrite:F,keepOrder:A,useUnicodeFileNames:U,dataDescriptor:V,dataDescriptorSignature:L,signal:M,msDosCompatible:s,internalFileAttribute:p,internalFileAttributes:p,externalFileAttribute:a,externalFileAttributes:a,useCompressionStream:O,passThrough:D,encrypted:!!(g&&J(g)||_&&J(_))||D&&ft,signature:zt,compressionMethod:I});const me=n0(r),xe=s0(r),_t=J(me.localHeaderArray,xe.dataDescriptorArray);j=_t+de,t.options.usdz&&(j+=j+64),t.pendingEntriesSize+=j;let dt;try{dt=await e0(t,e,n,{headerInfo:me,dataDescriptorInfo:xe,metadataSize:_t},r)}finally{t.pendingEntriesSize-=j}return Object.assign(dt,{name:e,comment:m,extraField:R}),new Eo(dt)}async function e0(t,e,n,r,s){const{files:i,writer:o}=t,{keepOrder:a,dataDescriptor:u,signal:l}=s,{headerInfo:c}=r,{usdz:m}=t.options,h=Array.from(i.values()).pop();let x={},y,f,d,p,D,g,_;i.set(e,x);try{let A;a&&(A=h&&h.lock,w()),(s.bufferedWrite||t.writerLocked||t.bufferedWrites&&a||!u)&&!m?(g=new TransformStream,_=new Response(g.readable).blob(),g.writable.size=0,y=!0,t.bufferedWrites++,await hn(o)):(g=o,await b()),await hn(g);const{writable:E}=o;let{diskOffset:k}=o;if(t.addSplitZipSignature){delete t.addSplitZipSignature;const L=new Uint8Array(4),M=Ae(L);K(M,0,Li),await ot(E,L),t.offset+=4}m&&r0(r,t.offset-k),y||(await A,await v(E));const{diskNumber:F}=o;if(D=!0,x.diskNumberStart=F,x=await t0(n,g,x,r,t.config,s),D=!1,i.set(e,x),x.filename=e,y){await g.writable.getWriter().close();let L=await _;await A,await b(),p=!0,u||(L=await o0(x,L,E,s)),await v(E),x.diskNumberStart=o.diskNumber,k=o.diskOffset,await L.stream().pipeTo(E,{preventClose:!0,preventAbort:!0,signal:l}),E.size+=L.size,p=!1}if(x.offset=t.offset-k,x.zip64)a0(x,s);else if(x.offset>Le)throw new Error(zr);return t.offset+=x.size,x}catch(A){if(y&&p||!y&&D){if(t.hasCorruptedEntries=!0,A)try{A.corruptedEntry=!0}catch{}y?t.offset+=g.writable.size:t.offset=g.writable.size}throw i.delete(e),A}finally{y&&t.bufferedWrites--,d&&d(),f&&f()}function w(){x.lock=new Promise(A=>d=A)}async function b(){t.writerLocked=!0;const{lockWriter:A}=t;t.lockWriter=new Promise(E=>f=()=>{t.writerLocked=!1,E()}),await A}async function v(A){J(c.localHeaderArray)>o.availableSize&&(o.availableSize=0,await ot(A,new Uint8Array))}}async function t0(t,e,{diskNumberStart:n,lock:r},s,i,o){const{headerInfo:a,dataDescriptorInfo:u,metadataSize:l}=s,{localHeaderArray:c,headerArray:m,lastModDate:h,rawLastModDate:x,encrypted:y,compressed:f,version:d,compressionMethod:p,rawExtraFieldExtendedTimestamp:D,extraFieldExtendedTimestampFlag:g,rawExtraFieldNTFS:_,rawExtraFieldAES:w}=a,{dataDescriptorArray:b}=u,{rawFilename:v,lastAccessDate:A,creationDate:E,password:k,rawPassword:F,level:L,zip64:M,zip64UncompressedSize:U,zip64CompressedSize:O,zip64Offset:I,zip64DiskNumberStart:V,zipCrypto:N,dataDescriptor:le,directory:R,executable:de,versionMadeBy:j,rawComment:G,rawExtraField:Se,useWebWorkers:ge,onstart:pe,onprogress:lt,onend:tt,signal:yt,encryptionStrength:bt,extendedTimestamp:wn,msDosCompatible:He,internalFileAttributes:ft,externalFileAttributes:zt,useCompressionStream:me,passThrough:xe}=o,_t={lock:r,versionMadeBy:j,zip64:M,directory:!!R,executable:!!de,filenameUTF8:!0,rawFilename:v,commentUTF8:!0,rawComment:G,rawExtraFieldExtendedTimestamp:D,rawExtraFieldNTFS:_,rawExtraFieldAES:w,rawExtraField:Se,extendedTimestamp:wn,msDosCompatible:He,internalFileAttributes:ft,externalFileAttributes:zt,diskNumberStart:n};let{signature:dt,uncompressedSize:Ye}=o,Ge=0;xe||(Ye=0);const{writable:we}=e;if(t){t.chunkSize=Ru(i),await ot(we,c);const Ze=t.readable,rr=Ze.size=t.size,yn={options:{codecType:oo,level:L,rawPassword:F,password:k,encryptionStrength:bt,zipCrypto:y&&N,passwordVerification:y&&N&&x>>8&255,signed:!xe,compressed:f&&!xe,encrypted:y&&!xe,useWebWorkers:ge,useCompressionStream:me,transferStreams:!1},config:i,streamOptions:{signal:yt,size:rr,onstart:pe,onprogress:lt,onend:tt}},Qt=await _c({readable:Ze,writable:we},yn);Ge=Qt.outputSize,xe||(Ye=Qt.inputSize,dt=Qt.signature),we.size+=Ye}else await ot(we,c);let nt;if(M){let Ze=4;U&&(Ze+=8),O&&(Ze+=8),I&&(Ze+=8),V&&(Ze+=4),nt=new Uint8Array(Ze)}else nt=new Uint8Array;return i0({signature:dt,rawExtraFieldZip64:nt,compressedSize:Ge,uncompressedSize:Ye,headerInfo:a,dataDescriptorInfo:u},o),le&&await ot(we,b),Object.assign(_t,{uncompressedSize:Ye,compressedSize:Ge,lastModDate:h,rawLastModDate:x,creationDate:E,lastAccessDate:A,encrypted:y,zipCrypto:N,size:l+Ge,compressionMethod:p,version:d,headerArray:m,signature:dt,rawExtraFieldZip64:nt,extraFieldExtendedTimestampFlag:g,zip64UncompressedSize:U,zip64CompressedSize:O,zip64Offset:I,zip64DiskNumberStart:V}),_t}function n0(t){const{rawFilename:e,lastModDate:n,lastAccessDate:r,creationDate:s,level:i,zip64:o,zipCrypto:a,useUnicodeFileNames:u,dataDescriptor:l,directory:c,rawExtraField:m,encryptionStrength:h,extendedTimestamp:x,encrypted:y}=t;let{version:f,compressionMethod:d}=t;const p=!c&&(i>0||i===ne&&d!==0);let D;if(y&&!a){D=new Uint8Array(J(li)+2);const I=Ae(D);Q(I,0,Eu),De(D,li,2),Mr(I,8,h)}else D=new Uint8Array;let g,_,w;if(x){_=new Uint8Array(9+(r?4:0)+(s?4:0));const I=Ae(_);Q(I,0,Ni),Q(I,2,J(_)-4),w=1+(r?2:0)+(s?4:0),Mr(I,4,w);let V=5;K(I,V,Math.floor(n.getTime()/1e3)),V+=4,r&&(K(I,V,Math.floor(r.getTime()/1e3)),V+=4),s&&K(I,V,Math.floor(s.getTime()/1e3));try{g=new Uint8Array(36);const N=Ae(g),le=Ar(n);Q(N,0,Fu),Q(N,2,32),Q(N,8,Su),Q(N,10,24),Me(N,12,le),Me(N,20,Ar(r)||le),Me(N,28,Ar(s)||le)}catch{g=new Uint8Array}}else g=_=new Uint8Array;let b=0;u&&(b=b|Bu),l&&(b=b|Pu),d===ne&&(d=p?qs:xu),d==qs&&(i>=1&&i<3&&(b=b|6),i>=3&&i<5&&(b=b|1),i===9&&(b=b|2)),o&&(f=f>Ws?f:Ws),y&&(b=b|Tu,a||(f=f>Hs?f:Hs,D[9]=d,d=Du));const v=new Uint8Array(26),A=Ae(v);Q(A,0,f),Q(A,2,b),Q(A,4,d);const E=new Uint32Array(1),k=Ae(E);let F;n<Gs?F=Gs:n>Ys?F=Ys:F=n,Q(k,0,(F.getHours()<<6|F.getMinutes())<<5|F.getSeconds()/2),Q(k,2,(F.getFullYear()-1980<<4|F.getMonth()+1)<<5|F.getDate());const L=E[0];K(A,6,L),Q(A,22,J(e));const M=J(D,_,g,m);Q(A,24,M);const U=new Uint8Array(30+J(e)+M),O=Ae(U);return K(O,0,gu),De(U,v,4),De(U,e,30),De(U,D,30+J(e)),De(U,_,30+J(e,D)),De(U,g,30+J(e,D,_)),De(U,m,30+J(e,D,_,g)),{localHeaderArray:U,headerArray:v,headerView:A,lastModDate:n,rawLastModDate:L,encrypted:y,compressed:p,version:f,compressionMethod:d,extraFieldExtendedTimestampFlag:w,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:g,rawExtraFieldAES:D,extraFieldLength:M}}function r0(t,e){const{headerInfo:n}=t;let{localHeaderArray:r,extraFieldLength:s}=n,i=Ae(r),o=64-(e+J(r))%64;o<4&&(o+=64);const a=new Uint8Array(o),u=Ae(a);Q(u,0,ku),Q(u,2,o-2);const l=r;n.localHeaderArray=r=new Uint8Array(J(l)+o),De(r,l),De(r,a,J(l)),i=Ae(r),Q(i,28,s+o),t.metadataSize+=o}function s0(t){const{zip64:e,dataDescriptor:n,dataDescriptorSignature:r}=t;let s=new Uint8Array,i,o=0;return n&&(s=new Uint8Array(e?r?24:20:r?16:12),i=Ae(s),r&&(o=4,K(i,0,wu))),{dataDescriptorArray:s,dataDescriptorView:i,dataDescriptorOffset:o}}function i0(t,e){const{signature:n,rawExtraFieldZip64:r,compressedSize:s,uncompressedSize:i,headerInfo:o,dataDescriptorInfo:a}=t,{headerView:u,encrypted:l}=o,{dataDescriptorView:c,dataDescriptorOffset:m}=a,{zip64:h,zip64UncompressedSize:x,zip64CompressedSize:y,zipCrypto:f,dataDescriptor:d}=e;if((!l||f)&&n!==ne&&(K(u,10,n),d&&K(c,m,n)),h){const p=Ae(r);Q(p,0,Cu),Q(p,2,J(r)-4);let D=4;x&&(K(u,18,Le),Me(p,D,BigInt(i)),D+=8),y&&(K(u,14,Le),Me(p,D,BigInt(s))),d&&(Me(c,m+4,BigInt(s)),Me(c,m+12,BigInt(i)))}else K(u,14,s),K(u,18,i),d&&(K(c,m+4,s),K(c,m+8,i))}async function o0(t,e,n,{zipCrypto:r}){let s;s=await e.slice(0,26).arrayBuffer(),s.byteLength!=26&&(s=s.slice(0,26));const i=new DataView(s);return(!t.encrypted||r)&&K(i,14,t.signature),t.zip64?(K(i,18,Le),K(i,22,Le)):(K(i,18,t.compressedSize),K(i,22,t.uncompressedSize)),await ot(n,new Uint8Array(s)),e.slice(s.byteLength)}function a0(t,e){const{rawExtraFieldZip64:n,offset:r,diskNumberStart:s}=t,{zip64UncompressedSize:i,zip64CompressedSize:o,zip64Offset:a,zip64DiskNumberStart:u}=e,l=Ae(n);let c=4;i&&(c+=8),o&&(c+=8),a&&(Me(l,c,BigInt(r)),c+=8),u&&K(l,c,s)}async function u0(t,e,n){const{files:r,writer:s}=t,{diskOffset:i,writable:o}=s;let{diskNumber:a}=s,u=0,l=0,c=t.offset-i,m=r.size;for(const[,w]of r){const{rawFilename:b,rawExtraFieldZip64:v,rawExtraFieldAES:A,rawComment:E,rawExtraFieldNTFS:k,rawExtraField:F,extendedTimestamp:L,extraFieldExtendedTimestampFlag:M,lastModDate:U}=w;let O;if(L){O=new Uint8Array(9);const I=Ae(O);Q(I,0,Ni),Q(I,2,5),Mr(I,4,M),K(I,5,Math.floor(U.getTime()/1e3))}else O=new Uint8Array;w.rawExtraFieldCDExtendedTimestamp=O,l+=46+J(b,E,v,A,k,O,F)}const h=new Uint8Array(l),x=Ae(h);await hn(s);let y=0;for(const[w,b]of Array.from(r.values()).entries()){const{offset:v,rawFilename:A,rawExtraFieldZip64:E,rawExtraFieldAES:k,rawExtraFieldCDExtendedTimestamp:F,rawExtraFieldNTFS:L,rawExtraField:M,rawComment:U,versionMadeBy:O,headerArray:I,zip64:V,zip64UncompressedSize:N,zip64CompressedSize:le,zip64DiskNumberStart:R,zip64Offset:de,internalFileAttributes:j,externalFileAttributes:G,diskNumberStart:Se,uncompressedSize:ge,compressedSize:pe}=b,lt=J(E,k,F,L,M);K(x,u,yu),Q(x,u+4,O);const tt=Ae(I);N||K(tt,18,ge),le||K(tt,14,pe),De(h,I,u+6),Q(x,u+30,lt),Q(x,u+32,J(U)),Q(x,u+34,V&&R?Be:Se),Q(x,u+36,j),G&&K(x,u+38,G),K(x,u+42,V&&de?Le:v),De(h,A,u+46),De(h,E,u+46+J(A)),De(h,k,u+46+J(A,E)),De(h,F,u+46+J(A,E,k)),De(h,L,u+46+J(A,E,k,F)),De(h,M,u+46+J(A,E,k,F,L)),De(h,U,u+46+J(A)+lt);const yt=46+J(A,U)+lt;if(u-y>s.availableSize&&(s.availableSize=0,await ot(o,h.slice(y,u)),y=u),u+=yt,n.onprogress)try{await n.onprogress(w+1,r.size,new Eo(b))}catch{}}await ot(o,y?h.slice(y):h);let f=s.diskNumber;const{availableSize:d}=s;d<kr&&f++;let p=X(t,n,Jr);if(c>Le||l>Le||m>Be||f>Be){if(p===!1)throw new Error(zr);p=!0}const D=new Uint8Array(p?vu:kr),g=Ae(D);u=0,p&&(K(g,0,_u),Me(g,4,BigInt(44)),Q(g,12,45),Q(g,14,45),K(g,16,f),K(g,20,a),Me(g,24,BigInt(m)),Me(g,32,BigInt(m)),Me(g,40,BigInt(l)),Me(g,48,BigInt(c)),K(g,56,Au),Me(g,64,BigInt(c)+BigInt(l)),K(g,72,f+1),X(t,n,"supportZip64SplitFile",!0)&&(f=Be,a=Be),m=Be,c=Le,l=Le,u+=Oi+$i),K(g,u,bu),Q(g,u+4,f),Q(g,u+6,a),Q(g,u+8,m),Q(g,u+10,m),K(g,u+12,l),K(g,u+16,c);const _=J(e);if(_)if(_<=Be)Q(g,u+20,_);else throw new Error(Hc);await ot(o,D),_&&await ot(o,e)}async function ot(t,e){const n=t.getWriter();try{await n.ready,t.size+=J(e),await n.write(e)}finally{n.releaseLock()}}function Ar(t){if(t)return(BigInt(t.getTime())+BigInt(116444736e5))*BigInt(1e4)}function X(t,e,n,r){const s=e[n]===ne?t.options[n]:e[n];return s===ne?r:s}function di(t){return t+5*(Math.floor(t/16383)+1)}function Mr(t,e,n){t.setUint8(e,n)}function Q(t,e,n){t.setUint16(e,n,!0)}function K(t,e,n){t.setUint32(e,n,!0)}function Me(t,e,n){t.setBigUint64(e,n,!0)}function De(t,e,n){t.set(e,n)}function Ae(t){return new DataView(t.buffer)}function J(...t){let e=0;return t.forEach(n=>n&&(e+=n.length)),e}let Fo;try{Fo=import.meta.url}catch{}Gr({baseURL:Fo});vc(Gr);Gr({Deflate:Za,Inflate:mu});var c0=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,l0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,f0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,vr={Space_Separator:c0,ID_Start:l0,ID_Continue:f0},he={isSpaceSeparator(t){return typeof t=="string"&&vr.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||vr.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t===""||t===""||vr.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}};let Ir,Fe,mt,qn,It,et,ye,Qr,cn;var d0=function(e,n){Ir=String(e),Fe="start",mt=[],qn=0,It=1,et=0,ye=void 0,Qr=void 0,cn=void 0;do ye=p0(),x0[Fe]();while(ye.type!=="eof");return typeof n=="function"?Lr({"":cn},"",n):cn};function Lr(t,e,n){const r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let s=0;s<r.length;s++){const i=String(s),o=Lr(r,i,n);o===void 0?delete r[i]:Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(const s in r){const i=Lr(r,s,n);i===void 0?delete r[s]:Object.defineProperty(r,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}return n.call(t,e,r)}let H,W,un,pt,Z;function p0(){for(H="default",W="",un=!1,pt=1;;){Z=gt();const t=So[H]();if(t)return t}}function gt(){if(Ir[qn])return String.fromCodePoint(Ir.codePointAt(qn))}function S(){const t=gt();return t===`
|
|
3
|
-
`?(It++,et=0):t?et+=t.length:et++,t&&(qn+=t.length),t}const So={default(){switch(Z){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
|
|
4
|
-
`:case"\r":case"\u2028":case"\u2029":S();return;case"/":S(),H="comment";return;case void 0:return S(),re("eof")}if(he.isSpaceSeparator(Z)){S();return}return So[Fe]()},comment(){switch(Z){case"*":S(),H="multiLineComment";return;case"/":S(),H="singleLineComment";return}throw se(S())},multiLineComment(){switch(Z){case"*":S(),H="multiLineCommentAsterisk";return;case void 0:throw se(S())}S()},multiLineCommentAsterisk(){switch(Z){case"*":S();return;case"/":S(),H="default";return;case void 0:throw se(S())}S(),H="multiLineComment"},singleLineComment(){switch(Z){case`
|
|
5
|
-
`:case"\r":case"\u2028":case"\u2029":S(),H="default";return;case void 0:return S(),re("eof")}S()},value(){switch(Z){case"{":case"[":return re("punctuator",S());case"n":return S(),$t("ull"),re("null",null);case"t":return S(),$t("rue"),re("boolean",!0);case"f":return S(),$t("alse"),re("boolean",!1);case"-":case"+":S()==="-"&&(pt=-1),H="sign";return;case".":W=S(),H="decimalPointLeading";return;case"0":W=S(),H="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":W=S(),H="decimalInteger";return;case"I":return S(),$t("nfinity"),re("numeric",1/0);case"N":return S(),$t("aN"),re("numeric",NaN);case'"':case"'":un=S()==='"',W="",H="string";return}throw se(S())},identifierNameStartEscape(){if(Z!=="u")throw se(S());S();const t=$r();switch(t){case"$":case"_":break;default:if(!he.isIdStartChar(t))throw pi();break}W+=t,H="identifierName"},identifierName(){switch(Z){case"$":case"_":case"":case"":W+=S();return;case"\\":S(),H="identifierNameEscape";return}if(he.isIdContinueChar(Z)){W+=S();return}return re("identifier",W)},identifierNameEscape(){if(Z!=="u")throw se(S());S();const t=$r();switch(t){case"$":case"_":case"":case"":break;default:if(!he.isIdContinueChar(t))throw pi();break}W+=t,H="identifierName"},sign(){switch(Z){case".":W=S(),H="decimalPointLeading";return;case"0":W=S(),H="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":W=S(),H="decimalInteger";return;case"I":return S(),$t("nfinity"),re("numeric",pt*(1/0));case"N":return S(),$t("aN"),re("numeric",NaN)}throw se(S())},zero(){switch(Z){case".":W+=S(),H="decimalPoint";return;case"e":case"E":W+=S(),H="decimalExponent";return;case"x":case"X":W+=S(),H="hexadecimal";return}return re("numeric",pt*0)},decimalInteger(){switch(Z){case".":W+=S(),H="decimalPoint";return;case"e":case"E":W+=S(),H="decimalExponent";return}if(he.isDigit(Z)){W+=S();return}return re("numeric",pt*Number(W))},decimalPointLeading(){if(he.isDigit(Z)){W+=S(),H="decimalFraction";return}throw se(S())},decimalPoint(){switch(Z){case"e":case"E":W+=S(),H="decimalExponent";return}if(he.isDigit(Z)){W+=S(),H="decimalFraction";return}return re("numeric",pt*Number(W))},decimalFraction(){switch(Z){case"e":case"E":W+=S(),H="decimalExponent";return}if(he.isDigit(Z)){W+=S();return}return re("numeric",pt*Number(W))},decimalExponent(){switch(Z){case"+":case"-":W+=S(),H="decimalExponentSign";return}if(he.isDigit(Z)){W+=S(),H="decimalExponentInteger";return}throw se(S())},decimalExponentSign(){if(he.isDigit(Z)){W+=S(),H="decimalExponentInteger";return}throw se(S())},decimalExponentInteger(){if(he.isDigit(Z)){W+=S();return}return re("numeric",pt*Number(W))},hexadecimal(){if(he.isHexDigit(Z)){W+=S(),H="hexadecimalInteger";return}throw se(S())},hexadecimalInteger(){if(he.isHexDigit(Z)){W+=S();return}return re("numeric",pt*Number(W))},string(){switch(Z){case"\\":S(),W+=h0();return;case'"':if(un)return S(),re("string",W);W+=S();return;case"'":if(!un)return S(),re("string",W);W+=S();return;case`
|
|
6
|
-
`:case"\r":throw se(S());case"\u2028":case"\u2029":D0(Z);break;case void 0:throw se(S())}W+=S()},start(){switch(Z){case"{":case"[":return re("punctuator",S())}H="value"},beforePropertyName(){switch(Z){case"$":case"_":W=S(),H="identifierName";return;case"\\":S(),H="identifierNameStartEscape";return;case"}":return re("punctuator",S());case'"':case"'":un=S()==='"',H="string";return}if(he.isIdStartChar(Z)){W+=S(),H="identifierName";return}throw se(S())},afterPropertyName(){if(Z===":")return re("punctuator",S());throw se(S())},beforePropertyValue(){H="value"},afterPropertyValue(){switch(Z){case",":case"}":return re("punctuator",S())}throw se(S())},beforeArrayValue(){if(Z==="]")return re("punctuator",S());H="value"},afterArrayValue(){switch(Z){case",":case"]":return re("punctuator",S())}throw se(S())},end(){throw se(S())}};function re(t,e){return{type:t,value:e,line:It,column:et}}function $t(t){for(const e of t){if(gt()!==e)throw se(S());S()}}function h0(){switch(gt()){case"b":return S(),"\b";case"f":return S(),"\f";case"n":return S(),`
|
|
7
|
-
`;case"r":return S(),"\r";case"t":return S()," ";case"v":return S(),"\v";case"0":if(S(),he.isDigit(gt()))throw se(S());return"\0";case"x":return S(),m0();case"u":return S(),$r();case`
|
|
8
|
-
`:case"\u2028":case"\u2029":return S(),"";case"\r":return S(),gt()===`
|
|
9
|
-
`&&S(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw se(S());case void 0:throw se(S())}return S()}function m0(){let t="",e=gt();if(!he.isHexDigit(e)||(t+=S(),e=gt(),!he.isHexDigit(e)))throw se(S());return t+=S(),String.fromCodePoint(parseInt(t,16))}function $r(){let t="",e=4;for(;e-- >0;){const n=gt();if(!he.isHexDigit(n))throw se(S());t+=S()}return String.fromCodePoint(parseInt(t,16))}const x0={start(){if(ye.type==="eof")throw Ot();Cr()},beforePropertyName(){switch(ye.type){case"identifier":case"string":Qr=ye.value,Fe="afterPropertyName";return;case"punctuator":Pn();return;case"eof":throw Ot()}},afterPropertyName(){if(ye.type==="eof")throw Ot();Fe="beforePropertyValue"},beforePropertyValue(){if(ye.type==="eof")throw Ot();Cr()},beforeArrayValue(){if(ye.type==="eof")throw Ot();if(ye.type==="punctuator"&&ye.value==="]"){Pn();return}Cr()},afterPropertyValue(){if(ye.type==="eof")throw Ot();switch(ye.value){case",":Fe="beforePropertyName";return;case"}":Pn()}},afterArrayValue(){if(ye.type==="eof")throw Ot();switch(ye.value){case",":Fe="beforeArrayValue";return;case"]":Pn()}},end(){}};function Cr(){let t;switch(ye.type){case"punctuator":switch(ye.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=ye.value;break}if(cn===void 0)cn=t;else{const e=mt[mt.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,Qr,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")mt.push(t),Array.isArray(t)?Fe="beforeArrayValue":Fe="beforePropertyName";else{const e=mt[mt.length-1];e==null?Fe="end":Array.isArray(e)?Fe="afterArrayValue":Fe="afterPropertyValue"}}function Pn(){mt.pop();const t=mt[mt.length-1];t==null?Fe="end":Array.isArray(t)?Fe="afterArrayValue":Fe="afterPropertyValue"}function se(t){return jn(t===void 0?`JSON5: invalid end of input at ${It}:${et}`:`JSON5: invalid character '${ko(t)}' at ${It}:${et}`)}function Ot(){return jn(`JSON5: invalid end of input at ${It}:${et}`)}function pi(){return et-=5,jn(`JSON5: invalid identifier character at ${It}:${et}`)}function D0(t){console.warn(`JSON5: '${ko(t)}' in strings is not valid ECMAScript; consider escaping`)}function ko(t){const e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){const n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function jn(t){const e=new SyntaxError(t);return e.lineNumber=It,e.columnNumber=et,e}var g0=function(e,n,r){const s=[];let i="",o,a,u="",l;if(n!=null&&typeof n=="object"&&!Array.isArray(n)&&(r=n.space,l=n.quote,n=n.replacer),typeof n=="function")a=n;else if(Array.isArray(n)){o=[];for(const f of n){let d;typeof f=="string"?d=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(d=String(f)),d!==void 0&&o.indexOf(d)<0&&o.push(d)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r=="number"?r>0&&(r=Math.min(10,Math.floor(r)),u=" ".substr(0,r)):typeof r=="string"&&(u=r.substr(0,10)),c("",{"":e});function c(f,d){let p=d[f];switch(p!=null&&(typeof p.toJSON5=="function"?p=p.toJSON5(f):typeof p.toJSON=="function"&&(p=p.toJSON(f))),a&&(p=a.call(d,f,p)),p instanceof Number?p=Number(p):p instanceof String?p=String(p):p instanceof Boolean&&(p=p.valueOf()),p){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof p=="string")return m(p);if(typeof p=="number")return String(p);if(typeof p=="object")return Array.isArray(p)?y(p):h(p)}function m(f){const d={"'":.1,'"':.2},p={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let D="";for(let _=0;_<f.length;_++){const w=f[_];switch(w){case"'":case'"':d[w]++,D+=w;continue;case"\0":if(he.isDigit(f[_+1])){D+="\\x00";continue}}if(p[w]){D+=p[w];continue}if(w<" "){let b=w.charCodeAt(0).toString(16);D+="\\x"+("00"+b).substring(b.length);continue}D+=w}const g=l||Object.keys(d).reduce((_,w)=>d[_]<d[w]?_:w);return D=D.replace(new RegExp(g,"g"),p[g]),g+D+g}function h(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let d=i;i=i+u;let p=o||Object.keys(f),D=[];for(const _ of p){const w=c(_,f);if(w!==void 0){let b=x(_)+":";u!==""&&(b+=" "),b+=w,D.push(b)}}let g;if(D.length===0)g="{}";else{let _;if(u==="")_=D.join(","),g="{"+_+"}";else{let w=`,
|
|
10
|
-
`+i;_=D.join(w),g=`{
|
|
11
|
-
`+i+_+`,
|
|
12
|
-
`+d+"}"}}return s.pop(),i=d,g}function x(f){if(f.length===0)return m(f);const d=String.fromCodePoint(f.codePointAt(0));if(!he.isIdStartChar(d))return m(f);for(let p=d.length;p<f.length;p++)if(!he.isIdContinueChar(String.fromCodePoint(f.codePointAt(p))))return m(f);return f}function y(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let d=i;i=i+u;let p=[];for(let g=0;g<f.length;g++){const _=c(String(g),f);p.push(_!==void 0?_:"null")}let D;if(p.length===0)D="[]";else if(u==="")D="["+p.join(",")+"]";else{let g=`,
|
|
13
|
-
`+i,_=p.join(g);D=`[
|
|
14
|
-
`+i+_+`,
|
|
15
|
-
`+d+"]"}return s.pop(),i=d,D}};const w0={parse:d0,stringify:g0};var y0=w0,es=10**-4;function Ie(t){return 180*t/Math.PI}function te(t){let e=t;return Math.abs(e)<es&&(e=0),e}function wt(t){let e=t%(2*Math.PI);return e<0&&(e+=2*Math.PI),e}function ce(t){let e=wt(t);return e>Math.PI&&(e-=2*Math.PI),e}function it(t){let e=t%Math.PI;return e<0&&(e+=Math.PI),e}function Oe(t){let e=it(t);return e>Math.PI/2&&(e-=Math.PI),e}function Or(t,e,n){const r=ce(e)-ce(t);return n?wt(r):wt(r)-2*Math.PI}function To(t,e,n,r){let s=!1;if(te(ce(t-e))===0)s=!0;else if(te(ce(t-n))===0)s=!0;else{const i=Or(e,n,r),o=Or(e,t,r);Math.abs(o)<Math.abs(i)&&(s=!0)}return s}function at(t){return t.toFixed(2)}var fe={point:"grey",line:"grey",contour:"green",mainOuter:"SlateBlue",mainInner:"SteelBlue",mainB:"SlateGrey",second:"Violet",secondB:"SlateGrey",dynamics:"Tomato",ruler:"blue",origin:"red",reference:"blue",mouse:"yellow"},Xt=.05;function Vt(t,e,n){const r=n.shiftX+(t-n.xMin)*n.scaleX,s=n.shiftY+(e-n.yMin)*n.scaleY;return[r,s]}function Bl(t,e,n){const r=(t-n.shiftX)/n.scaleX+n.xMin,s=(e-n.shiftY)/n.scaleY+n.yMin;return[r,s]}function Po(t,e){if(te(e.scaleX-Math.abs(e.scaleY))!==0)throw`err683: iAdjust.scaleX and scaleY differ ${e.scaleX} ${e.scaleY}`;if(e.scaleX<0)throw`err684: iAdjust.scaleX ${e.scaleX} is negative`;const n=t*e.scaleX;if(n<0)throw`err685: rRadius for canvas ${n} is negative`;return n}function Nr(){return{init:0,xMin:0,yMin:0,xyDiff:1,shiftX:0,shiftY:0,scaleX:1,scaleY:1}}function Kn(t){return{init:t.init,xMin:t.xMin,yMin:t.yMin,xyDiff:t.xyDiff,shiftX:t.shiftX,shiftY:t.shiftY,scaleX:t.scaleX,scaleY:t.scaleY}}function Rr(t,e,n,r,s,i){const o=Nr(),a=Math.max(e-t,1),u=Math.max(r-n,1),l=s/a,c=i/u;let m=.9*l,h=a;return c<l&&(m=.9*c,h=u),o.init=1,o.xMin=t,o.yMin=n,o.xyDiff=h,o.shiftX=Xt*s,o.scaleX=m,o.shiftY=i-Xt*i,o.scaleY=-1*m,o}function Ml(t,e,n){const r=Kn(n);return r.xMin=t-r.xyDiff/2,r.yMin=e-r.xyDiff/2,r}function Il(t,e,n,r,s,i){const o=Math.min(t,n),a=Math.max(t,n),u=Math.min(e,r),l=Math.max(e,r);return Rr(o,a,u,l,s,i)}function Ll(t,e){const n=Kn(e),r=(1-t)/2;return n.xMin+=r*e.xyDiff,n.yMin+=r*e.xyDiff,n.xyDiff*=t,n.scaleX*=1/t,n.scaleY*=1/t,n}function $l(t,e,n,r,s){const i=Kn(s),o=n-t,a=r-e;return i.xMin+=-o,i.yMin+=-a,i}function Ol(t,e,n){const r=Kn(n);if(t>0&&e>0){const s=t/e;r.xyDiff*=s,r.scaleX*=1/s,r.scaleY*=1/s,r.shiftX+=Xt*e-Xt*t,r.shiftY+=(1-Xt)*e-(1-Xt)*t}return r}function Jn(t,e){let n=0;if(e>t)throw`err539: ila < ilc ${t} ${e}`;return n=Math.sqrt(t**2-e**2),n}function hi(t,e,n){let r=0;const s=[t,e,n];for(let o=0;o<s.length;o++)if(s[o]<0)throw`err209: l3[${o}] = ${s[o]}`;const i=s.sort(function(o,a){return a-o});if(i[0]>i[1]+i[2])throw`err839: impossible triangle with length ${t}, ${e} and ${n}`;return r=Math.acos((t**2+e**2-n**2)/(2*t*e)),r}function mi(t,e,n){let r=0;const s=[t,e,n];for(let u=0;u<s.length;u++)if(te(s[u])===0||s[u]<0)throw`err329: negative or zero triangle-args ${u} : ${s[u]}`;const i=it(e),o=it(n);if(i+o>Math.PI)throw`err939: impossible triangle with angles ${e} and ${n}`;return r=t*Math.sin(n)/Math.sin(e),r}var Ve=class Gt{cx;cy;shape;constructor(e,n,r=0){this.cx=e,this.cy=n,this.shape=r}draw(e,n,r=fe.point,s=0){if(isFinite(this.cx)&&isFinite(this.cy)){const i=e.canvas.width*.006999999999999999,o=2*i,[a,u]=Vt(this.cx,this.cy,n);let l=s;switch(l===0&&(l=this.shape),e.beginPath(),l){case 2:e.moveTo(a-o,u),e.lineTo(a+o,u),e.moveTo(a,u-o),e.lineTo(a,u+o);break;case 3:e.rect(a-i,u-i,2*i,2*i);break;case 4:e.rect(a-2*i,u-2*i,4*i,4*i);break;case 5:e.moveTo(a-o,u),e.lineTo(a+o,u),e.lineTo(a,u+o),e.lineTo(a,u-o),e.lineTo(a-o,u);break;case 6:e.moveTo(a-o,u),e.lineTo(a+o,u),e.lineTo(a,u-o),e.lineTo(a,u+o);break;case 7:e.moveTo(a+o,u),e.lineTo(a-o,u),e.lineTo(a,u-o),e.lineTo(a,u+o);break;case 8:e.moveTo(a+o,u),e.lineTo(a-o,u),e.lineTo(a,u+o),e.lineTo(a,u-o);break;case 9:e.moveTo(a-o,u),e.lineTo(a+o,u),e.lineTo(a,u+o),e.lineTo(a,u-o);break;case 1:default:e.arc(a,u,i,0,2*Math.PI)}e.strokeStyle=r,e.stroke()}else console.log(`INFO489: point not draw because of infinity ${this.cx} ${this.cy}`)}distanceOrig(){return Math.sqrt(this.cx**2+this.cy**2)}angleOrig(){return Math.atan2(this.cy,this.cx)}getPolar(){return[this.angleOrig(),this.distanceOrig()]}setPolar(e,n){return new Gt(n*Math.cos(e),n*Math.sin(e))}translate(e,n){return new Gt(this.cx+e,this.cy+n)}translatePolar(e,n){return new Gt(this.cx+n*Math.cos(e),this.cy+n*Math.sin(e))}clone(e=0){return new Gt(this.cx,this.cy,e)}rotateOrig(e){const n=this.getPolar();return this.setPolar(n[0]+e,n[1])}scaleOrig(e){const n=this.getPolar();return this.setPolar(n[0],n[1]*e)}rotate(e,n){const s=this.translate(-1*e.cx,-1*e.cy).getPolar();return this.setPolar(s[0]+n,s[1]).translate(e.cx,e.cy)}scale(e,n){const s=this.translate(-1*e.cx,-1*e.cy).getPolar();return this.setPolar(s[0],s[1]*n).translate(e.cx,e.cy)}isEqual(e){return te(this.cx-e.cx)===0&&te(this.cy-e.cy)===0}distanceToPoint(e){return Math.sqrt((e.cx-this.cx)**2+(e.cy-this.cy)**2)}angleToPoint(e){if(te(this.distanceToPoint(e))===0)throw`err434: no angle because points identical ${this.cx} ${e.cx} ${this.cy} ${e.cy}`;return Math.atan2(e.cy-this.cy,e.cx-this.cx)}angleFromToPoints(e,n){const r=this.angleToPoint(e),s=this.angleToPoint(n);return ce(s-r)}middlePoint(e){const n=(this.cx+e.cx)/2,r=(this.cy+e.cy)/2;return new Gt(n,r)}equidistantPoint(e,n,r){const s=this.distanceToPoint(e)/2;if(this.isEqual(e))throw`err633: no equidistance because identical point ${this.cx} ${this.cy}`;if(n<s)throw`err392: equidistance ${n} smaller than lp1p2h ${s}`;const i=this.middlePoint(e),o=this.angleToPoint(e)+Math.PI/2,a=Math.sqrt(n**2-s**2),u=i.translatePolar(o,a),l=i.translatePolar(o+Math.PI,a),c=r.distanceToPoint(u),m=r.distanceToPoint(l);if(a!==0&&c===m)throw`err284: magnet point p3 is on line p1p2. cx ${r.cx} cy: ${r.cy}`;let h=u;return m<c&&(h=l),h}};function Y(t,e,n=0){return new Ve(t,e,n)}function Bo(t){let e=0,n=0,r=0,s=0;if(t.length>0){const i=t[0];if(i.cx===Number.NEGATIVE_INFINITY||i.cx===Number.POSITIVE_INFINITY||i.cy===Number.NEGATIVE_INFINITY||i.cy===Number.POSITIVE_INFINITY)throw`err292: pointMinMax first point with infinity: ${i.cx} ${i.cy}`;e=t[0].cx,n=t[0].cx,r=t[0].cy,s=t[0].cy;for(const o of t)o.cx!==Number.NEGATIVE_INFINITY&&(e=Math.min(e,o.cx)),o.cx!==Number.POSITIVE_INFINITY&&(n=Math.max(n,o.cx)),o.cy!==Number.NEGATIVE_INFINITY&&(r=Math.min(r,o.cy)),o.cy!==Number.POSITIVE_INFINITY&&(s=Math.max(s,o.cy))}return[e,n,r,s]}var b0=class Te{cx;cy;ca;constructor(e,n,r){this.cx=e,this.cy=n,this.ca=r}draw(e,n,r=fe.line){const s=e.canvas.width*2,[i,o]=Vt(this.cx-s*Math.cos(this.ca),this.cy-s*Math.sin(this.ca),n),[a,u]=Vt(this.cx+2*s*Math.cos(this.ca),this.cy+2*s*Math.sin(this.ca),n);e.beginPath(),e.moveTo(i,o),e.lineTo(a,u),e.strokeStyle=r,e.stroke()}setFromPoints(e,n){return this.cx=e.cx,this.cy=e.cy,this.ca=e.angleToPoint(n),this}getAffine(){const e={quasiVertical:!1,ha:0,hb:0,va:0,vb:0};return Math.abs(Oe(this.ca))>Math.PI/4?(e.quasiVertical=!0,e.va=-1*Math.tan(Oe(this.ca-Math.PI/2)),e.vb=this.cx-e.va*this.cy):(e.ha=Math.tan(Oe(this.ca)),e.hb=this.cy-e.ha*this.cx),e}setAffine(e){const n=new Te(0,0,0);return e.quasiVertical?(n.ca=Math.PI/2-Math.atan(e.va),n.cx=e.vb,n.cy=0):(n.ca=Math.atan(e.ha),n.cx=0,n.cy=e.hb),n}intersection(e){if(this.isParallel(e))throw`err902: no intersection, lines are parallel ca1: ${this.ca} ca2: ${e.ca}`;let n=0,r=0;const s=this.getAffine(),i=e.getAffine();return s.quasiVertical?i.quasiVertical?(r=(s.vb-i.vb)/(i.va-s.va),n=s.va*r+s.vb):(n=(s.va*i.hb+s.vb)/(1-s.va*i.ha),r=i.ha*n+i.hb):i.quasiVertical?(r=(s.ha*i.vb+s.hb)/(1-s.ha*i.va),n=i.va*r+i.vb):(n=(s.hb-i.hb)/(i.ha-s.ha),r=s.ha*n+s.hb),Y(n,r)}getAxisXIntersection(){const e=new Te(0,0,0);return this.intersection(e).cx}getAxisYIntersection(){const e=new Te(0,0,Math.PI/2);return this.intersection(e).cy}getAxisXIntersecTri(){let e=1/0;if(te(Oe(this.ca))!==0){const n=new Ve(this.cx,this.cy),r=it(this.ca),s=n.angleOrig(),i=n.distanceOrig();if(te(i)===0)e=0;else if(te(Oe(r-s))===0)e=0;else{const o=Math.min(r,Math.PI-r),a=ce(r-s),u=Math.min(Math.abs(a),Math.PI-Math.abs(a));e=Math.sign(a)*mi(i,o,u)}}return e}getAxisYIntersecTri(){let e=1/0;if(te(Oe(this.ca-Math.PI/2))!==0){const n=new Ve(this.cx,this.cy),r=Oe(this.ca),s=n.angleOrig(),i=n.distanceOrig(),o=Oe(r-s);if(te(i)===0)e=0;else if(te(o)===0)e=0;else{const a=it(r-Math.PI/2),u=-1*ce(r-s),l=Math.min(a,Math.PI-a),c=Math.min(Math.abs(u),Math.PI-Math.abs(u));e=Math.sign(u)*mi(i,l,c)}}return e}angleOrig(){const n=new Ve(this.cx,this.cy).angleOrig(),r=Oe(this.ca),s=-1*ce(r-n);let i=0;return s<0&&(i=-Math.PI),it(Math.PI/2+this.ca)+i}distanceOrig(){const e=this.angleOrig(),n=new Ve(this.cx,this.cy),r=n.angleOrig(),s=n.distanceOrig(),i=Oe(r-e);return s*Math.cos(i)}projectOrig(){const e=this.angleOrig(),n=this.distanceOrig();return Y(0,0).setPolar(e,n)}translate(e,n){return new Te(this.cx+e,this.cy+n,this.ca)}rotateOrig(e){const n=new Ve(this.cx,this.cy).rotateOrig(e);return new Te(n.cx,n.cy,ce(this.ca+e))}scaleOrig(e){const n=new Ve(this.cx,this.cy).scaleOrig(e);return new Te(n.cx,n.cy,this.ca)}rotate(e,n){const r=new Ve(this.cx,this.cy).rotate(e,n);return new Te(r.cx,r.cy,ce(this.ca+n))}scale(e,n){const r=new Ve(this.cx,this.cy).scale(e,n);return new Te(r.cx,r.cy,this.ca)}clone(){const e=new Ve(this.cx,this.cy);return new Te(e.cx,e.cy,this.ca)}lineOrthogonal(e){return new Te(e.cx,e.cy,this.ca+Math.PI/2)}lineParallel(e){return new Te(e.cx,e.cy,this.ca)}distanceToPoint(e){let n=0;const r=new Ve(this.cx,this.cy),s=r.distanceToPoint(e);if(te(s)!==0){const i=r.angleToPoint(e),o=Oe(i-this.ca);n=s*Math.abs(Math.sin(o))}return n}projectPoint(e){let n=0;const r=new Ve(this.cx,this.cy),s=r.distanceToPoint(e);if(te(s)!==0){const o=r.angleToPoint(e),a=ce(o-this.ca);n=s*Math.cos(a)}return r.translatePolar(this.ca,n)}isParallel(e){return te(Oe(this.ca-e.ca))===0}isOrthogonal(e){return te(Oe(Math.PI/2+this.ca-e.ca))===0}isEqual(e){const n=Y(e.cx,e.cy),r=this.distanceToPoint(n);return te(r)===0&&this.isParallel(e)}bisector(e,n){const r=this.intersection(e),s=it(this.ca),i=it(e.ca),o=Math.min(s,i),a=Math.max(s,i),u=[o,a,o+Math.PI,a+Math.PI,o],l=r.angleToPoint(n);let c=0;for(let x=0;x<4;x++){const y=ce(u[x]-l),f=ce(u[x+1]-l);if(y===0||f===0)throw`err419: bad reference point for bisecor ${n.cx} ${n.cy}`;y<0&&f>0&&(c=x)}const h=it((o+a)/2)+c*Math.PI/2;return new Te(r.cx,r.cy,h)}lineParallelDistance(e,n,r){const s=Y(this.cx,this.cy),i=s.translatePolar(this.ca+Math.PI/2,e),o=s.translatePolar(this.ca-Math.PI/2,e);let a=o,u=n;return te(this.distanceToPoint(u))===0&&(u=r),u.distanceToPoint(i)<u.distanceToPoint(o)&&(a=i),new Te(a.cx,a.cy,this.ca)}};function zn(t,e,n){return new b0(t,e,n)}function Dn(t,e){return zn(0,0,0).setFromPoints(t,e)}function Ur(t,e){if(t.isEqual(e))throw`err546: no bisector with two same points cx: ${t.cx} cy: ${t.cy}`;const n=t.middlePoint(e),r=it(t.angleToPoint(e)+Math.PI/2);return zn(n.cx,n.cy,r)}function _0(t,e,n){if(t.isEqual(e)||e.isEqual(n)||t.isEqual(n))throw`err833: no bisector with two same points cx: ${t.cx} cy: ${t.cy}`;const r=Ur(t,e),s=Ur(e,n);return r.intersection(s)}function Je(t){let e=!1;return(t===0||t===1)&&(e=!0),e}function an(t){let e=!1;return(Je(t)||t===6)&&(e=!0),e}function Nn(t){let e=!1;return(t===3||t===4||t===5)&&(e=!0),e}function Bn(t){let e=!1;return(t===2||Nn(t))&&(e=!0),e}var qe=class Mo{sType;px;py;radius;arcLarge;arcCcw;constructor(e,n,r,s,i=!1,o=!1){this.sType=e,this.px=n,this.py=r,this.radius=s,this.arcLarge=i,this.arcCcw=o}clone(){return new Mo(this.sType,this.px,this.py,this.radius,this.arcLarge,this.arcCcw)}},We=class{sType;p1;p2;pc;radius;a1;a2;arcCcw;constructor(t,e,n,r,s,i,o,a=!1){this.sType=t,this.p1=e,this.p2=n,this.pc=r,this.radius=s,this.a1=i,this.a2=o,this.arcCcw=a}},A0=class{debugPoints;debugLines;logMessage;constructor(){this.debugPoints=[],this.debugLines=[],this.logMessage=""}addPoint(t){this.debugPoints.push(t)}getPoints(){return this.debugPoints}clearPoints(){this.debugPoints=[]}addLine(t){this.debugLines.push(t)}getLines(){return this.debugLines}clearLines(){this.debugLines=[]}addMsg(t){this.logMessage+=t}getMsg(){return this.logMessage}clearMsg(){this.logMessage=""}},Pt=new A0;function Bt(t,e,n){if(n.sType!==1)throw`err202: arcSeg1To2 has unexpected type ${n.sType}`;const r=Y(t,e),s=Y(n.px,n.py),i=r.distanceToPoint(s)/2;if(r.isEqual(s))throw`err638: no equidistance because identical point ${r.cx} ${s.cy}`;let o=0;if(te(n.radius-i)===0)o=0;else{if(n.radius<i)throw`err399: radius ${n.radius} smaller than lp1p2h ${i}`;o=Jn(n.radius,i)}const a=r.middlePoint(s),u=r.angleToPoint(s)+Math.PI/2,l=a.translatePolar(u,o),c=a.translatePolar(u+Math.PI,o);let m=l;(!n.arcLarge&&!n.arcCcw||n.arcLarge&&n.arcCcw)&&(m=c);const h=m.angleToPoint(r),x=m.angleToPoint(s);return new We(1,r,s,m,n.radius,h,x,n.arcCcw)}function v0(t){let e=wt(t.a2-t.a1);t.arcCcw||(e=2*Math.PI-e);let n=!1;return e>Math.PI&&(n=!0),new qe(1,t.p2.cx,t.p2.cy,t.radius,n,t.arcCcw)}function C0(t,e,n){const r=t.p1,s=t.p2,i=n.p1,o=n.p2;if(!s.isEqual(i))throw`err309: makeCorner-prepare p2 and p2b differ px ${s.cx} ${i.cx} py ${s.cy} ${i.cy}`;let a=s.angleToPoint(r);if(t.sType===1){const f=t.arcCcw?1:-1;a=t.a2-f*Math.PI/2}let u=s.angleToPoint(o);if(n.sType===1){const f=n.arcCcw?1:-1;u=n.a1+f*Math.PI/2}const l=u-a;let m=ce(l)/2;if(te(m)===0){const f=es*.01;if(t.sType===0&&n.sType===1)m=n.arcCcw?f:-f;else if(t.sType===1&&n.sType===0)m=t.arcCcw?f:-f;else if(t.sType===0&&n.sType===0)throw`err402: prepare aPeakHalf too closed to zero ${m}`}const h=a+m,x=s.translatePolar(h,e.radius);return{s1:t,s2:e,s3:n,ra:e.radius,p1:r,p2:s,p3:o,p4:t.pc,p5:n.pc,p6:x,at1:a,at3:u,abi:h,aph:m}}function Wn(t,e,n){if(e.sType!==1)throw`err510: modifRadius with wrong type ${e.sType}`;const r=t>0?1:-1,s=e.arcCcw?1:-1,i=te(t)===0?1:r*s,o=e.radius+i*n;if(o<=0)throw`err621: modifRadius with negative modified lenght ${o}`;return o}function ts(t,e,n,r){const s=n.translatePolar(t,e),i=n.translatePolar(t+Math.PI,e),o=r.distanceToPoint(s),a=r.distanceToPoint(i);return o<a?s:i}function xi(t,e,n,r,s){const i=t.translatePolar(e-n,r),o=t.translatePolar(e+n,r),a=s.distanceToPoint(i),u=s.distanceToPoint(o);return a<u?-1:1}function Qn(t,e){const n=e.clone(),r=t.p1.clone(),s=t.p2;if(t.sType!==0)throw`err103: newStrokeFirst unexpected sType ${t.sType}`;const i=Dn(r,s).distanceToPoint(n);if(te(i)!==0)throw`err104: newStrokeFirst new point not aligned ${i} ${n.cx} ${n.cy}`;const o=r.angleToPoint(s),a=r.angleToPoint(n);if(te(ce(a-o))!==0)throw`err105: newStrokeFirst new point miss aligned ${o} ${a} ${n.cx} ${n.cy}`;const u=r.distanceToPoint(n),l=r.distanceToPoint(s);if(l<u)throw`err106: newStrokeFirst new point out of scope ${l} ${u} ${n.cx} ${n.cy}`;const c=Y(0,0);return new We(0,r,n,c,0,0,0,!1)}function er(t,e){const n=e.clone(),r=t.p2.clone(),s=t.p1;if(t.sType!==0)throw`err203: newStrokeSecond unexpected sType ${t.sType}`;const i=Dn(r,s).distanceToPoint(n);if(te(i)!==0)throw`err204: newStrokeSecond new point not aligned ${i} ${n.cx} ${n.cy}`;const o=r.angleToPoint(s),a=r.angleToPoint(n);if(te(ce(a-o))!==0)throw`err205: newStrokeSecond new point miss aligned ${o} ${a} ${n.cx} ${n.cy}`;const u=r.distanceToPoint(n),l=r.distanceToPoint(s);if(l<u)throw`err206: newStrokeSecond new point out of scope ${l} ${u} ${n.cx} ${n.cy}`;const c=Y(0,0);return new We(0,n,r,c,0,0,0,!1)}function tr(t,e){if(t.sType!==1)throw`err203: newArcFirst unexpected sType ${t.sType}`;const n=t.p1.clone(),r=t.pc.clone(),s=e.clone(),i=r.angleToPoint(s);if(!To(i,t.a1,t.a2,t.arcCcw))throw`err908: newArcFirst a48 out of scope ${i} ${t.a1} ${t.a2} ${t.arcCcw}`;return new We(1,n,s,r,t.radius,t.a1,i,t.arcCcw)}function nr(t,e){if(t.sType!==1)throw`err204: newArcSecond unexpected sType ${t.sType}`;const n=t.p2.clone(),r=t.pc.clone(),s=e.clone(),i=r.angleToPoint(s);if(!To(i,t.a1,t.a2,t.arcCcw))throw`err907: newArcSecond a59 out of scope ${i} ${t.a1} ${t.a2} ${t.arcCcw}`;return new We(1,s,n,r,t.radius,i,t.a2,t.arcCcw)}function gn(t,e,n,r,s,i){const o=t.clone(),a=e.clone(),u=n.clone(),l=u.distanceToPoint(o),c=u.distanceToPoint(a);if(te(l-r)!==0||te(c-r)!==0)throw`err610: newRounded not on circle ${r} ${l} ${c}`;const m=u.angleToPoint(o),h=u.angleToPoint(a),x=ce(m-i+Math.PI),y=ce(h-i+Math.PI);Math.abs(y-x)>Math.PI+es&&Pt.addMsg(`warn882: newRounded a873 or a972 larger than PI/2 ${at(x)} ${at(y)} at ${at(u.cx)} ${at(u.cy)}
|
|
16
|
-
`);const f=!(s>0);return new We(1,o,a,u,r,m,h,f)}function E0(t){const e=Math.abs(t.ra/Math.sin(t.aph)),n=e*Math.cos(t.aph),r=t.p2.translatePolar(t.abi,e),s=t.p2.translatePolar(t.at1,n),i=t.p2.translatePolar(t.at3,n),o=[];return o.push(Qn(t.s1,s)),o.push(gn(s,i,r,t.ra,t.aph,t.abi)),o.push(er(t.s3,i)),o}function F0(t){const n=Dn(t.p1,t.p2).lineParallelDistance(t.ra,t.p6,t.p5),r=n.projectPoint(t.p5),s=r.distanceToPoint(t.p5),i=Wn(t.aph,t.s3,t.ra),o=Jn(i,s),a=ts(n.ca,o,r,t.p6),u=t.p5.angleToPoint(a),l=t.p5.translatePolar(u,t.s3.radius),c=t.p2.angleFromToPoints(t.p1,a),h=Math.abs(t.ra/Math.sin(c))*Math.cos(c),x=t.p2.angleToPoint(t.p1),y=t.p2.translatePolar(x,h),f=[];return f.push(Qn(t.s1,y)),f.push(gn(y,l,a,t.ra,t.aph,t.abi)),f.push(nr(t.s3,l)),f}function S0(t){const n=Dn(t.p3,t.p2).lineParallelDistance(t.ra,t.p6,t.p4),r=n.projectPoint(t.p4),s=r.distanceToPoint(t.p4),i=Wn(t.aph,t.s1,t.ra),o=Jn(i,s),a=ts(n.ca,o,r,t.p6),u=t.p4.angleToPoint(a),l=t.p4.translatePolar(u,t.s1.radius),c=t.p2.angleFromToPoints(t.p3,a),h=Math.abs(t.ra/Math.sin(c))*Math.cos(c),x=t.p2.angleToPoint(t.p3),y=t.p2.translatePolar(x,h),f=[];return f.push(tr(t.s1,l)),f.push(gn(l,y,a,t.ra,t.aph,t.abi)),f.push(er(t.s3,y)),f}function k0(t){const e=Wn(t.aph,t.s1,t.ra),n=Wn(t.aph,t.s3,t.ra),r=t.p4.distanceToPoint(t.p5),s=t.p4.angleToPoint(t.p5),i=hi(r,e,n),o=xi(t.p4,s,i,e,t.p6),a=s+o*i,u=t.p4.translatePolar(a,e),l=t.p4.translatePolar(a,t.s1.radius),c=Math.PI+s,m=hi(r,n,e),h=xi(t.p5,c,m,n,t.p6),x=c+h*m,y=t.p5.translatePolar(x,n);if(!y.isEqual(u))throw`err909: roundArcArc p7 anf p7b differ ${u.cx} ${y.cx} ${u.cy} ${y.cy} 0`;const f=t.p5.translatePolar(x,t.s3.radius),d=[];return d.push(tr(t.s1,l)),d.push(gn(l,f,u,t.ra,t.aph,t.abi)),d.push(nr(t.s3,f)),d}function Io(t){const e=t.abi-2*t.aph,n=t.abi+2*t.aph;let r=t.p6.translatePolar(e,t.ra),s=t.p6.translatePolar(n,t.ra);if(t.s1.sType===1){const u=t.p4.angleFromToPoints(t.p2,t.p6),c=t.p4.angleToPoint(t.p2)+2*u;r=t.p4.translatePolar(c,t.s1.radius)}if(t.s3.sType===1){const u=t.p5.angleFromToPoints(t.p2,t.p6),c=t.p5.angleToPoint(t.p2)+2*u;s=t.p5.translatePolar(c,t.s3.radius)}const i=!(t.aph>0),o=new We(1,r,s,t.p6,t.ra,e,n,i),a=[];return t.s1.sType===0?a.push(Qn(t.s1,r)):t.s1.sType===1&&a.push(tr(t.s1,r)),a.push(o),t.s3.sType===0?a.push(er(t.s3,s)):t.s3.sType===1&&a.push(nr(t.s3,s)),a}function Di(t,e,n,r){let s=n,i=n;const o=r.p6.angleFromToPoints(r.p2,n);if(Math.abs(o)>Math.PI/2){i=r.p6.translatePolar(r.abi+t*Math.PI/2,r.ra);const a=zn(i.cx,i.cy,r.abi);if(e.sType===0)s=Dn(e.p1,e.p2).intersection(a);else if(e.sType===1){const u=a.projectPoint(e.pc),l=u.distanceToPoint(e.pc);if(l<e.radius){const c=Jn(e.radius,l);s=ts(r.abi,c,u,n)}else Pt.addMsg(`warn222: wideAccess not possible on arc ${at(e.radius)} ${at(l)} at ${at(n.cx)} ${at(n.cy)}
|
|
17
|
-
`),s=n,i=n}}return[s,i]}function T0(t){const e=Io(t),n=e[1].arcCcw?1:-1,[r,s]=Di(n,t.s1,e[1].p1,t),[i,o]=Di(-n,t.s3,e[1].p2,t),a=[];if(r.isEqual(s))a.push(e[0]);else{t.s1.sType===0?a.push(Qn(t.s1,r)):t.s1.sType===1&&a.push(tr(t.s1,r));const u=Y(0,0),l=new We(0,r,s,u,0,0,0,!1);a.push(l)}if(a.push(gn(s,o,t.p6,t.ra,t.aph,t.abi)),i.isEqual(o))a.push(e[2]);else{const u=Y(0,0),l=new We(0,o,i,u,0,0,0,!1);a.push(l),t.s3.sType===0?a.push(er(t.s3,i)):t.s3.sType===1&&a.push(nr(t.s3,i))}return a}function gi(t,e,n){const r=C0(t,e,n),s=[];if(e.sType===3)if(t.sType===0&&n.sType===0)s.push(...E0(r));else if(t.sType===0&&n.sType===1)s.push(...F0(r));else if(t.sType===1&&n.sType===0)s.push(...S0(r));else if(t.sType===1&&n.sType===1)s.push(...k0(r));else throw`err123: makeCorner unexpected s1s3.sType ${t.sType} ${n.sType}`;else if(e.sType===4)s.push(...Io(r));else if(e.sType===5)s.push(...T0(r));else throw`err723: makeCorner unexpected s2.sType ${e.sType}`;return s}function st(t){return t.toFixed(4)}function P0(t,e,n,r=""){let s=r;return s===""&&(s="black"),`<circle cx="${st(t)}" cy="${st(e)}" r="${st(n)}" stroke="${s}" stroke-width="1" fill="none" />`}var B0=class{pathD;constructor(){this.pathD=""}addStart(t,e){this.pathD=`M ${st(t)} ${st(e)}`}addStroke(t,e){this.pathD+=` L ${st(t)} ${st(e)}`}addArc(t,e,n,r,s){const i=st(n),o=r?1:0,a=s?1:0;this.pathD+=` A ${i} ${i} 0 ${o} ${a} ${st(t)} ${st(e)}`}stringify(t=""){let e=t;return e===""&&(e="black"),`<path d="${this.pathD} Z" stroke="${e}" stroke-width="1" fill="none" />`}};function M0(){return new B0}var I0=class{svgStr;payloadStr;groupActive;constructor(){this.payloadStr="",this.svgStr="",this.groupActive=!1}addHeader(t,e,n,r){const s=`${t} ${n} ${e} ${r}`;this.svgStr=`<svg width="${e}" height="${r}" viewBox="${s}" xmlns="http://www.w3.org/2000/svg">`}addSvgString(t){this.payloadStr+=t}addGroup(t){if(this.groupActive)throw"err321: group must be closed before opening a new one";this.groupActive=!0,this.payloadStr+=`<g id="${t}">`}closeGroup(){if(!this.groupActive)throw"err331: group is not active so can not be closed";this.groupActive=!1,this.payloadStr+="</g>"}closeSvg(){if(this.svgStr==="")throw"err301: no header set for the svg";if(this.groupActive)throw"err311: group is not closed";this.svgStr+=this.payloadStr,this.svgStr+="</svg>"}stringify(){return this.closeSvg(),this.svgStr}};function L0(){return new I0}function Ue(t){return t.toFixed(4)}var ns=class{arc;p1x;p1y;radius;a1;a2;p2x;p2y;constructor(t,e,n,r,s,i,o,a){this.arc=t,this.p1x=e,this.p1y=n,this.radius=r,this.a1=s,this.a2=i,this.p2x=o,this.p2y=a}};function $0(t,e,n,r){return new ns(!1,t,e,0,0,0,n,r)}function O0(t,e,n,r,s,i){const o=i?r:s,a=i?s:r,u=Ie(wt(o)),l=Ie(wt(a));return new ns(!0,t,e,n,u,l,0,0)}function N0(t,e,n){return new ns(!1,t,e,n,0,0,0,0)}var R0=class{dxfStr;constructor(){this.dxfStr=`0
|
|
18
|
-
SECTION
|
|
19
|
-
2
|
|
20
|
-
ENTITIES
|
|
21
|
-
`}addCircle(t,e,n){this.dxfStr+=`0
|
|
22
|
-
CIRCLE
|
|
23
|
-
8
|
|
24
|
-
PARAMETRIX
|
|
25
|
-
`,this.dxfStr+=`10
|
|
26
|
-
${Ue(t)}
|
|
27
|
-
20
|
|
28
|
-
${Ue(e)}
|
|
29
|
-
40
|
|
30
|
-
${Ue(n)}
|
|
31
|
-
`}addLine(t,e,n,r){this.dxfStr+=`0
|
|
32
|
-
LINE
|
|
33
|
-
8
|
|
34
|
-
PARAMETRIX
|
|
35
|
-
`,this.dxfStr+=`10
|
|
36
|
-
${Ue(t)}
|
|
37
|
-
20
|
|
38
|
-
${Ue(e)}
|
|
39
|
-
11
|
|
40
|
-
${Ue(n)}
|
|
41
|
-
21
|
|
42
|
-
${Ue(r)}
|
|
43
|
-
`}addArc(t,e,n,r,s){this.dxfStr+=`0
|
|
44
|
-
ARC
|
|
45
|
-
8
|
|
46
|
-
PARAMETRIX
|
|
47
|
-
`,this.dxfStr+=`10
|
|
48
|
-
${Ue(t)}
|
|
49
|
-
20
|
|
50
|
-
${Ue(e)}
|
|
51
|
-
40
|
|
52
|
-
${Ue(n)}
|
|
53
|
-
50
|
|
54
|
-
${Ue(r)}
|
|
55
|
-
51
|
|
56
|
-
${Ue(s)}
|
|
57
|
-
`}close(){this.dxfStr+=`0
|
|
58
|
-
ENDSEC
|
|
59
|
-
0
|
|
60
|
-
EOF
|
|
61
|
-
`}stringify(){return this.close(),this.dxfStr}};function U0(){return new R0}function V0(t,e,n){return{circle:!0,cx:t,cy:e,radius:n}}var q0=class{seg;constructor(){this.seg=[]}addStart(t,e){this.seg=[];const n={typ:0,px:t,py:e};this.seg.push(n)}addStroke(t,e){const n={typ:1,px:t,py:e};this.seg.push(n)}addArc(t,e,n,r,s){const i={typ:2,px:t,py:e,radius:n,large:r,ccw:s};this.seg.push(i)}toJson(){return{circle:!1,seg:this.seg}}};function j0(){return new q0}var Lo=class{};function $o(t,e,n,r){const s=Bt(t,e,n),i=Y(s.pc.cx,s.pc.cy),o=wt(s.a2-s.a1),u=(n.arcCcw?o:o-2*Math.PI)/r,l=[];for(let c=1;c<r;c++)l.push(i.translatePolar(s.a1+c*u,n.radius));return l}var W0=class St extends Lo{circle=!1;segments;points;debugPoints;debugLines;lastPoint;lastPoint2;imposedColor;constructor(e,n,r=""){super(),this.segments=[new qe(6,e,n,0)],this.points=[],this.debugPoints=[],this.debugLines=[],this.lastPoint=Y(e,n),this.lastPoint2=Y(e,n),this.imposedColor=r}setLastPoint(e,n){this.lastPoint2=this.lastPoint,this.lastPoint=Y(e,n)}getLastPoint(){return this.lastPoint}getFirstPoint(){return Y(this.segments[0].px,this.segments[0].py)}addPointA(e,n){if(this.points.length>2)throw`err311: contour add too much point ${e} ${n}`;return this.points.push(Y(e,n)),this}addPointAP(e,n){const r=Y(0,0).translatePolar(e,n);return this.addPointA(r.cx,r.cy),this}addPointR(e,n){const s=this.getLastPoint().translate(e,n);return this.addPointA(s.cx,s.cy),this}addPointRP(e,n){const s=this.getLastPoint().translatePolar(e,n);return this.addPointA(s.cx,s.cy),this}addSeg(e){return this.segments.push(e),this}addSegStroke(){if(this.points.length!==1)throw`err554: contour addSegStroke with unexpected points.length ${this.points.length}`;const e=this.points.pop();if(e!==void 0){const n=new qe(0,e.cx,e.cy,0);e.isEqual(this.getLastPoint())||(this.addSeg(n),this.setLastPoint(e.cx,e.cy))}else throw"err284: contour p1 is undefined";return this}addSegStrokeA(e,n){return this.addPointA(e,n).addSegStroke(),this}addSegStrokeAP(e,n){return this.addPointAP(e,n).addSegStroke(),this}addSegStrokeR(e,n){return this.addPointR(e,n).addSegStroke(),this}addSegStrokeRP(e,n){return this.addPointRP(e,n).addSegStroke(),this}addSegArc(e,n,r){if(this.points.length!==1)throw`err954: contour addSegArc with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=new qe(1,s.cx,s.cy,e,n,r);s.isEqual(this.getLastPoint())?console.log(`warn144: addSegArc last and new point identical ${at(s.cx)} ${at(s.cy)}`):(this.addSeg(i),this.setLastPoint(s.cx,s.cy))}else throw"err482: contour p1 is undefined";return this}addSegArc2(){if(this.points.length!==2)throw`err958: contour addSegArc2 with unexpected points.length ${this.points.length}`;const e=this.points.pop(),n=this.points.pop();if(n!==void 0&&e!==void 0){const r=this.getLastPoint(),s=_0(r,n,e),i=s.distanceToPoint(r),o=r.middlePoint(e),a=o.angleToPoint(r),u=o.angleToPoint(n),l=ce(u-a);let c=!1,m=!1;if(!o.isEqual(s)){const h=o.angleToPoint(s),x=ce(h-a);Math.sign(x)*Math.sign(l)>0&&(c=!0)}Math.sign(l)>0&&(m=!0),this.addPointA(e.cx,e.cy).addSegArc(i,c,m),this.debugPoints.push(n)}else throw"err488: contour p1 or p2 or seg is undefined";return this}addSegArc3(e,n){if(this.points.length!==1)throw`err914: contour addSegArc3 with unexpected points.length ${this.points.length}`;const r=this.points.pop();if(r!==void 0){const s=this.getLastPoint(),i=Ur(s,r);let o=r;n&&(o=s);const a=zn(o.cx,o.cy,e+Math.PI/2),u=i.intersection(a),l=u.distanceToPoint(s),c=s.middlePoint(r),m=o.angleToPoint(c),h=ce(e-m);let x=!1;Math.abs(h)>Math.PI/2&&(x=!0);let y=!1;h<0&&(y=!0),n||(y=!y),this.addPointA(r.cx,r.cy).addSegArc(l,x,y),this.debugPoints.push(c),this.debugPoints.push(u)}else throw"err282: contour p1 is undefined";return this}addSeg2Arcs(e,n){if(this.points.length!==1)throw`err214: contour addSeg2Arcs with unexpected points.length ${this.points.length}`;const r=this.points.pop();if(r!==void 0){const s=this.getLastPoint(),i=s.distanceToPoint(r),o=s.angleToPoint(r),a=r.angleToPoint(s),u=ce(e-o),l=-1*ce(n-a);if(Math.abs(u)>=Math.PI/2)throw`err545: addSeg2Arcs with too large au ${u}`;if(Math.abs(l)>=Math.PI/2)throw`err546: addSeg2Arcs with too large av ${l}`;if(te(u)===0)throw`err765: addSeg2Arcs with almost zero au ${u}`;if(te(l)===0)throw`err766: addSeg2Arcs with almost zero av ${l}`;if(Math.sign(u)*Math.sign(l)<1)throw`err767: addSeg2Arcs with au/av bad orientation ${u} ${l}`;const c=Math.tan(u/2),m=Math.tan(l/2),h=i*m/(m+c),x=Math.abs(h/Math.sin(u)),y=h/Math.cos(u/2),f=i*c/(m+c),d=Math.abs(f/Math.sin(l)),p=s.translatePolar(o+u/2,y);let D=!1;Math.sign(u)<0&&(D=!0),this.addPointA(p.cx,p.cy).addSegArc(x,!1,D),this.addPointA(r.cx,r.cy).addSegArc(d,!1,D),this.debugPoints.push(s.translatePolar(o,h)),this.debugPoints.push(s.translatePolar(o+u-Math.sign(u)*Math.PI/2,x)),this.debugPoints.push(r.translatePolar(a-l+Math.sign(u)*Math.PI/2,d))}else throw"err182: contour p1 is undefined";return this}addSegStrokeAifBig(e,n,r,s){const i=this.getLastPoint();if(Math.sqrt((e-i.cx)**2+(n-i.cy)**2)>r)this.addPointA(e,n).addSegStroke();else if(s){const a=this.segments[this.segments.length-1],u=this.lastPoint2;if(this.setLastPoint(u.cx,u.cy),a.sType===0)this.segments.pop(),this.addPointA(e,n).addSegStroke();else if(a.sType===1)this.segments.pop(),this.addPointA(e,n).addSegArc(a.radius,a.arcLarge,a.arcCcw);else throw`err186: addSegStrokeA-ifBig used after eStart or eCorner ${a.sType} at segment ${this.segments.length}`}return this}addCornerPointed(){const e=new qe(2,0,0,0);return this.addSeg(e),this}addCornerRounded(e){const n=new qe(3,0,0,e);return this.addSeg(n),this}addCornerWidened(e){const n=new qe(4,0,0,e);return this.addSeg(n),this}addCornerWideAcc(e){const n=new qe(5,0,0,e);return this.addSeg(n),this}closeSegStroke(){const e=this.segments[0].px,n=this.segments[0].py;return this.addSegStrokeA(e,n),this}closeSegArc(e,n,r){const s=this.segments[0].px,i=this.segments[0].py;return this.addPointA(s,i).addSegArc(e,n,r),this}clone(){const e=new St(this.segments[0].px,this.segments[0].py);for(const n of this.segments){const r=n.clone();r.sType!==6&&(e.addSeg(r),Je(r.sType)&&e.setLastPoint(r.px,r.py))}return e}translate(e,n){const r=this.segments[0].px+e,s=this.segments[0].py+n,i=new St(r,s);for(const o of this.segments){const a=o.clone();Je(o.sType)&&(a.px+=e,a.py+=n),a.sType!==6&&(i.addSeg(a),Je(a.sType)&&i.setLastPoint(a.px,a.py))}return i}translatePolar(e,n){return this.translate(n*Math.cos(e),n*Math.sin(e))}rotate(e,n,r){const s=Y(e,n),o=Y(this.segments[0].px,this.segments[0].py).rotate(s,r),a=new St(o.cx,o.cy);for(const u of this.segments){const l=u.clone();if(Je(u.sType)){const m=Y(l.px,l.py).rotate(s,r);l.px=m.cx,l.py=m.cy}l.sType!==6&&(a.addSeg(l),Je(l.sType)&&a.setLastPoint(l.px,l.py))}return a}scale(e,n,r,s=!1){const i=Y(e,n),a=Y(this.segments[0].px,this.segments[0].py).scale(i,r),u=new St(a.cx,a.cy);for(const l of this.segments){const c=l.clone();if(Je(l.sType)){const h=Y(c.px,c.py).scale(i,r);c.px=h.cx,c.py=h.cy}l.sType===1&&(c.radius*=r),Nn(l.sType)&&s&&(c.radius*=r),c.sType!==6&&(u.addSeg(c),Je(c.sType)&&u.setLastPoint(c.px,c.py))}return u}addPartial(e){if(this.points.length>0)throw`err911: addPartial, points should be used ${this.points.length}`;let n=e;if(e.segments.length>0){const r=e.segments[0],s=this.getLastPoint(),i=r.px-s.cx,o=r.py-s.cy;r.sType===6&&(n=e.translate(-i,-o))}for(const r of n.segments)r.sType!==6&&(this.addSeg(r),Je(r.sType)&&this.setLastPoint(r.px,r.py));return this}draw(e,n,r=fe.contour){const s=this.imposedColor===""?r:this.imposedColor;let i=0,o=0;for(const a of this.segments){if(a.sType===0){const[u,l]=Vt(i,o,n),[c,m]=Vt(a.px,a.py,n);e.beginPath(),e.moveTo(u,l),e.lineTo(c,m),e.strokeStyle=s,e.stroke()}if(a.sType===1)try{const u=Bt(i,o,a),[l,c]=Vt(u.pc.cx,u.pc.cy,n),m=Po(a.radius,n);e.beginPath(),e.arc(l,c,m,-u.a1,-u.a2,a.arcCcw),e.strokeStyle=s,e.stroke()}catch(u){console.log("err413: "+u)}an(a.sType)&&(i=a.px,o=a.py)}}extractSkeleton(){const e=this.segments[0],n=new St(e.px,e.py);for(const r of this.segments)Je(r.sType)&&n.addSeg(r);return n}generateContour(){Pt.clearPoints(),Pt.clearLines();const e=[],n=[];let r=0,s=0,i=0;for(const l of this.segments){if(l.sType===0){const h=Y(s,i),x=Y(l.px,l.py),y=Y(0,0);e.push(new We(l.sType,h,x,y,0,0,0,!1)),r=1}if(l.sType===1){const h=Bt(s,i,l);e.push(h),r=1}const c=e.at(-1),m=e.at(-2);if(c!==void 0&&m!==void 0&&Je(c.sType)&&Bn(m.sType)){const h=e.pop(),x=e.pop(),y=e.pop();if(y!==void 0&&x!==void 0&&h!==void 0){const f=gi(y,x,h);e.push(...f)}else throw"err603: contour generateContour internal error"}if(Bn(l.sType)){if(r===2)throw`err419: generateContour with two consecutive corners ${l.sType}`;if(r===0&&Nn(l.sType)&&l.radius>0){const h=Y(0,0);n.push(new We(l.sType,h,h,h,l.radius,0,0,!1))}if(r===1&&Nn(l.sType)&&l.radius>0){const h=Y(0,0);e.push(new We(l.sType,h,h,h,l.radius,0,0,!1))}r=2}an(l.sType)&&(s=l.px,i=l.py)}if(n.length>0)if(r===1)e.push(...n);else throw"err397: contour generateContour Corners defined at end and begining";const o=e.at(-1);if(o!==void 0&&Bn(o.sType)){const l=e[0],c=e.pop(),m=e.pop();if(m!==void 0&&c!==void 0&&l!==void 0){const h=gi(m,c,l);e.push(...h.slice(0,-1));const x=h.at(-1);if(x!==void 0)e[0]=x;else throw"err606: contour generateContour internal error"}else throw"err602: contour generateContour internal error"}const a=e[0],u=new St(a.p1.cx,a.p1.cy,this.imposedColor);u.debugPoints.push(...Pt.getPoints()),u.debugLines.push(...Pt.getLines());for(const l of e)if(l.sType===0)u.addSegStrokeA(l.p2.cx,l.p2.cy);else if(l.sType===1){const c=v0(l);u.addPointA(l.p2.cx,l.p2.cy).addSegArc(c.radius,c.arcLarge,c.arcCcw)}else throw`err986: contour generateContour unexpected in seg2 Enum ${l.sType}`;return u}generatePoints(e){const n=[];let r=0,s=0;for(const i of this.segments){if(i.sType===1)try{const o=$o(r,s,i,e);n.push(...o)}catch(o){console.log("err453: "+o)}an(i.sType)&&(r=i.px,s=i.py,n.push(Y(r,s)))}return n}getOrientation(e,n,r){const i=e.slice(1);let o=0,a=i.at(-3),u=i.at(-2),l=i.at(-1),c=-1;for(const[h,x]of i.entries()){a=u,u=l,l=x;const y=r?u.cx>n-.001:u.cx<n+.001,f=r?a.cx>n-.001:a.cx<n+.001;if(y&&!f){const d=a.cx-u.cx,p=a.cy-u.cy,D=l.cx-u.cx,g=l.cy-u.cy,_=D*p-g*d;o=Math.sign(_),c=h}}if(o===0)throw`err299: Orientation not found with ${i.length} points and foundIdx ${c}`;return o>0}getEnvelop(){const e=this.generatePoints(24),n=[],r=[];for(const c of e)n.push(c.cx),r.push(c.cy);const s=Math.min(...n),i=Math.max(...n),o=Math.min(...r),a=Math.max(...r),u=this.getOrientation(e,s,!1),l=this.getOrientation(e,i,!0);if(l!==u)throw`err390: orientation unstable ${u} ${l} with ${e.length} points`;return{xMin:s,xMax:i,yMin:o,yMax:a,orientation:u}}generateLines(){const e=[];return e.push(...this.debugLines),e}checkContour(e){if(e.segments[0].sType!==6)throw`err412: contour check first seg is not eStart ${e.segments[0].sType}`;let n=0,r=0;for(const o of e.segments){if(o.sType===1)try{Bt(n,r,o)}catch(a){throw`err778: ${a}`}an(o.sType)&&(n=o.px,r=o.py)}const s=e.segments[0].px,i=e.segments[0].py;if(te(n-s)!==0||te(r-i)!==0)throw`err414: contour check, contour is not closed px ${s} ${n} py ${s} ${i}`}check(){Pt.clearMsg(),this.checkContour(this);const e=this.generateContour();return this.checkContour(e),Pt.getMsg()}toSvg(e,n=""){const r=M0();for(const i of this.segments)i.sType===6?r.addStart(i.px,e-i.py):i.sType===0?r.addStroke(i.px,e-i.py):i.sType===1?r.addArc(i.px,e-i.py,i.radius,i.arcLarge,!i.arcCcw):console.log(`err631: contour.toSvg has unknown segment type ${i.sType}`);return r.stringify(n)}toDxfSeg(){const e=[];let n=0,r=0;for(const s of this.segments){if(s.sType===0)e.push($0(n,r,s.px,s.py));else if(s.sType===1)try{const i=Bt(n,r,s);e.push(O0(i.pc.cx,i.pc.cy,s.radius,i.a1,i.a2,i.arcCcw))}catch(i){console.log("err413: "+i)}an(s.sType)&&(n=s.px,r=s.py)}return e}toPax(){const e=j0();for(const r of this.segments)r.sType===6?e.addStart(r.px,r.py):r.sType===0?e.addStroke(r.px,r.py):r.sType===1?e.addArc(r.px,r.py,r.radius,r.arcLarge,r.arcCcw):console.log(`err709: contour.toPax has unknown segment type ${r.sType}`);return e.toJson()}getPerimeter(){let e=0;const n=this.generateContour();let r=0,s=0;for(const i of n.segments)if(i.sType===6)r=i.px,s=i.py;else if(i.sType===0){const o=Math.sqrt((i.px-r)**2+(i.py-s)**2);r=i.px,s=i.py,e+=o}else if(i.sType===1){const o=Bt(r,s,i),a=wt(o.a2-o.a1),u=o.arcCcw?a:wt(2*Math.PI-a),l=i.radius*u;r=i.px,s=i.py,e+=l}else console.log(`err760: contour.getPerimeter has unknown segment type ${i.sType}`);return e}generateRevertOrientation(){let e=this.segments[0];const n=new St(e.px,e.py);let r=this.segments[0],s=!1;for(const i of this.segments.slice().reverse())if(Bn(i.sType))s=!0,e=i;else{if(r.sType!==6){const o=new qe(r.sType,i.px,i.py,r.radius,r.arcLarge,!r.arcCcw);n.addSeg(o)}r=i,s&&(n.addSeg(e),s=!1)}return n}},H0=class Rt extends Lo{circle=!0;px;py;radius;imposedColor;constructor(e,n,r,s=""){if(super(),this.px=e,this.py=n,this.radius=r,this.imposedColor=s,r<0)throw`err432: iRadius ${r} is negative at circle ix ${e}, iy ${n}`}clone(){return new Rt(this.px,this.py,this.radius,this.imposedColor)}translate(e,n){return new Rt(this.px+e,this.py+n,this.radius,this.imposedColor)}translatePolar(e,n){return this.translate(n*Math.cos(e),n*Math.sin(e))}rotate(e,n,r){const s=Y(e,n),i=Y(this.px,this.py).rotate(s,r);return new Rt(i.cx,i.cy,this.radius,this.imposedColor)}draw(e,n,r=fe.contour){const[s,i]=Vt(this.px,this.py,n),o=Po(this.radius,n),a=this.imposedColor===""?r:this.imposedColor;e.beginPath(),e.arc(s,i,o,0,2*Math.PI,!0),e.strokeStyle=a,e.stroke()}extractSkeleton(){return new Rt(this.px,this.py,this.radius)}generateContour(){return new Rt(this.px,this.py,this.radius,this.imposedColor)}generatePoints(e){const n=[],r=Y(this.px,this.py),s=e*2;n.push(r);for(let i=0;i<s;i++){const o=r.translatePolar(i*2*Math.PI/s,this.radius);n.push(o)}return n}getEnvelop(){return{xMin:this.px-this.radius,xMax:this.px+this.radius,yMin:this.py-this.radius,yMax:this.py+this.radius,orientation:!0}}generateLines(){return[]}check(){return""}toSvg(e,n=""){return P0(this.px,e-this.py,this.radius,n)}toDxfSeg(){const e=[];return e.push(N0(this.px,this.py,this.radius)),e}toPax(){return V0(this.px,this.py,this.radius)}getPerimeter(){return 2*Math.PI*this.radius}generateRevertOrientation(){return new Rt(this.px,this.py,this.radius,this.imposedColor)}};function Y0(t,e,n=""){return new W0(t,e,n)}function Nl(t,e,n,r=""){return new H0(t,e,n,r)}var G0=class Vr{pointList;lineList;vectorList;mainList;mainBList;secondList;secondBList;dynamicsList;xMin;xMax;yMin;yMax;constructor(){this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[],this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addPoint(e){this.pointList.push(e)}addPoints(e){this.pointList.push(...e)}addLine(e){this.lineList.push(e)}addLines(e){for(const n of e)this.lineList.push(n)}addVector(e){this.vectorList.push(e)}addMainOI(e){const n=[];for(const r of e){const s=r.generateContour();this.addPoints(s.generatePoints(2)),this.addLines(s.generateLines()),n.push(s),this.mainBList.push(r.extractSkeleton())}this.mainList.push(n)}addMainO(e){const n=[e];this.addMainOI(n)}addSecond(e){const n=e.generateContour();this.addPoints(n.generatePoints(2)),this.addLines(n.generateLines()),this.secondList.push(n),this.secondBList.push(e.extractSkeleton())}addDynamics(e){this.addPoints(e.generatePoints(2)),this.addLines(e.generateLines()),this.dynamicsList.push(e)}translate(e,n){const r=new Vr;for(const s of this.pointList)r.addPoint(s.translate(e,n));for(const s of this.lineList)r.addLine(s.translate(e,n));for(const s of this.vectorList)r.addVector(s.translate(e,n));for(const s of this.mainList){const i=[];for(const o of s)i.push(o.translate(e,n));r.addMainOI(i)}for(const s of this.secondList)r.addSecond(s.translate(e,n));for(const s of this.dynamicsList)r.addDynamics(s.translate(e,n));return r}translatePolar(e,n){return this.translate(n*Math.cos(e),n*Math.sin(e))}rotate(e,n,r){const s=new Vr,i=Y(e,n);for(const o of this.pointList)s.addPoint(o.rotate(i,r));for(const o of this.lineList)s.addLine(o.rotate(i,r));for(const o of this.vectorList)s.addVector(o.rotate(i,r));for(const o of this.mainList){const a=[];for(const u of o)a.push(u.rotate(e,n,r));s.addMainOI(a)}for(const o of this.secondList)s.addSecond(o.rotate(e,n,r));for(const o of this.dynamicsList)s.addDynamics(o.rotate(e,n,r));return s}mergeFigure(e,n=!1){for(const r of e.pointList)this.addPoint(r.clone());for(const r of e.lineList)this.addLine(r.clone());for(const r of e.vectorList)this.addVector(r.clone());for(const r of e.mainList){const s=[];for(const i of r)s.push(i.clone());if(n)for(const i of s)this.addSecond(i);else this.addMainOI(s)}for(const r of e.secondList)this.addSecond(r.clone());for(const r of e.dynamicsList)this.addDynamics(r.clone())}mainListC(){const e=[];for(const n of this.mainList)for(const r of n)e.push(r);return e}clear(){this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[]}getMinMax(){[this.xMin,this.xMax,this.yMin,this.yMax]=Bo(this.pointList)}getAdjustFull(e,n){let r=Nr();return this.pointList.length>0&&(this.getMinMax(),r=Rr(this.xMin,this.xMax,this.yMin,this.yMax,e,n)),r}getAdjustZoom(e,n){let r=Nr();if(this.pointList.length>0){this.getMinMax();const s=(this.xMin+this.xMax)/2,i=(this.yMin+this.yMax)/2;r=Rr(s,this.xMax,i,this.yMax,e,n)}return r}quantifyRuler(e,n){const s=e/10/n.scaleX;let i=1e-4;for(;i<s;)i*=10;i/5>s?i/=5:i/2>s&&(i/=2);const o=i*n.scaleX;return[i,o]}drawRuler(e,n,r){const[s,i]=this.quantifyRuler(e.canvas.width,n),o=e.canvas.width-10-i;e.font="15px Arial",e.fillStyle=r,e.fillText(`${s.toFixed(4)}`,o,20),e.beginPath(),e.moveTo(o,25),e.lineTo(o+i,25),e.lineTo(o+i,25+i),e.strokeStyle=r,e.stroke()}draw(e,n,r){if(r.points)for(const s of this.pointList)s.draw(e,n);if(r.lines)for(const s of this.lineList)s.draw(e,n);if(r.vectors)for(const s of this.vectorList)s.draw(e,n);if(r.main)for(const s of this.mainList)for(const[i,o]of s.entries()){let a=fe.mainOuter;i>0&&(a=fe.mainInner),o.draw(e,n,a)}if(r.mainB)for(const s of this.mainBList)s.draw(e,n,fe.mainB);if(r.second)for(const s of this.secondList)s.draw(e,n,fe.second);if(r.secondB)for(const s of this.secondBList)s.draw(e,n,fe.secondB);if(r.dynamics)for(const s of this.dynamicsList)s.draw(e,n,fe.dynamics);if(r.ruler&&this.drawRuler(e,n,fe.ruler),r.refframe){for(const s of[10,100,200])Y(s,0).draw(e,n,fe.reference,2),Y(-s,0).draw(e,n,fe.reference,2),Y(0,s).draw(e,n,fe.reference,2),Y(0,-s).draw(e,n,fe.reference,2);Y(0,0).draw(e,n,fe.origin,2)}}};function Z0(){return new G0}function qr(t){const e=Z0();for(const n in t){const r=t[n];for(const s of r.pointList)e.pointList.push(s);for(const s of r.lineList)e.lineList.push(s);for(const s of r.vectorList)e.vectorList.push(s);for(const s of r.mainList)e.mainList.push(s);for(const s of r.mainBList)e.mainBList.push(s);for(const s of r.secondList)e.secondList.push(s);for(const s of r.secondBList)e.secondBList.push(s);for(const s of r.dynamicsList)e.dynamicsList.push(s)}return e}function Rl(){return{points:!1,lines:!1,vectors:!1,main:!0,mainB:!1,second:!0,secondB:!1,dynamics:!1,ruler:!0,refframe:!1}}function Ul(t){return{points:t.points,lines:t.lines,vectors:t.vectors,main:t.main,mainB:t.mainB,second:t.second,secondB:t.secondB,dynamics:t.dynamics,ruler:t.ruler,refframe:t.refframe}}var X0=(t=>(t[t.eNumber=0]="eNumber",t[t.eCheckbox=1]="eCheckbox",t[t.eDropdown=2]="eDropdown",t[t.eSectionSeparator=3]="eSectionSeparator",t))(X0||{}),Jt={partName:"",params:[],paramSvg:{},sim:{tMax:0,tStep:0,tUpdate:0}};function Vl(t){const e={};for(const n of Object.keys(t))e[n]=t[n].val;return e}function ql(t,e,n,r=0,s=100,i=1){return{name:t,unit:e,init:n,min:r,max:s,step:i,dropdown:[],pType:0}}function jl(t){return{name:t,unit:"section-separator",init:0,min:0,max:0,step:0,dropdown:[],pType:3}}var K0=(t=>(t[t.eLinearOrtho=0]="eLinearOrtho",t[t.eRotate=1]="eRotate",t))(K0||{}),J0=(t=>(t[t.eIdentity=0]="eIdentity",t[t.eIntersection=1]="eIntersection",t[t.eUnion=2]="eUnion",t[t.eSubstraction=3]="eSubstraction",t))(J0||{});function Wl(t){return{partName:t,calcErr:!0,logstr:"",fig:{},vol:{extrudes:[],volumes:[]},sub:{}}}var z0=class{figureToPaxF(t){const e=[];for(const n of t){const r=[];for(const s of n)r.push(s.toPax());e.push(r)}return e}getFigures(t){const e={};for(const n in t){const r=this.figureToPaxF(t[n].mainList);e[n]=r}return e}getPaxJson(t,e,n){return{partName:e.partName,pDef:n,params:t,figures:this.getFigures(e.fig),volume:e.vol,subs:e.sub,log:e.logstr}}getPaxStr(t,e,n){const r=this.getPaxJson(t,e,n);return JSON.stringify(r,null,2)}};function jt(){return new z0}function rs(t){let e=6;return t===1?e=0:t===2&&(e=1),e}function Q0(t){return new qe(rs(t.typ),t.px,t.py,t.radius,t.large,t.ccw)}function Oo(t,e,n,r){let s=Math.PI/2;e<2*n&&(s=2*Math.asin(e/(2*n)));const i=Math.min(t,s),o=Math.ceil(r/i),a=r/o;return[o,a]}function No(t,e,n,r=Math.PI/6,s=2){const[i,o]=Oo(r,s,n,2*Math.PI),a=[];for(let c=0;c<i;c++){const m=t+n*Math.cos(c*o),h=e+n*Math.sin(c*o);a.push([m,h])}const u=a[0][0],l=a[0][1];return a.push([u,l]),a}function Ro(t,e,n,r,s,i,o=Math.PI/6,a=2){const u=Or(r,s,i),[l,c]=Oo(o,a,n,Math.abs(u)),m=i?c:-c,h=l+1,x=[];for(let y=1;y<h;y++){const f=r+y*m,d=t+n*Math.cos(f),p=e+n*Math.sin(f);x.push([d,p])}return x}var Uo=Math.PI/16,Vo=2;function wi(t){return t.toFixed(4)}function yi(t){return t.toString().padStart(3,"0")}function bi(t,e){return[[t,e]]}function el(t,e,n,r,s,i){return Ro(t,e,n,r,s,i,Uo,Vo)}function tl(t,e,n){return No(t,e,n,Uo,Vo)}function nl(t){const e=[];let n=0,r=0;for(const s of t){if(s.typ===0)e.push(...bi(s.px,s.py));else if(s.typ===1)e.push(...bi(s.px,s.py));else if(s.typ===2)try{const i=s,o=new qe(rs(i.typ),i.px,i.py,i.radius,i.large,i.ccw),a=Bt(n,r,o);e.push(...el(a.pc.cx,a.pc.cy,o.radius,a.a1,a.a2,a.arcCcw))}catch(i){console.log("err730: "+i)}n=s.px,r=s.py}return e}var rl=class{pts;ptIdx;idx;constructor(){this.pts=[],this.ptIdx=[],this.idx=0}addContour(t){const e=[],n=[];for(const i of t){const[o,a]=i;e.push(`[ ${wi(o)}, ${wi(a)} ]`),n.push(` ${this.idx}`),this.idx+=1}const r=`[ ${e.join(",")} ]`,s=`[ ${n.join(",")} ]`;this.pts.push(r),this.ptIdx.push(s)}getFigure(t){let e="";const n=[],r=[];for(const o of this.pts.keys()){const a=`ca_${t}_${yi(o)}`,u=`cb_${t}_${yi(o)}`;e+=`${a} = ${this.pts[o]};
|
|
62
|
-
`,e+=`${u} = ${this.ptIdx[o]};
|
|
63
|
-
`,n.push(a),r.push(u)}const s=n.join(", "),i=r.join(", ");return e+=`a_${t} = concat(${s});
|
|
64
|
-
`,e+=`b_${t} = [${i}];
|
|
65
|
-
`,e}},sl=class{getHeader(){return`// Generated by Parametrix
|
|
66
|
-
`}getOneFigure(t,e){const n=new rl;for(const s of t)for(const i of s)if(i.circle===!0){const o=i,a=tl(o.cx,o.cy,o.radius);n.addContour(a)}else{const a=nl(i.seg);n.addContour(a)}return n.getFigure(e)}getAllFigures(t,e){let n="";for(const r in t){const s=this.getOneFigure(t[r],`${e}_${r}`);n+=s}return n}getOneExtrude(t){let e="rotate_extrude",n="";return t.extrudeMethod===0&&(t.length===void 0&&console.log("err103: design error: scad-linear_extrude length undefined!"),e="linear_extrude",n=`height = ${t.length}`),`
|
|
67
|
-
module ${t.outName} () {
|
|
68
|
-
translate( [ ${t.translate[0]}, ${t.translate[1]}, ${t.translate[2]} ])
|
|
69
|
-
rotate( [ ${Ie(t.rotate[0])}, ${Ie(t.rotate[1])}, ${Ie(t.rotate[2])} ])
|
|
70
|
-
${e}(${n}) polygon(a_${t.face}, b_${t.face});
|
|
71
|
-
}
|
|
72
|
-
`}getAllExtrudes(t){let e="";for(const n of t){const r=this.getOneExtrude(n);e+=r}return e}getOneVolume(t){let e="identity";switch(t.boolMethod){case 1:e="intersection";break;case 2:e="union";break;case 3:e="difference";break}const n=[];for(const i of t.inList)n.push(`${i}();`);const r=n.join(`
|
|
73
|
-
`);let s=`
|
|
74
|
-
module ${t.outName} () {
|
|
75
|
-
${e} () {
|
|
76
|
-
${r}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
`;return t.boolMethod===0&&(s=`
|
|
80
|
-
module ${t.outName} () {
|
|
81
|
-
${r}
|
|
82
|
-
}
|
|
83
|
-
`),s}getAllVolumes(t){let e="";for(const n of t){const r=this.getOneVolume(n);e+=r}return e}getAllSubGeoms(t){const e=[];for(const n of t)e.includes(n.subgeom)||e.push(n.subgeom);return e}getOneInherit(t){return`
|
|
84
|
-
module ${t.outName} () {
|
|
85
|
-
translate( [ ${t.translate[0]}, ${t.translate[1]}, ${t.translate[2]} ])
|
|
86
|
-
rotate( [ ${Ie(t.rotate[0])}, ${Ie(t.rotate[1])}, ${Ie(t.rotate[2])} ])
|
|
87
|
-
${t.subdesign}();
|
|
88
|
-
}
|
|
89
|
-
`}getAllInherits(t){let e="";for(const n of t){const r=this.getOneInherit(n);e+=r}return e}getVolume(t){let e="";if(t.inherits!==void 0){const n=this.getAllSubGeoms(t.inherits);for(const r of n){const s=jt().getPaxJson({},r,Jt);e+=this.getAllFigures(s.figures,s.partName),e+=this.getVolume(r.vol)}e+=this.getAllInherits(t.inherits)}return e+=this.getAllExtrudes(t.extrudes),e+=this.getAllVolumes(t.volumes),e}getFooter(t){return`
|
|
90
|
-
pax_${t}();
|
|
91
|
-
`}getExportFile(t){let e=this.getHeader();return e+=this.getAllFigures(t.figures,t.partName),e+=this.getVolume(t.volume),e+=this.getFooter(t.partName),e}};function il(){return new sl}var qo=Math.PI/16,jo=2;function _i(t){return t.toFixed(4)}function Ai(t){return t.toString().padStart(3,"0")}function vi(t,e){return[[t,e]]}function ol(t,e,n,r,s,i){return Ro(t,e,n,r,s,i,qo,jo)}function al(t){const e=[];let n=0,r=0;for(const s of t){if(s.typ===0)e.push(...vi(s.px,s.py));else if(s.typ===1)e.push(...vi(s.px,s.py));else if(s.typ===2)try{const i=s,o=new qe(rs(i.typ),i.px,i.py,i.radius,i.large,i.ccw),a=Bt(n,r,o);e.push(...ol(a.pc.cx,a.pc.cy,o.radius,a.a1,a.a2,a.arcCcw))}catch(i){console.log("err730: "+i)}n=s.px,r=s.py}return e}function ul(t,e,n){return No(t,e,n,qo,jo)}function Wo(t,e){const n=[];for(const i of t){const[o,a]=i;n.push(`[ ${_i(o)}, ${_i(a)} ]`)}const r=`[ ${n.join(`,
|
|
92
|
-
`)} ]`;return`const ${e} = polygon({ points: ${r} });
|
|
93
|
-
|
|
94
|
-
`}function cl(t,e,n,r){const s=ul(t,e,n);return Wo(s,r)}function ll(t,e){const n=al(t);return Wo(n,e)}function fl(t,e){let n="";const r=t[0];return t.slice(1).length>0?n+=`${e} = subtract( ${t.join(", ")} );
|
|
95
|
-
`:n+=`${e} = ${r};
|
|
96
|
-
`,n}function dl(t,e){let n="";const r=t[0];return t.slice(1).length>0?n+=`${e} = union( ${t.join(", ")} );
|
|
97
|
-
`:n+=`${e} = ${r};
|
|
98
|
-
`,n}var pl=class{getHeader(){return`// Generated by Parametrix
|
|
99
|
-
|
|
100
|
-
const { polygon } = require('@jscad/modeling').primitives;
|
|
101
|
-
//const { subtract } = require('@jscad/modeling').booleans;
|
|
102
|
-
//const { union, intersect, scission, subtract } = require('@jscad/modeling').booleans;
|
|
103
|
-
const { union, intersect, subtract } = require('@jscad/modeling').booleans;
|
|
104
|
-
const { extrudeLinear, extrudeRotate } = require('@jscad/modeling').extrusions;
|
|
105
|
-
const { translate, rotate } = require('@jscad/modeling').transforms;
|
|
106
|
-
|
|
107
|
-
const main = () => {
|
|
108
|
-
|
|
109
|
-
`}getOneFigure(t,e){let n="";const r=[];for(const[s,i]of t.entries()){const o=`face_${e}_Fa${Ai(s)}`,a=[];for(const[u,l]of i.entries()){const c=`ctr_${o}_Ctr${Ai(u)}`;if(l.circle===!0){const m=l;n+=cl(m.cx,m.cy,m.radius,c)}else n+=ll(l.seg,c);a.push(c)}n+=fl(a,o),r.push(o)}return n+=dl(r,e),n}getAllFigures(t,e){let n="";for(const r in t){const s=this.getOneFigure(t[r],`fig_${e}_${r}`);n+=s}return n}getOneExtrude(t){let e="extrudeRotate",n="{segments: 32}";return t.extrudeMethod===0&&(t.length===void 0&&console.log("err079: design error: extrudeLinear length undefined!"),e="extrudeLinear",n=`{height: ${t.length}}`),`
|
|
110
|
-
const ${t.outName} =
|
|
111
|
-
translate( [ ${t.translate[0]}, ${t.translate[1]}, ${t.translate[2]}, ],
|
|
112
|
-
rotate( [ ${t.rotate[0]}, ${t.rotate[1]}, ${t.rotate[2]}, ],
|
|
113
|
-
${e}( ${n}, fig_${t.face} )
|
|
114
|
-
)
|
|
115
|
-
);
|
|
116
|
-
|
|
117
|
-
`}getAllExtrudes(t){let e="";for(const n of t){const r=this.getOneExtrude(n);e+=r}return e}getOneVolume(t){let e="identity";switch(t.boolMethod){case 1:e="intersect";break;case 2:e="union";break;case 3:e="subtract";break}const n=t.inList.join(", ");let r=`const ${t.outName} = ${e}( ${n} );
|
|
118
|
-
`;return t.boolMethod===0&&(r=`const ${t.outName} = ${t.inList[0]};
|
|
119
|
-
`),r}getAllVolumes(t){let e="";for(const n of t){const r=this.getOneVolume(n);e+=r}return e}getAllSubGeoms(t){const e=[];for(const n of t)e.includes(n.subgeom)||e.push(n.subgeom);return e}getOneInherit(t){return`
|
|
120
|
-
const ${t.outName} =
|
|
121
|
-
translate( [ ${t.translate[0]}, ${t.translate[1]}, ${t.translate[2]}, ],
|
|
122
|
-
rotate( [ ${t.rotate[0]}, ${t.rotate[1]}, ${t.rotate[2]}, ],
|
|
123
|
-
${t.subdesign}
|
|
124
|
-
)
|
|
125
|
-
);
|
|
126
|
-
`}getAllInherits(t){let e="";for(const n of t){const r=this.getOneInherit(n);e+=r}return e}getVolume(t){let e="";if(t.inherits!==void 0){const n=this.getAllSubGeoms(t.inherits);for(const r of n){const s=jt().getPaxJson({},r,Jt);e+=this.getAllFigures(s.figures,s.partName),e+=this.getVolume(r.vol)}e+=this.getAllInherits(t.inherits)}return e+=this.getAllExtrudes(t.extrudes),e+=this.getAllVolumes(t.volumes),e}getFooter(t){return`
|
|
127
|
-
return pax_${t};
|
|
128
|
-
}
|
|
129
|
-
module.exports = { main };
|
|
130
|
-
`}getExportFile(t){let e=this.getHeader();return e+=this.getAllFigures(t.figures,t.partName),e+=this.getVolume(t.volume),e+=this.getFooter(t.partName),e}};function hl(){return new pl}function ue(t){return t.toFixed(4)}function be(t){return t.toString().padStart(3,"0")}function ml(t,e,n,r){return`def ${r}():
|
|
131
|
-
# Radius, XYZ-position, orientation
|
|
132
|
-
aCircle = Part.makeCircle(${ue(n)}, App.Vector(${ue(t)}, ${ue(e)}, 0), App.Vector(0, 0, 1))
|
|
133
|
-
aWire = Part.Wire(aCircle)
|
|
134
|
-
rFace = Part.Face(aWire)
|
|
135
|
-
return rFace
|
|
136
|
-
|
|
137
|
-
`}function xl(t,e){let n=`def ${e}():
|
|
138
|
-
`,r=0,s=0,i=0,o=0,a=0;for(const[l,c]of t.entries()){if(c.typ===0)n+=` P${be(i)} = App.Vector(${ue(c.px)}, ${ue(c.py)}, 0)
|
|
139
|
-
`,i+=1;else if(c.typ===1)n+=` P${be(i)} = App.Vector(${ue(c.px)}, ${ue(c.py)}, 0)
|
|
140
|
-
`,l<t.length-1?o=i:o=0,n+=` S${be(a)} = Part.LineSegment(P${be(i-1)}, P${be(o)})
|
|
141
|
-
`,i+=1,a+=1;else if(c.typ===2){try{const m=Q0(c),h=$o(r,s,m,2)[0];n+=` P${be(i)} = App.Vector(${ue(h.cx)}, ${ue(h.cy)}, 0)
|
|
142
|
-
`,i+=1}catch(m){console.log("err730: "+m)}n+=` P${be(i)} = App.Vector(${ue(c.px)}, ${ue(c.py)}, 0)
|
|
143
|
-
`,l<t.length-1?o=i:o=0,n+=` S${be(a)} = Part.Arc(P${be(i-2)}, P${be(i-1)}, P${be(o)})
|
|
144
|
-
`,i+=1,a+=1}r=c.px,s=c.py}const u=Array.from({length:a},(l,c)=>`S${be(c)}`);return n+=` aShape = Part.Shape([${u.join(", ")}])
|
|
145
|
-
aWire = Part.Wire(aShape.Edges)
|
|
146
|
-
subFace = Part.Face(aWire)
|
|
147
|
-
subFace.check()
|
|
148
|
-
return subFace
|
|
149
|
-
|
|
150
|
-
`,n}function Dl(t,e){let n=`def ${e}():
|
|
151
|
-
`;const r=[];for(const[o,a]of t.entries()){const u=`FC${be(o)}`;n+=` ${u} = ${a}()
|
|
152
|
-
`,r.push(u)}const s=r[0],i=r.slice(1);return i.length>0?n+=` rOneFace = ${s}.cut([${i.join(", ")}])
|
|
153
|
-
`:n+=` rOneFace = ${s}
|
|
154
|
-
`,n+=` rOneFace.check()
|
|
155
|
-
return rOneFace
|
|
156
|
-
|
|
157
|
-
`,n}function gl(t,e){let n=`def ${e}():
|
|
158
|
-
`;const r=[];for(const[o,a]of t.entries()){const u=`FA${be(o)}`;n+=` ${u} = ${a}()
|
|
159
|
-
`,r.push(u)}const s=r[0],i=r.slice(1);return i.length>0?n+=` rOneFig = ${s}.fuse([${i.join(", ")}])
|
|
160
|
-
`:n+=` rOneFig = ${s}
|
|
161
|
-
`,n+=` rOneFig.check()
|
|
162
|
-
return rOneFig
|
|
163
|
-
|
|
164
|
-
`,n}var wl=class{getHeader(t){return`# freecad-python generated by Parametrix
|
|
165
|
-
# run the script with:
|
|
166
|
-
# freecad.cmd myScript.py
|
|
167
|
-
|
|
168
|
-
import FreeCAD as App
|
|
169
|
-
import Part
|
|
170
|
-
|
|
171
|
-
#print(sys.argv)
|
|
172
|
-
outFileName = "${t}"
|
|
173
|
-
if (len(sys.argv) == 3):
|
|
174
|
-
outFileName = sys.argv[2]
|
|
175
|
-
print(f"outFileName: {outFileName}")
|
|
176
|
-
|
|
177
|
-
`}getOneFigure(t,e){let n="";const r=[];for(const[s,i]of t.entries()){const o=`face_${e}_Fa${s}`,a=[];for(const[u,l]of i.entries()){const c=`ctr_${o}_Ctr${u}`;if(l.circle===!0){const m=l;n+=ml(m.cx,m.cy,m.radius,c)}else n+=xl(l.seg,c);a.push(c)}n+=Dl(a,o),r.push(o)}return n+=gl(r,e),n}getAllFigures(t,e){let n="";for(const r in t){const s=this.getOneFigure(t[r],`${e}_${r}`);n+=s}return n}getOneExtrude(t){let e=`def fex_${t.outName}():
|
|
178
|
-
FIG = ${t.face}()
|
|
179
|
-
`;return t.extrudeMethod===0?(t.length===void 0&&console.log(`err103: ${t.face} ${t.outName} design error: eLinearOrtho length undefined!`),e+=` VEX = FIG.extrude(App.Vector(0, 0, ${t.length}))`):t.extrudeMethod===1&&(e+=" VEX = FIG.revolve(App.Vector(0, 0, 0), App.Vector(0, 1, 0), 360).rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), 90)"),e+=`
|
|
180
|
-
VR1 = VEX.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), ${ue(Ie(t.rotate[0]))})
|
|
181
|
-
VR2 = VR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), ${ue(Ie(t.rotate[1]))})
|
|
182
|
-
VR3 = VR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), ${ue(Ie(t.rotate[2]))})
|
|
183
|
-
VFP = VR3.translate(App.Vector(${ue(t.translate[0])}, ${ue(t.translate[1])}, ${ue(t.translate[2])}))
|
|
184
|
-
return VFP
|
|
185
|
-
${t.outName} = fex_${t.outName}()
|
|
186
|
-
|
|
187
|
-
`,e}getAllExtrudes(t){let e="";for(const n of t){const r=this.getOneExtrude(n);e+=r}return e}getOneVolume(t){let e="";if(t.inList.length===0)console.log(`err215: ${t.outName} has an empty inList`);else if(t.inList.length===1||t.boolMethod===0)e+=`${t.outName} = ${t.inList[0]}
|
|
188
|
-
`;else{const n=t.inList[0],r=t.inList.slice(1);let s="dbg897";switch(t.boolMethod){case 1:s="common";break;case 2:s="fuse";break;case 3:s="cut";break}e+=`def fvol_${t.outName}():
|
|
189
|
-
V000 = ${n}
|
|
190
|
-
`;let i=0;for(const o of r)e+=` V${be(i+1)} = V${be(i)}.${s}(${o})
|
|
191
|
-
`,i+=1;e+=` VFC = V${be(i)}.removeSplitter()
|
|
192
|
-
return VFC
|
|
193
|
-
${t.outName} = fvol_${t.outName}()
|
|
194
|
-
|
|
195
|
-
`}return e}getAllVolumes(t){let e="";for(const n of t){const r=this.getOneVolume(n);e+=r}return e}getAllSubGeoms(t){const e=[];for(const n of t)e.includes(n.subgeom)||e.push(n.subgeom);return e}getOneInherit(t){return`def finh_${t.outName}():
|
|
196
|
-
IVR1 = ${t.subdesign}.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), ${ue(Ie(t.rotate[0]))})
|
|
197
|
-
IVR2 = IVR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), ${ue(Ie(t.rotate[1]))})
|
|
198
|
-
IVR3 = IVR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), ${ue(Ie(t.rotate[2]))})
|
|
199
|
-
IVF = IVR3.translate(App.Vector(${ue(t.translate[0])}, ${ue(t.translate[1])}, ${ue(t.translate[2])}))
|
|
200
|
-
return IVF
|
|
201
|
-
${t.outName} = finh_${t.outName}()
|
|
202
|
-
|
|
203
|
-
`}getAllInherits(t){let e="";for(const n of t){const r=this.getOneInherit(n);e+=r}return e}getVolume(t){let e="";if(t.inherits!==void 0){const n=this.getAllSubGeoms(t.inherits);for(const r of n){const s=jt().getPaxJson({},r,Jt);e+=this.getAllFigures(s.figures,s.partName),e+=this.getVolume(r.vol)}e+=this.getAllInherits(t.inherits)}return e+=this.getAllExtrudes(t.extrudes),e+=this.getAllVolumes(t.volumes),e}getFooter(t){return`
|
|
204
|
-
pax_${t}.check()
|
|
205
|
-
#pax_${t}.exportBrep(f"{outFileName}.brep")
|
|
206
|
-
#pax_${t}.exportIges(f"{outFileName}.igs")
|
|
207
|
-
#pax_${t}.exportStep(f"{outFileName}.stp")
|
|
208
|
-
pax_${t}.exportStl(f"{outFileName}.stl")
|
|
209
|
-
|
|
210
|
-
`}getExportFile(t){let e=this.getHeader(t.partName);return e+=this.getAllFigures(t.figures,t.partName),e+=this.getVolume(t.volume),e+=this.getFooter(t.partName),e}};function yl(){return new wl}var bl=class{xMin;xMax;yMin;yMax;firstDone;constructor(){this.firstDone=!1,this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addAContour(t){if(t.length>0){const e=[];this.firstDone&&(e.push(Y(this.xMin,this.yMin)),e.push(Y(this.xMax,this.yMax)));for(const o of t)e.push(...o.generatePoints(2));const[n,r,s,i]=Bo(e);this.xMin=n,this.xMax=r,this.yMin=s,this.yMax=i}}getViewBox(){const t=Math.round((this.xMax-this.xMin)*1.1)+10,e=Math.round((this.yMax-this.yMin)*1.1)+10,n=Math.round(this.xMin-t*.05),r=Math.round(this.yMin-e*.05);return[n,t,r,e]}},_l=class{minMax;groups;svg;constructor(){this.minMax=new bl,this.groups=[],this.svg=L0()}addAContour(t,e="",n=fe.contour){this.minMax.addAContour(t);const r={gpName:e,gpColor:n,ctrs:t};this.groups.push(r)}makeSvg(t){for(const e of this.groups){e.gpName!==""&&this.svg.addGroup(e.gpName);for(const n of e.ctrs){let r=n.imposedColor;r===""&&(r=e.gpColor),this.svg.addSvgString(n.toSvg(t,r))}e.gpName!==""&&this.svg.closeGroup()}}stringify(){const[t,e,n,r]=this.minMax.getViewBox();return this.svg.addHeader(t,e,n,r),this.makeSvg(this.minMax.yMax+this.minMax.yMin),this.svg.stringify()}};function Ho(){return new _l}function Hn(t){const e=Ho();return e.addAContour(t),e.stringify()}function Mn(t){const e=Ho();return e.addAContour(t.mainListC(),"main",fe.mainInner),e.addAContour(t.mainBList,"mainB",fe.mainB),e.addAContour(t.secondList,"second",fe.second),e.addAContour(t.secondBList,"secondB",fe.secondB),e.addAContour(t.dynamicsList,"dynamics",fe.dynamics),e.stringify()}function Yn(t){const e=U0();for(const r of t)if(r.circle){const s=r.toDxfSeg()[0];e.addCircle(s.p1x,s.p1y,s.radius)}else for(const s of r.toDxfSeg())s.arc?e.addArc(s.p1x,s.p1y,s.radius,s.a1,s.a2):e.addLine(s.p1x,s.p1y,s.p2x,s.p2y);return e.stringify()}function Al(t){let e="";return e+=t.logstr,e}function Yo(t,e,n){return jt().getPaxStr(t,e,n)}function Go(t){const e=jt().getPaxJson({},t,Jt);return il().getExportFile(e)}function Zo(t){const e=jt().getPaxJson({},t,Jt);return hl().getExportFile(e)}function Xo(t){const e=jt().getPaxJson({},t,Jt);return yl().getExportFile(e)}async function vl(t,e,n,r,s){const i=new Tc("application/zip"),o=new zc(i),a=e.partName,u=new Ce(JSON.stringify(t,null,2));await o.add(`param_${a}.json`,u);const l=new Ce(e.logstr);await o.add(`geom_${a}_log.txt`,l);const c=new Ce(r.logstr);await o.add(`geom_${a}_t${n}_log.txt`,c);for(const w in e.fig){const b=new Ce(Hn(e.fig[w].mainListC()));await o.add(`face_${a}_${w}.svg`,b);const v=new Ce(Yn(e.fig[w].mainListC()));await o.add(`face_${a}_${w}.dxf`,v);const A=new Ce(Mn(e.fig[w]));await o.add(`deco_${a}_${w}.svg`,A);const E=new Ce(Mn(r.fig[w]));await o.add(`deco_${a}_${w}_t${n}.svg`,E)}const m=qr(e.fig),h=new Ce(Hn(m.mainListC()));await o.add(`face_${a}_all_merged.svg`,h);const x=new Ce(Yn(m.mainListC()));await o.add(`face_${a}_all_merged.dxf`,x);const y=new Ce(Mn(m));await o.add(`deco_${a}_all_merged.svg`,y);const f=new Ce(Mn(m));await o.add(`deco_${a}_all_merged_t${n}.svg`,f);const d=new Ce(Yo(t,e,s));await o.add(`${a}.pax.json`,d);const p=new Ce(Go(e));await o.add(`${a}_noarc_openscad.scad`,p);const D=new Ce(Zo(e));await o.add(`${a}_noarc_jscad.js`,D);const g=new Ce(Xo(e));return await o.add(`${a}_freecad.py`,g),await o.close(),await i.getData()}var Cl=(t=>(t[t.eSVG=0]="eSVG",t[t.eSVGALL=1]="eSVGALL",t[t.eDXF=2]="eDXF",t[t.eDXFALL=3]="eDXFALL",t[t.eTXTLOG=4]="eTXTLOG",t[t.ePAX=5]="ePAX",t[t.eOPENSCAD=6]="eOPENSCAD",t[t.eJSCAD=7]="eJSCAD",t[t.eFREECAD=8]="eFREECAD",t[t.eZIP=9]="eZIP",t))(Cl||{});function Hl(t,e,n,r,s){const i=t(0,e);let o="";if(i.calcErr)console.log("err931: error by calling geome ${geome0.calcErr}");else{const a=Object.keys(i.fig);if(s===0)if(a.includes(r)){const u=i.fig[r];o=Hn(u.mainListC())}else console.log(`err749: fileTextContent eFace ${r} invalid`);else if(s===1){const u=qr(i.fig);o=Hn(u.mainListC())}else if(s===2)if(a.includes(r)){const u=i.fig[r];o=Yn(u.mainListC())}else console.log(`err759: fileTextContent eFace ${r} invalid`);else if(s===3){const u=qr(i.fig);o=Yn(u.mainListC())}else s===4?o=Al(i):s===5?o=Yo(e,i,n):s===6?o=Go(i):s===7?o=Zo(i):s===8?o=Xo(i):console.log(`err912: unknown exportFormat ${s}`)}return o}async function Yl(t,e,n,r,s){const i=t(0,n),o=t(e,n);let a=new Blob;return!i.calcErr&&!o.calcErr?s===9?a=await vl(n,i,e,o,r):console.log(`err913: unknown exportFormat ${s}`):console.log("err932: error by calling geome ${geome0.calcErr} ${geome1.calcErr}"),a}function Gl(t){let e="";return t===0||t===1?e="image/svg+xml":t===2||t===3?e="application/dxf":t===4?e="text/plain":t===5?e="application/json":t===6||t===7||t===8?e="text/plain":t===9&&(e="application/zip"),e}function Zl(t){let e="";return t===0||t===1?e=".svg":t===2||t===3?e=".dxf":t===4?e=".log":t===5?e=".pax.json":t===6?e="_noarc_openscad.scad":t===7?e="_noarc_jscad.js":t===8?e="_freecad.py":t===9&&(e=".zip"),e}function Xl(t){let e=!1;return t===9&&(e=!0),e}function Kl(t,e,n,r){return JSON.stringify({lastModif:t,partName:e,pVal:n,comment:r},null," ")}function Jl(t){const e=y0.parse(t),n="lastModif",r="partName",s="pVal",i="comment";let o="";const a={lastModif:"",partName:"",pVal:{},comment:""};if(Object.hasOwn(e,n)&&(a[n]=e[n]),Object.hasOwn(e,r)&&(a[r]=e[r]),Object.hasOwn(e,s)){const u=e[s];for(const l of Object.keys(u)){const c=u[l];if(isNaN(c))throw`err905: ${c} is not a number!`;a[s][l]=c}o+=`info398: parsing file has found ${Object.keys(a[s]).length} parameters
|
|
211
|
-
`}else throw`err489: parameter-json-file has no key ${s}
|
|
212
|
-
`;return Object.hasOwn(e,i)&&(a[i]=e[i]),[a,o]}function zl(t,e,n,r,s=0){return Y0(t,e).addCornerRounded(s).addSegStrokeR(n,0).addCornerRounded(s).addSegStrokeR(0,r).addCornerRounded(s).addSegStrokeR(-n,0).addCornerRounded(s).closeSegStroke()}function Ql(t){const e=[];e.push("version details:"),e.push(`${t.name} : ${t.version}`),e.push("dependencies:");const n=Object.keys(t.dependencies);for(const[r,s]of n.entries()){const i=s;e.push(`${r+1} : ${s} : ${t.dependencies[i]}`)}return e}export{$l as A,fe as B,Pl as C,Vl as D,J0 as E,Ie as F,Cl as G,Yl as H,Hl as I,Zl as J,Xl as K,Gl as L,qr as M,X0 as P,jl as a,Nl as b,Y0 as c,K0 as d,Sl as e,Z0 as f,at as g,zl as h,Wl as i,Fl as j,Tl as k,Nr as l,Rl as m,Ul as n,Ol as o,ql as p,Kl as q,kl as r,ps as s,Jl as t,Ll as u,Ql as v,Bl as w,Ml as x,Il as y,Kn as z};
|